function TestaCPF(e) { var t, n; if (t = 0, "00000000000" == e) return !1; for (i = 1; i <= 9; i++) t += parseInt(e.substring(i - 1, i)) * (11 - i); if (10 != (n = 10 * t % 11) && 11 != n || (n = 0), n != parseInt(e.substring(9, 10))) return !1; for (t = 0, i = 1; i <= 10; i++) t += parseInt(e.substring(i - 1, i)) * (12 - i); return 10 != (n = 10 * t % 11) && 11 != n || (n = 0), n == parseInt(e.substring(10, 11)) } function checkCPF(e) { return 0 != TestaCPF(e.replace("-", "").replace(".", "").replace(".", "")) && "111.111.111-11" != e && "222.222.222-22" != e && "333.333.333-33" != e && "444.444.444-44" != e && "555.555.555-55" != e && "666.666.666-66" != e && "777.777.777-77" != e && "888.888.888-88" != e && "999.999.999-99" != e } function checkCEPValid(e) { return !(!$.trim(e) || "00000-000" == e || "11111-111" == e || "22222-222" == e || "33333-333" == e || "44444-444" == e || "55555-555" == e || "66666-666" == e || "77777-777" == e || "88888-888" == e || "99999-999" == e) } function checkEmail(e) { return /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(e) } function getUrlParameter(e) { for (var t = window.location.search.substring(1).split("&"), n = 0; n < t.length; n++) { var i = t[n].split("="); if (i[0] == e) return i[1] } } function openNav() { document.getElementById("myNav").style.height = "100%" } function closeNav() { document.getElementById("myNav").style.height = "0%" } function initialize() { var e = {center: new google.maps.LatLng(-10.9738985, -37.0440566), zoom: 5, mapTypeId: "roadmap", scrollwheel: !1}; map = new google.maps.Map(document.getElementById("map-canvas"), e), infoWindow = new google.maps.InfoWindow, google.maps.event.addListener(map, "click", function () { infoWindow.close() }), displayMarkers() } function displayMarkers() { for (var e = new google.maps.LatLngBounds, t = 0; t < markersData.length; t++) { var n = new google.maps.LatLng(markersData[t].lat, markersData[t].lng); createMarker(n, markersData[t].nome, markersData[t].morada1, markersData[t].morada2, markersData[t].codPostal, markersData[t].icon), e.extend(n) } map.fitBounds(e) } function createMarker(e, t, n, i, r, a) { var s = new google.maps.Marker({map: map, position: e, title: t, icon: a}); google.maps.event.addListener(s, "click", function () { var e = '
' + t + '
' + n + "
" + i + "
" + r + "
"; infoWindow.setContent(e), infoWindow.open(map, s) }) } if (function (e, t) { "object" == typeof module && "object" == typeof module.exports ? module.exports = e.document ? t(e, !0) : function (e) { if (!e.document) throw new Error("jQuery requires a window with a document"); return t(e) } : t(e) }("undefined" != typeof window ? window : this, function (e, t) { function n(e) { var t = e.length, n = ie.type(e); return "function" !== n && !ie.isWindow(e) && (!(1 !== e.nodeType || !t) || ("array" === n || 0 === t || "number" == typeof t && t > 0 && t - 1 in e)) } function i(e, t, n) { if (ie.isFunction(t)) return ie.grep(e, function (e, i) { return !!t.call(e, i, e) !== n }); if (t.nodeType) return ie.grep(e, function (e) { return e === t !== n }); if ("string" == typeof t) { if (ce.test(t)) return ie.filter(t, e, n); t = ie.filter(t, e) } return ie.grep(e, function (e) { return ie.inArray(e, t) >= 0 !== n }) } function r(e, t) { do { e = e[t] } while (e && 1 !== e.nodeType); return e } function a(e) { var t = ye[e] = {}; return ie.each(e.match(ve) || [], function (e, n) { t[n] = !0 }), t } function s() { pe.addEventListener ? (pe.removeEventListener("DOMContentLoaded", o, !1), e.removeEventListener("load", o, !1)) : (pe.detachEvent("onreadystatechange", o), e.detachEvent("onload", o)) } function o() { (pe.addEventListener || "load" === event.type || "complete" === pe.readyState) && (s(), ie.ready()) } function l(e, t, n) { if (void 0 === n && 1 === e.nodeType) { var i = "data-" + t.replace(_e, "-$1").toLowerCase(); if ("string" == typeof (n = e.getAttribute(i))) { try { n = "true" === n || "false" !== n && ("null" === n ? null : +n + "" === n ? +n : ke.test(n) ? ie.parseJSON(n) : n) } catch (e) { } ie.data(e, t, n) } else n = void 0 } return n } function u(e) { var t; for (t in e) if (("data" !== t || !ie.isEmptyObject(e[t])) && "toJSON" !== t) return !1; return !0 } function d(e, t, n, i) { if (ie.acceptData(e)) { var r, a, s = ie.expando, o = e.nodeType, l = o ? ie.cache : e, u = o ? e[s] : e[s] && s; if (u && l[u] && (i || l[u].data) || void 0 !== n || "string" != typeof t) return u || (u = o ? e[s] = U.pop() || ie.guid++ : s), l[u] || (l[u] = o ? {} : {toJSON: ie.noop}), ("object" == typeof t || "function" == typeof t) && (i ? l[u] = ie.extend(l[u], t) : l[u].data = ie.extend(l[u].data, t)), a = l[u], i || (a.data || (a.data = {}), a = a.data), void 0 !== n && (a[ie.camelCase(t)] = n), "string" == typeof t ? null == (r = a[t]) && (r = a[ie.camelCase(t)]) : r = a, r } } function c(e, t, n) { if (ie.acceptData(e)) { var i, r, a = e.nodeType, s = a ? ie.cache : e, o = a ? e[ie.expando] : ie.expando; if (s[o]) { if (t && (i = n ? s[o] : s[o].data)) { ie.isArray(t) ? t = t.concat(ie.map(t, ie.camelCase)) : t in i ? t = [t] : (t = ie.camelCase(t), t = t in i ? [t] : t.split(" ")), r = t.length; for (; r--;) delete i[t[r]]; if (n ? !u(i) : !ie.isEmptyObject(i)) return } (n || (delete s[o].data, u(s[o]))) && (a ? ie.cleanData([e], !0) : te.deleteExpando || s != s.window ? delete s[o] : s[o] = null) } } } function h() { return !0 } function p() { return !1 } function f() { try { return pe.activeElement } catch (e) { } } function m(e) { var t = Ne.split("|"), n = e.createDocumentFragment(); if (n.createElement) for (; t.length;) n.createElement(t.pop()); return n } function g(e, t) { var n, i, r = 0, a = typeof e.getElementsByTagName !== xe ? e.getElementsByTagName(t || "*") : typeof e.querySelectorAll !== xe ? e.querySelectorAll(t || "*") : void 0; if (!a) for (a = [], n = e.childNodes || e; null != (i = n[r]); r++) !t || ie.nodeName(i, t) ? a.push(i) : ie.merge(a, g(i, t)); return void 0 === t || t && ie.nodeName(e, t) ? ie.merge([e], a) : a } function v(e) { Fe.test(e.type) && (e.defaultChecked = e.checked) } function y(e, t) { return ie.nodeName(e, "table") && ie.nodeName(11 !== t.nodeType ? t : t.firstChild, "tr") ? e.getElementsByTagName("tbody")[0] || e.appendChild(e.ownerDocument.createElement("tbody")) : e } function b(e) { return e.type = (null !== ie.find.attr(e, "type")) + "/" + e.type, e } function w(e) { var t = Be.exec(e.type); return t ? e.type = t[1] : e.removeAttribute("type"), e } function x(e, t) { for (var n, i = 0; null != (n = e[i]); i++) ie._data(n, "globalEval", !t || ie._data(t[i], "globalEval")) } function k(e, t) { if (1 === t.nodeType && ie.hasData(e)) { var n, i, r, a = ie._data(e), s = ie._data(t, a), o = a.events; if (o) { delete s.handle, s.events = {}; for (n in o) for (i = 0, r = o[n].length; r > i; i++) ie.event.add(t, n, o[n][i]) } s.data && (s.data = ie.extend({}, s.data)) } } function _(e, t) { var n, i, r; if (1 === t.nodeType) { if (n = t.nodeName.toLowerCase(), !te.noCloneEvent && t[ie.expando]) { r = ie._data(t); for (i in r.events) ie.removeEvent(t, i, r.handle); t.removeAttribute(ie.expando) } "script" === n && t.text !== e.text ? (b(t).text = e.text, w(t)) : "object" === n ? (t.parentNode && (t.outerHTML = e.outerHTML), te.html5Clone && e.innerHTML && !ie.trim(t.innerHTML) && (t.innerHTML = e.innerHTML)) : "input" === n && Fe.test(e.type) ? (t.defaultChecked = t.checked = e.checked, t.value !== e.value && (t.value = e.value)) : "option" === n ? t.defaultSelected = t.selected = e.defaultSelected : ("input" === n || "textarea" === n) && (t.defaultValue = e.defaultValue) } } function C(t, n) { var i, r = ie(n.createElement(t)).appendTo(n.body), a = e.getDefaultComputedStyle && (i = e.getDefaultComputedStyle(r[0])) ? i.display : ie.css(r[0], "display"); return r.detach(), a } function D(e) { var t = pe, n = Ge[e]; return n || ("none" !== (n = C(e, t)) && n || (Qe = (Qe || ie("' : "vimeo" === r.type ? n = '' : "vzaar" === r.type && (n = ''), e('
' + n + "
").insertAfter(i.find(".owl-video")), this._playing = i.addClass("owl-video-playing")) }, r.prototype.isInFullScreen = function () { var t = n.fullscreenElement || n.mozFullScreenElement || n.webkitFullscreenElement; return t && e(t).parent().hasClass("owl-video-frame") }, r.prototype.destroy = function () { var e, t; this._core.$element.off("click.owl.video"); for (e in this._handlers) this._core.$element.off(e, this._handlers[e]); for (t in Object.getOwnPropertyNames(this)) "function" != typeof this[t] && (this[t] = null) }, e.fn.owlCarousel.Constructor.Plugins.Video = r }(window.Zepto || window.jQuery, window, document), function (e, t, n, i) { var r = function (t) { this.core = t, this.core.options = e.extend({}, r.Defaults, this.core.options), this.swapping = !0, this.previous = void 0, this.next = void 0, this.handlers = { "change.owl.carousel": e.proxy(function (e) { e.namespace && "position" == e.property.name && (this.previous = this.core.current(), this.next = e.property.value) }, this), "drag.owl.carousel dragged.owl.carousel translated.owl.carousel": e.proxy(function (e) { e.namespace && (this.swapping = "translated" == e.type) }, this), "translate.owl.carousel": e.proxy(function (e) { e.namespace && this.swapping && (this.core.options.animateOut || this.core.options.animateIn) && this.swap() }, this) }, this.core.$element.on(this.handlers) }; r.Defaults = {animateOut: !1, animateIn: !1}, r.prototype.swap = function () { if (1 === this.core.settings.items && e.support.animation && e.support.transition) { this.core.speed(0); var t, n = e.proxy(this.clear, this), i = this.core.$stage.children().eq(this.previous), r = this.core.$stage.children().eq(this.next), a = this.core.settings.animateIn, s = this.core.settings.animateOut; this.core.current() !== this.previous && (s && (t = this.core.coordinates(this.previous) - this.core.coordinates(this.next), i.one(e.support.animation.end, n).css({left: t + "px"}).addClass("animated owl-animated-out").addClass(s)), a && r.one(e.support.animation.end, n).addClass("animated owl-animated-in").addClass(a)) } }, r.prototype.clear = function (t) { e(t.target).css({left: ""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut), this.core.onTransitionEnd() }, r.prototype.destroy = function () { var e, t; for (e in this.handlers) this.core.$element.off(e, this.handlers[e]); for (t in Object.getOwnPropertyNames(this)) "function" != typeof this[t] && (this[t] = null) }, e.fn.owlCarousel.Constructor.Plugins.Animate = r }(window.Zepto || window.jQuery, window, document), function (e, t, n, i) { var r = function (t) { this._core = t, this._timeout = null, this._paused = !1, this._handlers = { "changed.owl.carousel": e.proxy(function (e) { e.namespace && "settings" === e.property.name ? this._core.settings.autoplay ? this.play() : this.stop() : e.namespace && "position" === e.property.name && this._core.settings.autoplay && this._setAutoPlayInterval() }, this), "initialized.owl.carousel": e.proxy(function (e) { e.namespace && this._core.settings.autoplay && this.play() }, this), "play.owl.autoplay": e.proxy(function (e, t, n) { e.namespace && this.play(t, n) }, this), "stop.owl.autoplay": e.proxy(function (e) { e.namespace && this.stop() }, this), "mouseover.owl.autoplay": e.proxy(function () { this._core.settings.autoplayHoverPause && this._core.is("rotating") && this.pause() }, this), "mouseleave.owl.autoplay": e.proxy(function () { this._core.settings.autoplayHoverPause && this._core.is("rotating") && this.play() }, this), "touchstart.owl.core": e.proxy(function () { this._core.settings.autoplayHoverPause && this._core.is("rotating") && this.pause() }, this), "touchend.owl.core": e.proxy(function () { this._core.settings.autoplayHoverPause && this.play() }, this) }, this._core.$element.on(this._handlers), this._core.options = e.extend({}, r.Defaults, this._core.options) }; r.Defaults = { autoplay: !1, autoplayTimeout: 5e3, autoplayHoverPause: !1, autoplaySpeed: !1 }, r.prototype.play = function (e, t) { this._paused = !1, this._core.is("rotating") || (this._core.enter("rotating"), this._setAutoPlayInterval()) }, r.prototype._getNextTimeout = function (i, r) { return this._timeout && t.clearTimeout(this._timeout), t.setTimeout(e.proxy(function () { this._paused || this._core.is("busy") || this._core.is("interacting") || n.hidden || this._core.next(r || this._core.settings.autoplaySpeed) }, this), i || this._core.settings.autoplayTimeout) }, r.prototype._setAutoPlayInterval = function () { this._timeout = this._getNextTimeout() }, r.prototype.stop = function () { this._core.is("rotating") && (t.clearTimeout(this._timeout), this._core.leave("rotating")) }, r.prototype.pause = function () { this._core.is("rotating") && (this._paused = !0) }, r.prototype.destroy = function () { var e, t; this.stop(); for (e in this._handlers) this._core.$element.off(e, this._handlers[e]); for (t in Object.getOwnPropertyNames(this)) "function" != typeof this[t] && (this[t] = null) }, e.fn.owlCarousel.Constructor.Plugins.autoplay = r }(window.Zepto || window.jQuery, window, document), function (e, t, n, i) { "use strict"; var r = function (t) { this._core = t, this._initialized = !1, this._pages = [], this._controls = {}, this._templates = [], this.$element = this._core.$element, this._overrides = { next: this._core.next, prev: this._core.prev, to: this._core.to }, this._handlers = { "prepared.owl.carousel": e.proxy(function (t) { t.namespace && this._core.settings.dotsData && this._templates.push('
' + e(t.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot") + "
") }, this), "added.owl.carousel": e.proxy(function (e) { e.namespace && this._core.settings.dotsData && this._templates.splice(e.position, 0, this._templates.pop()) }, this), "remove.owl.carousel": e.proxy(function (e) { e.namespace && this._core.settings.dotsData && this._templates.splice(e.position, 1) }, this), "changed.owl.carousel": e.proxy(function (e) { e.namespace && "position" == e.property.name && this.draw() }, this), "initialized.owl.carousel": e.proxy(function (e) { e.namespace && !this._initialized && (this._core.trigger("initialize", null, "navigation"), this.initialize(), this.update(), this.draw(), this._initialized = !0, this._core.trigger("initialized", null, "navigation")) }, this), "refreshed.owl.carousel": e.proxy(function (e) { e.namespace && this._initialized && (this._core.trigger("refresh", null, "navigation"), this.update(), this.draw(), this._core.trigger("refreshed", null, "navigation")) }, this) }, this._core.options = e.extend({}, r.Defaults, this._core.options), this.$element.on(this._handlers) }; r.Defaults = { nav: !1, navText: ["prev", "next"], navSpeed: !1, navElement: "div", navContainer: !1, navContainerClass: "owl-nav", navClass: ["owl-prev", "owl-next"], slideBy: 1, dotClass: "owl-dot", dotsClass: "owl-dots", dots: !0, dotsEach: !1, dotsData: !1, dotsSpeed: !1, dotsContainer: !1 }, r.prototype.initialize = function () { var t, n = this._core.settings; this._controls.$relative = (n.navContainer ? e(n.navContainer) : e("
").addClass(n.navContainerClass).appendTo(this.$element)).addClass("disabled"), this._controls.$previous = e("<" + n.navElement + ">").addClass(n.navClass[0]).html(n.navText[0]).prependTo(this._controls.$relative).on("click", e.proxy(function (e) { this.prev(n.navSpeed) }, this)), this._controls.$next = e("<" + n.navElement + ">").addClass(n.navClass[1]).html(n.navText[1]).appendTo(this._controls.$relative).on("click", e.proxy(function (e) { this.next(n.navSpeed) }, this)), n.dotsData || (this._templates = [e("
").addClass(n.dotClass).append(e("")).prop("outerHTML")]), this._controls.$absolute = (n.dotsContainer ? e(n.dotsContainer) : e("
").addClass(n.dotsClass).appendTo(this.$element)).addClass("disabled"), this._controls.$absolute.on("click", "div", e.proxy(function (t) { var i = e(t.target).parent().is(this._controls.$absolute) ? e(t.target).index() : e(t.target).parent().index(); t.preventDefault(), this.to(i, n.dotsSpeed) }, this)); for (t in this._overrides) this._core[t] = e.proxy(this[t], this) }, r.prototype.destroy = function () { var e, t, n, i; for (e in this._handlers) this.$element.off(e, this._handlers[e]); for (t in this._controls) this._controls[t].remove(); for (i in this.overides) this._core[i] = this._overrides[i]; for (n in Object.getOwnPropertyNames(this)) "function" != typeof this[n] && (this[n] = null) }, r.prototype.update = function () { var e, t, n = this._core.clones().length / 2, i = n + this._core.items().length, r = this._core.maximum(!0), a = this._core.settings, s = a.center || a.autoWidth || a.dotsData ? 1 : a.dotsEach || a.items; if ("page" !== a.slideBy && (a.slideBy = Math.min(a.slideBy, a.items)), a.dots || "page" == a.slideBy) for (this._pages = [], e = n, t = 0, 0; e < i; e++) { if (t >= s || 0 === t) { if (this._pages.push({start: Math.min(r, e - n), end: e - n + s - 1}), Math.min(r, e - n) === r) break; t = 0, 0 } t += this._core.mergers(this._core.relative(e)) } }, r.prototype.draw = function () { var t, n = this._core.settings, i = this._core.items().length <= n.items, r = this._core.relative(this._core.current()), a = n.loop || n.rewind; this._controls.$relative.toggleClass("disabled", !n.nav || i), n.nav && (this._controls.$previous.toggleClass("disabled", !a && r <= this._core.minimum(!0)), this._controls.$next.toggleClass("disabled", !a && r >= this._core.maximum(!0))), this._controls.$absolute.toggleClass("disabled", !n.dots || i), n.dots && (t = this._pages.length - this._controls.$absolute.children().length, n.dotsData && 0 !== t ? this._controls.$absolute.html(this._templates.join("")) : t > 0 ? this._controls.$absolute.append(new Array(t + 1).join(this._templates[0])) : t < 0 && this._controls.$absolute.children().slice(t).remove(), this._controls.$absolute.find(".active").removeClass("active"), this._controls.$absolute.children().eq(e.inArray(this.current(), this._pages)).addClass("active")) }, r.prototype.onTrigger = function (t) { var n = this._core.settings; t.page = { index: e.inArray(this.current(), this._pages), count: this._pages.length, size: n && (n.center || n.autoWidth || n.dotsData ? 1 : n.dotsEach || n.items) } }, r.prototype.current = function () { var t = this._core.relative(this._core.current()); return e.grep(this._pages, e.proxy(function (e, n) { return e.start <= t && e.end >= t }, this)).pop() }, r.prototype.getPosition = function (t) { var n, i, r = this._core.settings; return "page" == r.slideBy ? (n = e.inArray(this.current(), this._pages), i = this._pages.length, t ? ++n : --n, n = this._pages[(n % i + i) % i].start) : (n = this._core.relative(this._core.current()), i = this._core.items().length, t ? n += r.slideBy : n -= r.slideBy), n }, r.prototype.next = function (t) { e.proxy(this._overrides.to, this._core)(this.getPosition(!0), t) }, r.prototype.prev = function (t) { e.proxy(this._overrides.to, this._core)(this.getPosition(!1), t) }, r.prototype.to = function (t, n, i) { var r; !i && this._pages.length ? (r = this._pages.length, e.proxy(this._overrides.to, this._core)(this._pages[(t % r + r) % r].start, n)) : e.proxy(this._overrides.to, this._core)(t, n) }, e.fn.owlCarousel.Constructor.Plugins.Navigation = r }(window.Zepto || window.jQuery, window, document), function (e, t, n, i) { "use strict"; var r = function (n) { this._core = n, this._hashes = {}, this.$element = this._core.$element, this._handlers = { "initialized.owl.carousel": e.proxy(function (n) { n.namespace && "URLHash" === this._core.settings.startPosition && e(t).trigger("hashchange.owl.navigation") }, this), "prepared.owl.carousel": e.proxy(function (t) { if (t.namespace) { var n = e(t.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash"); if (!n) return; this._hashes[n] = t.content } }, this), "changed.owl.carousel": e.proxy(function (n) { if (n.namespace && "position" === n.property.name) { var i = this._core.items(this._core.relative(this._core.current())), r = e.map(this._hashes, function (e, t) { return e === i ? t : null }).join(); if (!r || t.location.hash.slice(1) === r) return; t.location.hash = r } }, this) }, this._core.options = e.extend({}, r.Defaults, this._core.options), this.$element.on(this._handlers), e(t).on("hashchange.owl.navigation", e.proxy(function (e) { var n = t.location.hash.substring(1), i = this._core.$stage.children(), r = this._hashes[n] && i.index(this._hashes[n]); void 0 !== r && r !== this._core.current() && this._core.to(this._core.relative(r), !1, !0) }, this)) }; r.Defaults = {URLhashListener: !1}, r.prototype.destroy = function () { var n, i; e(t).off("hashchange.owl.navigation"); for (n in this._handlers) this._core.$element.off(n, this._handlers[n]); for (i in Object.getOwnPropertyNames(this)) "function" != typeof this[i] && (this[i] = null) }, e.fn.owlCarousel.Constructor.Plugins.Hash = r }(window.Zepto || window.jQuery, window, document), function (e, t, n, i) { function r(t, n) { var r = !1, a = t.charAt(0).toUpperCase() + t.slice(1); return e.each((t + " " + o.join(a + " ") + a).split(" "), function (e, t) { if (s[t] !== i) return r = !n || t, !1 }), r } function a(e) { return r(e, !0) } var s = e("").get(0).style, o = "Webkit Moz O ms".split(" "), l = { transition: { end: { WebkitTransition: "webkitTransitionEnd", MozTransition: "transitionend", OTransition: "oTransitionEnd", transition: "transitionend" } }, animation: { end: { WebkitAnimation: "webkitAnimationEnd", MozAnimation: "animationend", OAnimation: "oAnimationEnd", animation: "animationend" } } }, u = { csstransforms: function () { return !!r("transform") }, csstransforms3d: function () { return !!r("perspective") }, csstransitions: function () { return !!r("transition") }, cssanimations: function () { return !!r("animation") } }; u.csstransitions() && (e.support.transition = new String(a("transition")), e.support.transition.end = l.transition.end[e.support.transition]), u.cssanimations() && (e.support.animation = new String(a("animation")), e.support.animation.end = l.animation.end[e.support.animation]), u.csstransforms() && (e.support.transform = new String(a("transform")), e.support.transform3d = u.csstransforms3d()) }(window.Zepto || window.jQuery, window, document), function (e, t, n, i) { n.swipebox = function (i, r) { var a, s, o = { useCSS: !0, useSVG: !0, initialIndexOnArray: 0, removeBarsOnMobile: !0, hideCloseButtonOnMobile: !1, hideBarsDelay: 0, videoMaxWidth: 1140, vimeoColor: "cccccc", beforeOpen: null, afterOpen: null, afterClose: null, afterMedia: null, nextSlide: null, prevSlide: null, loopAtEnd: !1, autoplayVideos: !1, queryStringData: {}, toggleClassOnLoad: "" }, l = this, u = [], d = i.selector, c = navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(Android)|(PlayBook)|(BB10)|(BlackBerry)|(Opera Mini)|(IEMobile)|(webOS)|(MeeGo)/i), h = null !== c || void 0 !== t.createTouch || "ontouchstart" in e || "onmsgesturechange" in e || navigator.msMaxTouchPoints, p = !!t.createElementNS && !!t.createElementNS("http://www.w3.org/2000/svg", "svg").createSVGRect, f = e.innerWidth ? e.innerWidth : n(e).width(), m = e.innerHeight ? e.innerHeight : n(e).height(), g = 0; l.settings = {}, n.swipebox.close = function () { a.closeSlide() }, n.swipebox.extend = function () { return a }, l.init = function () { l.settings = n.extend({}, o, r), n.isArray(i) ? (u = i, a.target = n(e), a.init(l.settings.initialIndexOnArray)) : n(t).on("click", d, function (e) { if ("slide current" === e.target.parentNode.className) return !1; n.isArray(i) || (a.destroy(), s = n(d), a.actions()), u = []; var t, r, o; o || (r = "data-rel", o = n(this).attr(r)), o || (r = "rel", o = n(this).attr(r)), (s = o && "" !== o && "nofollow" !== o ? n(d).filter("[" + r + '="' + o + '"]') : n(d)).each(function () { var e = null, t = null; n(this).attr("title") && (e = n(this).attr("title")), n(this).attr("href") && (t = n(this).attr("href")), u.push({ href: t, title: e }) }), t = s.index(n(this)), e.preventDefault(), e.stopPropagation(), a.target = n(e.target), a.init(t) }) }, a = { init: function (e) { l.settings.beforeOpen && l.settings.beforeOpen(), this.target.trigger("swipebox-start"), n.swipebox.isOpen = !0, this.build(), this.openSlide(e), this.openMedia(e), this.preloadMedia(e + 1), this.preloadMedia(e - 1), l.settings.afterOpen && l.settings.afterOpen(e) }, build: function () { var e, t = this; n("body").append('
\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t
'), p && !0 === l.settings.useSVG && (e = (e = n("#swipebox-close").css("background-image")).replace("png", "svg"), n("#swipebox-prev, #swipebox-next, #swipebox-close").css({"background-image": e})), c && l.settings.removeBarsOnMobile, n.each(u, function () { n("#swipebox-slider").append('
') }), t.setDim(), t.actions(), h && t.gesture(), t.keyboard(), t.animBars(), t.resize() }, setDim: function () { var t, i, r = {}; "onorientationchange" in e ? e.addEventListener("orientationchange", function () { 0 === e.orientation ? (t = f, i = m) : 90 !== e.orientation && -90 !== e.orientation || (t = m, i = f) }, !1) : (t = e.innerWidth ? e.innerWidth : n(e).width(), i = e.innerHeight ? e.innerHeight : n(e).height()), r = { width: t, height: i }, n("#swipebox-overlay").css(r) }, resize: function () { var t = this; n(e).resize(function () { t.setDim() }).resize() }, supportTransition: function () { var e, n = "transition WebkitTransition MozTransition OTransition msTransition KhtmlTransition".split(" "); for (e = 0; e < n.length; e++) if (void 0 !== t.createElement("div").style[n[e]]) return n[e]; return !1 }, doCssTrans: function () { if (l.settings.useCSS && this.supportTransition()) return !0 }, gesture: function () { var e, t, i, r, a, s, o = this, l = !1, d = !1, c = {}, h = {}, p = n("#swipebox-top-bar, #swipebox-bottom-bar"), m = n("#swipebox-slider"); p.addClass("visible-bars"), o.setTimeout(), n("body").bind("touchstart", function (o) { return n(this).addClass("touching"), e = n("#swipebox-slider .slide").index(n("#swipebox-slider .slide.current")), h = o.originalEvent.targetTouches[0], c.pageX = o.originalEvent.targetTouches[0].pageX, c.pageY = o.originalEvent.targetTouches[0].pageY, n("#swipebox-slider").css({ "-webkit-transform": "translate3d(" + g + "%, 0, 0)", transform: "translate3d(" + g + "%, 0, 0)" }), n(".touching").bind("touchmove", function (o) { if (o.preventDefault(), o.stopPropagation(), h = o.originalEvent.targetTouches[0], !d && (a = i, i = h.pageY - c.pageY, Math.abs(i) >= 50 || l)) { var p = .75 - Math.abs(i) / m.height(); m.css({top: i + "px"}), m.css({opacity: p}), l = !0 } r = t, t = h.pageX - c.pageX, s = 100 * t / f, !d && !l && Math.abs(t) >= 10 && (n("#swipebox-slider").css({ "-webkit-transition": "", transition: "" }), d = !0), d && (0 < t ? 0 === e ? n("#swipebox-overlay").addClass("leftSpringTouch") : (n("#swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"), n("#swipebox-slider").css({ "-webkit-transform": "translate3d(" + (g + s) + "%, 0, 0)", transform: "translate3d(" + (g + s) + "%, 0, 0)" })) : 0 > t && (u.length === e + 1 ? n("#swipebox-overlay").addClass("rightSpringTouch") : (n("#swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"), n("#swipebox-slider").css({ "-webkit-transform": "translate3d(" + (g + s) + "%, 0, 0)", transform: "translate3d(" + (g + s) + "%, 0, 0)" })))) }), !1 }).bind("touchend", function (e) { if (e.preventDefault(), e.stopPropagation(), n("#swipebox-slider").css({ "-webkit-transition": "-webkit-transform 0.4s ease", transition: "transform 0.4s ease" }), i = h.pageY - c.pageY, t = h.pageX - c.pageX, s = 100 * t / f, l) if (l = !1, Math.abs(i) >= 100 && Math.abs(i) > Math.abs(a)) { var u = i > 0 ? m.height() : -m.height(); m.animate({top: u + "px", opacity: 0}, 300, function () { o.closeSlide() }) } else m.animate({ top: 0, opacity: 1 }, 300); else d ? (d = !1, t >= 10 && t >= r ? o.getPrev() : t <= -10 && t <= r && o.getNext()) : p.hasClass("visible-bars") ? (o.clearTimeout(), o.hideBars()) : (o.showBars(), o.setTimeout()); n("#swipebox-slider").css({ "-webkit-transform": "translate3d(" + g + "%, 0, 0)", transform: "translate3d(" + g + "%, 0, 0)" }), n("#swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"), n(".touching").off("touchmove").removeClass("touching") }) }, setTimeout: function () { if (l.settings.hideBarsDelay > 0) { var t = this; t.clearTimeout(), t.timeout = e.setTimeout(function () { t.hideBars() }, l.settings.hideBarsDelay) } }, clearTimeout: function () { e.clearTimeout(this.timeout), this.timeout = null }, showBars: function () { var e = n("#swipebox-top-bar, #swipebox-bottom-bar"); this.doCssTrans() ? e.addClass("visible-bars") : (n("#swipebox-top-bar").animate({top: 0}, 500), n("#swipebox-bottom-bar").animate({bottom: 0}, 500), setTimeout(function () { e.addClass("visible-bars") }, 1e3)) }, hideBars: function () { var e = n("#swipebox-top-bar, #swipebox-bottom-bar"); this.doCssTrans() ? e.removeClass("visible-bars") : (n("#swipebox-top-bar").animate({top: "-50px"}, 500), n("#swipebox-bottom-bar").animate({bottom: "-50px"}, 500), setTimeout(function () { e.removeClass("visible-bars") }, 1e3)) }, animBars: function () { var e = this, t = n("#swipebox-top-bar, #swipebox-bottom-bar"); t.addClass("visible-bars"), e.setTimeout(), n("#swipebox-slider").click(function () { t.hasClass("visible-bars") || (e.showBars(), e.setTimeout()) }), n("#swipebox-bottom-bar").hover(function () { e.showBars(), t.addClass("visible-bars"), e.clearTimeout() }, function () { l.settings.hideBarsDelay > 0 && (t.removeClass("visible-bars"), e.setTimeout()) }) }, keyboard: function () { var t = this; n(e).bind("keyup", function (e) { e.preventDefault(), e.stopPropagation(), 37 === e.keyCode ? t.getPrev() : 39 === e.keyCode ? t.getNext() : 27 === e.keyCode && t.closeSlide() }) }, actions: function () { var e = this, t = "touchend click"; u.length < 2 ? (n("#swipebox-bottom-bar").hide(), void 0 === u[1] && n("#swipebox-top-bar").hide()) : (n("#swipebox-prev").bind(t, function (t) { t.preventDefault(), t.stopPropagation(), e.getPrev(), e.setTimeout() }), n("#swipebox-next").bind(t, function (t) { t.preventDefault(), t.stopPropagation(), e.getNext(), e.setTimeout() })), n("#swipebox-close").bind(t, function () { e.closeSlide() }) }, setSlide: function (e, t) { t = t || !1; var i = n("#swipebox-slider"); g = 100 * -e, this.doCssTrans() ? i.css({ "-webkit-transform": "translate3d(" + 100 * -e + "%, 0, 0)", transform: "translate3d(" + 100 * -e + "%, 0, 0)" }) : i.animate({left: 100 * -e + "%"}), n("#swipebox-slider .slide").removeClass("current"), n("#swipebox-slider .slide").eq(e).addClass("current"), this.setTitle(e), t && i.fadeIn(), n("#swipebox-prev, #swipebox-next").removeClass("disabled"), 0 === e ? n("#swipebox-prev").addClass("disabled") : e === u.length - 1 && !0 !== l.settings.loopAtEnd && n("#swipebox-next").addClass("disabled") }, openSlide: function (t) { n("html").addClass("swipebox-html"), h ? (n("html").addClass("swipebox-touch"), l.settings.hideCloseButtonOnMobile && n("html").addClass("swipebox-no-close-button")) : n("html").addClass("swipebox-no-touch"), n(e).trigger("resize"), this.setSlide(t, !0) }, preloadMedia: function (e) { var t = this, n = null; void 0 !== u[e] && (n = u[e].href), t.isVideo(n) ? t.openMedia(e) : setTimeout(function () { t.openMedia(e) }, 1e3) }, openMedia: function (e) { var t, i, r = this; if (void 0 !== u[e] && (t = u[e].href), e < 0 || e >= u.length) return !1; i = n("#swipebox-slider .slide").eq(e), r.isVideo(t) ? (i.html(r.getVideo(t)), l.settings.afterMedia && l.settings.afterMedia(e)) : (i.addClass("slide-loading"), r.loadMedia(t, function () { i.removeClass("slide-loading"), i.html(this), l.settings.afterMedia && l.settings.afterMedia(e) })) }, setTitle: function (e) { var t = null; n("#swipebox-title").empty(), void 0 !== u[e] && (t = u[e].title), t ? (n("#swipebox-top-bar").show(), n("#swipebox-title").append(t)) : n("#swipebox-top-bar").hide() }, isVideo: function (e) { if (e) { if (e.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/) || e.match(/vimeo\.com\/([0-9]*)/) || e.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/)) return !0; if (e.toLowerCase().indexOf("swipeboxvideo=1") >= 0) return !0 } }, parseUri: function (e, i) { var r = t.createElement("a"), a = {}; return r.href = decodeURIComponent(e), r.search && (a = JSON.parse('{"' + r.search.toLowerCase().replace("?", "").replace(/&/g, '","').replace(/=/g, '":"') + '"}')), n.isPlainObject(i) && (a = n.extend(a, i, l.settings.queryStringData)), n.map(a, function (e, t) { if (e && e > "") return encodeURIComponent(t) + "=" + encodeURIComponent(e) }).join("&") }, getVideo: function (e) { var t = "", n = e.match(/((?:www\.)?youtube\.com|(?:www\.)?youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/), i = e.match(/(?:www\.)?youtu\.be\/([a-zA-Z0-9\-_]+)/), r = e.match(/(?:www\.)?vimeo\.com\/([0-9]*)/), s = ""; return n || i ? (i && (n = i), s = a.parseUri(e, { autoplay: l.settings.autoplayVideos ? "1" : "0", v: "" }), t = '') : r ? (s = a.parseUri(e, { autoplay: l.settings.autoplayVideos ? "1" : "0", byline: "0", portrait: "0", color: l.settings.vimeoColor }), t = '') : t = '', '
' + t + "
" }, loadMedia: function (e, t) { if (0 === e.trim().indexOf("#")) t.call(n("
", {class: "swipebox-inline-container"}).append(n(e).clone().toggleClass(l.settings.toggleClassOnLoad))); else if (!this.isVideo(e)) { var i = n("").on("load", function () { t.call(i) }); i.attr("src", e) } }, getNext: function () { var e, t = this, i = n("#swipebox-slider .slide").index(n("#swipebox-slider .slide.current")); i + 1 < u.length ? (e = n("#swipebox-slider .slide").eq(i).contents().find("iframe").attr("src"), n("#swipebox-slider .slide").eq(i).contents().find("iframe").attr("src", e), i++, t.setSlide(i), t.preloadMedia(i + 1), l.settings.nextSlide && l.settings.nextSlide(i)) : !0 === l.settings.loopAtEnd ? (e = n("#swipebox-slider .slide").eq(i).contents().find("iframe").attr("src"), n("#swipebox-slider .slide").eq(i).contents().find("iframe").attr("src", e), i = 0, t.preloadMedia(i), t.setSlide(i), t.preloadMedia(i + 1), l.settings.nextSlide && l.settings.nextSlide(i)) : (n("#swipebox-overlay").addClass("rightSpring"), setTimeout(function () { n("#swipebox-overlay").removeClass("rightSpring") }, 500)) }, getPrev: function () { var e, t = n("#swipebox-slider .slide").index(n("#swipebox-slider .slide.current")); t > 0 ? (e = n("#swipebox-slider .slide").eq(t).contents().find("iframe").attr("src"), n("#swipebox-slider .slide").eq(t).contents().find("iframe").attr("src", e), t--, this.setSlide(t), this.preloadMedia(t - 1), l.settings.prevSlide && l.settings.prevSlide(t)) : (n("#swipebox-overlay").addClass("leftSpring"), setTimeout(function () { n("#swipebox-overlay").removeClass("leftSpring") }, 500)) }, nextSlide: function (e) { }, prevSlide: function (e) { }, closeSlide: function () { n("html").removeClass("swipebox-html"), n("html").removeClass("swipebox-touch"), n(e).trigger("resize"), this.destroy() }, destroy: function () { n(e).unbind("keyup"), n("body").unbind("touchstart"), n("body").unbind("touchmove"), n("body").unbind("touchend"), n("#swipebox-slider").unbind(), n("#swipebox-overlay").remove(), n.isArray(i) || i.removeData("_swipebox"), this.target && this.target.trigger("swipebox-destroy"), n.swipebox.isOpen = !1, l.settings.afterClose && l.settings.afterClose() } }, l.init() }, n.fn.swipebox = function (e) { if (!n.data(this, "_swipebox")) { var t = new n.swipebox(this, e); this.data("_swipebox", t) } return this.data("_swipebox") } }(window, document, jQuery), function (e, t) { "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : e.moment = t() }(this, function () { "use strict"; function e() { return lt.apply(null, arguments) } function t(e) { return e instanceof Array || "[object Array]" === Object.prototype.toString.call(e) } function n(e) { return e instanceof Date || "[object Date]" === Object.prototype.toString.call(e) } function i(e, t) { var n, i = []; for (n = 0; n < e.length; ++n) i.push(t(e[n], n)); return i } function r(e, t) { return Object.prototype.hasOwnProperty.call(e, t) } function a(e, t) { for (var n in t) r(t, n) && (e[n] = t[n]); return r(t, "toString") && (e.toString = t.toString), r(t, "valueOf") && (e.valueOf = t.valueOf), e } function s(e, t, n, i) { return _e(e, t, n, i, !0).utc() } function o() { return { empty: !1, unusedTokens: [], unusedInput: [], overflow: -2, charsLeftOver: 0, nullInput: !1, invalidMonth: null, invalidFormat: !1, userInvalidated: !1, iso: !1 } } function l(e) { return null == e._pf && (e._pf = o()), e._pf } function u(e) { if (null == e._isValid) { var t = l(e); e._isValid = !(isNaN(e._d.getTime()) || !(t.overflow < 0) || t.empty || t.invalidMonth || t.invalidWeekday || t.nullInput || t.invalidFormat || t.userInvalidated), e._strict && (e._isValid = e._isValid && 0 === t.charsLeftOver && 0 === t.unusedTokens.length && void 0 === t.bigHour) } return e._isValid } function d(e) { var t = s(NaN); return null != e ? a(l(t), e) : l(t).userInvalidated = !0, t } function c(e) { return void 0 === e } function h(e, t) { var n, i, r; if (c(t._isAMomentObject) || (e._isAMomentObject = t._isAMomentObject), c(t._i) || (e._i = t._i), c(t._f) || (e._f = t._f), c(t._l) || (e._l = t._l), c(t._strict) || (e._strict = t._strict), c(t._tzm) || (e._tzm = t._tzm), c(t._isUTC) || (e._isUTC = t._isUTC), c(t._offset) || (e._offset = t._offset), c(t._pf) || (e._pf = l(t)), c(t._locale) || (e._locale = t._locale), ut.length > 0) for (n in ut) i = ut[n], r = t[i], c(r) || (e[i] = r); return e } function p(t) { h(this, t), this._d = new Date(null != t._d ? t._d.getTime() : NaN), !1 === dt && (dt = !0, e.updateOffset(this), dt = !1) } function f(e) { return e instanceof p || null != e && null != e._isAMomentObject } function m(e) { return 0 > e ? Math.ceil(e) : Math.floor(e) } function g(e) { var t = +e, n = 0; return 0 !== t && isFinite(t) && (n = m(t)), n } function v(e, t, n) { var i, r = Math.min(e.length, t.length), a = Math.abs(e.length - t.length), s = 0; for (i = 0; r > i; i++) (n && e[i] !== t[i] || !n && g(e[i]) !== g(t[i])) && s++; return s + a } function y(t) { !1 === e.suppressDeprecationWarnings && "undefined" != typeof console && console.warn && console.warn("Deprecation warning: " + t) } function b(e, t) { var n = !0; return a(function () { return n && (y(e + "\nArguments: " + Array.prototype.slice.call(arguments).join(", ") + "\n" + (new Error).stack), n = !1), t.apply(this, arguments) }, t) } function w(e, t) { ct[e] || (y(t), ct[e] = !0) } function x(e) { return e instanceof Function || "[object Function]" === Object.prototype.toString.call(e) } function k(e) { return "[object Object]" === Object.prototype.toString.call(e) } function _(e, t) { var n, i = a({}, e); for (n in t) r(t, n) && (k(e[n]) && k(t[n]) ? (i[n] = {}, a(i[n], e[n]), a(i[n], t[n])) : null != t[n] ? i[n] = t[n] : delete i[n]); return i } function C(e) { null != e && this.set(e) } function D(e) { return e ? e.toLowerCase().replace("_", "-") : e } function T(e) { for (var t, n, i, r, a = 0; a < e.length;) { for (t = (r = D(e[a]).split("-")).length, n = (n = D(e[a + 1])) ? n.split("-") : null; t > 0;) { if (i = S(r.slice(0, t).join("-"))) return i; if (n && n.length >= t && v(r, n, !0) >= t - 1) break; t-- } a++ } return null } function S(e) { var t = null; if (!pt[e] && "undefined" != typeof module && module && module.exports) try { t = ht._abbr, require("./locale/" + e), F(t) } catch (e) { } return pt[e] } function F(e, t) { var n; return e && (n = c(t) ? E(e) : A(e, t)) && (ht = n), ht._abbr } function A(e, t) { return null !== t ? (t.abbr = e, null != pt[e] ? (w("defineLocaleOverride", "use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale"), t = _(pt[e]._config, t)) : null != t.parentLocale && (null != pt[t.parentLocale] ? t = _(pt[t.parentLocale]._config, t) : w("parentLocaleUndefined", "specified parentLocale is not defined yet")), pt[e] = new C(t), F(e), pt[e]) : (delete pt[e], null) } function E(e) { var n; if (e && e._locale && e._locale._abbr && (e = e._locale._abbr), !e) return ht; if (!t(e)) { if (n = S(e)) return n; e = [e] } return T(e) } function M(e, t) { var n = e.toLowerCase(); ft[n] = ft[n + "s"] = ft[t] = e } function $(e) { return "string" == typeof e ? ft[e] || ft[e.toLowerCase()] : void 0 } function P(e) { var t, n, i = {}; for (n in e) r(e, n) && (t = $(n)) && (i[t] = e[n]); return i } function N(t, n) { return function (i) { return null != i ? (O(this, t, i), e.updateOffset(this, n), this) : j(this, t) } } function j(e, t) { return e.isValid() ? e._d["get" + (e._isUTC ? "UTC" : "") + t]() : NaN } function O(e, t, n) { e.isValid() && e._d["set" + (e._isUTC ? "UTC" : "") + t](n) } function L(e, t) { var n; if ("object" == typeof e) for (n in e) this.set(n, e[n]); else if (e = $(e), x(this[e])) return this[e](t); return this } function z(e, t, n) { var i = "" + Math.abs(e), r = t - i.length; return (e >= 0 ? n ? "+" : "" : "-") + Math.pow(10, Math.max(0, r)).toString().substr(1) + i } function R(e, t, n, i) { var r = i; "string" == typeof i && (r = function () { return this[i]() }), e && (yt[e] = r), t && (yt[t[0]] = function () { return z(r.apply(this, arguments), t[1], t[2]) }), n && (yt[n] = function () { return this.localeData().ordinal(r.apply(this, arguments), e) }) } function H(e) { return e.match(/\[[\s\S]/) ? e.replace(/^\[|\]$/g, "") : e.replace(/\\/g, "") } function I(e) { var t, n, i = e.match(mt); for (t = 0, n = i.length; n > t; t++) yt[i[t]] ? i[t] = yt[i[t]] : i[t] = H(i[t]); return function (r) { var a = ""; for (t = 0; n > t; t++) a += i[t] instanceof Function ? i[t].call(r, e) : i[t]; return a } } function W(e, t) { return e.isValid() ? (t = Y(t, e.localeData()), vt[t] = vt[t] || I(t), vt[t](e)) : e.localeData().invalidDate() } function Y(e, t) { var n = 5; for (gt.lastIndex = 0; n >= 0 && gt.test(e);) e = e.replace(gt, function (e) { return t.longDateFormat(e) || e }), gt.lastIndex = 0, n -= 1; return e } function V(e, t, n) { Ot[e] = x(t) ? t : function (e, i) { return e && n ? n : t } } function B(e, t) { return r(Ot, e) ? Ot[e](t._strict, t._locale) : new RegExp(q(e)) } function q(e) { return U(e.replace("\\", "").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (e, t, n, i, r) { return t || n || i || r })) } function U(e) { return e.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&") } function Z(e, t) { var n, i = t; for ("string" == typeof e && (e = [e]), "number" == typeof t && (i = function (e, n) { n[t] = g(e) }), n = 0; n < e.length; n++) Lt[e[n]] = i } function Q(e, t) { Z(e, function (e, n, i, r) { i._w = i._w || {}, t(e, i._w, i, r) }) } function G(e, t, n) { null != t && r(Lt, e) && Lt[e](t, n._a, n, e) } function X(e, t) { return new Date(Date.UTC(e, t + 1, 0)).getUTCDate() } function J(e, t) { var n; if (!e.isValid()) return e; if ("string" == typeof t) if (/^\d+$/.test(t)) t = g(t); else if ("number" != typeof (t = e.localeData().monthsParse(t))) return e; return n = Math.min(e.date(), X(e.year(), t)), e._d["set" + (e._isUTC ? "UTC" : "") + "Month"](t, n), e } function K(t) { return null != t ? (J(this, t), e.updateOffset(this, !0), this) : j(this, "Month") } function ee() { function e(e, t) { return t.length - e.length } var t, n, i = [], r = [], a = []; for (t = 0; 12 > t; t++) n = s([2e3, t]), i.push(this.monthsShort(n, "")), r.push(this.months(n, "")), a.push(this.months(n, "")), a.push(this.monthsShort(n, "")); for (i.sort(e), r.sort(e), a.sort(e), t = 0; 12 > t; t++) i[t] = U(i[t]), r[t] = U(r[t]), a[t] = U(a[t]); this._monthsRegex = new RegExp("^(" + a.join("|") + ")", "i"), this._monthsShortRegex = this._monthsRegex, this._monthsStrictRegex = new RegExp("^(" + r.join("|") + ")$", "i"), this._monthsShortStrictRegex = new RegExp("^(" + i.join("|") + ")$", "i") } function te(e) { var t, n = e._a; return n && -2 === l(e).overflow && (t = n[Rt] < 0 || n[Rt] > 11 ? Rt : n[Ht] < 1 || n[Ht] > X(n[zt], n[Rt]) ? Ht : n[It] < 0 || n[It] > 24 || 24 === n[It] && (0 !== n[Wt] || 0 !== n[Yt] || 0 !== n[Vt]) ? It : n[Wt] < 0 || n[Wt] > 59 ? Wt : n[Yt] < 0 || n[Yt] > 59 ? Yt : n[Vt] < 0 || n[Vt] > 999 ? Vt : -1, l(e)._overflowDayOfYear && (zt > t || t > Ht) && (t = Ht), l(e)._overflowWeeks && -1 === t && (t = Bt), l(e)._overflowWeekday && -1 === t && (t = qt), l(e).overflow = t), e } function ne(e) { var t, n, i, r, a, s, o = e._i, u = Jt.exec(o) || Kt.exec(o); if (u) { for (l(e).iso = !0, t = 0, n = tn.length; n > t; t++) if (tn[t][1].exec(u[1])) { r = tn[t][0], i = !1 !== tn[t][2]; break } if (null == r) return void (e._isValid = !1); if (u[3]) { for (t = 0, n = nn.length; n > t; t++) if (nn[t][1].exec(u[3])) { a = (u[2] || " ") + nn[t][0]; break } if (null == a) return void (e._isValid = !1) } if (!i && null != a) return void (e._isValid = !1); if (u[4]) { if (!en.exec(u[4])) return void (e._isValid = !1); s = "Z" } e._f = r + (a || "") + (s || ""), ge(e) } else e._isValid = !1 } function ie(t) { var n = rn.exec(t._i); return null !== n ? void (t._d = new Date(+n[1])) : (ne(t), void (!1 === t._isValid && (delete t._isValid, e.createFromInputFallback(t)))) } function re(e, t, n, i, r, a, s) { var o = new Date(e, t, n, i, r, a, s); return 100 > e && e >= 0 && isFinite(o.getFullYear()) && o.setFullYear(e), o } function ae(e) { var t = new Date(Date.UTC.apply(null, arguments)); return 100 > e && e >= 0 && isFinite(t.getUTCFullYear()) && t.setUTCFullYear(e), t } function se(e) { return oe(e) ? 366 : 365 } function oe(e) { return e % 4 == 0 && e % 100 != 0 || e % 400 == 0 } function le(e, t, n) { var i = 7 + t - n; return -((7 + ae(e, 0, i).getUTCDay() - t) % 7) + i - 1 } function ue(e, t, n, i, r) { var a, s, o = 1 + 7 * (t - 1) + (7 + n - i) % 7 + le(e, i, r); return 0 >= o ? (a = e - 1, s = se(a) + o) : o > se(e) ? (a = e + 1, s = o - se(e)) : (a = e, s = o), { year: a, dayOfYear: s } } function de(e, t, n) { var i, r, a = le(e.year(), t, n), s = Math.floor((e.dayOfYear() - a - 1) / 7) + 1; return 1 > s ? (r = e.year() - 1, i = s + ce(r, t, n)) : s > ce(e.year(), t, n) ? (i = s - ce(e.year(), t, n), r = e.year() + 1) : (r = e.year(), i = s), { week: i, year: r } } function ce(e, t, n) { var i = le(e, t, n), r = le(e + 1, t, n); return (se(e) - i + r) / 7 } function he(e, t, n) { return null != e ? e : null != t ? t : n } function pe(t) { var n = new Date(e.now()); return t._useUTC ? [n.getUTCFullYear(), n.getUTCMonth(), n.getUTCDate()] : [n.getFullYear(), n.getMonth(), n.getDate()] } function fe(e) { var t, n, i, r, a = []; if (!e._d) { for (i = pe(e), e._w && null == e._a[Ht] && null == e._a[Rt] && me(e), e._dayOfYear && (r = he(e._a[zt], i[zt]), e._dayOfYear > se(r) && (l(e)._overflowDayOfYear = !0), n = ae(r, 0, e._dayOfYear), e._a[Rt] = n.getUTCMonth(), e._a[Ht] = n.getUTCDate()), t = 0; 3 > t && null == e._a[t]; ++t) e._a[t] = a[t] = i[t]; for (; 7 > t; t++) e._a[t] = a[t] = null == e._a[t] ? 2 === t ? 1 : 0 : e._a[t]; 24 === e._a[It] && 0 === e._a[Wt] && 0 === e._a[Yt] && 0 === e._a[Vt] && (e._nextDay = !0, e._a[It] = 0), e._d = (e._useUTC ? ae : re).apply(null, a), null != e._tzm && e._d.setUTCMinutes(e._d.getUTCMinutes() - e._tzm), e._nextDay && (e._a[It] = 24) } } function me(e) { var t, n, i, r, a, s, o, u; null != (t = e._w).GG || null != t.W || null != t.E ? (a = 1, s = 4, n = he(t.GG, e._a[zt], de(Ce(), 1, 4).year), i = he(t.W, 1), (1 > (r = he(t.E, 1)) || r > 7) && (u = !0)) : (a = e._locale._week.dow, s = e._locale._week.doy, n = he(t.gg, e._a[zt], de(Ce(), a, s).year), i = he(t.w, 1), null != t.d ? (0 > (r = t.d) || r > 6) && (u = !0) : null != t.e ? (r = t.e + a, (t.e < 0 || t.e > 6) && (u = !0)) : r = a), 1 > i || i > ce(n, a, s) ? l(e)._overflowWeeks = !0 : null != u ? l(e)._overflowWeekday = !0 : (o = ue(n, i, r, a, s), e._a[zt] = o.year, e._dayOfYear = o.dayOfYear) } function ge(t) { if (t._f !== e.ISO_8601) { t._a = [], l(t).empty = !0; var n, i, r, a, s, o = "" + t._i, u = o.length, d = 0; for (r = Y(t._f, t._locale).match(mt) || [], n = 0; n < r.length; n++) a = r[n], (i = (o.match(B(a, t)) || [])[0]) && ((s = o.substr(0, o.indexOf(i))).length > 0 && l(t).unusedInput.push(s), o = o.slice(o.indexOf(i) + i.length), d += i.length), yt[a] ? (i ? l(t).empty = !1 : l(t).unusedTokens.push(a), G(a, i, t)) : t._strict && !i && l(t).unusedTokens.push(a); l(t).charsLeftOver = u - d, o.length > 0 && l(t).unusedInput.push(o), !0 === l(t).bigHour && t._a[It] <= 12 && t._a[It] > 0 && (l(t).bigHour = void 0), t._a[It] = ve(t._locale, t._a[It], t._meridiem), fe(t), te(t) } else ne(t) } function ve(e, t, n) { var i; return null == n ? t : null != e.meridiemHour ? e.meridiemHour(t, n) : null != e.isPM ? ((i = e.isPM(n)) && 12 > t && (t += 12), i || 12 !== t || (t = 0), t) : t } function ye(e) { var t, n, i, r, s; if (0 === e._f.length) return l(e).invalidFormat = !0, void (e._d = new Date(NaN)); for (r = 0; r < e._f.length; r++) s = 0, t = h({}, e), null != e._useUTC && (t._useUTC = e._useUTC), t._f = e._f[r], ge(t), u(t) && (s += l(t).charsLeftOver, s += 10 * l(t).unusedTokens.length, l(t).score = s, (null == i || i > s) && (i = s, n = t)); a(e, n || t) } function be(e) { if (!e._d) { var t = P(e._i); e._a = i([t.year, t.month, t.day || t.date, t.hour, t.minute, t.second, t.millisecond], function (e) { return e && parseInt(e, 10) }), fe(e) } } function we(e) { var t = new p(te(xe(e))); return t._nextDay && (t.add(1, "d"), t._nextDay = void 0), t } function xe(e) { var i = e._i, r = e._f; return e._locale = e._locale || E(e._l), null === i || void 0 === r && "" === i ? d({nullInput: !0}) : ("string" == typeof i && (e._i = i = e._locale.preparse(i)), f(i) ? new p(te(i)) : (t(r) ? ye(e) : r ? ge(e) : n(i) ? e._d = i : ke(e), u(e) || (e._d = null), e)) } function ke(r) { var a = r._i; void 0 === a ? r._d = new Date(e.now()) : n(a) ? r._d = new Date(+a) : "string" == typeof a ? ie(r) : t(a) ? (r._a = i(a.slice(0), function (e) { return parseInt(e, 10) }), fe(r)) : "object" == typeof a ? be(r) : "number" == typeof a ? r._d = new Date(a) : e.createFromInputFallback(r) } function _e(e, t, n, i, r) { var a = {}; return "boolean" == typeof n && (i = n, n = void 0), a._isAMomentObject = !0, a._useUTC = a._isUTC = r, a._l = n, a._i = e, a._f = t, a._strict = i, we(a) } function Ce(e, t, n, i) { return _e(e, t, n, i, !1) } function De(e, n) { var i, r; if (1 === n.length && t(n[0]) && (n = n[0]), !n.length) return Ce(); for (i = n[0], r = 1; r < n.length; ++r) (!n[r].isValid() || n[r][e](i)) && (i = n[r]); return i } function Te(e) { var t = P(e), n = t.year || 0, i = t.quarter || 0, r = t.month || 0, a = t.week || 0, s = t.day || 0, o = t.hour || 0, l = t.minute || 0, u = t.second || 0, d = t.millisecond || 0; this._milliseconds = +d + 1e3 * u + 6e4 * l + 36e5 * o, this._days = +s + 7 * a, this._months = +r + 3 * i + 12 * n, this._data = {}, this._locale = E(), this._bubble() } function Se(e) { return e instanceof Te } function Fe(e, t) { R(e, 0, 0, function () { var e = this.utcOffset(), n = "+"; return 0 > e && (e = -e, n = "-"), n + z(~~(e / 60), 2) + t + z(~~e % 60, 2) }) } function Ae(e, t) { var n = (t || "").match(e) || [], i = ((n[n.length - 1] || []) + "").match(ln) || ["-", 0, 0], r = 60 * i[1] + g(i[2]); return "+" === i[0] ? r : -r } function Ee(t, i) { var r, a; return i._isUTC ? (r = i.clone(), a = (f(t) || n(t) ? +t : +Ce(t)) - +r, r._d.setTime(+r._d + a), e.updateOffset(r, !1), r) : Ce(t).local() } function Me(e) { return 15 * -Math.round(e._d.getTimezoneOffset() / 15) } function $e() { return !!this.isValid() && (this._isUTC && 0 === this._offset) } function Pe(e, t) { var n, i, a, s = e, o = null; return Se(e) ? s = { ms: e._milliseconds, d: e._days, M: e._months } : "number" == typeof e ? (s = {}, t ? s[t] = e : s.milliseconds = e) : (o = un.exec(e)) ? (n = "-" === o[1] ? -1 : 1, s = { y: 0, d: g(o[Ht]) * n, h: g(o[It]) * n, m: g(o[Wt]) * n, s: g(o[Yt]) * n, ms: g(o[Vt]) * n }) : (o = dn.exec(e)) ? (n = "-" === o[1] ? -1 : 1, s = { y: Ne(o[2], n), M: Ne(o[3], n), w: Ne(o[4], n), d: Ne(o[5], n), h: Ne(o[6], n), m: Ne(o[7], n), s: Ne(o[8], n) }) : null == s ? s = {} : "object" == typeof s && ("from" in s || "to" in s) && (a = Oe(Ce(s.from), Ce(s.to)), s = {}, s.ms = a.milliseconds, s.M = a.months), i = new Te(s), Se(e) && r(e, "_locale") && (i._locale = e._locale), i } function Ne(e, t) { var n = e && parseFloat(e.replace(",", ".")); return (isNaN(n) ? 0 : n) * t } function je(e, t) { var n = {milliseconds: 0, months: 0}; return n.months = t.month() - e.month() + 12 * (t.year() - e.year()), e.clone().add(n.months, "M").isAfter(t) && --n.months, n.milliseconds = +t - +e.clone().add(n.months, "M"), n } function Oe(e, t) { var n; return e.isValid() && t.isValid() ? (t = Ee(t, e), e.isBefore(t) ? n = je(e, t) : (n = je(t, e), n.milliseconds = -n.milliseconds, n.months = -n.months), n) : { milliseconds: 0, months: 0 } } function Le(e) { return 0 > e ? -1 * Math.round(-1 * e) : Math.round(e) } function ze(e, t) { return function (n, i) { var r, a; return null === i || isNaN(+i) || (w(t, "moment()." + t + "(period, number) is deprecated. Please use moment()." + t + "(number, period)."), a = n, n = i, i = a), n = "string" == typeof n ? +n : n, r = Pe(n, i), Re(this, r, e), this } } function Re(t, n, i, r) { var a = n._milliseconds, s = Le(n._days), o = Le(n._months); t.isValid() && (r = null == r || r, a && t._d.setTime(+t._d + a * i), s && O(t, "Date", j(t, "Date") + s * i), o && J(t, j(t, "Month") + o * i), r && e.updateOffset(t, s || o)) } function He(e, t) { var n, i, r = 12 * (t.year() - e.year()) + (t.month() - e.month()), a = e.clone().add(r, "months"); return 0 > t - a ? (n = e.clone().add(r - 1, "months"), i = (t - a) / (a - n)) : (n = e.clone().add(r + 1, "months"), i = (t - a) / (n - a)), -(r + i) } function Ie(e) { var t; return void 0 === e ? this._locale._abbr : (null != (t = E(e)) && (this._locale = t), this) } function We() { return this._locale } function Ye(e, t) { R(0, [e, e.length], 0, t) } function Ve(e, t, n, i, r) { var a; return null == e ? de(this, i, r).year : (a = ce(e, i, r), t > a && (t = a), Be.call(this, e, t, n, i, r)) } function Be(e, t, n, i, r) { var a = ue(e, t, n, i, r), s = ae(a.year, 0, a.dayOfYear); return this.year(s.getUTCFullYear()), this.month(s.getUTCMonth()), this.date(s.getUTCDate()), this } function qe(e, t) { return "string" != typeof e ? e : isNaN(e) ? "number" == typeof (e = t.weekdaysParse(e)) ? e : null : parseInt(e, 10) } function Ue() { return this.hours() % 12 || 12 } function Ze(e, t) { R(e, 0, 0, function () { return this.localeData().meridiem(this.hours(), this.minutes(), t) }) } function Qe(e, t) { return t._meridiemParse } function Ge(e) { return e } function Xe(e, t, n, i) { var r = E(), a = s().set(i, t); return r[n](a, e) } function Je(e, t, n, i, r) { if ("number" == typeof e && (t = e, e = void 0), e = e || "", null != t) return Xe(e, t, n, r); var a, s = []; for (a = 0; i > a; a++) s[a] = Xe(e, a, n, r); return s } function Ke(e, t, n, i) { var r = Pe(t, n); return e._milliseconds += i * r._milliseconds, e._days += i * r._days, e._months += i * r._months, e._bubble() } function et(e) { return 0 > e ? Math.floor(e) : Math.ceil(e) } function tt(e) { return 4800 * e / 146097 } function nt(e) { return 146097 * e / 4800 } function it(e) { return function () { return this.as(e) } } function rt(e) { return function () { return this._data[e] } } function at(e, t, n, i, r) { return r.relativeTime(t || 1, !!n, e, i) } function st(e, t, n) { var i = Pe(e).abs(), r = Zn(i.as("s")), a = Zn(i.as("m")), s = Zn(i.as("h")), o = Zn(i.as("d")), l = Zn(i.as("M")), u = Zn(i.as("y")), d = r < Qn.s && ["s", r] || 1 >= a && ["m"] || a < Qn.m && ["mm", a] || 1 >= s && ["h"] || s < Qn.h && ["hh", s] || 1 >= o && ["d"] || o < Qn.d && ["dd", o] || 1 >= l && ["M"] || l < Qn.M && ["MM", l] || 1 >= u && ["y"] || ["yy", u]; return d[2] = t, d[3] = +e > 0, d[4] = n, at.apply(null, d) } function ot() { var e, t, n, i = Gn(this._milliseconds) / 1e3, r = Gn(this._days), a = Gn(this._months); t = m((e = m(i / 60)) / 60), i %= 60, e %= 60; var s = n = m(a / 12), o = a %= 12, l = r, u = t, d = e, c = i, h = this.asSeconds(); return h ? (0 > h ? "-" : "") + "P" + (s ? s + "Y" : "") + (o ? o + "M" : "") + (l ? l + "D" : "") + (u || d || c ? "T" : "") + (u ? u + "H" : "") + (d ? d + "M" : "") + (c ? c + "S" : "") : "P0D" } var lt, ut = e.momentProperties = [], dt = !1, ct = {}; e.suppressDeprecationWarnings = !1; var ht, pt = {}, ft = {}, mt = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, gt = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, vt = {}, yt = {}, bt = /\d/, wt = /\d\d/, xt = /\d{3}/, kt = /\d{4}/, _t = /[+-]?\d{6}/, Ct = /\d\d?/, Dt = /\d\d\d\d?/, Tt = /\d\d\d\d\d\d?/, St = /\d{1,3}/, Ft = /\d{1,4}/, At = /[+-]?\d{1,6}/, Et = /\d+/, Mt = /[+-]?\d+/, $t = /Z|[+-]\d\d:?\d\d/gi, Pt = /Z|[+-]\d\d(?::?\d\d)?/gi, Nt = /[+-]?\d+(\.\d{1,3})?/, jt = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i, Ot = {}, Lt = {}, zt = 0, Rt = 1, Ht = 2, It = 3, Wt = 4, Yt = 5, Vt = 6, Bt = 7, qt = 8; R("M", ["MM", 2], "Mo", function () { return this.month() + 1 }), R("MMM", 0, 0, function (e) { return this.localeData().monthsShort(this, e) }), R("MMMM", 0, 0, function (e) { return this.localeData().months(this, e) }), M("month", "M"), V("M", Ct), V("MM", Ct, wt), V("MMM", function (e, t) { return t.monthsShortRegex(e) }), V("MMMM", function (e, t) { return t.monthsRegex(e) }), Z(["M", "MM"], function (e, t) { t[Rt] = g(e) - 1 }), Z(["MMM", "MMMM"], function (e, t, n, i) { var r = n._locale.monthsParse(e, i, n._strict); null != r ? t[Rt] = r : l(n).invalidMonth = e }); var Ut = /D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/, Zt = "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), Qt = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), Gt = jt, Xt = jt, Jt = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/, Kt = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/, en = /Z|[+-]\d\d(?::?\d\d)?/, tn = [["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/], ["YYYY-MM-DD", /\d{4}-\d\d-\d\d/], ["GGGG-[W]WW-E", /\d{4}-W\d\d-\d/], ["GGGG-[W]WW", /\d{4}-W\d\d/, !1], ["YYYY-DDD", /\d{4}-\d{3}/], ["YYYY-MM", /\d{4}-\d\d/, !1], ["YYYYYYMMDD", /[+-]\d{10}/], ["YYYYMMDD", /\d{8}/], ["GGGG[W]WWE", /\d{4}W\d{3}/], ["GGGG[W]WW", /\d{4}W\d{2}/, !1], ["YYYYDDD", /\d{7}/]], nn = [["HH:mm:ss.SSSS", /\d\d:\d\d:\d\d\.\d+/], ["HH:mm:ss,SSSS", /\d\d:\d\d:\d\d,\d+/], ["HH:mm:ss", /\d\d:\d\d:\d\d/], ["HH:mm", /\d\d:\d\d/], ["HHmmss.SSSS", /\d\d\d\d\d\d\.\d+/], ["HHmmss,SSSS", /\d\d\d\d\d\d,\d+/], ["HHmmss", /\d\d\d\d\d\d/], ["HHmm", /\d\d\d\d/], ["HH", /\d\d/]], rn = /^\/?Date\((\-?\d+)/i; e.createFromInputFallback = b("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.", function (e) { e._d = new Date(e._i + (e._useUTC ? " UTC" : "")) }), R("Y", 0, 0, function () { var e = this.year(); return 9999 >= e ? "" + e : "+" + e }), R(0, ["YY", 2], 0, function () { return this.year() % 100 }), R(0, ["YYYY", 4], 0, "year"), R(0, ["YYYYY", 5], 0, "year"), R(0, ["YYYYYY", 6, !0], 0, "year"), M("year", "y"), V("Y", Mt), V("YY", Ct, wt), V("YYYY", Ft, kt), V("YYYYY", At, _t), V("YYYYYY", At, _t), Z(["YYYYY", "YYYYYY"], zt), Z("YYYY", function (t, n) { n[zt] = 2 === t.length ? e.parseTwoDigitYear(t) : g(t) }), Z("YY", function (t, n) { n[zt] = e.parseTwoDigitYear(t) }), Z("Y", function (e, t) { t[zt] = parseInt(e, 10) }), e.parseTwoDigitYear = function (e) { return g(e) + (g(e) > 68 ? 1900 : 2e3) }; var an = N("FullYear", !1); e.ISO_8601 = function () { }; var sn = b("moment().min is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548", function () { var e = Ce.apply(null, arguments); return this.isValid() && e.isValid() ? this > e ? this : e : d() }), on = b("moment().max is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548", function () { var e = Ce.apply(null, arguments); return this.isValid() && e.isValid() ? e > this ? this : e : d() }); Fe("Z", ":"), Fe("ZZ", ""), V("Z", Pt), V("ZZ", Pt), Z(["Z", "ZZ"], function (e, t, n) { n._useUTC = !0, n._tzm = Ae(Pt, e) }); var ln = /([\+\-]|\d\d)/gi; e.updateOffset = function () { }; var un = /^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/, dn = /^(-)?P(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)W)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?$/; Pe.fn = Te.prototype; var cn = ze(1, "add"), hn = ze(-1, "subtract"); e.defaultFormat = "YYYY-MM-DDTHH:mm:ssZ"; var pn = b("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.", function (e) { return void 0 === e ? this.localeData() : this.locale(e) }); R(0, ["gg", 2], 0, function () { return this.weekYear() % 100 }), R(0, ["GG", 2], 0, function () { return this.isoWeekYear() % 100 }), Ye("gggg", "weekYear"), Ye("ggggg", "weekYear"), Ye("GGGG", "isoWeekYear"), Ye("GGGGG", "isoWeekYear"), M("weekYear", "gg"), M("isoWeekYear", "GG"), V("G", Mt), V("g", Mt), V("GG", Ct, wt), V("gg", Ct, wt), V("GGGG", Ft, kt), V("gggg", Ft, kt), V("GGGGG", At, _t), V("ggggg", At, _t), Q(["gggg", "ggggg", "GGGG", "GGGGG"], function (e, t, n, i) { t[i.substr(0, 2)] = g(e) }), Q(["gg", "GG"], function (t, n, i, r) { n[r] = e.parseTwoDigitYear(t) }), R("Q", 0, "Qo", "quarter"), M("quarter", "Q"), V("Q", bt), Z("Q", function (e, t) { t[Rt] = 3 * (g(e) - 1) }), R("w", ["ww", 2], "wo", "week"), R("W", ["WW", 2], "Wo", "isoWeek"), M("week", "w"), M("isoWeek", "W"), V("w", Ct), V("ww", Ct, wt), V("W", Ct), V("WW", Ct, wt), Q(["w", "ww", "W", "WW"], function (e, t, n, i) { t[i.substr(0, 1)] = g(e) }); var fn = {dow: 0, doy: 6}; R("D", ["DD", 2], "Do", "date"), M("date", "D"), V("D", Ct), V("DD", Ct, wt), V("Do", function (e, t) { return e ? t._ordinalParse : t._ordinalParseLenient }), Z(["D", "DD"], Ht), Z("Do", function (e, t) { t[Ht] = g(e.match(Ct)[0], 10) }); var mn = N("Date", !0); R("d", 0, "do", "day"), R("dd", 0, 0, function (e) { return this.localeData().weekdaysMin(this, e) }), R("ddd", 0, 0, function (e) { return this.localeData().weekdaysShort(this, e) }), R("dddd", 0, 0, function (e) { return this.localeData().weekdays(this, e) }), R("e", 0, 0, "weekday"), R("E", 0, 0, "isoWeekday"), M("day", "d"), M("weekday", "e"), M("isoWeekday", "E"), V("d", Ct), V("e", Ct), V("E", Ct), V("dd", jt), V("ddd", jt), V("dddd", jt), Q(["dd", "ddd", "dddd"], function (e, t, n, i) { var r = n._locale.weekdaysParse(e, i, n._strict); null != r ? t.d = r : l(n).invalidWeekday = e }), Q(["d", "e", "E"], function (e, t, n, i) { t[i] = g(e) }); var gn = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), vn = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), yn = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"); R("DDD", ["DDDD", 3], "DDDo", "dayOfYear"), M("dayOfYear", "DDD"), V("DDD", St), V("DDDD", xt), Z(["DDD", "DDDD"], function (e, t, n) { n._dayOfYear = g(e) }), R("H", ["HH", 2], 0, "hour"), R("h", ["hh", 2], 0, Ue), R("hmm", 0, 0, function () { return "" + Ue.apply(this) + z(this.minutes(), 2) }), R("hmmss", 0, 0, function () { return "" + Ue.apply(this) + z(this.minutes(), 2) + z(this.seconds(), 2) }), R("Hmm", 0, 0, function () { return "" + this.hours() + z(this.minutes(), 2) }), R("Hmmss", 0, 0, function () { return "" + this.hours() + z(this.minutes(), 2) + z(this.seconds(), 2) }), Ze("a", !0), Ze("A", !1), M("hour", "h"), V("a", Qe), V("A", Qe), V("H", Ct), V("h", Ct), V("HH", Ct, wt), V("hh", Ct, wt), V("hmm", Dt), V("hmmss", Tt), V("Hmm", Dt), V("Hmmss", Tt), Z(["H", "HH"], It), Z(["a", "A"], function (e, t, n) { n._isPm = n._locale.isPM(e), n._meridiem = e }), Z(["h", "hh"], function (e, t, n) { t[It] = g(e), l(n).bigHour = !0 }), Z("hmm", function (e, t, n) { var i = e.length - 2; t[It] = g(e.substr(0, i)), t[Wt] = g(e.substr(i)), l(n).bigHour = !0 }), Z("hmmss", function (e, t, n) { var i = e.length - 4, r = e.length - 2; t[It] = g(e.substr(0, i)), t[Wt] = g(e.substr(i, 2)), t[Yt] = g(e.substr(r)), l(n).bigHour = !0 }), Z("Hmm", function (e, t, n) { var i = e.length - 2; t[It] = g(e.substr(0, i)), t[Wt] = g(e.substr(i)) }), Z("Hmmss", function (e, t, n) { var i = e.length - 4, r = e.length - 2; t[It] = g(e.substr(0, i)), t[Wt] = g(e.substr(i, 2)), t[Yt] = g(e.substr(r)) }); var bn = /[ap]\.?m?\.?/i, wn = N("Hours", !0); R("m", ["mm", 2], 0, "minute"), M("minute", "m"), V("m", Ct), V("mm", Ct, wt), Z(["m", "mm"], Wt); var xn = N("Minutes", !1); R("s", ["ss", 2], 0, "second"), M("second", "s"), V("s", Ct), V("ss", Ct, wt), Z(["s", "ss"], Yt); var kn = N("Seconds", !1); R("S", 0, 0, function () { return ~~(this.millisecond() / 100) }), R(0, ["SS", 2], 0, function () { return ~~(this.millisecond() / 10) }), R(0, ["SSS", 3], 0, "millisecond"), R(0, ["SSSS", 4], 0, function () { return 10 * this.millisecond() }), R(0, ["SSSSS", 5], 0, function () { return 100 * this.millisecond() }), R(0, ["SSSSSS", 6], 0, function () { return 1e3 * this.millisecond() }), R(0, ["SSSSSSS", 7], 0, function () { return 1e4 * this.millisecond() }), R(0, ["SSSSSSSS", 8], 0, function () { return 1e5 * this.millisecond() }), R(0, ["SSSSSSSSS", 9], 0, function () { return 1e6 * this.millisecond() }), M("millisecond", "ms"), V("S", St, bt), V("SS", St, wt), V("SSS", St, xt); var _n; for (_n = "SSSS"; _n.length <= 9; _n += "S") V(_n, Et); for (_n = "S"; _n.length <= 9; _n += "S") Z(_n, function (e, t) { t[Vt] = g(1e3 * ("0." + e)) }); var Cn = N("Milliseconds", !1); R("z", 0, 0, "zoneAbbr"), R("zz", 0, 0, "zoneName"); var Dn = p.prototype; Dn.add = cn, Dn.calendar = function (e, t) { var n = e || Ce(), i = Ee(n, this).startOf("day"), r = this.diff(i, "days", !0), a = -6 > r ? "sameElse" : -1 > r ? "lastWeek" : 0 > r ? "lastDay" : 1 > r ? "sameDay" : 2 > r ? "nextDay" : 7 > r ? "nextWeek" : "sameElse", s = t && (x(t[a]) ? t[a]() : t[a]); return this.format(s || this.localeData().calendar(a, this, Ce(n))) }, Dn.clone = function () { return new p(this) }, Dn.diff = function (e, t, n) { var i, r, a, s; return this.isValid() && (i = Ee(e, this)).isValid() ? (r = 6e4 * (i.utcOffset() - this.utcOffset()), "year" === (t = $(t)) || "month" === t || "quarter" === t ? (s = He(this, i), "quarter" === t ? s /= 3 : "year" === t && (s /= 12)) : (a = this - i, s = "second" === t ? a / 1e3 : "minute" === t ? a / 6e4 : "hour" === t ? a / 36e5 : "day" === t ? (a - r) / 864e5 : "week" === t ? (a - r) / 6048e5 : a), n ? s : m(s)) : NaN }, Dn.endOf = function (e) { return void 0 === (e = $(e)) || "millisecond" === e ? this : this.startOf(e).add(1, "isoWeek" === e ? "week" : e).subtract(1, "ms") }, Dn.format = function (t) { var n = W(this, t || e.defaultFormat); return this.localeData().postformat(n) }, Dn.from = function (e, t) { return this.isValid() && (f(e) && e.isValid() || Ce(e).isValid()) ? Pe({ to: this, from: e }).locale(this.locale()).humanize(!t) : this.localeData().invalidDate() }, Dn.fromNow = function (e) { return this.from(Ce(), e) }, Dn.to = function (e, t) { return this.isValid() && (f(e) && e.isValid() || Ce(e).isValid()) ? Pe({ from: this, to: e }).locale(this.locale()).humanize(!t) : this.localeData().invalidDate() }, Dn.toNow = function (e) { return this.to(Ce(), e) }, Dn.get = L, Dn.invalidAt = function () { return l(this).overflow }, Dn.isAfter = function (e, t) { var n = f(e) ? e : Ce(e); return !(!this.isValid() || !n.isValid()) && ("millisecond" === (t = $(c(t) ? "millisecond" : t)) ? +this > +n : +n < +this.clone().startOf(t)) }, Dn.isBefore = function (e, t) { var n = f(e) ? e : Ce(e); return !(!this.isValid() || !n.isValid()) && ("millisecond" === (t = $(c(t) ? "millisecond" : t)) ? +n > +this : +this.clone().endOf(t) < +n) }, Dn.isBetween = function (e, t, n) { return this.isAfter(e, n) && this.isBefore(t, n) }, Dn.isSame = function (e, t) { var n, i = f(e) ? e : Ce(e); return !(!this.isValid() || !i.isValid()) && ("millisecond" === (t = $(t || "millisecond")) ? +this == +i : (n = +i, +this.clone().startOf(t) <= n && n <= +this.clone().endOf(t))) }, Dn.isSameOrAfter = function (e, t) { return this.isSame(e, t) || this.isAfter(e, t) }, Dn.isSameOrBefore = function (e, t) { return this.isSame(e, t) || this.isBefore(e, t) }, Dn.isValid = function () { return u(this) }, Dn.lang = pn, Dn.locale = Ie, Dn.localeData = We, Dn.max = on, Dn.min = sn, Dn.parsingFlags = function () { return a({}, l(this)) }, Dn.set = L, Dn.startOf = function (e) { switch (e = $(e)) { case"year": this.month(0); case"quarter": case"month": this.date(1); case"week": case"isoWeek": case"day": this.hours(0); case"hour": this.minutes(0); case"minute": this.seconds(0); case"second": this.milliseconds(0) } return "week" === e && this.weekday(0), "isoWeek" === e && this.isoWeekday(1), "quarter" === e && this.month(3 * Math.floor(this.month() / 3)), this }, Dn.subtract = hn, Dn.toArray = function () { var e = this; return [e.year(), e.month(), e.date(), e.hour(), e.minute(), e.second(), e.millisecond()] }, Dn.toObject = function () { var e = this; return { years: e.year(), months: e.month(), date: e.date(), hours: e.hours(), minutes: e.minutes(), seconds: e.seconds(), milliseconds: e.milliseconds() } }, Dn.toDate = function () { return this._offset ? new Date(+this) : this._d }, Dn.toISOString = function () { var e = this.clone().utc(); return 0 < e.year() && e.year() <= 9999 ? x(Date.prototype.toISOString) ? this.toDate().toISOString() : W(e, "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]") : W(e, "YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]") }, Dn.toJSON = function () { return this.isValid() ? this.toISOString() : null }, Dn.toString = function () { return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ") }, Dn.unix = function () { return Math.floor(+this / 1e3) }, Dn.valueOf = function () { return +this._d - 6e4 * (this._offset || 0) }, Dn.creationData = function () { return {input: this._i, format: this._f, locale: this._locale, isUTC: this._isUTC, strict: this._strict} }, Dn.year = an, Dn.isLeapYear = function () { return oe(this.year()) }, Dn.weekYear = function (e) { return Ve.call(this, e, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy) }, Dn.isoWeekYear = function (e) { return Ve.call(this, e, this.isoWeek(), this.isoWeekday(), 1, 4) }, Dn.quarter = Dn.quarters = function (e) { return null == e ? Math.ceil((this.month() + 1) / 3) : this.month(3 * (e - 1) + this.month() % 3) }, Dn.month = K, Dn.daysInMonth = function () { return X(this.year(), this.month()) }, Dn.week = Dn.weeks = function (e) { var t = this.localeData().week(this); return null == e ? t : this.add(7 * (e - t), "d") }, Dn.isoWeek = Dn.isoWeeks = function (e) { var t = de(this, 1, 4).week; return null == e ? t : this.add(7 * (e - t), "d") }, Dn.weeksInYear = function () { var e = this.localeData()._week; return ce(this.year(), e.dow, e.doy) }, Dn.isoWeeksInYear = function () { return ce(this.year(), 1, 4) }, Dn.date = mn, Dn.day = Dn.days = function (e) { if (!this.isValid()) return null != e ? this : NaN; var t = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); return null != e ? (e = qe(e, this.localeData()), this.add(e - t, "d")) : t }, Dn.weekday = function (e) { if (!this.isValid()) return null != e ? this : NaN; var t = (this.day() + 7 - this.localeData()._week.dow) % 7; return null == e ? t : this.add(e - t, "d") }, Dn.isoWeekday = function (e) { return this.isValid() ? null == e ? this.day() || 7 : this.day(this.day() % 7 ? e : e - 7) : null != e ? this : NaN }, Dn.dayOfYear = function (e) { var t = Math.round((this.clone().startOf("day") - this.clone().startOf("year")) / 864e5) + 1; return null == e ? t : this.add(e - t, "d") }, Dn.hour = Dn.hours = wn, Dn.minute = Dn.minutes = xn, Dn.second = Dn.seconds = kn, Dn.millisecond = Dn.milliseconds = Cn, Dn.utcOffset = function (t, n) { var i, r = this._offset || 0; return this.isValid() ? null != t ? ("string" == typeof t ? t = Ae(Pt, t) : Math.abs(t) < 16 && (t *= 60), !this._isUTC && n && (i = Me(this)), this._offset = t, this._isUTC = !0, null != i && this.add(i, "m"), r !== t && (!n || this._changeInProgress ? Re(this, Pe(t - r, "m"), 1, !1) : this._changeInProgress || (this._changeInProgress = !0, e.updateOffset(this, !0), this._changeInProgress = null)), this) : this._isUTC ? r : Me(this) : null != t ? this : NaN }, Dn.utc = function (e) { return this.utcOffset(0, e) }, Dn.local = function (e) { return this._isUTC && (this.utcOffset(0, e), this._isUTC = !1, e && this.subtract(Me(this), "m")), this }, Dn.parseZone = function () { return this._tzm ? this.utcOffset(this._tzm) : "string" == typeof this._i && this.utcOffset(Ae($t, this._i)), this }, Dn.hasAlignedHourOffset = function (e) { return !!this.isValid() && (e = e ? Ce(e).utcOffset() : 0, (this.utcOffset() - e) % 60 == 0) }, Dn.isDST = function () { return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset() }, Dn.isDSTShifted = function () { if (!c(this._isDSTShifted)) return this._isDSTShifted; var e = {}; if (h(e, this), (e = xe(e))._a) { var t = e._isUTC ? s(e._a) : Ce(e._a); this._isDSTShifted = this.isValid() && v(e._a, t.toArray()) > 0 } else this._isDSTShifted = !1; return this._isDSTShifted }, Dn.isLocal = function () { return !!this.isValid() && !this._isUTC }, Dn.isUtcOffset = function () { return !!this.isValid() && this._isUTC }, Dn.isUtc = $e, Dn.isUTC = $e, Dn.zoneAbbr = function () { return this._isUTC ? "UTC" : "" }, Dn.zoneName = function () { return this._isUTC ? "Coordinated Universal Time" : "" }, Dn.dates = b("dates accessor is deprecated. Use date instead.", mn), Dn.months = b("months accessor is deprecated. Use month instead", K), Dn.years = b("years accessor is deprecated. Use year instead", an), Dn.zone = b("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779", function (e, t) { return null != e ? ("string" != typeof e && (e = -e), this.utcOffset(e, t), this) : -this.utcOffset() }); var Tn = Dn, Sn = { sameDay: "[Today at] LT", nextDay: "[Tomorrow at] LT", nextWeek: "dddd [at] LT", lastDay: "[Yesterday at] LT", lastWeek: "[Last] dddd [at] LT", sameElse: "L" }, Fn = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, An = /\d{1,2}/, En = { future: "in %s", past: "%s ago", s: "a few seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" }, Mn = C.prototype; Mn._calendar = Sn, Mn.calendar = function (e, t, n) { var i = this._calendar[e]; return x(i) ? i.call(t, n) : i }, Mn._longDateFormat = Fn, Mn.longDateFormat = function (e) { var t = this._longDateFormat[e], n = this._longDateFormat[e.toUpperCase()]; return t || !n ? t : (this._longDateFormat[e] = n.replace(/MMMM|MM|DD|dddd/g, function (e) { return e.slice(1) }), this._longDateFormat[e]) }, Mn._invalidDate = "Invalid date", Mn.invalidDate = function () { return this._invalidDate }, Mn._ordinal = "%d", Mn.ordinal = function (e) { return this._ordinal.replace("%d", e) }, Mn._ordinalParse = An, Mn.preparse = Ge, Mn.postformat = Ge, Mn._relativeTime = En, Mn.relativeTime = function (e, t, n, i) { var r = this._relativeTime[n]; return x(r) ? r(e, t, n, i) : r.replace(/%d/i, e) }, Mn.pastFuture = function (e, t) { var n = this._relativeTime[e > 0 ? "future" : "past"]; return x(n) ? n(t) : n.replace(/%s/i, t) }, Mn.set = function (e) { var t, n; for (n in e) t = e[n], x(t) ? this[n] = t : this["_" + n] = t; this._config = e, this._ordinalParseLenient = new RegExp(this._ordinalParse.source + "|" + /\d{1,2}/.source) }, Mn.months = function (e, n) { return t(this._months) ? this._months[e.month()] : this._months[Ut.test(n) ? "format" : "standalone"][e.month()] }, Mn._months = Zt, Mn.monthsShort = function (e, n) { return t(this._monthsShort) ? this._monthsShort[e.month()] : this._monthsShort[Ut.test(n) ? "format" : "standalone"][e.month()] }, Mn._monthsShort = Qt, Mn.monthsParse = function (e, t, n) { var i, r, a; for (this._monthsParse || (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = []), i = 0; 12 > i; i++) { if (r = s([2e3, i]), n && !this._longMonthsParse[i] && (this._longMonthsParse[i] = new RegExp("^" + this.months(r, "").replace(".", "") + "$", "i"), this._shortMonthsParse[i] = new RegExp("^" + this.monthsShort(r, "").replace(".", "") + "$", "i")), n || this._monthsParse[i] || (a = "^" + this.months(r, "") + "|^" + this.monthsShort(r, ""), this._monthsParse[i] = new RegExp(a.replace(".", ""), "i")), n && "MMMM" === t && this._longMonthsParse[i].test(e)) return i; if (n && "MMM" === t && this._shortMonthsParse[i].test(e)) return i; if (!n && this._monthsParse[i].test(e)) return i } }, Mn._monthsRegex = Xt, Mn.monthsRegex = function (e) { return this._monthsParseExact ? (r(this, "_monthsRegex") || ee.call(this), e ? this._monthsStrictRegex : this._monthsRegex) : this._monthsStrictRegex && e ? this._monthsStrictRegex : this._monthsRegex }, Mn._monthsShortRegex = Gt, Mn.monthsShortRegex = function (e) { return this._monthsParseExact ? (r(this, "_monthsRegex") || ee.call(this), e ? this._monthsShortStrictRegex : this._monthsShortRegex) : this._monthsShortStrictRegex && e ? this._monthsShortStrictRegex : this._monthsShortRegex }, Mn.week = function (e) { return de(e, this._week.dow, this._week.doy).week }, Mn._week = fn, Mn.firstDayOfYear = function () { return this._week.doy }, Mn.firstDayOfWeek = function () { return this._week.dow }, Mn.weekdays = function (e, n) { return t(this._weekdays) ? this._weekdays[e.day()] : this._weekdays[this._weekdays.isFormat.test(n) ? "format" : "standalone"][e.day()] }, Mn._weekdays = gn, Mn.weekdaysMin = function (e) { return this._weekdaysMin[e.day()] }, Mn._weekdaysMin = yn, Mn.weekdaysShort = function (e) { return this._weekdaysShort[e.day()] }, Mn._weekdaysShort = vn, Mn.weekdaysParse = function (e, t, n) { var i, r, a; for (this._weekdaysParse || (this._weekdaysParse = [], this._minWeekdaysParse = [], this._shortWeekdaysParse = [], this._fullWeekdaysParse = []), i = 0; 7 > i; i++) { if (r = Ce([2e3, 1]).day(i), n && !this._fullWeekdaysParse[i] && (this._fullWeekdaysParse[i] = new RegExp("^" + this.weekdays(r, "").replace(".", ".?") + "$", "i"), this._shortWeekdaysParse[i] = new RegExp("^" + this.weekdaysShort(r, "").replace(".", ".?") + "$", "i"), this._minWeekdaysParse[i] = new RegExp("^" + this.weekdaysMin(r, "").replace(".", ".?") + "$", "i")), this._weekdaysParse[i] || (a = "^" + this.weekdays(r, "") + "|^" + this.weekdaysShort(r, "") + "|^" + this.weekdaysMin(r, ""), this._weekdaysParse[i] = new RegExp(a.replace(".", ""), "i")), n && "dddd" === t && this._fullWeekdaysParse[i].test(e)) return i; if (n && "ddd" === t && this._shortWeekdaysParse[i].test(e)) return i; if (n && "dd" === t && this._minWeekdaysParse[i].test(e)) return i; if (!n && this._weekdaysParse[i].test(e)) return i } }, Mn.isPM = function (e) { return "p" === (e + "").toLowerCase().charAt(0) }, Mn._meridiemParse = bn, Mn.meridiem = function (e, t, n) { return e > 11 ? n ? "pm" : "PM" : n ? "am" : "AM" }, F("en", { ordinalParse: /\d{1,2}(th|st|nd|rd)/, ordinal: function (e) { var t = e % 10; return e + (1 === g(e % 100 / 10) ? "th" : 1 === t ? "st" : 2 === t ? "nd" : 3 === t ? "rd" : "th") } }), e.lang = b("moment.lang is deprecated. Use moment.locale instead.", F), e.langData = b("moment.langData is deprecated. Use moment.localeData instead.", E); var $n = Math.abs, Pn = it("ms"), Nn = it("s"), jn = it("m"), On = it("h"), Ln = it("d"), zn = it("w"), Rn = it("M"), Hn = it("y"), In = rt("milliseconds"), Wn = rt("seconds"), Yn = rt("minutes"), Vn = rt("hours"), Bn = rt("days"), qn = rt("months"), Un = rt("years"), Zn = Math.round, Qn = {s: 45, m: 45, h: 22, d: 26, M: 11}, Gn = Math.abs, Xn = Te.prototype; return Xn.abs = function () { var e = this._data; return this._milliseconds = $n(this._milliseconds), this._days = $n(this._days), this._months = $n(this._months), e.milliseconds = $n(e.milliseconds), e.seconds = $n(e.seconds), e.minutes = $n(e.minutes), e.hours = $n(e.hours), e.months = $n(e.months), e.years = $n(e.years), this }, Xn.add = function (e, t) { return Ke(this, e, t, 1) }, Xn.subtract = function (e, t) { return Ke(this, e, t, -1) }, Xn.as = function (e) { var t, n, i = this._milliseconds; if ("month" === (e = $(e)) || "year" === e) return t = this._days + i / 864e5, n = this._months + tt(t), "month" === e ? n : n / 12; switch (t = this._days + Math.round(nt(this._months)), e) { case"week": return t / 7 + i / 6048e5; case"day": return t + i / 864e5; case"hour": return 24 * t + i / 36e5; case"minute": return 1440 * t + i / 6e4; case"second": return 86400 * t + i / 1e3; case"millisecond": return Math.floor(864e5 * t) + i; default: throw new Error("Unknown unit " + e) } }, Xn.asMilliseconds = Pn, Xn.asSeconds = Nn, Xn.asMinutes = jn, Xn.asHours = On, Xn.asDays = Ln, Xn.asWeeks = zn, Xn.asMonths = Rn, Xn.asYears = Hn, Xn.valueOf = function () { return this._milliseconds + 864e5 * this._days + this._months % 12 * 2592e6 + 31536e6 * g(this._months / 12) }, Xn._bubble = function () { var e, t, n, i, r, a = this._milliseconds, s = this._days, o = this._months, l = this._data; return a >= 0 && s >= 0 && o >= 0 || 0 >= a && 0 >= s && 0 >= o || (a += 864e5 * et(nt(o) + s), s = 0, o = 0), l.milliseconds = a % 1e3, e = m(a / 1e3), l.seconds = e % 60, t = m(e / 60), l.minutes = t % 60, n = m(t / 60), l.hours = n % 24, s += m(n / 24), r = m(tt(s)), o += r, s -= et(nt(r)), i = m(o / 12), o %= 12, l.days = s, l.months = o, l.years = i, this }, Xn.get = function (e) { return e = $(e), this[e + "s"]() }, Xn.milliseconds = In, Xn.seconds = Wn, Xn.minutes = Yn, Xn.hours = Vn, Xn.days = Bn, Xn.weeks = function () { return m(this.days() / 7) }, Xn.months = qn, Xn.years = Un, Xn.humanize = function (e) { var t = this.localeData(), n = st(this, !e, t); return e && (n = t.pastFuture(+this, n)), t.postformat(n) }, Xn.toISOString = ot, Xn.toString = ot, Xn.toJSON = ot, Xn.locale = Ie, Xn.localeData = We, Xn.toIsoString = b("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)", ot), Xn.lang = pn, R("X", 0, 0, "unix"), R("x", 0, 0, "valueOf"), V("x", Mt), V("X", Nt), Z("X", function (e, t, n) { n._d = new Date(1e3 * parseFloat(e, 10)) }), Z("x", function (e, t, n) { n._d = new Date(g(e)) }), e.version = "2.12.0", function (e) { lt = e }(Ce), e.fn = Tn, e.min = function () { return De("isBefore", [].slice.call(arguments, 0)) }, e.max = function () { return De("isAfter", [].slice.call(arguments, 0)) }, e.now = function () { return Date.now ? Date.now() : +new Date }, e.utc = s, e.unix = function (e) { return Ce(1e3 * e) }, e.months = function (e, t) { return Je(e, t, "months", 12, "month") }, e.isDate = n, e.locale = F, e.invalid = d, e.duration = Pe, e.isMoment = f, e.weekdays = function (e, t) { return Je(e, t, "weekdays", 7, "day") }, e.parseZone = function () { return Ce.apply(null, arguments).parseZone() }, e.localeData = E, e.isDuration = Se, e.monthsShort = function (e, t) { return Je(e, t, "monthsShort", 12, "month") }, e.weekdaysMin = function (e, t) { return Je(e, t, "weekdaysMin", 7, "day") }, e.defineLocale = A, e.updateLocale = function (e, t) { if (null != t) { var n; null != pt[e] && (t = _(pt[e]._config, t)), (n = new C(t)).parentLocale = pt[e], pt[e] = n, F(e) } else null != pt[e] && (null != pt[e].parentLocale ? pt[e] = pt[e].parentLocale : null != pt[e] && delete pt[e]); return pt[e] }, e.locales = function () { return Object.keys(pt) }, e.weekdaysShort = function (e, t) { return Je(e, t, "weekdaysShort", 7, "day") }, e.normalizeUnits = $, e.relativeTimeThreshold = function (e, t) { return void 0 !== Qn[e] && (void 0 === t ? Qn[e] : (Qn[e] = t, !0)) }, e.prototype = Tn, e }), function (e) { "function" == typeof define && define.amd ? define(["jquery", "moment"], e) : "object" == typeof exports && "undefined" != typeof module ? module.exports = e(require("jquery"), require("moment")) : e(jQuery, moment) }(function (e, t) { "use strict"; e.dateRangePickerLanguages = { default: { selected: "Selected:", day: "Day", days: "Days", apply: "Close", "week-1": "mo", "week-2": "tu", "week-3": "we", "week-4": "th", "week-5": "fr", "week-6": "sa", "week-7": "su", "week-number": "W", "month-name": ["january", "february", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december"], shortcuts: "Shortcuts", "custom-values": "Custom Values", past: "Past", following: "Following", previous: "Previous", "prev-week": "Week", "prev-month": "Month", "prev-year": "Year", next: "Next", "next-week": "Week", "next-month": "Month", "next-year": "Year", "less-than": "Date range should not be more than %d days", "more-than": "Date range should not be less than %d days", "default-more": "Please select a date range longer than %d days", "default-single": "Please select a date", "default-less": "Please select a date range less than %d days", "default-range": "Please select a date range between %d and %d days", "default-default": "Please select a date range", time: "Time", hour: "Hour", minute: "Minute" }, az: { selected: "Seçildi:", day: " gün", days: " gün", apply: "tətbiq", "week-1": "1", "week-2": "2", "week-3": "3", "week-4": "4", "week-5": "5", "week-6": "6", "week-7": "7", "month-name": ["yanvar", "fevral", "mart", "aprel", "may", "iyun", "iyul", "avqust", "sentyabr", "oktyabr", "noyabr", "dekabr"], shortcuts: "Qısayollar", past: "Keçmiş", following: "Növbəti", previous: "   ", "prev-week": "Öncəki həftə", "prev-month": "Öncəki ay", "prev-year": "Öncəki il", next: "   ", "next-week": "Növbəti həftə", "next-month": "Növbəti ay", "next-year": "Növbəti il", "less-than": "Tarix aralığı %d gündən çox olmamalıdır", "more-than": "Tarix aralığı %d gündən az olmamalıdır", "default-more": "%d gündən çox bir tarix seçin", "default-single": "Tarix seçin", "default-less": "%d gündən az bir tarix seçin", "default-range": "%d və %d gün aralığında tarixlər seçin", "default-default": "Tarix aralığı seçin" }, cn: { selected: "已选择:", day: "天", days: "天", apply: "确定", "week-1": "一", "week-2": "二", "week-3": "三", "week-4": "四", "week-5": "五", "week-6": "六", "week-7": "日", "week-number": "周", "month-name": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], shortcuts: "快捷选择", past: "过去", following: "将来", previous: "   ", "prev-week": "上周", "prev-month": "上个月", "prev-year": "去年", next: "   ", "next-week": "下周", "next-month": "下个月", "next-year": "明年", "less-than": "所选日期范围不能大于%d天", "more-than": "所选日期范围不能小于%d天", "default-more": "请选择大于%d天的日期范围", "default-less": "请选择小于%d天的日期范围", "default-range": "请选择%d天到%d天的日期范围", "default-single": "请选择一个日期", "default-default": "请选择一个日期范围", time: "时间", hour: "小时", minute: "分钟" }, cz: { selected: "Vybráno:", day: "Den", days: "Dny", apply: "Zavřít", "week-1": "po", "week-2": "út", "week-3": "st", "week-4": "čt", "week-5": "pá", "week-6": "so", "week-7": "ne", "month-name": ["leden", "únor", "březen", "duben", "květen", "červen", "červenec", "srpen", "září", "říjen", "listopad", "prosinec"], shortcuts: "Zkratky", past: "po", following: "následující", previous: "předchozí", "prev-week": "týden", "prev-month": "měsíc", "prev-year": "rok", next: "další", "next-week": "týden", "next-month": "měsíc", "next-year": "rok", "less-than": "Rozsah data by neměl být větší než %d dnů", "more-than": "Rozsah data by neměl být menší než %d dnů", "default-more": "Prosím zvolte rozsah data větší než %d dnů", "default-single": "Prosím zvolte datum", "default-less": "Prosím zvolte rozsah data menší než %d dnů", "default-range": "Prosím zvolte rozsah data mezi %d a %d dny", "default-default": "Prosím zvolte rozsah data" }, de: { selected: "Auswahl:", day: "Tag", days: "Tage", apply: "Schließen", "week-1": "mo", "week-2": "di", "week-3": "mi", "week-4": "do", "week-5": "fr", "week-6": "sa", "week-7": "so", "month-name": ["januar", "februar", "märz", "april", "mai", "juni", "juli", "august", "september", "oktober", "november", "dezember"], shortcuts: "Schnellwahl", past: "Vorherige", following: "Folgende", previous: "Vorherige", "prev-week": "Woche", "prev-month": "Monat", "prev-year": "Jahr", next: "Nächste", "next-week": "Woche", "next-month": "Monat", "next-year": "Jahr", "less-than": "Datumsbereich darf nicht größer sein als %d Tage", "more-than": "Datumsbereich darf nicht kleiner sein als %d Tage", "default-more": "Bitte mindestens %d Tage auswählen", "default-single": "Bitte ein Datum auswählen", "default-less": "Bitte weniger als %d Tage auswählen", "default-range": "Bitte einen Datumsbereich zwischen %d und %d Tagen auswählen", "default-default": "Bitte ein Start- und Enddatum auswählen", Time: "Zeit", hour: "Stunde", minute: "Minute" }, es: { selected: "Seleccionado:", day: "Día", days: "Días", apply: "Cerrar", "week-1": "lu", "week-2": "ma", "week-3": "mi", "week-4": "ju", "week-5": "vi", "week-6": "sa", "week-7": "do", "month-name": ["enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"], shortcuts: "Accesos directos", past: "Pasado", following: "Siguiente", previous: "Anterior", "prev-week": "Semana", "prev-month": "Mes", "prev-year": "Año", next: "Siguiente", "next-week": "Semana", "next-month": "Mes", "next-year": "Año", "less-than": "El rango no debería ser mayor de %d días", "more-than": "El rango no debería ser menor de %d días", "default-more": "Por favor selecciona un rango mayor a %d días", "default-single": "Por favor selecciona un día", "default-less": "Por favor selecciona un rango menor a %d días", "default-range": "Por favor selecciona un rango entre %d y %d días", "default-default": "Por favor selecciona un rango de fechas." }, fr: { selected: "Sélection:", day: "Jour", days: "Jours", apply: "Fermer", "week-1": "lu", "week-2": "ma", "week-3": "me", "week-4": "je", "week-5": "ve", "week-6": "sa", "week-7": "di", "month-name": ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"], shortcuts: "Raccourcis", past: "Passé", following: "Suivant", previous: "Précédent", "prev-week": "Semaine", "prev-month": "Mois", "prev-year": "Année", next: "Suivant", "next-week": "Semaine", "next-month": "Mois", "next-year": "Année", "less-than": "L'intervalle ne doit pas être supérieure à %d jours", "more-than": "L'intervalle ne doit pas être inférieure à %d jours", "default-more": "Merci de choisir une intervalle supérieure à %d jours", "default-single": "Merci de choisir une date", "default-less": "Merci de choisir une intervalle inférieure %d jours", "default-range": "Merci de choisir une intervalle comprise entre %d et %d jours", "default-default": "Merci de choisir une date" }, hu: { selected: "Kiválasztva:", day: "Nap", days: "Nap", apply: "Ok", "week-1": "h", "week-2": "k", "week-3": "sz", "week-4": "cs", "week-5": "p", "week-6": "sz", "week-7": "v", "month-name": ["január", "február", "március", "április", "május", "június", "július", "augusztus", "szeptember", "október", "november", "december"], shortcuts: "Gyorsválasztó", past: "Múlt", following: "Következő", previous: "Előző", "prev-week": "Hét", "prev-month": "Hónap", "prev-year": "Év", next: "Következő", "next-week": "Hét", "next-month": "Hónap", "next-year": "Év", "less-than": "A kiválasztás nem lehet több %d napnál", "more-than": "A kiválasztás nem lehet több %d napnál", "default-more": "Válassz ki egy időszakot ami hosszabb mint %d nap", "default-single": "Válassz egy napot", "default-less": "Válassz ki egy időszakot ami rövidebb mint %d nap", "default-range": "Válassz ki egy %d - %d nap hosszú időszakot", "default-default": "Válassz ki egy időszakot" }, it: { selected: "Selezionati:", day: "Giorno", days: "Giorni", apply: "Chiudi", "week-1": "lu", "week-2": "ma", "week-3": "me", "week-4": "gi", "week-5": "ve", "week-6": "sa", "week-7": "do", "month-name": ["gennaio", "febbraio", "marzo", "aprile", "maggio", "giugno", "luglio", "agosto", "settembre", "ottobre", "novembre", "dicembre"], shortcuts: "Scorciatoie", past: "Scorso", following: "Successivo", previous: "Precedente", "prev-week": "Settimana", "prev-month": "Mese", "prev-year": "Anno", next: "Prossimo", "next-week": "Settimana", "next-month": "Mese", "next-year": "Anno", "less-than": "L'intervallo non dev'essere maggiore di %d giorni", "more-than": "L'intervallo non dev'essere minore di %d giorni", "default-more": "Seleziona un intervallo maggiore di %d giorni", "default-single": "Seleziona una data", "default-less": "Seleziona un intervallo minore di %d giorni", "default-range": "Seleziona un intervallo compreso tra i %d e i %d giorni", "default-default": "Seleziona un intervallo di date" }, ko: { selected: "기간:", day: "일", days: "일간", apply: "닫기", "week-1": "월", "week-2": "화", "week-3": "수", "week-4": "목", "week-5": "금", "week-6": "토", "week-7": "일", "week-number": "주", "month-name": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], shortcuts: "단축키들", past: "지난(오늘기준)", following: "이후(오늘기준)", previous: "이전", "prev-week": "1주", "prev-month": "1달", "prev-year": "1년", next: "다음", "next-week": "1주", "next-month": "1달", "next-year": "1년", "less-than": "날짜 범위는 %d 일보다 많을 수 없습니다", "more-than": "날짜 범위는 %d 일보다 작을 수 없습니다", "default-more": "날짜 범위를 %d 일보다 길게 선택해 주세요", "default-single": "날짜를 선택해 주세요", "default-less": "%d 일보다 작은 날짜를 선택해 주세요", "default-range": "%d와 %d 일 사이의 날짜 범위를 선택해 주세요", "default-default": "날짜 범위를 선택해 주세요", time: "시각", hour: "시", minute: "분" }, no: { selected: "Valgt:", day: "Dag", days: "Dager", apply: "Lukk", "week-1": "ma", "week-2": "ti", "week-3": "on", "week-4": "to", "week-5": "fr", "week-6": "lø", "week-7": "sø", "month-name": ["januar", "februar", "mars", "april", "mai", "juni", "juli", "august", "september", "oktober", "november", "desember"], shortcuts: "Snarveier", "custom-values": "Egendefinerte Verdier", past: "Over", following: "Følger", previous: "Forrige", "prev-week": "Uke", "prev-month": "Måned", "prev-year": "År", next: "Neste", "next-week": "Uke", "next-month": "Måned", "next-year": "År", "less-than": "Datoperioden skal ikkje være lengre enn %d dager", "more-than": "Datoperioden skal ikkje være kortere enn %d dager", "default-more": "Vennligst velg ein datoperiode lengre enn %d dager", "default-single": "Vennligst velg ein dato", "default-less": "Vennligst velg ein datoperiode mindre enn %d dager", "default-range": "Vennligst velg ein datoperiode mellom %d og %d dager", "default-default": "Vennligst velg ein datoperiode", time: "Tid", hour: "Time", minute: "Minutter" }, nl: { selected: "Geselecteerd:", day: "Dag", days: "Dagen", apply: "Ok", "week-1": "ma", "week-2": "di", "week-3": "wo", "week-4": "do", "week-5": "vr", "week-6": "za", "week-7": "zo", "month-name": ["januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "october", "november", "december"], shortcuts: "Snelkoppelingen", "custom-values": "Aangepaste waarden", past: "Verleden", following: "Komend", previous: "Vorige", "prev-week": "Week", "prev-month": "Maand", "prev-year": "Jaar", next: "Volgende", "next-week": "Week", "next-month": "Maand", "next-year": "Jaar", "less-than": "Interval moet langer dan %d dagen zijn", "more-than": "Interval mag niet minder dan %d dagen zijn", "default-more": "Selecteer een interval langer dan %dagen", "default-single": "Selecteer een datum", "default-less": "Selecteer een interval minder dan %d dagen", "default-range": "Selecteer een interval tussen %d en %d dagen", "default-default": "Selecteer een interval", time: "Tijd", hour: "Uur", minute: "Minuut" }, ru: { selected: "Выбрано:", day: "День", days: "Дней", apply: "Закрыть", "week-1": "пн", "week-2": "вт", "week-3": "ср", "week-4": "чт", "week-5": "пт", "week-6": "сб", "week-7": "вс", "month-name": ["январь", "февраль", "март", "апрель", "май", "июнь", "июль", "август", "сентябрь", "октябрь", "ноябрь", "декабрь"], shortcuts: "Быстрый выбор", past: "Прошедшие", following: "Следующие", previous: "   ", "prev-week": "Неделя", "prev-month": "Месяц", "prev-year": "Год", next: "   ", "next-week": "Неделя", "next-month": "Месяц", "next-year": "Год", "less-than": "Диапазон не может быть больше %d дней", "more-than": "Диапазон не может быть меньше %d дней", "default-more": "Пожалуйста выберите диапазон больше %d дней", "default-single": "Пожалуйста выберите дату", "default-less": "Пожалуйста выберите диапазон меньше %d дней", "default-range": "Пожалуйста выберите диапазон между %d и %d днями", "default-default": "Пожалуйста выберите диапазон" }, pl: { selected: "Wybrany:", day: "Dzień", days: "Dni", apply: "Zamknij", "week-1": "pon", "week-2": "wt", "week-3": "śr", "week-4": "czw", "week-5": "pt", "week-6": "so", "week-7": "nd", "month-name": ["styczeń", "luty", "marzec", "kwiecień", "maj", "czerwiec", "lipiec", "sierpień", "wrzesień", "październik", "listopad", "grudzień"], shortcuts: "Skróty", "custom-values": "Niestandardowe wartości", past: "Przeszłe", following: "Następne", previous: "Poprzednie", "prev-week": "tydzień", "prev-month": "miesiąc", "prev-year": "rok", next: "Następny", "next-week": "tydzień", "next-month": "miesiąc", "next-year": "rok", "less-than": "Okres nie powinien być dłuższy niż %d dni", "more-than": "Okres nie powinien być krótszy niż %d ni", "default-more": "Wybierz okres dłuższy niż %d dni", "default-single": "Wybierz datę", "default-less": "Wybierz okres krótszy niż %d dni", "default-range": "Wybierz okres trwający od %d do %d dni", "default-default": "Wybierz okres", time: "Czas", hour: "Godzina", minute: "Minuta" }, se: { selected: "Vald:", day: "dag", days: "dagar", apply: "godkänn", "week-1": "ma", "week-2": "ti", "week-3": "on", "week-4": "to", "week-5": "fr", "week-6": "lö", "week-7": "sö", "month-name": ["januari", "februari", "mars", "april", "maj", "juni", "juli", "augusti", "september", "oktober", "november", "december"], shortcuts: "genvägar", "custom-values": "Anpassade värden", past: "över", following: "följande", previous: "förra", "prev-week": "vecka", "prev-month": "månad", "prev-year": "år", next: "nästa", "next-week": "vecka", "next-month": "måned", "next-year": "år", "less-than": "Datumintervall bör inte vara mindre än %d dagar", "more-than": "Datumintervall bör inte vara mer än %d dagar", "default-more": "Välj ett datumintervall längre än %d dagar", "default-single": "Välj ett datum", "default-less": "Välj ett datumintervall mindre än %d dagar", "default-range": "Välj ett datumintervall mellan %d och %d dagar", "default-default": "Välj ett datumintervall", time: "tid", hour: "timme", minute: "minut" }, pt: { selected: "Selecionado:", day: "Dia", days: "Dias", apply: "Fechar", "week-1": "seg", "week-2": "ter", "week-3": "qua", "week-4": "qui", "week-5": "sex", "week-6": "sab", "week-7": "dom", "week-number": "N", "month-name": ["janeiro", "fevereiro", "março", "abril", "maio", "junho", "julho", "agosto", "setembro", "outubro", "novembro", "dezembro"], shortcuts: "Atalhos", "custom-values": "Valores Personalizados", past: "Passado", following: "Seguinte", previous: "Anterior", "prev-week": "Semana", "prev-month": "Mês", "prev-year": "Ano", next: "Próximo", "next-week": "Próxima Semana", "next-month": "Próximo Mês", "next-year": "Próximo Ano", "less-than": "O período selecionado não deve ser maior que %d dias", "more-than": "O período selecionado não deve ser menor que %d dias", "default-more": "Selecione um período superior a %d dias", "default-single": "Selecione uma data", "default-less": "Selecione um período inferior a %d dias", "default-range": "Selecione um período de %d a %d dias", "default-default": "Selecione um período", time: "Tempo", hour: "Hora", minute: "Minuto" }, tc: { selected: "已選擇:", day: "天", days: "天", apply: "確定", "week-1": "一", "week-2": "二", "week-3": "三", "week-4": "四", "week-5": "五", "week-6": "六", "week-7": "日", "week-number": "周", "month-name": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], shortcuts: "快速選擇", past: "過去", following: "將來", previous: "   ", "prev-week": "上週", "prev-month": "上個月", "prev-year": "去年", next: "   ", "next-week": "下周", "next-month": "下個月", "next-year": "明年", "less-than": "所選日期範圍不能大於%d天", "more-than": "所選日期範圍不能小於%d天", "default-more": "請選擇大於%d天的日期範圍", "default-less": "請選擇小於%d天的日期範圍", "default-range": "請選擇%d天到%d天的日期範圍", "default-single": "請選擇一個日期", "default-default": "請選擇一個日期範圍", time: "日期", hour: "小時", minute: "分鐘" } }, e.fn.dateRangePicker = function (n) { function i(t, n) { return n.contains(t.target) || t.target == n || void 0 != n.childNodes && e.inArray(t.target, n.childNodes) >= 0 } function r() { if (!n.inline) { var t = e(re).offset(); if ("relative" == e(n.container).css("position")) { var i = e(n.container).offset(); ee.css({top: t.top - i.top + e(re).outerHeight() + 4, left: t.left - i.left}) } else t.left < 460 ? ee.css({ top: t.top + e(re).outerHeight() + parseInt(e("body").css("border-top") || 0, 10), left: t.left }) : ee.css({ top: t.top + e(re).outerHeight() + parseInt(e("body").css("border-top") || 0, 10), left: t.left + e(re).width() - ee.width() - 27 }) } } function a(t) { r(), N(), s(), n.customOpenAnimation ? n.customOpenAnimation.call(ee.get(0), function () { e(re).trigger("datepicker-opened", {relatedTarget: ee}) }) : ee.slideDown(t, function () { e(re).trigger("datepicker-opened", {relatedTarget: ee}) }), e(re).trigger("datepicker-open", {relatedTarget: ee}), $(), l() } function s() { var e = n.getValue.call(ae), i = e ? e.split(n.separator) : ""; if (i && (1 == i.length && n.singleDate || i.length >= 2)) { var r = n.format; r.match(/Do/) && (r = r.replace(/Do/, "D"), i[0] = i[0].replace(/(\d+)(th|nd|st)/, "$1"), i.length >= 2 && (i[1] = i[1].replace(/(\d+)(th|nd|st)/, "$1"))), ie = !1, i.length >= 2 ? D(o(i[0], r, t.locale(n.language)), o(i[1], r, t.locale(n.language))) : 1 == i.length && n.singleDate && T(o(i[0], r, t.locale(n.language))), ie = !0 } } function o(e, n, i) { return t(e, n, i).isValid() ? t(e, n, i).toDate() : t().toDate() } function l() { var e = ee.find(".gap").css("margin-left"); e && (e = parseInt(e)); var t = ee.find(".month1").width(), n = ee.find(".gap").width() + (e ? 2 * e : 0), i = ee.find(".month2").width(); ee.find(".month-wrapper").width(t + n + i) } function u(e, n) { ee.find("." + e + " input[type=range].hour-range").val(t(n).hours()), ee.find("." + e + " input[type=range].minute-range").val(t(n).minutes()), h(e, t(n).format("HH"), t(n).format("mm")) } function d(e, i) { n[e] = parseInt(t(parseInt(i)).startOf("day").add(t(n[e + "Time"]).format("HH"), "h").add(t(n[e + "Time"]).format("mm"), "m").valueOf()) } function c() { u("time1", n.start), u("time2", n.end) } function h(e, i, r) { function a(e, t) { var a = t.format("HH"), s = t.format("mm"); n[e] = t.startOf("day").add(i || a, "h").add(r || s, "m").valueOf() } switch (i && ee.find("." + e + " .hour-val").text(i), r && ee.find("." + e + " .minute-val").text(r), e) { case"time1": n.start && a("start", t(n.start)), a("startTime", t(n.startTime || t().valueOf())); break; case"time2": n.end && a("end", t(n.end)), a("endTime", t(n.endTime || t().valueOf())) } k(), _(), S() } function p(e) { var i = e; return "week-range" === n.batchMode ? i = "monday" === n.startOfWeek ? t(parseInt(e)).startOf("isoweek").valueOf() : t(parseInt(e)).startOf("week").valueOf() : "month-range" === n.batchMode && (i = t(parseInt(e)).startOf("month").valueOf()), i } function f(e) { var i = e; return "week-range" === n.batchMode ? i = "monday" === n.startOfWeek ? t(parseInt(e)).endOf("isoweek").valueOf() : t(parseInt(e)).endOf("week").valueOf() : "month-range" === n.batchMode && (i = t(parseInt(e)).endOf("month").valueOf()), i } function m(i) { if (!i.hasClass("invalid")) { var r = i.attr("time"); if (i.addClass("checked"), n.singleDate ? (n.start = r, n.end = !1) : "week" === n.batchMode ? "monday" === n.startOfWeek ? (n.start = t(parseInt(r)).startOf("isoweek").valueOf(), n.end = t(parseInt(r)).endOf("isoweek").valueOf()) : (n.end = t(parseInt(r)).endOf("week").valueOf(), n.start = t(parseInt(r)).startOf("week").valueOf()) : "workweek" === n.batchMode ? (n.start = t(parseInt(r)).day(1).valueOf(), n.end = t(parseInt(r)).day(5).valueOf()) : "weekend" === n.batchMode ? (n.start = t(parseInt(r)).day(6).valueOf(), n.end = t(parseInt(r)).day(7).valueOf()) : "month" === n.batchMode ? (n.start = t(parseInt(r)).startOf("month").valueOf(), n.end = t(parseInt(r)).endOf("month").valueOf()) : n.start && n.end || !n.start && !n.end ? (n.start = p(r), n.end = !1) : n.start && (n.end = f(r), n.time.enabled && d("end", n.end)), n.time.enabled && (n.start && d("start", n.start), n.end && d("end", n.end)), !n.singleDate && n.start && n.end && n.start > n.end) { var a = n.end; n.end = f(n.start), n.start = p(a), n.time.enabled && n.swapTime && c() } n.start = parseInt(n.start), n.end = parseInt(n.end), w(), n.start && !n.end && (e(re).trigger("datepicker-first-date-selected", {date1: new Date(n.start)}), b(i)), y(r), k(), _(), S(), x() } } function g(e) { var i, r, a = parseInt(e.attr("data-start-time"), 10); n.startWeek ? (ee.find(".week-number-selected").removeClass("week-number-selected"), i = new Date(a < n.startWeek ? a : n.startWeek), r = new Date(a < n.startWeek ? n.startWeek : a), n.startWeek = !1, n.start = t(i).day("monday" == n.startOfWeek ? 1 : 0).valueOf(), n.end = t(r).day("monday" == n.startOfWeek ? 7 : 6).valueOf()) : (n.startWeek = a, e.addClass("week-number-selected"), i = new Date(a), n.start = t(i).day("monday" == n.startOfWeek ? 1 : 0).valueOf(), n.end = t(i).day("monday" == n.startOfWeek ? 7 : 6).valueOf()), y(), k(), _(), S(), x() } function v(e) { if (e = parseInt(e, 10), n.startDate && O(e, n.startDate) < 0) return !1; if (n.endDate && O(e, n.endDate) > 0) return !1; if (n.start && !n.end && !n.singleDate) { if (n.maxDays > 0 && C(e, n.start) > n.maxDays) return !1; if (n.minDays > 0 && C(e, n.start) < n.minDays) return !1; if (n.selectForward && e < n.start) return !1; if (n.selectBackward && e > n.start) return !1; if (n.beforeShowDay && "function" == typeof n.beforeShowDay) { for (var t = !0, i = e; C(i, n.start) > 1;) { if (!n.beforeShowDay(new Date(i))[0]) { t = !1; break } if (Math.abs(i - n.start) < 864e5) break; i > n.start && (i -= 864e5), i < n.start && (i += 864e5) } if (!t) return !1 } } return !0 } function y() { return ee.find(".day.invalid.tmp").removeClass("tmp invalid").addClass("valid"), n.start && !n.end && ee.find(".day.toMonth.valid").each(function () { v(parseInt(e(this).attr("time"), 10)) ? e(this).addClass("valid tmp").removeClass("invalid") : e(this).addClass("invalid tmp").removeClass("valid") }), !0 } function b(t) { var i = parseInt(t.attr("time")), r = ""; if (t.hasClass("has-tooltip") && t.attr("data-tooltip")) r = '' + t.attr("data-tooltip") + ""; else if (!t.hasClass("invalid")) if (n.singleDate) ee.find(".day.hovering").removeClass("hovering"), t.addClass("hovering"); else if (ee.find(".day").each(function () { var t = parseInt(e(this).attr("time")); n.start, n.end; t == i ? e(this).addClass("hovering") : e(this).removeClass("hovering"), n.start && !n.end && (n.start < t && i >= t || n.start > t && i <= t) ? e(this).addClass("hovering") : e(this).removeClass("hovering") }), n.start && !n.end) { var a = C(i, n.start); n.hoveringTooltip && ("function" == typeof n.hoveringTooltip ? r = n.hoveringTooltip(a, n.start, i) : !0 === n.hoveringTooltip && a > 1 && (r = a + " " + X("days"))) } if (r) { var s = t.offset(), o = ee.offset(), l = s.left - o.left, u = s.top - o.top; l += t.width() / 2; var d = ee.find(".date-range-length-tip"), c = d.css({visibility: "hidden", display: "none"}).html(r).width(), h = d.height(); l -= c / 2, u -= h, setTimeout(function () { d.css({left: l, top: u, display: "block", visibility: "visible"}) }, 10) } else ee.find(".date-range-length-tip").hide() } function w() { ee.find(".day.hovering").removeClass("hovering"), ee.find(".date-range-length-tip").hide() } function x() { !0 === n.singleDate ? ie && n.start && n.autoClose && P() : ie && n.start && n.end && n.autoClose && P() } function k() { var e = Math.ceil((n.end - n.start) / 864e5) + 1; n.singleDate ? n.start && !n.end ? ee.find(".drp_top-bar").removeClass("error").addClass("normal") : ee.find(".drp_top-bar").removeClass("error").removeClass("normal") : n.maxDays && e > n.maxDays ? (n.start = !1, n.end = !1, ee.find(".day").removeClass("checked"), ee.find(".drp_top-bar").removeClass("normal").addClass("error").find(".error-top").html(X("less-than").replace("%d", n.maxDays))) : n.minDays && e < n.minDays ? (n.start = !1, n.end = !1, ee.find(".day").removeClass("checked"), ee.find(".drp_top-bar").removeClass("normal").addClass("error").find(".error-top").html(X("more-than").replace("%d", n.minDays))) : n.start || n.end ? ee.find(".drp_top-bar").removeClass("error").addClass("normal") : ee.find(".drp_top-bar").removeClass("error").removeClass("normal"), n.singleDate && n.start && !n.end || !n.singleDate && n.start && n.end ? ee.find(".apply-btn").removeClass("disabled") : ee.find(".apply-btn").addClass("disabled"), n.batchMode && (n.start && n.startDate && O(n.start, n.startDate) < 0 || n.end && n.endDate && O(n.end, n.endDate) > 0) && (n.start = !1, n.end = !1, ee.find(".day").removeClass("checked")) } function _(t, i) { ee.find(".start-day").html("..."), ee.find(".end-day").html("..."), ee.find(".selected-days").hide(), n.start && ee.find(".start-day").html(M(new Date(parseInt(n.start)))), n.end && ee.find(".end-day").html(M(new Date(parseInt(n.end)))); var r; n.start && n.singleDate ? (ee.find(".apply-btn").removeClass("disabled"), r = M(new Date(n.start)), n.setValue.call(ae, r, M(new Date(n.start)), M(new Date(n.end))), ie && !i && e(re).trigger("datepicker-change", { value: r, date1: new Date(n.start) })) : n.start && n.end ? (ee.find(".selected-days").show().find(".selected-days-num").html(C(n.end, n.start)), ee.find(".apply-btn").removeClass("disabled"), r = M(new Date(n.start)) + n.separator + M(new Date(n.end)), n.setValue.call(ae, r, M(new Date(n.start)), M(new Date(n.end))), ie && !i && e(re).trigger("datepicker-change", { value: r, date1: new Date(n.start), date2: new Date(n.end) })) : t ? ee.find(".apply-btn").removeClass("disabled") : ee.find(".apply-btn").addClass("disabled") } function C(e, t) { return Math.abs(U(e) - U(t)) + 1 } function D(e, t, i) { if (e.getTime() > t.getTime()) { var r = t; t = e, e = r, r = null } var a = !0; if (n.startDate && O(e, n.startDate) < 0 && (a = !1), n.endDate && O(t, n.endDate) > 0 && (a = !1), !a) return F(n.startDate, "month1"), F(L(n.startDate), "month2"), void $(); n.start = e.getTime(), n.end = t.getTime(), n.time.enabled && (u("time1", e), u("time2", t)), (n.stickyMonths || O(e, t) > 0 && 0 === j(e, t)) && (n.lookBehind ? e = z(t) : t = L(e)), n.stickyMonths && !1 !== n.endDate && j(t, n.endDate) > 0 && (e = z(e), t = z(t)), n.stickyMonths || 0 === j(e, t) && (n.lookBehind ? e = z(t) : t = L(e)), F(e, "month1"), F(t, "month2"), $(), k(), _(!1, i), x() } function T(e) { var t = !0; n.startDate && O(e, n.startDate) < 0 && (t = !1), n.endDate && O(e, n.endDate) > 0 && (t = !1), t ? (n.start = e.getTime(), n.time.enabled && u("time1", e), F(e, "month1"), !0 !== n.singleMonth && F(L(e), "month2"), $(), _(), x()) : F(n.startDate, "month1") } function S() { (n.start || n.end) && (ee.find(".day").each(function () { var i = parseInt(e(this).attr("time")), r = n.start, a = n.end; n.time.enabled && (i = t(i).startOf("day").valueOf(), r = t(r || t().valueOf()).startOf("day").valueOf(), a = t(a || t().valueOf()).startOf("day").valueOf()), n.start && n.end && a >= i && r <= i || n.start && !n.end && t(r).format("YYYY-MM-DD") == t(i).format("YYYY-MM-DD") ? e(this).addClass("checked") : e(this).removeClass("checked"), n.start && t(r).format("YYYY-MM-DD") == t(i).format("YYYY-MM-DD") ? e(this).addClass("first-date-selected") : e(this).removeClass("first-date-selected"), n.end && t(a).format("YYYY-MM-DD") == t(i).format("YYYY-MM-DD") ? e(this).addClass("last-date-selected") : e(this).removeClass("last-date-selected") }), ee.find(".week-number").each(function () { e(this).attr("data-start-time") == n.startWeek && e(this).addClass("week-number-selected") })) } function F(e, i) { var r = E((e = t(e).toDate()).getMonth()); ee.find("." + i + " .month-name").html(r + " " + e.getFullYear()), ee.find("." + i + " tbody").html(Q(e)), n[i] = e, y() } function A(e, t) { ee.find("." + t).append(R()), u(t, e) } function E(e) { return X("month-name")[e] } function M(e) { return t(e).format(n.format) } function $() { S(); var e = parseInt(t(n.month1).format("YYYYMM")), i = parseInt(t(n.month2).format("YYYYMM")), r = Math.abs(e - i); r > 1 && 89 != r ? ee.addClass("has-gap").removeClass("no-gap").find(".gap").css("visibility", "visible") : ee.removeClass("has-gap").addClass("no-gap").find(".gap").css("visibility", "hidden"); var a = ee.find("table.month1").height(), s = ee.find("table.month2").height(); ee.find(".gap").height(Math.max(a, s) + 10) } function P() { if (!n.alwaysOpen) { var t = function () { e(re).data("date-picker-opened", !1), e(re).trigger("datepicker-closed", {relatedTarget: ee}) }; n.customCloseAnimation ? n.customCloseAnimation.call(ee.get(0), t) : e(ee).slideUp(n.duration, t), e(re).trigger("datepicker-close", {relatedTarget: ee}) } } function N() { F(n.month1, "month1"), F(n.month2, "month2") } function j(e, n) { var i = parseInt(t(e).format("YYYYMM")) - parseInt(t(n).format("YYYYMM")); return i > 0 ? 1 : 0 === i ? 0 : -1 } function O(e, n) { var i = parseInt(t(e).format("YYYYMMDD")) - parseInt(t(n).format("YYYYMMDD")); return i > 0 ? 1 : 0 === i ? 0 : -1 } function L(e) { return t(e).add(1, "months").toDate() } function z(e) { return t(e).add(-1, "months").toDate() } function R() { return "
" + X("Time") + ': 00:00
' } function H() { var t = '
") : (t += '
' + X("selected") + ' ...', n.singleDate || (t += ' ' + n.separator + ' ... (3 ' + X("days") + ")"), t += "
", t += '
error
default
'), t += '', t += "
"); var i = n.showWeekNumbers ? 6 : 5; if (t += '
' + W() + "
<' + (n.singleDate || !n.stickyMonths ? '>' : "") + '
", B() && (t += '
' + V() + '
' + W() + "
' + (n.stickyMonths ? "" : '<') + '>
"), t += '
', n.singleDate || (t += '
'), t += '
', t += '", e(t) } function I() { var e = ""; return !0 === n.autoClose && (e += " hide"), "" !== n.applyBtnClass && (e += " " + n.applyBtnClass), e } function W() { var e = n.showWeekNumbers ? "" + X("week-number") + "" : ""; return "monday" == n.startOfWeek ? e + "" + X("week-1") + "" + X("week-2") + "" + X("week-3") + "" + X("week-4") + "" + X("week-5") + "" + X("week-6") + "" + X("week-7") + "" : e + "" + X("week-7") + "" + X("week-1") + "" + X("week-2") + "" + X("week-3") + "" + X("week-4") + "" + X("week-5") + "" + X("week-6") + "" } function Y(e) { return e = t(e), !(!n.startDate || !e.endOf("month").isBefore(n.startDate)) || !(!n.endDate || !e.startOf("month").isAfter(n.endDate)) } function V() { for (var e = ['
'], t = 0; t < 20; t++) e.push('
'); return e.push("
"), e.join("") } function B() { return !n.singleMonth } function q(t, n, i) { var r = e.extend(!0, {}, t); e.each(n, function (e, t) { var n = t(i); for (var a in n) r.hasOwnProperty(a) ? r[a] += n[a] : r[a] = n[a] }); var a = ""; for (var s in r) r.hasOwnProperty(s) && (a += s + '="' + r[s] + '" '); return a } function U(e) { return Math.floor(Z(e) / 864e5) } function Z(e) { return t.isMoment(e) && (e = e.toDate().getTime()), "object" == typeof e && e.getTime && (e = e.getTime()), "string" != typeof e || e.match(/\d{13}/) || (e = t(e, n.format).toDate().getTime()), e = parseInt(e, 10) - 60 * (new Date).getTimezoneOffset() * 1e3 } function Q(e) { var i = []; e.setDate(1); new Date(e.getTime() - 864e5); var r = new Date, a = e.getDay(); 0 === a && "monday" === n.startOfWeek && (a = 7); var s, o; if (a > 0) for (u = a; u > 0; u--) o = v((h = new Date(e.getTime() - 864e5 * u)).getTime()), n.startDate && O(h, n.startDate) < 0 && (o = !1), n.endDate && O(h, n.endDate) > 0 && (o = !1), i.push({ date: h, type: "lastMonth", day: h.getDate(), time: h.getTime(), valid: o }); for (var l = e.getMonth(), u = 0; u < 40; u++) o = v((s = t(e).add(u, "days").toDate()).getTime()), n.startDate && O(s, n.startDate) < 0 && (o = !1), n.endDate && O(s, n.endDate) > 0 && (o = !1), i.push({ date: s, type: s.getMonth() == l ? "toMonth" : "nextMonth", day: s.getDate(), time: s.getTime(), valid: o }); for (var d = [], c = 0; c < 6 && "nextMonth" != i[7 * c].type; c++) { d.push(""); for (var h = 0; h < 7; h++) { s = i[7 * c + ("monday" == n.startOfWeek ? h + 1 : h)]; var p = t(s.time).format("L") == t(r).format("L"); if (s.extraClass = "", s.tooltip = "", s.valid && n.beforeShowDay && "function" == typeof n.beforeShowDay) { var f = n.beforeShowDay(t(s.time).toDate()); s.valid = f[0], s.extraClass = f[1] || "", s.tooltip = f[2] || "", "" !== s.tooltip && (s.extraClass += " has-tooltip ") } var m = { time: s.time, "data-tooltip": s.tooltip, class: "day " + s.type + " " + s.extraClass + " " + (s.valid ? "valid" : "invalid") + " " + (p ? "real-today" : "") }; 0 === h && n.showWeekNumbers && d.push('
' + n.getWeekNumber(s.date) + "
"), d.push("
" + G(s.time, s.day) + "
") } d.push("") } return d.join("") } function G(e, t) { return n.showDateFilter && "function" == typeof n.showDateFilter ? n.showDateFilter(e, t) : t } function X(t) { var n = t.toLowerCase(), i = t in ne ? ne[t] : n in ne ? ne[n] : null, r = e.dateRangePickerLanguages.default; return null == i && (i = t in r ? r[t] : n in r ? r[n] : ""), i } function J() { var e = n.defaultTime ? n.defaultTime : new Date; return n.lookBehind ? (n.startDate && j(e, n.startDate) < 0 && (e = L(t(n.startDate).toDate())), n.endDate && j(e, n.endDate) > 0 && (e = t(n.endDate).toDate())) : (n.startDate && j(e, n.startDate) < 0 && (e = t(n.startDate).toDate()), n.endDate && j(L(e), n.endDate) > 0 && (e = z(t(n.endDate).toDate()))), n.singleDate && (n.startDate && j(e, n.startDate) < 0 && (e = t(n.startDate).toDate()), n.endDate && j(e, n.endDate) > 0 && (e = t(n.endDate).toDate())), e } function K(e) { e || (e = J()), n.lookBehind ? (F(z(e), "month1"), F(e, "month2")) : (F(e, "month1"), F(L(e), "month2")), n.singleDate && F(e, "month1"), S(), $() } n || (n = {}), (n = e.extend(!0, { autoClose: !1, format: "DD/MM/YYYY", separator: " até ", language: "auto", startOfWeek: "sunday", getValue: function () { return e(this).val() }, setValue: function (t) { e(this).attr("readonly") || e(this).is(":disabled") || t == e(this).val() || e(this).val(t) }, startDate: !1, endDate: !1, time: {enabled: !1}, minDays: 0, maxDays: 0, showShortcuts: !1, shortcuts: {}, customShortcuts: [], inline: !1, container: "body", alwaysOpen: !1, singleDate: !1, lookBehind: !1, batchMode: !1, duration: 200, stickyMonths: !1, dayDivAttrs: [], dayTdAttrs: [], selectForward: !1, selectBackward: !1, applyBtnClass: "", singleMonth: "auto", hoveringTooltip: function (e, t, n) { return e > 1 ? e + " " + X("days") : "" }, showTopbar: !0, swapTime: !1, showWeekNumbers: !1, getWeekNumber: function (e) { return t(e).format("w") }, customOpenAnimation: null, customCloseAnimation: null }, n)).start = !1, n.end = !1, n.startWeek = !1, n.isTouchDevice = "ontouchstart" in window || navigator.msMaxTouchPoints, n.isTouchDevice && (n.hoveringTooltip = !1), "auto" == n.singleMonth && (n.singleMonth = e(window).width() < 480), n.singleMonth && (n.stickyMonths = !1), n.showTopbar || (n.autoClose = !0), n.startDate && "string" == typeof n.startDate && (n.startDate = t(n.startDate, n.format).toDate()), n.endDate && "string" == typeof n.endDate && (n.endDate = t(n.endDate, n.format).toDate()); var ee, te, ne = function () { if ("auto" == n.language) { var t = navigator.language ? navigator.language : navigator.browserLanguage; if (!t) return e.dateRangePickerLanguages.default; t = t.toLowerCase(); for (var i in e.dateRangePickerLanguages) if (-1 !== t.indexOf(i)) return e.dateRangePickerLanguages[i]; return e.dateRangePickerLanguages.default } return n.language && n.language in e.dateRangePickerLanguages ? e.dateRangePickerLanguages[n.language] : e.dateRangePickerLanguages.default }(), ie = !1, re = this, ae = e(re).get(0); return e(this).unbind(".datepicker").bind("click.datepicker", function (e) { ee.is(":visible") || a(n.duration) }).bind("change.datepicker", function (e) { s() }).bind("keyup.datepicker", function () { try { clearTimeout(te) } catch (e) { } te = setTimeout(function () { s() }, 2e3) }), function () { function a(t) { var i = e(t).parents("table").hasClass("month2"), r = i ? n.month2 : n.month1; r = L(r), !n.singleMonth && !n.singleDate && !i && j(r, n.month2) >= 0 || Y(r) || (F(r, i ? "month2" : "month1"), $()) } function s(e) { var t = L(n.month1), i = L(n.month2); Y(i) || !n.singleDate && j(t, i) >= 0 || (F(t, "month1"), F(i, "month2"), S()) } function o(t) { var i = e(t).parents("table").hasClass("month2"), r = i ? n.month2 : n.month1; r = z(r), i && j(r, n.month1) <= 0 || Y(r) || (F(r, i ? "month2" : "month1"), $()) } function u(e) { var t = z(n.month1), i = z(n.month2); Y(t) || !n.singleDate && j(i, t) <= 0 || (F(i, "month2"), F(t, "month1"), S()) } var d = this; if (e(this).data("date-picker-opened")) P(); else { e(this).data("date-picker-opened", !0), (ee = H().hide()).append('
'), ee.delegate(".day", "mouseleave", function () { ee.find(".date-range-length-tip").hide(), n.singleDate && w() }), e(n.container).append(ee), n.inline ? ee.addClass("inline-wrapper") : r(), n.alwaysOpen && ee.find(".apply-btn").hide(); var c = J(); if (K(c), n.time.enabled) if (n.startDate && n.endDate || n.start && n.end) A(t(n.start || n.startDate).toDate(), "time1"), A(t(n.end || n.endDate).toDate(), "time2"); else { var p = n.defaultEndTime ? n.defaultEndTime : c; A(c, "time1"), A(p, "time2") } var f = ""; f = X(n.singleDate ? "default-single" : n.minDays && n.maxDays ? "default-range" : n.minDays ? "default-more" : n.maxDays ? "default-less" : "default-default"), ee.find(".default-top").html(f.replace(/\%d/, n.minDays).replace(/\%d/, n.maxDays)), n.singleMonth ? ee.addClass("single-month") : ee.addClass("two-months"), setTimeout(function () { l(), ie = !0 }, 0), ee.click(function (e) { e.stopPropagation() }), e(document).bind("click.datepicker", function (e) { i(e, d[0]) || ee.is(":visible") && P() }), ee.find(".next").click(function () { n.stickyMonths ? s() : a(this) }), ee.find(".prev").click(function () { n.stickyMonths ? u() : o(this) }), ee.delegate(".day", "click", function (t) { m(e(this)) }), ee.delegate(".day", "mouseenter", function (t) { b(e(this)) }), ee.delegate(".week-number", "click", function (t) { g(e(this)) }), ee.attr("unselectable", "on").css("user-select", "none").bind("selectstart", function (e) { return e.preventDefault(), !1 }), ee.find(".apply-btn").click(function () { P(); var t = M(new Date(n.start)) + n.separator + M(new Date(n.end)); e(d).trigger("datepicker-apply", {value: t, date1: new Date(n.start), date2: new Date(n.end)}) }), ee.find("[custom]").click(function () { var t = e(this).attr("custom"); n.start = !1, n.end = !1, ee.find(".day.checked").removeClass("checked"), n.setValue.call(ae, t), k(), _(!0), S(), n.autoClose && P() }), ee.find("[shortcut]").click(function () { var t, i = e(this).attr("shortcut"), r = new Date, a = !1; if (-1 != i.indexOf("day")) { var s = parseInt(i.split(",", 2)[1], 10); a = new Date((new Date).getTime() + 864e5 * s), r = new Date(r.getTime() + 864e5 * (s > 0 ? 1 : -1)) } else if (-1 != i.indexOf("week")) { var o; for (o = 1 == (t = -1 != i.indexOf("prev,") ? -1 : 1) ? "monday" == n.startOfWeek ? 1 : 0 : "monday" == n.startOfWeek ? 0 : 6, r = new Date(r.getTime() - 864e5); r.getDay() != o;) r = new Date(r.getTime() + 864e5 * t); a = new Date(r.getTime() + 864e5 * t * 6) } else if (-1 != i.indexOf("month")) (a = 1 == (t = -1 != i.indexOf("prev,") ? -1 : 1) ? L(r) : z(r)).setDate(1), (r = L(a)).setDate(1), r = new Date(r.getTime() - 864e5); else if (-1 != i.indexOf("year")) t = -1 != i.indexOf("prev,") ? -1 : 1, (a = new Date).setFullYear(r.getFullYear() + t), a.setMonth(0), a.setDate(1), r.setFullYear(r.getFullYear() + t), r.setMonth(11), r.setDate(31); else if ("custom" == i) { var l = e(this).html(); if (n.customShortcuts && n.customShortcuts.length > 0) for (var u = 0; u < n.customShortcuts.length; u++) { var d = n.customShortcuts[u]; if (d.name == l) { var c = []; if ((c = d.dates.call()) && 2 == c.length && (a = c[0], r = c[1]), c && 1 == c.length) { var h = c[0]; F(h, "month1"), F(L(h), "month2"), $() } break } } } a && r && (D(a, r), k()) }), ee.find(".time1 input[type=range]").bind("change touchmove", function (t) { var n = t.target; h("time1", "hour" == n.name ? e(n).val().replace(/^(\d{1})$/, "0$1") : void 0, "minute" == n.name ? e(n).val().replace(/^(\d{1})$/, "0$1") : void 0) }), ee.find(".time2 input[type=range]").bind("change touchmove", function (t) { var n = t.target; h("time2", "hour" == n.name ? e(n).val().replace(/^(\d{1})$/, "0$1") : void 0, "minute" == n.name ? e(n).val().replace(/^(\d{1})$/, "0$1") : void 0) }) } }.call(this), n.alwaysOpen && a(0), e(this).data("dateRangePicker", { setDateRange: function (e, i, r) { "string" == typeof e && "string" == typeof i && (e = t(e, n.format).toDate(), i = t(i, n.format).toDate()), D(e, i, r) }, clear: function () { n.start = !1, n.end = !1, ee.find(".day.checked").removeClass("checked"), ee.find(".day.last-date-selected").removeClass("last-date-selected"), ee.find(".day.first-date-selected").removeClass("first-date-selected"), n.setValue.call(ae, ""), k(), _(), S() }, close: P, open: a, redraw: N, getDatePicker: function () { return ee }, resetMonthsView: K, destroy: function () { e(re).unbind(".datepicker"), e(re).data("dateRangePicker", ""), e(re).data("date-picker-opened", null), ee.remove(), e(window).unbind("resize.datepicker", r), e(document).unbind("click.datepicker", P) } }), e(window).bind("resize.datepicker", r), this } }), function () { var e = $(".logo"), t = $(".logo .m1"), n = $(".logo .m2"), i = ["easeOutQuad", "easeInOutQuad", "easeInOutBack", "easeOutElastic", "easeOutBounce"], r = [[20, 180, 0], [170, 170, 0], [20, 360, 0], [350, 0, 0], [0, 40, 360], [0, 320, 0], [0, 180, 0], [180, 180, 0]]; t.colh = [100, 110, 120], n.colh = [255, 192, 0], e.hover(function () { t.logoanim(1), n.logoanim(2) }, function () { t.velocity("reverse"), n.velocity("reverse") }), $.fn.logoanim = function (e) { var t = 250, n = i[3]; t *= 2, 1 == e ? $(this).velocity({ rotateX: 1 * r[5][0], rotateY: 1 * r[5][1], rotateZ: 1 * r[5][2], colorRed: this.colh[0], colorGreen: this.colh[1], colorBlue: this.colh[2] }, {duration: t, easing: n}) : $(this).velocity({ rotateX: -1 * r[5][0], rotateY: -1 * r[5][1], rotateZ: -1 * r[5][2], colorRed: this.colh[0], colorGreen: this.colh[1], colorBlue: this.colh[2] }, {duration: t, easing: n}) }, $(document).ready(function () { t.logoanim(1), t.velocity("reverse"), n.logoanim(2), n.velocity("reverse") }) }(), $(document).ready(function () { $("#slide-header").owlCarousel({ items: 1, loop: !0, nav: !1, autoplay: !0, dots: !1, autoplayHoverPause: !1, smartSpeed: 450, animateOut: "fadeOut", animateIn: "fadeIn", onInitialized: function (t) { e = t.item.count } }), $(".next.slideHeader").click(function () { $("#slide-header").trigger("next.owl.carousel") }), $(".prev.slideHeader").click(function () { $("#slide-header").trigger("prev.owl.carousel") }); var e, t = 1; $("#slide-header").on("translate.owl.carousel", function (n) { ++t > e && (t = 1), t < 10 ? $(".contador").find(".numero").text("0" + t) : $(".contador").find(".numero").text(t), $(".contador").find(".faixa").removeClass("active"), $(".contador .faixa:nth-child(" + (t + 1) + ")").addClass("active") }), $("#galeria-hotel").owlCarousel({ items: 1, loop: !0, nav: !1, autoplay: !0, autoplayHoverPause: !1, smartSpeed: 450 }), $(".next.galeria-hotel").click(function () { $("#galeria-hotel").trigger("next.owl.carousel") }), $(".prev.galeria-hotel").click(function () { $("#galeria-hotel").trigger("prev.owl.carousel") }), $("#galeria-quartos").owlCarousel({ items: 1, loop: !0, nav: !1, autoplay: !0, autoplayHoverPause: !1, smartSpeed: 450 }), $(".next.quarto-classic").click(function () { $("#galeria-quartos").trigger("next.owl.carousel") }), $(".prev.quarto-classic").click(function () { $("#galeria-quartos").trigger("prev.owl.carousel") }), $("#galeria-standard").owlCarousel({ items: 1, loop: !0, nav: !1, autoplay: !0, autoplayHoverPause: !1, smartSpeed: 450 }), $(".next.quarto-standard").click(function () { $("#galeria-standard").trigger("next.owl.carousel") }), $(".prev.quarto-standard").click(function () { $("#galeria-standard").trigger("prev.owl.carousel") }), $("#galeria-superior").owlCarousel({ items: 1, loop: !0, nav: !1, autoplay: !0, autoplayHoverPause: !1, smartSpeed: 450 }), $(".next.quarto-superior").click(function () { $("#galeria-superior").trigger("next.owl.carousel") }), $(".prev.quarto-superior").click(function () { $("#galeria-superior").trigger("prev.owl.carousel") }), $("#galeria-master").owlCarousel({ items: 1, loop: !0, nav: !1, autoplay: !0, autoplayHoverPause: !1, smartSpeed: 450 }), $(".next.quarto-master").click(function () { $("#galeria-master").trigger("next.owl.carousel") }), $(".prev.quarto-master").click(function () { $("#galeria-master").trigger("prev.owl.carousel") }) }), $("#map-canvas").length > 0) { var map, infoWindow, markersData = [{ lat: -10.9738985, lng: -37.0440566, nome: "Del Mar Hotel", morada1: "Av Santos Dumont, 1500", morada2: "Praia de Atalaia", codPostal: "Aracaju - SE 49035-730", icon: "assets/img/pin-2.png" }, { lat: -10.9822278, lng: -37.0784349, nome: "Aeroporto", morada1: "Av. Senador Júlio Cesar Leite, S/N", morada2: "Santa Teresa", codPostal: "Aracaju - SE 49037-580", icon: "assets/img/pin-1.png" }, { lat: -10.9292189, lng: -37.0985566, nome: "Rodoviaria Nova", morada1: "Av. Pres. Tancredo Neves", morada2: "Capucho", codPostal: "Aracaju - SE, 49080-470", icon: "assets/img/pin-1.png" }, { lat: -10.9429246, lng: -37.0636976, nome: "Shopping Jardins", morada1: "Av. Ministro Geraldo Barreto Sobral, 215", morada2: "Jardins", codPostal: "Aracaju - SE, 49026-010", icon: "assets/img/pin-1.png" }, { lat: -10.9452861, lng: -37.0502855, nome: "Shopping Riomar", morada1: "Av. Delmiro Gouveia, 400", morada2: "Coroa do Meio", codPostal: "Aracaju - SE, 49035-500", icon: "assets/img/pin-1.png" }, { lat: -10.9105315, lng: -37.0515323, nome: "Centro da Cidade", morada1: "Av. Ivo do Prado", morada2: "Centro", codPostal: "Aracaju - SE, 49010-130", icon: "assets/img/pin-1.png" }, { lat: -11.1011327, lng: -37.1523549, nome: "Litoral Sul", morada1: "Rod. dos Náufragos", morada2: "Mosqueiro", codPostal: "Aracaju - SE, 49039-000", icon: "assets/img/pin-1.png" }, { lat: -10.9068063, lng: -37.0570669, nome: "Mercado Municipal", morada1: "Av. Ivo do Prado", morada2: "Bairro Industrial", codPostal: "Aracaju - SE, 49010-010", icon: "assets/img/pin-1.png" }]; google.maps.event.addDomListener(window, "load", initialize) } if (function (e) { e(".swipebox").swipebox({ afterClose: function () { console.log("fechou"), e(".btAbreMenu").removeClass("hideSwipe") }, beforeOpen: function () { console.log("antes abrir"), e(".btAbreMenu").addClass("hideSwipe") } }) }(jQuery), $("#btBusca").length > 0) { var offsetBtBusca = $("#btBusca").offset; $(function () { window.console || (window.console = {}, window.console.log = function () { }), $.dateRangePickerLanguages.pt = { selected: "Selecionado:", day: "Dia", days: "Dias", apply: "Fechar", "week-1": "s", "week-2": "t", "week-3": "q", "week-4": "q", "week-5": "s", "week-6": "s", "week-7": "d", "week-number": "N", "month-name": ["janeiro", "fevereiro", "março", "abril", "maio", "junho", "julho", "agosto", "setembro", "outubro", "novembro", "dezembro"], shortcuts: "Atalhos", "custom-values": "Valores Personalizados", past: "Passado", following: "Seguinte", previous: "Anterior", "prev-week": "Semana", "prev-month": "Mês", "prev-year": "Ano", next: "Próximo", "next-week": "Próxima Semana", "next-month": "Próximo Mês", "next-year": "Próximo Ano", "less-than": "O período selecionado não deve ser maior que %d dias", "more-than": "O período selecionado não deve ser menor que %d dias", "default-more": "Selecione um período superior a %d dias", "default-single": "Selecione uma data", "default-less": "Selecione um período inferior a %d dias", "default-range": "Selecione um período de %d a %d dias", "default-default": "Selecione um período", time: "Tempo", hour: "Hora", minute: "Minuto" }, $("#two-inputs").dateRangePicker({ separator: " até ", getValue: function () { return $("#input-entrada").val() && $("#input-saida").val() ? $("#input-entrada").val() + " até " + $("#input-saida").val() : "" }, setValue: function (e, t, n) { $("#input-entrada").val(t), $("#input-saida").val(n) } }) }) } $(document).ready(function () { $('[data-toggle="tooltip"]').tooltip() });