";
var s = !1,
i = !1;
_.maxDate !== !1 && (s = W.strtodate(_.maxDate), s = new Date(s.getFullYear(), s.getMonth(), s.getDate(), 23, 59, 59, 999)), _.minDate !== !1 && (i = W.strtodate(_.minDate), i = new Date(i.getFullYear(), i.getMonth(), i.getDate()));
for (var d, u, c, l = []; a < W.currentTime.getDaysInMonth() || n.getDay() != _.dayOfWeekStart || W.currentTime.getMonth() == n.getMonth();) l = [], a++, d = n.getDate(), u = n.getFullYear(), c = n.getMonth(), l.push("xdsoft_date"), (s !== !1 && n > s || i !== !1 && n < i) && l.push("xdsoft_disabled"), W.currentTime.getMonth() != c && l.push("xdsoft_other_month"), (_.defaultSelect || M.data("changed")) && W.currentTime.dateFormat("d.m.Y") == n.dateFormat("d.m.Y") && l.push("xdsoft_current"), r.dateFormat("d.m.Y") == n.dateFormat("d.m.Y") && l.push("xdsoft_today"), (0 == n.getDay() || 6 == n.getDay() || ~_.weekends.indexOf(n.dateFormat("d.m.Y"))) && l.push("xdsoft_weekend"), _.beforeShowDay && "function" == typeof _.beforeShowDay && l.push(_.beforeShowDay(n)), t += '
' + d + "
", n.getDay() == _.dayOfWeekStartPrev && (t += "
"), n.setDate(d + 1);
t += "
", F.html(t), O.find(".xdsoft_label span").eq(0).text(_.i18n[_.lang].months[W.currentTime.getMonth()]), O.find(".xdsoft_label span").eq(1).text(W.currentTime.getFullYear());
var f = "",
m = "",
c = "",
h = function(e, t) {
var n = W.now();
n.setHours(e), e = parseInt(n.getHours()), n.setMinutes(t), t = parseInt(n.getMinutes()), l = [], (_.maxTime !== !1 && W.strtotime(_.maxTime).getTime() < n.getTime() || _.minTime !== !1 && W.strtotime(_.minTime).getTime() > n.getTime()) && l.push("xdsoft_disabled"), (_.initTime || _.defaultSelect || M.data("changed")) && parseInt(W.currentTime.getHours()) == parseInt(e) && (_.step > 59 || Math[_.roundTime](W.currentTime.getMinutes() / _.step) * _.step == parseInt(t)) && (_.defaultSelect || M.data("changed") ? l.push("xdsoft_current") : _.initTime && l.push("xdsoft_init_time")), parseInt(r.getHours()) == parseInt(e) && parseInt(r.getMinutes()) == parseInt(t) && l.push("xdsoft_today"), f += '
' + n.dateFormat(_.formatTime) + "
"
};
if (_.allowTimes && e.isArray(_.allowTimes) && _.allowTimes.length)
for (var a = 0; a < _.allowTimes.length; a++) m = W.strtotime(_.allowTimes[a]).getHours(), c = W.strtotime(_.allowTimes[a]).getMinutes(), h(m, c);
else
for (var a = 0, o = 0; a < (_.hours12 ? 12 : 24); a++)
for (o = 0; o < 60; o += _.step) m = (a < 10 ? "0" : "") + a, c = (o < 10 ? "0" : "") + o, h(m, c);
H.html(f);
var g = "",
a = 0;
for (a = parseInt(_.yearStart, 10) + _.yearOffset; a <= parseInt(_.yearEnd, 10) + _.yearOffset; a++) g += '
' + a + "
";
for (A.children().eq(0).html(g), a = 0, g = ""; a <= 11; a++) g += '
' + _.i18n[_.lang].months[a] + "
";
P.children().eq(0).html(g), e(this).trigger("generate.xdsoft")
}, 10), t.stopPropagation()
}).on("afterOpen.xdsoft", function() {
if (_.timepicker) {
var e;
if (H.find(".xdsoft_current").length ? e = ".xdsoft_current" : H.find(".xdsoft_init_time").length && (e = ".xdsoft_init_time"), e) {
var t = C[0].clientHeight,
n = H[0].offsetHeight,
a = H.find(e).index() * _.timeHeightInTimePicker + 1;
n - t < a && (a = n - t), H.css("marginTop", "-" + parseInt(a) + "px"), C.trigger("scroll_element.xdsoft_scroller", [parseInt(a) / (n - t)])
}
}
});
var J = 0;
F.on("click.xdsoft", "td", function(n) {
n.stopPropagation(), J++;
var a = e(this),
r = W.currentTime;
return !a.hasClass("xdsoft_disabled") && (r.setDate(a.data("date")), r.setMonth(a.data("month")), r.setFullYear(a.data("year")), M.trigger("select.xdsoft", [r]), t.val(W.str()), (J > 1 || _.closeOnDateSelect === !0 || 0 === _.closeOnDateSelect && !_.timepicker) && !_.inline && M.trigger("close.xdsoft"), _.onSelectDate && _.onSelectDate.call && _.onSelectDate.call(M, W.currentTime, M.data("input")), M.data("changed", !0), M.trigger("xchange.xdsoft"), M.trigger("changedatetime.xdsoft"), void setTimeout(function() {
J = 0
}, 200))
}), H.on("click.xdsoft", "div", function(t) {
t.stopPropagation();
var n = e(this),
a = W.currentTime;
return !n.hasClass("xdsoft_disabled") && (a.setHours(n.data("hour")), a.setMinutes(n.data("minute")), M.trigger("select.xdsoft", [a]), M.data("input").val(W.str()), !_.inline && M.trigger("close.xdsoft"), _.onSelectTime && _.onSelectTime.call && _.onSelectTime.call(M, W.currentTime, M.data("input")), M.data("changed", !0), M.trigger("xchange.xdsoft"), void M.trigger("changedatetime.xdsoft"))
}), M.mousewheel && S.mousewheel(function(e, t, n, a) {
return !_.scrollMonth || (t < 0 ? W.nextMonth() : W.prevMonth(), !1)
}), M.mousewheel && C.unmousewheel().mousewheel(function(e, t, n, a) {
if (!_.scrollTime) return !0;
var r = C[0].clientHeight,
o = H[0].offsetHeight,
s = Math.abs(parseInt(H.css("marginTop"))),
i = !0;
return t < 0 && o - r - _.timeHeightInTimePicker >= s ? (H.css("marginTop", "-" + (s + _.timeHeightInTimePicker) + "px"), i = !1) : t > 0 && s - _.timeHeightInTimePicker >= 0 && (H.css("marginTop", "-" + (s - _.timeHeightInTimePicker) + "px"), i = !1), C.trigger("scroll_element.xdsoft_scroller", [Math.abs(parseInt(H.css("marginTop")) / (o - r))]), e.stopPropagation(), i
}), M.on("changedatetime.xdsoft", function() {
if (_.onChangeDateTime && _.onChangeDateTime.call) {
var e = M.data("input");
_.onChangeDateTime.call(M, W.currentTime, e), e.trigger("change")
}
}).on("generate.xdsoft", function() {
_.onGenerate && _.onGenerate.call && _.onGenerate.call(M, W.currentTime, M.data("input"))
});
var j = 0;
t.mousewheel && t.mousewheel(function(e, n, a, r) {
return !_.scrollInput || (!_.datepicker && _.timepicker ? (j = H.find(".xdsoft_current").length ? H.find(".xdsoft_current").eq(0).index() : 0, j + n >= 0 && j + n < H.children().length && (j += n), H.children().eq(j).length && H.children().eq(j).trigger("mousedown"), !1) : _.datepicker && !_.timepicker ? (S.trigger(e, [n, a, r]), t.val && t.val(W.str()), M.trigger("changedatetime.xdsoft"), !1) : void 0)
});
var L = function() {
var t = M.data("input").offset(),
n = t.top + M.data("input")[0].offsetHeight - 1,
a = t.left;
n + M[0].offsetHeight > e(window).height() + e(window).scrollTop() && (n = t.top - M[0].offsetHeight + 1), n < 0 && (n = 0), a + M[0].offsetWidth > e(window).width() && (a = t.left - M[0].offsetWidth + M.data("input")[0].offsetWidth), M.css({
left: a,
top: n
})
};
M.on("open.xdsoft", function() {
var t = !0;
_.onShow && _.onShow.call && (t = _.onShow.call(M, W.currentTime, M.data("input"))), t !== !1 && (M.show(), M.trigger("afterOpen.xdsoft"), L(), e(window).off("resize.xdsoft", L).on("resize.xdsoft", L), _.closeOnWithoutClick && e([document.body, window]).on("mousedown.xdsoft", function n() {
M.trigger("close.xdsoft"), e([document.body, window]).off("mousedown.xdsoft", n)
}))
}).on("close.xdsoft", function(e) {
var t = !0;
_.onClose && _.onClose.call && (t = _.onClose.call(M, W.currentTime, M.data("input"))), t === !1 || _.opened || _.inline || M.hide(), e.stopPropagation()
}).data("input", t);
var E = 0;
M.data("xdsoft_datetime", W), M.setOptions(_), W.setCurrentTime(n()), M.trigger("afterOpen.xdsoft"), t.data("xdsoft_datetimepicker", M).on("open.xdsoft focusin.xdsoft mousedown.xdsoft", function(e) {
t.is(":disabled") || t.is(":hidden") || !t.is(":visible") || (clearTimeout(E), E = setTimeout(function() {
t.is(":disabled") || t.is(":hidden") || !t.is(":visible") || (W.setCurrentTime(n()), M.trigger("open.xdsoft"))
}, 100))
}).on("keydown.xdsoft", function(t) {
var n = (this.value, t.which);
switch (!0) {
case !!~[u].indexOf(n):
var a = e("input:visible,textarea:visible");
return M.trigger("close.xdsoft"), a.eq(a.index(this) + 1).focus(), !1;
case !!~[p].indexOf(n):
return M.trigger("close.xdsoft"), !0
}
})
},
O = function(t) {
var n = t.data("xdsoft_datetimepicker");
n && (n.data("xdsoft_datetime", null), n.remove(), t.data("xdsoft_datetimepicker", null).off("open.xdsoft focusin.xdsoft focusout.xdsoft mousedown.xdsoft blur.xdsoft keydown.xdsoft"), e(window).off("resize.xdsoft"), e([window, document.body]).off("mousedown.xdsoft"), t.unmousewheel && t.unmousewheel())
};
return e(document).off("keydown.xdsoftctrl keyup.xdsoftctrl").on("keydown.xdsoftctrl", function(e) {
e.keyCode == i && (b = !0)
}).on("keyup.xdsoftctrl", function(e) {
e.keyCode == i && (b = !1)
}), this.each(function() {
var t;
if (t = e(this).data("xdsoft_datetimepicker")) {
if ("string" === e.type(n)) switch (n) {
case "show":
e(this).select().focus(), t.trigger("open.xdsoft");
break;
case "hide":
t.trigger("close.xdsoft");
break;
case "destroy":
O(e(this));
break;
case "reset":
this.value = this.defaultValue, this.value && t.data("xdsoft_datetime").isValidDate(Date.parseDate(this.value, _.format)) || t.data("changed", !1), t.data("xdsoft_datetime").setCurrentTime(this.value)
} else t.setOptions(n);
return 0
}
"string" !== e.type(n) && (!_.lazyInit || _.open || _.inline ? S(e(this)) : k(e(this)))
})
}
}(jQuery), Date.parseFunctions = {
count: 0
}, Date.parseRegexes = [], Date.formatFunctions = {
count: 0
}, Date.prototype.dateFormat = function(e) {
if ("unixtime" == e) return parseInt(this.getTime() / 1e3);
null == Date.formatFunctions[e] && Date.createNewFormat(e);
var t = Date.formatFunctions[e];
return this[t]()
}, Date.createNewFormat = function(format) {
var funcName = "format" + Date.formatFunctions.count++;
Date.formatFunctions[format] = funcName;
for (var code = "Date.prototype." + funcName + " = function() {return ", special = !1, ch = "", i = 0; i < format.length; ++i) ch = format.charAt(i), special || "\\" != ch ? special ? (special = !1, code += "'" + String.escape(ch) + "' + ") : code += Date.getFormatCode(ch) : special = !0;
eval(code.substring(0, code.length - 3) + ";}")
}, Date.getFormatCode = function(e) {
switch (e) {
case "d":
return "String.leftPad(this.getDate(), 2, '0') + ";
case "D":
return "Date.dayNames[this.getDay()].substring(0, 3) + ";
case "j":
return "this.getDate() + ";
case "l":
return "Date.dayNames[this.getDay()] + ";
case "S":
return "this.getSuffix() + ";
case "w":
return "this.getDay() + ";
case "z":
return "this.getDayOfYear() + ";
case "W":
return "this.getWeekOfYear() + ";
case "F":
return "Date.monthNames[this.getMonth()] + ";
case "m":
return "String.leftPad(this.getMonth() + 1, 2, '0') + ";
case "M":
return "Date.monthNames[this.getMonth()].substring(0, 3) + ";
case "n":
return "(this.getMonth() + 1) + ";
case "t":
return "this.getDaysInMonth() + ";
case "L":
return "(this.isLeapYear() ? 1 : 0) + ";
case "Y":
return "this.getFullYear() + ";
case "y":
return "('' + this.getFullYear()).substring(2, 4) + ";
case "a":
return "(this.getHours() < 12 ? 'am' : 'pm') + ";
case "A":
return "(this.getHours() < 12 ? 'AM' : 'PM') + ";
case "g":
return "((this.getHours() %12) ? this.getHours() % 12 : 12) + ";
case "G":
return "this.getHours() + ";
case "h":
return "String.leftPad((this.getHours() %12) ? this.getHours() % 12 : 12, 2, '0') + ";
case "H":
return "String.leftPad(this.getHours(), 2, '0') + ";
case "i":
return "String.leftPad(this.getMinutes(), 2, '0') + ";
case "s":
return "String.leftPad(this.getSeconds(), 2, '0') + ";
case "O":
return "this.getGMTOffset() + ";
case "T":
return "this.getTimezone() + ";
case "Z":
return "(this.getTimezoneOffset() * -60) + ";
default:
return "'" + String.escape(e) + "' + "
}
}, Date.parseDate = function(e, t) {
if ("unixtime" == t) return new Date(isNaN(parseInt(e)) ? 0 : 1e3 * parseInt(e));
null == Date.parseFunctions[t] && Date.createParser(t);
var n = Date.parseFunctions[t];
return Date[n](e)
}, Date.createParser = function(format) {
var funcName = "parse" + Date.parseFunctions.count++,
regexNum = Date.parseRegexes.length,
currentGroup = 1;
Date.parseFunctions[format] = funcName;
for (var code = "Date." + funcName + " = function(input) {\nvar y = -1, m = -1, d = -1, h = -1, i = -1, s = -1, z = -1;\nvar d = new Date();\ny = d.getFullYear();\nm = d.getMonth();\nd = d.getDate();\nvar results = input.match(Date.parseRegexes[" + regexNum + "]);\nif (results && results.length > 0) {", regex = "", special = !1, ch = "", i = 0; i < format.length; ++i) ch = format.charAt(i), special || "\\" != ch ? special ? (special = !1, regex += String.escape(ch)) : (obj = Date.formatCodeToRegex(ch, currentGroup), currentGroup += obj.g, regex += obj.s, obj.g && obj.c && (code += obj.c)) : special = !0;
code += "if (y > 0 && z > 0){\nvar doyDate = new Date(y,0);\ndoyDate.setDate(z);\nm = doyDate.getMonth();\nd = doyDate.getDate();\n}", code += "if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0)\n{return new Date(y, m, d, h, i, s);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0)\n{return new Date(y, m, d, h, i);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0)\n{return new Date(y, m, d, h);}\nelse if (y > 0 && m >= 0 && d > 0)\n{return new Date(y, m, d);}\nelse if (y > 0 && m >= 0)\n{return new Date(y, m);}\nelse if (y > 0)\n{return new Date(y);}\n}return null;}", Date.parseRegexes[regexNum] = new RegExp("^" + regex + "$"), eval(code)
}, Date.formatCodeToRegex = function(e, t) {
switch (e) {
case "D":
return {
g: 0, c: null, s: "(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)"
};
case "j":
case "d":
return {
g: 1, c: "d = parseInt(results[" + t + "], 10);\n", s: "(\\d{1,2})"
};
case "l":
return {
g: 0, c: null, s: "(?:" + Date.dayNames.join("|") + ")"
};
case "S":
return {
g: 0, c: null, s: "(?:st|nd|rd|th)"
};
case "w":
return {
g: 0, c: null, s: "\\d"
};
case "z":
return {
g: 1, c: "z = parseInt(results[" + t + "], 10);\n", s: "(\\d{1,3})"
};
case "W":
return {
g: 0, c: null, s: "(?:\\d{2})"
};
case "F":
return {
g: 1, c: "m = parseInt(Date.monthNumbers[results[" + t + "].substring(0, 3)], 10);\n", s: "(" + Date.monthNames.join("|") + ")"
};
case "M":
return {
g: 1, c: "m = parseInt(Date.monthNumbers[results[" + t + "]], 10);\n", s: "(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)"
};
case "n":
case "m":
return {
g: 1, c: "m = parseInt(results[" + t + "], 10) - 1;\n", s: "(\\d{1,2})"
};
case "t":
return {
g: 0, c: null, s: "\\d{1,2}"
};
case "L":
return {
g: 0, c: null, s: "(?:1|0)"
};
case "Y":
return {
g: 1, c: "y = parseInt(results[" + t + "], 10);\n", s: "(\\d{4})"
};
case "y":
return {
g: 1, c: "var ty = parseInt(results[" + t + "], 10);\ny = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n", s: "(\\d{1,2})"
};
case "a":
return {
g: 1, c: "if (results[" + t + "] == 'am') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}", s: "(am|pm)"
};
case "A":
return {
g: 1, c: "if (results[" + t + "] == 'AM') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}", s: "(AM|PM)"
};
case "g":
case "G":
case "h":
case "H":
return {
g: 1, c: "h = parseInt(results[" + t + "], 10);\n", s: "(\\d{1,2})"
};
case "i":
return {
g: 1, c: "i = parseInt(results[" + t + "], 10);\n", s: "(\\d{2})"
};
case "s":
return {
g: 1, c: "s = parseInt(results[" + t + "], 10);\n", s: "(\\d{2})"
};
case "O":
return {
g: 0, c: null, s: "[+-]\\d{4}"
};
case "T":
return {
g: 0, c: null, s: "[A-Z]{3}"
};
case "Z":
return {
g: 0, c: null, s: "[+-]\\d{1,5}"
};
default:
return {
g: 0, c: null, s: String.escape(e)
}
}
}, Date.prototype.getTimezone = function() {
return this.toString().replace(/^.*? ([A-Z]{3}) [0-9]{4}.*$/, "$1").replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/, "$1$2$3")
}, Date.prototype.getGMTOffset = function() {
return (this.getTimezoneOffset() > 0 ? "-" : "+") + String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset()) / 60), 2, "0") + String.leftPad(Math.abs(this.getTimezoneOffset()) % 60, 2, "0")
}, Date.prototype.getDayOfYear = function() {
var e = 0;
Date.daysInMonth[1] = this.isLeapYear() ? 29 : 28;
for (var t = 0; t < this.getMonth(); ++t) e += Date.daysInMonth[t];
return e + this.getDate()
}, Date.prototype.getWeekOfYear = function() {
var e = this.getDayOfYear() + (4 - this.getDay()),
t = new Date(this.getFullYear(), 0, 1),
n = 7 - t.getDay() + 4;
return String.leftPad(Math.ceil((e - n) / 7) + 1, 2, "0")
}, Date.prototype.isLeapYear = function() {
var e = this.getFullYear();
return 0 == (3 & e) && (e % 100 || e % 400 == 0 && e)
}, Date.prototype.getFirstDayOfMonth = function() {
var e = (this.getDay() - (this.getDate() - 1)) % 7;
return e < 0 ? e + 7 : e
}, Date.prototype.getLastDayOfMonth = function() {
var e = (this.getDay() + (Date.daysInMonth[this.getMonth()] - this.getDate())) % 7;
return e < 0 ? e + 7 : e
}, Date.prototype.getDaysInMonth = function() {
return Date.daysInMonth[1] = this.isLeapYear() ? 29 : 28, Date.daysInMonth[this.getMonth()]
}, Date.prototype.getSuffix = function() {
switch (this.getDate()) {
case 1:
case 21:
case 31:
return "st";
case 2:
case 22:
return "nd";
case 3:
case 23:
return "rd";
default:
return "th"
}
}, String.escape = function(e) {
return e.replace(/('|\\)/g, "\\$1")
}, String.leftPad = function(e, t, n) {
var a = new String(e);
for (null == n && (n = " "); a.length < t;) a = n + a;
return a
}, Date.daysInMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Date.monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], Date.dayNames = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], Date.y2kYear = 50, Date.monthNumbers = {
Jan: 0,
Feb: 1,
Mar: 2,
Apr: 3,
May: 4,
Jun: 5,
Jul: 6,
Aug: 7,
Sep: 8,
Oct: 9,
Nov: 10,
Dec: 11
}, Date.patterns = {
ISO8601LongPattern: "Y-m-d H:i:s",
ISO8601ShortPattern: "Y-m-d",
ShortDatePattern: "n/j/Y",
LongDatePattern: "l, F d, Y",
FullDateTimePattern: "l, F d, Y g:i:s A",
MonthDayPattern: "F d",
ShortTimePattern: "g:i A",
LongTimePattern: "g:i:s A",
SortableDateTimePattern: "Y-m-d\\TH:i:s",
UniversalSortableDateTimePattern: "Y-m-d H:i:sO",
YearMonthPattern: "F, Y"
},
function(e) {
"function" == typeof define && define.amd ? define(["jquery.flot.min"], e) : "object" == typeof exports ? module.exports = e : e(jQuery)
}(function(e) {
function t(t) {
var r, o = t || window.event,
s = [].slice.call(arguments, 1),
i = 0,
d = 0,
u = 0,
c = 0,
l = 0;
return t = e.event.fix(o), t.type = "mousewheel", o.wheelDelta && (i = o.wheelDelta), o.detail && (i = o.detail * -1), o.deltaY && (u = o.deltaY * -1, i = u), o.deltaX && (d = o.deltaX, i = d * -1), void 0 !== o.wheelDeltaY && (u = o.wheelDeltaY), void 0 !== o.wheelDeltaX && (d = o.wheelDeltaX * -1), c = Math.abs(i), (!n || c < n) && (n = c), l = Math.max(Math.abs(u), Math.abs(d)), (!a || l < a) && (a = l), r = i > 0 ? "floor" : "ceil", i = Math[r](i / n), d = Math[r](d / a), u = Math[r](u / a), s.unshift(t, i, d, u), (e.event.dispatch || e.event.handle).apply(this, s)
}
var n, a, r = ["wheel", "mousewheel", "DOMMouseScroll", "MozMousePixelScroll"],
o = "onwheel" in document || document.documentMode >= 9 ? ["wheel"] : ["mousewheel", "DomMouseScroll", "MozMousePixelScroll"];
if (e.event.fixHooks)
for (var s = r.length; s;) e.event.fixHooks[r[--s]] = e.event.mouseHooks;
e.event.special.mousewheel = {
setup: function() {
if (this.addEventListener)
for (var e = o.length; e;) this.addEventListener(o[--e], t, !1);
else this.onmousewheel = t
},
teardown: function() {
if (this.removeEventListener)
for (var e = o.length; e;) this.removeEventListener(o[--e], t, !1);
else this.onmousewheel = null
}
}, e.fn.extend({
mousewheel: function(e) {
return e ? this.bind("mousewheel", e) : this.trigger("mousewheel")
},
unmousewheel: function(e) {
return this.unbind("mousewheel", e)
}
})
});
function _toConsumableArray(e) {
if (Array.isArray(e)) {
for (var t = 0, i = Array(e.length); t < e.length; t++) i[t] = e[t];
return i
}
return Array.from(e)
}
var _slice = Array.prototype.slice,
_slicedToArray = function() {
function e(e, t) {
var i = [],
n = !0,
r = !1,
s = void 0;
try {
for (var a, o = e[Symbol.iterator](); !(n = (a = o.next()).done) && (i.push(a.value), !t || i.length !== t); n = !0);
} catch (l) {
r = !0, s = l
} finally {
try {
!n && o["return"] && o["return"]()
} finally {
if (r) throw s
}
}
return i
}
return function(t, i) {
if (Array.isArray(t)) return t;
if (Symbol.iterator in Object(t)) return e(t, i);
throw new TypeError("Invalid attempt to destructure non-iterable instance")
}
}(),
_extends = Object.assign || function(e) {
for (var t = 1; t < arguments.length; t++) {
var i = arguments[t];
for (var n in i) Object.prototype.hasOwnProperty.call(i, n) && (e[n] = i[n])
}
return e
};
! function(e, t) {
"object" == typeof exports && "undefined" != typeof module ? module.exports = t(require("jquery")) : "function" == typeof define && define.amd ? define(["jquery"], t) : e.parsley = t(e.jQuery)
}(this, function(e) {
"use strict";
function t(e, t) {
return e.parsleyAdaptedCallback || (e.parsleyAdaptedCallback = function() {
var i = Array.prototype.slice.call(arguments, 0);
i.unshift(this), e.apply(t || T, i)
}), e.parsleyAdaptedCallback
}
function i(e) {
return 0 === e.lastIndexOf(D, 0) ? e.substr(D.length) : e
}
function n() {
var t = this,
i = window || global;
_extends(this, {
isNativeEvent: function(e) {
return e.originalEvent && e.originalEvent.isTrusted !== !1
},
fakeInputEvent: function(i) {
t.isNativeEvent(i) && e(i.target).trigger("input")
},
misbehaves: function(i) {
t.isNativeEvent(i) && (t.behavesOk(i), e(document).on("change.inputevent", i.data.selector, t.fakeInputEvent), t.fakeInputEvent(i))
},
behavesOk: function(i) {
t.isNativeEvent(i) && e(document).off("input.inputevent", i.data.selector, t.behavesOk).off("change.inputevent", i.data.selector, t.misbehaves)
},
install: function() {
if (!i.inputEventPatched) {
i.inputEventPatched = "0.0.3";
for (var n = ["select", 'input[type="checkbox"]', 'input[type="radio"]', 'input[type="file"]'], r = 0; r < n.length; r++) {
var s = n[r];
e(document).on("input.inputevent", s, {
selector: s
}, t.behavesOk).on("change.inputevent", s, {
selector: s
}, t.misbehaves)
}
}
},
uninstall: function() {
delete i.inputEventPatched, e(document).off(".inputevent")
}
})
}
var r = 1,
s = {},
a = {
attr: function(e, t, i) {
var n, r, s, a = new RegExp("^" + t, "i");
if ("undefined" == typeof i) i = {};
else
for (n in i) i.hasOwnProperty(n) && delete i[n];
if (!e) return i;
for (s = e.attributes, n = s.length; n--;) r = s[n], r && r.specified && a.test(r.name) && (i[this.camelize(r.name.slice(t.length))] = this.deserializeValue(r.value));
return i
},
checkAttr: function(e, t, i) {
return e.hasAttribute(t + i)
},
setAttr: function(e, t, i, n) {
e.setAttribute(this.dasherize(t + i), String(n))
},
generateID: function() {
return "" + r++
},
deserializeValue: function(t) {
var i;
try {
return t ? "true" == t || "false" != t && ("null" == t ? null : isNaN(i = Number(t)) ? /^[\[\{]/.test(t) ? e.parseJSON(t) : t : i) : t
} catch (n) {
return t
}
},
camelize: function(e) {
return e.replace(/-+(.)?/g, function(e, t) {
return t ? t.toUpperCase() : ""
})
},
dasherize: function(e) {
return e.replace(/::/g, "/").replace(/([A-Z]+)([A-Z][a-z])/g, "$1_$2").replace(/([a-z\d])([A-Z])/g, "$1_$2").replace(/_/g, "-").toLowerCase()
},
warn: function() {
var e;
window.console && "function" == typeof window.console.warn && (e = window.console).warn.apply(e, arguments)
},
warnOnce: function(e) {
s[e] || (s[e] = !0, this.warn.apply(this, arguments))
},
_resetWarnings: function() {
s = {}
},
trimString: function(e) {
return e.replace(/^\s+|\s+$/g, "")
},
parse: {
date: function S(e) {
var t = e.match(/^(\d{4,})-(\d\d)-(\d\d)$/);
if (!t) return null;
var i = t.map(function(e) {
return parseInt(e, 10)
}),
n = _slicedToArray(i, 4),
r = (n[0], n[1]),
s = n[2],
a = n[3],
S = new Date(r, s - 1, a);
return S.getFullYear() !== r || S.getMonth() + 1 !== s || S.getDate() !== a ? null : S
},
string: function(e) {
return e
},
integer: function(e) {
return isNaN(e) ? null : parseInt(e, 10)
},
number: function(e) {
if (isNaN(e)) throw null;
return parseFloat(e)
},
"boolean": function(e) {
return !/^\s*false\s*$/i.test(e)
},
object: function(e) {
return a.deserializeValue(e)
},
regexp: function(e) {
var t = "";
return /^\/.*\/(?:[gimy]*)$/.test(e) ? (t = e.replace(/.*\/([gimy]*)$/, "$1"), e = e.replace(new RegExp("^/(.*?)/" + t + "$"), "$1")) : e = "^" + e + "$", new RegExp(e, t)
}
},
parseRequirement: function(e, t) {
var i = this.parse[e || "string"];
if (!i) throw 'Unknown requirement specification: "' + e + '"';
var n = i(t);
if (null === n) throw "Requirement is not a " + e + ': "' + t + '"';
return n
},
namespaceEvents: function(t, i) {
return t = this.trimString(t || "").split(/\s+/), t[0] ? e.map(t, function(e) {
return e + "." + i
}).join(" ") : ""
},
difference: function(t, i) {
var n = [];
return e.each(t, function(e, t) {
i.indexOf(t) == -1 && n.push(t)
}), n
},
all: function(t) {
return e.when.apply(e, _toConsumableArray(t).concat([42, 42]))
},
objectCreate: Object.create || function() {
var e = function() {};
return function(t) {
if (arguments.length > 1) throw Error("Second argument not supported");
if ("object" != typeof t) throw TypeError("Argument must be an object");
e.prototype = t;
var i = new e;
return e.prototype = null, i
}
}(),
_SubmitSelector: 'input[type="submit"], button:submit'
},
o = {
namespace: "data-parsley-",
inputs: "input, textarea, select",
excluded: "input[type=button], input[type=submit], input[type=reset], input[type=hidden]",
priorityEnabled: !0,
multiple: null,
group: null,
uiEnabled: !0,
validationThreshold: 3,
focus: "first",
trigger: !1,
triggerAfterFailure: "input",
errorClass: "parsley-error",
successClass: "parsley-success",
classHandler: function(e) {},
errorsContainer: function(e) {},
errorsWrapper: '
',
errorTemplate: ""
},
l = function() {
this.__id__ = a.generateID()
};
l.prototype = {
asyncSupport: !0,
_pipeAccordingToValidationResult: function() {
var t = this,
i = function() {
var i = e.Deferred();
return !0 !== t.validationResult && i.reject(), i.resolve().promise()
};
return [i, i]
},
actualizeOptions: function() {
return a.attr(this.element, this.options.namespace, this.domOptions), this.parent && this.parent.actualizeOptions && this.parent.actualizeOptions(), this
},
_resetOptions: function(e) {
this.domOptions = a.objectCreate(this.parent.options), this.options = a.objectCreate(this.domOptions);
for (var t in e) e.hasOwnProperty(t) && (this.options[t] = e[t]);
this.actualizeOptions()
},
_listeners: null,
on: function(e, t) {
this._listeners = this._listeners || {};
var i = this._listeners[e] = this._listeners[e] || [];
return i.push(t), this
},
subscribe: function(t, i) {
e.listenTo(this, t.toLowerCase(), i)
},
off: function(e, t) {
var i = this._listeners && this._listeners[e];
if (i)
if (t)
for (var n = i.length; n--;) i[n] === t && i.splice(n, 1);
else delete this._listeners[e];
return this
},
unsubscribe: function(t, i) {
e.unsubscribeTo(this, t.toLowerCase())
},
trigger: function(e, t, i) {
t = t || this;
var n, r = this._listeners && this._listeners[e];
if (r)
for (var s = r.length; s--;)
if (n = r[s].call(t, t, i), n === !1) return n;
return !this.parent || this.parent.trigger(e, t, i)
},
asyncIsValid: function(e, t) {
return a.warnOnce("asyncIsValid is deprecated; please use whenValid instead"), this.whenValid({
group: e,
force: t
})
},
_findRelated: function() {
return this.options.multiple ? e(this.parent.element.querySelectorAll("[" + this.options.namespace + 'multiple="' + this.options.multiple + '"]')) : this.$element
}
};
var u = function(e, t) {
var i = e.match(/^\s*\[(.*)\]\s*$/);
if (!i) throw 'Requirement is not an array: "' + e + '"';
var n = i[1].split(",").map(a.trimString);
if (n.length !== t) throw "Requirement has " + n.length + " values when " + t + " are needed";
return n
},
d = function(e, t, i) {
var n = null,
r = {};
for (var s in e)
if (s) {
var o = i(s);
"string" == typeof o && (o = a.parseRequirement(e[s], o)), r[s] = o
} else n = a.parseRequirement(e[s], t);
return [n, r]
},
h = function(t) {
e.extend(!0, this, t)
};
h.prototype = {
validate: function(e, t) {
if (this.fn) return arguments.length > 3 && (t = [].slice.call(arguments, 1, -1)), this.fn(e, t);
if (Array.isArray(e)) {
if (!this.validateMultiple) throw "Validator `" + this.name + "` does not handle multiple values";
return this.validateMultiple.apply(this, arguments)
}
var i = arguments[arguments.length - 1];
if (this.validateDate && i._isDateInput()) return arguments[0] = a.parse.date(arguments[0]), null !== arguments[0] && this.validateDate.apply(this, arguments);
if (this.validateNumber) return !isNaN(e) && (arguments[0] = parseFloat(arguments[0]), this.validateNumber.apply(this, arguments));
if (this.validateString) return this.validateString.apply(this, arguments);
throw "Validator `" + this.name + "` only handles multiple values"
},
parseRequirements: function(t, i) {
if ("string" != typeof t) return Array.isArray(t) ? t : [t];
var n = this.requirementType;
if (Array.isArray(n)) {
for (var r = u(t, n.length), s = 0; s < r.length; s++) r[s] = a.parseRequirement(n[s], r[s]);
return r
}
return e.isPlainObject(n) ? d(n, t, i) : [a.parseRequirement(n, t)]
},
requirementType: "string",
priority: 2
};
var p = function(e, t) {
this.__class__ = "ValidatorRegistry", this.locale = "en", this.init(e || {}, t || {})
},
c = {
email: /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,
number: /^-?(\d*\.)?\d+(e[-+]?\d+)?$/i,
integer: /^-?\d+$/,
digits: /^\d+$/,
alphanum: /^\w+$/i,
date: {
test: function(e) {
return null !== a.parse.date(e)
}
},
url: new RegExp("^(?:(?:https?|ftp)://)?(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:/\\S*)?$", "i")
};
c.range = c.number;
var f = function(e) {
var t = ("" + e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);
return t ? Math.max(0, (t[1] ? t[1].length : 0) - (t[2] ? +t[2] : 0)) : 0
},
m = function(e, t) {
return t.map(a.parse[e])
},
g = function(e, t) {
return function(i) {
for (var n = arguments.length, r = Array(n > 1 ? n - 1 : 0), s = 1; s < n; s++) r[s - 1] = arguments[s];
return r.pop(), t.apply(void 0, [i].concat(_toConsumableArray(m(e, r))))
}
},
v = function(e) {
return {
validateDate: g("date", e),
validateNumber: g("number", e),
requirementType: e.length <= 2 ? "string" : ["string", "string"],
priority: 30
}
};
p.prototype = {
init: function(e, t) {
this.catalog = t, this.validators = _extends({}, this.validators);
for (var i in e) this.addValidator(i, e[i].fn, e[i].priority);
window.Parsley.trigger("parsley:validator:init")
},
setLocale: function(e) {
if ("undefined" == typeof this.catalog[e]) throw new Error(e + " is not available in the catalog");
return this.locale = e, this
},
addCatalog: function(e, t, i) {
return "object" == typeof t && (this.catalog[e] = t), !0 === i ? this.setLocale(e) : this
},
addMessage: function(e, t, i) {
return "undefined" == typeof this.catalog[e] && (this.catalog[e] = {}), this.catalog[e][t] = i, this
},
addMessages: function(e, t) {
for (var i in t) this.addMessage(e, i, t[i]);
return this
},
addValidator: function(e, t, i) {
if (this.validators[e]) a.warn('Validator "' + e + '" is already defined.');
else if (o.hasOwnProperty(e)) return void a.warn('"' + e + '" is a restricted keyword and is not a valid validator name.');
return this._setValidator.apply(this, arguments)
},
updateValidator: function(e, t, i) {
return this.validators[e] ? this._setValidator.apply(this, arguments) : (a.warn('Validator "' + e + '" is not already defined.'), this.addValidator.apply(this, arguments))
},
removeValidator: function(e) {
return this.validators[e] || a.warn('Validator "' + e + '" is not defined.'), delete this.validators[e], this
},
_setValidator: function(e, t, i) {
"object" != typeof t && (t = {
fn: t,
priority: i
}), t.validate || (t = new h(t)), this.validators[e] = t;
for (var n in t.messages || {}) this.addMessage(n, e, t.messages[n]);
return this
},
getErrorMessage: function(e) {
var t;
if ("type" === e.name) {
var i = this.catalog[this.locale][e.name] || {};
t = i[e.requirements]
} else t = this.formatMessage(this.catalog[this.locale][e.name], e.requirements);
return t || this.catalog[this.locale].defaultMessage || this.catalog.en.defaultMessage
},
formatMessage: function(e, t) {
if ("object" == typeof t) {
for (var i in t) e = this.formatMessage(e, t[i]);
return e
}
return "string" == typeof e ? e.replace(/%s/i, t) : ""
},
validators: {
notblank: {
validateString: function(e) {
return /\S/.test(e)
},
priority: 2
},
required: {
validateMultiple: function(e) {
return e.length > 0
},
validateString: function(e) {
return /\S/.test(e)
},
priority: 512
},
type: {
validateString: function(e, t) {
var i = arguments.length <= 2 || void 0 === arguments[2] ? {} : arguments[2],
n = i.step,
r = void 0 === n ? "any" : n,
s = i.base,
a = void 0 === s ? 0 : s,
o = c[t];
if (!o) throw new Error("validator type `" + t + "` is not supported");
if (!o.test(e)) return !1;
if ("number" === t && !/^any$/i.test(r || "")) {
var l = Number(e),
u = Math.max(f(r), f(a));
if (f(l) > u) return !1;
var d = function(e) {
return Math.round(e * Math.pow(10, u))
};
if ((d(l) - d(a)) % d(r) != 0) return !1
}
return !0
},
requirementType: {
"": "string",
step: "string",
base: "number"
},
priority: 256
},
pattern: {
validateString: function(e, t) {
return t.test(e)
},
requirementType: "regexp",
priority: 64
},
minlength: {
validateString: function(e, t) {
return e.length >= t
},
requirementType: "integer",
priority: 30
},
maxlength: {
validateString: function(e, t) {
return e.length <= t
},
requirementType: "integer",
priority: 30
},
length: {
validateString: function(e, t, i) {
return e.length >= t && e.length <= i
},
requirementType: ["integer", "integer"],
priority: 30
},
mincheck: {
validateMultiple: function(e, t) {
return e.length >= t
},
requirementType: "integer",
priority: 30
},
maxcheck: {
validateMultiple: function(e, t) {
return e.length <= t
},
requirementType: "integer",
priority: 30
},
check: {
validateMultiple: function(e, t, i) {
return e.length >= t && e.length <= i
},
requirementType: ["integer", "integer"],
priority: 30
},
min: v(function(e, t) {
return e >= t
}),
max: v(function(e, t) {
return e <= t
}),
range: v(function(e, t, i) {
return e >= t && e <= i
}),
equalto: {
validateString: function(t, i) {
var n = e(i);
return n.length ? t === n.val() : t === i
},
priority: 256
}
}
};
var y = {},
_ = function k(e, t, i) {
for (var n = [], r = [], s = 0; s < e.length; s++) {
for (var a = !1, o = 0; o < t.length; o++)
if (e[s].assert.name === t[o].assert.name) {
a = !0;
break
} a ? r.push(e[s]) : n.push(e[s])
}
return {
kept: r,
added: n,
removed: i ? [] : k(t, e, !0).added
}
};
y.Form = {
_actualizeTriggers: function() {
var e = this;
this.$element.on("submit.Parsley", function(t) {
e.onSubmitValidate(t)
}), this.$element.on("click.Parsley", a._SubmitSelector, function(t) {
e.onSubmitButton(t)
}), !1 !== this.options.uiEnabled && this.element.setAttribute("novalidate", "")
},
focus: function() {
if (this._focusedField = null, !0 === this.validationResult || "none" === this.options.focus) return null;
for (var e = 0; e < this.fields.length; e++) {
var t = this.fields[e];
if (!0 !== t.validationResult && t.validationResult.length > 0 && "undefined" == typeof t.options.noFocus && (this._focusedField = t.$element, "first" === this.options.focus)) break
}
return null === this._focusedField ? null : this._focusedField.focus()
},
_destroyUI: function() {
this.$element.off(".Parsley")
}
}, y.Field = {
_reflowUI: function() {
if (this._buildUI(), this._ui) {
var e = _(this.validationResult, this._ui.lastValidationResult);
this._ui.lastValidationResult = this.validationResult, this._manageStatusClass(), this._manageErrorsMessages(e), this._actualizeTriggers(), !e.kept.length && !e.added.length || this._failedOnce || (this._failedOnce = !0, this._actualizeTriggers())
}
},
getErrorsMessages: function() {
if (!0 === this.validationResult) return [];
for (var e = [], t = 0; t < this.validationResult.length; t++) e.push(this.validationResult[t].errorMessage || this._getErrorMessage(this.validationResult[t].assert));
return e
},
addError: function(e) {
var t = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1],
i = t.message,
n = t.assert,
r = t.updateClass,
s = void 0 === r || r;
this._buildUI(), this._addError(e, {
message: i,
assert: n
}), s && this._errorClass()
},
updateError: function(e) {
var t = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1],
i = t.message,
n = t.assert,
r = t.updateClass,
s = void 0 === r || r;
this._buildUI(), this._updateError(e, {
message: i,
assert: n
}), s && this._errorClass()
},
removeError: function(e) {
var t = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1],
i = t.updateClass,
n = void 0 === i || i;
this._buildUI(), this._removeError(e), n && this._manageStatusClass()
},
_manageStatusClass: function() {
this.hasConstraints() && this.needsValidation() && !0 === this.validationResult ? this._successClass() : this.validationResult.length > 0 ? this._errorClass() : this._resetClass()
},
_manageErrorsMessages: function(t) {
if ("undefined" == typeof this.options.errorsMessagesDisabled) {
if ("undefined" != typeof this.options.errorMessage) return t.added.length || t.kept.length ? (this._insertErrorWrapper(), 0 === this._ui.$errorsWrapper.find(".parsley-custom-error-message").length && this._ui.$errorsWrapper.append(e(this.options.errorTemplate).addClass("parsley-custom-error-message")), this._ui.$errorsWrapper.addClass("filled").find(".parsley-custom-error-message").html(this.options.errorMessage)) : this._ui.$errorsWrapper.removeClass("filled").find(".parsley-custom-error-message").remove();
for (var i = 0; i < t.removed.length; i++) this._removeError(t.removed[i].assert.name);
for (i = 0; i < t.added.length; i++) this._addError(t.added[i].assert.name, {
message: t.added[i].errorMessage,
assert: t.added[i].assert
});
for (i = 0; i < t.kept.length; i++) this._updateError(t.kept[i].assert.name, {
message: t.kept[i].errorMessage,
assert: t.kept[i].assert
})
}
},
_addError: function(t, i) {
var n = i.message,
r = i.assert;
this._insertErrorWrapper(), this._ui.$errorsWrapper.addClass("filled").append(e(this.options.errorTemplate).addClass("parsley-" + t).html(n || this._getErrorMessage(r)))
},
_updateError: function(e, t) {
var i = t.message,
n = t.assert;
this._ui.$errorsWrapper.addClass("filled").find(".parsley-" + e).html(i || this._getErrorMessage(n))
},
_removeError: function(e) {
this._ui.$errorsWrapper.removeClass("filled").find(".parsley-" + e).remove()
},
_getErrorMessage: function(e) {
var t = e.name + "Message";
return "undefined" != typeof this.options[t] ? window.Parsley.formatMessage(this.options[t], e.requirements) : window.Parsley.getErrorMessage(e)
},
_buildUI: function() {
if (!this._ui && !1 !== this.options.uiEnabled) {
var t = {};
this.element.setAttribute(this.options.namespace + "id", this.__id__), t.$errorClassHandler = this._manageClassHandler(), t.errorsWrapperId = "parsley-id-" + (this.options.multiple ? "multiple-" + this.options.multiple : this.__id__), t.$errorsWrapper = e(this.options.errorsWrapper).attr("id", t.errorsWrapperId), t.lastValidationResult = [], t.validationInformationVisible = !1, this._ui = t
}
},
_manageClassHandler: function() {
if ("string" == typeof this.options.classHandler) return 0 === e(this.options.classHandler).length && ParsleyUtils.warn("No elements found that match the selector `" + this.options.classHandler + "` set in options.classHandler or data-parsley-class-handler"), e(this.options.classHandler);
if ("function" == typeof this.options.classHandler) var t = this.options.classHandler.call(this, this);
return "undefined" != typeof t && t.length ? t : this._inputHolder()
},
_inputHolder: function() {
return this.options.multiple && "SELECT" !== this.element.nodeName ? this.$element.parent() : this.$element
},
_insertErrorWrapper: function() {
var t;
if (0 !== this._ui.$errorsWrapper.parent().length) return this._ui.$errorsWrapper.parent();
if ("string" == typeof this.options.errorsContainer) {
if (e(this.options.errorsContainer).length) return e(this.options.errorsContainer).append(this._ui.$errorsWrapper);
a.warn("The errors container `" + this.options.errorsContainer + "` does not exist in DOM")
} else "function" == typeof this.options.errorsContainer && (t = this.options.errorsContainer.call(this, this));
return "undefined" != typeof t && t.length ? t.append(this._ui.$errorsWrapper) : this._inputHolder().after(this._ui.$errorsWrapper)
},
_actualizeTriggers: function() {
var e, t = this,
i = this._findRelated();
i.off(".Parsley"), this._failedOnce ? i.on(a.namespaceEvents(this.options.triggerAfterFailure, "Parsley"), function() {
t._validateIfNeeded()
}) : (e = a.namespaceEvents(this.options.trigger, "Parsley")) && i.on(e, function(e) {
t._validateIfNeeded(e)
})
},
_validateIfNeeded: function(e) {
var t = this;
e && /key|input/.test(e.type) && (!this._ui || !this._ui.validationInformationVisible) && this.getValue().length <= this.options.validationThreshold || (this.options.debounce ? (window.clearTimeout(this._debounced), this._debounced = window.setTimeout(function() {
return t.validate()
}, this.options.debounce)) : this.validate())
},
_resetUI: function() {
this._failedOnce = !1, this._actualizeTriggers(), "undefined" != typeof this._ui && (this._ui.$errorsWrapper.removeClass("filled").children().remove(), this._resetClass(), this._ui.lastValidationResult = [], this._ui.validationInformationVisible = !1)
},
_destroyUI: function() {
this._resetUI(), "undefined" != typeof this._ui && this._ui.$errorsWrapper.remove(), delete this._ui
},
_successClass: function() {
this._ui.validationInformationVisible = !0, this._ui.$errorClassHandler.removeClass(this.options.errorClass).addClass(this.options.successClass)
},
_errorClass: function() {
this._ui.validationInformationVisible = !0, this._ui.$errorClassHandler.removeClass(this.options.successClass).addClass(this.options.errorClass)
},
_resetClass: function() {
this._ui.$errorClassHandler.removeClass(this.options.successClass).removeClass(this.options.errorClass)
}
};
var w = function(t, i, n) {
this.__class__ = "Form", this.element = t, this.$element = e(t), this.domOptions = i, this.options = n, this.parent = window.Parsley, this.fields = [], this.validationResult = null
},
b = {
pending: null,
resolved: !0,
rejected: !1
};
w.prototype = {
onSubmitValidate: function(e) {
var t = this;
if (!0 !== e.parsley) {
var i = this._submitSource || this.$element.find(a._SubmitSelector)[0];
if (this._submitSource = null, this.$element.find(".parsley-synthetic-submit-button").prop("disabled", !0), !i || null === i.getAttribute("formnovalidate")) {
window.Parsley._remoteCache = {};
var n = this.whenValidate({
event: e
});
"resolved" === n.state() && !1 !== this._trigger("submit") || (e.stopImmediatePropagation(), e.preventDefault(), "pending" === n.state() && n.done(function() {
t._submit(i)
}))
}
}
},
onSubmitButton: function(e) {
this._submitSource = e.currentTarget
},
_submit: function(t) {
if (!1 !== this._trigger("submit")) {
if (t) {
var i = this.$element.find(".parsley-synthetic-submit-button").prop("disabled", !1);
0 === i.length && (i = e('').appendTo(this.$element)), i.attr({
name: t.getAttribute("name"),
value: t.getAttribute("value")
})
}
this.$element.trigger(_extends(e.Event("submit"), {
parsley: !0
}))
}
},
validate: function(t) {
if (arguments.length >= 1 && !e.isPlainObject(t)) {
a.warnOnce("Calling validate on a parsley form without passing arguments as an object is deprecated.");
var i = _slice.call(arguments),
n = i[0],
r = i[1],
s = i[2];
t = {
group: n,
force: r,
event: s
}
}
return b[this.whenValidate(t).state()]
},
whenValidate: function() {
var t, i = this,
n = arguments.length <= 0 || void 0 === arguments[0] ? {} : arguments[0],
r = n.group,
s = n.force,
o = n.event;
this.submitEvent = o, o && (this.submitEvent = _extends({}, o, {
preventDefault: function() {
a.warnOnce("Using `this.submitEvent.preventDefault()` is deprecated; instead, call `this.validationResult = false`"), i.validationResult = !1
}
})), this.validationResult = !0, this._trigger("validate"), this._refreshFields();
var l = this._withoutReactualizingFormOptions(function() {
return e.map(i.fields, function(e) {
return e.whenValidate({
force: s,
group: r
})
})
});
return (t = a.all(l).done(function() {
i._trigger("success")
}).fail(function() {
i.validationResult = !1, i.focus(), i._trigger("error")
}).always(function() {
i._trigger("validated")
})).pipe.apply(t, _toConsumableArray(this._pipeAccordingToValidationResult()))
},
isValid: function(t) {
if (arguments.length >= 1 && !e.isPlainObject(t)) {
a.warnOnce("Calling isValid on a parsley form without passing arguments as an object is deprecated.");
var i = _slice.call(arguments),
n = i[0],
r = i[1];
t = {
group: n,
force: r
}
}
return b[this.whenValid(t).state()]
},
whenValid: function() {
var t = this,
i = arguments.length <= 0 || void 0 === arguments[0] ? {} : arguments[0],
n = i.group,
r = i.force;
this._refreshFields();
var s = this._withoutReactualizingFormOptions(function() {
return e.map(t.fields, function(e) {
return e.whenValid({
group: n,
force: r
})
})
});
return a.all(s)
},
reset: function() {
for (var e = 0; e < this.fields.length; e++) this.fields[e].reset();
this._trigger("reset")
},
destroy: function() {
this._destroyUI();
for (var e = 0; e < this.fields.length; e++) this.fields[e].destroy();
this.$element.removeData("Parsley"), this._trigger("destroy")
},
_refreshFields: function() {
return this.actualizeOptions()._bindFields()
},
_bindFields: function() {
var t = this,
i = this.fields;
return this.fields = [], this.fieldsMappedById = {}, this._withoutReactualizingFormOptions(function() {
t.$element.find(t.options.inputs).not(t.options.excluded).each(function(e, i) {
var n = new window.Parsley.Factory(i, {}, t);
if (("Field" === n.__class__ || "FieldMultiple" === n.__class__) && !0 !== n.options.excluded) {
var r = n.__class__ + "-" + n.__id__;
"undefined" == typeof t.fieldsMappedById[r] && (t.fieldsMappedById[r] = n, t.fields.push(n))
}
}), e.each(a.difference(i, t.fields), function(e, t) {
t.reset()
})
}), this
},
_withoutReactualizingFormOptions: function(e) {
var t = this.actualizeOptions;
this.actualizeOptions = function() {
return this
};
var i = e();
return this.actualizeOptions = t, i
},
_trigger: function(e) {
return this.trigger("form:" + e)
}
};
var F = function(e, t, i, n, r) {
var s = window.Parsley._validatorRegistry.validators[t],
a = new h(s);
n = n || e.options[t + "Priority"] || a.priority, r = !0 === r, _extends(this, {
validator: a,
name: t,
requirements: i,
priority: n,
isDomConstraint: r
}), this._parseRequirements(e.options)
},
C = function(e) {
var t = e[0].toUpperCase();
return t + e.slice(1)
};
F.prototype = {
validate: function(e, t) {
var i;
return (i = this.validator).validate.apply(i, [e].concat(_toConsumableArray(this.requirementList), [t]))
},
_parseRequirements: function(e) {
var t = this;
this.requirementList = this.validator.parseRequirements(this.requirements, function(i) {
return e[t.name + C(i)]
})
}
};
var E = function(t, i, n, r) {
this.__class__ = "Field", this.element = t, this.$element = e(t), "undefined" != typeof r && (this.parent = r), this.options = n, this.domOptions = i, this.constraints = [], this.constraintsByName = {}, this.validationResult = !0, this._bindConstraints()
},
A = {
pending: null,
resolved: !0,
rejected: !1
};
E.prototype = {
validate: function(t) {
arguments.length >= 1 && !e.isPlainObject(t) && (a.warnOnce("Calling validate on a parsley field without passing arguments as an object is deprecated."), t = {
options: t
});
var i = this.whenValidate(t);
if (!i) return !0;
switch (i.state()) {
case "pending":
return null;
case "resolved":
return !0;
case "rejected":
return this.validationResult
}
},
whenValidate: function() {
var e, t = this,
i = arguments.length <= 0 || void 0 === arguments[0] ? {} : arguments[0],
n = i.force,
r = i.group;
if (this.refreshConstraints(), !r || this._isInGroup(r)) return this.value = this.getValue(), this._trigger("validate"), (e = this.whenValid({
force: n,
value: this.value,
_refreshed: !0
}).always(function() {
t._reflowUI()
}).done(function() {
t._trigger("success")
}).fail(function() {
t._trigger("error")
}).always(function() {
t._trigger("validated")
})).pipe.apply(e, _toConsumableArray(this._pipeAccordingToValidationResult()))
},
hasConstraints: function() {
return 0 !== this.constraints.length
},
needsValidation: function(e) {
return "undefined" == typeof e && (e = this.getValue()), !(!e.length && !this._isRequired() && "undefined" == typeof this.options.validateIfEmpty)
},
_isInGroup: function(t) {
return Array.isArray(this.options.group) ? -1 !== e.inArray(t, this.options.group) : this.options.group === t
},
isValid: function(t) {
if (arguments.length >= 1 && !e.isPlainObject(t)) {
a.warnOnce("Calling isValid on a parsley field without passing arguments as an object is deprecated.");
var i = _slice.call(arguments),
n = i[0],
r = i[1];
t = {
force: n,
value: r
}
}
var s = this.whenValid(t);
return !s || A[s.state()]
},
whenValid: function() {
var t = this,
i = arguments.length <= 0 || void 0 === arguments[0] ? {} : arguments[0],
n = i.force,
r = void 0 !== n && n,
s = i.value,
o = i.group,
l = i._refreshed;
if (l || this.refreshConstraints(), !o || this._isInGroup(o)) {
if (this.validationResult = !0, !this.hasConstraints()) return e.when();
if ("undefined" != typeof s && null !== s || (s = this.getValue()), !this.needsValidation(s) && !0 !== r) return e.when();
var u = this._getGroupedConstraints(),
d = [];
return e.each(u, function(i, n) {
var r = a.all(e.map(n, function(e) {
return t._validateConstraint(s, e)
}));
if (d.push(r), "rejected" === r.state()) return !1
}), a.all(d)
}
},
_validateConstraint: function(t, i) {
var n = this,
r = i.validate(t, this);
return !1 === r && (r = e.Deferred().reject()), a.all([r]).fail(function(e) {
n.validationResult instanceof Array || (n.validationResult = []), n.validationResult.push({
assert: i,
errorMessage: "string" == typeof e && e
})
})
},
getValue: function() {
var e;
return e = "function" == typeof this.options.value ? this.options.value(this) : "undefined" != typeof this.options.value ? this.options.value : this.$element.val(), "undefined" == typeof e || null === e ? "" : this._handleWhitespace(e)
},
reset: function() {
return this._resetUI(), this._trigger("reset")
},
destroy: function() {
this._destroyUI(), this.$element.removeData("Parsley"), this.$element.removeData("FieldMultiple"), this._trigger("destroy")
},
refreshConstraints: function() {
return this.actualizeOptions()._bindConstraints()
},
addConstraint: function(e, t, i, n) {
if (window.Parsley._validatorRegistry.validators[e]) {
var r = new F(this, e, t, i, n);
"undefined" !== this.constraintsByName[r.name] && this.removeConstraint(r.name), this.constraints.push(r), this.constraintsByName[r.name] = r
}
return this
},
removeConstraint: function(e) {
for (var t = 0; t < this.constraints.length; t++)
if (e === this.constraints[t].name) {
this.constraints.splice(t, 1);
break
} return delete this.constraintsByName[e], this
},
updateConstraint: function(e, t, i) {
return this.removeConstraint(e).addConstraint(e, t, i)
},
_bindConstraints: function() {
for (var e = [], t = {}, i = 0; i < this.constraints.length; i++) !1 === this.constraints[i].isDomConstraint && (e.push(this.constraints[i]), t[this.constraints[i].name] = this.constraints[i]);
this.constraints = e, this.constraintsByName = t;
for (var n in this.options) this.addConstraint(n, this.options[n], void 0, !0);
return this._bindHtml5Constraints()
},
_bindHtml5Constraints: function() {
null !== this.element.getAttribute("required") && this.addConstraint("required", !0, void 0, !0), null !== this.element.getAttribute("pattern") && this.addConstraint("pattern", this.element.getAttribute("pattern"), void 0, !0);
var e = this.element.getAttribute("min"),
t = this.element.getAttribute("max");
null !== e && null !== t ? this.addConstraint("range", [e, t], void 0, !0) : null !== e ? this.addConstraint("min", e, void 0, !0) : null !== t && this.addConstraint("max", t, void 0, !0), null !== this.element.getAttribute("minlength") && null !== this.element.getAttribute("maxlength") ? this.addConstraint("length", [this.element.getAttribute("minlength"), this.element.getAttribute("maxlength")], void 0, !0) : null !== this.element.getAttribute("minlength") ? this.addConstraint("minlength", this.element.getAttribute("minlength"), void 0, !0) : null !== this.element.getAttribute("maxlength") && this.addConstraint("maxlength", this.element.getAttribute("maxlength"), void 0, !0);
var i = this.element.type;
return "number" === i ? this.addConstraint("type", ["number", {
step: this.element.getAttribute("step") || "1",
base: e || this.element.getAttribute("value")
}], void 0, !0) : /^(email|url|range|date)$/i.test(i) ? this.addConstraint("type", i, void 0, !0) : this
},
_isRequired: function() {
return "undefined" != typeof this.constraintsByName.required && !1 !== this.constraintsByName.required.requirements
},
_trigger: function(e) {
return this.trigger("field:" + e)
},
_handleWhitespace: function(e) {
return !0 === this.options.trimValue && a.warnOnce('data-parsley-trim-value="true" is deprecated, please use data-parsley-whitespace="trim"'), "squish" === this.options.whitespace && (e = e.replace(/\s{2,}/g, " ")), "trim" !== this.options.whitespace && "squish" !== this.options.whitespace && !0 !== this.options.trimValue || (e = a.trimString(e)), e
},
_isDateInput: function() {
var e = this.constraintsByName.type;
return e && "date" === e.requirements
},
_getGroupedConstraints: function() {
if (!1 === this.options.priorityEnabled) return [this.constraints];
for (var e = [], t = {}, i = 0; i < this.constraints.length; i++) {
var n = this.constraints[i].priority;
t[n] || e.push(t[n] = []), t[n].push(this.constraints[i])
}
return e.sort(function(e, t) {
return t[0].priority - e[0].priority
}), e
}
};
var x = E,
$ = function() {
this.__class__ = "FieldMultiple"
};
$.prototype = {
addElement: function(e) {
return this.$elements.push(e), this
},
refreshConstraints: function() {
var t;
if (this.constraints = [], "SELECT" === this.element.nodeName) return this.actualizeOptions()._bindConstraints(), this;
for (var i = 0; i < this.$elements.length; i++)
if (e("html").has(this.$elements[i]).length) {
t = this.$elements[i].data("FieldMultiple").refreshConstraints().constraints;
for (var n = 0; n < t.length; n++) this.addConstraint(t[n].name, t[n].requirements, t[n].priority, t[n].isDomConstraint)
} else this.$elements.splice(i, 1);
return this
},
getValue: function() {
if ("function" == typeof this.options.value) return this.options.value(this);
if ("undefined" != typeof this.options.value) return this.options.value;
if ("INPUT" === this.element.nodeName) {
if ("radio" === this.element.type) return this._findRelated().filter(":checked").val() || "";
if ("checkbox" === this.element.type) {
var t = [];
return this._findRelated().filter(":checked").each(function() {
t.push(e(this).val())
}), t
}
}
return "SELECT" === this.element.nodeName && null === this.$element.val() ? [] : this.$element.val()
},
_init: function() {
return this.$elements = [this.$element], this
}
};
var P = function(t, i, n) {
this.element = t, this.$element = e(t);
var r = this.$element.data("Parsley");
if (r) return "undefined" != typeof n && r.parent === window.Parsley && (r.parent = n, r._resetOptions(r.options)), "object" == typeof i && _extends(r.options, i), r;
if (!this.$element.length) throw new Error("You must bind Parsley on an existing element.");
if ("undefined" != typeof n && "Form" !== n.__class__) throw new Error("Parent instance must be a Form instance");
return this.parent = n || window.Parsley, this.init(i)
};
P.prototype = {
init: function(e) {
return this.__class__ = "Parsley", this.__version__ = "2.7.2", this.__id__ = a.generateID(), this._resetOptions(e), "FORM" === this.element.nodeName || a.checkAttr(this.element, this.options.namespace, "validate") && !this.$element.is(this.options.inputs) ? this.bind("parsleyForm") : this.isMultiple() ? this.handleMultiple() : this.bind("parsleyField")
},
isMultiple: function() {
return "radio" === this.element.type || "checkbox" === this.element.type || "SELECT" === this.element.nodeName && null !== this.element.getAttribute("multiple")
},
handleMultiple: function() {
var t, i, n = this;
if (this.options.multiple = this.options.multiple || (t = this.element.getAttribute("name")) || this.element.getAttribute("id"), "SELECT" === this.element.nodeName && null !== this.element.getAttribute("multiple")) return this.options.multiple = this.options.multiple || this.__id__, this.bind("parsleyFieldMultiple");
if (!this.options.multiple) return a.warn("To be bound by Parsley, a radio, a checkbox and a multiple select input must have either a name or a multiple option.", this.$element), this;
this.options.multiple = this.options.multiple.replace(/(:|\.|\[|\]|\{|\}|\$)/g, ""), t && e('input[name="' + t + '"]').each(function(e, t) {
"radio" !== t.type && "checkbox" !== t.type || t.setAttribute(n.options.namespace + "multiple", n.options.multiple)
});
for (var r = this._findRelated(), s = 0; s < r.length; s++)
if (i = e(r.get(s)).data("Parsley"), "undefined" != typeof i) {
this.$element.data("FieldMultiple") || i.addElement(this.$element);
break
} return this.bind("parsleyField", !0), i || this.bind("parsleyFieldMultiple")
},
bind: function(t, i) {
var n;
switch (t) {
case "parsleyForm":
n = e.extend(new w(this.element, this.domOptions, this.options), new l, window.ParsleyExtend)._bindFields();
break;
case "parsleyField":
n = e.extend(new x(this.element, this.domOptions, this.options, this.parent), new l, window.ParsleyExtend);
break;
case "parsleyFieldMultiple":
n = e.extend(new x(this.element, this.domOptions, this.options, this.parent), new $, new l, window.ParsleyExtend)._init();
break;
default:
throw new Error(t + "is not a supported Parsley type")
}
return this.options.multiple && a.setAttr(this.element, this.options.namespace, "multiple", this.options.multiple), "undefined" != typeof i ? (this.$element.data("FieldMultiple", n), n) : (this.$element.data("Parsley", n), n._actualizeTriggers(), n._trigger("init"), n)
}
};
var V = e.fn.jquery.split(".");
if (parseInt(V[0]) <= 1 && parseInt(V[1]) < 8) throw "The loaded version of jQuery is too old. Please upgrade to 1.8.x or better.";
V.forEach || a.warn("Parsley requires ES5 to run properly. Please include https://github.com/es-shims/es5-shim");
var O = _extends(new l, {
element: document,
$element: e(document),
actualizeOptions: null,
_resetOptions: null,
Factory: P,
version: "2.7.2"
});
_extends(x.prototype, y.Field, l.prototype), _extends(w.prototype, y.Form, l.prototype), _extends(P.prototype, l.prototype), e.fn.parsley = e.fn.psly = function(t) {
if (this.length > 1) {
var i = [];
return this.each(function() {
i.push(e(this).parsley(t))
}), i
}
return e(this).length ? new P(this[0], t) : void a.warn("You must bind Parsley on an existing element.")
}, "undefined" == typeof window.ParsleyExtend && (window.ParsleyExtend = {}), O.options = _extends(a.objectCreate(o), window.ParsleyConfig), window.ParsleyConfig = O.options, window.Parsley = window.psly = O, O.Utils = a, window.ParsleyUtils = {}, e.each(a, function(e, t) {
"function" == typeof t && (window.ParsleyUtils[e] = function() {
return a.warnOnce("Accessing `window.ParsleyUtils` is deprecated. Use `window.Parsley.Utils` instead."), a[e].apply(a, arguments)
})
});
var M = window.Parsley._validatorRegistry = new p(window.ParsleyConfig.validators, window.ParsleyConfig.i18n);
window.ParsleyValidator = {}, e.each("setLocale addCatalog addMessage addMessages getErrorMessage formatMessage addValidator updateValidator removeValidator".split(" "), function(e, t) {
window.Parsley[t] = function() {
return M[t].apply(M, arguments)
}, window.ParsleyValidator[t] = function() {
var e;
return a.warnOnce("Accessing the method '" + t + "' through Validator is deprecated. Simply call 'window.Parsley." + t + "(...)'"), (e = window.Parsley)[t].apply(e, arguments)
}
}), window.Parsley.UI = y, window.ParsleyUI = {
removeError: function(e, t, i) {
var n = !0 !== i;
return a.warnOnce("Accessing UI is deprecated. Call 'removeError' on the instance directly. Please comment in issue 1073 as to your need to call this method."), e.removeError(t, {
updateClass: n
})
},
getErrorsMessages: function(e) {
return a.warnOnce("Accessing UI is deprecated. Call 'getErrorsMessages' on the instance directly."), e.getErrorsMessages()
}
}, e.each("addError updateError".split(" "), function(e, t) {
window.ParsleyUI[t] = function(e, i, n, r, s) {
var o = !0 !== s;
return a.warnOnce("Accessing UI is deprecated. Call '" + t + "' on the instance directly. Please comment in issue 1073 as to your need to call this method."), e[t](i, {
message: n,
assert: r,
updateClass: o
})
}
}), !1 !== window.ParsleyConfig.autoBind && e(function() {
e("[data-parsley-validate]").length && e("[data-parsley-validate]").parsley()
});
var T = e({}),
R = function() {
a.warnOnce("Parsley's pubsub module is deprecated; use the 'on' and 'off' methods on parsley instances or window.Parsley")
},
D = "parsley:";
e.listen = function(e, n) {
var r;
if (R(), "object" == typeof arguments[1] && "function" == typeof arguments[2] && (r = arguments[1], n = arguments[2]), "function" != typeof n) throw new Error("Wrong parameters");
window.Parsley.on(i(e), t(n, r))
}, e.listenTo = function(e, n, r) {
if (R(), !(e instanceof x || e instanceof w)) throw new Error("Must give Parsley instance");
if ("string" != typeof n || "function" != typeof r) throw new Error("Wrong parameters");
e.on(i(n), t(r))
}, e.unsubscribe = function(e, t) {
if (R(), "string" != typeof e || "function" != typeof t) throw new Error("Wrong arguments");
window.Parsley.off(i(e), t.parsleyAdaptedCallback)
}, e.unsubscribeTo = function(e, t) {
if (R(), !(e instanceof x || e instanceof w)) throw new Error("Must give Parsley instance");
e.off(i(t))
}, e.unsubscribeAll = function(t) {
R(), window.Parsley.off(i(t)), e("form,input,textarea,select").each(function() {
var n = e(this).data("Parsley");
n && n.off(i(t))
})
}, e.emit = function(e, t) {
var n;
R();
var r = t instanceof x || t instanceof w,
s = Array.prototype.slice.call(arguments, r ? 2 : 1);
s.unshift(i(e)), r || (t = window.Parsley), (n = t).trigger.apply(n, _toConsumableArray(s))
};
e.extend(!0, O, {
asyncValidators: {
"default": {
fn: function(e) {
return e.status >= 200 && e.status < 300
},
url: !1
},
reverse: {
fn: function(e) {
return e.status < 200 || e.status >= 300
},
url: !1
}
},
addAsyncValidator: function(e, t, i, n) {
return O.asyncValidators[e] = {
fn: t,
url: i || !1,
options: n || {}
}, this
}
}), O.addValidator("remote", {
requirementType: {
"": "string",
validator: "string",
reverse: "boolean",
options: "object"
},
validateString: function(t, i, n, r) {
var s, a, o = {},
l = n.validator || (!0 === n.reverse ? "reverse" : "default");
if ("undefined" == typeof O.asyncValidators[l]) throw new Error("Calling an undefined async validator: `" + l + "`");
i = O.asyncValidators[l].url || i, i.indexOf("{value}") > -1 ? i = i.replace("{value}", encodeURIComponent(t)) : o[r.element.getAttribute("name") || r.element.getAttribute("id")] = t;
var u = e.extend(!0, n.options || {}, O.asyncValidators[l].options);
s = e.extend(!0, {}, {
url: i,
data: o,
type: "GET"
}, u), r.trigger("field:ajaxoptions", r, s), a = e.param(s), "undefined" == typeof O._remoteCache && (O._remoteCache = {});
var d = O._remoteCache[a] = O._remoteCache[a] || e.ajax(s),
h = function() {
var t = O.asyncValidators[l].fn.call(r, d, i, n);
return t || (t = e.Deferred().reject()), e.when(t)
};
return d.then(h, h)
},
priority: -1
}), O.on("form:submit", function() {
O._remoteCache = {}
}), l.prototype.addAsyncValidator = function() {
return a.warnOnce("Accessing the method `addAsyncValidator` through an instance is deprecated. Simply call `Parsley.addAsyncValidator(...)`"), O.addAsyncValidator.apply(O, arguments)
}, O.addMessages("en", {
defaultMessage: "This value seems to be invalid.",
type: {
email: "This value should be a valid email.",
url: "This value should be a valid url.",
number: "This value should be a valid number.",
integer: "This value should be a valid integer.",
digits: "This value should be digits.",
alphanum: "This value should be alphanumeric."
},
notblank: "This value should not be blank.",
required: "This value is required.",
pattern: "This value seems to be invalid.",
min: "This value should be greater than or equal to %s.",
max: "This value should be lower than or equal to %s.",
range: "This value should be between %s and %s.",
minlength: "This value is too short. It should have %s characters or more.",
maxlength: "This value is too long. It should have %s characters or fewer.",
length: "This value length is invalid. It should be between %s and %s characters long.",
mincheck: "You must select at least %s choices.",
maxcheck: "You must select %s choices or fewer.",
check: "You must select between %s and %s choices.",
equalto: "This value should be the same."
}), O.setLocale("en");
var I = new n;
I.install();
var q = O;
return q
});
jQuery(document).ready(function(e) {
function a(e, a) {
l(e, a), e.find(a.container).first().show()
}
function n(a, n) {
if (n.tabs) {
var t = e("", {
"class": n.tabMenuClassName
}).insertBefore(a.children(n.container).filter(":first"));
a.children(n.container).each(function(i, r) {
var l = e("").html(e(this).children(n.header).html()).addClass(0 == i ? n.tabMenuItemActiveClassName : "").addClass("item" + i).addClass("btn btn-default").prop("type", "button").on("click keypress", {
container: a.children(n.container),
fieldset: e(r)
}, function() {
var t = e(this),
i = t.parent().children().index(t);
s(a, n, t, i)
});
n.tabIndex && l.prop("tabindex", i), t.append(l)
})
}
}
function t(a, n) {
n.navigation && a.children(n.container).each(function(t) {
var i = e("").addClass("powermail_fieldwrap").addClass("powermail_tab_navigation").appendTo(e(this));
t > 0 && i.append(c(a, n)), t < a.children(n.container).length - 1 && i.append(o(a, n))
})
}
function i(a, n) {
e.fn.parsley && "data-parsley-validate" === a.data("parsley-validate") && a.parsley().subscribe("parsley:field:validated", function() {
v(a, n), C(a, n)
})
}
function r(a, n) {
n.openTabOnError && e.fn.parsley && e.listen("parsley:field:error", function() {
setTimeout(function() {
a.find("." + n.tabMenuClassName + " > ." + n.tabMenuItemErrorClassName + ":first").click()
}, 50)
})
}
function s(a, n, t, i) {
$activeTab = b(a, n), $activeTab.removeClass(n.tabMenuItemActiveClassName), t.addClass(n.tabMenuItemActiveClassName), l(a, n), e(".powermail_fieldset", a).slice(i, i + 1).show()
}
function l(e, a) {
e.children(a.container).hide()
}
function c(a, n) {
return e("").prop("href", "#").addClass("btn btn-warning").html("<").click(function(e) {
e.preventDefault(), u(a, n)
})
}
function o(a, n) {
return e("").prop("href", "#").addClass("btn btn-primary pull-right").html(">").click(function(e) {
e.preventDefault(), d(a, n)
})
}
function d(e, a) {
var n = m(e, a);
$activeTab = b(e, a), $activeTab.removeClass(a.tabMenuItemActiveClassName).next().addClass(a.tabMenuItemActiveClassName), f(e, a, n + 1)
}
function u(e, a) {
var n = m(e, a);
$activeTab = b(e, a), $activeTab.removeClass(a.tabMenuItemActiveClassName).prev().addClass(a.tabMenuItemActiveClassName), f(e, a, n - 1)
}
function f(e, a, n) {
l(e, a), e.find(".powermail_fieldset").slice(n, n + 1).show()
}
function m(e, a) {
var n = p(e, a),
t = n.index(b(e, a));
return parseInt(t)
}
function p(e, a) {
return e.find("." + a.tabMenuClassName).children()
}
function b(e, a) {
var n = p(e, a);
return n.filter("." + a.tabMenuItemActiveClassName)
}
function v(e, a) {
var n = p(e, a);
n.removeClass(a.tabMenuItemErrorClassName)
}
function C(a, n) {
a.parsley().isValid() || a.find(".parsley-error").each(function() {
var t = a.find(".powermail_fieldset").index(e(this).closest(".powermail_fieldset")),
i = p(a, n),
r = i.slice(t, t + 1);
r.addClass(n.tabMenuItemErrorClassName)
})
}
e.fn.powermailTabs = function(e) {
"use strict";
var s = jQuery(this);
e = jQuery.extend({
container: "fieldset",
header: "legend",
tabs: !0,
navigation: !0,
openTabOnError: !0,
tabIndex: !0,
tabMenuClassName: "btn-group",
tabMenuItemActiveClassName: "btn-primary",
tabMenuItemErrorClassName: "btn-danger"
}, e), a(s, e), n(s, e), t(s, e), i(s, e), r(s, e)
}
});
function PowermailForm(e) {
"use strict";
this.initialize = function() {
t(), a(), i(), r(), o(), n(), f(), l()
};
var t = function() {
e.fn.powermailTabs && e(".powermail_morestep").each(function() {
e(this).powermailTabs()
})
},
a = function() {
e("form[data-powermail-ajax]").length && p()
},
i = function() {
if (e('*[data-powermail-location="prefill"]').length && navigator.geolocation) {
e(this);
navigator.geolocation.getCurrentPosition(function(t) {
var a = t.coords.latitude,
i = t.coords.longitude,
r = C() + "/index.php?eID=powermailEidGetLocation";
jQuery.ajax({
url: r,
data: "lat=" + a + "&lng=" + i,
cache: !1,
success: function(t) {
t && e('*[data-powermail-location="prefill"]').val(t)
}
})
})
}
},
r = function() {
e.fn.datetimepicker && e(".powermail_date").each(function() {
var t = e(this);
if ("date" === t.prop("type") || "datetime-local" === t.prop("type") || "time" === t.prop("type")) {
if (!t.data("datepicker-force")) {
if (e(this).data("date-value")) {
var a = g(e(this).data("date-value"), e(this).data("datepicker-format"), t.prop("type"));
null !== a && e(this).val(a)
}
return
}
t.prop("type", "text"), t.val(e(this).data("date-value"))
}
var i = !0,
r = !0;
"date" === t.data("datepicker-settings") ? r = !1 : "time" === t.data("datepicker-settings") && (i = !1), t.datetimepicker({
format: t.data("datepicker-format"),
timepicker: r,
datepicker: i,
lang: "en",
i18n: {
en: {
months: t.data("datepicker-months").split(","),
dayOfWeek: t.data("datepicker-days").split(",")
}
}
})
})
},
o = function() {
e(".powermail_all_type_password.powermail_all_value").html("********")
},
n = function() {
e.fn.parsley && e(".powermail_reset").on("click", "", function() {
e('form[data-parsley-validate="data-parsley-validate"]').parsley().reset()
})
},
l = function() {
window.Parsley && (x(), b())
},
p = function() {
var t, a = !1;
e(document).on("submit", "form[data-powermail-ajax]", function(i) {
var r = e(this),
o = r.closest(".tx-powermail");
r.data("powermail-ajax-uri") && (t = r.data("powermail-ajax-uri"));
var n = r.data("powermail-form");
a || (e.ajax({
type: "POST",
url: r.prop("action"),
data: new FormData(r.get(0)),
contentType: !1,
processData: !1,
beforeSend: function() {
s(r)
},
complete: function() {
d(r), f(), c(o)
},
success: function(i) {
var o = e('*[data-powermail-form="' + n + '"]:first', i);
o.length ? (e('*[data-powermail-form="' + n + '"]:first').closest(".tx-powermail").html(o), e.fn.powermailTabs && e(".powermail_morestep").powermailTabs(), e.fn.parsley && e('form[data-parsley-validate="data-parsley-validate"]').parsley(), w()) : (t ? D(t) : r.submit(), a = !0)
}
}), i.preventDefault())
})
},
s = function(t) {
d(t), e(".powermail_submit", t).length ? e(".powermail_submit", t).parent().append(y()) : t.closest(".tx-powermail").append(y())
},
d = function(e) {
e.closest(".tx-powermail").find(".powermail_progressbar").remove()
},
c = function(t) {
var a = e.Event("submitted.powermail.form");
t.trigger(a)
},
f = function() {
e(".powermail_fieldwrap_file").find(".deleteAllFiles").each(function() {
u(e(this).closest(".powermail_fieldwrap_file").find('input[type="file"]'))
}), e(".deleteAllFiles").click(function() {
m(e(this).closest(".powermail_fieldwrap_file").find('input[type="hidden"]')), e(this).closest("ul").fadeOut(function() {
e(this).remove()
})
})
},
u = function(e) {
e.prop("disabled", "disabled").addClass("hide").prop("type", "hidden")
},
m = function(e) {
e.prop("disabled", !1).removeClass("hide").prop("type", "file")
},
w = function() {
e("img.powermail_captchaimage").each(function() {
var t = h(e(this).prop("src"));
e(this).prop("src", t + "?hash=" + v(5))
})
},
h = function(e) {
var t = e.split("?");
return t[0]
},
v = function(e) {
for (var t = "", a = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", i = 0; i < e; i++) t += a.charAt(Math.floor(Math.random() * a.length));
return t
},
g = function(e, t, a) {
var i = Date.parseDate(e, t);
if (null === i) return null;
var r = new Date(i),
o = r.getFullYear() + "-";
o += ("0" + (r.getMonth() + 1)).slice(-2) + "-", o += ("0" + r.getDate()).slice(-2);
var n = ("0" + r.getHours()).slice(-2) + ":" + ("0" + r.getMinutes()).slice(-2),
l = o + "T" + n;
return "date" === a ? o : "datetime-local" === a ? l : "time" === a ? n : null
},
y = function() {
return e("").addClass("powermail_progressbar").html(e("").addClass("powermail_progress").html(e("").addClass("powermail_progess_inner")))
},
_ = function(e) {
for (var t = e.get(0), a = 0, i = 0; i < t.files.length; i++) {
var r = t.files[i];
r.size > a && (a = r.size)
}
return parseInt(a)
},
x = function() {
window.Parsley.addValidator("powermailfilesize", function(t, a) {
if (a.indexOf(",") !== -1) {
var i = a.split(","),
r = parseInt(i[0]),
o = e('*[name="tx_powermail_pi1[field][' + i[1] + '][]"]');
if (o.length && _(o) > r) return !1
}
return !0
}, 32).addMessage("en", "powermailfilesize", "Error")
},
b = function() {
window.Parsley.addValidator("powermailfileextensions", function(t, a) {
var i = e('*[name="tx_powermail_pi1[field][' + a + '][]"]');
return !i.length || k(j(t), i.prop("accept"))
}, 32).addMessage("en", "powermailfileextensions", "Error")
},
k = function(e, t) {
return t.indexOf("." + e) !== -1
},
j = function(e) {
return e.split(".").pop().toLowerCase()
},
D = function(e) {
e.indexOf("http") !== -1 ? window.location = e : window.location.pathname = e
},
C = function() {
var t;
return t = e("base").length > 0 ? jQuery("base").prop("href") : "https:" != window.location.protocol ? "http://" + window.location.hostname : "https://" + window.location.hostname
}
}
jQuery(document).ready(function(e) {
"use strict";
var t = new window.PowermailForm(e);
t.initialize()
});
! function(e, t) {
"object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : e.AOS = t()
}(this, function() {
"use strict";
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {},
y = "Expected a function",
a = NaN,
o = "[object Symbol]",
r = /^\s+|\s+$/g,
s = /^[-+]0x[0-9a-f]+$/i,
l = /^0b[01]+$/i,
c = /^0o[0-7]+$/i,
d = parseInt,
t = "object" == typeof e && e && e.Object === Object && e,
n = "object" == typeof self && self && self.Object === Object && self,
i = t || n || Function("return this")(),
u = Object.prototype.toString,
b = Math.max,
w = Math.min,
x = function() {
return i.Date.now()
};
function C(e) {
var t = typeof e;
return !!e && ("object" == t || "function" == t)
}
function k(e) {
if ("number" == typeof e) return e;
if ("symbol" == typeof(t = e) || t && "object" == typeof t && u.call(t) == o) return a;
var t;
if (C(e)) {
var n = "function" == typeof e.valueOf ? e.valueOf() : e;
e = C(n) ? n + "" : n
}
if ("string" != typeof e) return 0 === e ? e : +e;
e = e.replace(r, "");
var i = l.test(e);
return i || c.test(e) ? d(e.slice(2), i ? 2 : 8) : s.test(e) ? a : +e
}
var p = function(e, t, n) {
var i = !0,
a = !0;
if ("function" != typeof e) throw new TypeError(y);
return C(n) && (i = "leading" in n ? !!n.leading : i, a = "trailing" in n ? !!n.trailing : a),
function(i, a, e) {
var o, r, n, s, l, c, d = 0,
u = !1,
p = !1,
t = !0;
if ("function" != typeof i) throw new TypeError(y);
function f(e) {
var t = o,
n = r;
return o = r = void 0, d = e, s = i.apply(n, t)
}
function h(e) {
var t = e - c;
return void 0 === c || a <= t || t < 0 || p && n <= e - d
}
function m() {
var e, t = x();
if (h(t)) return g(t);
l = setTimeout(m, (e = a - (t - c), p ? w(e, n - (t - d)) : e))
}
function g(e) {
return l = void 0, t && o ? f(e) : (o = r = void 0, s)
}
function v() {
var e, t = x(),
n = h(t);
if (o = arguments, r = this, c = t, n) {
if (void 0 === l) return d = e = c, l = setTimeout(m, a), u ? f(e) : s;
if (p) return l = setTimeout(m, a), f(c)
}
return void 0 === l && (l = setTimeout(m, a)), s
}
return a = k(a) || 0, C(e) && (u = !!e.leading, n = (p = "maxWait" in e) ? b(k(e.maxWait) || 0, a) : n, t = "trailing" in e ? !!e.trailing : t), v.cancel = function() {
void 0 !== l && clearTimeout(l), o = c = r = l = void(d = 0)
}, v.flush = function() {
return void 0 === l ? s : g(x())
}, v
}(e, t, {
leading: i,
maxWait: t,
trailing: a
})
},
f = /^\s+|\s+$/g,
h = /^[-+]0x[0-9a-f]+$/i,
m = /^0b[01]+$/i,
g = /^0o[0-7]+$/i,
v = parseInt,
S = "object" == typeof e && e && e.Object === Object && e,
T = "object" == typeof self && self && self.Object === Object && self,
P = S || T || Function("return this")(),
E = Object.prototype.toString,
M = Math.max,
O = Math.min,
A = function() {
return P.Date.now()
};
function $(e) {
var t = typeof e;
return !!e && ("object" == t || "function" == t)
}
function I(e) {
if ("number" == typeof e) return e;
if ("symbol" == typeof(t = e) || t && "object" == typeof t && "[object Symbol]" == E.call(t)) return NaN;
var t;
if ($(e)) {
var n = "function" == typeof e.valueOf ? e.valueOf() : e;
e = $(n) ? n + "" : n
}
if ("string" != typeof e) return 0 === e ? e : +e;
e = e.replace(f, "");
var i = m.test(e);
return i || g.test(e) ? v(e.slice(2), i ? 2 : 8) : h.test(e) ? NaN : +e
}
var N = function(i, a, e) {
var o, r, n, s, l, c, d = 0,
u = !1,
p = !1,
t = !0;
if ("function" != typeof i) throw new TypeError("Expected a function");
function f(e) {
var t = o,
n = r;
return o = r = void 0, d = e, s = i.apply(n, t)
}
function h(e) {
var t = e - c;
return void 0 === c || a <= t || t < 0 || p && n <= e - d
}
function m() {
var e, t = A();
if (h(t)) return g(t);
l = setTimeout(m, (e = a - (t - c), p ? O(e, n - (t - d)) : e))
}
function g(e) {
return l = void 0, t && o ? f(e) : (o = r = void 0, s)
}
function v() {
var e, t = A(),
n = h(t);
if (o = arguments, r = this, c = t, n) {
if (void 0 === l) return d = e = c, l = setTimeout(m, a), u ? f(e) : s;
if (p) return l = setTimeout(m, a), f(c)
}
return void 0 === l && (l = setTimeout(m, a)), s
}
return a = I(a) || 0, $(e) && (u = !!e.leading, n = (p = "maxWait" in e) ? M(I(e.maxWait) || 0, a) : n, t = "trailing" in e ? !!e.trailing : t), v.cancel = function() {
void 0 !== l && clearTimeout(l), o = c = r = l = void(d = 0)
}, v.flush = function() {
return void 0 === l ? s : g(A())
}, v
},
z = function() {};
function W(e) {
e && e.forEach(function(e) {
var t = Array.prototype.slice.call(e.addedNodes),
n = Array.prototype.slice.call(e.removedNodes);
if (function e(t) {
var n = void 0,
i = void 0;
for (n = 0; n < t.length; n += 1) {
if ((i = t[n]).dataset && i.dataset.aos) return !0;
if (i.children && e(i.children)) return !0
}
return !1
}(t.concat(n))) return z()
})
}
function L() {
return window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver
}
var H = function() {
return !!L()
},
j = function(e, t) {
var n = window.document,
i = new(L())(W);
z = t, i.observe(n.documentElement, {
childList: !0,
subtree: !0,
removedNodes: !0
})
},
_ = function() {
function i(e, t) {
for (var n = 0; n < t.length; n++) {
var i = t[n];
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i)
}
}
return function(e, t, n) {
return t && i(e.prototype, t), n && i(e, n), e
}
}(),
R = Object.assign || function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i])
}
return e
},
V = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,
D = /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,
F = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i,
q = /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i;
function B() {
return navigator.userAgent || navigator.vendor || window.opera || ""
}
var X = new(function() {
function e() {
! function(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, e)
}
return _(e, [{
key: "phone",
value: function() {
var e = B();
return !(!V.test(e) && !D.test(e.substr(0, 4)))
}
}, {
key: "mobile",
value: function() {
var e = B();
return !(!F.test(e) && !q.test(e.substr(0, 4)))
}
}, {
key: "tablet",
value: function() {
return this.mobile() && !this.phone()
}
}, {
key: "ie11",
value: function() {
return "-ms-scroll-limit" in document.documentElement.style && "-ms-ime-align" in document.documentElement.style
}
}]), e
}()),
Q = function(e, t) {
var n = void 0;
return X.ie11() ? (n = document.createEvent("CustomEvent")).initCustomEvent(e, !0, !0, {
detail: t
}) : n = new CustomEvent(e, {
detail: t
}), document.dispatchEvent(n)
},
Y = function(e) {
return e.forEach(function(e, t) {
return n = e, i = window.pageYOffset, r = n.options, s = n.position, l = n.node, n.data, c = function() {
var t, e;
n.animated && (t = l, (e = r.animatedClassNames) && e.forEach(function(e) {
return t.classList.remove(e)
}), Q("aos:out", l), n.options.id && Q("aos:in:" + n.options.id, l), n.animated = !1)
}, void(r.mirror && i >= s.out && !r.once ? c() : i >= s.in ? n.animated || (a = l, (o = r.animatedClassNames) && o.forEach(function(e) {
return a.classList.add(e)
}), Q("aos:in", l), n.options.id && Q("aos:in:" + n.options.id, l), n.animated = !0) : n.animated && !r.once && c());
var n, i, a, o, r, s, l, c
})
},
U = function(e) {
for (var t = 0, n = 0; e && !isNaN(e.offsetLeft) && !isNaN(e.offsetTop);) t += e.offsetLeft - ("BODY" != e.tagName ? e.scrollLeft : 0), n += e.offsetTop - ("BODY" != e.tagName ? e.scrollTop : 0), e = e.offsetParent;
return {
top: n,
left: t
}
},
G = function(e, t, n) {
var i = e.getAttribute("data-aos-" + t);
if (void 0 !== i) {
if ("true" === i) return !0;
if ("false" === i) return !1
}
return i || n
},
Z = function() {
var e = document.querySelectorAll("[data-aos]");
return Array.prototype.map.call(e, function(e) {
return {
node: e
}
})
},
K = [],
J = !1,
ee = {
offset: 120,
delay: 0,
easing: "ease",
duration: 400,
disable: !1,
once: !1,
mirror: !1,
anchorPlacement: "top-bottom",
startEvent: "DOMContentLoaded",
animatedClassName: "aos-animate",
initClassName: "aos-init",
useClassNames: !1,
disableMutationObserver: !1,
throttleDelay: 99,
debounceDelay: 50
},
te = function() {
return document.all && !window.atob
},
ne = function() {
var e, s;
0 < arguments.length && void 0 !== arguments[0] && arguments[0] && (J = !0), J && (s = ee, (e = K).forEach(function(e, t) {
var n = G(e.node, "mirror", s.mirror),
i = G(e.node, "once", s.once),
a = G(e.node, "id"),
o = s.useClassNames && e.node.getAttribute("data-aos"),
r = [s.animatedClassName].concat(o ? o.split(" ") : []).filter(function(e) {
return "string" == typeof e
});
s.initClassName && e.node.classList.add(s.initClassName), e.position = {
in: function(e, t, n) {
var i = window.innerHeight,
a = G(e, "anchor"),
o = G(e, "anchor-placement"),
r = Number(G(e, "offset", o ? 0 : t)),
s = o || n,
l = e;
a && document.querySelectorAll(a) && (l = document.querySelectorAll(a)[0]);
var c = U(l).top - i;
switch (s) {
case "top-bottom":
break;
case "center-bottom":
c += l.offsetHeight / 2;
break;
case "bottom-bottom":
c += l.offsetHeight;
break;
case "top-center":
c += i / 2;
break;
case "center-center":
c += i / 2 + l.offsetHeight / 2;
break;
case "bottom-center":
c += i / 2 + l.offsetHeight;
break;
case "top-top":
c += i;
break;
case "bottom-top":
c += i + l.offsetHeight;
break;
case "center-top":
c += i + l.offsetHeight / 2
}
return c + r
}(e.node, s.offset, s.anchorPlacement),
out: n && function(e, t) {
window.innerHeight;
var n = G(e, "anchor"),
i = G(e, "offset", t),
a = e;
return n && document.querySelectorAll(n) && (a = document.querySelectorAll(n)[0]), U(a).top + a.offsetHeight - i
}(e.node, s.offset)
}, e.options = {
once: i,
mirror: n,
animatedClassNames: r,
id: a
}
}), Y(K = e), window.addEventListener("scroll", p(function() {
Y(K, ee.once)
}, ee.throttleDelay)))
},
ie = function() {
if (K = Z(), oe(ee.disable) || te()) return ae();
ne()
},
ae = function() {
K.forEach(function(e, t) {
e.node.removeAttribute("data-aos"), e.node.removeAttribute("data-aos-easing"), e.node.removeAttribute("data-aos-duration"), e.node.removeAttribute("data-aos-delay"), ee.initClassName && e.node.classList.remove(ee.initClassName), ee.animatedClassName && e.node.classList.remove(ee.animatedClassName)
})
},
oe = function(e) {
return !0 === e || "mobile" === e && X.mobile() || "phone" === e && X.phone() || "tablet" === e && X.tablet() || "function" == typeof e && !0 === e()
};
return {
init: function(e) {
return ee = R(ee, e), K = Z(), ee.disableMutationObserver || H() || (ee.disableMutationObserver = !0), ee.disableMutationObserver || j("[data-aos]", ie), oe(ee.disable) || te() ? ae() : (document.querySelector("body").setAttribute("data-aos-easing", ee.easing), document.querySelector("body").setAttribute("data-aos-duration", ee.duration), document.querySelector("body").setAttribute("data-aos-delay", ee.delay), -1 === ["DOMContentLoaded", "load"].indexOf(ee.startEvent) ? document.addEventListener(ee.startEvent, function() {
ne(!0)
}) : window.addEventListener("load", function() {
ne(!0)
}), "DOMContentLoaded" === ee.startEvent && -1 < ["complete", "interactive"].indexOf(document.readyState) && ne(!0), window.addEventListener("resize", N(ne, ee.debounceDelay, !0)), window.addEventListener("orientationchange", N(ne, ee.debounceDelay, !0)), K)
},
refresh: ne,
refreshHard: ie
}
}),
function(e) {
"function" == typeof define && define.amd ? define(["jquery"], e) : e(jQuery)
}(function(d) {
var i, n = 0,
s = Array.prototype.slice;
d.cleanData = (i = d.cleanData, function(e) {
for (var t, n = 0; null != (t = e[n]); n++) try {
d(t).triggerHandler("remove")
} catch (e) {}
i(e)
}), d.widget = function(e, n, t) {
var i, a, o, r, s = {},
l = e.split(".")[0];
return e = e.split(".")[1], i = l + "-" + e, t || (t = n, n = d.Widget), d.expr[":"][i.toLowerCase()] = function(e) {
return !!d.data(e, i)
}, d[l] = d[l] || {}, a = d[l][e], o = d[l][e] = function(e, t) {
if (!this._createWidget) return new o(e, t);
arguments.length && this._createWidget(e, t)
}, d.extend(o, a, {
version: t.version,
_proto: d.extend({}, t),
_childConstructors: []
}), (r = new n).options = d.widget.extend({}, r.options), d.each(t, function(t, i) {
var a, o;
d.isFunction(i) ? s[t] = (a = function() {
return n.prototype[t].apply(this, arguments)
}, o = function(e) {
return n.prototype[t].apply(this, e)
}, function() {
var e, t = this._super,
n = this._superApply;
return this._super = a, this._superApply = o, e = i.apply(this, arguments), this._super = t, this._superApply = n, e
}) : s[t] = i
}), o.prototype = d.widget.extend(r, {
widgetEventPrefix: a && r.widgetEventPrefix || e
}, s, {
constructor: o,
namespace: l,
widgetName: e,
widgetFullName: i
}), a ? (d.each(a._childConstructors, function(e, t) {
var n = t.prototype;
d.widget(n.namespace + "." + n.widgetName, o, t._proto)
}), delete a._childConstructors) : n._childConstructors.push(o), d.widget.bridge(e, o), o
}, d.widget.extend = function(e) {
for (var t, n, i = s.call(arguments, 1), a = 0, o = i.length; a < o; a++)
for (t in i[a]) n = i[a][t], i[a].hasOwnProperty(t) && void 0 !== n && (d.isPlainObject(n) ? e[t] = d.isPlainObject(e[t]) ? d.widget.extend({}, e[t], n) : d.widget.extend({}, n) : e[t] = n);
return e
}, d.widget.bridge = function(o, t) {
var r = t.prototype.widgetFullName || o;
d.fn[o] = function(n) {
var e = "string" == typeof n,
i = s.call(arguments, 1),
a = this;
return n = !e && i.length ? d.widget.extend.apply(null, [n].concat(i)) : n, e ? this.each(function() {
var e, t = d.data(this, r);
return "instance" === n ? (a = t, !1) : t ? d.isFunction(t[n]) && "_" !== n.charAt(0) ? (e = t[n].apply(t, i)) !== t && void 0 !== e ? (a = e && e.jquery ? a.pushStack(e.get()) : e, !1) : void 0 : d.error("no such method '" + n + "' for " + o + " widget instance") : d.error("cannot call methods on " + o + " prior to initialization; attempted to call method '" + n + "'")
}) : this.each(function() {
var e = d.data(this, r);
e ? (e.option(n || {}), e._init && e._init()) : d.data(this, r, new t(n, this))
}), a
}
}, d.Widget = function() {}, d.Widget._childConstructors = [], d.Widget.prototype = {
widgetName: "widget",
widgetEventPrefix: "",
defaultElement: "
",
options: {
disabled: !1,
create: null
},
_createWidget: function(e, t) {
t = d(t || this.defaultElement || this)[0], this.element = d(t), this.uuid = n++, this.eventNamespace = "." + this.widgetName + this.uuid, this.options = d.widget.extend({}, this.options, this._getCreateOptions(), e), this.bindings = d(), this.hoverable = d(), this.focusable = d(), t !== this && (d.data(t, this.widgetFullName, this), this._on(!0, this.element, {
remove: function(e) {
e.target === t && this.destroy()
}
}), this.document = d(t.style ? t.ownerDocument : t.document || t), this.window = d(this.document[0].defaultView || this.document[0].parentWindow)), this._create(), this._trigger("create", null, this._getCreateEventData()), this._init()
},
_getCreateOptions: d.noop,
_getCreateEventData: d.noop,
_create: d.noop,
_init: d.noop,
destroy: function() {
this._destroy(), this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(d.camelCase(this.widgetFullName)), this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName + "-disabled ui-state-disabled"), this.bindings.unbind(this.eventNamespace), this.hoverable.removeClass("ui-state-hover"), this.focusable.removeClass("ui-state-focus")
},
_destroy: d.noop,
widget: function() {
return this.element
},
option: function(e, t) {
var n, i, a, o = e;
if (0 === arguments.length) return d.widget.extend({}, this.options);
if ("string" == typeof e)
if (o = {}, e = (n = e.split(".")).shift(), n.length) {
for (i = o[e] = d.widget.extend({}, this.options[e]), a = 0; a < n.length - 1; a++) i[n[a]] = i[n[a]] || {}, i = i[n[a]];
if (e = n.pop(), 1 === arguments.length) return void 0 === i[e] ? null : i[e];
i[e] = t
} else {
if (1 === arguments.length) return void 0 === this.options[e] ? null : this.options[e];
o[e] = t
} return this._setOptions(o), this
},
_setOptions: function(e) {
var t;
for (t in e) this._setOption(t, e[t]);
return this
},
_setOption: function(e, t) {
return this.options[e] = t, "disabled" === e && (this.widget().toggleClass(this.widgetFullName + "-disabled", !!t), t && (this.hoverable.removeClass("ui-state-hover"), this.focusable.removeClass("ui-state-focus"))), this
},
enable: function() {
return this._setOptions({
disabled: !1
})
},
disable: function() {
return this._setOptions({
disabled: !0
})
},
_on: function(r, s, e) {
var l, c = this;
"boolean" != typeof r && (e = s, s = r, r = !1), e ? (s = l = d(s), this.bindings = this.bindings.add(s)) : (e = s, s = this.element, l = this.widget()), d.each(e, function(e, t) {
function n() {
if (r || !0 !== c.options.disabled && !d(this).hasClass("ui-state-disabled")) return ("string" == typeof t ? c[t] : t).apply(c, arguments)
}
"string" != typeof t && (n.guid = t.guid = t.guid || n.guid || d.guid++);
var i = e.match(/^([\w:-]*)\s*(.*)$/),
a = i[1] + c.eventNamespace,
o = i[2];
o ? l.delegate(o, a, n) : s.bind(a, n)
})
},
_off: function(e, t) {
t = (t || "").split(" ").join(this.eventNamespace + " ") + this.eventNamespace, e.unbind(t).undelegate(t)
},
_delay: function(e, t) {
var n = this;
return setTimeout(function() {
return ("string" == typeof e ? n[e] : e).apply(n, arguments)
}, t || 0)
},
_hoverable: function(e) {
this.hoverable = this.hoverable.add(e), this._on(e, {
mouseenter: function(e) {
d(e.currentTarget).addClass("ui-state-hover")
},
mouseleave: function(e) {
d(e.currentTarget).removeClass("ui-state-hover")
}
})
},
_focusable: function(e) {
this.focusable = this.focusable.add(e), this._on(e, {
focusin: function(e) {
d(e.currentTarget).addClass("ui-state-focus")
},
focusout: function(e) {
d(e.currentTarget).removeClass("ui-state-focus")
}
})
},
_trigger: function(e, t, n) {
var i, a, o = this.options[e];
if (n = n || {}, (t = d.Event(t)).type = (e === this.widgetEventPrefix ? e : this.widgetEventPrefix + e).toLowerCase(), t.target = this.element[0], a = t.originalEvent)
for (i in a) i in t || (t[i] = a[i]);
return this.element.trigger(t, n), !(d.isFunction(o) && !1 === o.apply(this.element[0], [t].concat(n)) || t.isDefaultPrevented())
}
}, d.each({
show: "fadeIn",
hide: "fadeOut"
}, function(o, r) {
d.Widget.prototype["_" + o] = function(t, e, n) {
"string" == typeof e && (e = {
effect: e
});
var i, a = e ? !0 === e || "number" == typeof e ? r : e.effect || r : o;
"number" == typeof(e = e || {}) && (e = {
duration: e
}), i = !d.isEmptyObject(e), e.complete = n, e.delay && t.delay(e.delay), i && d.effects && d.effects.effect[a] ? t[o](e) : a !== o && t[a] ? t[a](e.duration, e.easing, n) : t.queue(function(e) {
d(this)[o](), n && n.call(t[0]), e()
})
}
});
d.widget
}),
function(e) {
"use strict";
"function" == typeof define && define.amd ? define(["jquery"], e) : "object" == typeof exports ? e(require("jquery")) : e(jQuery)
}(function(V) {
"use strict";
var t, D = {
wheelSpeed: 10,
wheelPropagation: !1,
minScrollbarLength: null,
useBothWheelAxes: !1,
useKeyboard: !0,
suppressScrollX: !1,
suppressScrollY: !1,
scrollXMarginOffset: 0,
scrollYMarginOffset: 0,
includePadding: !1
},
F = (t = 0, function() {
var e = t;
return t += 1, ".perfect-scrollbar-" + e
});
V.fn.perfectScrollbar = function(_, R) {
return this.each(function() {
var s = V.extend(!0, {}, D),
l = V(this);
if ("object" == typeof _ ? V.extend(!0, s, _) : R = _, "update" === R) return l.data("perfect-scrollbar-update") && l.data("perfect-scrollbar-update")(), l;
if ("destroy" === R) return l.data("perfect-scrollbar-destroy") && l.data("perfect-scrollbar-destroy")(), l;
if (l.data("perfect-scrollbar")) return l.data("perfect-scrollbar");
l.addClass("ps-container");
var c, d, o, r, u, p, f, h, m, g, v, y, b, w, n, x, e, t, i, a, C, k, S = V("").appendTo(l),
T = V("").appendTo(l),
P = V("").appendTo(S),
E = V("").appendTo(T),
M = parseInt(S.css("bottom"), 10),
O = parseInt(T.css("right"), 10),
A = F(),
$ = function(e) {
return s.minScrollbarLength && (e = Math.max(e, s.minScrollbarLength)), e
},
I = function() {
S.css({
left: l.scrollLeft(),
bottom: M - l.scrollTop(),
width: o,
display: c ? "inherit" : "none"
}), T.css({
top: l.scrollTop(),
right: O - l.scrollLeft(),
height: r,
display: d ? "inherit" : "none"
}), P.css({
left: h,
width: f
}), E.css({
top: g,
height: m
})
},
N = function() {
o = s.includePadding ? l.innerWidth() : l.width(), r = s.includePadding ? l.innerHeight() : l.height(), u = l.prop("scrollWidth"), p = l.prop("scrollHeight"), !s.suppressScrollX && u > o + s.scrollXMarginOffset ? (c = !0, f = $(parseInt(o * o / u, 10)), h = parseInt(l.scrollLeft() * (o - f) / (u - o), 10)) : (c = !1, h = f = 0, l.scrollLeft(0)), !s.suppressScrollY && p > r + s.scrollYMarginOffset ? (d = !0, m = $(parseInt(r * r / p, 10)), g = parseInt(l.scrollTop() * (r - m) / (p - r), 10)) : (d = !1, g = m = 0, l.scrollTop(0)), r - m <= g && (g = r - m), o - f <= h && (h = o - f), I()
},
z = function() {
var t, n;
P.bind("mousedown" + A, function(e) {
n = e.pageX, t = P.position().left, S.addClass("in-scrolling"), e.stopPropagation(), e.preventDefault()
}), V(document).bind("mousemove" + A, function(e) {
S.hasClass("in-scrolling") && (function(e, t) {
var n = e + t,
i = o - f;
h = n < 0 ? 0 : i < n ? i : n;
var a = parseInt(h * (u - o) / (o - f), 10);
l.scrollLeft(a), T.css({
right: O - a
})
}(t, e.pageX - n), e.stopPropagation(), e.preventDefault())
}), V(document).bind("mouseup" + A, function() {
S.hasClass("in-scrolling") && S.removeClass("in-scrolling")
}), t = n = null
},
W = function() {
var t, n;
E.bind("mousedown" + A, function(e) {
n = e.pageY, t = E.position().top, T.addClass("in-scrolling"), e.stopPropagation(), e.preventDefault()
}), V(document).bind("mousemove" + A, function(e) {
T.hasClass("in-scrolling") && (function(e, t) {
var n = e + t,
i = r - m;
g = n < 0 ? 0 : i < n ? i : n;
var a = parseInt(g * (p - r) / (r - m), 10);
l.scrollTop(a), S.css({
bottom: M - a
})
}(t, e.pageY - n), e.stopPropagation(), e.preventDefault())
}), V(document).bind("mouseup" + A, function() {
T.hasClass("in-scrolling") && T.removeClass("in-scrolling")
}), t = n = null
},
L = function(e, t) {
var n = l.scrollTop();
if (0 === e) {
if (!d) return !1;
if (0 === n && 0 < t || p - r <= n && t < 0) return !s.wheelPropagation
}
var i = l.scrollLeft();
if (0 === t) {
if (!c) return !1;
if (0 === i && e < 0 || u - o <= i && 0 < e) return !s.wheelPropagation
}
return !0
},
H = function() {
l.unbind(A), V(window).unbind(A), V(document).unbind(A), l.data("perfect-scrollbar", null), l.data("perfect-scrollbar-update", null), l.data("perfect-scrollbar-destroy", null), P.remove(), E.remove(), S.remove(), T.remove(), P = E = o = r = u = p = f = h = M = m = g = O = null
},
j = "ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch;
return (t = navigator.userAgent.toLowerCase().match(/(msie) ([\w.]+)/)) && "msie" === t[1] && (a = parseInt(t[2], 10), l.addClass("ie").addClass("ie" + a), 6 === a && (C = function() {
V(this).addClass("hover")
}, k = function() {
V(this).removeClass("hover")
}, l.bind("mouseenter" + A, C).bind("mouseleave" + A, k), S.bind("mouseenter" + A, C).bind("mouseleave" + A, k), T.bind("mouseenter" + A, C).bind("mouseleave" + A, k), P.bind("mouseenter" + A, C).bind("mouseleave" + A, k), E.bind("mouseenter" + A, C).bind("mouseleave" + A, k), I = function() {
P.css({
left: h + l.scrollLeft(),
bottom: M,
width: f
}), E.css({
top: g + l.scrollTop(),
right: O,
height: m
}), P.hide().show(), E.hide().show()
})), N(), l.bind("scroll" + A, function() {
N()
}), z(), W(), e = function(e) {
e.stopPropagation()
}, E.bind("click" + A, e), T.bind("click" + A, function(e) {
var t = parseInt(m / 2, 10),
n = (e.pageY - T.offset().top - t) / (r - m);
n < 0 ? n = 0 : 1 < n && (n = 1), l.scrollTop((p - r) * n)
}), P.bind("click" + A, e), S.bind("click" + A, function(e) {
var t = parseInt(f / 2, 10),
n = (e.pageX - S.offset().left - t) / (o - f);
n < 0 ? n = 0 : 1 < n && (n = 1), l.scrollLeft((u - o) * n)
}), j && (v = function(e, t) {
l.scrollTop(l.scrollTop() - t), l.scrollLeft(l.scrollLeft() - e), N()
}, y = {}, b = 0, n = null, x = !(w = {}), V(window).bind("touchstart" + A, function() {
x = !0
}), V(window).bind("touchend" + A, function() {
x = !1
}), l.bind("touchstart" + A, function(e) {
var t = e.originalEvent.targetTouches[0];
y.pageX = t.pageX, y.pageY = t.pageY, b = (new Date).getTime(), null !== n && clearInterval(n), e.stopPropagation()
}), l.bind("touchmove" + A, function(e) {
if (!x && 1 === e.originalEvent.targetTouches.length) {
var t = e.originalEvent.targetTouches[0],
n = {};
n.pageX = t.pageX, n.pageY = t.pageY;
var i = n.pageX - y.pageX,
a = n.pageY - y.pageY;
v(i, a), y = n;
var o = (new Date).getTime(),
r = o - b;
0 < r && (w.x = i / r, w.y = a / r, b = o), e.preventDefault()
}
}), l.bind("touchend" + A, function() {
clearInterval(n), n = setInterval(function() {
return Math.abs(w.x) < .01 && Math.abs(w.y) < .01 ? void clearInterval(n) : (v(30 * w.x, 30 * w.y), w.x *= .8, void(w.y *= .8))
}, 10)
})), l.mousewheel && function() {
s.wheelSpeed /= 10;
var r = !1;
l.bind("mousewheel" + A, function(e, t, n, i) {
var a = e.deltaX * e.deltaFactor || n,
o = e.deltaY * e.deltaFactor || i;
r = !1, s.useBothWheelAxes ? d && !c ? (o ? l.scrollTop(l.scrollTop() - o * s.wheelSpeed) : l.scrollTop(l.scrollTop() + a * s.wheelSpeed), r = !0) : c && !d && (a ? l.scrollLeft(l.scrollLeft() + a * s.wheelSpeed) : l.scrollLeft(l.scrollLeft() - o * s.wheelSpeed), r = !0) : (l.scrollTop(l.scrollTop() - o * s.wheelSpeed), l.scrollLeft(l.scrollLeft() + a * s.wheelSpeed)), N(), (r = r || L(a, o)) && (e.stopPropagation(), e.preventDefault())
}), l.bind("MozMousePixelScroll" + A, function(e) {
r && e.preventDefault()
})
}(), s.useKeyboard && (i = !1, l.bind("mouseenter" + A, function() {
i = !0
}), l.bind("mouseleave" + A, function() {
i = !1
}), V(document).bind("keydown" + A, function(e) {
if (i && !V(document.activeElement).is(":input,[contenteditable]")) {
var t = 0,
n = 0;
switch (e.which) {
case 37:
t = -30;
break;
case 38:
n = 30;
break;
case 39:
t = 30;
break;
case 40:
n = -30;
break;
case 33:
n = 90;
break;
case 32:
case 34:
n = -90;
break;
case 35:
n = -r;
break;
case 36:
n = r;
break;
default:
return
}
l.scrollTop(l.scrollTop() - n), l.scrollLeft(l.scrollLeft() + t), L(t, n) && e.preventDefault()
}
})), l.data("perfect-scrollbar", l), l.data("perfect-scrollbar-update", N), l.data("perfect-scrollbar-destroy", H), l
})
}
}),
function(o) {
"use strict";
var t, i = 0,
e = "../typo3conf/Resources/Public/Media/JWPlayer/";
jQuery, t = "smartresize", jQuery.fn[t] = function(e) {
return e ? this.bind("resize", (n = e, function() {
var e = this,
t = arguments;
o ? clearTimeout(o) : a && n.apply(e, t), o = setTimeout(function() {
a || n.apply(e, t), o = null
}, i || 100)
})) : this.trigger(t);
var n, i, a, o
}, o.widget("ts.videoplayer", {
options: {
skin: e + "skin/theme.xml",
flashplayer: e + "player.swf",
autoplay: !1,
ratio: "16:9"
},
_create: function() {
if (window.MediaElementPlayer) {
var n = this;
if (this.oldHtml = this.element.prop("outerHTML"), this.video = this.element.find("video"), 0 != this.video.length) {
this.video.attr("id") || this.video.attr("id", "videoplayer-" + ++i);
var e = this.element.closest(".carousel");
1 === e.length && e.on("slide.bs.carousel", o.proxy(function() {
this.pause()
}, this)), o(window).smartresize(function() {
n.checkPlayerSize();
var e = n.element.outerWidth(),
t = n.element.outerHeight();
n.element.find("object").css({
width: e,
height: t
}), n.element.find("embed").css({
width: e,
height: t
}), n.element.find("iframe").css({
width: e,
height: t
})
}), this.checkPlayerSize();
var t = Modernizr.svg ? 0 : 100;
setTimeout(function() {
n._refresh()
}, t)
}
}
},
checkPlayerSize: function() {
500 < this.element.outerWidth() ? this.element.addClass("videoplayer-big") : this.element.removeClass("videoplayer-big")
},
_refresh: function() {
var e = parseInt(this.video.attr("width"), 10),
t = parseInt(this.video.attr("height"), 10);
if (t && e) {
var n = t / e * 100;
this.element.css("paddingBottom", n + "%")
}
if (void 0 !== a && 1 == a) var i = "../Components/mediaplayer/";
else var a = 0;
if (null == a) i = document.location.protocol + "//" + document.domain + "typo3conf/Resources/Public/Media/Components/mediaplayer";
this.player = new MediaElementPlayer("#" + this.video.attr("id"), {
features: ["playpause", "progress", "current", "duration", "volume", "fullscreen"],
videoWidth: "100%",
videoHeight: "100%",
videoVolume: "horizontal",
enableAutosize: !0,
pluginPath: i,
flashName: "/typo3conf/Resources/Public/Media/Components/mediaplayer/flashmediaelement.swf",
success: function(e, t) {
if (e.load(), 0 === o(t).parent().find("object").length) {
var n = !1;
e.addEventListener("play", function() {
n || (e.stop(), window.setTimeout(function() {
e.play()
}, 100)), n = !0
})
}
}
}), this._trigger("change")
},
play: function() {
this.player.play()
},
pause: function() {
this.player.pause()
},
_destroy: function() {
this.element.replace(this.oldHtml)
}
})
}(jQuery);
var rotationInterval, momentumRaf, container, sprite, numberOfImages = 38,
indexOfImages = numberOfImages - 1,
rotation = 0,
degreePerImage = 360 / indexOfImages,
speed = 0,
previousX = null,
drag = .05;
function initialize_rotation(e, t) {
if (void 0 === e) return !1;
degreePerImage = 360 / (indexOfImages = (numberOfImages = t) - 1), container = document.querySelector(e), (sprite = container.querySelector("img")).style.width = 100 * numberOfImages + "%", sprite.addEventListener("load", function() {
sprite.style.opacity = 1, initRotation(), initDrag()
}), 0 < $(container).find(".controls").length && ($(container).find(".controls .left.trigger").on("click", function() {
window.clearInterval(rotationInterval), rotation = (rotation + 10) % 360, updateImage()
}), $(container).find(".controls .right.trigger").on("click", function() {
window.clearInterval(rotationInterval), rotation = (rotation - 10) % 360, updateImage()
}))
}
function updateImage() {
var e = Math.floor(rotation / degreePerImage);
e < 0 && (e = indexOfImages + e), sprite.style.transform = "translateX(" + 100 / indexOfImages * -e + "%)"
}
function firstInteraction() {
window.clearInterval(rotationInterval), container.removeEventListener("mousedown", firstInteraction), container.removeEventListener("touchstart", firstInteraction)
}
function initRotation() {
rotationInterval = window.setInterval(function() {
document.hasFocus && (rotation = (rotation + 5) % 360, updateImage())
}, 60), container.addEventListener("mousedown", firstInteraction), container.addEventListener("touchstart", firstInteraction)
}
function initDrag() {
container.addEventListener("mousedown", onPress), container.addEventListener("touchstart", onPress)
}
function onPress() {
cancelAnimationFrame(momentumRaf), speed = 0, window.addEventListener("mousemove", onMove), window.addEventListener("touchmove", onMove), window.addEventListener("mouseup", onRelease), window.addEventListener("touchend", onRelease)
}
function onMove(e) {
var t = e.touches ? e.touches[0].pageX : e.screenX;
previousX && (rotation = (rotation - (t - previousX)) % 360, speed = previousX - t), previousX = t, updateImage()
}
function onRelease() {
previousX = null, window.removeEventListener("mousemove", onMove), window.removeEventListener("touchmove", onMove), window.removeEventListener("mouseup", onRelease), window.removeEventListener("touchend", onRelease), momentumRaf = requestAnimationFrame(rotateMomentum)
}
function rotateMomentum() {
rotation = (rotation + speed) % 360, speed -= speed * drag, updateImage(), Math.abs(speed) < .01 ? cancelAnimationFrame(momentumRaf) : momentumRaf = requestAnimationFrame(rotateMomentum)
}
function preLoader() {
$("#status").fadeOut(), setTimeout(function() {
$("#preloader").fadeOut("slow"), $("body").addClass("preloaded").css({
overflow: "visible"
})
}, 650)
}
function initIFrameResizer() {
0 < $("iframe.dynamic").length && iFrameResize()
}
function initEqualizer() {
$("[data-equalizer-children]").each(function() {
$selectorWatch = $(this).attr("data-equalizer-children") || "> *", $equalizerName = $(this).attr("data-equalizer"), $(this).find($selectorWatch).attr("data-equalizer-watch", $equalizerName)
})
}
function initScrollReveal() {
window.fmesr = ScrollReveal({
reset: !0,
useDelay: "always",
viewFactor: .5,
mobile: !0,
opacity: .1,
duration: 900,
distance: "40px",
easing: "cubic-bezier(0.25,0.1,0.25,1)"
}), fmesr.isSupported() && document.documentElement.classList.add("sr"), $(".scroll-reveal.sr-quote").length && $(".scroll-reveal.sr-quote").each(function(e, t) {
setScrollReveal($(t), ".scroll-reveal.sr-quote", "left", 0, "200px", 0, .9)
}), $(".scroll-reveal.sr-image").length && $(".scroll-reveal.sr-image").each(function(e, t) {
setScrollReveal($(t), ".scroll-reveal.sr-image", "right", 500, "200px", 0, 1)
}), $(".fullwidth.scroll").length && $(".fullwidth.scroll").each(function(e, t) {
setScrollReveal($(t), ".fullwidth.scroll", "bottom", 0, "40px", .1, .9)
})
}
function setScrollReveal(e, t, n, i, a, o, r) {
var s, l = e.attr("id");
s = void 0 !== l ? (e = $("#" + l), document.getElementById(l)) : document.querySelectorAll(t);
var c = e.data("fmesr");
void 0 !== c && "" != c || (c = n), fmesr.reveal(s, {
origin: c,
delay: i,
distance: a,
opacity: o,
scale: r
})
}
function initVideoBehaviour() {
hideVideoControl(), checkVideoAutoplayInViewport()
}
function hideVideoControl() {
var e = new MobileDetect(window.navigator.userAgent);
e.mobile() || e.tablet() || $("video").each(function(e, t) {
if ("1" == $(t).data("hidecontrols")) {
var n = $(t).attr("id");
void 0 !== n && (document.getElementById(n).controls = !1)
}
})
}
function checkVideoAutoplayInViewport() {
var e = $("video").not("[autoplay='autoplay']"),
t = 200;
768 <= $(window).width() && (t = 300), $(document).on("scroll", function() {
var a = $(window).scrollTop() + t,
o = $(window).scrollTop() + $(window).height() - t;
e.each(function(e, t) {
if ("1" == $(t).data("videoautoplay")) {
var n = $(this).offset().top,
i = $(this).height() + n;
a < i && n < o ? $(this).get(0).play() : $(this).get(0).pause()
}
})
})
}
function triggerResizeForFocuspoint() {
0 < $(".focuspoint").length && setTimeout(function() {
$(window).trigger("resize")
}, 10)
}
function initNewsOverview() {
var e = sessionStorage.getItem("view"),
t = $(".list-switch"),
n = $(".tile-switch");
"list-look" == e && changeToListView(t, n), t.each(function() {
$(this).on("click", function() {
changeToListView(t, n)
})
}), n.each(function() {
$(this).on("click", function() {
changeToTileView(t, n), $(window).trigger("resize")
})
})
}
function changeToListView(e, t) {
e.hasClass("active") || (t.removeClass("active"), e.addClass("active"), $(".tile-look").each(function() {
$(this).removeClass("tile-look").addClass("list-look").find(".hide-for-small-only .news-date-box").removeClass("column")
}), sessionStorage.setItem("view", "list-look"))
}
function changeToTileView(e, t) {
t.hasClass("active") || (e.removeClass("active"), t.addClass("active"), $(".list-look").each(function() {
$(this).removeClass("list-look").addClass("tile-look").find(".hide-for-small-only .news-date-box").addClass("column")
}), sessionStorage.setItem("view", "tile-look"))
}
function rotate6008Machine() {
var t = $("#rotator"),
n = $(window);
n.scroll(function() {
var e = 377 * -Math.floor(.1 * n.scrollTop());
t.css("background-position", e + "px 0")
})
}
jQuery.easing.jswing = jQuery.easing.swing, jQuery.extend(jQuery.easing, {
def: "easeOutQuad",
swing: function(e, t, n, i, a) {
return jQuery.easing[jQuery.easing.def](e, t, n, i, a)
},
easeInQuad: function(e, t, n, i, a) {
return i * (t /= a) * t + n
},
easeOutQuad: function(e, t, n, i, a) {
return -i * (t /= a) * (t - 2) + n
},
easeInOutQuad: function(e, t, n, i, a) {
return (t /= a / 2) < 1 ? i / 2 * t * t + n : -i / 2 * (--t * (t - 2) - 1) + n
},
easeInCubic: function(e, t, n, i, a) {
return i * (t /= a) * t * t + n
},
easeOutCubic: function(e, t, n, i, a) {
return i * ((t = t / a - 1) * t * t + 1) + n
},
easeInOutCubic: function(e, t, n, i, a) {
return (t /= a / 2) < 1 ? i / 2 * t * t * t + n : i / 2 * ((t -= 2) * t * t + 2) + n
},
easeInQuart: function(e, t, n, i, a) {
return i * (t /= a) * t * t * t + n
},
easeOutQuart: function(e, t, n, i, a) {
return -i * ((t = t / a - 1) * t * t * t - 1) + n
},
easeInOutQuart: function(e, t, n, i, a) {
return (t /= a / 2) < 1 ? i / 2 * t * t * t * t + n : -i / 2 * ((t -= 2) * t * t * t - 2) + n
},
easeInQuint: function(e, t, n, i, a) {
return i * (t /= a) * t * t * t * t + n
},
easeOutQuint: function(e, t, n, i, a) {
return i * ((t = t / a - 1) * t * t * t * t + 1) + n
},
easeInOutQuint: function(e, t, n, i, a) {
return (t /= a / 2) < 1 ? i / 2 * t * t * t * t * t + n : i / 2 * ((t -= 2) * t * t * t * t + 2) + n
},
easeInSine: function(e, t, n, i, a) {
return -i * Math.cos(t / a * (Math.PI / 2)) + i + n
},
easeOutSine: function(e, t, n, i, a) {
return i * Math.sin(t / a * (Math.PI / 2)) + n
},
easeInOutSine: function(e, t, n, i, a) {
return -i / 2 * (Math.cos(Math.PI * t / a) - 1) + n
},
easeInExpo: function(e, t, n, i, a) {
return 0 == t ? n : i * Math.pow(2, 10 * (t / a - 1)) + n
},
easeOutExpo: function(e, t, n, i, a) {
return t == a ? n + i : i * (1 - Math.pow(2, -10 * t / a)) + n
},
easeInOutExpo: function(e, t, n, i, a) {
return 0 == t ? n : t == a ? n + i : (t /= a / 2) < 1 ? i / 2 * Math.pow(2, 10 * (t - 1)) + n : i / 2 * (2 - Math.pow(2, -10 * --t)) + n
},
easeInCirc: function(e, t, n, i, a) {
return -i * (Math.sqrt(1 - (t /= a) * t) - 1) + n
},
easeOutCirc: function(e, t, n, i, a) {
return i * Math.sqrt(1 - (t = t / a - 1) * t) + n
},
easeInOutCirc: function(e, t, n, i, a) {
return (t /= a / 2) < 1 ? -i / 2 * (Math.sqrt(1 - t * t) - 1) + n : i / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + n
},
easeInElastic: function(e, t, n, i, a) {
var o = 1.70158,
r = 0,
s = i;
if (0 == t) return n;
if (1 == (t /= a)) return n + i;
if (r || (r = .3 * a), s < Math.abs(i)) {
s = i;
o = r / 4
} else o = r / (2 * Math.PI) * Math.asin(i / s);
return -s * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * a - o) * (2 * Math.PI) / r) + n
},
easeOutElastic: function(e, t, n, i, a) {
var o = 1.70158,
r = 0,
s = i;
if (0 == t) return n;
if (1 == (t /= a)) return n + i;
if (r || (r = .3 * a), s < Math.abs(i)) {
s = i;
o = r / 4
} else o = r / (2 * Math.PI) * Math.asin(i / s);
return s * Math.pow(2, -10 * t) * Math.sin((t * a - o) * (2 * Math.PI) / r) + i + n
},
easeInOutElastic: function(e, t, n, i, a) {
var o = 1.70158,
r = 0,
s = i;
if (0 == t) return n;
if (2 == (t /= a / 2)) return n + i;
if (r || (r = a * (.3 * 1.5)), s < Math.abs(i)) {
s = i;
o = r / 4
} else o = r / (2 * Math.PI) * Math.asin(i / s);
return t < 1 ? s * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * a - o) * (2 * Math.PI) / r) * -.5 + n : s * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * a - o) * (2 * Math.PI) / r) * .5 + i + n
},
easeInBack: function(e, t, n, i, a, o) {
return null == o && (o = 1.70158), i * (t /= a) * t * ((o + 1) * t - o) + n
},
easeOutBack: function(e, t, n, i, a, o) {
return null == o && (o = 1.70158), i * ((t = t / a - 1) * t * ((o + 1) * t + o) + 1) + n
},
easeInOutBack: function(e, t, n, i, a, o) {
return null == o && (o = 1.70158), (t /= a / 2) < 1 ? i / 2 * (t * t * ((1 + (o *= 1.525)) * t - o)) + n : i / 2 * ((t -= 2) * t * ((1 + (o *= 1.525)) * t + o) + 2) + n
},
easeInBounce: function(e, t, n, i, a) {
return i - jQuery.easing.easeOutBounce(e, a - t, 0, i, a) + n
},
easeOutBounce: function(e, t, n, i, a) {
return (t /= a) < 1 / 2.75 ? i * (7.5625 * t * t) + n : t < 2 / 2.75 ? i * (7.5625 * (t -= 1.5 / 2.75) * t + .75) + n : t < 2.5 / 2.75 ? i * (7.5625 * (t -= 2.25 / 2.75) * t + .9375) + n : i * (7.5625 * (t -= 2.625 / 2.75) * t + .984375) + n
},
easeInOutBounce: function(e, t, n, i, a) {
return t < a / 2 ? .5 * jQuery.easing.easeInBounce(e, 2 * t, 0, i, a) + n : .5 * jQuery.easing.easeOutBounce(e, 2 * t - a, 0, i, a) + .5 * i + n
}
}),
function(a, n, z, p) {
"use strict";
var o = z("html"),
r = z(a),
c = z(n),
W = z.fancybox = function() {
W.open.apply(this, arguments)
},
s = navigator.userAgent.match(/msie/i),
l = null,
d = n.createTouch !== p,
f = function(e) {
return e && e.hasOwnProperty && e instanceof z
},
h = function(e) {
return e && "string" === z.type(e)
},
L = function(e) {
return h(e) && 0 < e.indexOf("%")
},
H = function(e, t) {
var n = parseInt(e, 10) || 0;
return t && L(e) && (n = W.getViewport()[t] / 100 * n), Math.ceil(n)
},
j = function(e, t) {
return H(e, t) + "px"
};
z.extend(W, {
version: "2.1.5",
defaults: {
padding: 15,
margin: 20,
width: 800,
height: 600,
minWidth: 100,
minHeight: 100,
maxWidth: 9999,
maxHeight: 9999,
pixelRatio: 1,
autoSize: !0,
autoHeight: !1,
autoWidth: !1,
autoResize: !0,
autoCenter: !d,
fitToView: !0,
aspectRatio: !1,
topRatio: .5,
leftRatio: .5,
scrolling: "auto",
wrapCSS: "",
arrows: !0,
closeBtn: !0,
closeClick: !1,
nextClick: !1,
mouseWheel: !0,
autoPlay: !1,
playSpeed: 3e3,
preload: 3,
modal: !1,
loop: !0,
ajax: {
dataType: "html",
headers: {
"X-fancyBox": !0
}
},
iframe: {
scrolling: "auto",
preload: !0
},
swf: {
wmode: "transparent",
allowfullscreen: "true",
allowscriptaccess: "always"
},
keys: {
next: {
13: "left",
34: "up",
39: "left",
40: "up"
},
prev: {
8: "right",
33: "down",
37: "right",
38: "down"
},
close: [27],
play: [32],
toggle: [70]
},
direction: {
next: "left",
prev: "right"
},
scrollOutside: !0,
index: 0,
type: null,
href: null,
content: null,
title: null,
tpl: {
wrap: '
',
image: '',
iframe: '",
error: '
The requested content cannot be loaded. Please try again later.
',
closeBtn: '',
next: '',
prev: ''
},
openEffect: "fade",
openSpeed: 250,
openEasing: "swing",
openOpacity: !0,
openMethod: "zoomIn",
closeEffect: "fade",
closeSpeed: 250,
closeEasing: "swing",
closeOpacity: !0,
closeMethod: "zoomOut",
nextEffect: "elastic",
nextSpeed: 250,
nextEasing: "swing",
nextMethod: "changeIn",
prevEffect: "elastic",
prevSpeed: 250,
prevEasing: "swing",
prevMethod: "changeOut",
helpers: {
overlay: !0,
title: !0
},
onCancel: z.noop,
beforeLoad: z.noop,
afterLoad: z.noop,
beforeShow: z.noop,
afterShow: z.noop,
beforeChange: z.noop,
beforeClose: z.noop,
afterClose: z.noop
},
group: {},
opts: {},
previous: null,
coming: null,
current: null,
isActive: !1,
isOpen: !1,
isOpened: !1,
wrap: null,
skin: null,
outer: null,
inner: null,
player: {
timer: null,
isActive: !1
},
ajaxLoad: null,
imgPreload: null,
transitions: {},
helpers: {},
open: function(d, u) {
if (d && (z.isPlainObject(u) || (u = {}), !1 !== W.close(!0))) return z.isArray(d) || (d = f(d) ? z(d).get() : [d]), z.each(d, function(e, t) {
var n, i, a, o, r, s, l, c = {};
"object" === z.type(t) && (t.nodeType && (t = z(t)), f(t) ? (c = {
href: t.data("fancybox-href") || t.attr("href"),
title: t.data("fancybox-title") || t.attr("title"),
isDom: !0,
element: t
}, z.metadata && z.extend(!0, c, t.metadata())) : c = t), n = u.href || c.href || (h(t) ? t : null), i = u.title !== p ? u.title : c.title || "", !(o = (a = u.content || c.content) ? "html" : u.type || c.type) && c.isDom && ((o = t.data("fancybox-type")) || (o = (r = t.prop("class").match(/fancybox\.(\w+)/)) ? r[1] : null)), h(n) && (o || (W.isImage(n) ? o = "image" : W.isSWF(n) ? o = "swf" : "#" === n.charAt(0) ? o = "inline" : h(t) && (o = "html", a = t)), "ajax" === o && (n = (s = n.split(/\s+/, 2)).shift(), l = s.shift())), a || ("inline" === o ? n ? a = z(h(n) ? n.replace(/.*(?=#[^\s]+$)/, "") : n) : c.isDom && (a = t) : "html" === o ? a = n : o || n || !c.isDom || (o = "inline", a = t)), z.extend(c, {
href: n,
type: o,
content: a,
title: i,
selector: l
}), d[e] = c
}), W.opts = z.extend(!0, {}, W.defaults, u), u.keys !== p && (W.opts.keys = !!u.keys && z.extend({}, W.defaults.keys, u.keys)), W.group = d, W._start(W.opts.index)
},
cancel: function() {
var e = W.coming;
e && !1 !== W.trigger("onCancel") && (W.hideLoading(), W.ajaxLoad && W.ajaxLoad.abort(), W.ajaxLoad = null, W.imgPreload && (W.imgPreload.onload = W.imgPreload.onerror = null), e.wrap && e.wrap.stop(!0, !0).trigger("onReset").remove(), W.coming = null, W.current || W._afterZoomOut(e))
},
close: function(e) {
W.cancel(), !1 !== W.trigger("beforeClose") && (W.unbindEvents(), W.isActive && (W.isOpen && !0 !== e ? (W.isOpen = W.isOpened = !1, W.isClosing = !0, z(".fancybox-item, .fancybox-nav").remove(), W.wrap.stop(!0, !0).removeClass("fancybox-opened"), W.transitions[W.current.closeMethod]()) : (z(".fancybox-wrap").stop(!0).trigger("onReset").remove(), W._afterZoomOut())))
},
play: function(e) {
var t = function() {
clearTimeout(W.player.timer)
},
n = function() {
t(), W.current && W.player.isActive && (W.player.timer = setTimeout(W.next, W.current.playSpeed))
},
i = function() {
t(), c.unbind(".player"), W.player.isActive = !1, W.trigger("onPlayEnd")
};
!0 === e || !W.player.isActive && !1 !== e ? W.current && (W.current.loop || W.current.index < W.group.length - 1) && (W.player.isActive = !0, c.bind({
"onCancel.player beforeClose.player": i,
"onUpdate.player": n,
"beforeLoad.player": t
}), n(), W.trigger("onPlayStart")) : i()
},
next: function(e) {
var t = W.current;
t && (h(e) || (e = t.direction.next), W.jumpto(t.index + 1, e, "next"))
},
prev: function(e) {
var t = W.current;
t && (h(e) || (e = t.direction.prev), W.jumpto(t.index - 1, e, "prev"))
},
jumpto: function(e, t, n) {
var i = W.current;
i && (e = H(e), W.direction = t || i.direction[e >= i.index ? "next" : "prev"], W.router = n || "jumpto", i.loop && (e < 0 && (e = i.group.length + e % i.group.length), e %= i.group.length), i.group[e] !== p && (W.cancel(), W._start(e)))
},
reposition: function(e, t) {
var n, i = W.current,
a = i ? i.wrap : null;
a && (n = W._getPosition(t), e && "scroll" === e.type ? (delete n.position, a.stop(!0, !0).animate(n, 200)) : (a.css(n), i.pos = z.extend({}, i.dim, n)))
},
update: function(t) {
var n = t && t.type,
i = !n || "orientationchange" === n;
i && (clearTimeout(l), l = null), W.isOpen && !l && (l = setTimeout(function() {
var e = W.current;
e && !W.isClosing && (W.wrap.removeClass("fancybox-tmp"), (i || "load" === n || "resize" === n && e.autoResize) && W._setDimension(), "scroll" === n && e.canShrink || W.reposition(t), W.trigger("onUpdate"), l = null)
}, i && !d ? 0 : 300))
},
toggle: function(e) {
W.isOpen && (W.current.fitToView = "boolean" === z.type(e) ? e : !W.current.fitToView, d && (W.wrap.removeAttr("style").addClass("fancybox-tmp"), W.trigger("onUpdate")), W.update())
},
hideLoading: function() {
c.unbind(".loading"), z("#fancybox-loading").remove()
},
showLoading: function() {
var e, t;
W.hideLoading(), e = z('
').click(W.cancel).appendTo("body"), c.bind("keydown.loading", function(e) {
27 === (e.which || e.keyCode) && (e.preventDefault(), W.cancel())
}), W.defaults.fixed || (t = W.getViewport(), e.css({
position: "absolute",
top: .5 * t.h + t.y,
left: .5 * t.w + t.x
}))
},
getViewport: function() {
var e = W.current && W.current.locked || !1,
t = {
x: r.scrollLeft(),
y: r.scrollTop()
};
return e ? (t.w = e[0].clientWidth, t.h = e[0].clientHeight) : (t.w = d && a.innerWidth ? a.innerWidth : r.width(), t.h = d && a.innerHeight ? a.innerHeight : r.height()), t
},
unbindEvents: function() {
W.wrap && f(W.wrap) && W.wrap.unbind(".fb"), c.unbind(".fb"), r.unbind(".fb")
},
bindEvents: function() {
var t, l = W.current;
l && (r.bind("orientationchange.fb" + (d ? "" : " resize.fb") + (l.autoCenter && !l.locked ? " scroll.fb" : ""), W.update), (t = l.keys) && c.bind("keydown.fb", function(n) {
var i = n.which || n.keyCode,
e = n.target || n.srcElement;
if (27 === i && W.coming) return !1;
n.ctrlKey || n.altKey || n.shiftKey || n.metaKey || e && (e.type || z(e).is("[contenteditable]")) || z.each(t, function(e, t) {
return 1 < l.group.length && t[i] !== p ? (W[e](t[i]), n.preventDefault(), !1) : -1 < z.inArray(i, t) ? (W[e](), n.preventDefault(), !1) : void 0
})
}), z.fn.mousewheel && l.mouseWheel && W.wrap.bind("mousewheel.fb", function(e, t, n, i) {
for (var a, o = e.target || null, r = z(o), s = !1; r.length && !(s || r.is(".fancybox-skin") || r.is(".fancybox-wrap"));) s = (a = r[0]) && !(a.style.overflow && "hidden" === a.style.overflow) && (a.clientWidth && a.scrollWidth > a.clientWidth || a.clientHeight && a.scrollHeight > a.clientHeight), r = z(r).parent();
0 === t || s || 1 < W.group.length && !l.canShrink && (0 < i || 0 < n ? W.prev(0 < i ? "down" : "left") : (i < 0 || n < 0) && W.next(i < 0 ? "up" : "right"), e.preventDefault())
}))
},
trigger: function(n, e) {
var t, i = e || W.coming || W.current;
if (i) {
if (z.isFunction(i[n]) && (t = i[n].apply(i, Array.prototype.slice.call(arguments, 1))), !1 === t) return !1;
i.helpers && z.each(i.helpers, function(e, t) {
t && W.helpers[e] && z.isFunction(W.helpers[e][n]) && W.helpers[e][n](z.extend(!0, {}, W.helpers[e].defaults, t), i)
}), c.trigger(n)
}
},
isImage: function(e) {
return h(e) && e.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)
},
isSWF: function(e) {
return h(e) && e.match(/\.(swf)((\?|#).*)?$/i)
},
_start: function(e) {
var t, n, i, a, o, r = {};
if (e = H(e), !(t = W.group[e] || null)) return !1;
if (a = (r = z.extend(!0, {}, W.opts, t)).margin, o = r.padding, "number" === z.type(a) && (r.margin = [a, a, a, a]), "number" === z.type(o) && (r.padding = [o, o, o, o]), r.modal && z.extend(!0, r, {
closeBtn: !1,
closeClick: !1,
nextClick: !1,
arrows: !1,
mouseWheel: !1,
keys: null,
helpers: {
overlay: {
closeClick: !1
}
}
}), r.autoSize && (r.autoWidth = r.autoHeight = !0), "auto" === r.width && (r.autoWidth = !0), "auto" === r.height && (r.autoHeight = !0), r.group = W.group, r.index = e, W.coming = r, !1 !== W.trigger("beforeLoad")) {
if (i = r.type, n = r.href, !i) return W.coming = null, !(!W.current || !W.router || "jumpto" === W.router) && (W.current.index = e, W[W.router](W.direction));
if (W.isActive = !0, "image" !== i && "swf" !== i || (r.autoHeight = r.autoWidth = !1, r.scrolling = "visible"), "image" === i && (r.aspectRatio = !0), "iframe" === i && d && (r.scrolling = "scroll"), r.wrap = z(r.tpl.wrap).addClass("fancybox-" + (d ? "mobile" : "desktop") + " fancybox-type-" + i + " fancybox-tmp " + r.wrapCSS).appendTo(r.parent || "body"), z.extend(r, {
skin: z(".fancybox-skin", r.wrap),
outer: z(".fancybox-outer", r.wrap),
inner: z(".fancybox-inner", r.wrap)
}), z.each(["Top", "Right", "Bottom", "Left"], function(e, t) {
r.skin.css("padding" + t, j(r.padding[e]))
}), W.trigger("onReady"), "inline" === i || "html" === i) {
if (!r.content || !r.content.length) return W._error("content")
} else if (!n) return W._error("href");
"image" === i ? W._loadImage() : "ajax" === i ? W._loadAjax() : "iframe" === i ? W._loadIframe() : W._afterLoad()
} else W.coming = null
},
_error: function(e) {
z.extend(W.coming, {
type: "html",
autoWidth: !0,
autoHeight: !0,
minWidth: 0,
minHeight: 0,
scrolling: "no",
hasError: e,
content: W.coming.tpl.error
}), W._afterLoad()
},
_loadImage: function() {
var e = W.imgPreload = new Image;
e.onload = function() {
this.onload = this.onerror = null, W.coming.width = this.width / W.opts.pixelRatio, W.coming.height = this.height / W.opts.pixelRatio, W._afterLoad()
}, e.onerror = function() {
this.onload = this.onerror = null, W._error("image")
}, e.src = W.coming.href, !0 !== e.complete && W.showLoading()
},
_loadAjax: function() {
var n = W.coming;
W.showLoading(), W.ajaxLoad = z.ajax(z.extend({}, n.ajax, {
url: n.href,
error: function(e, t) {
W.coming && "abort" !== t ? W._error("ajax", e) : W.hideLoading()
},
success: function(e, t) {
"success" === t && (n.content = e, W._afterLoad())
}
}))
},
_loadIframe: function() {
var e = W.coming,
t = z(e.tpl.iframe.replace(/\{rnd\}/g, (new Date).getTime())).attr("scrolling", d ? "auto" : e.iframe.scrolling).attr("src", e.href);
z(e.wrap).bind("onReset", function() {
try {
z(this).find("iframe").hide().attr("src", "//about:blank").end().empty()
} catch (e) {}
}), e.iframe.preload && (W.showLoading(), t.one("load", function() {
z(this).data("ready", 1), d || z(this).bind("load.fb", W.update), z(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show(), W._afterLoad()
})), e.content = t.appendTo(e.inner), e.iframe.preload || W._afterLoad()
},
_preloadImages: function() {
var e, t, n = W.group,
i = W.current,
a = n.length,
o = i.preload ? Math.min(i.preload, a - 1) : 0;
for (t = 1; t <= o; t += 1) "image" === (e = n[(i.index + t) % a]).type && e.href && ((new Image).src = e.href)
},
_afterLoad: function() {
var e, n, t, i, a, o, r = W.coming,
s = W.current,
l = "fancybox-placeholder";
if (W.hideLoading(), r && !1 !== W.isActive) {
if (!1 === W.trigger("afterLoad", r, s)) return r.wrap.stop(!0).trigger("onReset").remove(), void(W.coming = null);
switch (s && (W.trigger("beforeChange", s), s.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove()), W.unbindEvents(), n = (e = r).content, t = r.type, i = r.scrolling, z.extend(W, {
wrap: e.wrap,
skin: e.skin,
outer: e.outer,
inner: e.inner,
current: e,
previous: s
}), a = e.href, t) {
case "inline":
case "ajax":
case "html":
e.selector ? n = z("
").html(n).find(e.selector) : f(n) && (n.data(l) || n.data(l, z('').insertAfter(n).hide()), n = n.show().detach(), e.wrap.bind("onReset", function() {
z(this).find(n).length && n.hide().replaceAll(n.data(l)).data(l, !1)
}));
break;
case "image":
n = e.tpl.image.replace("{href}", a);
break;
case "swf":
n = '"
}
f(n) && n.parent().is(e.inner) || e.inner.append(n), W.trigger("beforeShow"), e.inner.css("overflow", "yes" === i ? "scroll" : "no" === i ? "hidden" : i), W._setDimension(), W.reposition(), W.isOpen = !1, W.coming = null, W.bindEvents(), W.isOpened ? s.prevMethod && W.transitions[s.prevMethod]() : z(".fancybox-wrap").not(e.wrap).stop(!0).trigger("onReset").remove(), W.transitions[W.isOpened ? e.nextMethod : e.openMethod](), W._preloadImages()
}
},
_setDimension: function() {
var e, t, n, i, a, o, r, s, l, c, d, u, p, f, h, m, g, v = W.getViewport(),
y = 0,
b = W.wrap,
w = W.skin,
x = W.inner,
C = W.current,
k = C.width,
S = C.height,
T = C.minWidth,
P = C.minHeight,
E = C.maxWidth,
M = C.maxHeight,
O = C.scrolling,
A = C.scrollOutside ? C.scrollbarWidth : 0,
$ = C.margin,
I = H($[1] + $[3]),
N = H($[0] + $[2]);
if (b.add(w).add(x).width("auto").height("auto").removeClass("fancybox-tmp"), a = I + (n = H(w.outerWidth(!0) - w.width())), o = N + (i = H(w.outerHeight(!0) - w.height())), r = L(k) ? (v.w - a) * H(k) / 100 : k, s = L(S) ? (v.h - o) * H(S) / 100 : S, "iframe" === C.type) {
if (m = C.content, C.autoHeight && 1 === m.data("ready")) try {
m[0].contentWindow.document.location && (x.width(r).height(9999), g = m.contents().find("body"), A && g.css("overflow-x", "hidden"), s = g.outerHeight(!0))
} catch (e) {}
} else(C.autoWidth || C.autoHeight) && (x.addClass("fancybox-tmp"), C.autoWidth || x.width(r), C.autoHeight || x.height(s), C.autoWidth && (r = x.width()), C.autoHeight && (s = x.height()), x.removeClass("fancybox-tmp"));
if (k = H(r), S = H(s), d = r / s, T = H(L(T) ? H(T, "w") - a : T), E = H(L(E) ? H(E, "w") - a : E), P = H(L(P) ? H(P, "h") - o : P), l = E, c = M = H(L(M) ? H(M, "h") - o : M), C.fitToView && (E = Math.min(v.w - a, E), M = Math.min(v.h - o, M)), f = v.w - I, h = v.h - N, C.aspectRatio ? (E < k && (S = H((k = E) / d)), M < S && (k = H((S = M) * d)), k < T && (S = H((k = T) / d)), S < P && (k = H((S = P) * d))) : (k = Math.max(T, Math.min(k, E)), C.autoHeight && "iframe" !== C.type && (x.width(k), S = x.height()), S = Math.max(P, Math.min(S, M))), C.fitToView)
if (x.width(k).height(S), b.width(k + n), u = b.width(), p = b.height(), C.aspectRatio)
for (;
(f < u || h < p) && T < k && P < S && !(19 < y++);) S = Math.max(P, Math.min(M, S - 10)), (k = H(S * d)) < T && (S = H((k = T) / d)), E < k && (S = H((k = E) / d)), x.width(k).height(S), b.width(k + n), u = b.width(), p = b.height();
else k = Math.max(T, Math.min(k, k - (u - f))), S = Math.max(P, Math.min(S, S - (p - h)));
A && "auto" === O && S < s && k + n + A < f && (k += A), x.width(k).height(S), b.width(k + n), u = b.width(), p = b.height(), e = (f < u || h < p) && T < k && P < S, t = C.aspectRatio ? k < l && S < c && k < r && S < s : (k < l || S < c) && (k < r || S < s), z.extend(C, {
dim: {
width: j(u),
height: j(p)
},
origWidth: r,
origHeight: s,
canShrink: e,
canExpand: t,
wPadding: n,
hPadding: i,
wrapSpace: p - w.outerHeight(!0),
skinSpace: w.height() - S
}), !m && C.autoHeight && P < S && S < M && !t && x.height("auto")
},
_getPosition: function(e) {
var t = W.current,
n = W.getViewport(),
i = t.margin,
a = W.wrap.width() + i[1] + i[3],
o = W.wrap.height() + i[0] + i[2],
r = {
position: "absolute",
top: i[0],
left: i[3]
};
return t.autoCenter && t.fixed && !e && o <= n.h && a <= n.w ? r.position = "fixed" : t.locked || (r.top += n.y, r.left += n.x), r.top = j(Math.max(r.top, r.top + (n.h - o) * t.topRatio)), r.left = j(Math.max(r.left, r.left + (n.w - a) * t.leftRatio)), r
},
_afterZoomIn: function() {
var t = W.current;
t && (W.isOpen = W.isOpened = !0, W.wrap.css("overflow", "visible").addClass("fancybox-opened"), W.update(), (t.closeClick || t.nextClick && 1 < W.group.length) && W.inner.css("cursor", "pointer").bind("click.fb", function(e) {
z(e.target).is("a") || z(e.target).parent().is("a") || (e.preventDefault(), W[t.closeClick ? "close" : "next"]())
}), t.closeBtn && z(t.tpl.closeBtn).appendTo(W.skin).bind("click.fb", function(e) {
e.preventDefault(), W.close()
}), t.arrows && 1 < W.group.length && ((t.loop || 0 < t.index) && z(t.tpl.prev).appendTo(W.outer).bind("click.fb", W.prev), (t.loop || t.index < W.group.length - 1) && z(t.tpl.next).appendTo(W.outer).bind("click.fb", W.next)), W.trigger("afterShow"), t.loop || t.index !== t.group.length - 1 ? W.opts.autoPlay && !W.player.isActive && (W.opts.autoPlay = !1, W.play()) : W.play(!1))
},
_afterZoomOut: function(e) {
e = e || W.current, z(".fancybox-wrap").trigger("onReset").remove(), z.extend(W, {
group: {},
opts: {},
router: !1,
current: null,
isActive: !1,
isOpened: !1,
isOpen: !1,
isClosing: !1,
wrap: null,
skin: null,
outer: null,
inner: null
}), W.trigger("afterClose", e)
}
}), W.transitions = {
getOrigPosition: function() {
var e = W.current,
t = e.element,
n = e.orig,
i = {},
a = 50,
o = 50,
r = e.hPadding,
s = e.wPadding,
l = W.getViewport();
return !n && e.isDom && t.is(":visible") && ((n = t.find("img:first")).length || (n = t)), f(n) ? (i = n.offset(), n.is("img") && (a = n.outerWidth(), o = n.outerHeight())) : (i.top = l.y + (l.h - o) * e.topRatio, i.left = l.x + (l.w - a) * e.leftRatio), ("fixed" === W.wrap.css("position") || e.locked) && (i.top -= l.y, i.left -= l.x), i = {
top: j(i.top - r * e.topRatio),
left: j(i.left - s * e.leftRatio),
width: j(a + s),
height: j(o + r)
}
},
step: function(e, t) {
var n, i, a = t.prop,
o = W.current,
r = o.wrapSpace,
s = o.skinSpace;
"width" !== a && "height" !== a || (n = t.end === t.start ? 1 : (e - t.start) / (t.end - t.start), W.isClosing && (n = 1 - n), i = e - ("width" === a ? o.wPadding : o.hPadding), W.skin[a](H("width" === a ? i : i - r * n)), W.inner[a](H("width" === a ? i : i - r * n - s * n)))
},
zoomIn: function() {
var e = W.current,
t = e.pos,
n = e.openEffect,
i = "elastic" === n,
a = z.extend({
opacity: 1
}, t);
delete a.position, i ? (t = this.getOrigPosition(), e.openOpacity && (t.opacity = .1)) : "fade" === n && (t.opacity = .1), W.wrap.css(t).animate(a, {
duration: "none" === n ? 0 : e.openSpeed,
easing: e.openEasing,
step: i ? this.step : null,
complete: W._afterZoomIn
})
},
zoomOut: function() {
var e = W.current,
t = e.closeEffect,
n = "elastic" === t,
i = {
opacity: .1
};
n && (i = this.getOrigPosition(), e.closeOpacity && (i.opacity = .1)), W.wrap.animate(i, {
duration: "none" === t ? 0 : e.closeSpeed,
easing: e.closeEasing,
step: n ? this.step : null,
complete: W._afterZoomOut
})
},
changeIn: function() {
var e, t = W.current,
n = t.nextEffect,
i = t.pos,
a = {
opacity: 1
},
o = W.direction;
i.opacity = .1, "elastic" === n && (e = "down" === o || "up" === o ? "top" : "left", "down" === o || "right" === o ? (i[e] = j(H(i[e]) - 200), a[e] = "+=200px") : (i[e] = j(H(i[e]) + 200), a[e] = "-=200px")), "none" === n ? W._afterZoomIn() : W.wrap.css(i).animate(a, {
duration: t.nextSpeed,
easing: t.nextEasing,
complete: W._afterZoomIn
})
},
changeOut: function() {
var e = W.previous,
t = e.prevEffect,
n = {
opacity: .1
},
i = W.direction;
"elastic" === t && (n["down" === i || "up" === i ? "top" : "left"] = ("up" === i || "left" === i ? "-" : "+") + "=200px"), e.wrap.animate(n, {
duration: "none" === t ? 0 : e.prevSpeed,
easing: e.prevEasing,
complete: function() {
z(this).trigger("onReset").remove()
}
})
}
}, W.helpers.overlay = {
defaults: {
closeClick: !0,
speedOut: 200,
showEarly: !0,
css: {},
locked: !d,
fixed: !0
},
overlay: null,
fixed: !1,
el: z("html"),
create: function(e) {
e = z.extend({}, this.defaults, e), this.overlay && this.close(), this.overlay = z('').appendTo(W.coming ? W.coming.parent : e.parent), this.fixed = !1, e.fixed && W.defaults.fixed && (this.overlay.addClass("fancybox-overlay-fixed"), this.fixed = !0)
},
open: function(e) {
var t = this;
e = z.extend({}, this.defaults, e), this.overlay ? this.overlay.unbind(".overlay").width("auto").height("auto") : this.create(e), this.fixed || (r.bind("resize.overlay", z.proxy(this.update, this)), this.update()), e.closeClick && this.overlay.bind("click.overlay", function(e) {
if (z(e.target).hasClass("fancybox-overlay")) return W.isActive ? W.close() : t.close(), !1
}), this.overlay.css(e.css).show()
},
close: function() {
var e, t;
r.unbind("resize.overlay"), this.el.hasClass("fancybox-lock") && (z(".fancybox-margin").removeClass("fancybox-margin"), e = r.scrollTop(), t = r.scrollLeft(), this.el.removeClass("fancybox-lock"), r.scrollTop(e).scrollLeft(t)), z(".fancybox-overlay").remove().hide(), z.extend(this, {
overlay: null,
fixed: !1
})
},
update: function() {
var e, t = "100%";
this.overlay.width(t).height("100%"), s ? (e = Math.max(n.documentElement.offsetWidth, n.body.offsetWidth), c.width() > e && (t = c.width())) : c.width() > r.width() && (t = c.width()), this.overlay.width(t).height(c.height())
},
onReady: function(e, t) {
var n = this.overlay;
z(".fancybox-overlay").stop(!0, !0), n || this.create(e), e.locked && this.fixed && t.fixed && (n || (this.margin = c.height() > r.height() && z("html").css("margin-right").replace("px", "")), t.locked = this.overlay.append(t.wrap), t.fixed = !1), !0 === e.showEarly && this.beforeShow.apply(this, arguments)
},
beforeShow: function(e, t) {
var n, i;
t.locked && (!1 !== this.margin && (z("*").filter(function() {
return "fixed" === z(this).css("position") && !z(this).hasClass("fancybox-overlay") && !z(this).hasClass("fancybox-wrap")
}).addClass("fancybox-margin"), this.el.addClass("fancybox-margin")), n = r.scrollTop(), i = r.scrollLeft(), this.el.addClass("fancybox-lock"), r.scrollTop(n).scrollLeft(i)), this.open(e)
},
onUpdate: function() {
this.fixed || this.update()
},
afterClose: function(e) {
this.overlay && !W.coming && this.overlay.fadeOut(e.speedOut, z.proxy(this.close, this))
}
}, W.helpers.title = {
defaults: {
type: "float",
position: "bottom"
},
beforeShow: function(e) {
var t, n, i = W.current,
a = i.title,
o = e.type;
if (z.isFunction(a) && (a = a.call(i.element, i)), h(a) && "" !== z.trim(a)) {
switch (t = z('
' + a + "
"), o) {
case "inside":
n = W.skin;
break;
case "outside":
n = W.wrap;
break;
case "over":
n = W.inner;
break;
default:
n = W.skin, t.appendTo("body"), s && t.width(t.width()), t.wrapInner(''), W.current.margin[2] += Math.abs(H(t.css("margin-bottom")))
}
t["top" === e.position ? "prependTo" : "appendTo"](n)
}
}
}, z.fn.fancybox = function(o) {
var r, s = z(this),
l = this.selector || "",
e = function(e) {
var t, n, i = z(this).blur(),
a = r;
e.ctrlKey || e.altKey || e.shiftKey || e.metaKey || i.is(".fancybox-wrap") || (t = o.groupAttr || "data-fancybox-group", (n = i.attr(t)) || (t = "rel", n = i.get(0)[t]), n && "" !== n && "nofollow" !== n && (a = (i = (i = l.length ? z(l) : s).filter("[" + t + '="' + n + '"]')).index(this)), o.index = a, !1 !== W.open(i, o) && e.preventDefault())
};
return r = (o = o || {}).index || 0, l && !1 !== o.live ? c.undelegate(l, "click.fb-start").delegate(l + ":not('.fancybox-item, .fancybox-nav')", "click.fb-start", e) : s.unbind("click.fb-start").bind("click.fb-start", e), this.filter("[data-fancybox-start=1]").trigger("click"), this
}, c.ready(function() {
var e, t, n, i;
z.scrollbarWidth === p && (z.scrollbarWidth = function() {
var e = z('
').appendTo("body"),
t = e.children(),
n = t.innerWidth() - t.height(99).innerWidth();
return e.remove(), n
}), z.support.fixedPosition === p && (z.support.fixedPosition = (n = z('').appendTo("body"), i = 20 === n[0].offsetTop || 15 === n[0].offsetTop, n.remove(), i)), z.extend(W.defaults, {
scrollbarWidth: z.scrollbarWidth(),
fixed: z.support.fixedPosition,
parent: z("body")
}), e = z(a).width(), o.addClass("fancybox-lock-test"), t = z(a).width(), o.removeClass("fancybox-lock-test"), z("").appendTo("head")
})
}(window, document, jQuery),
function(x) {
x.flexslider = function(f, e) {
var h = x(f);
h.vars = x.extend({}, x.flexslider.defaults, e);
var t, d = h.vars.namespace,
m = window.navigator && window.navigator.msPointerEnabled && window.MSGesture,
u = ("ontouchstart" in window || m || window.DocumentTouch && document instanceof DocumentTouch) && h.vars.touch,
r = "click touchend MSPointerUp",
s = "",
g = "vertical" === h.vars.direction,
v = h.vars.reverse,
y = 0 < h.vars.itemWidth,
b = "fade" === h.vars.animation,
p = "" !== h.vars.asNavFor,
w = {};
x.data(f, "flexslider", h), w = {
init: function() {
h.animating = !1, h.currentSlide = parseInt(h.vars.startAt ? h.vars.startAt : 0, 10), isNaN(h.currentSlide) && (h.currentSlide = 0), h.animatingTo = h.currentSlide, h.atEnd = 0 === h.currentSlide || h.currentSlide === h.last, h.containerSelector = h.vars.selector.substr(0, h.vars.selector.search(" ")), h.slides = x(h.vars.selector, h), h.container = x(h.containerSelector, h), h.count = h.slides.length, h.syncExists = 0 < x(h.vars.sync).length, "slide" === h.vars.animation && (h.vars.animation = "swing"), h.prop = g ? "top" : "marginLeft", h.args = {}, h.manualPause = !1, h.stopped = !1, h.started = !1, h.startTimeout = null, h.transitions = !h.vars.video && !b && h.vars.useCSS && function() {
var e = document.createElement("div"),
t = ["perspectiveProperty", "WebkitPerspective", "MozPerspective", "OPerspective", "msPerspective"];
for (var n in t)
if (void 0 !== e.style[t[n]]) return h.pfx = t[n].replace("Perspective", "").toLowerCase(), h.prop = "-" + h.pfx + "-transform", !0;
return !1
}(), (h.ensureAnimationEnd = "") !== h.vars.controlsContainer && (h.controlsContainer = 0 < x(h.vars.controlsContainer).length && x(h.vars.controlsContainer)), "" !== h.vars.manualControls && (h.manualControls = 0 < x(h.vars.manualControls).length && x(h.vars.manualControls)), h.vars.randomize && (h.slides.sort(function() {
return Math.round(Math.random()) - .5
}), h.container.empty().append(h.slides)), h.doMath(), h.setup("init"), h.vars.controlNav && w.controlNav.setup(), h.vars.directionNav && w.directionNav.setup(), h.vars.keyboard && (1 === x(h.containerSelector).length || h.vars.multipleKeyboard) && x(document).bind("keyup", function(e) {
var t = e.keyCode;
if (!h.animating && (39 === t || 37 === t)) {
var n = 39 === t ? h.getTarget("next") : 37 === t && h.getTarget("prev");
h.flexAnimate(n, h.vars.pauseOnAction)
}
}), h.vars.mousewheel && h.bind("mousewheel", function(e, t) {
e.preventDefault();
var n = t < 0 ? h.getTarget("next") : h.getTarget("prev");
h.flexAnimate(n, h.vars.pauseOnAction)
}), h.vars.pausePlay && w.pausePlay.setup(), h.vars.slideshow && h.vars.pauseInvisible && w.pauseInvisible.init(), h.vars.slideshow && (h.vars.pauseOnHover && h.hover(function() {
h.manualPlay || h.manualPause || h.pause()
}, function() {
h.manualPause || h.manualPlay || h.stopped || h.play()
}), h.vars.pauseInvisible && w.pauseInvisible.isHidden() || (0 < h.vars.initDelay ? h.startTimeout = setTimeout(h.play, h.vars.initDelay) : h.play())), p && w.asNav.setup(), u && h.vars.touch && w.touch(), (!b || b && h.vars.smoothHeight) && x(window).bind("resize orientationchange focus", w.resize), h.find("img").attr("draggable", "false"), setTimeout(function() {
h.vars.start(h)
}, 200)
},
asNav: {
setup: function() {
h.asNav = !0, h.animatingTo = Math.floor(h.currentSlide / h.move), h.currentItem = h.currentSlide, h.slides.removeClass(d + "active-slide").eq(h.currentItem).addClass(d + "active-slide"), m ? (f._slider = h).slides.each(function() {
var e = this;
e._gesture = new MSGesture, (e._gesture.target = e).addEventListener("MSPointerDown", function(e) {
e.preventDefault(), e.currentTarget._gesture && e.currentTarget._gesture.addPointer(e.pointerId)
}, !1), e.addEventListener("MSGestureTap", function(e) {
e.preventDefault();
var t = x(this),
n = t.index();
x(h.vars.asNavFor).data("flexslider").animating || t.hasClass("active") || (h.direction = h.currentItem < n ? "next" : "prev", h.flexAnimate(n, h.vars.pauseOnAction, !1, !0, !0))
})
}) : h.slides.on(r, function(e) {
e.preventDefault();
var t = x(this),
n = t.index();
t.offset().left - x(h).scrollLeft() <= 0 && t.hasClass(d + "active-slide") ? h.flexAnimate(h.getTarget("prev"), !0) : x(h.vars.asNavFor).data("flexslider").animating || t.hasClass(d + "active-slide") || (h.direction = h.currentItem < n ? "next" : "prev", h.flexAnimate(n, h.vars.pauseOnAction, !1, !0, !0))
})
}
},
controlNav: {
setup: function() {
h.manualControls ? w.controlNav.setupManual() : w.controlNav.setupPaging()
},
setupPaging: function() {
var e, t, n = "thumbnails" === h.vars.controlNav ? "control-thumbs" : "control-paging",
i = 1;
if (h.controlNavScaffold = x(''), 1 < h.pagingCount)
for (var a = 0; a < h.pagingCount; a++) {
if (t = h.slides.eq(a), e = "thumbnails" === h.vars.controlNav ? '' : "" + i + "", "thumbnails" === h.vars.controlNav && !0 === h.vars.thumbCaptions) {
var o = t.attr("data-thumbcaption");
"" != o && null != o && (e += '' + o + "")
}
h.controlNavScaffold.append("
" + e + "
"), i++
}
h.controlsContainer ? x(h.controlsContainer).append(h.controlNavScaffold) : h.append(h.controlNavScaffold), w.controlNav.set(), w.controlNav.active(), h.controlNavScaffold.delegate("a, img", r, function(e) {
if (e.preventDefault(), "" === s || s === e.type) {
var t = x(this),
n = h.controlNav.index(t);
t.hasClass(d + "active") || (h.direction = n > h.currentSlide ? "next" : "prev", h.flexAnimate(n, h.vars.pauseOnAction))
}
"" === s && (s = e.type), w.setToClearWatchedEvent()
})
},
setupManual: function() {
h.controlNav = h.manualControls, w.controlNav.active(), h.controlNav.bind(r, function(e) {
if (e.preventDefault(), "" === s || s === e.type) {
var t = x(this),
n = h.controlNav.index(t);
t.hasClass(d + "active") || (h.direction = n > h.currentSlide ? "next" : "prev", h.flexAnimate(n, h.vars.pauseOnAction))
}
"" === s && (s = e.type), w.setToClearWatchedEvent()
})
},
set: function() {
var e = "thumbnails" === h.vars.controlNav ? "img" : "a";
h.controlNav = x("." + d + "control-nav li " + e, h.controlsContainer ? h.controlsContainer : h)
},
active: function() {
h.controlNav.removeClass(d + "active").eq(h.animatingTo).addClass(d + "active")
},
update: function(e, t) {
1 < h.pagingCount && "add" === e ? h.controlNavScaffold.append(x("