341 lines
816 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* @module jQuery
* @author jQuery Foundation and other contributors
* @see https://code.jquery.com/jquery/
* @license MIT (jquery.org/license)
* @version 3.6.0
*/
!function (e, t) { "use strict"; "object" == typeof module && "object" == typeof module.exports ? module.exports = e.document ? t(e, !0) : function (e) { if (!e.document) throw new Error("jQuery requires a window with a document"); return t(e) } : t(e) }("undefined" != typeof window ? window : this, function (C, e) { "use strict"; var t = [], r = Object.getPrototypeOf, s = t.slice, g = t.flat ? function (e) { return t.flat.call(e) } : function (e) { return t.concat.apply([], e) }, u = t.push, i = t.indexOf, n = {}, o = n.toString, v = n.hasOwnProperty, a = v.toString, l = a.call(Object), y = {}, m = function (e) { return "function" == typeof e && "number" != typeof e.nodeType && "function" != typeof e.item }, x = function (e) { return null != e && e === e.window }, E = C.document, c = { type: !0, src: !0, nonce: !0, noModule: !0 }; function b(e, t, n) { var r, i, o = (n = n || E).createElement("script"); if (o.text = e, t) for (r in c) (i = t[r] || t.getAttribute && t.getAttribute(r)) && o.setAttribute(r, i); n.head.appendChild(o).parentNode.removeChild(o) } function w(e) { return null == e ? e + "" : "object" == typeof e || "function" == typeof e ? n[o.call(e)] || "object" : typeof e } var f = "3.6.0", S = function (e, t) { return new S.fn.init(e, t) }; function p(e) { var t = !!e && "length" in e && e.length, n = w(e); return !m(e) && !x(e) && ("array" === n || 0 === t || "number" == typeof t && 0 < t && t - 1 in e) } S.fn = S.prototype = { jquery: f, constructor: S, length: 0, toArray: function () { return s.call(this) }, get: function (e) { return null == e ? s.call(this) : e < 0 ? this[e + this.length] : this[e] }, pushStack: function (e) { var t = S.merge(this.constructor(), e); return t.prevObject = this, t }, each: function (e) { return S.each(this, e) }, map: function (n) { return this.pushStack(S.map(this, function (e, t) { return n.call(e, t, e) })) }, slice: function () { return this.pushStack(s.apply(this, arguments)) }, first: function () { return this.eq(0) }, last: function () { return this.eq(-1) }, even: function () { return this.pushStack(S.grep(this, function (e, t) { return (t + 1) % 2 })) }, odd: function () { return this.pushStack(S.grep(this, function (e, t) { return t % 2 })) }, eq: function (e) { var t = this.length, n = +e + (e < 0 ? t : 0); return this.pushStack(0 <= n && n < t ? [this[n]] : []) }, end: function () { return this.prevObject || this.constructor() }, push: u, sort: t.sort, splice: t.splice }, S.extend = S.fn.extend = function () { var e, t, n, r, i, o, a = arguments[0] || {}, s = 1, u = arguments.length, l = !1; for ("boolean" == typeof a && (l = a, a = arguments[s] || {}, s++), "object" == typeof a || m(a) || (a = {}), s === u && (a = this, s--); s < u; s++)if (null != (e = arguments[s])) for (t in e) r = e[t], "__proto__" !== t && a !== r && (l && r && (S.isPlainObject(r) || (i = Array.isArray(r))) ? (n = a[t], o = i && !Array.isArray(n) ? [] : i || S.isPlainObject(n) ? n : {}, i = !1, a[t] = S.extend(l, o, r)) : void 0 !== r && (a[t] = r)); return a }, S.extend({ expando: "jQuery" + (f + Math.random()).replace(/\D/g, ""), isReady: !0, error: function (e) { throw new Error(e) }, noop: function () { }, isPlainObject: function (e) { var t, n; return !(!e || "[object Object]" !== o.call(e)) && (!(t = r(e)) || "function" == typeof (n = v.call(t, "constructor") && t.constructor) && a.call(n) === l) }, isEmptyObject: function (e) { var t; for (t in e) return !1; return !0 }, globalEval: function (e, t, n) { b(e, { nonce: t && t.nonce }, n) }, each: function (e, t) { var n, r = 0; if (p(e)) { for (n = e.length; r < n; r++)if (!1 === t.call(e[r], r, e[r])) break } else for (r in e) if (!1 === t.call(e[r], r, e[r])) break; return e }, makeArray: function (e, t) { var n = t || []; return null != e && (p(Object(e)) ? S.merge(n, "string" == typeof e ? [e] : e) : u.call(n, e)), n }, inArray: function (e, t, n) { return null == t ? -1 : i.call(t, e, n) }, merge: function (e, t) { for (var n = +t.length, r = 0, i = e.length; r < n; r++)e[i++] = t[r]; return e.length = i, e }, grep: function (e, t, n) { for (var r = [], i = 0, o = e.length, a = !n; i < o; i++)!t(e[i], i) !== a && r.push(e[i]); return r }, map: function (e, t, n) { var r, i, o = 0, a = []; if (p(e)) for (r = e.length; o < r; o++)null != (i = t(e[o], o, n)) && a.push(i); else for (o in e) null != (i = t(e[o], o, n)) && a.push(i); return g(a) }, guid: 1, support: y }), "function" == typeof Symbol && (S.fn[Symbol.iterator] = t[Symbol.iterator]), S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), function (e, t) { n["[object " + t + "]"] = t.toLowerCase() }); var d = function (n) { var e, d, b, o, i, h, f, g, w, u, l, T, C, a, E, v, s, c, y, S = "sizzle" + 1 * new Date, p = n.document, k = 0, r = 0, m = ue(), x = ue(), A = ue(), N = ue(), j = function (e, t) { return e === t && (l = !0), 0 }, D = {}.hasOwnProperty, t = [], q = t.pop, L = t.push, H = t.push, O = t.slice, P = function (e, t) { for (var n = 0, r = e.length; n < r; n++)if (e[n] === t) return n; return -1 }, R = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", M = "[\\x20\\t\\r\\n\\f]", I = "(?:\\\\[\\da-fA-F]{1,6}" + M + "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", W = "\\[" + M + "*(" + I + ")(?:" + M + "*([*^$|!~]?=)" + M + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + I + "))|)" + M + "*\\]", F = ":(" + I + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + W + ")*)|.*)\\)|)", B = new RegExp(M + "+", "g"), $ = new RegExp("^" + M + "+|((?:^|[^\\\\])(?:\\\\.)*)" + M + "+$", "g"), _ = new RegExp("^" + M + "*," + M + "*"), z = new RegExp("^" + M + "*([>+~]|" + M + ")" + M + "*"), U = new RegExp(M + "|>"), X = new RegExp(F), V = new RegExp("^" + I + "$"), G = { ID: new RegExp("^#(" + I + ")"), CLASS: new RegExp("^\\.(" + I + ")"), TAG: new RegExp("^(" + I + "|[*])"), ATTR: new RegExp("^" + W), PSEUDO: new RegExp("^" + F), CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + M + "*(even|odd|(([+-]|)(\\d*)n|)" + M + "*(?:([+-]|)" + M + "*(\\d+)|))" + M + "*\\)|)", "i"), bool: new RegExp("^(?:" + R + ")$", "i"), needsContext: new RegExp("^" + M + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + M + "*((?:-\\d)?\\d*)" + M + "*\\)|)(?=[^-]|$)", "i") }, Y = /HTML$/i, Q = /^(?:input|select|textarea|button)$/i, J = /^h\d$/i, K = /^[^{]+\{\s*\[native \w/, Z = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, ee = /[+~]/, te = new RegExp("\\\\[\\da-fA-F]{1,6}" + M + "?|\\\\([^\\r\\n\\f])", "g"), ne = function (e, t) { var n = "0x" + e.slice(1) - 65536; return t || (n < 0 ? String.fromCharCode(n + 65536) : String.fromCharCode(n >> 10 | 55296, 1023 & n | 56320)) }, re = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, ie = function (e, t) { return t ? "\0" === e ? "\ufffd" : e.slice(0, -1) + "\\" + e.charCodeAt(e.length - 1).toString(16) + " " : "\\" + e }, oe = function () { T() }, ae = be(function (e) { return !0 === e.disabled && "fieldset" === e.nodeName.toLowerCase() }, { dir: "parentNode", next: "legend" }); try { H.apply(t = O.call(p.childNodes), p.childNodes), t[p.childNodes.length].nodeType } catch (e) { H = { apply: t.length ? function (e, t) { L.apply(e, O.call(t)) } : function (e, t) { var n = e.length, r = 0; while (e[n++] = t[r++]); e.length = n - 1 } } } function se(t, e, n, r) { var i, o, a, s, u, l, c, f = e && e.ownerDocument, p = e ? e.nodeType : 9; if (n = n || [], "string" != typeof t || !t || 1 !== p && 9 !== p && 11 !== p) return n; if (!r && (T(e), e = e || C, E)) { if (11 !== p && (u = Z.exec(t))) if (i = u[1]) { if (9 === p) { if (!(a = e.getElementById(i))) return n; if (a.id === i) return n.push(a), n } else if (f && (a = f.getElementById(i)) && y(e, a) && a.id === i) return n.push(a), n } else { if (u[2]) return H.apply(n, e.getElementsByTagName(t)), n; if ((i = u[3]) && d.getElementsByClassName && e.getElementsByClassName) return H.apply(n, e.getElementsByClassName(i)), n } if (d.qsa && !N[t + " "] && (!v || !v.test(t)) && (1 !== p || "object" !== e.nodeName.toLowerCase())) { if (c = t, f = e, 1 === p && (U.test(t) || z.test(t))) { (f = ee.test(t) && ye(e.parentNode) || e) === e && d.scope || ((s = e.getAttribute("id")) ? s = s.replace(re, ie) : e.setAttribute("id", s = S)), o = (l = h(t)).length; while (o--) l[o] = (s ? "#" + s : ":scope") + " " + xe(l[o]); c = l.join(",") } try { return H.apply(n, f.querySelectorAll(c)), n } catch (e) { N(t, !0) } finally { s === S && e.removeAttribute("id") } } } return g(t.replace($, "$1"), e, n, r) } function ue() { var r = []; return function e(t, n) { return r.push(t + " ") > b.cacheLength && delete e[r.shift()], e[t + " "] = n } } function le(e) { return e[S] = !0, e } function ce(e) { var t = C.createElement("fieldset"); try { return !!e(t) } catch (e) { return !1 } finally { t.parentNode && t.parentNode.removeChild(t), t = null } } function fe(e, t) { var n = e.split("|"), r = n.length; while (r--) b.attrHandle[n[r]] = t } function pe(e, t) { var n = t && e, r = n && 1 === e.nodeType && 1 === t.nodeType && e.sourceIndex - t.sourceIndex; if (r) return r; if (n) while (n = n.nextSibling) if (n === t) return -1; return e ? 1 : -1 } function de(t) { return function (e) { return "input" === e.nodeName.toLowerCase() && e.type === t } } function he(n) { return function (e) { var t = e.nodeName.toLowerCase(); return ("input" === t || "button" === t) && e.type === n } } function ge(t) { return function (e) { return "form" in e ? e.parentNode && !1 === e.disabled ? "label" in e ? "label" in e.parentNode ? e.parentNode.disabled === t : e.disabled === t : e.isDisabled === t || e.isDisabled !== !t && ae(e) === t : e.disabled === t : "label" in e && e.disabled === t } } function ve(a) { return le(function (o) { return o = +o, le(function (e, t) { var n, r = a([], e.length, o), i = r.length; while (i--) e[n = r[i]] && (e[n] = !(t[n] = e[n])) }) }) } function ye(e) { return e && "undefined" != typeof e.getElementsByTagName && e } for (e in d = se.support = {}, i = se.isXML = function (e) { var t = e && e.namespaceURI, n = e && (e.ownerDocument || e).documentElement; return !Y.test(t || n && n.nodeName || "HTML") }, T = se.setDocument = function (e) { var t, n, r = e ? e.ownerDocument || e : p; return r != C && 9 === r.nodeType && r.documentElement && (a = (C = r).documentElement, E = !i(C), p != C && (n = C.defaultView) && n.top !== n && (n.addEventListener ? n.addEventListener("unload", oe, !1) : n.attachEvent && n.attachEvent("onunload", oe)), d.scope = ce(function (e) { return a.appendChild(e).appendChild(C.createElement("div")), "undefined" != typeof e.querySelectorAll && !e.querySelectorAll(":scope fieldset div").length }), d.attributes = ce(function (e) { return e.className = "i", !e.getAttribute("className") }), d.getElementsByTagName = ce(function (e) { return e.appendChild(C.createComment("")), !e.getElementsByTagName("*").length }), d.getElementsByClassName = K.test(C.getElementsByClassName), d.getById = ce(function (e) { return a.appendChild(e).id = S, !C.getElementsByName || !C.getElementsByName(S).length }), d.getById ? (b.filter.ID = function (e) { var t = e.replace(te, ne); return function (e) { return e.getAttribute("id") === t } }, b.find.ID = function (e, t) { if ("undefined" != typeof t.getElementById && E) { var n = t.getElementById(e); return n ? [n] : [] } }) : (b.filter.ID = function (e) { var n = e.replace(te, ne); return function (e) { var t = "undefined" != typeof e.getAttributeNode && e.getAttributeNode("id"); return t && t.value === n } }, b.find.ID = function (e, t) { if ("undefined" != typeof t.getElementById && E) { var n, r, i, o = t.getElementById(e); if (o) { if ((n = o.getAttributeNode("id")) && n.value === e) return [o]; i = t.getElementsByName(e), r = 0; while (o = i[r++]) if ((n = o.getAttributeNode("id")) && n.value === e) return [o] } return [] } }), b.find.TAG = d.getElementsByTagName ? function (e, t) { return "undefined" != typeof t.getElementsByTagName ? t.getElementsByTagName(e) : d.qsa ? t.querySelectorAll(e) : void 0 } : function (e, t) { var n, r = [], i = 0, o = t.getElementsByTagName(e); if ("*" === e) { while (n = o[i++]) 1 === n.nodeType && r.push(n); return r } return o }, b.find.CLASS = d.getElementsByClassName && function (e, t) { if ("undefined" != typeof t.getElementsByClassName && E) return t.getElementsByClassName(e) }, s = [], v = [], (d.qsa = K.test(C.querySelectorAll)) && (ce(function (e) { var t; a.appendChild(e).innerHTML = "<a id='" + S + "'></a><select id='" + S + "-\r\\' msallowcapture=''><option selected=''></option></select>", e.querySelectorAll("[msallowcapture^='']").length && v.push("[*^$]=" + M + "*(?:''|\"\")"), e.querySelectorAll("[selected]").length || v.push("\\[" + M + "*(?:value|" + R + ")"), e.querySelectorAll("[id~=" + S + "-]").length || v.push("~="), (t = C.createElement("input")).setAttribute("name", ""), e.appendChild(t), e.querySelectorAll("[name='']").length || v.push("\\[" + M + "*name" + M + "*=" + M + "*(?:''|\"\")"), e.querySelectorAll(":checked").length || v.push(":checked"), e.querySelectorAll("a#" + S + "+*").length || v.push(".#.+[+~]"), e.querySelectorAll("\\\f"), v.push("[\\r\\n\\f]") }), ce(function (e) { e.innerHTML = "<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>"; var t = C.createElement("input"); t.setAttribute("type", "hidden"), e.appendChild(t).setAttribute("name", "D"), e.querySelectorAll("[name=d]").length && v.push("name" + M + "*[*^$|!~]?="), 2 !== e.querySelectorAll(":enabled").length && v.push(":enabled", ":disabled"), a.appendChild(e).disabled = !0, 2 !== e.querySelectorAll(":disabled").length && v.push(":enabled", ":disabled"), e.querySelectorAll("*,:x"), v.push(",.*:") })), (d.matchesSelector = K.test(c = a.matches || a.webkitMatchesSelector || a.mozMatchesSelector || a.oMatchesSelector || a.msMatchesSelector)) && ce(function (e) { d.disconnectedMatch = c.call(e, "*"), c.call(e, "[s!='']:x"), s.push("!=", F) }), v = v.length && new RegExp(v.join("|")), s = s.length && new RegExp(s.join("|")), t = K.test(a.compareDocumentPosition), y = t || K.test(a.contains) ? function (e, t) { var n = 9 === e.nodeType ? e.documentElement : e, r = t && t.parentNode; return e === r || !(!r || 1 !== r.nodeType || !(n.contains ? n.contains(r) : e.compareDocumentPosition && 16 & e.compareDocumentPosition(r))) } : function (e, t) { if (t) while (t = t.parentNode) if (t === e) return !0; return !1 }, j = t ? function (e, t) { if (e === t) return l = !0, 0; var n = !e.compareDocumentPosition - !t.compareDocumentPosition; return n || (1 & (n = (e.ownerDocument || e) == (t.ownerDocument || t) ? e.compareDocumentPosition(t) : 1) || !d.sortDetached && t.compareDocumentPosition(e) === n ? e == C || e.ownerDocument == p && y(p, e) ? -1 : t == C || t.ownerDocument == p && y(p, t) ? 1 : u ? P(u, e) - P(u, t) : 0 : 4 & n ? -1 : 1) } : function (e, t) { if (e === t) return l = !0, 0; var n, r = 0, i = e.parentNode, o = t.parentNode, a = [e], s = [t]; if (!i || !o) return e == C ? -1 : t == C ? 1 : i ? -1 : o ? 1 : u ? P(u, e) - P(u, t) : 0; if (i === o) return pe(e, t); n = e; while (n = n.parentNode) a.unshift(n); n = t; while (n = n.parentNode) s.unshift(n); while (a[r] === s[r]) r++; return r ? pe(a[r], s[r]) : a[r] == p ? -1 : s[r] == p ? 1 : 0 }), C }, se.matches = function (e, t) { return se(e, null, null, t) }, se.matchesSelector = function (e, t) { if (T(e), d.matchesSelector && E && !N[t + " "] && (!s || !s.test(t)) && (!v || !v.test(t))) try { var n = c.call(e, t); if (n || d.disconnectedMatch || e.document && 11 !== e.document.nodeType) return n } catch (e) { N(t, !0) } return 0 < se(t, C, null, [e]).length }, se.contains = function (e, t) { return (e.ownerDocument || e) != C && T(e), y(e, t) }, se.attr = function (e, t) { (e.ownerDocument || e) != C && T(e); var n = b.attrHandle[t.toLowerCase()], r = n && D.call(b.attrHandle, t.toLowerCase()) ? n(e, t, !E) : void 0; return void 0 !== r ? r : d.attributes || !E ? e.getAttribute(t) : (r = e.getAttributeNode(t)) && r.specified ? r.value : null }, se.escape = function (e) { return (e + "").replace(re, ie) }, se.error = function (e) { throw new Error("Syntax error, unrecognized expression: " + e) }, se.uniqueSort = function (e) { var t, n = [], r = 0, i = 0; if (l = !d.detectDuplicates, u = !d.sortStable && e.slice(0), e.sort(j), l) { while (t = e[i++]) t === e[i] && (r = n.push(i)); while (r--) e.splice(n[r], 1) } return u = null, e }, o = se.getText = function (e) { var t, n = "", r = 0, i = e.nodeType; if (i) { if (1 === i || 9 === i || 11 === i) { if ("string" == typeof e.textContent) return e.textContent; for (e = e.firstChild; e; e = e.nextSibling)n += o(e) } else if (3 === i || 4 === i) return e.nodeValue } else while (t = e[r++]) n += o(t); return n }, (b = se.selectors = { cacheLength: 50, createPseudo: le, match: G, attrHandle: {}, find: {}, relative: { ">": { dir: "parentNode", first: !0 }, " ": { dir: "parentNode" }, "+": { dir: "previousSibling", first: !0 }, "~": { dir: "previousSibling" } }, preFilter: { ATTR: function (e) { return e[1] = e[1].replace(te, ne), e[3] = (e[3] || e[4] || e[5] || "").replace(te, ne), "~=" === e[2] && (e[3] = " " + e[3] + " "), e.slice(0, 4) }, CHILD: function (e) { return e[1] = e[1].toLowerCase(), "nth" === e[1].slice(0, 3) ? (e[3] || se.error(e[0]), e[4] = +(e[4] ? e[5] + (e[6] || 1) : 2 * ("even" === e[3] || "odd" === e[3])), e[5] = +(e[7] + e[8] || "odd" === e[3])) : e[3] && se.error(e[0]), e }, PSEUDO: function (e) { var t, n = !e[6] && e[2]; return G.CHILD.test(e[0]) ? null : (e[3] ? e[2] = e[4] || e[5] || "" : n && X.test(n) && (t = h(n, !0)) && (t = n.indexOf(")", n.length - t) - n.length) && (e[0] = e[0].slice(0, t), e[2] = n.slice(0, t)), e.slice(0, 3)) } }, filter: { TAG: function (e) { var t = e.replace(te, ne).toLowerCase(); return "*" === e ? function () { return !0 } : function (e) { return e.nodeName && e.nodeName.toLowerCase() === t } }, CLASS: function (e) { var t = m[e + " "]; return t || (t = new RegExp("(^|" + M + ")" + e + "(" + M + "|$)")) && m(e, function (e) { return t.test("string" == typeof e.className && e.className || "undefined" != typeof e.getAttribute && e.getAttribute("class") || "") }) }, ATTR: function (n, r, i) { return function (e) { var t = se.attr(e, n); return null == t ? "!=" === r : !r || (t += "", "=" === r ? t === i : "!=" === r ? t !== i : "^=" === r ? i && 0 === t.indexOf(i) : "*=" === r ? i && -1 < t.indexOf(i) : "$=" === r ? i && t.slice(-i.length) === i : "~=" === r ? -1 < (" " + t.replace(B, " ") + " ").indexOf(i) : "|=" === r && (t === i || t.slice(0, i.length + 1) === i + "-")) } }, CHILD: function (h, e, t, g, v) { var y = "nth" !== h.slice(0, 3), m = "last" !== h.slice(-4), x = "of-type" === e; return 1 === g && 0 === v ? function (e) { return !!e.parentNode } : function (e, t, n) { var r, i, o, a, s, u, l = y !== m ? "nextSibling" : "previousSibling", c = e.parentNode, f = x && e.nodeName.toLowerCase(), p = !n && !x, d = !1; if (c) { if (y) { while (l) { a = e; while (a = a[l]) if (x ? a.nodeName.toLowerCase() === f : 1 === a.nodeType) return !1; u = l = "only" === h && !u && "nextSibling" } return !0 } if (u = [m ? c.firstChild : c.lastChild], m && p) { d = (s = (r = (i = (o = (a = c)[S] || (a[S] = {}))[a.uniqueID] || (o[a.uniqueID] = {}))[h] || [])[0] === k && r[1]) && r[2], a = s && c.childNodes[s]; while (a = ++s && a && a[l] || (d = s = 0) || u.pop()) if (1 === a.nodeType && ++d && a === e) { i[h] = [k, s, d]; break } } else if (p && (d = s = (r = (i = (o = (a = e)[S] || (a[S] = {}))[a.uniqueID] || (o[a.uniqueID] = {}))[h] || [])[0] === k && r[1]), !1 === d) while (a = ++s && a && a[l] || (d = s = 0) || u.pop()) if ((x ? a.nodeName.toLowerCase() === f : 1 === a.nodeType) && ++d && (p && ((i = (o = a[S] || (a[S] = {}))[a.uniqueID] || (o[a.uniqueID] = {}))[h] = [k, d]), a === e)) break; return (d -= v) === g || d % g == 0 && 0 <= d / g } } }, PSEUDO: function (e, o) { var t, a = b.pseudos[e] || b.setFilters[e.toLowerCase()] || se.error("unsupported pseudo: " + e); return a[S] ? a(o) : 1 < a.length ? (t = [e, e, "", o], b.setFilters.hasOwnProperty(e.toLowerCase()) ? le(function (e, t) { var n, r = a(e, o), i = r.length; while (i--) e[n = P(e, r[i])] = !(t[n] = r[i]) }) : function (e) { return a(e, 0, t) }) : a } }, pseudos: { not: le(function (e) { var r = [], i = [], s = f(e.replace($, "$1")); return s[S] ? le(function (e, t, n, r) { var i, o = s(e, null, r, []), a = e.length; while (a--) (i = o[a]) && (e[a] = !(t[a] = i)) }) : function (e, t, n) { return r[0] = e, s(r, null, n, i), r[0] = null, !i.pop() } }), has: le(function (t) { return function (e) { return 0 < se(t, e).length } }), contains: le(function (t) { return t = t.replace(te, ne), function (e) { return -1 < (e.textContent || o(e)).indexOf(t) } }), lang: le(function (n) { return V.test(n || "") || se.error("unsupported lang: " + n), n = n.replace(te, ne).toLowerCase(), function (e) { var t; do { if (t = E ? e.lang : e.getAttribute("xml:lang") || e.getAttribute("lang")) return (t = t.toLowerCase()) === n || 0 === t.indexOf(n + "-") } while ((e = e.parentNode) && 1 === e.nodeType); return !1 } }), target: function (e) { var t = n.location && n.location.hash; return t && t.slice(1) === e.id }, root: function (e) { return e === a }, focus: function (e) { return e === C.activeElement && (!C.hasFocus || C.hasFocus()) && !!(e.type || e.href || ~e.tabIndex) }, enabled: ge(!1), disabled: ge(!0), checked: function (e) { var t = e.nodeName.toLowerCase(); return "input" === t && !!e.checked || "option" === t && !!e.selected }, selected: function (e) { return e.parentNode && e.parentNode.selectedIndex, !0 === e.selected }, empty: function (e) { for (e = e.firstChild; e; e = e.nextSibling)if (e.nodeType < 6) return !1; return !0 }, parent: function (e) { return !b.pseudos.empty(e) }, header: function (e) { return J.test(e.nodeName) }, input: function (e) { return Q.test(e.nodeName) }, button: function (e) { var t = e.nodeName.toLowerCase(); return "input" === t && "button" === e.type || "button" === t }, text: function (e) { var t; return "input" === e.nodeName.toLowerCase() && "text" === e.type && (null == (t = e.getAttribute("type")) || "text" === t.toLowerCase()) }, first: ve(function () { return [0] }), last: ve(function (e, t) { return [t - 1] }), eq: ve(function (e, t, n) { return [n < 0 ? n + t : n] }), even: ve(function (e, t) { for (var n = 0; n < t; n += 2)e.push(n); return e }), odd: ve(function (e, t) { for (var n = 1; n < t; n += 2)e.push(n); return e }), lt: ve(function (e, t, n) { for (var r = n < 0 ? n + t : t < n ? t : n; 0 <= --r;)e.push(r); return e }), gt: ve(function (e, t, n) { for (var r = n < 0 ? n + t : n; ++r < t;)e.push(r); return e }) } }).pseudos.nth = b.pseudos.eq, { radio: !0, checkbox: !0, file: !0, password: !0, image: !0 }) b.pseudos[e] = de(e); for (e in { submit: !0, reset: !0 }) b.pseudos[e] = he(e); function me() { } function xe(e) { for (var t = 0, n = e.length, r = ""; t < n; t++)r += e[t].value; return r } function be(s, e, t) { var u = e.dir, l = e.next, c = l || u, f = t && "parentNode" === c, p = r++; return e.first ? function (e, t, n) { while (e = e[u]) if (1 === e.nodeType || f) return s(e, t, n); return !1 } : function (e, t, n) { var r, i, o, a = [k, p]; if (n) { while (e = e[u]) if ((1 === e.nodeType || f) && s(e, t, n)) return !0 } else while (e = e[u]) if (1 === e.nodeType || f) if (i = (o = e[S] || (e[S] = {}))[e.uniqueID] || (o[e.uniqueID] = {}), l && l === e.nodeName.toLowerCase()) e = e[u] || e; else { if ((r = i[c]) && r[0] === k && r[1] === p) return a[2] = r[2]; if ((i[c] = a)[2] = s(e, t, n)) return !0 } return !1 } } function we(i) { return 1 < i.length ? function (e, t, n) { var r = i.length; while (r--) if (!i[r](e, t, n)) return !1; return !0 } : i[0] } function Te(e, t, n, r, i) { for (var o, a = [], s = 0, u = e.length, l = null != t; s < u; s++)(o = e[s]) && (n && !n(o, r, i) || (a.push(o), l && t.push(s))); return a } function Ce(d, h, g, v, y, e) { return v && !v[S] && (v = Ce(v)), y && !y[S] && (y = Ce(y, e)), le(function (e, t, n, r) { var i, o, a, s = [], u = [], l = t.length, c = e || function (e, t, n) { for (var r = 0, i = t.length; r < i; r++)se(e, t[r], n); return n }(h || "*", n.nodeType ? [n] : n, []), f = !d || !e && h ? c : Te(c, s, d, n, r), p = g ? y || (e ? d : l || v) ? [] : t : f; if (g && g(f, p, n, r), v) { i = Te(p, u), v(i, [], n, r), o = i.length; while (o--) (a = i[o]) && (p[u[o]] = !(f[u[o]] = a)) } if (e) { if (y || d) { if (y) { i = [], o = p.length; while (o--) (a = p[o]) && i.push(f[o] = a); y(null, p = [], i, r) } o = p.length; while (o--) (a = p[o]) && -1 < (i = y ? P(e, a) : s[o]) && (e[i] = !(t[i] = a)) } } else p = Te(p === t ? p.splice(l, p.length) : p), y ? y(null, t, p, r) : H.apply(t, p) }) } function Ee(e) { for (var i, t, n, r = e.length, o = b.relative[e[0].type], a = o || b.relative[" "], s = o ? 1 : 0, u = be(function (e) { return e === i }, a, !0), l = be(function (e) { return -1 < P(i, e) }, a, !0), c = [function (e, t, n) { var r = !o && (n || t !== w) || ((i = t).nodeType ? u(e, t, n) : l(e, t, n)); return i = null, r }]; s < r; s++)if (t = b.relative[e[s].type]) c = [be(we(c), t)]; else { if ((t = b.filter[e[s].type].apply(null, e[s].matches))[S]) { for (n = ++s; n < r; n++)if (b.relative[e[n].type]) break; return Ce(1 < s && we(c), 1 < s && xe(e.slice(0, s - 1).concat({ value: " " === e[s - 2].type ? "*" : "" })).replace($, "$1"), t, s < n && Ee(e.slice(s, n)), n < r && Ee(e = e.slice(n)), n < r && xe(e)) } c.push(t) } return we(c) } return me.prototype = b.filters = b.pseudos, b.setFilters = new me, h = se.tokenize = function (e, t) { var n, r, i, o, a, s, u, l = x[e + " "]; if (l) return t ? 0 : l.slice(0); a = e, s = [], u = b.preFilter; while (a) { for (o in n && !(r = _.exec(a)) || (r && (a = a.slice(r[0].length) || a), s.push(i = [])), n = !1, (r = z.exec(a)) && (n = r.shift(), i.push({ value: n, type: r[0].replace($, " ") }), a = a.slice(n.length)), b.filter) !(r = G[o].exec(a)) || u[o] && !(r = u[o](r)) || (n = r.shift(), i.push({ value: n, type: o, matches: r }), a = a.slice(n.length)); if (!n) break } return t ? a.length : a ? se.error(e) : x(e, s).slice(0) }, f = se.compile = function (e, t) { var n, v, y, m, x, r, i = [], o = [], a = A[e + " "]; if (!a) { t || (t = h(e)), n = t.length; while (n--) (a = Ee(t[n]))[S] ? i.push(a) : o.push(a); (a = A(e, (v = o, m = 0 < (y = i).length, x = 0 < v.length, r = function (e, t, n, r, i) { var o, a, s, u = 0, l = "0", c = e && [], f = [], p = w, d = e || x && b.find.TAG("*", i), h = k += null == p ? 1 : Math.random() || .1, g = d.length; for (i && (w = t == C || t || i); l !== g && null != (o = d[l]); l++) { if (x && o) { a = 0, t || o.ownerDocument == C || (T(o), n = !E); while (s = v[a++]) if (s(o, t || C, n)) { r.push(o); break } i && (k = h) } m && ((o = !s && o) && u--, e && c.push(o)) } if (u += l, m && l !== u) { a = 0; while (s = y[a++]) s(c, f, t, n); if (e) { if (0 < u) while (l--) c[l] || f[l] || (f[l] = q.call(r)); f = Te(f) } H.apply(r, f), i && !e && 0 < f.length && 1 < u + y.length && se.uniqueSort(r) } return i && (k = h, w = p), c }, m ? le(r) : r))).selector = e } return a }, g = se.select = function (e, t, n, r) { var i, o, a, s, u, l = "function" == typeof e && e, c = !r && h(e = l.selector || e); if (n = n || [], 1 === c.length) { if (2 < (o = c[0] = c[0].slice(0)).length && "ID" === (a = o[0]).type && 9 === t.nodeType && E && b.relative[o[1].type]) { if (!(t = (b.find.ID(a.matches[0].replace(te, ne), t) || [])[0])) return n; l && (t = t.parentNode), e = e.slice(o.shift().value.length) } i = G.needsContext.test(e) ? 0 : o.length; while (i--) { if (a = o[i], b.relative[s = a.type]) break; if ((u = b.find[s]) && (r = u(a.matches[0].replace(te, ne), ee.test(o[0].type) && ye(t.parentNode) || t))) { if (o.splice(i, 1), !(e = r.length && xe(o))) return H.apply(n, r), n; break } } } return (l || f(e, c))(r, t, !E, n, !t || ee.test(e) && ye(t.parentNode) || t), n }, d.sortStable = S.split("").sort(j).join("") === S, d.detectDuplicates = !!l, T(), d.sortDetached = ce(function (e) { return 1 & e.compareDocumentPosition(C.createElement("fieldset")) }), ce(function (e) { return e.innerHTML = "<a href='#'></a>", "#" === e.firstChild.getAttribute("href") }) || fe("type|href|height|width", function (e, t, n) { if (!n) return e.getAttribute(t, "type" === t.toLowerCase() ? 1 : 2) }), d.attributes && ce(function (e) { return e.innerHTML = "<input/>", e.firstChild.setAttribute("value", ""), "" === e.firstChild.getAttribute("value") }) || fe("value", function (e, t, n) { if (!n && "input" === e.nodeName.toLowerCase()) return e.defaultValue }), ce(function (e) { return null == e.getAttribute("disabled") }) || fe(R, function (e, t, n) { var r; if (!n) return !0 === e[t] ? t.toLowerCase() : (r = e.getAttributeNode(t)) && r.specified ? r.value : null }), se }(C); S.find = d, S.expr = d.selectors, S.expr[":"] = S.expr.pseudos, S.uniqueSort = S.unique = d.uniqueSort, S.text = d.getText, S.isXMLDoc = d.isXML, S.contains = d.contains, S.escapeSelector = d.escape; var h = function (e, t, n) { var r = [], i = void 0 !== n; while ((e = e[t]) && 9 !== e.nodeType) if (1 === e.nodeType) { if (i && S(e).is(n)) break; r.push(e) } return r }, T = function (e, t) { for (var n = []; e; e = e.nextSibling)1 === e.nodeType && e !== t && n.push(e); return n }, k = S.expr.match.needsContext; function A(e, t) { return e.nodeName && e.nodeName.toLowerCase() === t.toLowerCase() } var N = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i; function j(e, n, r) { return m(n) ? S.grep(e, function (e, t) { return !!n.call(e, t, e) !== r }) : n.nodeType ? S.grep(e, function (e) { return e === n !== r }) : "string" != typeof n ? S.grep(e, function (e) { return -1 < i.call(n, e) !== r }) : S.filter(n, e, r) } S.filter = function (e, t, n) { var r = t[0]; return n && (e = ":not(" + e + ")"), 1 === t.length && 1 === r.nodeType ? S.find.matchesSelector(r, e) ? [r] : [] : S.find.matches(e, S.grep(t, function (e) { return 1 === e.nodeType })) }, S.fn.extend({ find: function (e) { var t, n, r = this.length, i = this; if ("string" != typeof e) return this.pushStack(S(e).filter(function () { for (t = 0; t < r; t++)if (S.contains(i[t], this)) return !0 })); for (n = this.pushStack([]), t = 0; t < r; t++)S.find(e, i[t], n); return 1 < r ? S.uniqueSort(n) : n }, filter: function (e) { return this.pushStack(j(this, e || [], !1)) }, not: function (e) { return this.pushStack(j(this, e || [], !0)) }, is: function (e) { return !!j(this, "string" == typeof e && k.test(e) ? S(e) : e || [], !1).length } }); var D, q = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/; (S.fn.init = function (e, t, n) { var r, i; if (!e) return this; if (n = n || D, "string" == typeof e) { if (!(r = "<" === e[0] && ">" === e[e.length - 1] && 3 <= e.length ? [null, e, null] : q.exec(e)) || !r[1] && t) return !t || t.jquery ? (t || n).find(e) : this.constructor(t).find(e); if (r[1]) { if (t = t instanceof S ? t[0] : t, S.merge(this, S.parseHTML(r[1], t && t.nodeType ? t.ownerDocument || t : E, !0)), N.test(r[1]) && S.isPlainObject(t)) for (r in t) m(this[r]) ? this[r](t[r]) : this.attr(r, t[r]); return this } return (i = E.getElementById(r[2])) && (this[0] = i, this.length = 1), this } return e.nodeType ? (this[0] = e, this.length = 1, this) : m(e) ? void 0 !== n.ready ? n.ready(e) : e(S) : S.makeArray(e, this) }).prototype = S.fn, D = S(E); var L = /^(?:parents|prev(?:Until|All))/, H = { children: !0, contents: !0, next: !0, prev: !0 }; function O(e, t) { while ((e = e[t]) && 1 !== e.nodeType); return e } S.fn.extend({ has: function (e) { var t = S(e, this), n = t.length; return this.filter(function () { for (var e = 0; e < n; e++)if (S.contains(this, t[e])) return !0 }) }, closest: function (e, t) { var n, r = 0, i = this.length, o = [], a = "string" != typeof e && S(e); if (!k.test(e)) for (; r < i; r++)for (n = this[r]; n && n !== t; n = n.parentNode)if (n.nodeType < 11 && (a ? -1 < a.index(n) : 1 === n.nodeType && S.find.matchesSelector(n, e))) { o.push(n); break } return this.pushStack(1 < o.length ? S.uniqueSort(o) : o) }, index: function (e) { return e ? "string" == typeof e ? i.call(S(e), this[0]) : i.call(this, e.jquery ? e[0] : e) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1 }, add: function (e, t) { return this.pushStack(S.uniqueSort(S.merge(this.get(), S(e, t)))) }, addBack: function (e) { return this.add(null == e ? this.prevObject : this.prevObject.filter(e)) } }), S.each({ parent: function (e) { var t = e.parentNode; return t && 11 !== t.nodeType ? t : null }, parents: function (e) { return h(e, "parentNode") }, parentsUntil: function (e, t, n) { return h(e, "parentNode", n) }, next: function (e) { return O(e, "nextSibling") }, prev: function (e) { return O(e, "previousSibling") }, nextAll: function (e) { return h(e, "nextSibling") }, prevAll: function (e) { return h(e, "previousSibling") }, nextUntil: function (e, t, n) { return h(e, "nextSibling", n) }, prevUntil: function (e, t, n) { return h(e, "previousSibling", n) }, siblings: function (e) { return T((e.parentNode || {}).firstChild, e) }, children: function (e) { return T(e.firstChild) }, contents: function (e) { return null != e.contentDocument && r(e.contentDocument) ? e.contentDocument : (A(e, "template") && (e = e.content || e), S.merge([], e.childNodes)) } }, function (r, i) { S.fn[r] = function (e, t) { var n = S.map(this, i, e); return "Until" !== r.slice(-5) && (t = e), t && "string" == typeof t && (n = S.filter(t, n)), 1 < this.length && (H[r] || S.uniqueSort(n), L.test(r) && n.reverse()), this.pushStack(n) } }); var P = /[^\x20\t\r\n\f]+/g; function R(e) { return e } function M(e) { throw e } function I(e, t, n, r) { var i; try { e && m(i = e.promise) ? i.call(e).done(t).fail(n) : e && m(i = e.then) ? i.call(e, t, n) : t.apply(void 0, [e].slice(r)) } catch (e) { n.apply(void 0, [e]) } } S.Callbacks = function (r) { var e, n; r = "string" == typeof r ? (e = r, n = {}, S.each(e.match(P) || [], function (e, t) { n[t] = !0 }), n) : S.extend({}, r); var i, t, o, a, s = [], u = [], l = -1, c = function () { for (a = a || r.once, o = i = !0; u.length; l = -1) { t = u.shift(); while (++l < s.length) !1 === s[l].apply(t[0], t[1]) && r.stopOnFalse && (l = s.length, t = !1) } r.memory || (t = !1), i = !1, a && (s = t ? [] : "") }, f = { add: function () { return s && (t && !i && (l = s.length - 1, u.push(t)), function n(e) { S.each(e, function (e, t) { m(t) ? r.unique && f.has(t) || s.push(t) : t && t.length && "string" !== w(t) && n(t) }) }(arguments), t && !i && c()), this }, remove: function () { return S.each(arguments, function (e, t) { var n; while (-1 < (n = S.inArray(t, s, n))) s.splice(n, 1), n <= l && l-- }), this }, has: function (e) { return e ? -1 < S.inArray(e, s) : 0 < s.length }, empty: function () { return s && (s = []), this }, disable: function () { return a = u = [], s = t = "", this }, disabled: function () { return !s }, lock: function () { return a = u = [], t || i || (s = t = ""), this }, locked: function () { return !!a }, fireWith: function (e, t) { return a || (t = [e, (t = t || []).slice ? t.slice() : t], u.push(t), i || c()), this }, fire: function () { return f.fireWith(this, arguments), this }, fired: function () { return !!o } }; return f }, S.extend({ Deferred: function (e) { var o = [["notify", "progress", S.Callbacks("memory"), S.Callbacks("memory"), 2], ["resolve", "done", S.Callbacks("once memory"), S.Callbacks("once memory"), 0, "resolved"], ["reject", "fail", S.Callbacks("once memory"), S.Callbacks("once memory"), 1, "rejected"]], i = "pending", a = { state: function () { return i }, always: function () { return s.done(arguments).fail(arguments), this }, "catch": function (e) { return a.then(null, e) }, pipe: function () { var i = arguments; return S.Deferred(function (r) { S.each(o, function (e, t) { var n = m(i[t[4]]) && i[t[4]]; s[t[1]](function () { var e = n && n.apply(this, arguments); e && m(e.promise) ? e.promise().progress(r.notify).done(r.resolve).fail(r.reject) : r[t[0] + "With"](this, n ? [e] : arguments) }) }), i = null }).promise() }, then: function (t, n, r) { var u = 0; function l(i, o, a, s) { return function () { var n = this, r = arguments, e = function () { var e, t; if (!(i < u)) { if ((e = a.apply(n, r)) === o.promise()) throw new TypeError("Thenable self-resolution"); t = e && ("object" == typeof e || "function" == typeof e) && e.then, m(t) ? s ? t.call(e, l(u, o, R, s), l(u, o, M, s)) : (u++, t.call(e, l(u, o, R, s), l(u, o, M, s), l(u, o, R, o.notifyWith))) : (a !== R && (n = void 0, r = [e]), (s || o.resolveWith)(n, r)) } }, t = s ? e : function () { try { e() } catch (e) { S.Deferred.exceptionHook && S.Deferred.exceptionHook(e, t.stackTrace), u <= i + 1 && (a !== M && (n = void 0, r = [e]), o.rejectWith(n, r)) } }; i ? t() : (S.Deferred.getStackHook && (t.stackTrace = S.Deferred.getStackHook()), C.setTimeout(t)) } } return S.Deferred(function (e) { o[0][3].add(l(0, e, m(r) ? r : R, e.notifyWith)), o[1][3].add(l(0, e, m(t) ? t : R)), o[2][3].add(l(0, e, m(n) ? n : M)) }).promise() }, promise: function (e) { return null != e ? S.extend(e, a) : a } }, s = {}; return S.each(o, function (e, t) { var n = t[2], r = t[5]; a[t[1]] = n.add, r && n.add(function () { i = r }, o[3 - e][2].disable, o[3 - e][3].disable, o[0][2].lock, o[0][3].lock), n.add(t[3].fire), s[t[0]] = function () { return s[t[0] + "With"](this === s ? void 0 : this, arguments), this }, s[t[0] + "With"] = n.fireWith }), a.promise(s), e && e.call(s, s), s }, when: function (e) { var n = arguments.length, t = n, r = Array(t), i = s.call(arguments), o = S.Deferred(), a = function (t) { return function (e) { r[t] = this, i[t] = 1 < arguments.length ? s.call(arguments) : e, --n || o.resolveWith(r, i) } }; if (n <= 1 && (I(e, o.done(a(t)).resolve, o.reject, !n), "pending" === o.state() || m(i[t] && i[t].then))) return o.then(); while (t--) I(i[t], a(t), o.reject); return o.promise() } }); var W = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; S.Deferred.exceptionHook = function (e, t) { C.console && C.console.warn && e && W.test(e.name) && C.console.warn("jQuery.Deferred exception: " + e.message, e.stack, t) }, S.readyException = function (e) { C.setTimeout(function () { throw e }) }; var F = S.Deferred(); function B() { E.removeEventListener("DOMContentLoaded", B), C.removeEventListener("load", B), S.ready() } S.fn.ready = function (e) { return F.then(e)["catch"](function (e) { S.readyException(e) }), this }, S.extend({ isReady: !1, readyWait: 1, ready: function (e) { (!0 === e ? --S.readyWait : S.isReady) || (S.isReady = !0) !== e && 0 < --S.readyWait || F.resolveWith(E, [S]) } }), S.ready.then = F.then, "complete" === E.readyState || "loading" !== E.readyState && !E.documentElement.doScroll ? C.setTimeout(S.ready) : (E.addEventListener("DOMContentLoaded", B), C.addEventListener("load", B)); var $ = function (e, t, n, r, i, o, a) { var s = 0, u = e.length, l = null == n; if ("object" === w(n)) for (s in i = !0, n) $(e, t, s, n[s], !0, o, a); else if (void 0 !== r && (i = !0, m(r) || (a = !0), l && (a ? (t.call(e, r), t = null) : (l = t, t = function (e, t, n) { return l.call(S(e), n) })), t)) for (; s < u; s++)t(e[s], n, a ? r : r.call(e[s], s, t(e[s], n))); return i ? e : l ? t.call(e) : u ? t(e[0], n) : o }, _ = /^-ms-/, z = /-([a-z])/g; function U(e, t) { return t.toUpperCase() } function X(e) { return e.replace(_, "ms-").replace(z, U) } var V = function (e) { return 1 === e.nodeType || 9 === e.nodeType || !+e.nodeType }; function G() { this.expando = S.expando + G.uid++ } G.uid = 1, G.prototype = { cache: function (e) { var t = e[this.expando]; return t || (t = {}, V(e) && (e.nodeType ? e[this.expando] = t : Object.defineProperty(e, this.expando, { value: t, configurable: !0 }))), t }, set: function (e, t, n) { var r, i = this.cache(e); if ("string" == typeof t) i[X(t)] = n; else for (r in t) i[X(r)] = t[r]; return i }, get: function (e, t) { return void 0 === t ? this.cache(e) : e[this.expando] && e[this.expando][X(t)] }, access: function (e, t, n) { return void 0 === t || t && "string" == typeof t && void 0 === n ? this.get(e, t) : (this.set(e, t, n), void 0 !== n ? n : t) }, remove: function (e, t) { var n, r = e[this.expando]; if (void 0 !== r) { if (void 0 !== t) { n = (t = Array.isArray(t) ? t.map(X) : (t = X(t)) in r ? [t] : t.match(P) || []).length; while (n--) delete r[t[n]] } (void 0 === t || S.isEmptyObject(r)) && (e.nodeType ? e[this.expando] = void 0 : delete e[this.expando]) } }, hasData: function (e) { var t = e[this.expando]; return void 0 !== t && !S.isEmptyObject(t) } }; var Y = new G, Q = new G, J = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, K = /[A-Z]/g; function Z(e, t, n) { var r, i; if (void 0 === n && 1 === e.nodeType) if (r = "data-" + t.replace(K, "-$&").toLowerCase(), "string" == typeof (n = e.getAttribute(r))) { try { n = "true" === (i = n) || "false" !== i && ("null" === i ? null : i === +i + "" ? +i : J.test(i) ? JSON.parse(i) : i) } catch (e) { } Q.set(e, t, n) } else n = void 0; return n } S.extend({ hasData: function (e) { return Q.hasData(e) || Y.hasData(e) }, data: function (e, t, n) { return Q.access(e, t, n) }, removeData: function (e, t) { Q.remove(e, t) }, _data: function (e, t, n) { return Y.access(e, t, n) }, _removeData: function (e, t) { Y.remove(e, t) } }), S.fn.extend({ data: function (n, e) { var t, r, i, o = this[0], a = o && o.attributes; if (void 0 === n) { if (this.length && (i = Q.get(o), 1 === o.nodeType && !Y.get(o, "hasDataAttrs"))) { t = a.length; while (t--) a[t] && 0 === (r = a[t].name).indexOf("data-") && (r = X(r.slice(5)), Z(o, r, i[r])); Y.set(o, "hasDataAttrs", !0) } return i } return "object" == typeof n ? this.each(function () { Q.set(this, n) }) : $(this, function (e) { var t; if (o && void 0 === e) return void 0 !== (t = Q.get(o, n)) ? t : void 0 !== (t = Z(o, n)) ? t : void 0; this.each(function () { Q.set(this, n, e) }) }, null, e, 1 < arguments.length, null, !0) }, removeData: function (e) { return this.each(function () { Q.remove(this, e) }) } }), S.extend({ queue: function (e, t, n) { var r; if (e) return t = (t || "fx") + "queue", r = Y.get(e, t), n && (!r || Array.isArray(n) ? r = Y.access(e, t, S.makeArray(n)) : r.push(n)), r || [] }, dequeue: function (e, t) { t = t || "fx"; var n = S.queue(e, t), r = n.length, i = n.shift(), o = S._queueHooks(e, t); "inprogress" === i && (i = n.shift(), r--), i && ("fx" === t && n.unshift("inprogress"), delete o.stop, i.call(e, function () { S.dequeue(e, t) }, o)), !r && o && o.empty.fire() }, _queueHooks: function (e, t) { var n = t + "queueHooks"; return Y.get(e, n) || Y.access(e, n, { empty: S.Callbacks("once memory").add(function () { Y.remove(e, [t + "queue", n]) }) }) } }), S.fn.extend({ queue: function (t, n) { var e = 2; return "string" != typeof t && (n = t, t = "fx", e--), arguments.length < e ? S.queue(this[0], t) : void 0 === n ? this : this.each(function () { var e = S.queue(this, t, n); S._queueHooks(this, t), "fx" === t && "inprogress" !== e[0] && S.dequeue(this, t) }) }, dequeue: function (e) { return this.each(function () { S.dequeue(this, e) }) }, clearQueue: function (e) { return this.queue(e || "fx", []) }, promise: function (e, t) { var n, r = 1, i = S.Deferred(), o = this, a = this.length, s = function () { --r || i.resolveWith(o, [o]) }; "string" != typeof e && (t = e, e = void 0), e = e || "fx"; while (a--) (n = Y.get(o[a], e + "queueHooks")) && n.empty && (r++, n.empty.add(s)); return s(), i.promise(t) } }); var ee = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, te = new RegExp("^(?:([+-])=|)(" + ee + ")([a-z%]*)$", "i"), ne = ["Top", "Right", "Bottom", "Left"], re = E.documentElement, ie = function (e) { return S.contains(e.ownerDocument, e) }, oe = { composed: !0 }; re.getRootNode && (ie = function (e) { return S.contains(e.ownerDocument, e) || e.getRootNode(oe) === e.ownerDocument }); var ae = function (e, t) { return "none" === (e = t || e).style.display || "" === e.style.display && ie(e) && "none" === S.css(e, "display") }; function se(e, t, n, r) { var i, o, a = 20, s = r ? function () { return r.cur() } : function () { return S.css(e, t, "") }, u = s(), l = n && n[3] || (S.cssNumber[t] ? "" : "px"), c = e.nodeType && (S.cssNumber[t] || "px" !== l && +u) && te.exec(S.css(e, t)); if (c && c[3] !== l) { u /= 2, l = l || c[3], c = +u || 1; while (a--) S.style(e, t, c + l), (1 - o) * (1 - (o = s() / u || .5)) <= 0 && (a = 0), c /= o; c *= 2, S.style(e, t, c + l), n = n || [] } return n && (c = +c || +u || 0, i = n[1] ? c + (n[1] + 1) * n[2] : +n[2], r && (r.unit = l, r.start = c, r.end = i)), i } var ue = {}; function le(e, t) { for (var n, r, i, o, a, s, u, l = [], c = 0, f = e.length; c < f; c++)(r = e[c]).style && (n = r.style.display, t ? ("none" === n && (l[c] = Y.get(r, "display") || null, l[c] || (r.style.display = "")), "" === r.style.display && ae(r) && (l[c] = (u = a = o = void 0, a = (i = r).ownerDocument, s = i.nodeName, (u = ue[s]) || (o = a.body.appendChild(a.createElement(s)), u = S.css(o, "display"), o.parentNode.removeChild(o), "none" === u && (u = "block"), ue[s] = u)))) : "none" !== n && (l[c] = "none", Y.set(r, "display", n))); for (c = 0; c < f; c++)null != l[c] && (e[c].style.display = l[c]); return e } S.fn.extend({ show: function () { return le(this, !0) }, hide: function () { return le(this) }, toggle: function (e) { return "boolean" == typeof e ? e ? this.show() : this.hide() : this.each(function () { ae(this) ? S(this).show() : S(this).hide() }) } }); var ce, fe, pe = /^(?:checkbox|radio)$/i, de = /<([a-z][^\/\0>\x20\t\r\n\f]*)/i, he = /^$|^module$|\/(?:java|ecma)script/i; ce = E.createDocumentFragment().appendChild(E.createElement("div")), (fe = E.createElement("input")).setAttribute("type", "radio"), fe.setAttribute("checked", "checked"), fe.setAttribute("name", "t"), ce.appendChild(fe), y.checkClone = ce.cloneNode(!0).cloneNode(!0).lastChild.checked, ce.innerHTML = "<textarea>x</textarea>", y.noCloneChecked = !!ce.cloneNode(!0).lastChild.defaultValue, ce.innerHTML = "<option></option>", y.option = !!ce.lastChild; var ge = { thead: [1, "<table>", "</table>"], col: [2, "<table><colgroup>", "</colgroup></table>"], tr: [2, "<table><tbody>", "</tbody></table>"], td: [3, "<table><tbody><tr>", "</tr></tbody></table>"], _default: [0, "", ""] }; function ve(e, t) { var n; return n = "undefined" != typeof e.getElementsByTagName ? e.getElementsByTagName(t || "*") : "undefined" != typeof e.querySelectorAll ? e.querySelectorAll(t || "*") : [], void 0 === t || t && A(e, t) ? S.merge([e], n) : n } function ye(e, t) { for (var n = 0, r = e.length; n < r; n++)Y.set(e[n], "globalEval", !t || Y.get(t[n], "globalEval")) } ge.tbody = ge.tfoot = ge.colgroup = ge.caption = ge.thead, ge.th = ge.td, y.option || (ge.optgroup = ge.option = [1, "<select multiple='multiple'>", "</select>"]); var me = /<|&#?\w+;/; function xe(e, t, n, r, i) { for (var o, a, s, u, l, c, f = t.createDocumentFragment(), p = [], d = 0, h = e.length; d < h; d++)if ((o = e[d]) || 0 === o) if ("object" === w(o)) S.merge(p, o.nodeType ? [o] : o); else if (me.test(o)) { a = a || f.appendChild(t.createElement("div")), s = (de.exec(o) || ["", ""])[1].toLowerCase(), u = ge[s] || ge._default, a.innerHTML = u[1] + S.htmlPrefilter(o) + u[2], c = u[0]; while (c--) a = a.lastChild; S.merge(p, a.childNodes), (a = f.firstChild).textContent = "" } else p.push(t.createTextNode(o)); f.textContent = "", d = 0; while (o = p[d++]) if (r && -1 < S.inArray(o, r)) i && i.push(o); else if (l = ie(o), a = ve(f.appendChild(o), "script"), l && ye(a), n) { c = 0; while (o = a[c++]) he.test(o.type || "") && n.push(o) } return f } var be = /^([^.]*)(?:\.(.+)|)/; function we() { return !0 } function Te() { return !1 } function Ce(e, t) { return e === function () { try { return E.activeElement } catch (e) { } }() == ("focus" === t) } function Ee(e, t, n, r, i, o) { var a, s; if ("object" == typeof t) { for (s in "string" != typeof n && (r = r || n, n = void 0), t) Ee(e, s, n, r, t[s], o); return e } if (null == r && null == i ? (i = n, r = n = void 0) : null == i && ("string" == typeof n ? (i = r, r = void 0) : (i = r, r = n, n = void 0)), !1 === i) i = Te; else if (!i) return e; return 1 === o && (a = i, (i = function (e) { return S().off(e), a.apply(this, arguments) }).guid = a.guid || (a.guid = S.guid++)), e.each(function () { S.event.add(this, t, i, r, n) }) } function Se(e, i, o) { o ? (Y.set(e, i, !1), S.event.add(e, i, { namespace: !1, handler: function (e) { var t, n, r = Y.get(this, i); if (1 & e.isTrigger && this[i]) { if (r.length) (S.event.special[i] || {}).delegateType && e.stopPropagation(); else if (r = s.call(arguments), Y.set(this, i, r), t = o(this, i), this[i](), r !== (n = Y.get(this, i)) || t ? Y.set(this, i, !1) : n = {}, r !== n) return e.stopImmediatePropagation(), e.preventDefault(), n && n.value } else r.length && (Y.set(this, i, { value: S.event.trigger(S.extend(r[0], S.Event.prototype), r.slice(1), this) }), e.stopImmediatePropagation()) } })) : void 0 === Y.get(e, i) && S.event.add(e, i, we) } S.event = { global: {}, add: function (t, e, n, r, i) { var o, a, s, u, l, c, f, p, d, h, g, v = Y.get(t); if (V(t)) { n.handler && (n = (o = n).handler, i = o.selector), i && S.find.matchesSelector(re, i), n.guid || (n.guid = S.guid++), (u = v.events) || (u = v.events = Object.create(null)), (a = v.handle) || (a = v.handle = function (e) { return "undefined" != typeof S && S.event.triggered !== e.type ? S.event.dispatch.apply(t, arguments) : void 0 }), l = (e = (e || "").match(P) || [""]).length; while (l--) d = g = (s = be.exec(e[l]) || [])[1], h = (s[2] || "").split(".").sort(), d && (f = S.event.special[d] || {}, d = (i ? f.delegateType : f.bindType) || d, f = S.event.special[d] || {}, c = S.extend({ type: d, origType: g, data: r, handler: n, guid: n.guid, selector: i, needsContext: i && S.expr.match.needsContext.test(i), namespace: h.join(".") }, o), (p = u[d]) || ((p = u[d] = []).delegateCount = 0, f.setup && !1 !== f.setup.call(t, r, h, a) || t.addEventListener && t.addEventListener(d, a)), f.add && (f.add.call(t, c), c.handler.guid || (c.handler.guid = n.guid)), i ? p.splice(p.delegateCount++, 0, c) : p.push(c), S.event.global[d] = !0) } }, remove: function (e, t, n, r, i) { var o, a, s, u, l, c, f, p, d, h, g, v = Y.hasData(e) && Y.get(e); if (v && (u = v.events)) { l = (t = (t || "").match(P) || [""]).length; while (l--) if (d = g = (s = be.exec(t[l]) || [])[1], h = (s[2] || "").split(".").sort(), d) { f = S.event.special[d] || {}, p = u[d = (r ? f.delegateType : f.bindType) || d] || [], s = s[2] && new RegExp("(^|\\.)" + h.join("\\.(?:.*\\.|)") + "(\\.|$)"), a = o = p.length; while (o--) c = p[o], !i && g !== c.origType || n && n.guid !== c.guid || s && !s.test(c.namespace) || r && r !== c.selector && ("**" !== r || !c.selector) || (p.splice(o, 1), c.selector && p.delegateCount--, f.remove && f.remove.call(e, c)); a && !p.length && (f.teardown && !1 !== f.teardown.call(e, h, v.handle) || S.removeEvent(e, d, v.handle), delete u[d]) } else for (d in u) S.event.remove(e, d + t[l], n, r, !0); S.isEmptyObject(u) && Y.remove(e, "handle events") } }, dispatch: function (e) { var t, n, r, i, o, a, s = new Array(arguments.length), u = S.event.fix(e), l = (Y.get(this, "events") || Object.create(null))[u.type] || [], c = S.event.special[u.type] || {}; for (s[0] = u, t = 1; t < arguments.length; t++)s[t] = arguments[t]; if (u.delegateTarget = this, !c.preDispatch || !1 !== c.preDispatch.call(this, u)) { a = S.event.handlers.call(this, u, l), t = 0; while ((i = a[t++]) && !u.isPropagationStopped()) { u.currentTarget = i.elem, n = 0; while ((o = i.handlers[n++]) && !u.isImmediatePropagationStopped()) u.rnamespace && !1 !== o.namespace && !u.rnamespace.test(o.namespace) || (u.handleObj = o, u.data = o.data, void 0 !== (r = ((S.event.special[o.origType] || {}).handle || o.handler).apply(i.elem, s)) && !1 === (u.result = r) && (u.preventDefault(), u.stopPropagation())) } return c.postDispatch && c.postDispatch.call(this, u), u.result } }, handlers: function (e, t) { var n, r, i, o, a, s = [], u = t.delegateCount, l = e.target; if (u && l.nodeType && !("click" === e.type && 1 <= e.button)) for (; l !== this; l = l.parentNode || this)if (1 === l.nodeType && ("click" !== e.type || !0 !== l.disabled)) { for (o = [], a = {}, n = 0; n < u; n++)void 0 === a[i = (r = t[n]).selector + " "] && (a[i] = r.needsContext ? -1 < S(i, this).index(l) : S.find(i, this, null, [l]).length), a[i] && o.push(r); o.length && s.push({ elem: l, handlers: o }) } return l = this, u < t.length && s.push({ elem: l, handlers: t.slice(u) }), s }, addProp: function (t, e) { Object.defineProperty(S.Event.prototype, t, { enumerable: !0, configurable: !0, get: m(e) ? function () { if (this.originalEvent) return e(this.originalEvent) } : function () { if (this.originalEvent) return this.originalEvent[t] }, set: function (e) { Object.defineProperty(this, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) } }) }, fix: function (e) { return e[S.expando] ? e : new S.Event(e) }, special: { load: { noBubble: !0 }, click: { setup: function (e) { var t = this || e; return pe.test(t.type) && t.click && A(t, "input") && Se(t, "click", we), !1 }, trigger: function (e) { var t = this || e; return pe.test(t.type) && t.click && A(t, "input") && Se(t, "click"), !0 }, _default: function (e) { var t = e.target; return pe.test(t.type) && t.click && A(t, "input") && Y.get(t, "click") || A(t, "a") } }, beforeunload: { postDispatch: function (e) { void 0 !== e.result && e.originalEvent && (e.originalEvent.returnValue = e.result) } } } }, S.removeEvent = function (e, t, n) { e.removeEventListener && e.removeEventListener(t, n) }, S.Event = function (e, t) { if (!(this instanceof S.Event)) return new S.Event(e, t); e && e.type ? (this.originalEvent = e, this.type = e.type, this.isDefaultPrevented = e.defaultPrevented || void 0 === e.defaultPrevented && !1 === e.returnValue ? we : Te, this.target = e.target && 3 === e.target.nodeType ? e.target.parentNode : e.target, this.currentTarget = e.currentTarget, this.relatedTarget = e.relatedTarget) : this.type = e, t && S.extend(this, t), this.timeStamp = e && e.timeStamp || Date.now(), this[S.expando] = !0 }, S.Event.prototype = { constructor: S.Event, isDefaultPrevented: Te, isPropagationStopped: Te, isImmediatePropagationStopped: Te, isSimulated: !1, preventDefault: function () { var e = this.originalEvent; this.isDefaultPrevented = we, e && !this.isSimulated && e.preventDefault() }, stopPropagation: function () { var e = this.originalEvent; this.isPropagationStopped = we, e && !this.isSimulated && e.stopPropagation() }, stopImmediatePropagation: function () { var e = this.originalEvent; this.isImmediatePropagationStopped = we, e && !this.isSimulated && e.stopImmediatePropagation(), this.stopPropagation() } }, S.each({ altKey: !0, bubbles: !0, cancelable: !0, changedTouches: !0, ctrlKey: !0, detail: !0, eventPhase: !0, metaKey: !0, pageX: !0, pageY: !0, shiftKey: !0, view: !0, "char": !0, code: !0, charCode: !0, key: !0, keyCode: !0, button: !0, buttons: !0, clientX: !0, clientY: !0, offsetX: !0, offsetY: !0, pointerId: !0, pointerType: !0, screenX: !0, screenY: !0, targetTouches: !0, toElement: !0, touches: !0, which: !0 }, S.event.addProp), S.each({ focus: "focusin", blur: "focusout" }, function (e, t) { S.event.special[e] = { setup: function () { return Se(this, e, Ce), !1 }, trigger: function () { return Se(this, e), !0 }, _default: function () { return !0 }, delegateType: t } }), S.each({ mouseenter: "mouseover", mouseleave: "mouseout", pointerenter: "pointerover", pointerleave: "pointerout" }, function (e, i) { S.event.special[e] = { delegateType: i, bindType: i, handle: function (e) { var t, n = e.relatedTarget, r = e.handleObj; return n && (n === this || S.contains(this, n)) || (e.type = r.origType, t = r.handler.apply(this, arguments), e.type = i), t } } }), S.fn.extend({ on: function (e, t, n, r) { return Ee(this, e, t, n, r) }, one: function (e, t, n, r) { return Ee(this, e, t, n, r, 1) }, off: function (e, t, n) { var r, i; if (e && e.preventDefault && e.handleObj) return r = e.handleObj, S(e.delegateTarget).off(r.namespace ? r.origType + "." + r.namespace : r.origType, r.selector, r.handler), this; if ("object" == typeof e) { for (i in e) this.off(i, t, e[i]); return this } return !1 !== t && "function" != typeof t || (n = t, t = void 0), !1 === n && (n = Te), this.each(function () { S.event.remove(this, e, n, t) }) } }); var ke = /<script|<style|<link/i, Ae = /checked\s*(?:[^=]|=\s*.checked.)/i, Ne = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g; function je(e, t) { return A(e, "table") && A(11 !== t.nodeType ? t : t.firstChild, "tr") && S(e).children("tbody")[0] || e } function De(e) { return e.type = (null !== e.getAttribute("type")) + "/" + e.type, e } function qe(e) { return "true/" === (e.type || "").slice(0, 5) ? e.type = e.type.slice(5) : e.removeAttribute("type"), e } function Le(e, t) { var n, r, i, o, a, s; if (1 === t.nodeType) { if (Y.hasData(e) && (s = Y.get(e).events)) for (i in Y.remove(t, "handle events"), s) for (n = 0, r = s[i].length; n < r; n++)S.event.add(t, i, s[i][n]); Q.hasData(e) && (o = Q.access(e), a = S.extend({}, o), Q.set(t, a)) } } function He(n, r, i, o) { r = g(r); var e, t, a, s, u, l, c = 0, f = n.length, p = f - 1, d = r[0], h = m(d); if (h || 1 < f && "string" == typeof d && !y.checkClone && Ae.test(d)) return n.each(function (e) { var t = n.eq(e); h && (r[0] = d.call(this, e, t.html())), He(t, r, i, o) }); if (f && (t = (e = xe(r, n[0].ownerDocument, !1, n, o)).firstChild, 1 === e.childNodes.length && (e = t), t || o)) { for (s = (a = S.map(ve(e, "script"), De)).length; c < f; c++)u = e, c !== p && (u = S.clone(u, !0, !0), s && S.merge(a, ve(u, "script"))), i.call(n[c], u, c); if (s) for (l = a[a.length - 1].ownerDocument, S.map(a, qe), c = 0; c < s; c++)u = a[c], he.test(u.type || "") && !Y.access(u, "globalEval") && S.contains(l, u) && (u.src && "module" !== (u.type || "").toLowerCase() ? S._evalUrl && !u.noModule && S._evalUrl(u.src, { nonce: u.nonce || u.getAttribute("nonce") }, l) : b(u.textContent.replace(Ne, ""), u, l)) } return n } function Oe(e, t, n) { for (var r, i = t ? S.filter(t, e) : e, o = 0; null != (r = i[o]); o++)n || 1 !== r.nodeType || S.cleanData(ve(r)), r.parentNode && (n && ie(r) && ye(ve(r, "script")), r.parentNode.removeChild(r)); return e } S.extend({ htmlPrefilter: function (e) { return e }, clone: function (e, t, n) { var r, i, o, a, s, u, l, c = e.cloneNode(!0), f = ie(e); if (!(y.noCloneChecked || 1 !== e.nodeType && 11 !== e.nodeType || S.isXMLDoc(e))) for (a = ve(c), r = 0, i = (o = ve(e)).length; r < i; r++)s = o[r], u = a[r], void 0, "input" === (l = u.nodeName.toLowerCase()) && pe.test(s.type) ? u.checked = s.checked : "input" !== l && "textarea" !== l || (u.defaultValue = s.defaultValue); if (t) if (n) for (o = o || ve(e), a = a || ve(c), r = 0, i = o.length; r < i; r++)Le(o[r], a[r]); else Le(e, c); return 0 < (a = ve(c, "script")).length && ye(a, !f && ve(e, "script")), c }, cleanData: function (e) { for (var t, n, r, i = S.event.special, o = 0; void 0 !== (n = e[o]); o++)if (V(n)) { if (t = n[Y.expando]) { if (t.events) for (r in t.events) i[r] ? S.event.remove(n, r) : S.removeEvent(n, r, t.handle); n[Y.expando] = void 0 } n[Q.expando] && (n[Q.expando] = void 0) } } }), S.fn.extend({ detach: function (e) { return Oe(this, e, !0) }, remove: function (e) { return Oe(this, e) }, text: function (e) { return $(this, function (e) { return void 0 === e ? S.text(this) : this.empty().each(function () { 1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || (this.textContent = e) }) }, null, e, arguments.length) }, append: function () { return He(this, arguments, function (e) { 1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || je(this, e).appendChild(e) }) }, prepend: function () { return He(this, arguments, function (e) { if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) { var t = je(this, e); t.insertBefore(e, t.firstChild) } }) }, before: function () { return He(this, arguments, function (e) { this.parentNode && this.parentNode.insertBefore(e, this) }) }, after: function () { return He(this, arguments, function (e) { this.parentNode && this.parentNode.insertBefore(e, this.nextSibling) }) }, empty: function () { for (var e, t = 0; null != (e = this[t]); t++)1 === e.nodeType && (S.cleanData(ve(e, !1)), e.textContent = ""); return this }, clone: function (e, t) { return e = null != e && e, t = null == t ? e : t, this.map(function () { return S.clone(this, e, t) }) }, html: function (e) { return $(this, function (e) { var t = this[0] || {}, n = 0, r = this.length; if (void 0 === e && 1 === t.nodeType) return t.innerHTML; if ("string" == typeof e && !ke.test(e) && !ge[(de.exec(e) || ["", ""])[1].toLowerCase()]) { e = S.htmlPrefilter(e); try { for (; n < r; n++)1 === (t = this[n] || {}).nodeType && (S.cleanData(ve(t, !1)), t.innerHTML = e); t = 0 } catch (e) { } } t && this.empty().append(e) }, null, e, arguments.length) }, replaceWith: function () { var n = []; return He(this, arguments, function (e) { var t = this.parentNode; S.inArray(this, n) < 0 && (S.cleanData(ve(this)), t && t.replaceChild(e, this)) }, n) } }), S.each({ appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function (e, a) { S.fn[e] = function (e) { for (var t, n = [], r = S(e), i = r.length - 1, o = 0; o <= i; o++)t = o === i ? this : this.clone(!0), S(r[o])[a](t), u.apply(n, t.get()); return this.pushStack(n) } }); var Pe = new RegExp("^(" + ee + ")(?!px)[a-z%]+$", "i"), Re = function (e) { var t = e.ownerDocument.defaultView; return t && t.opener || (t = C), t.getComputedStyle(e) }, Me = function (e, t, n) { var r, i, o = {}; for (i in t) o[i] = e.style[i], e.style[i] = t[i]; for (i in r = n.call(e), t) e.style[i] = o[i]; return r }, Ie = new RegExp(ne.join("|"), "i"); function We(e, t, n) { var r, i, o, a, s = e.style; return (n = n || Re(e)) && ("" !== (a = n.getPropertyValue(t) || n[t]) || ie(e) || (a = S.style(e, t)), !y.pixelBoxStyles() && Pe.test(a) && Ie.test(t) && (r = s.width, i = s.minWidth, o = s.maxWidth, s.minWidth = s.maxWidth = s.width = a, a = n.width, s.width = r, s.minWidth = i, s.maxWidth = o)), void 0 !== a ? a + "" : a } function Fe(e, t) { return { get: function () { if (!e()) return (this.get = t).apply(this, arguments); delete this.get } } } !function () { function e() { if (l) { u.style.cssText = "position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0", l.style.cssText = "position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%", re.appendChild(u).appendChild(l); var e = C.getComputedStyle(l); n = "1%" !== e.top, s = 12 === t(e.marginLeft), l.style.right = "60%", o = 36 === t(e.right), r = 36 === t(e.width), l.style.position = "absolute", i = 12 === t(l.offsetWidth / 3), re.removeChild(u), l = null } } function t(e) { return Math.round(parseFloat(e)) } var n, r, i, o, a, s, u = E.createElement("div"), l = E.createElement("div"); l.style && (l.style.backgroundClip = "content-box", l.cloneNode(!0).style.backgroundClip = "", y.clearCloneStyle = "content-box" === l.style.backgroundClip, S.extend(y, { boxSizingReliable: function () { return e(), r }, pixelBoxStyles: function () { return e(), o }, pixelPosition: function () { return e(), n }, reliableMarginLeft: function () { return e(), s }, scrollboxSize: function () { return e(), i }, reliableTrDimensions: function () { var e, t, n, r; return null == a && (e = E.createElement("table"), t = E.createElement("tr"), n = E.createElement("div"), e.style.cssText = "position:absolute;left:-11111px;border-collapse:separate", t.style.cssText = "border:1px solid", t.style.height = "1px", n.style.height = "9px", n.style.display = "block", re.appendChild(e).appendChild(t).appendChild(n), r = C.getComputedStyle(t), a = parseInt(r.height, 10) + parseInt(r.borderTopWidth, 10) + parseInt(r.borderBottomWidth, 10) === t.offsetHeight, re.removeChild(e)), a } })) }(); var Be = ["Webkit", "Moz", "ms"], $e = E.createElement("div").style, _e = {}; function ze(e) { var t = S.cssProps[e] || _e[e]; return t || (e in $e ? e : _e[e] = function (e) { var t = e[0].toUpperCase() + e.slice(1), n = Be.length; while (n--) if ((e = Be[n] + t) in $e) return e }(e) || e) } var Ue = /^(none|table(?!-c[ea]).+)/, Xe = /^--/, Ve = { position: "absolute", visibility: "hidden", display: "block" }, Ge = { letterSpacing: "0", fontWeight: "400" }; function Ye(e, t, n) { var r = te.exec(t); return r ? Math.max(0, r[2] - (n || 0)) + (r[3] || "px") : t } function Qe(e, t, n, r, i, o) { var a = "width" === t ? 1 : 0, s = 0, u = 0; if (n === (r ? "border" : "content")) return 0; for (; a < 4; a += 2)"margin" === n && (u += S.css(e, n + ne[a], !0, i)), r ? ("content" === n && (u -= S.css(e, "padding" + ne[a], !0, i)), "margin" !== n && (u -= S.css(e, "border" + ne[a] + "Width", !0, i))) : (u += S.css(e, "padding" + ne[a], !0, i), "padding" !== n ? u += S.css(e, "border" + ne[a] + "Width", !0, i) : s += S.css(e, "border" + ne[a] + "Width", !0, i)); return !r && 0 <= o && (u += Math.max(0, Math.ceil(e["offset" + t[0].toUpperCase() + t.slice(1)] - o - u - s - .5)) || 0), u } function Je(e, t, n) { var r = Re(e), i = (!y.boxSizingReliable() || n) && "border-box" === S.css(e, "boxSizing", !1, r), o = i, a = We(e, t, r), s = "offset" + t[0].toUpperCase() + t.slice(1); if (Pe.test(a)) { if (!n) return a; a = "auto" } return (!y.boxSizingReliable() && i || !y.reliableTrDimensions() && A(e, "tr") || "auto" === a || !parseFloat(a) && "inline" === S.css(e, "display", !1, r)) && e.getClientRects().length && (i = "border-box" === S.css(e, "boxSizing", !1, r), (o = s in e) && (a = e[s])), (a = parseFloat(a) || 0) + Qe(e, t, n || (i ? "border" : "content"), o, r, a) + "px" } function Ke(e, t, n, r, i) { return new Ke.prototype.init(e, t, n, r, i) } S.extend({ cssHooks: { opacity: { get: function (e, t) { if (t) { var n = We(e, "opacity"); return "" === n ? "1" : n } } } }, cssNumber: { animationIterationCount: !0, columnCount: !0, fillOpacity: !0, flexGrow: !0, flexShrink: !0, fontWeight: !0, gridArea: !0, gridColumn: !0, gridColumnEnd: !0, gridColumnStart: !0, gridRow: !0, gridRowEnd: !0, gridRowStart: !0, lineHeight: !0, opacity: !0, order: !0, orphans: !0, widows: !0, zIndex: !0, zoom: !0 }, cssProps: {}, style: function (e, t, n, r) { if (e && 3 !== e.nodeType && 8 !== e.nodeType && e.style) { var i, o, a, s = X(t), u = Xe.test(t), l = e.style; if (u || (t = ze(s)), a = S.cssHooks[t] || S.cssHooks[s], void 0 === n) return a && "get" in a && void 0 !== (i = a.get(e, !1, r)) ? i : l[t]; "string" === (o = typeof n) && (i = te.exec(n)) && i[1] && (n = se(e, t, i), o = "number"), null != n && n == n && ("number" !== o || u || (n += i && i[3] || (S.cssNumber[s] ? "" : "px")), y.clearCloneStyle || "" !== n || 0 !== t.indexOf("background") || (l[t] = "inherit"), a && "set" in a && void 0 === (n = a.set(e, n, r)) || (u ? l.setProperty(t, n) : l[t] = n)) } }, css: function (e, t, n, r) { var i, o, a, s = X(t); return Xe.test(t) || (t = ze(s)), (a = S.cssHooks[t] || S.cssHooks[s]) && "get" in a && (i = a.get(e, !0, n)), void 0 === i && (i = We(e, t, r)), "normal" === i && t in Ge && (i = Ge[t]), "" === n || n ? (o = parseFloat(i), !0 === n || isFinite(o) ? o || 0 : i) : i } }), S.each(["height", "width"], function (e, u) { S.cssHooks[u] = { get: function (e, t, n) { if (t) return !Ue.test(S.css(e, "display")) || e.getClientRects().length && e.getBoundingClientRect().width ? Je(e, u, n) : Me(e, Ve, function () { return Je(e, u, n) }) }, set: function (e, t, n) { var r, i = Re(e), o = !y.scrollboxSize() && "absolute" === i.position, a = (o || n) && "border-box" === S.css(e, "boxSizing", !1, i), s = n ? Qe(e, u, n, a, i) : 0; return a && o && (s -= Math.ceil(e["offset" + u[0].toUpperCase() + u.slice(1)] - parseFloat(i[u]) - Qe(e, u, "border", !1, i) - .5)), s && (r = te.exec(t)) && "px" !== (r[3] || "px") && (e.style[u] = t, t = S.css(e, u)), Ye(0, t, s) } } }), S.cssHooks.marginLeft = Fe(y.reliableMarginLeft, function (e, t) { if (t) return (parseFloat(We(e, "marginLeft")) || e.getBoundingClientRect().left - Me(e, { marginLeft: 0 }, function () { return e.getBoundingClientRect().left })) + "px" }), S.each({ margin: "", padding: "", border: "Width" }, function (i, o) { S.cssHooks[i + o] = { expand: function (e) { for (var t = 0, n = {}, r = "string" == typeof e ? e.split(" ") : [e]; t < 4; t++)n[i + ne[t] + o] = r[t] || r[t - 2] || r[0]; return n } }, "margin" !== i && (S.cssHooks[i + o].set = Ye) }), S.fn.extend({ css: function (e, t) { return $(this, function (e, t, n) { var r, i, o = {}, a = 0; if (Array.isArray(t)) { for (r = Re(e), i = t.length; a < i; a++)o[t[a]] = S.css(e, t[a], !1, r); return o } return void 0 !== n ? S.style(e, t, n) : S.css(e, t) }, e, t, 1 < arguments.length) } }), ((S.Tween = Ke).prototype = { constructor: Ke, init: function (e, t, n, r, i, o) { this.elem = e, this.prop = n, this.easing = i || S.easing._default, this.options = t, this.start = this.now = this.cur(), this.end = r, this.unit = o || (S.cssNumber[n] ? "" : "px") }, cur: function () { var e = Ke.propHooks[this.prop]; return e && e.get ? e.get(this) : Ke.propHooks._default.get(this) }, run: function (e) { var t, n = Ke.propHooks[this.prop]; return this.options.duration ? this.pos = t = S.easing[this.easing](e, this.options.duration * e, 0, 1, this.options.duration) : this.pos = t = e, this.now = (this.end - this.start) * t + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), n && n.set ? n.set(this) : Ke.propHooks._default.set(this), this } }).init.prototype = Ke.prototype, (Ke.propHooks = { _default: { get: function (e) { var t; return 1 !== e.elem.nodeType || null != e.elem[e.prop] && null == e.elem.style[e.prop] ? e.elem[e.prop] : (t = S.css(e.elem, e.prop, "")) && "auto" !== t ? t : 0 }, set: function (e) { S.fx.step[e.prop] ? S.fx.step[e.prop](e) : 1 !== e.elem.nodeType || !S.cssHooks[e.prop] && null == e.elem.style[ze(e.prop)] ? e.elem[e.prop] = e.now : S.style(e.elem, e.prop, e.now + e.unit) } } }).scrollTop = Ke.propHooks.scrollLeft = { set: function (e) { e.elem.nodeType && e.elem.parentNode && (e.elem[e.prop] = e.now) } }, S.easing = { linear: function (e) { return e }, swing: function (e) { return .5 - Math.cos(e * Math.PI) / 2 }, _default: "swing" }, S.fx = Ke.prototype.init, S.fx.step = {}; var Ze, et, tt, nt, rt = /^(?:toggle|show|hide)$/, it = /queueHooks$/; function ot() { et && (!1 === E.hidden && C.requestAnimationFrame ? C.requestAnimationFrame(ot) : C.setTimeout(ot, S.fx.interval), S.fx.tick()) } function at() { return C.setTimeout(function () { Ze = void 0 }), Ze = Date.now() } function st(e, t) { var n, r = 0, i = { height: e }; for (t = t ? 1 : 0; r < 4; r += 2 - t)i["margin" + (n = ne[r])] = i["padding" + n] = e; return t && (i.opacity = i.width = e), i } function ut(e, t, n) { for (var r, i = (lt.tweeners[t] || []).concat(lt.tweeners["*"]), o = 0, a = i.length; o < a; o++)if (r = i[o].call(n, t, e)) return r } function lt(o, e, t) { var n, a, r = 0, i = lt.prefilters.length, s = S.Deferred().always(function () { delete u.elem }), u = function () { if (a) return !1; for (var e = Ze || at(), t = Math.max(0, l.startTime + l.duration - e), n = 1 - (t / l.duration || 0), r = 0, i = l.tweens.length; r < i; r++)l.tweens[r].run(n); return s.notifyWith(o, [l, n, t]), n < 1 && i ? t : (i || s.notifyWith(o, [l, 1, 0]), s.resolveWith(o, [l]), !1) }, l = s.promise({ elem: o, props: S.extend({}, e), opts: S.extend(!0, { specialEasing: {}, easing: S.easing._default }, t), originalProperties: e, originalOptions: t, startTime: Ze || at(), duration: t.duration, tweens: [], createTween: function (e, t) { var n = S.Tween(o, l.opts, e, t, l.opts.specialEasing[e] || l.opts.easing); return l.tweens.push(n), n }, stop: function (e) { var t = 0, n = e ? l.tweens.length : 0; if (a) return this; for (a = !0; t < n; t++)l.tweens[t].run(1); return e ? (s.notifyWith(o, [l, 1, 0]), s.resolveWith(o, [l, e])) : s.rejectWith(o, [l, e]), this } }), c = l.props; for (!function (e, t) { var n, r, i, o, a; for (n in e) if (i = t[r = X(n)], o = e[n], Array.isArray(o) && (i = o[1], o = e[n] = o[0]), n !== r && (e[r] = o, delete e[n]), (a = S.cssHooks[r]) && "expand" in a) for (n in o = a.expand(o), delete e[r], o) n in e || (e[n] = o[n], t[n] = i); else t[r] = i }(c, l.opts.specialEasing); r < i; r++)if (n = lt.prefilters[r].call(l, o, c, l.opts)) return m(n.stop) && (S._queueHooks(l.elem, l.opts.queue).stop = n.stop.bind(n)), n; return S.map(c, ut, l), m(l.opts.start) && l.opts.start.call(o, l), l.progress(l.opts.progress).done(l.opts.done, l.opts.complete).fail(l.opts.fail).always(l.opts.always), S.fx.timer(S.extend(u, { elem: o, anim: l, queue: l.opts.queue })), l } S.Animation = S.extend(lt, { tweeners: { "*": [function (e, t) { var n = this.createTween(e, t); return se(n.elem, e, te.exec(t), n), n }] }, tweener: function (e, t) { m(e) ? (t = e, e = ["*"]) : e = e.match(P); for (var n, r = 0, i = e.length; r < i; r++)n = e[r], lt.tweeners[n] = lt.tweeners[n] || [], lt.tweeners[n].unshift(t) }, prefilters: [function (e, t, n) { var r, i, o, a, s, u, l, c, f = "width" in t || "height" in t, p = this, d = {}, h = e.style, g = e.nodeType && ae(e), v = Y.get(e, "fxshow"); for (r in n.queue || (null == (a = S._queueHooks(e, "fx")).unqueued && (a.unqueued = 0, s = a.empty.fire, a.empty.fire = function () { a.unqueued || s() }), a.unqueued++, p.always(function () { p.always(function () { a.unqueued--, S.queue(e, "fx").length || a.empty.fire() }) })), t) if (i = t[r], rt.test(i)) { if (delete t[r], o = o || "toggle" === i, i === (g ? "hide" : "show")) { if ("show" !== i || !v || void 0 === v[r]) continue; g = !0 } d[r] = v && v[r] || S.style(e, r) } if ((u = !S.isEmptyObject(t)) || !S.isEmptyObject(d)) for (r in f && 1 === e.nodeType && (n.overflow = [h.overflow, h.overflowX, h.overflowY], null == (l = v && v.display) && (l = Y.get(e, "display")), "none" === (c = S.css(e, "display")) && (l ? c = l : (le([e], !0), l = e.style.display || l, c = S.css(e, "display"), le([e]))), ("inline" === c || "inline-block" === c && null != l) && "none" === S.css(e, "float") && (u || (p.done(function () { h.display = l }), null == l && (c = h.display, l = "none" === c ? "" : c)), h.display = "inline-block")), n.overflow && (h.overflow = "hidden", p.always(function () { h.overflow = n.overflow[0], h.overflowX = n.overflow[1], h.overflowY = n.overflow[2] })), u = !1, d) u || (v ? "hidden" in v && (g = v.hidden) : v = Y.access(e, "fxshow", { display: l }), o && (v.hidden = !g), g && le([e], !0), p.done(function () { for (r in g || le([e]), Y.remove(e, "fxshow"), d) S.style(e, r, d[r]) })), u = ut(g ? v[r] : 0, r, p), r in v || (v[r] = u.start, g && (u.end = u.start, u.start = 0)) }], prefilter: function (e, t) { t ? lt.prefilters.unshift(e) : lt.prefilters.push(e) } }), S.speed = function (e, t, n) { var r = e && "object" == typeof e ? S.extend({}, e) : { complete: n || !n && t || m(e) && e, duration: e, easing: n && t || t && !m(t) && t }; return S.fx.off ? r.duration = 0 : "number" != typeof r.duration && (r.duration in S.fx.speeds ? r.duration = S.fx.speeds[r.duration] : r.duration = S.fx.speeds._default), null != r.queue && !0 !== r.queue || (r.queue = "fx"), r.old = r.complete, r.complete = function () { m(r.old) && r.old.call(this), r.queue && S.dequeue(this, r.queue) }, r }, S.fn.extend({ fadeTo: function (e, t, n, r) { return this.filter(ae).css("opacity", 0).show().end().animate({ opacity: t }, e, n, r) }, animate: function (t, e, n, r) { var i = S.isEmptyObject(t), o = S.speed(e, n, r), a = function () { var e = lt(this, S.extend({}, t), o); (i || Y.get(this, "finish")) && e.stop(!0) }; return a.finish = a, i || !1 === o.queue ? this.each(a) : this.queue(o.queue, a) }, stop: function (i, e, o) { var a = function (e) { var t = e.stop; delete e.stop, t(o) }; return "string" != typeof i && (o = e, e = i, i = void 0), e && this.queue(i || "fx", []), this.each(function () { var e = !0, t = null != i && i + "queueHooks", n = S.timers, r = Y.get(this); if (t) r[t] && r[t].stop && a(r[t]); else for (t in r) r[t] && r[t].stop && it.test(t) && a(r[t]); for (t = n.length; t--;)n[t].elem !== this || null != i && n[t].queue !== i || (n[t].anim.stop(o), e = !1, n.splice(t, 1)); !e && o || S.dequeue(this, i) }) }, finish: function (a) { return !1 !== a && (a = a || "fx"), this.each(function () { var e, t = Y.get(this), n = t[a + "queue"], r = t[a + "queueHooks"], i = S.timers, o = n ? n.length : 0; for (t.finish = !0, S.queue(this, a, []), r && r.stop && r.stop.call(this, !0), e = i.length; e--;)i[e].elem === this && i[e].queue === a && (i[e].anim.stop(!0), i.splice(e, 1)); for (e = 0; e < o; e++)n[e] && n[e].finish && n[e].finish.call(this); delete t.finish }) } }), S.each(["toggle", "show", "hide"], function (e, r) { var i = S.fn[r]; S.fn[r] = function (e, t, n) { return null == e || "boolean" == typeof e ? i.apply(this, arguments) : this.animate(st(r, !0), e, t, n) } }), S.each({ slideDown: st("show"), slideUp: st("hide"), slideToggle: st("toggle"), fadeIn: { opacity: "show" }, fadeOut: { opacity: "hide" }, fadeToggle: { opacity: "toggle" } }, function (e, r) { S.fn[e] = function (e, t, n) { return this.animate(r, e, t, n) } }), S.timers = [], S.fx.tick = function () { var e, t = 0, n = S.timers; for (Ze = Date.now(); t < n.length; t++)(e = n[t])() || n[t] !== e || n.splice(t--, 1); n.length || S.fx.stop(), Ze = void 0 }, S.fx.timer = function (e) { S.timers.push(e), S.fx.start() }, S.fx.interval = 13, S.fx.start = function () { et || (et = !0, ot()) }, S.fx.stop = function () { et = null }, S.fx.speeds = { slow: 600, fast: 200, _default: 400 }, S.fn.delay = function (r, e) { return r = S.fx && S.fx.speeds[r] || r, e = e || "fx", this.queue(e, function (e, t) { var n = C.setTimeout(e, r); t.stop = function () { C.clearTimeout(n) } }) }, tt = E.createElement("input"), nt = E.createElement("select").appendChild(E.createElement("option")), tt.type = "checkbox", y.checkOn = "" !== tt.value, y.optSelected = nt.selected, (tt = E.createElement("input")).value = "t", tt.type = "radio", y.radioValue = "t" === tt.value; var ct, ft = S.expr.attrHandle; S.fn.extend({ attr: function (e, t) { return $(this, S.attr, e, t, 1 < arguments.length) }, removeAttr: function (e) { return this.each(function () { S.removeAttr(this, e) }) } }), S.extend({ attr: function (e, t, n) { var r, i, o = e.nodeType; if (3 !== o && 8 !== o && 2 !== o) return "undefined" == typeof e.getAttribute ? S.prop(e, t, n) : (1 === o && S.isXMLDoc(e) || (i = S.attrHooks[t.toLowerCase()] || (S.expr.match.bool.test(t) ? ct : void 0)), void 0 !== n ? null === n ? void S.removeAttr(e, t) : i && "set" in i && void 0 !== (r = i.set(e, n, t)) ? r : (e.setAttribute(t, n + ""), n) : i && "get" in i && null !== (r = i.get(e, t)) ? r : null == (r = S.find.attr(e, t)) ? void 0 : r) }, attrHooks: { type: { set: function (e, t) { if (!y.radioValue && "radio" === t && A(e, "input")) { var n = e.value; return e.setAttribute("type", t), n && (e.value = n), t } } } }, removeAttr: function (e, t) { var n, r = 0, i = t && t.match(P); if (i && 1 === e.nodeType) while (n = i[r++]) e.removeAttribute(n) } }), ct = { set: function (e, t, n) { return !1 === t ? S.removeAttr(e, n) : e.setAttribute(n, n), n } }, S.each(S.expr.match.bool.source.match(/\w+/g), function (e, t) { var a = ft[t] || S.find.attr; ft[t] = function (e, t, n) { var r, i, o = t.toLowerCase(); return n || (i = ft[o], ft[o] = r, r = null != a(e, t, n) ? o : null, ft[o] = i), r } }); var pt = /^(?:input|select|textarea|button)$/i, dt = /^(?:a|area)$/i; function ht(e) { return (e.match(P) || []).join(" ") } function gt(e) { return e.getAttribute && e.getAttribute("class") || "" } function vt(e) { return Array.isArray(e) ? e : "string" == typeof e && e.match(P) || [] } S.fn.extend({ prop: function (e, t) { return $(this, S.prop, e, t, 1 < arguments.length) }, removeProp: function (e) { return this.each(function () { delete this[S.propFix[e] || e] }) } }), S.extend({ prop: function (e, t, n) { var r, i, o = e.nodeType; if (3 !== o && 8 !== o && 2 !== o) return 1 === o && S.isXMLDoc(e) || (t = S.propFix[t] || t, i = S.propHooks[t]), void 0 !== n ? i && "set" in i && void 0 !== (r = i.set(e, n, t)) ? r : e[t] = n : i && "get" in i && null !== (r = i.get(e, t)) ? r : e[t] }, propHooks: { tabIndex: { get: function (e) { var t = S.find.attr(e, "tabindex"); return t ? parseInt(t, 10) : pt.test(e.nodeName) || dt.test(e.nodeName) && e.href ? 0 : -1 } } }, propFix: { "for": "htmlFor", "class": "className" } }), y.optSelected || (S.propHooks.selected = { get: function (e) { var t = e.parentNode; return t && t.parentNode && t.parentNode.selectedIndex, null }, set: function (e) { var t = e.parentNode; t && (t.selectedIndex, t.parentNode && t.parentNode.selectedIndex) } }), S.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function () { S.propFix[this.toLowerCase()] = this }), S.fn.extend({ addClass: function (t) { var e, n, r, i, o, a, s, u = 0; if (m(t)) return this.each(function (e) { S(this).addClass(t.call(this, e, gt(this))) }); if ((e = vt(t)).length) while (n = this[u++]) if (i = gt(n), r = 1 === n.nodeType && " " + ht(i) + " ") { a = 0; while (o = e[a++]) r.indexOf(" " + o + " ") < 0 && (r += o + " "); i !== (s = ht(r)) && n.setAttribute("class", s) } return this }, removeClass: function (t) { var e, n, r, i, o, a, s, u = 0; if (m(t)) return this.each(function (e) { S(this).removeClass(t.call(this, e, gt(this))) }); if (!arguments.length) return this.attr("class", ""); if ((e = vt(t)).length) while (n = this[u++]) if (i = gt(n), r = 1 === n.nodeType && " " + ht(i) + " ") { a = 0; while (o = e[a++]) while (-1 < r.indexOf(" " + o + " ")) r = r.replace(" " + o + " ", " "); i !== (s = ht(r)) && n.setAttribute("class", s) } return this }, toggleClass: function (i, t) { var o = typeof i, a = "string" === o || Array.isArray(i); return "boolean" == typeof t && a ? t ? this.addClass(i) : this.removeClass(i) : m(i) ? this.each(function (e) { S(this).toggleClass(i.call(this, e, gt(this), t), t) }) : this.each(function () { var e, t, n, r; if (a) { t = 0, n = S(this), r = vt(i); while (e = r[t++]) n.hasClass(e) ? n.removeClass(e) : n.addClass(e) } else void 0 !== i && "boolean" !== o || ((e = gt(this)) && Y.set(this, "__className__", e), this.setAttribute && this.setAttribute("class", e || !1 === i ? "" : Y.get(this, "__className__") || "")) }) }, hasClass: function (e) { var t, n, r = 0; t = " " + e + " "; while (n = this[r++]) if (1 === n.nodeType && -1 < (" " + ht(gt(n)) + " ").indexOf(t)) return !0; return !1 } }); var yt = /\r/g; S.fn.extend({ val: function (n) { var r, e, i, t = this[0]; return arguments.length ? (i = m(n), this.each(function (e) { var t; 1 === this.nodeType && (null == (t = i ? n.call(this, e, S(this).val()) : n) ? t = "" : "number" == typeof t ? t += "" : Array.isArray(t) && (t = S.map(t, function (e) { return null == e ? "" : e + "" })), (r = S.valHooks[this.type] || S.valHooks[this.nodeName.toLowerCase()]) && "set" in r && void 0 !== r.set(this, t, "value") || (this.value = t)) })) : t ? (r = S.valHooks[t.type] || S.valHooks[t.nodeName.toLowerCase()]) && "get" in r && void 0 !== (e = r.get(t, "value")) ? e : "string" == typeof (e = t.value) ? e.replace(yt, "") : null == e ? "" : e : void 0 } }), S.extend({ valHooks: { option: { get: function (e) { var t = S.find.attr(e, "value"); return null != t ? t : ht(S.text(e)) } }, select: { get: function (e) { var t, n, r, i = e.options, o = e.selectedIndex, a = "select-one" === e.type, s = a ? null : [], u = a ? o + 1 : i.length; for (r = o < 0 ? u : a ? o : 0; r < u; r++)if (((n = i[r]).selected || r === o) && !n.disabled && (!n.parentNode.disabled || !A(n.parentNode, "optgroup"))) { if (t = S(n).val(), a) return t; s.push(t) } return s }, set: function (e, t) { var n, r, i = e.options, o = S.makeArray(t), a = i.length; while (a--) ((r = i[a]).selected = -1 < S.inArray(S.valHooks.option.get(r), o)) && (n = !0); return n || (e.selectedIndex = -1), o } } } }), S.each(["radio", "checkbox"], function () { S.valHooks[this] = { set: function (e, t) { if (Array.isArray(t)) return e.checked = -1 < S.inArray(S(e).val(), t) } }, y.checkOn || (S.valHooks[this].get = function (e) { return null === e.getAttribute("value") ? "on" : e.value }) }), y.focusin = "onfocusin" in C; var mt = /^(?:focusinfocus|focusoutblur)$/, xt = function (e) { e.stopPropagation() }; S.extend(S.event, { trigger: function (e, t, n, r) { var i, o, a, s, u, l, c, f, p = [n || E], d = v.call(e, "type") ? e.type : e, h = v.call(e, "namespace") ? e.namespace.split(".") : []; if (o = f = a = n = n || E, 3 !== n.nodeType && 8 !== n.nodeType && !mt.test(d + S.event.triggered) && (-1 < d.indexOf(".") && (d = (h = d.split(".")).shift(), h.sort()), u = d.indexOf(":") < 0 && "on" + d, (e = e[S.expando] ? e : new S.Event(d, "object" == typeof e && e)).isTrigger = r ? 2 : 3, e.namespace = h.join("."), e.rnamespace = e.namespace ? new RegExp("(^|\\.)" + h.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, e.result = void 0, e.target || (e.target = n), t = null == t ? [e] : S.makeArray(t, [e]), c = S.event.special[d] || {}, r || !c.trigger || !1 !== c.trigger.apply(n, t))) { if (!r && !c.noBubble && !x(n)) { for (s = c.delegateType || d, mt.test(s + d) || (o = o.parentNode); o; o = o.parentNode)p.push(o), a = o; a === (n.ownerDocument || E) && p.push(a.defaultView || a.parentWindow || C) } i = 0; while ((o = p[i++]) && !e.isPropagationStopped()) f = o, e.type = 1 < i ? s : c.bindType || d, (l = (Y.get(o, "events") || Object.create(null))[e.type] && Y.get(o, "handle")) && l.apply(o, t), (l = u && o[u]) && l.apply && V(o) && (e.result = l.apply(o, t), !1 === e.result && e.preventDefault()); return e.type = d, r || e.isDefaultPrevented() || c._default && !1 !== c._default.apply(p.pop(), t) || !V(n) || u && m(n[d]) && !x(n) && ((a = n[u]) && (n[u] = null), S.event.triggered = d, e.isPropagationStopped() && f.addEventListener(d, xt), n[d](), e.isPropagationStopped() && f.removeEventListener(d, xt), S.event.triggered = void 0, a && (n[u] = a)), e.result } }, simulate: function (e, t, n) { var r = S.extend(new S.Event, n, { type: e, isSimulated: !0 }); S.event.trigger(r, null, t) } }), S.fn.extend({ trigger: function (e, t) { return this.each(function () { S.event.trigger(e, t, this) }) }, triggerHandler: function (e, t) { var n = this[0]; if (n) return S.event.trigger(e, t, n, !0) } }), y.focusin || S.each({ focus: "focusin", blur: "focusout" }, function (n, r) { var i = function (e) { S.event.simulate(r, e.target, S.event.fix(e)) }; S.event.special[r] = { setup: function () { var e = this.ownerDocument || this.document || this, t = Y.access(e, r); t || e.addEventListener(n, i, !0), Y.access(e, r, (t || 0) + 1) }, teardown: function () { var e = this.ownerDocument || this.document || this, t = Y.access(e, r) - 1; t ? Y.access(e, r, t) : (e.removeEventListener(n, i, !0), Y.remove(e, r)) } } }); var bt = C.location, wt = { guid: Date.now() }, Tt = /\?/; S.parseXML = function (e) { var t, n; if (!e || "string" != typeof e) return null; try { t = (new C.DOMParser).parseFromString(e, "text/xml") } catch (e) { } return n = t && t.getElementsByTagName("parsererror")[0], t && !n || S.error("Invalid XML: " + (n ? S.map(n.childNodes, function (e) { return e.textContent }).join("\n") : e)), t }; var Ct = /\[\]$/, Et = /\r?\n/g, St = /^(?:submit|button|image|reset|file)$/i, kt = /^(?:input|select|textarea|keygen)/i; function At(n, e, r, i) { var t; if (Array.isArray(e)) S.each(e, function (e, t) { r || Ct.test(n) ? i(n, t) : At(n + "[" + ("object" == typeof t && null != t ? e : "") + "]", t, r, i) }); else if (r || "object" !== w(e)) i(n, e); else for (t in e) At(n + "[" + t + "]", e[t], r, i) } S.param = function (e, t) { var n, r = [], i = function (e, t) { var n = m(t) ? t() : t; r[r.length] = encodeURIComponent(e) + "=" + encodeURIComponent(null == n ? "" : n) }; if (null == e) return ""; if (Array.isArray(e) || e.jquery && !S.isPlainObject(e)) S.each(e, function () { i(this.name, this.value) }); else for (n in e) At(n, e[n], t, i); return r.join("&") }, S.fn.extend({ serialize: function () { return S.param(this.serializeArray()) }, serializeArray: function () { return this.map(function () { var e = S.prop(this, "elements"); return e ? S.makeArray(e) : this }).filter(function () { var e = this.type; return this.name && !S(this).is(":disabled") && kt.test(this.nodeName) && !St.test(e) && (this.checked || !pe.test(e)) }).map(function (e, t) { var n = S(this).val(); return null == n ? null : Array.isArray(n) ? S.map(n, function (e) { return { name: t.name, value: e.replace(Et, "\r\n") } }) : { name: t.name, value: n.replace(Et, "\r\n") } }).get() } }); var Nt = /%20/g, jt = /#.*$/, Dt = /([?&])_=[^&]*/, qt = /^(.*?):[ \t]*([^\r\n]*)$/gm, Lt = /^(?:GET|HEAD)$/, Ht = /^\/\//, Ot = {}, Pt = {}, Rt = "*/".concat("*"), Mt = E.createElement("a"); function It(o) { return function (e, t) { "string" != typeof e && (t = e, e = "*"); var n, r = 0, i = e.toLowerCase().match(P) || []; if (m(t)) while (n = i[r++]) "+" === n[0] ? (n = n.slice(1) || "*", (o[n] = o[n] || []).unshift(t)) : (o[n] = o[n] || []).push(t) } } function Wt(t, i, o, a) { var s = {}, u = t === Pt; function l(e) { var r; return s[e] = !0, S.each(t[e] || [], function (e, t) { var n = t(i, o, a); return "string" != typeof n || u || s[n] ? u ? !(r = n) : void 0 : (i.dataTypes.unshift(n), l(n), !1) }), r } return l(i.dataTypes[0]) || !s["*"] && l("*") } function Ft(e, t) { var n, r, i = S.ajaxSettings.flatOptions || {}; for (n in t) void 0 !== t[n] && ((i[n] ? e : r || (r = {}))[n] = t[n]); return r && S.extend(!0, e, r), e } Mt.href = bt.href, S.extend({ active: 0, lastModified: {}, etag: {}, ajaxSettings: { url: bt.href, type: "GET", isLocal: /^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(bt.protocol), global: !0, processData: !0, async: !0, contentType: "application/x-www-form-urlencoded; charset=UTF-8", accepts: { "*": Rt, 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": JSON.parse, "text xml": S.parseXML }, flatOptions: { url: !0, context: !0 } }, ajaxSetup: function (e, t) { return t ? Ft(Ft(e, S.ajaxSettings), t) : Ft(S.ajaxSettings, e) }, ajaxPrefilter: It(Ot), ajaxTransport: It(Pt), ajax: function (e, t) { "object" == typeof e && (t = e, e = void 0), t = t || {}; var c, f, p, n, d, r, h, g, i, o, v = S.ajaxSetup({}, t), y = v.context || v, m = v.context && (y.nodeType || y.jquery) ? S(y) : S.event, x = S.Deferred(), b = S.Callbacks("once memory"), w = v.statusCode || {}, a = {}, s = {}, u = "canceled", T = { readyState: 0, getResponseHeader: function (e) { var t; if (h) { if (!n) { n = {}; while (t = qt.exec(p)) n[t[1].toLowerCase() + " "] = (n[t[1].toLowerCase() + " "] || []).concat(t[2]) } t = n[e.toLowerCase() + " "] } return null == t ? null : t.join(", ") }, getAllResponseHeaders: function () { return h ? p : null }, setRequestHeader: function (e, t) { return null == h && (e = s[e.toLowerCase()] = s[e.toLowerCase()] || e, a[e] = t), this }, overrideMimeType: function (e) { return null == h && (v.mimeType = e), this }, statusCode: function (e) { var t; if (e) if (h) T.always(e[T.status]); else for (t in e) w[t] = [w[t], e[t]]; return this }, abort: function (e) { var t = e || u; return c && c.abort(t), l(0, t), this } }; if (x.promise(T), v.url = ((e || v.url || bt.href) + "").replace(Ht, bt.protocol + "//"), v.type = t.method || t.type || v.method || v.type, v.dataTypes = (v.dataType || "*").toLowerCase().match(P) || [""], null == v.crossDomain) { r = E.createElement("a"); try { r.href = v.url, r.href = r.href, v.crossDomain = Mt.protocol + "//" + Mt.host != r.protocol + "//" + r.host } catch (e) { v.crossDomain = !0 } } if (v.data && v.processData && "string" != typeof v.data && (v.data = S.param(v.data, v.traditional)), Wt(Ot, v, t, T), h) return T; for (i in (g = S.event && v.global) && 0 == S.active++ && S.event.trigger("ajaxStart"), v.type = v.type.toUpperCase(), v.hasContent = !Lt.test(v.type), f = v.url.replace(jt, ""), v.hasContent ? v.data && v.processData && 0 === (v.contentType || "").indexOf("application/x-www-form-urlencoded") && (v.data = v.data.replace(Nt, "+")) : (o = v.url.slice(f.length), v.data && (v.processData || "string" == typeof v.data) && (f += (Tt.test(f) ? "&" : "?") + v.data, delete v.data), !1 === v.cache && (f = f.replace(Dt, "$1"), o = (Tt.test(f) ? "&" : "?") + "_=" + wt.guid++ + o), v.url = f + o), v.ifModified && (S.lastModified[f] && T.setRequestHeader("If-Modified-Since", S.lastModified[f]), S.etag[f] && T.setRequestHeader("If-None-Match", S.etag[f])), (v.data && v.hasContent && !1 !== v.contentType || t.contentType) && T.setRequestHeader("Content-Type", v.contentType), T.setRequestHeader("Accept", v.dataTypes[0] && v.accepts[v.dataTypes[0]] ? v.accepts[v.dataTypes[0]] + ("*" !== v.dataTypes[0] ? ", " + Rt + "; q=0.01" : "") : v.accepts["*"]), v.headers) T.setRequestHeader(i, v.headers[i]); if (v.beforeSend && (!1 === v.beforeSend.call(y, T, v) || h)) return T.abort(); if (u = "abort", b.add(v.complete), T.done(v.success), T.fail(v.error), c = Wt(Pt, v, t, T)) { if (T.readyState = 1, g && m.trigger("ajaxSend", [T, v]), h) return T; v.async && 0 < v.timeout && (d = C.setTimeout(function () { T.abort("timeout") }, v.timeout)); try { h = !1, c.send(a, l) } catch (e) { if (h) throw e; l(-1, e) } } else l(-1, "No Transport"); function l(e, t, n, r) { var i, o, a, s, u, l = t; h || (h = !0, d && C.clearTimeout(d), c = void 0, p = r || "", T.readyState = 0 < e ? 4 : 0, i = 200 <= e && e < 300 || 304 === e, n && (s = function (e, t, n) { var r, i, o, a, s = e.contents, u = e.dataTypes; while ("*" === u[0]) u.shift(), void 0 === r && (r = e.mimeType || t.getResponseHeader("Content-Type")); if (r) for (i in s) if (s[i] && s[i].test(r)) { u.unshift(i); break } if (u[0] in n) o = u[0]; else { for (i in n) { if (!u[0] || e.converters[i + " " + u[0]]) { o = i; break } a || (a = i) } o = o || a } if (o) return o !== u[0] && u.unshift(o), n[o] }(v, T, n)), !i && -1 < S.inArray("script", v.dataTypes) && S.inArray("json", v.dataTypes) < 0 && (v.converters["text script"] = function () { }), s = function (e, t, n, r) { var i, o, a, s, u, l = {}, c = e.dataTypes.slice(); if (c[1]) for (a in e.converters) l[a.toLowerCase()] = e.converters[a]; o = c.shift(); while (o) if (e.responseFields[o] && (n[e.responseFields[o]] = t), !u && r && e.dataFilter && (t = e.dataFilter(t, e.dataType)), u = o, o = c.shift()) if ("*" === o) o = u; else if ("*" !== u && u !== o) { if (!(a = l[u + " " + o] || l["* " + o])) for (i in l) if ((s = i.split(" "))[1] === o && (a = l[u + " " + s[0]] || l["* " + s[0]])) { !0 === a ? a = l[i] : !0 !== l[i] && (o = s[0], c.unshift(s[1])); break } if (!0 !== a) if (a && e["throws"]) t = a(t); else try { t = a(t) } catch (e) { return { state: "parsererror", error: a ? e : "No conversion from " + u + " to " + o } } } return { state: "success", data: t } }(v, s, T, i), i ? (v.ifModified && ((u = T.getResponseHeader("Last-Modified")) && (S.lastModified[f] = u), (u = T.getResponseHeader("etag")) && (S.etag[f] = u)), 204 === e || "HEAD" === v.type ? l = "nocontent" : 304 === e ? l = "notmodified" : (l = s.state, o = s.data, i = !(a = s.error))) : (a = l, !e && l || (l = "error", e < 0 && (e = 0))), T.status = e, T.statusText = (t || l) + "", i ? x.resolveWith(y, [o, l, T]) : x.rejectWith(y, [T, l, a]), T.statusCode(w), w = void 0, g && m.trigger(i ? "ajaxSuccess" : "ajaxError", [T, v, i ? o : a]), b.fireWith(y, [T, l]), g && (m.trigger("ajaxComplete", [T, v]), --S.active || S.event.trigger("ajaxStop"))) } return T }, getJSON: function (e, t, n) { return S.get(e, t, n, "json") }, getScript: function (e, t) { return S.get(e, void 0, t, "script") } }), S.each(["get", "post"], function (e, i) { S[i] = function (e, t, n, r) { return m(t) && (r = r || n, n = t, t = void 0), S.ajax(S.extend({ url: e, type: i, dataType: r, data: t, success: n }, S.isPlainObject(e) && e)) } }), S.ajaxPrefilter(function (e) { var t; for (t in e.headers) "content-type" === t.toLowerCase() && (e.contentType = e.headers[t] || "") }), S._evalUrl = function (e, t, n) { return S.ajax({ url: e, type: "GET", dataType: "script", cache: !0, async: !1, global: !1, converters: { "text script": function () { } }, dataFilter: function (e) { S.globalEval(e, t, n) } }) }, S.fn.extend({ wrapAll: function (e) { var t; return this[0] && (m(e) && (e = e.call(this[0])), t = S(e, this[0].ownerDocument).eq(0).clone(!0), this[0].parentNode && t.insertBefore(this[0]), t.map(function () { var e = this; while (e.firstElementChild) e = e.firstElementChild; return e }).append(this)), this }, wrapInner: function (n) { return m(n) ? this.each(function (e) { S(this).wrapInner(n.call(this, e)) }) : this.each(function () { var e = S(this), t = e.contents(); t.length ? t.wrapAll(n) : e.append(n) }) }, wrap: function (t) { var n = m(t); return this.each(function (e) { S(this).wrapAll(n ? t.call(this, e) : t) }) }, unwrap: function (e) { return this.parent(e).not("body").each(function () { S(this).replaceWith(this.childNodes) }), this } }), S.expr.pseudos.hidden = function (e) { return !S.expr.pseudos.visible(e) }, S.expr.pseudos.visible = function (e) { return !!(e.offsetWidth || e.offsetHeight || e.getClientRects().length) }, S.ajaxSettings.xhr = function () { try { return new C.XMLHttpRequest } catch (e) { } }; var Bt = { 0: 200, 1223: 204 }, $t = S.ajaxSettings.xhr(); y.cors = !!$t && "withCredentials" in $t, y.ajax = $t = !!$t, S.ajaxTransport(function (i) { var o, a; if (y.cors || $t && !i.crossDomain) return { send: function (e, t) { var n, r = i.xhr(); if (r.open(i.type, i.url, i.async, i.username, i.password), i.xhrFields) for (n in i.xhrFields) r[n] = i.xhrFields[n]; for (n in i.mimeType && r.overrideMimeType && r.overrideMimeType(i.mimeType), i.crossDomain || e["X-Requested-With"] || (e["X-Requested-With"] = "XMLHttpRequest"), e) r.setRequestHeader(n, e[n]); o = function (e) { return function () { o && (o = a = r.onload = r.onerror = r.onabort = r.ontimeout = r.onreadystatechange = null, "abort" === e ? r.abort() : "error" === e ? "number" != typeof r.status ? t(0, "error") : t(r.status, r.statusText) : t(Bt[r.status] || r.status, r.statusText, "text" !== (r.responseType || "text") || "string" != typeof r.responseText ? { binary: r.response } : { text: r.responseText }, r.getAllResponseHeaders())) } }, r.onload = o(), a = r.onerror = r.ontimeout = o("error"), void 0 !== r.onabort ? r.onabort = a : r.onreadystatechange = function () { 4 === r.readyState && C.setTimeout(function () { o && a() }) }, o = o("abort"); try { r.send(i.hasContent && i.data || null) } catch (e) { if (o) throw e } }, abort: function () { o && o() } } }), S.ajaxPrefilter(function (e) { e.crossDomain && (e.contents.script = !1) }), S.ajaxSetup({ accepts: { script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" }, contents: { script: /\b(?:java|ecma)script\b/ }, converters: { "text script": function (e) { return S.globalEval(e), e } } }), S.ajaxPrefilter("script", function (e) { void 0 === e.cache && (e.cache = !1), e.crossDomain && (e.type = "GET") }), S.ajaxTransport("script", function (n) { var r, i; if (n.crossDomain || n.scriptAttrs) return { send: function (e, t) { r = S("<script>").attr(n.scriptAttrs || {}).prop({ charset: n.scriptCharset, src: n.url }).on("load error", i = function (e) { r.remove(), i = null, e && t("error" === e.type ? 404 : 200, e.type) }), E.head.appendChild(r[0]) }, abort: function () { i && i() } } }); var _t, zt = [], Ut = /(=)\?(?=&|$)|\?\?/; S.ajaxSetup({ jsonp: "callback", jsonpCallback: function () { var e = zt.pop() || S.expando + "_" + wt.guid++; return this[e] = !0, e } }), S.ajaxPrefilter("json jsonp", function (e, t, n) { var r, i, o, a = !1 !== e.jsonp && (Ut.test(e.url) ? "url" : "string" == typeof e.data && 0 === (e.contentType || "").indexOf("application/x-www-form-urlencoded") && Ut.test(e.data) && "data"); if (a || "jsonp" === e.dataTypes[0]) return r = e.jsonpCallback = m(e.jsonpCallback) ? e.jsonpCallback() : e.jsonpCallback, a ? e[a] = e[a].replace(Ut, "$1" + r) : !1 !== e.jsonp && (e.url += (Tt.test(e.url) ? "&" : "?") + e.jsonp + "=" + r), e.converters["script json"] = function () { return o || S.error(r + " was not called"), o[0] }, e.dataTypes[0] = "json", i = C[r], C[r] = function () { o = arguments }, n.always(function () { void 0 === i ? S(C).removeProp(r) : C[r] = i, e[r] && (e.jsonpCallback = t.jsonpCallback, zt.push(r)), o && m(i) && i(o[0]), o = i = void 0 }), "script" }), y.createHTMLDocument = ((_t = E.implementation.createHTMLDocument("").body).innerHTML = "<form></form><form></form>", 2 === _t.childNodes.length), S.parseHTML = function (e, t, n) { return "string" != typeof e ? [] : ("boolean" == typeof t && (n = t, t = !1), t || (y.createHTMLDocument ? ((r = (t = E.implementation.createHTMLDocument("")).createElement("base")).href = E.location.href, t.head.appendChild(r)) : t = E), o = !n && [], (i = N.exec(e)) ? [t.createElement(i[1])] : (i = xe([e], t, o), o && o.length && S(o).remove(), S.merge([], i.childNodes))); var r, i, o }, S.fn.load = function (e, t, n) { var r, i, o, a = this, s = e.indexOf(" "); return -1 < s && (r = ht(e.slice(s)), e = e.slice(0, s)), m(t) ? (n = t, t = void 0) : t && "object" == typeof t && (i = "POST"), 0 < a.length && S.ajax({ url: e, type: i || "GET", dataType: "html", data: t }).done(function (e) { o = arguments, a.html(r ? S("<div>").append(S.parseHTML(e)).find(r) : e) }).always(n && function (e, t) { a.each(function () { n.apply(this, o || [e.responseText, t, e]) }) }), this }, S.expr.pseudos.animated = function (t) { return S.grep(S.timers, function (e) { return t === e.elem }).length }, S.offset = { setOffset: function (e, t, n) { var r, i, o, a, s, u, l = S.css(e, "position"), c = S(e), f = {}; "static" === l && (e.style.position = "relative"), s = c.offset(), o = S.css(e, "top"), u = S.css(e, "left"), ("absolute" === l || "fixed" === l) && -1 < (o + u).indexOf("auto") ? (a = (r = c.position()).top, i = r.left) : (a = parseFloat(o) || 0, i = parseFloat(u) || 0), m(t) && (t = t.call(e, n, S.extend({}, s))), null != t.top && (f.top = t.top - s.top + a), null != t.left && (f.left = t.left - s.left + i), "using" in t ? t.using.call(e, f) : c.css(f) } }, S.fn.extend({ offset: function (t) { if (arguments.length) return void 0 === t ? this : this.each(function (e) { S.offset.setOffset(this, t, e) }); var e, n, r = this[0]; return r ? r.getClientRects().length ? (e = r.getBoundingClientRect(), n = r.ownerDocument.defaultView, { top: e.top + n.pageYOffset, left: e.left + n.pageXOffset }) : { top: 0, left: 0 } : void 0 }, position: function () { if (this[0]) { var e, t, n, r = this[0], i = { top: 0, left: 0 }; if ("fixed" === S.css(r, "position")) t = r.getBoundingClientRect(); else { t = this.offset(), n = r.ownerDocument, e = r.offsetParent || n.documentElement; while (e && (e === n.body || e === n.documentElement) && "static" === S.css(e, "position")) e = e.parentNode; e && e !== r && 1 === e.nodeType && ((i = S(e).offset()).top += S.css(e, "borderTopWidth", !0), i.left += S.css(e, "borderLeftWidth", !0)) } return { top: t.top - i.top - S.css(r, "marginTop", !0), left: t.left - i.left - S.css(r, "marginLeft", !0) } } }, offsetParent: function () { return this.map(function () { var e = this.offsetParent; while (e && "static" === S.css(e, "position")) e = e.offsetParent; return e || re }) } }), S.each({ scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function (t, i) { var o = "pageYOffset" === i; S.fn[t] = function (e) { return $(this, function (e, t, n) { var r; if (x(e) ? r = e : 9 === e.nodeType && (r = e.defaultView), void 0 === n) return r ? r[i] : e[t]; r ? r.scrollTo(o ? r.pageXOffset : n, o ? n : r.pageYOffset) : e[t] = n }, t, e, arguments.length) } }), S.each(["top", "left"], function (e, n) { S.cssHooks[n] = Fe(y.pixelPosition, function (e, t) { if (t) return t = We(e, n), Pe.test(t) ? S(e).position()[n] + "px" : t }) }), S.each({ Height: "height", Width: "width" }, function (a, s) { S.each({ padding: "inner" + a, content: s, "": "outer" + a }, function (r, o) { S.fn[o] = function (e, t) { var n = arguments.length && (r || "boolean" != typeof e), i = r || (!0 === e || !0 === t ? "margin" : "border"); return $(this, function (e, t, n) { var r; return x(e) ? 0 === o.indexOf("outer") ? e["inner" + a] : e.document.documentElement["client" + a] : 9 === e.nodeType ? (r = e.documentElement, Math.max(e.body["scroll" + a], r["scroll" + a], e.body["offset" + a], r["offset" + a], r["client" + a])) : void 0 === n ? S.css(e, t, i) : S.style(e, t, n, i) }, s, n ? e : void 0, n) } }) }), S.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function (e, t) { S.fn[t] = function (e) { return this.on(t, e) } }), S.fn.extend({ bind: function (e, t, n) { return this.on(e, null, t, n) }, unbind: function (e, t) { return this.off(e, null, t) }, delegate: function (e, t, n, r) { return this.on(t, e, n, r) }, undelegate: function (e, t, n) { return 1 === arguments.length ? this.off(e, "**") : this.off(t, e || "**", n) }, hover: function (e, t) { return this.mouseenter(e).mouseleave(t || e) } }), S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "), function (e, n) { S.fn[n] = function (e, t) { return 0 < arguments.length ? this.on(n, null, e, t) : this.trigger(n) } }); var Xt = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; S.proxy = function (e, t) { var n, r, i; if ("string" == typeof t && (n = e[t], t = e, e = n), m(e)) return r = s.call(arguments, 2), (i = function () { return e.apply(t || this, r.concat(s.call(arguments))) }).guid = e.guid = e.guid || S.guid++, i }, S.holdReady = function (e) { e ? S.readyWait++ : S.ready(!0) }, S.isArray = Array.isArray, S.parseJSON = JSON.parse, S.nodeName = A, S.isFunction = m, S.isWindow = x, S.camelCase = X, S.type = w, S.now = Date.now, S.isNumeric = function (e) { var t = S.type(e); return ("number" === t || "string" === t) && !isNaN(e - parseFloat(e)) }, S.trim = function (e) { return null == e ? "" : (e + "").replace(Xt, "") }, "function" == typeof define && define.amd && define("jquery", [], function () { return S }); var Vt = C.jQuery, Gt = C.$; return S.noConflict = function (e) { return C.$ === S && (C.$ = Gt), e && C.jQuery === S && (C.jQuery = Vt), S }, "undefined" == typeof e && (C.jQuery = C.$ = S), S });
jQuery.event.special.touchstart = {
setup: function (_, ns, handle) {
this.addEventListener("touchstart", handle, { passive: true });
}
};
/**
* @module jQuery Migrate
* @author jQuery Foundation and other contributors
* @see https://code.jquery.com/jquery/
* @license MIT
* @version 3.3.2
*/
"undefined" == typeof jQuery.migrateMute && (jQuery.migrateMute = !0), function (t) { "use strict"; "function" == typeof define && define.amd ? define(["jquery"], function (e) { return t(e, window) }) : "object" == typeof module && module.exports ? module.exports = t(require("jquery"), window) : t(jQuery, window) }(function (s, n) { "use strict"; function e(e) { return 0 <= function (e, t) { for (var r = /^(\d+)\.(\d+)\.(\d+)/, n = r.exec(e) || [], o = r.exec(t) || [], i = 1; i <= 3; i++) { if (+o[i] < +n[i]) return 1; if (+n[i] < +o[i]) return -1 } return 0 }(s.fn.jquery, e) } s.migrateVersion = "3.3.2", n.console && n.console.log && (s && e("3.0.0") || n.console.log("JQMIGRATE: jQuery 3.0.0+ REQUIRED"), s.migrateWarnings && n.console.log("JQMIGRATE: Migrate plugin loaded multiple times"), n.console.log("JQMIGRATE: Migrate is installed" + (s.migrateMute ? "" : " with logging active") + ", version " + s.migrateVersion)); var r = {}; function u(e) { var t = n.console; s.migrateDeduplicateWarnings && r[e] || (r[e] = !0, s.migrateWarnings.push(e), t && t.warn && !s.migrateMute && (t.warn("JQMIGRATE: " + e), s.migrateTrace && t.trace && t.trace())) } function t(e, t, r, n) { Object.defineProperty(e, t, { configurable: !0, enumerable: !0, get: function () { return u(n), r }, set: function (e) { u(n), r = e } }) } function o(e, t, r, n) { e[t] = function () { return u(n), r.apply(this, arguments) } } s.migrateDeduplicateWarnings = !0, s.migrateWarnings = [], void 0 === s.migrateTrace && (s.migrateTrace = !0), s.migrateReset = function () { r = {}, s.migrateWarnings.length = 0 }, "BackCompat" === n.document.compatMode && u("jQuery is not compatible with Quirks Mode"); var i, a, c, d = {}, l = s.fn.init, p = s.find, f = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/, y = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g, m = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; for (i in s.fn.init = function (e) { var t = Array.prototype.slice.call(arguments); return "string" == typeof e && "#" === e && (u("jQuery( '#' ) is not a valid selector"), t[0] = []), l.apply(this, t) }, s.fn.init.prototype = s.fn, s.find = function (t) { var r = Array.prototype.slice.call(arguments); if ("string" == typeof t && f.test(t)) try { n.document.querySelector(t) } catch (e) { t = t.replace(y, function (e, t, r, n) { return "[" + t + r + '"' + n + '"]' }); try { n.document.querySelector(t), u("Attribute selector with '#' must be quoted: " + r[0]), r[0] = t } catch (e) { u("Attribute selector with '#' was not fixed: " + r[0]) } } return p.apply(this, r) }, p) Object.prototype.hasOwnProperty.call(p, i) && (s.find[i] = p[i]); o(s.fn, "size", function () { return this.length }, "jQuery.fn.size() is deprecated and removed; use the .length property"), o(s, "parseJSON", function () { return JSON.parse.apply(null, arguments) }, "jQuery.parseJSON is deprecated; use JSON.parse"), o(s, "holdReady", s.holdReady, "jQuery.holdReady is deprecated"), o(s, "unique", s.uniqueSort, "jQuery.unique is deprecated; use jQuery.uniqueSort"), t(s.expr, "filters", s.expr.pseudos, "jQuery.expr.filters is deprecated; use jQuery.expr.pseudos"), t(s.expr, ":", s.expr.pseudos, "jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos"), e("3.1.1") && o(s, "trim", function (e) { return null == e ? "" : (e + "").replace(m, "") }, "jQuery.trim is deprecated; use String.prototype.trim"), e("3.2.0") && (o(s, "nodeName", function (e, t) { return e.nodeName && e.nodeName.toLowerCase() === t.toLowerCase() }, "jQuery.nodeName is deprecated"), o(s, "isArray", Array.isArray, "jQuery.isArray is deprecated; use Array.isArray")), e("3.3.0") && (o(s, "isNumeric", function (e) { var t = typeof e; return ("number" == t || "string" == t) && !isNaN(e - parseFloat(e)) }, "jQuery.isNumeric() is deprecated"), s.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), function (e, t) { d["[object " + t + "]"] = t.toLowerCase() }), o(s, "type", function (e) { return null == e ? e + "" : "object" == typeof e || "function" == typeof e ? d[Object.prototype.toString.call(e)] || "object" : typeof e }, "jQuery.type is deprecated"), o(s, "isFunction", function (e) { return "function" == typeof e }, "jQuery.isFunction() is deprecated"), o(s, "isWindow", function (e) { return null != e && e === e.window }, "jQuery.isWindow() is deprecated")), s.ajax && (a = s.ajax, c = /(=)\?(?=&|$)|\?\?/, s.ajax = function () { var e = a.apply(this, arguments); return e.promise && (o(e, "success", e.done, "jQXHR.success is deprecated and removed"), o(e, "error", e.fail, "jQXHR.error is deprecated and removed"), o(e, "complete", e.always, "jQXHR.complete is deprecated and removed")), e }, e("4.0.0") || s.ajaxPrefilter("+json", function (e) { !1 !== e.jsonp && (c.test(e.url) || "string" == typeof e.data && 0 === (e.contentType || "").indexOf("application/x-www-form-urlencoded") && c.test(e.data)) && u("JSON-to-JSONP auto-promotion is deprecated") })); var g = s.fn.removeAttr, h = s.fn.toggleClass, v = /\S+/g; function j(e) { return e.replace(/-([a-z])/g, function (e, t) { return t.toUpperCase() }) } s.fn.removeAttr = function (e) { var r = this; return s.each(e.match(v), function (e, t) { s.expr.match.bool.test(t) && (u("jQuery.fn.removeAttr no longer sets boolean properties: " + t), r.prop(t, !1)) }), g.apply(this, arguments) }; var Q, b = !(s.fn.toggleClass = function (t) { return void 0 !== t && "boolean" != typeof t ? h.apply(this, arguments) : (u("jQuery.fn.toggleClass( boolean ) is deprecated"), this.each(function () { var e = this.getAttribute && this.getAttribute("class") || ""; e && s.data(this, "__className__", e), this.setAttribute && this.setAttribute("class", !e && !1 !== t && s.data(this, "__className__") || "") })) }), w = /^[a-z]/, x = /^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/; s.swap && s.each(["height", "width", "reliableMarginRight"], function (e, t) { var r = s.cssHooks[t] && s.cssHooks[t].get; r && (s.cssHooks[t].get = function () { var e; return b = !0, e = r.apply(this, arguments), b = !1, e }) }), s.swap = function (e, t, r, n) { var o, i, a = {}; for (i in b || u("jQuery.swap() is undocumented and deprecated"), t) a[i] = e.style[i], e.style[i] = t[i]; for (i in o = r.apply(e, n || []), t) e.style[i] = a[i]; return o }, e("3.4.0") && "undefined" != typeof Proxy && (s.cssProps = new Proxy(s.cssProps || {}, { set: function () { return u("JQMIGRATE: jQuery.cssProps is deprecated"), Reflect.set.apply(this, arguments) } })), s.cssNumber || (s.cssNumber = {}), Q = s.fn.css, s.fn.css = function (e, t) { var r, n, o = this; return e && "object" == typeof e && !Array.isArray(e) ? (s.each(e, function (e, t) { s.fn.css.call(o, e, t) }), this) : ("number" == typeof t && (r = j(e), n = r, w.test(n) && x.test(n[0].toUpperCase() + n.slice(1)) || s.cssNumber[r] || u('Number-typed values are deprecated for jQuery.fn.css( "' + e + '", value )')), Q.apply(this, arguments)) }; var A, k, S, M, N = s.data; s.data = function (e, t, r) { var n, o, i; if (t && "object" == typeof t && 2 === arguments.length) { for (i in n = s.hasData(e) && N.call(this, e), o = {}, t) i !== j(i) ? (u("jQuery.data() always sets/gets camelCased names: " + i), n[i] = t[i]) : o[i] = t[i]; return N.call(this, e, o), t } return t && "string" == typeof t && t !== j(t) && (n = s.hasData(e) && N.call(this, e)) && t in n ? (u("jQuery.data() always sets/gets camelCased names: " + t), 2 < arguments.length && (n[t] = r), n[t]) : N.apply(this, arguments) }, s.fx && (S = s.Tween.prototype.run, M = function (e) { return e }, s.Tween.prototype.run = function () { 1 < s.easing[this.easing].length && (u("'jQuery.easing." + this.easing.toString() + "' should use only one argument"), s.easing[this.easing] = M), S.apply(this, arguments) }, A = s.fx.interval || 13, k = "jQuery.fx.interval is deprecated", n.requestAnimationFrame && Object.defineProperty(s.fx, "interval", { configurable: !0, enumerable: !0, get: function () { return n.document.hidden || u(k), A }, set: function (e) { u(k), A = e } })); var R = s.fn.load, H = s.event.add, C = s.event.fix; s.event.props = [], s.event.fixHooks = {}, t(s.event.props, "concat", s.event.props.concat, "jQuery.event.props.concat() is deprecated and removed"), s.event.fix = function (e) { var t, r = e.type, n = this.fixHooks[r], o = s.event.props; if (o.length) { u("jQuery.event.props are deprecated and removed: " + o.join()); while (o.length) s.event.addProp(o.pop()) } if (n && !n._migrated_ && (n._migrated_ = !0, u("jQuery.event.fixHooks are deprecated and removed: " + r), (o = n.props) && o.length)) while (o.length) s.event.addProp(o.pop()); return t = C.call(this, e), n && n.filter ? n.filter(t, e) : t }, s.event.add = function (e, t) { return e === n && "load" === t && "complete" === n.document.readyState && u("jQuery(window).on('load'...) called after load event occurred"), H.apply(this, arguments) }, s.each(["load", "unload", "error"], function (e, t) { s.fn[t] = function () { var e = Array.prototype.slice.call(arguments, 0); return "load" === t && "string" == typeof e[0] ? R.apply(this, e) : (u("jQuery.fn." + t + "() is deprecated"), e.splice(0, 0, t), arguments.length ? this.on.apply(this, e) : (this.triggerHandler.apply(this, e), this)) } }), s.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "), function (e, r) { s.fn[r] = function (e, t) { return u("jQuery.fn." + r + "() event shorthand is deprecated"), 0 < arguments.length ? this.on(r, null, e, t) : this.trigger(r) } }), s(function () { s(n.document).triggerHandler("ready") }), s.event.special.ready = { setup: function () { this === n.document && u("'ready' event is deprecated") } }, s.fn.extend({ bind: function (e, t, r) { return u("jQuery.fn.bind() is deprecated"), this.on(e, null, t, r) }, unbind: function (e, t) { return u("jQuery.fn.unbind() is deprecated"), this.off(e, null, t) }, delegate: function (e, t, r, n) { return u("jQuery.fn.delegate() is deprecated"), this.on(t, e, r, n) }, undelegate: function (e, t, r) { return u("jQuery.fn.undelegate() is deprecated"), 1 === arguments.length ? this.off(e, "**") : this.off(t, e || "**", r) }, hover: function (e, t) { return u("jQuery.fn.hover() is deprecated"), this.on("mouseenter", e).on("mouseleave", t || e) } }); function T(e) { var t = n.document.implementation.createHTMLDocument(""); return t.body.innerHTML = e, t.body && t.body.innerHTML } function P(e) { var t = e.replace(O, "<$1></$2>"); t !== e && T(e) !== T(t) && u("HTML tags must be properly nested and closed: " + e) } var O = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi, q = s.htmlPrefilter; s.UNSAFE_restoreLegacyHtmlPrefilter = function () { s.htmlPrefilter = function (e) { return P(e), e.replace(O, "<$1></$2>") } }, s.htmlPrefilter = function (e) { return P(e), q(e) }; var D, _ = s.fn.offset; s.fn.offset = function () { var e = this[0]; return !e || e.nodeType && e.getBoundingClientRect ? _.apply(this, arguments) : (u("jQuery.fn.offset() requires a valid DOM element"), arguments.length ? this : void 0) }, s.ajax && (D = s.param, s.param = function (e, t) { var r = s.ajaxSettings && s.ajaxSettings.traditional; return void 0 === t && r && (u("jQuery.param() no longer uses jQuery.ajaxSettings.traditional"), t = r), D.call(this, e, t) }); var E, F, J = s.fn.andSelf || s.fn.addBack; return s.fn.andSelf = function () { return u("jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"), J.apply(this, arguments) }, s.Deferred && (E = s.Deferred, F = [["resolve", "done", s.Callbacks("once memory"), s.Callbacks("once memory"), "resolved"], ["reject", "fail", s.Callbacks("once memory"), s.Callbacks("once memory"), "rejected"], ["notify", "progress", s.Callbacks("memory"), s.Callbacks("memory")]], s.Deferred = function (e) { var i = E(), a = i.promise(); return i.pipe = a.pipe = function () { var o = arguments; return u("deferred.pipe() is deprecated"), s.Deferred(function (n) { s.each(F, function (e, t) { var r = "function" == typeof o[e] && o[e]; i[t[1]](function () { var e = r && r.apply(this, arguments); e && "function" == typeof e.promise ? e.promise().done(n.resolve).fail(n.reject).progress(n.notify) : n[t[0] + "With"](this === a ? n.promise() : this, r ? [e] : arguments) }) }), o = null }).promise() }, e && e.call(i, i), i }, s.Deferred.exceptionHook = E.exceptionHook), s });
/**
* @module jQuery Cookie Plugin
* @see https://github.com/carhartl/jquery-cookie
* @license MIT
*/
!function (e) { "function" == typeof define && define.amd ? define(["jquery"], e) : "object" == typeof exports ? module.exports = e(require("jquery")) : e(jQuery) }(function (e) { function n(e) { return u.raw ? e : encodeURIComponent(e) } function o(e) { return u.raw ? e : decodeURIComponent(e) } function i(e) { return n(u.json ? JSON.stringify(e) : String(e)) } function t(e) { 0 === e.indexOf('"') && (e = e.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, "\\")); try { return e = decodeURIComponent(e.replace(c, " ")), u.json ? JSON.parse(e) : e } catch (e) { } } function r(n, o) { var i = u.raw ? n : t(n); return e.isFunction(o) ? o(i) : i } var c = /\+/g, u = e.cookie = function (t, c, s) { if (arguments.length > 1 && !e.isFunction(c)) { if ("number" == typeof (s = e.extend({}, u.defaults, s)).expires) { var d = s.expires, f = s.expires = new Date; f.setMilliseconds(f.getMilliseconds() + 864e5 * d) } return document.cookie = [n(t), "=", i(c), s.expires ? "; expires=" + s.expires.toUTCString() : "", s.path ? "; path=" + s.path : "", s.domain ? "; domain=" + s.domain : "", s.secure ? "; secure" : ""].join("") } for (var a = t ? void 0 : {}, p = document.cookie ? document.cookie.split("; ") : [], l = 0, m = p.length; l < m; l++) { var x = p[l].split("="), g = o(x.shift()), j = x.join("="); if (t === g) { a = r(j, c); break } t || void 0 === (j = r(j)) || (a[g] = j) } return a }; u.defaults = {}, e.removeCookie = function (n, o) { return e.cookie(n, "", e.extend({}, o, { expires: -1 })), !e.cookie(n) } });
/**
* @module Device.js
* @see https://github.com/matthewhudson/device.js
* @license MIT
*/
(function () { var n, e, o, t, i, r, d, a, c, l; e = window.device, n = {}, window.device = n, t = window.document.documentElement, l = window.navigator.userAgent.toLowerCase(), n.ios = function () { return n.iphone() || n.ipod() || n.ipad() }, n.iphone = function () { return !n.windows() && i("iphone") }, n.ipod = function () { return i("ipod") }, n.ipad = function () { return i("ipad") }, n.android = function () { return !n.windows() && i("android") }, n.androidPhone = function () { return n.android() && i("mobile") }, n.androidTablet = function () { return n.android() && !i("mobile") }, n.blackberry = function () { return i("blackberry") || i("bb10") || i("rim") }, n.blackberryPhone = function () { return n.blackberry() && !i("tablet") }, n.blackberryTablet = function () { return n.blackberry() && i("tablet") }, n.windows = function () { return i("windows") }, n.windowsPhone = function () { return n.windows() && i("phone") }, n.windowsTablet = function () { return n.windows() && i("touch") && !n.windowsPhone() }, n.fxos = function () { return (i("(mobile;") || i("(tablet;")) && i("; rv:") }, n.fxosPhone = function () { return n.fxos() && i("mobile") }, n.fxosTablet = function () { return n.fxos() && i("tablet") }, n.meego = function () { return i("meego") }, n.cordova = function () { return window.cordova && "file:" === location.protocol }, n.nodeWebkit = function () { return "object" == typeof window.process }, n.mobile = function () { return n.androidPhone() || n.iphone() || n.ipod() || n.windowsPhone() || n.blackberryPhone() || n.fxosPhone() || n.meego() }, n.tablet = function () { return n.ipad() || n.androidTablet() || n.blackberryTablet() || n.windowsTablet() || n.fxosTablet() }, n.desktop = function () { return !n.tablet() && !n.mobile() }, n.television = function () { var n, e = ["googletv", "viera", "smarttv", "internet.tv", "netcast", "nettv", "appletv", "boxee", "kylo", "roku", "dlnadoc", "roku", "pov_tv", "hbbtv", "ce-html"]; for (n = 0; n < e.length;) { if (i(e[n])) return !0; n++ } return !1 }, n.portrait = function () { return window.innerHeight / window.innerWidth > 1 }, n.landscape = function () { return window.innerHeight / window.innerWidth < 1 }, n.noConflict = function () { return window.device = e, this }, i = function (n) { return -1 !== l.indexOf(n) }, d = function (n) { var e; return e = new RegExp(n, "i"), t.className.match(e) }, o = function (n) { var e = null; d(n) || (e = t.className.replace(/^\s+|\s+$/g, ""), t.className = e + " " + n) }, c = function (n) { d(n) && (t.className = t.className.replace(" " + n, "")) }, n.ios() ? n.ipad() ? o("ios ipad tablet") : n.iphone() ? o("ios iphone mobile") : n.ipod() && o("ios ipod mobile") : n.android() ? o(n.androidTablet() ? "android tablet" : "android mobile") : n.blackberry() ? o(n.blackberryTablet() ? "blackberry tablet" : "blackberry mobile") : n.windows() ? o(n.windowsTablet() ? "windows tablet" : n.windowsPhone() ? "windows mobile" : "desktop") : n.fxos() ? o(n.fxosTablet() ? "fxos tablet" : "fxos mobile") : n.meego() ? o("meego mobile") : n.nodeWebkit() ? o("node-webkit") : n.television() ? o("television") : n.desktop() && o("desktop"), n.cordova() && o("cordova"), r = function () { n.landscape() ? (c("portrait"), o("landscape")) : (c("landscape"), o("portrait")) }, a = Object.prototype.hasOwnProperty.call(window, "onorientationchange") ? "orientationchange" : "resize", window.addEventListener ? window.addEventListener(a, r, !1) : window.attachEvent ? window.attachEvent(a, r) : window[a] = r, r(), "function" == typeof define && "object" == typeof define.amd && define.amd ? define(function () { return n }) : "undefined" != typeof module && module.exports ? module.exports = n : window.device = n }).call(this);
/**
* @module jQuery resize event
* @see http://benalman.com/projects/jquery-resize-plugin/
* @license MIT
*/
(function ($, h, c) { var a = $([]), e = $.resize = $.extend($.resize, {}), i, k = "setTimeout", j = "resize", d = j + "-special-event", b = "delay", f = "throttleWindow"; e[b] = 250; e[f] = true; $.event.special[j] = { setup: function () { if (!e[f] && this[k]) { return false } var l = $(this); a = a.add(l); $.data(this, d, { w: l.width(), h: l.height() }); if (a.length === 1) { g() } }, teardown: function () { if (!e[f] && this[k]) { return false } var l = $(this); a = a.not(l); l.removeData(d); if (!a.length) { clearTimeout(i) } }, add: function (l) { if (!e[f] && this[k]) { return false } var n; function m(s, o, p) { var q = $(this), r = $.data(this, d); r.w = o !== c ? o : q.width(); r.h = p !== c ? p : q.height(); n.apply(this, arguments) } if ($.isFunction(l)) { n = l; return m } else { n = l.handler; l.handler = m } } }; function g() { i = h[k](function () { a.each(function () { var n = $(this), m = n.width(), l = n.height(), o = $.data(this, d); if (m !== o.w || l !== o.h) { n.trigger(j, [o.w = m, o.h = l]) } }); g() }, e[b]) } })(jQuery, this);
/**
* @module jQuery easing
* @author George McGinley Smith
* @see http://gsgd.co.uk/sandbox/jquery/easing/
* @license BSD
* @version 1.4.0
*/
!function (n) { "function" == typeof define && define.amd ? define(["jquery"], function (e) { return n(e) }) : "object" == typeof module && "object" == typeof module.exports ? exports = n(require("jquery")) : n(jQuery) }(function (n) { function e(n) { var e = 7.5625, t = 2.75; return n < 1 / t ? e * n * n : n < 2 / t ? e * (n -= 1.5 / t) * n + .75 : n < 2.5 / t ? e * (n -= 2.25 / t) * n + .9375 : e * (n -= 2.625 / t) * n + .984375 } n.easing.jswing = n.easing.swing; var t = Math.pow, u = Math.sqrt, r = Math.sin, i = Math.cos, a = Math.PI, c = 1.70158, o = 1.525 * c, s = 2 * a / 3, f = 2 * a / 4.5; n.extend(n.easing, { def: "easeOutQuad", swing: function (e) { return n.easing[n.easing.def](e) }, easeInQuad: function (n) { return n * n }, easeOutQuad: function (n) { return 1 - (1 - n) * (1 - n) }, easeInOutQuad: function (n) { return n < .5 ? 2 * n * n : 1 - t(-2 * n + 2, 2) / 2 }, easeInCubic: function (n) { return n * n * n }, easeOutCubic: function (n) { return 1 - t(1 - n, 3) }, easeInOutCubic: function (n) { return n < .5 ? 4 * n * n * n : 1 - t(-2 * n + 2, 3) / 2 }, easeInQuart: function (n) { return n * n * n * n }, easeOutQuart: function (n) { return 1 - t(1 - n, 4) }, easeInOutQuart: function (n) { return n < .5 ? 8 * n * n * n * n : 1 - t(-2 * n + 2, 4) / 2 }, easeInQuint: function (n) { return n * n * n * n * n }, easeOutQuint: function (n) { return 1 - t(1 - n, 5) }, easeInOutQuint: function (n) { return n < .5 ? 16 * n * n * n * n * n : 1 - t(-2 * n + 2, 5) / 2 }, easeInSine: function (n) { return 1 - i(n * a / 2) }, easeOutSine: function (n) { return r(n * a / 2) }, easeInOutSine: function (n) { return -(i(a * n) - 1) / 2 }, easeInExpo: function (n) { return 0 === n ? 0 : t(2, 10 * n - 10) }, easeOutExpo: function (n) { return 1 === n ? 1 : 1 - t(2, -10 * n) }, easeInOutExpo: function (n) { return 0 === n ? 0 : 1 === n ? 1 : n < .5 ? t(2, 20 * n - 10) / 2 : (2 - t(2, -20 * n + 10)) / 2 }, easeInCirc: function (n) { return 1 - u(1 - t(n, 2)) }, easeOutCirc: function (n) { return u(1 - t(n - 1, 2)) }, easeInOutCirc: function (n) { return n < .5 ? (1 - u(1 - t(2 * n, 2))) / 2 : (u(1 - t(-2 * n + 2, 2)) + 1) / 2 }, easeInElastic: function (n) { return 0 === n ? 0 : 1 === n ? 1 : -t(2, 10 * n - 10) * r((10 * n - 10.75) * s) }, easeOutElastic: function (n) { return 0 === n ? 0 : 1 === n ? 1 : t(2, -10 * n) * r((10 * n - .75) * s) + 1 }, easeInOutElastic: function (n) { return 0 === n ? 0 : 1 === n ? 1 : n < .5 ? -t(2, 20 * n - 10) * r((20 * n - 11.125) * f) / 2 : t(2, -20 * n + 10) * r((20 * n - 11.125) * f) / 2 + 1 }, easeInBack: function (n) { return 2.70158 * n * n * n - c * n * n }, easeOutBack: function (n) { return 1 + 2.70158 * t(n - 1, 3) + c * t(n - 1, 2) }, easeInOutBack: function (n) { return n < .5 ? t(2 * n, 2) * (7.189819 * n - o) / 2 : (t(2 * n - 2, 2) * ((o + 1) * (2 * n - 2) + o) + 2) / 2 }, easeInBounce: function (n) { return 1 - e(1 - n) }, easeOutBounce: e, easeInOutBounce: function (n) { return n < .5 ? (1 - e(1 - 2 * n)) / 2 : (1 + e(2 * n - 1)) / 2 } }) });
/**
* @module TouchSwipe
* @see https://github.com/mattbryson/TouchSwipe-Jquery-Plugin
* @license MIT
* @version 1.6.18
*/
!function (e) { "function" == typeof define && define.amd && define.amd.jQuery ? define(["jquery"], e) : e("undefined" != typeof module && module.exports ? require("jquery") : jQuery) }(function (e) { "use strict"; function n(n) { return !n || void 0 !== n.allowPageScroll || void 0 === n.swipe && void 0 === n.swipeStatus || (n.allowPageScroll = c), void 0 !== n.click && void 0 === n.tap && (n.tap = n.click), n || (n = {}), n = e.extend({}, e.fn.swipe.defaults, n), this.each(function () { var r = e(this), i = r.data(D); i || (i = new t(this, n), r.data(D, i)) }) } function t(n, t) { function P(n) { if (!(ce() || e(n.target).closest(t.excludedElements, Ve).length > 0)) { var r = n.originalEvent ? n.originalEvent : n; if (!r.pointerType || "mouse" != r.pointerType || 0 != t.fallbackToMouseEvents) { var i, l = r.touches, o = l ? l[0] : r; return We = y, l ? ze = l.length : !1 !== t.preventDefaultEvents && n.preventDefault(), je = 0, Ne = null, He = null, Xe = null, _e = 0, qe = 0, Qe = 0, Ce = 1, Fe = 0, Ye = we(), ue(), pe(0, o), !l || ze === t.fingers || t.fingers === T || X() ? (Ze = Oe(), 2 == ze && (pe(1, l[1]), qe = Qe = be(Ge[0].start, Ge[1].start)), (t.swipeStatus || t.pinchStatus) && (i = j(r, We))) : i = !1, !1 === i ? (We = x, j(r, We), i) : (t.hold && (nn = setTimeout(e.proxy(function () { Ve.trigger("hold", [r.target]), t.hold && (i = t.hold.call(Ve, r, r.target)) }, this), t.longTapThreshold)), se(!0), null) } } } function L(e) { var n = e.originalEvent ? e.originalEvent : e; if (We !== m && We !== x && !ae()) { var r, i = n.touches, l = fe(i ? i[0] : n); if (Be = Oe(), i && (ze = i.length), t.hold && clearTimeout(nn), We = E, 2 == ze && (0 == qe ? (pe(1, i[1]), qe = Qe = be(Ge[0].start, Ge[1].start)) : (fe(i[1]), Qe = be(Ge[0].end, Ge[1].end), Xe = Ee(Ge[0].end, Ge[1].end)), Ce = ye(qe, Qe), Fe = Math.abs(qe - Qe)), ze === t.fingers || t.fingers === T || !i || X()) { if (Ne = Se(l.start, l.end), He = Se(l.last, l.end), C(e, He), je = me(l.start, l.end), _e = Te(), de(Ne, je), r = j(n, We), !t.triggerOnTouchEnd || t.triggerOnTouchLeave) { var o = !0; if (t.triggerOnTouchLeave) { var u = Me(this); o = De(l.end, u) } !t.triggerOnTouchEnd && o ? We = U(E) : t.triggerOnTouchLeave && !o && (We = U(m)), We != x && We != m || j(n, We) } } else We = x, j(n, We); !1 === r && (We = x, j(n, We)) } } function R(e) { var n = e.originalEvent ? e.originalEvent : e, r = n.touches; if (r) { if (r.length && !ae()) return oe(n), !0; if (r.length && ae()) return !0 } return ae() && (ze = Ke), Be = Oe(), _e = Te(), _() || !H() ? (We = x, j(n, We)) : t.triggerOnTouchEnd || !1 === t.triggerOnTouchEnd && We === E ? (!1 !== t.preventDefaultEvents && !1 !== e.cancelable && e.preventDefault(), We = m, j(n, We)) : !t.triggerOnTouchEnd && B() ? (We = m, N(n, We, h)) : We === E && (We = x, j(n, We)), se(!1), null } function k() { ze = 0, Be = 0, Ze = 0, qe = 0, Qe = 0, Ce = 1, ue(), se(!1) } function A(e) { var n = e.originalEvent ? e.originalEvent : e; t.triggerOnTouchLeave && (We = U(m), j(n, We)) } function I() { Ve.unbind(Re, P), Ve.unbind(Ue, k), Ve.unbind(ke, L), Ve.unbind(Ae, R), Ie && Ve.unbind(Ie, A), se(!1) } function U(e) { var n = e, r = Q(), i = H(), l = _(); return !r || l ? n = x : !i || e != E || t.triggerOnTouchEnd && !t.triggerOnTouchLeave ? !i && e == m && t.triggerOnTouchLeave && (n = x) : n = m, n } function j(e, n) { var t, r = e.touches; return (z() || W()) && (t = N(e, n, p)), (Y() || X()) && !1 !== t && (t = N(e, n, f)), ie() && !1 !== t ? t = N(e, n, d) : le() && !1 !== t ? t = N(e, n, g) : re() && !1 !== t && (t = N(e, n, h)), n === x && k(e), n === m && (r ? r.length || k(e) : k(e)), t } function N(n, c, s) { var w; if (s == p) { if (Ve.trigger("swipeStatus", [c, Ne || null, je || 0, _e || 0, ze, Ge, He]), t.swipeStatus && !1 === (w = t.swipeStatus.call(Ve, n, c, Ne || null, je || 0, _e || 0, ze, Ge, He))) return !1; if (c == m && V()) { if (clearTimeout(en), clearTimeout(nn), Ve.trigger("swipe", [Ne, je, _e, ze, Ge, He]), t.swipe && !1 === (w = t.swipe.call(Ve, n, Ne, je, _e, ze, Ge, He))) return !1; switch (Ne) { case r: Ve.trigger("swipeLeft", [Ne, je, _e, ze, Ge, He]), t.swipeLeft && (w = t.swipeLeft.call(Ve, n, Ne, je, _e, ze, Ge, He)); break; case i: Ve.trigger("swipeRight", [Ne, je, _e, ze, Ge, He]), t.swipeRight && (w = t.swipeRight.call(Ve, n, Ne, je, _e, ze, Ge, He)); break; case l: Ve.trigger("swipeUp", [Ne, je, _e, ze, Ge, He]), t.swipeUp && (w = t.swipeUp.call(Ve, n, Ne, je, _e, ze, Ge, He)); break; case o: Ve.trigger("swipeDown", [Ne, je, _e, ze, Ge, He]), t.swipeDown && (w = t.swipeDown.call(Ve, n, Ne, je, _e, ze, Ge, He)) } } } if (s == f) { if (Ve.trigger("pinchStatus", [c, Xe || null, Fe || 0, _e || 0, ze, Ce, Ge]), t.pinchStatus && !1 === (w = t.pinchStatus.call(Ve, n, c, Xe || null, Fe || 0, _e || 0, ze, Ce, Ge))) return !1; if (c == m && F()) switch (Xe) { case u: Ve.trigger("pinchIn", [Xe || null, Fe || 0, _e || 0, ze, Ce, Ge]), t.pinchIn && (w = t.pinchIn.call(Ve, n, Xe || null, Fe || 0, _e || 0, ze, Ce, Ge)); break; case a: Ve.trigger("pinchOut", [Xe || null, Fe || 0, _e || 0, ze, Ce, Ge]), t.pinchOut && (w = t.pinchOut.call(Ve, n, Xe || null, Fe || 0, _e || 0, ze, Ce, Ge)) } } return s == h ? c !== x && c !== m || (clearTimeout(en), clearTimeout(nn), J() && !ee() ? ($e = Oe(), en = setTimeout(e.proxy(function () { $e = null, Ve.trigger("tap", [n.target]), t.tap && (w = t.tap.call(Ve, n, n.target)) }, this), t.doubleTapThreshold)) : ($e = null, Ve.trigger("tap", [n.target]), t.tap && (w = t.tap.call(Ve, n, n.target)))) : s == d ? c !== x && c !== m || (clearTimeout(en), clearTimeout(nn), $e = null, Ve.trigger("doubletap", [n.target]), t.doubleTap && (w = t.doubleTap.call(Ve, n, n.target))) : s == g && (c !== x && c !== m || (clearTimeout(en), $e = null, Ve.trigger("longtap", [n.target]), t.longTap && (w = t.longTap.call(Ve, n, n.target)))), w } function H() { var e = !0; return null !== t.threshold && (e = je >= t.threshold), e } function _() { var e = !1; return null !== t.cancelThreshold && null !== Ne && (e = ge(Ne) - je >= t.cancelThreshold), e } function q() { return null === t.pinchThreshold || Fe >= t.pinchThreshold } function Q() { return !(t.maxTimeThreshold && _e >= t.maxTimeThreshold) } function C(e, n) { if (!1 !== t.preventDefaultEvents) if (t.allowPageScroll === c) e.preventDefault(); else { var u = t.allowPageScroll === s; switch (n) { case r: (t.swipeLeft && u || !u && t.allowPageScroll != w) && e.preventDefault(); break; case i: (t.swipeRight && u || !u && t.allowPageScroll != w) && e.preventDefault(); break; case l: (t.swipeUp && u || !u && t.allowPageScroll != v) && e.preventDefault(); break; case o: (t.swipeDown && u || !u && t.allowPageScroll != v) && e.preventDefault() } } } function F() { var e = G(), n = Z(), t = q(); return e && n && t } function X() { return !!(t.pinchStatus || t.pinchIn || t.pinchOut) } function Y() { return !(!F() || !X()) } function V() { var e = Q(), n = H(), t = G(), r = Z(); return !_() && r && t && n && e } function W() { return !!(t.swipe || t.swipeStatus || t.swipeLeft || t.swipeRight || t.swipeUp || t.swipeDown) } function z() { return !(!V() || !W()) } function G() { return ze === t.fingers || t.fingers === T || !S } function Z() { return 0 !== Ge[0].end.x } function B() { return !!t.tap } function J() { return !!t.doubleTap } function K() { return !!t.longTap } function $() { if (null == $e) return !1; var e = Oe(); return J() && e - $e <= t.doubleTapThreshold } function ee() { return $() } function ne() { return (1 === ze || !S) && (isNaN(je) || je < t.threshold) } function te() { return _e > t.longTapThreshold && je < b } function re() { return !(!ne() || !B()) } function ie() { return !(!$() || !J()) } function le() { return !(!te() || !K()) } function oe(e) { Je = Oe(), Ke = e.touches.length + 1 } function ue() { Je = 0, Ke = 0 } function ae() { var e = !1; return Je && Oe() - Je <= t.fingerReleaseThreshold && (e = !0), e } function ce() { return !(!0 !== Ve.data(D + "_intouch")) } function se(e) { Ve && (!0 === e ? (Ve.bind(ke, L), Ve.bind(Ae, R), Ie && Ve.bind(Ie, A)) : (Ve.unbind(ke, L, !1), Ve.unbind(Ae, R, !1), Ie && Ve.unbind(Ie, A, !1)), Ve.data(D + "_intouch", !0 === e)) } function pe(e, n) { var t = { start: { x: 0, y: 0 }, last: { x: 0, y: 0 }, end: { x: 0, y: 0 } }; return t.start.x = t.last.x = t.end.x = n.pageX || n.clientX, t.start.y = t.last.y = t.end.y = n.pageY || n.clientY, Ge[e] = t, t } function fe(e) { var n = void 0 !== e.identifier ? e.identifier : 0, t = he(n); return null === t && (t = pe(n, e)), t.last.x = t.end.x, t.last.y = t.end.y, t.end.x = e.pageX || e.clientX, t.end.y = e.pageY || e.clientY, t } function he(e) { return Ge[e] || null } function de(e, n) { e != c && (n = Math.max(n, ge(e)), Ye[e].distance = n) } function ge(e) { if (Ye[e]) return Ye[e].distance } function we() { var e = {}; return e[r] = ve(r), e[i] = ve(i), e[l] = ve(l), e[o] = ve(o), e } function ve(e) { return { direction: e, distance: 0 } } function Te() { return Be - Ze } function be(e, n) { var t = Math.abs(e.x - n.x), r = Math.abs(e.y - n.y); return Math.round(Math.sqrt(t * t + r * r)) } function ye(e, n) { return (n / e * 1).toFixed(2) } function Ee() { return Ce < 1 ? a : u } function me(e, n) { return Math.round(Math.sqrt(Math.pow(n.x - e.x, 2) + Math.pow(n.y - e.y, 2))) } function xe(e, n) { var t = e.x - n.x, r = n.y - e.y, i = Math.atan2(r, t), l = Math.round(180 * i / Math.PI); return l < 0 && (l = 360 - Math.abs(l)), l } function Se(e, n) { if (Pe(e, n)) return c; var t = xe(e, n); return t <= 45 && t >= 0 ? r : t <= 360 && t >= 315 ? r : t >= 135 && t <= 225 ? i : t > 45 && t < 135 ? o : l } function Oe() { return (new Date).getTime() } function Me(n) { var t = (n = e(n)).offset(); return { left: t.left, right: t.left + n.outerWidth(), top: t.top, bottom: t.top + n.outerHeight() } } function De(e, n) { return e.x > n.left && e.x < n.right && e.y > n.top && e.y < n.bottom } function Pe(e, n) { return e.x == n.x && e.y == n.y } var t = e.extend({}, t), Le = S || M || !t.fallbackToMouseEvents, Re = Le ? M ? O ? "MSPointerDown" : "pointerdown" : "touchstart" : "mousedown", ke = Le ? M ? O ? "MSPointerMove" : "pointermove" : "touchmove" : "mousemove", Ae = Le ? M ? O ? "MSPointerUp" : "pointerup" : "touchend" : "mouseup", Ie = Le ? M ? "mouseleave" : null : "mouseleave", Ue = M ? O ? "MSPointerCancel" : "pointercancel" : "touchcancel", je = 0, Ne = null, He = null, _e = 0, qe = 0, Qe = 0, Ce = 1, Fe = 0, Xe = 0, Ye = null, Ve = e(n), We = "start", ze = 0, Ge = {}, Ze = 0, Be = 0, Je = 0, Ke = 0, $e = 0, en = null, nn = null; try { Ve.bind(Re, P), Ve.bind(Ue, k) } catch (n) { e.error("events not supported " + Re + "," + Ue + " on jQuery.swipe") } this.enable = function () { return this.disable(), Ve.bind(Re, P), Ve.bind(Ue, k), Ve }, this.disable = function () { return I(), Ve }, this.destroy = function () { I(), Ve.data(D, null), Ve = null }, this.option = function (n, r) { if ("object" == typeof n) t = e.extend(t, n); else if (void 0 !== t[n]) { if (void 0 === r) return t[n]; t[n] = r } else { if (!n) return t; e.error("Option " + n + " does not exist on jQuery.swipe.options") } return null } } var r = "left", i = "right", l = "up", o = "down", u = "in", a = "out", c = "none", s = "auto", p = "swipe", f = "pinch", h = "tap", d = "doubletap", g = "longtap", w = "horizontal", v = "vertical", T = "all", b = 10, y = "start", E = "move", m = "end", x = "cancel", S = "ontouchstart" in window, O = window.navigator.msPointerEnabled && !window.navigator.pointerEnabled && !S, M = (window.navigator.pointerEnabled || window.navigator.msPointerEnabled) && !S, D = "TouchSwipe", P = { fingers: 1, threshold: 75, cancelThreshold: null, pinchThreshold: 20, maxTimeThreshold: null, fingerReleaseThreshold: 250, longTapThreshold: 500, doubleTapThreshold: 200, swipe: null, swipeLeft: null, swipeRight: null, swipeUp: null, swipeDown: null, swipeStatus: null, pinchIn: null, pinchOut: null, pinchStatus: null, click: null, tap: null, doubleTap: null, longTap: null, hold: null, triggerOnTouchEnd: !0, triggerOnTouchLeave: !1, allowPageScroll: "auto", fallbackToMouseEvents: !0, excludedElements: ".noSwipe", preventDefaultEvents: !0 }; e.fn.swipe = function (t) { var r = e(this), i = r.data(D); if (i && "string" == typeof t) { if (i[t]) return i[t].apply(i, Array.prototype.slice.call(arguments, 1)); e.error("Method " + t + " does not exist on jQuery.swipe") } else if (i && "object" == typeof t) i.option.apply(i, arguments); else if (!(i || "object" != typeof t && t)) return n.apply(this, arguments); return r }, e.fn.swipe.version = "1.6.18", e.fn.swipe.defaults = P, e.fn.swipe.phases = { PHASE_START: y, PHASE_MOVE: E, PHASE_END: m, PHASE_CANCEL: x }, e.fn.swipe.directions = { LEFT: r, RIGHT: i, UP: l, DOWN: o, IN: u, OUT: a }, e.fn.swipe.pageScroll = { NONE: c, HORIZONTAL: w, VERTICAL: v, AUTO: s }, e.fn.swipe.fingers = { ONE: 1, TWO: 2, THREE: 3, FOUR: 4, FIVE: 5, ALL: T } });
/**
* @module Popper.js
* @author Federico Zivolo
* @see https://github.com/FezVrasta/popper.js
* @license MIT
* @version 1.16.1
*/
(function (e, t) { 'object' == typeof exports && 'undefined' != typeof module ? module.exports = t() : 'function' == typeof define && define.amd ? define(t) : e.Popper = t() })(this, function () { 'use strict'; function e(e) { return e && '[object Function]' === {}.toString.call(e) } function t(e, t) { if (1 !== e.nodeType) return []; var o = e.ownerDocument.defaultView, n = o.getComputedStyle(e, null); return t ? n[t] : n } function o(e) { return 'HTML' === e.nodeName ? e : e.parentNode || e.host } function n(e) { if (!e) return document.body; switch (e.nodeName) { case 'HTML': case 'BODY': return e.ownerDocument.body; case '#document': return e.body; }var i = t(e), r = i.overflow, p = i.overflowX, s = i.overflowY; return /(auto|scroll|overlay)/.test(r + s + p) ? e : n(o(e)) } function i(e) { return e && e.referenceNode ? e.referenceNode : e } function r(e) { return 11 === e ? re : 10 === e ? pe : re || pe } function p(e) { if (!e) return document.documentElement; for (var o = r(10) ? document.body : null, n = e.offsetParent || null; n === o && e.nextElementSibling;)n = (e = e.nextElementSibling).offsetParent; var i = n && n.nodeName; return i && 'BODY' !== i && 'HTML' !== i ? -1 !== ['TH', 'TD', 'TABLE'].indexOf(n.nodeName) && 'static' === t(n, 'position') ? p(n) : n : e ? e.ownerDocument.documentElement : document.documentElement } function s(e) { var t = e.nodeName; return 'BODY' !== t && ('HTML' === t || p(e.firstElementChild) === e) } function d(e) { return null === e.parentNode ? e : d(e.parentNode) } function a(e, t) { if (!e || !e.nodeType || !t || !t.nodeType) return document.documentElement; var o = e.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_FOLLOWING, n = o ? e : t, i = o ? t : e, r = document.createRange(); r.setStart(n, 0), r.setEnd(i, 0); var l = r.commonAncestorContainer; if (e !== l && t !== l || n.contains(i)) return s(l) ? l : p(l); var f = d(e); return f.host ? a(f.host, t) : a(e, d(t).host) } function l(e) { var t = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : 'top', o = 'top' === t ? 'scrollTop' : 'scrollLeft', n = e.nodeName; if ('BODY' === n || 'HTML' === n) { var i = e.ownerDocument.documentElement, r = e.ownerDocument.scrollingElement || i; return r[o] } return e[o] } function f(e, t) { var o = 2 < arguments.length && void 0 !== arguments[2] && arguments[2], n = l(t, 'top'), i = l(t, 'left'), r = o ? -1 : 1; return e.top += n * r, e.bottom += n * r, e.left += i * r, e.right += i * r, e } function m(e, t) { var o = 'x' === t ? 'Left' : 'Top', n = 'Left' == o ? 'Right' : 'Bottom'; return parseFloat(e['border' + o + 'Width']) + parseFloat(e['border' + n + 'Width']) } function h(e, t, o, n) { return ee(t['offset' + e], t['scroll' + e], o['client' + e], o['offset' + e], o['scroll' + e], r(10) ? parseInt(o['offset' + e]) + parseInt(n['margin' + ('Height' === e ? 'Top' : 'Left')]) + parseInt(n['margin' + ('Height' === e ? 'Bottom' : 'Right')]) : 0) } function c(e) { var t = e.body, o = e.documentElement, n = r(10) && getComputedStyle(o); return { height: h('Height', t, o, n), width: h('Width', t, o, n) } } function g(e) { return le({}, e, { right: e.left + e.width, bottom: e.top + e.height }) } function u(e) { var o = {}; try { if (r(10)) { o = e.getBoundingClientRect(); var n = l(e, 'top'), i = l(e, 'left'); o.top += n, o.left += i, o.bottom += n, o.right += i } else o = e.getBoundingClientRect() } catch (t) { } var p = { left: o.left, top: o.top, width: o.right - o.left, height: o.bottom - o.top }, s = 'HTML' === e.nodeName ? c(e.ownerDocument) : {}, d = s.width || e.clientWidth || p.width, a = s.height || e.clientHeight || p.height, f = e.offsetWidth - d, h = e.offsetHeight - a; if (f || h) { var u = t(e); f -= m(u, 'x'), h -= m(u, 'y'), p.width -= f, p.height -= h } return g(p) } function b(e, o) { var i = 2 < arguments.length && void 0 !== arguments[2] && arguments[2], p = r(10), s = 'HTML' === o.nodeName, d = u(e), a = u(o), l = n(e), m = t(o), h = parseFloat(m.borderTopWidth), c = parseFloat(m.borderLeftWidth); i && s && (a.top = ee(a.top, 0), a.left = ee(a.left, 0)); var b = g({ top: d.top - a.top - h, left: d.left - a.left - c, width: d.width, height: d.height }); if (b.marginTop = 0, b.marginLeft = 0, !p && s) { var w = parseFloat(m.marginTop), y = parseFloat(m.marginLeft); b.top -= h - w, b.bottom -= h - w, b.left -= c - y, b.right -= c - y, b.marginTop = w, b.marginLeft = y } return (p && !i ? o.contains(l) : o === l && 'BODY' !== l.nodeName) && (b = f(b, o)), b } function w(e) { var t = 1 < arguments.length && void 0 !== arguments[1] && arguments[1], o = e.ownerDocument.documentElement, n = b(e, o), i = ee(o.clientWidth, window.innerWidth || 0), r = ee(o.clientHeight, window.innerHeight || 0), p = t ? 0 : l(o), s = t ? 0 : l(o, 'left'), d = { top: p - n.top + n.marginTop, left: s - n.left + n.marginLeft, width: i, height: r }; return g(d) } function y(e) { var n = e.nodeName; if ('BODY' === n || 'HTML' === n) return !1; if ('fixed' === t(e, 'position')) return !0; var i = o(e); return !!i && y(i) } function E(e) { if (!e || !e.parentElement || r()) return document.documentElement; for (var o = e.parentElement; o && 'none' === t(o, 'transform');)o = o.parentElement; return o || document.documentElement } function v(e, t, r, p) { var s = 4 < arguments.length && void 0 !== arguments[4] && arguments[4], d = { top: 0, left: 0 }, l = s ? E(e) : a(e, i(t)); if ('viewport' === p) d = w(l, s); else { var f; 'scrollParent' === p ? (f = n(o(t)), 'BODY' === f.nodeName && (f = e.ownerDocument.documentElement)) : 'window' === p ? f = e.ownerDocument.documentElement : f = p; var m = b(f, l, s); if ('HTML' === f.nodeName && !y(l)) { var h = c(e.ownerDocument), g = h.height, u = h.width; d.top += m.top - m.marginTop, d.bottom = g + m.top, d.left += m.left - m.marginLeft, d.right = u + m.left } else d = m } r = r || 0; var v = 'number' == typeof r; return d.left += v ? r : r.left || 0, d.top += v ? r : r.top || 0, d.right -= v ? r : r.right || 0, d.bottom -= v ? r : r.bottom || 0, d } function x(e) { var t = e.width, o = e.height; return t * o } function O(e, t, o, n, i) { var r = 5 < arguments.length && void 0 !== arguments[5] ? arguments[5] : 0; if (-1 === e.indexOf('auto')) return e; var p = v(o, n, r, i), s = { top: { width: p.width, height: t.top - p.top }, right: { width: p.right - t.right, height: p.height }, bottom: { width: p.width, height: p.bottom - t.bottom }, left: { width: t.left - p.left, height: p.height } }, d = Object.keys(s).map(function (e) { return le({ key: e }, s[e], { area: x(s[e]) }) }).sort(function (e, t) { return t.area - e.area }), a = d.filter(function (e) { var t = e.width, n = e.height; return t >= o.clientWidth && n >= o.clientHeight }), l = 0 < a.length ? a[0].key : d[0].key, f = e.split('-')[1]; return l + (f ? '-' + f : '') } function L(e, t, o) { var n = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null, r = n ? E(t) : a(t, i(o)); return b(o, r, n) } function S(e) { var t = e.ownerDocument.defaultView, o = t.getComputedStyle(e), n = parseFloat(o.marginTop || 0) + parseFloat(o.marginBottom || 0), i = parseFloat(o.marginLeft || 0) + parseFloat(o.marginRight || 0), r = { width: e.offsetWidth + i, height: e.offsetHeight + n }; return r } function T(e) { var t = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' }; return e.replace(/left|right|bottom|top/g, function (e) { return t[e] }) } function C(e, t, o) { o = o.split('-')[0]; var n = S(e), i = { width: n.width, height: n.height }, r = -1 !== ['right', 'left'].indexOf(o), p = r ? 'top' : 'left', s = r ? 'left' : 'top', d = r ? 'height' : 'width', a = r ? 'width' : 'height'; return i[p] = t[p] + t[d] / 2 - n[d] / 2, i[s] = o === s ? t[s] - n[a] : t[T(s)], i } function D(e, t) { return Array.prototype.find ? e.find(t) : e.filter(t)[0] } function N(e, t, o) { if (Array.prototype.findIndex) return e.findIndex(function (e) { return e[t] === o }); var n = D(e, function (e) { return e[t] === o }); return e.indexOf(n) } function P(t, o, n) { var i = void 0 === n ? t : t.slice(0, N(t, 'name', n)); return i.forEach(function (t) { t['function'] && console.warn('`modifier.function` is deprecated, use `modifier.fn`!'); var n = t['function'] || t.fn; t.enabled && e(n) && (o.offsets.popper = g(o.offsets.popper), o.offsets.reference = g(o.offsets.reference), o = n(o, t)) }), o } function k() { if (!this.state.isDestroyed) { var e = { instance: this, styles: {}, arrowStyles: {}, attributes: {}, flipped: !1, offsets: {} }; e.offsets.reference = L(this.state, this.popper, this.reference, this.options.positionFixed), e.placement = O(this.options.placement, e.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding), e.originalPlacement = e.placement, e.positionFixed = this.options.positionFixed, e.offsets.popper = C(this.popper, e.offsets.reference, e.placement), e.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute', e = P(this.modifiers, e), this.state.isCreated ? this.options.onUpdate(e) : (this.state.isCreated = !0, this.options.onCreate(e)) } } function W(e, t) { return e.some(function (e) { var o = e.name, n = e.enabled; return n && o === t }) } function B(e) { for (var t = [!1, 'ms', 'Webkit', 'Moz', 'O'], o = e.charAt(0).toUpperCase() + e.slice(1), n = 0; n < t.length; n++) { var i = t[n], r = i ? '' + i + o : e; if ('undefined' != typeof document.body.style[r]) return r } return null } function H() { return this.state.isDestroyed = !0, W(this.modifiers, 'applyStyle') && (this.popper.removeAttribute('x-placement'), this.popper.style.position = '', this.popper.style.top = '', this.popper.style.left = '', this.popper.style.right = '', this.popper.style.bottom = '', this.popper.style.willChange = '', this.popper.style[B('transform')] = ''), this.disableEventListeners(), this.options.removeOnDestroy && this.popper.parentNode.removeChild(this.popper), this } function A(e) { var t = e.ownerDocument; return t ? t.defaultView : window } function M(e, t, o, i) { var r = 'BODY' === e.nodeName, p = r ? e.ownerDocument.defaultView : e; p.addEventListener(t, o, { passive: !0 }), r || M(n(p.parentNode), t, o, i), i.push(p) } function F(e, t, o, i) { o.updateBound = i, A(e).addEventListener('resize', o.updateBound, { passive: !0 }); var r = n(e); return M(r, 'scroll', o.updateBound, o.scrollParents), o.scrollElement = r, o.eventsEnabled = !0, o } function I() { this.state.eventsEnabled || (this.state = F(this.reference, this.options, this.state, this.scheduleUpdate)) } function R(e, t) { return A(e).removeEventListener('resize', t.updateBound), t.scrollParents.forEach(function (e) { e.removeEventListener('scroll', t.updateBound) }), t.updateBound = null, t.scrollParents = [], t.scrollElement = null, t.eventsEnabled = !1, t } function U() { this.state.eventsEnabled && (cancelAnimationFrame(this.scheduleUpdate), this.state = R(this.reference, this.state)) } function Y(e) { return '' !== e && !isNaN(parseFloat(e)) && isFinite(e) } function V(e, t) { Object.keys(t).forEach(function (o) { var n = ''; -1 !== ['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(o) && Y(t[o]) && (n = 'px'), e.style[o] = t[o] + n }) } function j(e, t) { Object.keys(t).forEach(function (o) { var n = t[o]; !1 === n ? e.removeAttribute(o) : e.setAttribute(o, t[o]) }) } function q(e, t) { var o = e.offsets, n = o.popper, i = o.reference, r = $, p = function (e) { return e }, s = r(i.width), d = r(n.width), a = -1 !== ['left', 'right'].indexOf(e.placement), l = -1 !== e.placement.indexOf('-'), f = t ? a || l || s % 2 == d % 2 ? r : Z : p, m = t ? r : p; return { left: f(1 == s % 2 && 1 == d % 2 && !l && t ? n.left - 1 : n.left), top: m(n.top), bottom: m(n.bottom), right: f(n.right) } } function K(e, t, o) { var n = D(e, function (e) { var o = e.name; return o === t }), i = !!n && e.some(function (e) { return e.name === o && e.enabled && e.order < n.order }); if (!i) { var r = '`' + t + '`'; console.warn('`' + o + '`' + ' modifier is required by ' + r + ' modifier in order to work, be sure to include it before ' + r + '!') } return i } function z(e) { return 'end' === e ? 'start' : 'start' === e ? 'end' : e } function G(e) { var t = 1 < arguments.length && void 0 !== arguments[1] && arguments[1], o = he.indexOf(e), n = he.slice(o + 1).concat(he.slice(0, o)); return t ? n.reverse() : n } function _(e, t, o, n) { var i = e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/), r = +i[1], p = i[2]; if (!r) return e; if (0 === p.indexOf('%')) { var s; switch (p) { case '%p': s = o; break; case '%': case '%r': default: s = n; }var d = g(s); return d[t] / 100 * r } if ('vh' === p || 'vw' === p) { var a; return a = 'vh' === p ? ee(document.documentElement.clientHeight, window.innerHeight || 0) : ee(document.documentElement.clientWidth, window.innerWidth || 0), a / 100 * r } return r } function X(e, t, o, n) { var i = [0, 0], r = -1 !== ['right', 'left'].indexOf(n), p = e.split(/(\+|\-)/).map(function (e) { return e.trim() }), s = p.indexOf(D(p, function (e) { return -1 !== e.search(/,|\s/) })); p[s] && -1 === p[s].indexOf(',') && console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.'); var d = /\s*,\s*|\s+/, a = -1 === s ? [p] : [p.slice(0, s).concat([p[s].split(d)[0]]), [p[s].split(d)[1]].concat(p.slice(s + 1))]; return a = a.map(function (e, n) { var i = (1 === n ? !r : r) ? 'height' : 'width', p = !1; return e.reduce(function (e, t) { return '' === e[e.length - 1] && -1 !== ['+', '-'].indexOf(t) ? (e[e.length - 1] = t, p = !0, e) : p ? (e[e.length - 1] += t, p = !1, e) : e.concat(t) }, []).map(function (e) { return _(e, i, t, o) }) }), a.forEach(function (e, t) { e.forEach(function (o, n) { Y(o) && (i[t] += o * ('-' === e[n - 1] ? -1 : 1)) }) }), i } function J(e, t) { var o, n = t.offset, i = e.placement, r = e.offsets, p = r.popper, s = r.reference, d = i.split('-')[0]; return o = Y(+n) ? [+n, 0] : X(n, p, s, d), 'left' === d ? (p.top += o[0], p.left -= o[1]) : 'right' === d ? (p.top += o[0], p.left += o[1]) : 'top' === d ? (p.left += o[0], p.top -= o[1]) : 'bottom' === d && (p.left += o[0], p.top += o[1]), e.popper = p, e } var Q = Math.min, Z = Math.floor, $ = Math.round, ee = Math.max, te = 'undefined' != typeof window && 'undefined' != typeof document && 'undefined' != typeof navigator, oe = function () { for (var e = ['Edge', 'Trident', 'Firefox'], t = 0; t < e.length; t += 1)if (te && 0 <= navigator.userAgent.indexOf(e[t])) return 1; return 0 }(), ne = te && window.Promise, ie = ne ? function (e) { var t = !1; return function () { t || (t = !0, window.Promise.resolve().then(function () { t = !1, e() })) } } : function (e) { var t = !1; return function () { t || (t = !0, setTimeout(function () { t = !1, e() }, oe)) } }, re = te && !!(window.MSInputMethodContext && document.documentMode), pe = te && /MSIE 10/.test(navigator.userAgent), se = function (e, t) { if (!(e instanceof t)) throw new TypeError('Cannot call a class as a function') }, de = function () { function e(e, t) { for (var o, n = 0; n < t.length; n++)o = t[n], o.enumerable = o.enumerable || !1, o.configurable = !0, 'value' in o && (o.writable = !0), Object.defineProperty(e, o.key, o) } return function (t, o, n) { return o && e(t.prototype, o), n && e(t, n), t } }(), ae = function (e, t, o) { return t in e ? Object.defineProperty(e, t, { value: o, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = o, e }, le = Object.assign || function (e) { for (var t, o = 1; o < arguments.length; o++)for (var n in t = arguments[o], t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]); return e }, fe = te && /Firefox/i.test(navigator.userAgent), me = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'], he = me.slice(3), ce = { FLIP: 'flip', CLOCKWISE: 'clockwise', COUNTERCLOCKWISE: 'counterclockwise' }, ge = function () { function t(o, n) { var i = this, r = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : {}; se(this, t), this.scheduleUpdate = function () { return requestAnimationFrame(i.update) }, this.update = ie(this.update.bind(this)), this.options = le({}, t.Defaults, r), this.state = { isDestroyed: !1, isCreated: !1, scrollParents: [] }, this.reference = o && o.jquery ? o[0] : o, this.popper = n && n.jquery ? n[0] : n, this.options.modifiers = {}, Object.keys(le({}, t.Defaults.modifiers, r.modifiers)).forEach(function (e) { i.options.modifiers[e] = le({}, t.Defaults.modifiers[e] || {}, r.modifiers ? r.modifiers[e] : {}) }), this.modifiers = Object.keys(this.options.modifiers).map(function (e) { return le({ name: e }, i.options.modifiers[e]) }).sort(function (e, t) { return e.order - t.order }), this.modifiers.forEach(function (t) { t.enabled && e(t.onLoad) && t.onLoad(i.reference, i.popper, i.options, t, i.state) }), this.update(); var p = this.options.eventsEnabled; p && this.enableEventListeners(), this.state.eventsEnabled = p } return de(t, [{ key: 'update', value: function () { return k.call(this) } }, { key: 'destroy', value: function () { return H.call(this) } }, { key: 'enableEventListeners', value: function () { return I.call(this) } }, { key: 'disableEventListeners', value: function () { return U.call(this) } }]), t }(); return ge.Utils = ('undefined' == typeof window ? global : window).PopperUtils, ge.placements = me, ge.Defaults = { placement: 'bottom', positionFixed: !1, eventsEnabled: !0, removeOnDestroy: !1, onCreate: function () { }, onUpdate: function () { }, modifiers: { shift: { order: 100, enabled: !0, fn: function (e) { var t = e.placement, o = t.split('-')[0], n = t.split('-')[1]; if (n) { var i = e.offsets, r = i.reference, p = i.popper, s = -1 !== ['bottom', 'top'].indexOf(o), d = s ? 'left' : 'top', a = s ? 'width' : 'height', l = { start: ae({}, d, r[d]), end: ae({}, d, r[d] + r[a] - p[a]) }; e.offsets.popper = le({}, p, l[n]) } return e } }, offset: { order: 200, enabled: !0, fn: J, offset: 0 }, preventOverflow: { order: 300, enabled: !0, fn: function (e, t) { var o = t.boundariesElement || p(e.instance.popper); e.instance.reference === o && (o = p(o)); var n = B('transform'), i = e.instance.popper.style, r = i.top, s = i.left, d = i[n]; i.top = '', i.left = '', i[n] = ''; var a = v(e.instance.popper, e.instance.reference, t.padding, o, e.positionFixed); i.top = r, i.left = s, i[n] = d, t.boundaries = a; var l = t.priority, f = e.offsets.popper, m = { primary: function (e) { var o = f[e]; return f[e] < a[e] && !t.escapeWithReference && (o = ee(f[e], a[e])), ae({}, e, o) }, secondary: function (e) { var o = 'right' === e ? 'left' : 'top', n = f[o]; return f[e] > a[e] && !t.escapeWithReference && (n = Q(f[o], a[e] - ('right' === e ? f.width : f.height))), ae({}, o, n) } }; return l.forEach(function (e) { var t = -1 === ['left', 'top'].indexOf(e) ? 'secondary' : 'primary'; f = le({}, f, m[t](e)) }), e.offsets.popper = f, e }, priority: ['left', 'right', 'top', 'bottom'], padding: 5, boundariesElement: 'scrollParent' }, keepTogether: { order: 400, enabled: !0, fn: function (e) { var t = e.offsets, o = t.popper, n = t.reference, i = e.placement.split('-')[0], r = Z, p = -1 !== ['top', 'bottom'].indexOf(i), s = p ? 'right' : 'bottom', d = p ? 'left' : 'top', a = p ? 'width' : 'height'; return o[s] < r(n[d]) && (e.offsets.popper[d] = r(n[d]) - o[a]), o[d] > r(n[s]) && (e.offsets.popper[d] = r(n[s])), e } }, arrow: { order: 500, enabled: !0, fn: function (e, o) { var n; if (!K(e.instance.modifiers, 'arrow', 'keepTogether')) return e; var i = o.element; if ('string' == typeof i) { if (i = e.instance.popper.querySelector(i), !i) return e; } else if (!e.instance.popper.contains(i)) return console.warn('WARNING: `arrow.element` must be child of its popper element!'), e; var r = e.placement.split('-')[0], p = e.offsets, s = p.popper, d = p.reference, a = -1 !== ['left', 'right'].indexOf(r), l = a ? 'height' : 'width', f = a ? 'Top' : 'Left', m = f.toLowerCase(), h = a ? 'left' : 'top', c = a ? 'bottom' : 'right', u = S(i)[l]; d[c] - u < s[m] && (e.offsets.popper[m] -= s[m] - (d[c] - u)), d[m] + u > s[c] && (e.offsets.popper[m] += d[m] + u - s[c]), e.offsets.popper = g(e.offsets.popper); var b = d[m] + d[l] / 2 - u / 2, w = t(e.instance.popper), y = parseFloat(w['margin' + f]), E = parseFloat(w['border' + f + 'Width']), v = b - e.offsets.popper[m] - y - E; return v = ee(Q(s[l] - u, v), 0), e.arrowElement = i, e.offsets.arrow = (n = {}, ae(n, m, $(v)), ae(n, h, ''), n), e }, element: '[x-arrow]' }, flip: { order: 600, enabled: !0, fn: function (e, t) { if (W(e.instance.modifiers, 'inner')) return e; if (e.flipped && e.placement === e.originalPlacement) return e; var o = v(e.instance.popper, e.instance.reference, t.padding, t.boundariesElement, e.positionFixed), n = e.placement.split('-')[0], i = T(n), r = e.placement.split('-')[1] || '', p = []; switch (t.behavior) { case ce.FLIP: p = [n, i]; break; case ce.CLOCKWISE: p = G(n); break; case ce.COUNTERCLOCKWISE: p = G(n, !0); break; default: p = t.behavior; }return p.forEach(function (s, d) { if (n !== s || p.length === d + 1) return e; n = e.placement.split('-')[0], i = T(n); var a = e.offsets.popper, l = e.offsets.reference, f = Z, m = 'left' === n && f(a.right) > f(l.left) || 'right' === n && f(a.left) < f(l.right) || 'top' === n && f(a.bottom) > f(l.top) || 'bottom' === n && f(a.top) < f(l.bottom), h = f(a.left) < f(o.left), c = f(a.right) > f(o.right), g = f(a.top) < f(o.top), u = f(a.bottom) > f(o.bottom), b = 'left' === n && h || 'right' === n && c || 'top' === n && g || 'bottom' === n && u, w = -1 !== ['top', 'bottom'].indexOf(n), y = !!t.flipVariations && (w && 'start' === r && h || w && 'end' === r && c || !w && 'start' === r && g || !w && 'end' === r && u), E = !!t.flipVariationsByContent && (w && 'start' === r && c || w && 'end' === r && h || !w && 'start' === r && u || !w && 'end' === r && g), v = y || E; (m || b || v) && (e.flipped = !0, (m || b) && (n = p[d + 1]), v && (r = z(r)), e.placement = n + (r ? '-' + r : ''), e.offsets.popper = le({}, e.offsets.popper, C(e.instance.popper, e.offsets.reference, e.placement)), e = P(e.instance.modifiers, e, 'flip')) }), e }, behavior: 'flip', padding: 5, boundariesElement: 'viewport', flipVariations: !1, flipVariationsByContent: !1 }, inner: { order: 700, enabled: !1, fn: function (e) { var t = e.placement, o = t.split('-')[0], n = e.offsets, i = n.popper, r = n.reference, p = -1 !== ['left', 'right'].indexOf(o), s = -1 === ['top', 'left'].indexOf(o); return i[p ? 'left' : 'top'] = r[o] - (s ? i[p ? 'width' : 'height'] : 0), e.placement = T(t), e.offsets.popper = g(i), e } }, hide: { order: 800, enabled: !0, fn: function (e) { if (!K(e.instance.modifiers, 'hide', 'preventOverflow')) return e; var t = e.offsets.reference, o = D(e.instance.modifiers, function (e) { return 'preventOverflow' === e.name }).boundaries; if (t.bottom < o.top || t.left > o.right || t.top > o.bottom || t.right < o.left) { if (!0 === e.hide) return e; e.hide = !0, e.attributes['x-out-of-boundaries'] = '' } else { if (!1 === e.hide) return e; e.hide = !1, e.attributes['x-out-of-boundaries'] = !1 } return e } }, computeStyle: { order: 850, enabled: !0, fn: function (e, t) { var o = t.x, n = t.y, i = e.offsets.popper, r = D(e.instance.modifiers, function (e) { return 'applyStyle' === e.name }).gpuAcceleration; void 0 !== r && console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!'); var s, d, a = void 0 === r ? t.gpuAcceleration : r, l = p(e.instance.popper), f = u(l), m = { position: i.position }, h = q(e, 2 > window.devicePixelRatio || !fe), c = 'bottom' === o ? 'top' : 'bottom', g = 'right' === n ? 'left' : 'right', b = B('transform'); if (d = 'bottom' == c ? 'HTML' === l.nodeName ? -l.clientHeight + h.bottom : -f.height + h.bottom : h.top, s = 'right' == g ? 'HTML' === l.nodeName ? -l.clientWidth + h.right : -f.width + h.right : h.left, a && b) m[b] = 'translate3d(' + s + 'px, ' + d + 'px, 0)', m[c] = 0, m[g] = 0, m.willChange = 'transform'; else { var w = 'bottom' == c ? -1 : 1, y = 'right' == g ? -1 : 1; m[c] = d * w, m[g] = s * y, m.willChange = c + ', ' + g } var E = { "x-placement": e.placement }; return e.attributes = le({}, E, e.attributes), e.styles = le({}, m, e.styles), e.arrowStyles = le({}, e.offsets.arrow, e.arrowStyles), e }, gpuAcceleration: !0, x: 'bottom', y: 'right' }, applyStyle: { order: 900, enabled: !0, fn: function (e) { return V(e.instance.popper, e.styles), j(e.instance.popper, e.attributes), e.arrowElement && Object.keys(e.arrowStyles).length && V(e.arrowElement, e.arrowStyles), e }, onLoad: function (e, t, o, n, i) { var r = L(i, t, e, o.positionFixed), p = O(o.placement, r, t, e, o.modifiers.flip.boundariesElement, o.modifiers.flip.padding); return t.setAttribute('x-placement', p), V(t, { position: o.positionFixed ? 'fixed' : 'absolute' }), o }, gpuAcceleration: void 0 } } }, ge });
/**
* @module Bootstrap
* @author Twitter, Inc.
* @see http://getbootstrap.com
* @license MIT
* @version 4.5.3
*/
!function (t, e) { "object" == typeof exports && "undefined" != typeof module ? e(exports, require("jquery"), require("popper.js")) : "function" == typeof define && define.amd ? define(["exports", "jquery", "popper.js"], e) : e((t = "undefined" != typeof globalThis ? globalThis : t || self).bootstrap = {}, t.jQuery, t.Popper) }(this, (function (t, e, n) { "use strict"; function i(t) { return t && "object" == typeof t && "default" in t ? t : { default: t } } var o = i(e), a = i(n); function s(t, e) { for (var n = 0; n < e.length; n++) { var i = e[n]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i) } } function l(t, e, n) { return e && s(t.prototype, e), n && s(t, n), t } function r() { return (r = Object.assign || function (t) { for (var e = 1; e < arguments.length; e++) { var n = arguments[e]; for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]) } return t }).apply(this, arguments) } function u(t) { var e = this, n = !1; return o.default(this).one(d.TRANSITION_END, (function () { n = !0 })), setTimeout((function () { n || d.triggerTransitionEnd(e) }), t), this } var d = { TRANSITION_END: "bsTransitionEnd", getUID: function (t) { do { t += ~~(1e6 * Math.random()) } while (document.getElementById(t)); return t }, getSelectorFromElement: function (t) { var e = t.getAttribute("data-target"); if (!e || "#" === e) { var n = t.getAttribute("href"); e = n && "#" !== n ? n.trim() : "" } try { return document.querySelector(e) ? e : null } catch (t) { return null } }, getTransitionDurationFromElement: function (t) { if (!t) return 0; var e = o.default(t).css("transition-duration"), n = o.default(t).css("transition-delay"), i = parseFloat(e), a = parseFloat(n); return i || a ? (e = e.split(",")[0], n = n.split(",")[0], 1e3 * (parseFloat(e) + parseFloat(n))) : 0 }, reflow: function (t) { return t.offsetHeight }, triggerTransitionEnd: function (t) { o.default(t).trigger("transitionend") }, supportsTransitionEnd: function () { return Boolean("transitionend") }, isElement: function (t) { return (t[0] || t).nodeType }, typeCheckConfig: function (t, e, n) { for (var i in n) if (Object.prototype.hasOwnProperty.call(n, i)) { var o = n[i], a = e[i], s = a && d.isElement(a) ? "element" : null === (l = a) || "undefined" == typeof l ? "" + l : {}.toString.call(l).match(/\s([a-z]+)/i)[1].toLowerCase(); if (!new RegExp(o).test(s)) throw new Error(t.toUpperCase() + ': Option "' + i + '" provided type "' + s + '" but expected type "' + o + '".') } var l }, findShadowRoot: function (t) { if (!document.documentElement.attachShadow) return null; if ("function" == typeof t.getRootNode) { var e = t.getRootNode(); return e instanceof ShadowRoot ? e : null } return t instanceof ShadowRoot ? t : t.parentNode ? d.findShadowRoot(t.parentNode) : null }, jQueryDetection: function () { if ("undefined" == typeof o.default) throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript."); var t = o.default.fn.jquery.split(" ")[0].split("."); if (t[0] < 2 && t[1] < 9 || 1 === t[0] && 9 === t[1] && t[2] < 1 || t[0] >= 4) throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0") } }; d.jQueryDetection(), o.default.fn.emulateTransitionEnd = u, o.default.event.special[d.TRANSITION_END] = { bindType: "transitionend", delegateType: "transitionend", handle: function (t) { if (o.default(t.target).is(this)) return t.handleObj.handler.apply(this, arguments) } }; var f = "alert", c = o.default.fn[f], h = function () { function t(t) { this._element = t } var e = t.prototype; return e.close = function (t) { var e = this._element; t && (e = this._getRootElement(t)), this._triggerCloseEvent(e).isDefaultPrevented() || this._removeElement(e) }, e.dispose = function () { o.default.removeData(this._element, "bs.alert"), this._element = null }, e._getRootElement = function (t) { var e = d.getSelectorFromElement(t), n = !1; return e && (n = document.querySelector(e)), n || (n = o.default(t).closest(".alert")[0]), n }, e._triggerCloseEvent = function (t) { var e = o.default.Event("close.bs.alert"); return o.default(t).trigger(e), e }, e._removeElement = function (t) { var e = this; if (o.default(t).removeClass("show"), o.default(t).hasClass("fade")) { var n = d.getTransitionDurationFromElement(t); o.default(t).one(d.TRANSITION_END, (function (n) { return e._destroyElement(t, n) })).emulateTransitionEnd(n) } else this._destroyElement(t) }, e._destroyElement = function (t) { o.default(t).detach().trigger("closed.bs.alert").remove() }, t._jQueryInterface = function (e) { return this.each((function () { var n = o.default(this), i = n.data("bs.alert"); i || (i = new t(this), n.data("bs.alert", i)), "close" === e && i[e](this) })) }, t._handleDismiss = function (t) { return function (e) { e && e.preventDefault(), t.close(this) } }, l(t, null, [{ key: "VERSION", get: function () { return "4.5.3" } }]), t }(); o.default(document).on("click.bs.alert.data-api", '[data-dismiss="alert"]', h._handleDismiss(new h)), o.default.fn[f] = h._jQueryInterface, o.default.fn[f].Constructor = h, o.default.fn[f].noConflict = function () { return o.default.fn[f] = c, h._jQueryInterface }; var g = o.default.fn.button, m = function () { function t(t) { this._element = t, this.shouldAvoidTriggerChange = !1 } var e = t.prototype; return e.toggle = function () { var t = !0, e = !0, n = o.default(this._element).closest('[data-toggle="buttons"]')[0]; if (n) { var i = this._element.querySelector('input:not([type="hidden"])'); if (i) { if ("radio" === i.type) if (i.checked && this._element.classList.contains("active")) t = !1; else { var a = n.querySelector(".active"); a && o.default(a).removeClass("active") } t && ("checkbox" !== i.type && "radio" !== i.type || (i.checked = !this._element.classList.contains("active")), this.shouldAvoidTriggerChange || o.default(i).trigger("change")), i.focus(), e = !1 } } this._element.hasAttribute("disabled") || this._element.classList.contains("disabled") || (e && this._element.setAttribute("aria-pressed", !this._element.classList.contains("active")), t && o.default(this._element).toggleClass("active")) }, e.dispose = function () { o.default.removeData(this._element, "bs.button"), this._element = null }, t._jQueryInterface = function (e, n) { return this.each((function () { var i = o.default(this), a = i.data("bs.button"); a || (a = new t(this), i.data("bs.button", a)), a.shouldAvoidTriggerChange = n, "toggle" === e && a[e]() })) }, l(t, null, [{ key: "VERSION", get: function () { return "4.5.3" } }]), t }(); o.default(document).on("click.bs.button.data-api", '[data-toggle^="button"]', (function (t) { var e = t.target, n = e; if (o.default(e).hasClass("btn") || (e = o.default(e).closest(".btn")[0]), !e || e.hasAttribute("disabled") || e.classList.contains("disabled")) t.preventDefault(); else { var i = e.querySelector('input:not([type="hidden"])'); if (i && (i.hasAttribute("disabled") || i.classList.contains("disabled"))) return void t.preventDefault(); "INPUT" !== n.tagName && "LABEL" === e.tagName || m._jQueryInterface.call(o.default(e), "toggle", "INPUT" === n.tagName) } })).on("focus.bs.button.data-api blur.bs.button.data-api", '[data-toggle^="button"]', (function (t) { var e = o.default(t.target).closest(".btn")[0]; o.default(e).toggleClass("focus", /^focus(in)?$/.test(t.type)) })), o.default(window).on("load.bs.button.data-api", (function () { for (var t = [].slice.call(document.querySelectorAll('[data-toggle="buttons"] .btn')), e = 0, n = t.length; e < n; e++) { var i = t[e], o = i.querySelector('input:not([type="hidden"])'); o.checked || o.hasAttribute("checked") ? i.classList.add("active") : i.classList.remove("active") } for (var a = 0, s = (t = [].slice.call(document.querySelectorAll('[data-toggle="button"]'))).length; a < s; a++) { var l = t[a]; "true" === l.getAttribute("aria-pressed") ? l.classList.add("active") : l.classList.remove("active") } })), o.default.fn.button = m._jQueryInterface, o.default.fn.button.Constructor = m, o.default.fn.button.noConflict = function () { return o.default.fn.button = g, m._jQueryInterface }; var p = "carousel", _ = ".bs.carousel", v = o.default.fn[p], b = { interval: 5e3, keyboard: !0, slide: !1, pause: "hover", wrap: !0, touch: !0 }, y = { interval: "(number|boolean)", keyboard: "boolean", slide: "(boolean|string)", pause: "(string|boolean)", wrap: "boolean", touch: "boolean" }, E = { TOUCH: "touch", PEN: "pen" }, w = function () { function t(t, e) { this._items = null, this._interval = null, this._activeElement = null, this._isPaused = !1, this._isSliding = !1, this.touchTimeout = null, this.touchStartX = 0, this.touchDeltaX = 0, this._config = this._getConfig(e), this._element = t, this._indicatorsElement = this._element.querySelector(".carousel-indicators"), this._touchSupported = "ontouchstart" in document.documentElement || navigator.maxTouchPoints > 0, this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent), this._addEventListeners() } var e = t.prototype; return e.next = function () { this._isSliding || this._slide("next") }, e.nextWhenVisible = function () { var t = o.default(this._element); !document.hidden && t.is(":visible") && "hidden" !== t.css("visibility") && this.next() }, e.prev = function () { this._isSliding || this._slide("prev") }, e.pause = function (t) { t || (this._isPaused = !0), this._element.querySelector(".carousel-item-next, .carousel-item-prev") && (d.triggerTransitionEnd(this._element), this.cycle(!0)), clearInterval(this._interval), this._interval = null }, e.cycle = function (t) { t || (this._isPaused = !1), this._interval && (clearInterval(this._interval), this._interval = null), this._config.interval && !this._isPaused && (this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval)) }, e.to = function (t) { var e = this; this._activeElement = this._element.querySelector(".active.carousel-item"); var n = this._getItemIndex(this._activeElement); if (!(t > this._items.length - 1 || t < 0)) if (this._isSliding) o.default(this._element).one("slid.bs.carousel", (function () { return e.to(t) })); else { if (n === t) return this.pause(), void this.cycle(); var i = t > n ? "next" : "prev"; this._slide(i, this._items[t]) } }, e.dispose = function () { o.default(this._element).off(_), o.default.removeData(this._element, "bs.carousel"), this._items = null, this._config = null, this._element = null, this._interval = null, this._isPaused = null, this._isSliding = null, this._activeElement = null, this._indicatorsElement = null }, e._getConfig = function (t) { return t = r({}, b, t), d.typeCheckConfig(p, t, y), t }, e._handleSwipe = function () { var t = Math.abs(this.touchDeltaX); if (!(t <= 40)) { var e = t / this.touchDeltaX; this.touchDeltaX = 0, e > 0 && this.prev(), e < 0 && this.next() } }, e._addEventListeners = function () { var t = this; this._config.keyboard && o.default(this._element).on("keydown.bs.carousel", (function (e) { return t._keydown(e) })), "hover" === this._config.pause && o.default(this._element).on("mouseenter.bs.carousel", (function (e) { return t.pause(e) })).on("mouseleave.bs.carousel", (function (e) { return t.cycle(e) })), this._config.touch && this._addTouchEventListeners() }, e._addTouchEventListeners = function () { var t = this; if (this._touchSupported) { var e = function (e) { t._pointerEvent && E[e.originalEvent.pointerType.toUpperCase()] ? t.touchStartX = e.originalEvent.clientX : t._pointerEvent || (t.touchStartX = e.originalEvent.touches[0].clientX) }, n = function (e) { t._pointerEvent && E[e.originalEvent.pointerType.toUpperCase()] && (t.touchDeltaX = e.originalEvent.clientX - t.touchStartX), t._handleSwipe(), "hover" === t._config.pause && (t.pause(), t.touchTimeout && clearTimeout(t.touchTimeout), t.touchTimeout = setTimeout((function (e) { return t.cycle(e) }), 500 + t._config.interval)) }; o.default(this._element.querySelectorAll(".carousel-item img")).on("dragstart.bs.carousel", (function (t) { return t.preventDefault() })), this._pointerEvent ? (o.default(this._element).on("pointerdown.bs.carousel", (function (t) { return e(t) })), o.default(this._element).on("pointerup.bs.carousel", (function (t) { return n(t) })), this._element.classList.add("pointer-event")) : (o.default(this._element).on("touchstart.bs.carousel", (function (t) { return e(t) })), o.default(this._element).on("touchmove.bs.carousel", (function (e) { return function (e) { e.originalEvent.touches && e.originalEvent.touches.length > 1 ? t.touchDeltaX = 0 : t.touchDeltaX = e.originalEvent.touches[0].clientX - t.touchStartX }(e) })), o.default(this._element).on("touchend.bs.carousel", (function (t) { return n(t) }))) } }, e._keydown = function (t) { if (!/input|textarea/i.test(t.target.tagName)) switch (t.which) { case 37: t.preventDefault(), this.prev(); break; case 39: t.preventDefault(), this.next() } }, e._getItemIndex = function (t) { return this._items = t && t.parentNode ? [].slice.call(t.parentNode.querySelectorAll(".carousel-item")) : [], this._items.indexOf(t) }, e._getItemByDirection = function (t, e) { var n = "next" === t, i = "prev" === t, o = this._getItemIndex(e), a = this._items.length - 1; if ((i && 0 === o || n && o === a) && !this._config.wrap) return e; var s = (o + ("prev" === t ? -1 : 1)) % this._items.length; return -1 === s ? this._items[this._items.length - 1] : this._items[s] }, e._triggerSlideEvent = function (t, e) { var n = this._getItemIndex(t), i = this._getItemIndex(this._element.querySelector(".active.carousel-item")), a = o.default.Event("slide.bs.carousel", { relatedTarget: t, direction: e, from: i, to: n }); return o.default(this._element).trigger(a), a }, e._setActiveIndicatorElement = function (t) { if (this._indicatorsElement) { var e = [].slice.call(this._indicatorsElement.querySelectorAll(".active")); o.default(e).removeClass("active"); var n = this._indicatorsElement.children[this._getItemIndex(t)]; n && o.default(n).addClass("active") } }, e._slide = function (t, e) { var n, i, a, s = this, l = this._element.querySelector(".active.carousel-item"), r = this._getItemIndex(l), u = e || l && this._getItemByDirection(t, l), f = this._getItemIndex(u), c = Boolean(this._interval); if ("next" === t ? (n = "carousel-item-left", i = "carousel-item-next", a = "left") : (n = "carousel-item-right", i = "carousel-item-prev", a = "right"), u && o.default(u).hasClass("active")) this._isSliding = !1; else if (!this._triggerSlideEvent(u, a).isDefaultPrevented() && l && u) { this._isSliding = !0, c && this.pause(), this._setActiveIndicatorElement(u); var h = o.default.Event("slid.bs.carousel", { relatedTarget: u, direction: a, from: r, to: f }); if (o.default(this._element).hasClass("slide")) { o.default(u).addClass(i), d.reflow(u), o.default(l).addClass(n), o.default(u).addClass(n); var g = parseInt(u.getAttribute("data-interval"), 10); g ? (this._config.defaultInterval = this._config.defaultInterval || this._config.interval, this._config.interval = g) : this._config.interval = this._config.defaultInterval || this._config.interval; var m = d.getTransitionDurationFromElement(l); o.default(l).one(d.TRANSITION_END, (function () { o.default(u).removeClass(n + " " + i).addClass("active"), o.default(l).removeClass("active " + i + " " + n), s._isSliding = !1, setTimeout((function () { return o.default(s._element).trigger(h) }), 0) })).emulateTransitionEnd(m) } else o.default(l).removeClass("active"), o.default(u).addClass("active"), this._isSliding = !1, o.default(this._element).trigger(h); c && this.cycle() } }, t._jQueryInterface = function (e) { return this.each((function () { var n = o.default(this).data("bs.carousel"), i = r({}, b, o.default(this).data()); "object" == typeof e && (i = r({}, i, e)); var a = "string" == typeof e ? e : i.slide; if (n || (n = new t(this, i), o.default(this).data("bs.carousel", n)), "number" == typeof e) n.to(e); else if ("string" == typeof a) { if ("undefined" == typeof n[a]) throw new TypeError('No method named "' + a + '"'); n[a]() } else i.interval && i.ride && (n.pause(), n.cycle()) })) }, t._dataApiClickHandler = function (e) { var n = d.getSelectorFromElement(this); if (n) { var i = o.default(n)[0]; if (i && o.default(i).hasClass("carousel")) { var a = r({}, o.default(i).data(), o.default(this).data()), s = this.getAttribute("data-slide-to"); s && (a.interval = !1), t._jQueryInterface.call(o.default(i), a), s && o.default(i).data("bs.carousel").to(s), e.preventDefault() } } }, l(t, null, [{ key: "VERSION", get: function () { return "4.5.3" } }, { key: "Default", get: function () { return b } }]), t }(); o.default(document).on("click.bs.carousel.data-api", "[data-slide], [data-slide-to]", w._dataApiClickHandler), o.default(window).on("load.bs.carousel.data-api", (function () { for (var t = [].slice.call(document.querySelectorAll('[data-ride="carousel"]')), e = 0, n = t.length; e < n; e++) { var i = o.default(t[e]); w._jQueryInterface.call(i, i.data()) } })), o.default.fn[p] = w._jQueryInterface, o.default.fn[p].Constructor = w, o.default.fn[p].noConflict = function () { return o.default.fn[p] = v, w._jQueryInterface }; var T = "collapse", C = o.default.fn[T], S = { toggle: !0, parent: "" }, N = { toggle: "boolean", parent: "(string|element)" }, D = function () { function t(t, e) { this._isTransitioning = !1, this._element = t, this._config = this._getConfig(e), this._triggerArray = [].slice.call(document.querySelectorAll('[data-toggle="collapse"][href="#' + t.id + '"],[data-toggle="collapse"][data-target="#' + t.id + '"]')); for (var n = [].slice.call(document.querySelectorAll('[data-toggle="collapse"]')), i = 0, o = n.length; i < o; i++) { var a = n[i], s = d.getSelectorFromElement(a), l = [].slice.call(document.querySelectorAll(s)).filter((function (e) { return e === t })); null !== s && l.length > 0 && (this._selector = s, this._triggerArray.push(a)) } this._parent = this._config.parent ? this._getParent() : null, this._config.parent || this._addAriaAndCollapsedClass(this._element, this._triggerArray), this._config.toggle && this.toggle() } var e = t.prototype; return e.toggle = function () { o.default(this._element).hasClass("show") ? this.hide() : this.show() }, e.show = function () { var e, n, i = this; if (!this._isTransitioning && !o.default(this._element).hasClass("show") && (this._parent && 0 === (e = [].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter((function (t) { return "string" == typeof i._config.parent ? t.getAttribute("data-parent") === i._config.parent : t.classList.contains("collapse") }))).length && (e = null), !(e && (n = o.default(e).not(this._selector).data("bs.collapse")) && n._isTransitioning))) { var a = o.default.Event("show.bs.collapse"); if (o.default(this._element).trigger(a), !a.isDefaultPrevented()) { e && (t._jQueryInterface.call(o.default(e).not(this._selector), "hide"), n || o.default(e).data("bs.collapse", null)); var s = this._getDimension(); o.default(this._element).removeClass("collapse").addClass("collapsing"), this._element.style[s] = 0, this._triggerArray.length && o.default(this._triggerArray).removeClass("collapsed").attr("aria-expanded", !0), this.setTransitioning(!0); var l = "scroll" + (s[0].toUpperCase() + s.slice(1)), r = d.getTransitionDurationFromElement(this._element); o.default(this._element).one(d.TRANSITION_END, (function () { o.default(i._element).removeClass("collapsing").addClass("collapse show"), i._element.style[s] = "", i.setTransitioning(!1), o.default(i._element).trigger("shown.bs.collapse") })).emulateTransitionEnd(r), this._element.style[s] = this._element[l] + "px" } } }, e.hide = function () { var t = this; if (!this._isTransitioning && o.default(this._element).hasClass("show")) { var e = o.default.Event("hide.bs.collapse"); if (o.default(this._element).trigger(e), !e.isDefaultPrevented()) { var n = this._getDimension(); this._element.style[n] = this._element.getBoundingClientRect()[n] + "px", d.reflow(this._element), o.default(this._element).addClass("collapsing").removeClass("collapse show"); var i = this._triggerArray.length; if (i > 0) for (var a = 0; a < i; a++) { var s = this._triggerArray[a], l = d.getSelectorFromElement(s); if (null !== l) o.default([].slice.call(document.querySelectorAll(l))).hasClass("show") || o.default(s).addClass("collapsed").attr("aria-expanded", !1) } this.setTransitioning(!0); this._element.style[n] = ""; var r = d.getTransitionDurationFromElement(this._element); o.default(this._element).one(d.TRANSITION_END, (function () { t.setTransitioning(!1), o.default(t._element).removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse") })).emulateTransitionEnd(r) } } }, e.setTransitioning = function (t) { this._isTransitioning = t }, e.dispose = function () { o.default.removeData(this._element, "bs.collapse"), this._config = null, this._parent = null, this._element = null, this._triggerArray = null, this._isTransitioning = null }, e._getConfig = function (t) { return (t = r({}, S, t)).toggle = Boolean(t.toggle), d.typeCheckConfig(T, t, N), t }, e._getDimension = function () { return o.default(this._element).hasClass("width") ? "width" : "height" }, e._getParent = function () { var e, n = this; d.isElement(this._config.parent) ? (e = this._config.parent, "undefined" != typeof this._config.parent.jquery && (e = this._config.parent[0])) : e = document.querySelector(this._config.parent); var i = '[data-toggle="collapse"][data-parent="' + this._config.parent + '"]', a = [].slice.call(e.querySelectorAll(i)); return o.default(a).each((function (e, i) { n._addAriaAndCollapsedClass(t._getTargetFromElement(i), [i]) })), e }, e._addAriaAndCollapsedClass = function (t, e) { var n = o.default(t).hasClass("show"); e.length && o.default(e).toggleClass("collapsed", !n).attr("aria-expanded", n) }, t._getTargetFromElement = function (t) { var e = d.getSelectorFromElement(t); return e ? document.querySelector(e) : null }, t._jQueryInterface = function (e) { return this.each((function () { var n = o.default(this), i = n.data("bs.collapse"), a = r({}, S, n.data(), "object" == typeof e && e ? e : {}); if (!i && a.toggle && "string" == typeof e && /show|hide/.test(e) && (a.toggle = !1), i || (i = new t(this, a), n.data("bs.collapse", i)), "string" == typeof e) { if ("undefined" == typeof i[e]) throw new TypeError('No method named "' + e + '"'); i[e]() } })) }, l(t, null, [{ key: "VERSION", get: function () { return "4.5.3" } }, { key: "Default", get: function () { return S } }]), t }(); o.default(document).on("click.bs.collapse.data-api", '[data-toggle="collapse"]', (function (t) { "A" === t.currentTarget.tagName && t.preventDefault(); var e = o.default(this), n = d.getSelectorFromElement(this), i = [].slice.call(document.querySelectorAll(n)); o.default(i).each((function () { var t = o.default(this), n = t.data("bs.collapse") ? "toggle" : e.data(); D._jQueryInterface.call(t, n) })) })), o.default.fn[T] = D._jQueryInterface, o.default.fn[T].Constructor = D, o.default.fn[T].noConflict = function () { return o.default.fn[T] = C, D._jQueryInterface }; var k = "dropdown", A = o.default.fn[k], I = new RegExp("38|40|27"), j = { offset: 0, flip: !0, boundary: "scrollParent", reference: "toggle", display: "dynamic", popperConfig: null }, O = { offset: "(number|string|function)", flip: "boolean", boundary: "(string|element)", reference: "(string|element)", display: "string", popperConfig: "(null|object)" }, x = function () { function t(t, e) { this._element = t, this._popper = null, this._config = this._getConfig(e), this._menu = this._getMenuElement(), this._inNavbar = this._detectNavbar(), this._addEventListeners() } var e = t.prototype; return e.toggle = function () { if (!this._element.disabled && !o.default(this._element).hasClass("disabled")) { var e = o.default(this._menu).hasClass("show"); t._clearMenus(), e || this.show(!0) } }, e.show = function (e) { if (void 0 === e && (e = !1), !(this._element.disabled || o.default(this._element).hasClass("disabled") || o.default(this._menu).hasClass("show"))) { var n = { relatedTarget: this._element }, i = o.default.Event("show.bs.dropdown", n), s = t._getParentFromElement(this._element); if (o.default(s).trigger(i), !i.isDefaultPrevented()) { if (!this._inNavbar && e) { if ("undefined" == typeof a.default) throw new TypeError("Bootstrap's dropdowns require Popper.js (https://popper.js.org/)"); var l = this._element; "parent" === this._config.reference ? l = s : d.isElement(this._config.reference) && (l = this._config.reference, "undefined" != typeof this._config.reference.jquery && (l = this._config.reference[0])), "scrollParent" !== this._config.boundary && o.default(s).addClass("position-static"), this._popper = new a.default(l, this._menu, this._getPopperConfig()) } "ontouchstart" in document.documentElement && 0 === o.default(s).closest(".navbar-nav").length && o.default(document.body).children().on("mouseover", null, o.default.noop), this._element.focus(), this._element.setAttribute("aria-expanded", !0), o.default(this._menu).toggleClass("show"), o.default(s).toggleClass("show").trigger(o.default.Event("shown.bs.dropdown", n)) } } }, e.hide = function () { if (!this._element.disabled && !o.default(this._element).hasClass("disabled") && o.default(this._menu).hasClass("show")) { var e = { relatedTarget: this._element }, n = o.default.Event("hide.bs.dropdown", e), i = t._getParentFromElement(this._element); o.default(i).trigger(n), n.isDefaultPrevented() || (this._popper && this._popper.destroy(), o.default(this._menu).toggleClass("show"), o.default(i).toggleClass("show").trigger(o.default.Event("hidden.bs.dropdown", e))) } }, e.dispose = function () { o.default.removeData(this._element, "bs.dropdown"), o.default(this._element).off(".bs.dropdown"), this._element = null, this._menu = null, null !== this._popper && (this._popper.destroy(), this._popper = null) }, e.update = function () { this._inNavbar = this._detectNavbar(), null !== this._popper && this._popper.scheduleUpdate() }, e._addEventListeners = function () { var t = this; o.default(this._element).on("click.bs.dropdown", (function (e) { e.preventDefault(), e.stopPropagation(), t.toggle() })) }, e._getConfig = function (t) { return t = r({}, this.constructor.Default, o.default(this._element).data(), t), d.typeCheckConfig(k, t, this.constructor.DefaultType), t }, e._getMenuElement = function () { if (!this._menu) { var e = t._getParentFromElement(this._element); e && (this._menu = e.querySelector(".dropdown-menu")) } return this._menu }, e._getPlacement = function () { var t = o.default(this._element.parentNode), e = "bottom-start"; return t.hasClass("dropup") ? e = o.default(this._menu).hasClass("dropdown-menu-right") ? "top-end" : "top-start" : t.hasClass("dropright") ? e = "right-start" : t.hasClass("dropleft") ? e = "left-start" : o.default(this._menu).hasClass("dropdown-menu-right") && (e = "bottom-end"), e }, e._detectNavbar = function () { return o.default(this._element).closest(".navbar").length > 0 }, e._getOffset = function () { var t = this, e = {}; return "function" == typeof this._config.offset ? e.fn = function (e) { return e.offsets = r({}, e.offsets, t._config.offset(e.offsets, t._element) || {}), e } : e.offset = this._config.offset, e }, e._getPopperConfig = function () { var t = { placement: this._getPlacement(), modifiers: { offset: this._getOffset(), flip: { enabled: this._config.flip }, preventOverflow: { boundariesElement: this._config.boundary } } }; return "static" === this._config.display && (t.modifiers.applyStyle = { enabled: !1 }), r({}, t, this._config.popperConfig) }, t._jQueryInterface = function (e) { return this.each((function () { var n = o.default(this).data("bs.dropdown"); if (n || (n = new t(this, "object" == typeof e ? e : null), o.default(this).data("bs.dropdown", n)), "string" == typeof e) { if ("undefined" == typeof n[e]) throw new TypeError('No method named "' + e + '"'); n[e]() } })) }, t._clearMenus = function (e) { if (!e || 3 !== e.which && ("keyup" !== e.type || 9 === e.which)) for (var n = [].slice.call(document.querySelectorAll('[data-toggle="dropdown"]')), i = 0, a = n.length; i < a; i++) { var s = t._getParentFromElement(n[i]), l = o.default(n[i]).data("bs.dropdown"), r = { relatedTarget: n[i] }; if (e && "click" === e.type && (r.clickEvent = e), l) { var u = l._menu; if (o.default(s).hasClass("show") && !(e && ("click" === e.type && /input|textarea/i.test(e.target.tagName) || "keyup" === e.type && 9 === e.which) && o.default.contains(s, e.target))) { var d = o.default.Event("hide.bs.dropdown", r); o.default(s).trigger(d), d.isDefaultPrevented() || ("ontouchstart" in document.documentElement && o.default(document.body).children().off("mouseover", null, o.default.noop), n[i].setAttribute("aria-expanded", "false"), l._popper && l._popper.destroy(), o.default(u).removeClass("show"), o.default(s).removeClass("show").trigger(o.default.Event("hidden.bs.dropdown", r))) } } } }, t._getParentFromElement = function (t) { var e, n = d.getSelectorFromElement(t); return n && (e = document.querySelector(n)), e || t.parentNode }, t._dataApiKeydownHandler = function (e) { if (!(/input|textarea/i.test(e.target.tagName) ? 32 === e.which || 27 !== e.which && (40 !== e.which && 38 !== e.which || o.default(e.target).closest(".dropdown-menu").length) : !I.test(e.which)) && !this.disabled && !o.default(this).hasClass("disabled")) { var n = t._getParentFromElement(this), i = o.default(n).hasClass("show"); if (i || 27 !== e.which) { if (e.preventDefault(), e.stopPropagation(), !i || 27 === e.which || 32 === e.which) return 27 === e.which && o.default(n.querySelector('[data-toggle="dropdown"]')).trigger("focus"), void o.default(this).trigger("click"); var a = [].slice.call(n.querySelectorAll(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)")).filter((function (t) { return o.default(t).is(":visible") })); if (0 !== a.length) { var s = a.indexOf(e.target); 38 === e.which && s > 0 && s--, 40 === e.which && s < a.length - 1 && s++, s < 0 && (s = 0), a[s].focus() } } } }, l(t, null, [{ key: "VERSION", get: function () { return "4.5.3" } }, { key: "Default", get: function () { return j } }, { key: "DefaultType", get: function () { return O } }]), t }(); o.default(document).on("keydown.bs.dropdown.data-api", '[data-toggle="dropdown"]', x._dataApiKeydownHandler).on("keydown.bs.dropdown.data-api", ".dropdown-menu", x._dataApiKeydownHandler).on("click.bs.dropdown.data-api keyup.bs.dropdown.data-api", x._clearMenus).on("click.bs.dropdown.data-api", '[data-toggle="dropdown"]', (function (t) { t.preventDefault(), t.stopPropagation(), x._jQueryInterface.call(o.default(this), "toggle") })).on("click.bs.dropdown.data-api", ".dropdown form", (function (t) { t.stopPropagation() })), o.default.fn[k] = x._jQueryInterface, o.default.fn[k].Constructor = x, o.default.fn[k].noConflict = function () { return o.default.fn[k] = A, x._jQueryInterface }; var P = o.default.fn.modal, R = { backdrop: !0, keyboard: !0, focus: !0, show: !0 }, L = { backdrop: "(boolean|string)", keyboard: "boolean", focus: "boolean", show: "boolean" }, q = function () { function t(t, e) { this._config = this._getConfig(e), this._element = t, this._dialog = t.querySelector(".modal-dialog"), this._backdrop = null, this._isShown = !1, this._isBodyOverflowing = !1, this._ignoreBackdropClick = !1, this._isTransitioning = !1, this._scrollbarWidth = 0 } var e = t.prototype; return e.toggle = function (t) { return this._isShown ? this.hide() : this.show(t) }, e.show = function (t) { var e = this; if (!this._isShown && !this._isTransitioning) { o.default(this._element).hasClass("fade") && (this._isTransitioning = !0); var n = o.default.Event("show.bs.modal", { relatedTarget: t }); o.default(this._element).trigger(n), this._isShown || n.isDefaultPrevented() || (this._isShown = !0, this._checkScrollbar(), this._setScrollbar(), this._adjustDialog(), this._setEscapeEvent(), this._setResizeEvent(), o.default(this._element).on("click.dismiss.bs.modal", '[data-dismiss="modal"]', (function (t) { return e.hide(t) })), o.default(this._dialog).on("mousedown.dismiss.bs.modal", (function () { o.default(e._element).one("mouseup.dismiss.bs.modal", (function (t) { o.default(t.target).is(e._element) && (e._ignoreBackdropClick = !0) })) })), this._showBackdrop((function () { return e._showElement(t) }))) } }, e.hide = function (t) { var e = this; if (t && t.preventDefault(), this._isShown && !this._isTransitioning) { var n = o.default.Event("hide.bs.modal"); if (o.default(this._element).trigger(n), this._isShown && !n.isDefaultPrevented()) { this._isShown = !1; var i = o.default(this._element).hasClass("fade"); if (i && (this._isTransitioning = !0), this._setEscapeEvent(), this._setResizeEvent(), o.default(document).off("focusin.bs.modal"), o.default(this._element).removeClass("show"), o.default(this._element).off("click.dismiss.bs.modal"), o.default(this._dialog).off("mousedown.dismiss.bs.modal"), i) { var a = d.getTransitionDurationFromElement(this._element); o.default(this._element).one(d.TRANSITION_END, (function (t) { return e._hideModal(t) })).emulateTransitionEnd(a) } else this._hideModal() } } }, e.dispose = function () { [window, this._element, this._dialog].forEach((function (t) { return o.default(t).off(".bs.modal") })), o.default(document).off("focusin.bs.modal"), o.default.removeData(this._element, "bs.modal"), this._config = null, this._element = null, this._dialog = null, this._backdrop = null, this._isShown = null, this._isBodyOverflowing = null, this._ignoreBackdropClick = null, this._isTransitioning = null, this._scrollbarWidth = null }, e.handleUpdate = function () { this._adjustDialog() }, e._getConfig = function (t) { return t = r({}, R, t), d.typeCheckConfig("modal", t, L), t }, e._triggerBackdropTransition = function () { var t = this; if ("static" === this._config.backdrop) { var e = o.default.Event("hidePrevented.bs.modal"); if (o.default(this._element).trigger(e), e.isDefaultPrevented()) return; var n = this._element.scrollHeight > document.documentElement.clientHeight; n || (this._element.style.overflowY = "hidden"), this._element.classList.add("modal-static"); var i = d.getTransitionDurationFromElement(this._dialog); o.default(this._element).off(d.TRANSITION_END), o.default(this._element).one(d.TRANSITION_END, (function () { t._element.classList.remove("modal-static"), n || o.default(t._element).one(d.TRANSITION_END, (function () { t._element.style.overflowY = "" })).emulateTransitionEnd(t._element, i) })).emulateTransitionEnd(i), this._element.focus() } else this.hide() }, e._showElement = function (t) { var e = this, n = o.default(this._element).hasClass("fade"), i = this._dialog ? this._dialog.querySelector(".modal-body") : null; this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE || document.body.appendChild(this._element), this._element.style.display = "block", this._element.removeAttribute("aria-hidden"), this._element.setAttribute("aria-modal", !0), this._element.setAttribute("role", "dialog"), o.default(this._dialog).hasClass("modal-dialog-scrollable") && i ? i.scrollTop = 0 : this._element.scrollTop = 0, n && d.reflow(this._element), o.default(this._element).addClass("show"), this._config.focus && this._enforceFocus(); var a = o.default.Event("shown.bs.modal", { relatedTarget: t }), s = function () { e._config.focus && e._element.focus(), e._isTransitioning = !1, o.default(e._element).trigger(a) }; if (n) { var l = d.getTransitionDurationFromElement(this._dialog); o.default(this._dialog).one(d.TRANSITION_END, s).emulateTransitionEnd(l) } else s() }, e._enforceFocus = function () { var t = this; o.default(document).off("focusin.bs.modal").on("focusin.bs.modal", (function (e) { document !== e.target && t._element !== e.target && 0 === o.default(t._element).has(e.target).length && t._element.focus() })) }, e._setEscapeEvent = function () { var t = this; this._isShown ? o.default(this._element).on("keydown.dismiss.bs.modal", (function (e) { t._config.keyboard && 27 === e.which ? (e.preventDefault(), t.hide()) : t._config.keyboard || 27 !== e.which || t._triggerBackdropTransition() })) : this._isShown || o.default(this._element).off("keydown.dismiss.bs.modal") }, e._setResizeEvent = function () { var t = this; this._isShown ? o.default(window).on("resize.bs.modal", (function (e) { return t.handleUpdate(e) })) : o.default(window).off("resize.bs.modal") }, e._hideModal = function () { var t = this; this._element.style.display = "none", this._element.setAttribute("aria-hidden", !0), this._element.removeAttribute("aria-modal"), this._element.removeAttribute("role"), this._isTransitioning = !1, this._showBackdrop((function () { o.default(document.body).removeClass("modal-open"), t._resetAdjustments(), t._resetScrollbar(), o.default(t._element).trigger("hidden.bs.modal") })) }, e._removeBackdrop = function () { this._backdrop && (o.default(this._backdrop).remove(), this._backdrop = null) }, e._showBackdrop = function (t) { var e = this, n = o.default(this._element).hasClass("fade") ? "fade" : ""; if (this._isShown && this._config.backdrop) { if (this._backdrop = document.createElement("div"), this._backdrop.className = "modal-backdrop", n && this._backdrop.classList.add(n), o.default(this._backdrop).appendTo(document.body), o.default(this._element).on("click.dismiss.bs.modal", (function (t) { e._ignoreBackdropClick ? e._ignoreBackdropClick = !1 : t.target === t.currentTarget && e._triggerBackdropTransition() })), n && d.reflow(this._backdrop), o.default(this._backdrop).addClass("show"), !t) return; if (!n) return void t(); var i = d.getTransitionDurationFromElement(this._backdrop); o.default(this._backdrop).one(d.TRANSITION_END, t).emulateTransitionEnd(i) } else if (!this._isShown && this._backdrop) { o.default(this._backdrop).removeClass("show"); var a = function () { e._removeBackdrop(), t && t() }; if (o.default(this._element).hasClass("fade")) { var s = d.getTransitionDurationFromElement(this._backdrop); o.default(this._backdrop).one(d.TRANSITION_END, a).emulateTransitionEnd(s) } else a() } else t && t() }, e._adjustDialog = function () { var t = this._element.scrollHeight > document.documentElement.clientHeight; !this._isBodyOverflowing && t && (this._element.style.paddingLeft = this._scrollbarWidth + "px"), this._isBodyOverflowing && !t && (this._element.style.paddingRight = this._scrollbarWidth + "px") }, e._resetAdjustments = function () { this._element.style.paddingLeft = "", this._element.style.paddingRight = "" }, e._checkScrollbar = function () { var t = document.body.getBoundingClientRect(); this._isBodyOverflowing = Math.round(t.left + t.right) < window.innerWidth, this._scrollbarWidth = this._getScrollbarWidth() }, e._setScrollbar = function () { var t = this; if (this._isBodyOverflowing) { var e = [].slice.call(document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top")), n = [].slice.call(document.querySelectorAll(".sticky-top")); o.default(e).each((function (e, n) { var i = n.style.paddingRight, a = o.default(n).css("padding-right"); o.default(n).data("padding-right", i).css("padding-right", parseFloat(a) + t._scrollbarWidth + "px") })), o.default(n).each((function (e, n) { var i = n.style.marginRight, a = o.default(n).css("margin-right"); o.default(n).data("margin-right", i).css("margin-right", parseFloat(a) - t._scrollbarWidth + "px") })); var i = document.body.style.paddingRight, a = o.default(document.body).css("padding-right"); o.default(document.body).data("padding-right", i).css("padding-right", parseFloat(a) + this._scrollbarWidth + "px") } o.default(document.body).addClass("modal-open") }, e._resetScrollbar = function () { var t = [].slice.call(document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top")); o.default(t).each((function (t, e) { var n = o.default(e).data("padding-right"); o.default(e).removeData("padding-right"), e.style.paddingRight = n || "" })); var e = [].slice.call(document.querySelectorAll(".sticky-top")); o.default(e).each((function (t, e) { var n = o.default(e).data("margin-right"); "undefined" != typeof n && o.default(e).css("margin-right", n).removeData("margin-right") })); var n = o.default(document.body).data("padding-right"); o.default(document.body).removeData("padding-right"), document.body.style.paddingRight = n || "" }, e._getScrollbarWidth = function () { var t = document.createElement("div"); t.className = "modal-scrollbar-measure", document.body.appendChild(t); var e = t.getBoundingClientRect().width - t.clientWidth; return document.body.removeChild(t), e }, t._jQueryInterface = function (e, n) { return this.each((function () { var i = o.default(this).data("bs.modal"), a = r({}, R, o.default(this).data(), "object" == typeof e && e ? e : {}); if (i || (i = new t(this, a), o.default(this).data("bs.modal", i)), "string" == typeof e) { if ("undefined" == typeof i[e]) throw new TypeError('No method named "' + e + '"'); i[e](n) } else a.show && i.show(n) })) }, l(t, null, [{ key: "VERSION", get: function () { return "4.5.3" } }, { key: "Default", get: function () { return R } }]), t }(); o.default(document).on("click.bs.modal.data-api", '[data-toggle="modal"]', (function (t) { var e, n = this, i = d.getSelectorFromElement(this); i && (e = document.querySelector(i)); var a = o.default(e).data("bs.modal") ? "toggle" : r({}, o.default(e).data(), o.default(this).data()); "A" !== this.tagName && "AREA" !== this.tagName || t.preventDefault(); var s = o.default(e).one("show.bs.modal", (function (t) { t.isDefaultPrevented() || s.one("hidden.bs.modal", (function () { o.default(n).is(":visible") && n.focus() })) })); q._jQueryInterface.call(o.default(e), a, this) })), o.default.fn.modal = q._jQueryInterface, o.default.fn.modal.Constructor = q, o.default.fn.modal.noConflict = function () { return o.default.fn.modal = P, q._jQueryInterface }; var F = ["background", "cite", "href", "itemtype", "longdesc", "poster", "src", "xlink:href"], Q = { "*": ["class", "dir", "id", "lang", "role", /^aria-[\w-]*$/i], a: ["target", "href", "title", "rel"], area: [], b: [], br: [], col: [], code: [], div: [], em: [], hr: [], h1: [], h2: [], h3: [], h4: [], h5: [], h6: [], i: [], img: ["src", "srcset", "alt", "title", "width", "height"], li: [], ol: [], p: [], pre: [], s: [], small: [], span: [], sub: [], sup: [], strong: [], u: [], ul: [] }, B = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi, H = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i; function U(t, e, n) { if (0 === t.length) return t; if (n && "function" == typeof n) return n(t); for (var i = (new window.DOMParser).parseFromString(t, "text/html"), o = Object.keys(e), a = [].slice.call(i.body.querySelectorAll("*")), s = function (t, n) { var i = a[t], s = i.nodeName.toLowerCase(); if (-1 === o.indexOf(i.nodeName.toLowerCase())) return i.parentNode.removeChild(i), "continue"; var l = [].slice.call(i.attributes), r = [].concat(e["*"] || [], e[s] || []); l.forEach((function (t) { (function (t, e) { var n = t.nodeName.toLowerCase(); if (-1 !== e.indexOf(n)) return -1 === F.indexOf(n) || Boolean(t.nodeValue.match(B) || t.nodeValue.match(H)); for (var i = e.filter((function (t) { return t instanceof RegExp })), o = 0, a = i.length; o < a; o++)if (n.match(i[o])) return !0; return !1 })(t, r) || i.removeAttribute(t.nodeName) })) }, l = 0, r = a.length; l < r; l++)s(l); return i.body.innerHTML } var M = "tooltip", W = o.default.fn[M], V = new RegExp("(^|\\s)bs-tooltip\\S+", "g"), z = ["sanitize", "whiteList", "sanitizeFn"], K = { animation: "boolean", template: "string", title: "(string|element|function)", trigger: "string", delay: "(number|object)", html: "boolean", selector: "(string|boolean)", placement: "(string|function)", offset: "(number|string|function)", container: "(string|element|boolean)", fallbackPlacement: "(string|array)", boundary: "(string|element)", sanitize: "boolean", sanitizeFn: "(null|function)", whiteList: "object", popperConfig: "(null|object)" }, X = { AUTO: "auto", TOP: "top", RIGHT: "right", BOTTOM: "bottom", LEFT: "left" }, Y = { animation: !0, template: '<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>', trigger: "hover focus", title: "", delay: 0, html: !1, selector: !1, placement: "top", offset: 0, container: !1, fallbackPlacement: "flip", boundary: "scrollParent", sanitize: !0, sanitizeFn: null, whiteList: Q, popperConfig: null }, $ = { HIDE: "hide.bs.tooltip", HIDDEN: "hidden.bs.tooltip", SHOW: "show.bs.tooltip", SHOWN: "shown.bs.tooltip", INSERTED: "inserted.bs.tooltip", CLICK: "click.bs.tooltip", FOCUSIN: "focusin.bs.tooltip", FOCUSOUT: "focusout.bs.tooltip", MOUSEENTER: "mouseenter.bs.tooltip", MOUSELEAVE: "mouseleave.bs.tooltip" }, J = function () { function t(t, e) { if ("undefined" == typeof a.default) throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)"); this._isEnabled = !0, this._timeout = 0, this._hoverState = "", this._activeTrigger = {}, this._popper = null, this.element = t, this.config = this._getConfig(e), this.tip = null, this._setListeners() } var e = t.prototype; return e.enable = function () { this._isEnabled = !0 }, e.disable = function () { this._isEnabled = !1 }, e.toggleEnabled = function () { this._isEnabled = !this._isEnabled }, e.toggle = function (t) { if (this._isEnabled) if (t) { var e = this.constructor.DATA_KEY, n = o.default(t.currentTarget).data(e); n || (n = new this.constructor(t.currentTarget, this._getDelegateConfig()), o.default(t.currentTarget).data(e, n)), n._activeTrigger.click = !n._activeTrigger.click, n._isWithActiveTrigger() ? n._enter(null, n) : n._leave(null, n) } else { if (o.default(this.getTipElement()).hasClass("show")) return void this._leave(null, this); this._enter(null, this) } }, e.dispose = function () { clearTimeout(this._timeout), o.default.removeData(this.element, this.constructor.DATA_KEY), o.default(this.element).off(this.constructor.EVENT_KEY), o.default(this.element).closest(".modal").off("hide.bs.modal", this._hideModalHandler), this.tip && o.default(this.tip).remove(), this._isEnabled = null, this._timeout = null, this._hoverState = null, this._activeTrigger = null, this._popper && this._popper.destroy(), this._popper = null, this.element = null, this.config = null, this.tip = null }, e.show = function () { var t = this; if ("none" === o.default(this.element).css("display")) throw new Error("Please use show on visible elements"); var e = o.default.Event(this.constructor.Event.SHOW); if (this.isWithContent() && this._isEnabled) { o.default(this.element).trigger(e); var n = d.findShadowRoot(this.element), i = o.default.contains(null !== n ? n : this.element.ownerDocument.documentElement, this.element); if (e.isDefaultPrevented() || !i) return; var s = this.getTipElement(), l = d.getUID(this.constructor.NAME); s.setAttribute("id", l), this.element.setAttribute("aria-describedby", l), this.setContent(), this.config.animation && o.default(s).addClass("fade"); var r = "function" == typeof this.config.placement ? this.config.placement.call(this, s, this.element) : this.config.placement, u = this._getAttachment(r); this.addAttachmentClass(u); var f = this._getContainer(); o.default(s).data(this.constructor.DATA_KEY, this), o.default.contains(this.element.ownerDocument.documentElement, this.tip) || o.default(s).appendTo(f), o.default(this.element).trigger(this.constructor.Event.INSERTED), this._popper = new a.default(this.element, s, this._getPopperConfig(u)), o.default(s).addClass("show"), "ontouchstart" in document.documentElement && o.default(document.body).children().on("mouseover", null, o.default.noop); var c = function () { t.config.animation && t._fixTransition(); var e = t._hoverState; t._hoverState = null, o.default(t.element).trigger(t.constructor.Event.SHOWN), "out" === e && t._leave(null, t) }; if (o.default(this.tip).hasClass("fade")) { var h = d.getTransitionDurationFromElement(this.tip); o.default(this.tip).one(d.TRANSITION_END, c).emulateTransitionEnd(h) } else c() } }, e.hide = function (t) { var e = this, n = this.getTipElement(), i = o.default.Event(this.constructor.Event.HIDE), a = function () { "show" !== e._hoverState && n.parentNode && n.parentNode.removeChild(n), e._cleanTipClass(), e.element.removeAttribute("aria-describedby"), o.default(e.element).trigger(e.constructor.Event.HIDDEN), null !== e._popper && e._popper.destroy(), t && t() }; if (o.default(this.element).trigger(i), !i.isDefaultPrevented()) { if (o.default(n).removeClass("show"), "ontouchstart" in document.documentElement && o.default(document.body).children().off("mouseover", null, o.default.noop), this._activeTrigger.click = !1, this._activeTrigger.focus = !1, this._activeTrigger.hover = !1, o.default(this.tip).hasClass("fade")) { var s = d.getTransitionDurationFromElement(n); o.default(n).one(d.TRANSITION_END, a).emulateTransitionEnd(s) } else a(); this._hoverState = "" } }, e.update = function () { null !== this._popper && this._popper.scheduleUpdate() }, e.isWithContent = function () { return Boolean(this.getTitle()) }, e.addAttachmentClass = function (t) { o.default(this.getTipElement()).addClass("bs-tooltip-" + t) }, e.getTipElement = function () { return this.tip = this.tip || o.default(this.config.template)[0], this.tip }, e.setContent = function () { var t = this.getTipElement(); this.setElementContent(o.default(t.querySelectorAll(".tooltip-inner")), this.getTitle()), o.default(t).removeClass("fade show") }, e.setElementContent = function (t, e) { "object" != typeof e || !e.nodeType && !e.jquery ? this.config.html ? (this.config.sanitize && (e = U(e, this.config.whiteList, this.config.sanitizeFn)), t.html(e)) : t.text(e) : this.config.html ? o.default(e).parent().is(t) || t.empty().append(e) : t.text(o.default(e).text()) }, e.getTitle = function () { var t = this.element.getAttribute("data-original-title"); return t || (t = "function" == typeof this.config.title ? this.config.title.call(this.element) : this.config.title), t }, e._getPopperConfig = function (t) { var e = this; return r({}, { placement: t, modifiers: { offset: this._getOffset(), flip: { behavior: this.config.fallbackPlacement }, arrow: { element: ".arrow" }, preventOverflow: { boundariesElement: this.config.boundary } }, onCreate: function (t) { t.originalPlacement !== t.placement && e._handlePopperPlacementChange(t) }, onUpdate: function (t) { return e._handlePopperPlacementChange(t) } }, this.config.popperConfig) }, e._getOffset = function () { var t = this, e = {}; return "function" == typeof this.config.offset ? e.fn = function (e) { return e.offsets = r({}, e.offsets, t.config.offset(e.offsets, t.element) || {}), e } : e.offset = this.config.offset, e }, e._getContainer = function () { return !1 === this.config.container ? document.body : d.isElement(this.config.container) ? o.default(this.config.container) : o.default(document).find(this.config.container) }, e._getAttachment = function (t) { return X[t.toUpperCase()] }, e._setListeners = function () { var t = this; this.config.trigger.split(" ").forEach((function (e) { if ("click" === e) o.default(t.element).on(t.constructor.Event.CLICK, t.config.selector, (function (e) { return t.toggle(e) })); else if ("manual" !== e) { var n = "hover" === e ? t.constructor.Event.MOUSEENTER : t.constructor.Event.FOCUSIN, i = "hover" === e ? t.constructor.Event.MOUSELEAVE : t.constructor.Event.FOCUSOUT; o.default(t.element).on(n, t.config.selector, (function (e) { return t._enter(e) })).on(i, t.config.selector, (function (e) { return t._leave(e) })) } })), this._hideModalHandler = function () { t.element && t.hide() }, o.default(this.element).closest(".modal").on("hide.bs.modal", this._hideModalHandler), this.config.selector ? this.config = r({}, this.config, { trigger: "manual", selector: "" }) : this._fixTitle() }, e._fixTitle = function () { var t = typeof this.element.getAttribute("data-original-title"); (this.element.getAttribute("title") || "string" !== t) && (this.element.setAttribute("data-original-title", this.element.getAttribute("title") || ""), this.element.setAttribute("title", "")) }, e._enter = function (t, e) { var n = this.constructor.DATA_KEY; (e = e || o.default(t.currentTarget).data(n)) || (e = new this.constructor(t.currentTarget, this._getDelegateConfig()), o.default(t.currentTarget).data(n, e)), t && (e._activeTrigger["focusin" === t.type ? "focus" : "hover"] = !0), o.default(e.getTipElement()).hasClass("show") || "show" === e._hoverState ? e._hoverState = "show" : (clearTimeout(e._timeout), e._hoverState = "show", e.config.delay && e.config.delay.show ? e._timeout = setTimeout((function () { "show" === e._hoverState && e.show() }), e.config.delay.show) : e.show()) }, e._leave = function (t, e) { var n = this.constructor.DATA_KEY; (e = e || o.default(t.currentTarget).data(n)) || (e = new this.constructor(t.currentTarget, this._getDelegateConfig()), o.default(t.currentTarget).data(n, e)), t && (e._activeTrigger["focusout" === t.type ? "focus" : "hover"] = !1), e._isWithActiveTrigger() || (clearTimeout(e._timeout), e._hoverState = "out", e.config.delay && e.config.delay.hide ? e._timeout = setTimeout((function () { "out" === e._hoverState && e.hide() }), e.config.delay.hide) : e.hide()) }, e._isWithActiveTrigger = function () { for (var t in this._activeTrigger) if (this._activeTrigger[t]) return !0; return !1 }, e._getConfig = function (t) { var e = o.default(this.element).data(); return Object.keys(e).forEach((function (t) { -1 !== z.indexOf(t) && delete e[t] })), "number" == typeof (t = r({}, this.constructor.Default, e, "object" == typeof t && t ? t : {})).delay && (t.delay = { show: t.delay, hide: t.delay }), "number" == typeof t.title && (t.title = t.title.toString()), "number" == typeof t.content && (t.content = t.content.toString()), d.typeCheckConfig(M, t, this.constructor.DefaultType), t.sanitize && (t.template = U(t.template, t.whiteList, t.sanitizeFn)), t }, e._getDelegateConfig = function () { var t = {}; if (this.config) for (var e in this.config) this.constructor.Default[e] !== this.config[e] && (t[e] = this.config[e]); return t }, e._cleanTipClass = function () { var t = o.default(this.getTipElement()), e = t.attr("class").match(V); null !== e && e.length && t.removeClass(e.join("")) }, e._handlePopperPlacementChange = function (t) { this.tip = t.instance.popper, this._cleanTipClass(), this.addAttachmentClass(this._getAttachment(t.placement)) }, e._fixTransition = function () { var t = this.getTipElement(), e = this.config.animation; null === t.getAttribute("x-placement") && (o.default(t).removeClass("fade"), this.config.animation = !1, this.hide(), this.show(), this.config.animation = e) }, t._jQueryInterface = function (e) { return this.each((function () { var n = o.default(this), i = n.data("bs.tooltip"), a = "object" == typeof e && e; if ((i || !/dispose|hide/.test(e)) && (i || (i = new t(this, a), n.data("bs.tooltip", i)), "string" == typeof e)) { if ("undefined" == typeof i[e]) throw new TypeError('No method named "' + e + '"'); i[e]() } })) }, l(t, null, [{ key: "VERSION", get: function () { return "4.5.3" } }, { key: "Default", get: function () { return Y } }, { key: "NAME", get: function () { return M } }, { key: "DATA_KEY", get: function () { return "bs.tooltip" } }, { key: "Event", get: function () { return $ } }, { key: "EVENT_KEY", get: function () { return ".bs.tooltip" } }, { key: "DefaultType", get: function () { return K } }]), t }(); o.default.fn[M] = J._jQueryInterface, o.default.fn[M].Constructor = J, o.default.fn[M].noConflict = function () { return o.default.fn[M] = W, J._jQueryInterface }; var G = "popover", Z = o.default.fn[G], tt = new RegExp("(^|\\s)bs-popover\\S+", "g"), et = r({}, J.Default, { placement: "right", trigger: "click", content: "", template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>' }), nt = r({}, J.DefaultType, { content: "(string|element|function)" }), it = { HIDE: "hide.bs.popover", HIDDEN: "hidden.bs.popover", SHOW: "show.bs.popover", SHOWN: "shown.bs.popover", INSERTED: "inserted.bs.popover", CLICK: "click.bs.popover", FOCUSIN: "focusin.bs.popover", FOCUSOUT: "focusout.bs.popover", MOUSEENTER: "mouseenter.bs.popover", MOUSELEAVE: "mouseleave.bs.popover" }, ot = function (t) { var e, n; function i() { return t.apply(this, arguments) || this } n = t, (e = i).prototype = Object.create(n.prototype), e.prototype.constructor = e, e.__proto__ = n; var a = i.prototype; return a.isWithContent = function () { return this.getTitle() || this._getContent() }, a.addAttachmentClass = function (t) { o.default(this.getTipElement()).addClass("bs-popover-" + t) }, a.getTipElement = function () { return this.tip = this.tip || o.default(this.config.template)[0], this.tip }, a.setContent = function () { var t = o.default(this.getTipElement()); this.setElementContent(t.find(".popover-header"), this.getTitle()); var e = this._getContent(); "function" == typeof e && (e = e.call(this.element)), this.setElementContent(t.find(".popover-body"), e), t.removeClass("fade show") }, a._getContent = function () { return this.element.getAttribute("data-content") || this.config.content }, a._cleanTipClass = function () { var t = o.default(this.getTipElement()), e = t.attr("class").match(tt); null !== e && e.length > 0 && t.removeClass(e.join("")) }, i._jQueryInterface = function (t) { return this.each((function () { var e = o.default(this).data("bs.popover"), n = "object" == typeof t ? t : null; if ((e || !/dispose|hide/.test(t)) && (e || (e = new i(this, n), o.default(this).data("bs.popover", e)), "string" == typeof t)) { if ("undefined" == typeof e[t]) throw new TypeError('No method named "' + t + '"'); e[t]() } })) }, l(i, null, [{ key: "VERSION", get: function () { return "4.5.3" } }, { key: "Default", get: function () { return et } }, { key: "NAME", get: function () { return G } }, { key: "DATA_KEY", get: function () { return "bs.popover" } }, { key: "Event", get: function () { return it } }, { key: "EVENT_KEY", get: function () { return ".bs.popover" } }, { key: "DefaultType", get: function () { return nt } }]), i }(J); o.default.fn[G] = ot._jQueryInterface, o.default.fn[G].Constructor = ot, o.default.fn[G].noConflict = function () { return o.default.fn[G] = Z, ot._jQueryInterface }; var at = "scrollspy", st = o.default.fn[at], lt = { offset: 10, method: "auto", target: "" }, rt = { offset: "number", method: "string", target: "(string|element)" }, ut = function () { function t(t, e) { var n = this; this._element = t, this._scrollElement = "BODY" === t.tagName ? window : t, this._config = this._getConfig(e), this._selector = this._config.target + " .nav-link," + this._config.target + " .list-group-item," + this._config.target + " .dropdown-item", this._offsets = [], this._targets = [], this._activeTarget = null, this._scrollHeight = 0, o.default(this._scrollElement).on("scroll.bs.scrollspy", (function (t) { return n._process(t) })), this.refresh(), this._process() } var e = t.prototype; return e.refresh = function () { var t = this, e = this._scrollElement === this._scrollElement.window ? "offset" : "position", n = "auto" === this._config.method ? e : this._config.method, i = "position" === n ? this._getScrollTop() : 0; this._offsets = [], this._targets = [], this._scrollHeight = this._getScrollHeight(), [].slice.call(document.querySelectorAll(this._selector)).map((function (t) { var e, a = d.getSelectorFromElement(t); if (a && (e = document.querySelector(a)), e) { var s = e.getBoundingClientRect(); if (s.width || s.height) return [o.default(e)[n]().top + i, a] } return null })).filter((function (t) { return t })).sort((function (t, e) { return t[0] - e[0] })).forEach((function (e) { t._offsets.push(e[0]), t._targets.push(e[1]) })) }, e.dispose = function () { o.default.removeData(this._element, "bs.scrollspy"), o.default(this._scrollElement).off(".bs.scrollspy"), this._element = null, this._scrollElement = null, this._config = null, this._selector = null, this._offsets = null, this._targets = null, this._activeTarget = null, this._scrollHeight = null }, e._getConfig = function (t) { if ("string" != typeof (t = r({}, lt, "object" == typeof t && t ? t : {})).target && d.isElement(t.target)) { var e = o.default(t.target).attr("id"); e || (e = d.getUID(at), o.default(t.target).attr("id", e)), t.target = "#" + e } return d.typeCheckConfig(at, t, rt), t }, e._getScrollTop = function () { return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop }, e._getScrollHeight = function () { return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight) }, e._getOffsetHeight = function () { return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height }, e._process = function () { var t = this._getScrollTop() + this._config.offset, e = this._getScrollHeight(), n = this._config.offset + e - this._getOffsetHeight(); if (this._scrollHeight !== e && this.refresh(), t >= n) { var i = this._targets[this._targets.length - 1]; this._activeTarget !== i && this._activate(i) } else { if (this._activeTarget && t < this._offsets[0] && this._offsets[0] > 0) return this._activeTarget = null, void this._clear(); for (var o = this._offsets.length; o--;) { this._activeTarget !== this._targets[o] && t >= this._offsets[o] && ("undefined" == typeof this._offsets[o + 1] || t < this._offsets[o + 1]) && this._activate(this._targets[o]) } } }, e._activate = function (t) { this._activeTarget = t, this._clear(); var e = this._selector.split(",").map((function (e) { return e + '[data-target="' + t + '"],' + e + '[href="' + t + '"]' })), n = o.default([].slice.call(document.querySelectorAll(e.join(",")))); n.hasClass("dropdown-item") ? (n.closest(".dropdown").find(".dropdown-toggle").addClass("active"), n.addClass("active")) : (n.addClass("active"), n.parents(".nav, .list-group").prev(".nav-link, .list-group-item").addClass("active"), n.parents(".nav, .list-group").prev(".nav-item").children(".nav-link").addClass("active")), o.default(this._scrollElement).trigger("activate.bs.scrollspy", { relatedTarget: t }) }, e._clear = function () { [].slice.call(document.querySelectorAll(this._selector)).filter((function (t) { return t.classList.contains("active") })).forEach((function (t) { return t.classList.remove("active") })) }, t._jQueryInterface = function (e) { return this.each((function () { var n = o.default(this).data("bs.scrollspy"); if (n || (n = new t(this, "object" == typeof e && e), o.default(this).data("bs.scrollspy", n)), "string" == typeof e) { if ("undefined" == typeof n[e]) throw new TypeError('No method named "' + e + '"'); n[e]() } })) }, l(t, null, [{ key: "VERSION", get: function () { return "4.5.3" } }, { key: "Default", get: function () { return lt } }]), t }(); o.default(window).on("load.bs.scrollspy.data-api", (function () { for (var t = [].slice.call(document.querySelectorAll('[data-spy="scroll"]')), e = t.length; e--;) { var n = o.default(t[e]); ut._jQueryInterface.call(n, n.data()) } })), o.default.fn[at] = ut._jQueryInterface, o.default.fn[at].Constructor = ut, o.default.fn[at].noConflict = function () { return o.default.fn[at] = st, ut._jQueryInterface }; var dt = o.default.fn.tab, ft = function () { function t(t) { this._element = t } var e = t.prototype; return e.show = function () { var t = this; if (!(this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && o.default(this._element).hasClass("active") || o.default(this._element).hasClass("disabled"))) { var e, n, i = o.default(this._element).closest(".nav, .list-group")[0], a = d.getSelectorFromElement(this._element); if (i) { var s = "UL" === i.nodeName || "OL" === i.nodeName ? "> li > .active" : ".active"; n = (n = o.default.makeArray(o.default(i).find(s)))[n.length - 1] } var l = o.default.Event("hide.bs.tab", { relatedTarget: this._element }), r = o.default.Event("show.bs.tab", { relatedTarget: n }); if (n && o.default(n).trigger(l), o.default(this._element).trigger(r), !r.isDefaultPrevented() && !l.isDefaultPrevented()) { a && (e = document.querySelector(a)), this._activate(this._element, i); var u = function () { var e = o.default.Event("hidden.bs.tab", { relatedTarget: t._element }), i = o.default.Event("shown.bs.tab", { relatedTarget: n }); o.default(n).trigger(e), o.default(t._element).trigger(i) }; e ? this._activate(e, e.parentNode, u) : u() } } }, e.dispose = function () { o.default.removeData(this._element, "bs.tab"), this._element = null }, e._activate = function (t, e, n) { var i = this, a = (!e || "UL" !== e.nodeName && "OL" !== e.nodeName ? o.default(e).children(".active") : o.default(e).find("> li > .active"))[0], s = n && a && o.default(a).hasClass("fade"), l = function () { return i._transitionComplete(t, a, n) }; if (a && s) { var r = d.getTransitionDurationFromElement(a); o.default(a).removeClass("show").one(d.TRANSITION_END, l).emulateTransitionEnd(r) } else l() }, e._transitionComplete = function (t, e, n) { if (e) { o.default(e).removeClass("active"); var i = o.default(e.parentNode).find("> .dropdown-menu .active")[0]; i && o.default(i).removeClass("active"), "tab" === e.getAttribute("role") && e.setAttribute("aria-selected", !1) } if (o.default(t).addClass("active"), "tab" === t.getAttribute("role") && t.setAttribute("aria-selected", !0), d.reflow(t), t.classList.contains("fade") && t.classList.add("show"), t.parentNode && o.default(t.parentNode).hasClass("dropdown-menu")) { var a = o.default(t).closest(".dropdown")[0]; if (a) { var s = [].slice.call(a.querySelectorAll(".dropdown-toggle")); o.default(s).addClass("active") } t.setAttribute("aria-expanded", !0) } n && n() }, t._jQueryInterface = function (e) { return this.each((function () { var n = o.default(this), i = n.data("bs.tab"); if (i || (i = new t(this), n.data("bs.tab", i)), "string" == typeof e) { if ("undefined" == typeof i[e]) throw new TypeError('No method named "' + e + '"'); i[e]() } })) }, l(t, null, [{ key: "VERSION", get: function () { return "4.5.3" } }]), t }(); o.default(document).on("click.bs.tab.data-api", '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]', (function (t) { t.preventDefault(), ft._jQueryInterface.call(o.default(this), "show") })), o.default.fn.tab = ft._jQueryInterface, o.default.fn.tab.Constructor = ft, o.default.fn.tab.noConflict = function () { return o.default.fn.tab = dt, ft._jQueryInterface }; var ct = o.default.fn.toast, ht = { animation: "boolean", autohide: "boolean", delay: "number" }, gt = { animation: !0, autohide: !0, delay: 500 }, mt = function () { function t(t, e) { this._element = t, this._config = this._getConfig(e), this._timeout = null, this._setListeners() } var e = t.prototype; return e.show = function () { var t = this, e = o.default.Event("show.bs.toast"); if (o.default(this._element).trigger(e), !e.isDefaultPrevented()) { this._clearTimeout(), this._config.animation && this._element.classList.add("fade"); var n = function () { t._element.classList.remove("showing"), t._element.classList.add("show"), o.default(t._element).trigger("shown.bs.toast"), t._config.autohide && (t._timeout = setTimeout((function () { t.hide() }), t._config.delay)) }; if (this._element.classList.remove("hide"), d.reflow(this._element), this._element.classList.add("showing"), this._config.animation) { var i = d.getTransitionDurationFromElement(this._element); o.default(this._element).one(d.TRANSITION_END, n).emulateTransitionEnd(i) } else n() } }, e.hide = function () { if (this._element.classList.contains("show")) { var t = o.default.Event("hide.bs.toast"); o.default(this._element).trigger(t), t.isDefaultPrevented() || this._close() } }, e.dispose = function () { this._clearTimeout(), this._element.classList.contains("show") && this._element.classList.remove("show"), o.default(this._element).off("click.dismiss.bs.toast"), o.default.removeData(this._element, "bs.toast"), this._element = null, this._config = null }, e._getConfig = function (t) { return t = r({}, gt, o.default(this._element).data(), "object" == typeof t && t ? t : {}), d.typeCheckConfig("toast", t, this.constructor.DefaultType), t }, e._setListeners = function () { var t = this; o.default(this._element).on("click.dismiss.bs.toast", '[data-dismiss="toast"]', (function () { return t.hide() })) }, e._close = function () { var t = this, e = function () { t._element.classList.add("hide"), o.default(t._element).trigger("hidden.bs.toast") }; if (this._element.classList.remove("show"), this._config.animation) { var n = d.getTransitionDurationFromElement(this._element); o.default(this._element).one(d.TRANSITION_END, e).emulateTransitionEnd(n) } else e() }, e._clearTimeout = function () { clearTimeout(this._timeout), this._timeout = null }, t._jQueryInterface = function (e) { return this.each((function () { var n = o.default(this), i = n.data("bs.toast"); if (i || (i = new t(this, "object" == typeof e && e), n.data("bs.toast", i)), "string" == typeof e) { if ("undefined" == typeof i[e]) throw new TypeError('No method named "' + e + '"'); i[e](this) } })) }, l(t, null, [{ key: "VERSION", get: function () { return "4.5.3" } }, { key: "DefaultType", get: function () { return ht } }, { key: "Default", get: function () { return gt } }]), t }(); o.default.fn.toast = mt._jQueryInterface, o.default.fn.toast.Constructor = mt, o.default.fn.toast.noConflict = function () { return o.default.fn.toast = ct, mt._jQueryInterface }, t.Alert = h, t.Button = m, t.Carousel = w, t.Collapse = D, t.Dropdown = x, t.Modal = q, t.Popover = ot, t.Scrollspy = ut, t.Tab = ft, t.Toast = mt, t.Tooltip = J, t.Util = d, Object.defineProperty(t, "__esModule", { value: !0 }) }));
/**
* @module Regula
* @description An annotation-based form-validation framework in Javascript
* @license BSD
* @version 1.3.4
* @copyright Robert Nyman, http://www.robertnyman.com
*/
(function (e, t) { typeof define == "function" && define.amd ? define("utils/MapUtils", t) : (typeof e.regulaModules == "undefined" && (e.regulaModules = {}), e.regulaModules.MapUtils = t()) })(this, function () { return { iterateOverMap: function (e, t) { var n = 0; for (var r in e) e.hasOwnProperty(r) && r !== "__size__" && (t.call(e, r, e[r], n), n++) }, exists: function (e, t) { var n = !1, r = 0; while (!n && r < e.length) n = t == e[r], r++; return n }, put: function (e, t, n) { e.__size__ || (e.__size__ = 0), e[t] || e.__size__++, e[t] = n }, isEmpty: function (e) { for (var t in e) if (e.hasOwnProperty(t)) return !1; return !0 } } }), function (e, t) { typeof define == "function" && define.amd ? define("utils/DOMUtils", t) : (typeof e.regulaModules == "undefined" && (e.regulaModules = {}), e.regulaModules.DOMUtils = t()) }(this, function () { function t(e, t, n, r) { var i = t == "*" && e.all ? e.all : e.getElementsByTagName(t), s = [], o = typeof r != "undefined" ? new RegExp("(^|\\s)" + r + "(\\s|$)") : null, u, a; for (var f = 0; f < i.length; f++)u = i[f], a = u.getAttribute && u.getAttribute(n), typeof a == "string" && a.length > 0 && (typeof r == "undefined" || o && o.test(a)) && s.push(u); return s } function n(e, t) { var n = e.getAttribute && e.getAttribute(t) || null; if (!n) { var r = e.attributes; for (var i = 0; i < r.length; i++)r[i].nodeName === t && (n = r[i].nodeValue) } return n } function r() { return "regula-generated-" + Math.floor(Math.random() * 1e6) } function i() { return typeof document.createElement("input").checkValidity == "function" } var e = { form: "The form", select: "The select box", textarea: "The text area", checkbox: "The checkbox", radio: "The radio button", text: "The text field", password: "The password", email: "The email", url: "The URL", number: "The number", datetime: "The datetime", "datetime-local": "The local datetime", date: "The date", month: "The month", time: "The time", week: "The week", range: "The range", tel: "The telephone number", color: "The color" }; return { friendlyInputNames: e, getElementsByAttribute: t, getAttributeValueForElement: n, generateRandomId: r, supportsHTML5Validation: i } }), function (e, t) { typeof define == "function" && define.amd ? define("service/GroupService", t) : (typeof e.regulaModules == "undefined" && (e.regulaModules = {}), e.regulaModules.GroupService = t()) }(this, function () { var e = { Default: 0 }, t = { 0: "Default" }, n = [], r = 1; return { Group: e, ReverseGroup: t, deletedGroupIndices: n, firstCustomGroupIndex: r } }), function (e, t) { typeof define == "function" && define.amd ? define("utils/ArrayUtils", t) : (typeof e.regulaModules == "undefined" && (e.regulaModules = {}), e.regulaModules.ArrayUtils = t()) }(this, function () { function e(e, t) { var n = ""; for (var r = 0; r < e.length; r++)n += e[r] + t; return n.replace(new RegExp(t + "$"), "") } return { explode: e } }), function (e, t) { typeof define == "function" && define.amd ? define("service/ExceptionService", ["utils/ArrayUtils"], t) : (typeof e.regulaModules == "undefined" && (e.regulaModules = {}), e.regulaModules.ExceptionService = t(e.regulaModules.ArrayUtils)) }(this, function (e) { function i(e, t, n) { var r = ""; return e != null ? (r = e.id, t == "" || t == null || t == undefined ? r += ": " : r += "." + t + ": ") : t != "" && t != null && t != undefined && (r = "@" + t + ": "), r + n } function s(t) { var n = "Function received: {"; for (var r in t) t.hasOwnProperty(r) && (typeof t[r] == "string" ? n += r + ": " + t[r] + ", " : t[r] instanceof Array && (n += r + ": [" + e.explode(t[r], ", ") + "], ")); return n = n.replace(/, $/, "") + "}", n } var t = { IllegalArgumentException: function (e) { this.name = "IllegalArgumentException", this.message = e }, ConstraintDefinitionException: function (e) { this.name = "ConstraintDefinitionException", this.message = e }, BindException: function (e) { this.name = "BindException", this.message = e }, MissingFeatureException: function (e) { this.name = "MissingFeatureException", this.message = e } }; for (var n in t) if (t.hasOwnProperty(n)) { var r = t[n]; r.prototype = new Error, r.prototype.constructor = r } return { Exception: t, generateExceptionMessage: i, explodeParameters: s } }), function (e, t) { typeof define == "function" && define.amd ? define("service/ValidationService", ["utils/DOMUtils", "utils/MapUtils", "service/GroupService", "service/ExceptionService", "utils/ArrayUtils"], t) : (typeof e.regulaModules == "undefined" && (e.regulaModules = {}), e.regulaModules.ValidationService = t(e.regulaModules.DOMUtils, e.regulaModules.MapUtils, e.regulaModules.GroupService, e.regulaModules.ExceptionService, e.regulaModules.ArrayUtils)) }(this, function (e, t, n, r, i) { function h(e) { for (var t in e) e.hasOwnProperty(t) && v(t, e) } function p(e) { s = e.config, o = e.ReverseConstraint, u = e.constraintDefinitions, a = e.boundConstraints } function v(e, t) { var n = t[e], i = e.replace(/(^[A-Z]+)/, function (e) { return e.toLowerCase() }); n.async ? c[i] = function (t, i, s) { if (typeof s == "undefined") throw new r.Exception.IllegalArgumentException(e + " is an asynchronous constraint, but you have not provided a callback."); return n.validator.call(t, i, c, s) } : c[i] = function (e, t) { return n.validator.call(e, t, c) } } function m(e, n, r, i) { function a(n, r) { var i = {}; for (var s in n) n.hasOwnProperty(s) && s != "__size__" && t.put(i, s, n[s]); if (r.length > 0) for (var s in e) e.hasOwnProperty(s) && s != "__size__" && t.put(i, s, e[s]); return i } function f(e, t, n, i) { var s = o[y.constraintType], a = W(t, s, i), f = { group: n, constraintName: e.constraintName, custom: u[s].custom, compound: u[s].compound, async: u[s].async, constraintParameters: y.params, failingElements: e.failingElements, message: a }; return r.reportAsSingleViolation || (f.composingConstraintViolations = e.composingConstraintViolations || []), f } var l = [], c = []; for (var h = 0; h < r.composingConstraints.length; h++) { var p = r.composingConstraints[h], d = o[p.constraintType]; u[d].async ? c.push(p) : l.push(p) } var v = null, m = this; if (g(this, e)) { if (l.length > 0) { v = []; for (var h = 0; h < l.length; h++) { var y = l[h], b = o[y.constraintType], w = a(y.params, r.params), E = U(n, m.id, b, w); if (!E.constraintPassed) { var S = f(E, m.id, n, w); if (s.enableHTML5Validation) for (var x = 0; x < E.failingElements.length; x++)E.failingElements[x].setCustomValidity(S.message); v.push(S) } } } if (c.length > 0) { v === null && (v = []); var T = 0; for (var h = 0; h < c.length; h++) { var y = c[h], b = o[y.constraintType], w = a(y.params, r.params); z(n, m.id, b, w, N) } function N(e) { if (!e.constraintPassed) { var t = f(e, m.id, n, w); if (s.enableHTML5Validation) for (var r = 0; r < e.failingElements.length; r++)e.failingElements[r].setCustomValidity(t.message); v.push(t) } T++, T === c.length && i(v) } } } else v = []; return v } function g(e, t) { var n = s.validateEmptyFields; return typeof t["ignoreEmpty"] != "undefined" && (n = !t.ignoreEmpty), !d.blank.call(e) || !!n } function y(e) { var t = { YMD: { Year: 0, Month: 1, Day: 2 }, MDY: { Month: 0, Day: 1, Year: 2 }, DMY: { Day: 0, Month: 1, Year: 2 } }, n = t[e.format], r = e.separator; typeof e["separator"] == "undefined" && (r = /\//.test(this.value) ? "/" : /\./.test(this.value) ? "." : / /.test(this.value) ? " " : /[^0-9]+/); var i = this.value.split(r), s = new Date(i[n.Year], i[n.Month] - 1, i[n.Day]), o = new Date; return typeof e["date"] != "undefined" && (i = e.date.split(r), o = new Date(i[n.Year], i[n.Month] - 1, i[n.Day])), { dateToValidate: s, dateToTestAgainst: o } } function b(e) { return function (t, n, r) { var i = !0; return g(this, t) && (i = e.call(this, t, n, r)), i } } function w() { return !this.validity.typeMismatch } function E(e) { function t(e) { var t = e.groups || null, n = e.elementIds || null, r = (typeof e.constraintType == "undefined" ? null : e.constraintType) || null, i = ""; return i += t == null ? "0" : "1", i += n == null ? "0" : "1", i += r == null ? "0" : "1", i } f = {}, l = {}; var r = { "000": S, "001": x, "010": T, "011": N, 100: C, 101: k, 110: L, 111: A }; if (!e || typeof e == "undefined") e = {}; typeof e.independent == "undefined" && (e.independent = !0), typeof e.constraintType != "undefined" && (e.constraintType = o[e.constraintType]); if (typeof e.groups != "undefined") { var i = e.groups; e.groups = []; for (var s = 0; s < i.length; s++)e.groups.push(n.ReverseGroup[i[s]]) } if (typeof e.elements != "undefined") { e.elementIds = []; for (var s = 0; s < e.elements.length; s++)e.elementIds.push(e.elements[s].id) } else typeof e.elementId != "undefined" && (e.elementIds = [e.elementId]); return r[t(e)](e) } function S(e) { var t = { asyncContexts: [], syncContexts: [] }; for (var n in a) if (a.hasOwnProperty(n)) { var r = a[n]; for (var i in r) if (r.hasOwnProperty(i)) if (!document.getElementById(i)) delete r[i]; else { var s = r[i]; for (var o in s) if (s.hasOwnProperty(o)) { var u = H(n, i, o); u.async ? t.asyncContexts.push(u) : t.syncContexts.push(u) } } } return t = M(t), D(t, e) } function x(e) { var t = { asyncContexts: [], syncContexts: [] }; for (var n in a) if (a.hasOwnProperty(n)) { var r = a[n]; for (var i in r) if (r.hasOwnProperty(i)) { var s = r[i]; if (s[e.constraintType]) { var o = H(n, i, e.constraintType); o.async ? t.asyncContexts.push(o) : t.syncContexts.push(o) } } } return t = M(t), D(t, e) } function T(e) { var t = {}, n = { asyncContexts: [], syncContexts: [] }; for (var s in a) if (a.hasOwnProperty(s)) { var o = a[s]; for (var u = 0; u < e.elementIds.length; u++) { var f = e.elementIds[u]; typeof t[f] == "undefined" && (t[f] = 0); var l = o[f]; if (typeof l != "undefined") { t[f]++; for (var c in l) if (l.hasOwnProperty(c)) { var h = H(s, f, c); h.async ? n.asyncContexts.push(h) : n.syncContexts.push(h) } } } } var p = []; for (var f in t) t.hasOwnProperty(f) && t[f] === 0 && p.push(f); if (p.length > 0) throw new r.Exception.IllegalArgumentException("No constraints have been bound to the specified elements: " + i.explode(p) + ". " + r.explodeParameters(e)); return n = M(n), D(n, e) } function N(e) { var t = [], n = { asyncContexts: [], syncContexts: [] }; for (var s in a) if (a.hasOwnProperty(s)) { var o = a[s]; for (var u = 0; u < e.elementIds.length; u++) { var f = e.elementIds[u], l = o[f]; if (typeof l != "undefined") { var c = H(s, f, e.constraintType); c.async ? n.asyncContexts.push(c) : n.syncContexts.push(c) } else t.push(f) } } if (t.length > 0) throw new r.Exception.IllegalArgumentException("No constraints have been bound to the specified elements: " + i.explode(t) + ". " + r.explodeParameters(e)); return n = M(n), D(n, e) } function C(e) { var t = !1, n = { groupedContexts: {} }, i = 0; while (i < e.groups.length) { var s = e.groups[i], o = a[s]; if (typeof o == "undefined") throw new r.Exception.IllegalArgumentException("Undefined group in group list. " + r.explodeParameters(e)); for (var u in o) if (o.hasOwnProperty(u)) { var f = o[u]; for (var l in f) if (f.hasOwnProperty(l)) { var c = H(s, u, l); n.groupedContexts[s] || (n.groupedContexts[s] = { asyncContexts: [], syncContexts: [] }), c.async ? (t = !0, n.groupedContexts[s].asyncContexts.push(c)) : n.groupedContexts[s].syncContexts.push(c) } } i++ } var h = _(n); return e.groups = h.groups, n = h.uniqueConstraintsToValidate, P(e, n, t) } function k(e) { var t = !1, n = { groupedContexts: {} }, i = 0; while (i < e.groups.length) { var s = e.groups[i], o = a[s]; if (typeof o == "undefined") throw new r.Exception.IllegalArgumentException("Undefined group in group list. " + r.explodeParameters(e)); var u = !1; for (var f in o) if (o.hasOwnProperty(f)) { var l = o[f]; if (l[e.constraintType]) { u = !0; var c = H(s, f, e.constraintType); n.groupedContexts[s] || (n.groupedContexts[s] = { asyncContexts: [], syncContexts: [] }), c.async ? (t = !0, n.groupedContexts[s].asyncContexts.push(c)) : n.groupedContexts[s].syncContexts.push(c) } } if (!u) throw new r.Exception.IllegalArgumentException("Constraint " + e.constraintType + " has not been bound to any element under group " + s + ". " + r.explodeParameters(e)); i++ } var h = _(n); return e.groups = h.groups, n = h.uniqueConstraintsToValidate, P(e, n, t) } function L(e) { var t = [], n = [], s = !1, o = { groupedContexts: {} }, u = 0; while (u < e.groups.length) { var f = e.groups[u], l = a[f]; if (!l) throw new r.Exception.IllegalArgumentException("Undefined group in group list. " + r.explodeParameters(e)); for (var c = 0; c < e.elementIds.length; c++) { var h = e.elementIds[c], p = l[h]; if (p) { for (var d in p) if (p.hasOwnProperty(d)) { var v = H(f, h, d); o.groupedContexts[f] || (o.groupedContexts[f] = { asyncContexts: [], syncContexts: [] }), v.async ? (s = !0, o.groupedContexts[f].asyncContexts.push(v)) : o.groupedContexts[f].syncContexts.push(v) } } else t.push(f), n.push(h) } u++ } if (t.length > 0) throw new r.Exception.IllegalArgumentException("The following elements: " + i.explode(n) + " were not found in one or more of the following group(s): [" + i.explode(t, ",").replace(/,/g, ", ") + "]. " + r.explodeParameters(e)); var m = _(o); return e.groups = m.groups, o = m.uniqueConstraintsToValidate, P(e, o, s) } function A(e) { var t = !1, n = { groupedContexts: {} }, r = 0; while (r < e.groups.length) { var i = e.groups[r]; for (var s = 0; s < e.elementIds.length; s++) { var o = e.elementIds[s], u = H(i, o, e.constraintType); n.groupedContexts[i] || (n.groupedContexts[i] = { asyncContexts: [], syncContexts: [] }), u.async ? (t = !0, n.groupedContexts[i].asyncContexts.push(u)) : n.groupedContexts[i].syncContexts.push(u) } r++ } var a = _(n); return e.groups = a.groups, n = a.uniqueConstraintsToValidate, P(e, n, t) } function O(e) { var t = !0; f[e.elementId] || (f[e.elementId] = {}); var n = document.getElementById(e.elementId).cloneNode(!1), r = n.name.replace(/\s/g, ""); return typeof n.type != "undefined" && n.type.toLowerCase() === "radio" && r !== "" ? l[r] || (l[r] = {}) : l[r] = {}, !f[e.elementId][e.elementConstraint] && !l[r][e.elementConstraint] && (t = !1, f[e.elementId][e.elementConstraint] = !0, typeof n.type != "undefined" && n.type.toLowerCase() === "radio" && r !== "" && (l[r][e.elementConstraint] = !0)), t } function M(e) { var t = { asyncContexts: [], syncContexts: [] }; for (var n = 0; n < e.syncContexts.length; n++) { var r = e.syncContexts[n]; O(r) || t.syncContexts.push(r) } for (var n = 0; n < e.asyncContexts.length; n++) { var r = e.asyncContexts[n]; O(r) || t.asyncContexts.push(r) } return t } function _(e) { var t = [], n = { groupedContexts: {} }; for (var r in e.groupedContexts) if (e.groupedContexts.hasOwnProperty(r)) { for (var i = 0; i < e.groupedContexts[r].syncContexts.length; i++) { var s = e.groupedContexts[r].syncContexts[i]; O(s) || (n.groupedContexts[r] || (n.groupedContexts[r] = { asyncContexts: [], syncContexts: [] }), n.groupedContexts[r].syncContexts.push(s), t.indexOf(r) == -1 && t.push(r)) } for (var i = 0; i < e.groupedContexts[r].asyncContexts.length; i++) { var s = e.groupedContexts[r].asyncContexts[i]; O(s) || (n.groupedContexts[r] || (n.groupedContexts[r] = { asyncContexts: [], syncContexts: [] }), n.groupedContexts[r].asyncContexts.push(s), t.indexOf(r) == -1 && t.push(r)) } } return { groups: t, uniqueConstraintsToValidate: n } } function D(e, t) { var n = []; e.syncContexts.length > 0 && (n = B(e)); if (e.asyncContexts.length > 0) { if (!t.callback) throw new r.Exception.IllegalArgumentException("One or more constraints to be validated are asynchronous, but a callback has not been provided."); j(e, function (e) { n.length > 0 ? n = n.concat(e) : n = e, t.callback(n) }) } else t.callback && t.callback(n); return n } function P(e, t, n) { var i = F(e.groups, e.independent, t); if (n) { if (!e.callback) throw new r.Exception.IllegalArgumentException("One or more constraints to be validated are asynchronous, but a callback has not been provided."); if (!e.independent && i.length > 0) { var s = i[0].group, o = t.groupedContexts[s]; t.groupedContexts = {}, t.groupedContexts[s] = o } I(e.groups, e.independent, t, function (t) { i.length > 0 ? i = i.concat(t) : i = t, e.callback(i) }) } else e.callback && e.callback(i); return i } function H(e, t, n) { var i = a[e]; if (!i) throw new r.Exception.IllegalArgumentException("Undefined group in group list (group: " + e + ", elementId: " + t + ", constraint: " + n + ")"); var s = i[t]; if (!s) throw new r.Exception.IllegalArgumentException("No constraints have been defined for the element with id: " + t + " in group " + e); var o = s[n]; if (!o) throw new r.Exception.IllegalArgumentException("Constraint " + n + " in group " + e + " hasn't been bound to the element with id " + t); return { group: e, elementId: t, elementConstraint: n, params: o, async: u[n].async } } function B(e) { var t = [], n = 0; while (n < e.syncContexts.length) { var r = e.syncContexts[n], i = q(r.group, r.elementId, r.elementConstraint, r.params); i && t.push(i), n++ } return t } function j(e, t) { function o(i) { r++, i && n.push(i), r === e.asyncContexts.length && t(n) } var n = [], r = 0; for (var i = 0; i < e.asyncContexts.length; i++) { var s = e.asyncContexts[i]; R(s.group, s.elementId, s.elementConstraint, s.params, o) } } function F(e, t, n) { var r = [], i = 0, s = !0; while (i < e.length && s) { var o = e[i], u = n.groupedContexts[o].syncContexts; for (var a = 0; a < u.length; a++) { var f = u[a], l = q(f.group, f.elementId, f.elementConstraint, f.params); l && r.push(l) } i++, s = r.length == 0 || t && r.length != 0 } return r } function I(e, t, n, r) { var i = [], s = !0; (function o(u) { if (u < e.length && s) { var a = e[u], f = n.groupedContexts[a].asyncContexts, l = 0; for (var c = 0; c < f.length; c++) { var h = f[c]; R(h.group, h.elementId, h.elementConstraint, h.params, p) } function p(e) { l++, e && i.push(e), l === f.length && (s = i.length === 0 || t && i.length != 0, o(++u)) } } else r(i) })(0) } function q(e, t, n, r) { var i, o = U(e, t, n, r), a = ""; o.constraintPassed || (a = W(t, n, r), i = { group: e, constraintName: n, formSpecific: u[n].formSpecific, custom: u[n].custom, compound: u[n].compound, async: u[n].async, composingConstraintViolations: o.composingConstraintViolations || [], constraintParameters: r, failingElements: o.failingElements, message: a }); if (s.enableHTML5Validation) for (var f = 0; f < o.failingElements.length; f++)o.failingElements[f].setCustomValidity(""); return i } function R(e, t, n, r, i) { var o; z(e, t, n, r, function (a) { var f = ""; a.constraintPassed || (f = W(t, n, r), o = { group: e, constraintName: n, formSpecific: u[n].formSpecific, custom: u[n].custom, compound: u[n].compound, async: u[n].async, composingConstraintViolations: a.composingConstraintViolations || [], constraintParameters: r, failingElements: a.failingElements, message: f }); if (s.enableHTML5Validation) for (var l = 0; l < a.failingElements.length; l++)a.failingElements[l].setCustomValidity(""); i(o) }) } function U(t, n, r, i) { var s = !1, o = [], a = document.getElementById(n), f = []; u[r].formSpecific ? (o = u[r].validator.call(a, i, c), s = o.length == 0) : u[r].compound ? (f = u[r].validator.call(a, i, t, u[r], null), s = f.length == 0, s || o.push(a)) : (s = u[r].validator.call(a, i, c), s || o.push(a)); var l = a.cloneNode(!1).name.replace(/\s/g, ""), h = a.cloneNode(!1).type; typeof h != "undefined" && h.toLowerCase() === "radio" && l !== "" && (o = e.getElementsByAttribute(document.body, "input", "name", l.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"))); var p = { constraintName: r, constraintPassed: s, failingElements: o }; return u[r].reportAsSingleViolation || (p.composingConstraintViolations = f), p } function z(t, n, r, i, s) { function a(t, n, i, s) { var a = o.cloneNode(!1).name.replace(/\s/g, ""), f = o.cloneNode(!1).type; typeof f != "undefined" && f.toLowerCase() === "radio" && a !== "" && (i = e.getElementsByAttribute(document.body, "input", "name", a)); var l = { constraintName: r, constraintPassed: t, failingElements: i }; u[r].reportAsSingleViolation || (l.composingConstraintViolations = n), s(l) } var o = document.getElementById(n); u[r].formSpecific ? u[r].validator.call(o, i, c, function (e) { a(e.length === 0, null, e, s) }) : u[r].compound ? u[r].validator.call(o, i, t, u[r], function (e) { var t = [], n = e.length === 0; n || t.push(o), a(n, e, t, s) }) : u[r].validator.call(o, i, c, function (e) { var t = []; e || t.push(o), a(e, null, t, s) }) } function W(t, n, r) { var i = document.getElementById(t), s = ""; r.message ? s = r.message : r.msg ? s = r.msg : s = u[n].defaultMessage; for (var o in r) if (r.hasOwnProperty(o)) { var a = new RegExp("{" + o + "}", "g"); s = s.replace(a, r[o]) } if (u[n].compound && typeof u[n].composingConstraints != "undefined") for (var f = 0; f < u[n].composingConstraints.length; f++) { var l = u[n].composingConstraints[f]; for (var o in l.params) if (l.params.hasOwnProperty(o)) { var a = new RegExp("{" + o + "}", "g"); s = s.replace(a, l.params[o]) } } if (/{label}/.test(s)) { var c = e.friendlyInputNames[i.cloneNode(!1).tagName.toLowerCase()]; c || (c = e.friendlyInputNames[i.cloneNode(!1).type.toLowerCase()]), s = s.replace(/{label}/, c), s = s.replace(/{flags}/g, "") } return s = s.replace(/\\\"/g, '"'), s } var s = {}, o = {}, u = {}, a = {}, f = {}, l = {}, c = {}, d = { checked: function (t) { var n = !1; if (this.type.toLowerCase() === "radio" && this.name.replace(/\s/g, "") !== "") { var r = e.getElementsByAttribute(document.body, "input", "name", this.name.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&")), i = 0; while (i < r.length && !n) n = r[i].checked, i++ } else n = this.checked; return n }, selected: function (e) { return this.selectedIndex > 0 }, max: function (e) { var t = !0; return g(this, e) && (t = parseFloat(this.value) <= parseFloat(e.value)), t }, min: function (e) { var t = !0; return g(this, e) && (t = parseFloat(this.value) >= parseFloat(e.value)), t }, range: function (e) { var t = !0; return g(this, e) && (t = this.value.replace(/\s/g, "") != "" && parseFloat(this.value) <= parseFloat(e.max) && parseFloat(this.value) >= parseFloat(e.min)), t }, notBlank: function (e) { return this.value.replace(/\s/g, "") != "" }, blank: function (e) { return this.value.replace(/\s/g, "") === "" }, matches: function (e) { var t = !0; if (g(this, e)) { var n, r; typeof e["regex"] == "string" ? r = e.regex.replace(/^\//, "").replace(/\/$/, "") : r = e.regex, typeof e["flags"] != "undefined" ? n = new RegExp(r.toString().replace(/^\//, "").replace(/\/[^\/]*$/, ""), e.flags) : n = new RegExp(r), t = n.test(this.value) } return t }, email: function (e) { var t = !0; return g(this, e) && (t = /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test(this.value)), t }, alpha: function (e) { var t = !0; return g(this, e) && (t = /^[A-Za-z]+$/.test(this.value)), t }, numeric: function (e) { var t = !0; return g(this, e) && (t = /^[0-9]+$/.test(this.value)), t }, integer: function (e) { var t = !0; return g(this, e) && (t = /^-?[0-9]+$/.test(this.value)), t }, real: function (e) { var t = !0; return g(this, e) && (t = /^-?([0-9]+(\.[0-9]+)?|\.[0-9]+)$/.test(this.value)), t }, alphaNumeric: function (e) { var t = !0; return g(this, e) && (t = /^[0-9A-Za-z]+$/.test(this.value)), t }, completelyFilled: function (e) { var t = []; for (var n = 0; n < this.elements.length; n++) { var r = this.elements[n]; d.required.call(r) || t.push(r) } return t }, passwordsMatch: function (e) { var t = [], n = document.getElementById(e.field1), r = document.getElementById(e.field2); return n.value != r.value && (t = [n, r]), t }, required: function (e) { var t = !0; return this.tagName && (this.tagName.toLowerCase() === "select" ? t = d.selected.call(this) : this.type.toLowerCase() === "checkbox" || this.type.toLowerCase() === "radio" ? t = d.checked.call(this) : (this.tagName.toLowerCase() === "input" || this.tagName.toLowerCase() === "textarea") && this.type.toLowerCase() != "button" && (t = d.notBlank.call(this))), t }, length: function (e) { var t = !0; return g(this, e) && (t = this.value.length >= e.min && this.value.length <= e.max), t }, digits: function (e) { var t = !0; if (g(this, e)) { var n = this.value.replace(/\s/g, ""), r = n.split(/\./); t = !1, n.length > 0 && (r.length == 1 && (r[1] = ""), e.integer > 0 ? t = r[0].length <= e.integer : t = !0, e.fraction > 0 && (t = t && r[1].length <= e.fraction)) } return t }, past: function (e) { var t = !0; if (g(this, e)) { var n = y.call(this, e); t = n.dateToValidate < n.dateToTestAgainst } return t }, future: function (e) { var t = !0; if (g(this, e)) { var n = y.call(this, e); t = n.dateToValidate > n.dateToTestAgainst } return t }, url: function (e) { var t = !0; return g(this, e) && (t = /^([a-z]([a-z]|\d|\+|-|\.)*):(\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?((\[(|(v[\da-f]{1,}\.(([a-z]|\d|-|\.|_|~)|[!\$&'\(\)\*\+,;=]|:)+))\])|((\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])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=])*)(:\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})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)|((([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})|[!\$&'\(\)\*\+,;=]|:|@)){0})(\?((([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(this.value)), t }, step: function (e) { var t = !0; if (g(this, e)) { var n = parseFloat(this.value), r = parseFloat(e.max), i = parseFloat(e.min), s = parseFloat(e.value); t = n <= r && n >= i && n % s === 0 } return t }, html5Required: function (e) { return !this.validity.valueMissing }, html5Email: w, html5URL: w, html5Number: w, html5DateTime: w, html5DateTimeLocal: w, html5Date: w, html5Month: w, html5Time: w, html5Week: w, html5Range: w, html5Tel: w, html5Color: w, html5Pattern: function (e) { return !this.validity.patternMismatch }, html5MaxLength: function (e) { return !this.validity.tooLong }, html5Min: function (e) { return !this.validity.rowUnderflow }, html5Max: function (e) { return !this.validity.rowOverflow }, html5Step: function (e) { return !this.validity.stepMismatch } }; return { Validator: d, init: p, wrapValidatorWithEmptyCheck: b, initializePublicValidators: h, compoundValidator: m, validate: E, runValidatorFor: U, interpolateConstraintDefaultMessage: W, createPublicValidator: v } }), function (e, t) { typeof define == "function" && define.amd ? define("domain/CompositionGraph", t) : (typeof e.regulaModules == "undefined" && (e.regulaModules = {}), e.regulaModules.CompositionGraph = t()) }(this, function () { function n(n) { var r = n.type, i = n.name, s = n.parent, o = typeof e[r] == "undefined" ? { visited: !1, name: i, type: r, parents: [], children: [] } : e[r]; s == null ? t.children.push(o) : (s.children.push(o), o.parents.push(s)), e[r] = o } function r() { var e = {}, n = function r(t, n) { var i = typeof e[t.type] == "undefined" ? { visited: t.visited, name: t.name, type: t.type, parents: [], children: [] } : e[t.type]; n !== null && i.parents.push(n); for (var s = 0; s < t.children.length; s++)i.children.push(r(t.children[s], i)); return e[t.type] = i, i }(t, null); return { typeToNodeMap: e, root: n } } function i(t) { var n = e[t]; return typeof n == "undefined" ? null : n } function s(e) { var t = function n(e, t) { var r = { cycle: !1, path: t }; if (e.visited) r.cycle = !0; else { e.visited = !0; var i = 0; while (i < e.children.length && !r.cycle) r = n(e.children[i], t + "." + e.children[i].name), i++ } return r }(e, e.name); return t.cycle || o(), t } function o() { (function e(t) { t.visited = !1; for (var n = 0; n < t.children.length; n++)e(t.children[n]) })(t) } function u() { return t } function a(e) { t = e } function f(n) { e = n.typeToNodeMap, t = n.root } var e = {}, t = { visited: !1, name: "RootNode", type: -1, parents: [], children: [] }; return { ROOT: -1, addNode: n, getNodeByType: i, analyze: s, getRoot: u, setRoot: a, clone: r, initializeFromClone: f } }), function (e, t) { typeof define == "function" && define.amd ? define("service/ConstraintService", ["service/ValidationService", "domain/CompositionGraph", "service/ExceptionService", "utils/MapUtils", "utils/ArrayUtils"], t) : (typeof e.regulaModules == "undefined" && (e.regulaModules = {}), e.regulaModules.ConstraintService = t(e.regulaModules.ValidationService, e.regulaModules.CompositionGraph, e.regulaModules.ExceptionService, e.regulaModules.MapUtils, e.regulaModules.ArrayUtils)) }(this, function (e, t, n, r, i) { function f(r) { var i = typeof r.async == "undefined" ? a[r.name].async : r.async, u = r.validator; r.validatorRedefined && !r.formSpecific && (u = e.wrapValidatorWithEmptyCheck(u)); var f = t.getNodeByType(r.constraintType); if (r.compound) { v(r.name, r.composingConstraints, r.params); var l = t.clone(); d(r.name, r.composingConstraints); var c = t.analyze(f); if (c.cycle) throw t.initializeFromClone(l), new n.Exception.ConstraintDefinitionException("regula.override: The overriding composing-constraints you have specified have created a cyclic composition: " + c.path); i = !1; var h = 0; while (h < r.composingConstraints.length && !i) { var p = r.composingConstraints[h], m = a[o[p.constraintType]]; i = m.async, h++ } } f !== null && function g(e) { for (var n = 0; n < e.parents.length; n++) { var r = e.parents[n]; if (r.type !== t.ROOT) { var s = o[r.type], u = a[s]; u.async = i, g(r) } } }(f), a[r.name] = { async: i, formSpecific: r.formSpecific, constraintType: s[r.name], custom: !0, compound: r.compound, params: r.params, composingConstraints: r.composingConstraints, defaultMessage: r.defaultMessage, validator: u }, a[r.name].custom && r.validatorRedefined && e.createPublicValidator(r.name, a) } function l(t) { s[t.name] = u, o[u++] = t.name; var n = t.validator; t.formSpecific || (n = e.wrapValidatorWithEmptyCheck(t.validator)), a[t.name] = { async: t.async, formSpecific: t.formSpecific, validator: n, constraintType: s[t.name], custom: !0, compound: !1, params: t.params, defaultMessage: t.defaultMessage }, e.createPublicValidator(t.name, a) } function c(t) { v(t.name, t.constraints, t.params); var n = !1, r = 0; while (r < t.constraints.length && !n) { var i = t.constraints[r], f = o[i.constraintType]; n = n || a[f].async, r++ } s[t.name] = u, o[u++] = t.name, a[t.name] = { async: n, formSpecific: t.formSpecific, constraintType: s[t.name], custom: !0, compound: !0, params: t.params, reportAsSingleViolation: t.reportAsSingleViolation, composingConstraints: t.constraints, defaultMessage: t.defaultMessage, validator: e.compoundValidator }, e.createPublicValidator(t.name, a), d(t.name, t.constraints) } function h(e, t, r) { var i = { successful: !0, message: "", data: null }, s = e.cloneNode(!1); if (s.tagName.toLowerCase() == "form" && !a[t].formSpecific) i = { successful: !1, message: n.generateExceptionMessage(e, t, "@" + t + " is not a form constraint, but you are trying to bind it to a form"), data: null }; else if (s.tagName.toLowerCase() != "form" && a[t].formSpecific) i = { successful: !1, message: n.generateExceptionMessage(e, t, "@" + t + " is a form constraint, but you are trying to bind it to a non-form element"), data: null }; else if ((typeof s.type == "undefined" || s.type.toLowerCase() != "checkbox" && s.type.toLowerCase() != "radio") && t == "Checked") i = { successful: !1, message: n.generateExceptionMessage(e, t, "@" + t + " is only applicable to checkboxes and radio buttons. You are trying to bind it to an input element that is neither a checkbox nor a radio button."), data: null }; else if (s.tagName.toLowerCase() != "select" && t == "Selected") i = { successful: !1, message: n.generateExceptionMessage(e, t, "@" + t + " is only applicable to select boxes. You are trying to bind it to an input element that is not a select box."), data: null }; else { var o = p(e, a[t], r); o.error ? i = { successful: !1, message: o.message, data: null } : i.data = r } return i } function p(e, t, r) { var s = { error: !1, message: "" }; r.__size__ < t.params.length && (s = { error: !0, message: n.generateExceptionMessage(e, o[t.constraintType], "@" + o[t.constraintType] + " expects at least " + t.params.length + " parameter(s). However, you have provided only " + r.__size__), data: null }); var u = []; for (var a = 0; a < t.params.length; a++) { var f = t.params[a]; typeof r[f] == "undefined" && u.push(f) } return u.length > 0 && (s = { error: !0, message: n.generateExceptionMessage(e, o[t.constraintType], "You seem to have provided some optional or required parameters for @" + o[t.constraintType] + ", but you are still missing the following " + u.length + " required parameter(s): " + i.explode(u, ", ")), data: null }), s } function d(e, n) { var r = t.getNodeByType(s[e]); r == null && (t.addNode({ type: s[e], name: e, parent: null }), r = t.getNodeByType(s[e])); for (var i = 0; i < r.children.length; i++) { var u = r.children[i], f = []; for (var l = 0; l < u.parents.length; l++)u.parents[l] !== r && f.push(u.parents[l]); u.parents = f } r.children = []; for (var i = 0; i < n.length; i++) { var c = o[n[i].constraintType], h = a[c]; t.addNode({ type: h.constraintType, name: o[h.constraintType], parent: r }) } } function v(e, t, i) { for (var s = 0; s < t.length; s++) { if (typeof t[s].constraintType == "undefined") throw new n.Exception.ConstraintDefinitionException("In compound constraint " + e + ": A composing constraint has no constraint type specified."); var u = t[s], f = o[u.constraintType], l = { __size__: 0 }; u.params = u.params || {}; for (var c in u.params) u.params.hasOwnProperty(c) && r.put(l, c, u.params[c]); var h = 0; for (var d in u.params) u.params.hasOwnProperty(d) && h++; u.params.__size__ = h; for (var v = 0; v < i.length; v++)r.put(l, i[v], null); var m = p(null, a[f], l); if (m.error) throw new n.Exception.ConstraintDefinitionException("In compound constraint " + e + ": " + m.message) } } var s = {}, o = {}, u = 0; (function (e) { for (var t = 0; t < e.length; t++)s[e[t]] = t, o[t] = e[t]; u = t, s.Between = s.row, s.Matches = s.Pattern, s.Empty = s.Blank, s.NotEmpty = s.NotBlank, s.IsAlpha = s.Alpha, s.IsNumeric = s.Numeric, s.IsAlphaNumeric = s.AlphaNumeric })(["Checked", "Selected", "Max", "Min", "Range", "Between", "NotBlank", "NotEmpty", "Blank", "Empty", "Pattern", "Matches", "Email", "Alpha", "IsAlpha", "Numeric", "IsNumeric", "AlphaNumeric", "IsAlphaNumeric", "Integer", "Real", "CompletelyFilled", "PasswordsMatch", "Required", "Length", "Digits", "Past", "Future", "Step", "URL", "HTML5Required", "HTML5Email", "HTML5URL", "HTML5MaxLength", "HTML5Pattern", "HTML5Min", "HTML5Max", "HTML5Step"]); var a = { Checked: { async: !1, html5: !1, formSpecific: !1, validator: e.Validator.checked, constraintType: s.Checked, custom: !1, compound: !1, params: [], defaultMessage: "{label} needs to be checked." }, Selected: { async: !1, html5: !1, formSpecific: !1, validator: e.Validator.selected, constraintType: s.Selected, custom: !1, compound: !1, params: [], defaultMessage: "{label} needs to be selected." }, Max: { async: !1, html5: !1, formSpecific: !1, validator: e.Validator.max, constraintType: s.Max, custom: !1, compound: !1, params: ["value"], defaultMessage: "{label} needs to be lesser than or equal to {value}." }, Min: { async: !1, html5: !1, formSpecific: !1, validator: e.Validator.min, constraintType: s.Min, custom: !1, compound: !1, params: ["value"], defaultMessage: "{label} needs to be greater than or equal to {value}." }, Range: { async: !1, html5: !1, formSpecific: !1, validator: e.Validator.row, constraintType: s.row, custom: !1, compound: !1, params: ["min", "max"], defaultMessage: "{label} needs to be between {min} and {max}." }, NotBlank: { async: !1, html5: !1, formSpecific: !1, validator: e.Validator.notBlank, constraintType: s.NotBlank, custom: !1, compound: !1, params: [], defaultMessage: "{label} cannot be blank." }, Blank: { async: !1, html5: !1, formSpecific: !1, validator: e.Validator.blank, constraintType: s.Blank, custom: !1, compound: !1, params: [], defaultMessage: "{label} needs to be blank." }, Pattern: { async: !1, html5: !1, formSpecific: !1, validator: e.Validator.matches, constraintType: s.Pattern, custom: !1, compound: !1, params: ["regex"], defaultMessage: "{label} needs to match {regex}{flags}." }, Email: { async: !1, html5: !1, formSpecific: !1, validator: e.Validator.email, constraintType: s.Email, custom: !1, compound: !1, params: [], defaultMessage: "{label} is not a valid email." }, Alpha: { async: !1, html5: !1, formSpecific: !1, validator: e.Validator.alpha, constraintType: s.Alpha, custom: !1, compound: !1, params: [], defaultMessage: "{label} can only contain letters." }, Numeric: { async: !1, html5: !1, formSpecific: !1, validator: e.Validator.numeric, constraintType: s.Numeric, custom: !1, compound: !1, params: [], defaultMessage: "Only numbers are required" }, AlphaNumeric: { async: !1, html5: !1, formSpecific: !1, validator: e.Validator.alphaNumeric, constraintType: s.AlphaNumeric, custom: !1, compound: !1, params: [], defaultMessage: "{label} can only contain numbers and letters." }, Integer: { async: !1, html5: !1, formSpecific: !1, validator: e.Validator.integer, constraintType: s.Integer, custom: !1, compound: !1, params: [], defaultMessage: "{label} must be an integer." }, Real: { async: !1, html5: !1, formSpecific: !1, validator: e.Validator.real, constraintType: s.Real, custom: !1, compound: !1, params: [], defaultMessage: "{label} must be a real number." }, CompletelyFilled: { async: !1, html5: !1, formSpecific: !0, validator: e.Validator.completelyFilled, constraintType: s.CompletelyFilled, custom: !1, compound: !1, params: [], defaultMessage: "{label} must be completely filled." }, PasswordsMatch: { async: !1, html5: !1, formSpecific: !0, validator: e.Validator.passwordsMatch, constraintType: s.PasswordsMatch, custom: !1, compound: !1, params: ["field1", "field2"], defaultMessage: "Passwords do not match." }, Required: { async: !1, html5: !1, formSpecific: !1, validator: e.Validator.required, constraintType: s.Required, custom: !1, compound: !1, params: [], defaultMessage: "{label} is required." }, Length: { async: !1, html5: !1, formSpecific: !1, validator: e.Validator.length, constraintType: s.Length, custom: !1, compound: !1, params: ["min", "max"], defaultMessage: "{label} length must be between {min} and {max}." }, Digits: { async: !1, html5: !1, formSpecific: !1, validator: e.Validator.digits, constraintType: s.Digits, custom: !1, compound: !1, params: ["integer", "fraction"], defaultMessage: "{label} must have up to {integer} digits and {fraction} fractional digits." }, Past: { async: !1, html5: !1, formSpecific: !1, validator: e.Validator.past, constraintType: s.Past, custom: !1, compound: !1, params: ["format"], defaultMessage: "{label} must be in the past." }, Future: { async: !1, html5: !1, formSpecific: !1, validator: e.Validator.future, constraintType: s.Future, custom: !1, compound: !1, params: ["format"], defaultMessage: "{label} must be in the future." }, Step: { async: !1, html5: !1, formSpecific: !1, validator: e.Validator.step, constraintType: s.Step, custom: !1, compound: !1, params: ["min", "max", "value"], defaultMessage: "{label} must be equal to {min} or greater, and equal to {max} or lesser, at increments of {value}." }, URL: { async: !1, html5: !1, formSpecific: !1, validator: e.Validator.url, constraintType: s.URL, custom: !1, compound: !1, params: [], defaultMessage: "{label} must be a valid URL." }, HTML5Required: { async: !1, html5: !0, inputType: null, attribute: "required", formSpecific: !1, validator: e.Validator.html5Required, constraintType: s.HTML5Required, custom: !1, compound: !1, params: [], defaultMessage: "{label} is required." }, HTML5Email: { async: !1, html5: !0, inputType: "email", attribute: null, formSpecific: !1, validator: e.Validator.html5Email, constraintType: s.HTML5Email, custom: !1, compound: !1, params: [], defaultMessage: "{label} is not a valid email." }, HTML5Pattern: { async: !1, html5: !0, inputType: null, attribute: "pattern", formSpecific: !1, validator: e.Validator.html5Pattern, constraintType: s.HTML5Pattern, custom: !1, compound: !1, params: ["pattern"], defaultMessage: "{label} needs to match {pattern}." }, HTML5URL: { async: !1, html5: !0, inputType: "url", attribute: null, formSpecific: !1, validator: e.Validator.html5URL, constraintType: s.HTML5URL, custom: !1, compound: !1, params: [], defaultMessage: "{label} is not a valid URL." }, HTML5MaxLength: { async: !1, html5: !0, inputType: null, attribute: "maxlength", formSpecific: !1, validator: e.Validator.html5MaxLength, constraintType: s.HTML5MaxLength, custom: !1, compound: !1, params: ["maxlength"], defaultMessage: "{label} must be less than {maxlength} characters." }, HTML5Min: { async: !1, html5: !0, inputType: null, attribute: "min", formSpecific: !1, validator: e.Validator.html5Min, constraintType: s.HTML5Min, custom: !1, compound: !1, params: ["min"], defaultMessage: "{label} needs to be greater than or equal to {min}." }, HTML5Max: { async: !1, html5: !0, inputType: null, attribute: "max", formSpecific: !1, validator: e.Validator.html5Max, constraintType: s.HTML5Max, custom: !1, compound: !1, params: ["max"], defaultMessage: "{label} needs to be lesser than or equal to {max}." }, HTML5Step: { async: !1, html5: !0, inputType: null, attribute: "step", formSpecific: !1, validator: e.Validator.html5Step, constraintType: s.HTML5Step, custom: !1, compound: !1, params: ["step"], defaultMessage: "{label} must be equal to the minimum value or greater at increments of {step}." } }; return { Constraint: s, ReverseConstraint: o, firstCustomConstraintIndex: u, constraintDefinitions: a, override: f, custom: l, compound: c, verifyConstraintDefinition: h, verifyParameterCountMatches: p } }), function (e, t) { typeof define == "function" && define.amd ? define("parser/Parser", ["utils/MapUtils", "service/ExceptionService", "service/ConstraintService"], t) : (typeof e.regulaModules == "undefined" && (e.regulaModules = {}), e.regulaModules.Parser = t(e.regulaModules.MapUtils, e.regulaModules.ExceptionService, e.regulaModules.ConstraintService)) }(this, function (e, t, n) { function r(e) { return e ? e.replace(/^\s+/, "").replace(/\s+$/, "") : "" } function i(e) { return e[0] } function s(t) { var n = t.str, r = t.delimiters.split(""), i = t.returnDelimiters || !1, s = t.returnEmptyTokens || !1, o = [], u = 0; for (var a = 0; a < n.length; a++)if (e.exists(r, n.charAt(a))) { var f = n.substring(u, a); f.length == 0 ? s && o.push(f) : o.push(f), i && o.push(n.charAt(a)), u = a + 1 } if (u < n.length) { var f = n.substring(u, n.length); f.length == 0 ? s && o.push(f) : o.push(f) } return o } function o(o, u) { function l(e) { var t = { successful: !0, message: "", data: null }, n = []; while (e.length > 0 && t.successful) t = c(e), n.push(t.data); return t.data = n, t } function c(e) { var n = { successful: !0, message: "", data: null }, i = e.shift(); return r(i).length == 0 && (i = e.shift()), i == "@" ? n = h(e) : n = { successful: !1, message: t.generateExceptionMessage(o, a, "Invalid constraint. Constraint definitions need to start with '@'") + " " + n.message, data: null }, n } function h(e) { var r = { Between: "Range", Matches: "Pattern", Empty: "Blank", NotEmpty: "NotBlank", IsAlpha: "Alpha", IsNumeric: "Integer", IsAlphaNumeric: "AlphaNumeric" }, i = p(e); if (i.successful) { a = i.data, a = r[a] ? r[a] : a; if (n.constraintDefinitions[a]) { i = m(e); if (i.successful) { i = n.verifyConstraintDefinition(o, a, i.data); if (i.successful) { var s = i.data; i.data = { element: o, constraintName: a, definedParameters: s } } } } else i = { successful: !1, message: t.generateExceptionMessage(o, a, "I cannot find the specified constraint name. If this is a custom constraint, you need to define it before you bind to it") + " " + i.message, data: null } } else i = { successful: !1, message: t.generateExceptionMessage(o, a, "Invalid constraint name in constraint definition") + " " + i.message, data: null }; return i } function p(e) { var n = r(e.shift()), i = d(n.charAt(0)); if (i.successful) { var s = 1; while (s < n.length && i.successful) i = v(n.charAt(s)), s++; i.successful && (i.data = n) } else i = { successful: !1, message: t.generateExceptionMessage(o, a, "Invalid starting character for constraint name. Can only include A-Z, a-z, and _") + " " + i.message, data: null }; return i } function d(e) { var n = { successful: !0, message: "", data: null }; if (!/[A-Za-z_]/.test(e) || typeof e == "undefined" || e == null) n = { successful: !1, message: t.generateExceptionMessage(o, a, "Invalid starting character"), data: null }; return n } function v(e) { var n = { successful: !0, message: "", data: null }; return /[0-9A-Za-z_]/.test(e) || (n = { successful: !1, message: t.generateExceptionMessage(o, a, "Invalid character in identifier. Can only include 0-9, A-Z, a-z, and _") + " " + n.message, data: null }), n } function m(n) { var s = { successful: !0, message: "", data: {} }; if (i(n) == "(") { n.shift(); var u = {}; if (i(n) == ")") n.shift(); else { s = g(n); if (s.successful) { e.put(u, s.data.name, s.data.value), r(i(n)).length == 0 && n.shift(); while (n.length > 0 && i(n) == "," && s.successful) n.shift(), s = g(n), s.successful && (e.put(u, s.data.name, s.data.value), r(i(n)).length == 0 && n.shift()); if (s.successful) { var f = n.shift(); r(f).length == 0 && (f = n.shift()), f != ")" ? s = { successful: !1, message: t.generateExceptionMessage(o, a, "Cannot find matching closing ) in parameter list") + " " + s.message, data: null } : s.data = u } } else s = { successful: !1, message: t.generateExceptionMessage(o, a, "Invalid parameter definition") + " " + s.message, data: null } } } else i(n) !== undefined && i(n) != "@" && (s = { successful: !1, message: t.generateExceptionMessage(o, a, "Unexpected character '" + i(n) + "'" + " after constraint definition") + " " + s.message, data: null }); return s } function g(e) { var n = y(e); if (n.successful) { var r = n.data, i = e.shift(); i == "=" ? (n = b(e), n.successful ? n.data = { name: r, value: n.data } : n = { successful: !1, message: t.generateExceptionMessage(o, a, "Invalid parameter value") + " " + n.message, data: null }) : (e.unshift(i), n = { successful: !1, message: t.generateExceptionMessage(o, a, "'=' expected after parameter name " + n.message), data: null }) } else n = { successful: !1, message: t.generateExceptionMessage(o, a, "Invalid parameter name. You might have unmatched parentheses") + " " + n.message, data: null }; return n } function y(e) { var n = r(e.shift()); n.length == 0 && (n = e.shift()); var i = { successful: !1, message: t.generateExceptionMessage(o, a, "Invalid starting character for parameter name. Can only include A-Z, a-z, and _"), data: null }; if (typeof n != "undefined") { i = d(n.charAt(0)); if (i.successful) { var s = 1; while (s < n.length && i.successful) i = v(n.charAt(s)), s++; i.successful && (i.data = n) } else i = { successful: !1, message: t.generateExceptionMessage(o, a, "Invalid starting character for parameter name. Can only include A-Z, a-z, and _") + " " + i.message, data: null } } return i } function b(e) { r(i(e)).length == 0 && e.shift(); var n = { successful: !0, message: "", data: [] }; if (i(e) == ")") n = { successful: !1, message: t.generateExceptionMessage(o, a, "Parameter value expected") + " " + n.message, data: null }; else { n = w(e); var s = n.message; n.successful || (n = C(e), n.message = n.message + " " + s, s = n.message, n.successful || (n = L(e), n.message = n.message + " " + s, s = n.message, n.successful || (n = A(e), n.message = n.message + " " + s, s = n.message, n.successful || (n = O(e), n.message = n.message + " " + s, s = n.message, n.successful || (n = { successful: !1, message: t.generateExceptionMessage(o, a, "Parameter value must be a number, quoted string, regular expression, or a boolean") + " " + s, data: null }))))) } return n } function w(e) { var n = E(e); return n.successful || (n = S(e), n.successful || (n = { successful: !1, message: t.generateExceptionMessage(o, a, "Parameter value is not a number") + " " + n.message, data: null })), n } function E(e) { var n = e.shift(), r = { successful: !0, message: "", data: null }; return n == "-" ? (r = S(e), r.successful && (r.data = n + r.data)) : (e.unshift(n), r = { successful: !1, message: t.generateExceptionMessage(o, a, "Not a negative number"), data: null }), r } function S(e) { var n = null; if (i(e) != ".") { n = T(e); if (i(e) == ".") { var r = n.data; n = x(e), n.successful && (n.data = r + n.data) } } else n = x(e); return n.successful || (n = { successful: !1, message: t.generateExceptionMessage(o, a, "Not a positive number") + " " + n.message, data: null }), n } function x(e) { var n = e.shift(), r = T(e); return r.successful ? r.data = n + r.data : r = { successful: !1, message: t.generateExceptionMessage(o, a, "Not a valid fraction"), data: null }, r } function T(e) { var n = r(e.shift()), i = N(n.charAt(0)); if (i.successful) { var s = 1; while (s < n.length && i.successful) i = N(n.charAt(s)), s++; i.successful && (i.data = n) } else e.unshift(n), i = { successful: !1, message: t.generateExceptionMessage(o, a, "Not a valid integer") + " " + i.message, data: [] }; return i } function N(e) { var n = { successful: !0, message: "", data: null }; return /[0-9]/.test(e) || (n = { successful: !1, message: t.generateExceptionMessage(o, a, "Not a valid digit"), data: null }), n } function C(e) { var n = e.shift(), r = "", s = { successful: !0, message: "", data: null }; if (n == '"') { var u = !1; while (e.length > 0 && s.successful && !u) i(e) == '"' ? (u = !0, e.shift()) : (s = k(e), r += s.data); u || (s = { successful: !1, message: t.generateExceptionMessage(o, a, "Unterminated string literal"), data: null }) } else e.unshift(n), s = { successful: !1, message: t.generateExceptionMessage(o, a, "Invalid quoted string"), data: null }; return s.successful = s.successful && u, s.data = r, s } function k(e) { var t = "", n = e.shift(); return n == "\\" && (t = e.shift()), { successful: !0, message: "", data: n + t } } function L(e) { var n = "", r = e.shift(), s = { successful: !0, message: "", data: null }; if (r == "/") { n = r; var u = !1; while (e.length > 0 && s.successful && !u) i(e) == "/" ? (n += e.shift(), u = !0) : (s = k(e), n += s.data); u || (s = { successful: !1, message: t.generateExceptionMessage(o, a, "Unterminated regex literal"), data: null }) } else e.unshift(r), s = { successful: !1, message: t.generateExceptionMessage(o, a, "Not a regular expression"), data: null }; return s.successful = s.successful && u, s.data = n, s } function A(e) { var n = e.shift(), i = { successful: !0, message: "", data: null }; return r(n) == "true" || r(n) == "false" ? i = { successful: !0, message: "", data: n === "true" } : (e.unshift(n), i = { successful: !1, message: t.generateExceptionMessage(o, a, "Not a boolean"), data: null }), i } function O(e) { var n = [], s = e.shift(), u = { successful: !0, message: "", data: null }; if (s == "[") { r(i(e)).length == 0 && e.shift(), i(e) == "]" ? u = { successful: !0, message: "", data: "" } : u = M(e); if (u.successful) { n.push(u.data), r(i(e)).length == 0 && e.shift(); while (e.length > 0 && i(e) == "," && u.successful) e.shift(), u = M(e), n.push(u.data), r(i(e)).length == 0 && e.shift(); u.data = n, s = e.shift(), r(s).length == 0 && e.shift(), s != "]" && (u = { successful: !1, message: t.generateExceptionMessage(o, a, "Cannot find matching closing ] in group definition") + " " + u.message, data: null }) } else u = { successful: !1, message: t.generateExceptionMessage(o, a, "Invalid group definition") + " " + u.message, data: null } } else e.unshift(s), u = { successful: !1, message: t.generateExceptionMessage(o, a, "Not a valid group definition"), data: null }; return u } function M(e) { var n = { successful: !0, message: "", data: "" }, i = r(e.shift()); i.length == 0 && (i = e.shift()), n = d(i.charAt(0)); if (n.successful) { var s = 1; while (s < i.length && n.successful) n = v(i.charAt(s)), s++; n.successful && (n.data = i) } else n = { successful: !1, message: t.generateExceptionMessage(o, a, "Invalid starting character for group name. Can only include A-Z, a-z, and _") + " " + n.message, data: null }; return n } var a = "", f = s({ str: r(u.replace(/\s*\n\s*/g, "")), delimiters: '@()[]=,"\\/-\\.', returnDelimiters: !0, returnEmptyTokens: !1 }); return l(f) } return { parse: o } }), function (e, t) { typeof define == "function" && define.amd ? define("service/BindingService", ["utils/MapUtils", "service/GroupService", "utils/DOMUtils", "parser/Parser", "service/ConstraintService", "service/ExceptionService"], t) : (typeof e.regulaModules == "undefined" && (e.regulaModules = {}), e.regulaModules.BindingService = t(e.regulaModules.MapUtils, e.regulaModules.GroupService, e.regulaModules.DOMUtils, e.regulaModules.Parser, e.regulaModules.ConstraintService, e.regulaModules.ExceptionService)) }(this, function (e, t, n, r, i, s) { function a() { o === null && f() } function f() { o = { Default: {} } } function l() { return o } function c(n, r) { if (e.isEmpty(o[r][n])) { delete o[r][n]; if (e.isEmpty(o[r])) { delete o[r]; var i = t.Group[r]; delete t.Group[r], delete t.ReverseGroup[i], t.deletedGroupIndices.push(i) } } } function h(e) { var t = { successful: !0, message: "", data: null }, n = typeof e.cloneNode != "undefined" ? e.cloneNode(!1) : e, r = null; return typeof n.tagName != "undefined" && (r = n.tagName.toLowerCase()), r !== "form" && r !== "select" && r !== "textarea" && r !== "input" ? t = { successful: !1, message: r + "#" + e.id + " is not an input, select, textarea, or form element! Validation constraints can only be attached to input, select, textarea, or form elements.", data: null } : r === "input" && e.getAttribute("type") === null && (t = { successful: !1, message: r + "#" + e.id + " does not have a type attribute.", data: null }), t } function p(e) { var t = e.element, i; t === null ? i = n.getElementsByAttribute(document.body, "*", "data-constraints") : i = [t]; var s = { successful: !0, message: "", data: null }, o = 0; while (o < i.length && s.successful) { t = i[o], s = h(t); if (s.successful) { t.id || (t.id = n.generateRandomId()); var u = t.getAttribute("data-constraints"); if (u !== null) { s = r.parse(t, u); if (s.successful && s.data !== null) { var a = s.data, f = 0; while (s.successful && f < a.length) { var l = a[f]; s = g(l.element, l.constraintName, l.definedParameters), f++ } } } o++ } } return s } function d(t) { function a(e, t, r) { for (var i = 0; i < t.length; i++) { var s = t[i]; s.id || (s.id = n.generateRandomId()), e[s.id] || (e[s.id] = []); var o = { constraint: r.constraint, params: {} }; r.value === null && (o.params[r.attribute] = n.getAttributeValueForElement(s, r.attribute)), e[s.id].push(o) } } var r = t.element, s = { successful: !0, message: "", data: null }, o = [{ attribute: "required", value: null, constraint: i.Constraint.HTML5Required }, { attribute: "type", value: "email", constraint: i.Constraint.HTML5Email }, { attribute: "type", value: "url", constraint: i.Constraint.HTML5URL }, { attribute: "pattern", value: null, constraint: i.Constraint.HTML5Pattern }, { attribute: "maxlength", value: null, constraint: i.Constraint.HTML5MaxLength }, { attribute: "min", value: null, constraint: i.Constraint.HTML5Min }, { attribute: "max", value: null, constraint: i.Constraint.HTML5Max }, { attribute: "step", value: null, constraint: i.Constraint.HTML5Step }], u = { email: i.Constraint.HTML5Email, url: i.Constraint.HTML5URL }, f = {}; if (r === null) for (var l = 0; l < o.length; l++) { var c = o[l], p = null; c.value == null ? p = n.getElementsByAttribute(document.body, "*", c.attribute) : p = n.getElementsByAttribute(document.body, "*", c.attribute, c.value), a(f, p, c) } else { r.id || (r.id = n.generateRandomId()), s = h(r); if (s.successful) { f[r.id] = []; for (var l = 0; l < o.length; l++) { var c = o[l]; if (c.value === null) { if (n.getAttributeValueForElement(r, c.attribute) != null) { var d = { constraint: c.constraint, params: {} }; d.params[c.attribute] = n.getAttributeValueForElement(r, c.attribute), f[r.id].push(d) } } else { var v = n.getAttributeValueForElement(r, c.attribute); v != null && typeof u[v] != "undefined" && f[r.id].push({ constraint: u[v], params: {} }) } } } } return e.iterateOverMap(f, function (e, t, n) { var r = document.getElementById(e); for (var o = 0; o < t.length; o++) { var u = t[o]; s = g(r, i.ReverseConstraint[u.constraint], u.params) } }), s } function v(e) { var t = { successful: !0, message: "", data: null }, n = e.element, r = e.constraints || [], i = n && n.tagName ? n.tagName.toLowerCase() : null; if (!n) t = { successful: !1, message: "regula.bind expects a non-null element attribute in the options argument. " + s.explodeParameters(e), data: null }; else if (n.nodeType !== 1) t = { successful: !1, message: "regula.bind: element attribute is expected to be an HTMLElement, but was of unexpected type: " + typeof n + ". " + s.explodeParameters(e), data: null }; else if (i != "form" && i != "select" && i != "textarea" && i != "input") t = { successful: !1, message: i + "#" + n.id + " is not an input, select, textarea, or form element! Validation constraints can only be attached to input, select, textarea, or form elements. " + s.explodeParameters(e), data: null }; else if (r.length > 0) { var o = 0; while (o < r.length && t.successful) t = m(r[o], e), o++ } else t = p({ element: n }); return t } function m(n, r) { function u(e, t) { var n = {}, r = []; for (var i = 0; i < e.length; i++)r.push(e[i]), n[e[i]] = !0; for (var s = 0; s < t.length; s++)n[t[s]] || r.push(t[s]); return r } function a(t, n) { var r = []; for (var i = 0; i < n.length; i++)e.exists(t, n[i]) || r.push(n[i]); return r } function f(n, r, s) { var f = o[t.ReverseGroup[t.Group.Default]][n.id][i.ReverseConstraint[r]].groups, l = []; s.groups ? l = s.groups : l.push(t.ReverseGroup[t.Group.Default]), e.exists(l, t.ReverseGroup[t.Group.Default]) || l.push(t.ReverseGroup[t.Group.Default]); var h = a(l, u(f, l)); for (var p = 0; p < h.length; p++) { var d = h[p]; delete o[d][n.id][i.ReverseConstraint[r]], c(n.id, d) } } var l = { successful: !0, message: "", data: null }, h = r.element, p = n.overwriteConstraint || !1, d = n.overwriteParameters || !1, v = n.constraintType, m = n.params || {}, y = { __size__: 0 }, b = m.groups; if (typeof v == "undefined") l = { successful: !1, message: "regula.bind expects a valid constraint type for each constraint in constraints attribute of the options argument. " + s.explodeParameters(r), data: null }; else if (m && m.groups) if (m.groups instanceof Array) { var w = [], E = 0; while (E < m.groups.length && l.successful) typeof m["groups"][E] == "string" ? w.push(m.groups[E]) : typeof t.ReverseGroup[m["groups"][E]] != "undefined" ? w.push(t.ReverseGroup[m.groups[E]]) : l = { successful: !1, message: "Invalid group: " + m.groups[E] + ". " + s.explodeParameters(r), data: null }, E++; l.successful && (m.groups = w) } else l = { successful: !1, message: "The groups parameter must be an array of enums or strings " + s.explodeParameters(r), data: null }; if (l.successful) { if (!o[t.ReverseGroup[t.Group.Default]][h.id] || !o[t.ReverseGroup[t.Group.Default]][h.id][i.ReverseConstraint[v]]) { for (var S in m) m.hasOwnProperty(S) && e.put(y, S, m[S]); l = i.verifyConstraintDefinition(h, i.ReverseConstraint[v], y) } else if (p) { for (var S in m) m.hasOwnProperty(S) && e.put(y, S, m[S]); l = i.verifyConstraintDefinition(h, i.ReverseConstraint[v], y), l.successful && f(h, v, m) } else { var x = o[t.ReverseGroup[t.Group.Default]][h.id][i.ReverseConstraint[v]]; for (var S in x) x.hasOwnProperty(S) && e.put(y, S, x[S]); if (d) { for (var S in m) m.hasOwnProperty(S) && e.put(y, S, m[S]); l = i.verifyConstraintDefinition(h, i.ReverseConstraint[v], y), l.successful && f(h, v, y) } else for (var S in m) m.hasOwnProperty(S) && (x[S] || e.put(y, S, m[S])) } l.successful && (l = g(h, i.ReverseConstraint[v], y)) } return m.groups = b, l } function g(n, r, u) { var a = { successful: !0, message: "", data: null }; u.groups || e.put(u, "groups", [t.ReverseGroup[t.Group.Default]]); var f = u.groups; f.indexOf(t.ReverseGroup[t.Group.Default]) === -1 && (f.push(t.ReverseGroup[t.Group.Default]), u.groups = f); for (var l = 0; l < f.length; l++) { var c = f[l]; if (!o[c]) { var h = -1; t.deletedGroupIndices.length > 0 ? h = t.deletedGroupIndices.pop() : h = t.firstCustomGroupIndex++, t.Group[c] = h, t.ReverseGroup[h] = c, o[c] = {} } o[c][n.id] || (o[c][n.id] = {}), o[c][n.id][r] = u } if (i.constraintDefinitions[r].html5) if (n.getAttribute("type") !== null && i.constraintDefinitions[r].inputType !== null && n.getAttribute("type") !== i.constraintDefinitions[r].inputType) a = { successful: !1, message: s.generateExceptionMessage(n, r, "Element type of " + n.getAttribute("type") + " conflicts with type of constraint @" + r + ": " + i.constraintDefinitions[r].inputType), data: null }; else { var p = i.constraintDefinitions[r].attribute, d = i.constraintDefinitions[r].inputType; (p !== null && n.getAttribute(p) === null || d !== null && n.getAttribute("type") === null) && y(n, r, u) } return a } function y(e, t, n) { if (t === i.ReverseConstraint[i.Constraint.HTML5Required]) e.setAttribute("required", "true"); else { var r = i.constraintDefinitions[t]; for (var s = 0; s < r.params.length; s++)e.setAttribute(r.params[s], n[r.params[s]]) } var o = e.getAttribute("class"); /regula-modified/.test(o) || e.setAttribute("class", o + " regula-modified") } function b(e) { var t = !1; for (var n = 0; n < e.elements.length; n++) { var r = e.elements[n].id, u = e.constraints || []; if (u.length == 0) for (var a in o) o.hasOwnProperty(a) && typeof o[a][r] != "undefined" && (delete o[a][r], a !== "Default" && c(r, a), t = !0); else for (var f = 0; f < u.length; f++) { var l = u[f]; for (var a in o) o.hasOwnProperty(a) && typeof o[a][r] != "undefined" && (delete o[a][r][i.ReverseConstraint[l]], a !== "Default" && c(r, a), t = !0) } } if (e.elements.length > 0 && !t) throw new s.Exception.IllegalArgumentException("Element with id " + r + " does not have any constraints bound to it. " + s.explodeParameters(e)) } function w(e) { var n = e.elementId, r = e.group, s = e.constraint, u = typeof o[t.ReverseGroup[t.Group.Default]][n] != "undefined"; if (u && typeof r != "undefined" && typeof s == "undefined") { var a = t.ReverseGroup[r]; u = typeof a != "undefined" && typeof o[a][n] != "undefined" } else if (u && typeof r == "undefined" && typeof s != "undefined") { var f = i.ReverseConstraint[s]; u = typeof f != "undefined" && typeof o[t.ReverseGroup[t.Group.Default]][n][f] != "undefined" } else if (u && typeof r != "undefined" && typeof s != "undefined") { var a = t.ReverseGroup[r], f = i.ReverseConstraint[s]; u = typeof a != "undefined" && typeof f != "undefined" && typeof o[a][n] != "undefined" && typeof o[a][n][f] != "undefined" } return u } var o = null, u = {}; return { initializeBoundConstraints: a, resetBoundConstraints: f, getBoundConstraints: l, removeElementAndGroupFromBoundConstraintsIfEmpty: c, bindAfterParsing: p, bindHTML5ValidationConstraints: d, bindFromOptions: v, unbind: b, isBound: w } }), function (e, t) { typeof define == "function" && define.amd ? define("regula", ["utils/MapUtils", "utils/DOMUtils", "service/BindingService", "service/ExceptionService", "service/ConstraintService", "service/ValidationService", "service/GroupService"], t) : (e.regula = t(e.regulaModules.MapUtils, e.regulaModules.DOMUtils, e.regulaModules.BindingService, e.regulaModules.ExceptionService, e.regulaModules.ConstraintService, e.regulaModules.ValidationService, e.regulaModules.GroupService), e.regula._modules = e.regulaModules, e.regulaModules = undefined) }(this, function (e, t, n, r, i, s, o) { function f(t) { e.iterateOverMap(t, function (e, t, n) { typeof u[e] != "undefined" && (u[e] = t) }) } function l(e) { var i = { successful: !0, message: "", data: null }; if (typeof e == "undefined" || !e) n.resetBoundConstraints(), u.enableHTML5Validation && t.supportsHTML5Validation() && (i = n.bindHTML5ValidationConstraints({ element: null })), i.successful && (i = n.bindAfterParsing({ element: null })); else { var s = e.elements; if (typeof s == "undefined" || !s) u.enableHTML5Validation && t.supportsHTML5Validation() && typeof e.element != "undefined" && e.element !== null && (i = n.bindHTML5ValidationConstraints({ element: e.element })), i.successful && (i = n.bindFromOptions(e)); else { var o = 0; while (i.successful && o < s.length) e.element = s[o], u.enableHTML5Validation && t.supportsHTML5Validation() && (i = n.bindHTML5ValidationConstraints({ element: e.element })), i.successful ? (i = n.bindFromOptions(e), i.successful || (i.message = "regula.bind: Element " + (o + 1) + " of " + s.length + " failed: " + i.message)) : i.message = "regula.bind: Failed binding HTML5 validation constraints: Element " + (o + 1) + " of " + s.length + " failed: " + i.message, o++ } } if (!i.successful) throw new r.Exception.BindException(i.message) } function c(e) { if (typeof e == "undefined" || !e) n.resetBoundConstraints(); else { if (typeof e.elementId == "undefined" && typeof e.elements == "undefined") throw new r.Exception.IllegalArgumentException("regula.unbind requires an elementId attribute, or an elements attribute if options are provided"); if (!(typeof e.elements == "undefined" || e.elements instanceof Array)) throw new r.Exception.IllegalArgumentException("regula.unbind expects the elements attribute to be an array, if it is provided"); if (typeof e.elements == "undefined") { e.elements = [document.getElementById(e.elementId)]; if (e.elements[0] === null) throw new r.Exception.IllegalArgumentException("Element with id " + e.elementId + " does not have any constraints bound to it. " + r.explodeParameters(e)) } n.unbind(e) } } function h(e) { if (typeof e == "undefined") throw new r.Exception.IllegalArgumentException("regula.isBound expects options"); var t = e.element, i = e.elementId; if (typeof t == "undefined" && typeof i == "undefined") throw new r.Exception.IllegalArgumentException("regula.isBound expects at the very least, either an element or elementId attribute"); if (e.hasOwnProperty("constraint") && typeof e.constraint == "undefined") throw new r.Exception.IllegalArgumentException("Undefined constraint was supplied as a parameter"); if (e.hasOwnProperty("group") && typeof e.group == "undefined") throw new r.Exception.IllegalArgumentException("Undefined group was supplied as a parameter"); return typeof t != "undefined" && (i = t.id), n.isBound({ elementId: i, group: e.group, constraint: e.constraint }) } function p(e) { if (!e) throw new r.Exception.IllegalArgumentException("regula.override expects options"); if (typeof e.constraintType == "undefined") throw new r.Exception.IllegalArgumentException("regula.override expects a valid constraintType attribute in the options argument"); var t = i.ReverseConstraint[e.constraintType]; if (typeof t == "undefined") throw new r.Exception.IllegalArgumentException("regula.override: I could not find the specified constraint. Perhaps it has not been defined? Function received: " + r.explodeParameters(e)); var n = !1, s = i.constraintDefinitions[t].formSpecific; i.constraintDefinitions[t].custom && (s = typeof e.formSpecific == "undefined" ? i.constraintDefinitions[t].formSpecific : e.formSpecific); var o = i.constraintDefinitions[t].custom && typeof e.async != "undefined" ? e.async : i.constraintDefinitions[t].async, u = i.constraintDefinitions[t].custom ? e.params || i.constraintDefinitions[t].params : i.constraintDefinitions[t].params, a = e.defaultMessage || i.constraintDefinitions[t].defaultMessage, f = i.constraintDefinitions[t].compound, l = e.constraints || i.constraintDefinitions[t].constraints, c = i.constraintDefinitions[t].validator; i.constraintDefinitions[t].custom && !i.constraintDefinitions[t].compound && typeof e.validator != "undefined" && (c = e.validator, n = !0); if (typeof s != "boolean") throw new r.Exception.IllegalArgumentException("regula.override expects the formSpecific attribute in the options argument to be a boolean"); if (typeof c != "function") throw new r.Exception.IllegalArgumentException("regula.override expects the validator attribute in the options argument to be a function"); if (!(u instanceof Array)) throw new r.Exception.IllegalArgumentException("regula.override expects the params attribute in the options argument to be an array"); if (typeof a != "string") throw new r.Exception.IllegalArgumentException("regula.override expects the defaultMessage attribute in the options argument to be a string"); i.override({ async: o, formSpecific: s, name: t, constraintType: e.constraintType, compound: f, params: u, composingConstraints: l, defaultMessage: a, validator: c, validatorRedefined: n }) } function d(e) { if (!e) throw new r.Exception.IllegalArgumentException("regula.custom expects options"); var t = e.name, n = e.formSpecific || !1, s = e.validator, o = e.params || [], u = e.defaultMessage || "", a = typeof e.async == "undefined" ? !1 : e.async; if (!t) throw new r.Exception.IllegalArgumentException("regula.custom expects a name attribute in the options argument"); if (typeof t != "string") throw new r.Exception.IllegalArgumentException("regula.custom expects the name attribute in the options argument to be a string"); if (t.replace(/\s/g, "").length == 0) throw new r.Exception.IllegalArgumentException("regula.custom cannot accept an empty string for the name attribute in the options argument"); if (typeof n != "boolean") throw new r.Exception.IllegalArgumentException("regula.custom expects the formSpecific attribute in the options argument to be a boolean"); if (!s) throw new r.Exception.IllegalArgumentException("regula.custom expects a validator attribute in the options argument"); if (typeof s != "function") throw new r.Exception.IllegalArgumentException("regula.custom expects the validator attribute in the options argument to be a function"); if (o.constructor.toString().indexOf("Array") < 0) throw new r.Exception.IllegalArgumentException("regula.custom expects the params attribute in the options argument to be an array"); if (typeof u != "string") throw new r.Exception.IllegalArgumentException("regula.custom expects the defaultMessage attribute in the options argument to be a string"); if (i.constraintDefinitions[t]) throw new r.Exception.IllegalArgumentException("There is already a constraint called " + t + ". If you wish to override this constraint, use regula.override"); i.custom({ async: a, name: t, formSpecific: n, validator: s, custom: !0, compound: !1, params: o, defaultMessage: u }) } function v(e) { if (!e) throw new r.Exception.IllegalArgumentException("regula.compound expects options"); var t = e.name, n = e.constraints || [], s = e.formSpecific || !1, o = e.defaultMessage || "", u = e.params || [], a = typeof e.reportAsSingleViolation == "undefined" ? !1 : e.reportAsSingleViolation; if (!t) throw new r.Exception.IllegalArgumentException("regula.compound expects a name attribute in the options argument"); if (typeof t != "string") throw new r.Exception.IllegalArgumentException("regula.compound expects name to be a string parameter"); if (u.constructor.toString().indexOf("Array") < 0) throw new r.Exception.IllegalArgumentException("regula.compound expects the params attribute in the options argument to be an array"); if (n.length == 0) throw new r.Exception.IllegalArgumentException("regula.compound expects an array of composing constraints under a constraints attribute in the options argument"); if (i.constraintDefinitions[t]) throw new r.Exception.IllegalArgumentException("regula.compound: There is already a constraint called " + t + ". If you wish to override this constraint, use regula.override"); i.compound({ name: t, formSpecific: s, params: u, reportAsSingleViolation: a, constraints: n, defaultMessage: o }) } function m(e, t) { s.init({ config: u, ReverseConstraint: i.ReverseConstraint, constraintDefinitions: i.constraintDefinitions, boundConstraints: n.getBoundConstraints() }); var o = []; if (typeof e == "undefined" || typeof e.groups == "undefined" || e.groups instanceof Array) { if (typeof e != "undefined" && typeof e.groups != "undefined" && e.groups.length == 0) throw new r.Exception.IllegalArgumentException("regula.validate: If a groups attribute is provided, it must not be empty."); if (typeof e != "undefined" && e.hasOwnProperty("constraintType") && typeof e.constraintType == "undefined") throw new r.Exception.IllegalArgumentException("regula.validate: If a constraintType attribute is provided, it cannot be undefined."); typeof t == "undefined" && typeof e == "function" && (e = { callback: e }), typeof t != "undefined" && (e.callback = t); if (typeof e != "undefined" && typeof e.elements != "undefined") { if (!(e.elements instanceof Array)) throw new r.Exception.IllegalArgumentException("regula.validate: If an elements attribute is provided, it must be an array."); if (e.elements.length == 0) throw new r.Exception.IllegalArgumentException("regula.validate: If an elements attribute is provided, it must not be empty."); o = s.validate(e) } else o = s.validate(e); return o } throw new r.Exception.IllegalArgumentException("regula.validate: If a groups attribute is provided, it must be an array.") } var u = { validateEmptyFields: !0, enableHTML5Validation: !0, debug: !1 }, a = { DMY: "DMY", MDY: "MDY", YMD: "YMD" }; return n.initializeBoundConstraints(), s.initializePublicValidators(i.constraintDefinitions), { configure: f, bind: l, unbind: c, isBound: h, validate: m, custom: d, compound: v, override: p, Constraint: i.Constraint, Group: o.Group, DateFormat: a, Exception: r.Exception } }); !function (e) { "function" == typeof define && define.amd ? define(["jquery"], e) : e(jQuery) }(function (e) { function t(e) { return i[e] ? i[e].apply(this, Array.prototype.slice.call(arguments, 1)) : "object" != typeof e && e ? void n.error("Method " + e + " does not exist on jQuery.regula") : i.bind.apply(this, arguments) } var n = e, i = { bind: function (t) { return this instanceof e && (t || (t = {}), this.get().length > 0 && n.extend(!0, t, { elements: this.get() })), regula.bind(t), this }, unbind: function (t) { return this instanceof e && (t || (t = {}), this.get().length > 0 && n.extend(!0, t, { elements: this.get() })), regula.unbind(t), this }, isBound: function (t) { return this instanceof e && (t || (t = {}), this.get().length > 0 && n.extend(!0, t, { element: this.get(0) })), regula.isBound(t), this }, validate: function (t) { return this instanceof e && (t || (t = {}), this.get().length > 0 && n.extend(!0, t, { elements: this.get() })), regula.validate(t) }, custom: function (e) { return regula.custom(e), this }, compound: function (e) { return regula.compound(e), this }, override: function (e) { return regula.override(e), this } }; i.on = i.bind, i.off = i.unbind, n.fn.regula = t, n.regula = t });
/**
* @module Form
* @version 3.51
* @author M. Alsup
* @see {@link http://malsup.com/jquery/form}
* @see {@link https://github.com/jquery-form/form}
* @license MIT and GPL
* @requires module:jQuery
*/
!function (e) { "use strict"; "function" == typeof define && define.amd ? define(["../jquery"], e) : e("undefined" != typeof jQuery ? jQuery : window.Zepto) }(function (e) { "use strict"; function t(t) { var r = t.data; t.isDefaultPrevented() || (t.preventDefault(), e(t.target).ajaxSubmit(r)) } function r(t) { var r = t.target, a = e(r); if (!a.is("[type=submit],[type=image]")) { var n = a.closest("[type=submit]"); if (0 === n.length) return; r = n[0] } var i = this; if (i.clk = r, "image" == r.type) if (void 0 !== t.offsetX) i.clk_x = t.offsetX, i.clk_y = t.offsetY; else if ("function" == typeof e.fn.offset) { var o = a.offset(); i.clk_x = t.pageX - o.left, i.clk_y = t.pageY - o.top } else i.clk_x = t.pageX - r.offsetLeft, i.clk_y = t.pageY - r.offsetTop; setTimeout(function () { i.clk = i.clk_x = i.clk_y = null }, 100) } function a() { if (e.fn.ajaxSubmit.debug) { var t = "[jquery.form] " + Array.prototype.join.call(arguments, ""); window.console && window.console.log ? window.console.log(t) : window.opera && window.opera.postError && window.opera.postError(t) } } var n = {}; n.fileapi = void 0 !== e("<input type='file'/>").get(0).files, n.formdata = void 0 !== window.FormData; var i = !!e.fn.prop; e.fn.attr2 = function () { if (!i) return this.attr.apply(this, arguments); var e = this.prop.apply(this, arguments); return e && e.jquery || "string" == typeof e ? e : this.attr.apply(this, arguments) }, e.fn.ajaxSubmit = function (t) { function r(r) { var a, n, i = e.param(r, t.traditional).split("&"), o = i.length, s = []; for (a = 0; o > a; a++)i[a] = i[a].replace(/\+/g, " "), n = i[a].split("="), s.push([decodeURIComponent(n[0]), decodeURIComponent(n[1])]); return s } function o(a) { for (var n = new FormData, i = 0; i < a.length; i++)n.append(a[i].name, a[i].value); if (t.extraData) { var o = r(t.extraData); for (i = 0; i < o.length; i++)o[i] && n.append(o[i][0], o[i][1]) } t.data = null; var s = e.extend(!0, {}, e.ajaxSettings, t, { contentType: !1, processData: !1, cache: !1, type: u || "POST" }); t.uploadProgress && (s.xhr = function () { var r = e.ajaxSettings.xhr(); return r.upload && r.upload.addEventListener("progress", function (e) { var r = 0, a = e.loaded || e.position, n = e.total; e.lengthComputable && (r = Math.ceil(a / n * 100)), t.uploadProgress(e, a, n, r) }, !1), r }), s.data = null; var c = s.beforeSend; return s.beforeSend = function (e, r) { r.data = t.formData ? t.formData : n, c && c.call(this, e, r) }, e.ajax(s) } function s(r) { function n(e) { var t = null; try { e.contentWindow && (t = e.contentWindow.document) } catch (r) { a("cannot get iframe.contentWindow document: " + r) } if (t) return t; try { t = e.contentDocument ? e.contentDocument : e.document } catch (r) { a("cannot get iframe.contentDocument: " + r), t = e.document } return t } function o() { function t() { try { var e = n(g).readyState; a("state = " + e), e && "uninitialized" == e.toLowerCase() && setTimeout(t, 50) } catch (r) { a("Server abort: ", r, " (", r.name, ")"), s(k), j && clearTimeout(j), j = void 0 } } var r = f.attr2("target"), i = f.attr2("action"), o = "multipart/form-data", c = f.attr("enctype") || f.attr("encoding") || o; w.setAttribute("target", p), (!u || /post/i.test(u)) && w.setAttribute("method", "POST"), i != m.url && w.setAttribute("action", m.url), m.skipEncodingOverride || u && !/post/i.test(u) || f.attr({ encoding: "multipart/form-data", enctype: "multipart/form-data" }), m.timeout && (j = setTimeout(function () { T = !0, s(D) }, m.timeout)); var l = []; try { if (m.extraData) for (var d in m.extraData) m.extraData.hasOwnProperty(d) && l.push(e.isPlainObject(m.extraData[d]) && m.extraData[d].hasOwnProperty("name") && m.extraData[d].hasOwnProperty("value") ? e('<input type="hidden" name="' + m.extraData[d].name + '">').val(m.extraData[d].value).appendTo(w)[0] : e('<input type="hidden" name="' + d + '">').val(m.extraData[d]).appendTo(w)[0]); m.iframeTarget || v.appendTo("body"), g.attachEvent ? g.attachEvent("onload", s) : g.addEventListener("load", s, !1), setTimeout(t, 15); try { w.submit() } catch (h) { var x = document.createElement("form").submit; x.apply(w) } } finally { w.setAttribute("action", i), w.setAttribute("enctype", c), r ? w.setAttribute("target", r) : f.removeAttr("target"), e(l).remove() } } function s(t) { if (!x.aborted && !F) { if (M = n(g), M || (a("cannot access response document"), t = k), t === D && x) return x.abort("timeout"), void S.reject(x, "timeout"); if (t == k && x) return x.abort("server abort"), void S.reject(x, "error", "server abort"); if (M && M.location.href != m.iframeSrc || T) { g.detachEvent ? g.detachEvent("onload", s) : g.removeEventListener("load", s, !1); var r, i = "success"; try { if (T) throw "timeout"; var o = "xml" == m.dataType || M.XMLDocument || e.isXMLDoc(M); if (a("isXml=" + o), !o && window.opera && (null === M.body || !M.body.innerHTML) && --O) return a("requeing onLoad callback, DOM not available"), void setTimeout(s, 250); var u = M.body ? M.body : M.documentElement; x.responseText = u ? u.innerHTML : null, x.responseXML = M.XMLDocument ? M.XMLDocument : M, o && (m.dataType = "xml"), x.getResponseHeader = function (e) { var t = { "content-type": m.dataType }; return t[e.toLowerCase()] }, u && (x.status = Number(u.getAttribute("status")) || x.status, x.statusText = u.getAttribute("statusText") || x.statusText); var c = (m.dataType || "").toLowerCase(), l = /(json|script|text)/.test(c); if (l || m.textarea) { var f = M.getElementsByTagName("textarea")[0]; if (f) x.responseText = f.value, x.status = Number(f.getAttribute("status")) || x.status, x.statusText = f.getAttribute("statusText") || x.statusText; else if (l) { var p = M.getElementsByTagName("pre")[0], h = M.getElementsByTagName("body")[0]; p ? x.responseText = p.textContent ? p.textContent : p.innerText : h && (x.responseText = h.textContent ? h.textContent : h.innerText) } } else "xml" == c && !x.responseXML && x.responseText && (x.responseXML = X(x.responseText)); try { E = _(x, c, m) } catch (y) { i = "parsererror", x.error = r = y || i } } catch (y) { a("error caught: ", y), i = "error", x.error = r = y || i } x.aborted && (a("upload aborted"), i = null), x.status && (i = x.status >= 200 && x.status < 300 || 304 === x.status ? "success" : "error"), "success" === i ? (m.success && m.success.call(m.context, E, "success", x), S.resolve(x.responseText, "success", x), d && e.event.trigger("ajaxSuccess", [x, m])) : i && (void 0 === r && (r = x.statusText), m.error && m.error.call(m.context, x, i, r), S.reject(x, "error", r), d && e.event.trigger("ajaxError", [x, m, r])), d && e.event.trigger("ajaxComplete", [x, m]), d && !--e.active && e.event.trigger("ajaxStop"), m.complete && m.complete.call(m.context, x, i), F = !0, m.timeout && clearTimeout(j), setTimeout(function () { m.iframeTarget ? v.attr("src", m.iframeSrc) : v.remove(), x.responseXML = null }, 100) } } } var c, l, m, d, p, v, g, x, y, b, T, j, w = f[0], S = e.Deferred(); if (S.abort = function (e) { x.abort(e) }, r) for (l = 0; l < h.length; l++)c = e(h[l]), i ? c.prop("disabled", !1) : c.removeAttr("disabled"); if (m = e.extend(!0, {}, e.ajaxSettings, t), m.context = m.context || m, p = "jqFormIO" + (new Date).getTime(), m.iframeTarget ? (v = e(m.iframeTarget), b = v.attr2("name"), b ? p = b : v.attr2("name", p)) : (v = e('<iframe name="' + p + '" src="' + m.iframeSrc + '" />'), v.css({ position: "absolute", top: "-1000px", left: "-1000px" })), g = v[0], x = { aborted: 0, responseText: null, responseXML: null, status: 0, statusText: "n/a", getAllResponseHeaders: function () { }, getResponseHeader: function () { }, setRequestHeader: function () { }, abort: function (t) { var r = "timeout" === t ? "timeout" : "aborted"; a("aborting upload... " + r), this.aborted = 1; try { g.contentWindow.document.execCommand && g.contentWindow.document.execCommand("Stop") } catch (n) { } v.attr("src", m.iframeSrc), x.error = r, m.error && m.error.call(m.context, x, r, t), d && e.event.trigger("ajaxError", [x, m, r]), m.complete && m.complete.call(m.context, x, r) } }, d = m.global, d && 0 === e.active++ && e.event.trigger("ajaxStart"), d && e.event.trigger("ajaxSend", [x, m]), m.beforeSend && m.beforeSend.call(m.context, x, m) === !1) return m.global && e.active--, S.reject(), S; if (x.aborted) return S.reject(), S; y = w.clk, y && (b = y.name, b && !y.disabled && (m.extraData = m.extraData || {}, m.extraData[b] = y.value, "image" == y.type && (m.extraData[b + ".x"] = w.clk_x, m.extraData[b + ".y"] = w.clk_y))); var D = 1, k = 2, A = e("meta[name=csrf-token]").attr("content"), L = e("meta[name=csrf-param]").attr("content"); L && A && (m.extraData = m.extraData || {}, m.extraData[L] = A), m.forceSync ? o() : setTimeout(o, 10); var E, M, F, O = 50, X = e.parseXML || function (e, t) { return window.ActiveXObject ? (t = new ActiveXObject("Microsoft.XMLDOM"), t.async = "false", t.loadXML(e)) : t = (new DOMParser).parseFromString(e, "text/xml"), t && t.documentElement && "parsererror" != t.documentElement.nodeName ? t : null }, C = e.parseJSON || function (e) { return window.eval("(" + e + ")") }, _ = function (t, r, a) { var n = t.getResponseHeader("content-type") || "", i = "xml" === r || !r && n.indexOf("xml") >= 0, o = i ? t.responseXML : t.responseText; return i && "parsererror" === o.documentElement.nodeName && e.error && e.error("parsererror"), a && a.dataFilter && (o = a.dataFilter(o, r)), "string" == typeof o && ("json" === r || !r && n.indexOf("json") >= 0 ? o = C(o) : ("script" === r || !r && n.indexOf("javascript") >= 0) && e.globalEval(o)), o }; return S } if (!this.length) return a("ajaxSubmit: skipping submit process - no element selected"), this; var u, c, l, f = this; "function" == typeof t ? t = { success: t } : void 0 === t && (t = {}), u = t.type || this.attr2("method"), c = t.url || this.attr2("action"), l = "string" == typeof c ? e.trim(c) : "", l = l || window.location.href || "", l && (l = (l.match(/^([^#]+)/) || [])[1]), t = e.extend(!0, { url: l, success: e.ajaxSettings.success, type: u || e.ajaxSettings.type, iframeSrc: /^https/i.test(window.location.href || "") ? "javascript:false" : "about:blank" }, t); var m = {}; if (this.trigger("form-pre-serialize", [this, t, m]), m.veto) return a("ajaxSubmit: submit vetoed via form-pre-serialize trigger"), this; if (t.beforeSerialize && t.beforeSerialize(this, t) === !1) return a("ajaxSubmit: submit aborted via beforeSerialize callback"), this; var d = t.traditional; void 0 === d && (d = e.ajaxSettings.traditional); var p, h = [], v = this.formToArray(t.semantic, h); if (t.data && (t.extraData = t.data, p = e.param(t.data, d)), t.beforeSubmit && t.beforeSubmit(v, this, t) === !1) return a("ajaxSubmit: submit aborted via beforeSubmit callback"), this; if (this.trigger("form-submit-validate", [v, this, t, m]), m.veto) return a("ajaxSubmit: submit vetoed via form-submit-validate trigger"), this; var g = e.param(v, d); p && (g = g ? g + "&" + p : p), "GET" == t.type.toUpperCase() ? (t.url += (t.url.indexOf("?") >= 0 ? "&" : "?") + g, t.data = null) : t.data = g; var x = []; if (t.resetForm && x.push(function () { f.resetForm() }), t.clearForm && x.push(function () { f.clearForm(t.includeHidden) }), !t.dataType && t.target) { var y = t.success || function () { }; x.push(function (r) { var a = t.replaceTarget ? "replaceWith" : "html"; e(t.target)[a](r).each(y, arguments) }) } else t.success && x.push(t.success); if (t.success = function (e, r, a) { for (var n = t.context || this, i = 0, o = x.length; o > i; i++)x[i].apply(n, [e, r, a || f, f]) }, t.error) { var b = t.error; t.error = function (e, r, a) { var n = t.context || this; b.apply(n, [e, r, a, f]) } } if (t.complete) { var T = t.complete; t.complete = function (e, r) { var a = t.context || this; T.apply(a, [e, r, f]) } } var j = e("input[type=file]:enabled", this).filter(function () { return "" !== e(this).val() }), w = j.length > 0, S = "multipart/form-data", D = f.attr("enctype") == S || f.attr("encoding") == S, k = n.fileapi && n.formdata; a("fileAPI :" + k); var A, L = (w || D) && !k; t.iframe !== !1 && (t.iframe || L) ? t.closeKeepAlive ? e.get(t.closeKeepAlive, function () { A = s(v) }) : A = s(v) : A = (w || D) && k ? o(v) : e.ajax(t), f.removeData("jqxhr").data("jqxhr", A); for (var E = 0; E < h.length; E++)h[E] = null; return this.trigger("form-submit-notify", [this, t]), this }, e.fn.ajaxForm = function (n) { if (n = n || {}, n.delegation = n.delegation && e.isFunction(e.fn.on), !n.delegation && 0 === this.length) { var i = { s: this.selector, c: this.context }; return !e.isReady && i.s ? (a("DOM not ready, queuing ajaxForm"), e(function () { e(i.s, i.c).ajaxForm(n) }), this) : (a("terminating; zero elements found by selector" + (e.isReady ? "" : " (DOM not ready)")), this) } return n.delegation ? (e(document).off("submit.form-plugin", this.selector, t).off("click.form-plugin", this.selector, r).on("submit.form-plugin", this.selector, n, t).on("click.form-plugin", this.selector, n, r), this) : this.ajaxFormUnbind().bind("submit.form-plugin", n, t).bind("click.form-plugin", n, r) }, e.fn.ajaxFormUnbind = function () { return this.unbind("submit.form-plugin click.form-plugin") }, e.fn.formToArray = function (t, r) { var a = []; if (0 === this.length) return a; var i, o = this[0], s = this.attr("id"), u = t ? o.getElementsByTagName("*") : o.elements; if (u && !/MSIE [678]/.test(navigator.userAgent) && (u = e(u).get()), s && (i = e(':input[form="' + s + '"]').get(), i.length && (u = (u || []).concat(i))), !u || !u.length) return a; var c, l, f, m, d, p, h; for (c = 0, p = u.length; p > c; c++)if (d = u[c], f = d.name, f && !d.disabled) if (t && o.clk && "image" == d.type) o.clk == d && (a.push({ name: f, value: e(d).val(), type: d.type }), a.push({ name: f + ".x", value: o.clk_x }, { name: f + ".y", value: o.clk_y })); else if (m = e.fieldValue(d, !0), m && m.constructor == Array) for (r && r.push(d), l = 0, h = m.length; h > l; l++)a.push({ name: f, value: m[l] }); else if (n.fileapi && "file" == d.type) { r && r.push(d); var v = d.files; if (v.length) for (l = 0; l < v.length; l++)a.push({ name: f, value: v[l], type: d.type }); else a.push({ name: f, value: "", type: d.type }) } else null !== m && "undefined" != typeof m && (r && r.push(d), a.push({ name: f, value: m, type: d.type, required: d.required })); if (!t && o.clk) { var g = e(o.clk), x = g[0]; f = x.name, f && !x.disabled && "image" == x.type && (a.push({ name: f, value: g.val() }), a.push({ name: f + ".x", value: o.clk_x }, { name: f + ".y", value: o.clk_y })) } return a }, e.fn.formSerialize = function (t) { return e.param(this.formToArray(t)) }, e.fn.fieldSerialize = function (t) { var r = []; return this.each(function () { var a = this.name; if (a) { var n = e.fieldValue(this, t); if (n && n.constructor == Array) for (var i = 0, o = n.length; o > i; i++)r.push({ name: a, value: n[i] }); else null !== n && "undefined" != typeof n && r.push({ name: this.name, value: n }) } }), e.param(r) }, e.fn.fieldValue = function (t) { for (var r = [], a = 0, n = this.length; n > a; a++) { var i = this[a], o = e.fieldValue(i, t); null === o || "undefined" == typeof o || o.constructor == Array && !o.length || (o.constructor == Array ? e.merge(r, o) : r.push(o)) } return r }, e.fieldValue = function (t, r) { var a = t.name, n = t.type, i = t.tagName.toLowerCase(); if (void 0 === r && (r = !0), r && (!a || t.disabled || "reset" == n || "button" == n || ("checkbox" == n || "radio" == n) && !t.checked || ("submit" == n || "image" == n) && t.form && t.form.clk != t || "select" == i && -1 == t.selectedIndex)) return null; if ("select" == i) { var o = t.selectedIndex; if (0 > o) return null; for (var s = [], u = t.options, c = "select-one" == n, l = c ? o + 1 : u.length, f = c ? o : 0; l > f; f++) { var m = u[f]; if (m.selected) { var d = m.value; if (d || (d = m.attributes && m.attributes.value && !m.attributes.value.specified ? m.text : m.value), c) return d; s.push(d) } } return s } return e(t).val() }, e.fn.clearForm = function (t) { return this.each(function () { e("input,select,textarea", this).clearFields(t) }) }, e.fn.clearFields = e.fn.clearInputs = function (t) { var r = /^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i; return this.each(function () { var a = this.type, n = this.tagName.toLowerCase(); r.test(a) || "textarea" == n ? this.value = "" : "checkbox" == a || "radio" == a ? this.checked = !1 : "select" == n ? this.selectedIndex = -1 : "file" == a ? /MSIE/.test(navigator.userAgent) ? e(this).replaceWith(e(this).clone(!0)) : e(this).val("") : t && (t === !0 && /hidden/.test(a) || "string" == typeof t && e(this).is(t)) && (this.value = "") }) }, e.fn.resetForm = function () { return this.each(function () { ("function" == typeof this.reset || "object" == typeof this.reset && !this.reset.nodeType) && this.reset() }) }, e.fn.enable = function (e) { return void 0 === e && (e = !0), this.each(function () { this.disabled = !e }) }, e.fn.selected = function (t) { return void 0 === t && (t = !0), this.each(function () { var r = this.type; if ("checkbox" == r || "radio" == r) this.checked = t; else if ("option" == this.tagName.toLowerCase()) { var a = e(this).parent("select"); t && a[0] && "select-one" == a[0].type && a.find("option").selected(!1), this.selected = t } }) }, e.fn.ajaxSubmit.debug = !1 });
/**
* @module RD FilePicker
* @author Aleksey Patsurkovskiy
* @version 1.0.2
* @license MIT
* @link http://cms.devoffice.com/coding-demo/mnemon1k/rd-filepicker/demo/
*/
(function () { (function (c, f, e) { var d; d = function () { function b(a, b) { this.options = c.extend(!0, {}, this.Defaults, b); this.$element = c(a); this.$dropZone = c("." + this.options.dropZoneClass); this.$button = c("." + this.options.buttonClass); this.$meta = c("." + this.options.metaFieldClass); this.$input = this.$element.find("input[type='file']"); this.initialize() } b.prototype.Defaults = { buttonClass: null, dropZoneClass: null, metaFieldClass: null, "multiple\u0421aption": "{count} files selected", mouseOverClass: "file-grabbing", callbacks: { onInit: !1, onValueChange: !1, onFileDrop: !1 } }; b.prototype.initialize = function () { this.applyHandlers(); this.options.callbacks.onInit && this.options.callbacks.onInit.call(this, this); return this }; b.prototype.applyHandlers = function () { var a; a = this; if (0 !== a.$button.length) a.$button.on("click", function (b) { b.preventDefault(); b.stopPropagation(); return a.$input.trigger("click") }); else a.$element.on("click", function (b) { b.stopPropagation(); return a.$input.trigger("click") }); if (0 !== a.$dropZone.length) a.$dropZone.on("drag dragstart dragend dragover dragenter dragleave drop", function (a) { a.preventDefault(); return a.stopPropagation() }).on("dragover dragenter", c.proxy(a.dragEnterHandler, a)).on("dragleave dragend drop", c.proxy(a.dragEndHandler, a)).on("drop", c.proxy(a.dropHandler, a)); a.$input.on("click", function (a) { return a.stopPropagation() }); a.$input.on("change", c.proxy(a.changeHandler, a)); return a }; b.prototype.dragEnterHandler = function (a) { this.$element.addClass(this.options.mouseOverClass); return this }; b.prototype.dragEndHandler = function (a) { this.$element.removeClass(this.options.mouseOverClass); return this }; b.prototype.dropHandler = function (a) { this.updateMeta(a.originalEvent.dataTransfer.files); this.$input[0].files = a.originalEvent.dataTransfer.files; this.options.callbacks.onFileDrop && this.options.callbacks.onFileDrop.call(this, this, a.originalEvent.dataTransfer.files); return this }; b.prototype.changeHandler = function (a) { this.updateMeta(this.$input[0].files); this.options.callbacks.onValueChange && this.options.callbacks.onValueChange.call(this, this, this.$input[0].files); return this }; b.prototype.updateMeta = function (a) { this.$meta.text(1 < a.length ? this.options.multiple\u0421aption.replace("{count}", a.length + "") : a[0].name); return this }; return b }(); c.fn.extend({ RDFilepicker: function (b) { return this.each(function () { var a; a = c(this); if (!a.data("RDFilepicker")) return a.data("RDFilepicker", new d(this, b)) }) } }); return e.RDFilepicker = d })(window.jQuery, document, window); "undefined" !== typeof module && null !== module ? module.exports = window.RDFilepicker : "function" === typeof define && define.amd && define(["jquery"], function () { return window.RDFilepicker }) }).call(this);
/**
* @module RDInputLabel
* @author Evgeniy Gusarov
* @license MIT
*/
(function () { !function (t, e, i) { var s, n; return n = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), isWebkit = /safari|chrome/i.test(navigator.userAgent), s = function () { function s(s, n) { this.options = t.extend(!0, {}, this.Defaults, n), this.$element = t(s).addClass("rd-input-label"), this.$target = t("#" + this.$element.attr("for")), this.$win = t(i), this.$doc = t(e), this.initialize() } return s.prototype.Defaults = { callbacks: null }, s.prototype.initialize = function () { return this.$target.on("input", t.proxy(this.change, this)).on("focus", t.proxy(this.focus, this)).on("blur", t.proxy(this.blur, this)).on("hover", t.proxy(this.hover, this)).parents("form").on("reset", t.proxy(this.reset, this)), this.change(), this.hover(), this }, s.prototype.hover = function () { return isWebkit && (this.$target.is(":-webkit-autofill") ? this.$element.addClass("auto-fill") : this.$element.removeClass("auto-fill")), this }, s.prototype.change = function () { return isWebkit && (this.$target.is(":-webkit-autofill") ? this.$element.addClass("auto-fill") : this.$element.removeClass("auto-fill")), "" !== this.$target.val() ? (this.$element.hasClass("focus") || this.focus(), this.$element.addClass("not-empty")) : this.$element.removeClass("not-empty"), this }, s.prototype.focus = function () { return this.$element.addClass("focus"), this }, s.prototype.reset = function () { return setTimeout(t.proxy(this.blur, this)), this }, s.prototype.blur = function (t) { return "" === this.$target.val() && this.$element.removeClass("focus").removeClass("not-empty"), this }, s }(), t.fn.extend({ RDInputLabel: function (e) { return this.each(function () { var i; return i = t(this), i.data("RDInputLabel") ? void 0 : i.data("RDInputLabel", new s(this, e)) }) } }), i.RDInputLabel = s }(window.jQuery, document, window), "undefined" != typeof module && null !== module ? module.exports = window.RDInputLabel : "function" == typeof define && define.amd && define(["jquery"], function () { "use strict"; return window.RDInputLabel }) }).call(this);
/**
* @module Owl carousel
* @version 2.3.4
* @author David Deutsch
* @copyright 2013-2018 David Deutsch
* @license {@link https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE}
*/
!function (a, b, c, d) { function e(b, c) { this.settings = null, this.options = a.extend({}, e.Defaults, c), this.$element = a(b), this._handlers = {}, this._plugins = {}, this._supress = {}, this._current = null, this._speed = null, this._coordinates = [], this._breakpoint = null, this._width = null, this._items = [], this._clones = [], this._mergers = [], this._widths = [], this._invalidated = {}, this._pipe = [], this._drag = { time: null, target: null, pointer: null, stage: { start: null, current: null }, direction: null }, this._states = { current: {}, tags: { initializing: ["busy"], animating: ["busy"], dragging: ["interacting"] } }, a.each(["onResize", "onThrottledResize"], a.proxy(function (b, c) { this._handlers[c] = a.proxy(this[c], this) }, this)), a.each(e.Plugins, a.proxy(function (a, b) { this._plugins[a.charAt(0).toLowerCase() + a.slice(1)] = new b(this) }, this)), a.each(e.Workers, a.proxy(function (b, c) { this._pipe.push({ filter: c.filter, run: a.proxy(c.run, this) }) }, this)), this.setup(), this.initialize() } e.Defaults = { items: 3, loop: !1, center: !1, rewind: !1, checkVisibility: !0, mouseDrag: !0, touchDrag: !0, pullDrag: !0, freeDrag: !1, margin: 0, stagePadding: 0, merge: !1, mergeFit: !0, autoWidth: !1, startPosition: 0, rtl: !1, smartSpeed: 250, fluidSpeed: !1, dragEndSpeed: !1, responsive: {}, responsiveRefreshRate: 200, responsiveBaseElement: b, fallbackEasing: "swing", slideTransition: "", info: !1, nestedItemSelector: !1, itemElement: "div", stageElement: "div", refreshClass: "owl-refresh", loadedClass: "owl-loaded", loadingClass: "owl-loading", rtlClass: "owl-rtl", responsiveClass: "owl-responsive", dragClass: "owl-drag", itemClass: "owl-item", stageClass: "owl-stage", stageOuterClass: "owl-stage-outer", grabClass: "owl-grab" }, e.Width = { Default: "default", Inner: "inner", Outer: "outer" }, e.Type = { Event: "event", State: "state" }, e.Plugins = {}, e.Workers = [{ filter: ["width", "settings"], run: function () { this._width = this.$element.width() } }, { filter: ["width", "items", "settings"], run: function (a) { a.current = this._items && this._items[this.relative(this._current)] } }, { filter: ["items", "settings"], run: function () { this.$stage.children(".cloned").remove() } }, { filter: ["width", "items", "settings"], run: function (a) { var b = this.settings.margin || "", c = !this.settings.autoWidth, d = this.settings.rtl, e = { width: "auto", "margin-left": d ? b : "", "margin-right": d ? "" : b }; !c && this.$stage.children().css(e), a.css = e } }, { filter: ["width", "items", "settings"], run: function (a) { var b = (this.width() / this.settings.items).toFixed(3) - this.settings.margin, c = null, d = this._items.length, e = !this.settings.autoWidth, f = []; for (a.items = { merge: !1, width: b }; d--;)c = this._mergers[d], c = this.settings.mergeFit && Math.min(c, this.settings.items) || c, a.items.merge = c > 1 || a.items.merge, f[d] = e ? b * c : this._items[d].width(); this._widths = f } }, { filter: ["items", "settings"], run: function () { var b = [], c = this._items, d = this.settings, e = Math.max(2 * d.items, 4), f = 2 * Math.ceil(c.length / 2), g = d.loop && c.length ? d.rewind ? e : Math.max(e, f) : 0, h = "", i = ""; for (g /= 2; g > 0;)b.push(this.normalize(b.length / 2, !0)), h += c[b[b.length - 1]][0].outerHTML, b.push(this.normalize(c.length - 1 - (b.length - 1) / 2, !0)), i = c[b[b.length - 1]][0].outerHTML + i, g -= 1; this._clones = b, a(h).addClass("cloned").appendTo(this.$stage), a(i).addClass("cloned").prependTo(this.$stage) } }, { filter: ["width", "items", "settings"], run: function () { for (var a = this.settings.rtl ? 1 : -1, b = this._clones.length + this._items.length, c = -1, d = 0, e = 0, f = []; ++c < b;)d = f[c - 1] || 0, e = this._widths[this.relative(c)] + this.settings.margin, f.push(d + e * a); this._coordinates = f } }, { filter: ["width", "items", "settings"], run: function () { var a = this.settings.stagePadding, b = this._coordinates, c = { width: Math.ceil(Math.abs(b[b.length - 1])) + 2 * a, "padding-left": a || "", "padding-right": a || "" }; this.$stage.css(c) } }, { filter: ["width", "items", "settings"], run: function (a) { var b = this._coordinates.length, c = !this.settings.autoWidth, d = this.$stage.children(); if (c && a.items.merge) for (; b--;)a.css.width = this._widths[this.relative(b)], d.eq(b).css(a.css); else c && (a.css.width = a.items.width, d.css(a.css)) } }, { filter: ["items"], run: function () { this._coordinates.length < 1 && this.$stage.removeAttr("style") } }, { filter: ["width", "items", "settings"], run: function (a) { a.current = a.current ? this.$stage.children().index(a.current) : 0, a.current = Math.max(this.minimum(), Math.min(this.maximum(), a.current)), this.reset(a.current) } }, { filter: ["position"], run: function () { this.animate(this.coordinates(this._current)) } }, { filter: ["width", "position", "items", "settings"], run: function () { var a, b, c, d, e = this.settings.rtl ? 1 : -1, f = 2 * this.settings.stagePadding, g = this.coordinates(this.current()) + f, h = g + this.width() * e, i = []; for (c = 0, d = this._coordinates.length; c < d; c++)a = this._coordinates[c - 1] || 0, b = Math.abs(this._coordinates[c]) + f * e, (this.op(a, "<=", g) && this.op(a, ">", h) || this.op(b, "<", g) && this.op(b, ">", h)) && i.push(c); this.$stage.children(".active").removeClass("active"), this.$stage.children(":eq(" + i.join("), :eq(") + ")").addClass("active"), this.$stage.children(".center").removeClass("center"), this.settings.center && this.$stage.children().eq(this.current()).addClass("center") } }], e.prototype.initializeStage = function () { this.$stage = this.$element.find("." + this.settings.stageClass), this.$stage.length || (this.$element.addClass(this.options.loadingClass), this.$stage = a("<" + this.settings.stageElement + ">", { class: this.settings.stageClass }).wrap(a("<div/>", { class: this.settings.stageOuterClass })), this.$element.append(this.$stage.parent())) }, e.prototype.initializeItems = function () { var b = this.$element.find(".owl-item"); if (b.length) return this._items = b.get().map(function (b) { return a(b) }), this._mergers = this._items.map(function () { return 1 }), void this.refresh(); this.replace(this.$element.children().not(this.$stage.parent())), this.isVisible() ? this.refresh() : this.invalidate("width"), this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass) }, e.prototype.initialize = function () { if (this.enter("initializing"), this.trigger("initialize"), this.$element.toggleClass(this.settings.rtlClass, this.settings.rtl), this.settings.autoWidth && !this.is("pre-loading")) { var a, b, c; a = this.$element.find("img"), b = this.settings.nestedItemSelector ? "." + this.settings.nestedItemSelector : d, c = this.$element.children(b).width(), a.length && c <= 0 && this.preloadAutoWidthImages(a) } this.initializeStage(), this.initializeItems(), this.registerEventHandlers(), this.leave("initializing"), this.trigger("initialized") }, e.prototype.isVisible = function () { return !this.settings.checkVisibility || this.$element.is(":visible") }, e.prototype.setup = function () { var b = this.viewport(), c = this.options.responsive, d = -1, e = null; c ? (a.each(c, function (a) { a <= b && a > d && (d = Number(a)) }), e = a.extend({}, this.options, c[d]), "function" == typeof e.stagePadding && (e.stagePadding = e.stagePadding()), delete e.responsive, e.responsiveClass && this.$element.attr("class", this.$element.attr("class").replace(new RegExp("(" + this.options.responsiveClass + "-)\\S+\\s", "g"), "$1" + d))) : e = a.extend({}, this.options), this.trigger("change", { property: { name: "settings", value: e } }), this._breakpoint = d, this.settings = e, this.invalidate("settings"), this.trigger("changed", { property: { name: "settings", value: this.settings } }) }, e.prototype.optionsLogic = function () { this.settings.autoWidth && (this.settings.stagePadding = !1, this.settings.merge = !1) }, e.prototype.prepare = function (b) { var c = this.trigger("prepare", { content: b }); return c.data || (c.data = a("<" + this.settings.itemElement + "/>").addClass(this.options.itemClass).append(b)), this.trigger("prepared", { content: c.data }), c.data }, e.prototype.update = function () { for (var b = 0, c = this._pipe.length, d = a.proxy(function (a) { return this[a] }, this._invalidated), e = {}; b < c;)(this._invalidated.all || a.grep(this._pipe[b].filter, d).length > 0) && this._pipe[b].run(e), b++; this._invalidated = {}, !this.is("valid") && this.enter("valid") }, e.prototype.width = function (a) { switch (a = a || e.Width.Default) { case e.Width.Inner: case e.Width.Outer: return this._width; default: return this._width - 2 * this.settings.stagePadding + this.settings.margin } }, e.prototype.refresh = function () { this.enter("refreshing"), this.trigger("refresh"), this.setup(), this.optionsLogic(), this.$element.addClass(this.options.refreshClass), this.update(), this.$element.removeClass(this.options.refreshClass), this.leave("refreshing"), this.trigger("refreshed") }, e.prototype.onThrottledResize = function () { b.clearTimeout(this.resizeTimer), this.resizeTimer = b.setTimeout(this._handlers.onResize, this.settings.responsiveRefreshRate) }, e.prototype.onResize = function () { return !!this._items.length && (this._width !== this.$element.width() && (!!this.isVisible() && (this.enter("resizing"), this.trigger("resize").isDefaultPrevented() ? (this.leave("resizing"), !1) : (this.invalidate("width"), this.refresh(), this.leave("resizing"), void this.trigger("resized"))))) }, e.prototype.registerEventHandlers = function () { a.support.transition && this.$stage.on(a.support.transition.end + ".owl.core", a.proxy(this.onTransitionEnd, this)), !1 !== this.settings.responsive && this.on(b, "resize", this._handlers.onThrottledResize), this.settings.mouseDrag && (this.$element.addClass(this.options.dragClass), this.$stage.on("mousedown.owl.core", a.proxy(this.onDragStart, this)), this.$stage.on("dragstart.owl.core selectstart.owl.core", function () { return !1 })), this.settings.touchDrag && (this.$stage.on("touchstart.owl.core", a.proxy(this.onDragStart, this)), this.$stage.on("touchcancel.owl.core", a.proxy(this.onDragEnd, this))) }, e.prototype.onDragStart = function (b) { var d = null; 3 !== b.which && (a.support.transform ? (d = this.$stage.css("transform").replace(/.*\(|\)| /g, "").split(","), d = { x: d[16 === d.length ? 12 : 4], y: d[16 === d.length ? 13 : 5] }) : (d = this.$stage.position(), d = { x: this.settings.rtl ? d.left + this.$stage.width() - this.width() + this.settings.margin : d.left, y: d.top }), this.is("animating") && (a.support.transform ? this.animate(d.x) : this.$stage.stop(), this.invalidate("position")), this.$element.toggleClass(this.options.grabClass, "mousedown" === b.type), this.speed(0), this._drag.time = (new Date).getTime(), this._drag.target = a(b.target), this._drag.stage.start = d, this._drag.stage.current = d, this._drag.pointer = this.pointer(b), a(c).on("mouseup.owl.core touchend.owl.core", a.proxy(this.onDragEnd, this)), a(c).one("mousemove.owl.core touchmove.owl.core", a.proxy(function (b) { var d = this.difference(this._drag.pointer, this.pointer(b)); a(c).on("mousemove.owl.core touchmove.owl.core", a.proxy(this.onDragMove, this)), Math.abs(d.x) < Math.abs(d.y) && this.is("valid") || (b.preventDefault(), this.enter("dragging"), this.trigger("drag")) }, this))) }, e.prototype.onDragMove = function (a) { var b = null, c = null, d = null, e = this.difference(this._drag.pointer, this.pointer(a)), f = this.difference(this._drag.stage.start, e); this.is("dragging") && (a.preventDefault(), this.settings.loop ? (b = this.coordinates(this.minimum()), c = this.coordinates(this.maximum() + 1) - b, f.x = ((f.x - b) % c + c) % c + b) : (b = this.settings.rtl ? this.coordinates(this.maximum()) : this.coordinates(this.minimum()), c = this.settings.rtl ? this.coordinates(this.minimum()) : this.coordinates(this.maximum()), d = this.settings.pullDrag ? -1 * e.x / 5 : 0, f.x = Math.max(Math.min(f.x, b + d), c + d)), this._drag.stage.current = f, this.animate(f.x)) }, e.prototype.onDragEnd = function (b) { var d = this.difference(this._drag.pointer, this.pointer(b)), e = this._drag.stage.current, f = d.x > 0 ^ this.settings.rtl ? "left" : "right"; a(c).off(".owl.core"), this.$element.removeClass(this.options.grabClass), (0 !== d.x && this.is("dragging") || !this.is("valid")) && (this.speed(this.settings.dragEndSpeed || this.settings.smartSpeed), this.current(this.closest(e.x, 0 !== d.x ? f : this._drag.direction)), this.invalidate("position"), this.update(), this._drag.direction = f, (Math.abs(d.x) > 3 || (new Date).getTime() - this._drag.time > 300) && this._drag.target.one("click.owl.core", function () { return !1 })), this.is("dragging") && (this.leave("dragging"), this.trigger("dragged")) }, e.prototype.closest = function (b, c) { var e = -1, f = 30, g = this.width(), h = this.coordinates(); return this.settings.freeDrag || a.each(h, a.proxy(function (a, i) { return "left" === c && b > i - f && b < i + f ? e = a : "right" === c && b > i - g - f && b < i - g + f ? e = a + 1 : this.op(b, "<", i) && this.op(b, ">", h[a + 1] !== d ? h[a + 1] : i - g) && (e = "left" === c ? a + 1 : a), -1 === e }, this)), this.settings.loop || (this.op(b, ">", h[this.minimum()]) ? e = b = this.minimum() : this.op(b, "<", h[this.maximum()]) && (e = b = this.maximum())), e }, e.prototype.animate = function (b) { var c = this.speed() > 0; this.is("animating") && this.onTransitionEnd(), c && (this.enter("animating"), this.trigger("translate")), a.support.transform3d && a.support.transition ? this.$stage.css({ transform: "translate3d(" + b + "px,0px,0px)", transition: this.speed() / 1e3 + "s" + (this.settings.slideTransition ? " " + this.settings.slideTransition : "") }) : c ? this.$stage.animate({ left: b + "px" }, this.speed(), this.settings.fallbackEasing, a.proxy(this.onTransitionEnd, this)) : this.$stage.css({ left: b + "px" }) }, e.prototype.is = function (a) { return this._states.current[a] && this._states.current[a] > 0 }, e.prototype.current = function (a) { if (a === d) return this._current; if (0 === this._items.length) return d; if (a = this.normalize(a), this._current !== a) { var b = this.trigger("change", { property: { name: "position", value: a } }); b.data !== d && (a = this.normalize(b.data)), this._current = a, this.invalidate("position"), this.trigger("changed", { property: { name: "position", value: this._current } }) } return this._current }, e.prototype.invalidate = function (b) { return "string" === a.type(b) && (this._invalidated[b] = !0, this.is("valid") && this.leave("valid")), a.map(this._invalidated, function (a, b) { return b }) }, e.prototype.reset = function (a) { (a = this.normalize(a)) !== d && (this._speed = 0, this._current = a, this.suppress(["translate", "translated"]), this.animate(this.coordinates(a)), this.release(["translate", "translated"])) }, e.prototype.normalize = function (a, b) { var c = this._items.length, e = b ? 0 : this._clones.length; return !this.isNumeric(a) || c < 1 ? a = d : (a < 0 || a >= c + e) && (a = ((a - e / 2) % c + c) % c + e / 2), a }, e.prototype.relative = function (a) { return a -= this._clones.length / 2, this.normalize(a, !0) }, e.prototype.maximum = function (a) { var b, c, d, e = this.settings, f = this._coordinates.length; if (e.loop) f = this._clones.length / 2 + this._items.length - 1; else if (e.autoWidth || e.merge) { if (b = this._items.length) for (c = this._items[--b].width(), d = this.$element.width(); b-- && !((c += this._items[b].width() + this.settings.margin) > d);); f = b + 1 } else f = e.center ? this._items.length - 1 : this._items.length - e.items; return a && (f -= this._clones.length / 2), Math.max(f, 0) }, e.prototype.minimum = function (a) { return a ? 0 : this._clones.length / 2 }, e.prototype.items = function (a) { return a === d ? this._items.slice() : (a = this.normalize(a, !0), this._items[a]) }, e.prototype.mergers = function (a) { return a === d ? this._mergers.slice() : (a = this.normalize(a, !0), this._mergers[a]) }, e.prototype.clones = function (b) { var c = this._clones.length / 2, e = c + this._items.length, f = function (a) { return a % 2 == 0 ? e + a / 2 : c - (a + 1) / 2 }; return b === d ? a.map(this._clones, function (a, b) { return f(b) }) : a.map(this._clones, function (a, c) { return a === b ? f(c) : null }) }, e.prototype.speed = function (a) { return a !== d && (this._speed = a), this._speed }, e.prototype.coordinates = function (b) { var c, e = 1, f = b - 1; return b === d ? a.map(this._coordinates, a.proxy(function (a, b) { return this.coordinates(b) }, this)) : (this.settings.center ? (this.settings.rtl && (e = -1, f = b + 1), c = this._coordinates[b], c += (this.width() - c + (this._coordinates[f] || 0)) / 2 * e) : c = this._coordinates[f] || 0, c = Math.ceil(c)) }, e.prototype.duration = function (a, b, c) { return 0 === c ? 0 : Math.min(Math.max(Math.abs(b - a), 1), 6) * Math.abs(c || this.settings.smartSpeed) }, e.prototype.to = function (a, b) { var c = this.current(), d = null, e = a - this.relative(c), f = (e > 0) - (e < 0), g = this._items.length, h = this.minimum(), i = this.maximum(); this.settings.loop ? (!this.settings.rewind && Math.abs(e) > g / 2 && (e += -1 * f * g), a = c + e, (d = ((a - h) % g + g) % g + h) !== a && d - e <= i && d - e > 0 && (c = d - e, a = d, this.reset(c))) : this.settings.rewind ? (i += 1, a = (a % i + i) % i) : a = Math.max(h, Math.min(i, a)), this.speed(this.duration(c, a, b)), this.current(a), this.isVisible() && this.update() }, e.prototype.next = function (a) { a = a || !1, this.to(this.relative(this.current()) + 1, a) }, e.prototype.prev = function (a) { a = a || !1, this.to(this.relative(this.current()) - 1, a) }, e.prototype.onTransitionEnd = function (a) { if (a !== d && (a.stopPropagation(), (a.target || a.srcElement || a.originalTarget) !== this.$stage.get(0))) return !1; this.leave("animating"), this.trigger("translated") }, e.prototype.viewport = function () { var d; return this.options.responsiveBaseElement !== b ? d = a(this.options.responsiveBaseElement).width() : b.innerWidth ? d = b.innerWidth : c.documentElement && c.documentElement.clientWidth ? d = c.documentElement.clientWidth : console.warn("Can not detect viewport width."), d }, e.prototype.replace = function (b) { this.$stage.empty(), this._items = [], b && (b = b instanceof jQuery ? b : a(b)), this.settings.nestedItemSelector && (b = b.find("." + this.settings.nestedItemSelector)), b.filter(function () { return 1 === this.nodeType }).each(a.proxy(function (a, b) { b = this.prepare(b), this.$stage.append(b), this._items.push(b), this._mergers.push(1 * b.find("[data-merge]").addBack("[data-merge]").attr("data-merge") || 1) }, this)), this.reset(this.isNumeric(this.settings.startPosition) ? this.settings.startPosition : 0), this.invalidate("items") }, e.prototype.add = function (b, c) { var e = this.relative(this._current); c = c === d ? this._items.length : this.normalize(c, !0), b = b instanceof jQuery ? b : a(b), this.trigger("add", { content: b, position: c }), b = this.prepare(b), 0 === this._items.length || c === this._items.length ? (0 === this._items.length && this.$stage.append(b), 0 !== this._items.length && this._items[c - 1].after(b), this._items.push(b), this._mergers.push(1 * b.find("[data-merge]").addBack("[data-merge]").attr("data-merge") || 1)) : (this._items[c].before(b), this._items.splice(c, 0, b), this._mergers.splice(c, 0, 1 * b.find("[data-merge]").addBack("[data-merge]").attr("data-merge") || 1)), this._items[e] && this.reset(this._items[e].index()), this.invalidate("items"), this.trigger("added", { content: b, position: c }) }, e.prototype.remove = function (a) { (a = this.normalize(a, !0)) !== d && (this.trigger("remove", { content: this._items[a], position: a }), this._items[a].remove(), this._items.splice(a, 1), this._mergers.splice(a, 1), this.invalidate("items"), this.trigger("removed", { content: null, position: a })) }, e.prototype.preloadAutoWidthImages = function (b) { b.each(a.proxy(function (b, c) { this.enter("pre-loading"), c = a(c), a(new Image).one("load", a.proxy(function (a) { c.attr("src", a.target.src), c.css("opacity", 1), this.leave("pre-loading"), !this.is("pre-loading") && !this.is("initializing") && this.refresh() }, this)).attr("src", c.attr("src") || c.attr("data-src") || c.attr("data-src-retina")) }, this)) }, e.prototype.destroy = function () { this.$element.off(".owl.core"), this.$stage.off(".owl.core"), a(c).off(".owl.core"), !1 !== this.settings.responsive && (b.clearTimeout(this.resizeTimer), this.off(b, "resize", this._handlers.onThrottledResize)); for (var d in this._plugins) this._plugins[d].destroy(); this.$stage.children(".cloned").remove(), this.$stage.unwrap(), this.$stage.children().contents().unwrap(), this.$stage.children().unwrap(), this.$stage.remove(), this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class", this.$element.attr("class").replace(new RegExp(this.options.responsiveClass + "-\\S+\\s", "g"), "")).removeData("owl.carousel") }, e.prototype.op = function (a, b, c) { var d = this.settings.rtl; switch (b) { case "<": return d ? a > c : a < c; case ">": return d ? a < c : a > c; case ">=": return d ? a <= c : a >= c; case "<=": return d ? a >= c : a <= c } }, e.prototype.on = function (a, b, c, d) { a.addEventListener ? a.addEventListener(b, c, d) : a.attachEvent && a.attachEvent("on" + b, c) }, e.prototype.off = function (a, b, c, d) { a.removeEventListener ? a.removeEventListener(b, c, d) : a.detachEvent && a.detachEvent("on" + b, c) }, e.prototype.trigger = function (b, c, d, f, g) { var h = { item: { count: this._items.length, index: this.current() } }, i = a.camelCase(a.grep(["on", b, d], function (a) { return a }).join("-").toLowerCase()), j = a.Event([b, "owl", d || "carousel"].join(".").toLowerCase(), a.extend({ relatedTarget: this }, h, c)); return this._supress[b] || (a.each(this._plugins, function (a, b) { b.onTrigger && b.onTrigger(j) }), this.register({ type: e.Type.Event, name: b }), this.$element.trigger(j), this.settings && "function" == typeof this.settings[i] && this.settings[i].call(this, j)), j }, e.prototype.enter = function (b) { a.each([b].concat(this._states.tags[b] || []), a.proxy(function (a, b) { this._states.current[b] === d && (this._states.current[b] = 0), this._states.current[b]++ }, this)) }, e.prototype.leave = function (b) { a.each([b].concat(this._states.tags[b] || []), a.proxy(function (a, b) { this._states.current[b]-- }, this)) }, e.prototype.register = function (b) { if (b.type === e.Type.Event) { if (a.event.special[b.name] || (a.event.special[b.name] = {}), !a.event.special[b.name].owl) { var c = a.event.special[b.name]._default; a.event.special[b.name]._default = function (a) { return !c || !c.apply || a.namespace && -1 !== a.namespace.indexOf("owl") ? a.namespace && a.namespace.indexOf("owl") > -1 : c.apply(this, arguments) }, a.event.special[b.name].owl = !0 } } else b.type === e.Type.State && (this._states.tags[b.name] ? this._states.tags[b.name] = this._states.tags[b.name].concat(b.tags) : this._states.tags[b.name] = b.tags, this._states.tags[b.name] = a.grep(this._states.tags[b.name], a.proxy(function (c, d) { return a.inArray(c, this._states.tags[b.name]) === d }, this))) }, e.prototype.suppress = function (b) { a.each(b, a.proxy(function (a, b) { this._supress[b] = !0 }, this)) }, e.prototype.release = function (b) { a.each(b, a.proxy(function (a, b) { delete this._supress[b] }, this)) }, e.prototype.pointer = function (a) { var c = { x: null, y: null }; return a = a.originalEvent || a || b.event, a = a.touches && a.touches.length ? a.touches[0] : a.changedTouches && a.changedTouches.length ? a.changedTouches[0] : a, a.pageX ? (c.x = a.pageX, c.y = a.pageY) : (c.x = a.clientX, c.y = a.clientY), c }, e.prototype.isNumeric = function (a) { return !isNaN(parseFloat(a)) }, e.prototype.difference = function (a, b) { return { x: a.x - b.x, y: a.y - b.y } }, a.fn.owlCarousel = function (b) { var c = Array.prototype.slice.call(arguments, 1); return this.each(function () { var d = a(this), f = d.data("owl.carousel"); f || (f = new e(this, "object" == typeof b && b), d.data("owl.carousel", f), a.each(["next", "prev", "to", "destroy", "refresh", "replace", "add", "remove"], function (b, c) { f.register({ type: e.Type.Event, name: c }), f.$element.on(c + ".owl.carousel.core", a.proxy(function (a) { a.namespace && a.relatedTarget !== this && (this.suppress([c]), f[c].apply(this, [].slice.call(arguments, 1)), this.release([c])) }, f)) })), "string" == typeof b && "_" !== b.charAt(0) && f[b].apply(f, c) }) }, a.fn.owlCarousel.Constructor = e }(window.Zepto || window.jQuery, window, document), function (a, b, c, d) { var e = function (b) { this._core = b, this._interval = null, this._visible = null, this._handlers = { "initialized.owl.carousel": a.proxy(function (a) { a.namespace && this._core.settings.autoRefresh && this.watch() }, this) }, this._core.options = a.extend({}, e.Defaults, this._core.options), this._core.$element.on(this._handlers) }; e.Defaults = { autoRefresh: !0, autoRefreshInterval: 500 }, e.prototype.watch = function () { this._interval || (this._visible = this._core.isVisible(), this._interval = b.setInterval(a.proxy(this.refresh, this), this._core.settings.autoRefreshInterval)) }, e.prototype.refresh = function () { this._core.isVisible() !== this._visible && (this._visible = !this._visible, this._core.$element.toggleClass("owl-hidden", !this._visible), this._visible && this._core.invalidate("width") && this._core.refresh()) }, e.prototype.destroy = function () { var a, c; b.clearInterval(this._interval); for (a in this._handlers) this._core.$element.off(a, this._handlers[a]); for (c in Object.getOwnPropertyNames(this)) "function" != typeof this[c] && (this[c] = null) }, a.fn.owlCarousel.Constructor.Plugins.AutoRefresh = e }(window.Zepto || window.jQuery, window, document), function (a, b, c, d) { var e = function (b) { this._core = b, this._loaded = [], this._handlers = { "initialized.owl.carousel change.owl.carousel resized.owl.carousel": a.proxy(function (b) { if (b.namespace && this._core.settings && this._core.settings.lazyLoad && (b.property && "position" == b.property.name || "initialized" == b.type)) { var c = this._core.settings, e = c.center && Math.ceil(c.items / 2) || c.items, f = c.center && -1 * e || 0, g = (b.property && b.property.value !== d ? b.property.value : this._core.current()) + f, h = this._core.clones().length, i = a.proxy(function (a, b) { this.load(b) }, this); for (c.lazyLoadEager > 0 && (e += c.lazyLoadEager, c.loop && (g -= c.lazyLoadEager, e++)); f++ < e;)this.load(h / 2 + this._core.relative(g)), h && a.each(this._core.clones(this._core.relative(g)), i), g++ } }, this) }, this._core.options = a.extend({}, e.Defaults, this._core.options), this._core.$element.on(this._handlers) }; e.Defaults = { lazyLoad: !1, lazyLoadEager: 0 }, e.prototype.load = function (c) { var d = this._core.$stage.children().eq(c), e = d && d.find(".owl-lazy"); !e || a.inArray(d.get(0), this._loaded) > -1 || (e.each(a.proxy(function (c, d) { var e, f = a(d), g = b.devicePixelRatio > 1 && f.attr("data-src-retina") || f.attr("data-src") || f.attr("data-srcset"); this._core.trigger("load", { element: f, url: g }, "lazy"), f.is("img") ? f.one("load.owl.lazy", a.proxy(function () { f.css("opacity", 1), this._core.trigger("loaded", { element: f, url: g }, "lazy") }, this)).attr("src", g) : f.is("source") ? f.one("load.owl.lazy", a.proxy(function () { this._core.trigger("loaded", { element: f, url: g }, "lazy") }, this)).attr("srcset", g) : (e = new Image, e.onload = a.proxy(function () { f.css({ "background-image": 'url("' + g + '")', opacity: "1" }), this._core.trigger("loaded", { element: f, url: g }, "lazy") }, this), e.src = g) }, this)), this._loaded.push(d.get(0))) }, e.prototype.destroy = function () { var a, b; for (a in this.handlers) this._core.$element.off(a, this.handlers[a]); for (b in Object.getOwnPropertyNames(this)) "function" != typeof this[b] && (this[b] = null) }, a.fn.owlCarousel.Constructor.Plugins.Lazy = e }(window.Zepto || window.jQuery, window, document), function (a, b, c, d) { var e = function (c) { this._core = c, this._previousHeight = null, this._handlers = { "initialized.owl.carousel refreshed.owl.carousel": a.proxy(function (a) { a.namespace && this._core.settings.autoHeight && this.update() }, this), "changed.owl.carousel": a.proxy(function (a) { a.namespace && this._core.settings.autoHeight && "position" === a.property.name && this.update() }, this), "loaded.owl.lazy": a.proxy(function (a) { a.namespace && this._core.settings.autoHeight && a.element.closest("." + this._core.settings.itemClass).index() === this._core.current() && this.update() }, this) }, this._core.options = a.extend({}, e.Defaults, this._core.options), this._core.$element.on(this._handlers), this._intervalId = null; var d = this; a(b).on("load", function () { d._core.settings.autoHeight && d.update() }), a(b).resize(function () { d._core.settings.autoHeight && (null != d._intervalId && clearTimeout(d._intervalId), d._intervalId = setTimeout(function () { d.update() }, 250)) }) }; e.Defaults = { autoHeight: !1, autoHeightClass: "owl-height" }, e.prototype.update = function () { var b = this._core._current, c = b + this._core.settings.items, d = this._core.settings.lazyLoad, e = this._core.$stage.children().toArray().slice(b, c), f = [], g = 0; a.each(e, function (b, c) { f.push(a(c).height()) }), g = Math.max.apply(null, f), g <= 1 && d && this._previousHeight && (g = this._previousHeight), this._previousHeight = g, this._core.$stage.parent().height(g).addClass(this._core.settings.autoHeightClass) }, e.prototype.destroy = function () { var a, b; for (a in this._handlers) this._core.$element.off(a, this._handlers[a]); for (b in Object.getOwnPropertyNames(this)) "function" != typeof this[b] && (this[b] = null) }, a.fn.owlCarousel.Constructor.Plugins.AutoHeight = e }(window.Zepto || window.jQuery, window, document), function (a, b, c, d) { var e = function (b) { this._core = b, this._videos = {}, this._playing = null, this._handlers = { "initialized.owl.carousel": a.proxy(function (a) { a.namespace && this._core.register({ type: "state", name: "playing", tags: ["interacting"] }) }, this), "resize.owl.carousel": a.proxy(function (a) { a.namespace && this._core.settings.video && this.isInFullScreen() && a.preventDefault() }, this), "refreshed.owl.carousel": a.proxy(function (a) { a.namespace && this._core.is("resizing") && this._core.$stage.find(".cloned .owl-video-frame").remove() }, this), "changed.owl.carousel": a.proxy(function (a) { a.namespace && "position" === a.property.name && this._playing && this.stop() }, this), "prepared.owl.carousel": a.proxy(function (b) { if (b.namespace) { var c = a(b.content).find(".owl-video"); c.length && (c.css("display", "none"), this.fetch(c, a(b.content))) } }, this) }, this._core.options = a.extend({}, e.Defaults, this._core.options), this._core.$element.on(this._handlers), this._core.$element.on("click.owl.video", ".owl-video-play-icon", a.proxy(function (a) { this.play(a) }, this)) }; e.Defaults = { video: !1, videoHeight: !1, videoWidth: !1 }, e.prototype.fetch = function (a, b) { var c = function () { return a.attr("data-vimeo-id") ? "vimeo" : a.attr("data-vzaar-id") ? "vzaar" : "youtube" }(), d = a.attr("data-vimeo-id") || a.attr("data-youtube-id") || a.attr("data-vzaar-id"), e = a.attr("data-width") || this._core.settings.videoWidth, f = a.attr("data-height") || this._core.settings.videoHeight, g = a.attr("href"); if (!g) throw new Error("Missing video URL."); if (d = g.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/), d[3].indexOf("youtu") > -1) c = "youtube"; else if (d[3].indexOf("vimeo") > -1) c = "vimeo"; else { if (!(d[3].indexOf("vzaar") > -1)) throw new Error("Video URL not supported."); c = "vzaar" } d = d[6], this._videos[g] = { type: c, id: d, width: e, height: f }, b.attr("data-video", g), this.thumbnail(a, this._videos[g]) }, e.prototype.thumbnail = function (b, c) { var d, e, f, g = c.width && c.height ? "width:" + c.width + "px;height:" + c.height + "px;" : "", h = b.find("img"), i = "src", j = "", k = this._core.settings, l = function (c) { e = '<div class="owl-video-play-icon"></div>', d = k.lazyLoad ? a("<div/>", { class: "owl-video-tn " + j, srcType: c }) : a("<div/>", { class: "owl-video-tn", style: "opacity:1;background-image:url(" + c + ")" }), b.after(d), b.after(e) }; if (b.wrap(a("<div/>", { class: "owl-video-wrapper", style: g })), this._core.settings.lazyLoad && (i = "data-src", j = "owl-lazy"), h.length) return l(h.attr(i)), h.remove(), !1; "youtube" === c.type ? (f = "//img.youtube.com/vi/" + c.id + "/hqdefault.jpg", l(f)) : "vimeo" === c.type ? a.ajax({ type: "GET", url: "//vimeo.com/api/v2/video/" + c.id + ".json", jsonp: "callback", dataType: "jsonp", success: function (a) { f = a[0].thumbnail_large, l(f) } }) : "vzaar" === c.type && a.ajax({ type: "GET", url: "//vzaar.com/api/videos/" + c.id + ".json", jsonp: "callback", dataType: "jsonp", success: function (a) { f = a.framegrab_url, l(f) } }) }, e.prototype.stop = function () { this._core.trigger("stop", null, "video"), this._playing.find(".owl-video-frame").remove(), this._playing.removeClass("owl-video-playing"), this._playing = null, this._core.leave("playing"), this._core.trigger("stopped", null, "video") }, e.prototype.play = function (b) { var c, d = a(b.target), e = d.closest("." + this._core.settings.itemClass), f = this._videos[e.attr("data-video")], g = f.width || "100%", h = f.height || this._core.$stage.height(); this._playing || (this._core.enter("playing"), this._core.trigger("play", null, "video"), e = this._core.items(this._core.relative(e.index())), this._core.reset(e.index()), c = a('<iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen ></iframe>'), c.attr("height", h), c.attr("width", g), "youtube" === f.type ? c.attr("src", "//www.youtube.com/embed/" + f.id + "?autoplay=1&rel=0&v=" + f.id) : "vimeo" === f.type ? c.attr("src", "//player.vimeo.com/video/" + f.id + "?autoplay=1") : "vzaar" === f.type && c.attr("src", "//view.vzaar.com/" + f.id + "/player?autoplay=true"), a(c).wrap('<div class="owl-video-frame" />').insertAfter(e.find(".owl-video")), this._playing = e.addClass("owl-video-playing")) }, e.prototype.isInFullScreen = function () { var b = c.fullscreenElement || c.mozFullScreenElement || c.webkitFullscreenElement; return b && a(b).parent().hasClass("owl-video-frame") }, e.prototype.destroy = function () { var a, b; this._core.$element.off("click.owl.video"); for (a in this._handlers) this._core.$element.off(a, this._handlers[a]); for (b in Object.getOwnPropertyNames(this)) "function" != typeof this[b] && (this[b] = null) }, a.fn.owlCarousel.Constructor.Plugins.Video = e }(window.Zepto || window.jQuery, window, document), function (a, b, c, d) { var e = function (b) { this.core = b, this.core.options = a.extend({}, e.Defaults, this.core.options), this.swapping = !0, this.previous = d, this.next = d, this.handlers = { "change.owl.carousel": a.proxy(function (a) { a.namespace && "position" == a.property.name && (this.previous = this.core.current(), this.next = a.property.value) }, this), "drag.owl.carousel dragged.owl.carousel translated.owl.carousel": a.proxy(function (a) { a.namespace && (this.swapping = "translated" == a.type) }, this), "translate.owl.carousel": a.proxy(function (a) { a.namespace && this.swapping && (this.core.options.animateOut || this.core.options.animateIn) && this.swap() }, this) }, this.core.$element.on(this.handlers) }; e.Defaults = { animateOut: !1, animateIn: !1 }, e.prototype.swap = function () { if (1 === this.core.settings.items && a.support.animation && a.support.transition) { this.core.speed(0); var b, c = a.proxy(this.clear, this), d = this.core.$stage.children().eq(this.previous), e = this.core.$stage.children().eq(this.next), f = this.core.settings.animateIn, g = this.core.settings.animateOut; this.core.current() !== this.previous && (g && (b = this.core.coordinates(this.previous) - this.core.coordinates(this.next), d.one(a.support.animation.end, c).css({ left: b + "px" }).addClass("animated owl-animated-out").addClass(g)), f && e.one(a.support.animation.end, c).addClass("animated owl-animated-in").addClass(f)) } }, e.prototype.clear = function (b) { a(b.target).css({ left: "" }).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut), this.core.onTransitionEnd() }, e.prototype.destroy = function () { var a, b; for (a in this.handlers) this.core.$element.off(a, this.handlers[a]); for (b in Object.getOwnPropertyNames(this)) "function" != typeof this[b] && (this[b] = null) }, a.fn.owlCarousel.Constructor.Plugins.Animate = e }(window.Zepto || window.jQuery, window, document), function (a, b, c, d) { var e = function (b) { this._core = b, this._call = null, this._time = 0, this._timeout = 0, this._paused = !0, this._handlers = { "changed.owl.carousel": a.proxy(function (a) { a.namespace && "settings" === a.property.name ? this._core.settings.autoplay ? this.play() : this.stop() : a.namespace && "position" === a.property.name && this._paused && (this._time = 0) }, this), "initialized.owl.carousel": a.proxy(function (a) { a.namespace && this._core.settings.autoplay && this.play() }, this), "play.owl.autoplay": a.proxy(function (a, b, c) { a.namespace && this.play(b, c) }, this), "stop.owl.autoplay": a.proxy(function (a) { a.namespace && this.stop() }, this), "mouseover.owl.autoplay": a.proxy(function () { this._core.settings.autoplayHoverPause && this._core.is("rotating") && this.pause() }, this), "mouseleave.owl.autoplay": a.proxy(function () { this._core.settings.autoplayHoverPause && this._core.is("rotating") && this.play() }, this), "touchstart.owl.core": a.proxy(function () { this._core.settings.autoplayHoverPause && this._core.is("rotating") && this.pause() }, this), "touchend.owl.core": a.proxy(function () { this._core.settings.autoplayHoverPause && this.play() }, this) }, this._core.$element.on(this._handlers), this._core.options = a.extend({}, e.Defaults, this._core.options) }; e.Defaults = { autoplay: !1, autoplayTimeout: 5e3, autoplayHoverPause: !1, autoplaySpeed: !1 }, e.prototype._next = function (d) { this._call = b.setTimeout(a.proxy(this._next, this, d), this._timeout * (Math.round(this.read() / this._timeout) + 1) - this.read()), this._core.is("interacting") || c.hidden || this._core.next(d || this._core.settings.autoplaySpeed) }, e.prototype.read = function () { return (new Date).getTime() - this._time }, e.prototype.play = function (c, d) { var e; this._core.is("rotating") || this._core.enter("rotating"), c = c || this._core.settings.autoplayTimeout, e = Math.min(this._time % (this._timeout || c), c), this._paused ? (this._time = this.read(), this._paused = !1) : b.clearTimeout(this._call), this._time += this.read() % c - e, this._timeout = c, this._call = b.setTimeout(a.proxy(this._next, this, d), c - e) }, e.prototype.stop = function () { this._core.is("rotating") && (this._time = 0, this._paused = !0, b.clearTimeout(this._call), this._core.leave("rotating")) }, e.prototype.pause = function () { this._core.is("rotating") && !this._paused && (this._time = this.read(), this._paused = !0, b.clearTimeout(this._call)) }, e.prototype.destroy = function () { var a, b; this.stop(); for (a in this._handlers) this._core.$element.off(a, this._handlers[a]); for (b in Object.getOwnPropertyNames(this)) "function" != typeof this[b] && (this[b] = null) }, a.fn.owlCarousel.Constructor.Plugins.autoplay = e }(window.Zepto || window.jQuery, window, document), function (a, b, c, d) { "use strict"; var e = function (b) { this._core = b, this._initialized = !1, this._pages = [], this._controls = {}, this._templates = [], this.$element = this._core.$element, this._overrides = { next: this._core.next, prev: this._core.prev, to: this._core.to }, this._handlers = { "prepared.owl.carousel": a.proxy(function (b) { b.namespace && this._core.settings.dotsData && this._templates.push('<div class="' + this._core.settings.dotClass + '">' + a(b.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot") + "</div>") }, this), "added.owl.carousel": a.proxy(function (a) { a.namespace && this._core.settings.dotsData && this._templates.splice(a.position, 0, this._templates.pop()) }, this), "remove.owl.carousel": a.proxy(function (a) { a.namespace && this._core.settings.dotsData && this._templates.splice(a.position, 1) }, this), "changed.owl.carousel": a.proxy(function (a) { a.namespace && "position" == a.property.name && this.draw() }, this), "initialized.owl.carousel": a.proxy(function (a) { a.namespace && !this._initialized && (this._core.trigger("initialize", null, "navigation"), this.initialize(), this.update(), this.draw(), this._initialized = !0, this._core.trigger("initialized", null, "navigation")) }, this), "refreshed.owl.carousel": a.proxy(function (a) { a.namespace && this._initialized && (this._core.trigger("refresh", null, "navigation"), this.update(), this.draw(), this._core.trigger("refreshed", null, "navigation")) }, this) }, this._core.options = a.extend({}, e.Defaults, this._core.options), this.$element.on(this._handlers) }; e.Defaults = { nav: !1, navText: ['<span aria-label="Previous">&#x2039;</span>', '<span aria-label="Next">&#x203a;</span>'], navSpeed: !1, navElement: 'button type="button" role="presentation"', navContainer: !1, navContainerClass: "owl-nav", navClass: ["owl-prev", "owl-next"], slideBy: 1, dotClass: "owl-dot", dotsClass: "owl-dots", dots: !0, dotsEach: !1, dotsData: !1, dotsSpeed: !1, dotsContainer: !1 }, e.prototype.initialize = function () { var b, c = this._core.settings; this._controls.$relative = (c.navContainer ? a(c.navContainer) : a("<div>").addClass(c.navContainerClass).appendTo(this.$element)).addClass("disabled"), this._controls.$previous = a("<" + c.navElement + ">").addClass(c.navClass[0]).html(c.navText[0]).prependTo(this._controls.$relative).on("click", a.proxy(function (a) { this.prev(c.navSpeed) }, this)), this._controls.$next = a("<" + c.navElement + ">").addClass(c.navClass[1]).html(c.navText[1]).appendTo(this._controls.$relative).on("click", a.proxy(function (a) { this.next(c.navSpeed) }, this)), c.dotsData || (this._templates = [a('<button role="button">').addClass(c.dotClass).append(a("<span>")).prop("outerHTML")]), this._controls.$absolute = (c.dotsContainer ? a(c.dotsContainer) : a("<div>").addClass(c.dotsClass).appendTo(this.$element)).addClass("disabled"), this._controls.$absolute.on("click", "button", a.proxy(function (b) { var d = a(b.target).parent().is(this._controls.$absolute) ? a(b.target).index() : a(b.target).parent().index(); b.preventDefault(), this.to(d, c.dotsSpeed) }, this)); for (b in this._overrides) this._core[b] = a.proxy(this[b], this) }, e.prototype.destroy = function () { var a, b, c, d, e; e = this._core.settings; for (a in this._handlers) this.$element.off(a, this._handlers[a]); for (b in this._controls) "$relative" === b && e.navContainer ? this._controls[b].html("") : this._controls[b].remove(); for (d in this.overides) this._core[d] = this._overrides[d]; for (c in Object.getOwnPropertyNames(this)) "function" != typeof this[c] && (this[c] = null) }, e.prototype.update = function () { var a, b, c, d = this._core.clones().length / 2, e = d + this._core.items().length, f = this._core.maximum(!0), g = this._core.settings, h = g.center || g.autoWidth || g.dotsData ? 1 : g.dotsEach || g.items; if ("page" !== g.slideBy && (g.slideBy = Math.min(g.slideBy, g.items)), g.dots || "page" == g.slideBy) for (this._pages = [], a = d, b = 0, c = 0; a < e; a++) { if (b >= h || 0 === b) { if (this._pages.push({ start: Math.min(f, a - d), end: a - d + h - 1 }), Math.min(f, a - d) === f) break; b = 0, ++c } b += this._core.mergers(this._core.relative(a)) } }, e.prototype.draw = function () { var b, c = this._core.settings, d = this._core.items().length <= c.items, e = this._core.relative(this._core.current()), f = c.loop || c.rewind; this._controls.$relative.toggleClass("disabled", !c.nav || d), c.nav && (this._controls.$previous.toggleClass("disabled", !f && e <= this._core.minimum(!0)), this._controls.$next.toggleClass("disabled", !f && e >= this._core.maximum(!0))), this._controls.$absolute.toggleClass("disabled", !c.dots || d), c.dots && (b = this._pages.length - this._controls.$absolute.children().length, c.dotsData && 0 !== b ? this._controls.$absolute.html(this._templates.join("")) : b > 0 ? this._controls.$absolute.append(new Array(b + 1).join(this._templates[0])) : b < 0 && this._controls.$absolute.children().slice(b).remove(), this._controls.$absolute.find(".active").removeClass("active"), this._controls.$absolute.children().eq(a.inArray(this.current(), this._pages)).addClass("active")) }, e.prototype.onTrigger = function (b) { var c = this._core.settings; b.page = { index: a.inArray(this.current(), this._pages), count: this._pages.length, size: c && (c.center || c.autoWidth || c.dotsData ? 1 : c.dotsEach || c.items) } }, e.prototype.current = function () { var b = this._core.relative(this._core.current()); return a.grep(this._pages, a.proxy(function (a, c) { return a.start <= b && a.end >= b }, this)).pop() }, e.prototype.getPosition = function (b) { var c, d, e = this._core.settings; return "page" == e.slideBy ? (c = a.inArray(this.current(), this._pages), d = this._pages.length, b ? ++c : --c, c = this._pages[(c % d + d) % d].start) : (c = this._core.relative(this._core.current()), d = this._core.items().length, b ? c += e.slideBy : c -= e.slideBy), c }, e.prototype.next = function (b) { a.proxy(this._overrides.to, this._core)(this.getPosition(!0), b) }, e.prototype.prev = function (b) { a.proxy(this._overrides.to, this._core)(this.getPosition(!1), b) }, e.prototype.to = function (b, c, d) { var e; !d && this._pages.length ? (e = this._pages.length, a.proxy(this._overrides.to, this._core)(this._pages[(b % e + e) % e].start, c)) : a.proxy(this._overrides.to, this._core)(b, c) }, a.fn.owlCarousel.Constructor.Plugins.Navigation = e }(window.Zepto || window.jQuery, window, document), function (a, b, c, d) { "use strict"; var e = function (c) { this._core = c, this._hashes = {}, this.$element = this._core.$element, this._handlers = { "initialized.owl.carousel": a.proxy(function (c) { c.namespace && "URLHash" === this._core.settings.startPosition && a(b).trigger("hashchange.owl.navigation") }, this), "prepared.owl.carousel": a.proxy(function (b) { if (b.namespace) { var c = a(b.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash"); if (!c) return; this._hashes[c] = b.content } }, this), "changed.owl.carousel": a.proxy(function (c) { if (c.namespace && "position" === c.property.name) { var d = this._core.items(this._core.relative(this._core.current())), e = a.map(this._hashes, function (a, b) { return a === d ? b : null }).join(); if (!e || b.location.hash.slice(1) === e) return; b.location.hash = e } }, this) }, this._core.options = a.extend({}, e.Defaults, this._core.options), this.$element.on(this._handlers), a(b).on("hashchange.owl.navigation", a.proxy(function (a) { var c = b.location.hash.substring(1), e = this._core.$stage.children(), f = this._hashes[c] && e.index(this._hashes[c]); f !== d && f !== this._core.current() && this._core.to(this._core.relative(f), !1, !0) }, this)) }; e.Defaults = { URLhashListener: !1 }, e.prototype.destroy = function () { var c, d; a(b).off("hashchange.owl.navigation"); for (c in this._handlers) this._core.$element.off(c, this._handlers[c]); for (d in Object.getOwnPropertyNames(this)) "function" != typeof this[d] && (this[d] = null) }, a.fn.owlCarousel.Constructor.Plugins.Hash = e }(window.Zepto || window.jQuery, window, document), function (a, b, c, d) { function e(b, c) { var e = !1, f = b.charAt(0).toUpperCase() + b.slice(1); return a.each((b + " " + h.join(f + " ") + f).split(" "), function (a, b) { if (g[b] !== d) return e = !c || b, !1 }), e } function f(a) { return e(a, !0) } var g = a("<support>").get(0).style, h = "Webkit Moz O ms".split(" "), i = { transition: { end: { WebkitTransition: "webkitTransitionEnd", MozTransition: "transitionend", OTransition: "oTransitionEnd", transition: "transitionend" } }, animation: { end: { WebkitAnimation: "webkitAnimationEnd", MozAnimation: "animationend", OAnimation: "oAnimationEnd", animation: "animationend" } } }, j = { csstransforms: function () { return !!e("transform") }, csstransforms3d: function () { return !!e("perspective") }, csstransitions: function () { return !!e("transition") }, cssanimations: function () { return !!e("animation") } }; j.csstransitions() && (a.support.transition = new String(f("transition")), a.support.transition.end = i.transition.end[a.support.transition]), j.cssanimations() && (a.support.animation = new String(f("animation")), a.support.animation.end = i.animation.end[a.support.animation]), j.csstransforms() && (a.support.transform = new String(f("transform")), a.support.transform3d = j.csstransforms3d()) }(window.Zepto || window.jQuery, window, document);
/**
* @module Isotope PACKAGED
* @license GPLv3
* @see http://isotope.metafizzy.co
* @version 2.2.2
*/
!function (t) { function e() { } function i(t) { function i(e) { e.prototype.option || (e.prototype.option = function (e) { t.isPlainObject(e) && (this.options = t.extend(!0, this.options, e)) }) } function n(e, i) { t.fn[e] = function (n) { if ("string" == typeof n) { for (var s = o.call(arguments, 1), a = 0, u = this.length; u > a; a++) { var p = this[a], h = t.data(p, e); if (h) if (t.isFunction(h[n]) && "_" !== n.charAt(0)) { var f = h[n].apply(h, s); if (void 0 !== f) return f } else r("no such method '" + n + "' for " + e + " instance"); else r("cannot call methods on " + e + " prior to initialization; attempted to call '" + n + "'") } return this } return this.each(function () { var o = t.data(this, e); o ? (o.option(n), o._init()) : (o = new i(this, n), t.data(this, e, o)) }) } } if (t) { var r = "undefined" == typeof console ? e : function (t) { console.error(t) }; return t.bridget = function (t, e) { i(e), n(t, e) }, t.bridget } } var o = Array.prototype.slice; "function" == typeof define && define.amd ? define("jquery-bridget/jquery.bridget", ["jquery"], i) : i("object" == typeof exports ? require("jquery") : t.jQuery) }(window), function (t) { function e(e) { var i = t.event; return i.target = i.target || i.srcElement || e, i } var i = document.documentElement, o = function () { }; i.addEventListener ? o = function (t, e, i) { t.addEventListener(e, i, !1) } : i.attachEvent && (o = function (t, i, o) { t[i + o] = o.handleEvent ? function () { var i = e(t); o.handleEvent.call(o, i) } : function () { var i = e(t); o.call(t, i) }, t.attachEvent("on" + i, t[i + o]) }); var n = function () { }; i.removeEventListener ? n = function (t, e, i) { t.removeEventListener(e, i, !1) } : i.detachEvent && (n = function (t, e, i) { t.detachEvent("on" + e, t[e + i]); try { delete t[e + i] } catch (o) { t[e + i] = void 0 } }); var r = { bind: o, unbind: n }; "function" == typeof define && define.amd ? define("eventie/eventie", r) : "object" == typeof exports ? module.exports = r : t.eventie = r }(window), function () { "use strict"; function t() { } function e(t, e) { for (var i = t.length; i--;)if (t[i].listener === e) return i; return -1 } function i(t) { return function () { return this[t].apply(this, arguments) } } var o = t.prototype, n = this, r = n.EventEmitter; o.getListeners = function (t) { var e, i, o = this._getEvents(); if (t instanceof RegExp) { e = {}; for (i in o) o.hasOwnProperty(i) && t.test(i) && (e[i] = o[i]) } else e = o[t] || (o[t] = []); return e }, o.flattenListeners = function (t) { var e, i = []; for (e = 0; e < t.length; e += 1)i.push(t[e].listener); return i }, o.getListenersAsObject = function (t) { var e, i = this.getListeners(t); return i instanceof Array && (e = {}, e[t] = i), e || i }, o.addListener = function (t, i) { var o, n = this.getListenersAsObject(t), r = "object" == typeof i; for (o in n) n.hasOwnProperty(o) && -1 === e(n[o], i) && n[o].push(r ? i : { listener: i, once: !1 }); return this }, o.on = i("addListener"), o.addOnceListener = function (t, e) { return this.addListener(t, { listener: e, once: !0 }) }, o.once = i("addOnceListener"), o.defineEvent = function (t) { return this.getListeners(t), this }, o.defineEvents = function (t) { for (var e = 0; e < t.length; e += 1)this.defineEvent(t[e]); return this }, o.removeListener = function (t, i) { var o, n, r = this.getListenersAsObject(t); for (n in r) r.hasOwnProperty(n) && -1 !== (o = e(r[n], i)) && r[n].splice(o, 1); return this }, o.off = i("removeListener"), o.addListeners = function (t, e) { return this.manipulateListeners(!1, t, e) }, o.removeListeners = function (t, e) { return this.manipulateListeners(!0, t, e) }, o.manipulateListeners = function (t, e, i) { var o, n, r = t ? this.removeListener : this.addListener, s = t ? this.removeListeners : this.addListeners; if ("object" != typeof e || e instanceof RegExp) for (o = i.length; o--;)r.call(this, e, i[o]); else for (o in e) e.hasOwnProperty(o) && (n = e[o]) && ("function" == typeof n ? r.call(this, o, n) : s.call(this, o, n)); return this }, o.removeEvent = function (t) { var e, i = typeof t, o = this._getEvents(); if ("string" === i) delete o[t]; else if (t instanceof RegExp) for (e in o) o.hasOwnProperty(e) && t.test(e) && delete o[e]; else delete this._events; return this }, o.removeAllListeners = i("removeEvent"), o.emitEvent = function (t, e) { var i, o, n, r = this.getListenersAsObject(t); for (n in r) if (r.hasOwnProperty(n)) for (o = r[n].length; o--;)!0 === (i = r[n][o]).once && this.removeListener(t, i.listener), i.listener.apply(this, e || []) === this._getOnceReturnValue() && this.removeListener(t, i.listener); return this }, o.trigger = i("emitEvent"), o.emit = function (t) { var e = Array.prototype.slice.call(arguments, 1); return this.emitEvent(t, e) }, o.setOnceReturnValue = function (t) { return this._onceReturnValue = t, this }, o._getOnceReturnValue = function () { return !this.hasOwnProperty("_onceReturnValue") || this._onceReturnValue }, o._getEvents = function () { return this._events || (this._events = {}) }, t.noConflict = function () { return n.EventEmitter = r, t }, "function" == typeof define && define.amd ? define("eventEmitter/EventEmitter", [], function () { return t }) : "object" == typeof module && module.exports ? module.exports = t : n.EventEmitter = t }.call(this), function (t) { function e(t) { if (t) { if ("string" == typeof o[t]) return t; t = t.charAt(0).toUpperCase() + t.slice(1); for (var e, n = 0, r = i.length; r > n; n++)if (e = i[n] + t, "string" == typeof o[e]) return e } } var i = "Webkit Moz ms Ms O".split(" "), o = document.documentElement.style; "function" == typeof define && define.amd ? define("get-style-property/get-style-property", [], function () { return e }) : "object" == typeof exports ? module.exports = e : t.getStyleProperty = e }(window), function (t, e) { function i(t) { var e = parseFloat(t); return -1 === t.indexOf("%") && !isNaN(e) && e } function o() { for (var t = { width: 0, height: 0, innerWidth: 0, innerHeight: 0, outerWidth: 0, outerHeight: 0 }, e = 0, i = s.length; i > e; e++)t[s[e]] = 0; return t } function n(e) { function n() { if (!f) { f = !0; var o = t.getComputedStyle; if (u = function () { var t = o ? function (t) { return o(t, null) } : function (t) { return t.currentStyle }; return function (e) { var i = t(e); return i || r("Style returned " + i + ". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"), i } }(), p = e("boxSizing")) { var n = document.createElement("div"); n.style.width = "200px", n.style.padding = "1px 2px 3px 4px", n.style.borderStyle = "solid", n.style.borderWidth = "1px 2px 3px 4px", n.style[p] = "border-box"; var s = document.body || document.documentElement; s.appendChild(n); var a = u(n); h = 200 === i(a.width), s.removeChild(n) } } } function a(e, i) { if (t.getComputedStyle || -1 === i.indexOf("%")) return i; var o = e.style, n = o.left, r = e.runtimeStyle, s = r && r.left; return s && (r.left = e.currentStyle.left), o.left = i, i = o.pixelLeft, o.left = n, s && (r.left = s), i } var u, p, h, f = !1; return function (t) { if (n(), "string" == typeof t && (t = document.querySelector(t)), t && "object" == typeof t && t.nodeType) { var e = u(t); if ("none" === e.display) return o(); var r = {}; r.width = t.offsetWidth, r.height = t.offsetHeight; for (var f = r.isBorderBox = !(!p || !e[p] || "border-box" !== e[p]), l = 0, d = s.length; d > l; l++) { var c = s[l], y = e[c]; y = a(t, y); var m = parseFloat(y); r[c] = isNaN(m) ? 0 : m } var g = r.paddingLeft + r.paddingRight, v = r.paddingTop + r.paddingBottom, _ = r.marginLeft + r.marginRight, I = r.marginTop + r.marginBottom, z = r.borderLeftWidth + r.borderRightWidth, L = r.borderTopWidth + r.borderBottomWidth, x = f && h, E = i(e.width); !1 !== E && (r.width = E + (x ? 0 : g + z)); var b = i(e.height); return !1 !== b && (r.height = b + (x ? 0 : v + L)), r.innerWidth = r.width - (g + z), r.innerHeight = r.height - (v + L), r.outerWidth = r.width + _, r.outerHeight = r.height + I, r } } } var r = "undefined" == typeof console ? function () { } : function (t) { console.error(t) }, s = ["paddingLeft", "paddingRight", "paddingTop", "paddingBottom", "marginLeft", "marginRight", "marginTop", "marginBottom", "borderLeftWidth", "borderRightWidth", "borderTopWidth", "borderBottomWidth"]; "function" == typeof define && define.amd ? define("get-size/get-size", ["get-style-property/get-style-property"], n) : "object" == typeof exports ? module.exports = n(require("desandro-get-style-property")) : t.getSize = n(t.getStyleProperty) }(window), function (t) { function e(t) { "function" == typeof t && (e.isReady ? t() : s.push(t)) } function i(t) { var i = "readystatechange" === t.type && "complete" !== r.readyState; e.isReady || i || o() } function o() { e.isReady = !0; for (var t = 0, i = s.length; i > t; t++)(0, s[t])() } function n(n) { return "complete" === r.readyState ? o() : (n.bind(r, "DOMContentLoaded", i), n.bind(r, "readystatechange", i), n.bind(t, "load", i)), e } var r = t.document, s = []; e.isReady = !1, "function" == typeof define && define.amd ? define("doc-ready/doc-ready", ["eventie/eventie"], n) : "object" == typeof exports ? module.exports = n(require("eventie")) : t.docReady = n(t.eventie) }(window), function (t) { "use strict"; function e(t, e) { return t[n](e) } function i(t) { t.parentNode || document.createDocumentFragment().appendChild(t) } var o, n = function () { if (t.matches) return "matches"; if (t.matchesSelector) return "matchesSelector"; for (var e = ["webkit", "moz", "ms", "o"], i = 0, o = e.length; o > i; i++) { var n = e[i] + "MatchesSelector"; if (t[n]) return n } }(); if (n) { var r = e(document.createElement("div"), "div"); o = r ? e : function (t, o) { return i(t), e(t, o) } } else o = function (t, e) { i(t); for (var o = t.parentNode.querySelectorAll(e), n = 0, r = o.length; r > n; n++)if (o[n] === t) return !0; return !1 }; "function" == typeof define && define.amd ? define("matches-selector/matches-selector", [], function () { return o }) : "object" == typeof exports ? module.exports = o : window.matchesSelector = o }(Element.prototype), function (t, e) { "use strict"; "function" == typeof define && define.amd ? define("fizzy-ui-utils/utils", ["doc-ready/doc-ready", "matches-selector/matches-selector"], function (i, o) { return e(t, i, o) }) : "object" == typeof exports ? module.exports = e(t, require("doc-ready"), require("desandro-matches-selector")) : t.fizzyUIUtils = e(t, t.docReady, t.matchesSelector) }(window, function (t, e, i) { var o = {}; o.extend = function (t, e) { for (var i in e) t[i] = e[i]; return t }, o.modulo = function (t, e) { return (t % e + e) % e }; var n = Object.prototype.toString; o.isArray = function (t) { return "[object Array]" == n.call(t) }, o.makeArray = function (t) { var e = []; if (o.isArray(t)) e = t; else if (t && "number" == typeof t.length) for (var i = 0, n = t.length; n > i; i++)e.push(t[i]); else e.push(t); return e }, o.indexOf = Array.prototype.indexOf ? function (t, e) { return t.indexOf(e) } : function (t, e) { for (var i = 0, o = t.length; o > i; i++)if (t[i] === e) return i; return -1 }, o.removeFrom = function (t, e) { var i = o.indexOf(t, e); -1 != i && t.splice(i, 1) }, o.isElement = "function" == typeof HTMLElement || "object" == typeof HTMLElement ? function (t) { return t instanceof HTMLElement } : function (t) { return t && "object" == typeof t && 1 == t.nodeType && "string" == typeof t.nodeName }, o.setText = function () { var t; return function (e, i) { e[t = t || (void 0 !== document.documentElement.textContent ? "textContent" : "innerText")] = i } }(), o.getParent = function (t, e) { for (; t != document.body;)if (t = t.parentNode, i(t, e)) return t }, o.getQueryElement = function (t) { return "string" == typeof t ? document.querySelector(t) : t }, o.handleEvent = function (t) { var e = "on" + t.type; this[e] && this[e](t) }, o.filterFindElements = function (t, e) { for (var n = [], r = 0, s = (t = o.makeArray(t)).length; s > r; r++) { var a = t[r]; if (o.isElement(a)) if (e) { i(a, e) && n.push(a); for (var u = a.querySelectorAll(e), p = 0, h = u.length; h > p; p++)n.push(u[p]) } else n.push(a) } return n }, o.debounceMethod = function (t, e, i) { var o = t.prototype[e], n = e + "Timeout"; t.prototype[e] = function () { var t = this[n]; t && clearTimeout(t); var e = arguments, r = this; this[n] = setTimeout(function () { o.apply(r, e), delete r[n] }, i || 100) } }, o.toDashed = function (t) { return t.replace(/(.)([A-Z])/g, function (t, e, i) { return e + "-" + i }).toLowerCase() }; var r = t.console; return o.htmlInit = function (i, n) { e(function () { for (var e = o.toDashed(n), s = document.querySelectorAll(".js-" + e), a = "data-" + e + "-options", u = 0, p = s.length; p > u; u++) { var h, f = s[u], l = f.getAttribute(a); try { h = l && JSON.parse(l) } catch (t) { r && r.error("Error parsing " + a + " on " + f.nodeName.toLowerCase() + (f.id ? "#" + f.id : "") + ": " + t); continue } var d = new i(f, h), c = t.jQuery; c && c.data(f, n, d) } }) }, o }), function (t, e) { "use strict"; "function" == typeof define && define.amd ? define("outlayer/item", ["eventEmitter/EventEmitter", "get-size/get-size", "get-style-property/get-style-property", "fizzy-ui-utils/utils"], function (i, o, n, r) { return e(t, i, o, n, r) }) : "object" == typeof exports ? module.exports = e(t, require("wolfy87-eventemitter"), require("get-size"), require("desandro-get-style-property"), require("fizzy-ui-utils")) : (t.Outlayer = {}, t.Outlayer.Item = e(t, t.EventEmitter, t.getSize, t.getStyleProperty, t.fizzyUIUtils)) }(window, function (t, e, i, o, n) { "use strict"; function r(t) { for (var e in t) return !1; return null, !0 } function s(t, e) { t && (this.element = t, this.layout = e, this.position = { x: 0, y: 0 }, this._create()) } var a = t.getComputedStyle, u = a ? function (t) { return a(t, null) } : function (t) { return t.currentStyle }, p = o("transition"), h = o("transform"), f = p && h, l = !!o("perspective"), d = { WebkitTransition: "webkitTransitionEnd", MozTransition: "transitionend", OTransition: "otransitionend", transition: "transitionend" }[p], c = ["transform", "transition", "transitionDuration", "transitionProperty"], y = function () { for (var t = {}, e = 0, i = c.length; i > e; e++) { var n = c[e], r = o(n); r && r !== n && (t[n] = r) } return t }(); n.extend(s.prototype, e.prototype), s.prototype._create = function () { this._transn = { ingProperties: {}, clean: {}, onEnd: {} }, this.css({ position: "absolute" }) }, s.prototype.handleEvent = function (t) { var e = "on" + t.type; this[e] && this[e](t) }, s.prototype.getSize = function () { this.size = i(this.element) }, s.prototype.css = function (t) { var e = this.element.style; for (var i in t) e[y[i] || i] = t[i] }, s.prototype.getPosition = function () { var t = u(this.element), e = this.layout.options, i = e.isOriginLeft, o = e.isOriginTop, n = t[i ? "left" : "right"], r = t[o ? "top" : "bottom"], s = this.layout.size, a = -1 != n.indexOf("%") ? parseFloat(n) / 100 * s.width : parseInt(n, 10), p = -1 != r.indexOf("%") ? parseFloat(r) / 100 * s.height : parseInt(r, 10); a = isNaN(a) ? 0 : a, p = isNaN(p) ? 0 : p, a -= i ? s.paddingLeft : s.paddingRight, p -= o ? s.paddingTop : s.paddingBottom, this.position.x = a, this.position.y = p }, s.prototype.layoutPosition = function () { var t = this.layout.size, e = this.layout.options, i = {}, o = e.isOriginLeft ? "paddingLeft" : "paddingRight", n = e.isOriginLeft ? "left" : "right", r = e.isOriginLeft ? "right" : "left", s = this.position.x + t[o]; i[n] = this.getXValue(s), i[r] = ""; var a = e.isOriginTop ? "paddingTop" : "paddingBottom", u = e.isOriginTop ? "top" : "bottom", p = e.isOriginTop ? "bottom" : "top", h = this.position.y + t[a]; i[u] = this.getYValue(h), i[p] = "", this.css(i), this.emitEvent("layout", [this]) }, s.prototype.getXValue = function (t) { var e = this.layout.options; return e.percentPosition && !e.isHorizontal ? t / this.layout.size.width * 100 + "%" : t + "px" }, s.prototype.getYValue = function (t) { var e = this.layout.options; return e.percentPosition && e.isHorizontal ? t / this.layout.size.height * 100 + "%" : t + "px" }, s.prototype._transitionTo = function (t, e) { this.getPosition(); var i = this.position.x, o = this.position.y, n = parseInt(t, 10), r = parseInt(e, 10), s = n === this.position.x && r === this.position.y; if (this.setPosition(t, e), !s || this.isTransitioning) { var a = t - i, u = e - o, p = {}; p.transform = this.getTranslate(a, u), this.transition({ to: p, onTransitionEnd: { transform: this.layoutPosition }, isCleaning: !0 }) } else this.layoutPosition() }, s.prototype.getTranslate = function (t, e) { var i = this.layout.options; return t = i.isOriginLeft ? t : -t, e = i.isOriginTop ? e : -e, l ? "translate3d(" + t + "px, " + e + "px, 0)" : "translate(" + t + "px, " + e + "px)" }, s.prototype.goTo = function (t, e) { this.setPosition(t, e), this.layoutPosition() }, s.prototype.moveTo = f ? s.prototype._transitionTo : s.prototype.goTo, s.prototype.setPosition = function (t, e) { this.position.x = parseInt(t, 10), this.position.y = parseInt(e, 10) }, s.prototype._nonTransition = function (t) { this.css(t.to), t.isCleaning && this._removeStyles(t.to); for (var e in t.onTransitionEnd) t.onTransitionEnd[e].call(this) }, s.prototype._transition = function (t) { if (parseFloat(this.layout.options.transitionDuration)) { var e = this._transn; for (var i in t.onTransitionEnd) e.onEnd[i] = t.onTransitionEnd[i]; for (i in t.to) e.ingProperties[i] = !0, t.isCleaning && (e.clean[i] = !0); if (t.from) { this.css(t.from); this.element.offsetHeight; null } this.enableTransition(t.to), this.css(t.to), this.isTransitioning = !0 } else this._nonTransition(t) }; var m = "opacity," + (y.transform || "transform").replace(/([A-Z])/g, function (t) { return "-" + t.toLowerCase() }); s.prototype.enableTransition = function () { this.isTransitioning || (this.css({ transitionProperty: m, transitionDuration: this.layout.options.transitionDuration }), this.element.addEventListener(d, this, !1)) }, s.prototype.transition = s.prototype[p ? "_transition" : "_nonTransition"], s.prototype.onwebkitTransitionEnd = function (t) { this.ontransitionend(t) }, s.prototype.onotransitionend = function (t) { this.ontransitionend(t) }; var g = { "-webkit-transform": "transform", "-moz-transform": "transform", "-o-transform": "transform" }; s.prototype.ontransitionend = function (t) { if (t.target === this.element) { var e = this._transn, i = g[t.propertyName] || t.propertyName; delete e.ingProperties[i], r(e.ingProperties) && this.disableTransition(), i in e.clean && (this.element.style[t.propertyName] = "", delete e.clean[i]), i in e.onEnd && (e.onEnd[i].call(this), delete e.onEnd[i]), this.emitEvent("transitionEnd", [this]) } }, s.prototype.disableTransition = function () { this.removeTransitionStyles(), this.element.removeEventListener(d, this, !1), this.isTransitioning = !1 }, s.prototype._removeStyles = function (t) { var e = {}; for (var i in t) e[i] = ""; this.css(e) }; var v = { transitionProperty: "", transitionDuration: "" }; return s.prototype.removeTransitionStyles = function () { this.css(v) }, s.prototype.removeElem = function () { this.element.parentNode.removeChild(this.element), this.css({ display: "" }), this.emitEvent("remove", [this]) }, s.prototype.remove = function () { if (p && parseFloat(this.layout.options.transitionDuration)) { var t = this; this.once("transitionEnd", function () { t.removeElem() }), this.hide() } else this.removeElem() }, s.prototype.reveal = function () { delete this.isHidden, this.css({ display: "" }); var t = this.layout.options, e = {}; e[this.getHideRevealTransitionEndProperty("visibleStyle")] = this.onRevealTransitionEnd, this.transition({ from: t.hiddenStyle, to: t.visibleStyle, isCleaning: !0, onTransitionEnd: e }) }, s.prototype.onRevealTransitionEnd = function () { this.isHidden || this.emitEvent("reveal") }, s.prototype.getHideRevealTransitionEndProperty = function (t) { var e = this.layout.options[t]; if (e.opacity) return "opacity"; for (var i in e) return i }, s.prototype.hide = function () { this.isHidden = !0, this.css({ display: "" }); var t = this.layout.options, e = {}; e[this.getHideRevealTransitionEndProperty("hiddenStyle")] = this.onHideTransitionEnd, this.transition({ from: t.visibleStyle, to: t.hiddenStyle, isCleaning: !0, onTransitionEnd: e }) }, s.prototype.onHideTransitionEnd = function () { this.isHidden && (this.css({ display: "none" }), this.emitEvent("hide")) }, s.prototype.destroy = function () { this.css({ position: "", left: "", right: "", top: "", bottom: "", transition: "", transform: "" }) }, s }), function (t, e) { "use strict"; "function" == typeof define && define.amd ? define("outlayer/outlayer", ["eventie/eventie", "eventEmitter/EventEmitter", "get-size/get-size", "fizzy-ui-utils/utils", "./item"], function (i, o, n, r, s) { return e(t, i, o, n, r, s) }) : "object" == typeof exports ? module.exports = e(t, require("eventie"), require("wolfy87-eventemitter"), require("get-size"), require("fizzy-ui-utils"), require("./item")) : t.Outlayer = e(t, t.eventie, t.EventEmitter, t.getSize, t.fizzyUIUtils, t.Outlayer.Item) }(window, function (t, e, i, o, n, r) { "use strict"; function s(t, e) { var i = n.getQueryElement(t); if (i) { this.element = i, u && (this.$element = u(this.element)), this.options = n.extend({}, this.constructor.defaults), this.option(e); var o = ++h; this.element.outlayerGUID = o, f[o] = this, this._create(), this.options.isInitLayout && this.layout() } else a && a.error("Bad element for " + this.constructor.namespace + ": " + (i || t)) } var a = t.console, u = t.jQuery, p = function () { }, h = 0, f = {}; return s.namespace = "outlayer", s.Item = r, s.defaults = { containerStyle: { position: "relative" }, isInitLayout: !0, isOriginLeft: !0, isOriginTop: !0, isResizeBound: !0, isResizingContainer: !0, transitionDuration: "0.4s", hiddenStyle: { opacity: 0, transform: "scale(0.001)" }, visibleStyle: { opacity: 1, transform: "scale(1)" } }, n.extend(s.prototype, i.prototype), s.prototype.option = function (t) { n.extend(this.options, t) }, s.prototype._create = function () { this.reloadItems(), this.stamps = [], this.stamp(this.options.stamp), n.extend(this.element.style, this.options.containerStyle), this.options.isResizeBound && this.bindResize() }, s.prototype.reloadItems = function () { this.items = this._itemize(this.element.children) }, s.prototype._itemize = function (t) { for (var e = this._filterFindItemElements(t), i = this.constructor.Item, o = [], n = 0, r = e.length; r > n; n++) { var s = new i(e[n], this); o.push(s) } return o }, s.prototype._filterFindItemElements = function (t) { return n.filterFindElements(t, this.options.itemSelector) }, s.prototype.getItemElements = function () { for (var t = [], e = 0, i = this.items.length; i > e; e++)t.push(this.items[e].element); return t }, s.prototype.layout = function () { this._resetLayout(), this._manageStamps(); var t = void 0 !== this.options.isLayoutInstant ? this.options.isLayoutInstant : !this._isLayoutInited; this.layoutItems(this.items, t), this._isLayoutInited = !0 }, s.prototype._init = s.prototype.layout, s.prototype._resetLayout = function () { this.getSize() }, s.prototype.getSize = function () { this.size = o(this.element) }, s.prototype._getMeasurement = function (t, e) { var i, r = this.options[t]; r ? ("string" == typeof r ? i = this.element.querySelector(r) : n.isElement(r) && (i = r), this[t] = i ? o(i)[e] : r) : this[t] = 0 }, s.prototype.layoutItems = function (t, e) { t = this._getItemsForLayout(t), this._layoutItems(t, e), this._postLayout() }, s.prototype._getItemsForLayout = function (t) { for (var e = [], i = 0, o = t.length; o > i; i++) { var n = t[i]; n.isIgnored || e.push(n) } return e }, s.prototype._layoutItems = function (t, e) { if (this._emitCompleteOnItems("layout", t), t && t.length) { for (var i = [], o = 0, n = t.length; n > o; o++) { var r = t[o], s = this._getItemLayoutPosition(r); s.item = r, s.isInstant = e || r.isLayoutInstant, i.push(s) } this._processLayoutQueue(i) } }, s.prototype._getItemLayoutPosition = function () { return { x: 0, y: 0 } }, s.prototype._processLayoutQueue = function (t) { for (var e = 0, i = t.length; i > e; e++) { var o = t[e]; this._positionItem(o.item, o.x, o.y, o.isInstant) } }, s.prototype._positionItem = function (t, e, i, o) { o ? t.goTo(e, i) : t.moveTo(e, i) }, s.prototype._postLayout = function () { this.resizeContainer() }, s.prototype.resizeContainer = function () { if (this.options.isResizingContainer) { var t = this._getContainerSize(); t && (this._setContainerMeasure(t.width, !0), this._setContainerMeasure(t.height, !1)) } }, s.prototype._getContainerSize = p, s.prototype._setContainerMeasure = function (t, e) { if (void 0 !== t) { var i = this.size; i.isBorderBox && (t += e ? i.paddingLeft + i.paddingRight + i.borderLeftWidth + i.borderRightWidth : i.paddingBottom + i.paddingTop + i.borderTopWidth + i.borderBottomWidth), t = Math.max(t, 0), this.element.style[e ? "width" : "height"] = t + "px" } }, s.prototype._emitCompleteOnItems = function (t, e) { function i() { o.dispatchEvent(t + "Complete", null, [e]) } var o = this, n = e.length; if (e && n) for (var r = 0, s = 0, a = e.length; a > s; s++)e[s].once(t, function () { ++r === n && i() }); else i() }, s.prototype.dispatchEvent = function (t, e, i) { var o = e ? [e].concat(i) : i; if (this.emitEvent(t, o), u) if (this.$element = this.$element || u(this.element), e) { var n = u.Event(e); n.type = t, this.$element.trigger(n, i) } else this.$element.trigger(t, i) }, s.prototype.ignore = function (t) { var e = this.getItem(t); e && (e.isIgnored = !0) }, s.prototype.unignore = function (t) { var e = this.getItem(t); e && delete e.isIgnored }, s.prototype.stamp = function (t) { if (t = this._find(t)) { this.stamps = this.stamps.concat(t); for (var e = 0, i = t.length; i > e; e++) { var o = t[e]; this.ignore(o) } } }, s.prototype.unstamp = function (t) { if (t = this._find(t)) for (var e = 0, i = t.length; i > e; e++) { var o = t[e]; n.removeFrom(this.stamps, o), this.unignore(o) } }, s.prototype._find = function (t) { return t ? ("string" == typeof t && (t = this.element.querySelectorAll(t)), t = n.makeArray(t)) : void 0 }, s.prototype._manageStamps = function () { if (this.stamps && this.stamps.length) { this._getBoundingRect(); for (var t = 0, e = this.stamps.length; e > t; t++) { var i = this.stamps[t]; this._manageStamp(i) } } }, s.prototype._getBoundingRect = function () { var t = this.element.getBoundingClientRect(), e = this.size; this._boundingRect = { left: t.left + e.paddingLeft + e.borderLeftWidth, top: t.top + e.paddingTop + e.borderTopWidth, right: t.right - (e.paddingRight + e.borderRightWidth), bottom: t.bottom - (e.paddingBottom + e.borderBottomWidth) } }, s.prototype._manageStamp = p, s.prototype._getElementOffset = function (t) { var e = t.getBoundingClientRect(), i = this._boundingRect, n = o(t); return { left: e.left - i.left - n.marginLeft, top: e.top - i.top - n.marginTop, right: i.right - e.right - n.marginRight, bottom: i.bottom - e.bottom - n.marginBottom } }, s.prototype.handleEvent = function (t) { var e = "on" + t.type; this[e] && this[e](t) }, s.prototype.bindResize = function () { this.isResizeBound || (e.bind(t, "resize", this), this.isResizeBound = !0) }, s.prototype.unbindResize = function () { this.isResizeBound && e.unbind(t, "resize", this), this.isResizeBound = !1 }, s.prototype.onresize = function () { this.resizeTimeout && clearTimeout(this.resizeTimeout); var t = this; this.resizeTimeout = setTimeout(function () { t.resize(), delete t.resizeTimeout }, 100) }, s.prototype.resize = function () { this.isResizeBound && this.needsResizeLayout() && this.layout() }, s.prototype.needsResizeLayout = function () { var t = o(this.element); return this.size && t && t.innerWidth !== this.size.innerWidth }, s.prototype.addItems = function (t) { var e = this._itemize(t); return e.length && (this.items = this.items.concat(e)), e }, s.prototype.appended = function (t) { var e = this.addItems(t); e.length && (this.layoutItems(e, !0), this.reveal(e)) }, s.prototype.prepended = function (t) { var e = this._itemize(t); if (e.length) { var i = this.items.slice(0); this.items = e.concat(i), this._resetLayout(), this._manageStamps(), this.layoutItems(e, !0), this.reveal(e), this.layoutItems(i) } }, s.prototype.reveal = function (t) { this._emitCompleteOnItems("reveal", t); for (var e = t && t.length, i = 0; e && e > i; i++)t[i].reveal() }, s.prototype.hide = function (t) { this._emitCompleteOnItems("hide", t); for (var e = t && t.length, i = 0; e && e > i; i++)t[i].hide() }, s.prototype.revealItemElements = function (t) { var e = this.getItems(t); this.reveal(e) }, s.prototype.hideItemElements = function (t) { var e = this.getItems(t); this.hide(e) }, s.prototype.getItem = function (t) { for (var e = 0, i = this.items.length; i > e; e++) { var o = this.items[e]; if (o.element === t) return o } }, s.prototype.getItems = function (t) { for (var e = [], i = 0, o = (t = n.makeArray(t)).length; o > i; i++) { var r = t[i], s = this.getItem(r); s && e.push(s) } return e }, s.prototype.remove = function (t) { var e = this.getItems(t); if (this._emitCompleteOnItems("remove", e), e && e.length) for (var i = 0, o = e.length; o > i; i++) { var r = e[i]; r.remove(), n.removeFrom(this.items, r) } }, s.prototype.destroy = function () { var t = this.element.style; t.height = "", t.position = "", t.width = ""; for (var e = 0, i = this.items.length; i > e; e++)this.items[e].destroy(); this.unbindResize(); var o = this.element.outlayerGUID; delete f[o], delete this.element.outlayerGUID, u && u.removeData(this.element, this.constructor.namespace) }, s.data = function (t) { var e = (t = n.getQueryElement(t)) && t.outlayerGUID; return e && f[e] }, s.create = function (t, e) { function i() { s.apply(this, arguments) } return Object.create ? i.prototype = Object.create(s.prototype) : n.extend(i.prototype, s.prototype), i.prototype.constructor = i, i.defaults = n.extend({}, s.defaults), n.extend(i.defaults, e), i.prototype.settings = {}, i.namespace = t, i.data = s.data, i.Item = function () { r.apply(this, arguments) }, i.Item.prototype = new r, n.htmlInit(i, t), u && u.bridget && u.bridget(t, i), i }, s.Item = r, s }), function (t, e) { "use strict"; "function" == typeof define && define.amd ? define("isotope/js/item", ["outlayer/outlayer"], e) : "object" == typeof exports ? module.exports = e(require("outlayer")) : (t.Isotope = t.Isotope || {}, t.Isotope.Item = e(t.Outlayer)) }(window, function (t) { "use strict"; function e() { t.Item.apply(this, arguments) } (e.prototype = new t.Item)._create = function () { this.id = this.layout.itemGUID++, t.Item.prototype._create.call(this), this.sortData = {} }, e.prototype.updateSortData = function () { if (!this.isIgnored) { this.sortData.id = this.id, this.sortData["original-order"] = this.id, this.sortData.random = Math.random(); var t = this.layout.options.getSortData, e = this.layout._sorters; for (var i in t) { var o = e[i]; this.sortData[i] = o(this.element, this) } } }; var i = e.prototype.destroy; return e.prototype.destroy = function () { i.apply(this, arguments), this.css({ display: "" }) }, e }), function (t, e) { "use strict"; "function" == typeof define && define.amd ? define("isotope/js/layout-mode", ["get-size/get-size", "outlayer/outlayer"], e) : "object" == typeof exports ? module.exports = e(require("get-size"), require("outlayer")) : (t.Isotope = t.Isotope || {}, t.Isotope.LayoutMode = e(t.getSize, t.Outlayer)) }(window, function (t, e) { "use strict"; function i(t) { this.isotope = t, t && (this.options = t.options[this.namespace], this.element = t.element, this.items = t.filteredItems, this.size = t.size) } return function () { for (var t = ["_resetLayout", "_getItemLayoutPosition", "_manageStamp", "_getContainerSize", "_getElementOffset", "needsResizeLayout"], o = 0, n = t.length; n > o; o++) { var r = t[o]; i.prototype[r] = function (t) { return function () { return e.prototype[t].apply(this.isotope, arguments) } }(r) } }(), i.prototype.needsVerticalResizeLayout = function () { var e = t(this.isotope.element); return this.isotope.size && e && e.innerHeight != this.isotope.size.innerHeight }, i.prototype._getMeasurement = function () { this.isotope._getMeasurement.apply(this, arguments) }, i.prototype.getColumnWidth = function () { this.getSegmentSize("column", "Width") }, i.prototype.getRowHeight = function () { this.getSegmentSize("row", "Height") }, i.prototype.getSegmentSize = function (t, e) { var i = t + e, o = "outer" + e; if (this._getMeasurement(i, o), !this[i]) { var n = this.getFirstItemSize(); this[i] = n && n[o] || this.isotope.size["inner" + e] } }, i.prototype.getFirstItemSize = function () { var e = this.isotope.filteredItems[0]; return e && e.element && t(e.element) }, i.prototype.layout = function () { this.isotope.layout.apply(this.isotope, arguments) }, i.prototype.getSize = function () { this.isotope.getSize(), this.size = this.isotope.size }, i.modes = {}, i.create = function (t, e) { function o() { i.apply(this, arguments) } return o.prototype = new i, e && (o.options = e), o.prototype.namespace = t, i.modes[t] = o, o }, i }), function (t, e) { "use strict"; "function" == typeof define && define.amd ? define("masonry/masonry", ["outlayer/outlayer", "get-size/get-size", "fizzy-ui-utils/utils"], e) : "object" == typeof exports ? module.exports = e(require("outlayer"), require("get-size"), require("fizzy-ui-utils")) : t.Masonry = e(t.Outlayer, t.getSize, t.fizzyUIUtils) }(window, function (t, e, i) { var o = t.create("masonry"); return o.prototype._resetLayout = function () { this.getSize(), this._getMeasurement("columnWidth", "outerWidth"), this._getMeasurement("gutter", "outerWidth"), this.measureColumns(); var t = this.cols; for (this.colYs = []; t--;)this.colYs.push(0); this.maxY = 0 }, o.prototype.measureColumns = function () { if (this.getContainerWidth(), !this.columnWidth) { var t = this.items[0], i = t && t.element; this.columnWidth = i && e(i).outerWidth || this.containerWidth } var o = this.columnWidth += this.gutter, n = this.containerWidth + this.gutter, r = n / o, s = o - n % o, a = s && 1 > s ? "round" : "floor"; r = Math[a](r), this.cols = Math.max(r, 1) }, o.prototype.getContainerWidth = function () { var t = this.options.isFitWidth ? this.element.parentNode : this.element, i = e(t); this.containerWidth = i && i.innerWidth }, o.prototype._getItemLayoutPosition = function (t) { t.getSize(); var e = t.size.outerWidth % this.columnWidth, o = e && 1 > e ? "round" : "ceil", n = Math[o](t.size.outerWidth / this.columnWidth); n = Math.min(n, this.cols); for (var r = this._getColGroup(n), s = Math.min.apply(Math, r), a = i.indexOf(r, s), u = { x: this.columnWidth * a, y: s }, p = s + t.size.outerHeight, h = this.cols + 1 - r.length, f = 0; h > f; f++)this.colYs[a + f] = p; return u }, o.prototype._getColGroup = function (t) { if (2 > t) return this.colYs; for (var e = [], i = this.cols + 1 - t, o = 0; i > o; o++) { var n = this.colYs.slice(o, o + t); e[o] = Math.max.apply(Math, n) } return e }, o.prototype._manageStamp = function (t) { var i = e(t), o = this._getElementOffset(t), n = this.options.isOriginLeft ? o.left : o.right, r = n + i.outerWidth, s = Math.floor(n / this.columnWidth); s = Math.max(0, s); var a = Math.floor(r / this.columnWidth); a -= r % this.columnWidth ? 0 : 1, a = Math.min(this.cols - 1, a); for (var u = (this.options.isOriginTop ? o.top : o.bottom) + i.outerHeight, p = s; a >= p; p++)this.colYs[p] = Math.max(u, this.colYs[p]) }, o.prototype._getContainerSize = function () { this.maxY = Math.max.apply(Math, this.colYs); var t = { height: this.maxY }; return this.options.isFitWidth && (t.width = this._getContainerFitWidth()), t }, o.prototype._getContainerFitWidth = function () { for (var t = 0, e = this.cols; --e && 0 === this.colYs[e];)t++; return (this.cols - t) * this.columnWidth - this.gutter }, o.prototype.needsResizeLayout = function () { var t = this.containerWidth; return this.getContainerWidth(), t !== this.containerWidth }, o }), function (t, e) { "use strict"; "function" == typeof define && define.amd ? define("isotope/js/layout-modes/masonry", ["../layout-mode", "masonry/masonry"], e) : "object" == typeof exports ? module.exports = e(require("../layout-mode"), require("masonry-layout")) : e(t.Isotope.LayoutMode, t.Masonry) }(window, function (t, e) { "use strict"; var i = t.create("masonry"), o = i.prototype._getElementOffset, n = i.prototype.layout, r = i.prototype._getMeasurement; (function (t, e) { for (var i in e) t[i] = e[i] })(i.prototype, e.prototype), i.prototype._getElementOffset = o, i.prototype.layout = n, i.prototype._getMeasurement = r; var s = i.prototype.measureColumns; i.prototype.measureColumns = function () { this.items = this.isotope.filteredItems, s.call(this) }; var a = i.prototype._manageStamp; return i.prototype._manageStamp = function () { this.options.isOriginLeft = this.isotope.options.isOriginLeft, this.options.isOriginTop = this.isotope.options.isOriginTop, a.apply(this, arguments) }, i }), function (t, e) { "use strict"; "function" == typeof define && define.amd ? define("isotope/js/layout-modes/fit-rows", ["../layout-mode"], e) : "object" == typeof exports ? module.exports = e(require("../layout-mode")) : e(t.Isotope.LayoutMode) }(window, function (t) { "use strict"; var e = t.create("fitRows"); return e.prototype._resetLayout = function () { this.x = 0, this.y = 0, this.maxY = 0, this._getMeasurement("gutter", "outerWidth") }, e.prototype._getItemLayoutPosition = function (t) { t.getSize(); var e = t.size.outerWidth + this.gutter, i = this.isotope.size.innerWidth + this.gutter; 0 !== this.x && e + this.x > i && (this.x = 0, this.y = this.maxY); var o = { x: this.x, y: this.y }; return this.maxY = Math.max(this.maxY, this.y + t.size.outerHeight), this.x += e, o }, e.prototype._getContainerSize = function () { return { height: this.maxY } }, e }), function (t, e) { "use strict"; "function" == typeof define && define.amd ? define("isotope/js/layout-modes/vertical", ["../layout-mode"], e) : "object" == typeof exports ? module.exports = e(require("../layout-mode")) : e(t.Isotope.LayoutMode) }(window, function (t) { "use strict"; var e = t.create("vertical", { horizontalAlignment: 0 }); return e.prototype._resetLayout = function () { this.y = 0 }, e.prototype._getItemLayoutPosition = function (t) { t.getSize(); var e = (this.isotope.size.innerWidth - t.size.outerWidth) * this.options.horizontalAlignment, i = this.y; return this.y += t.size.outerHeight, { x: e, y: i } }, e.prototype._getContainerSize = function () { return { height: this.y } }, e }), function (t, e) { "use strict"; "function" == typeof define && define.amd ? define(["outlayer/outlayer", "get-size/get-size", "matches-selector/matches-selector", "fizzy-ui-utils/utils", "isotope/js/item", "isotope/js/layout-mode", "isotope/js/layout-modes/masonry", "isotope/js/layout-modes/fit-rows", "isotope/js/layout-modes/vertical"], function (i, o, n, r, s, a) { return e(t, i, o, n, r, s, a) }) : "object" == typeof exports ? module.exports = e(t, require("outlayer"), require("get-size"), require("desandro-matches-selector"), require("fizzy-ui-utils"), require("./item"), require("./layout-mode"), require("./layout-modes/masonry"), require("./layout-modes/fit-rows"), require("./layout-modes/vertical")) : t.Isotope = e(t, t.Outlayer, t.getSize, t.matchesSelector, t.fizzyUIUtils, t.Isotope.Item, t.Isotope.LayoutMode) }(window, function (t, e, i, o, n, r, s) { function a(t, e) { return function (i, o) { for (var n = 0, r = t.length; r > n; n++) { var s = t[n], a = i.sortData[s], u = o.sortData[s]; if (a > u || u > a) { var p = (void 0 !== e[s] ? e[s] : e) ? 1 : -1; return (a > u ? 1 : -1) * p } } return 0 } } var u = t.jQuery, p = String.prototype.trim ? function (t) { return t.trim() } : function (t) { return t.replace(/^\s+|\s+$/g, "") }, h = document.documentElement.textContent ? function (t) { return t.textContent } : function (t) { return t.innerText }, f = e.create("isotope", { layoutMode: "masonry", isJQueryFiltering: !0, sortAscending: !0 }); f.Item = r, f.LayoutMode = s, f.prototype._create = function () { this.itemGUID = 0, this._sorters = {}, this._getSorters(), e.prototype._create.call(this), this.modes = {}, this.filteredItems = this.items, this.sortHistory = ["original-order"]; for (var t in s.modes) this._initLayoutMode(t) }, f.prototype.reloadItems = function () { this.itemGUID = 0, e.prototype.reloadItems.call(this) }, f.prototype._itemize = function () { for (var t = e.prototype._itemize.apply(this, arguments), i = 0, o = t.length; o > i; i++)t[i].id = this.itemGUID++; return this._updateItemsSortData(t), t }, f.prototype._initLayoutMode = function (t) { var e = s.modes[t], i = this.options[t] || {}; this.options[t] = e.options ? n.extend(e.options, i) : i, this.modes[t] = new e(this) }, f.prototype.layout = function () { return !this._isLayoutInited && this.options.isInitLayout ? void this.arrange() : void this._layout() }, f.prototype._layout = function () { var t = this._getIsInstant(); this._resetLayout(), this._manageStamps(), this.layoutItems(this.filteredItems, t), this._isLayoutInited = !0 }, f.prototype.arrange = function (t) { function e() { o.reveal(i.needReveal), o.hide(i.needHide) } this.option(t), this._getIsInstant(); var i = this._filter(this.items); this.filteredItems = i.matches; var o = this; this._bindArrangeComplete(), this._isInstant ? this._noTransition(e) : e(), this._sort(), this._layout() }, f.prototype._init = f.prototype.arrange, f.prototype._getIsInstant = function () { var t = void 0 !== this.options.isLayoutInstant ? this.options.isLayoutInstant : !this._isLayoutInited; return this._isInstant = t, t }, f.prototype._bindArrangeComplete = function () { function t() { e && i && o && n.dispatchEvent("arrangeComplete", null, [n.filteredItems]) } var e, i, o, n = this; this.once("layoutComplete", function () { e = !0, t() }), this.once("hideComplete", function () { i = !0, t() }), this.once("revealComplete", function () { o = !0, t() }) }, f.prototype._filter = function (t) { var e = this.options.filter; e = e || "*"; for (var i = [], o = [], n = [], r = this._getFilterTest(e), s = 0, a = t.length; a > s; s++) { var u = t[s]; if (!u.isIgnored) { var p = r(u); p && i.push(u), p && u.isHidden ? o.push(u) : p || u.isHidden || n.push(u) } } return { matches: i, needReveal: o, needHide: n } }, f.prototype._getFilterTest = function (t) { return u && this.options.isJQueryFiltering ? function (e) { return u(e.element).is(t) } : "function" == typeof t ? function (e) { return t(e.element) } : function (e) { return o(e.element, t) } }, f.prototype.updateSortData = function (t) { var e; t ? (t = n.makeArray(t), e = this.getItems(t)) : e = this.items, this._getSorters(), this._updateItemsSortData(e) }, f.prototype._getSorters = function () { var t = this.options.getSortData; for (var e in t) { var i = t[e]; this._sorters[e] = l(i) } }, f.prototype._updateItemsSortData = function (t) { for (var e = t && t.length, i = 0; e && e > i; i++)t[i].updateSortData() }; var l = function () { function t(t, e) { return t ? function (e) { return e.getAttribute(t) } : function (t) { var i = t.querySelector(e); return i && h(i) } } return function (e) { if ("string" != typeof e) return e; var i = p(e).split(" "), o = i[0], n = o.match(/^\[(.+)\]$/), r = t(n && n[1], o), s = f.sortDataParsers[i[1]]; return e = s ? function (t) { return t && s(r(t)) } : function (t) { return t && r(t) } } }(); f.sortDataParsers = { parseInt: function (t) { return parseInt(t, 10) }, parseFloat: function (t) { return parseFloat(t) } }, f.prototype._sort = function () { var t = this.options.sortBy; if (t) { var e = a([].concat.apply(t, this.sortHistory), this.options.sortAscending); this.filteredItems.sort(e), t != this.sortHistory[0] && this.sortHistory.unshift(t) } }, f.prototype._mode = function () { var t = this.options.layoutMode, e = this.modes[t]; if (!e) throw new Error("No layout mode: " + t); return e.options = this.options[t], e }, f.prototype._resetLayout = function () { e.prototype._resetLayout.call(this), this._mode()._resetLayout() }, f.prototype._getItemLayoutPosition = function (t) { return this._mode()._getItemLayoutPosition(t) }, f.prototype._manageStamp = function (t) { this._mode()._manageStamp(t) }, f.prototype._getContainerSize = function () { return this._mode()._getContainerSize() }, f.prototype.needsResizeLayout = function () { return this._mode().needsResizeLayout() }, f.prototype.appended = function (t) { var e = this.addItems(t); if (e.length) { var i = this._filterRevealAdded(e); this.filteredItems = this.filteredItems.concat(i) } }, f.prototype.prepended = function (t) { var e = this._itemize(t); if (e.length) { this._resetLayout(), this._manageStamps(); var i = this._filterRevealAdded(e); this.layoutItems(this.filteredItems), this.filteredItems = i.concat(this.filteredItems), this.items = e.concat(this.items) } }, f.prototype._filterRevealAdded = function (t) { var e = this._filter(t); return this.hide(e.needHide), this.reveal(e.matches), this.layoutItems(e.matches, !0), e.matches }, f.prototype.insert = function (t) { var e = this.addItems(t); if (e.length) { var i, o, n = e.length; for (i = 0; n > i; i++)o = e[i], this.element.appendChild(o.element); var r = this._filter(e).matches; for (i = 0; n > i; i++)e[i].isLayoutInstant = !0; for (this.arrange(), i = 0; n > i; i++)delete e[i].isLayoutInstant; this.reveal(r) } }; var d = f.prototype.remove; return f.prototype.remove = function (t) { t = n.makeArray(t); var e = this.getItems(t); d.call(this, t); var i = e && e.length; if (i) for (var o = 0; i > o; o++) { var r = e[o]; n.removeFrom(this.filteredItems, r) } }, f.prototype.shuffle = function () { for (var t = 0, e = this.items.length; e > t; t++)this.items[t].sortData.random = Math.random(); this.options.sortBy = "random", this._sort(), this._layout() }, f.prototype._noTransition = function (t) { var e = this.options.transitionDuration; this.options.transitionDuration = 0; var i = t.call(this); return this.options.transitionDuration = e, i }, f.prototype.getFilteredItemElements = function () { for (var t = [], e = 0, i = this.filteredItems.length; i > e; e++)t.push(this.filteredItems[e].element); return t }, f });
/**
* @module RD Navbar
* @author Evgeniy Gusarov
* @see https://ua.linkedin.com/pub/evgeniy-gusarov/8a/a40/54a
* @version 2.2.5
*/
(function () { var t; t = "ontouchstart" in window, function (n, o, e) { var a; a = function () { function a(t, a) { this.options = n.extend(!0, {}, this.Defaults, a), this.$element = n(t), this.$clone = null, this.$win = n(e), this.$doc = n(o), this.currentLayout = this.options.layout, this.loaded = !1, this.focusOnHover = this.options.focusOnHover, this.focusTimer = !1, this.cloneTimer = !1, this.isStuck = !1, this.initialize() } return a.prototype.Defaults = { layout: "rd-navbar-static", deviceLayout: "rd-navbar-fixed", focusOnHover: !0, focusOnHoverTimeout: 800, linkedElements: ["html"], domAppend: !0, stickUp: !0, stickUpClone: !0, stickUpOffset: "100%", anchorNav: !0, anchorNavSpeed: 400, anchorNavOffset: 0, anchorNavEasing: "swing", autoHeight: !0, responsive: { 0: { layout: "rd-navbar-fixed", deviceLayout: "rd-navbar-fixed", focusOnHover: !1, stickUp: !1 }, 992: { layout: "rd-navbar-static", deviceLayout: "rd-navbar-static", focusOnHover: !0, stickUp: !0 } }, callbacks: { onToggleSwitch: !1, onToggleClose: !1, onDomAppend: !1, onDropdownOver: !1, onDropdownOut: !1, onDropdownToggle: !1, onDropdownClose: !1, onStuck: !1, onUnstuck: !1, onAnchorChange: !1 } }, a.prototype.initialize = function () { var n; return (n = this).$element.addClass("rd-navbar").addClass(n.options.layout), t && n.$element.addClass("rd-navbar--is-touch"), n.options.domAppend && n.createNav(n), n.options.stickUpClone && n.createClone(n), n.$element.addClass("rd-navbar-original"), n.addAdditionalClassToToggles(".rd-navbar-original", "toggle-original", "toggle-original-elements"), n.applyHandlers(n), n.offset = n.$element.offset().top, n.height = n.$element.outerHeight(), n.loaded = !0, n }, a.prototype.resize = function (o, e) { var a, s; return s = t ? o.getOption("deviceLayout") : o.getOption("layout"), a = o.$element.add(o.$clone), s === o.currentLayout && o.loaded || (o.switchClass(a, o.currentLayout, s), null != o.options.linkedElements && n.grep(o.options.linkedElements, function (t, n) { return o.switchClass(t, o.currentLayout + "-linked", s + "-linked") }), o.currentLayout = s), o.focusOnHover = o.getOption("focusOnHover"), o }, a.prototype.stickUp = function (t, o) { function e() { "resize" === o.type ? t.switchClass(i, "", "rd-navbar--is-stuck") : i.addClass("rd-navbar--is-stuck"), t.isStuck = !0 } var a, s, r, i, l; return s = t.getOption("stickUp"), (n("html").hasClass("ios") || t.$element.hasClass("rd-navbar-fixed")) && (s = !1), a = t.$doc.scrollTop(), i = null != t.$clone ? t.$clone : t.$element, r = t.getOption("stickUpOffset"), l = "string" == typeof r ? r.indexOf("%") > 0 ? parseFloat(r) * t.height / 100 : parseFloat(r) : r, s ? (a >= l && !t.isStuck || a < l && t.isStuck) && (t.$element.add(t.$clone).find("[data-rd-navbar-toggle]").each(function () { n.proxy(t.closeToggle, this)(t, !1) }).end().find(".rd-navbar-submenu").removeClass("opened").removeClass("focus"), a >= l && !t.isStuck && !t.$element.hasClass("rd-navbar-fixed") ? (t.options.callbacks.onStuck && t.options.callbacks.onStuck.call(t), navigator.platform.match(/(Mac)/i) ? setTimeout(e, 10) : e()) : ("resize" === o.type ? t.switchClass(i, "rd-navbar--is-stuck", "") : i.removeClass("rd-navbar--is-stuck").one("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd", n.proxy(t.resizeWrap, t, o)), t.isStuck = !1, t.options.callbacks.onUnstuck && t.options.callbacks.onUnstuck.call(t))) : (t.$element.find(".rd-navbar-submenu").removeClass("opened").removeClass("focus"), t.isStuck && (t.switchClass(i, "rd-navbar--is-stuck", ""), t.isStuck = !1, t.resizeWrap(o))), t }, a.prototype.resizeWrap = function (t) { var n, o; if (null == (o = this).$clone && !o.isStuck) return n = o.$element.parent(), o.getOption("autoHeight") ? (o.height = o.$element.outerHeight(), "resize" === t.type ? (n.addClass("rd-navbar--no-transition").css("height", o.height), n[0].offsetHeight, n.removeClass("rd-navbar--no-transition")) : n.css("height", o.height)) : void n.css("height", "auto") }, a.prototype.createNav = function (t) { return t.$element.find(".rd-navbar-dropdown, .rd-navbar-megamenu").each(function () { var t; return t = n(this), this.getBoundingClientRect(), t.hasClass("rd-navbar-megamenu") ? t.parent().addClass("rd-navbar--has-megamenu") : t.parent().addClass("rd-navbar--has-dropdown") }).parents("li").addClass("rd-navbar-submenu"), n('<span class="rd-navbar-submenu-toggle"></span>').insertAfter(".rd-navbar-nav li.rd-navbar-submenu > a"), t.options.callbacks.onDomAppend && t.options.callbacks.onDomAppend.call(this), t }, a.prototype.createClone = function (t) { return t.$clone = t.$element.clone().insertAfter(t.$element).addClass("rd-navbar--is-clone"), t.addAdditionalClassToToggles(".rd-navbar--is-clone", "toggle-cloned", "toggle-cloned-elements"), t }, a.prototype.closeToggle = function (t, o) { var e, a, s, r, i, l, c; return a = n(o.target), i = !1, l = this.getAttribute("data-rd-navbar-toggle"), t.options.stickUpClone && t.isStuck ? (r = ".toggle-cloned", s = ".toggle-cloned-elements", c = !a.hasClass("toggle-cloned")) : (r = ".toggle-original", s = ".toggle-original-elements", c = !a.hasClass("toggle-original")), o.target !== this && !a.parents(r + "[data-rd-navbar-toggle]").length && !a.parents(s).length && l && c && ((e = n(this).parents("body").find(l).add(n(this).parents(".rd-navbar")[0])).each(function () { if (!i) return i = !0 === (o.target === this || n.contains(this, o.target)) }), i || (e.add(this).removeClass("active"), t.options.callbacks.onToggleClose && t.options.callbacks.onToggleClose.call(this, t))), this }, a.prototype.switchToggle = function (t, o) { var e, a, s; return o.preventDefault(), n(this).hasClass("toggle-cloned") ? (s = ".rd-navbar--is-clone", e = ".toggle-cloned-elements") : (s = ".rd-navbar-original", e = ".toggle-original-elements"), (a = this.getAttribute("data-rd-navbar-toggle")) && (n(s + " [data-rd-navbar-toggle]").not(this).each(function () { var t; if (t = this.getAttribute("data-rd-navbar-toggle")) return n(this).parents("body").find(s + " " + t + e).add(this).add(n.inArray(".rd-navbar", t.split(/\s*,\s*/i)) > -1 && n(this).parents("body")[0]).removeClass("active") }), n(this).parents("body").find(s + " " + a + e).add(this).add(n.inArray(".rd-navbar", a.split(/\s*,\s*/i)) > -1 && n(this).parents(".rd-navbar")[0]).toggleClass("active")), t.options.callbacks.onToggleSwitch && t.options.callbacks.onToggleSwitch.call(this, t), this }, a.prototype.dropdownOver = function (t, o) { var e; if (t.focusOnHover) { if (e = n(this), clearTimeout(o), t.options.callbacks.onDropdownOver && !t.options.callbacks.onDropdownOver.call(this, t)) return this; e.addClass("focus").siblings().removeClass("opened").each(t.dropdownUnfocus) } return this }, a.prototype.dropdownTouch = function (t, o) { var e, a; if (e = n(this), clearTimeout(o), t.focusOnHover) { if (a = !1, e.hasClass("focus") && (a = !0), !a) return e.addClass("focus").siblings().removeClass("opened").each(t.dropdownUnfocus), !1; t.options.callbacks.onDropdownOver && t.options.callbacks.onDropdownOver.call(this, t) } return this }, a.prototype.dropdownOut = function (t, o) { return t.focusOnHover && (n(this).one("mouseenter.navbar", function () { return clearTimeout(o) }), t.options.callbacks.onDropdownOut && t.options.callbacks.onDropdownOut.call(this, t), clearTimeout(o), o = setTimeout(n.proxy(t.dropdownUnfocus, this, t), t.options.focusOnHoverTimeout)), this }, a.prototype.dropdownUnfocus = function (t) { return n(this).find("li.focus").add(this).removeClass("focus"), this }, a.prototype.dropdownClose = function (t, o) { return o.target === this || n(o.target).parents(".rd-navbar-submenu").length || (n(this).find("li.focus").add(this).removeClass("focus").removeClass("opened"), t.options.callbacks.onDropdownClose && t.options.callbacks.onDropdownClose.call(this, t)), this }, a.prototype.dropdownToggle = function (t) { return n(this).toggleClass("opened").siblings().removeClass("opened"), t.options.callbacks.onDropdownToggle && t.options.callbacks.onDropdownToggle.call(this, t), this }, a.prototype.goToAnchor = function (t, o) { var e, a; return a = this.hash, e = n(a), !!t.getOption("anchorNav") && (e.length && (o.preventDefault(), n("html, body").stop().animate({ scrollTop: e.offset().top + t.getOption("anchorNavOffset") + 1 }, t.getOption("anchorNavSpeed"), t.getOption("anchorNavEasing"), function () { return t.changeAnchor(a) })), this) }, a.prototype.activateAnchor = function (t) { var o, e, a, s, r, i, l, c, d, p, u, h; if (s = this, u = s.$doc.scrollTop(), h = s.$win.height(), r = s.$doc.height(), p = s.getOption("anchorNavOffset"), !s.options.anchorNav) return !1; if (u + h > r - 50) return (o = n('[data-type="anchor"]').last()).length && o.offset().top >= u && (i = "#" + o.attr("id"), (e = n('.rd-navbar-nav a[href^="' + i + '"]').parent()).hasClass("active") || (e.addClass("active").siblings().removeClass("active"), s.options.callbacks.onAnchorChange && s.options.callbacks.onAnchorChange.call(o[0], s))), o; d = n('.rd-navbar-nav a[href^="#"]').get(); for (l in d) c = d[l], i = (a = n(c)).attr("href"), (o = n(i)).length && o.offset().top + p <= u && o.offset().top + o.outerHeight() > u && (a.parent().addClass("active").siblings().removeClass("active"), s.options.callbacks.onAnchorChange && s.options.callbacks.onAnchorChange.call(o[0], s)); return null }, a.prototype.getAnchor = function () { return history && history.state ? history.state.id : null }, a.prototype.changeAnchor = function (t) { return history && (history.state && history.state.id !== t ? history.replaceState({ anchorId: t }, null, t) : history.pushState({ anchorId: t }, null, t)), this }, a.prototype.applyHandlers = function (t) { return null != t.options.responsive && t.$win.on("resize.navbar", n.proxy(t.resize, t.$win[0], t)).on("resize.navbar", n.proxy(t.resizeWrap, t)).on("resize.navbar", n.proxy(t.stickUp, null != t.$clone ? t.$clone : t.$element, t)).on("orientationchange.navbar", n.proxy(t.resize, t.$win[0], t)).trigger("resize.navbar"), t.$doc.on("scroll.navbar", n.proxy(t.stickUp, null != t.$clone ? t.$clone : t.$element, t)).on("scroll.navbar", n.proxy(t.activateAnchor, t)), t.$element.add(t.$clone).find("[data-rd-navbar-toggle]").each(function () { var o; return (o = n(this)).on("click", n.proxy(t.switchToggle, this, t)), o.parents("body").on("click", n.proxy(t.closeToggle, this, t)) }), t.$element.add(t.$clone).find(".rd-navbar-submenu").each(function () { var o, e; return o = n(this), e = o.parents(".rd-navbar--is-clone").length ? t.cloneTimer : t.focusTimer, o.on("mouseleave.navbar", n.proxy(t.dropdownOut, this, t, e)), o.find("> a").on("mouseenter.navbar", n.proxy(t.dropdownOver, this, t, e)), o.find("> a").on("touchstart.navbar", n.proxy(t.dropdownTouch, this, t, e)), o.find("> .rd-navbar-submenu-toggle").on("click", n.proxy(t.dropdownToggle, this, t)), o.parents("body").on("click", n.proxy(t.dropdownClose, this, t)) }), t.$element.add(t.$clone).find('.rd-navbar-nav a[href^="#"]').each(function () { return n(this).on("click", n.proxy(t.goToAnchor, this, t)) }), t.$element.find(".rd-navbar-dropdown, .rd-navbar-megamenu").each(function () { var t, o; t = n(this), (o = this.getBoundingClientRect()).left + t.outerWidth() >= e.innerWidth - 10 ? this.className += " rd-navbar-open-left" : o.left - t.outerWidth() <= 10 && (this.className += " rd-navbar-open-right") }), t }, a.prototype.switchClass = function (t, o, e) { var a; return (a = t instanceof jQuery ? t : n(t)).addClass("rd-navbar--no-transition").removeClass(o).addClass(e), a[0].offsetHeight, a.removeClass("rd-navbar--no-transition") }, a.prototype.getOption = function (t) { var n, o; for (n in this.options.responsive) n <= e.innerWidth && (o = n); return null != this.options.responsive && null != this.options.responsive[o][t] ? this.options.responsive[o][t] : this.options[t] }, a.prototype.addAdditionalClassToToggles = function (t, o, e) { return n(t).find("[data-rd-navbar-toggle]").each(function () { var a; return n(this).addClass(o), a = this.getAttribute("data-rd-navbar-toggle"), n(this).parents("body").find(t).find(a).addClass(e) }) }, a }(), n.fn.extend({ RDNavbar: function (t) { var o; if (!(o = n(this)).data("RDNavbar")) return o.data("RDNavbar", new a(this, t)) } }), e.RDNavbar = a }(window.jQuery, document, window), "undefined" != typeof module && null !== module ? module.exports = window.RDNavbar : "function" == typeof define && define.amd && define(["jquery"], function () { "use strict"; return window.RDNavbar }) }).call(this);
/**
* @module UIToTop
* @author Matt Varone
* @see http://www.mattvarone.com/web-design/uitotop-jquery-plugin/
* @license MIT
*/
!function (o) { o.fn.UItoTop = function (n) { var e = { text: "", min: 500, scrollSpeed: 800, containerID: "ui-to-top", containerClass: "ui-to-top fa fa-angle-up", easingType: "easeIn" }, t = o.extend(e, n), i = "#" + t.containerID; o("body").append('<a href="#" id="' + t.containerID + '" class="' + t.containerClass + '" >' + t.text + "</a>"), o(i).click(function () { return o("html, body").stop().animate({ scrollTop: 0 }, t.scrollSpeed, t.easingType), !1 }), o(window).scroll(function () { var n = o(window).scrollTop(); "undefined" == typeof document.body.style.maxHeight && o(i).css({ position: "absolute", top: o(window).scrollTop() + o(window).height() - 50 }), n > t.min ? o(i).stop(!0, !0).addClass("active") : o(i).removeClass("active") }) } }(jQuery);
/**
* @module Materianize Parallax
* @see http://materializecss.com/parallax-demo.html
* @licesne MIT
*/
!function (i) { i.fn.parallax = function () { var a = i(window).width(); return this.each(function (t) { function n(t) { var n; n = a < 601 ? r.height() > 0 ? r.height() : r.children("img").height() : r.height() > 0 ? r.height() : 500; var e = r.children("img").first(), l = e.height() - n, o = r.offset().top + n, h = r.offset().top, d = i(window).scrollTop(), s = window.innerHeight, c = (d + s - h) / (n + s), g = Math.round(l * c); t && e.css("display", "block"), o > d && h < d + s && e.css("transform", "translate3D(-50%," + g + "px, 0)") } var r = i(this).prepend('<div class="material-parallax parallax"><img src="images/_blank.png" alt=""></div>').find(".material-parallax"); r.children("img").first().attr("src", r.parents("[data-parallax-img]").data("parallax-img")), r.children("img").one("load", function () { n(!0) }).each(function () { this.complete && i(this).trigger("load") }), i(window).scroll(function () { a = i(window).width(), n(!1) }), i(window).resize(function () { a = i(window).width(), n(!1) }) }) } }(jQuery);
/**
* @module Swiper
* @description Most modern mobile touch slider and framework with hardware accelerated transitions
* @author Vladimir Kharlampidi
* @see http://www.idangero.us/swiper/
* @licesne MIT
* @version 4.1.0
*/
!function (e, t) { "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : e.Swiper = t() }(this, function () { "use strict"; var e = function (e) { for (var t = 0; t < e.length; t += 1)this[t] = e[t]; return this.length = e.length, this }; function t(t, i) { var s = [], a = 0; if (t && !i && t instanceof e) return t; if (t) if ("string" == typeof t) { var r, n, o = t.trim(); if (o.indexOf("<") >= 0 && o.indexOf(">") >= 0) { var l = "div"; for (0 === o.indexOf("<li") && (l = "ul"), 0 === o.indexOf("<tr") && (l = "tbody"), 0 !== o.indexOf("<td") && 0 !== o.indexOf("<th") || (l = "tr"), 0 === o.indexOf("<tbody") && (l = "table"), 0 === o.indexOf("<option") && (l = "select"), (n = document.createElement(l)).innerHTML = o, a = 0; a < n.childNodes.length; a += 1)s.push(n.childNodes[a]) } else for (r = i || "#" !== t[0] || t.match(/[ .<>:~]/) ? (i || document).querySelectorAll(t.trim()) : [document.getElementById(t.trim().split("#")[1])], a = 0; a < r.length; a += 1)r[a] && s.push(r[a]) } else if (t.nodeType || t === window || t === document) s.push(t); else if (t.length > 0 && t[0].nodeType) for (a = 0; a < t.length; a += 1)s.push(t[a]); return new e(s) } function i(e) { for (var t = [], i = 0; i < e.length; i += 1)-1 === t.indexOf(e[i]) && t.push(e[i]); return t } t.fn = e.prototype, t.Class = e, t.Dom7 = e; "resize scroll".split(" "); var s = { addClass: function (e) { if (void 0 === e) return this; for (var t = e.split(" "), i = 0; i < t.length; i += 1)for (var s = 0; s < this.length; s += 1)void 0 !== this[s].classList && this[s].classList.add(t[i]); return this }, removeClass: function (e) { for (var t = e.split(" "), i = 0; i < t.length; i += 1)for (var s = 0; s < this.length; s += 1)void 0 !== this[s].classList && this[s].classList.remove(t[i]); return this }, hasClass: function (e) { return !!this[0] && this[0].classList.contains(e) }, toggleClass: function (e) { for (var t = e.split(" "), i = 0; i < t.length; i += 1)for (var s = 0; s < this.length; s += 1)void 0 !== this[s].classList && this[s].classList.toggle(t[i]); return this }, attr: function (e, t) { var i = arguments; if (1 === arguments.length && "string" == typeof e) return this[0] ? this[0].getAttribute(e) : void 0; for (var s = 0; s < this.length; s += 1)if (2 === i.length) this[s].setAttribute(e, t); else for (var a in e) this[s][a] = e[a], this[s].setAttribute(a, e[a]); return this }, removeAttr: function (e) { for (var t = 0; t < this.length; t += 1)this[t].removeAttribute(e); return this }, data: function (e, t) { var i; if (void 0 !== t) { for (var s = 0; s < this.length; s += 1)(i = this[s]).dom7ElementDataStorage || (i.dom7ElementDataStorage = {}), i.dom7ElementDataStorage[e] = t; return this } if (i = this[0]) { if (i.dom7ElementDataStorage && e in i.dom7ElementDataStorage) return i.dom7ElementDataStorage[e]; var a = i.getAttribute("data-" + e); return a || void 0 } }, transform: function (e) { for (var t = 0; t < this.length; t += 1) { var i = this[t].style; i.webkitTransform = e, i.transform = e } return this }, transition: function (e) { "string" != typeof e && (e += "ms"); for (var t = 0; t < this.length; t += 1) { var i = this[t].style; i.webkitTransitionDuration = e, i.transitionDuration = e } return this }, on: function () { for (var e = [], i = arguments.length; i--;)e[i] = arguments[i]; var s, a = e[0], r = e[1], n = e[2], o = e[3]; function l(e) { var i = e.target; if (i) { var s = e.target.dom7EventData || []; if (s.unshift(e), t(i).is(r)) n.apply(i, s); else for (var a = t(i).parents(), o = 0; o < a.length; o += 1)t(a[o]).is(r) && n.apply(a[o], s) } } function d(e) { var t = e && e.target ? e.target.dom7EventData || [] : []; t.unshift(e), n.apply(this, t) } "function" == typeof e[1] && (a = (s = e)[0], n = s[1], o = s[2], r = void 0), o || (o = !1); for (var h, p = a.split(" "), c = 0; c < this.length; c += 1) { var u = this[c]; if (r) for (h = 0; h < p.length; h += 1)u.dom7LiveListeners || (u.dom7LiveListeners = []), u.dom7LiveListeners.push({ type: a, listener: n, proxyListener: l }), u.addEventListener(p[h], l, o); else for (h = 0; h < p.length; h += 1)u.dom7Listeners || (u.dom7Listeners = []), u.dom7Listeners.push({ type: a, listener: n, proxyListener: d }), u.addEventListener(p[h], d, o) } return this }, off: function () { for (var e = [], t = arguments.length; t--;)e[t] = arguments[t]; var i, s = e[0], a = e[1], r = e[2], n = e[3]; "function" == typeof e[1] && (s = (i = e)[0], r = i[1], n = i[2], a = void 0), n || (n = !1); for (var o = s.split(" "), l = 0; l < o.length; l += 1)for (var d = 0; d < this.length; d += 1) { var h = this[d]; if (a) { if (h.dom7LiveListeners) for (var p = 0; p < h.dom7LiveListeners.length; p += 1)r ? h.dom7LiveListeners[p].listener === r && h.removeEventListener(o[l], h.dom7LiveListeners[p].proxyListener, n) : h.dom7LiveListeners[p].type === o[l] && h.removeEventListener(o[l], h.dom7LiveListeners[p].proxyListener, n) } else if (h.dom7Listeners) for (var c = 0; c < h.dom7Listeners.length; c += 1)r ? h.dom7Listeners[c].listener === r && h.removeEventListener(o[l], h.dom7Listeners[c].proxyListener, n) : h.dom7Listeners[c].type === o[l] && h.removeEventListener(o[l], h.dom7Listeners[c].proxyListener, n) } return this }, trigger: function () { for (var e = [], t = arguments.length; t--;)e[t] = arguments[t]; for (var i = e[0].split(" "), s = e[1], a = 0; a < i.length; a += 1)for (var r = 0; r < this.length; r += 1) { var n = void 0; try { n = new window.CustomEvent(i[a], { detail: s, bubbles: !0, cancelable: !0 }) } catch (e) { (n = document.createEvent("Event")).initEvent(i[a], !0, !0), n.detail = s } this[r].dom7EventData = e.filter(function (e, t) { return t > 0 }), this[r].dispatchEvent(n), this[r].dom7EventData = [], delete this[r].dom7EventData } return this }, transitionEnd: function (e) { var t, i = ["webkitTransitionEnd", "transitionend"], s = this; function a(r) { if (r.target === this) for (e.call(this, r), t = 0; t < i.length; t += 1)s.off(i[t], a) } if (e) for (t = 0; t < i.length; t += 1)s.on(i[t], a); return this }, outerWidth: function (e) { if (this.length > 0) { if (e) { var t = this.styles(); return this[0].offsetWidth + parseFloat(t.getPropertyValue("margin-right")) + parseFloat(t.getPropertyValue("margin-left")) } return this[0].offsetWidth } return null }, outerHeight: function (e) { if (this.length > 0) { if (e) { var t = this.styles(); return this[0].offsetHeight + parseFloat(t.getPropertyValue("margin-top")) + parseFloat(t.getPropertyValue("margin-bottom")) } return this[0].offsetHeight } return null }, offset: function () { if (this.length > 0) { var e = this[0], t = e.getBoundingClientRect(), i = document.body, s = e.clientTop || i.clientTop || 0, a = e.clientLeft || i.clientLeft || 0, r = e === window ? window.scrollY : e.scrollTop, n = e === window ? window.scrollX : e.scrollLeft; return { top: t.top + r - s, left: t.left + n - a } } return null }, css: function (e, t) { var i; if (1 === arguments.length) { if ("string" != typeof e) { for (i = 0; i < this.length; i += 1)for (var s in e) this[i].style[s] = e[s]; return this } if (this[0]) return window.getComputedStyle(this[0], null).getPropertyValue(e) } if (2 === arguments.length && "string" == typeof e) { for (i = 0; i < this.length; i += 1)this[i].style[e] = t; return this } return this }, each: function (e) { if (!e) return this; for (var t = 0; t < this.length; t += 1)if (!1 === e.call(this[t], t, this[t])) return this; return this }, html: function (e) { if (void 0 === e) return this[0] ? this[0].innerHTML : void 0; for (var t = 0; t < this.length; t += 1)this[t].innerHTML = e; return this }, text: function (e) { if (void 0 === e) return this[0] ? this[0].textContent.trim() : null; for (var t = 0; t < this.length; t += 1)this[t].textContent = e; return this }, is: function (i) { var s, a, r = this[0]; if (!r || void 0 === i) return !1; if ("string" == typeof i) { if (r.matches) return r.matches(i); if (r.webkitMatchesSelector) return r.webkitMatchesSelector(i); if (r.msMatchesSelector) return r.msMatchesSelector(i); for (s = t(i), a = 0; a < s.length; a += 1)if (s[a] === r) return !0; return !1 } if (i === document) return r === document; if (i === window) return r === window; if (i.nodeType || i instanceof e) { for (s = i.nodeType ? [i] : i, a = 0; a < s.length; a += 1)if (s[a] === r) return !0; return !1 } return !1 }, index: function () { var e, t = this[0]; if (t) { for (e = 0; null !== (t = t.previousSibling);)1 === t.nodeType && (e += 1); return e } }, eq: function (t) { if (void 0 === t) return this; var i, s = this.length; return new e(t > s - 1 ? [] : t < 0 ? (i = s + t) < 0 ? [] : [this[i]] : [this[t]]) }, append: function () { for (var t, i = [], s = arguments.length; s--;)i[s] = arguments[s]; for (var a = 0; a < i.length; a += 1) { t = i[a]; for (var r = 0; r < this.length; r += 1)if ("string" == typeof t) { var n = document.createElement("div"); for (n.innerHTML = t; n.firstChild;)this[r].appendChild(n.firstChild) } else if (t instanceof e) for (var o = 0; o < t.length; o += 1)this[r].appendChild(t[o]); else this[r].appendChild(t) } return this }, prepend: function (t) { var i, s; for (i = 0; i < this.length; i += 1)if ("string" == typeof t) { var a = document.createElement("div"); for (a.innerHTML = t, s = a.childNodes.length - 1; s >= 0; s -= 1)this[i].insertBefore(a.childNodes[s], this[i].childNodes[0]) } else if (t instanceof e) for (s = 0; s < t.length; s += 1)this[i].insertBefore(t[s], this[i].childNodes[0]); else this[i].insertBefore(t, this[i].childNodes[0]); return this }, next: function (i) { return this.length > 0 ? i ? this[0].nextElementSibling && t(this[0].nextElementSibling).is(i) ? new e([this[0].nextElementSibling]) : new e([]) : this[0].nextElementSibling ? new e([this[0].nextElementSibling]) : new e([]) : new e([]) }, nextAll: function (i) { var s = [], a = this[0]; if (!a) return new e([]); for (; a.nextElementSibling;) { var r = a.nextElementSibling; i ? t(r).is(i) && s.push(r) : s.push(r), a = r } return new e(s) }, prev: function (i) { if (this.length > 0) { var s = this[0]; return i ? s.previousElementSibling && t(s.previousElementSibling).is(i) ? new e([s.previousElementSibling]) : new e([]) : s.previousElementSibling ? new e([s.previousElementSibling]) : new e([]) } return new e([]) }, prevAll: function (i) { var s = [], a = this[0]; if (!a) return new e([]); for (; a.previousElementSibling;) { var r = a.previousElementSibling; i ? t(r).is(i) && s.push(r) : s.push(r), a = r } return new e(s) }, parent: function (e) { for (var s = [], a = 0; a < this.length; a += 1)null !== this[a].parentNode && (e ? t(this[a].parentNode).is(e) && s.push(this[a].parentNode) : s.push(this[a].parentNode)); return t(i(s)) }, parents: function (e) { for (var s = [], a = 0; a < this.length; a += 1)for (var r = this[a].parentNode; r;)e ? t(r).is(e) && s.push(r) : s.push(r), r = r.parentNode; return t(i(s)) }, closest: function (t) { var i = this; return void 0 === t ? new e([]) : (i.is(t) || (i = i.parents(t).eq(0)), i) }, find: function (t) { for (var i = [], s = 0; s < this.length; s += 1)for (var a = this[s].querySelectorAll(t), r = 0; r < a.length; r += 1)i.push(a[r]); return new e(i) }, children: function (s) { for (var a = [], r = 0; r < this.length; r += 1)for (var n = this[r].childNodes, o = 0; o < n.length; o += 1)s ? 1 === n[o].nodeType && t(n[o]).is(s) && a.push(n[o]) : 1 === n[o].nodeType && a.push(n[o]); return new e(i(a)) }, remove: function () { for (var e = 0; e < this.length; e += 1)this[e].parentNode && this[e].parentNode.removeChild(this[e]); return this }, add: function () { for (var e = [], i = arguments.length; i--;)e[i] = arguments[i]; var s, a; for (s = 0; s < e.length; s += 1) { var r = t(e[s]); for (a = 0; a < r.length; a += 1)this[this.length] = r[a], this.length += 1 } return this }, styles: function () { return this[0] ? window.getComputedStyle(this[0], null) : {} } }; Object.keys(s).forEach(function (e) { t.fn[e] = s[e] }); var a, r, n, o = "undefined" == typeof window ? { navigator: { userAgent: "" }, location: {}, history: {}, addEventListener: function () { }, removeEventListener: function () { }, getComputedStyle: function () { return {} }, Image: function () { }, Date: function () { }, screen: {} } : window, l = { deleteProps: function (e) { var t = e; Object.keys(t).forEach(function (e) { try { t[e] = null } catch (e) { } try { delete t[e] } catch (e) { } }) }, nextTick: function (e, t) { return void 0 === t && (t = 0), setTimeout(e, t) }, now: function () { return Date.now() }, getTranslate: function (e, t) { var i, s, a; void 0 === t && (t = "x"); var r = o.getComputedStyle(e, null); return o.WebKitCSSMatrix ? ((s = r.transform || r.webkitTransform).split(",").length > 6 && (s = s.split(", ").map(function (e) { return e.replace(",", ".") }).join(", ")), a = new o.WebKitCSSMatrix("none" === s ? "" : s)) : i = (a = r.MozTransform || r.OTransform || r.MsTransform || r.msTransform || r.transform || r.getPropertyValue("transform").replace("translate(", "matrix(1, 0, 0, 1,")).toString().split(","), "x" === t && (s = o.WebKitCSSMatrix ? a.m41 : 16 === i.length ? parseFloat(i[12]) : parseFloat(i[4])), "y" === t && (s = o.WebKitCSSMatrix ? a.m42 : 16 === i.length ? parseFloat(i[13]) : parseFloat(i[5])), s || 0 }, parseUrlQuery: function (e) { var t, i, s, a, r = {}, n = e || o.location.href; if ("string" == typeof n && n.length) for (a = (i = (n = n.indexOf("?") > -1 ? n.replace(/\S*\?/, "") : "").split("&").filter(function (e) { return "" !== e })).length, t = 0; t < a; t += 1)s = i[t].replace(/#\S+/g, "").split("="), r[decodeURIComponent(s[0])] = void 0 === s[1] ? void 0 : decodeURIComponent(s[1]) || ""; return r }, isObject: function (e) { return "object" == typeof e && null !== e && e.constructor && e.constructor === Object }, extend: function () { for (var e = [], t = arguments.length; t--;)e[t] = arguments[t]; for (var i = Object(e[0]), s = 1; s < e.length; s += 1) { var a = e[s]; if (void 0 !== a && null !== a) for (var r = Object.keys(Object(a)), n = 0, o = r.length; n < o; n += 1) { var d = r[n], h = Object.getOwnPropertyDescriptor(a, d); void 0 !== h && h.enumerable && (l.isObject(i[d]) && l.isObject(a[d]) ? l.extend(i[d], a[d]) : !l.isObject(i[d]) && l.isObject(a[d]) ? (i[d] = {}, l.extend(i[d], a[d])) : i[d] = a[d]) } } return i } }, d = "undefined" == typeof document ? { addEventListener: function () { }, removeEventListener: function () { }, activeElement: { blur: function () { }, nodeName: "" }, querySelector: function () { return {} }, querySelectorAll: function () { return [] }, createElement: function () { return { style: {}, setAttribute: function () { }, getElementsByTagName: function () { return [] } } }, location: { hash: "" } } : document, h = (n = d.createElement("div"), { touch: o.Modernizr && !0 === o.Modernizr.touch || !!("ontouchstart" in o || o.DocumentTouch && d instanceof o.DocumentTouch), pointerEvents: !(!o.navigator.pointerEnabled && !o.PointerEvent), prefixedPointerEvents: !!o.navigator.msPointerEnabled, transition: (r = n.style, "transition" in r || "webkitTransition" in r || "MozTransition" in r), transforms3d: o.Modernizr && !0 === o.Modernizr.csstransforms3d || (a = n.style, "webkitPerspective" in a || "MozPerspective" in a || "OPerspective" in a || "MsPerspective" in a || "perspective" in a), flexbox: function () { for (var e = n.style, t = "alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient".split(" "), i = 0; i < t.length; i += 1)if (t[i] in e) return !0; return !1 }(), observer: "MutationObserver" in o || "WebkitMutationObserver" in o, passiveListener: function () { var e = !1; try { var t = Object.defineProperty({}, "passive", { get: function () { e = !0 } }); o.addEventListener("testPassiveListener", null, t) } catch (e) { } return e }(), gestures: "ongesturestart" in o }), p = function (e) { void 0 === e && (e = {}); var t = this; t.params = e, t.eventsListeners = {}, t.params && t.params.on && Object.keys(t.params.on).forEach(function (e) { t.on(e, t.params.on[e]) }) }, c = { components: { configurable: !0 } }; p.prototype.on = function (e, t) { var i = this; return "function" != typeof t ? i : (e.split(" ").forEach(function (e) { i.eventsListeners[e] || (i.eventsListeners[e] = []), i.eventsListeners[e].push(t) }), i) }, p.prototype.once = function (e, t) { var i = this; if ("function" != typeof t) return i; return i.on(e, function s() { for (var a = [], r = arguments.length; r--;)a[r] = arguments[r]; t.apply(i, a), i.off(e, s) }) }, p.prototype.off = function (e, t) { var i = this; return e.split(" ").forEach(function (e) { void 0 === t ? i.eventsListeners[e] = [] : i.eventsListeners[e].forEach(function (s, a) { s === t && i.eventsListeners[e].splice(a, 1) }) }), i }, p.prototype.emit = function () { for (var e = [], t = arguments.length; t--;)e[t] = arguments[t]; var i, s, a, r = this; return r.eventsListeners ? ("string" == typeof e[0] || Array.isArray(e[0]) ? (i = e[0], s = e.slice(1, e.length), a = r) : (i = e[0].events, s = e[0].data, a = e[0].context || r), (Array.isArray(i) ? i : i.split(" ")).forEach(function (e) { if (r.eventsListeners[e]) { var t = []; r.eventsListeners[e].forEach(function (e) { t.push(e) }), t.forEach(function (e) { e.apply(a, s) }) } }), r) : r }, p.prototype.useModulesParams = function (e) { var t = this; t.modules && Object.keys(t.modules).forEach(function (i) { var s = t.modules[i]; s.params && l.extend(e, s.params) }) }, p.prototype.useModules = function (e) { void 0 === e && (e = {}); var t = this; t.modules && Object.keys(t.modules).forEach(function (i) { var s = t.modules[i], a = e[i] || {}; s.instance && Object.keys(s.instance).forEach(function (e) { var i = s.instance[e]; t[e] = "function" == typeof i ? i.bind(t) : i }), s.on && t.on && Object.keys(s.on).forEach(function (e) { t.on(e, s.on[e]) }), s.create && s.create.bind(t)(a) }) }, c.components.set = function (e) { this.use && this.use(e) }, p.installModule = function (e) { for (var t = [], i = arguments.length - 1; i-- > 0;)t[i] = arguments[i + 1]; var s = this; s.prototype.modules || (s.prototype.modules = {}); var a = e.name || Object.keys(s.prototype.modules).length + "_" + l.now(); return s.prototype.modules[a] = e, e.proto && Object.keys(e.proto).forEach(function (t) { s.prototype[t] = e.proto[t] }), e.static && Object.keys(e.static).forEach(function (t) { s[t] = e.static[t] }), e.install && e.install.apply(s, t), s }, p.use = function (e) { for (var t = [], i = arguments.length - 1; i-- > 0;)t[i] = arguments[i + 1]; var s = this; return Array.isArray(e) ? (e.forEach(function (e) { return s.installModule(e) }), s) : s.installModule.apply(s, [e].concat(t)) }, Object.defineProperties(p, c); var u = { updateSize: function () { var e, t, i = this.$el; e = void 0 !== this.params.width ? this.params.width : i[0].clientWidth, t = void 0 !== this.params.height ? this.params.height : i[0].clientHeight, 0 === e && this.isHorizontal() || 0 === t && this.isVertical() || (e = e - parseInt(i.css("padding-left"), 10) - parseInt(i.css("padding-right"), 10), t = t - parseInt(i.css("padding-top"), 10) - parseInt(i.css("padding-bottom"), 10), l.extend(this, { width: e, height: t, size: this.isHorizontal() ? e : t })) }, updateSlides: function () { var e = this.params, t = this.$wrapperEl, i = this.size, s = this.rtl, a = this.wrongRTL, r = t.children("." + this.params.slideClass), n = this.virtual && e.virtual.enabled ? this.virtual.slides.length : r.length, o = [], d = [], p = [], c = e.slidesOffsetBefore; "function" == typeof c && (c = e.slidesOffsetBefore.call(this)); var u = e.slidesOffsetAfter; "function" == typeof u && (u = e.slidesOffsetAfter.call(this)); var f = n, v = this.snapGrid.length, m = this.snapGrid.length, g = e.spaceBetween, b = -c, w = 0, y = 0; if (void 0 !== i) { var x, T; "string" == typeof g && g.indexOf("%") >= 0 && (g = parseFloat(g.replace("%", "")) / 100 * i), this.virtualSize = -g, s ? r.css({ marginLeft: "", marginTop: "" }) : r.css({ marginRight: "", marginBottom: "" }), e.slidesPerColumn > 1 && (x = Math.floor(n / e.slidesPerColumn) === n / this.params.slidesPerColumn ? n : Math.ceil(n / e.slidesPerColumn) * e.slidesPerColumn, "auto" !== e.slidesPerView && "row" === e.slidesPerColumnFill && (x = Math.max(x, e.slidesPerView * e.slidesPerColumn))); for (var E, S = e.slidesPerColumn, C = x / S, M = C - (e.slidesPerColumn * C - n), z = 0; z < n; z += 1) { T = 0; var P = r.eq(z); if (e.slidesPerColumn > 1) { var k = void 0, $ = void 0, L = void 0; "column" === e.slidesPerColumnFill ? (L = z - ($ = Math.floor(z / S)) * S, ($ > M || $ === M && L === S - 1) && (L += 1) >= S && (L = 0, $ += 1), k = $ + L * x / S, P.css({ "-webkit-box-ordinal-group": k, "-moz-box-ordinal-group": k, "-ms-flex-order": k, "-webkit-order": k, order: k })) : $ = z - (L = Math.floor(z / C)) * C, P.css("margin-" + (this.isHorizontal() ? "top" : "left"), 0 !== L && e.spaceBetween && e.spaceBetween + "px").attr("data-swiper-column", $).attr("data-swiper-row", L) } "none" !== P.css("display") && ("auto" === e.slidesPerView ? (T = this.isHorizontal() ? P.outerWidth(!0) : P.outerHeight(!0), e.roundLengths && (T = Math.floor(T))) : (T = (i - (e.slidesPerView - 1) * g) / e.slidesPerView, e.roundLengths && (T = Math.floor(T)), r[z] && (this.isHorizontal() ? r[z].style.width = T + "px" : r[z].style.height = T + "px")), r[z] && (r[z].swiperSlideSize = T), p.push(T), e.centeredSlides ? (b = b + T / 2 + w / 2 + g, 0 === w && 0 !== z && (b = b - i / 2 - g), 0 === z && (b = b - i / 2 - g), Math.abs(b) < .001 && (b = 0), y % e.slidesPerGroup == 0 && o.push(b), d.push(b)) : (y % e.slidesPerGroup == 0 && o.push(b), d.push(b), b = b + T + g), this.virtualSize += T + g, w = T, y += 1) } if (this.virtualSize = Math.max(this.virtualSize, i) + u, s && a && ("slide" === e.effect || "coverflow" === e.effect) && t.css({ width: this.virtualSize + e.spaceBetween + "px" }), h.flexbox && !e.setWrapperSize || (this.isHorizontal() ? t.css({ width: this.virtualSize + e.spaceBetween + "px" }) : t.css({ height: this.virtualSize + e.spaceBetween + "px" })), e.slidesPerColumn > 1 && (this.virtualSize = (T + e.spaceBetween) * x, this.virtualSize = Math.ceil(this.virtualSize / e.slidesPerColumn) - e.spaceBetween, this.isHorizontal() ? t.css({ width: this.virtualSize + e.spaceBetween + "px" }) : t.css({ height: this.virtualSize + e.spaceBetween + "px" }), e.centeredSlides)) { E = []; for (var I = 0; I < o.length; I += 1)o[I] < this.virtualSize + o[0] && E.push(o[I]); o = E } if (!e.centeredSlides) { E = []; for (var D = 0; D < o.length; D += 1)o[D] <= this.virtualSize - i && E.push(o[D]); o = E, Math.floor(this.virtualSize - i) - Math.floor(o[o.length - 1]) > 1 && o.push(this.virtualSize - i) } 0 === o.length && (o = [0]), 0 !== e.spaceBetween && (this.isHorizontal() ? s ? r.css({ marginLeft: g + "px" }) : r.css({ marginRight: g + "px" }) : r.css({ marginBottom: g + "px" })), l.extend(this, { slides: r, snapGrid: o, slidesGrid: d, slidesSizesGrid: p }), n !== f && this.emit("slidesLengthChange"), o.length !== v && (this.params.watchOverflow && this.checkOverflow(), this.emit("snapGridLengthChange")), d.length !== m && this.emit("slidesGridLengthChange"), (e.watchSlidesProgress || e.watchSlidesVisibility) && this.updateSlidesOffset() } }, updateAutoHeight: function () { var e, t = [], i = 0; if ("auto" !== this.params.slidesPerView && this.params.slidesPerView > 1) for (e = 0; e < Math.ceil(this.params.slidesPerView); e += 1) { var s = this.activeIndex + e; if (s > this.slides.length) break; t.push(this.slides.eq(s)[0]) } else t.push(this.slides.eq(this.activeIndex)[0]); for (e = 0; e < t.length; e += 1)if (void 0 !== t[e]) { var a = t[e].offsetHeight; i = a > i ? a : i } i && this.$wrapperEl.css("height", i + "px") }, updateSlidesOffset: function () { for (var e = this.slides, t = 0; t < e.length; t += 1)e[t].swiperSlideOffset = this.isHorizontal() ? e[t].offsetLeft : e[t].offsetTop }, updateSlidesProgress: function (e) { void 0 === e && (e = this.translate || 0); var t = this.params, i = this.slides, s = this.rtl; if (0 !== i.length) { void 0 === i[0].swiperSlideOffset && this.updateSlidesOffset(); var a = -e; s && (a = e), i.removeClass(t.slideVisibleClass); for (var r = 0; r < i.length; r += 1) { var n = i[r], o = (a + (t.centeredSlides ? this.minTranslate() : 0) - n.swiperSlideOffset) / (n.swiperSlideSize + t.spaceBetween); if (t.watchSlidesVisibility) { var l = -(a - n.swiperSlideOffset), d = l + this.slidesSizesGrid[r]; (l >= 0 && l < this.size || d > 0 && d <= this.size || l <= 0 && d >= this.size) && i.eq(r).addClass(t.slideVisibleClass) } n.progress = s ? -o : o } } }, updateProgress: function (e) { void 0 === e && (e = this.translate || 0); var t = this.params, i = this.maxTranslate() - this.minTranslate(), s = this.progress, a = this.isBeginning, r = this.isEnd, n = a, o = r; 0 === i ? (s = 0, a = !0, r = !0) : (a = (s = (e - this.minTranslate()) / i) <= 0, r = s >= 1), l.extend(this, { progress: s, isBeginning: a, isEnd: r }), (t.watchSlidesProgress || t.watchSlidesVisibility) && this.updateSlidesProgress(e), a && !n && this.emit("reachBeginning toEdge"), r && !o && this.emit("reachEnd toEdge"), (n && !a || o && !r) && this.emit("fromEdge"), this.emit("progress", s) }, updateSlidesClasses: function () { var e, t = this.slides, i = this.params, s = this.$wrapperEl, a = this.activeIndex, r = this.realIndex, n = this.virtual && i.virtual.enabled; t.removeClass(i.slideActiveClass + " " + i.slideNextClass + " " + i.slidePrevClass + " " + i.slideDuplicateActiveClass + " " + i.slideDuplicateNextClass + " " + i.slideDuplicatePrevClass), (e = n ? this.$wrapperEl.find("." + i.slideClass + '[data-swiper-slide-index="' + a + '"]') : t.eq(a)).addClass(i.slideActiveClass), i.loop && (e.hasClass(i.slideDuplicateClass) ? s.children("." + i.slideClass + ":not(." + i.slideDuplicateClass + ')[data-swiper-slide-index="' + r + '"]').addClass(i.slideDuplicateActiveClass) : s.children("." + i.slideClass + "." + i.slideDuplicateClass + '[data-swiper-slide-index="' + r + '"]').addClass(i.slideDuplicateActiveClass)); var o = e.nextAll("." + i.slideClass).eq(0).addClass(i.slideNextClass); i.loop && 0 === o.length && (o = t.eq(0)).addClass(i.slideNextClass); var l = e.prevAll("." + i.slideClass).eq(0).addClass(i.slidePrevClass); i.loop && 0 === l.length && (l = t.eq(-1)).addClass(i.slidePrevClass), i.loop && (o.hasClass(i.slideDuplicateClass) ? s.children("." + i.slideClass + ":not(." + i.slideDuplicateClass + ')[data-swiper-slide-index="' + o.attr("data-swiper-slide-index") + '"]').addClass(i.slideDuplicateNextClass) : s.children("." + i.slideClass + "." + i.slideDuplicateClass + '[data-swiper-slide-index="' + o.attr("data-swiper-slide-index") + '"]').addClass(i.slideDuplicateNextClass), l.hasClass(i.slideDuplicateClass) ? s.children("." + i.slideClass + ":not(." + i.slideDuplicateClass + ')[data-swiper-slide-index="' + l.attr("data-swiper-slide-index") + '"]').addClass(i.slideDuplicatePrevClass) : s.children("." + i.slideClass + "." + i.slideDuplicateClass + '[data-swiper-slide-index="' + l.attr("data-swiper-slide-index") + '"]').addClass(i.slideDuplicatePrevClass)) }, updateActiveIndex: function (e) { var t, i = this.rtl ? this.translate : -this.translate, s = this.slidesGrid, a = this.snapGrid, r = this.params, n = this.activeIndex, o = this.realIndex, d = this.snapIndex, h = e; if (void 0 === h) { for (var p = 0; p < s.length; p += 1)void 0 !== s[p + 1] ? i >= s[p] && i < s[p + 1] - (s[p + 1] - s[p]) / 2 ? h = p : i >= s[p] && i < s[p + 1] && (h = p + 1) : i >= s[p] && (h = p); r.normalizeSlideIndex && (h < 0 || void 0 === h) && (h = 0) } if ((t = a.indexOf(i) >= 0 ? a.indexOf(i) : Math.floor(h / r.slidesPerGroup)) >= a.length && (t = a.length - 1), h !== n) { var c = parseInt(this.slides.eq(h).attr("data-swiper-slide-index") || h, 10); l.extend(this, { snapIndex: t, realIndex: c, previousIndex: n, activeIndex: h }), this.emit("activeIndexChange"), this.emit("snapIndexChange"), o !== c && this.emit("realIndexChange"), this.emit("slideChange") } else t !== d && (this.snapIndex = t, this.emit("snapIndexChange")) }, updateClickedSlide: function (e) { var i = this.params, s = t(e.target).closest("." + i.slideClass)[0], a = !1; if (s) for (var r = 0; r < this.slides.length; r += 1)this.slides[r] === s && (a = !0); if (!s || !a) return this.clickedSlide = void 0, void (this.clickedIndex = void 0); this.clickedSlide = s, this.virtual && this.params.virtual.enabled ? this.clickedIndex = parseInt(t(s).attr("data-swiper-slide-index"), 10) : this.clickedIndex = t(s).index(), i.slideToClickedSlide && void 0 !== this.clickedIndex && this.clickedIndex !== this.activeIndex && this.slideToClickedSlide() } }, f = { getTranslate: function (e) { void 0 === e && (e = this.isHorizontal() ? "x" : "y"); var t = this.params, i = this.rtl, s = this.translate, a = this.$wrapperEl; if (t.virtualTranslate) return i ? -s : s; var r = l.getTranslate(a[0], e); return i && (r = -r), r || 0 }, setTranslate: function (e, t) { var i = this.rtl, s = this.params, a = this.$wrapperEl, r = this.progress, n = 0, o = 0; this.isHorizontal() ? n = i ? -e : e : o = e, s.roundLengths && (n = Math.floor(n), o = Math.floor(o)), s.virtualTranslate || (h.transforms3d ? a.transform("translate3d(" + n + "px, " + o + "px, 0px)") : a.transform("translate(" + n + "px, " + o + "px)")), this.translate = this.isHorizontal() ? n : o; var l = this.maxTranslate() - this.minTranslate(); (0 === l ? 0 : (e - this.minTranslate()) / l) !== r && this.updateProgress(e), this.emit("setTranslate", this.translate, t) }, minTranslate: function () { return -this.snapGrid[0] }, maxTranslate: function () { return -this.snapGrid[this.snapGrid.length - 1] } }, v = { setTransition: function (e, t) { this.$wrapperEl.transition(e), this.emit("setTransition", e, t) }, transitionStart: function (e) { void 0 === e && (e = !0); var t = this.activeIndex, i = this.params, s = this.previousIndex; i.autoHeight && this.updateAutoHeight(), this.emit("transitionStart"), e && t !== s && (this.emit("slideChangeTransitionStart"), t > s ? this.emit("slideNextTransitionStart") : this.emit("slidePrevTransitionStart")) }, transitionEnd: function (e) { void 0 === e && (e = !0); var t = this.activeIndex, i = this.previousIndex; this.animating = !1, this.setTransition(0), this.emit("transitionEnd"), e && t !== i && (this.emit("slideChangeTransitionEnd"), t > i ? this.emit("slideNextTransitionEnd") : this.emit("slidePrevTransitionEnd")) } }, m = { slideTo: function (e, t, i, s) { void 0 === e && (e = 0), void 0 === t && (t = this.params.speed), void 0 === i && (i = !0); var a = this, r = e; r < 0 && (r = 0); var n = a.params, o = a.snapGrid, l = a.slidesGrid, d = a.previousIndex, p = a.activeIndex, c = a.rtl, u = a.$wrapperEl, f = Math.floor(r / n.slidesPerGroup); f >= o.length && (f = o.length - 1), (p || n.initialSlide || 0) === (d || 0) && i && a.emit("beforeSlideChangeStart"); var v = -o[f]; if (a.updateProgress(v), n.normalizeSlideIndex) for (var m = 0; m < l.length; m += 1)-Math.floor(100 * v) >= Math.floor(100 * l[m]) && (r = m); if (a.initialized) { if (!a.allowSlideNext && v < a.translate && v < a.minTranslate()) return !1; if (!a.allowSlidePrev && v > a.translate && v > a.maxTranslate() && (p || 0) !== r) return !1 } return c && -v === a.translate || !c && v === a.translate ? (a.updateActiveIndex(r), n.autoHeight && a.updateAutoHeight(), a.updateSlidesClasses(), "slide" !== n.effect && a.setTranslate(v), !1) : (0 !== t && h.transition ? (a.setTransition(t), a.setTranslate(v), a.updateActiveIndex(r), a.updateSlidesClasses(), a.emit("beforeTransitionStart", t, s), a.transitionStart(i), a.animating || (a.animating = !0, u.transitionEnd(function () { a && !a.destroyed && a.transitionEnd(i) }))) : (a.setTransition(0), a.setTranslate(v), a.updateActiveIndex(r), a.updateSlidesClasses(), a.emit("beforeTransitionStart", t, s), a.transitionStart(i), a.transitionEnd(i)), !0) }, slideNext: function (e, t, i) { void 0 === e && (e = this.params.speed), void 0 === t && (t = !0); var s = this.params, a = this.animating; return s.loop ? !a && (this.loopFix(), this._clientLeft = this.$wrapperEl[0].clientLeft, this.slideTo(this.activeIndex + s.slidesPerGroup, e, t, i)) : this.slideTo(this.activeIndex + s.slidesPerGroup, e, t, i) }, slidePrev: function (e, t, i) { void 0 === e && (e = this.params.speed), void 0 === t && (t = !0); var s = this.params, a = this.animating; return s.loop ? !a && (this.loopFix(), this._clientLeft = this.$wrapperEl[0].clientLeft, this.slideTo(this.activeIndex - 1, e, t, i)) : this.slideTo(this.activeIndex - 1, e, t, i) }, slideReset: function (e, t, i) { void 0 === e && (e = this.params.speed), void 0 === t && (t = !0); return this.slideTo(this.activeIndex, e, t, i) }, slideToClickedSlide: function () { var e, i = this, s = i.params, a = i.$wrapperEl, r = "auto" === s.slidesPerView ? i.slidesPerViewDynamic() : s.slidesPerView, n = i.clickedIndex; if (s.loop) { if (i.animating) return; e = parseInt(t(i.clickedSlide).attr("data-swiper-slide-index"), 10), s.centeredSlides ? n < i.loopedSlides - r / 2 || n > i.slides.length - i.loopedSlides + r / 2 ? (i.loopFix(), n = a.children("." + s.slideClass + '[data-swiper-slide-index="' + e + '"]:not(.' + s.slideDuplicateClass + ")").eq(0).index(), l.nextTick(function () { i.slideTo(n) })) : i.slideTo(n) : n > i.slides.length - r ? (i.loopFix(), n = a.children("." + s.slideClass + '[data-swiper-slide-index="' + e + '"]:not(.' + s.slideDuplicateClass + ")").eq(0).index(), l.nextTick(function () { i.slideTo(n) })) : i.slideTo(n) } else i.slideTo(n) } }, g = { loopCreate: function () { var e = this, i = e.params, s = e.$wrapperEl; s.children("." + i.slideClass + "." + i.slideDuplicateClass).remove(); var a = s.children("." + i.slideClass); if (i.loopFillGroupWithBlank) { var r = i.slidesPerGroup - a.length % i.slidesPerGroup; if (r !== i.slidesPerGroup) { for (var n = 0; n < r; n += 1) { var o = t(d.createElement("div")).addClass(i.slideClass + " " + i.slideBlankClass); s.append(o) } a = s.children("." + i.slideClass) } } "auto" !== i.slidesPerView || i.loopedSlides || (i.loopedSlides = a.length), e.loopedSlides = parseInt(i.loopedSlides || i.slidesPerView, 10), e.loopedSlides += i.loopAdditionalSlides, e.loopedSlides > a.length && (e.loopedSlides = a.length); var l = [], h = []; a.each(function (i, s) { var r = t(s); i < e.loopedSlides && h.push(s), i < a.length && i >= a.length - e.loopedSlides && l.push(s), r.attr("data-swiper-slide-index", i) }); for (var p = 0; p < h.length; p += 1)s.append(t(h[p].cloneNode(!0)).addClass(i.slideDuplicateClass)); for (var c = l.length - 1; c >= 0; c -= 1)s.prepend(t(l[c].cloneNode(!0)).addClass(i.slideDuplicateClass)) }, loopFix: function () { var e, t = this.params, i = this.activeIndex, s = this.slides, a = this.loopedSlides, r = this.allowSlidePrev, n = this.allowSlideNext; this.allowSlidePrev = !0, this.allowSlideNext = !0, i < a ? (e = s.length - 3 * a + i, e += a, this.slideTo(e, 0, !1, !0)) : ("auto" === t.slidesPerView && i >= 2 * a || i > s.length - 2 * t.slidesPerView) && (e = -s.length + i + a, e += a, this.slideTo(e, 0, !1, !0)), this.allowSlidePrev = r, this.allowSlideNext = n }, loopDestroy: function () { var e = this.$wrapperEl, t = this.params, i = this.slides; e.children("." + t.slideClass + "." + t.slideDuplicateClass).remove(), i.removeAttr("data-swiper-slide-index") } }, b = { setGrabCursor: function (e) { if (!h.touch && this.params.simulateTouch) { var t = this.el; t.style.cursor = "move", t.style.cursor = e ? "-webkit-grabbing" : "-webkit-grab", t.style.cursor = e ? "-moz-grabbin" : "-moz-grab", t.style.cursor = e ? "grabbing" : "grab" } }, unsetGrabCursor: function () { h.touch || (this.el.style.cursor = "") } }, w = { appendSlide: function (e) { var t = this.$wrapperEl, i = this.params; if (i.loop && this.loopDestroy(), "object" == typeof e && "length" in e) for (var s = 0; s < e.length; s += 1)e[s] && t.append(e[s]); else t.append(e); i.loop && this.loopCreate(), i.observer && h.observer || this.update() }, prependSlide: function (e) { var t = this.params, i = this.$wrapperEl, s = this.activeIndex; t.loop && this.loopDestroy(); var a = s + 1; if ("object" == typeof e && "length" in e) { for (var r = 0; r < e.length; r += 1)e[r] && i.prepend(e[r]); a = s + e.length } else i.prepend(e); t.loop && this.loopCreate(), t.observer && h.observer || this.update(), this.slideTo(a, 0, !1) }, removeSlide: function (e) { var t = this.params, i = this.$wrapperEl, s = this.activeIndex; t.loop && (this.loopDestroy(), this.slides = i.children("." + t.slideClass)); var a, r = s; if ("object" == typeof e && "length" in e) { for (var n = 0; n < e.length; n += 1)a = e[n], this.slides[a] && this.slides.eq(a).remove(), a < r && (r -= 1); r = Math.max(r, 0) } else a = e, this.slides[a] && this.slides.eq(a).remove(), a < r && (r -= 1), r = Math.max(r, 0); t.loop && this.loopCreate(), t.observer && h.observer || this.update(), t.loop ? this.slideTo(r + this.loopedSlides, 0, !1) : this.slideTo(r, 0, !1) }, removeAllSlides: function () { for (var e = [], t = 0; t < this.slides.length; t += 1)e.push(t); this.removeSlide(e) } }, y = function () { var e = o.navigator.userAgent, t = { ios: !1, android: !1, androidChrome: !1, desktop: !1, windows: !1, iphone: !1, ipod: !1, ipad: !1, cordova: o.cordova || o.phonegap, phonegap: o.cordova || o.phonegap }, i = e.match(/(Windows Phone);?[\s\/]+([\d.]+)?/), s = e.match(/(Android);?[\s\/]+([\d.]+)?/), a = e.match(/(iPad).*OS\s([\d_]+)/), r = e.match(/(iPod)(.*OS\s([\d_]+))?/), n = !a && e.match(/(iPhone\sOS|iOS)\s([\d_]+)/); if (i && (t.os = "windows", t.osVersion = i[2], t.windows = !0), s && !i && (t.os = "android", t.osVersion = s[2], t.android = !0, t.androidChrome = e.toLowerCase().indexOf("chrome") >= 0), (a || n || r) && (t.os = "ios", t.ios = !0), n && !r && (t.osVersion = n[2].replace(/_/g, "."), t.iphone = !0), a && (t.osVersion = a[2].replace(/_/g, "."), t.ipad = !0), r && (t.osVersion = r[3] ? r[3].replace(/_/g, ".") : null, t.iphone = !0), t.ios && t.osVersion && e.indexOf("Version/") >= 0 && "10" === t.osVersion.split(".")[0] && (t.osVersion = e.toLowerCase().split("version/")[1].split(" ")[0]), t.desktop = !(t.os || t.android || t.webView), t.webView = (n || a || r) && e.match(/.*AppleWebKit(?!.*Safari)/i), t.os && "ios" === t.os) { var l = t.osVersion.split("."), h = d.querySelector('meta[name="viewport"]'); t.minimalUi = !t.webView && (r || n) && (1 * l[0] == 7 ? 1 * l[1] >= 1 : 1 * l[0] > 7) && h && h.getAttribute("content").indexOf("minimal-ui") >= 0 } return t.pixelRatio = o.devicePixelRatio || 1, t }(), x = function (e) { var i = this.touchEventsData, s = this.params, a = this.touches, r = e; if (r.originalEvent && (r = r.originalEvent), i.isTouchEvent = "touchstart" === r.type, (i.isTouchEvent || !("which" in r) || 3 !== r.which) && (!i.isTouched || !i.isMoved)) if (s.noSwiping && t(r.target).closest("." + s.noSwipingClass)[0]) this.allowClick = !0; else if (!s.swipeHandler || t(r).closest(s.swipeHandler)[0]) { a.currentX = "touchstart" === r.type ? r.targetTouches[0].pageX : r.pageX, a.currentY = "touchstart" === r.type ? r.targetTouches[0].pageY : r.pageY; var n = a.currentX, o = a.currentY; if (!(y.ios && !y.cordova && s.iOSEdgeSwipeDetection && n <= s.iOSEdgeSwipeThreshold && n >= window.screen.width - s.iOSEdgeSwipeThreshold)) { if (l.extend(i, { isTouched: !0, isMoved: !1, allowTouchCallbacks: !0, isScrolling: void 0, startMoving: void 0 }), a.startX = n, a.startY = o, i.touchStartTime = l.now(), this.allowClick = !0, this.updateSize(), this.swipeDirection = void 0, s.threshold > 0 && (i.allowThresholdMove = !1), "touchstart" !== r.type) { var h = !0; t(r.target).is(i.formElements) && (h = !1), d.activeElement && t(d.activeElement).is(i.formElements) && d.activeElement.blur(), h && this.allowTouchMove && r.preventDefault() } this.emit("touchStart", r) } } }, T = function (e) { var i = this.touchEventsData, s = this.params, a = this.touches, r = this.rtl, n = e; if (n.originalEvent && (n = n.originalEvent), !i.isTouchEvent || "mousemove" !== n.type) { var o = "touchmove" === n.type ? n.targetTouches[0].pageX : n.pageX, h = "touchmove" === n.type ? n.targetTouches[0].pageY : n.pageY; if (n.preventedByNestedSwiper) return a.startX = o, void (a.startY = h); if (!this.allowTouchMove) return this.allowClick = !1, void (i.isTouched && (l.extend(a, { startX: o, startY: h, currentX: o, currentY: h }), i.touchStartTime = l.now())); if (i.isTouchEvent && s.touchReleaseOnEdges && !s.loop) if (this.isVertical()) { if (h < a.startY && this.translate <= this.maxTranslate() || h > a.startY && this.translate >= this.minTranslate()) return i.isTouched = !1, void (i.isMoved = !1) } else if (o < a.startX && this.translate <= this.maxTranslate() || o > a.startX && this.translate >= this.minTranslate()) return; if (i.isTouchEvent && d.activeElement && n.target === d.activeElement && t(n.target).is(i.formElements)) return i.isMoved = !0, void (this.allowClick = !1); if (i.allowTouchCallbacks && this.emit("touchMove", n), !(n.targetTouches && n.targetTouches.length > 1)) { a.currentX = o, a.currentY = h; var p, c = a.currentX - a.startX, u = a.currentY - a.startY; if (void 0 === i.isScrolling) this.isHorizontal() && a.currentY === a.startY || this.isVertical() && a.currentX === a.startX ? i.isScrolling = !1 : c * c + u * u >= 25 && (p = 180 * Math.atan2(Math.abs(u), Math.abs(c)) / Math.PI, i.isScrolling = this.isHorizontal() ? p > s.touchAngle : 90 - p > s.touchAngle); if (i.isScrolling && this.emit("touchMoveOpposite", n), "undefined" == typeof startMoving && (a.currentX === a.startX && a.currentY === a.startY || (i.startMoving = !0)), i.isTouched) if (i.isScrolling) i.isTouched = !1; else if (i.startMoving) { this.allowClick = !1, n.preventDefault(), s.touchMoveStopPropagation && !s.nested && n.stopPropagation(), i.isMoved || (s.loop && this.loopFix(), i.startTranslate = this.getTranslate(), this.setTransition(0), this.animating && this.$wrapperEl.trigger("webkitTransitionEnd transitionend"), i.allowMomentumBounce = !1, !s.grabCursor || !0 !== this.allowSlideNext && !0 !== this.allowSlidePrev || this.setGrabCursor(!0), this.emit("sliderFirstMove", n)), this.emit("sliderMove", n), i.isMoved = !0; var f = this.isHorizontal() ? c : u; a.diff = f, f *= s.touchRatio, r && (f = -f), this.swipeDirection = f > 0 ? "prev" : "next", i.currentTranslate = f + i.startTranslate; var v = !0, m = s.resistanceRatio; if (s.touchReleaseOnEdges && (m = 0), f > 0 && i.currentTranslate > this.minTranslate() ? (v = !1, s.resistance && (i.currentTranslate = this.minTranslate() - 1 + Math.pow(-this.minTranslate() + i.startTranslate + f, m))) : f < 0 && i.currentTranslate < this.maxTranslate() && (v = !1, s.resistance && (i.currentTranslate = this.maxTranslate() + 1 - Math.pow(this.maxTranslate() - i.startTranslate - f, m))), v && (n.preventedByNestedSwiper = !0), !this.allowSlideNext && "next" === this.swipeDirection && i.currentTranslate < i.startTranslate && (i.currentTranslate = i.startTranslate), !this.allowSlidePrev && "prev" === this.swipeDirection && i.currentTranslate > i.startTranslate && (i.currentTranslate = i.startTranslate), s.threshold > 0) { if (!(Math.abs(f) > s.threshold || i.allowThresholdMove)) return void (i.currentTranslate = i.startTranslate); if (!i.allowThresholdMove) return i.allowThresholdMove = !0, a.startX = a.currentX, a.startY = a.currentY, i.currentTranslate = i.startTranslate, void (a.diff = this.isHorizontal() ? a.currentX - a.startX : a.currentY - a.startY) } s.followFinger && ((s.freeMode || s.watchSlidesProgress || s.watchSlidesVisibility) && (this.updateActiveIndex(), this.updateSlidesClasses()), s.freeMode && (0 === i.velocities.length && i.velocities.push({ position: a[this.isHorizontal() ? "startX" : "startY"], time: i.touchStartTime }), i.velocities.push({ position: a[this.isHorizontal() ? "currentX" : "currentY"], time: l.now() })), this.updateProgress(i.currentTranslate), this.setTranslate(i.currentTranslate)) } } } }, E = function (e) { var t = this, i = t.touchEventsData, s = t.params, a = t.touches, r = t.rtl, n = t.$wrapperEl, o = t.slidesGrid, d = t.snapGrid, h = e; if (h.originalEvent && (h = h.originalEvent), i.allowTouchCallbacks && t.emit("touchEnd", h), i.allowTouchCallbacks = !1, i.isTouched) { s.grabCursor && i.isMoved && i.isTouched && (!0 === t.allowSlideNext || !0 === t.allowSlidePrev) && t.setGrabCursor(!1); var p, c = l.now(), u = c - i.touchStartTime; if (t.allowClick && (t.updateClickedSlide(h), t.emit("tap", h), u < 300 && c - i.lastClickTime > 300 && (i.clickTimeout && clearTimeout(i.clickTimeout), i.clickTimeout = l.nextTick(function () { t && !t.destroyed && t.emit("click", h) }, 300)), u < 300 && c - i.lastClickTime < 300 && (i.clickTimeout && clearTimeout(i.clickTimeout), t.emit("doubleTap", h))), i.lastClickTime = l.now(), l.nextTick(function () { t.destroyed || (t.allowClick = !0) }), !i.isTouched || !i.isMoved || !t.swipeDirection || 0 === a.diff || i.currentTranslate === i.startTranslate) return i.isTouched = !1, void (i.isMoved = !1); if (i.isTouched = !1, i.isMoved = !1, p = s.followFinger ? r ? t.translate : -t.translate : -i.currentTranslate, s.freeMode) { if (p < -t.minTranslate()) return void t.slideTo(t.activeIndex); if (p > -t.maxTranslate()) return void (t.slides.length < d.length ? t.slideTo(d.length - 1) : t.slideTo(t.slides.length - 1)); if (s.freeModeMomentum) { if (i.velocities.length > 1) { var f = i.velocities.pop(), v = i.velocities.pop(), m = f.position - v.position, g = f.time - v.time; t.velocity = m / g, t.velocity /= 2, Math.abs(t.velocity) < s.freeModeMinimumVelocity && (t.velocity = 0), (g > 150 || l.now() - f.time > 300) && (t.velocity = 0) } else t.velocity = 0; t.velocity *= s.freeModeMomentumVelocityRatio, i.velocities.length = 0; var b = 1e3 * s.freeModeMomentumRatio, w = t.velocity * b, y = t.translate + w; r && (y = -y); var x, T = !1, E = 20 * Math.abs(t.velocity) * s.freeModeMomentumBounceRatio; if (y < t.maxTranslate()) s.freeModeMomentumBounce ? (y + t.maxTranslate() < -E && (y = t.maxTranslate() - E), x = t.maxTranslate(), T = !0, i.allowMomentumBounce = !0) : y = t.maxTranslate(); else if (y > t.minTranslate()) s.freeModeMomentumBounce ? (y - t.minTranslate() > E && (y = t.minTranslate() + E), x = t.minTranslate(), T = !0, i.allowMomentumBounce = !0) : y = t.minTranslate(); else if (s.freeModeSticky) { for (var S, C = 0; C < d.length; C += 1)if (d[C] > -y) { S = C; break } y = -(y = Math.abs(d[S] - y) < Math.abs(d[S - 1] - y) || "next" === t.swipeDirection ? d[S] : d[S - 1]) } if (0 !== t.velocity) b = r ? Math.abs((-y - t.translate) / t.velocity) : Math.abs((y - t.translate) / t.velocity); else if (s.freeModeSticky) return void t.slideReset(); s.freeModeMomentumBounce && T ? (t.updateProgress(x), t.setTransition(b), t.setTranslate(y), t.transitionStart(), t.animating = !0, n.transitionEnd(function () { t && !t.destroyed && i.allowMomentumBounce && (t.emit("momentumBounce"), t.setTransition(s.speed), t.setTranslate(x), n.transitionEnd(function () { t && !t.destroyed && t.transitionEnd() })) })) : t.velocity ? (t.updateProgress(y), t.setTransition(b), t.setTranslate(y), t.transitionStart(), t.animating || (t.animating = !0, n.transitionEnd(function () { t && !t.destroyed && t.transitionEnd() }))) : t.updateProgress(y), t.updateActiveIndex(), t.updateSlidesClasses() } (!s.freeModeMomentum || u >= s.longSwipesMs) && (t.updateProgress(), t.updateActiveIndex(), t.updateSlidesClasses()) } else { for (var M = 0, z = t.slidesSizesGrid[0], P = 0; P < o.length; P += s.slidesPerGroup)void 0 !== o[P + s.slidesPerGroup] ? p >= o[P] && p < o[P + s.slidesPerGroup] && (M = P, z = o[P + s.slidesPerGroup] - o[P]) : p >= o[P] && (M = P, z = o[o.length - 1] - o[o.length - 2]); var k = (p - o[M]) / z; if (u > s.longSwipesMs) { if (!s.longSwipes) return void t.slideTo(t.activeIndex); "next" === t.swipeDirection && (k >= s.longSwipesRatio ? t.slideTo(M + s.slidesPerGroup) : t.slideTo(M)), "prev" === t.swipeDirection && (k > 1 - s.longSwipesRatio ? t.slideTo(M + s.slidesPerGroup) : t.slideTo(M)) } else { if (!s.shortSwipes) return void t.slideTo(t.activeIndex); "next" === t.swipeDirection && t.slideTo(M + s.slidesPerGroup), "prev" === t.swipeDirection && t.slideTo(M) } } } }, S = function () { var e = this.params, t = this.el; if (!t || 0 !== t.offsetWidth) { e.breakpoints && this.setBreakpoint(); var i = this.allowSlideNext, s = this.allowSlidePrev; if (this.allowSlideNext = !0, this.allowSlidePrev = !0, this.updateSize(), this.updateSlides(), e.freeMode) { var a = Math.min(Math.max(this.translate, this.maxTranslate()), this.minTranslate()); this.setTranslate(a), this.updateActiveIndex(), this.updateSlidesClasses(), e.autoHeight && this.updateAutoHeight() } else this.updateSlidesClasses(), ("auto" === e.slidesPerView || e.slidesPerView > 1) && this.isEnd && !this.params.centeredSlides ? this.slideTo(this.slides.length - 1, 0, !1, !0) : this.slideTo(this.activeIndex, 0, !1, !0); this.allowSlidePrev = s, this.allowSlideNext = i } }, C = function (e) { this.allowClick || (this.params.preventClicks && e.preventDefault(), this.params.preventClicksPropagation && this.animating && (e.stopPropagation(), e.stopImmediatePropagation())) }; var M = { init: !0, direction: "horizontal", touchEventsTarget: "container", initialSlide: 0, speed: 300, iOSEdgeSwipeDetection: !1, iOSEdgeSwipeThreshold: 20, freeMode: !1, freeModeMomentum: !0, freeModeMomentumRatio: 1, freeModeMomentumBounce: !0, freeModeMomentumBounceRatio: 1, freeModeMomentumVelocityRatio: 1, freeModeSticky: !1, freeModeMinimumVelocity: .02, autoHeight: !1, setWrapperSize: !1, virtualTranslate: !1, effect: "slide", breakpoints: void 0, spaceBetween: 0, slidesPerView: 1, slidesPerColumn: 1, slidesPerColumnFill: "column", slidesPerGroup: 1, centeredSlides: !1, slidesOffsetBefore: 0, slidesOffsetAfter: 0, normalizeSlideIndex: !0, watchOverflow: !1, roundLengths: !1, touchRatio: 1, touchAngle: 45, simulateTouch: !0, shortSwipes: !0, longSwipes: !0, longSwipesRatio: .5, longSwipesMs: 300, followFinger: !0, allowTouchMove: !0, threshold: 0, touchMoveStopPropagation: !0, touchReleaseOnEdges: !1, uniqueNavElements: !0, resistance: !0, resistanceRatio: .85, watchSlidesProgress: !1, watchSlidesVisibility: !1, grabCursor: !1, preventClicks: !0, preventClicksPropagation: !0, slideToClickedSlide: !1, preloadImages: !0, updateOnImagesReady: !0, loop: !1, loopAdditionalSlides: 0, loopedSlides: null, loopFillGroupWithBlank: !1, allowSlidePrev: !0, allowSlideNext: !0, swipeHandler: null, noSwiping: !0, noSwipingClass: "swiper-no-swiping", passiveListeners: !0, containerModifierClass: "swiper-container-", slideClass: "swiper-slide", slideBlankClass: "swiper-slide-invisible-blank", slideActiveClass: "swiper-slide-active", slideDuplicateActiveClass: "swiper-slide-duplicate-active", slideVisibleClass: "swiper-slide-visible", slideDuplicateClass: "swiper-slide-duplicate", slideNextClass: "swiper-slide-next", slideDuplicateNextClass: "swiper-slide-duplicate-next", slidePrevClass: "swiper-slide-prev", slideDuplicatePrevClass: "swiper-slide-duplicate-prev", wrapperClass: "swiper-wrapper", runCallbacksOnInit: !0 }, z = { update: u, translate: f, transition: v, slide: m, loop: g, grabCursor: b, manipulation: w, events: { attachEvents: function () { var e = this.params, t = this.touchEvents, i = this.el, s = this.wrapperEl; this.onTouchStart = x.bind(this), this.onTouchMove = T.bind(this), this.onTouchEnd = E.bind(this), this.onClick = C.bind(this); var a = "container" === e.touchEventsTarget ? i : s, r = !!e.nested; if (h.pointerEvents || h.prefixedPointerEvents) a.addEventListener(t.start, this.onTouchStart, !1), (h.touch ? a : d).addEventListener(t.move, this.onTouchMove, r), (h.touch ? a : d).addEventListener(t.end, this.onTouchEnd, !1); else { if (h.touch) { var n = !("touchstart" !== t.start || !h.passiveListener || !e.passiveListeners) && { passive: !0, capture: !1 }; a.addEventListener(t.start, this.onTouchStart, n), a.addEventListener(t.move, this.onTouchMove, h.passiveListener ? { passive: !1, capture: r } : r), a.addEventListener(t.end, this.onTouchEnd, n) } (e.simulateTouch && !y.ios && !y.android || e.simulateTouch && !h.touch && y.ios) && (a.addEventListener("mousedown", this.onTouchStart, !1), d.addEventListener("mousemove", this.onTouchMove, r), d.addEventListener("mouseup", this.onTouchEnd, !1)) } (e.preventClicks || e.preventClicksPropagation) && a.addEventListener("click", this.onClick, !0), this.on("resize observerUpdate", S) }, detachEvents: function () { var e = this.params, t = this.touchEvents, i = this.el, s = this.wrapperEl, a = "container" === e.touchEventsTarget ? i : s, r = !!e.nested; if (h.pointerEvents || h.prefixedPointerEvents) a.removeEventListener(t.start, this.onTouchStart, !1), (h.touch ? a : d).removeEventListener(t.move, this.onTouchMove, r), (h.touch ? a : d).removeEventListener(t.end, this.onTouchEnd, !1); else { if (h.touch) { var n = !("onTouchStart" !== t.start || !h.passiveListener || !e.passiveListeners) && { passive: !0, capture: !1 }; a.removeEventListener(t.start, this.onTouchStart, n), a.removeEventListener(t.move, this.onTouchMove, r), a.removeEventListener(t.end, this.onTouchEnd, n) } (e.simulateTouch && !y.ios && !y.android || e.simulateTouch && !h.touch && y.ios) && (a.removeEventListener("mousedown", this.onTouchStart, !1), d.removeEventListener("mousemove", this.onTouchMove, r), d.removeEventListener("mouseup", this.onTouchEnd, !1)) } (e.preventClicks || e.preventClicksPropagation) && a.removeEventListener("click", this.onClick, !0), this.off("resize observerUpdate", S) } }, breakpoints: { setBreakpoint: function () { var e = this.activeIndex, t = this.loopedSlides; void 0 === t && (t = 0); var i = this.params, s = i.breakpoints; if (s && (!s || 0 !== Object.keys(s).length)) { var a = this.getBreakpoint(s); if (a && this.currentBreakpoint !== a) { var r = a in s ? s[a] : this.originalParams, n = i.loop && r.slidesPerView !== i.slidesPerView; l.extend(this.params, r), l.extend(this, { allowTouchMove: this.params.allowTouchMove, allowSlideNext: this.params.allowSlideNext, allowSlidePrev: this.params.allowSlidePrev }), this.currentBreakpoint = a, n && (this.loopDestroy(), this.loopCreate(), this.updateSlides(), this.slideTo(e - t + this.loopedSlides, 0, !1)), this.emit("breakpoint", r) } } }, getBreakpoint: function (e) { if (e) { var t = !1, i = []; Object.keys(e).forEach(function (e) { i.push(e) }), i.sort(function (e, t) { return parseInt(e, 10) - parseInt(t, 10) }); for (var s = 0; s < i.length; s += 1) { var a = i[s]; a >= o.innerWidth && !t && (t = a) } return t || "max" } } }, checkOverflow: { checkOverflow: function () { var e = this.isLocked; this.isLocked = 1 === this.snapGrid.length, this.allowTouchMove = !this.isLocked, e && e !== this.isLocked && (this.isEnd = !1, this.navigation.update()) } }, classes: { addClasses: function () { var e = this.classNames, t = this.params, i = this.rtl, s = this.$el, a = []; a.push(t.direction), t.freeMode && a.push("free-mode"), h.flexbox || a.push("no-flexbox"), t.autoHeight && a.push("autoheight"), i && a.push("rtl"), t.slidesPerColumn > 1 && a.push("multirow"), y.android && a.push("android"), y.ios && a.push("ios"), (h.pointerEvents || h.prefixedPointerEvents) && a.push("wp8-" + t.direction), a.forEach(function (i) { e.push(t.containerModifierClass + i) }), s.addClass(e.join(" ")) }, removeClasses: function () { var e = this.$el, t = this.classNames; e.removeClass(t.join(" ")) } }, images: { loadImage: function (e, t, i, s, a, r) { var n; function l() { r && r() } e.complete && a ? l() : t ? ((n = new o.Image).onload = l, n.onerror = l, s && (n.sizes = s), i && (n.srcset = i), t && (n.src = t)) : l() }, preloadImages: function () { var e = this; function t() { void 0 !== e && null !== e && e && !e.destroyed && (void 0 !== e.imagesLoaded && (e.imagesLoaded += 1), e.imagesLoaded === e.imagesToLoad.length && (e.params.updateOnImagesReady && e.update(), e.emit("imagesReady"))) } e.imagesToLoad = e.$el.find("img"); for (var i = 0; i < e.imagesToLoad.length; i += 1) { var s = e.imagesToLoad[i]; e.loadImage(s, s.currentSrc || s.getAttribute("src"), s.srcset || s.getAttribute("srcset"), s.sizes || s.getAttribute("sizes"), !0, t) } } } }, P = {}, k = function (e) { function i() { for (var s, a, r, n = [], o = arguments.length; o--;)n[o] = arguments[o]; 1 === n.length && n[0].constructor && n[0].constructor === Object ? a = n[0] : (s = (r = n)[0], a = r[1]); a || (a = {}), a = l.extend({}, a), s && !a.el && (a.el = s), e.call(this, a), Object.keys(z).forEach(function (e) { Object.keys(z[e]).forEach(function (t) { i.prototype[t] || (i.prototype[t] = z[e][t]) }) }); var d = this; void 0 === d.modules && (d.modules = {}), Object.keys(d.modules).forEach(function (e) { var t = d.modules[e]; if (t.params) { var i = Object.keys(t.params)[0], s = t.params[i]; if ("object" != typeof s) return; if (!(i in a && "enabled" in s)) return; !0 === a[i] && (a[i] = { enabled: !0 }), "object" != typeof a[i] || "enabled" in a[i] || (a[i].enabled = !0), a[i] || (a[i] = { enabled: !1 }) } }); var p = l.extend({}, M); d.useModulesParams(p), d.params = l.extend({}, p, P, a), d.originalParams = l.extend({}, d.params), d.passedParams = l.extend({}, a); var c = t(d.params.el); if (s = c[0]) { if (c.length > 1) { var u = []; return c.each(function (e, t) { var s = l.extend({}, a, { el: t }); u.push(new i(s)) }), u } s.swiper = d, c.data("swiper", d); var f, v, m = c.children("." + d.params.wrapperClass); return l.extend(d, { $el: c, el: s, $wrapperEl: m, wrapperEl: m[0], classNames: [], slides: t(), slidesGrid: [], snapGrid: [], slidesSizesGrid: [], isHorizontal: function () { return "horizontal" === d.params.direction }, isVertical: function () { return "vertical" === d.params.direction }, rtl: "horizontal" === d.params.direction && ("rtl" === s.dir.toLowerCase() || "rtl" === c.css("direction")), wrongRTL: "-webkit-box" === m.css("display"), activeIndex: 0, realIndex: 0, isBeginning: !0, isEnd: !1, translate: 0, progress: 0, velocity: 0, animating: !1, allowSlideNext: d.params.allowSlideNext, allowSlidePrev: d.params.allowSlidePrev, touchEvents: (f = ["touchstart", "touchmove", "touchend"], v = ["mousedown", "mousemove", "mouseup"], h.pointerEvents ? v = ["pointerdown", "pointermove", "pointerup"] : h.prefixedPointerEvents && (v = ["MSPointerDown", "MSPointerMove", "MSPointerUp"]), { start: h.touch || !d.params.simulateTouch ? f[0] : v[0], move: h.touch || !d.params.simulateTouch ? f[1] : v[1], end: h.touch || !d.params.simulateTouch ? f[2] : v[2] }), touchEventsData: { isTouched: void 0, isMoved: void 0, allowTouchCallbacks: void 0, touchStartTime: void 0, isScrolling: void 0, currentTranslate: void 0, startTranslate: void 0, allowThresholdMove: void 0, formElements: "input, select, option, textarea, button, video", lastClickTime: l.now(), clickTimeout: void 0, velocities: [], allowMomentumBounce: void 0, isTouchEvent: void 0, startMoving: void 0 }, allowClick: !0, allowTouchMove: d.params.allowTouchMove, touches: { startX: 0, startY: 0, currentX: 0, currentY: 0, diff: 0 }, imagesToLoad: [], imagesLoaded: 0 }), d.useModules(), d.params.init && d.init(), d } } e && (i.__proto__ = e), i.prototype = Object.create(e && e.prototype), i.prototype.constructor = i; var s = { extendedDefaults: { configurable: !0 }, defaults: { configurable: !0 }, Class: { configurable: !0 }, $: { configurable: !0 } }; return i.prototype.slidesPerViewDynamic = function () { var e = this.params, t = this.slides, i = this.slidesGrid, s = this.size, a = this.activeIndex, r = 1; if (e.centeredSlides) { for (var n, o = t[a].swiperSlideSize, l = a + 1; l < t.length; l += 1)t[l] && !n && (r += 1, (o += t[l].swiperSlideSize) > s && (n = !0)); for (var d = a - 1; d >= 0; d -= 1)t[d] && !n && (r += 1, (o += t[d].swiperSlideSize) > s && (n = !0)) } else for (var h = a + 1; h < t.length; h += 1)i[h] - i[a] < s && (r += 1); return r }, i.prototype.update = function () { var e = this; e && !e.destroyed && (e.updateSize(), e.updateSlides(), e.updateProgress(), e.updateSlidesClasses(), e.params.freeMode ? (t(), e.params.autoHeight && e.updateAutoHeight()) : (("auto" === e.params.slidesPerView || e.params.slidesPerView > 1) && e.isEnd && !e.params.centeredSlides ? e.slideTo(e.slides.length - 1, 0, !1, !0) : e.slideTo(e.activeIndex, 0, !1, !0)) || t(), e.emit("update")); function t() { var t = e.rtl ? -1 * e.translate : e.translate, i = Math.min(Math.max(t, e.maxTranslate()), e.minTranslate()); e.setTranslate(i), e.updateActiveIndex(), e.updateSlidesClasses() } }, i.prototype.init = function () { this.initialized || (this.emit("beforeInit"), this.params.breakpoints && this.setBreakpoint(), this.addClasses(), this.params.loop && this.loopCreate(), this.updateSize(), this.updateSlides(), this.params.watchOverflow && this.checkOverflow(), this.params.grabCursor && this.setGrabCursor(), this.params.preloadImages && this.preloadImages(), this.params.loop ? this.slideTo(this.params.initialSlide + this.loopedSlides, 0, this.params.runCallbacksOnInit) : this.slideTo(this.params.initialSlide, 0, this.params.runCallbacksOnInit), this.attachEvents(), this.initialized = !0, this.emit("init")) }, i.prototype.destroy = function (e, t) { void 0 === e && (e = !0), void 0 === t && (t = !0); var i = this, s = i.params, a = i.$el, r = i.$wrapperEl, n = i.slides; i.emit("beforeDestroy"), i.initialized = !1, i.detachEvents(), s.loop && i.loopDestroy(), t && (i.removeClasses(), a.removeAttr("style"), r.removeAttr("style"), n && n.length && n.removeClass([s.slideVisibleClass, s.slideActiveClass, s.slideNextClass, s.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index").removeAttr("data-swiper-column").removeAttr("data-swiper-row")), i.emit("destroy"), Object.keys(i.eventsListeners).forEach(function (e) { i.off(e) }), !1 !== e && (i.$el[0].swiper = null, i.$el.data("swiper", null), l.deleteProps(i)), i.destroyed = !0 }, i.extendDefaults = function (e) { l.extend(P, e) }, s.extendedDefaults.get = function () { return P }, s.defaults.get = function () { return M }, s.Class.get = function () { return e }, s.$.get = function () { return t }, Object.defineProperties(i, s), i }(p), $ = { name: "device", proto: { device: y }, static: { device: y } }, L = { name: "support", proto: { support: h }, static: { support: h } }, I = function () { return { isSafari: (e = o.navigator.userAgent.toLowerCase(), e.indexOf("safari") >= 0 && e.indexOf("chrome") < 0 && e.indexOf("android") < 0), isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(o.navigator.userAgent) }; var e }(), D = { name: "browser", proto: { browser: I }, static: { browser: I } }, O = { name: "resize", create: function () { var e = this; l.extend(e, { resize: { resizeHandler: function () { e && !e.destroyed && e.initialized && (e.emit("beforeResize"), e.emit("resize")) }, orientationChangeHandler: function () { e && !e.destroyed && e.initialized && e.emit("orientationchange") } } }) }, on: { init: function () { o.addEventListener("resize", this.resize.resizeHandler), o.addEventListener("orientationchange", this.resize.orientationChangeHandler) }, destroy: function () { o.removeEventListener("resize", this.resize.resizeHandler), o.removeEventListener("orientationchange", this.resize.orientationChangeHandler) } } }, A = { func: o.MutationObserver || o.WebkitMutationObserver, attach: function (e, t) { void 0 === t && (t = {}); var i = this, s = new (0, A.func)(function (e) { e.forEach(function (e) { i.emit("observerUpdate", e) }) }); s.observe(e, { attributes: void 0 === t.attributes || t.attributes, childList: void 0 === t.childList || t.childList, characterData: void 0 === t.characterData || t.characterData }), i.observer.observers.push(s) }, init: function () { if (h.observer && this.params.observer) { if (this.params.observeParents) for (var e = this.$el.parents(), t = 0; t < e.length; t += 1)this.observer.attach(e[t]); this.observer.attach(this.$el[0], { childList: !1 }), this.observer.attach(this.$wrapperEl[0], { attributes: !1 }) } }, destroy: function () { this.observer.observers.forEach(function (e) { e.disconnect() }), this.observer.observers = [] } }, H = { name: "observer", params: { observer: !1, observeParents: !1 }, create: function () { l.extend(this, { observer: { init: A.init.bind(this), attach: A.attach.bind(this), destroy: A.destroy.bind(this), observers: [] } }) }, on: { init: function () { this.observer.init() }, destroy: function () { this.observer.destroy() } } }, N = { update: function (e) { var t = this, i = t.params, s = i.slidesPerView, a = i.slidesPerGroup, r = i.centeredSlides, n = t.virtual, o = n.from, d = n.to, h = n.slides, p = n.slidesGrid, c = n.renderSlide, u = n.offset; t.updateActiveIndex(); var f, v, m, g = t.activeIndex || 0; f = t.rtl && t.isHorizontal() ? "right" : t.isHorizontal() ? "left" : "top", r ? (v = Math.floor(s / 2) + a, m = Math.floor(s / 2) + a) : (v = s + (a - 1), m = a); var b = Math.max((g || 0) - m, 0), w = Math.min((g || 0) + v, h.length - 1), y = (t.slidesGrid[b] || 0) - (t.slidesGrid[0] || 0); function x() { t.updateSlides(), t.updateProgress(), t.updateSlidesClasses(), t.lazy && t.params.lazy.enabled && t.lazy.load() } if (l.extend(t.virtual, { from: b, to: w, offset: y, slidesGrid: t.slidesGrid }), o === b && d === w && !e) return t.slidesGrid !== p && y !== u && t.slides.css(f, y + "px"), void t.updateProgress(); if (t.params.virtual.renderExternal) return t.params.virtual.renderExternal.call(t, { offset: y, from: b, to: w, slides: function () { for (var e = [], t = b; t <= w; t += 1)e.push(h[t]); return e }() }), void x(); var T = [], E = []; if (e) t.$wrapperEl.find("." + t.params.slideClass).remove(); else for (var S = o; S <= d; S += 1)(S < b || S > w) && t.$wrapperEl.find("." + t.params.slideClass + '[data-swiper-slide-index="' + S + '"]').remove(); for (var C = 0; C < h.length; C += 1)C >= b && C <= w && (void 0 === d || e ? E.push(C) : (C > d && E.push(C), C < o && T.push(C))); E.forEach(function (e) { t.$wrapperEl.append(c(h[e], e)) }), T.sort(function (e, t) { return e < t }).forEach(function (e) { t.$wrapperEl.prepend(c(h[e], e)) }), t.$wrapperEl.children(".swiper-slide").css(f, y + "px"), x() }, renderSlide: function (e, i) { var s = this.params.virtual; if (s.cache && this.virtual.cache[i]) return this.virtual.cache[i]; var a = s.renderSlide ? t(s.renderSlide.call(this, e, i)) : t('<div class="' + this.params.slideClass + '" data-swiper-slide-index="' + i + '">' + e + "</div>"); return a.attr("data-swiper-slide-index") || a.attr("data-swiper-slide-index", i), s.cache && (this.virtual.cache[i] = a), a }, appendSlide: function (e) { this.virtual.slides.push(e), this.virtual.update(!0) }, prependSlide: function (e) { if (this.virtual.slides.unshift(e), this.params.virtual.cache) { var t = this.virtual.cache, i = {}; Object.keys(t).forEach(function (e) { i[e + 1] = t[e] }), this.virtual.cache = i } this.virtual.update(!0), this.slideNext(0) } }, X = { name: "virtual", params: { virtual: { enabled: !1, slides: [], cache: !0, renderSlide: null, renderExternal: null } }, create: function () { l.extend(this, { virtual: { update: N.update.bind(this), appendSlide: N.appendSlide.bind(this), prependSlide: N.prependSlide.bind(this), renderSlide: N.renderSlide.bind(this), slides: this.params.virtual.slides, cache: {} } }) }, on: { beforeInit: function () { if (this.params.virtual.enabled) { this.classNames.push(this.params.containerModifierClass + "virtual"); var e = { watchSlidesProgress: !0 }; l.extend(this.params, e), l.extend(this.originalParams, e), this.virtual.update() } }, setTranslate: function () { this.params.virtual.enabled && this.virtual.update() } } }, Y = { handle: function (e) { var t = e; t.originalEvent && (t = t.originalEvent); var i = t.keyCode || t.charCode; if (!this.allowSlideNext && (this.isHorizontal() && 39 === i || this.isVertical() && 40 === i)) return !1; if (!this.allowSlidePrev && (this.isHorizontal() && 37 === i || this.isVertical() && 38 === i)) return !1; if (!(t.shiftKey || t.altKey || t.ctrlKey || t.metaKey || d.activeElement && d.activeElement.nodeName && ("input" === d.activeElement.nodeName.toLowerCase() || "textarea" === d.activeElement.nodeName.toLowerCase()))) { if (this.params.keyboard.onlyInViewport && (37 === i || 39 === i || 38 === i || 40 === i)) { var s = !1; if (this.$el.parents("." + this.params.slideClass).length > 0 && 0 === this.$el.parents("." + this.params.slideActiveClass).length) return; var a = o.pageXOffset, r = o.pageYOffset, n = o.innerWidth, l = o.innerHeight, h = this.$el.offset(); this.rtl && (h.left -= this.$el[0].scrollLeft); for (var p = [[h.left, h.top], [h.left + this.width, h.top], [h.left, h.top + this.height], [h.left + this.width, h.top + this.height]], c = 0; c < p.length; c += 1) { var u = p[c]; u[0] >= a && u[0] <= a + n && u[1] >= r && u[1] <= r + l && (s = !0) } if (!s) return } this.isHorizontal() ? (37 !== i && 39 !== i || (t.preventDefault ? t.preventDefault() : t.returnValue = !1), (39 === i && !this.rtl || 37 === i && this.rtl) && this.slideNext(), (37 === i && !this.rtl || 39 === i && this.rtl) && this.slidePrev()) : (38 !== i && 40 !== i || (t.preventDefault ? t.preventDefault() : t.returnValue = !1), 40 === i && this.slideNext(), 38 === i && this.slidePrev()), this.emit("keyPress", i) } }, enable: function () { this.keyboard.enabled || (t(d).on("keydown", this.keyboard.handle), this.keyboard.enabled = !0) }, disable: function () { this.keyboard.enabled && (t(d).off("keydown", this.keyboard.handle), this.keyboard.enabled = !1) } }, G = { name: "keyboard", params: { keyboard: { enabled: !1, onlyInViewport: !0 } }, create: function () { l.extend(this, { keyboard: { enabled: !1, enable: Y.enable.bind(this), disable: Y.disable.bind(this), handle: Y.handle.bind(this) } }) }, on: { init: function () { this.params.keyboard.enabled && this.keyboard.enable() }, destroy: function () { this.keyboard.enabled && this.keyboard.disable() } } }; var B = { lastScrollTime: l.now(), event: o.navigator.userAgent.indexOf("firefox") > -1 ? "DOMMouseScroll" : function () { var e = "onwheel" in d; if (!e) { var t = d.createElement("div"); t.setAttribute("onwheel", "return;"), e = "function" == typeof t.onwheel } return !e && d.implementation && d.implementation.hasFeature && !0 !== d.implementation.hasFeature("", "") && (e = d.implementation.hasFeature("Events.wheel", "3.0")), e }() ? "wheel" : "mousewheel", normalize: function (e) { var t = 0, i = 0, s = 0, a = 0; return "detail" in e && (i = e.detail), "wheelDelta" in e && (i = -e.wheelDelta / 120), "wheelDeltaY" in e && (i = -e.wheelDeltaY / 120), "wheelDeltaX" in e && (t = -e.wheelDeltaX / 120), "axis" in e && e.axis === e.HORIZONTAL_AXIS && (t = i, i = 0), s = 10 * t, a = 10 * i, "deltaY" in e && (a = e.deltaY), "deltaX" in e && (s = e.deltaX), (s || a) && e.deltaMode && (1 === e.deltaMode ? (s *= 40, a *= 40) : (s *= 800, a *= 800)), s && !t && (t = s < 1 ? -1 : 1), a && !i && (i = a < 1 ? -1 : 1), { spinX: t, spinY: i, pixelX: s, pixelY: a } }, handle: function (e) { var t = e, i = this, s = i.params.mousewheel; t.originalEvent && (t = t.originalEvent); var a = 0, r = i.rtl ? -1 : 1, n = B.normalize(t); if (s.forceToAxis) if (i.isHorizontal()) { if (!(Math.abs(n.pixelX) > Math.abs(n.pixelY))) return !0; a = n.pixelX * r } else { if (!(Math.abs(n.pixelY) > Math.abs(n.pixelX))) return !0; a = n.pixelY } else a = Math.abs(n.pixelX) > Math.abs(n.pixelY) ? -n.pixelX * r : -n.pixelY; if (0 === a) return !0; if (s.invert && (a = -a), i.params.freeMode) { var d = i.getTranslate() + a * s.sensitivity, h = i.isBeginning, p = i.isEnd; if (d >= i.minTranslate() && (d = i.minTranslate()), d <= i.maxTranslate() && (d = i.maxTranslate()), i.setTransition(0), i.setTranslate(d), i.updateProgress(), i.updateActiveIndex(), i.updateSlidesClasses(), (!h && i.isBeginning || !p && i.isEnd) && i.updateSlidesClasses(), i.params.freeModeSticky && (clearTimeout(i.mousewheel.timeout), i.mousewheel.timeout = l.nextTick(function () { i.slideReset() }, 300)), i.emit("scroll", t), i.params.autoplay && i.params.autoplayDisableOnInteraction && i.stopAutoplay(), 0 === d || d === i.maxTranslate()) return !0 } else { if (l.now() - i.mousewheel.lastScrollTime > 60) if (a < 0) if (i.isEnd && !i.params.loop || i.animating) { if (s.releaseOnEdges) return !0 } else i.slideNext(), i.emit("scroll", t); else if (i.isBeginning && !i.params.loop || i.animating) { if (s.releaseOnEdges) return !0 } else i.slidePrev(), i.emit("scroll", t); i.mousewheel.lastScrollTime = (new o.Date).getTime() } return t.preventDefault ? t.preventDefault() : t.returnValue = !1, !1 }, enable: function () { if (!B.event) return !1; if (this.mousewheel.enabled) return !1; var e = this.$el; return "container" !== this.params.mousewheel.eventsTarged && (e = t(this.params.mousewheel.eventsTarged)), e.on(B.event, this.mousewheel.handle), this.mousewheel.enabled = !0, !0 }, disable: function () { if (!B.event) return !1; if (!this.mousewheel.enabled) return !1; var e = this.$el; return "container" !== this.params.mousewheel.eventsTarged && (e = t(this.params.mousewheel.eventsTarged)), e.off(B.event, this.mousewheel.handle), this.mousewheel.enabled = !1, !0 } }, V = { update: function () { var e = this.params.navigation; if (!this.params.loop) { var t = this.navigation, i = t.$nextEl, s = t.$prevEl; s && s.length > 0 && (this.isBeginning ? s.addClass(e.disabledClass) : s.removeClass(e.disabledClass), s[this.params.watchOverflow && this.isLocked ? "addClass" : "removeClass"](e.lockClass)), i && i.length > 0 && (this.isEnd ? i.addClass(e.disabledClass) : i.removeClass(e.disabledClass), i[this.params.watchOverflow && this.isLocked ? "addClass" : "removeClass"](e.lockClass)) } }, init: function () { var e, i, s = this, a = s.params.navigation; (a.nextEl || a.prevEl) && (a.nextEl && (e = t(a.nextEl), s.params.uniqueNavElements && "string" == typeof a.nextEl && e.length > 1 && 1 === s.$el.find(a.nextEl).length && (e = s.$el.find(a.nextEl))), a.prevEl && (i = t(a.prevEl), s.params.uniqueNavElements && "string" == typeof a.prevEl && i.length > 1 && 1 === s.$el.find(a.prevEl).length && (i = s.$el.find(a.prevEl))), e && e.length > 0 && e.on("click", function (e) { e.preventDefault(), s.isEnd && !s.params.loop || s.slideNext() }), i && i.length > 0 && i.on("click", function (e) { e.preventDefault(), s.isBeginning && !s.params.loop || s.slidePrev() }), l.extend(s.navigation, { $nextEl: e, nextEl: e && e[0], $prevEl: i, prevEl: i && i[0] })) }, destroy: function () { var e = this.navigation, t = e.$nextEl, i = e.$prevEl; t && t.length && (t.off("click"), t.removeClass(this.params.navigation.disabledClass)), i && i.length && (i.off("click"), i.removeClass(this.params.navigation.disabledClass)) } }, R = { update: function () { var e = this.rtl, i = this.params.pagination; if (i.el && this.pagination.el && this.pagination.$el && 0 !== this.pagination.$el.length) { var s, a = this.virtual && this.params.virtual.enabled ? this.virtual.slides.length : this.slides.length, r = this.pagination.$el, n = this.params.loop ? Math.ceil((a - 2 * this.loopedSlides) / this.params.slidesPerGroup) : this.snapGrid.length; if (this.params.loop ? ((s = Math.ceil((this.activeIndex - this.loopedSlides) / this.params.slidesPerGroup)) > a - 1 - 2 * this.loopedSlides && (s -= a - 2 * this.loopedSlides), s > n - 1 && (s -= n), s < 0 && "bullets" !== this.params.paginationType && (s = n + s)) : s = void 0 !== this.snapIndex ? this.snapIndex : this.activeIndex || 0, "bullets" === i.type && this.pagination.bullets && this.pagination.bullets.length > 0) { var o = this.pagination.bullets; if (i.dynamicBullets && (this.pagination.bulletSize = o.eq(0)[this.isHorizontal() ? "outerWidth" : "outerHeight"](!0), r.css(this.isHorizontal() ? "width" : "height", 5 * this.pagination.bulletSize + "px")), o.removeClass(i.bulletActiveClass + " " + i.bulletActiveClass + "-next " + i.bulletActiveClass + "-next-next " + i.bulletActiveClass + "-prev " + i.bulletActiveClass + "-prev-prev"), r.length > 1) o.each(function (e, a) { var r = t(a); r.index() === s && (r.addClass(i.bulletActiveClass), i.dynamicBullets && (r.prev().addClass(i.bulletActiveClass + "-prev").prev().addClass(i.bulletActiveClass + "-prev-prev"), r.next().addClass(i.bulletActiveClass + "-next").next().addClass(i.bulletActiveClass + "-next-next"))) }); else { var l = o.eq(s); l.addClass(i.bulletActiveClass), i.dynamicBullets && (l.prev().addClass(i.bulletActiveClass + "-prev").prev().addClass(i.bulletActiveClass + "-prev-prev"), l.next().addClass(i.bulletActiveClass + "-next").next().addClass(i.bulletActiveClass + "-next-next")) } if (i.dynamicBullets) { var d = Math.min(o.length, 5), h = (this.pagination.bulletSize * d - this.pagination.bulletSize) / 2 - s * this.pagination.bulletSize, p = e ? "right" : "left"; o.css(this.isHorizontal() ? p : "top", h + "px") } } if ("fraction" === i.type && (r.find("." + i.currentClass).text(s + 1), r.find("." + i.totalClass).text(n)), "progressbar" === i.type) { var c = (s + 1) / n, u = c, f = 1; this.isHorizontal() || (f = c, u = 1), r.find("." + i.progressbarFillClass).transform("translate3d(0,0,0) scaleX(" + u + ") scaleY(" + f + ")").transition(this.params.speed) } "custom" === i.type && i.renderCustom ? (r.html(i.renderCustom(this, s + 1, n)), this.emit("paginationRender", this, r[0])) : this.emit("paginationUpdate", this, r[0]), r[this.params.watchOverflow && this.isLocked ? "addClass" : "removeClass"](i.lockClass) } }, render: function () { var e = this.params.pagination; if (e.el && this.pagination.el && this.pagination.$el && 0 !== this.pagination.$el.length) { var t = this.virtual && this.params.virtual.enabled ? this.virtual.slides.length : this.slides.length, i = this.pagination.$el, s = ""; if ("bullets" === e.type) { for (var a = this.params.loop ? Math.ceil((t - 2 * this.loopedSlides) / this.params.slidesPerGroup) : this.snapGrid.length, r = 0; r < a; r += 1)e.renderBullet ? s += e.renderBullet.call(this, r, e.bulletClass) : s += "<" + e.bulletElement + ' class="' + e.bulletClass + '"></' + e.bulletElement + ">"; i.html(s), this.pagination.bullets = i.find("." + e.bulletClass) } "fraction" === e.type && (s = e.renderFraction ? e.renderFraction.call(this, e.currentClass, e.totalClass) : '<span class="' + e.currentClass + '"></span> / <span class="' + e.totalClass + '"></span>', i.html(s)), "progressbar" === e.type && (s = e.renderProgressbar ? e.renderProgressbar.call(this, e.progressbarFillClass) : '<span class="' + e.progressbarFillClass + '"></span>', i.html(s)), "custom" !== e.type && this.emit("paginationRender", this.pagination.$el[0]) } }, init: function () { var e = this, i = e.params.pagination; if (i.el) { var s = t(i.el); 0 !== s.length && (e.params.uniqueNavElements && "string" == typeof i.el && s.length > 1 && 1 === e.$el.find(i.el).length && (s = e.$el.find(i.el)), "bullets" === i.type && i.clickable && s.addClass(i.clickableClass), s.addClass(i.modifierClass + i.type), "bullets" === i.type && i.dynamicBullets && s.addClass("" + i.modifierClass + i.type + "-dynamic"), i.clickable && s.on("click", "." + i.bulletClass, function (i) { i.preventDefault(); var s = t(this).index() * e.params.slidesPerGroup; e.params.loop && (s += e.loopedSlides), e.slideTo(s) }), l.extend(e.pagination, { $el: s, el: s[0] })) } }, destroy: function () { var e = this.params.pagination; if (e.el && this.pagination.el && this.pagination.$el && 0 !== this.pagination.$el.length) { var t = this.pagination.$el; t.removeClass(e.hiddenClass), t.removeClass(e.modifierClass + e.type), this.pagination.bullets && this.pagination.bullets.removeClass(e.bulletActiveClass), e.clickable && t.off("click", "." + e.bulletClass) } } }, F = { setTranslate: function () { if (this.params.scrollbar.el && this.scrollbar.el) { var e = this.scrollbar, t = this.rtl, i = this.progress, s = e.dragSize, a = e.trackSize, r = e.$dragEl, n = e.$el, o = this.params.scrollbar, l = s, d = (a - s) * i; t && this.isHorizontal() ? (d = -d) > 0 ? (l = s - d, d = 0) : -d + s > a && (l = a + d) : d < 0 ? (l = s + d, d = 0) : d + s > a && (l = a - d), this.isHorizontal() ? (h.transforms3d ? r.transform("translate3d(" + d + "px, 0, 0)") : r.transform("translateX(" + d + "px)"), r[0].style.width = l + "px") : (h.transforms3d ? r.transform("translate3d(0px, " + d + "px, 0)") : r.transform("translateY(" + d + "px)"), r[0].style.height = l + "px"), o.hide && (clearTimeout(this.scrollbar.timeout), n[0].style.opacity = 1, this.scrollbar.timeout = setTimeout(function () { n[0].style.opacity = 0, n.transition(400) }, 1e3)) } }, setTransition: function (e) { this.params.scrollbar.el && this.scrollbar.el && this.scrollbar.$dragEl.transition(e) }, updateSize: function () { if (this.params.scrollbar.el && this.scrollbar.el) { var e = this.scrollbar, t = e.$dragEl, i = e.$el; t[0].style.width = "", t[0].style.height = ""; var s, a = this.isHorizontal() ? i[0].offsetWidth : i[0].offsetHeight, r = this.size / this.virtualSize, n = r * (a / this.size); s = "auto" === this.params.scrollbar.dragSize ? a * r : parseInt(this.params.scrollbar.dragSize, 10), this.isHorizontal() ? t[0].style.width = s + "px" : t[0].style.height = s + "px", i[0].style.display = r >= 1 ? "none" : "", this.params.scrollbarHide && (i[0].style.opacity = 0), l.extend(e, { trackSize: a, divider: r, moveDivider: n, dragSize: s }), e.$el[this.params.watchOverflow && this.isLocked ? "addClass" : "removeClass"](this.params.scrollbar.lockClass) } }, setDragPosition: function (e) { var t, i = this.scrollbar, s = i.$el, a = i.dragSize, r = i.trackSize; t = ((this.isHorizontal() ? "touchstart" === e.type || "touchmove" === e.type ? e.targetTouches[0].pageX : e.pageX || e.clientX : "touchstart" === e.type || "touchmove" === e.type ? e.targetTouches[0].pageY : e.pageY || e.clientY) - s.offset()[this.isHorizontal() ? "left" : "top"] - a / 2) / (r - a), t = Math.max(Math.min(t, 1), 0), this.rtl && (t = 1 - t); var n = this.minTranslate() + (this.maxTranslate() - this.minTranslate()) * t; this.updateProgress(n), this.setTranslate(n), this.updateActiveIndex(), this.updateSlidesClasses() }, onDragStart: function (e) { var t = this.params.scrollbar, i = this.scrollbar, s = this.$wrapperEl, a = i.$el, r = i.$dragEl; this.scrollbar.isTouched = !0, e.preventDefault(), e.stopPropagation(), s.transition(100), r.transition(100), i.setDragPosition(e), clearTimeout(this.scrollbar.dragTimeout), a.transition(0), t.hide && a.css("opacity", 1), this.emit("scrollbarDragStart", e) }, onDragMove: function (e) { var t = this.scrollbar, i = this.$wrapperEl, s = t.$el, a = t.$dragEl; this.scrollbar.isTouched && (e.preventDefault ? e.preventDefault() : e.returnValue = !1, t.setDragPosition(e), i.transition(0), s.transition(0), a.transition(0), this.emit("scrollbarDragMove", e)) }, onDragEnd: function (e) { var t = this.params.scrollbar, i = this.scrollbar.$el; this.scrollbar.isTouched && (this.scrollbar.isTouched = !1, t.hide && (clearTimeout(this.scrollbar.dragTimeout), this.scrollbar.dragTimeout = l.nextTick(function () { i.css("opacity", 0), i.transition(400) }, 1e3)), this.emit("scrollbarDragEnd", e), t.snapOnRelease && this.slideReset()) }, enableDraggable: function () { if (this.params.scrollbar.el) { var e = this.scrollbar.$el, i = h.touch ? e[0] : document; e.on(this.scrollbar.dragEvents.start, this.scrollbar.onDragStart), t(i).on(this.scrollbar.dragEvents.move, this.scrollbar.onDragMove), t(i).on(this.scrollbar.dragEvents.end, this.scrollbar.onDragEnd) } }, disableDraggable: function () { if (this.params.scrollbar.el) { var e = this.scrollbar.$el, i = h.touch ? e[0] : document; e.off(this.scrollbar.dragEvents.start), t(i).off(this.scrollbar.dragEvents.move), t(i).off(this.scrollbar.dragEvents.end) } }, init: function () { var e = this; if (e.params.scrollbar.el) { var i = e.scrollbar, s = e.$el, a = e.touchEvents, r = e.params.scrollbar, n = t(r.el); e.params.uniqueNavElements && "string" == typeof r.el && n.length > 1 && 1 === s.find(r.el).length && (n = s.find(r.el)); var o = n.find(".swiper-scrollbar-drag"); 0 === o.length && (o = t('<div class="swiper-scrollbar-drag"></div>'), n.append(o)), e.scrollbar.dragEvents = !1 !== e.params.simulateTouch || h.touch ? a : { start: "mousedown", move: "mousemove", end: "mouseup" }, l.extend(i, { $el: n, el: n[0], $dragEl: o, dragEl: o[0] }), r.draggable && i.enableDraggable() } }, destroy: function () { this.scrollbar.disableDraggable() } }, W = { setTransform: function (e, i) { var s = this.rtl, a = t(e), r = s ? -1 : 1, n = a.attr("data-swiper-parallax") || "0", o = a.attr("data-swiper-parallax-x"), l = a.attr("data-swiper-parallax-y"), d = a.attr("data-swiper-parallax-scale"), h = a.attr("data-swiper-parallax-opacity"); if (o || l ? (o = o || "0", l = l || "0") : this.isHorizontal() ? (o = n, l = "0") : (l = n, o = "0"), o = o.indexOf("%") >= 0 ? parseInt(o, 10) * i * r + "%" : o * i * r + "px", l = l.indexOf("%") >= 0 ? parseInt(l, 10) * i + "%" : l * i + "px", void 0 !== h && null !== h) { var p = h - (h - 1) * (1 - Math.abs(i)); a[0].style.opacity = p } if (void 0 === d || null === d) a.transform("translate3d(" + o + ", " + l + ", 0px)"); else { var c = d - (d - 1) * (1 - Math.abs(i)); a.transform("translate3d(" + o + ", " + l + ", 0px) scale(" + c + ")") } }, setTranslate: function () { var e = this, i = e.$el, s = e.slides, a = e.progress, r = e.snapGrid; i.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function (t, i) { e.parallax.setTransform(i, a) }), s.each(function (i, s) { var n = s.progress; e.params.slidesPerGroup > 1 && "auto" !== e.params.slidesPerView && (n += Math.ceil(i / 2) - a * (r.length - 1)), n = Math.min(Math.max(n, -1), 1), t(s).find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function (t, i) { e.parallax.setTransform(i, n) }) }) }, setTransition: function (e) { void 0 === e && (e = this.params.speed); this.$el.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function (i, s) { var a = t(s), r = parseInt(a.attr("data-swiper-parallax-duration"), 10) || e; 0 === e && (r = 0), a.transition(r) }) } }, j = { getDistanceBetweenTouches: function (e) { if (e.targetTouches.length < 2) return 1; var t = e.targetTouches[0].pageX, i = e.targetTouches[0].pageY, s = e.targetTouches[1].pageX, a = e.targetTouches[1].pageY; return Math.sqrt(Math.pow(s - t, 2) + Math.pow(a - i, 2)) }, onGestureStart: function (e) { var i = this.params.zoom, s = this.zoom, a = s.gesture; if (s.fakeGestureTouched = !1, s.fakeGestureMoved = !1, !h.gestures) { if ("touchstart" !== e.type || "touchstart" === e.type && e.targetTouches.length < 2) return; s.fakeGestureTouched = !0, a.scaleStart = j.getDistanceBetweenTouches(e) } a.$slideEl && a.$slideEl.length || (a.$slideEl = t(this), 0 === a.$slideEl.length && (a.$slideEl = this.slides.eq(this.activeIndex)), a.$imageEl = a.$slideEl.find("img, svg, canvas"), a.$imageWrapEl = a.$imageEl.parent("." + i.containerClass), a.maxRatio = a.$imageWrapEl.attr("data-swiper-zoom") || i.maxRatio, 0 !== a.$imageWrapEl.length) ? (a.$imageEl.transition(0), this.zoom.isScaling = !0) : a.$imageEl = void 0 }, onGestureChange: function (e) { var t = this.params.zoom, i = this.zoom, s = i.gesture; if (!h.gestures) { if ("touchmove" !== e.type || "touchmove" === e.type && e.targetTouches.length < 2) return; i.fakeGestureMoved = !0, s.scaleMove = j.getDistanceBetweenTouches(e) } s.$imageEl && 0 !== s.$imageEl.length && (h.gestures ? this.zoom.scale = e.scale * i.currentScale : i.scale = s.scaleMove / s.scaleStart * i.currentScale, i.scale > s.maxRatio && (i.scale = s.maxRatio - 1 + Math.pow(i.scale - s.maxRatio + 1, .5)), i.scale < t.minRatio && (i.scale = t.minRatio + 1 - Math.pow(t.minRatio - i.scale + 1, .5)), s.$imageEl.transform("translate3d(0,0,0) scale(" + i.scale + ")")) }, onGestureEnd: function (e) { var t = this.params.zoom, i = this.zoom, s = i.gesture; if (!h.gestures) { if (!i.fakeGestureTouched || !i.fakeGestureMoved) return; if ("touchend" !== e.type || "touchend" === e.type && e.changedTouches.length < 2 && !y.android) return; i.fakeGestureTouched = !1, i.fakeGestureMoved = !1 } s.$imageEl && 0 !== s.$imageEl.length && (i.scale = Math.max(Math.min(i.scale, s.maxRatio), t.minRatio), s.$imageEl.transition(this.params.speed).transform("translate3d(0,0,0) scale(" + i.scale + ")"), i.currentScale = i.scale, i.isScaling = !1, 1 === i.scale && (s.$slideEl = void 0)) }, onTouchStart: function (e) { var t = this.zoom, i = t.gesture, s = t.image; i.$imageEl && 0 !== i.$imageEl.length && (s.isTouched || (y.android && e.preventDefault(), s.isTouched = !0, s.touchesStart.x = "touchstart" === e.type ? e.targetTouches[0].pageX : e.pageX, s.touchesStart.y = "touchstart" === e.type ? e.targetTouches[0].pageY : e.pageY)) }, onTouchMove: function (e) { var t = this.zoom, i = t.gesture, s = t.image, a = t.velocity; if (i.$imageEl && 0 !== i.$imageEl.length && (this.allowClick = !1, s.isTouched && i.$slideEl)) { s.isMoved || (s.width = i.$imageEl[0].offsetWidth, s.height = i.$imageEl[0].offsetHeight, s.startX = l.getTranslate(i.$imageWrapEl[0], "x") || 0, s.startY = l.getTranslate(i.$imageWrapEl[0], "y") || 0, i.slideWidth = i.$slideEl[0].offsetWidth, i.slideHeight = i.$slideEl[0].offsetHeight, i.$imageWrapEl.transition(0), this.rtl && (s.startX = -s.startX), this.rtl && (s.startY = -s.startY)); var r = s.width * t.scale, n = s.height * t.scale; if (!(r < i.slideWidth && n < i.slideHeight)) { if (s.minX = Math.min(i.slideWidth / 2 - r / 2, 0), s.maxX = -s.minX, s.minY = Math.min(i.slideHeight / 2 - n / 2, 0), s.maxY = -s.minY, s.touchesCurrent.x = "touchmove" === e.type ? e.targetTouches[0].pageX : e.pageX, s.touchesCurrent.y = "touchmove" === e.type ? e.targetTouches[0].pageY : e.pageY, !s.isMoved && !t.isScaling) { if (this.isHorizontal() && (Math.floor(s.minX) === Math.floor(s.startX) && s.touchesCurrent.x < s.touchesStart.x || Math.floor(s.maxX) === Math.floor(s.startX) && s.touchesCurrent.x > s.touchesStart.x)) return void (s.isTouched = !1); if (!this.isHorizontal() && (Math.floor(s.minY) === Math.floor(s.startY) && s.touchesCurrent.y < s.touchesStart.y || Math.floor(s.maxY) === Math.floor(s.startY) && s.touchesCurrent.y > s.touchesStart.y)) return void (s.isTouched = !1) } e.preventDefault(), e.stopPropagation(), s.isMoved = !0, s.currentX = s.touchesCurrent.x - s.touchesStart.x + s.startX, s.currentY = s.touchesCurrent.y - s.touchesStart.y + s.startY, s.currentX < s.minX && (s.currentX = s.minX + 1 - Math.pow(s.minX - s.currentX + 1, .8)), s.currentX > s.maxX && (s.currentX = s.maxX - 1 + Math.pow(s.currentX - s.maxX + 1, .8)), s.currentY < s.minY && (s.currentY = s.minY + 1 - Math.pow(s.minY - s.currentY + 1, .8)), s.currentY > s.maxY && (s.currentY = s.maxY - 1 + Math.pow(s.currentY - s.maxY + 1, .8)), a.prevPositionX || (a.prevPositionX = s.touchesCurrent.x), a.prevPositionY || (a.prevPositionY = s.touchesCurrent.y), a.prevTime || (a.prevTime = Date.now()), a.x = (s.touchesCurrent.x - a.prevPositionX) / (Date.now() - a.prevTime) / 2, a.y = (s.touchesCurrent.y - a.prevPositionY) / (Date.now() - a.prevTime) / 2, Math.abs(s.touchesCurrent.x - a.prevPositionX) < 2 && (a.x = 0), Math.abs(s.touchesCurrent.y - a.prevPositionY) < 2 && (a.y = 0), a.prevPositionX = s.touchesCurrent.x, a.prevPositionY = s.touchesCurrent.y, a.prevTime = Date.now(), i.$imageWrapEl.transform("translate3d(" + s.currentX + "px, " + s.currentY + "px,0)") } } }, onTouchEnd: function () { var e = this.zoom, t = e.gesture, i = e.image, s = e.velocity; if (t.$imageEl && 0 !== t.$imageEl.length) { if (!i.isTouched || !i.isMoved) return i.isTouched = !1, void (i.isMoved = !1); i.isTouched = !1, i.isMoved = !1; var a = 300, r = 300, n = s.x * a, o = i.currentX + n, l = s.y * r, d = i.currentY + l; 0 !== s.x && (a = Math.abs((o - i.currentX) / s.x)), 0 !== s.y && (r = Math.abs((d - i.currentY) / s.y)); var h = Math.max(a, r); i.currentX = o, i.currentY = d; var p = i.width * e.scale, c = i.height * e.scale; i.minX = Math.min(t.slideWidth / 2 - p / 2, 0), i.maxX = -i.minX, i.minY = Math.min(t.slideHeight / 2 - c / 2, 0), i.maxY = -i.minY, i.currentX = Math.max(Math.min(i.currentX, i.maxX), i.minX), i.currentY = Math.max(Math.min(i.currentY, i.maxY), i.minY), t.$imageWrapEl.transition(h).transform("translate3d(" + i.currentX + "px, " + i.currentY + "px,0)") } }, onTransitionEnd: function () { var e = this.zoom, t = e.gesture; t.$slideEl && this.previousIndex !== this.activeIndex && (t.$imageEl.transform("translate3d(0,0,0) scale(1)"), t.$imageWrapEl.transform("translate3d(0,0,0)"), t.$slideEl = void 0, t.$imageEl = void 0, t.$imageWrapEl = void 0, e.scale = 1, e.currentScale = 1) }, toggle: function (e) { var t = this.zoom; t.scale && 1 !== t.scale ? t.out() : t.in(e) }, in: function (e) { var i, s, a, r, n, o, l, d, h, p, c, u, f, v, m, g, b = this.zoom, w = this.params.zoom, y = b.gesture, x = b.image; (y.$slideEl || (y.$slideEl = this.clickedSlide ? t(this.clickedSlide) : this.slides.eq(this.activeIndex), y.$imageEl = y.$slideEl.find("img, svg, canvas"), y.$imageWrapEl = y.$imageEl.parent("." + w.containerClass)), y.$imageEl && 0 !== y.$imageEl.length) && (y.$slideEl.addClass("" + w.zoomedSlideClass), void 0 === x.touchesStart.x && e ? (i = "touchend" === e.type ? e.changedTouches[0].pageX : e.pageX, s = "touchend" === e.type ? e.changedTouches[0].pageY : e.pageY) : (i = x.touchesStart.x, s = x.touchesStart.y), b.scale = y.$imageWrapEl.attr("data-swiper-zoom") || w.maxRatio, b.currentScale = y.$imageWrapEl.attr("data-swiper-zoom") || w.maxRatio, e ? (m = y.$slideEl[0].offsetWidth, g = y.$slideEl[0].offsetHeight, a = y.$slideEl.offset().left + m / 2 - i, r = y.$slideEl.offset().top + g / 2 - s, l = y.$imageEl[0].offsetWidth, d = y.$imageEl[0].offsetHeight, h = l * b.scale, p = d * b.scale, f = -(c = Math.min(m / 2 - h / 2, 0)), v = -(u = Math.min(g / 2 - p / 2, 0)), n = a * b.scale, o = r * b.scale, n < c && (n = c), n > f && (n = f), o < u && (o = u), o > v && (o = v)) : (n = 0, o = 0), y.$imageWrapEl.transition(300).transform("translate3d(" + n + "px, " + o + "px,0)"), y.$imageEl.transition(300).transform("translate3d(0,0,0) scale(" + b.scale + ")")) }, out: function () { var e = this.zoom, i = this.params.zoom, s = e.gesture; s.$slideEl || (s.$slideEl = this.clickedSlide ? t(this.clickedSlide) : this.slides.eq(this.activeIndex), s.$imageEl = s.$slideEl.find("img, svg, canvas"), s.$imageWrapEl = s.$imageEl.parent("." + i.containerClass)), s.$imageEl && 0 !== s.$imageEl.length && (e.scale = 1, e.currentScale = 1, s.$imageWrapEl.transition(300).transform("translate3d(0,0,0)"), s.$imageEl.transition(300).transform("translate3d(0,0,0) scale(1)"), s.$slideEl.removeClass("" + i.zoomedSlideClass), s.$slideEl = void 0) }, enable: function () { var e = this, i = e.zoom; if (!i.enabled) { i.enabled = !0; var s = e.slides, a = !("touchstart" !== e.touchEvents.start || !h.passiveListener || !e.params.passiveListeners) && { passive: !0, capture: !1 }; h.gestures ? (s.on("gesturestart", i.onGestureStart, a), s.on("gesturechange", i.onGestureChange, a), s.on("gestureend", i.onGestureEnd, a)) : "touchstart" === e.touchEvents.start && (s.on(e.touchEvents.start, i.onGestureStart, a), s.on(e.touchEvents.move, i.onGestureChange, a), s.on(e.touchEvents.end, i.onGestureEnd, a)), e.slides.each(function (s, a) { var r = t(a); r.find("." + e.params.zoom.containerClass).length > 0 && r.on(e.touchEvents.move, i.onTouchMove) }) } }, disable: function () { var e = this, i = e.zoom; if (i.enabled) { e.zoom.enabled = !1; var s = e.slides, a = !("touchstart" !== e.touchEvents.start || !h.passiveListener || !e.params.passiveListeners) && { passive: !0, capture: !1 }; h.gestures ? (s.off("gesturestart", i.onGestureStart, a), s.off("gesturechange", i.onGestureChange, a), s.off("gestureend", i.onGestureEnd, a)) : "touchstart" === e.touchEvents.start && (s.off(e.touchEvents.start, i.onGestureStart, a), s.off(e.touchEvents.move, i.onGestureChange, a), s.off(e.touchEvents.end, i.onGestureEnd, a)), e.slides.each(function (s, a) { var r = t(a); r.find("." + e.params.zoom.containerClass).length > 0 && r.off(e.touchEvents.move, i.onTouchMove) }) } } }, q = { loadInSlide: function (e, i) { void 0 === i && (i = !0); var s = this, a = s.params.lazy; if (void 0 !== e && 0 !== s.slides.length) { var r = s.virtual && s.params.virtual.enabled ? s.$wrapperEl.children("." + s.params.slideClass + '[data-swiper-slide-index="' + e + '"]') : s.slides.eq(e), n = r.find("." + a.elementClass + ":not(." + a.loadedClass + "):not(." + a.loadingClass + ")"); !r.hasClass(a.elementClass) || r.hasClass(a.loadedClass) || r.hasClass(a.loadingClass) || (n = n.add(r[0])), 0 !== n.length && n.each(function (e, n) { var o = t(n); o.addClass(a.loadingClass); var l = o.attr("data-background"), d = o.attr("data-src"), h = o.attr("data-srcset"), p = o.attr("data-sizes"); s.loadImage(o[0], d || l, h, p, !1, function () { if (void 0 !== s && null !== s && s && (!s || s.params) && !s.destroyed) { if (l ? (o.css("background-image", 'url("' + l + '")'), o.removeAttr("data-background")) : (h && (o.attr("srcset", h), o.removeAttr("data-srcset")), p && (o.attr("sizes", p), o.removeAttr("data-sizes")), d && (o.attr("src", d), o.removeAttr("data-src"))), o.addClass(a.loadedClass).removeClass(a.loadingClass), r.find("." + a.preloaderClass).remove(), s.params.loop && i) { var e = r.attr("data-swiper-slide-index"); if (r.hasClass(s.params.slideDuplicateClass)) { var t = s.$wrapperEl.children('[data-swiper-slide-index="' + e + '"]:not(.' + s.params.slideDuplicateClass + ")"); s.lazy.loadInSlide(t.index(), !1) } else { var n = s.$wrapperEl.children("." + s.params.slideDuplicateClass + '[data-swiper-slide-index="' + e + '"]'); s.lazy.loadInSlide(n.index(), !1) } } s.emit("lazyImageReady", r[0], o[0]) } }), s.emit("lazyImageLoad", r[0], o[0]) }) } }, load: function () { var e = this, i = e.$wrapperEl, s = e.params, a = e.slides, r = e.activeIndex, n = e.virtual && s.virtual.enabled, o = s.lazy, l = s.slidesPerView; function d(e) { if (n) { if (i.children("." + s.slideClass + '[data-swiper-slide-index="' + e + '"]').length) return !0 } else if (a[e]) return !0; return !1 } function h(e) { return n ? t(e).attr("data-swiper-slide-index") : t(e).index() } if ("auto" === l && (l = 0), e.lazy.initialImageLoaded || (e.lazy.initialImageLoaded = !0), e.params.watchSlidesVisibility) i.children("." + s.slideVisibleClass).each(function (i, s) { var a = n ? t(s).attr("data-swiper-slide-index") : t(s).index(); e.lazy.loadInSlide(a) }); else if (l > 1) for (var p = r; p < r + l; p += 1)d(p) && e.lazy.loadInSlide(p); else e.lazy.loadInSlide(r); if (o.loadPrevNext) if (l > 1 || o.loadPrevNextAmount && o.loadPrevNextAmount > 1) { for (var c = o.loadPrevNextAmount, u = l, f = Math.min(r + u + Math.max(c, u), a.length), v = Math.max(r - Math.max(u, c), 0), m = r + l; m < f; m += 1)d(m) && e.lazy.loadInSlide(m); for (var g = v; g < r; g += 1)d(g) && e.lazy.loadInSlide(g) } else { var b = i.children("." + s.slideNextClass); b.length > 0 && e.lazy.loadInSlide(h(b)); var w = i.children("." + s.slidePrevClass); w.length > 0 && e.lazy.loadInSlide(h(w)) } } }, K = { LinearSpline: function (e, t) { var i, s, a, r, n, o = function (e, t) { for (s = -1, i = e.length; i - s > 1;)e[a = i + s >> 1] <= t ? s = a : i = a; return i }; return this.x = e, this.y = t, this.lastIndex = e.length - 1, this.interpolate = function (e) { return e ? (n = o(this.x, e), r = n - 1, (e - this.x[r]) * (this.y[n] - this.y[r]) / (this.x[n] - this.x[r]) + this.y[r]) : 0 }, this }, getInterpolateFunction: function (e) { this.controller.spline || (this.controller.spline = this.params.loop ? new K.LinearSpline(this.slidesGrid, e.slidesGrid) : new K.LinearSpline(this.snapGrid, e.snapGrid)) }, setTranslate: function (e, t) { var i, s, a = this, r = a.controller.control; function n(e) { var t = e.rtl && "horizontal" === e.params.direction ? -a.translate : a.translate; "slide" === a.params.controller.by && (a.controller.getInterpolateFunction(e), s = -a.controller.spline.interpolate(-t)), s && "container" !== a.params.controller.by || (i = (e.maxTranslate() - e.minTranslate()) / (a.maxTranslate() - a.minTranslate()), s = (t - a.minTranslate()) * i + e.minTranslate()), a.params.controller.inverse && (s = e.maxTranslate() - s), e.updateProgress(s), e.setTranslate(s, a), e.updateActiveIndex(), e.updateSlidesClasses() } if (Array.isArray(r)) for (var o = 0; o < r.length; o += 1)r[o] !== t && r[o] instanceof k && n(r[o]); else r instanceof k && t !== r && n(r) }, setTransition: function (e, t) { var i, s = this, a = s.controller.control; function r(t) { t.setTransition(e, s), 0 !== e && (t.transitionStart(), t.$wrapperEl.transitionEnd(function () { a && (t.params.loop && "slide" === s.params.controller.by && t.loopFix(), t.transitionEnd()) })) } if (Array.isArray(a)) for (i = 0; i < a.length; i += 1)a[i] !== t && a[i] instanceof k && r(a[i]); else a instanceof k && t !== a && r(a) } }, U = { makeElFocusable: function (e) { return e.attr("tabIndex", "0"), e }, addElRole: function (e, t) { return e.attr("role", t), e }, addElLabel: function (e, t) { return e.attr("aria-label", t), e }, disableEl: function (e) { return e.attr("aria-disabled", !0), e }, enableEl: function (e) { return e.attr("aria-disabled", !1), e }, onEnterKey: function (e) { var i = this.params.a11y; if (13 === e.keyCode) { var s = t(e.target); this.navigation && this.navigation.$nextEl && s.is(this.navigation.$nextEl) && (this.isEnd && !this.params.loop || this.slideNext(), this.isEnd ? this.a11y.notify(i.lastSlideMessage) : this.a11y.notify(i.nextSlideMessage)), this.navigation && this.navigation.$prevEl && s.is(this.navigation.$prevEl) && (this.isBeginning && !this.params.loop || this.slidePrev(), this.isBeginning ? this.a11y.notify(i.firstSlideMessage) : this.a11y.notify(i.prevSlideMessage)), this.pagination && s.is("." + this.params.pagination.bulletClass) && s[0].click() } }, notify: function (e) { var t = this.a11y.liveRegion; 0 !== t.length && (t.html(""), t.html(e)) }, updateNavigation: function () { if (!this.params.loop) { var e = this.navigation, t = e.$nextEl, i = e.$prevEl; i && i.length > 0 && (this.isBeginning ? this.a11y.disableEl(i) : this.a11y.enableEl(i)), t && t.length > 0 && (this.isEnd ? this.a11y.disableEl(t) : this.a11y.enableEl(t)) } }, updatePagination: function () { var e = this, i = e.params.a11y; e.pagination && e.params.pagination.clickable && e.pagination.bullets && e.pagination.bullets.length && e.pagination.bullets.each(function (s, a) { var r = t(a); e.a11y.makeElFocusable(r), e.a11y.addElRole(r, "button"), e.a11y.addElLabel(r, i.paginationBulletMessage.replace(/{{index}}/, r.index() + 1)) }) }, init: function () { this.$el.append(this.a11y.liveRegion); var e, t, i = this.params.a11y; this.navigation && this.navigation.$nextEl && (e = this.navigation.$nextEl), this.navigation && this.navigation.$prevEl && (t = this.navigation.$prevEl), e && (this.a11y.makeElFocusable(e), this.a11y.addElRole(e, "button"), this.a11y.addElLabel(e, i.nextSlideMessage), e.on("keydown", this.a11y.onEnterKey)), t && (this.a11y.makeElFocusable(t), this.a11y.addElRole(t, "button"), this.a11y.addElLabel(t, i.prevSlideMessage), t.on("keydown", this.a11y.onEnterKey)), this.pagination && this.params.pagination.clickable && this.pagination.bullets && this.pagination.bullets.length && this.pagination.$el.on("keydown", "." + this.params.pagination.bulletClass, this.a11y.onEnterKey) }, destroy: function () { var e, t; this.a11y.liveRegion && this.a11y.liveRegion.length > 0 && this.a11y.liveRegion.remove(), this.navigation && this.navigation.$nextEl && (e = this.navigation.$nextEl), this.navigation && this.navigation.$prevEl && (t = this.navigation.$prevEl), e && e.off("keydown", this.a11y.onEnterKey), t && t.off("keydown", this.a11y.onEnterKey), this.pagination && this.params.pagination.clickable && this.pagination.bullets && this.pagination.bullets.length && this.pagination.$el.off("keydown", "." + this.params.pagination.bulletClass, this.a11y.onEnterKey) } }, _ = { init: function () { if (this.params.history) { if (!o.history || !o.history.pushState) return this.params.history.enabled = !1, void (this.params.hashNavigation.enabled = !0); var e = this.history; e.initialized = !0, e.paths = _.getPathValues(), (e.paths.key || e.paths.value) && (e.scrollToSlide(0, e.paths.value, this.params.runCallbacksOnInit), this.params.history.replaceState || o.addEventListener("popstate", this.history.setHistoryPopState)) } }, destroy: function () { this.params.history.replaceState || o.removeEventListener("popstate", this.history.setHistoryPopState) }, setHistoryPopState: function () { this.history.paths = _.getPathValues(), this.history.scrollToSlide(this.params.speed, this.history.paths.value, !1) }, getPathValues: function () { var e = o.location.pathname.slice(1).split("/").filter(function (e) { return "" !== e }), t = e.length; return { key: e[t - 2], value: e[t - 1] } }, setHistory: function (e, t) { if (this.history.initialized && this.params.history.enabled) { var i = this.slides.eq(t), s = _.slugify(i.attr("data-history")); o.location.pathname.includes(e) || (s = e + "/" + s); var a = o.history.state; a && a.value === s || (this.params.history.replaceState ? o.history.replaceState({ value: s }, null, s) : o.history.pushState({ value: s }, null, s)) } }, slugify: function (e) { return e.toString().toLowerCase().replace(/\s+/g, "-").replace(/[^\w-]+/g, "").replace(/--+/g, "-").replace(/^-+/, "").replace(/-+$/, "") }, scrollToSlide: function (e, t, i) { if (t) for (var s = 0, a = this.slides.length; s < a; s += 1) { var r = this.slides.eq(s); if (_.slugify(r.attr("data-history")) === t && !r.hasClass(this.params.slideDuplicateClass)) { var n = r.index(); this.slideTo(n, e, i) } } else this.slideTo(0, e, i) } }, Z = { onHashCange: function () { var e = d.location.hash.replace("#", ""); e !== this.slides.eq(this.activeIndex).attr("data-hash") && this.slideTo(this.$wrapperEl.children("." + this.params.slideClass + '[data-hash="' + e + '"]').index()) }, setHash: function () { if (this.hashNavigation.initialized && this.params.hashNavigation.enabled) if (this.params.hashNavigation.replaceState && o.history && o.history.replaceState) o.history.replaceState(null, null, "#" + this.slides.eq(this.activeIndex).attr("data-hash") || ""); else { var e = this.slides.eq(this.activeIndex), t = e.attr("data-hash") || e.attr("data-history"); d.location.hash = t || "" } }, init: function () { if (!(!this.params.hashNavigation.enabled || this.params.history && this.params.history.enabled)) { this.hashNavigation.initialized = !0; var e = d.location.hash.replace("#", ""); if (e) for (var i = 0, s = this.slides.length; i < s; i += 1) { var a = this.slides.eq(i); if ((a.attr("data-hash") || a.attr("data-history")) === e && !a.hasClass(this.params.slideDuplicateClass)) { var r = a.index(); this.slideTo(r, 0, this.params.runCallbacksOnInit, !0) } } this.params.hashNavigation.watchState && t(o).on("hashchange", this.hashNavigation.onHashCange) } }, destroy: function () { this.params.hashNavigation.watchState && t(o).off("hashchange", this.hashNavigation.onHashCange) } }, Q = { run: function () { var e = this, t = e.slides.eq(e.activeIndex), i = e.params.autoplay.delay; t.attr("data-swiper-autoplay") && (i = t.attr("data-swiper-autoplay") || e.params.autoplay.delay), e.autoplay.timeout = l.nextTick(function () { e.params.autoplay.reverseDirection ? e.params.loop ? (e.loopFix(), e.slidePrev(e.params.speed, !0, !0), e.emit("autoplay")) : e.isBeginning ? e.params.autoplay.stopOnLastSlide ? e.autoplay.stop() : (e.slideTo(e.slides.length - 1, e.params.speed, !0, !0), e.emit("autoplay")) : (e.slidePrev(e.params.speed, !0, !0), e.emit("autoplay")) : e.params.loop ? (e.loopFix(), e.slideNext(e.params.speed, !0, !0), e.emit("autoplay")) : e.isEnd ? e.params.autoplay.stopOnLastSlide ? e.autoplay.stop() : (e.slideTo(0, e.params.speed, !0, !0), e.emit("autoplay")) : (e.slideNext(e.params.speed, !0, !0), e.emit("autoplay")) }, i) }, start: function () { return void 0 === this.autoplay.timeout && (!this.autoplay.running && (this.autoplay.running = !0, this.emit("autoplayStart"), this.autoplay.run(), !0)) }, stop: function () { return !!this.autoplay.running && (void 0 !== this.autoplay.timeout && (this.autoplay.timeout && (clearTimeout(this.autoplay.timeout), this.autoplay.timeout = void 0), this.autoplay.running = !1, this.emit("autoplayStop"), !0)) }, pause: function (e) { var t = this; t.autoplay.running && (t.autoplay.paused || (t.autoplay.timeout && clearTimeout(t.autoplay.timeout), t.autoplay.paused = !0, 0 !== e && t.params.autoplay.waitForTransition ? t.$wrapperEl.transitionEnd(function () { t && !t.destroyed && (t.autoplay.paused = !1, t.autoplay.running ? t.autoplay.run() : t.autoplay.stop()) }) : (t.autoplay.paused = !1, t.autoplay.run()))) } }, J = { setTranslate: function () { for (var e = this.slides, t = 0; t < e.length; t += 1) { var i = this.slides.eq(t), s = -i[0].swiperSlideOffset; this.params.virtualTranslate || (s -= this.translate); var a = 0; this.isHorizontal() || (a = s, s = 0); var r = this.params.fadeEffect.crossFade ? Math.max(1 - Math.abs(i[0].progress), 0) : 1 + Math.min(Math.max(i[0].progress, -1), 0); i.css({ opacity: r }).transform("translate3d(" + s + "px, " + a + "px, 0px)") } }, setTransition: function (e) { var t = this, i = t.slides, s = t.$wrapperEl; if (i.transition(e), t.params.virtualTranslate && 0 !== e) { var a = !1; i.transitionEnd(function () { if (!a && t && !t.destroyed) { a = !0, t.animating = !1; for (var e = ["webkitTransitionEnd", "transitionend"], i = 0; i < e.length; i += 1)s.trigger(e[i]) } }) } } }, ee = { setTranslate: function () { var e, i = this.$el, s = this.$wrapperEl, a = this.slides, r = this.width, n = this.height, o = this.rtl, l = this.size, d = this.params.cubeEffect, h = this.isHorizontal(), p = this.virtual && this.params.virtual.enabled, c = 0; d.shadow && (h ? (0 === (e = s.find(".swiper-cube-shadow")).length && (e = t('<div class="swiper-cube-shadow"></div>'), s.append(e)), e.css({ height: r + "px" })) : 0 === (e = i.find(".swiper-cube-shadow")).length && (e = t('<div class="swiper-cube-shadow"></div>'), i.append(e))); for (var u = 0; u < a.length; u += 1) { var f = a.eq(u), v = u; p && (v = parseInt(f.attr("data-swiper-slide-index"), 10)); var m = 90 * v, g = Math.floor(m / 360); o && (m = -m, g = Math.floor(-m / 360)); var b = Math.max(Math.min(f[0].progress, 1), -1), w = 0, y = 0, x = 0; v % 4 == 0 ? (w = 4 * -g * l, x = 0) : (v - 1) % 4 == 0 ? (w = 0, x = 4 * -g * l) : (v - 2) % 4 == 0 ? (w = l + 4 * g * l, x = l) : (v - 3) % 4 == 0 && (w = -l, x = 3 * l + 4 * l * g), o && (w = -w), h || (y = w, w = 0); var T = "rotateX(" + (h ? 0 : -m) + "deg) rotateY(" + (h ? m : 0) + "deg) translate3d(" + w + "px, " + y + "px, " + x + "px)"; if (b <= 1 && b > -1 && (c = 90 * v + 90 * b, o && (c = 90 * -v - 90 * b)), f.transform(T), d.slideShadows) { var E = h ? f.find(".swiper-slide-shadow-left") : f.find(".swiper-slide-shadow-top"), S = h ? f.find(".swiper-slide-shadow-right") : f.find(".swiper-slide-shadow-bottom"); 0 === E.length && (E = t('<div class="swiper-slide-shadow-' + (h ? "left" : "top") + '"></div>'), f.append(E)), 0 === S.length && (S = t('<div class="swiper-slide-shadow-' + (h ? "right" : "bottom") + '"></div>'), f.append(S)), E.length && (E[0].style.opacity = Math.max(-b, 0)), S.length && (S[0].style.opacity = Math.max(b, 0)) } } if (s.css({ "-webkit-transform-origin": "50% 50% -" + l / 2 + "px", "-moz-transform-origin": "50% 50% -" + l / 2 + "px", "-ms-transform-origin": "50% 50% -" + l / 2 + "px", "transform-origin": "50% 50% -" + l / 2 + "px" }), d.shadow) if (h) e.transform("translate3d(0px, " + (r / 2 + d.shadowOffset) + "px, " + -r / 2 + "px) rotateX(90deg) rotateZ(0deg) scale(" + d.shadowScale + ")"); else { var C = Math.abs(c) - 90 * Math.floor(Math.abs(c) / 90), M = 1.5 - (Math.sin(2 * C * Math.PI / 360) / 2 + Math.cos(2 * C * Math.PI / 360) / 2), z = d.shadowScale, P = d.shadowScale / M, k = d.shadowOffset; e.transform("scale3d(" + z + ", 1, " + P + ") translate3d(0px, " + (n / 2 + k) + "px, " + -n / 2 / P + "px) rotateX(-90deg)") } var $ = I.isSafari || I.isUiWebView ? -l / 2 : 0; s.transform("translate3d(0px,0," + $ + "px) rotateX(" + (this.isHorizontal() ? 0 : c) + "deg) rotateY(" + (this.isHorizontal() ? -c : 0) + "deg)") }, setTransition: function (e) { var t = this.$el; this.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e), this.params.cubeEffect.shadow && !this.isHorizontal() && t.find(".swiper-cube-shadow").transition(e) } }, te = { setTranslate: function () { for (var e = this.slides, i = 0; i < e.length; i += 1) { var s = e.eq(i), a = s[0].progress; this.params.flipEffect.limitRotation && (a = Math.max(Math.min(s[0].progress, 1), -1)); var r = -180 * a, n = 0, o = -s[0].swiperSlideOffset, l = 0; if (this.isHorizontal() ? this.rtl && (r = -r) : (l = o, o = 0, n = -r, r = 0), s[0].style.zIndex = -Math.abs(Math.round(a)) + e.length, this.params.flipEffect.slideShadows) { var d = this.isHorizontal() ? s.find(".swiper-slide-shadow-left") : s.find(".swiper-slide-shadow-top"), h = this.isHorizontal() ? s.find(".swiper-slide-shadow-right") : s.find(".swiper-slide-shadow-bottom"); 0 === d.length && (d = t('<div class="swiper-slide-shadow-' + (this.isHorizontal() ? "left" : "top") + '"></div>'), s.append(d)), 0 === h.length && (h = t('<div class="swiper-slide-shadow-' + (this.isHorizontal() ? "right" : "bottom") + '"></div>'), s.append(h)), d.length && (d[0].style.opacity = Math.max(-a, 0)), h.length && (h[0].style.opacity = Math.max(a, 0)) } s.transform("translate3d(" + o + "px, " + l + "px, 0px) rotateX(" + n + "deg) rotateY(" + r + "deg)") } }, setTransition: function (e) { var t = this, i = t.slides, s = t.activeIndex, a = t.$wrapperEl; if (i.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e), t.params.virtualTranslate && 0 !== e) { var r = !1; i.eq(s).transitionEnd(function () { if (!r && t && !t.destroyed) { r = !0, t.animating = !1; for (var e = ["webkitTransitionEnd", "transitionend"], i = 0; i < e.length; i += 1)a.trigger(e[i]) } }) } } }, ie = { setTranslate: function () { for (var e = this.width, i = this.height, s = this.slides, a = this.$wrapperEl, r = this.slidesSizesGrid, n = this.params.coverflowEffect, o = this.isHorizontal(), l = this.translate, d = o ? e / 2 - l : i / 2 - l, p = o ? n.rotate : -n.rotate, c = n.depth, u = 0, f = s.length; u < f; u += 1) { var v = s.eq(u), m = r[u], g = (d - v[0].swiperSlideOffset - m / 2) / m * n.modifier, b = o ? p * g : 0, w = o ? 0 : p * g, y = -c * Math.abs(g), x = o ? 0 : n.stretch * g, T = o ? n.stretch * g : 0; Math.abs(T) < .001 && (T = 0), Math.abs(x) < .001 && (x = 0), Math.abs(y) < .001 && (y = 0), Math.abs(b) < .001 && (b = 0), Math.abs(w) < .001 && (w = 0); var E = "translate3d(" + T + "px," + x + "px," + y + "px) rotateX(" + w + "deg) rotateY(" + b + "deg)"; if (v.transform(E), v[0].style.zIndex = 1 - Math.abs(Math.round(g)), n.slideShadows) { var S = o ? v.find(".swiper-slide-shadow-left") : v.find(".swiper-slide-shadow-top"), C = o ? v.find(".swiper-slide-shadow-right") : v.find(".swiper-slide-shadow-bottom"); 0 === S.length && (S = t('<div class="swiper-slide-shadow-' + (o ? "left" : "top") + '"></div>'), v.append(S)), 0 === C.length && (C = t('<div class="swiper-slide-shadow-' + (o ? "right" : "bottom") + '"></div>'), v.append(C)), S.length && (S[0].style.opacity = g > 0 ? g : 0), C.length && (C[0].style.opacity = -g > 0 ? -g : 0) } } (h.pointerEvents || h.prefixedPointerEvents) && (a[0].style.perspectiveOrigin = d + "px 50%") }, setTransition: function (e) { this.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e) } }, se = [$, L, D, O, H, X, G, { name: "mousewheel", params: { mousewheel: { enabled: !1, releaseOnEdges: !1, invert: !1, forceToAxis: !1, sensitivity: 1, eventsTarged: "container" } }, create: function () { l.extend(this, { mousewheel: { enabled: !1, enable: B.enable.bind(this), disable: B.disable.bind(this), handle: B.handle.bind(this), lastScrollTime: l.now() } }) }, on: { init: function () { this.params.mousewheel.enabled && this.mousewheel.enable() }, destroy: function () { this.mousewheel.enabled && this.mousewheel.disable() } } }, { name: "navigation", params: { navigation: { nextEl: null, prevEl: null, hideOnClick: !1, disabledClass: "swiper-button-disabled", hiddenClass: "swiper-button-hidden", lockClass: "swiper-button-lock" } }, create: function () { l.extend(this, { navigation: { init: V.init.bind(this), update: V.update.bind(this), destroy: V.destroy.bind(this) } }) }, on: { init: function () { this.navigation.init(), this.navigation.update() }, toEdge: function () { this.navigation.update() }, fromEdge: function () { this.navigation.update() }, destroy: function () { this.navigation.destroy() }, click: function (e) { var i = this.navigation, s = i.$nextEl, a = i.$prevEl; !this.params.navigation.hideOnClick || t(e.target).is(a) || t(e.target).is(s) || (s && s.toggleClass(this.params.navigation.hiddenClass), a && a.toggleClass(this.params.navigation.hiddenClass)) } } }, { name: "pagination", params: { pagination: { el: null, bulletElement: "span", clickable: !1, hideOnClick: !1, renderBullet: null, renderProgressbar: null, renderFraction: null, renderCustom: null, type: "bullets", dynamicBullets: !1, bulletClass: "swiper-pagination-bullet", bulletActiveClass: "swiper-pagination-bullet-active", modifierClass: "swiper-pagination-", currentClass: "swiper-pagination-current", totalClass: "swiper-pagination-total", hiddenClass: "swiper-pagination-hidden", progressbarFillClass: "swiper-pagination-progressbar-fill", clickableClass: "swiper-pagination-clickable", lockClass: "swiper-pagination-lock" } }, create: function () { l.extend(this, { pagination: { init: R.init.bind(this), render: R.render.bind(this), update: R.update.bind(this), destroy: R.destroy.bind(this) } }) }, on: { init: function () { this.pagination.init(), this.pagination.render(), this.pagination.update() }, activeIndexChange: function () { this.params.loop ? this.pagination.update() : void 0 === this.snapIndex && this.pagination.update() }, snapIndexChange: function () { this.params.loop || this.pagination.update() }, slidesLengthChange: function () { this.params.loop && (this.pagination.render(), this.pagination.update()) }, snapGridLengthChange: function () { this.params.loop || (this.pagination.render(), this.pagination.update()) }, destroy: function () { this.pagination.destroy() }, click: function (e) { this.params.pagination.el && this.params.pagination.hideOnClick && this.pagination.$el.length > 0 && !t(e.target).hasClass(this.params.pagination.bulletClass) && this.pagination.$el.toggleClass(this.params.pagination.hiddenClass) } } }, { name: "scrollbar", params: { scrollbar: { el: null, dragSize: "auto", hide: !1, draggable: !1, snapOnRelease: !0, lockClass: "swiper-scrollbar-lock" } }, create: function () { l.extend(this, { scrollbar: { init: F.init.bind(this), destroy: F.destroy.bind(this), updateSize: F.updateSize.bind(this), setTranslate: F.setTranslate.bind(this), setTransition: F.setTransition.bind(this), enableDraggable: F.enableDraggable.bind(this), disableDraggable: F.disableDraggable.bind(this), setDragPosition: F.setDragPosition.bind(this), onDragStart: F.onDragStart.bind(this), onDragMove: F.onDragMove.bind(this), onDragEnd: F.onDragEnd.bind(this), isTouched: !1, timeout: null, dragTimeout: null } }) }, on: { init: function () { this.scrollbar.init(), this.scrollbar.updateSize(), this.scrollbar.setTranslate() }, update: function () { this.scrollbar.updateSize() }, resize: function () { this.scrollbar.updateSize() }, observerUpdate: function () { this.scrollbar.updateSize() }, setTranslate: function () { this.scrollbar.setTranslate() }, setTransition: function (e) { this.scrollbar.setTransition(e) }, destroy: function () { this.scrollbar.destroy() } } }, { name: "parallax", params: { parallax: { enabled: !1 } }, create: function () { l.extend(this, { parallax: { setTransform: W.setTransform.bind(this), setTranslate: W.setTranslate.bind(this), setTransition: W.setTransition.bind(this) } }) }, on: { beforeInit: function () { this.params.watchSlidesProgress = !0 }, init: function () { this.params.parallax && this.parallax.setTranslate() }, setTranslate: function () { this.params.parallax && this.parallax.setTranslate() }, setTransition: function (e) { this.params.parallax && this.parallax.setTransition(e) } } }, { name: "zoom", params: { zoom: { enabled: !1, maxRatio: 3, minRatio: 1, toggle: !0, containerClass: "swiper-zoom-container", zoomedSlideClass: "swiper-slide-zoomed" } }, create: function () { var e = this, t = { enabled: !1, scale: 1, currentScale: 1, isScaling: !1, gesture: { $slideEl: void 0, slideWidth: void 0, slideHeight: void 0, $imageEl: void 0, $imageWrapEl: void 0, maxRatio: 3 }, image: { isTouched: void 0, isMoved: void 0, currentX: void 0, currentY: void 0, minX: void 0, minY: void 0, maxX: void 0, maxY: void 0, width: void 0, height: void 0, startX: void 0, startY: void 0, touchesStart: {}, touchesCurrent: {} }, velocity: { x: void 0, y: void 0, prevPositionX: void 0, prevPositionY: void 0, prevTime: void 0 } }; "onGestureStart onGestureChange onGestureEnd onTouchStart onTouchMove onTouchEnd onTransitionEnd toggle enable disable in out".split(" ").forEach(function (i) { t[i] = j[i].bind(e) }), l.extend(e, { zoom: t }) }, on: { init: function () { this.params.zoom.enabled && this.zoom.enable() }, destroy: function () { this.zoom.disable() }, touchStart: function (e) { this.zoom.enabled && this.zoom.onTouchStart(e) }, touchEnd: function (e) { this.zoom.enabled && this.zoom.onTouchEnd(e) }, doubleTap: function (e) { this.params.zoom.enabled && this.zoom.enabled && this.params.zoom.toggle && this.zoom.toggle(e) }, transitionEnd: function () { this.zoom.enabled && this.params.zoom.enabled && this.zoom.onTransitionEnd() } } }, { name: "lazy", params: { lazy: { enabled: !1, loadPrevNext: !1, loadPrevNextAmount: 1, loadOnTransitionStart: !1, elementClass: "swiper-lazy", loadingClass: "swiper-lazy-loading", loadedClass: "swiper-lazy-loaded", preloaderClass: "swiper-lazy-preloader" } }, create: function () { l.extend(this, { lazy: { initialImageLoaded: !1, load: q.load.bind(this), loadInSlide: q.loadInSlide.bind(this) } }) }, on: { beforeInit: function () { this.params.lazy.enabled && this.params.preloadImages && (this.params.preloadImages = !1) }, init: function () { this.params.lazy.enabled && !this.params.loop && 0 === this.params.initialSlide && this.lazy.load() }, scroll: function () { this.params.freeMode && !this.params.freeModeSticky && this.lazy.load() }, resize: function () { this.params.lazy.enabled && this.lazy.load() }, scrollbarDragMove: function () { this.params.lazy.enabled && this.lazy.load() }, transitionStart: function () { this.params.lazy.enabled && (this.params.lazy.loadOnTransitionStart || !this.params.lazy.loadOnTransitionStart && !this.lazy.initialImageLoaded) && this.lazy.load() }, transitionEnd: function () { this.params.lazy.enabled && !this.params.lazy.loadOnTransitionStart && this.lazy.load() } } }, { name: "controller", params: { controller: { control: void 0, inverse: !1, by: "slide" } }, create: function () { l.extend(this, { controller: { control: this.params.controller.control, getInterpolateFunction: K.getInterpolateFunction.bind(this), setTranslate: K.setTranslate.bind(this), setTransition: K.setTransition.bind(this) } }) }, on: { update: function () { this.controller.control && this.controller.spline && (this.controller.spline = void 0, delete this.controller.spline) }, resize: function () { this.controller.control && this.controller.spline && (this.controller.spline = void 0, delete this.controller.spline) }, observerUpdate: function () { this.controller.control && this.controller.spline && (this.controller.spline = void 0, delete this.controller.spline) }, setTranslate: function (e, t) { this.controller.control && this.controller.setTranslate(e, t) }, setTransition: function (e, t) { this.controller.control && this.controller.setTransition(e, t) } } }, { name: "a11y", params: { a11y: { enabled: !1, notificationClass: "swiper-notification", prevSlideMessage: "Previous slide", nextSlideMessage: "Next slide", firstSlideMessage: "This is the first slide", lastSlideMessage: "This is the last slide", paginationBulletMessage: "Go to slide {{index}}" } }, create: function () { var e = this; l.extend(e, { a11y: { liveRegion: t('<span class="' + e.params.a11y.notificationClass + '" aria-live="assertive" aria-atomic="true"></span>') } }), Object.keys(U).forEach(function (t) { e.a11y[t] = U[t].bind(e) }) }, on: { init: function () { this.params.a11y.enabled && (this.a11y.init(), this.a11y.updateNavigation()) }, toEdge: function () { this.params.a11y.enabled && this.a11y.updateNavigation() }, fromEdge: function () { this.params.a11y.enabled && this.a11y.updateNavigation() }, paginationUpdate: function () { this.params.a11y.enabled && this.a11y.updatePagination() }, destroy: function () { this.params.a11y.enabled && this.a11y.destroy() } } }, { name: "history", params: { history: { enabled: !1, replaceState: !1, key: "slides" } }, create: function () { l.extend(this, { history: { init: _.init.bind(this), setHistory: _.setHistory.bind(this), setHistoryPopState: _.setHistoryPopState.bind(this), scrollToSlide: _.scrollToSlide.bind(this), destroy: _.destroy.bind(this) } }) }, on: { init: function () { this.params.history.enabled && this.history.init() }, destroy: function () { this.params.history.enabled && this.history.destroy() }, transitionEnd: function () { this.history.initialized && this.history.setHistory(this.params.history.key, this.activeIndex) } } }, { name: "hash-navigation", params: { hashNavigation: { enabled: !1, replaceState: !1, watchState: !1 } }, create: function () { l.extend(this, { hashNavigation: { initialized: !1, init: Z.init.bind(this), destroy: Z.destroy.bind(this), setHash: Z.setHash.bind(this), onHashCange: Z.onHashCange.bind(this) } }) }, on: { init: function () { this.params.hashNavigation.enabled && this.hashNavigation.init() }, destroy: function () { this.params.hashNavigation.enabled && this.hashNavigation.destroy() }, transitionEnd: function () { this.hashNavigation.initialized && this.hashNavigation.setHash() } } }, { name: "autoplay", params: { autoplay: { enabled: !1, delay: 3e3, waitForTransition: !0, disableOnInteraction: !0, stopOnLastSlide: !1, reverseDirection: !1 } }, create: function () { l.extend(this, { autoplay: { running: !1, paused: !1, run: Q.run.bind(this), start: Q.start.bind(this), stop: Q.stop.bind(this), pause: Q.pause.bind(this) } }) }, on: { init: function () { this.params.autoplay.enabled && this.autoplay.start() }, beforeTransitionStart: function (e, t) { this.autoplay.running && (t || !this.params.autoplay.disableOnInteraction ? this.autoplay.pause(e) : this.autoplay.stop()) }, sliderFirstMove: function () { this.autoplay.running && (this.params.autoplay.disableOnInteraction ? this.autoplay.stop() : this.autoplay.pause()) }, destroy: function () { this.autoplay.running && this.autoplay.stop() } } }, { name: "effect-fade", params: { fadeEffect: { crossFade: !1 } }, create: function () { l.extend(this, { fadeEffect: { setTranslate: J.setTranslate.bind(this), setTransition: J.setTransition.bind(this) } }) }, on: { beforeInit: function () { if ("fade" === this.params.effect) { this.classNames.push(this.params.containerModifierClass + "fade"); var e = { slidesPerView: 1, slidesPerColumn: 1, slidesPerGroup: 1, watchSlidesProgress: !0, spaceBetween: 0, virtualTranslate: !0 }; l.extend(this.params, e), l.extend(this.originalParams, e) } }, setTranslate: function () { "fade" === this.params.effect && this.fadeEffect.setTranslate() }, setTransition: function (e) { "fade" === this.params.effect && this.fadeEffect.setTransition(e) } } }, { name: "effect-cube", params: { cubeEffect: { slideShadows: !0, shadow: !0, shadowOffset: 20, shadowScale: .94 } }, create: function () { l.extend(this, { cubeEffect: { setTranslate: ee.setTranslate.bind(this), setTransition: ee.setTransition.bind(this) } }) }, on: { beforeInit: function () { if ("cube" === this.params.effect) { this.classNames.push(this.params.containerModifierClass + "cube"), this.classNames.push(this.params.containerModifierClass + "3d"); var e = { slidesPerView: 1, slidesPerColumn: 1, slidesPerGroup: 1, watchSlidesProgress: !0, resistanceRatio: 0, spaceBetween: 0, centeredSlides: !1, virtualTranslate: !0 }; l.extend(this.params, e), l.extend(this.originalParams, e) } }, setTranslate: function () { "cube" === this.params.effect && this.cubeEffect.setTranslate() }, setTransition: function (e) { "cube" === this.params.effect && this.cubeEffect.setTransition(e) } } }, { name: "effect-flip", params: { flipEffect: { slideShadows: !0, limitRotation: !0 } }, create: function () { l.extend(this, { flipEffect: { setTranslate: te.setTranslate.bind(this), setTransition: te.setTransition.bind(this) } }) }, on: { beforeInit: function () { if ("flip" === this.params.effect) { this.classNames.push(this.params.containerModifierClass + "flip"), this.classNames.push(this.params.containerModifierClass + "3d"); var e = { slidesPerView: 1, slidesPerColumn: 1, slidesPerGroup: 1, watchSlidesProgress: !0, spaceBetween: 0, virtualTranslate: !0 }; l.extend(this.params, e), l.extend(this.originalParams, e) } }, setTranslate: function () { "flip" === this.params.effect && this.flipEffect.setTranslate() }, setTransition: function (e) { "flip" === this.params.effect && this.flipEffect.setTransition(e) } } }, { name: "effect-coverflow", params: { coverflowEffect: { rotate: 50, stretch: 0, depth: 100, modifier: 1, slideShadows: !0 } }, create: function () { l.extend(this, { coverflowEffect: { setTranslate: ie.setTranslate.bind(this), setTransition: ie.setTransition.bind(this) } }) }, on: { beforeInit: function () { "coverflow" === this.params.effect && (this.classNames.push(this.params.containerModifierClass + "coverflow"), this.classNames.push(this.params.containerModifierClass + "3d"), this.params.watchSlidesProgress = !0, this.originalParams.watchSlidesProgress = !0) }, setTranslate: function () { "coverflow" === this.params.effect && this.coverflowEffect.setTranslate() }, setTransition: function (e) { "coverflow" === this.params.effect && this.coverflowEffect.setTransition(e) } } }]; return void 0 === k.use && (k.use = k.Class.use, k.installModule = k.Class.installModule), k.use(se), k });
/**
* @module Lightgallery
* @author Sachin N
* @see http://sachinchoolur.github.io/lightGallery/
* @license GPLv3
* @version 1.6.2 - 2017-10-03
*/
!function (a, b) { "function" == typeof define && define.amd ? define(["jquery"], function (a) { return b(a) }) : "object" == typeof exports ? module.exports = b(require("jquery")) : b(a.jQuery) }(this, function (a) { !function () { "use strict"; function b(b, d) { if (this.el = b, this.$el = a(b), this.s = a.extend({}, c, d), this.s.dynamic && "undefined" !== this.s.dynamicEl && this.s.dynamicEl.constructor === Array && !this.s.dynamicEl.length) throw "When using dynamic mode, you must also define dynamicEl as an Array."; return this.modules = {}, this.lGalleryOn = !1, this.lgBusy = !1, this.hideBartimeout = !1, this.isTouch = "ontouchstart" in document.documentElement, this.s.slideEndAnimatoin && (this.s.hideControlOnEnd = !1), this.s.dynamic ? this.$items = this.s.dynamicEl : "this" === this.s.selector ? this.$items = this.$el : "" !== this.s.selector ? this.s.selectWithin ? this.$items = a(this.s.selectWithin).find(this.s.selector) : this.$items = this.$el.find(a(this.s.selector)) : this.$items = this.$el.children(), this.$slide = "", this.$outer = "", this.init(), this } var c = { mode: "lg-slide", cssEasing: "ease", easing: "linear", speed: 600, height: "100%", width: "100%", addClass: "", startClass: "lg-start-zoom", backdropDuration: 150, hideBarsDelay: 6e3, useLeft: !1, closable: !0, loop: !0, escKey: !0, keyPress: !0, controls: !0, slideEndAnimatoin: !0, hideControlOnEnd: !1, mousewheel: !0, getCaptionFromTitleOrAlt: !0, appendSubHtmlTo: ".lg-sub-html", subHtmlSelectorRelative: !1, preload: 1, showAfterLoad: !0, selector: "", selectWithin: "", nextHtml: "", prevHtml: "", index: !1, iframeMaxWidth: "100%", download: !0, counter: !0, appendCounterTo: ".lg-toolbar", swipeThreshold: 50, enableSwipe: !0, enableDrag: !0, dynamic: !1, dynamicEl: [], galleryId: 1 }; b.prototype.init = function () { var b = this; b.s.preload > b.$items.length && (b.s.preload = b.$items.length); var c = window.location.hash; c.indexOf("lg=" + this.s.galleryId) > 0 && (b.index = parseInt(c.split("&slide=")[1], 10), a("body").addClass("lg-from-hash"), a("body").hasClass("lg-on") || (setTimeout(function () { b.build(b.index) }), a("body").addClass("lg-on"))), b.s.dynamic ? (b.$el.trigger("onBeforeOpen.lg"), b.index = b.s.index || 0, a("body").hasClass("lg-on") || setTimeout(function () { b.build(b.index), a("body").addClass("lg-on") })) : b.$items.on("click.lgcustom", function (c) { try { c.preventDefault(), c.preventDefault() } catch (a) { c.returnValue = !1 } b.$el.trigger("onBeforeOpen.lg"), b.index = b.s.index || b.$items.index(this), a("body").hasClass("lg-on") || (b.build(b.index), a("body").addClass("lg-on")) }) }, b.prototype.build = function (b) { var c = this; c.structure(), a.each(a.fn.lightGallery.modules, function (b) { c.modules[b] = new a.fn.lightGallery.modules[b](c.el) }), c.slide(b, !1, !1, !1), c.s.keyPress && c.keyPress(), c.$items.length > 1 ? (c.arrow(), setTimeout(function () { c.enableDrag(), c.enableSwipe() }, 50), c.s.mousewheel && c.mousewheel()) : c.$slide.on("click.lg", function () { c.$el.trigger("onSlideClick.lg") }), c.counter(), c.closeGallery(), c.$el.trigger("onAfterOpen.lg"), c.$outer.on("mousemove.lg click.lg touchstart.lg", function () { c.$outer.removeClass("lg-hide-items"), clearTimeout(c.hideBartimeout), c.hideBartimeout = setTimeout(function () { c.$outer.addClass("lg-hide-items") }, c.s.hideBarsDelay) }), c.$outer.trigger("mousemove.lg") }, b.prototype.structure = function () { var b, c = "", d = "", e = 0, f = "", g = this; for (a("body").append('<div class="lg-backdrop"></div>'), a(".lg-backdrop").css("transition-duration", this.s.backdropDuration + "ms"), e = 0; e < this.$items.length; e++)c += '<div class="lg-item"></div>'; if (this.s.controls && this.$items.length > 1 && (d = '<div class="lg-actions"><button class="lg-prev lg-icon">' + this.s.prevHtml + '</button><button class="lg-next lg-icon">' + this.s.nextHtml + "</button></div>"), ".lg-sub-html" === this.s.appendSubHtmlTo && (f = '<div class="lg-sub-html"></div>'), b = '<div class="lg-outer ' + this.s.addClass + " " + this.s.startClass + '"><div class="lg" style="width:' + this.s.width + "; height:" + this.s.height + '"><div class="lg-inner">' + c + '</div><div class="lg-toolbar lg-group"><span class="lg-close lg-icon"></span></div>' + d + f + "</div></div>", a("body").append(b), this.$outer = a(".lg-outer"), this.$slide = this.$outer.find(".lg-item"), this.s.useLeft ? (this.$outer.addClass("lg-use-left"), this.s.mode = "lg-slide") : this.$outer.addClass("lg-use-css3"), g.setTop(), a(window).on("resize.lg orientationchange.lg", function () { setTimeout(function () { g.setTop() }, 100) }), this.$slide.eq(this.index).addClass("lg-current"), this.doCss() ? this.$outer.addClass("lg-css3") : (this.$outer.addClass("lg-css"), this.s.speed = 0), this.$outer.addClass(this.s.mode), this.s.enableDrag && this.$items.length > 1 && this.$outer.addClass("lg-grab"), this.s.showAfterLoad && this.$outer.addClass("lg-show-after-load"), this.doCss()) { var h = this.$outer.find(".lg-inner"); h.css("transition-timing-function", this.s.cssEasing), h.css("transition-duration", this.s.speed + "ms") } setTimeout(function () { a(".lg-backdrop").addClass("in") }), setTimeout(function () { g.$outer.addClass("lg-visible") }, this.s.backdropDuration), this.s.download && this.$outer.find(".lg-toolbar").append('<a id="lg-download" target="_blank" download class="lg-download lg-icon"></a>'), this.prevScrollTop = a(window).scrollTop() }, b.prototype.setTop = function () { if ("100%" !== this.s.height) { var b = a(window).height(), c = (b - parseInt(this.s.height, 10)) / 2, d = this.$outer.find(".lg"); b >= parseInt(this.s.height, 10) ? d.css("top", c + "px") : d.css("top", "0px") } }, b.prototype.doCss = function () { var a = function () { var a = ["transition", "MozTransition", "WebkitTransition", "OTransition", "msTransition", "KhtmlTransition"], b = document.documentElement, c = 0; for (c = 0; c < a.length; c++)if (a[c] in b.style) return !0 }; return !!a() }, b.prototype.isVideo = function (a, b) { var c; if (c = this.s.dynamic ? this.s.dynamicEl[b].html : this.$items.eq(b).attr("data-html"), !a) return c ? { html5: !0 } : (console.error("lightGallery :- data-src is not pvovided on slide item " + (b + 1) + ". Please make sure the selector property is properly configured. More info - http://sachinchoolur.github.io/lightGallery/demos/html-markup.html"), !1); var d = a.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)/i), e = a.match(/\/\/(?:www\.)?vimeo.com\/([0-9a-z\-_]+)/i), f = a.match(/\/\/(?:www\.)?dai.ly\/([0-9a-z\-_]+)/i), g = a.match(/\/\/(?:www\.)?(?:vk\.com|vkontakte\.ru)\/(?:video_ext\.php\?)(.*)/i); return d ? { youtube: d } : e ? { vimeo: e } : f ? { dailymotion: f } : g ? { vk: g } : void 0 }, b.prototype.counter = function () { this.s.counter && a(this.s.appendCounterTo).append('<div id="lg-counter"><span id="lg-counter-current">' + (parseInt(this.index, 10) + 1) + '</span> / <span id="lg-counter-all">' + this.$items.length + "</span></div>") }, b.prototype.addHtml = function (b) { var c, d, e = null; if (this.s.dynamic ? this.s.dynamicEl[b].subHtmlUrl ? c = this.s.dynamicEl[b].subHtmlUrl : e = this.s.dynamicEl[b].subHtml : (d = this.$items.eq(b), d.attr("data-sub-html-url") ? c = d.attr("data-sub-html-url") : (e = d.attr("data-sub-html"), this.s.getCaptionFromTitleOrAlt && !e && (e = d.attr("title") || d.find("img").first().attr("alt")))), !c) if ("undefined" != typeof e && null !== e) { var f = e.substring(0, 1); "." !== f && "#" !== f || (e = this.s.subHtmlSelectorRelative && !this.s.dynamic ? d.find(e).html() : a(e).html()) } else e = ""; ".lg-sub-html" === this.s.appendSubHtmlTo ? c ? this.$outer.find(this.s.appendSubHtmlTo).load(c) : this.$outer.find(this.s.appendSubHtmlTo).html(e) : c ? this.$slide.eq(b).load(c) : this.$slide.eq(b).append(e), "undefined" != typeof e && null !== e && ("" === e ? this.$outer.find(this.s.appendSubHtmlTo).addClass("lg-empty-html") : this.$outer.find(this.s.appendSubHtmlTo).removeClass("lg-empty-html")), this.$el.trigger("onAfterAppendSubHtml.lg", [b]) }, b.prototype.preload = function (a) { var b = 1, c = 1; for (b = 1; b <= this.s.preload && !(b >= this.$items.length - a); b++)this.loadContent(a + b, !1, 0); for (c = 1; c <= this.s.preload && !(a - c < 0); c++)this.loadContent(a - c, !1, 0) }, b.prototype.loadContent = function (b, c, d) { var e, f, g, h, i, j, k = this, l = !1, m = function (b) { for (var c = [], d = [], e = 0; e < b.length; e++) { var g = b[e].split(" "); "" === g[0] && g.splice(0, 1), d.push(g[0]), c.push(g[1]) } for (var h = a(window).width(), i = 0; i < c.length; i++)if (parseInt(c[i], 10) > h) { f = d[i]; break } }; if (k.s.dynamic) { if (k.s.dynamicEl[b].poster && (l = !0, g = k.s.dynamicEl[b].poster), j = k.s.dynamicEl[b].html, f = k.s.dynamicEl[b].src, k.s.dynamicEl[b].responsive) { var n = k.s.dynamicEl[b].responsive.split(","); m(n) } h = k.s.dynamicEl[b].srcset, i = k.s.dynamicEl[b].sizes } else { if (k.$items.eq(b).attr("data-poster") && (l = !0, g = k.$items.eq(b).attr("data-poster")), j = k.$items.eq(b).attr("data-html"), f = k.$items.eq(b).attr("href") || k.$items.eq(b).attr("data-src"), k.$items.eq(b).attr("data-responsive")) { var o = k.$items.eq(b).attr("data-responsive").split(","); m(o) } h = k.$items.eq(b).attr("data-srcset"), i = k.$items.eq(b).attr("data-sizes") } var p = !1; k.s.dynamic ? k.s.dynamicEl[b].iframe && (p = !0) : "true" === k.$items.eq(b).attr("data-iframe") && (p = !0); var q = k.isVideo(f, b); if (!k.$slide.eq(b).hasClass("lg-loaded")) { if (p) k.$slide.eq(b).prepend('<div class="lg-video-cont lg-has-iframe" style="max-width:' + k.s.iframeMaxWidth + '"><div class="lg-video"><iframe class="lg-object" frameborder="0" src="' + f + '" allowfullscreen="true"></iframe></div></div>'); else if (l) { var r = ""; r = q && q.youtube ? "lg-has-youtube" : q && q.vimeo ? "lg-has-vimeo" : "lg-has-html5", k.$slide.eq(b).prepend('<div class="lg-video-cont ' + r + ' "><div class="lg-video"><span class="lg-video-play"></span><img class="lg-object lg-has-poster" src="' + g + '" /></div></div>') } else q ? (k.$slide.eq(b).prepend('<div class="lg-video-cont "><div class="lg-video"></div></div>'), k.$el.trigger("hasVideo.lg", [b, f, j])) : k.$slide.eq(b).prepend('<div class="lg-img-wrap"><img class="lg-object lg-image" src="' + f + '" /></div>'); if (k.$el.trigger("onAferAppendSlide.lg", [b]), e = k.$slide.eq(b).find(".lg-object"), i && e.attr("sizes", i), h) { e.attr("srcset", h); try { picturefill({ elements: [e[0]] }) } catch (a) { console.warn("lightGallery :- If you want srcset to be supported for older browser please include picturefil version 2 javascript library in your document.") } } ".lg-sub-html" !== this.s.appendSubHtmlTo && k.addHtml(b), k.$slide.eq(b).addClass("lg-loaded") } k.$slide.eq(b).find(".lg-object").on("load.lg error.lg", function () { var c = 0; d && !a("body").hasClass("lg-from-hash") && (c = d), setTimeout(function () { k.$slide.eq(b).addClass("lg-complete"), k.$el.trigger("onSlideItemLoad.lg", [b, d || 0]) }, c) }), q && q.html5 && !l && k.$slide.eq(b).addClass("lg-complete"), c === !0 && (k.$slide.eq(b).hasClass("lg-complete") ? k.preload(b) : k.$slide.eq(b).find(".lg-object").on("load.lg error.lg", function () { k.preload(b) })) }, b.prototype.slide = function (b, c, d, e) { var f = this.$outer.find(".lg-current").index(), g = this; if (!g.lGalleryOn || f !== b) { var h = this.$slide.length, i = g.lGalleryOn ? this.s.speed : 0; if (!g.lgBusy) { if (this.s.download) { var j; j = g.s.dynamic ? g.s.dynamicEl[b].downloadUrl !== !1 && (g.s.dynamicEl[b].downloadUrl || g.s.dynamicEl[b].src) : "false" !== g.$items.eq(b).attr("data-download-url") && (g.$items.eq(b).attr("data-download-url") || g.$items.eq(b).attr("href") || g.$items.eq(b).attr("data-src")), j ? (a("#lg-download").attr("href", j), g.$outer.removeClass("lg-hide-download")) : g.$outer.addClass("lg-hide-download") } if (this.$el.trigger("onBeforeSlide.lg", [f, b, c, d]), g.lgBusy = !0, clearTimeout(g.hideBartimeout), ".lg-sub-html" === this.s.appendSubHtmlTo && setTimeout(function () { g.addHtml(b) }, i), this.arrowDisable(b), e || (b < f ? e = "prev" : b > f && (e = "next")), c) { this.$slide.removeClass("lg-prev-slide lg-current lg-next-slide"); var k, l; h > 2 ? (k = b - 1, l = b + 1, 0 === b && f === h - 1 ? (l = 0, k = h - 1) : b === h - 1 && 0 === f && (l = 0, k = h - 1)) : (k = 0, l = 1), "prev" === e ? g.$slide.eq(l).addClass("lg-next-slide") : g.$slide.eq(k).addClass("lg-prev-slide"), g.$slide.eq(b).addClass("lg-current") } else g.$outer.addClass("lg-no-trans"), this.$slide.removeClass("lg-prev-slide lg-next-slide"), "prev" === e ? (this.$slide.eq(b).addClass("lg-prev-slide"), this.$slide.eq(f).addClass("lg-next-slide")) : (this.$slide.eq(b).addClass("lg-next-slide"), this.$slide.eq(f).addClass("lg-prev-slide")), setTimeout(function () { g.$slide.removeClass("lg-current"), g.$slide.eq(b).addClass("lg-current"), g.$outer.removeClass("lg-no-trans") }, 50); g.lGalleryOn ? (setTimeout(function () { g.loadContent(b, !0, 0) }, this.s.speed + 50), setTimeout(function () { g.lgBusy = !1, g.$el.trigger("onAfterSlide.lg", [f, b, c, d]) }, this.s.speed)) : (g.loadContent(b, !0, g.s.backdropDuration), g.lgBusy = !1, g.$el.trigger("onAfterSlide.lg", [f, b, c, d])), g.lGalleryOn = !0, this.s.counter && a("#lg-counter-current").text(b + 1) } g.index = b } }, b.prototype.goToNextSlide = function (a) { var b = this, c = b.s.loop; a && b.$slide.length < 3 && (c = !1), b.lgBusy || (b.index + 1 < b.$slide.length ? (b.index++, b.$el.trigger("onBeforeNextSlide.lg", [b.index]), b.slide(b.index, a, !1, "next")) : c ? (b.index = 0, b.$el.trigger("onBeforeNextSlide.lg", [b.index]), b.slide(b.index, a, !1, "next")) : b.s.slideEndAnimatoin && !a && (b.$outer.addClass("lg-right-end"), setTimeout(function () { b.$outer.removeClass("lg-right-end") }, 400))) }, b.prototype.goToPrevSlide = function (a) { var b = this, c = b.s.loop; a && b.$slide.length < 3 && (c = !1), b.lgBusy || (b.index > 0 ? (b.index--, b.$el.trigger("onBeforePrevSlide.lg", [b.index, a]), b.slide(b.index, a, !1, "prev")) : c ? (b.index = b.$items.length - 1, b.$el.trigger("onBeforePrevSlide.lg", [b.index, a]), b.slide(b.index, a, !1, "prev")) : b.s.slideEndAnimatoin && !a && (b.$outer.addClass("lg-left-end"), setTimeout(function () { b.$outer.removeClass("lg-left-end") }, 400))) }, b.prototype.keyPress = function () { var b = this; this.$items.length > 1 && a(window).on("keyup.lg", function (a) { b.$items.length > 1 && (37 === a.keyCode && (a.preventDefault(), b.goToPrevSlide()), 39 === a.keyCode && (a.preventDefault(), b.goToNextSlide())) }), a(window).on("keydown.lg", function (a) { b.s.escKey === !0 && 27 === a.keyCode && (a.preventDefault(), b.$outer.hasClass("lg-thumb-open") ? b.$outer.removeClass("lg-thumb-open") : b.destroy()) }) }, b.prototype.arrow = function () { var a = this; this.$outer.find(".lg-prev").on("click.lg", function () { a.goToPrevSlide() }), this.$outer.find(".lg-next").on("click.lg", function () { a.goToNextSlide() }) }, b.prototype.arrowDisable = function (a) { !this.s.loop && this.s.hideControlOnEnd && (a + 1 < this.$slide.length ? this.$outer.find(".lg-next").removeAttr("disabled").removeClass("disabled") : this.$outer.find(".lg-next").attr("disabled", "disabled").addClass("disabled"), a > 0 ? this.$outer.find(".lg-prev").removeAttr("disabled").removeClass("disabled") : this.$outer.find(".lg-prev").attr("disabled", "disabled").addClass("disabled")) }, b.prototype.setTranslate = function (a, b, c) { this.s.useLeft ? a.css("left", b) : a.css({ transform: "translate3d(" + b + "px, " + c + "px, 0px)" }) }, b.prototype.touchMove = function (b, c) { var d = c - b; Math.abs(d) > 15 && (this.$outer.addClass("lg-dragging"), this.setTranslate(this.$slide.eq(this.index), d, 0), this.setTranslate(a(".lg-prev-slide"), -this.$slide.eq(this.index).width() + d, 0), this.setTranslate(a(".lg-next-slide"), this.$slide.eq(this.index).width() + d, 0)) }, b.prototype.touchEnd = function (a) { var b = this; "lg-slide" !== b.s.mode && b.$outer.addClass("lg-slide"), this.$slide.not(".lg-current, .lg-prev-slide, .lg-next-slide").css("opacity", "0"), setTimeout(function () { b.$outer.removeClass("lg-dragging"), a < 0 && Math.abs(a) > b.s.swipeThreshold ? b.goToNextSlide(!0) : a > 0 && Math.abs(a) > b.s.swipeThreshold ? b.goToPrevSlide(!0) : Math.abs(a) < 5 && b.$el.trigger("onSlideClick.lg"), b.$slide.removeAttr("style") }), setTimeout(function () { b.$outer.hasClass("lg-dragging") || "lg-slide" === b.s.mode || b.$outer.removeClass("lg-slide") }, b.s.speed + 100) }, b.prototype.enableSwipe = function () { var a = this, b = 0, c = 0, d = !1; a.s.enableSwipe && a.doCss() && (a.$slide.on("touchstart.lg", function (c) { a.$outer.hasClass("lg-zoomed") || a.lgBusy || (c.preventDefault(), a.manageSwipeClass(), b = c.originalEvent.targetTouches[0].pageX) }), a.$slide.on("touchmove.lg", function (e) { a.$outer.hasClass("lg-zoomed") || (e.preventDefault(), c = e.originalEvent.targetTouches[0].pageX, a.touchMove(b, c), d = !0) }), a.$slide.on("touchend.lg", function () { a.$outer.hasClass("lg-zoomed") || (d ? (d = !1, a.touchEnd(c - b)) : a.$el.trigger("onSlideClick.lg")) })) }, b.prototype.enableDrag = function () { var b = this, c = 0, d = 0, e = !1, f = !1; b.s.enableDrag && b.doCss() && (b.$slide.on("mousedown.lg", function (d) { b.$outer.hasClass("lg-zoomed") || (a(d.target).hasClass("lg-object") || a(d.target).hasClass("lg-video-play")) && (d.preventDefault(), b.lgBusy || (b.manageSwipeClass(), c = d.pageX, e = !0, b.$outer.scrollLeft += 1, b.$outer.scrollLeft -= 1, b.$outer.removeClass("lg-grab").addClass("lg-grabbing"), b.$el.trigger("onDragstart.lg"))) }), a(window).on("mousemove.lg", function (a) { e && (f = !0, d = a.pageX, b.touchMove(c, d), b.$el.trigger("onDragmove.lg")) }), a(window).on("mouseup.lg", function (g) { f ? (f = !1, b.touchEnd(d - c), b.$el.trigger("onDragend.lg")) : (a(g.target).hasClass("lg-object") || a(g.target).hasClass("lg-video-play")) && b.$el.trigger("onSlideClick.lg"), e && (e = !1, b.$outer.removeClass("lg-grabbing").addClass("lg-grab")) })) }, b.prototype.manageSwipeClass = function () { var a = this.index + 1, b = this.index - 1; this.s.loop && this.$slide.length > 2 && (0 === this.index ? b = this.$slide.length - 1 : this.index === this.$slide.length - 1 && (a = 0)), this.$slide.removeClass("lg-next-slide lg-prev-slide"), b > -1 && this.$slide.eq(b).addClass("lg-prev-slide"), this.$slide.eq(a).addClass("lg-next-slide") }, b.prototype.mousewheel = function () { var a = this; a.$outer.on("mousewheel.lg", function (b) { b.deltaY && (b.deltaY > 0 ? a.goToPrevSlide() : a.goToNextSlide(), b.preventDefault()) }) }, b.prototype.closeGallery = function () { var b = this, c = !1; this.$outer.find(".lg-close").on("click.lg", function () { b.destroy() }), b.s.closable && (b.$outer.on("mousedown.lg", function (b) { c = !!(a(b.target).is(".lg-outer") || a(b.target).is(".lg-item ") || a(b.target).is(".lg-img-wrap")) }), b.$outer.on("mouseup.lg", function (d) { (a(d.target).is(".lg-outer") || a(d.target).is(".lg-item ") || a(d.target).is(".lg-img-wrap") && c) && (b.$outer.hasClass("lg-dragging") || b.destroy()) })) }, b.prototype.destroy = function (b) { var c = this; b || (c.$el.trigger("onBeforeClose.lg"), a(window).scrollTop(c.prevScrollTop)), b && (c.s.dynamic || this.$items.off("click.lg click.lgcustom"), a.removeData(c.el, "lightGallery")), this.$el.off(".lg.tm"), a.each(a.fn.lightGallery.modules, function (a) { c.modules[a] && c.modules[a].destroy() }), this.lGalleryOn = !1, clearTimeout(c.hideBartimeout), this.hideBartimeout = !1, a(window).off(".lg"), a("body").removeClass("lg-on lg-from-hash"), c.$outer && c.$outer.removeClass("lg-visible"), a(".lg-backdrop").removeClass("in"), setTimeout(function () { c.$outer && c.$outer.remove(), a(".lg-backdrop").remove(), b || c.$el.trigger("onCloseAfter.lg") }, c.s.backdropDuration + 50) }, a.fn.lightGallery = function (c) { return this.each(function () { if (a.data(this, "lightGallery")) try { a(this).data("lightGallery").init() } catch (a) { console.error("lightGallery has not initiated properly") } else a.data(this, "lightGallery", new b(this, c)) }) }, a.fn.lightGallery.modules = {} }() }), 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 () { "use strict"; var b = { autoplay: !1, pause: 5e3, progressBar: !0, fourceAutoplay: !1, autoplayControls: !0, appendAutoplayControlsTo: ".lg-toolbar" }, c = function (c) { return this.core = a(c).data("lightGallery"), this.$el = a(c), !(this.core.$items.length < 2) && (this.core.s = a.extend({}, b, this.core.s), this.interval = !1, this.fromAuto = !0, this.canceledOnTouch = !1, this.fourceAutoplayTemp = this.core.s.fourceAutoplay, this.core.doCss() || (this.core.s.progressBar = !1), this.init(), this) }; c.prototype.init = function () { var a = this; a.core.s.autoplayControls && a.controls(), a.core.s.progressBar && a.core.$outer.find(".lg").append('<div class="lg-progress-bar"><div class="lg-progress"></div></div>'), a.progress(), a.core.s.autoplay && a.$el.one("onSlideItemLoad.lg.tm", function () { a.startlAuto() }), a.$el.on("onDragstart.lg.tm touchstart.lg.tm", function () { a.interval && (a.cancelAuto(), a.canceledOnTouch = !0) }), a.$el.on("onDragend.lg.tm touchend.lg.tm onSlideClick.lg.tm", function () { !a.interval && a.canceledOnTouch && (a.startlAuto(), a.canceledOnTouch = !1) }) }, c.prototype.progress = function () { var a, b, c = this; c.$el.on("onBeforeSlide.lg.tm", function () { c.core.s.progressBar && c.fromAuto && (a = c.core.$outer.find(".lg-progress-bar"), b = c.core.$outer.find(".lg-progress"), c.interval && (b.removeAttr("style"), a.removeClass("lg-start"), setTimeout(function () { b.css("transition", "width " + (c.core.s.speed + c.core.s.pause) + "ms ease 0s"), a.addClass("lg-start") }, 20))), c.fromAuto || c.core.s.fourceAutoplay || c.cancelAuto(), c.fromAuto = !1 }) }, c.prototype.controls = function () { var b = this, c = '<span class="lg-autoplay-button lg-icon"></span>'; a(this.core.s.appendAutoplayControlsTo).append(c), b.core.$outer.find(".lg-autoplay-button").on("click.lg", function () { a(b.core.$outer).hasClass("lg-show-autoplay") ? (b.cancelAuto(), b.core.s.fourceAutoplay = !1) : b.interval || (b.startlAuto(), b.core.s.fourceAutoplay = b.fourceAutoplayTemp) }) }, c.prototype.startlAuto = function () { var a = this; a.core.$outer.find(".lg-progress").css("transition", "width " + (a.core.s.speed + a.core.s.pause) + "ms ease 0s"), a.core.$outer.addClass("lg-show-autoplay"), a.core.$outer.find(".lg-progress-bar").addClass("lg-start"), a.interval = setInterval(function () { a.core.index + 1 < a.core.$items.length ? a.core.index++ : a.core.index = 0, a.fromAuto = !0, a.core.slide(a.core.index, !1, !1, "next") }, a.core.s.speed + a.core.s.pause) }, c.prototype.cancelAuto = function () { clearInterval(this.interval), this.interval = !1, this.core.$outer.find(".lg-progress").removeAttr("style"), this.core.$outer.removeClass("lg-show-autoplay"), this.core.$outer.find(".lg-progress-bar").removeClass("lg-start") }, c.prototype.destroy = function () { this.cancelAuto(), this.core.$outer.find(".lg-progress-bar").remove() }, a.fn.lightGallery.modules.autoplay = 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 () { "use strict"; var b = { fullScreen: !0 }, c = function (c) { return this.core = a(c).data("lightGallery"), this.$el = a(c), this.core.s = a.extend({}, b, this.core.s), this.init(), this }; c.prototype.init = function () { var a = ""; if (this.core.s.fullScreen) { if (!(document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled || document.msFullscreenEnabled)) return; a = '<span class="lg-fullscreen lg-icon"></span>', this.core.$outer.find(".lg-toolbar").append(a), this.fullScreen() } }, c.prototype.requestFullscreen = function () { var a = document.documentElement; a.requestFullscreen ? a.requestFullscreen() : a.msRequestFullscreen ? a.msRequestFullscreen() : a.mozRequestFullScreen ? a.mozRequestFullScreen() : a.webkitRequestFullscreen && a.webkitRequestFullscreen() }, c.prototype.exitFullscreen = function () { window.fullScreen ? document.exitFullscreen ? document.exitFullscreen() : document.msExitFullscreen ? document.msExitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitExitFullscreen && document.webkitExitFullscreen() : null }, c.prototype.fullScreen = function () { var b = this; a(document).on("fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg", function () { b.core.$outer.toggleClass("lg-fullscreen-on") }), this.core.$outer.find(".lg-fullscreen").on("click.lg", function () { document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement ? b.exitFullscreen() : b.requestFullscreen() }) }, c.prototype.destroy = function () { this.exitFullscreen(), a(document).off("fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg") }, a.fn.lightGallery.modules.fullscreen = 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 () { "use strict"; var b = { pager: !1 }, c = function (c) { return this.core = a(c).data("lightGallery"), this.$el = a(c), this.core.s = a.extend({}, b, this.core.s), this.core.s.pager && this.core.$items.length > 1 && this.init(), this }; c.prototype.init = function () { var b, c, d, e = this, f = ""; if (e.core.$outer.find(".lg").append('<div class="lg-pager-outer"></div>'), e.core.s.dynamic) for (var g = 0; g < e.core.s.dynamicEl.length; g++)f += '<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="' + e.core.s.dynamicEl[g].thumb + '" /></div></span>'; else e.core.$items.each(function () { f += e.core.s.exThumbImage ? '<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="' + a(this).attr(e.core.s.exThumbImage) + '" /></div></span>' : '<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="' + a(this).find("img").attr("src") + '" /></div></span>' }); c = e.core.$outer.find(".lg-pager-outer"), c.html(f), b = e.core.$outer.find(".lg-pager-cont"), b.on("click.lg touchend.lg", function () { var b = a(this); e.core.index = b.index(), e.core.slide(e.core.index, !1, !0, !1) }), c.on("mouseover.lg", function () { clearTimeout(d), c.addClass("lg-pager-hover") }), c.on("mouseout.lg", function () { d = setTimeout(function () { c.removeClass("lg-pager-hover") }) }), e.core.$el.on("onBeforeSlide.lg.tm", function (a, c, d) { b.removeClass("lg-pager-active"), b.eq(d).addClass("lg-pager-active") }) }, c.prototype.destroy = function () { }, a.fn.lightGallery.modules.pager = 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 () {
"use strict"; var b = { thumbnail: !0, animateThumb: !0, currentPagerPosition: "middle", thumbWidth: 100, thumbHeight: "80px", thumbContHeight: 100, thumbMargin: 5, exThumbImage: !1, showThumbByDefault: !0, toogleThumb: !0, pullCaptionUp: !0, enableThumbDrag: !0, enableThumbSwipe: !0, swipeThreshold: 50, loadYoutubeThumbnail: !0, youtubeThumbSize: 1, loadVimeoThumbnail: !0, vimeoThumbSize: "thumbnail_small", loadDailymotionThumbnail: !0 }, c = function (c) { return this.core = a(c).data("lightGallery"), this.core.s = a.extend({}, b, this.core.s), this.$el = a(c), this.$thumbOuter = null, this.thumbOuterWidth = 0, this.thumbTotalWidth = this.core.$items.length * (this.core.s.thumbWidth + this.core.s.thumbMargin), this.thumbIndex = this.core.index, this.core.s.animateThumb && (this.core.s.thumbHeight = "100%"), this.left = 0, this.init(), this }; c.prototype.init = function () { var a = this; this.core.s.thumbnail && this.core.$items.length > 1 && (this.core.s.showThumbByDefault && setTimeout(function () { a.core.$outer.addClass("lg-thumb-open") }, 700), this.core.s.pullCaptionUp && this.core.$outer.addClass("lg-pull-caption-up"), this.build(), this.core.s.animateThumb && this.core.doCss() ? (this.core.s.enableThumbDrag && this.enableThumbDrag(), this.core.s.enableThumbSwipe && this.enableThumbSwipe(), this.thumbClickable = !1) : this.thumbClickable = !0, this.toogle(), this.thumbkeyPress()) }, c.prototype.build = function () { function b(a, b, c) { var g, h = d.core.isVideo(a, c) || {}, i = ""; h.youtube || h.vimeo || h.dailymotion ? h.youtube ? g = d.core.s.loadYoutubeThumbnail ? "//img.youtube.com/vi/" + h.youtube[1] + "/" + d.core.s.youtubeThumbSize + ".jpg" : b : h.vimeo ? d.core.s.loadVimeoThumbnail ? (g = "//i.vimeocdn.com/video/error_" + f + ".jpg", i = h.vimeo[1]) : g = b : h.dailymotion && (g = d.core.s.loadDailymotionThumbnail ? "//www.dailymotion.com/thumbnail/video/" + h.dailymotion[1] : b) : g = b, e += '<div data-vimeo-id="' + i + '" class="lg-thumb-item" style="width:' + d.core.s.thumbWidth + "px; height: " + d.core.s.thumbHeight + "; margin-right: " + d.core.s.thumbMargin + 'px"><img src="' + g + '" /></div>', i = "" } var c, d = this, e = "", f = "", g = '<div class="lg-thumb-outer"><div class="lg-thumb lg-group"></div></div>'; switch (this.core.s.vimeoThumbSize) { case "thumbnail_large": f = "640"; break; case "thumbnail_medium": f = "200x150"; break; case "thumbnail_small": f = "100x75" }if (d.core.$outer.addClass("lg-has-thumb"), d.core.$outer.find(".lg").append(g), d.$thumbOuter = d.core.$outer.find(".lg-thumb-outer"), d.thumbOuterWidth = d.$thumbOuter.width(), d.core.s.animateThumb && d.core.$outer.find(".lg-thumb").css({ width: d.thumbTotalWidth + "px", position: "relative" }), this.core.s.animateThumb && d.$thumbOuter.css("height", d.core.s.thumbContHeight + "px"), d.core.s.dynamic) for (var h = 0; h < d.core.s.dynamicEl.length; h++)b(d.core.s.dynamicEl[h].src, d.core.s.dynamicEl[h].thumb, h); else d.core.$items.each(function (c) { d.core.s.exThumbImage ? b(a(this).attr("href") || a(this).attr("data-src"), a(this).attr(d.core.s.exThumbImage), c) : b(a(this).attr("href") || a(this).attr("data-src"), a(this).find("img").attr("src"), c) }); d.core.$outer.find(".lg-thumb").html(e), c = d.core.$outer.find(".lg-thumb-item"), c.each(function () { var b = a(this), c = b.attr("data-vimeo-id"); c && a.getJSON("//www.vimeo.com/api/v2/video/" + c + ".json?callback=?", { format: "json" }, function (a) { b.find("img").attr("src", a[0][d.core.s.vimeoThumbSize]) }) }), c.eq(d.core.index).addClass("active"), d.core.$el.on("onBeforeSlide.lg.tm", function () { c.removeClass("active"), c.eq(d.core.index).addClass("active") }), c.on("click.lg touchend.lg", function () { var b = a(this); setTimeout(function () { (d.thumbClickable && !d.core.lgBusy || !d.core.doCss()) && (d.core.index = b.index(), d.core.slide(d.core.index, !1, !0, !1)) }, 50) }), d.core.$el.on("onBeforeSlide.lg.tm", function () { d.animateThumb(d.core.index) }), a(window).on("resize.lg.thumb orientationchange.lg.thumb", function () { setTimeout(function () { d.animateThumb(d.core.index), d.thumbOuterWidth = d.$thumbOuter.width() }, 200) }) }, c.prototype.setTranslate = function (a) { this.core.$outer.find(".lg-thumb").css({ transform: "translate3d(-" + a + "px, 0px, 0px)" }) }, c.prototype.animateThumb = function (a) { var b = this.core.$outer.find(".lg-thumb"); if (this.core.s.animateThumb) { var c; switch (this.core.s.currentPagerPosition) { case "left": c = 0; break; case "middle": c = this.thumbOuterWidth / 2 - this.core.s.thumbWidth / 2; break; case "right": c = this.thumbOuterWidth - this.core.s.thumbWidth }this.left = (this.core.s.thumbWidth + this.core.s.thumbMargin) * a - 1 - c, this.left > this.thumbTotalWidth - this.thumbOuterWidth && (this.left = this.thumbTotalWidth - this.thumbOuterWidth), this.left < 0 && (this.left = 0), this.core.lGalleryOn ? (b.hasClass("on") || this.core.$outer.find(".lg-thumb").css("transition-duration", this.core.s.speed + "ms"), this.core.doCss() || b.animate({ left: -this.left + "px" }, this.core.s.speed)) : this.core.doCss() || b.css("left", -this.left + "px"), this.setTranslate(this.left) } }, c.prototype.enableThumbDrag = function () { var b = this, c = 0, d = 0, e = !1, f = !1, g = 0; b.$thumbOuter.addClass("lg-grab"), b.core.$outer.find(".lg-thumb").on("mousedown.lg.thumb", function (a) { b.thumbTotalWidth > b.thumbOuterWidth && (a.preventDefault(), c = a.pageX, e = !0, b.core.$outer.scrollLeft += 1, b.core.$outer.scrollLeft -= 1, b.thumbClickable = !1, b.$thumbOuter.removeClass("lg-grab").addClass("lg-grabbing")) }), a(window).on("mousemove.lg.thumb", function (a) { e && (g = b.left, f = !0, d = a.pageX, b.$thumbOuter.addClass("lg-dragging"), g -= d - c, g > b.thumbTotalWidth - b.thumbOuterWidth && (g = b.thumbTotalWidth - b.thumbOuterWidth), g < 0 && (g = 0), b.setTranslate(g)) }), a(window).on("mouseup.lg.thumb", function () { f ? (f = !1, b.$thumbOuter.removeClass("lg-dragging"), b.left = g, Math.abs(d - c) < b.core.s.swipeThreshold && (b.thumbClickable = !0)) : b.thumbClickable = !0, e && (e = !1, b.$thumbOuter.removeClass("lg-grabbing").addClass("lg-grab")) }) }, c.prototype.enableThumbSwipe = function () { var a = this, b = 0, c = 0, d = !1, e = 0; a.core.$outer.find(".lg-thumb").on("touchstart.lg", function (c) { a.thumbTotalWidth > a.thumbOuterWidth && (c.preventDefault(), b = c.originalEvent.targetTouches[0].pageX, a.thumbClickable = !1) }), a.core.$outer.find(".lg-thumb").on("touchmove.lg", function (f) { a.thumbTotalWidth > a.thumbOuterWidth && (f.preventDefault(), c = f.originalEvent.targetTouches[0].pageX, d = !0, a.$thumbOuter.addClass("lg-dragging"), e = a.left, e -= c - b, e > a.thumbTotalWidth - a.thumbOuterWidth && (e = a.thumbTotalWidth - a.thumbOuterWidth), e < 0 && (e = 0), a.setTranslate(e)) }), a.core.$outer.find(".lg-thumb").on("touchend.lg", function () { a.thumbTotalWidth > a.thumbOuterWidth && d ? (d = !1, a.$thumbOuter.removeClass("lg-dragging"), Math.abs(c - b) < a.core.s.swipeThreshold && (a.thumbClickable = !0), a.left = e) : a.thumbClickable = !0 }) }, c.prototype.toogle = function () { var a = this; a.core.s.toogleThumb && (a.core.$outer.addClass("lg-can-toggle"), a.$thumbOuter.append('<span class="lg-toogle-thumb lg-icon"></span>'), a.core.$outer.find(".lg-toogle-thumb").on("click.lg", function () { a.core.$outer.toggleClass("lg-thumb-open") })) }, c.prototype.thumbkeyPress = function () { var b = this; a(window).on("keydown.lg.thumb", function (a) { 38 === a.keyCode ? (a.preventDefault(), b.core.$outer.addClass("lg-thumb-open")) : 40 === a.keyCode && (a.preventDefault(), b.core.$outer.removeClass("lg-thumb-open")) }) }, c.prototype.destroy = function () {
this.core.s.thumbnail && this.core.$items.length > 1 && (a(window).off("resize.lg.thumb orientationchange.lg.thumb keydown.lg.thumb"),
this.$thumbOuter.remove(), this.core.$outer.removeClass("lg-has-thumb"))
}, a.fn.lightGallery.modules.Thumbnail = 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 () { "use strict"; var b = { videoMaxWidth: "855px", youtubePlayerParams: !1, vimeoPlayerParams: !1, dailymotionPlayerParams: !1, vkPlayerParams: !1, videojs: !1, videojsOptions: {} }, c = function (c) { return this.core = a(c).data("lightGallery"), this.$el = a(c), this.core.s = a.extend({}, b, this.core.s), this.videoLoaded = !1, this.init(), this }; c.prototype.init = function () { var b = this; b.core.$el.on("hasVideo.lg.tm", function (a, c, d, e) { if (b.core.$slide.eq(c).find(".lg-video").append(b.loadVideo(d, "lg-object", !0, c, e)), e) if (b.core.s.videojs) try { videojs(b.core.$slide.eq(c).find(".lg-html5").get(0), b.core.s.videojsOptions, function () { b.videoLoaded || this.play() }) } catch (a) { console.error("Make sure you have included videojs") } else b.videoLoaded || b.core.$slide.eq(c).find(".lg-html5").get(0).play() }), b.core.$el.on("onAferAppendSlide.lg.tm", function (a, c) { var d = b.core.$slide.eq(c).find(".lg-video-cont"); d.hasClass("lg-has-iframe") || (d.css("max-width", b.core.s.videoMaxWidth), b.videoLoaded = !0) }); var c = function (a) { if (a.find(".lg-object").hasClass("lg-has-poster") && a.find(".lg-object").is(":visible")) if (a.hasClass("lg-has-video")) { var c = a.find(".lg-youtube").get(0), d = a.find(".lg-vimeo").get(0), e = a.find(".lg-dailymotion").get(0), f = a.find(".lg-html5").get(0); if (c) c.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}', "*"); else if (d) try { $f(d).api("play") } catch (a) { console.error("Make sure you have included froogaloop2 js") } else if (e) e.contentWindow.postMessage("play", "*"); else if (f) if (b.core.s.videojs) try { videojs(f).play() } catch (a) { console.error("Make sure you have included videojs") } else f.play(); a.addClass("lg-video-playing") } else { a.addClass("lg-video-playing lg-has-video"); var g, h, i = function (c, d) { if (a.find(".lg-video").append(b.loadVideo(c, "", !1, b.core.index, d)), d) if (b.core.s.videojs) try { videojs(b.core.$slide.eq(b.core.index).find(".lg-html5").get(0), b.core.s.videojsOptions, function () { this.play() }) } catch (a) { console.error("Make sure you have included videojs") } else b.core.$slide.eq(b.core.index).find(".lg-html5").get(0).play() }; b.core.s.dynamic ? (g = b.core.s.dynamicEl[b.core.index].src, h = b.core.s.dynamicEl[b.core.index].html, i(g, h)) : (g = b.core.$items.eq(b.core.index).attr("href") || b.core.$items.eq(b.core.index).attr("data-src"), h = b.core.$items.eq(b.core.index).attr("data-html"), i(g, h)); var j = a.find(".lg-object"); a.find(".lg-video").append(j), a.find(".lg-video-object").hasClass("lg-html5") || (a.removeClass("lg-complete"), a.find(".lg-video-object").on("load.lg error.lg", function () { a.addClass("lg-complete") })) } }; b.core.doCss() && b.core.$items.length > 1 && (b.core.s.enableSwipe || b.core.s.enableDrag) ? b.core.$el.on("onSlideClick.lg.tm", function () { var a = b.core.$slide.eq(b.core.index); c(a) }) : b.core.$slide.on("click.lg", function () { c(a(this)) }), b.core.$el.on("onBeforeSlide.lg.tm", function (c, d, e) { var f = b.core.$slide.eq(d), g = f.find(".lg-youtube").get(0), h = f.find(".lg-vimeo").get(0), i = f.find(".lg-dailymotion").get(0), j = f.find(".lg-vk").get(0), k = f.find(".lg-html5").get(0); if (g) g.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}', "*"); else if (h) try { $f(h).api("pause") } catch (a) { console.error("Make sure you have included froogaloop2 js") } else if (i) i.contentWindow.postMessage("pause", "*"); else if (k) if (b.core.s.videojs) try { videojs(k).pause() } catch (a) { console.error("Make sure you have included videojs") } else k.pause(); j && a(j).attr("src", a(j).attr("src").replace("&autoplay", "&noplay")); var l; l = b.core.s.dynamic ? b.core.s.dynamicEl[e].src : b.core.$items.eq(e).attr("href") || b.core.$items.eq(e).attr("data-src"); var m = b.core.isVideo(l, e) || {}; (m.youtube || m.vimeo || m.dailymotion || m.vk) && b.core.$outer.addClass("lg-hide-download") }), b.core.$el.on("onAfterSlide.lg.tm", function (a, c) { b.core.$slide.eq(c).removeClass("lg-video-playing") }) }, c.prototype.loadVideo = function (b, c, d, e, f) { var g = "", h = 1, i = "", j = this.core.isVideo(b, e) || {}; if (d && (h = this.videoLoaded ? 0 : 1), j.youtube) i = "?wmode=opaque&autoplay=" + h + "&enablejsapi=1", this.core.s.youtubePlayerParams && (i = i + "&" + a.param(this.core.s.youtubePlayerParams)), g = '<iframe class="lg-video-object lg-youtube ' + c + '" width="560" height="315" src="//www.youtube.com/embed/' + j.youtube[1] + i + '" frameborder="0" allowfullscreen></iframe>'; else if (j.vimeo) i = "?autoplay=" + h + "&api=1", this.core.s.vimeoPlayerParams && (i = i + "&" + a.param(this.core.s.vimeoPlayerParams)), g = '<iframe class="lg-video-object lg-vimeo ' + c + '" width="560" height="315" src="//player.vimeo.com/video/' + j.vimeo[1] + i + '" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'; else if (j.dailymotion) i = "?wmode=opaque&autoplay=" + h + "&api=postMessage", this.core.s.dailymotionPlayerParams && (i = i + "&" + a.param(this.core.s.dailymotionPlayerParams)), g = '<iframe class="lg-video-object lg-dailymotion ' + c + '" width="560" height="315" src="//www.dailymotion.com/embed/video/' + j.dailymotion[1] + i + '" frameborder="0" allowfullscreen></iframe>'; else if (j.html5) { var k = f.substring(0, 1); "." !== k && "#" !== k || (f = a(f).html()), g = f } else j.vk && (i = "&autoplay=" + h, this.core.s.vkPlayerParams && (i = i + "&" + a.param(this.core.s.vkPlayerParams)), g = '<iframe class="lg-video-object lg-vk ' + c + '" width="560" height="315" src="http://vk.com/video_ext.php?' + j.vk[1] + i + '" frameborder="0" allowfullscreen></iframe>'); return g }, c.prototype.destroy = function () { this.videoLoaded = !1 }, a.fn.lightGallery.modules.video = 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 () { "use strict"; var b = function () { var a = !1, b = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./); return b && parseInt(b[2], 10) < 54 && (a = !0), a }, c = { scale: 1, zoom: !0, actualSize: !0, enableZoomAfter: 300, useLeftForZoom: b() }, d = function (b) { return this.core = a(b).data("lightGallery"), this.core.s = a.extend({}, c, this.core.s), this.core.s.zoom && this.core.doCss() && (this.init(), this.zoomabletimeout = !1, this.pageX = a(window).width() / 2, this.pageY = a(window).height() / 2 + a(window).scrollTop()), this }; d.prototype.init = function () { var b = this, c = '<span id="lg-zoom-in" class="lg-icon"></span><span id="lg-zoom-out" class="lg-icon"></span>'; b.core.s.actualSize && (c += '<span id="lg-actual-size" class="lg-icon"></span>'), b.core.s.useLeftForZoom ? b.core.$outer.addClass("lg-use-left-for-zoom") : b.core.$outer.addClass("lg-use-transition-for-zoom"), this.core.$outer.find(".lg-toolbar").append(c), b.core.$el.on("onSlideItemLoad.lg.tm.zoom", function (c, d, e) { var f = b.core.s.enableZoomAfter + e; a("body").hasClass("lg-from-hash") && e ? f = 0 : a("body").removeClass("lg-from-hash"), b.zoomabletimeout = setTimeout(function () { b.core.$slide.eq(d).addClass("lg-zoomable") }, f + 30) }); var d = 1, e = function (c) { var d, e, f = b.core.$outer.find(".lg-current .lg-image"), g = (a(window).width() - f.prop("offsetWidth")) / 2, h = (a(window).height() - f.prop("offsetHeight")) / 2 + a(window).scrollTop(); d = b.pageX - g, e = b.pageY - h; var i = (c - 1) * d, j = (c - 1) * e; f.css("transform", "scale3d(" + c + ", " + c + ", 1)").attr("data-scale", c), b.core.s.useLeftForZoom ? f.parent().css({ left: -i + "px", top: -j + "px" }).attr("data-x", i).attr("data-y", j) : f.parent().css("transform", "translate3d(-" + i + "px, -" + j + "px, 0)").attr("data-x", i).attr("data-y", j) }, f = function () { d > 1 ? b.core.$outer.addClass("lg-zoomed") : b.resetZoom(), d < 1 && (d = 1), e(d) }, g = function (c, e, g, h) { var i, j = e.prop("offsetWidth"); i = b.core.s.dynamic ? b.core.s.dynamicEl[g].width || e[0].naturalWidth || j : b.core.$items.eq(g).attr("data-width") || e[0].naturalWidth || j; var k; b.core.$outer.hasClass("lg-zoomed") ? d = 1 : i > j && (k = i / j, d = k || 2), h ? (b.pageX = a(window).width() / 2, b.pageY = a(window).height() / 2 + a(window).scrollTop()) : (b.pageX = c.pageX || c.originalEvent.targetTouches[0].pageX, b.pageY = c.pageY || c.originalEvent.targetTouches[0].pageY), f(), setTimeout(function () { b.core.$outer.removeClass("lg-grabbing").addClass("lg-grab") }, 10) }, h = !1; b.core.$el.on("onAferAppendSlide.lg.tm.zoom", function (a, c) { var d = b.core.$slide.eq(c).find(".lg-image"); d.on("dblclick", function (a) { g(a, d, c) }), d.on("touchstart", function (a) { h ? (clearTimeout(h), h = null, g(a, d, c)) : h = setTimeout(function () { h = null }, 300), a.preventDefault() }) }), a(window).on("resize.lg.zoom scroll.lg.zoom orientationchange.lg.zoom", function () { b.pageX = a(window).width() / 2, b.pageY = a(window).height() / 2 + a(window).scrollTop(), e(d) }), a("#lg-zoom-out").on("click.lg", function () { b.core.$outer.find(".lg-current .lg-image").length && (d -= b.core.s.scale, f()) }), a("#lg-zoom-in").on("click.lg", function () { b.core.$outer.find(".lg-current .lg-image").length && (d += b.core.s.scale, f()) }), a("#lg-actual-size").on("click.lg", function (a) { g(a, b.core.$slide.eq(b.core.index).find(".lg-image"), b.core.index, !0) }), b.core.$el.on("onBeforeSlide.lg.tm", function () { d = 1, b.resetZoom() }), b.zoomDrag(), b.zoomSwipe() }, d.prototype.resetZoom = function () { this.core.$outer.removeClass("lg-zoomed"), this.core.$slide.find(".lg-img-wrap").removeAttr("style data-x data-y"), this.core.$slide.find(".lg-image").removeAttr("style data-scale"), this.pageX = a(window).width() / 2, this.pageY = a(window).height() / 2 + a(window).scrollTop() }, d.prototype.zoomSwipe = function () { var a = this, b = {}, c = {}, d = !1, e = !1, f = !1; a.core.$slide.on("touchstart.lg", function (c) { if (a.core.$outer.hasClass("lg-zoomed")) { var d = a.core.$slide.eq(a.core.index).find(".lg-object"); f = d.prop("offsetHeight") * d.attr("data-scale") > a.core.$outer.find(".lg").height(), e = d.prop("offsetWidth") * d.attr("data-scale") > a.core.$outer.find(".lg").width(), (e || f) && (c.preventDefault(), b = { x: c.originalEvent.targetTouches[0].pageX, y: c.originalEvent.targetTouches[0].pageY }) } }), a.core.$slide.on("touchmove.lg", function (g) { if (a.core.$outer.hasClass("lg-zoomed")) { var h, i, j = a.core.$slide.eq(a.core.index).find(".lg-img-wrap"); g.preventDefault(), d = !0, c = { x: g.originalEvent.targetTouches[0].pageX, y: g.originalEvent.targetTouches[0].pageY }, a.core.$outer.addClass("lg-zoom-dragging"), i = f ? -Math.abs(j.attr("data-y")) + (c.y - b.y) : -Math.abs(j.attr("data-y")), h = e ? -Math.abs(j.attr("data-x")) + (c.x - b.x) : -Math.abs(j.attr("data-x")), (Math.abs(c.x - b.x) > 15 || Math.abs(c.y - b.y) > 15) && (a.core.s.useLeftForZoom ? j.css({ left: h + "px", top: i + "px" }) : j.css("transform", "translate3d(" + h + "px, " + i + "px, 0)")) } }), a.core.$slide.on("touchend.lg", function () { a.core.$outer.hasClass("lg-zoomed") && d && (d = !1, a.core.$outer.removeClass("lg-zoom-dragging"), a.touchendZoom(b, c, e, f)) }) }, d.prototype.zoomDrag = function () { var b = this, c = {}, d = {}, e = !1, f = !1, g = !1, h = !1; b.core.$slide.on("mousedown.lg.zoom", function (d) { var f = b.core.$slide.eq(b.core.index).find(".lg-object"); h = f.prop("offsetHeight") * f.attr("data-scale") > b.core.$outer.find(".lg").height(), g = f.prop("offsetWidth") * f.attr("data-scale") > b.core.$outer.find(".lg").width(), b.core.$outer.hasClass("lg-zoomed") && a(d.target).hasClass("lg-object") && (g || h) && (d.preventDefault(), c = { x: d.pageX, y: d.pageY }, e = !0, b.core.$outer.scrollLeft += 1, b.core.$outer.scrollLeft -= 1, b.core.$outer.removeClass("lg-grab").addClass("lg-grabbing")) }), a(window).on("mousemove.lg.zoom", function (a) { if (e) { var i, j, k = b.core.$slide.eq(b.core.index).find(".lg-img-wrap"); f = !0, d = { x: a.pageX, y: a.pageY }, b.core.$outer.addClass("lg-zoom-dragging"), j = h ? -Math.abs(k.attr("data-y")) + (d.y - c.y) : -Math.abs(k.attr("data-y")), i = g ? -Math.abs(k.attr("data-x")) + (d.x - c.x) : -Math.abs(k.attr("data-x")), b.core.s.useLeftForZoom ? k.css({ left: i + "px", top: j + "px" }) : k.css("transform", "translate3d(" + i + "px, " + j + "px, 0)") } }), a(window).on("mouseup.lg.zoom", function (a) { e && (e = !1, b.core.$outer.removeClass("lg-zoom-dragging"), !f || c.x === d.x && c.y === d.y || (d = { x: a.pageX, y: a.pageY }, b.touchendZoom(c, d, g, h)), f = !1), b.core.$outer.removeClass("lg-grabbing").addClass("lg-grab") }) }, d.prototype.touchendZoom = function (a, b, c, d) { var e = this, f = e.core.$slide.eq(e.core.index).find(".lg-img-wrap"), g = e.core.$slide.eq(e.core.index).find(".lg-object"), h = -Math.abs(f.attr("data-x")) + (b.x - a.x), i = -Math.abs(f.attr("data-y")) + (b.y - a.y), j = (e.core.$outer.find(".lg").height() - g.prop("offsetHeight")) / 2, k = Math.abs(g.prop("offsetHeight") * Math.abs(g.attr("data-scale")) - e.core.$outer.find(".lg").height() + j), l = (e.core.$outer.find(".lg").width() - g.prop("offsetWidth")) / 2, m = Math.abs(g.prop("offsetWidth") * Math.abs(g.attr("data-scale")) - e.core.$outer.find(".lg").width() + l); (Math.abs(b.x - a.x) > 15 || Math.abs(b.y - a.y) > 15) && (d && (i <= -k ? i = -k : i >= -j && (i = -j)), c && (h <= -m ? h = -m : h >= -l && (h = -l)), d ? f.attr("data-y", Math.abs(i)) : i = -Math.abs(f.attr("data-y")), c ? f.attr("data-x", Math.abs(h)) : h = -Math.abs(f.attr("data-x")), e.core.s.useLeftForZoom ? f.css({ left: h + "px", top: i + "px" }) : f.css("transform", "translate3d(" + h + "px, " + i + "px, 0)")) }, d.prototype.destroy = function () { var b = this; b.core.$el.off(".lg.zoom"), a(window).off(".lg.zoom"), b.core.$slide.off(".lg.zoom"), b.core.$el.off(".lg.tm.zoom"), b.resetZoom(), clearTimeout(b.zoomabletimeout), b.zoomabletimeout = !1 }, a.fn.lightGallery.modules.zoom = d }() }), 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 () { "use strict"; var b = { hash: !0 }, c = function (c) { return this.core = a(c).data("lightGallery"), this.core.s = a.extend({}, b, this.core.s), this.core.s.hash && (this.oldHash = window.location.hash, this.init()), this }; c.prototype.init = function () { var b, c = this; c.core.$el.on("onAfterSlide.lg.tm", function (a, b, d) { history.replaceState ? history.replaceState(null, null, "#lg=" + c.core.s.galleryId + "&slide=" + d) : window.location.hash = "lg=" + c.core.s.galleryId + "&slide=" + d }), a(window).on("hashchange.lg.hash", function () { b = window.location.hash; var a = parseInt(b.split("&slide=")[1], 10); b.indexOf("lg=" + c.core.s.galleryId) > -1 ? c.core.slide(a, !1, !1) : c.core.lGalleryOn && c.core.destroy() }) }, c.prototype.destroy = function () { this.core.s.hash && (this.oldHash && this.oldHash.indexOf("lg=" + this.core.s.galleryId) < 0 ? history.replaceState ? history.replaceState(null, null, this.oldHash) : window.location.hash = this.oldHash : history.replaceState ? history.replaceState(null, document.title, window.location.pathname + window.location.search) : window.location.hash = "", this.core.$el.off(".lg.hash")) }, a.fn.lightGallery.modules.hash = 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 () { "use strict"; var b = { share: !0, facebook: !0, facebookDropdownText: "Facebook", twitter: !0, twitterDropdownText: "Twitter", googlePlus: !0, googlePlusDropdownText: "GooglePlus", pinterest: !0, pinterestDropdownText: "Pinterest" }, c = function (c) { return this.core = a(c).data("lightGallery"), this.core.s = a.extend({}, b, this.core.s), this.core.s.share && this.init(), this }; c.prototype.init = function () { var b = this, c = '<span id="lg-share" class="lg-icon"><ul class="lg-dropdown" style="position: absolute;">'; c += b.core.s.facebook ? '<li><a id="lg-share-facebook" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">' + this.core.s.facebookDropdownText + "</span></a></li>" : "", c += b.core.s.twitter ? '<li><a id="lg-share-twitter" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">' + this.core.s.twitterDropdownText + "</span></a></li>" : "", c += b.core.s.googlePlus ? '<li><a id="lg-share-googleplus" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">' + this.core.s.googlePlusDropdownText + "</span></a></li>" : "", c += b.core.s.pinterest ? '<li><a id="lg-share-pinterest" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">' + this.core.s.pinterestDropdownText + "</span></a></li>" : "", c += "</ul></span>", this.core.$outer.find(".lg-toolbar").append(c), this.core.$outer.find(".lg").append('<div id="lg-dropdown-overlay"></div>'), a("#lg-share").on("click.lg", function () { b.core.$outer.toggleClass("lg-dropdown-active") }), a("#lg-dropdown-overlay").on("click.lg", function () { b.core.$outer.removeClass("lg-dropdown-active") }), b.core.$el.on("onAfterSlide.lg.tm", function (c, d, e) { setTimeout(function () { a("#lg-share-facebook").attr("href", "https://www.facebook.com/sharer/sharer.php?u=" + encodeURIComponent(b.getSahreProps(e, "facebookShareUrl") || window.location.href)), a("#lg-share-twitter").attr("href", "https://twitter.com/intent/tweet?text=" + b.getSahreProps(e, "tweetText") + "&url=" + encodeURIComponent(b.getSahreProps(e, "twitterShareUrl") || window.location.href)), a("#lg-share-googleplus").attr("href", "https://plus.google.com/share?url=" + encodeURIComponent(b.getSahreProps(e, "googleplusShareUrl") || window.location.href)), a("#lg-share-pinterest").attr("href", "http://www.pinterest.com/pin/create/button/?url=" + encodeURIComponent(b.getSahreProps(e, "pinterestShareUrl") || window.location.href) + "&media=" + encodeURIComponent(b.getSahreProps(e, "src")) + "&description=" + b.getSahreProps(e, "pinterestText")) }, 100) }) }, c.prototype.getSahreProps = function (a, b) { var c = ""; if (this.core.s.dynamic) c = this.core.s.dynamicEl[a][b]; else { var d = this.core.$items.eq(a).attr("href"), e = this.core.$items.eq(a).data(b); c = "src" === b ? d || e : e } return c }, c.prototype.destroy = function () { }, a.fn.lightGallery.modules.share = c }() });
/**
* @module WOW
* @author Matthieu Aussaguel
* @license MIT
* @version 1.1.3
*/
(function () { var t, e, n, i, o, r = function (t, e) { return function () { return t.apply(e, arguments) } }, s = [].indexOf || function (t) { for (var e = 0, n = this.length; n > e; e++)if (e in this && this[e] === t) return e; return -1 }; e = function () { function t() { } return t.prototype.extend = function (t, e) { var n, i; for (n in e) i = e[n], null == t[n] && (t[n] = i); return t }, t.prototype.isMobile = function (t) { return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(t) }, t.prototype.createEvent = function (t, e, n, i) { var o; return null == e && (e = !1), null == n && (n = !1), null == i && (i = null), null != document.createEvent ? (o = document.createEvent("CustomEvent")).initCustomEvent(t, e, n, i) : null != document.createEventObject ? (o = document.createEventObject(), o.eventType = t) : o.eventName = t, o }, t.prototype.emitEvent = function (t, e) { return null != t.dispatchEvent ? t.dispatchEvent(e) : e in (null != t) ? t[e]() : "on" + e in (null != t) ? t["on" + e]() : void 0 }, t.prototype.addEvent = function (t, e, n) { return null != t.addEventListener ? t.addEventListener(e, n, !1) : null != t.attachEvent ? t.attachEvent("on" + e, n) : t[e] = n }, t.prototype.removeEvent = function (t, e, n) { return null != t.removeEventListener ? t.removeEventListener(e, n, !1) : null != t.detachEvent ? t.detachEvent("on" + e, n) : delete t[e] }, t.prototype.innerHeight = function () { return "innerHeight" in window ? window.innerHeight : document.documentElement.clientHeight }, t }(), n = this.WeakMap || this.MozWeakMap || (n = function () { function t() { this.keys = [], this.values = [] } return t.prototype.get = function (t) { var e, n, i, o; for (e = n = 0, i = (o = this.keys).length; i > n; e = ++n)if (o[e] === t) return this.values[e] }, t.prototype.set = function (t, e) { var n, i, o, r; for (n = i = 0, o = (r = this.keys).length; o > i; n = ++i)if (r[n] === t) return void (this.values[n] = e); return this.keys.push(t), this.values.push(e) }, t }()), t = this.MutationObserver || this.WebkitMutationObserver || this.MozMutationObserver || (t = function () { function t() { "undefined" != typeof console && null !== console && console.warn("MutationObserver is not supported by your browser."), "undefined" != typeof console && null !== console && console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.") } return t.notSupported = !0, t.prototype.observe = function () { }, t }()), i = this.getComputedStyle || function (t, e) { return this.getPropertyValue = function (e) { var n; return "float" === e && (e = "styleFloat"), o.test(e) && e.replace(o, function (t, e) { return e.toUpperCase() }), (null != (n = t.currentStyle) ? n[e] : void 0) || null }, this }, o = /(\-([a-z]){1})/g, this.WOW = function () { function o(t) { null == t && (t = {}), this.scrollCallback = r(this.scrollCallback, this), this.scrollHandler = r(this.scrollHandler, this), this.resetAnimation = r(this.resetAnimation, this), this.start = r(this.start, this), this.scrolled = !0, this.config = this.util().extend(t, this.defaults), null != t.scrollContainer && (this.config.scrollContainer = document.querySelector(t.scrollContainer)), this.animationNameCache = new n, this.wowEvent = this.util().createEvent(this.config.boxClass) } return o.prototype.defaults = { boxClass: "wow", animateClass: "animated", offset: 0, mobile: !0, live: !0, callback: null, scrollContainer: null }, o.prototype.init = function () { var t; return this.element = window.document.documentElement, "interactive" === (t = document.readyState) || "complete" === t ? this.start() : this.util().addEvent(document, "DOMContentLoaded", this.start), this.finished = [] }, o.prototype.start = function () { var e, n, i, o; if (this.stopped = !1, this.boxes = function () { var t, n, i, o; for (o = [], t = 0, n = (i = this.element.querySelectorAll("." + this.config.boxClass)).length; n > t; t++)e = i[t], o.push(e); return o }.call(this), this.all = function () { var t, n, i, o; for (o = [], t = 0, n = (i = this.boxes).length; n > t; t++)e = i[t], o.push(e); return o }.call(this), this.boxes.length) if (this.disabled()) this.resetStyle(); else for (o = this.boxes, n = 0, i = o.length; i > n; n++)e = o[n], this.applyStyle(e, !0); return this.disabled() || (this.util().addEvent(this.config.scrollContainer || window, "scroll", this.scrollHandler), this.util().addEvent(window, "resize", this.scrollHandler), this.interval = setInterval(this.scrollCallback, 50)), this.config.live ? new t(function (t) { return function (e) { var n, i, o, r, s; for (s = [], n = 0, i = e.length; i > n; n++)r = e[n], s.push(function () { var t, e, n, i; for (i = [], t = 0, e = (n = r.addedNodes || []).length; e > t; t++)o = n[t], i.push(this.doSync(o)); return i }.call(t)); return s } }(this)).observe(document.body, { childList: !0, subtree: !0 }) : void 0 }, o.prototype.stop = function () { return this.stopped = !0, this.util().removeEvent(this.config.scrollContainer || window, "scroll", this.scrollHandler), this.util().removeEvent(window, "resize", this.scrollHandler), null != this.interval ? clearInterval(this.interval) : void 0 }, o.prototype.sync = function (e) { return t.notSupported ? this.doSync(this.element) : void 0 }, o.prototype.doSync = function (t) { var e, n, i, o, r; if (null == t && (t = this.element), 1 === t.nodeType) { for (r = [], n = 0, i = (o = (t = t.parentNode || t).querySelectorAll("." + this.config.boxClass)).length; i > n; n++)e = o[n], s.call(this.all, e) < 0 ? (this.boxes.push(e), this.all.push(e), this.stopped || this.disabled() ? this.resetStyle() : this.applyStyle(e, !0), r.push(this.scrolled = !0)) : r.push(void 0); return r } }, o.prototype.show = function (t) { return this.applyStyle(t), t.className = t.className + " " + this.config.animateClass, null != this.config.callback && this.config.callback(t), this.util().emitEvent(t, this.wowEvent), this.util().addEvent(t, "animationend", this.resetAnimation), this.util().addEvent(t, "oanimationend", this.resetAnimation), this.util().addEvent(t, "webkitAnimationEnd", this.resetAnimation), this.util().addEvent(t, "MSAnimationEnd", this.resetAnimation), t }, o.prototype.applyStyle = function (t, e) { var n, i, o; return i = t.getAttribute("data-wow-duration"), n = t.getAttribute("data-wow-delay"), o = t.getAttribute("data-wow-iteration"), this.animate(function (r) { return function () { return r.customStyle(t, e, i, n, o) } }(this)) }, o.prototype.animate = "requestAnimationFrame" in window ? function (t) { return window.requestAnimationFrame(t) } : function (t) { return t() }, o.prototype.resetStyle = function () { var t, e, n, i, o; for (o = [], e = 0, n = (i = this.boxes).length; n > e; e++)t = i[e], o.push(t.style.visibility = "visible"); return o }, o.prototype.resetAnimation = function (t) { var e; return t.type.toLowerCase().indexOf("animationend") >= 0 ? (e = t.target || t.srcElement, e.className = e.className.replace(this.config.animateClass, "").trim()) : void 0 }, o.prototype.customStyle = function (t, e, n, i, o) { return e && this.cacheAnimationName(t), t.style.visibility = e ? "hidden" : "visible", n && this.vendorSet(t.style, { animationDuration: n }), i && this.vendorSet(t.style, { animationDelay: i }), o && this.vendorSet(t.style, { animationIterationCount: o }), this.vendorSet(t.style, { animationName: e ? "none" : this.cachedAnimationName(t) }), t }, o.prototype.vendors = ["moz", "webkit"], o.prototype.vendorSet = function (t, e) { var n, i, o, r; i = []; for (n in e) o = e[n], t["" + n] = o, i.push(function () { var e, i, s, l; for (l = [], e = 0, i = (s = this.vendors).length; i > e; e++)r = s[e], l.push(t["" + r + n.charAt(0).toUpperCase() + n.substr(1)] = o); return l }.call(this)); return i }, o.prototype.vendorCSS = function (t, e) { var n, o, r, s, l, a; for (s = (l = i(t)).getPropertyCSSValue(e), n = 0, o = (r = this.vendors).length; o > n; n++)a = r[n], s = s || l.getPropertyCSSValue("-" + a + "-" + e); return s }, o.prototype.animationName = function (t) { var e; try { e = this.vendorCSS(t, "animation-name").cssText } catch (n) { e = i(t).getPropertyValue("animation-name") } return "none" === e ? "" : e }, o.prototype.cacheAnimationName = function (t) { return this.animationNameCache.set(t, this.animationName(t)) }, o.prototype.cachedAnimationName = function (t) { return this.animationNameCache.get(t) }, o.prototype.scrollHandler = function () { return this.scrolled = !0 }, o.prototype.scrollCallback = function () { var t; return !this.scrolled || (this.scrolled = !1, this.boxes = function () { var e, n, i, o; for (o = [], e = 0, n = (i = this.boxes).length; n > e; e++)(t = i[e]) && (this.isVisible(t) ? this.show(t) : o.push(t)); return o }.call(this), this.boxes.length || this.config.live) ? void 0 : this.stop() }, o.prototype.offsetTop = function (t) { for (var e; void 0 === t.offsetTop;)t = t.parentNode; for (e = t.offsetTop; t = t.offsetParent;)e += t.offsetTop; return e }, o.prototype.isVisible = function (t) { var e, n, i, o, r; return n = t.getAttribute("data-wow-offset") || this.config.offset, r = this.config.scrollContainer && this.config.scrollContainer.scrollTop || window.pageYOffset, o = r + Math.min(this.element.clientHeight, this.util().innerHeight()) - n, i = this.offsetTop(t), e = i + t.clientHeight, o >= i && e >= r }, o.prototype.util = function () { return null != this._util ? this._util : this._util = new e }, o.prototype.disabled = function () { return !this.config.mobile && this.util().isMobile(navigator.userAgent) }, o.prototype.removeBox = function (t) { var e = this.boxes.indexOf(t); e > -1 && this.boxes.splice(e, 1) }, o }() }).call(this);
/**
* @module PageTransition
* @author Roman Kravchuk (JeremyLuis)
* @license MIT
* @version 1.1.4
* @description Smooth transition between pages
* @requires module:jQuery
*/
function pageTransition(t) { t = t || {}, t.target = t.target || null, t.delay = t.delay || 500, t.duration = t.duration || 1e3, t.classIn = t.classIn || null, t.classOut = t.classOut || null, t.classActive = t.classActive || null, t.onReady = t.onReady || null, t.onTransitionStart = t.onTransitionStart || null, t.onTransitionEnd = t.onTransitionEnd || null, t.conditions = t.conditions || function (t, n) { return !/(\#|callto:|tel:|mailto:|:\/\/)/.test(n) }, t.target && (setTimeout(function () { t.onReady && t.onReady(t), t.classIn && t.target.classList.add(t.classIn), t.classActive && t.target.classList.add(t.classActive), t.duration && (t.target.style.animationDuration = t.duration + "ms"), t.target.addEventListener("animationstart", function () { setTimeout(function () { t.classIn && t.target.classList.remove(t.classIn), t.onTransitionEnd && t.onTransitionEnd(t) }, t.duration) }) }, t.delay), $("a").click(function (n) { var a = n.currentTarget.getAttribute("href"); if (t.conditions(n, a)) { var s = this.href; n.preventDefault(), t.onTransitionStart && t.onTransitionStart(t), t.classIn && t.target.classList.remove(t.classIn), t.classOut && t.target.classList.add(t.classOut), setTimeout(function () { window.location = s, /firefox/i.test(navigator.userAgent) && setTimeout(function () { t.onReady && t.onReady(t), t.classOut && t.target.classList.remove(t.classOut) }, 1e3), setTimeout(function () { /safari/i.test(navigator.userAgent) && !/chrome/i.test(navigator.userAgent) && (t.onReady && t.onReady(t), t.classOut && t.target.classList.remove(t.classOut)) }, 1e3) }, t.duration) } })) }
/**
* @module Select2
* @see https://github.com/select2/select2/blob/master/
* @license MIT
* @version 3.5.4
*/
!function (a) { "undefined" == typeof a.fn.each2 && a.extend(a.fn, { each2: function (b) { for (var c = a([0]), d = -1, e = this.length; ++d < e && (c.context = c[0] = this[d]) && b.call(c[0], d, c) !== !1;); return this } }) }(jQuery), function (a, b) {
"use strict"; function n(b) { var c = a(document.createTextNode("")); b.before(c), c.before(b), c.remove() } function o(a) { function b(a) { return m[a] || a } return a.replace(/[^\u0000-\u007E]/g, b) } function p(a, b) { for (var c = 0, d = b.length; d > c; c += 1)if (r(a, b[c])) return c; return -1 } function q() { var b = a(l); b.appendTo(document.body); var c = { width: b.width() - b[0].clientWidth, height: b.height() - b[0].clientHeight }; return b.remove(), c } function r(a, c) { return a === c ? !0 : a === b || c === b ? !1 : null === a || null === c ? !1 : a.constructor === String ? a + "" == c + "" : c.constructor === String ? c + "" == a + "" : !1 } function s(a, b, c) { var d, e, f; if (null === a || a.length < 1) return []; for (d = a.split(b), e = 0, f = d.length; f > e; e += 1)d[e] = c(d[e]); return d } function t(a) { return a.outerWidth(!1) - a.width() } function u(c) { var d = "keyup-change-value"; c.on("keydown", function () { a.data(c, d) === b && a.data(c, d, c.val()) }), c.on("keyup", function () { var e = a.data(c, d); e !== b && c.val() !== e && (a.removeData(c, d), c.trigger("keyup-change")) }) } function v(c) { c.on("mousemove", function (c) { var d = h; (d === b || d.x !== c.pageX || d.y !== c.pageY) && a(c.target).trigger("mousemove-filtered", c) }) } function w(a, c, d) { d = d || b; var e; return function () { var b = arguments; window.clearTimeout(e), e = window.setTimeout(function () { c.apply(d, b) }, a) } } function x(a, b) { var c = w(a, function (a) { b.trigger("scroll-debounced", a) }); b.on("scroll", function (a) { p(a.target, b.get()) >= 0 && c(a) }) } function y(a) { a[0] !== document.activeElement && window.setTimeout(function () { var d, b = a[0], c = a.val().length; a.focus(); var e = b.offsetWidth > 0 || b.offsetHeight > 0; e && b === document.activeElement && (b.setSelectionRange ? b.setSelectionRange(c, c) : b.createTextRange && (d = b.createTextRange(), d.collapse(!1), d.select())) }, 0) } function z(b) { b = a(b)[0]; var c = 0, d = 0; if ("selectionStart" in b) c = b.selectionStart, d = b.selectionEnd - c; else if ("selection" in document) { b.focus(); var e = document.selection.createRange(); d = document.selection.createRange().text.length, e.moveStart("character", -b.value.length), c = e.text.length - d } return { offset: c, length: d } } function A(a) { a.preventDefault(), a.stopPropagation() } function B(a) { a.preventDefault(), a.stopImmediatePropagation() } function C(b) { if (!g) { var c = b[0].currentStyle || window.getComputedStyle(b[0], null); g = a(document.createElement("div")).css({ position: "absolute", left: "-10000px", top: "-10000px", display: "none", fontSize: c.fontSize, fontFamily: c.fontFamily, fontStyle: c.fontStyle, fontWeight: c.fontWeight, letterSpacing: c.letterSpacing, textTransform: c.textTransform, whiteSpace: "nowrap" }), g.attr("class", "select2-sizer"), a(document.body).append(g) } return g.text(b.val()), g.width() } function D(b, c, d) { var e, g, f = []; e = a.trim(b.attr("class")), e && (e = "" + e, a(e.split(/\s+/)).each2(function () { 0 === this.indexOf("select2-") && f.push(this) })), e = a.trim(c.attr("class")), e && (e = "" + e, a(e.split(/\s+/)).each2(function () { 0 !== this.indexOf("select2-") && (g = d(this), g && f.push(g)) })), b.attr("class", f.join(" ")) } function E(a, b, c, d) { var e = o(a.toUpperCase()).indexOf(o(b.toUpperCase())), f = b.length; return 0 > e ? void c.push(d(a)) : (c.push(d(a.substring(0, e))), c.push("<span class='select2-match'>"), c.push(d(a.substring(e, e + f))), c.push("</span>"), void c.push(d(a.substring(e + f, a.length)))) } function F(a) { var b = { "\\": "&#92;", "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;", "/": "&#47;" }; return String(a).replace(/[&<>"'\/\\]/g, function (a) { return b[a] }) } function G(c) { var d, e = null, f = c.quietMillis || 100, g = c.url, h = this; return function (i) { window.clearTimeout(d), d = window.setTimeout(function () { var d = c.data, f = g, j = c.transport || a.fn.select2.ajaxDefaults.transport, k = { type: c.type || "GET", cache: c.cache || !1, jsonpCallback: c.jsonpCallback || b, dataType: c.dataType || "json" }, l = a.extend({}, a.fn.select2.ajaxDefaults.params, k); d = d ? d.call(h, i.term, i.page, i.context) : null, f = "function" == typeof f ? f.call(h, i.term, i.page, i.context) : f, e && "function" == typeof e.abort && e.abort(), c.params && (a.isFunction(c.params) ? a.extend(l, c.params.call(h)) : a.extend(l, c.params)), a.extend(l, { url: f, dataType: c.dataType, data: d, success: function (a) { var b = c.results(a, i.page, i); i.callback(b) }, error: function (a, b, c) { var d = { hasError: !0, jqXHR: a, textStatus: b, errorThrown: c }; i.callback(d) } }), e = j.call(h, l) }, f) } } function H(b) { var d, e, c = b, f = function (a) { return "" + a.text }; a.isArray(c) && (e = c, c = { results: e }), a.isFunction(c) === !1 && (e = c, c = function () { return e }); var g = c(); return g.text && (f = g.text, a.isFunction(f) || (d = g.text, f = function (a) { return a[d] })), function (b) { var g, d = b.term, e = { results: [] }; return "" === d ? void b.callback(c()) : (g = function (c, e) { var h, i; if (c = c[0], c.children) { h = {}; for (i in c) c.hasOwnProperty(i) && (h[i] = c[i]); h.children = [], a(c.children).each2(function (a, b) { g(b, h.children) }), (h.children.length || b.matcher(d, f(h), c)) && e.push(h) } else b.matcher(d, f(c), c) && e.push(c) }, a(c().results).each2(function (a, b) { g(b, e.results) }), void b.callback(e)) } } function I(c) { var d = a.isFunction(c); return function (e) { var f = e.term, g = { results: [] }, h = d ? c(e) : c; a.isArray(h) && (a(h).each(function () { var a = this.text !== b, c = a ? this.text : this; ("" === f || e.matcher(f, c)) && g.results.push(a ? this : { id: this, text: this }) }), e.callback(g)) } } function J(b, c) { if (a.isFunction(b)) return !0; if (!b) return !1; if ("string" == typeof b) return !0; throw new Error(c + " must be a string, function, or falsy value") } function K(b, c) { if (a.isFunction(b)) { var d = Array.prototype.slice.call(arguments, 2); return b.apply(c, d) } return b } function L(b) { var c = 0; return a.each(b, function (a, b) { b.children ? c += L(b.children) : c++ }), c } function M(a, c, d, e) { var h, i, j, k, l, f = a, g = !1; if (!e.createSearchChoice || !e.tokenSeparators || e.tokenSeparators.length < 1) return b; for (; ;) { for (i = -1, j = 0, k = e.tokenSeparators.length; k > j && (l = e.tokenSeparators[j], i = a.indexOf(l), !(i >= 0)); j++); if (0 > i) break; if (h = a.substring(0, i), a = a.substring(i + l.length), h.length > 0 && (h = e.createSearchChoice.call(this, h, c), h !== b && null !== h && e.id(h) !== b && null !== e.id(h))) { for (g = !1, j = 0, k = c.length; k > j; j++)if (r(e.id(h), e.id(c[j]))) { g = !0; break } g || d(h) } } return f !== a ? a : void 0 } function N() { var b = this; a.each(arguments, function (a, c) { b[c].remove(), b[c] = null }) } function O(b, c) { var d = function () { }; return d.prototype = new b, d.prototype.constructor = d, d.prototype.parent = b.prototype, d.prototype = a.extend(d.prototype, c), d } if (window.Select2 === b) {
var c, d, e, f, g, i, j, h = { x: 0, y: 0 }, k = { TAB: 9, ENTER: 13, ESC: 27, SPACE: 32, LEFT: 37, UP: 38, RIGHT: 39, DOWN: 40, SHIFT: 16, CTRL: 17, ALT: 18, PAGE_UP: 33, PAGE_DOWN: 34, HOME: 36, END: 35, BACKSPACE: 8, DELETE: 46, isArrow: function (a) { switch (a = a.which ? a.which : a) { case k.LEFT: case k.RIGHT: case k.UP: case k.DOWN: return !0 }return !1 }, isControl: function (a) { var b = a.which; switch (b) { case k.SHIFT: case k.CTRL: case k.ALT: return !0 }return a.metaKey ? !0 : !1 }, isFunctionKey: function (a) { return a = a.which ? a.which : a, a >= 112 && 123 >= a } }, l = "<div class='select2-measure-scrollbar'></div>", m = { "\u24b6": "A", "\uff21": "A", "\xc0": "A", "\xc1": "A", "\xc2": "A", "\u1ea6": "A", "\u1ea4": "A", "\u1eaa": "A", "\u1ea8": "A", "\xc3": "A", "\u0100": "A", "\u0102": "A", "\u1eb0": "A", "\u1eae": "A", "\u1eb4": "A", "\u1eb2": "A", "\u0226": "A", "\u01e0": "A", "\xc4": "A", "\u01de": "A", "\u1ea2": "A", "\xc5": "A", "\u01fa": "A", "\u01cd": "A", "\u0200": "A", "\u0202": "A", "\u1ea0": "A", "\u1eac": "A", "\u1eb6": "A", "\u1e00": "A", "\u0104": "A", "\u023a": "A", "\u2c6f": "A", "\ua732": "AA", "\xc6": "AE", "\u01fc": "AE", "\u01e2": "AE", "\ua734": "AO", "\ua736": "AU", "\ua738": "AV", "\ua73a": "AV", "\ua73c": "AY", "\u24b7": "B", "\uff22": "B", "\u1e02": "B", "\u1e04": "B", "\u1e06": "B", "\u0243": "B", "\u0182": "B", "\u0181": "B", "\u24b8": "C", "\uff23": "C", "\u0106": "C", "\u0108": "C", "\u010a": "C", "\u010c": "C", "\xc7": "C", "\u1e08": "C", "\u0187": "C", "\u023b": "C", "\ua73e": "C", "\u24b9": "D", "\uff24": "D", "\u1e0a": "D", "\u010e": "D", "\u1e0c": "D", "\u1e10": "D", "\u1e12": "D", "\u1e0e": "D", "\u0110": "D", "\u018b": "D", "\u018a": "D", "\u0189": "D", "\ua779": "D", "\u01f1": "DZ", "\u01c4": "DZ", "\u01f2": "Dz", "\u01c5": "Dz", "\u24ba": "E", "\uff25": "E", "\xc8": "E", "\xc9": "E", "\xca": "E", "\u1ec0": "E", "\u1ebe": "E", "\u1ec4": "E", "\u1ec2": "E", "\u1ebc": "E", "\u0112": "E", "\u1e14": "E", "\u1e16": "E", "\u0114": "E", "\u0116": "E", "\xcb": "E", "\u1eba": "E", "\u011a": "E", "\u0204": "E", "\u0206": "E", "\u1eb8": "E", "\u1ec6": "E", "\u0228": "E", "\u1e1c": "E", "\u0118": "E", "\u1e18": "E", "\u1e1a": "E", "\u0190": "E", "\u018e": "E", "\u24bb": "F", "\uff26": "F", "\u1e1e": "F", "\u0191": "F", "\ua77b": "F", "\u24bc": "G", "\uff27": "G", "\u01f4": "G", "\u011c": "G", "\u1e20": "G", "\u011e": "G", "\u0120": "G", "\u01e6": "G", "\u0122": "G", "\u01e4": "G", "\u0193": "G", "\ua7a0": "G", "\ua77d": "G", "\ua77e": "G", "\u24bd": "H", "\uff28": "H", "\u0124": "H", "\u1e22": "H", "\u1e26": "H", "\u021e": "H", "\u1e24": "H", "\u1e28": "H", "\u1e2a": "H", "\u0126": "H", "\u2c67": "H", "\u2c75": "H", "\ua78d": "H", "\u24be": "I", "\uff29": "I", "\xcc": "I", "\xcd": "I", "\xce": "I", "\u0128": "I", "\u012a": "I", "\u012c": "I", "\u0130": "I", "\xcf": "I", "\u1e2e": "I", "\u1ec8": "I", "\u01cf": "I", "\u0208": "I", "\u020a": "I", "\u1eca": "I", "\u012e": "I", "\u1e2c": "I", "\u0197": "I", "\u24bf": "J", "\uff2a": "J", "\u0134": "J", "\u0248": "J", "\u24c0": "K", "\uff2b": "K", "\u1e30": "K", "\u01e8": "K", "\u1e32": "K", "\u0136": "K", "\u1e34": "K", "\u0198": "K", "\u2c69": "K", "\ua740": "K", "\ua742": "K", "\ua744": "K", "\ua7a2": "K", "\u24c1": "L", "\uff2c": "L", "\u013f": "L", "\u0139": "L", "\u013d": "L", "\u1e36": "L", "\u1e38": "L", "\u013b": "L", "\u1e3c": "L", "\u1e3a": "L", "\u0141": "L", "\u023d": "L", "\u2c62": "L", "\u2c60": "L", "\ua748": "L", "\ua746": "L", "\ua780": "L", "\u01c7": "LJ", "\u01c8": "Lj", "\u24c2": "M", "\uff2d": "M", "\u1e3e": "M", "\u1e40": "M", "\u1e42": "M", "\u2c6e": "M", "\u019c": "M", "\u24c3": "N", "\uff2e": "N", "\u01f8": "N", "\u0143": "N", "\xd1": "N", "\u1e44": "N", "\u0147": "N", "\u1e46": "N", "\u0145": "N", "\u1e4a": "N", "\u1e48": "N", "\u0220": "N", "\u019d": "N", "\ua790": "N", "\ua7a4": "N", "\u01ca": "NJ", "\u01cb": "Nj", "\u24c4": "O", "\uff2f": "O", "\xd2": "O", "\xd3": "O", "\xd4": "O", "\u1ed2": "O", "\u1ed0": "O", "\u1ed6": "O", "\u1ed4": "O", "\xd5": "O", "\u1e4c": "O", "\u022c": "O", "\u1e4e": "O", "\u014c": "O", "\u1e50": "O", "\u1e52": "O", "\u014e": "O", "\u022e": "O", "\u0230": "O", "\xd6": "O", "\u022a": "O", "\u1ece": "O", "\u0150": "O", "\u01d1": "O", "\u020c": "O", "\u020e": "O", "\u01a0": "O", "\u1edc": "O", "\u1eda": "O", "\u1ee0": "O", "\u1ede": "O", "\u1ee2": "O", "\u1ecc": "O", "\u1ed8": "O", "\u01ea": "O", "\u01ec": "O", "\xd8": "O", "\u01fe": "O", "\u0186": "O", "\u019f": "O", "\ua74a": "O", "\ua74c": "O", "\u01a2": "OI", "\ua74e": "OO", "\u0222": "OU", "\u24c5": "P", "\uff30": "P", "\u1e54": "P", "\u1e56": "P", "\u01a4": "P", "\u2c63": "P", "\ua750": "P", "\ua752": "P", "\ua754": "P", "\u24c6": "Q", "\uff31": "Q", "\ua756": "Q", "\ua758": "Q", "\u024a": "Q", "\u24c7": "R", "\uff32": "R", "\u0154": "R", "\u1e58": "R", "\u0158": "R", "\u0210": "R", "\u0212": "R", "\u1e5a": "R", "\u1e5c": "R", "\u0156": "R", "\u1e5e": "R", "\u024c": "R", "\u2c64": "R", "\ua75a": "R", "\ua7a6": "R", "\ua782": "R", "\u24c8": "S", "\uff33": "S", "\u1e9e": "S", "\u015a": "S", "\u1e64": "S", "\u015c": "S", "\u1e60": "S", "\u0160": "S", "\u1e66": "S", "\u1e62": "S", "\u1e68": "S", "\u0218": "S", "\u015e": "S", "\u2c7e": "S", "\ua7a8": "S", "\ua784": "S", "\u24c9": "T", "\uff34": "T", "\u1e6a": "T", "\u0164": "T", "\u1e6c": "T", "\u021a": "T", "\u0162": "T", "\u1e70": "T", "\u1e6e": "T", "\u0166": "T", "\u01ac": "T", "\u01ae": "T", "\u023e": "T", "\ua786": "T", "\ua728": "TZ", "\u24ca": "U", "\uff35": "U", "\xd9": "U", "\xda": "U", "\xdb": "U", "\u0168": "U", "\u1e78": "U", "\u016a": "U", "\u1e7a": "U", "\u016c": "U", "\xdc": "U", "\u01db": "U", "\u01d7": "U", "\u01d5": "U", "\u01d9": "U", "\u1ee6": "U", "\u016e": "U", "\u0170": "U", "\u01d3": "U", "\u0214": "U", "\u0216": "U", "\u01af": "U", "\u1eea": "U", "\u1ee8": "U", "\u1eee": "U", "\u1eec": "U", "\u1ef0": "U", "\u1ee4": "U", "\u1e72": "U", "\u0172": "U", "\u1e76": "U", "\u1e74": "U", "\u0244": "U", "\u24cb": "V", "\uff36": "V", "\u1e7c": "V", "\u1e7e": "V", "\u01b2": "V", "\ua75e": "V", "\u0245": "V", "\ua760": "VY", "\u24cc": "W", "\uff37": "W", "\u1e80": "W", "\u1e82": "W", "\u0174": "W", "\u1e86": "W", "\u1e84": "W", "\u1e88": "W", "\u2c72": "W", "\u24cd": "X", "\uff38": "X", "\u1e8a": "X", "\u1e8c": "X", "\u24ce": "Y", "\uff39": "Y", "\u1ef2": "Y", "\xdd": "Y", "\u0176": "Y", "\u1ef8": "Y", "\u0232": "Y", "\u1e8e": "Y", "\u0178": "Y", "\u1ef6": "Y", "\u1ef4": "Y", "\u01b3": "Y", "\u024e": "Y", "\u1efe": "Y", "\u24cf": "Z", "\uff3a": "Z", "\u0179": "Z", "\u1e90": "Z", "\u017b": "Z", "\u017d": "Z", "\u1e92": "Z", "\u1e94": "Z", "\u01b5": "Z", "\u0224": "Z", "\u2c7f": "Z", "\u2c6b": "Z", "\ua762": "Z", "\u24d0": "a", "\uff41": "a", "\u1e9a": "a", "\xe0": "a", "\xe1": "a", "\xe2": "a", "\u1ea7": "a", "\u1ea5": "a", "\u1eab": "a", "\u1ea9": "a", "\xe3": "a", "\u0101": "a", "\u0103": "a", "\u1eb1": "a", "\u1eaf": "a", "\u1eb5": "a", "\u1eb3": "a", "\u0227": "a", "\u01e1": "a", "\xe4": "a", "\u01df": "a", "\u1ea3": "a", "\xe5": "a", "\u01fb": "a", "\u01ce": "a", "\u0201": "a", "\u0203": "a", "\u1ea1": "a", "\u1ead": "a", "\u1eb7": "a", "\u1e01": "a", "\u0105": "a", "\u2c65": "a", "\u0250": "a", "\ua733": "aa", "\xe6": "ae", "\u01fd": "ae", "\u01e3": "ae", "\ua735": "ao", "\ua737": "au", "\ua739": "av", "\ua73b": "av", "\ua73d": "ay", "\u24d1": "b", "\uff42": "b", "\u1e03": "b", "\u1e05": "b", "\u1e07": "b", "\u0180": "b", "\u0183": "b", "\u0253": "b", "\u24d2": "c", "\uff43": "c", "\u0107": "c", "\u0109": "c", "\u010b": "c", "\u010d": "c", "\xe7": "c", "\u1e09": "c", "\u0188": "c", "\u023c": "c", "\ua73f": "c", "\u2184": "c", "\u24d3": "d", "\uff44": "d", "\u1e0b": "d", "\u010f": "d", "\u1e0d": "d", "\u1e11": "d", "\u1e13": "d", "\u1e0f": "d", "\u0111": "d", "\u018c": "d", "\u0256": "d", "\u0257": "d", "\ua77a": "d", "\u01f3": "dz", "\u01c6": "dz", "\u24d4": "e", "\uff45": "e", "\xe8": "e", "\xe9": "e", "\xea": "e", "\u1ec1": "e", "\u1ebf": "e", "\u1ec5": "e", "\u1ec3": "e", "\u1ebd": "e", "\u0113": "e", "\u1e15": "e", "\u1e17": "e", "\u0115": "e", "\u0117": "e", "\xeb": "e", "\u1ebb": "e", "\u011b": "e", "\u0205": "e", "\u0207": "e", "\u1eb9": "e", "\u1ec7": "e", "\u0229": "e", "\u1e1d": "e", "\u0119": "e", "\u1e19": "e", "\u1e1b": "e", "\u0247": "e", "\u025b": "e", "\u01dd": "e", "\u24d5": "f", "\uff46": "f", "\u1e1f": "f", "\u0192": "f", "\ua77c": "f", "\u24d6": "g", "\uff47": "g", "\u01f5": "g", "\u011d": "g", "\u1e21": "g", "\u011f": "g", "\u0121": "g", "\u01e7": "g", "\u0123": "g", "\u01e5": "g", "\u0260": "g", "\ua7a1": "g", "\u1d79": "g", "\ua77f": "g", "\u24d7": "h", "\uff48": "h", "\u0125": "h", "\u1e23": "h", "\u1e27": "h", "\u021f": "h", "\u1e25": "h", "\u1e29": "h", "\u1e2b": "h", "\u1e96": "h", "\u0127": "h", "\u2c68": "h", "\u2c76": "h", "\u0265": "h", "\u0195": "hv", "\u24d8": "i", "\uff49": "i", "\xec": "i", "\xed": "i", "\xee": "i", "\u0129": "i", "\u012b": "i", "\u012d": "i", "\xef": "i", "\u1e2f": "i", "\u1ec9": "i", "\u01d0": "i", "\u0209": "i", "\u020b": "i", "\u1ecb": "i", "\u012f": "i", "\u1e2d": "i", "\u0268": "i", "\u0131": "i", "\u24d9": "j", "\uff4a": "j", "\u0135": "j", "\u01f0": "j", "\u0249": "j", "\u24da": "k", "\uff4b": "k", "\u1e31": "k", "\u01e9": "k", "\u1e33": "k", "\u0137": "k", "\u1e35": "k", "\u0199": "k", "\u2c6a": "k", "\ua741": "k", "\ua743": "k", "\ua745": "k", "\ua7a3": "k", "\u24db": "l", "\uff4c": "l", "\u0140": "l", "\u013a": "l", "\u013e": "l", "\u1e37": "l", "\u1e39": "l", "\u013c": "l", "\u1e3d": "l", "\u1e3b": "l", "\u017f": "l", "\u0142": "l", "\u019a": "l", "\u026b": "l", "\u2c61": "l", "\ua749": "l", "\ua781": "l", "\ua747": "l", "\u01c9": "lj", "\u24dc": "m", "\uff4d": "m", "\u1e3f": "m", "\u1e41": "m", "\u1e43": "m", "\u0271": "m", "\u026f": "m", "\u24dd": "n", "\uff4e": "n", "\u01f9": "n", "\u0144": "n", "\xf1": "n", "\u1e45": "n", "\u0148": "n", "\u1e47": "n", "\u0146": "n", "\u1e4b": "n", "\u1e49": "n", "\u019e": "n", "\u0272": "n", "\u0149": "n", "\ua791": "n", "\ua7a5": "n", "\u01cc": "nj", "\u24de": "o", "\uff4f": "o", "\xf2": "o", "\xf3": "o", "\xf4": "o", "\u1ed3": "o", "\u1ed1": "o", "\u1ed7": "o", "\u1ed5": "o", "\xf5": "o", "\u1e4d": "o", "\u022d": "o", "\u1e4f": "o", "\u014d": "o", "\u1e51": "o", "\u1e53": "o", "\u014f": "o", "\u022f": "o", "\u0231": "o", "\xf6": "o", "\u022b": "o", "\u1ecf": "o", "\u0151": "o", "\u01d2": "o", "\u020d": "o", "\u020f": "o", "\u01a1": "o", "\u1edd": "o", "\u1edb": "o", "\u1ee1": "o", "\u1edf": "o", "\u1ee3": "o", "\u1ecd": "o", "\u1ed9": "o", "\u01eb": "o", "\u01ed": "o", "\xf8": "o", "\u01ff": "o", "\u0254": "o", "\ua74b": "o", "\ua74d": "o", "\u0275": "o", "\u01a3": "oi", "\u0223": "ou", "\ua74f": "oo", "\u24df": "p", "\uff50": "p", "\u1e55": "p", "\u1e57": "p", "\u01a5": "p", "\u1d7d": "p", "\ua751": "p", "\ua753": "p", "\ua755": "p", "\u24e0": "q", "\uff51": "q", "\u024b": "q", "\ua757": "q", "\ua759": "q", "\u24e1": "r", "\uff52": "r", "\u0155": "r", "\u1e59": "r", "\u0159": "r", "\u0211": "r", "\u0213": "r", "\u1e5b": "r", "\u1e5d": "r", "\u0157": "r", "\u1e5f": "r", "\u024d": "r", "\u027d": "r", "\ua75b": "r", "\ua7a7": "r", "\ua783": "r", "\u24e2": "s", "\uff53": "s", "\xdf": "s", "\u015b": "s", "\u1e65": "s", "\u015d": "s", "\u1e61": "s", "\u0161": "s", "\u1e67": "s", "\u1e63": "s", "\u1e69": "s", "\u0219": "s", "\u015f": "s", "\u023f": "s", "\ua7a9": "s", "\ua785": "s", "\u1e9b": "s", "\u24e3": "t", "\uff54": "t", "\u1e6b": "t", "\u1e97": "t", "\u0165": "t", "\u1e6d": "t", "\u021b": "t", "\u0163": "t", "\u1e71": "t", "\u1e6f": "t", "\u0167": "t", "\u01ad": "t", "\u0288": "t", "\u2c66": "t", "\ua787": "t", "\ua729": "tz", "\u24e4": "u", "\uff55": "u", "\xf9": "u", "\xfa": "u", "\xfb": "u", "\u0169": "u", "\u1e79": "u", "\u016b": "u", "\u1e7b": "u", "\u016d": "u", "\xfc": "u", "\u01dc": "u", "\u01d8": "u", "\u01d6": "u", "\u01da": "u", "\u1ee7": "u", "\u016f": "u", "\u0171": "u", "\u01d4": "u", "\u0215": "u", "\u0217": "u", "\u01b0": "u", "\u1eeb": "u", "\u1ee9": "u", "\u1eef": "u", "\u1eed": "u", "\u1ef1": "u", "\u1ee5": "u", "\u1e73": "u", "\u0173": "u", "\u1e77": "u", "\u1e75": "u", "\u0289": "u", "\u24e5": "v", "\uff56": "v", "\u1e7d": "v", "\u1e7f": "v", "\u028b": "v", "\ua75f": "v", "\u028c": "v", "\ua761": "vy", "\u24e6": "w", "\uff57": "w", "\u1e81": "w", "\u1e83": "w", "\u0175": "w", "\u1e87": "w", "\u1e85": "w", "\u1e98": "w", "\u1e89": "w", "\u2c73": "w", "\u24e7": "x", "\uff58": "x", "\u1e8b": "x", "\u1e8d": "x", "\u24e8": "y", "\uff59": "y", "\u1ef3": "y", "\xfd": "y", "\u0177": "y", "\u1ef9": "y", "\u0233": "y", "\u1e8f": "y", "\xff": "y", "\u1ef7": "y", "\u1e99": "y", "\u1ef5": "y", "\u01b4": "y", "\u024f": "y", "\u1eff": "y", "\u24e9": "z", "\uff5a": "z", "\u017a": "z", "\u1e91": "z", "\u017c": "z", "\u017e": "z", "\u1e93": "z", "\u1e95": "z", "\u01b6": "z", "\u0225": "z", "\u0240": "z", "\u2c6c": "z", "\ua763": "z", "\u0386": "\u0391", "\u0388": "\u0395", "\u0389": "\u0397", "\u038a": "\u0399", "\u03aa": "\u0399", "\u038c": "\u039f", "\u038e": "\u03a5", "\u03ab": "\u03a5", "\u038f": "\u03a9", "\u03ac": "\u03b1", "\u03ad": "\u03b5", "\u03ae": "\u03b7", "\u03af": "\u03b9", "\u03ca": "\u03b9", "\u0390": "\u03b9", "\u03cc": "\u03bf", "\u03cd": "\u03c5", "\u03cb": "\u03c5", "\u03b0": "\u03c5", "\u03c9": "\u03c9", "\u03c2": "\u03c3" }; i = a(document), f = function () { var a = 1; return function () { return a++ } }(), c = O(Object, {
bind: function (a) { var b = this; return function () { a.apply(b, arguments) } }, init: function (c) { var d, e, g = ".select2-results"; this.opts = c = this.prepareOpts(c), this.id = c.id, c.element.data("select2") !== b && null !== c.element.data("select2") && c.element.data("select2").destroy(), this.container = this.createContainer(), this.liveRegion = a(".select2-hidden-accessible"), 0 == this.liveRegion.length && (this.liveRegion = a("<span>", { role: "status", "aria-live": "polite" }).addClass("select2-hidden-accessible").appendTo(document.body)), this.containerId = "s2id_" + (c.element.attr("id") || "autogen" + f()), this.containerEventName = this.containerId.replace(/([.])/g, "_").replace(/([;&,\-\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g, "\\$1"), this.container.attr("id", this.containerId), this.container.attr("title", c.element.attr("title")), this.body = a(document.body), D(this.container, this.opts.element, this.opts.adaptContainerCssClass), this.container.attr("style", c.element.attr("style")), this.container.css(K(c.containerCss, this.opts.element)), this.container.addClass(K(c.containerCssClass, this.opts.element)), this.elementTabIndex = this.opts.element.attr("tabindex"), this.opts.element.data("select2", this).attr("tabindex", "-1").before(this.container).on("click.select2", A), this.container.data("select2", this), this.dropdown = this.container.find(".select2-drop"), D(this.dropdown, this.opts.element, this.opts.adaptDropdownCssClass), this.dropdown.addClass(K(c.dropdownCssClass, this.opts.element)), this.dropdown.data("select2", this), this.dropdown.on("click", A), this.results = d = this.container.find(g), this.search = e = this.container.find("input.select2-input"), this.queryCount = 0, this.resultsPage = 0, this.context = null, this.initContainer(), this.container.on("click", A), v(this.results), this.dropdown.on("mousemove-filtered", g, this.bind(this.highlightUnderEvent)), this.dropdown.on("touchstart touchmove touchend", g, this.bind(function (a) { this._touchEvent = !0, this.highlightUnderEvent(a) })), this.dropdown.on("touchmove", g, this.bind(this.touchMoved)), this.dropdown.on("touchstart touchend", g, this.bind(this.clearTouchMoved)), this.dropdown.on("click", this.bind(function (a) { this._touchEvent && (this._touchEvent = !1, this.selectHighlighted()) })), x(80, this.results), this.dropdown.on("scroll-debounced", g, this.bind(this.loadMoreIfNeeded)), a(this.container).on("change", ".select2-input", function (a) { a.stopPropagation() }), a(this.dropdown).on("change", ".select2-input", function (a) { a.stopPropagation() }), a.fn.mousewheel && d.mousewheel(function (a, b, c, e) { var f = d.scrollTop(); e > 0 && 0 >= f - e ? (d.scrollTop(0), A(a)) : 0 > e && d.get(0).scrollHeight - d.scrollTop() + e <= d.height() && (d.scrollTop(d.get(0).scrollHeight - d.height()), A(a)) }), u(e), e.on("keyup-change input paste", this.bind(this.updateResults)), e.on("focus", function () { e.addClass("select2-focused") }), e.on("blur", function () { e.removeClass("select2-focused") }), this.dropdown.on("mouseup", g, this.bind(function (b) { a(b.target).closest(".select2-result-selectable").length > 0 && (this.highlightUnderEvent(b), this.selectHighlighted(b)) })), this.dropdown.on("click mouseup mousedown touchstart touchend focusin", function (a) { a.stopPropagation() }), this.lastSearchTerm = b, a.isFunction(this.opts.initSelection) && (this.initSelection(), this.monitorSource()), null !== c.maximumInputLength && this.search.attr("maxlength", c.maximumInputLength); var h = c.element.prop("disabled"); h === b && (h = !1), this.enable(!h); var i = c.element.prop("readonly"); i === b && (i = !1), this.readonly(i), j = j || q(), this.autofocus = c.element.prop("autofocus"), c.element.prop("autofocus", !1), this.autofocus && this.focus(), this.search.attr("placeholder", c.searchInputPlaceholder) }, destroy: function () { var a = this.opts.element, c = a.data("select2"), d = this; this.close(), a.length && a[0].detachEvent && d._sync && a.each(function () { d._sync && this.detachEvent("onpropertychange", d._sync) }), this.propertyObserver && (this.propertyObserver.disconnect(), this.propertyObserver = null), this._sync = null, c !== b && (c.container.remove(), c.liveRegion.remove(), c.dropdown.remove(), a.removeData("select2").off(".select2"), a.is("input[type='hidden']") ? a.css("display", "") : (a.show().prop("autofocus", this.autofocus || !1), this.elementTabIndex ? a.attr({ tabindex: this.elementTabIndex }) : a.removeAttr("tabindex"), a.show())), N.call(this, "container", "liveRegion", "dropdown", "results", "search") }, optionToData: function (a) { return a.is("option") ? { id: a.prop("value"), text: a.text(), element: a.get(), css: a.attr("class"), disabled: a.prop("disabled"), locked: r(a.attr("locked"), "locked") || r(a.data("locked"), !0) } : a.is("optgroup") ? { text: a.attr("label"), children: [], element: a.get(), css: a.attr("class") } : void 0 }, prepareOpts: function (c) { var d, e, g, h, i = this; if (d = c.element, "select" === d.get(0).tagName.toLowerCase() && (this.select = e = c.element), e && a.each(["id", "multiple", "ajax", "query", "createSearchChoice", "initSelection", "data", "tags"], function () { if (this in c) throw new Error("Option '" + this + "' is not allowed for Select2 when attached to a <select> element.") }), c.debug = c.debug || a.fn.select2.defaults.debug, c.debug && console && console.warn && (null != c.id && console.warn("Select2: The `id` option has been removed in Select2 4.0.0, consider renaming your `id` property or mapping the property before your data makes it to Select2. You can read more at https://select2.github.io/announcements-4.0.html#changed-id"), null != c.text && console.warn("Select2: The `text` option has been removed in Select2 4.0.0, consider renaming your `text` property or mapping the property before your data makes it to Select2. You can read more at https://select2.github.io/announcements-4.0.html#changed-id"), null != c.sortResults && console.warn("Select2: the `sortResults` option has been renamed to `sorter` in Select2 4.0.0. "), null != c.selectOnBlur && console.warn("Select2: The `selectOnBlur` option has been renamed to `selectOnClose` in Select2 4.0.0."), null != c.ajax && null != c.ajax.results && console.warn("Select2: The `ajax.results` option has been renamed to `ajax.processResults` in Select2 4.0.0."), null != c.formatNoResults && console.warn("Select2: The `formatNoResults` option has been renamed to `language.noResults` in Select2 4.0.0."), null != c.formatSearching && console.warn("Select2: The `formatSearching` option has been renamed to `language.searching` in Select2 4.0.0."), null != c.formatInputTooShort && console.warn("Select2: The `formatInputTooShort` option has been renamed to `language.inputTooShort` in Select2 4.0.0."), null != c.formatInputTooLong && console.warn("Select2: The `formatInputTooLong` option has been renamed to `language.inputTooLong` in Select2 4.0.0."), null != c.formatLoading && console.warn("Select2: The `formatLoading` option has been renamed to `language.loadingMore` in Select2 4.0.0."), null != c.formatSelectionTooBig && console.warn("Select2: The `formatSelectionTooBig` option has been renamed to `language.maximumSelected` in Select2 4.0.0."), c.element.data("select2Tags") && console.warn("Select2: The `data-select2-tags` attribute has been renamed to `data-tags` in Select2 4.0.0.")), null != c.element.data("tags")) { var j = c.element.data("tags"); a.isArray(j) || (j = []), c.element.data("select2Tags", j) } if (null != c.sorter && (c.sortResults = c.sorter), null != c.selectOnClose && (c.selectOnBlur = c.selectOnClose), null != c.ajax && a.isFunction(c.ajax.processResults) && (c.ajax.results = c.ajax.processResults), null != c.language) { var k = c.language; a.isFunction(k.noMatches) && (c.formatNoMatches = k.noMatches), a.isFunction(k.searching) && (c.formatSearching = k.searching), a.isFunction(k.inputTooShort) && (c.formatInputTooShort = k.inputTooShort), a.isFunction(k.inputTooLong) && (c.formatInputTooLong = k.inputTooLong), a.isFunction(k.loadingMore) && (c.formatLoading = k.loadingMore), a.isFunction(k.maximumSelected) && (c.formatSelectionTooBig = k.maximumSelected) } if (c = a.extend({}, { populateResults: function (d, e, g) { var h, j = this.opts.id, k = this.liveRegion; (h = function (d, e, l) { var m, n, o, p, q, r, s, t, u, v; d = c.sortResults(d, e, g); var w = []; for (m = 0, n = d.length; n > m; m += 1)o = d[m], q = o.disabled === !0, p = !q && j(o) !== b, r = o.children && o.children.length > 0, s = a("<li></li>"), s.addClass("select2-results-dept-" + l), s.addClass("select2-result"), s.addClass(p ? "select2-result-selectable" : "select2-result-unselectable"), q && s.addClass("select2-disabled"), r && s.addClass("select2-result-with-children"), s.addClass(i.opts.formatResultCssClass(o)), s.attr("role", "presentation"), t = a(document.createElement("div")), t.addClass("select2-result-label"), t.attr("id", "select2-result-label-" + f()), t.attr("role", "option"), v = c.formatResult(o, t, g, i.opts.escapeMarkup), v !== b && (t.html(v), s.append(t)), r && (u = a("<ul></ul>"), u.addClass("select2-result-sub"), h(o.children, u, l + 1), s.append(u)), s.data("select2-data", o), w.push(s[0]); e.append(w), k.text(c.formatMatches(d.length)) })(e, d, 0) } }, a.fn.select2.defaults, c), "function" != typeof c.id && (g = c.id, c.id = function (a) { return a[g] }), a.isArray(c.element.data("select2Tags"))) { if ("tags" in c) throw "tags specified as both an attribute 'data-select2-tags' and in options of Select2 " + c.element.attr("id"); c.tags = c.element.data("select2Tags") } if (e ? (c.query = this.bind(function (a) { var f, g, h, c = { results: [], more: !1 }, e = a.term; h = function (b, c) { var d; b.is("option") ? a.matcher(e, b.text(), b) && c.push(i.optionToData(b)) : b.is("optgroup") && (d = i.optionToData(b), b.children().each2(function (a, b) { h(b, d.children) }), d.children.length > 0 && c.push(d)) }, f = d.children(), this.getPlaceholder() !== b && f.length > 0 && (g = this.getPlaceholderOption(), g && (f = f.not(g))), f.each2(function (a, b) { h(b, c.results) }), a.callback(c) }), c.id = function (a) { return a.id }) : "query" in c || ("ajax" in c ? (h = c.element.data("ajax-url"), h && h.length > 0 && (c.ajax.url = h), c.query = G.call(c.element, c.ajax)) : "data" in c ? c.query = H(c.data) : "tags" in c && (c.query = I(c.tags), c.createSearchChoice === b && (c.createSearchChoice = function (b) { return { id: a.trim(b), text: a.trim(b) } }), c.initSelection === b && (c.initSelection = function (b, d) { var e = []; a(s(b.val(), c.separator, c.transformVal)).each(function () { var b = { id: this, text: this }, d = c.tags; a.isFunction(d) && (d = d()), a(d).each(function () { return r(this.id, b.id) ? (b = this, !1) : void 0 }), e.push(b) }), d(e) }))), "function" != typeof c.query) throw "query function not defined for Select2 " + c.element.attr("id"); if ("top" === c.createSearchChoicePosition) c.createSearchChoicePosition = function (a, b) { a.unshift(b) }; else if ("bottom" === c.createSearchChoicePosition) c.createSearchChoicePosition = function (a, b) { a.push(b) }; else if ("function" != typeof c.createSearchChoicePosition) throw "invalid createSearchChoicePosition option must be 'top', 'bottom' or a custom function"; return c }, monitorSource: function () { var d, c = this.opts.element, e = this; c.on("change.select2", this.bind(function (a) { this.opts.element.data("select2-change-triggered") !== !0 && this.initSelection() })), this._sync = this.bind(function () { var a = c.prop("disabled"); a === b && (a = !1), this.enable(!a); var d = c.prop("readonly"); d === b && (d = !1), this.readonly(d), this.container && (D(this.container, this.opts.element, this.opts.adaptContainerCssClass), this.container.addClass(K(this.opts.containerCssClass, this.opts.element))), this.dropdown && (D(this.dropdown, this.opts.element, this.opts.adaptDropdownCssClass), this.dropdown.addClass(K(this.opts.dropdownCssClass, this.opts.element))) }), c.length && c[0].attachEvent && c.each(function () { this.attachEvent("onpropertychange", e._sync) }), d = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver, d !== b && (this.propertyObserver && (delete this.propertyObserver, this.propertyObserver = null), this.propertyObserver = new d(function (b) { a.each(b, e._sync) }), this.propertyObserver.observe(c.get(0), { attributes: !0, subtree: !1 })) }, triggerSelect: function (b) { var c = a.Event("select2-selecting", { val: this.id(b), object: b, choice: b }); return this.opts.element.trigger(c), !c.isDefaultPrevented() }, triggerChange: function (b) { b = b || {}, b = a.extend({}, b, { type: "change", val: this.val() }), this.opts.element.data("select2-change-triggered", !0), this.opts.element.trigger(b), this.opts.element.data("select2-change-triggered", !1), this.opts.element.click(), this.opts.blurOnChange && this.opts.element.blur() }, isInterfaceEnabled: function () { return this.enabledInterface === !0 }, enableInterface: function () { var a = this._enabled && !this._readonly, b = !a; return a === this.enabledInterface ? !1 : (this.container.toggleClass("select2-container-disabled", b), this.close(), this.enabledInterface = a, !0) }, enable: function (a) { a === b && (a = !0), this._enabled !== a && (this._enabled = a, this.opts.element.prop("disabled", !a), this.enableInterface()) }, disable: function () { this.enable(!1) }, readonly: function (a) { a === b && (a = !1), this._readonly !== a && (this._readonly = a, this.opts.element.prop("readonly", a), this.enableInterface()) }, opened: function () { return this.container ? this.container.hasClass("select2-dropdown-open") : !1 }, positionDropdown: function () { var v, w, x, y, z, b = this.dropdown, c = this.container, d = c.offset(), e = c.outerHeight(!1), f = c.outerWidth(!1), g = b.outerHeight(!1), h = a(window), i = h.width(), k = h.height(), l = h.scrollLeft() + i, m = h.scrollTop() + k, n = d.top + e, o = d.left, p = m >= n + g, q = d.top - g >= h.scrollTop(), r = b.outerWidth(!1), s = function () { return l >= o + r }, t = function () { return d.left + l + c.outerWidth(!1) > r }, u = b.hasClass("select2-drop-above"); u ? (w = !0, !q && p && (x = !0, w = !1)) : (w = !1, !p && q && (x = !0, w = !0)), x && (b.hide(), d = this.container.offset(), e = this.container.outerHeight(!1), f = this.container.outerWidth(!1), g = b.outerHeight(!1), l = h.scrollLeft() + i, m = h.scrollTop() + k, n = d.top + e, o = d.left, r = b.outerWidth(!1), b.show(), this.focusSearch()), this.opts.dropdownAutoWidth ? (z = a(".select2-results", b)[0], b.addClass("select2-drop-auto-width"), b.css("width", ""), r = b.outerWidth(!1) + (z.scrollHeight === z.clientHeight ? 0 : j.width), r > f ? f = r : r = f, g = b.outerHeight(!1)) : this.container.removeClass("select2-drop-auto-width"), "static" !== this.body.css("position") && (v = this.body.offset(), n -= v.top, o -= v.left), !s() && t() && (o = d.left + this.container.outerWidth(!1) - r), y = { left: o, width: f }, w ? (this.container.addClass("select2-drop-above"), b.addClass("select2-drop-above"), g = b.outerHeight(!1), y.top = d.top - g, y.bottom = "auto") : (y.top = n, y.bottom = "auto", this.container.removeClass("select2-drop-above"), b.removeClass("select2-drop-above")), y = a.extend(y, K(this.opts.dropdownCss, this.opts.element)), b.css(y) }, shouldOpen: function () { var b; return this.opened() ? !1 : this._enabled === !1 || this._readonly === !0 ? !1 : (b = a.Event("select2-opening"), this.opts.element.trigger(b), !b.isDefaultPrevented()) }, clearDropdownAlignmentPreference: function () {
this.container.removeClass("select2-drop-above"),
this.dropdown.removeClass("select2-drop-above")
}, open: function () { return this.shouldOpen() ? (this.opening(), i.on("mousemove.select2Event", function (a) { h.x = a.pageX, h.y = a.pageY }), !0) : !1 }, opening: function () { var f, b = this.containerEventName, c = "scroll." + b, d = "resize." + b, e = "orientationchange." + b; this.container.addClass("select2-dropdown-open").addClass("select2-container-active"), this.clearDropdownAlignmentPreference(), this.dropdown[0] !== this.body.children().last()[0] && this.dropdown.detach().appendTo(this.body), f = a("#select2-drop-mask"), 0 === f.length && (f = a(document.createElement("div")), f.attr("id", "select2-drop-mask").attr("class", "select2-drop-mask"), f.hide(), f.appendTo(this.body), f.on("mousedown touchstart click", function (b) { n(f); var d, c = a("#select2-drop"); c.length > 0 && (d = c.data("select2"), d.opts.selectOnBlur && d.selectHighlighted({ noFocus: !0 }), d.close(), b.preventDefault(), b.stopPropagation()) })), this.dropdown.prev()[0] !== f[0] && this.dropdown.before(f), a("#select2-drop").removeAttr("id"), this.dropdown.attr("id", "select2-drop"), f.show(), this.positionDropdown(), this.dropdown.show(), this.positionDropdown(), this.dropdown.addClass("select2-drop-active"); var g = this; this.container.parents().add(window).each(function () { a(this).on(d + " " + c + " " + e, function (a) { g.opened() && g.positionDropdown() }) }) }, close: function () { if (this.opened()) { var b = this.containerEventName, c = "scroll." + b, d = "resize." + b, e = "orientationchange." + b; this.container.parents().add(window).each(function () { a(this).off(c).off(d).off(e) }), this.clearDropdownAlignmentPreference(), a("#select2-drop-mask").hide(), this.dropdown.removeAttr("id"), this.dropdown.hide(), this.container.removeClass("select2-dropdown-open").removeClass("select2-container-active"), this.results.empty(), i.off("mousemove.select2Event"), this.clearSearch(), this.search.removeClass("select2-active"), this.search.removeAttr("aria-activedescendant"), this.opts.element.trigger(a.Event("select2-close")) } }, externalSearch: function (a) { this.open(), this.search.val(a), this.updateResults(!1) }, clearSearch: function () { }, prefillNextSearchTerm: function () { if ("" !== this.search.val()) return !1; var a = this.opts.nextSearchTerm(this.data(), this.lastSearchTerm); return a !== b ? (this.search.val(a), this.search.select(), !0) : !1 }, getMaximumSelectionSize: function () { return K(this.opts.maximumSelectionSize, this.opts.element) }, ensureHighlightVisible: function () { var c, d, e, f, g, h, i, j, b = this.results; if (d = this.highlight(), !(0 > d)) { if (0 == d) return void b.scrollTop(0); c = this.findHighlightableChoices().find(".select2-result-label"), e = a(c[d]), j = (e.offset() || {}).top || 0, f = j + e.outerHeight(!0), d === c.length - 1 && (i = b.find("li.select2-more-results"), i.length > 0 && (f = i.offset().top + i.outerHeight(!0))), g = b.offset().top + b.outerHeight(!1), f > g && b.scrollTop(b.scrollTop() + (f - g)), h = j - b.offset().top, 0 > h && "none" != e.css("display") && b.scrollTop(b.scrollTop() + h) } }, findHighlightableChoices: function () { return this.results.find(".select2-result-selectable:not(.select2-disabled):not(.select2-selected)") }, moveHighlight: function (b) { for (var c = this.findHighlightableChoices(), d = this.highlight(); d > -1 && d < c.length;) { d += b; var e = a(c[d]); if (e.hasClass("select2-result-selectable") && !e.hasClass("select2-disabled") && !e.hasClass("select2-selected")) { this.highlight(d); break } } }, highlight: function (b) { var d, e, c = this.findHighlightableChoices(); return 0 === arguments.length ? p(c.filter(".select2-highlighted")[0], c.get()) : (b >= c.length && (b = c.length - 1), 0 > b && (b = 0), this.removeHighlight(), d = a(c[b]), d.addClass("select2-highlighted"), this.search.attr("aria-activedescendant", d.find(".select2-result-label").attr("id")), this.ensureHighlightVisible(), this.liveRegion.text(d.text()), e = d.data("select2-data"), void (e && this.opts.element.trigger({ type: "select2-highlight", val: this.id(e), choice: e }))) }, removeHighlight: function () { this.results.find(".select2-highlighted").removeClass("select2-highlighted") }, touchMoved: function () { this._touchMoved = !0 }, clearTouchMoved: function () { this._touchMoved = !1 }, countSelectableResults: function () { return this.findHighlightableChoices().length }, highlightUnderEvent: function (b) { var c = a(b.target).closest(".select2-result-selectable"); if (c.length > 0 && !c.is(".select2-highlighted")) { var d = this.findHighlightableChoices(); this.highlight(d.index(c)) } else 0 == c.length && this.removeHighlight() }, loadMoreIfNeeded: function () { var c, a = this.results, b = a.find("li.select2-more-results"), d = this.resultsPage + 1, e = this, f = this.search.val(), g = this.context; 0 !== b.length && (c = b.offset().top - a.offset().top - a.height(), c <= this.opts.loadMorePadding && (b.addClass("select2-active"), this.opts.query({ element: this.opts.element, term: f, page: d, context: g, matcher: this.opts.matcher, callback: this.bind(function (c) { e.opened() && (e.opts.populateResults.call(this, a, c.results, { term: f, page: d, context: g }), e.postprocessResults(c, !1, !1), c.more === !0 ? (b.detach().appendTo(a).html(e.opts.escapeMarkup(K(e.opts.formatLoadMore, e.opts.element, d + 1))), window.setTimeout(function () { e.loadMoreIfNeeded() }, 10)) : b.remove(), e.positionDropdown(), e.resultsPage = d, e.context = c.context, this.opts.element.trigger({ type: "select2-loaded", items: c })) }) }))) }, tokenize: function () { }, updateResults: function (c) { function m() { d.removeClass("select2-active"), h.positionDropdown(), e.find(".select2-no-results,.select2-selection-limit,.select2-searching").length ? h.liveRegion.text(e.text()) : h.liveRegion.text(h.opts.formatMatches(e.find('.select2-result-selectable:not(".select2-selected")').length)) } function n(a) { e.html(a), m() } var g, i, l, d = this.search, e = this.results, f = this.opts, h = this, j = d.val(), k = a.data(this.container, "select2-last-term"); if ((c === !0 || !k || !r(j, k)) && (a.data(this.container, "select2-last-term", j), c === !0 || this.showSearchInput !== !1 && this.opened())) { l = ++this.queryCount; var o = this.getMaximumSelectionSize(); if (o >= 1 && (g = this.data(), a.isArray(g) && g.length >= o && J(f.formatSelectionTooBig, "formatSelectionTooBig"))) return void n("<li class='select2-selection-limit'>" + K(f.formatSelectionTooBig, f.element, o) + "</li>"); if (d.val().length < f.minimumInputLength) return n(J(f.formatInputTooShort, "formatInputTooShort") ? "<li class='select2-no-results'>" + K(f.formatInputTooShort, f.element, d.val(), f.minimumInputLength) + "</li>" : ""), void (c && this.showSearch && this.showSearch(!0)); if (f.maximumInputLength && d.val().length > f.maximumInputLength) return void n(J(f.formatInputTooLong, "formatInputTooLong") ? "<li class='select2-no-results'>" + K(f.formatInputTooLong, f.element, d.val(), f.maximumInputLength) + "</li>" : ""); f.formatSearching && 0 === this.findHighlightableChoices().length && n("<li class='select2-searching'>" + K(f.formatSearching, f.element) + "</li>"), d.addClass("select2-active"), this.removeHighlight(), i = this.tokenize(), i != b && null != i && d.val(i), this.resultsPage = 1, f.query({ element: f.element, term: d.val(), page: this.resultsPage, context: null, matcher: f.matcher, callback: this.bind(function (g) { var i; if (l == this.queryCount) { if (!this.opened()) return void this.search.removeClass("select2-active"); if (g.hasError !== b && J(f.formatAjaxError, "formatAjaxError")) return void n("<li class='select2-ajax-error'>" + K(f.formatAjaxError, f.element, g.jqXHR, g.textStatus, g.errorThrown) + "</li>"); if (this.context = g.context === b ? null : g.context, this.opts.createSearchChoice && "" !== d.val() && (i = this.opts.createSearchChoice.call(h, d.val(), g.results), i !== b && null !== i && h.id(i) !== b && null !== h.id(i) && 0 === a(g.results).filter(function () { return r(h.id(this), h.id(i)) }).length && this.opts.createSearchChoicePosition(g.results, i)), 0 === g.results.length && J(f.formatNoMatches, "formatNoMatches")) return n("<li class='select2-no-results'>" + K(f.formatNoMatches, f.element, d.val()) + "</li>"), void (this.showSearch && this.showSearch(d.val())); e.empty(), h.opts.populateResults.call(this, e, g.results, { term: d.val(), page: this.resultsPage, context: null }), g.more === !0 && J(f.formatLoadMore, "formatLoadMore") && (e.append("<li class='select2-more-results'>" + f.escapeMarkup(K(f.formatLoadMore, f.element, this.resultsPage)) + "</li>"), window.setTimeout(function () { h.loadMoreIfNeeded() }, 10)), this.postprocessResults(g, c), m(), this.opts.element.trigger({ type: "select2-loaded", items: g }) } }) }) } }, cancel: function () { this.close() }, blur: function () { this.opts.selectOnBlur && this.selectHighlighted({ noFocus: !0 }), this.close(), this.container.removeClass("select2-container-active"), this.search[0] === document.activeElement && this.search.blur(), this.clearSearch(), this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus") }, focusSearch: function () { y(this.search) }, selectHighlighted: function (a) { if (this._touchMoved) return void this.clearTouchMoved(); var b = this.highlight(), c = this.results.find(".select2-highlighted"), d = c.closest(".select2-result").data("select2-data"); d ? (this.highlight(b), this.onSelect(d, a)) : a && a.noFocus && this.close() }, getPlaceholder: function () { var a; return this.opts.element.attr("placeholder") || this.opts.element.attr("data-placeholder") || this.opts.element.data("placeholder") || this.opts.placeholder || ((a = this.getPlaceholderOption()) !== b ? a.text() : b) }, getPlaceholderOption: function () { if (this.select) { var c = this.select.children("option").first(); if (this.opts.placeholderOption !== b) return "first" === this.opts.placeholderOption && c || "function" == typeof this.opts.placeholderOption && this.opts.placeholderOption(this.select); if ("" === a.trim(c.text()) && "" === c.val()) return c } }, initContainerWidth: function () { function b() { var b, c, d, e, f, g; if ("off" === this.opts.width) return null; if ("element" === this.opts.width) return 0 === this.opts.element.outerWidth(!1) ? "auto" : this.opts.element.outerWidth(!1) + "px"; if ("copy" === this.opts.width || "resolve" === this.opts.width) { if (b = this.opts.element.attr("style"), "string" == typeof b) for (c = b.split(";"), e = 0, f = c.length; f > e; e += 1)if (g = c[e].replace(/\s/g, ""), d = g.match(/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i), null !== d && d.length >= 1) return d[1]; return "resolve" === this.opts.width ? (b = this.opts.element.css("width"), b.indexOf("%") > 0 ? b : 0 === this.opts.element.outerWidth(!1) ? "auto" : this.opts.element.outerWidth(!1) + "px") : null } return a.isFunction(this.opts.width) ? this.opts.width() : this.opts.width } var c = b.call(this); null !== c && this.container.css("width", c) }
}), d = O(c, { createContainer: function () { var b = a(document.createElement("div")).attr({ "class": "select2-container" }).html(["<a href='javascript:void(0)' class='select2-choice' tabindex='-1'>", " <span class='select2-chosen'>&#160;</span><abbr class='select2-search-choice-close'></abbr>", " <span class='select2-arrow' role='presentation'><b role='presentation'></b></span>", "</a>", "<label for='' class='select2-offscreen'></label>", "<input class='select2-focusser select2-offscreen' type='text' aria-haspopup='true' role='button' />", "<div class='select2-drop select2-display-none'>", " <div class='select2-search'>", " <label for='' class='select2-offscreen'></label>", " <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input' role='combobox' aria-expanded='true'", " aria-autocomplete='list' />", " </div>", " <ul class='select2-results' role='listbox'>", " </ul>", "</div>"].join("")); return b }, enableInterface: function () { this.parent.enableInterface.apply(this, arguments) && this.focusser.prop("disabled", !this.isInterfaceEnabled()) }, opening: function () { var b, c, d; this.opts.minimumResultsForSearch >= 0 && this.showSearch(!0), this.parent.opening.apply(this, arguments), this.showSearchInput !== !1 && this.search.val(this.focusser.val()), this.opts.shouldFocusInput(this) && (this.search.focus(), b = this.search.get(0), b.createTextRange ? (c = b.createTextRange(), c.collapse(!1), c.select()) : b.setSelectionRange && (d = this.search.val().length, b.setSelectionRange(d, d))), this.prefillNextSearchTerm(), this.focusser.prop("disabled", !0).val(""), this.updateResults(!0), this.opts.element.trigger(a.Event("select2-open")) }, close: function () { this.opened() && (this.parent.close.apply(this, arguments), this.focusser.prop("disabled", !1), this.opts.shouldFocusInput(this) && this.focusser.focus()) }, focus: function () { this.opened() ? this.close() : (this.focusser.prop("disabled", !1), this.opts.shouldFocusInput(this) && this.focusser.focus()) }, isFocused: function () { return this.container.hasClass("select2-container-active") }, cancel: function () { this.parent.cancel.apply(this, arguments), this.focusser.prop("disabled", !1), this.opts.shouldFocusInput(this) && this.focusser.focus() }, destroy: function () { a("label[for='" + this.focusser.attr("id") + "']").attr("for", this.opts.element.attr("id")), this.parent.destroy.apply(this, arguments), N.call(this, "selection", "focusser") }, initContainer: function () { var b, g, c = this.container, d = this.dropdown, e = f(); this.opts.minimumResultsForSearch < 0 ? this.showSearch(!1) : this.showSearch(!0), this.selection = b = c.find(".select2-choice"), this.focusser = c.find(".select2-focusser"), b.find(".select2-chosen").attr("id", "select2-chosen-" + e), this.focusser.attr("aria-labelledby", "select2-chosen-" + e), this.results.attr("id", "select2-results-" + e), this.search.attr("aria-owns", "select2-results-" + e), this.focusser.attr("id", "s2id_autogen" + e), g = a("label[for='" + this.opts.element.attr("id") + "']"), this.opts.element.on("focus.select2", this.bind(function () { this.focus() })), this.focusser.prev().text(g.text()).attr("for", this.focusser.attr("id")); var h = this.opts.element.attr("title"); this.opts.element.attr("title", h || g.text()), this.focusser.attr("tabindex", this.elementTabIndex), this.search.attr("id", this.focusser.attr("id") + "_search"), this.search.prev().text(a("label[for='" + this.focusser.attr("id") + "']").text()).attr("for", this.search.attr("id")), this.search.on("keydown", this.bind(function (a) { if (this.isInterfaceEnabled() && 229 != a.keyCode) { if (a.which === k.PAGE_UP || a.which === k.PAGE_DOWN) return void A(a); switch (a.which) { case k.UP: case k.DOWN: return this.moveHighlight(a.which === k.UP ? -1 : 1), void A(a); case k.ENTER: return this.selectHighlighted(), void A(a); case k.TAB: return void this.selectHighlighted({ noFocus: !0 }); case k.ESC: return this.cancel(a), void A(a) } } })), this.search.on("blur", this.bind(function (a) { document.activeElement === this.body.get(0) && window.setTimeout(this.bind(function () { this.opened() && this.results && this.results.length > 1 && this.search.focus() }), 0) })), this.focusser.on("keydown", this.bind(function (a) { if (this.isInterfaceEnabled() && a.which !== k.TAB && !k.isControl(a) && !k.isFunctionKey(a) && a.which !== k.ESC) { if (this.opts.openOnEnter === !1 && a.which === k.ENTER) return void A(a); if (a.which == k.DOWN || a.which == k.UP || a.which == k.ENTER && this.opts.openOnEnter) { if (a.altKey || a.ctrlKey || a.shiftKey || a.metaKey) return; return this.open(), void A(a) } return a.which == k.DELETE || a.which == k.BACKSPACE ? (this.opts.allowClear && this.clear(), void A(a)) : void 0 } })), u(this.focusser), this.focusser.on("keyup-change input", this.bind(function (a) { if (this.opts.minimumResultsForSearch >= 0) { if (a.stopPropagation(), this.opened()) return; this.open() } })), b.on("mousedown touchstart", "abbr", this.bind(function (a) { this.isInterfaceEnabled() && (this.clear(), B(a), this.close(), this.selection && this.selection.focus()) })), b.on("mousedown touchstart", this.bind(function (c) { n(b), this.container.hasClass("select2-container-active") || this.opts.element.trigger(a.Event("select2-focus")), this.opened() ? this.close() : this.isInterfaceEnabled() && this.open(), A(c) })), d.on("mousedown touchstart", this.bind(function () { this.opts.shouldFocusInput(this) && this.search.focus() })), b.on("focus", this.bind(function (a) { A(a) })), this.focusser.on("focus", this.bind(function () { this.container.hasClass("select2-container-active") || this.opts.element.trigger(a.Event("select2-focus")), this.container.addClass("select2-container-active") })).on("blur", this.bind(function () { this.opened() || (this.container.removeClass("select2-container-active"), this.opts.element.trigger(a.Event("select2-blur"))) })), this.search.on("focus", this.bind(function () { this.container.hasClass("select2-container-active") || this.opts.element.trigger(a.Event("select2-focus")), this.container.addClass("select2-container-active") })), this.initContainerWidth(), this.opts.element.hide(), this.setPlaceholder() }, clear: function (b) { var c = this.selection.data("select2-data"); if (c) { var d = a.Event("select2-clearing"); if (this.opts.element.trigger(d), d.isDefaultPrevented()) return; var e = this.getPlaceholderOption(); this.opts.element.val(e ? e.val() : ""), this.selection.find(".select2-chosen").empty(), this.selection.removeData("select2-data"), this.setPlaceholder(), b !== !1 && (this.opts.element.trigger({ type: "select2-removed", val: this.id(c), choice: c }), this.triggerChange({ removed: c })) } }, initSelection: function () { if (this.isPlaceholderOptionSelected()) this.updateSelection(null), this.close(), this.setPlaceholder(); else { var c = this; this.opts.initSelection.call(null, this.opts.element, function (a) { a !== b && null !== a && (c.updateSelection(a), c.close(), c.setPlaceholder(), c.lastSearchTerm = c.search.val()) }) } }, isPlaceholderOptionSelected: function () { var a; return this.getPlaceholder() === b ? !1 : (a = this.getPlaceholderOption()) !== b && a.prop("selected") || "" === this.opts.element.val() || this.opts.element.val() === b || null === this.opts.element.val() }, prepareOpts: function () { var b = this.parent.prepareOpts.apply(this, arguments), c = this; return "select" === b.element.get(0).tagName.toLowerCase() ? b.initSelection = function (a, b) { var d = a.find("option").filter(function () { return this.selected && !this.disabled }); b(c.optionToData(d)) } : "data" in b && (b.initSelection = b.initSelection || function (c, d) { var e = c.val(), f = null; b.query({ matcher: function (a, c, d) { var g = r(e, b.id(d)); return g && (f = d), g }, callback: a.isFunction(d) ? function () { d(f) } : a.noop }) }), b }, getPlaceholder: function () { return this.select && this.getPlaceholderOption() === b ? b : this.parent.getPlaceholder.apply(this, arguments) }, setPlaceholder: function () { var a = this.getPlaceholder(); if (this.isPlaceholderOptionSelected() && a !== b) { if (this.select && this.getPlaceholderOption() === b) return; this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(a)), this.selection.addClass("select2-default"), this.container.removeClass("select2-allowclear") } }, postprocessResults: function (a, b, c) { var d = 0, e = this; if (this.findHighlightableChoices().each2(function (a, b) { return r(e.id(b.data("select2-data")), e.opts.element.val()) ? (d = a, !1) : void 0 }), c !== !1 && (b === !0 && d >= 0 ? this.highlight(d) : this.highlight(0)), b === !0) { var g = this.opts.minimumResultsForSearch; g >= 0 && this.showSearch(L(a.results) >= g) } }, showSearch: function (b) { this.showSearchInput !== b && (this.showSearchInput = b, this.dropdown.find(".select2-search").toggleClass("select2-search-hidden", !b), this.dropdown.find(".select2-search").toggleClass("select2-offscreen", !b), a(this.dropdown, this.container).toggleClass("select2-with-searchbox", b)) }, onSelect: function (a, b) { if (this.triggerSelect(a)) { var c = this.opts.element.val(), d = this.data(); this.opts.element.val(this.id(a)), this.updateSelection(a), this.opts.element.trigger({ type: "select2-selected", val: this.id(a), choice: a }), this.lastSearchTerm = this.search.val(), this.close(), b && b.noFocus || !this.opts.shouldFocusInput(this) || this.focusser.focus(), r(c, this.id(a)) || this.triggerChange({ added: a, removed: d }) } }, updateSelection: function (a) { var d, e, c = this.selection.find(".select2-chosen"); this.selection.data("select2-data", a), c.empty(), null !== a && (d = this.opts.formatSelection(a, c, this.opts.escapeMarkup)), d !== b && c.append(d), e = this.opts.formatSelectionCssClass(a, c), e !== b && c.addClass(e), this.selection.removeClass("select2-default"), this.opts.allowClear && this.getPlaceholder() !== b && this.container.addClass("select2-allowclear") }, val: function () { var a, c = !1, d = null, e = this, f = this.data(); if (0 === arguments.length) return this.opts.element.val(); if (a = arguments[0], arguments.length > 1 && (c = arguments[1], this.opts.debug && console && console.warn && console.warn('Select2: The second option to `select2("val")` is not supported in Select2 4.0.0. The `change` event will always be triggered in 4.0.0.')), this.select) this.opts.debug && console && console.warn && console.warn('Select2: Setting the value on a <select> using `select2("val")` is no longer supported in 4.0.0. You can use the `.val(newValue).trigger("change")` method provided by jQuery instead.'), this.select.val(a).find("option").filter(function () { return this.selected }).each2(function (a, b) { return d = e.optionToData(b), !1 }), this.updateSelection(d), this.setPlaceholder(), c && this.triggerChange({ added: d, removed: f }); else { if (!a && 0 !== a) return void this.clear(c); if (this.opts.initSelection === b) throw new Error("cannot call val() if initSelection() is not defined"); this.opts.element.val(a), this.opts.initSelection(this.opts.element, function (a) { e.opts.element.val(a ? e.id(a) : ""), e.updateSelection(a), e.setPlaceholder(), c && e.triggerChange({ added: a, removed: f }) }) } }, clearSearch: function () { this.search.val(""), this.focusser.val("") }, data: function (a) { var c, d = !1; return 0 === arguments.length ? (c = this.selection.data("select2-data"), c == b && (c = null), c) : (this.opts.debug && console && console.warn && console.warn('Select2: The `select2("data")` method can no longer set selected values in 4.0.0, consider using the `.val()` method instead.'), arguments.length > 1 && (d = arguments[1]), a ? (c = this.data(), this.opts.element.val(a ? this.id(a) : ""), this.updateSelection(a), d && this.triggerChange({ added: a, removed: c })) : this.clear(d), void 0) } }), e = O(c, {
createContainer: function () { var b = a(document.createElement("div")).attr({ "class": "select2-container select2-container-multi" }).html(["<ul class='select2-choices'>", " <li class='select2-search-field'>", " <label for='' class='select2-offscreen'></label>", " <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'>", " </li>", "</ul>", "<div class='select2-drop select2-drop-multi select2-display-none'>", " <ul class='select2-results'>", " </ul>", "</div>"].join("")); return b }, prepareOpts: function () { var b = this.parent.prepareOpts.apply(this, arguments), c = this; return "select" === b.element.get(0).tagName.toLowerCase() ? b.initSelection = function (a, b) { var d = []; a.find("option").filter(function () { return this.selected && !this.disabled }).each2(function (a, b) { d.push(c.optionToData(b)) }), b(d) } : "data" in b && (b.initSelection = b.initSelection || function (c, d) { var e = s(c.val(), b.separator, b.transformVal), f = []; b.query({ matcher: function (c, d, g) { var h = a.grep(e, function (a) { return r(a, b.id(g)) }).length; return h && f.push(g), h }, callback: a.isFunction(d) ? function () { for (var a = [], c = 0; c < e.length; c++)for (var g = e[c], h = 0; h < f.length; h++) { var i = f[h]; if (r(g, b.id(i))) { a.push(i), f.splice(h, 1); break } } d(a) } : a.noop }) }), b }, selectChoice: function (a) { var b = this.container.find(".select2-search-choice-focus"); b.length && a && a[0] == b[0] || (b.length && this.opts.element.trigger("choice-deselected", b), b.removeClass("select2-search-choice-focus"), a && a.length && (this.close(), a.addClass("select2-search-choice-focus"), this.opts.element.trigger("choice-selected", a))) }, destroy: function () { a("label[for='" + this.search.attr("id") + "']").attr("for", this.opts.element.attr("id")), this.parent.destroy.apply(this, arguments), N.call(this, "searchContainer", "selection") }, initContainer: function () { var c, b = ".select2-choices"; this.searchContainer = this.container.find(".select2-search-field"), this.selection = c = this.container.find(b); var d = this; this.selection.on("click", ".select2-container:not(.select2-container-disabled) .select2-search-choice:not(.select2-locked)", function (b) { d.search[0].focus(), d.selectChoice(a(this)) }), this.search.attr("id", "s2id_autogen" + f()), this.search.prev().text(a("label[for='" + this.opts.element.attr("id") + "']").text()).attr("for", this.search.attr("id")), this.opts.element.on("focus.select2", this.bind(function () { this.focus() })), this.search.on("input paste", this.bind(function () { this.search.attr("placeholder") && 0 == this.search.val().length || this.isInterfaceEnabled() && (this.opened() || this.open()) })), this.search.attr("tabindex", this.elementTabIndex), this.keydowns = 0, this.search.on("keydown", this.bind(function (a) { if (this.isInterfaceEnabled()) { ++this.keydowns; var b = c.find(".select2-search-choice-focus"), d = b.prev(".select2-search-choice:not(.select2-locked)"), e = b.next(".select2-search-choice:not(.select2-locked)"), f = z(this.search); if (b.length && (a.which == k.LEFT || a.which == k.RIGHT || a.which == k.BACKSPACE || a.which == k.DELETE || a.which == k.ENTER)) { var g = b; return a.which == k.LEFT && d.length ? g = d : a.which == k.RIGHT ? g = e.length ? e : null : a.which === k.BACKSPACE ? this.unselect(b.first()) && (this.search.width(10), g = d.length ? d : e) : a.which == k.DELETE ? this.unselect(b.first()) && (this.search.width(10), g = e.length ? e : null) : a.which == k.ENTER && (g = null), this.selectChoice(g), A(a), void (g && g.length || this.open()) } if ((a.which === k.BACKSPACE && 1 == this.keydowns || a.which == k.LEFT) && 0 == f.offset && !f.length) return this.selectChoice(c.find(".select2-search-choice:not(.select2-locked)").last()), void A(a); if (this.selectChoice(null), this.opened()) switch (a.which) { case k.UP: case k.DOWN: return this.moveHighlight(a.which === k.UP ? -1 : 1), void A(a); case k.ENTER: return this.selectHighlighted(), void A(a); case k.TAB: return this.selectHighlighted({ noFocus: !0 }), void this.close(); case k.ESC: return this.cancel(a), void A(a) }if (a.which !== k.TAB && !k.isControl(a) && !k.isFunctionKey(a) && a.which !== k.BACKSPACE && a.which !== k.ESC) { if (a.which === k.ENTER) { if (this.opts.openOnEnter === !1) return; if (a.altKey || a.ctrlKey || a.shiftKey || a.metaKey) return } this.open(), (a.which === k.PAGE_UP || a.which === k.PAGE_DOWN) && A(a), a.which === k.ENTER && A(a) } } })), this.search.on("keyup", this.bind(function (a) { this.keydowns = 0, this.resizeSearch() })), this.search.on("blur", this.bind(function (b) { this.container.removeClass("select2-container-active"), this.search.removeClass("select2-focused"), this.selectChoice(null), this.opened() || this.clearSearch(), b.stopImmediatePropagation(), this.opts.element.trigger(a.Event("select2-blur")) })), this.container.on("click", b, this.bind(function (b) { this.isInterfaceEnabled() && (a(b.target).closest(".select2-search-choice").length > 0 || (this.selectChoice(null), this.clearPlaceholder(), this.container.hasClass("select2-container-active") || this.opts.element.trigger(a.Event("select2-focus")), this.open(), this.focusSearch(), b.preventDefault())) })), this.container.on("focus", b, this.bind(function () { this.isInterfaceEnabled() && (this.container.hasClass("select2-container-active") || this.opts.element.trigger(a.Event("select2-focus")), this.container.addClass("select2-container-active"), this.dropdown.addClass("select2-drop-active"), this.clearPlaceholder()) })), this.initContainerWidth(), this.opts.element.hide(), this.clearSearch() }, enableInterface: function () { this.parent.enableInterface.apply(this, arguments) && this.search.prop("disabled", !this.isInterfaceEnabled()) }, initSelection: function () { if ("" === this.opts.element.val() && "" === this.opts.element.text() && (this.updateSelection([]), this.close(), this.clearSearch()), this.select || "" !== this.opts.element.val()) { var c = this; this.opts.initSelection.call(null, this.opts.element, function (a) { a !== b && null !== a && (c.updateSelection(a), c.close(), c.clearSearch()) }) } }, clearSearch: function () { var a = this.getPlaceholder(), c = this.getMaxSearchWidth(); a !== b && 0 === this.getVal().length && this.search.hasClass("select2-focused") === !1 ? (this.search.val(a).addClass("select2-default"), this.search.width(c > 0 ? c : this.container.css("width"))) : this.search.val("").width(10) }, clearPlaceholder: function () { this.search.hasClass("select2-default") && this.search.val("").removeClass("select2-default") }, opening: function () { this.clearPlaceholder(), this.resizeSearch(), this.parent.opening.apply(this, arguments), this.focusSearch(), this.prefillNextSearchTerm(), this.updateResults(!0), this.opts.shouldFocusInput(this) && this.search.focus(), this.opts.element.trigger(a.Event("select2-open")) }, close: function () { this.opened() && this.parent.close.apply(this, arguments) }, focus: function () { this.close(), this.search.focus() }, isFocused: function () { return this.search.hasClass("select2-focused") }, updateSelection: function (b) { var c = {}, d = [], e = this; a(b).each(function () { e.id(this) in c || (c[e.id(this)] = 0, d.push(this)) }), this.selection.find(".select2-search-choice").remove(), this.addSelectedChoice(d), e.postprocessResults() }, tokenize: function () { var a = this.search.val(); a = this.opts.tokenizer.call(this, a, this.data(), this.bind(this.onSelect), this.opts), null != a && a != b && (this.search.val(a), a.length > 0 && this.open()) }, onSelect: function (a, b) { this.triggerSelect(a) && "" !== a.text && (this.addSelectedChoice(a), this.opts.element.trigger({ type: "selected", val: this.id(a), choice: a }), this.lastSearchTerm = this.search.val(), this.clearSearch(), this.updateResults(), (this.select || !this.opts.closeOnSelect) && this.postprocessResults(a, !1, this.opts.closeOnSelect === !0), this.opts.closeOnSelect ? (this.close(), this.search.width(10)) : this.countSelectableResults() > 0 ? (this.search.width(10), this.resizeSearch(), this.getMaximumSelectionSize() > 0 && this.val().length >= this.getMaximumSelectionSize() ? this.updateResults(!0) : this.prefillNextSearchTerm() && this.updateResults(), this.positionDropdown()) : (this.close(), this.search.width(10)), this.triggerChange({ added: a }), b && b.noFocus || this.focusSearch()) }, cancel: function () { this.close(), this.focusSearch() }, addSelectedChoice: function (b) { var c = this.getVal(), d = this; a(b).each(function () { c.push(d.createChoice(this)) }), this.setVal(c) }, createChoice: function (c) { var i, j, d = !c.locked, e = a("<li class='select2-search-choice'> <div></div> <a href='#' class='select2-search-choice-close' tabindex='-1'></a></li>"), f = a("<li class='select2-search-choice select2-locked'><div></div></li>"), g = d ? e : f, h = this.id(c); return i = this.opts.formatSelection(c, g.find("div"), this.opts.escapeMarkup), i != b && g.find("div").replaceWith(a("<div></div>").html(i)), j = this.opts.formatSelectionCssClass(c, g.find("div")), j != b && g.addClass(j), d && g.find(".select2-search-choice-close").on("mousedown", A).on("click dblclick", this.bind(function (b) { this.isInterfaceEnabled() && (this.unselect(a(b.target)), this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"), A(b), this.close(), this.focusSearch()) })).on("focus", this.bind(function () { this.isInterfaceEnabled() && (this.container.addClass("select2-container-active"), this.dropdown.addClass("select2-drop-active")) })), g.data("select2-data", c), g.insertBefore(this.searchContainer), h }, unselect: function (b) { var d, e, c = this.getVal(); if (b = b.closest(".select2-search-choice"), 0 === b.length) throw "Invalid argument: " + b + ". Must be .select2-search-choice"; if (d = b.data("select2-data")) { var f = a.Event("select2-removing"); if (f.val = this.id(d), f.choice = d, this.opts.element.trigger(f), f.isDefaultPrevented()) return !1; for (; (e = p(this.id(d), c)) >= 0;)c.splice(e, 1), this.setVal(c), this.select && this.postprocessResults(); return b.remove(), this.opts.element.trigger({ type: "select2-removed", val: this.id(d), choice: d }), this.triggerChange({ removed: d }), !0 } }, postprocessResults: function (a, b, c) { var d = this.getVal(), e = this.results.find(".select2-result"), f = this.results.find(".select2-result-with-children"), g = this; e.each2(function (a, b) { var c = g.id(b.data("select2-data")); p(c, d) >= 0 && (b.addClass("select2-selected"), b.find(".select2-result-selectable").addClass("select2-selected")) }), f.each2(function (a, b) { b.is(".select2-result-selectable") || 0 !== b.find(".select2-result-selectable:not(.select2-selected)").length || b.addClass("select2-selected") }), -1 == this.highlight() && c !== !1 && this.opts.closeOnSelect === !0 && g.highlight(0), !this.opts.createSearchChoice && !e.filter(".select2-result:not(.select2-selected)").length > 0 && (!a || a && !a.more && 0 === this.results.find(".select2-no-results").length) && J(g.opts.formatNoMatches, "formatNoMatches") && this.results.append("<li class='select2-no-results'>" + K(g.opts.formatNoMatches, g.opts.element, g.search.val()) + "</li>") }, getMaxSearchWidth: function () { return this.selection.width() - t(this.search) }, resizeSearch: function () { var a, b, c, d, e, f = t(this.search); a = C(this.search) + 10, b = this.search.offset().left, c = this.selection.width(), d = this.selection.offset().left, e = c - (b - d) - f, a > e && (e = c - f), 40 > e && (e = c - f), 0 >= e && (e = a), this.search.width(Math.floor(e)) }, getVal: function () { var a; return this.select ? (a = this.select.val(), null === a ? [] : a) : (a = this.opts.element.val(), s(a, this.opts.separator, this.opts.transformVal)) }, setVal: function (b) { if (this.select) this.select.val(b); else { var c = [], d = {}; a(b).each(function () { this in d || (c.push(this), d[this] = 0) }), this.opts.element.val(0 === c.length ? "" : c.join(this.opts.separator)) } }, buildChangeDetails: function (a, b) {
for (var b = b.slice(0), a = a.slice(0), c = 0; c < b.length; c++)for (var d = 0; d < a.length; d++)if (r(this.opts.id(b[c]), this.opts.id(a[d]))) { b.splice(c, 1), c--, a.splice(d, 1); break } return { added: b, removed: a }
}, val: function (c, d) { var e, f = this; if (0 === arguments.length) return this.getVal(); if (e = this.data(), e.length || (e = []), !c && 0 !== c) return this.opts.element.val(""), this.updateSelection([]), this.clearSearch(), void (d && this.triggerChange({ added: this.data(), removed: e })); if (this.setVal(c), this.select) this.opts.initSelection(this.select, this.bind(this.updateSelection)), d && this.triggerChange(this.buildChangeDetails(e, this.data())); else { if (this.opts.initSelection === b) throw new Error("val() cannot be called if initSelection() is not defined"); this.opts.initSelection(this.opts.element, function (b) { var c = a.map(b, f.id); f.setVal(c), f.updateSelection(b), f.clearSearch(), d && f.triggerChange(f.buildChangeDetails(e, f.data())) }) } this.clearSearch() }, onSortStart: function () { if (this.select) throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead."); this.search.width(0), this.searchContainer.hide() }, onSortEnd: function () { var b = [], c = this; this.searchContainer.show(), this.searchContainer.appendTo(this.searchContainer.parent()), this.resizeSearch(), this.selection.find(".select2-search-choice").each(function () { b.push(c.opts.id(a(this).data("select2-data"))) }), this.setVal(b), this.triggerChange() }, data: function (b, c) { var e, f, d = this; return 0 === arguments.length ? this.selection.children(".select2-search-choice").map(function () { return a(this).data("select2-data") }).get() : (f = this.data(), b || (b = []), e = a.map(b, function (a) { return d.opts.id(a) }), this.setVal(e), this.updateSelection(b), this.clearSearch(), c && this.triggerChange(this.buildChangeDetails(f, this.data())), void 0) }
}), a.fn.select2 = function () { var d, e, f, g, h, c = Array.prototype.slice.call(arguments, 0), i = ["val", "destroy", "opened", "open", "close", "focus", "isFocused", "container", "dropdown", "onSortStart", "onSortEnd", "enable", "disable", "readonly", "positionDropdown", "data", "search"], j = ["opened", "isFocused", "container", "dropdown"], k = ["val", "data"], l = { search: "externalSearch" }; return this.each(function () { if (0 === c.length || "object" == typeof c[0]) d = 0 === c.length ? {} : a.extend({}, c[0]), d.element = a(this), "select" === d.element.get(0).tagName.toLowerCase() ? h = d.element.prop("multiple") : (h = d.multiple || !1, "tags" in d && (d.multiple = h = !0)), e = h ? new window.Select2["class"].multi : new window.Select2["class"].single, e.init(d); else { if ("string" != typeof c[0]) throw "Invalid arguments to select2 plugin: " + c; if (p(c[0], i) < 0) throw "Unknown method: " + c[0]; if (g = b, e = a(this).data("select2"), e === b) return; if (f = c[0], "container" === f ? g = e.container : "dropdown" === f ? g = e.dropdown : (l[f] && (f = l[f]), g = e[f].apply(e, c.slice(1))), p(c[0], j) >= 0 || p(c[0], k) >= 0 && 1 == c.length) return !1 } }), g === b ? this : g }, a.fn.select2.defaults = { debug: !1, width: "copy", loadMorePadding: 0, closeOnSelect: !0, openOnEnter: !0, containerCss: {}, dropdownCss: {}, containerCssClass: "", dropdownCssClass: "", formatResult: function (a, b, c, d) { var e = []; return E(this.text(a), c.term, e, d), e.join("") }, transformVal: function (b) { return a.trim(b) }, formatSelection: function (a, c, d) { return a ? d(this.text(a)) : b }, sortResults: function (a, b, c) { return a }, formatResultCssClass: function (a) { return a.css }, formatSelectionCssClass: function (a, c) { return b }, minimumResultsForSearch: 0, minimumInputLength: 0, maximumInputLength: null, maximumSelectionSize: 0, id: function (a) { return a == b ? null : a.id }, text: function (b) { return b && this.data && this.data.text ? a.isFunction(this.data.text) ? this.data.text(b) : b[this.data.text] : b.text }, matcher: function (a, b) { return o("" + b).toUpperCase().indexOf(o("" + a).toUpperCase()) >= 0 }, separator: ",", tokenSeparators: [], tokenizer: M, escapeMarkup: F, blurOnChange: !1, selectOnBlur: !1, adaptContainerCssClass: function (a) { return a }, adaptDropdownCssClass: function (a) { return null }, nextSearchTerm: function (a, c) { return b }, searchInputPlaceholder: "", createSearchChoicePosition: "top", shouldFocusInput: function (a) { var b = "ontouchstart" in window || navigator.msMaxTouchPoints > 0; return b && a.opts.minimumResultsForSearch < 0 ? !1 : !0 } }, a.fn.select2.locales = [], a.fn.select2.locales.en = { formatMatches: function (a) { return 1 === a ? "One result is available, press enter to select it." : a + " results are available, use up and down arrow keys to navigate." }, formatNoMatches: function () { return "No matches found" }, formatAjaxError: function (a, b, c) { return "Loading failed" }, formatInputTooShort: function (a, b) { var c = b - a.length; return "Please enter " + c + " or more character" + (1 == c ? "" : "s") }, formatInputTooLong: function (a, b) { var c = a.length - b; return "Please delete " + c + " character" + (1 == c ? "" : "s") }, formatSelectionTooBig: function (a) { return "You can only select " + a + " item" + (1 == a ? "" : "s") }, formatLoadMore: function (a) { return "Loading more results\u2026" }, formatSearching: function () { return "Searching\u2026" } }, a.extend(a.fn.select2.defaults, a.fn.select2.locales.en), a.fn.select2.ajaxDefaults = { transport: a.ajax, params: { type: "GET", cache: !1, dataType: "json" } }, window.Select2 = { query: { ajax: G, local: H, tags: I }, util: { debounce: w, markMatch: E, escapeMarkup: F, stripDiacritics: o }, "class": { "abstract": c, single: d, multi: e } }
}
}(jQuery);
/**
* @module Slick
* @author Ken Wheeler
* @see http://kenwheeler.github.io/slick
* @version 1.6.0
*/
!function (a) { "use strict"; "function" == typeof define && define.amd ? define(["jquery"], a) : "undefined" != typeof exports ? module.exports = a(require("jquery")) : a(jQuery) }(function (a) {
"use strict"; var b = window.Slick || {}; b = function () { function c(c, d) { var f, e = this; e.defaults = { accessibility: !0, adaptiveHeight: !1, appendArrows: a(c), appendDots: a(c), arrows: !0, asNavFor: null, prevArrow: '<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>', nextArrow: '<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>', autoplay: !1, autoplaySpeed: 3e3, centerMode: !1, centerPadding: "50px", cssEase: "ease", customPaging: function (b, c) { return a('<button type="button" data-role="none" role="button" tabindex="0" />').text(c + 1) }, dots: !1, dotsClass: "slick-dots", draggable: !0, easing: "linear", edgeFriction: .35, fade: !1, focusOnSelect: !1, infinite: !0, initialSlide: 0, lazyLoad: "ondemand", mobileFirst: !1, pauseOnHover: !0, pauseOnFocus: !0, pauseOnDotsHover: !1, respondTo: "window", responsive: null, rows: 1, rtl: !1, slide: "", slidesPerRow: 1, slidesToShow: 1, slidesToScroll: 1, speed: 500, swipe: !0, swipeToSlide: !1, touchMove: !0, touchThreshold: 5, useCSS: !0, useTransform: !0, variableWidth: !1, vertical: !1, verticalSwiping: !1, waitForAnimate: !0, zIndex: 1e3 }, e.initials = { animating: !1, dragging: !1, autoPlayTimer: null, currentDirection: 0, currentLeft: null, currentSlide: 0, direction: 1, $dots: null, listWidth: null, listHeight: null, loadIndex: 0, $nextArrow: null, $prevArrow: null, slideCount: null, slideWidth: null, $slideTrack: null, $slides: null, sliding: !1, slideOffset: 0, swipeLeft: null, $list: null, touchObject: {}, transformsEnabled: !1, unslicked: !1 }, a.extend(e, e.initials), e.activeBreakpoint = null, e.animType = null, e.animProp = null, e.breakpoints = [], e.breakpointSettings = [], e.cssTransitions = !1, e.focussed = !1, e.interrupted = !1, e.hidden = "hidden", e.paused = !0, e.positionProp = null, e.respondTo = null, e.rowCount = 1, e.shouldClick = !0, e.$slider = a(c), e.$slidesCache = null, e.transformType = null, e.transitionType = null, e.visibilityChange = "visibilitychange", e.windowWidth = 0, e.windowTimer = null, f = a(c).data("slick") || {}, e.options = a.extend({}, e.defaults, d, f), e.currentSlide = e.options.initialSlide, e.originalSettings = e.options, "undefined" != typeof document.mozHidden ? (e.hidden = "mozHidden", e.visibilityChange = "mozvisibilitychange") : "undefined" != typeof document.webkitHidden && (e.hidden = "webkitHidden", e.visibilityChange = "webkitvisibilitychange"), e.autoPlay = a.proxy(e.autoPlay, e), e.autoPlayClear = a.proxy(e.autoPlayClear, e), e.autoPlayIterator = a.proxy(e.autoPlayIterator, e), e.changeSlide = a.proxy(e.changeSlide, e), e.clickHandler = a.proxy(e.clickHandler, e), e.selectHandler = a.proxy(e.selectHandler, e), e.setPosition = a.proxy(e.setPosition, e), e.swipeHandler = a.proxy(e.swipeHandler, e), e.dragHandler = a.proxy(e.dragHandler, e), e.keyHandler = a.proxy(e.keyHandler, e), e.instanceUid = b++, e.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/, e.registerBreakpoints(), e.init(!0) } var b = 0; return c }(), b.prototype.activateADA = function () { var a = this; a.$slideTrack.find(".slick-active").attr({ "aria-hidden": "false" }).find("a, input, button, select").attr({ tabindex: "0" }) }, b.prototype.addSlide = b.prototype.slickAdd = function (b, c, d) { var e = this; if ("boolean" == typeof c) d = c, c = null; else if (0 > c || c >= e.slideCount) return !1; e.unload(), "number" == typeof c ? 0 === c && 0 === e.$slides.length ? a(b).appendTo(e.$slideTrack) : d ? a(b).insertBefore(e.$slides.eq(c)) : a(b).insertAfter(e.$slides.eq(c)) : d === !0 ? a(b).prependTo(e.$slideTrack) : a(b).appendTo(e.$slideTrack), e.$slides = e.$slideTrack.children(this.options.slide), e.$slideTrack.children(this.options.slide).detach(), e.$slideTrack.append(e.$slides), e.$slides.each(function (b, c) { a(c).attr("data-slick-index", b) }), e.$slidesCache = e.$slides, e.reinit() }, b.prototype.animateHeight = function () { var a = this; if (1 === a.options.slidesToShow && a.options.adaptiveHeight === !0 && a.options.vertical === !1) { var b = a.$slides.eq(a.currentSlide).outerHeight(!0); a.$list.animate({ height: b }, a.options.speed) } }, b.prototype.animateSlide = function (b, c) { var d = {}, e = this; e.animateHeight(), e.options.rtl === !0 && e.options.vertical === !1 && (b = -b), e.transformsEnabled === !1 ? e.options.vertical === !1 ? e.$slideTrack.animate({ left: b }, e.options.speed, e.options.easing, c) : e.$slideTrack.animate({ top: b }, e.options.speed, e.options.easing, c) : e.cssTransitions === !1 ? (e.options.rtl === !0 && (e.currentLeft = -e.currentLeft), a({ animStart: e.currentLeft }).animate({ animStart: b }, { duration: e.options.speed, easing: e.options.easing, step: function (a) { a = Math.ceil(a), e.options.vertical === !1 ? (d[e.animType] = "translate(" + a + "px, 0px)", e.$slideTrack.css(d)) : (d[e.animType] = "translate(0px," + a + "px)", e.$slideTrack.css(d)) }, complete: function () { c && c.call() } })) : (e.applyTransition(), b = Math.ceil(b), e.options.vertical === !1 ? d[e.animType] = "translate3d(" + b + "px, 0px, 0px)" : d[e.animType] = "translate3d(0px," + b + "px, 0px)", e.$slideTrack.css(d), c && setTimeout(function () { e.disableTransition(), c.call() }, e.options.speed)) }, b.prototype.getNavTarget = function () { var b = this, c = b.options.asNavFor; return c && null !== c && (c = a(c).not(b.$slider)), c }, b.prototype.asNavFor = function (b) { var c = this, d = c.getNavTarget(); null !== d && "object" == typeof d && d.each(function () { var c = a(this).slick("getSlick"); c.unslicked || c.slideHandler(b, !0) }) }, b.prototype.applyTransition = function (a) { var b = this, c = {}; b.options.fade === !1 ? c[b.transitionType] = b.transformType + " " + b.options.speed + "ms " + b.options.cssEase : c[b.transitionType] = "opacity " + b.options.speed + "ms " + b.options.cssEase, b.options.fade === !1 ? b.$slideTrack.css(c) : b.$slides.eq(a).css(c) }, b.prototype.autoPlay = function () { var a = this; a.autoPlayClear(), a.slideCount > a.options.slidesToShow && (a.autoPlayTimer = setInterval(a.autoPlayIterator, a.options.autoplaySpeed)) }, b.prototype.autoPlayClear = function () { var a = this; a.autoPlayTimer && clearInterval(a.autoPlayTimer) }, b.prototype.autoPlayIterator = function () { var a = this, b = a.currentSlide + a.options.slidesToScroll; a.paused || a.interrupted || a.focussed || (a.options.infinite === !1 && (1 === a.direction && a.currentSlide + 1 === a.slideCount - 1 ? a.direction = 0 : 0 === a.direction && (b = a.currentSlide - a.options.slidesToScroll, a.currentSlide - 1 === 0 && (a.direction = 1))), a.slideHandler(b)) }, b.prototype.buildArrows = function () { var b = this; b.options.arrows === !0 && (b.$prevArrow = a(b.options.prevArrow).addClass("slick-arrow"), b.$nextArrow = a(b.options.nextArrow).addClass("slick-arrow"), b.slideCount > b.options.slidesToShow ? (b.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"), b.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"), b.htmlExpr.test(b.options.prevArrow) && b.$prevArrow.prependTo(b.options.appendArrows), b.htmlExpr.test(b.options.nextArrow) && b.$nextArrow.appendTo(b.options.appendArrows), b.options.infinite !== !0 && b.$prevArrow.addClass("slick-disabled").attr("aria-disabled", "true")) : b.$prevArrow.add(b.$nextArrow).addClass("slick-hidden").attr({ "aria-disabled": "true", tabindex: "-1" })) }, b.prototype.buildDots = function () { var c, d, b = this; if (b.options.dots === !0 && b.slideCount > b.options.slidesToShow) { for (b.$slider.addClass("slick-dotted"), d = a("<ul />").addClass(b.options.dotsClass), c = 0; c <= b.getDotCount(); c += 1)d.append(a("<li />").append(b.options.customPaging.call(this, b, c))); b.$dots = d.appendTo(b.options.appendDots), b.$dots.find("li").first().addClass("slick-active").attr("aria-hidden", "false") } }, b.prototype.buildOut = function () { var b = this; b.$slides = b.$slider.children(b.options.slide + ":not(.slick-cloned)").addClass("slick-slide"), b.slideCount = b.$slides.length, b.$slides.each(function (b, c) { a(c).attr("data-slick-index", b).data("originalStyling", a(c).attr("style") || "") }), b.$slider.addClass("slick-slider"), b.$slideTrack = 0 === b.slideCount ? a('<div class="slick-track"/>').appendTo(b.$slider) : b.$slides.wrapAll('<div class="slick-track"/>').parent(), b.$list = b.$slideTrack.wrap('<div aria-live="polite" class="slick-list"/>').parent(), b.$slideTrack.css("opacity", 0), (b.options.centerMode === !0 || b.options.swipeToSlide === !0) && (b.options.slidesToScroll = 1), a("img[data-lazy]", b.$slider).not("[src]").addClass("slick-loading"), b.setupInfinite(), b.buildArrows(), b.buildDots(), b.updateDots(), b.setSlideClasses("number" == typeof b.currentSlide ? b.currentSlide : 0), b.options.draggable === !0 && b.$list.addClass("draggable") }, b.prototype.buildRows = function () { var b, c, d, e, f, g, h, a = this; if (e = document.createDocumentFragment(), g = a.$slider.children(), a.options.rows > 1) { for (h = a.options.slidesPerRow * a.options.rows, f = Math.ceil(g.length / h), b = 0; f > b; b++) { var i = document.createElement("div"); for (c = 0; c < a.options.rows; c++) { var j = document.createElement("div"); for (d = 0; d < a.options.slidesPerRow; d++) { var k = b * h + (c * a.options.slidesPerRow + d); g.get(k) && j.appendChild(g.get(k)) } i.appendChild(j) } e.appendChild(i) } a.$slider.empty().append(e), a.$slider.children().children().children().css({ width: 100 / a.options.slidesPerRow + "%", display: "inline-block" }) } }, b.prototype.checkResponsive = function (b, c) { var e, f, g, d = this, h = !1, i = d.$slider.width(), j = window.innerWidth || a(window).width(); if ("window" === d.respondTo ? g = j : "slider" === d.respondTo ? g = i : "min" === d.respondTo && (g = Math.min(j, i)), d.options.responsive && d.options.responsive.length && null !== d.options.responsive) { f = null; for (e in d.breakpoints) d.breakpoints.hasOwnProperty(e) && (d.originalSettings.mobileFirst === !1 ? g < d.breakpoints[e] && (f = d.breakpoints[e]) : g > d.breakpoints[e] && (f = d.breakpoints[e])); null !== f ? null !== d.activeBreakpoint ? (f !== d.activeBreakpoint || c) && (d.activeBreakpoint = f, "unslick" === d.breakpointSettings[f] ? d.unslick(f) : (d.options = a.extend({}, d.originalSettings, d.breakpointSettings[f]), b === !0 && (d.currentSlide = d.options.initialSlide), d.refresh(b)), h = f) : (d.activeBreakpoint = f, "unslick" === d.breakpointSettings[f] ? d.unslick(f) : (d.options = a.extend({}, d.originalSettings, d.breakpointSettings[f]), b === !0 && (d.currentSlide = d.options.initialSlide), d.refresh(b)), h = f) : null !== d.activeBreakpoint && (d.activeBreakpoint = null, d.options = d.originalSettings, b === !0 && (d.currentSlide = d.options.initialSlide), d.refresh(b), h = f), b || h === !1 || d.$slider.trigger("breakpoint", [d, h]) } }, b.prototype.changeSlide = function (b, c) { var f, g, h, d = this, e = a(b.currentTarget); switch (e.is("a") && b.preventDefault(), e.is("li") || (e = e.closest("li")), h = d.slideCount % d.options.slidesToScroll !== 0, f = h ? 0 : (d.slideCount - d.currentSlide) % d.options.slidesToScroll, b.data.message) { case "previous": g = 0 === f ? d.options.slidesToScroll : d.options.slidesToShow - f, d.slideCount > d.options.slidesToShow && d.slideHandler(d.currentSlide - g, !1, c); break; case "next": g = 0 === f ? d.options.slidesToScroll : f, d.slideCount > d.options.slidesToShow && d.slideHandler(d.currentSlide + g, !1, c); break; case "index": var i = 0 === b.data.index ? 0 : b.data.index || e.index() * d.options.slidesToScroll; d.slideHandler(d.checkNavigable(i), !1, c), e.children().trigger("focus"); break; default: return } }, b.prototype.checkNavigable = function (a) { var c, d, b = this; if (c = b.getNavigableIndexes(), d = 0, a > c[c.length - 1]) a = c[c.length - 1]; else for (var e in c) { if (a < c[e]) { a = d; break } d = c[e] } return a }, b.prototype.cleanUpEvents = function () { var b = this; b.options.dots && null !== b.$dots && a("li", b.$dots).off("click.slick", b.changeSlide).off("mouseenter.slick", a.proxy(b.interrupt, b, !0)).off("mouseleave.slick", a.proxy(b.interrupt, b, !1)), b.$slider.off("focus.slick blur.slick"), b.options.arrows === !0 && b.slideCount > b.options.slidesToShow && (b.$prevArrow && b.$prevArrow.off("click.slick", b.changeSlide), b.$nextArrow && b.$nextArrow.off("click.slick", b.changeSlide)), b.$list.off("touchstart.slick mousedown.slick", b.swipeHandler), b.$list.off("touchmove.slick mousemove.slick", b.swipeHandler), b.$list.off("touchend.slick mouseup.slick", b.swipeHandler), b.$list.off("touchcancel.slick mouseleave.slick", b.swipeHandler), b.$list.off("click.slick", b.clickHandler), a(document).off(b.visibilityChange, b.visibility), b.cleanUpSlideEvents(), b.options.accessibility === !0 && b.$list.off("keydown.slick", b.keyHandler), b.options.focusOnSelect === !0 && a(b.$slideTrack).children().off("click.slick", b.selectHandler), a(window).off("orientationchange.slick.slick-" + b.instanceUid, b.orientationChange), a(window).off("resize.slick.slick-" + b.instanceUid, b.resize), a("[draggable!=true]", b.$slideTrack).off("dragstart", b.preventDefault), a(window).off("load.slick.slick-" + b.instanceUid, b.setPosition), a(document).off("ready.slick.slick-" + b.instanceUid, b.setPosition) }, b.prototype.cleanUpSlideEvents = function () { var b = this; b.$list.off("mouseenter.slick", a.proxy(b.interrupt, b, !0)), b.$list.off("mouseleave.slick", a.proxy(b.interrupt, b, !1)) }, b.prototype.cleanUpRows = function () { var b, a = this; a.options.rows > 1 && (b = a.$slides.children().children(), b.removeAttr("style"), a.$slider.empty().append(b)) }, b.prototype.clickHandler = function (a) { var b = this; b.shouldClick === !1 && (a.stopImmediatePropagation(), a.stopPropagation(), a.preventDefault()) }, b.prototype.destroy = function (b) { var c = this; c.autoPlayClear(), c.touchObject = {}, c.cleanUpEvents(), a(".slick-cloned", c.$slider).detach(), c.$dots && c.$dots.remove(), c.$prevArrow && c.$prevArrow.length && (c.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display", ""), c.htmlExpr.test(c.options.prevArrow) && c.$prevArrow.remove()), c.$nextArrow && c.$nextArrow.length && (c.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display", ""), c.htmlExpr.test(c.options.nextArrow) && c.$nextArrow.remove()), c.$slides && (c.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function () { a(this).attr("style", a(this).data("originalStyling")) }), c.$slideTrack.children(this.options.slide).detach(), c.$slideTrack.detach(), c.$list.detach(), c.$slider.append(c.$slides)), c.cleanUpRows(), c.$slider.removeClass("slick-slider"), c.$slider.removeClass("slick-initialized"), c.$slider.removeClass("slick-dotted"), c.unslicked = !0, b || c.$slider.trigger("destroy", [c]) }, b.prototype.disableTransition = function (a) { var b = this, c = {}; c[b.transitionType] = "", b.options.fade === !1 ? b.$slideTrack.css(c) : b.$slides.eq(a).css(c) }, b.prototype.fadeSlide = function (a, b) { var c = this; c.cssTransitions === !1 ? (c.$slides.eq(a).css({ zIndex: c.options.zIndex }), c.$slides.eq(a).animate({ opacity: 1 }, c.options.speed, c.options.easing, b)) : (c.applyTransition(a), c.$slides.eq(a).css({ opacity: 1, zIndex: c.options.zIndex }), b && setTimeout(function () { c.disableTransition(a), b.call() }, c.options.speed)) }, b.prototype.fadeSlideOut = function (a) { var b = this; b.cssTransitions === !1 ? b.$slides.eq(a).animate({ opacity: 0, zIndex: b.options.zIndex - 2 }, b.options.speed, b.options.easing) : (b.applyTransition(a), b.$slides.eq(a).css({ opacity: 0, zIndex: b.options.zIndex - 2 })) }, b.prototype.filterSlides = b.prototype.slickFilter = function (a) { var b = this; null !== a && (b.$slidesCache = b.$slides, b.unload(), b.$slideTrack.children(this.options.slide).detach(), b.$slidesCache.filter(a).appendTo(b.$slideTrack), b.reinit()) }, b.prototype.focusHandler = function () { var b = this; b.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick", "*:not(.slick-arrow)", function (c) { c.stopImmediatePropagation(); var d = a(this); setTimeout(function () { b.options.pauseOnFocus && (b.focussed = d.is(":focus"), b.autoPlay()) }, 0) }) }, b.prototype.getCurrent = b.prototype.slickCurrentSlide = function () { var a = this; return a.currentSlide }, b.prototype.getDotCount = function () { var a = this, b = 0, c = 0, d = 0; if (a.options.infinite === !0) for (; b < a.slideCount;)++d, b = c + a.options.slidesToScroll, c += a.options.slidesToScroll <= a.options.slidesToShow ? a.options.slidesToScroll : a.options.slidesToShow; else if (a.options.centerMode === !0) d = a.slideCount; else if (a.options.asNavFor) for (; b < a.slideCount;)++d, b = c + a.options.slidesToScroll, c += a.options.slidesToScroll <= a.options.slidesToShow ? a.options.slidesToScroll : a.options.slidesToShow; else d = 1 + Math.ceil((a.slideCount - a.options.slidesToShow) / a.options.slidesToScroll); return d - 1 }, b.prototype.getLeft = function (a) { var c, d, f, b = this, e = 0; return b.slideOffset = 0, d = b.$slides.first().outerHeight(!0), b.options.infinite === !0 ? (b.slideCount > b.options.slidesToShow && (b.slideOffset = b.slideWidth * b.options.slidesToShow * -1, e = d * b.options.slidesToShow * -1), b.slideCount % b.options.slidesToScroll !== 0 && a + b.options.slidesToScroll > b.slideCount && b.slideCount > b.options.slidesToShow && (a > b.slideCount ? (b.slideOffset = (b.options.slidesToShow - (a - b.slideCount)) * b.slideWidth * -1, e = (b.options.slidesToShow - (a - b.slideCount)) * d * -1) : (b.slideOffset = b.slideCount % b.options.slidesToScroll * b.slideWidth * -1, e = b.slideCount % b.options.slidesToScroll * d * -1))) : a + b.options.slidesToShow > b.slideCount && (b.slideOffset = (a + b.options.slidesToShow - b.slideCount) * b.slideWidth, e = (a + b.options.slidesToShow - b.slideCount) * d), b.slideCount <= b.options.slidesToShow && (b.slideOffset = 0, e = 0), b.options.centerMode === !0 && b.options.infinite === !0 ? b.slideOffset += b.slideWidth * Math.floor(b.options.slidesToShow / 2) - b.slideWidth : b.options.centerMode === !0 && (b.slideOffset = 0, b.slideOffset += b.slideWidth * Math.floor(b.options.slidesToShow / 2)), c = b.options.vertical === !1 ? a * b.slideWidth * -1 + b.slideOffset : a * d * -1 + e, b.options.variableWidth === !0 && (f = b.slideCount <= b.options.slidesToShow || b.options.infinite === !1 ? b.$slideTrack.children(".slick-slide").eq(a) : b.$slideTrack.children(".slick-slide").eq(a + b.options.slidesToShow), c = b.options.rtl === !0 ? f[0] ? -1 * (b.$slideTrack.width() - f[0].offsetLeft - f.width()) : 0 : f[0] ? -1 * f[0].offsetLeft : 0, b.options.centerMode === !0 && (f = b.slideCount <= b.options.slidesToShow || b.options.infinite === !1 ? b.$slideTrack.children(".slick-slide").eq(a) : b.$slideTrack.children(".slick-slide").eq(a + b.options.slidesToShow + 1), c = b.options.rtl === !0 ? f[0] ? -1 * (b.$slideTrack.width() - f[0].offsetLeft - f.width()) : 0 : f[0] ? -1 * f[0].offsetLeft : 0, c += (b.$list.width() - f.outerWidth()) / 2)), c }, b.prototype.getOption = b.prototype.slickGetOption = function (a) { var b = this; return b.options[a] }, b.prototype.getNavigableIndexes = function () { var e, a = this, b = 0, c = 0, d = []; for (a.options.infinite === !1 ? e = a.slideCount : (b = -1 * a.options.slidesToScroll, c = -1 * a.options.slidesToScroll, e = 2 * a.slideCount); e > b;)d.push(b), b = c + a.options.slidesToScroll, c += a.options.slidesToScroll <= a.options.slidesToShow ? a.options.slidesToScroll : a.options.slidesToShow; return d }, b.prototype.getSlick = function () { return this }, b.prototype.getSlideCount = function () { var c, d, e, b = this; return e = b.options.centerMode === !0 ? b.slideWidth * Math.floor(b.options.slidesToShow / 2) : 0, b.options.swipeToSlide === !0 ? (b.$slideTrack.find(".slick-slide").each(function (c, f) { return f.offsetLeft - e + a(f).outerWidth() / 2 > -1 * b.swipeLeft ? (d = f, !1) : void 0 }), c = Math.abs(a(d).attr("data-slick-index") - b.currentSlide) || 1) : b.options.slidesToScroll }, b.prototype.goTo = b.prototype.slickGoTo = function (a, b) { var c = this; c.changeSlide({ data: { message: "index", index: parseInt(a) } }, b) }, b.prototype.init = function (b) { var c = this; a(c.$slider).hasClass("slick-initialized") || (a(c.$slider).addClass("slick-initialized"), c.buildRows(), c.buildOut(), c.setProps(), c.startLoad(), c.loadSlider(), c.initializeEvents(), c.updateArrows(), c.updateDots(), c.checkResponsive(!0), c.focusHandler()), b && c.$slider.trigger("init", [c]), c.options.accessibility === !0 && c.initADA(), c.options.autoplay && (c.paused = !1, c.autoPlay()) }, b.prototype.initADA = function () { var b = this; b.$slides.add(b.$slideTrack.find(".slick-cloned")).attr({ "aria-hidden": "true", tabindex: "-1" }).find("a, input, button, select").attr({ tabindex: "-1" }), b.$slideTrack.attr("role", "listbox"), b.$slides.not(b.$slideTrack.find(".slick-cloned")).each(function (c) { a(this).attr({ role: "option", "aria-describedby": "slick-slide" + b.instanceUid + c }) }), null !== b.$dots && b.$dots.attr("role", "tablist").find("li").each(function (c) { a(this).attr({ role: "presentation", "aria-selected": "false", "aria-controls": "navigation" + b.instanceUid + c, id: "slick-slide" + b.instanceUid + c }) }).first().attr("aria-selected", "true").end().find("button").attr("role", "button").end().closest("div").attr("role", "toolbar"), b.activateADA() }, b.prototype.initArrowEvents = function () { var a = this; a.options.arrows === !0 && a.slideCount > a.options.slidesToShow && (a.$prevArrow.off("click.slick").on("click.slick", { message: "previous" }, a.changeSlide), a.$nextArrow.off("click.slick").on("click.slick", { message: "next" }, a.changeSlide)) }, b.prototype.initDotEvents = function () { var b = this; b.options.dots === !0 && b.slideCount > b.options.slidesToShow && a("li", b.$dots).on("click.slick", { message: "index" }, b.changeSlide), b.options.dots === !0 && b.options.pauseOnDotsHover === !0 && a("li", b.$dots).on("mouseenter.slick", a.proxy(b.interrupt, b, !0)).on("mouseleave.slick", a.proxy(b.interrupt, b, !1)) }, b.prototype.initSlideEvents = function () { var b = this; b.options.pauseOnHover && (b.$list.on("mouseenter.slick", a.proxy(b.interrupt, b, !0)), b.$list.on("mouseleave.slick", a.proxy(b.interrupt, b, !1))) }, b.prototype.initializeEvents = function () { var b = this; b.initArrowEvents(), b.initDotEvents(), b.initSlideEvents(), b.$list.on("touchstart.slick mousedown.slick", { action: "start" }, b.swipeHandler), b.$list.on("touchmove.slick mousemove.slick", { action: "move" }, b.swipeHandler), b.$list.on("touchend.slick mouseup.slick", { action: "end" }, b.swipeHandler), b.$list.on("touchcancel.slick mouseleave.slick", { action: "end" }, b.swipeHandler), b.$list.on("click.slick", b.clickHandler), a(document).on(b.visibilityChange, a.proxy(b.visibility, b)), b.options.accessibility === !0 && b.$list.on("keydown.slick", b.keyHandler), b.options.focusOnSelect === !0 && a(b.$slideTrack).children().on("click.slick", b.selectHandler), a(window).on("orientationchange.slick.slick-" + b.instanceUid, a.proxy(b.orientationChange, b)), a(window).on("resize.slick.slick-" + b.instanceUid, a.proxy(b.resize, b)), a("[draggable!=true]", b.$slideTrack).on("dragstart", b.preventDefault), a(window).on("load.slick.slick-" + b.instanceUid, b.setPosition), a(document).on("ready.slick.slick-" + b.instanceUid, b.setPosition) }, b.prototype.initUI = function () { var a = this; a.options.arrows === !0 && a.slideCount > a.options.slidesToShow && (a.$prevArrow.show(), a.$nextArrow.show()), a.options.dots === !0 && a.slideCount > a.options.slidesToShow && a.$dots.show() }, b.prototype.keyHandler = function (a) { var b = this; a.target.tagName.match("TEXTAREA|INPUT|SELECT") || (37 === a.keyCode && b.options.accessibility === !0 ? b.changeSlide({ data: { message: b.options.rtl === !0 ? "next" : "previous" } }) : 39 === a.keyCode && b.options.accessibility === !0 && b.changeSlide({ data: { message: b.options.rtl === !0 ? "previous" : "next" } })) }, b.prototype.lazyLoad = function () { function g(c) { a("img[data-lazy]", c).each(function () { var c = a(this), d = a(this).attr("data-lazy"), e = document.createElement("img"); e.onload = function () { c.animate({ opacity: 0 }, 100, function () { c.attr("src", d).animate({ opacity: 1 }, 200, function () { c.removeAttr("data-lazy").removeClass("slick-loading") }), b.$slider.trigger("lazyLoaded", [b, c, d]) }) }, e.onerror = function () { c.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"), b.$slider.trigger("lazyLoadError", [b, c, d]) }, e.src = d }) } var c, d, e, f, b = this; b.options.centerMode === !0 ? b.options.infinite === !0 ? (e = b.currentSlide + (b.options.slidesToShow / 2 + 1), f = e + b.options.slidesToShow + 2) : (e = Math.max(0, b.currentSlide - (b.options.slidesToShow / 2 + 1)), f = 2 + (b.options.slidesToShow / 2 + 1) + b.currentSlide) : (e = b.options.infinite ? b.options.slidesToShow + b.currentSlide : b.currentSlide, f = Math.ceil(e + b.options.slidesToShow), b.options.fade === !0 && (e > 0 && e--, f <= b.slideCount && f++)), c = b.$slider.find(".slick-slide").slice(e, f), g(c), b.slideCount <= b.options.slidesToShow ? (d = b.$slider.find(".slick-slide"), g(d)) : b.currentSlide >= b.slideCount - b.options.slidesToShow ? (d = b.$slider.find(".slick-cloned").slice(0, b.options.slidesToShow), g(d)) : 0 === b.currentSlide && (d = b.$slider.find(".slick-cloned").slice(-1 * b.options.slidesToShow), g(d)) }, b.prototype.loadSlider = function () { var a = this; a.setPosition(), a.$slideTrack.css({ opacity: 1 }), a.$slider.removeClass("slick-loading"), a.initUI(), "progressive" === a.options.lazyLoad && a.progressiveLazyLoad() }, b.prototype.next = b.prototype.slickNext = function () { var a = this; a.changeSlide({ data: { message: "next" } }) }, b.prototype.orientationChange = function () { var a = this; a.checkResponsive(), a.setPosition() }, b.prototype.pause = b.prototype.slickPause = function () { var a = this; a.autoPlayClear(), a.paused = !0 }, b.prototype.play = b.prototype.slickPlay = function () { var a = this; a.autoPlay(), a.options.autoplay = !0, a.paused = !1, a.focussed = !1, a.interrupted = !1 }, b.prototype.postSlide = function (a) { var b = this; b.unslicked || (b.$slider.trigger("afterChange", [b, a]), b.animating = !1, b.setPosition(), b.swipeLeft = null, b.options.autoplay && b.autoPlay(), b.options.accessibility === !0 && b.initADA()) }, b.prototype.prev = b.prototype.slickPrev = function () { var a = this; a.changeSlide({ data: { message: "previous" } }) }, b.prototype.preventDefault = function (a) { a.preventDefault() }, b.prototype.progressiveLazyLoad = function (b) { b = b || 1; var e, f, g, c = this, d = a("img[data-lazy]", c.$slider); d.length ? (e = d.first(), f = e.attr("data-lazy"), g = document.createElement("img"), g.onload = function () { e.attr("src", f).removeAttr("data-lazy").removeClass("slick-loading"), c.options.adaptiveHeight === !0 && c.setPosition(), c.$slider.trigger("lazyLoaded", [c, e, f]), c.progressiveLazyLoad() }, g.onerror = function () { 3 > b ? setTimeout(function () { c.progressiveLazyLoad(b + 1) }, 500) : (e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"), c.$slider.trigger("lazyLoadError", [c, e, f]), c.progressiveLazyLoad()) }, g.src = f) : c.$slider.trigger("allImagesLoaded", [c]) }, b.prototype.refresh = function (b) { var d, e, c = this; e = c.slideCount - c.options.slidesToShow, !c.options.infinite && c.currentSlide > e && (c.currentSlide = e), c.slideCount <= c.options.slidesToShow && (c.currentSlide = 0), d = c.currentSlide, c.destroy(!0), a.extend(c, c.initials, { currentSlide: d }), c.init(), b || c.changeSlide({ data: { message: "index", index: d } }, !1) }, b.prototype.registerBreakpoints = function () { var c, d, e, b = this, f = b.options.responsive || null; if ("array" === a.type(f) && f.length) { b.respondTo = b.options.respondTo || "window"; for (c in f) if (e = b.breakpoints.length - 1, d = f[c].breakpoint, f.hasOwnProperty(c)) { for (; e >= 0;)b.breakpoints[e] && b.breakpoints[e] === d && b.breakpoints.splice(e, 1), e--; b.breakpoints.push(d), b.breakpointSettings[d] = f[c].settings } b.breakpoints.sort(function (a, c) { return b.options.mobileFirst ? a - c : c - a }) } }, b.prototype.reinit = function () { var b = this; b.$slides = b.$slideTrack.children(b.options.slide).addClass("slick-slide"), b.slideCount = b.$slides.length, b.currentSlide >= b.slideCount && 0 !== b.currentSlide && (b.currentSlide = b.currentSlide - b.options.slidesToScroll), b.slideCount <= b.options.slidesToShow && (b.currentSlide = 0), b.registerBreakpoints(), b.setProps(), b.setupInfinite(), b.buildArrows(), b.updateArrows(), b.initArrowEvents(), b.buildDots(), b.updateDots(), b.initDotEvents(), b.cleanUpSlideEvents(), b.initSlideEvents(), b.checkResponsive(!1, !0), b.options.focusOnSelect === !0 && a(b.$slideTrack).children().on("click.slick", b.selectHandler), b.setSlideClasses("number" == typeof b.currentSlide ? b.currentSlide : 0), b.setPosition(), b.focusHandler(), b.paused = !b.options.autoplay, b.autoPlay(), b.$slider.trigger("reInit", [b]) }, b.prototype.resize = function () { var b = this; a(window).width() !== b.windowWidth && (clearTimeout(b.windowDelay), b.windowDelay = window.setTimeout(function () { b.windowWidth = a(window).width(), b.checkResponsive(), b.unslicked || b.setPosition() }, 50)) }, b.prototype.removeSlide = b.prototype.slickRemove = function (a, b, c) { var d = this; return "boolean" == typeof a ? (b = a, a = b === !0 ? 0 : d.slideCount - 1) : a = b === !0 ? --a : a, d.slideCount < 1 || 0 > a || a > d.slideCount - 1 ? !1 : (d.unload(), c === !0 ? d.$slideTrack.children().remove() : d.$slideTrack.children(this.options.slide).eq(a).remove(), d.$slides = d.$slideTrack.children(this.options.slide), d.$slideTrack.children(this.options.slide).detach(), d.$slideTrack.append(d.$slides), d.$slidesCache = d.$slides, void d.reinit()) }, b.prototype.setCSS = function (a) { var d, e, b = this, c = {}; b.options.rtl === !0 && (a = -a), d = "left" == b.positionProp ? Math.ceil(a) + "px" : "0px", e = "top" == b.positionProp ? Math.ceil(a) + "px" : "0px", c[b.positionProp] = a, b.transformsEnabled === !1 ? b.$slideTrack.css(c) : (c = {}, b.cssTransitions === !1 ? (c[b.animType] = "translate(" + d + ", " + e + ")", b.$slideTrack.css(c)) : (c[b.animType] = "translate3d(" + d + ", " + e + ", 0px)", b.$slideTrack.css(c))) }, b.prototype.setDimensions = function () { var a = this; a.options.vertical === !1 ? a.options.centerMode === !0 && a.$list.css({ padding: "0px " + a.options.centerPadding }) : (a.$list.height(a.$slides.first().outerHeight(!0) * a.options.slidesToShow), a.options.centerMode === !0 && a.$list.css({ padding: a.options.centerPadding + " 0px" })), a.listWidth = a.$list.width(), a.listHeight = a.$list.height(), a.options.vertical === !1 && a.options.variableWidth === !1 ? (a.slideWidth = Math.ceil(a.listWidth / a.options.slidesToShow), a.$slideTrack.width(Math.ceil(a.slideWidth * a.$slideTrack.children(".slick-slide").length))) : a.options.variableWidth === !0 ? a.$slideTrack.width(5e3 * a.slideCount) : (a.slideWidth = Math.ceil(a.listWidth), a.$slideTrack.height(Math.ceil(a.$slides.first().outerHeight(!0) * a.$slideTrack.children(".slick-slide").length))); var b = a.$slides.first().outerWidth(!0) - a.$slides.first().width(); a.options.variableWidth === !1 && a.$slideTrack.children(".slick-slide").width(a.slideWidth - b) }, b.prototype.setFade = function () { var c, b = this; b.$slides.each(function (d, e) { c = b.slideWidth * d * -1, b.options.rtl === !0 ? a(e).css({ position: "relative", right: c, top: 0, zIndex: b.options.zIndex - 2, opacity: 0 }) : a(e).css({ position: "relative", left: c, top: 0, zIndex: b.options.zIndex - 2, opacity: 0 }) }), b.$slides.eq(b.currentSlide).css({ zIndex: b.options.zIndex - 1, opacity: 1 }) }, b.prototype.setHeight = function () { var a = this; if (1 === a.options.slidesToShow && a.options.adaptiveHeight === !0 && a.options.vertical === !1) { var b = a.$slides.eq(a.currentSlide).outerHeight(!0); a.$list.css("height", b) } }, b.prototype.setOption = b.prototype.slickSetOption = function () { var c, d, e, f, h, b = this, g = !1; if ("object" === a.type(arguments[0]) ? (e = arguments[0], g = arguments[1], h = "multiple") : "string" === a.type(arguments[0]) && (e = arguments[0], f = arguments[1], g = arguments[2], "responsive" === arguments[0] && "array" === a.type(arguments[1]) ? h = "responsive" : "undefined" != typeof arguments[1] && (h = "single")), "single" === h) b.options[e] = f; else if ("multiple" === h) a.each(e, function (a, c) { b.options[a] = c }); else if ("responsive" === h) for (d in f) if ("array" !== a.type(b.options.responsive)) b.options.responsive = [f[d]]; else { for (c = b.options.responsive.length - 1; c >= 0;)b.options.responsive[c].breakpoint === f[d].breakpoint && b.options.responsive.splice(c, 1), c--; b.options.responsive.push(f[d]) } g && (b.unload(), b.reinit()) }, b.prototype.setPosition = function () { var a = this; a.setDimensions(), a.setHeight(), a.options.fade === !1 ? a.setCSS(a.getLeft(a.currentSlide)) : a.setFade(), a.$slider.trigger("setPosition", [a]) }, b.prototype.setProps = function () { var a = this, b = document.body.style; a.positionProp = a.options.vertical === !0 ? "top" : "left", "top" === a.positionProp ? a.$slider.addClass("slick-vertical") : a.$slider.removeClass("slick-vertical"), (void 0 !== b.WebkitTransition || void 0 !== b.MozTransition || void 0 !== b.msTransition) && a.options.useCSS === !0 && (a.cssTransitions = !0), a.options.fade && ("number" == typeof a.options.zIndex ? a.options.zIndex < 3 && (a.options.zIndex = 3) : a.options.zIndex = a.defaults.zIndex), void 0 !== b.OTransform && (a.animType = "OTransform", a.transformType = "-o-transform", a.transitionType = "OTransition", void 0 === b.perspectiveProperty && void 0 === b.webkitPerspective && (a.animType = !1)), void 0 !== b.MozTransform && (a.animType = "MozTransform", a.transformType = "-moz-transform", a.transitionType = "MozTransition", void 0 === b.perspectiveProperty && void 0 === b.MozPerspective && (a.animType = !1)), void 0 !== b.webkitTransform && (a.animType = "webkitTransform", a.transformType = "-webkit-transform", a.transitionType = "webkitTransition", void 0 === b.perspectiveProperty && void 0 === b.webkitPerspective && (a.animType = !1)), void 0 !== b.msTransform && (a.animType = "msTransform", a.transformType = "-ms-transform", a.transitionType = "msTransition", void 0 === b.msTransform && (a.animType = !1)), void 0 !== b.transform && a.animType !== !1 && (a.animType = "transform", a.transformType = "transform", a.transitionType = "transition"), a.transformsEnabled = a.options.useTransform && null !== a.animType && a.animType !== !1 }, b.prototype.setSlideClasses = function (a) {
var c, d, e, f, b = this; d = b.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden", "true"), b.$slides.eq(a).addClass("slick-current"), b.options.centerMode === !0 ? (c = Math.floor(b.options.slidesToShow / 2), b.options.infinite === !0 && (a >= c && a <= b.slideCount - 1 - c ? b.$slides.slice(a - c, a + c + 1).addClass("slick-active").attr("aria-hidden", "false") : (e = b.options.slidesToShow + a,
d.slice(e - c + 1, e + c + 2).addClass("slick-active").attr("aria-hidden", "false")), 0 === a ? d.eq(d.length - 1 - b.options.slidesToShow).addClass("slick-center") : a === b.slideCount - 1 && d.eq(b.options.slidesToShow).addClass("slick-center")), b.$slides.eq(a).addClass("slick-center")) : a >= 0 && a <= b.slideCount - b.options.slidesToShow ? b.$slides.slice(a, a + b.options.slidesToShow).addClass("slick-active").attr("aria-hidden", "false") : d.length <= b.options.slidesToShow ? d.addClass("slick-active").attr("aria-hidden", "false") : (f = b.slideCount % b.options.slidesToShow, e = b.options.infinite === !0 ? b.options.slidesToShow + a : a, b.options.slidesToShow == b.options.slidesToScroll && b.slideCount - a < b.options.slidesToShow ? d.slice(e - (b.options.slidesToShow - f), e + f).addClass("slick-active").attr("aria-hidden", "false") : d.slice(e, e + b.options.slidesToShow).addClass("slick-active").attr("aria-hidden", "false")), "ondemand" === b.options.lazyLoad && b.lazyLoad()
}, b.prototype.setupInfinite = function () { var c, d, e, b = this; if (b.options.fade === !0 && (b.options.centerMode = !1), b.options.infinite === !0 && b.options.fade === !1 && (d = null, b.slideCount > b.options.slidesToShow)) { for (e = b.options.centerMode === !0 ? b.options.slidesToShow + 1 : b.options.slidesToShow, c = b.slideCount; c > b.slideCount - e; c -= 1)d = c - 1, a(b.$slides[d]).clone(!0).attr("id", "").attr("data-slick-index", d - b.slideCount).prependTo(b.$slideTrack).addClass("slick-cloned"); for (c = 0; e > c; c += 1)d = c, a(b.$slides[d]).clone(!0).attr("id", "").attr("data-slick-index", d + b.slideCount).appendTo(b.$slideTrack).addClass("slick-cloned"); b.$slideTrack.find(".slick-cloned").find("[id]").each(function () { a(this).attr("id", "") }) } }, b.prototype.interrupt = function (a) { var b = this; a || b.autoPlay(), b.interrupted = a }, b.prototype.selectHandler = function (b) { var c = this, d = a(b.target).is(".slick-slide") ? a(b.target) : a(b.target).parents(".slick-slide"), e = parseInt(d.attr("data-slick-index")); return e || (e = 0), c.slideCount <= c.options.slidesToShow ? (c.setSlideClasses(e), void c.asNavFor(e)) : void c.slideHandler(e) }, b.prototype.slideHandler = function (a, b, c) { var d, e, f, g, j, h = null, i = this; return b = b || !1, i.animating === !0 && i.options.waitForAnimate === !0 || i.options.fade === !0 && i.currentSlide === a || i.slideCount <= i.options.slidesToShow ? void 0 : (b === !1 && i.asNavFor(a), d = a, h = i.getLeft(d), g = i.getLeft(i.currentSlide), i.currentLeft = null === i.swipeLeft ? g : i.swipeLeft, i.options.infinite === !1 && i.options.centerMode === !1 && (0 > a || a > i.getDotCount() * i.options.slidesToScroll) ? void (i.options.fade === !1 && (d = i.currentSlide, c !== !0 ? i.animateSlide(g, function () { i.postSlide(d) }) : i.postSlide(d))) : i.options.infinite === !1 && i.options.centerMode === !0 && (0 > a || a > i.slideCount - i.options.slidesToScroll) ? void (i.options.fade === !1 && (d = i.currentSlide, c !== !0 ? i.animateSlide(g, function () { i.postSlide(d) }) : i.postSlide(d))) : (i.options.autoplay && clearInterval(i.autoPlayTimer), e = 0 > d ? i.slideCount % i.options.slidesToScroll !== 0 ? i.slideCount - i.slideCount % i.options.slidesToScroll : i.slideCount + d : d >= i.slideCount ? i.slideCount % i.options.slidesToScroll !== 0 ? 0 : d - i.slideCount : d, i.animating = !0, i.$slider.trigger("beforeChange", [i, i.currentSlide, e]), f = i.currentSlide, i.currentSlide = e, i.setSlideClasses(i.currentSlide), i.options.asNavFor && (j = i.getNavTarget(), j = j.slick("getSlick"), j.slideCount <= j.options.slidesToShow && j.setSlideClasses(i.currentSlide)), i.updateDots(), i.updateArrows(), i.options.fade === !0 ? (c !== !0 ? (i.fadeSlideOut(f), i.fadeSlide(e, function () { i.postSlide(e) })) : i.postSlide(e), void i.animateHeight()) : void (c !== !0 ? i.animateSlide(h, function () { i.postSlide(e) }) : i.postSlide(e)))) }, b.prototype.startLoad = function () { var a = this; a.options.arrows === !0 && a.slideCount > a.options.slidesToShow && (a.$prevArrow.hide(), a.$nextArrow.hide()), a.options.dots === !0 && a.slideCount > a.options.slidesToShow && a.$dots.hide(), a.$slider.addClass("slick-loading") }, b.prototype.swipeDirection = function () { var a, b, c, d, e = this; return a = e.touchObject.startX - e.touchObject.curX, b = e.touchObject.startY - e.touchObject.curY, c = Math.atan2(b, a), d = Math.round(180 * c / Math.PI), 0 > d && (d = 360 - Math.abs(d)), 45 >= d && d >= 0 ? e.options.rtl === !1 ? "left" : "right" : 360 >= d && d >= 315 ? e.options.rtl === !1 ? "left" : "right" : d >= 135 && 225 >= d ? e.options.rtl === !1 ? "right" : "left" : e.options.verticalSwiping === !0 ? d >= 35 && 135 >= d ? "down" : "up" : "vertical" }, b.prototype.swipeEnd = function (a) { var c, d, b = this; if (b.dragging = !1, b.interrupted = !1, b.shouldClick = b.touchObject.swipeLength > 10 ? !1 : !0, void 0 === b.touchObject.curX) return !1; if (b.touchObject.edgeHit === !0 && b.$slider.trigger("edge", [b, b.swipeDirection()]), b.touchObject.swipeLength >= b.touchObject.minSwipe) { switch (d = b.swipeDirection()) { case "left": case "down": c = b.options.swipeToSlide ? b.checkNavigable(b.currentSlide + b.getSlideCount()) : b.currentSlide + b.getSlideCount(), b.currentDirection = 0; break; case "right": case "up": c = b.options.swipeToSlide ? b.checkNavigable(b.currentSlide - b.getSlideCount()) : b.currentSlide - b.getSlideCount(), b.currentDirection = 1 }"vertical" != d && (b.slideHandler(c), b.touchObject = {}, b.$slider.trigger("swipe", [b, d])) } else b.touchObject.startX !== b.touchObject.curX && (b.slideHandler(b.currentSlide), b.touchObject = {}) }, b.prototype.swipeHandler = function (a) { var b = this; if (!(b.options.swipe === !1 || "ontouchend" in document && b.options.swipe === !1 || b.options.draggable === !1 && -1 !== a.type.indexOf("mouse"))) switch (b.touchObject.fingerCount = a.originalEvent && void 0 !== a.originalEvent.touches ? a.originalEvent.touches.length : 1, b.touchObject.minSwipe = b.listWidth / b.options.touchThreshold, b.options.verticalSwiping === !0 && (b.touchObject.minSwipe = b.listHeight / b.options.touchThreshold), a.data.action) { case "start": b.swipeStart(a); break; case "move": b.swipeMove(a); break; case "end": b.swipeEnd(a) } }, b.prototype.swipeMove = function (a) { var d, e, f, g, h, b = this; return h = void 0 !== a.originalEvent ? a.originalEvent.touches : null, !b.dragging || h && 1 !== h.length ? !1 : (d = b.getLeft(b.currentSlide), b.touchObject.curX = void 0 !== h ? h[0].pageX : a.clientX, b.touchObject.curY = void 0 !== h ? h[0].pageY : a.clientY, b.touchObject.swipeLength = Math.round(Math.sqrt(Math.pow(b.touchObject.curX - b.touchObject.startX, 2))), b.options.verticalSwiping === !0 && (b.touchObject.swipeLength = Math.round(Math.sqrt(Math.pow(b.touchObject.curY - b.touchObject.startY, 2)))), e = b.swipeDirection(), "vertical" !== e ? (void 0 !== a.originalEvent && b.touchObject.swipeLength > 4 && a.preventDefault(), g = (b.options.rtl === !1 ? 1 : -1) * (b.touchObject.curX > b.touchObject.startX ? 1 : -1), b.options.verticalSwiping === !0 && (g = b.touchObject.curY > b.touchObject.startY ? 1 : -1), f = b.touchObject.swipeLength, b.touchObject.edgeHit = !1, b.options.infinite === !1 && (0 === b.currentSlide && "right" === e || b.currentSlide >= b.getDotCount() && "left" === e) && (f = b.touchObject.swipeLength * b.options.edgeFriction, b.touchObject.edgeHit = !0), b.options.vertical === !1 ? b.swipeLeft = d + f * g : b.swipeLeft = d + f * (b.$list.height() / b.listWidth) * g, b.options.verticalSwiping === !0 && (b.swipeLeft = d + f * g), b.options.fade === !0 || b.options.touchMove === !1 ? !1 : b.animating === !0 ? (b.swipeLeft = null, !1) : void b.setCSS(b.swipeLeft)) : void 0) }, b.prototype.swipeStart = function (a) { var c, b = this; return b.interrupted = !0, 1 !== b.touchObject.fingerCount || b.slideCount <= b.options.slidesToShow ? (b.touchObject = {}, !1) : (void 0 !== a.originalEvent && void 0 !== a.originalEvent.touches && (c = a.originalEvent.touches[0]), b.touchObject.startX = b.touchObject.curX = void 0 !== c ? c.pageX : a.clientX, b.touchObject.startY = b.touchObject.curY = void 0 !== c ? c.pageY : a.clientY, void (b.dragging = !0)) }, b.prototype.unfilterSlides = b.prototype.slickUnfilter = function () { var a = this; null !== a.$slidesCache && (a.unload(), a.$slideTrack.children(this.options.slide).detach(), a.$slidesCache.appendTo(a.$slideTrack), a.reinit()) }, b.prototype.unload = function () { var b = this; a(".slick-cloned", b.$slider).remove(), b.$dots && b.$dots.remove(), b.$prevArrow && b.htmlExpr.test(b.options.prevArrow) && b.$prevArrow.remove(), b.$nextArrow && b.htmlExpr.test(b.options.nextArrow) && b.$nextArrow.remove(), b.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden", "true").css("width", "") }, b.prototype.unslick = function (a) { var b = this; b.$slider.trigger("unslick", [b, a]), b.destroy() }, b.prototype.updateArrows = function () { var b, a = this; b = Math.floor(a.options.slidesToShow / 2), a.options.arrows === !0 && a.slideCount > a.options.slidesToShow && !a.options.infinite && (a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled", "false"), a.$nextArrow.removeClass("slick-disabled").attr("aria-disabled", "false"), 0 === a.currentSlide ? (a.$prevArrow.addClass("slick-disabled").attr("aria-disabled", "true"), a.$nextArrow.removeClass("slick-disabled").attr("aria-disabled", "false")) : a.currentSlide >= a.slideCount - a.options.slidesToShow && a.options.centerMode === !1 ? (a.$nextArrow.addClass("slick-disabled").attr("aria-disabled", "true"), a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled", "false")) : a.currentSlide >= a.slideCount - 1 && a.options.centerMode === !0 && (a.$nextArrow.addClass("slick-disabled").attr("aria-disabled", "true"), a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled", "false"))) }, b.prototype.updateDots = function () { var a = this; null !== a.$dots && (a.$dots.find("li").removeClass("slick-active").attr("aria-hidden", "true"), a.$dots.find("li").eq(Math.floor(a.currentSlide / a.options.slidesToScroll)).addClass("slick-active").attr("aria-hidden", "false")) }, b.prototype.visibility = function () { var a = this; a.options.autoplay && (document[a.hidden] ? a.interrupted = !0 : a.interrupted = !1) }, a.fn.slick = function () { var f, g, a = this, c = arguments[0], d = Array.prototype.slice.call(arguments, 1), e = a.length; for (f = 0; e > f; f++)if ("object" == typeof c || "undefined" == typeof c ? a[f].slick = new b(a[f], c) : g = a[f].slick[c].apply(a[f].slick, d), "undefined" != typeof g) return g; return a }
});
/**
* @module Stepper
* @version 3.0.8
* @license MIT
* @link http://classic.formstone.it/stepper/
*/
!function (a, b) { "use strict"; function c(b) { b = a.extend({}, m, b || {}); for (var c = a(this), e = 0, f = c.length; f > e; e++)d(c.eq(e), b); return c } function d(b, c) { if (!b.hasClass("stepper-input")) { c = a.extend({}, c, b.data("stepper-options")); var d = parseFloat(b.attr("min")), g = parseFloat(b.attr("max")), h = parseFloat(b.attr("step")) || 1; b.addClass("stepper-input").wrap('<div class="stepper ' + c.customClass + '" />').after('<span class="stepper-arrow up">' + c.labels.up + '</span><span class="stepper-arrow down">' + c.labels.down + "</span>"); var i = b.parent(".stepper"), j = a.extend({ $stepper: i, $input: b, $arrow: i.find(".stepper-arrow"), min: void 0 === typeof d || isNaN(d) ? !1 : d, max: void 0 === typeof g || isNaN(g) ? !1 : g, step: void 0 === typeof h || isNaN(h) ? 1 : h, timer: null }, c); j.digits = k(j.step), b.is(":disabled") && i.addClass("disabled"), i.on("keypress", ".stepper-input", j, e), i.on("touchstart.stepper mousedown.stepper", ".stepper-arrow", j, f).data("stepper", j) } } function e(a) { var b = a.data; (38 === a.keyCode || 40 === a.keyCode) && (a.preventDefault(), h(b, 38 === a.keyCode ? b.step : -b.step)) } function f(b) { b.preventDefault(), b.stopPropagation(), g(b); var c = b.data; if (!c.$input.is(":disabled") && !c.$stepper.hasClass("disabled")) { var d = a(b.target).hasClass("up") ? c.step : -c.step; c.timer = i(c.timer, 125, function () { h(c, d, !1) }), h(c, d), a("body").on("touchend.stepper mouseup.stepper", c, g) } } function g(b) { b.preventDefault(), b.stopPropagation(); var c = b.data; j(c.timer), a("body").off(".stepper") } function h(a, b) { var c = parseFloat(a.$input.val()), d = b; void 0 === typeof c || isNaN(c) ? d = a.min !== !1 ? a.min : 0 : a.min !== !1 && c < a.min ? d = a.min : d += c; var e = (d - a.min) % a.step; 0 !== e && (d -= e), a.min !== !1 && d < a.min && (d = a.min), a.max !== !1 && d > a.max && (d -= a.step), d !== c && (d = l(d, a.digits), a.$input.val(d).trigger("change")) } function i(a, b, c) { return j(a), setInterval(c, b) } function j(a) { a && (clearInterval(a), a = null) } function k(a) { var b = String(a); return b.indexOf(".") > -1 ? b.length - b.indexOf(".") - 1 : 0 } function l(a, b) { var c = Math.pow(10, b); return Math.round(a * c) / c } var m = { customClass: "", labels: { up: "Up", down: "Down" } }, n = { defaults: function (b) { return m = a.extend(m, b || {}), "object" == typeof this ? a(this) : !0 }, destroy: function () { return a(this).each(function (b) { var c = a(this).data("stepper"); c && (c.$stepper.off(".stepper").find(".stepper-arrow").remove(), c.$input.unwrap().removeClass("stepper-input")) }) }, disable: function () { return a(this).each(function (b) { var c = a(this).data("stepper"); c && (c.$input.attr("disabled", "disabled"), c.$stepper.addClass("disabled")) }) }, enable: function () { return a(this).each(function (b) { var c = a(this).data("stepper"); c && (c.$input.attr("disabled", null), c.$stepper.removeClass("disabled")) }) } }; a.fn.stepper = function (a) { return n[a] ? n[a].apply(this, Array.prototype.slice.call(arguments, 1)) : "object" != typeof a && a ? this : c.apply(this, arguments) }, a.stepper = function (a) { "defaults" === a && n.defaults.apply(this, Array.prototype.slice.call(arguments, 1)) } }(jQuery, this);
/**
* @module CustomEvent polyfill
*/
!function () { try { new CustomEvent("IE has CustomEvent, but doesn't support constructor") } catch (t) { window.CustomEvent = function (t, e) { var n; return e = e || { bubbles: !1, cancelable: !1, detail: void 0 }, (n = document.createEvent("CustomEvent")).initCustomEvent(t, e.bubbles, e.cancelable, e.detail), n }, CustomEvent.prototype = Object.create(window.Event.prototype) } }();
/**
* @module MultiToggles
* @author ATOM
* @license MIT
* @see https://codepen.io/OXAYAZA/pen/eRbYjV
* @version 2.0.0
* @description Allows you to use multiple toggles to switch class "active" on the target,
* itself and other toggles linked to the same target.
*/
function Toggle(t) { if (!t.node) throw new Error("Toggle node is required"); if (!t.targets) throw new Error("Target node is required"); this.node = t.node, this.node.mt = this, this.state = t.state || !1, this.clas = t.clas || "active", this.targets = t.targets, this.scope = t.scope || null, this.isolate = t.isolate || null; for (var e = 0; e < this.targets.length; e++)this.targets[e].mtt ? this.targets[e].mtt.toggles.push(this.node) : new Target({ node: this.targets[e], toggles: [this.node], state: this.state, clas: this.clas }); if (this.node.addEventListener("click", function () { this.mt.changeState() }), this.node.addEventListener("changeState", function (t) { t.emitter.mtt.state !== this.mt.state && this.mt.changeState() }), this.scope.length) { var s = this; document.addEventListener("click", function (t) { !s.checkScope(t.target) && s.state && s.changeState() }) } if (this.isolate.length) { s = this; document.addEventListener("click", function (t) { s.checkIsolate(t.target) && s.state && s.changeState() }) } return this } function Target(t) { return this.node = t.node, this.node.mtt = this, this.state = t.state || !1, this.clas = t.clas || "active", this.toggles = t.toggles, this.node.addEventListener("changeState", function (t) { t.emitter.mt.state !== this.mtt.state && this.mtt.changeState() }), this } Toggle.prototype.changeState = function (t) { this.state = !this.state, this.node.classList.toggle(this.clas); for (var e = 0; e < this.targets.length; e++) { var s = new CustomEvent("changeState"); s.emitter = this.node, this.targets[e].dispatchEvent(s) } }, Toggle.prototype.checkScope = function (t) { if (this.node.contains(t)) return !0; for (var e = 0; e < this.scope.length; e++)if (this.scope[e].contains(t)) return !0; return !1 }, Toggle.prototype.checkIsolate = function (t) { if (this.node.contains(t)) return !1; for (var e = 0; e < this.isolate.length; e++)if (this.isolate[e].contains(t)) return !0; return !1 }, Target.prototype.changeState = function () { this.state = !this.state, this.node.classList.toggle(this.clas); for (var t = 0; t < this.toggles.length; t++) { var e = new CustomEvent("changeState"); e.emitter = this.node, this.toggles[t].dispatchEvent(e) } };
/**
* @module RD Range
* @author Roman Kholiavko
* @see http://cms.devoffice.com/coding-demo/marathoner/rd-range/documentation
* @version 1.0
*/
(function () { !function (t, e, n) { var o, i; return i = "ontouchstart" in n, o = function () { function o(n, o) { this.$element = t(n), this.options = t.extend(!0, {}, this.Defaults, o), this.setClientOptions(this), this.createDOM(this), this.$pointer = t(n).find(".rd-range__pointer-1"), this.options.tooltip && (this.$pointerTooltip = this.$pointer.find(".rd-range__pointer-tooltip"), this.$element.addClass("hasTooltip")), this.$line = t(n).find(".rd-range__line"), null != t(n).attr("data-input") ? this.$input = t(t(n).attr("data-input")) : this.$input = t(this.Defaults.inputClassName), this.range && (this.$pointer2 = t(n).find(".rd-range__pointer-2"), null != t(n).attr("data-input-2") ? this.$input2 = t(t(n).attr("data-input-2")) : this.$input2 = t(this.Defaults.inputClassName2), this.options.tooltip && (this.$pointerTooltip2 = this.$pointer2.find(".rd-range__pointer-tooltip"))), this.$doc = t(e), this.isMove = !1, this.initialization() } return o.prototype.Defaults = { min: 0, start: 0, max: 100, start2: 0, step: 1, minDiff: 0, inputClassName: ".rd-range-input-value", inputClassName2: ".rd-range-input-value-2", tooltip: !1, callbacks: { onInit: !1, onChange: !1, onInputChange: !1, onMoveStart: !1, onMoveEnd: !1 } }, o.prototype.initialization = function () { var t; return t = this, t.setRange(t), t.applyHandlers(t), t.options.callbacks.onInit && t.options.callbacks.onInit.call(this, t), t }, o.prototype.createDOM = function (t) { var e; e = '<div class="rd-range__pointer rd-range__pointer-1">', t.options.tooltip && (e += '<div class="rd-range__pointer-tooltip"></div>'), e += "</div>", t.range && (e += '<div class="rd-range__pointer rd-range__pointer-2">', t.options.tooltip && (e += '<div class="rd-range__pointer-tooltip"></div>'), e += "</div>"), t.$element.wrapInner('<div class="rd-range__wrap">' + e + '<div class="rd-range__line"></div> </div>') }, o.prototype.setClientOptions = function (t) { var e; e = { min: t.$element.attr("data-min"), max: t.$element.attr("data-max"), step: t.$element.attr("data-step"), start: t.$element.data("start"), minDiff: t.$element.attr("data-min-diff"), precision: t.$element.attr("data-precision"), tooltip: t.$element.attr("data-tooltip") }, t.options.start = [], (null != e.start && e.start.length > 1 || null != t.options.start && t.options.start.length > 1) && (t.range = !0), null != e.min && (t.options.min = Number(e.min)), null != e.max && (t.options.max = Number(e.max)), null != e.start ? t.options.start = e.start : t.options.start.push(t.options.min), t.currentValue = t.options.start[0], null != e.step && (t.options.step = Number(e.step)), null != e.tooltip && (t.options.tooltip = e.tooltip), null != e.precision ? t.options.precision = t.getNumDigitsAfterDecimalPlace(Number(e.precision)) : t.options.precision = t.getNumDigitsAfterDecimalPlace(t.options.step), t.range && (t.currentValue2 = t.options.start[1], null != e.minDiff ? t.options.minDiff = Number(e.minDiff) : null != t.options.minDiff && (t.options.minDiff = t.options.step)) }, o.prototype.setRange = function (t) { return t.diff = t.options.max - t.options.min, t.delta = 100 * t.options.step / t.diff, t.currentPercentage = t.getPercentageByValue(t, t.currentValue), t.updatePointer1(t, t.currentPercentage, t.currentValue), t.range ? (t.currentPercentage2 = t.getPercentageByValue(t, t.currentValue2), t.updatePointer2(t, t.currentPercentage2, t.currentValue2)) : void 0 }, o.prototype.applyHandlers = function (e) { return e.$pointer.on(i ? "touchstart" : "mousedown", function (n) { var o, r, a, u; if (!e.isMove) return e.isMove = !0, o = t(this), o.addClass("active"), a = "touchmove" === n.type ? n.originalEvent.targetTouches[0].pageX : n.pageX, r = e.getCoords(e.$element), u = e.getPercentage(e, a, r.left), e.options.callbacks.onMoveStart && e.options.callbacks.onMoveStart.call(this, e), e.$doc.on(i ? "touchmove" : "mousemove", function (t) { var n; return a = "touchmove" === t.type ? t.originalEvent.targetTouches[0].pageX : t.pageX, n = e.getPercentage(e, a, r.left), n !== u ? (u = n, e.currentValue = e.getCurrentValue(e, u), e.range && e.currentValue >= e.currentValue2 - e.options.minDiff && (n = e.checkPointer1Bounds(e)), e.updatePointer1(e, n, e.currentValue)) : void 0 }).on(i ? "touchend" : "mouseup", function (t) { return setTimeout(function () { return e.isMove = !1 }, 100), o.removeClass("active"), e.options.callbacks.onMoveEnd && e.options.callbacks.onMoveEnd.call(this, e), i ? e.$doc.off("touchmove") : e.$doc.off("mousemove"), e.$doc.off(t.type) }), !1 }), "hidden" !== e.$input.attr("type") && "readonly" !== e.$input.attr("readOnly") && e.$input.on("keypress", function (t) { return e.isAllowTyped(t.which) }).on("change", function (n) { var o; return o = Math.abs(Number(t(this).val())), e.range && (o >= e.currentValue2 || o > e.currentValue2 - e.options.minDiff) && (e.checkPointer1Bounds(e), o = e.currentValue), o < e.options.min && (o = e.options.min), e.currentValue = o, e.setRange(e), e.options.callbacks.onInputChange ? e.options.callbacks.onInputChange.call(this, e) : void 0 }), e.range && (e.$pointer2.on(i ? "touchstart" : "mousedown", function (n) { var o, r, a, u; if (!e.isMove) return e.isMove = !0, o = t(this), o.addClass("active"), a = "touchmove" === n.type ? n.originalEvent.targetTouches[0].pageX : n.pageX, r = e.getCoords(e.$element), u = e.getPercentage(e, a, r.left), e.options.callbacks.onMoveStart && e.options.callbacks.onMoveStart.call(this, e), e.$doc.on(i ? "touchmove" : "mousemove", function (t) { var n; return a = "touchmove" === t.type ? t.originalEvent.targetTouches[0].pageX : t.pageX, n = e.getPercentage(e, a, r.left), n !== u ? (u = n, e.currentValue2 = e.getCurrentValue(e, n), e.range && e.currentValue2 <= e.currentValue + e.options.minDiff && (n = e.checkPointer2Bounds(e)), e.updatePointer2(e, n, e.currentValue2)) : void 0 }).on(i ? "touchend" : "mouseup", function (t) { return setTimeout(function () { return e.isMove = !1 }, 100), o.removeClass("active"), e.options.callbacks.onMoveEnd && e.options.callbacks.onMoveEnd.call(this, e), i ? e.$doc.off("touchmove") : e.$doc.off("mousemove"), e.$doc.off(t.type) }), !1 }), "hidden" !== e.$input2.attr("type") && "readonly" !== e.$input2.attr("readOnly") && e.$input2.on("keypress", function (t) { return e.isAllowTyped(t.which) }).on("change", function (n) { var o; return o = Math.abs(Number(t(this).val())), (o <= e.currentValue || o < e.currentValue + e.options.minDiff) && (e.checkPointer2Bounds(e), o = e.currentValue2), o > e.options.max && (o = e.options.max), e.currentValue2 = o, e.setRange(e), e.options.callbacks.onInputChange ? e.options.callbacks.onInputChange.call(this, e) : void 0 })), e.$element.on("click", function (t) { var n, o, i, r, a, u; if (!e.isMove) return a = "touch" === t.type ? t.originalEvent.targetTouches[0].pageX : t.pageX, r = e.getCoords(e.$element), u = e.getPercentage(e, a, r.left), n = e.getCurrentValue(e, u), e.range && (o = Math.abs(+(u - e.currentPercentage)), i = Math.abs(+(u - e.currentPercentage2)), o > i) ? (n <= e.currentValue + e.options.minDiff && (u = e.checkPointer2Bounds(e), n = e.getCurrentValue(e, u)), e.updatePointer2(e, u, n), !1) : (n >= e.currentValue2 - e.options.minDiff && (u = e.checkPointer1Bounds(e), n = e.getCurrentValue(e, u)), e.updatePointer1(e, u, n), !1) }) }, o.prototype.updatePointer1 = function (t, e, n) { t.currentPercentage = e, t.currentValue = n, t.updatePositions(t, t.$pointer, t.currentPercentage), t.updateValue(t), t.options.tooltip && t.$pointerTooltip.html(t.currentValue) }, o.prototype.updatePointer2 = function (t, e, n) { t.currentPercentage2 = e, t.currentValue2 = n, t.updatePositions(t, t.$pointer2, t.currentPercentage2), t.updateValue(t), t.options.tooltip && t.$pointerTooltip2.html(t.currentValue2) }, o.prototype.updateValue = function (t) { t.options.callbacks.onChange && t.options.callbacks.onChange.call(this, t), t.range && (t.$input2.is("input") ? t.$input2.val(t.currentValue2) : t.$input2.html(t.currentValue2)), t.$input.is("input") ? t.$input.val(t.currentValue) : t.$input.html(t.currentValue) }, o.prototype.checkPointer1Bounds = function (t) { return t.currentValue = t.currentValue2 - t.options.minDiff, t.getPercentageByValue(t, t.currentValue) }, o.prototype.checkPointer2Bounds = function (t) { return t.currentValue2 = t.currentValue + t.options.minDiff, t.getPercentageByValue(t, t.currentValue2) }, o.prototype.getPercentageByValue = function (t, e) { return Math.round(100 * (e - t.options.min) / (t.options.max - t.options.min)) }, o.prototype.getPercentage = function (t, e, n) { var o; return o = (e - n) / t.$element.width() * 100, o = Math.round(o / t.delta) * t.delta, Math.max(0, Math.min(100, o)) }, o.prototype.getCurrentValue = function (t, e) { return +(t.options.min + Math.round(t.diff * e / 100 / t.options.step) * t.options.step).toFixed(t.options.precision) }, o.prototype.getOffsetByPercentage = function (t, e) { return t.$element.width() * e / 100 }, o.prototype.updatePositions = function (t, e, n) { var o; e.css("left", n + "%"), t.range ? (o = t.currentPercentage2 - t.currentPercentage, t.$line.css("left", t.currentPercentage + "%"), t.$line.css("width", o + "%")) : t.$line.css("width", n + "%") }, o.prototype.getCoords = function (t) { return { top: t.offset().top + pageYOffset, left: t.offset().left + pageXOffset } }, o.prototype.isAllowTyped = function (t) { return 9 !== t && 8 !== t && 0 !== t && 13 !== t && 46 !== t && (48 > t || t > 57) ? !1 : !0 }, o.prototype.getNumDigitsAfterDecimalPlace = function (t) { var e, n; return n = "" + t, e = n.indexOf("."), 0 > e ? 0 : n.substr(e + 1).length }, t.fn.extend({ RDRange: function (e) { return this.each(function () { var n; return n = t(this), n.data("RDRange") ? void 0 : n.data("RDRange", new o(this, e)) }) } }), n.RDRange = o, o }() }(window.jQuery, document, window), "undefined" != typeof module && null !== module ? module.exports = window.RDRange : "function" == typeof define && define.amd && define(["jquery"], function () { "use strict"; return window.RDRange }) }).call(this);
/**
* @module jQuery Mousewheel
* @license MIT
* @version 3.1.13
*/
!function (a) { "function" == typeof define && define.amd ? define(["jquery"], a) : "object" == typeof exports ? module.exports = a : a(jQuery) }(function (a) { function b(b) { var g = b || window.event, h = i.call(arguments, 1), j = 0, l = 0, m = 0, n = 0, o = 0, p = 0; if (b = a.event.fix(g), b.type = "mousewheel", "detail" in g && (m = -1 * g.detail), "wheelDelta" in g && (m = g.wheelDelta), "wheelDeltaY" in g && (m = g.wheelDeltaY), "wheelDeltaX" in g && (l = -1 * g.wheelDeltaX), "axis" in g && g.axis === g.HORIZONTAL_AXIS && (l = -1 * m, m = 0), j = 0 === m ? l : m, "deltaY" in g && (m = -1 * g.deltaY, j = m), "deltaX" in g && (l = g.deltaX, 0 === m && (j = -1 * l)), 0 !== m || 0 !== l) { if (1 === g.deltaMode) { var q = a.data(this, "mousewheel-line-height"); j *= q, m *= q, l *= q } else if (2 === g.deltaMode) { var r = a.data(this, "mousewheel-page-height"); j *= r, m *= r, l *= r } if (n = Math.max(Math.abs(m), Math.abs(l)), (!f || f > n) && (f = n, d(g, n) && (f /= 40)), d(g, n) && (j /= 40, l /= 40, m /= 40), j = Math[j >= 1 ? "floor" : "ceil"](j / f), l = Math[l >= 1 ? "floor" : "ceil"](l / f), m = Math[m >= 1 ? "floor" : "ceil"](m / f), k.settings.normalizeOffset && this.getBoundingClientRect) { var s = this.getBoundingClientRect(); o = b.clientX - s.left, p = b.clientY - s.top } return b.deltaX = l, b.deltaY = m, b.deltaFactor = f, b.offsetX = o, b.offsetY = p, b.deltaMode = 0, h.unshift(b, j, l, m), e && clearTimeout(e), e = setTimeout(c, 200), (a.event.dispatch || a.event.handle).apply(this, h) } } function c() { f = null } function d(a, b) { return k.settings.adjustOldDeltas && "mousewheel" === a.type && b % 120 === 0 } var e, f, g = ["wheel", "mousewheel", "DOMMouseScroll", "MozMousePixelScroll"], h = "onwheel" in document || document.documentMode >= 9 ? ["wheel"] : ["mousewheel", "DomMouseScroll", "MozMousePixelScroll"], i = Array.prototype.slice; if (a.event.fixHooks) for (var j = g.length; j;)a.event.fixHooks[g[--j]] = a.event.mouseHooks; var k = a.event.special.mousewheel = { version: "3.1.12", setup: function () { if (this.addEventListener) for (var c = h.length; c;)this.addEventListener(h[--c], b, !1); else this.onmousewheel = b; a.data(this, "mousewheel-line-height", k.getLineHeight(this)), a.data(this, "mousewheel-page-height", k.getPageHeight(this)) }, teardown: function () { if (this.removeEventListener) for (var c = h.length; c;)this.removeEventListener(h[--c], b, !1); else this.onmousewheel = null; a.removeData(this, "mousewheel-line-height"), a.removeData(this, "mousewheel-page-height") }, getLineHeight: function (b) { var c = a(b), d = c["offsetParent" in a.fn ? "offsetParent" : "parent"](); return d.length || (d = a("body")), parseInt(d.css("fontSize"), 10) || parseInt(c.css("fontSize"), 10) || 16 }, getPageHeight: function (b) { return a(b).height() }, settings: { adjustOldDeltas: !0, normalizeOffset: !0 } }; a.fn.extend({ mousewheel: function (a) { return a ? this.bind("mousewheel", a) : this.trigger("mousewheel") }, unmousewheel: function (a) { return this.unbind("mousewheel", a) } }) });
/**
* @module jQuery Mousewheel
* @author 2014 Kelvin Luck & 2017-2018 Tuukka Pasanen
* @see http://jscrollpane.kelvinluck.com/
* @license Dual licensed under the MIT or GPL licenses.
* @version 2.1.2-rc.1
*/
(function (factory) { if (typeof define === "function" && define.amd) { define(["jquery"], factory) } else if (typeof exports === "object") { module.exports = factory(require("jquery")) } else { factory(jQuery) } })(function ($) { $.fn.jScrollPane = function (settings) { function JScrollPane(elem, s) { var settings, jsp = this, pane, paneWidth, paneHeight, container, contentWidth, contentHeight, percentInViewH, percentInViewV, isScrollableV, isScrollableH, verticalDrag, dragMaxY, verticalDragPosition, horizontalDrag, dragMaxX, horizontalDragPosition, verticalBar, verticalTrack, scrollbarWidth, verticalTrackHeight, verticalDragHeight, arrowUp, arrowDown, horizontalBar, horizontalTrack, horizontalTrackWidth, horizontalDragWidth, arrowLeft, arrowRight, reinitialiseInterval, originalPadding, originalPaddingTotalWidth, previousContentWidth, wasAtTop = true, wasAtLeft = true, wasAtBottom = false, wasAtRight = false, originalElement = elem.clone(false, false).empty(), mwEvent = $.fn.mwheelIntent ? "mwheelIntent.jsp" : "mousewheel.jsp"; if (elem.css("box-sizing") === "border-box") { originalPadding = 0; originalPaddingTotalWidth = 0 } else { originalPadding = elem.css("paddingTop") + " " + elem.css("paddingRight") + " " + elem.css("paddingBottom") + " " + elem.css("paddingLeft"); originalPaddingTotalWidth = (parseInt(elem.css("paddingLeft"), 10) || 0) + (parseInt(elem.css("paddingRight"), 10) || 0) } function initialise(s) { var isMaintainingPositon, lastContentX, lastContentY, hasContainingSpaceChanged, originalScrollTop, originalScrollLeft, newPaneWidth, newPaneHeight, maintainAtBottom = false, maintainAtRight = false; settings = s; if (pane === undefined) { originalScrollTop = elem.scrollTop(); originalScrollLeft = elem.scrollLeft(); elem.css({ overflow: "hidden", padding: 0 }); paneWidth = elem.innerWidth() + originalPaddingTotalWidth; paneHeight = elem.innerHeight(); elem.width(paneWidth); pane = $('<div class="jspPane" />').css("padding", originalPadding).append(elem.children()); container = $('<div class="jspContainer" />').css({ width: paneWidth + "px", height: paneHeight + "px" }).append(pane).appendTo(elem) } else { elem.css("width", ""); container.css({ width: "auto", height: "auto" }); pane.css("position", "static"); newPaneWidth = elem.innerWidth() + originalPaddingTotalWidth; newPaneHeight = elem.innerHeight(); pane.css("position", "absolute"); maintainAtBottom = settings.stickToBottom && isCloseToBottom(); maintainAtRight = settings.stickToRight && isCloseToRight(); hasContainingSpaceChanged = newPaneWidth !== paneWidth || newPaneHeight !== paneHeight; paneWidth = newPaneWidth; paneHeight = newPaneHeight; container.css({ width: paneWidth, height: paneHeight }); if (!hasContainingSpaceChanged && previousContentWidth == contentWidth && pane.outerHeight() == contentHeight) { elem.width(paneWidth); return } previousContentWidth = contentWidth; pane.css("width", ""); elem.width(paneWidth); container.find(">.jspVerticalBar,>.jspHorizontalBar").remove().end() } pane.css("overflow", "auto"); if (s.contentWidth) { contentWidth = s.contentWidth } else { contentWidth = pane[0].scrollWidth } contentHeight = pane[0].scrollHeight; pane.css("overflow", ""); percentInViewH = contentWidth / paneWidth; percentInViewV = contentHeight / paneHeight; isScrollableV = percentInViewV > 1 || settings.alwaysShowVScroll; isScrollableH = percentInViewH > 1 || settings.alwaysShowHScroll; if (!(isScrollableH || isScrollableV)) { elem.removeClass("jspScrollable"); pane.css({ top: 0, left: 0, width: container.width() - originalPaddingTotalWidth }); removeMousewheel(); removeFocusHandler(); removeKeyboardNav(); removeClickOnTrack() } else { elem.addClass("jspScrollable"); isMaintainingPositon = settings.maintainPosition && (verticalDragPosition || horizontalDragPosition); if (isMaintainingPositon) { lastContentX = contentPositionX(); lastContentY = contentPositionY() } initialiseVerticalScroll(); initialiseHorizontalScroll(); resizeScrollbars(); if (isMaintainingPositon) { scrollToX(maintainAtRight ? contentWidth - paneWidth : lastContentX, false); scrollToY(maintainAtBottom ? contentHeight - paneHeight : lastContentY, false) } initFocusHandler(); initMousewheel(); initTouch(); if (settings.enableKeyboardNavigation) { initKeyboardNav() } if (settings.clickOnTrack) { initClickOnTrack() } observeHash(); if (settings.hijackInternalLinks) { hijackInternalLinks() } } if (settings.autoReinitialise && !reinitialiseInterval) { reinitialiseInterval = setInterval(function () { initialise(settings) }, settings.autoReinitialiseDelay) } else if (!settings.autoReinitialise && reinitialiseInterval) { clearInterval(reinitialiseInterval) } if (originalScrollTop && elem.scrollTop(0)) { scrollToY(originalScrollTop, false) } if (originalScrollLeft && elem.scrollLeft(0)) { scrollToX(originalScrollLeft, false) } elem.trigger("jsp-initialised", [isScrollableH || isScrollableV]) } function initialiseVerticalScroll() { if (isScrollableV) { container.append($('<div class="jspVerticalBar" />').append($('<div class="jspCap jspCapTop" />'), $('<div class="jspTrack" />').append($('<div class="jspDrag" />').append($('<div class="jspDragTop" />'), $('<div class="jspDragBottom" />'))), $('<div class="jspCap jspCapBottom" />'))); verticalBar = container.find(">.jspVerticalBar"); verticalTrack = verticalBar.find(">.jspTrack"); verticalDrag = verticalTrack.find(">.jspDrag"); if (settings.showArrows) { arrowUp = $('<a class="jspArrow jspArrowUp" />').on("mousedown.jsp", getArrowScroll(0, -1)).on("click.jsp", nil); arrowDown = $('<a class="jspArrow jspArrowDown" />').on("mousedown.jsp", getArrowScroll(0, 1)).on("click.jsp", nil); if (settings.arrowScrollOnHover) { arrowUp.on("mouseover.jsp", getArrowScroll(0, -1, arrowUp)); arrowDown.on("mouseover.jsp", getArrowScroll(0, 1, arrowDown)) } appendArrows(verticalTrack, settings.verticalArrowPositions, arrowUp, arrowDown) } verticalTrackHeight = paneHeight; container.find(">.jspVerticalBar>.jspCap:visible,>.jspVerticalBar>.jspArrow").each(function () { verticalTrackHeight -= $(this).outerHeight() }); verticalDrag.on("mouseenter", function () { verticalDrag.addClass("jspHover") }).on("mouseleave", function () { verticalDrag.removeClass("jspHover") }).on("mousedown.jsp", function (e) { $("html").on("dragstart.jsp selectstart.jsp", nil); verticalDrag.addClass("jspActive"); var startY = e.pageY - verticalDrag.position().top; $("html").on("mousemove.jsp", function (e) { positionDragY(e.pageY - startY, false) }).on("mouseup.jsp mouseleave.jsp", cancelDrag); return false }); sizeVerticalScrollbar() } } function sizeVerticalScrollbar() { verticalTrack.height(verticalTrackHeight + "px"); verticalDragPosition = 0; scrollbarWidth = settings.verticalGutter + verticalTrack.outerWidth(); pane.width(paneWidth - scrollbarWidth - originalPaddingTotalWidth); try { if (verticalBar.position().left === 0) { pane.css("margin-left", scrollbarWidth + "px") } } catch (err) { } } function initialiseHorizontalScroll() { if (isScrollableH) { container.append($('<div class="jspHorizontalBar" />').append($('<div class="jspCap jspCapLeft" />'), $('<div class="jspTrack" />').append($('<div class="jspDrag" />').append($('<div class="jspDragLeft" />'), $('<div class="jspDragRight" />'))), $('<div class="jspCap jspCapRight" />'))); horizontalBar = container.find(">.jspHorizontalBar"); horizontalTrack = horizontalBar.find(">.jspTrack"); horizontalDrag = horizontalTrack.find(">.jspDrag"); if (settings.showArrows) { arrowLeft = $('<a class="jspArrow jspArrowLeft" />').on("mousedown.jsp", getArrowScroll(-1, 0)).on("click.jsp", nil); arrowRight = $('<a class="jspArrow jspArrowRight" />').on("mousedown.jsp", getArrowScroll(1, 0)).on("click.jsp", nil); if (settings.arrowScrollOnHover) { arrowLeft.on("mouseover.jsp", getArrowScroll(-1, 0, arrowLeft)); arrowRight.on("mouseover.jsp", getArrowScroll(1, 0, arrowRight)) } appendArrows(horizontalTrack, settings.horizontalArrowPositions, arrowLeft, arrowRight) } horizontalDrag.on("mouseenter", function () { horizontalDrag.addClass("jspHover") }).on("mouseleave", function () { horizontalDrag.removeClass("jspHover") }).on("mousedown.jsp", function (e) { $("html").on("dragstart.jsp selectstart.jsp", nil); horizontalDrag.addClass("jspActive"); var startX = e.pageX - horizontalDrag.position().left; $("html").on("mousemove.jsp", function (e) { positionDragX(e.pageX - startX, false) }).on("mouseup.jsp mouseleave.jsp", cancelDrag); return false }); horizontalTrackWidth = container.innerWidth(); sizeHorizontalScrollbar() } } function sizeHorizontalScrollbar() { container.find(">.jspHorizontalBar>.jspCap:visible,>.jspHorizontalBar>.jspArrow").each(function () { horizontalTrackWidth -= $(this).outerWidth() }); horizontalTrack.width(horizontalTrackWidth + "px"); horizontalDragPosition = 0 } function resizeScrollbars() { if (isScrollableH && isScrollableV) { var horizontalTrackHeight = horizontalTrack.outerHeight(), verticalTrackWidth = verticalTrack.outerWidth(); verticalTrackHeight -= horizontalTrackHeight; $(horizontalBar).find(">.jspCap:visible,>.jspArrow").each(function () { horizontalTrackWidth += $(this).outerWidth() }); horizontalTrackWidth -= verticalTrackWidth; paneHeight -= verticalTrackWidth; paneWidth -= horizontalTrackHeight; horizontalTrack.parent().append($('<div class="jspCorner" />').css("width", horizontalTrackHeight + "px")); sizeVerticalScrollbar(); sizeHorizontalScrollbar() } if (isScrollableH) { pane.width(container.outerWidth() - originalPaddingTotalWidth + "px") } contentHeight = pane.outerHeight(); percentInViewV = contentHeight / paneHeight; if (isScrollableH) { horizontalDragWidth = Math.ceil(1 / percentInViewH * horizontalTrackWidth); if (horizontalDragWidth > settings.horizontalDragMaxWidth) { horizontalDragWidth = settings.horizontalDragMaxWidth } else if (horizontalDragWidth < settings.horizontalDragMinWidth) { horizontalDragWidth = settings.horizontalDragMinWidth } horizontalDrag.css("width", horizontalDragWidth + "px"); dragMaxX = horizontalTrackWidth - horizontalDragWidth; _positionDragX(horizontalDragPosition) } if (isScrollableV) { verticalDragHeight = Math.ceil(1 / percentInViewV * verticalTrackHeight); if (verticalDragHeight > settings.verticalDragMaxHeight) { verticalDragHeight = settings.verticalDragMaxHeight } else if (verticalDragHeight < settings.verticalDragMinHeight) { verticalDragHeight = settings.verticalDragMinHeight } verticalDrag.css("height", verticalDragHeight + "px"); dragMaxY = verticalTrackHeight - verticalDragHeight; _positionDragY(verticalDragPosition) } } function appendArrows(ele, p, a1, a2) { var p1 = "before", p2 = "after", aTemp; if (p == "os") { p = /Mac/.test(navigator.platform) ? "after" : "split" } if (p == p1) { p2 = p } else if (p == p2) { p1 = p; aTemp = a1; a1 = a2; a2 = aTemp } ele[p1](a1)[p2](a2) } function getArrowScroll(dirX, dirY, ele) { return function () { arrowScroll(dirX, dirY, this, ele); this.blur(); return false } } function arrowScroll(dirX, dirY, arrow, ele) { arrow = $(arrow).addClass("jspActive"); var eve, scrollTimeout, isFirst = true, doScroll = function () { if (dirX !== 0) { jsp.scrollByX(dirX * settings.arrowButtonSpeed) } if (dirY !== 0) { jsp.scrollByY(dirY * settings.arrowButtonSpeed) } scrollTimeout = setTimeout(doScroll, isFirst ? settings.initialDelay : settings.arrowRepeatFreq); isFirst = false }; doScroll(); eve = ele ? "mouseout.jsp" : "mouseup.jsp"; ele = ele || $("html"); ele.on(eve, function () { arrow.removeClass("jspActive"); if (scrollTimeout) { clearTimeout(scrollTimeout) } scrollTimeout = null; ele.off(eve) }) } function initClickOnTrack() { removeClickOnTrack(); if (isScrollableV) { verticalTrack.on("mousedown.jsp", function (e) { if (e.originalTarget === undefined || e.originalTarget == e.currentTarget) { var clickedTrack = $(this), offset = clickedTrack.offset(), direction = e.pageY - offset.top - verticalDragPosition, scrollTimeout, isFirst = true, doScroll = function () { var offset = clickedTrack.offset(), pos = e.pageY - offset.top - verticalDragHeight / 2, contentDragY = paneHeight * settings.scrollPagePercent, dragY = dragMaxY * contentDragY / (contentHeight - paneHeight); if (direction < 0) { if (verticalDragPosition - dragY > pos) { jsp.scrollByY(-contentDragY) } else { positionDragY(pos) } } else if (direction > 0) { if (verticalDragPosition + dragY < pos) { jsp.scrollByY(contentDragY) } else { positionDragY(pos) } } else { cancelClick(); return } scrollTimeout = setTimeout(doScroll, isFirst ? settings.initialDelay : settings.trackClickRepeatFreq); isFirst = false }, cancelClick = function () { if (scrollTimeout) { clearTimeout(scrollTimeout) } scrollTimeout = null; $(document).off("mouseup.jsp", cancelClick) }; doScroll(); $(document).on("mouseup.jsp", cancelClick); return false } }) } if (isScrollableH) { horizontalTrack.on("mousedown.jsp", function (e) { if (e.originalTarget === undefined || e.originalTarget == e.currentTarget) { var clickedTrack = $(this), offset = clickedTrack.offset(), direction = e.pageX - offset.left - horizontalDragPosition, scrollTimeout, isFirst = true, doScroll = function () { var offset = clickedTrack.offset(), pos = e.pageX - offset.left - horizontalDragWidth / 2, contentDragX = paneWidth * settings.scrollPagePercent, dragX = dragMaxX * contentDragX / (contentWidth - paneWidth); if (direction < 0) { if (horizontalDragPosition - dragX > pos) { jsp.scrollByX(-contentDragX) } else { positionDragX(pos) } } else if (direction > 0) { if (horizontalDragPosition + dragX < pos) { jsp.scrollByX(contentDragX) } else { positionDragX(pos) } } else { cancelClick(); return } scrollTimeout = setTimeout(doScroll, isFirst ? settings.initialDelay : settings.trackClickRepeatFreq); isFirst = false }, cancelClick = function () { if (scrollTimeout) { clearTimeout(scrollTimeout) } scrollTimeout = null; $(document).off("mouseup.jsp", cancelClick) }; doScroll(); $(document).on("mouseup.jsp", cancelClick); return false } }) } } function removeClickOnTrack() { if (horizontalTrack) { horizontalTrack.off("mousedown.jsp") } if (verticalTrack) { verticalTrack.off("mousedown.jsp") } } function cancelDrag() { $("html").off("dragstart.jsp selectstart.jsp mousemove.jsp mouseup.jsp mouseleave.jsp"); if (verticalDrag) { verticalDrag.removeClass("jspActive") } if (horizontalDrag) { horizontalDrag.removeClass("jspActive") } } function positionDragY(destY, animate) { if (!isScrollableV) { return } if (destY < 0) { destY = 0 } else if (destY > dragMaxY) { destY = dragMaxY } var willScrollYEvent = new $.Event("jsp-will-scroll-y"); elem.trigger(willScrollYEvent, [destY]); if (willScrollYEvent.isDefaultPrevented()) { return } var tmpVerticalDragPosition = destY || 0; var isAtTop = tmpVerticalDragPosition === 0, isAtBottom = tmpVerticalDragPosition == dragMaxY, percentScrolled = destY / dragMaxY, destTop = -percentScrolled * (contentHeight - paneHeight); if (animate === undefined) { animate = settings.animateScroll } if (animate) { jsp.animate(verticalDrag, "top", destY, _positionDragY, function () { elem.trigger("jsp-user-scroll-y", [-destTop, isAtTop, isAtBottom]) }) } else { verticalDrag.css("top", destY); _positionDragY(destY); elem.trigger("jsp-user-scroll-y", [-destTop, isAtTop, isAtBottom]) } } function _positionDragY(destY) { if (destY === undefined) { destY = verticalDrag.position().top } container.scrollTop(0); verticalDragPosition = destY || 0; var isAtTop = verticalDragPosition === 0, isAtBottom = verticalDragPosition == dragMaxY, percentScrolled = destY / dragMaxY, destTop = -percentScrolled * (contentHeight - paneHeight); if (wasAtTop != isAtTop || wasAtBottom != isAtBottom) { wasAtTop = isAtTop; wasAtBottom = isAtBottom; elem.trigger("jsp-arrow-change", [wasAtTop, wasAtBottom, wasAtLeft, wasAtRight]) } updateVerticalArrows(isAtTop, isAtBottom); pane.css("top", destTop); elem.trigger("jsp-scroll-y", [-destTop, isAtTop, isAtBottom]).trigger("scroll") } function positionDragX(destX, animate) { if (!isScrollableH) { return } if (destX < 0) { destX = 0 } else if (destX > dragMaxX) { destX = dragMaxX } var willScrollXEvent = new $.Event("jsp-will-scroll-x"); elem.trigger(willScrollXEvent, [destX]); if (willScrollXEvent.isDefaultPrevented()) { return } var tmpHorizontalDragPosition = destX || 0; var isAtLeft = tmpHorizontalDragPosition === 0, isAtRight = tmpHorizontalDragPosition == dragMaxX, percentScrolled = destX / dragMaxX, destLeft = -percentScrolled * (contentWidth - paneWidth); if (animate === undefined) { animate = settings.animateScroll } if (animate) { jsp.animate(horizontalDrag, "left", destX, _positionDragX, function () { elem.trigger("jsp-user-scroll-x", [-destLeft, isAtLeft, isAtRight]) }) } else { horizontalDrag.css("left", destX); _positionDragX(destX); elem.trigger("jsp-user-scroll-x", [-destLeft, isAtLeft, isAtRight]) } } function _positionDragX(destX) { if (destX === undefined) { destX = horizontalDrag.position().left } container.scrollTop(0); horizontalDragPosition = destX || 0; var isAtLeft = horizontalDragPosition === 0, isAtRight = horizontalDragPosition == dragMaxX, percentScrolled = destX / dragMaxX, destLeft = -percentScrolled * (contentWidth - paneWidth); if (wasAtLeft != isAtLeft || wasAtRight != isAtRight) { wasAtLeft = isAtLeft; wasAtRight = isAtRight; elem.trigger("jsp-arrow-change", [wasAtTop, wasAtBottom, wasAtLeft, wasAtRight]) } updateHorizontalArrows(isAtLeft, isAtRight); pane.css("left", destLeft); elem.trigger("jsp-scroll-x", [-destLeft, isAtLeft, isAtRight]).trigger("scroll") } function updateVerticalArrows(isAtTop, isAtBottom) { if (settings.showArrows) { arrowUp[isAtTop ? "addClass" : "removeClass"]("jspDisabled"); arrowDown[isAtBottom ? "addClass" : "removeClass"]("jspDisabled") } } function updateHorizontalArrows(isAtLeft, isAtRight) { if (settings.showArrows) { arrowLeft[isAtLeft ? "addClass" : "removeClass"]("jspDisabled"); arrowRight[isAtRight ? "addClass" : "removeClass"]("jspDisabled") } } function scrollToY(destY, animate) { var percentScrolled = destY / (contentHeight - paneHeight); positionDragY(percentScrolled * dragMaxY, animate) } function scrollToX(destX, animate) { var percentScrolled = destX / (contentWidth - paneWidth); positionDragX(percentScrolled * dragMaxX, animate) } function scrollToElement(ele, stickToTop, animate) { var e, eleHeight, eleWidth, eleTop = 0, eleLeft = 0, viewportTop, viewportLeft, maxVisibleEleTop, maxVisibleEleLeft, destY, destX; try { e = $(ele) } catch (err) { return } eleHeight = e.outerHeight(); eleWidth = e.outerWidth(); container.scrollTop(0); container.scrollLeft(0); while (!e.is(".jspPane")) { eleTop += e.position().top; eleLeft += e.position().left; e = e.offsetParent(); if (/^body|html$/i.test(e[0].nodeName)) { return } } viewportTop = contentPositionY(); maxVisibleEleTop = viewportTop + paneHeight; if (eleTop < viewportTop || stickToTop) { destY = eleTop - settings.horizontalGutter } else if (eleTop + eleHeight > maxVisibleEleTop) { destY = eleTop - paneHeight + eleHeight + settings.horizontalGutter } if (!isNaN(destY)) { scrollToY(destY, animate) } viewportLeft = contentPositionX(); maxVisibleEleLeft = viewportLeft + paneWidth; if (eleLeft < viewportLeft || stickToTop) { destX = eleLeft - settings.horizontalGutter } else if (eleLeft + eleWidth > maxVisibleEleLeft) { destX = eleLeft - paneWidth + eleWidth + settings.horizontalGutter } if (!isNaN(destX)) { scrollToX(destX, animate) } } function contentPositionX() { return -pane.position().left } function contentPositionY() { return -pane.position().top } function isCloseToBottom() { var scrollableHeight = contentHeight - paneHeight; return scrollableHeight > 20 && scrollableHeight - contentPositionY() < 10 } function isCloseToRight() { var scrollableWidth = contentWidth - paneWidth; return scrollableWidth > 20 && scrollableWidth - contentPositionX() < 10 } function initMousewheel() { container.off(mwEvent).on(mwEvent, function (event, delta, deltaX, deltaY) { if (!horizontalDragPosition) horizontalDragPosition = 0; if (!verticalDragPosition) verticalDragPosition = 0; var dX = horizontalDragPosition, dY = verticalDragPosition, factor = event.deltaFactor || settings.mouseWheelSpeed; jsp.scrollBy(deltaX * factor, -deltaY * factor, false); return dX == horizontalDragPosition && dY == verticalDragPosition }) } function removeMousewheel() { container.off(mwEvent) } function nil() { return false } function initFocusHandler() { pane.find(":input,a").off("focus.jsp").on("focus.jsp", function (e) { scrollToElement(e.target, false) }) } function removeFocusHandler() { pane.find(":input,a").off("focus.jsp") } function initKeyboardNav() { var keyDown, elementHasScrolled, validParents = []; if (isScrollableH) { validParents.push(horizontalBar[0]) } if (isScrollableV) { validParents.push(verticalBar[0]) } pane.on("focus.jsp", function () { elem.focus() }); elem.attr("tabindex", 0).off("keydown.jsp keypress.jsp").on("keydown.jsp", function (e) { if (e.target !== this && !(validParents.length && $(e.target).closest(validParents).length)) { return } var dX = horizontalDragPosition, dY = verticalDragPosition; switch (e.keyCode) { case 40: case 38: case 34: case 32: case 33: case 39: case 37: keyDown = e.keyCode; keyDownHandler(); break; case 35: scrollToY(contentHeight - paneHeight); keyDown = null; break; case 36: scrollToY(0); keyDown = null; break }elementHasScrolled = e.keyCode == keyDown && dX != horizontalDragPosition || dY != verticalDragPosition; return !elementHasScrolled }).on("keypress.jsp", function (e) { if (e.keyCode == keyDown) { keyDownHandler() } if (e.target !== this && !(validParents.length && $(e.target).closest(validParents).length)) { return } return !elementHasScrolled }); if (settings.hideFocus) { elem.css("outline", "none"); if ("hideFocus" in container[0]) { elem.attr("hideFocus", true) } } else { elem.css("outline", ""); if ("hideFocus" in container[0]) { elem.attr("hideFocus", false) } } function keyDownHandler() { var dX = horizontalDragPosition, dY = verticalDragPosition; switch (keyDown) { case 40: jsp.scrollByY(settings.keyboardSpeed, false); break; case 38: jsp.scrollByY(-settings.keyboardSpeed, false); break; case 34: case 32: jsp.scrollByY(paneHeight * settings.scrollPagePercent, false); break; case 33: jsp.scrollByY(-paneHeight * settings.scrollPagePercent, false); break; case 39: jsp.scrollByX(settings.keyboardSpeed, false); break; case 37: jsp.scrollByX(-settings.keyboardSpeed, false); break }elementHasScrolled = dX != horizontalDragPosition || dY != verticalDragPosition; return elementHasScrolled } } function removeKeyboardNav() { elem.attr("tabindex", "-1").removeAttr("tabindex").off("keydown.jsp keypress.jsp"); pane.off(".jsp") } function observeHash() { if (location.hash && location.hash.length > 1) { var e, retryInt, hash = escape(location.hash.substr(1)); try { e = $("#" + hash + ', a[name="' + hash + '"]') } catch (err) { return } if (e.length && pane.find(hash)) { if (container.scrollTop() === 0) { retryInt = setInterval(function () { if (container.scrollTop() > 0) { scrollToElement(e, true); $(document).scrollTop(container.position().top); clearInterval(retryInt) } }, 50) } else { scrollToElement(e, true); $(document).scrollTop(container.position().top) } } } } function hijackInternalLinks() { if ($(document.body).data("jspHijack")) { return } $(document.body).data("jspHijack", true); $(document.body).delegate('a[href*="#"]', "click", function (event) { var href = this.href.substr(0, this.href.indexOf("#")), locationHref = location.href, hash, element, container, jsp, scrollTop, elementTop; if (location.href.indexOf("#") !== -1) { locationHref = location.href.substr(0, location.href.indexOf("#")) } if (href !== locationHref) { return } hash = escape(this.href.substr(this.href.indexOf("#") + 1)); try { element = $("#" + hash + ', a[name="' + hash + '"]') } catch (e) { return } if (!element.length) { return } container = element.closest(".jspScrollable"); jsp = container.data("jsp"); jsp.scrollToElement(element, true); if (container[0].scrollIntoView) { scrollTop = $(window).scrollTop(); elementTop = element.offset().top; if (elementTop < scrollTop || elementTop > scrollTop + $(window).height()) { container[0].scrollIntoView() } } event.preventDefault() }) } function initTouch() { var startX, startY, touchStartX, touchStartY, moved, moving = false; container.off("touchstart.jsp touchmove.jsp touchend.jsp click.jsp-touchclick").on("touchstart.jsp", function (e) { var touch = e.originalEvent.touches[0]; startX = contentPositionX(); startY = contentPositionY(); touchStartX = touch.pageX; touchStartY = touch.pageY; moved = false; moving = true }).on("touchmove.jsp", function (ev) { if (!moving) { return } var touchPos = ev.originalEvent.touches[0], dX = horizontalDragPosition, dY = verticalDragPosition; jsp.scrollTo(startX + touchStartX - touchPos.pageX, startY + touchStartY - touchPos.pageY); moved = moved || Math.abs(touchStartX - touchPos.pageX) > 5 || Math.abs(touchStartY - touchPos.pageY) > 5; return dX == horizontalDragPosition && dY == verticalDragPosition }).on("touchend.jsp", function (e) { moving = false }).on("click.jsp-touchclick", function (e) { if (moved) { moved = false; return false } }) } function destroy() { var currentY = contentPositionY(), currentX = contentPositionX(); elem.removeClass("jspScrollable").off(".jsp"); pane.off(".jsp"); elem.replaceWith(originalElement.append(pane.children())); originalElement.scrollTop(currentY); originalElement.scrollLeft(currentX); if (reinitialiseInterval) { clearInterval(reinitialiseInterval) } } $.extend(jsp, { reinitialise: function (s) { s = $.extend({}, settings, s); initialise(s) }, scrollToElement: function (ele, stickToTop, animate) { scrollToElement(ele, stickToTop, animate) }, scrollTo: function (destX, destY, animate) { scrollToX(destX, animate); scrollToY(destY, animate) }, scrollToX: function (destX, animate) { scrollToX(destX, animate) }, scrollToY: function (destY, animate) { scrollToY(destY, animate) }, scrollToPercentX: function (destPercentX, animate) { scrollToX(destPercentX * (contentWidth - paneWidth), animate) }, scrollToPercentY: function (destPercentY, animate) { scrollToY(destPercentY * (contentHeight - paneHeight), animate) }, scrollBy: function (deltaX, deltaY, animate) { jsp.scrollByX(deltaX, animate); jsp.scrollByY(deltaY, animate) }, scrollByX: function (deltaX, animate) { var destX = contentPositionX() + Math[deltaX < 0 ? "floor" : "ceil"](deltaX), percentScrolled = destX / (contentWidth - paneWidth); positionDragX(percentScrolled * dragMaxX, animate) }, scrollByY: function (deltaY, animate) { var destY = contentPositionY() + Math[deltaY < 0 ? "floor" : "ceil"](deltaY), percentScrolled = destY / (contentHeight - paneHeight); positionDragY(percentScrolled * dragMaxY, animate) }, positionDragX: function (x, animate) { positionDragX(x, animate) }, positionDragY: function (y, animate) { positionDragY(y, animate) }, animate: function (ele, prop, value, stepCallback, completeCallback) { var params = {}; params[prop] = value; ele.animate(params, { duration: settings.animateDuration, easing: settings.animateEase, queue: false, step: stepCallback, complete: completeCallback }) }, getContentPositionX: function () { return contentPositionX() }, getContentPositionY: function () { return contentPositionY() }, getContentWidth: function () { return contentWidth }, getContentHeight: function () { return contentHeight }, getPercentScrolledX: function () { return contentPositionX() / (contentWidth - paneWidth) }, getPercentScrolledY: function () { return contentPositionY() / (contentHeight - paneHeight) }, getIsScrollableH: function () { return isScrollableH }, getIsScrollableV: function () { return isScrollableV }, getContentPane: function () { return pane }, scrollToBottom: function (animate) { positionDragY(dragMaxY, animate) }, hijackInternalLinks: $.noop, destroy: function () { destroy() } }); initialise(s) } settings = $.extend({}, $.fn.jScrollPane.defaults, settings); $.each(["arrowButtonSpeed", "trackClickSpeed", "keyboardSpeed"], function () { settings[this] = settings[this] || settings.speed }); return this.each(function () { var elem = $(this), jspApi = elem.data("jsp"); if (jspApi) { jspApi.reinitialise(settings) } else { $("script", elem).filter('[type="text/javascript"],:not([type])').remove(); jspApi = new JScrollPane(elem, settings); elem.data("jsp", jspApi) } }) }; $.fn.jScrollPane.defaults = { showArrows: false, maintainPosition: true, stickToBottom: false, stickToRight: false, clickOnTrack: true, autoReinitialise: false, autoReinitialiseDelay: 500, verticalDragMinHeight: 0, verticalDragMaxHeight: 99999, horizontalDragMinWidth: 0, horizontalDragMaxWidth: 99999, contentWidth: undefined, animateScroll: false, animateDuration: 300, animateEase: "linear", hijackInternalLinks: false, verticalGutter: 4, horizontalGutter: 4, mouseWheelSpeed: 3, arrowButtonSpeed: 0, arrowRepeatFreq: 50, arrowScrollOnHover: false, trackClickSpeed: 0, trackClickRepeatFreq: 70, verticalArrowPositions: "split", horizontalArrowPositions: "split", enableKeyboardNavigation: true, hideFocus: false, keyboardSpeed: 0, initialDelay: 300, speed: 30, scrollPagePercent: .8, alwaysShowVScroll: false, alwaysShowHScroll: false } });
/**
* @module αUtil
* @version v1.0.1
* @desc Service functions for α-modules
* @author OXAYAZA {@link https://github.com/OXAYAZA}
* @license CC BY-SA 4.0 {@link https://creativecommons.org/licenses/by-sa/4.0/}
* @see {@link https://www.linkedin.com/in/%D1%8E%D1%80%D0%B8%D0%B9-%D0%B1%D0%B0%D0%B7%D0%B0%D0%B5%D0%B2-166479165/}
*/
function Util() { } Util.inViewport = function (element, cb) { var rect = element.getBoundingClientRect(), inView = rect.top < window.innerHeight && rect.bottom > 0; if (cb instanceof Function && inView) cb(); return inView }; Util.merge = function (sources, options) { options = options || {}; var initial = {}; for (var s = 0; s < sources.length; s++) { var source = sources[s]; if (!source) continue; for (var key in source) { if (options.except && !options.except.indexOf(key)) { continue } else if (source[key] instanceof Object && !(source[key] instanceof Node) && !(source[key] instanceof Function)) { initial[key] = Util.merge([initial[key], source[key]], options) } else if (options.skipNull && source[key] === null) { continue } else { initial[key] = source[key] } } } return initial }; Util.uId = function (length) { var uId = ""; for (var i = 0; i < length; i++) { uId += String.fromCharCode(97 + Math.random() * 25) } return uId };
/**
* @module αCounter
* @version v0.1.1
* @author OXAYAZA {@link https://github.com/OXAYAZA}
* @license CC BY-SA 4.0 {@link https://creativecommons.org/licenses/by-sa/4.0/}
* @requires module:αUtil
* @see {@link https://oxayaza.page.link/gitHub_aCounters}
*/
function aCounter(data) { function Counter(data) { if (!data || !data.node) throw Error('Missing required aCounter parameters (node).'); this.params = Util.merge([this.defaults, data]); this.params.node.counter = this; if (!this.params.to) { try { this.params.to = parseInt(this.params.node.textContent, 10) } catch (error) { throw Error('Unable to get aCounter value') } } this.run = this.run.bind(this); return this } Counter.prototype.internal = { intervalId: null, value: 0, loops: 0, increment: 0, loop: 0 }; Counter.prototype.defaults = { node: null, from: 0, to: null, duration: 3000, refresh: 30, formatter: null, onStart: null, onUpdate: null, onComplete: null }; Counter.prototype.run = function () { clearInterval(this.internal.intervalId); this.internal.value = this.params.from; this.internal.loops = Math.ceil(this.params.duration / this.params.refresh); this.internal.increment = (this.params.to - this.params.from) / this.internal.loops; this.internal.loop = 0; if (this.params.onStart instanceof Function) this.params.onStart.call(this, ~~this.internal.value); this.internal.intervalId = setInterval(this.update.bind(this), this.params.refresh) }; Counter.prototype.update = function () { this.internal.value += this.internal.increment; this.internal.loop++; if (this.params.onUpdate instanceof Function) this.params.onUpdate.call(this, ~~this.internal.value); if (this.internal.loop >= this.internal.loops) { clearInterval(this.internal.intervalId); this.internal.value = this.params.to; if (this.params.onComplete instanceof Function) this.params.onComplete.call(this, ~~this.internal.value) } this.render() }; Counter.prototype.render = function () { if (this.params.formatter instanceof Function) { this.params.node.innerHTML = this.params.formatter.call(this, ~~this.internal.value) } else { this.params.node.innerHTML = ~~this.internal.value } }; return new Counter(data) }
/**
* @module αProgressCircle
* @version v0.1.1
* @author OXAYAZA {@link https://github.com/OXAYAZA}
* @license CC BY-SA 4.0 {@link https://creativecommons.org/licenses/by-sa/4.0/}
* @requires module:αUtil
* @see {@link https://oxayaza.page.link/gitHub_aCounters}
*/
function aProgressCircle(data) { function Circle(data) { if (!data || !data.node) throw Error('Missing required \u03B1ProgressCircle parameters (node).'); this.params = Util.merge([this.defaults, data]); this.params.node.progressCircle = this; this.internal.clipPath = document.createElementNS('http://www.w3.org/2000/svg', 'clipPath'); this.internal.clipPath.id = this.params.clipId; this.params.node.appendChild(this.internal.clipPath); this.internal.path = document.createElementNS('http://www.w3.org/2000/svg', 'path'); this.internal.path.setAttribute('d', this.internal.pathD); this.internal.clipPath.appendChild(this.internal.path); this.internal.clipped = this.params.node.querySelector(this.params.clipped); this.internal.clipped.setAttribute('clip-path', 'url(#' + this.params.clipId + ')'); this.internal.viewBox = this.params.node.getAttribute('viewBox').split(' ').map(function (value) { return parseFloat(value) }); this.internal.ellipse.rx = this.internal.viewBox[2] / 2 * 1.44; this.internal.ellipse.ry = this.internal.viewBox[3] / 2 * 1.44; this.internal.ellipse.cx = this.internal.viewBox[0] + this.internal.viewBox[2] / 2; this.internal.ellipse.cy = this.internal.viewBox[1] + this.internal.viewBox[3] / 2; this.render(this.params.angle) } Circle.prototype.internal = { viewBox: [0, 0, 100, 100], ellipse: { rx: 72, ry: 72, cx: 50, cy: 50 }, x: 0, y: 0, clipped: null, clipPath: null, path: null, pathD: '' }; Circle.prototype.defaults = { node: null, clipped: '.clipped', clipId: Util.uId(8), angle: 0 }; Circle.prototype.calc = function () { this.internal.x = Math.sin(this.params.angle * Math.PI / 180) * this.internal.ellipse.rx + this.internal.ellipse.cx; this.internal.y = -Math.cos(this.params.angle * Math.PI / 180) * this.internal.ellipse.ry + this.internal.ellipse.cy }; Circle.prototype.genPath = function () { if (this.params.angle >= -360 && this.params.angle < -180) { this.internal.pathD = 'M ' + this.internal.ellipse.cx + ' ' + this.internal.ellipse.cy + ' L ' + this.internal.x + ' ' + this.internal.y + ' A ' + this.internal.ellipse.rx + ' ' + this.internal.ellipse.ry + ' 0 0 1 ' + this.internal.ellipse.cx + ' ' + (this.internal.ellipse.cy + this.internal.ellipse.ry) + ' A ' + this.internal.ellipse.rx + ' ' + this.internal.ellipse.ry + ' 0 0 1 ' + this.internal.ellipse.cx + ' ' + (this.internal.ellipse.cy - this.internal.ellipse.ry) } else if (this.params.angle >= -180 && this.params.angle < 0) { this.internal.pathD = 'M ' + this.internal.ellipse.cx + ' ' + this.internal.ellipse.cy + ' L ' + this.internal.x + ' ' + this.internal.y + ' A ' + this.internal.ellipse.rx + ' ' + this.internal.ellipse.ry + ' 0 0 1 ' + this.internal.ellipse.cx + ' ' + (this.internal.ellipse.cy - this.internal.ellipse.ry) } else if (this.params.angle >= 0 && this.params.angle < 180) { this.internal.pathD = 'M ' + this.internal.ellipse.cx + ' ' + this.internal.ellipse.cy + ' L ' + this.internal.ellipse.cx + ' ' + (this.internal.ellipse.cy - this.internal.ellipse.ry) + ' A ' + this.internal.ellipse.rx + ' ' + this.internal.ellipse.ry + ' 0 0 1 ' + this.internal.x + ' ' + this.internal.y } else if (this.params.angle >= 180 && this.params.angle <= 360) { this.internal.pathD = 'M ' + this.internal.ellipse.cx + ' ' + this.internal.ellipse.cy + ' L ' + this.internal.ellipse.cx + ' ' + (this.internal.ellipse.cy - this.internal.ellipse.ry) + ' A ' + this.internal.ellipse.rx + ' ' + this.internal.ellipse.ry + ' 0 0 1 ' + this.internal.ellipse.cx + ' ' + (this.internal.ellipse.cy + this.internal.ellipse.ry) + ' A ' + this.internal.ellipse.rx + ' ' + this.internal.ellipse.ry + ' 0 0 1 ' + this.internal.x + ' ' + this.internal.y } else { this.internal.pathD = 'M ' + this.internal.ellipse.cx + ' ' + (this.internal.ellipse.cy - this.internal.ellipse.ry) + ' A ' + this.internal.ellipse.rx + ' ' + this.internal.ellipse.ry + ' 0 0 1 ' + this.internal.ellipse.cx + ' ' + (this.internal.ellipse.cy + this.internal.ellipse.ry) + ' A ' + this.internal.ellipse.rx + ' ' + this.internal.ellipse.ry + ' 0 0 1 ' + this.internal.ellipse.cx + ' ' + (this.internal.ellipse.cy - this.internal.ellipse.ry) } }; Circle.prototype.render = function (angle) { if (typeof angle === 'number') this.params.angle = angle; this.calc(); this.genPath(); this.internal.path.setAttribute('d', this.internal.pathD) }; return new Circle(data) }
/**
* @module αCountdown
* @version v0.1.1
* @author OXAYAZA {@link https://github.com/OXAYAZA}
* @license CC BY-SA 4.0 {@link https://creativecommons.org/licenses/by-sa/4.0/}
* @requires module:αUtil
* @requires module:αProgressCircle
* @see {@link https://oxayaza.page.link/gitHub_aCounters}
*/
function aCountdown(data) { function Countdown(data) { if (!data || !data.node || typeof data.to === 'undefined') { throw Error('Missing of bad required \u03B1Countdown parameters (node, from, to).') } this.params = Util.merge([this.defaults, data], { skipNull: true }); this.params.node.countdown = this; this.internal.to = Number(new Date(this.params.to)); this.internal.from = this.params.from ? Number(new Date(this.params.from)) : this.internal.to - this.constant.year; for (var key in this.internal.counters) { this.internal.counters[key] = this.params.node.querySelector('[data-counter-' + key + ']') } for (var key in this.internal.circles) { this.internal.circles[key] = this.params.node.querySelector('[data-progress-' + key + ']'); if (this.internal.circles[key]) aProgressCircle({ node: this.internal.circles[key] }) } this.run() } Countdown.prototype.defaults = { from: null, to: null, tick: 1000, count: 'auto', onTick: null }; Countdown.prototype.constant = { second: 1000, minute: 1000 * 60, hour: 1000 * 60 * 60, day: 1000 * 60 * 60 * 24, year: 1000 * 60 * 60 * 24 * 365 }; Countdown.prototype.internal = { from: null, to: null, now: null, counters: { days: null, hours: null, minutes: null, seconds: null }, circles: { days: null, hours: null, minutes: null, seconds: null }, period: { full: null, now: null }, time: { days: null, hours: null, minutes: null, seconds: null }, angle: { days: null, hours: null, minutes: null, seconds: null }, tmp: { days: null, hours: null, minutes: null } }; Countdown.prototype.calc = function () { this.internal.time.days = this.internal.period.now / this.constant.day; this.internal.angle.days = 360 / ~~(this.internal.period.full / this.constant.day) * ~~this.internal.time.days || 0; this.internal.tmp.days = ~~this.internal.time.days * this.constant.day; this.internal.time.hours = (this.internal.period.now - this.internal.tmp.days) / this.constant.hour; this.internal.angle.hours = 360 / 24 * this.internal.time.hours; this.internal.tmp.hours = ~~this.internal.time.hours * this.constant.hour; this.internal.time.minutes = (this.internal.period.now - (this.internal.tmp.days + this.internal.tmp.hours)) / this.constant.minute; this.internal.angle.minutes = 360 / 60 * this.internal.time.minutes; this.internal.tmp.minutes = ~~this.internal.time.minutes * this.constant.minute; this.internal.time.seconds = (this.internal.period.now - (this.internal.tmp.days + this.internal.tmp.hours + this.internal.tmp.minutes)) / this.constant.second; this.internal.angle.seconds = 360 / 60 * this.internal.time.seconds }; Countdown.prototype.mode = function () { this.internal.now = Number(new Date); if (this.internal.to > this.internal.now && ['auto', 'until'].indexOf(this.params.count) > -1) { this.internal.period.full = this.internal.to - this.internal.from; this.internal.period.now = this.internal.to - this.internal.now } else if (this.internal.to < this.internal.now && ['auto', 'since'].indexOf(this.params.count) > -1) { this.internal.period.full = this.internal.to - this.internal.from; this.internal.period.now = this.internal.now - this.internal.to } }; Countdown.prototype.render = function () { this.mode(); this.calc(); for (var key in this.internal.counters) { if (this.internal.counters[key]) this.internal.counters[key].innerText = ~~this.internal.time[key]; if (this.internal.circles[key]) this.internal.circles[key].progressCircle.render(this.internal.angle[key]) } }; Countdown.prototype.run = function () { this.render(); setInterval(function () { this.render(); if (this.params.onTick instanceof Function) this.params.onTick.call(this) }.bind(this), this.params.tick) }; return new Countdown(data) }