text: !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.moment=e()}(this,function(){"use strict";function t(){return us.apply(null,arguments)}function e(t){us=t}function i(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function s(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function a(t){var e;for(e in t)return!1;return!0}function n(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function r(t,e){var i,s=[];for(i=0;i<t.length;++i)s.push(e(t[i],i));return s}function o(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function l(t,e){for(var i in e)o(e,i)&&(t[i]=e[i]);return o(e,"toString")&&(t.toString=e.toString),o(e,"valueOf")&&(t.valueOf=e.valueOf),t}function h(t,e,i,s){return ge(t,e,i,s,!0).utc()}function d(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null}}function c(t){return null==t._pf&&(t._pf=d()),t._pf}function u(t){if(null==t._isValid){var e=c(t),i=fs.call(e.parsedDateParts,function(t){return null!=t}),s=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&i);if(t._strict&&(s=s&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return s;t._isValid=s}return t._isValid}function f(t){var e=h(NaN);return null!=t?l(c(e),t):c(e).userInvalidated=!0,e}function m(t){return void 0===t}function p(t,e){var i,s,a;if(m(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),m(e._i)||(t._i=e._i),m(e._f)||(t._f=e._f),m(e._l)||(t._l=e._l),m(e._strict)||(t._strict=e._strict),m(e._tzm)||(t._tzm=e._tzm),m(e._isUTC)||(t._isUTC=e._isUTC),m(e._offset)||(t._offset=e._offset),m(e._pf)||(t._pf=c(e)),m(e._locale)||(t._locale=e._locale),ms.length>0)for(i in ms)s=ms[i],a=e[s],m(a)||(t[s]=a);return t}function g(e){p(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),ps===!1&&(ps=!0,t.updateOffset(this),ps=!1)}function y(t){return t instanceof g||null!=t&&null!=t._isAMomentObject}function D(t){return 0>t?Math.ceil(t)||0:Math.floor(t)}function _(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=D(e)),i}function k(t,e,i){var s,a=Math.min(t.length,e.length),n=Math.abs(t.length-e.length),r=0;for(s=0;a>s;s++)(i&&t[s]!==e[s]||!i&&_(t[s])!==_(e[s]))&&r++;return r+n}function v(e){t.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function w(e,i){var s=!0;return l(function(){if(null!=t.deprecationHandler&&t.deprecationHandler(null,e),s){for(var a,n=[],r=0;r<arguments.length;r++){if(a="","object"==typeof arguments[r]){a+="\n["+r+"] ";for(var o in arguments[0])a+=o+": "+arguments[0][o]+", ";a=a.slice(0,-2)}else a=arguments[r];n.push(a)}v(e+"\nArguments: "+Array.prototype.slice.call(n).join("")+"\n"+(new Error).stack),s=!1}return i.apply(this,arguments)},i)}function Y(e,i){null!=t.deprecationHandler&&t.deprecationHandler(e,i),gs[e]||(v(i),gs[e]=!0)}function M(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function b(t){var e,i;for(i in t)e=t[i],M(e)?this[i]=e:this["_"+i]=e;this._config=t,this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function S(t,e){var i,a=l({},t);for(i in e)o(e,i)&&(s(t[i])&&s(e[i])?(a[i]={},l(a[i],t[i]),l(a[i],e[i])):null!=e[i]?a[i]=e[i]:delete a[i]);for(i in t)o(t,i)&&!o(e,i)&&s(t[i])&&(a[i]=l({},a[i]));return a}function C(t){null!=t&&this.set(t)}function P(t,e,i){var s=this._calendar[t]||this._calendar.sameElse;return M(s)?s.call(e,i):s}function x(t){var e=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return e||!i?e:(this._longDateFormat[t]=i.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])}function O(){return this._invalidDate}function W(t){return this._ordinal.replace("%d",t)}function T(t,e,i,s){var a=this._relativeTime[i];return M(a)?a(t,e,i,s):a.replace(/%d/i,t)}function L(t,e){var i=this._relativeTime[t>0?"future":"past"];return M(i)?i(e):i.replace(/%s/i,e)}function I(t,e){var i=t.toLowerCase();bs[i]=bs[i+"s"]=bs[e]=t}function R(t){return"string"==typeof t?bs[t]||bs[t.toLowerCase()]:void 0}function A(t){var e,i,s={};for(i in t)o(t,i)&&(e=R(i),e&&(s[e]=t[i]));return s}function H(t,e){Ss[t]=e}function U(t){var e=[];for(var i in t)e.push({unit:i,priority:Ss[i]});return e.sort(function(t,e){return t.priority-e.priority}),e}function E(e,i){return function(s){return null!=s?(j(this,e,s),t.updateOffset(this,i),this):F(this,e)}}function F(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function j(t,e,i){t.isValid()&&t._d["set"+(t._isUTC?"UTC":"")+e](i)}function N(t){return t=R(t),M(this[t])?this[t]():this}function V(t,e){if("object"==typeof t){t=A(t);for(var i=U(t),s=0;s<i.length;s++)this[i[s].unit](t[i[s].unit])}else if(t=R(t),M(this[t]))return this[t](e);return this}function G(t,e,i){var s=""+Math.abs(t),a=e-s.length,n=t>=0;return(n?i?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+s}function B(t,e,i,s){var a=s;"string"==typeof s&&(a=function(){return this[s]()}),t&&(Os[t]=a),e&&(Os[e[0]]=function(){return G(a.apply(this,arguments),e[1],e[2])}),i&&(Os[i]=function(){return this.localeData().ordinal(a.apply(this,arguments),t)})}function z(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function Z(t){var e,i,s=t.match(Cs);for(e=0,i=s.length;i>e;e++)Os[s[e]]?s[e]=Os[s[e]]:s[e]=z(s[e]);return function(e){var a,n="";for(a=0;i>a;a++)n+=s[a]instanceof Function?s[a].call(e,t):s[a];return n}}function q(t,e){return t.isValid()?(e=$(e,t.localeData()),xs[e]=xs[e]||Z(e),xs[e](t)):t.localeData().invalidDate()}function $(t,e){function i(t){return e.longDateFormat(t)||t}var s=5;for(Ps.lastIndex=0;s>=0&&Ps.test(t);)t=t.replace(Ps,i),Ps.lastIndex=0,s-=1;return t}function J(t,e,i){qs[t]=M(e)?e:function(t,s){return t&&i?i:e}}function Q(t,e){return o(qs,t)?qs[t](e._strict,e._locale):new RegExp(X(t))}function X(t){return K(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,i,s,a){return e||i||s||a}))}function K(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function tt(t,e){var i,s=e;for("string"==typeof t&&(t=[t]),"number"==typeof e&&(s=function(t,i){i[e]=_(t)}),i=0;i<t.length;i++)$s[t[i]]=s}function et(t,e){tt(t,function(t,i,s,a){s._w=s._w||{},e(t,s._w,s,a)})}function it(t,e,i){null!=e&&o($s,t)&&$s[t](e,i._a,i,t)}function st(t,e){return new Date(Date.UTC(t,e+1,0)).getUTCDate()}function at(t,e){return t?i(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||na).test(e)?"format":"standalone"][t.month()]:this._months}function nt(t,e){return t?i(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[na.test(e)?"format":"standalone"][t.month()]:this._monthsShort}function rt(t,e,i){var s,a,n,r=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;12>s;++s)n=h([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(n,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(n,"").toLocaleLowerCase();return i?"MMM"===e?(a=Ds.call(this._shortMonthsParse,r),-1!==a?a:null):(a=Ds.call(this._longMonthsParse,r),-1!==a?a:null):"MMM"===e?(a=Ds.call(this._shortMonthsParse,r),-1!==a?a:(a=Ds.call(this._longMonthsParse,r),-1!==a?a:null)):(a=Ds.call(this._longMonthsParse,r),-1!==a?a:(a=Ds.call(this._shortMonthsParse,r),-1!==a?a:null))}function ot(t,e,i){var s,a,n;if(this._monthsParseExact)return rt.call(this,t,e,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;12>s;s++){if(a=h([2e3,s]),i&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),i||this._monthsParse[s]||(n="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[s]=new RegExp(n.replace(".",""),"i")),i&&"MMMM"===e&&this._longMonthsParse[s].test(t))return s;if(i&&"MMM"===e&&this._shortMonthsParse[s].test(t))return s;if(!i&&this._monthsParse[s].test(t))return s}}function lt(t,e){var i;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=_(e);else if(e=t.localeData().monthsParse(e),"number"!=typeof e)return t;return i=Math.min(t.date(),st(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,i),t}function ht(e){return null!=e?(lt(this,e),t.updateOffset(this,!0),this):F(this,"Month")}function dt(){return st(this.year(),this.month())}function ct(t){return this._monthsParseExact?(o(this,"_monthsRegex")||ft.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(o(this,"_monthsShortRegex")||(this._monthsShortRegex=la),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function ut(t){return this._monthsParseExact?(o(this,"_monthsRegex")||ft.call(this),t?this._monthsStrictRegex:this._monthsRegex):(o(this,"_monthsRegex")||(this._monthsRegex=ha),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function ft(){function t(t,e){return e.length-t.length}var e,i,s=[],a=[],n=[];for(e=0;12>e;e++)i=h([2e3,e]),s.push(this.monthsShort(i,"")),a.push(this.months(i,"")),n.push(this.months(i,"")),n.push(this.monthsShort(i,""));for(s.sort(t),a.sort(t),n.sort(t),e=0;12>e;e++)s[e]=K(s[e]),a[e]=K(a[e]);for(e=0;24>e;e++)n[e]=K(n[e]);this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function mt(t){return pt(t)?366:365}function pt(t){return t%4===0&&t%100!==0||t%400===0}function gt(){return pt(this.year())}function yt(t,e,i,s,a,n,r){var o=new Date(t,e,i,s,a,n,r);return 100>t&&t>=0&&isFinite(o.getFullYear())&&o.setFullYear(t),o}function Dt(t){var e=new Date(Date.UTC.apply(null,arguments));return 100>t&&t>=0&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function _t(t,e,i){var s=7+e-i,a=(7+Dt(t,0,s).getUTCDay()-e)%7;return-a+s-1}function kt(t,e,i,s,a){var n,r,o=(7+i-s)%7,l=_t(t,s,a),h=1+7*(e-1)+o+l;return 0>=h?(n=t-1,r=mt(n)+h):h>mt(t)?(n=t+1,r=h-mt(t)):(n=t,r=h),{year:n,dayOfYear:r}}function vt(t,e,i){var s,a,n=_t(t.year(),e,i),r=Math.floor((t.dayOfYear()-n-1)/7)+1;return 1>r?(a=t.year()-1,s=r+wt(a,e,i)):r>wt(t.year(),e,i)?(s=r-wt(t.year(),e,i),a=t.year()+1):(a=t.year(),s=r),{week:s,year:a}}function wt(t,e,i){var s=_t(t,e,i),a=_t(t+1,e,i);return(mt(t)-s+a)/7}function Yt(t){return vt(t,this._week.dow,this._week.doy).week}function Mt(){return this._week.dow}function bt(){return this._week.doy}function St(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function Ct(t){var e=vt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function Pt(t,e){return"string"!=typeof t?t:isNaN(t)?(t=e.weekdaysParse(t),"number"==typeof t?t:null):parseInt(t,10)}function xt(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function Ot(t,e){return t?i(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]:this._weekdays}function Wt(t){return t?this._weekdaysShort[t.day()]:this._weekdaysShort}function Tt(t){return t?this._weekdaysMin[t.day()]:this._weekdaysMin}function Lt(t,e,i){var s,a,n,r=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;7>s;++s)n=h([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(n,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(n,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(n,"").toLocaleLowerCase();return i?"dddd"===e?(a=Ds.call(this._weekdaysParse,r),-1!==a?a:null):"ddd"===e?(a=Ds.call(this._shortWeekdaysParse,r),-1!==a?a:null):(a=Ds.call(this._minWeekdaysParse,r),-1!==a?a:null):"dddd"===e?(a=Ds.call(this._weekdaysParse,r),-1!==a?a:(a=Ds.call(this._shortWeekdaysParse,r),-1!==a?a:(a=Ds.call(this._minWeekdaysParse,r),-1!==a?a:null))):"ddd"===e?(a=Ds.call(this._shortWeekdaysParse,r),-1!==a?a:(a=Ds.call(this._weekdaysParse,r),-1!==a?a:(a=Ds.call(this._minWeekdaysParse,r),-1!==a?a:null))):(a=Ds.call(this._minWeekdaysParse,r),-1!==a?a:(a=Ds.call(this._weekdaysParse,r),-1!==a?a:(a=Ds.call(this._shortWeekdaysParse,r),-1!==a?a:null)))}function It(t,e,i){var s,a,n;if(this._weekdaysParseExact)return Lt.call(this,t,e,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;7>s;s++){if(a=h([2e3,1]).day(s),i&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(a,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(a,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(a,"").replace(".",".?")+"$","i")),this._weekdaysParse[s]||(n="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[s]=new RegExp(n.replace(".",""),"i")),i&&"dddd"===e&&this._fullWeekdaysParse[s].test(t))return s;if(i&&"ddd"===e&&this._shortWeekdaysParse[s].test(t))return s;if(i&&"dd"===e&&this._minWeekdaysParse[s].test(t))return s;if(!i&&this._weekdaysParse[s].test(t))return s}}function Rt(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=Pt(t,this.localeData()),this.add(t-e,"d")):e}function At(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function Ht(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=xt(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7}function Ut(t){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||jt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=pa),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function Et(t){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||jt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ga),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Ft(t){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||jt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ya),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function jt(){function t(t,e){return e.length-t.length}var e,i,s,a,n,r=[],o=[],l=[],d=[];for(e=0;7>e;e++)i=h([2e3,1]).day(e),s=this.weekdaysMin(i,""),a=this.weekdaysShort(i,""),n=this.weekdays(i,""),r.push(s),o.push(a),l.push(n),d.push(s),d.push(a),d.push(n);for(r.sort(t),o.sort(t),l.sort(t),d.sort(t),e=0;7>e;e++)o[e]=K(o[e]),l[e]=K(l[e]),d[e]=K(d[e]);this._weekdaysRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Nt(){return this.hours()%12||12}function Vt(){return this.hours()||24}function Gt(t,e){B(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function Bt(t,e){return e._meridiemParse}function zt(t){return"p"===(t+"").toLowerCase().charAt(0)}function Zt(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"}function qt(t){return t?t.toLowerCase().replace("_","-"):t}function $t(t){for(var e,i,s,a,n=0;n<t.length;){for(a=qt(t[n]).split("-"),e=a.length,i=qt(t[n+1]),i=i?i.split("-"):null;e>0;){if(s=Jt(a.slice(0,e).join("-")))return s;if(i&&i.length>=e&&k(a,i,!0)>=e-1)break;e--}n++}return null}function Jt(t){var e=null;if(!wa[t]&&"undefined"!=typeof module&&module&&module.require)try{e=Da._abbr,module.require("./locale/"+t),Qt(e)}catch(t){}return wa[t]}function Qt(t,e){var i;return t&&(i=m(e)?te(t):Xt(t,e),i&&(Da=i)),Da._abbr}function Xt(t,e){if(null!==e){var i=va;return e.abbr=t,null!=wa[t]?(Y("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=wa[t]._config):null!=e.parentLocale&&(null!=wa[e.parentLocale]?i=wa[e.parentLocale]._config:Y("parentLocaleUndefined","specified parentLocale is not defined yet. See http://momentjs.com/guides/#/warnings/parent-locale/")),wa[t]=new C(S(i,e)),Qt(t),wa[t]}return delete wa[t],null}function Kt(t,e){if(null!=e){var i,s=va;null!=wa[t]&&(s=wa[t]._config),e=S(s,e),i=new C(e),i.parentLocale=wa[t],wa[t]=i,Qt(t)}else null!=wa[t]&&(null!=wa[t].parentLocale?wa[t]=wa[t].parentLocale:null!=wa[t]&&delete wa[t]);return wa[t]}function te(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Da;if(!i(t)){if(e=Jt(t))return e;t=[t]}return $t(t)}function ee(){return ys(wa)}function ie(t){var e,i=t._a;return i&&-2===c(t).overflow&&(e=i[Qs]<0||i[Qs]>11?Qs:i[Xs]<1||i[Xs]>st(i[Js],i[Qs])?Xs:i[Ks]<0||i[Ks]>24||24===i[Ks]&&(0!==i[ta]||0!==i[ea]||0!==i[ia])?Ks:i[ta]<0||i[ta]>59?ta:i[ea]<0||i[ea]>59?ea:i[ia]<0||i[ia]>999?ia:-1,c(t)._overflowDayOfYear&&(Js>e||e>Xs)&&(e=Xs),c(t)._overflowWeeks&&-1===e&&(e=sa),c(t)._overflowWeekday&&-1===e&&(e=aa),c(t).overflow=e),t}function se(t){var e,i,s,a,n,r,o=t._i,l=Ya.exec(o)||Ma.exec(o);if(l){for(c(t).iso=!0,e=0,i=Sa.length;i>e;e++)if(Sa[e][1].exec(l[1])){a=Sa[e][0],s=Sa[e][2]!==!1;break}if(null==a)return void(t._isValid=!1);if(l[3]){for(e=0,i=Ca.length;i>e;e++)if(Ca[e][1].exec(l[3])){n=(l[2]||" ")+Ca[e][0];break}if(null==n)return void(t._isValid=!1)}if(!s&&null!=n)return void(t._isValid=!1);if(l[4]){if(!ba.exec(l[4]))return void(t._isValid=!1);r="Z"}t._f=a+(n||"")+(r||""),he(t)}else t._isValid=!1}function ae(e){var i=Pa.exec(e._i);return null!==i?void(e._d=new Date((+i[1]))):(se(e),void(e._isValid===!1&&(delete e._isValid,t.createFromInputFallback(e))))}function ne(t,e,i){return null!=t?t:null!=e?e:i}function re(e){var i=new Date(t.now());return e._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()]}function oe(t){var e,i,s,a,n=[];if(!t._d){for(s=re(t),t._w&&null==t._a[Xs]&&null==t._a[Qs]&&le(t),t._dayOfYear&&(a=ne(t._a[Js],s[Js]),t._dayOfYear>mt(a)&&(c(t)._overflowDayOfYear=!0),i=Dt(a,0,t._dayOfYear),t._a[Qs]=i.getUTCMonth(),t._a[Xs]=i.getUTCDate()),e=0;3>e&&null==t._a[e];++e)t._a[e]=n[e]=s[e];for(;7>e;e++)t._a[e]=n[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Ks]&&0===t._a[ta]&&0===t._a[ea]&&0===t._a[ia]&&(t._nextDay=!0,t._a[Ks]=0),t._d=(t._useUTC?Dt:yt).apply(null,n),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Ks]=24)}}function le(t){var e,i,s,a,n,r,o,l;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(n=1,r=4,i=ne(e.GG,t._a[Js],vt(ye(),1,4).year),s=ne(e.W,1),a=ne(e.E,1),(1>a||a>7)&&(l=!0)):(n=t._locale._week.dow,r=t._locale._week.doy,i=ne(e.gg,t._a[Js],vt(ye(),n,r).year),s=ne(e.w,1),null!=e.d?(a=e.d,(0>a||a>6)&&(l=!0)):null!=e.e?(a=e.e+n,(e.e<0||e.e>6)&&(l=!0)):a=n),1>s||s>wt(i,n,r)?c(t)._overflowWeeks=!0:null!=l?c(t)._overflowWeekday=!0:(o=kt(i,s,a,n,r),t._a[Js]=o.year,t._dayOfYear=o.dayOfYear)}function he(e){if(e._f===t.ISO_8601)return void se(e);e._a=[],c(e).empty=!0;var i,s,a,n,r,o=""+e._i,l=o.length,h=0;for(a=$(e._f,e._locale).match(Cs)||[],i=0;i<a.length;i++)n=a[i],s=(o.match(Q(n,e))||[])[0],s&&(r=o.substr(0,o.indexOf(s)),r.length>0&&c(e).unusedInput.push(r),o=o.slice(o.indexOf(s)+s.length),h+=s.length),Os[n]?(s?c(e).empty=!1:c(e).unusedTokens.push(n),it(n,s,e)):e._strict&&!s&&c(e).unusedTokens.push(n);c(e).charsLeftOver=l-h,o.length>0&&c(e).unusedInput.push(o),e._a[Ks]<=12&&c(e).bigHour===!0&&e._a[Ks]>0&&(c(e).bigHour=void 0),c(e).parsedDateParts=e._a.slice(0),c(e).meridiem=e._meridiem,e._a[Ks]=de(e._locale,e._a[Ks],e._meridiem),oe(e),ie(e)}function de(t,e,i){var s;return null==i?e:null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?(s=t.isPM(i),s&&12>e&&(e+=12),s||12!==e||(e=0),e):e}function ce(t){var e,i,s,a,n;if(0===t._f.length)return c(t).invalidFormat=!0,void(t._d=new Date(NaN));for(a=0;a<t._f.length;a++)n=0,e=p({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[a],he(e),u(e)&&(n+=c(e).charsLeftOver,n+=10*c(e).unusedTokens.length,c(e).score=n,(null==s||s>n)&&(s=n,i=e));l(t,i||e)}function ue(t){if(!t._d){var e=A(t._i);t._a=r([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)}),oe(t)}}function fe(t){var e=new g(ie(me(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function me(t){var e=t._i,s=t._f;return t._locale=t._locale||te(t._l),null===e||void 0===s&&""===e?f({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),y(e)?new g(ie(e)):(i(s)?ce(t):n(e)?t._d=e:s?he(t):pe(t),u(t)||(t._d=null),t))}function pe(e){var s=e._i;void 0===s?e._d=new Date(t.now()):n(s)?e._d=new Date(s.valueOf()):"string"==typeof s?ae(e):i(s)?(e._a=r(s.slice(0),function(t){return parseInt(t,10)}),oe(e)):"object"==typeof s?ue(e):"number"==typeof s?e._d=new Date(s):t.createFromInputFallback(e)}function ge(t,e,n,r,o){var l={};return"boolean"==typeof n&&(r=n,n=void 0),(s(t)&&a(t)||i(t)&&0===t.length)&&(t=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=o,l._l=n,l._i=t,l._f=e,l._strict=r,fe(l)}function ye(t,e,i,s){return ge(t,e,i,s,!1)}function De(t,e){var s,a;if(1===e.length&&i(e[0])&&(e=e[0]),!e.length)return ye();for(s=e[0],a=1;a<e.length;++a)e[a].isValid()&&!e[a][t](s)||(s=e[a]);return s}function _e(){var t=[].slice.call(arguments,0);return De("isBefore",t)}function ke(){var t=[].slice.call(arguments,0);return De("isAfter",t)}function ve(t){var e=A(t),i=e.year||0,s=e.quarter||0,a=e.month||0,n=e.week||0,r=e.day||0,o=e.hour||0,l=e.minute||0,h=e.second||0,d=e.millisecond||0;this._milliseconds=+d+1e3*h+6e4*l+1e3*o*60*60,this._days=+r+7*n,this._months=+a+3*s+12*i,this._data={},this._locale=te(),this._bubble()}function we(t){return t instanceof ve}function Ye(t){return 0>t?-1*Math.round(-1*t):Math.round(t)}function Me(t,e){B(t,0,0,function(){var t=this.utcOffset(),i="+";return 0>t&&(t=-t,i="-"),i+G(~~(t/60),2)+e+G(~~t%60,2)})}function be(t,e){var i=(e||"").match(t)||[],s=i[i.length-1]||[],a=(s+"").match(Ta)||["-",0,0],n=+(60*a[1])+_(a[2]);return"+"===a[0]?n:-n}function Se(e,i){var s,a;return i._isUTC?(s=i.clone(),a=(y(e)||n(e)?e.valueOf():ye(e).valueOf())-s.valueOf(),s._d.setTime(s._d.valueOf()+a),t.updateOffset(s,!1),s):ye(e).local()}function Ce(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Pe(e,i){var s,a=this._offset||0;return this.isValid()?null!=e?("string"==typeof e?e=be(Bs,e):Math.abs(e)<16&&(e=60*e),!this._isUTC&&i&&(s=Ce(this)),this._offset=e,this._isUTC=!0,null!=s&&this.add(s,"m"),a!==e&&(!i||this._changeInProgress?Ge(this,Ee(e-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?a:Ce(this):null!=e?this:NaN}function xe(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function Oe(t){return this.utcOffset(0,t)}function We(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Ce(this),"m")),this}function Te(){if(this._tzm)this.utcOffset(this._tzm);else if("string"==typeof this._i){var t=be(Gs,this._i);0===t?this.utcOffset(0,!0):this.utcOffset(be(Gs,this._i))}return this}function Le(t){return!!this.isValid()&&(t=t?ye(t).utcOffset():0,(this.utcOffset()-t)%60===0)}function Ie(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Re(){if(!m(this._isDSTShifted))return this._isDSTShifted;var t={};if(p(t,this),t=me(t),t._a){var e=t._isUTC?h(t._a):ye(t._a);this._isDSTShifted=this.isValid()&&k(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Ae(){return!!this.isValid()&&!this._isUTC}function He(){return!!this.isValid()&&this._isUTC}function Ue(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Ee(t,e){var i,s,a,n=t,r=null;return we(t)?n={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(n={},e?n[e]=t:n.milliseconds=t):(r=La.exec(t))?(i="-"===r[1]?-1:1,n={y:0,d:_(r[Xs])*i,h:_(r[Ks])*i,m:_(r[ta])*i,s:_(r[ea])*i,ms:_(Ye(1e3*r[ia]))*i}):(r=Ia.exec(t))?(i="-"===r[1]?-1:1,n={y:Fe(r[2],i),M:Fe(r[3],i),w:Fe(r[4],i),d:Fe(r[5],i),h:Fe(r[6],i),m:Fe(r[7],i),s:Fe(r[8],i)}):null==n?n={}:"object"==typeof n&&("from"in n||"to"in n)&&(a=Ne(ye(n.from),ye(n.to)),n={},n.ms=a.milliseconds,n.M=a.months),s=new ve(n),we(t)&&o(t,"_locale")&&(s._locale=t._locale),s}function Fe(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function je(t,e){var i={milliseconds:0,months:0};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function Ne(t,e){var i;return t.isValid()&&e.isValid()?(e=Se(e,t),t.isBefore(e)?i=je(t,e):(i=je(e,t),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function Ve(t,e){return function(i,s){var a,n;return null===s||isNaN(+s)||(Y(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=i,i=s,s=n),i="string"==typeof i?+i:i,a=Ee(i,s),Ge(this,a,t),this}}function Ge(e,i,s,a){var n=i._milliseconds,r=Ye(i._days),o=Ye(i._months);e.isValid()&&(a=null==a||a,n&&e._d.setTime(e._d.valueOf()+n*s),r&&j(e,"Date",F(e,"Date")+r*s),o&&lt(e,F(e,"Month")+o*s),a&&t.updateOffset(e,r||o))}function Be(t,e){var i=t.diff(e,"days",!0);return-6>i?"sameElse":-1>i?"lastWeek":0>i?"lastDay":1>i?"sameDay":2>i?"nextDay":7>i?"nextWeek":"sameElse"}function ze(e,i){var s=e||ye(),a=Se(s,this).startOf("day"),n=t.calendarFormat(this,a)||"sameElse",r=i&&(M(i[n])?i[n].call(this,s):i[n]);return this.format(r||this.localeData().calendar(n,this,ye(s)))}function Ze(){return new g(this)}function qe(t,e){var i=y(t)?t:ye(t);return!(!this.isValid()||!i.isValid())&&(e=R(m(e)?"millisecond":e),"millisecond"===e?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(e).valueOf())}function $e(t,e){var i=y(t)?t:ye(t);return!(!this.isValid()||!i.isValid())&&(e=R(m(e)?"millisecond":e),"millisecond"===e?this.valueOf()<i.valueOf():this.clone().endOf(e).valueOf()<i.valueOf())}function Je(t,e,i,s){return s=s||"()",("("===s[0]?this.isAfter(t,i):!this.isBefore(t,i))&&(")"===s[1]?this.isBefore(e,i):!this.isAfter(e,i))}function Qe(t,e){var i,s=y(t)?t:ye(t);return!(!this.isValid()||!s.isValid())&&(e=R(e||"millisecond"),"millisecond"===e?this.valueOf()===s.valueOf():(i=s.valueOf(),this.clone().startOf(e).valueOf()<=i&&i<=this.clone().endOf(e).valueOf()))}function Xe(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function Ke(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function ti(t,e,i){var s,a,n,r;return this.isValid()?(s=Se(t,this),s.isValid()?(a=6e4*(s.utcOffset()-this.utcOffset()),e=R(e),"year"===e||"month"===e||"quarter"===e?(r=ei(this,s),"quarter"===e?r/=3:"year"===e&&(r/=12)):(n=this-s,r="second"===e?n/1e3:"minute"===e?n/6e4:"hour"===e?n/36e5:"day"===e?(n-a)/864e5:"week"===e?(n-a)/6048e5:n),i?r:D(r)):NaN):NaN}function ei(t,e){var i,s,a=12*(e.year()-t.year())+(e.month()-t.month()),n=t.clone().add(a,"months");return 0>e-n?(i=t.clone().add(a-1,"months"),s=(e-n)/(n-i)):(i=t.clone().add(a+1,"months"),s=(e-n)/(i-n)),-(a+s)||0}function ii(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function si(){var t=this.clone().utc();return 0<t.year()&&t.year()<=9999?M(Date.prototype.toISOString)?this.toDate().toISOString():q(t,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):q(t,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function ai(e){e||(e=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var i=q(this,e);return this.localeData().postformat(i)}function ni(t,e){return this.isValid()&&(y(t)&&t.isValid()||ye(t).isValid())?Ee({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function ri(t){return this.from(ye(),t)}function oi(t,e){return this.isValid()&&(y(t)&&t.isValid()||ye(t).isValid())?Ee({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function li(t){return this.to(ye(),t)}function hi(t){var e;return void 0===t?this._locale._abbr:(e=te(t),null!=e&&(this._locale=e),this)}function di(){return this._locale}function ci(t){switch(t=R(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this}function ui(t){return t=R(t),void 0===t||"millisecond"===t?this:("date"===t&&(t="day"),this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms"))}function fi(){return this._d.valueOf()-6e4*(this._offset||0)}function mi(){return Math.floor(this.valueOf()/1e3)}function pi(){return new Date(this.valueOf())}function gi(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function yi(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function Di(){return this.isValid()?this.toISOString():null}function _i(){return u(this)}function ki(){return l({},c(this))}function vi(){return c(this).overflow}function wi(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Yi(t,e){B(0,[t,t.length],0,e)}function Mi(t){return Pi.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function bi(t){return Pi.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function Si(){return wt(this.year(),1,4)}function Ci(){var t=this.localeData()._week;return wt(this.year(),t.dow,t.doy)}function Pi(t,e,i,s,a){var n;return null==t?vt(this,s,a).year:(n=wt(t,s,a),e>n&&(e=n),xi.call(this,t,e,i,s,a))}function xi(t,e,i,s,a){var n=kt(t,e,i,s,a),r=Dt(n.year,0,n.dayOfYear);return this.year(r.getUTCFullYear()),this.month(r.getUTCMonth()),this.date(r.getUTCDate()),this}function Oi(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function Wi(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function Ti(t,e){e[ia]=_(1e3*("0."+t))}function Li(){return this._isUTC?"UTC":""}function Ii(){return this._isUTC?"Coordinated Universal Time":""}function Ri(t){return ye(1e3*t)}function Ai(){return ye.apply(null,arguments).parseZone()}function Hi(t){return t}function Ui(t,e,i,s){var a=te(),n=h().set(s,e);return a[i](n,t)}function Ei(t,e,i){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return Ui(t,e,i,"month");var s,a=[];for(s=0;12>s;s++)a[s]=Ui(t,s,i,"month");return a}function Fi(t,e,i,s){"boolean"==typeof t?("number"==typeof e&&(i=e,e=void 0),e=e||""):(e=t,i=e,t=!1,"number"==typeof e&&(i=e,e=void 0),e=e||"");var a=te(),n=t?a._week.dow:0;if(null!=i)return Ui(e,(i+n)%7,s,"day");var r,o=[];for(r=0;7>r;r++)o[r]=Ui(e,(r+n)%7,s,"day");return o}function ji(t,e){return Ei(t,e,"months")}function Ni(t,e){return Ei(t,e,"monthsShort")}function Vi(t,e,i){return Fi(t,e,i,"weekdays")}function Gi(t,e,i){return Fi(t,e,i,"weekdaysShort")}function Bi(t,e,i){return Fi(t,e,i,"weekdaysMin");
  }function zi(){var t=this._data;return this._milliseconds=za(this._milliseconds),this._days=za(this._days),this._months=za(this._months),t.milliseconds=za(t.milliseconds),t.seconds=za(t.seconds),t.minutes=za(t.minutes),t.hours=za(t.hours),t.months=za(t.months),t.years=za(t.years),this}function Zi(t,e,i,s){var a=Ee(e,i);return t._milliseconds+=s*a._milliseconds,t._days+=s*a._days,t._months+=s*a._months,t._bubble()}function qi(t,e){return Zi(this,t,e,1)}function $i(t,e){return Zi(this,t,e,-1)}function Ji(t){return 0>t?Math.floor(t):Math.ceil(t)}function Qi(){var t,e,i,s,a,n=this._milliseconds,r=this._days,o=this._months,l=this._data;return n>=0&&r>=0&&o>=0||0>=n&&0>=r&&0>=o||(n+=864e5*Ji(Ki(o)+r),r=0,o=0),l.milliseconds=n%1e3,t=D(n/1e3),l.seconds=t%60,e=D(t/60),l.minutes=e%60,i=D(e/60),l.hours=i%24,r+=D(i/24),a=D(Xi(r)),o+=a,r-=Ji(Ki(a)),s=D(o/12),o%=12,l.days=r,l.months=o,l.years=s,this}function Xi(t){return 4800*t/146097}function Ki(t){return 146097*t/4800}function ts(t){var e,i,s=this._milliseconds;if(t=R(t),"month"===t||"year"===t)return e=this._days+s/864e5,i=this._months+Xi(e),"month"===t?i:i/12;switch(e=this._days+Math.round(Ki(this._months)),t){case"week":return e/7+s/6048e5;case"day":return e+s/864e5;case"hour":return 24*e+s/36e5;case"minute":return 1440*e+s/6e4;case"second":return 86400*e+s/1e3;case"millisecond":return Math.floor(864e5*e)+s;default:throw new Error("Unknown unit "+t)}}function es(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*_(this._months/12)}function is(t){return function(){return this.as(t)}}function ss(t){return t=R(t),this[t+"s"]()}function as(t){return function(){return this._data[t]}}function ns(){return D(this.days()/7)}function rs(t,e,i,s,a){return a.relativeTime(e||1,!!i,t,s)}function os(t,e,i){var s=Ee(t).abs(),a=hn(s.as("s")),n=hn(s.as("m")),r=hn(s.as("h")),o=hn(s.as("d")),l=hn(s.as("M")),h=hn(s.as("y")),d=a<dn.s&&["s",a]||1>=n&&["m"]||n<dn.m&&["mm",n]||1>=r&&["h"]||r<dn.h&&["hh",r]||1>=o&&["d"]||o<dn.d&&["dd",o]||1>=l&&["M"]||l<dn.M&&["MM",l]||1>=h&&["y"]||["yy",h];return d[2]=e,d[3]=+t>0,d[4]=i,rs.apply(null,d)}function ls(t){return void 0===t?hn:"function"==typeof t&&(hn=t,!0)}function hs(t,e){return void 0!==dn[t]&&(void 0===e?dn[t]:(dn[t]=e,!0))}function ds(t){var e=this.localeData(),i=os(this,!t,e);return t&&(i=e.pastFuture(+this,i)),e.postformat(i)}function cs(){var t,e,i,s=cn(this._milliseconds)/1e3,a=cn(this._days),n=cn(this._months);t=D(s/60),e=D(t/60),s%=60,t%=60,i=D(n/12),n%=12;var r=i,o=n,l=a,h=e,d=t,c=s,u=this.asSeconds();return u?(0>u?"-":"")+"P"+(r?r+"Y":"")+(o?o+"M":"")+(l?l+"D":"")+(h||d||c?"T":"")+(h?h+"H":"")+(d?d+"M":"")+(c?c+"S":""):"P0D"}var us,fs;fs=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),i=e.length>>>0,s=0;i>s;s++)if(s in e&&t.call(this,e[s],s,e))return!0;return!1};var ms=t.momentProperties=[],ps=!1,gs={};t.suppressDeprecationWarnings=!1,t.deprecationHandler=null;var ys;ys=Object.keys?Object.keys:function(t){var e,i=[];for(e in t)o(t,e)&&i.push(e);return i};var Ds,_s={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},ks={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"},vs="Invalid date",ws="%d",Ys=/\d{1,2}/,Ms={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"},bs={},Ss={},Cs=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Ps=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,xs={},Os={},Ws=/\d/,Ts=/\d\d/,Ls=/\d{3}/,Is=/\d{4}/,Rs=/[+-]?\d{6}/,As=/\d\d?/,Hs=/\d\d\d\d?/,Us=/\d\d\d\d\d\d?/,Es=/\d{1,3}/,Fs=/\d{1,4}/,js=/[+-]?\d{1,6}/,Ns=/\d+/,Vs=/[+-]?\d+/,Gs=/Z|[+-]\d\d:?\d\d/gi,Bs=/Z|[+-]\d\d(?::?\d\d)?/gi,zs=/[+-]?\d+(\.\d{1,3})?/,Zs=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,qs={},$s={},Js=0,Qs=1,Xs=2,Ks=3,ta=4,ea=5,ia=6,sa=7,aa=8;Ds=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},B("M",["MM",2],"Mo",function(){return this.month()+1}),B("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),B("MMMM",0,0,function(t){return this.localeData().months(this,t)}),I("month","M"),H("month",8),J("M",As),J("MM",As,Ts),J("MMM",function(t,e){return e.monthsShortRegex(t)}),J("MMMM",function(t,e){return e.monthsRegex(t)}),tt(["M","MM"],function(t,e){e[Qs]=_(t)-1}),tt(["MMM","MMMM"],function(t,e,i,s){var a=i._locale.monthsParse(t,s,i._strict);null!=a?e[Qs]=a:c(i).invalidMonth=t});var na=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/,ra="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),oa="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),la=Zs,ha=Zs;B("Y",0,0,function(){var t=this.year();return 9999>=t?""+t:"+"+t}),B(0,["YY",2],0,function(){return this.year()%100}),B(0,["YYYY",4],0,"year"),B(0,["YYYYY",5],0,"year"),B(0,["YYYYYY",6,!0],0,"year"),I("year","y"),H("year",1),J("Y",Vs),J("YY",As,Ts),J("YYYY",Fs,Is),J("YYYYY",js,Rs),J("YYYYYY",js,Rs),tt(["YYYYY","YYYYYY"],Js),tt("YYYY",function(e,i){i[Js]=2===e.length?t.parseTwoDigitYear(e):_(e)}),tt("YY",function(e,i){i[Js]=t.parseTwoDigitYear(e)}),tt("Y",function(t,e){e[Js]=parseInt(t,10)}),t.parseTwoDigitYear=function(t){return _(t)+(_(t)>68?1900:2e3)};var da=E("FullYear",!0);B("w",["ww",2],"wo","week"),B("W",["WW",2],"Wo","isoWeek"),I("week","w"),I("isoWeek","W"),H("week",5),H("isoWeek",5),J("w",As),J("ww",As,Ts),J("W",As),J("WW",As,Ts),et(["w","ww","W","WW"],function(t,e,i,s){e[s.substr(0,1)]=_(t)});var ca={dow:0,doy:6};B("d",0,"do","day"),B("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),B("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),B("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),B("e",0,0,"weekday"),B("E",0,0,"isoWeekday"),I("day","d"),I("weekday","e"),I("isoWeekday","E"),H("day",11),H("weekday",11),H("isoWeekday",11),J("d",As),J("e",As),J("E",As),J("dd",function(t,e){return e.weekdaysMinRegex(t)}),J("ddd",function(t,e){return e.weekdaysShortRegex(t)}),J("dddd",function(t,e){return e.weekdaysRegex(t)}),et(["dd","ddd","dddd"],function(t,e,i,s){var a=i._locale.weekdaysParse(t,s,i._strict);null!=a?e.d=a:c(i).invalidWeekday=t}),et(["d","e","E"],function(t,e,i,s){e[s]=_(t)});var ua="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),fa="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),ma="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),pa=Zs,ga=Zs,ya=Zs;B("H",["HH",2],0,"hour"),B("h",["hh",2],0,Nt),B("k",["kk",2],0,Vt),B("hmm",0,0,function(){return""+Nt.apply(this)+G(this.minutes(),2)}),B("hmmss",0,0,function(){return""+Nt.apply(this)+G(this.minutes(),2)+G(this.seconds(),2)}),B("Hmm",0,0,function(){return""+this.hours()+G(this.minutes(),2)}),B("Hmmss",0,0,function(){return""+this.hours()+G(this.minutes(),2)+G(this.seconds(),2)}),Gt("a",!0),Gt("A",!1),I("hour","h"),H("hour",13),J("a",Bt),J("A",Bt),J("H",As),J("h",As),J("HH",As,Ts),J("hh",As,Ts),J("hmm",Hs),J("hmmss",Us),J("Hmm",Hs),J("Hmmss",Us),tt(["H","HH"],Ks),tt(["a","A"],function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t}),tt(["h","hh"],function(t,e,i){e[Ks]=_(t),c(i).bigHour=!0}),tt("hmm",function(t,e,i){var s=t.length-2;e[Ks]=_(t.substr(0,s)),e[ta]=_(t.substr(s)),c(i).bigHour=!0}),tt("hmmss",function(t,e,i){var s=t.length-4,a=t.length-2;e[Ks]=_(t.substr(0,s)),e[ta]=_(t.substr(s,2)),e[ea]=_(t.substr(a)),c(i).bigHour=!0}),tt("Hmm",function(t,e,i){var s=t.length-2;e[Ks]=_(t.substr(0,s)),e[ta]=_(t.substr(s))}),tt("Hmmss",function(t,e,i){var s=t.length-4,a=t.length-2;e[Ks]=_(t.substr(0,s)),e[ta]=_(t.substr(s,2)),e[ea]=_(t.substr(a))});var Da,_a=/[ap]\.?m?\.?/i,ka=E("Hours",!0),va={calendar:_s,longDateFormat:ks,invalidDate:vs,ordinal:ws,ordinalParse:Ys,relativeTime:Ms,months:ra,monthsShort:oa,week:ca,weekdays:ua,weekdaysMin:ma,weekdaysShort:fa,meridiemParse:_a},wa={},Ya=/^\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)?)?/,Ma=/^\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)?)?/,ba=/Z|[+-]\d\d(?::?\d\d)?/,Sa=[["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}/]],Ca=[["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/]],Pa=/^\/?Date\((\-?\d+)/i;t.createFromInputFallback=w("value provided is not in a recognized ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),t.ISO_8601=function(){};var xa=w("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=ye.apply(null,arguments);return this.isValid()&&t.isValid()?this>t?this:t:f()}),Oa=w("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=ye.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:f()}),Wa=function(){return Date.now?Date.now():+new Date};Me("Z",":"),Me("ZZ",""),J("Z",Bs),J("ZZ",Bs),tt(["Z","ZZ"],function(t,e,i){i._useUTC=!0,i._tzm=be(Bs,t)});var Ta=/([\+\-]|\d\d)/gi;t.updateOffset=function(){};var La=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ia=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;Ee.fn=ve.prototype;var Ra=Ve(1,"add"),Aa=Ve(-1,"subtract");t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Ha=w("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});B(0,["gg",2],0,function(){return this.weekYear()%100}),B(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Yi("gggg","weekYear"),Yi("ggggg","weekYear"),Yi("GGGG","isoWeekYear"),Yi("GGGGG","isoWeekYear"),I("weekYear","gg"),I("isoWeekYear","GG"),H("weekYear",1),H("isoWeekYear",1),J("G",Vs),J("g",Vs),J("GG",As,Ts),J("gg",As,Ts),J("GGGG",Fs,Is),J("gggg",Fs,Is),J("GGGGG",js,Rs),J("ggggg",js,Rs),et(["gggg","ggggg","GGGG","GGGGG"],function(t,e,i,s){e[s.substr(0,2)]=_(t)}),et(["gg","GG"],function(e,i,s,a){i[a]=t.parseTwoDigitYear(e)}),B("Q",0,"Qo","quarter"),I("quarter","Q"),H("quarter",7),J("Q",Ws),tt("Q",function(t,e){e[Qs]=3*(_(t)-1)}),B("D",["DD",2],"Do","date"),I("date","D"),H("date",9),J("D",As),J("DD",As,Ts),J("Do",function(t,e){return t?e._ordinalParse:e._ordinalParseLenient}),tt(["D","DD"],Xs),tt("Do",function(t,e){e[Xs]=_(t.match(As)[0],10)});var Ua=E("Date",!0);B("DDD",["DDDD",3],"DDDo","dayOfYear"),I("dayOfYear","DDD"),H("dayOfYear",4),J("DDD",Es),J("DDDD",Ls),tt(["DDD","DDDD"],function(t,e,i){i._dayOfYear=_(t)}),B("m",["mm",2],0,"minute"),I("minute","m"),H("minute",14),J("m",As),J("mm",As,Ts),tt(["m","mm"],ta);var Ea=E("Minutes",!1);B("s",["ss",2],0,"second"),I("second","s"),H("second",15),J("s",As),J("ss",As,Ts),tt(["s","ss"],ea);var Fa=E("Seconds",!1);B("S",0,0,function(){return~~(this.millisecond()/100)}),B(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),B(0,["SSS",3],0,"millisecond"),B(0,["SSSS",4],0,function(){return 10*this.millisecond()}),B(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),B(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),B(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),B(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),B(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),I("millisecond","ms"),H("millisecond",16),J("S",Es,Ws),J("SS",Es,Ts),J("SSS",Es,Ls);var ja;for(ja="SSSS";ja.length<=9;ja+="S")J(ja,Ns);for(ja="S";ja.length<=9;ja+="S")tt(ja,Ti);var Na=E("Milliseconds",!1);B("z",0,0,"zoneAbbr"),B("zz",0,0,"zoneName");var Va=g.prototype;Va.add=Ra,Va.calendar=ze,Va.clone=Ze,Va.diff=ti,Va.endOf=ui,Va.format=ai,Va.from=ni,Va.fromNow=ri,Va.to=oi,Va.toNow=li,Va.get=N,Va.invalidAt=vi,Va.isAfter=qe,Va.isBefore=$e,Va.isBetween=Je,Va.isSame=Qe,Va.isSameOrAfter=Xe,Va.isSameOrBefore=Ke,Va.isValid=_i,Va.lang=Ha,Va.locale=hi,Va.localeData=di,Va.max=Oa,Va.min=xa,Va.parsingFlags=ki,Va.set=V,Va.startOf=ci,Va.subtract=Aa,Va.toArray=gi,Va.toObject=yi,Va.toDate=pi,Va.toISOString=si,Va.toJSON=Di,Va.toString=ii,Va.unix=mi,Va.valueOf=fi,Va.creationData=wi,Va.year=da,Va.isLeapYear=gt,Va.weekYear=Mi,Va.isoWeekYear=bi,Va.quarter=Va.quarters=Oi,Va.month=ht,Va.daysInMonth=dt,Va.week=Va.weeks=St,Va.isoWeek=Va.isoWeeks=Ct,Va.weeksInYear=Ci,Va.isoWeeksInYear=Si,Va.date=Ua,Va.day=Va.days=Rt,Va.weekday=At,Va.isoWeekday=Ht,Va.dayOfYear=Wi,Va.hour=Va.hours=ka,Va.minute=Va.minutes=Ea,Va.second=Va.seconds=Fa,Va.millisecond=Va.milliseconds=Na,Va.utcOffset=Pe,Va.utc=Oe,Va.local=We,Va.parseZone=Te,Va.hasAlignedHourOffset=Le,Va.isDST=Ie,Va.isLocal=Ae,Va.isUtcOffset=He,Va.isUtc=Ue,Va.isUTC=Ue,Va.zoneAbbr=Li,Va.zoneName=Ii,Va.dates=w("dates accessor is deprecated. Use date instead.",Ua),Va.months=w("months accessor is deprecated. Use month instead",ht),Va.years=w("years accessor is deprecated. Use year instead",da),Va.zone=w("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",xe),Va.isDSTShifted=w("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Re);var Ga=Va,Ba=C.prototype;Ba.calendar=P,Ba.longDateFormat=x,Ba.invalidDate=O,Ba.ordinal=W,Ba.preparse=Hi,Ba.postformat=Hi,Ba.relativeTime=T,Ba.pastFuture=L,Ba.set=b,Ba.months=at,Ba.monthsShort=nt,Ba.monthsParse=ot,Ba.monthsRegex=ut,Ba.monthsShortRegex=ct,Ba.week=Yt,Ba.firstDayOfYear=bt,Ba.firstDayOfWeek=Mt,Ba.weekdays=Ot,Ba.weekdaysMin=Tt,Ba.weekdaysShort=Wt,Ba.weekdaysParse=It,Ba.weekdaysRegex=Ut,Ba.weekdaysShortRegex=Et,Ba.weekdaysMinRegex=Ft,Ba.isPM=zt,Ba.meridiem=Zt,Qt("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,i=1===_(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+i}}),t.lang=w("moment.lang is deprecated. Use moment.locale instead.",Qt),t.langData=w("moment.langData is deprecated. Use moment.localeData instead.",te);var za=Math.abs,Za=is("ms"),qa=is("s"),$a=is("m"),Ja=is("h"),Qa=is("d"),Xa=is("w"),Ka=is("M"),tn=is("y"),en=as("milliseconds"),sn=as("seconds"),an=as("minutes"),nn=as("hours"),rn=as("days"),on=as("months"),ln=as("years"),hn=Math.round,dn={s:45,m:45,h:22,d:26,M:11},cn=Math.abs,un=ve.prototype;un.abs=zi,un.add=qi,un.subtract=$i,un.as=ts,un.asMilliseconds=Za,un.asSeconds=qa,un.asMinutes=$a,un.asHours=Ja,un.asDays=Qa,un.asWeeks=Xa,un.asMonths=Ka,un.asYears=tn,un.valueOf=es,un._bubble=Qi,un.get=ss,un.milliseconds=en,un.seconds=sn,un.minutes=an,un.hours=nn,un.days=rn,un.weeks=ns,un.months=on,un.years=ln,un.humanize=ds,un.toISOString=cs,un.toString=cs,un.toJSON=cs,un.locale=hi,un.localeData=di,un.toIsoString=w("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",cs),un.lang=Ha,B("X",0,0,"unix"),B("x",0,0,"valueOf"),J("x",Vs),J("X",zs),tt("X",function(t,e,i){i._d=new Date(1e3*parseFloat(t,10))}),tt("x",function(t,e,i){i._d=new Date(_(t))}),t.version="2.15.0",e(ye),t.fn=Ga,t.min=_e,t.max=ke,t.now=Wa,t.utc=h,t.unix=Ri,t.months=ji,t.isDate=n,t.locale=Qt,t.invalid=f,t.duration=Ee,t.isMoment=y,t.weekdays=Vi,t.parseZone=Ai,t.localeData=te,t.isDuration=we,t.monthsShort=Ni,t.weekdaysMin=Bi,t.defineLocale=Xt,t.updateLocale=Kt,t.locales=ee,t.weekdaysShort=Gi,t.normalizeUnits=R,t.relativeTimeRounding=ls,t.relativeTimeThreshold=hs,t.calendarFormat=Be,t.prototype=Ga;var fn=t;return fn}),function(t,e){if("function"==typeof define&&define.amd)define(["moment","jquery"],function(i,s){return t.daterangepicker=e(i,s)});else if("object"==typeof module&&module.exports){var i="undefined"!=typeof window?window.jQuery:void 0;i||(i=require("jquery"),i.fn||(i.fn={})),module.exports=e(require("moment"),i)}else t.daterangepicker=e(t.moment,t.jQuery)}(this,function(t,e){var i=function(i,s,a){if(this.parentEl="body",this.element=e(i),this.startDate=t().startOf("day"),this.endDate=t().endOf("day"),this.minDate=!1,this.maxDate=!1,this.dateLimit=!1,this.autoApply=!1,this.singleDatePicker=!1,this.showDropdowns=!1,this.showWeekNumbers=!1,this.showISOWeekNumbers=!1,this.showCustomRangeLabel=!0,this.timePicker=!1,this.timePicker24Hour=!1,this.timePickerIncrement=1,this.timePickerSeconds=!1,this.linkedCalendars=!0,this.autoUpdateInput=!0,this.alwaysShowCalendars=!1,this.ranges={},this.opens="right",this.element.hasClass("pull-right")&&(this.opens="left"),this.drops="down",this.element.hasClass("dropup")&&(this.drops="up"),this.buttonClasses="btn btn-sm",this.applyClass="btn-success",this.cancelClass="btn-default",this.locale={direction:"ltr",format:"MM/DD/YYYY",separator:" - ",applyLabel:"Apply",cancelLabel:"Cancel",weekLabel:"W",customRangeLabel:"Custom Range",daysOfWeek:t.weekdaysMin(),monthNames:t.monthsShort(),firstDay:t.localeData().firstDayOfWeek()},this.callback=function(){},this.isShowing=!1,this.leftCalendar={},this.rightCalendar={},"object"==typeof s&&null!==s||(s={}),s=e.extend(this.element.data(),s),"string"==typeof s.template||s.template instanceof e||(s.template='<div class="daterangepicker dropdown-menu"><div class="calendar left"><div class="daterangepicker_input"><input class="input-mini form-control" type="text" name="daterangepicker_start" value="" /><i class="fa fa-calendar glyphicon glyphicon-calendar"></i><div class="calendar-time"><div></div><i class="fa fa-clock-o glyphicon glyphicon-time"></i></div></div><div class="calendar-table"></div></div><div class="calendar right"><div class="daterangepicker_input"><input class="input-mini form-control" type="text" name="daterangepicker_end" value="" /><i class="fa fa-calendar glyphicon glyphicon-calendar"></i><div class="calendar-time"><div></div><i class="fa fa-clock-o glyphicon glyphicon-time"></i></div></div><div class="calendar-table"></div></div><div class="ranges"><div class="range_inputs"><button class="applyBtn" disabled="disabled" type="button"></button> <button class="cancelBtn" type="button"></button></div></div></div>'),this.parentEl=e(s.parentEl&&e(s.parentEl).length?s.parentEl:this.parentEl),this.container=e(s.template).appendTo(this.parentEl),"object"==typeof s.locale&&("string"==typeof s.locale.direction&&(this.locale.direction=s.locale.direction),"string"==typeof s.locale.format&&(this.locale.format=s.locale.format),"string"==typeof s.locale.separator&&(this.locale.separator=s.locale.separator),"object"==typeof s.locale.daysOfWeek&&(this.locale.daysOfWeek=s.locale.daysOfWeek.slice()),"object"==typeof s.locale.monthNames&&(this.locale.monthNames=s.locale.monthNames.slice()),"number"==typeof s.locale.firstDay&&(this.locale.firstDay=s.locale.firstDay),"string"==typeof s.locale.applyLabel&&(this.locale.applyLabel=s.locale.applyLabel),"string"==typeof s.locale.cancelLabel&&(this.locale.cancelLabel=s.locale.cancelLabel),"string"==typeof s.locale.weekLabel&&(this.locale.weekLabel=s.locale.weekLabel),"string"==typeof s.locale.customRangeLabel&&(this.locale.customRangeLabel=s.locale.customRangeLabel)),this.container.addClass(this.locale.direction),"string"==typeof s.startDate&&(this.startDate=t(s.startDate,this.locale.format)),"string"==typeof s.endDate&&(this.endDate=t(s.endDate,this.locale.format)),"string"==typeof s.minDate&&(this.minDate=t(s.minDate,this.locale.format)),"string"==typeof s.maxDate&&(this.maxDate=t(s.maxDate,this.locale.format)),"object"==typeof s.startDate&&(this.startDate=t(s.startDate)),"object"==typeof s.endDate&&(this.endDate=t(s.endDate)),"object"==typeof s.minDate&&(this.minDate=t(s.minDate)),"object"==typeof s.maxDate&&(this.maxDate=t(s.maxDate)),this.minDate&&this.startDate.isBefore(this.minDate)&&(this.startDate=this.minDate.clone()),this.maxDate&&this.endDate.isAfter(this.maxDate)&&(this.endDate=this.maxDate.clone()),"string"==typeof s.applyClass&&(this.applyClass=s.applyClass),"string"==typeof s.cancelClass&&(this.cancelClass=s.cancelClass),"object"==typeof s.dateLimit&&(this.dateLimit=s.dateLimit),"string"==typeof s.opens&&(this.opens=s.opens),"string"==typeof s.drops&&(this.drops=s.drops),"boolean"==typeof s.showWeekNumbers&&(this.showWeekNumbers=s.showWeekNumbers),"boolean"==typeof s.showISOWeekNumbers&&(this.showISOWeekNumbers=s.showISOWeekNumbers),"string"==typeof s.buttonClasses&&(this.buttonClasses=s.buttonClasses),"object"==typeof s.buttonClasses&&(this.buttonClasses=s.buttonClasses.join(" ")),"boolean"==typeof s.showDropdowns&&(this.showDropdowns=s.showDropdowns),"boolean"==typeof s.showCustomRangeLabel&&(this.showCustomRangeLabel=s.showCustomRangeLabel),"boolean"==typeof s.singleDatePicker&&(this.singleDatePicker=s.singleDatePicker,this.singleDatePicker&&(this.endDate=this.startDate.clone())),"boolean"==typeof s.timePicker&&(this.timePicker=s.timePicker),"boolean"==typeof s.timePickerSeconds&&(this.timePickerSeconds=s.timePickerSeconds),"number"==typeof s.timePickerIncrement&&(this.timePickerIncrement=s.timePickerIncrement),"boolean"==typeof s.timePicker24Hour&&(this.timePicker24Hour=s.timePicker24Hour),"boolean"==typeof s.autoApply&&(this.autoApply=s.autoApply),"boolean"==typeof s.autoUpdateInput&&(this.autoUpdateInput=s.autoUpdateInput),"boolean"==typeof s.linkedCalendars&&(this.linkedCalendars=s.linkedCalendars),"function"==typeof s.isInvalidDate&&(this.isInvalidDate=s.isInvalidDate),"function"==typeof s.isCustomDate&&(this.isCustomDate=s.isCustomDate),"boolean"==typeof s.alwaysShowCalendars&&(this.alwaysShowCalendars=s.alwaysShowCalendars),0!=this.locale.firstDay)for(var n=this.locale.firstDay;n>0;)this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift()),n--;var r,o,l;if("undefined"==typeof s.startDate&&"undefined"==typeof s.endDate&&e(this.element).is("input[type=text]")){var h=e(this.element).val(),d=h.split(this.locale.separator);r=o=null,2==d.length?(r=t(d[0],this.locale.format),o=t(d[1],this.locale.format)):this.singleDatePicker&&""!==h&&(r=t(h,this.locale.format),o=t(h,this.locale.format)),null!==r&&null!==o&&(this.setStartDate(r),this.setEndDate(o))}if("object"==typeof s.ranges){for(l in s.ranges){r="string"==typeof s.ranges[l][0]?t(s.ranges[l][0],this.locale.format):t(s.ranges[l][0]),o="string"==typeof s.ranges[l][1]?t(s.ranges[l][1],this.locale.format):t(s.ranges[l][1]),this.minDate&&r.isBefore(this.minDate)&&(r=this.minDate.clone());var c=this.maxDate;if(this.dateLimit&&c&&r.clone().add(this.dateLimit).isAfter(c)&&(c=r.clone().add(this.dateLimit)),c&&o.isAfter(c)&&(o=c.clone()),!(this.minDate&&o.isBefore(this.minDate,this.timepicker?"minute":"day")||c&&r.isAfter(c,this.timepicker?"minute":"day"))){var u=document.createElement("textarea");u.innerHTML=l;var f=u.value;this.ranges[f]=[r,o]}}var m="<ul>";for(l in this.ranges)m+='<li data-range-key="'+l+'">'+l+"</li>";this.showCustomRangeLabel&&(m+='<li data-range-key="'+this.locale.customRangeLabel+'">'+this.locale.customRangeLabel+"</li>"),m+="</ul>",this.container.find(".ranges").prepend(m)}"function"==typeof a&&(this.callback=a),this.timePicker||(this.startDate=this.startDate.startOf("day"),this.endDate=this.endDate.endOf("day"),this.container.find(".calendar-time").hide()),this.timePicker&&this.autoApply&&(this.autoApply=!1),this.autoApply&&"object"!=typeof s.ranges?this.container.find(".ranges").hide():this.autoApply&&this.container.find(".applyBtn, .cancelBtn").addClass("hide"),this.singleDatePicker&&(this.container.addClass("single"),this.container.find(".calendar.left").addClass("single"),this.container.find(".calendar.left").show(),this.container.find(".calendar.right").hide(),this.container.find(".daterangepicker_input input, .daterangepicker_input > i").hide(),this.timePicker?this.container.find(".ranges ul").hide():this.container.find(".ranges").hide()),("undefined"==typeof s.ranges&&!this.singleDatePicker||this.alwaysShowCalendars)&&this.container.addClass("show-calendar"),this.container.addClass("opens"+this.opens),"undefined"!=typeof s.ranges&&"right"==this.opens&&this.container.find(".ranges").prependTo(this.container.find(".calendar.left").parent()),this.container.find(".applyBtn, .cancelBtn").addClass(this.buttonClasses),this.applyClass.length&&this.container.find(".applyBtn").addClass(this.applyClass),this.cancelClass.length&&this.container.find(".cancelBtn").addClass(this.cancelClass),this.container.find(".applyBtn").html(this.locale.applyLabel),this.container.find(".cancelBtn").html(this.locale.cancelLabel),this.container.find(".calendar").on("click.daterangepicker",".prev",e.proxy(this.clickPrev,this)).on("click.daterangepicker",".next",e.proxy(this.clickNext,this)).on("mousedown.daterangepicker","td.available",e.proxy(this.clickDate,this)).on("mouseenter.daterangepicker","td.available",e.proxy(this.hoverDate,this)).on("mouseleave.daterangepicker","td.available",e.proxy(this.updateFormInputs,this)).on("change.daterangepicker","select.yearselect",e.proxy(this.monthOrYearChanged,this)).on("change.daterangepicker","select.monthselect",e.proxy(this.monthOrYearChanged,this)).on("change.daterangepicker","select.hourselect,select.minuteselect,select.secondselect,select.ampmselect",e.proxy(this.timeChanged,this)).on("click.daterangepicker",".daterangepicker_input input",e.proxy(this.showCalendars,this)).on("focus.daterangepicker",".daterangepicker_input input",e.proxy(this.formInputsFocused,this)).on("blur.daterangepicker",".daterangepicker_input input",e.proxy(this.formInputsBlurred,this)).on("change.daterangepicker",".daterangepicker_input input",e.proxy(this.formInputsChanged,this)),this.container.find(".ranges").on("click.daterangepicker","button.applyBtn",e.proxy(this.clickApply,this)).on("click.daterangepicker","button.cancelBtn",e.proxy(this.clickCancel,this)).on("click.daterangepicker","li",e.proxy(this.clickRange,this)).on("mouseenter.daterangepicker","li",e.proxy(this.hoverRange,this)).on("mouseleave.daterangepicker","li",e.proxy(this.updateFormInputs,this)),this.element.is("input")||this.element.is("button")?this.element.on({"click.daterangepicker":e.proxy(this.show,this),"focus.daterangepicker":e.proxy(this.show,this),"keyup.daterangepicker":e.proxy(this.elementChanged,this),"keydown.daterangepicker":e.proxy(this.keydown,this)}):this.element.on("click.daterangepicker",e.proxy(this.toggle,this)),this.element.is("input")&&!this.singleDatePicker&&this.autoUpdateInput?(this.element.val(this.startDate.format(this.locale.format)+this.locale.separator+this.endDate.format(this.locale.format)),this.element.trigger("change")):this.element.is("input")&&this.autoUpdateInput&&(this.element.val(this.startDate.format(this.locale.format)),this.element.trigger("change"))};return i.prototype={constructor:i,setStartDate:function(e){"string"==typeof e&&(this.startDate=t(e,this.locale.format)),"object"==typeof e&&(this.startDate=t(e)),this.timePicker||(this.startDate=this.startDate.startOf("day")),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.round(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement),this.minDate&&this.startDate.isBefore(this.minDate)&&(this.startDate=this.minDate,this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.round(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement)),this.maxDate&&this.startDate.isAfter(this.maxDate)&&(this.startDate=this.maxDate,this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.floor(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement)),this.isShowing||this.updateElement(),this.updateMonthsInView()},setEndDate:function(e){"string"==typeof e&&(this.endDate=t(e,this.locale.format)),"object"==typeof e&&(this.endDate=t(e)),this.timePicker||(this.endDate=this.endDate.endOf("day")),this.timePicker&&this.timePickerIncrement&&this.endDate.minute(Math.round(this.endDate.minute()/this.timePickerIncrement)*this.timePickerIncrement),this.endDate.isBefore(this.startDate)&&(this.endDate=this.startDate.clone()),this.maxDate&&this.endDate.isAfter(this.maxDate)&&(this.endDate=this.maxDate),this.dateLimit&&this.startDate.clone().add(this.dateLimit).isBefore(this.endDate)&&(this.endDate=this.startDate.clone().add(this.dateLimit)),this.previousRightTime=this.endDate.clone(),this.isShowing||this.updateElement(),this.updateMonthsInView()},isInvalidDate:function(){return!1},isCustomDate:function(){return!1},updateView:function(){this.timePicker&&(this.renderTimePicker("left"),this.renderTimePicker("right"),this.endDate?this.container.find(".right .calendar-time select").removeAttr("disabled").removeClass("disabled"):this.container.find(".right .calendar-time select").attr("disabled","disabled").addClass("disabled")),this.endDate?(this.container.find('input[name="daterangepicker_end"]').removeClass("active"),this.container.find('input[name="daterangepicker_start"]').addClass("active")):(this.container.find('input[name="daterangepicker_end"]').addClass("active"),this.container.find('input[name="daterangepicker_start"]').removeClass("active")),this.updateMonthsInView(),this.updateCalendars(),this.updateFormInputs()},updateMonthsInView:function(){if(this.endDate){if(!this.singleDatePicker&&this.leftCalendar.month&&this.rightCalendar.month&&(this.startDate.format("YYYY-MM")==this.leftCalendar.month.format("YYYY-MM")||this.startDate.format("YYYY-MM")==this.rightCalendar.month.format("YYYY-MM"))&&(this.endDate.format("YYYY-MM")==this.leftCalendar.month.format("YYYY-MM")||this.endDate.format("YYYY-MM")==this.rightCalendar.month.format("YYYY-MM")))return;this.leftCalendar.month=this.startDate.clone().date(2),this.linkedCalendars||this.endDate.month()==this.startDate.month()&&this.endDate.year()==this.startDate.year()?this.rightCalendar.month=this.startDate.clone().date(2).add(1,"month"):this.rightCalendar.month=this.endDate.clone().date(2)}else this.leftCalendar.month.format("YYYY-MM")!=this.startDate.format("YYYY-MM")&&this.rightCalendar.month.format("YYYY-MM")!=this.startDate.format("YYYY-MM")&&(this.leftCalendar.month=this.startDate.clone().date(2),this.rightCalendar.month=this.startDate.clone().date(2).add(1,"month"));this.maxDate&&this.linkedCalendars&&!this.singleDatePicker&&this.rightCalendar.month>this.maxDate&&(this.rightCalendar.month=this.maxDate.clone().date(2),this.leftCalendar.month=this.maxDate.clone().date(2).subtract(1,"month"))},updateCalendars:function(){if(this.timePicker){var t,e,i;if(this.endDate){if(t=parseInt(this.container.find(".left .hourselect").val(),10),e=parseInt(this.container.find(".left .minuteselect").val(),10),i=this.timePickerSeconds?parseInt(this.container.find(".left .secondselect").val(),10):0,!this.timePicker24Hour){var s=this.container.find(".left .ampmselect").val();"PM"===s&&t<12&&(t+=12),"AM"===s&&12===t&&(t=0)}}else if(t=parseInt(this.container.find(".right .hourselect").val(),10),e=parseInt(this.container.find(".right .minuteselect").val(),10),i=this.timePickerSeconds?parseInt(this.container.find(".right .secondselect").val(),10):0,!this.timePicker24Hour){var s=this.container.find(".right .ampmselect").val();
  "PM"===s&&t<12&&(t+=12),"AM"===s&&12===t&&(t=0)}this.leftCalendar.month.hour(t).minute(e).second(i),this.rightCalendar.month.hour(t).minute(e).second(i)}this.renderCalendar("left"),this.renderCalendar("right"),this.container.find(".ranges li").removeClass("active"),null!=this.endDate&&this.calculateChosenLabel()},renderCalendar:function(i){var s="left"==i?this.leftCalendar:this.rightCalendar,a=s.month.month(),n=s.month.year(),r=s.month.hour(),o=s.month.minute(),l=s.month.second(),h=t([n,a]).daysInMonth(),d=t([n,a,1]),c=t([n,a,h]),u=t(d).subtract(1,"month").month(),f=t(d).subtract(1,"month").year(),m=t([f,u]).daysInMonth(),p=d.day(),s=[];s.firstDay=d,s.lastDay=c;for(var g=0;g<6;g++)s[g]=[];var y=m-p+this.locale.firstDay+1;y>m&&(y-=7),p==this.locale.firstDay&&(y=m-6);for(var D,_,k=t([f,u,y,12,o,l]),g=0,D=0,_=0;g<42;g++,D++,k=t(k).add(24,"hour"))g>0&&D%7===0&&(D=0,_++),s[_][D]=k.clone().hour(r).minute(o).second(l),k.hour(12),this.minDate&&s[_][D].format("YYYY-MM-DD")==this.minDate.format("YYYY-MM-DD")&&s[_][D].isBefore(this.minDate)&&"left"==i&&(s[_][D]=this.minDate.clone()),this.maxDate&&s[_][D].format("YYYY-MM-DD")==this.maxDate.format("YYYY-MM-DD")&&s[_][D].isAfter(this.maxDate)&&"right"==i&&(s[_][D]=this.maxDate.clone());"left"==i?this.leftCalendar.calendar=s:this.rightCalendar.calendar=s;var v="left"==i?this.minDate:this.startDate,w=this.maxDate,Y=("left"==i?this.startDate:this.endDate,"ltr"==this.locale.direction?{left:"chevron-left",right:"chevron-right"}:{left:"chevron-right",right:"chevron-left"}),M='<table class="table-condensed">';M+="<thead>",M+="<tr>",(this.showWeekNumbers||this.showISOWeekNumbers)&&(M+="<th></th>"),M+=v&&!v.isBefore(s.firstDay)||this.linkedCalendars&&"left"!=i?"<th></th>":'<th class="prev available"><i class="fa fa-'+Y.left+" glyphicon glyphicon-"+Y.left+'"></i></th>';var b=this.locale.monthNames[s[1][1].month()]+s[1][1].format(" YYYY");if(this.showDropdowns){for(var S=s[1][1].month(),C=s[1][1].year(),P=w&&w.year()||C+5,x=v&&v.year()||C-50,O=C==x,W=C==P,T='<select class="monthselect">',L=0;L<12;L++)T+=(!O||L>=v.month())&&(!W||L<=w.month())?"<option value='"+L+"'"+(L===S?" selected='selected'":"")+">"+this.locale.monthNames[L]+"</option>":"<option value='"+L+"'"+(L===S?" selected='selected'":"")+" disabled='disabled'>"+this.locale.monthNames[L]+"</option>";T+="</select>";for(var I='<select class="yearselect">',R=x;R<=P;R++)I+='<option value="'+R+'"'+(R===C?' selected="selected"':"")+">"+R+"</option>";I+="</select>",b=T+I}if(M+='<th colspan="5" class="month">'+b+"</th>",M+=w&&!w.isAfter(s.lastDay)||this.linkedCalendars&&"right"!=i&&!this.singleDatePicker?"<th></th>":'<th class="next available"><i class="fa fa-'+Y.right+" glyphicon glyphicon-"+Y.right+'"></i></th>',M+="</tr>",M+="<tr>",(this.showWeekNumbers||this.showISOWeekNumbers)&&(M+='<th class="week">'+this.locale.weekLabel+"</th>"),e.each(this.locale.daysOfWeek,function(t,e){M+="<th>"+e+"</th>"}),M+="</tr>",M+="</thead>",M+="<tbody>",null==this.endDate&&this.dateLimit){var A=this.startDate.clone().add(this.dateLimit).endOf("day");w&&!A.isBefore(w)||(w=A)}for(var _=0;_<6;_++){M+="<tr>",this.showWeekNumbers?M+='<td class="week">'+s[_][0].week()+"</td>":this.showISOWeekNumbers&&(M+='<td class="week">'+s[_][0].isoWeek()+"</td>");for(var D=0;D<7;D++){var H=[];s[_][D].isSame(new Date,"day")&&H.push("today"),s[_][D].isoWeekday()>5&&H.push("weekend"),s[_][D].month()!=s[1][1].month()&&H.push("off"),this.minDate&&s[_][D].isBefore(this.minDate,"day")&&H.push("off","disabled"),w&&s[_][D].isAfter(w,"day")&&H.push("off","disabled"),this.isInvalidDate(s[_][D])&&H.push("off","disabled"),s[_][D].format("YYYY-MM-DD")==this.startDate.format("YYYY-MM-DD")&&H.push("active","start-date"),null!=this.endDate&&s[_][D].format("YYYY-MM-DD")==this.endDate.format("YYYY-MM-DD")&&H.push("active","end-date"),null!=this.endDate&&s[_][D]>this.startDate&&s[_][D]<this.endDate&&H.push("in-range");var U=this.isCustomDate(s[_][D]);U!==!1&&("string"==typeof U?H.push(U):Array.prototype.push.apply(H,U));for(var E="",F=!1,g=0;g<H.length;g++)E+=H[g]+" ","disabled"==H[g]&&(F=!0);F||(E+="available"),M+='<td class="'+E.replace(/^\s+|\s+$/g,"")+'" data-title="r'+_+"c"+D+'">'+s[_][D].date()+"</td>"}M+="</tr>"}M+="</tbody>",M+="</table>",this.container.find(".calendar."+i+" .calendar-table").html(M)},renderTimePicker:function(t){if("right"!=t||this.endDate){var e,i,s,a=this.maxDate;if(!this.dateLimit||this.maxDate&&!this.startDate.clone().add(this.dateLimit).isAfter(this.maxDate)||(a=this.startDate.clone().add(this.dateLimit)),"left"==t)i=this.startDate.clone(),s=this.minDate;else if("right"==t){i=this.endDate.clone(),s=this.startDate;var n=this.container.find(".calendar.right .calendar-time div");if(!this.endDate&&""!=n.html()&&(i.hour(n.find(".hourselect option:selected").val()||i.hour()),i.minute(n.find(".minuteselect option:selected").val()||i.minute()),i.second(n.find(".secondselect option:selected").val()||i.second()),!this.timePicker24Hour)){var r=n.find(".ampmselect option:selected").val();"PM"===r&&i.hour()<12&&i.hour(i.hour()+12),"AM"===r&&12===i.hour()&&i.hour(0)}i.isBefore(this.startDate)&&(i=this.startDate.clone()),a&&i.isAfter(a)&&(i=a.clone())}e='<select class="hourselect">';for(var o=this.timePicker24Hour?0:1,l=this.timePicker24Hour?23:12,h=o;h<=l;h++){var d=h;this.timePicker24Hour||(d=i.hour()>=12?12==h?12:h+12:12==h?0:h);var c=i.clone().hour(d),u=!1;s&&c.minute(59).isBefore(s)&&(u=!0),a&&c.minute(0).isAfter(a)&&(u=!0),e+=d!=i.hour()||u?u?'<option value="'+h+'" disabled="disabled" class="disabled">'+h+"</option>":'<option value="'+h+'">'+h+"</option>":'<option value="'+h+'" selected="selected">'+h+"</option>"}e+="</select> ",e+=': <select class="minuteselect">';for(var h=0;h<60;h+=this.timePickerIncrement){var f=h<10?"0"+h:h,c=i.clone().minute(h),u=!1;s&&c.second(59).isBefore(s)&&(u=!0),a&&c.second(0).isAfter(a)&&(u=!0),e+=i.minute()!=h||u?u?'<option value="'+h+'" disabled="disabled" class="disabled">'+f+"</option>":'<option value="'+h+'">'+f+"</option>":'<option value="'+h+'" selected="selected">'+f+"</option>"}if(e+="</select> ",this.timePickerSeconds){e+=': <select class="secondselect">';for(var h=0;h<60;h++){var f=h<10?"0"+h:h,c=i.clone().second(h),u=!1;s&&c.isBefore(s)&&(u=!0),a&&c.isAfter(a)&&(u=!0),e+=i.second()!=h||u?u?'<option value="'+h+'" disabled="disabled" class="disabled">'+f+"</option>":'<option value="'+h+'">'+f+"</option>":'<option value="'+h+'" selected="selected">'+f+"</option>"}e+="</select> "}if(!this.timePicker24Hour){e+='<select class="ampmselect">';var m="",p="";s&&i.clone().hour(12).minute(0).second(0).isBefore(s)&&(m=' disabled="disabled" class="disabled"'),a&&i.clone().hour(0).minute(0).second(0).isAfter(a)&&(p=' disabled="disabled" class="disabled"'),e+=i.hour()>=12?'<option value="AM"'+m+'>AM</option><option value="PM" selected="selected"'+p+">PM</option>":'<option value="AM" selected="selected"'+m+'>AM</option><option value="PM"'+p+">PM</option>",e+="</select>"}this.container.find(".calendar."+t+" .calendar-time div").html(e)}},updateFormInputs:function(){this.container.find("input[name=daterangepicker_start]").is(":focus")||this.container.find("input[name=daterangepicker_end]").is(":focus")||(this.container.find("input[name=daterangepicker_start]").val(this.startDate.format(this.locale.format)),this.endDate&&this.container.find("input[name=daterangepicker_end]").val(this.endDate.format(this.locale.format)),this.singleDatePicker||this.endDate&&(this.startDate.isBefore(this.endDate)||this.startDate.isSame(this.endDate))?this.container.find("button.applyBtn").removeAttr("disabled"):this.container.find("button.applyBtn").attr("disabled","disabled"))},move:function(){var t,i={top:0,left:0},s=e(window).width();this.parentEl.is("body")||(i={top:this.parentEl.offset().top-this.parentEl.scrollTop(),left:this.parentEl.offset().left-this.parentEl.scrollLeft()},s=this.parentEl[0].clientWidth+this.parentEl.offset().left),t="up"==this.drops?this.element.offset().top-this.container.outerHeight()-i.top:this.element.offset().top+this.element.outerHeight()-i.top,this.container["up"==this.drops?"addClass":"removeClass"]("dropup"),"left"==this.opens?(this.container.css({top:t,right:s-this.element.offset().left-this.element.outerWidth(),left:"auto"}),this.container.offset().left<0&&this.container.css({right:"auto",left:9})):"center"==this.opens?(this.container.css({top:t,left:this.element.offset().left-i.left+this.element.outerWidth()/2-this.container.outerWidth()/2,right:"auto"}),this.container.offset().left<0&&this.container.css({right:"auto",left:9})):(this.container.css({top:t,left:this.element.offset().left-i.left,right:"auto"}),this.container.offset().left+this.container.outerWidth()>e(window).width()&&this.container.css({left:"auto",right:0}))},show:function(t){this.isShowing||(this._outsideClickProxy=e.proxy(function(t){this.outsideClick(t)},this),e(document).on("mousedown.daterangepicker",this._outsideClickProxy).on("touchend.daterangepicker",this._outsideClickProxy).on("click.daterangepicker","[data-toggle=dropdown]",this._outsideClickProxy).on("focusin.daterangepicker",this._outsideClickProxy),e(window).on("resize.daterangepicker",e.proxy(function(t){this.move(t)},this)),this.oldStartDate=this.startDate.clone(),this.oldEndDate=this.endDate.clone(),this.previousRightTime=this.endDate.clone(),this.updateView(),this.container.show(),this.move(),this.element.trigger("show.daterangepicker",this),this.isShowing=!0)},hide:function(t){this.isShowing&&(this.endDate||(this.startDate=this.oldStartDate.clone(),this.endDate=this.oldEndDate.clone()),this.startDate.isSame(this.oldStartDate)&&this.endDate.isSame(this.oldEndDate)||this.callback(this.startDate,this.endDate,this.chosenLabel),this.updateElement(),e(document).off(".daterangepicker"),e(window).off(".daterangepicker"),this.container.hide(),this.element.trigger("hide.daterangepicker",this),this.isShowing=!1)},toggle:function(t){this.isShowing?this.hide():this.show()},outsideClick:function(t){var i=e(t.target);"focusin"==t.type||i.closest(this.element).length||i.closest(this.container).length||i.closest(".calendar-table").length||(this.hide(),this.element.trigger("outsideClick.daterangepicker",this))},showCalendars:function(){this.container.addClass("show-calendar"),this.move(),this.element.trigger("showCalendar.daterangepicker",this)},hideCalendars:function(){this.container.removeClass("show-calendar"),this.element.trigger("hideCalendar.daterangepicker",this)},hoverRange:function(t){if(!this.container.find("input[name=daterangepicker_start]").is(":focus")&&!this.container.find("input[name=daterangepicker_end]").is(":focus")){var e=t.target.getAttribute("data-range-key");if(e==this.locale.customRangeLabel)this.updateView();else{var i=this.ranges[e];this.container.find("input[name=daterangepicker_start]").val(i[0].format(this.locale.format)),this.container.find("input[name=daterangepicker_end]").val(i[1].format(this.locale.format))}}},clickRange:function(t){var e=t.target.getAttribute("data-range-key");if(this.chosenLabel=e,e==this.locale.customRangeLabel)this.showCalendars();else{var i=this.ranges[e];this.startDate=i[0],this.endDate=i[1],this.timePicker||(this.startDate.startOf("day"),this.endDate.endOf("day")),this.alwaysShowCalendars||this.hideCalendars(),this.clickApply()}},clickPrev:function(t){var i=e(t.target).parents(".calendar");i.hasClass("left")?(this.leftCalendar.month.subtract(1,"month"),this.linkedCalendars&&this.rightCalendar.month.subtract(1,"month")):this.rightCalendar.month.subtract(1,"month"),this.updateCalendars()},clickNext:function(t){var i=e(t.target).parents(".calendar");i.hasClass("left")?this.leftCalendar.month.add(1,"month"):(this.rightCalendar.month.add(1,"month"),this.linkedCalendars&&this.leftCalendar.month.add(1,"month")),this.updateCalendars()},hoverDate:function(t){if(e(t.target).hasClass("available")){var i=e(t.target).attr("data-title"),s=i.substr(1,1),a=i.substr(3,1),n=e(t.target).parents(".calendar"),r=n.hasClass("left")?this.leftCalendar.calendar[s][a]:this.rightCalendar.calendar[s][a];this.endDate&&!this.container.find("input[name=daterangepicker_start]").is(":focus")?this.container.find("input[name=daterangepicker_start]").val(r.format(this.locale.format)):this.endDate||this.container.find("input[name=daterangepicker_end]").is(":focus")||this.container.find("input[name=daterangepicker_end]").val(r.format(this.locale.format));var o=this.leftCalendar,l=this.rightCalendar,h=this.startDate;this.endDate||this.container.find(".calendar td").each(function(t,i){if(!e(i).hasClass("week")){var s=e(i).attr("data-title"),a=s.substr(1,1),n=s.substr(3,1),d=e(i).parents(".calendar"),c=d.hasClass("left")?o.calendar[a][n]:l.calendar[a][n];c.isAfter(h)&&c.isBefore(r)||c.isSame(r,"day")?e(i).addClass("in-range"):e(i).removeClass("in-range")}})}},clickDate:function(t){if(e(t.target).hasClass("available")){var i=e(t.target).attr("data-title"),s=i.substr(1,1),a=i.substr(3,1),n=e(t.target).parents(".calendar"),r=n.hasClass("left")?this.leftCalendar.calendar[s][a]:this.rightCalendar.calendar[s][a];if(this.endDate||r.isBefore(this.startDate,"day")){if(this.timePicker){var o=parseInt(this.container.find(".left .hourselect").val(),10);if(!this.timePicker24Hour){var l=this.container.find(".left .ampmselect").val();"PM"===l&&o<12&&(o+=12),"AM"===l&&12===o&&(o=0)}var h=parseInt(this.container.find(".left .minuteselect").val(),10),d=this.timePickerSeconds?parseInt(this.container.find(".left .secondselect").val(),10):0;r=r.clone().hour(o).minute(h).second(d)}this.endDate=null,this.setStartDate(r.clone())}else if(!this.endDate&&r.isBefore(this.startDate))this.setEndDate(this.startDate.clone());else{if(this.timePicker){var o=parseInt(this.container.find(".right .hourselect").val(),10);if(!this.timePicker24Hour){var l=this.container.find(".right .ampmselect").val();"PM"===l&&o<12&&(o+=12),"AM"===l&&12===o&&(o=0)}var h=parseInt(this.container.find(".right .minuteselect").val(),10),d=this.timePickerSeconds?parseInt(this.container.find(".right .secondselect").val(),10):0;r=r.clone().hour(o).minute(h).second(d)}this.setEndDate(r.clone()),this.autoApply&&(this.calculateChosenLabel(),this.clickApply())}this.singleDatePicker&&(this.setEndDate(this.startDate),this.timePicker||this.clickApply()),this.updateView(),t.stopPropagation()}},calculateChosenLabel:function(){var t=!0,e=0;for(var i in this.ranges){if(this.timePicker){if(this.startDate.isSame(this.ranges[i][0])&&this.endDate.isSame(this.ranges[i][1])){t=!1,this.chosenLabel=this.container.find(".ranges li:eq("+e+")").addClass("active").html();break}}else if(this.startDate.format("YYYY-MM-DD")==this.ranges[i][0].format("YYYY-MM-DD")&&this.endDate.format("YYYY-MM-DD")==this.ranges[i][1].format("YYYY-MM-DD")){t=!1,this.chosenLabel=this.container.find(".ranges li:eq("+e+")").addClass("active").html();break}e++}t&&this.showCustomRangeLabel&&(this.chosenLabel=this.container.find(".ranges li:last").addClass("active").html(),this.showCalendars())},clickApply:function(t){this.hide(),this.element.trigger("apply.daterangepicker",this)},clickCancel:function(t){this.startDate=this.oldStartDate,this.endDate=this.oldEndDate,this.hide(),this.element.trigger("cancel.daterangepicker",this)},monthOrYearChanged:function(t){var i=e(t.target).closest(".calendar").hasClass("left"),s=i?"left":"right",a=this.container.find(".calendar."+s),n=parseInt(a.find(".monthselect").val(),10),r=a.find(".yearselect").val();i||(r<this.startDate.year()||r==this.startDate.year()&&n<this.startDate.month())&&(n=this.startDate.month(),r=this.startDate.year()),this.minDate&&(r<this.minDate.year()||r==this.minDate.year()&&n<this.minDate.month())&&(n=this.minDate.month(),r=this.minDate.year()),this.maxDate&&(r>this.maxDate.year()||r==this.maxDate.year()&&n>this.maxDate.month())&&(n=this.maxDate.month(),r=this.maxDate.year()),i?(this.leftCalendar.month.month(n).year(r),this.linkedCalendars&&(this.rightCalendar.month=this.leftCalendar.month.clone().add(1,"month"))):(this.rightCalendar.month.month(n).year(r),this.linkedCalendars&&(this.leftCalendar.month=this.rightCalendar.month.clone().subtract(1,"month"))),this.updateCalendars()},timeChanged:function(t){var i=e(t.target).closest(".calendar"),s=i.hasClass("left"),a=parseInt(i.find(".hourselect").val(),10),n=parseInt(i.find(".minuteselect").val(),10),r=this.timePickerSeconds?parseInt(i.find(".secondselect").val(),10):0;if(!this.timePicker24Hour){var o=i.find(".ampmselect").val();"PM"===o&&a<12&&(a+=12),"AM"===o&&12===a&&(a=0)}if(s){var l=this.startDate.clone();l.hour(a),l.minute(n),l.second(r),this.setStartDate(l),this.singleDatePicker?this.endDate=this.startDate.clone():this.endDate&&this.endDate.format("YYYY-MM-DD")==l.format("YYYY-MM-DD")&&this.endDate.isBefore(l)&&this.setEndDate(l.clone())}else if(this.endDate){var h=this.endDate.clone();h.hour(a),h.minute(n),h.second(r),this.setEndDate(h)}this.updateCalendars(),this.updateFormInputs(),this.renderTimePicker("left"),this.renderTimePicker("right")},formInputsChanged:function(i){var s=e(i.target).closest(".calendar").hasClass("right"),a=t(this.container.find('input[name="daterangepicker_start"]').val(),this.locale.format),n=t(this.container.find('input[name="daterangepicker_end"]').val(),this.locale.format);a.isValid()&&n.isValid()&&(s&&n.isBefore(a)&&(a=n.clone()),this.setStartDate(a),this.setEndDate(n),s?this.container.find('input[name="daterangepicker_start"]').val(this.startDate.format(this.locale.format)):this.container.find('input[name="daterangepicker_end"]').val(this.endDate.format(this.locale.format))),this.updateView()},formInputsFocused:function(t){this.container.find('input[name="daterangepicker_start"], input[name="daterangepicker_end"]').removeClass("active"),e(t.target).addClass("active");var i=e(t.target).closest(".calendar").hasClass("right");i&&(this.endDate=null,this.setStartDate(this.startDate.clone()),this.updateView())},formInputsBlurred:function(e){if(!this.endDate){var i=this.container.find('input[name="daterangepicker_end"]').val(),s=t(i,this.locale.format);s.isValid()&&(this.setEndDate(s),this.updateView())}},elementChanged:function(){if(this.element.is("input")&&this.element.val().length&&!(this.element.val().length<this.locale.format.length)){var e=this.element.val().split(this.locale.separator),i=null,s=null;2===e.length&&(i=t(e[0],this.locale.format),s=t(e[1],this.locale.format)),(this.singleDatePicker||null===i||null===s)&&(i=t(this.element.val(),this.locale.format),s=i),i.isValid()&&s.isValid()&&(this.setStartDate(i),this.setEndDate(s),this.updateView())}},keydown:function(t){9!==t.keyCode&&13!==t.keyCode||this.hide()},updateElement:function(){this.element.is("input")&&!this.singleDatePicker&&this.autoUpdateInput?(this.element.val(this.startDate.format(this.locale.format)+this.locale.separator+this.endDate.format(this.locale.format)),this.element.trigger("change")):this.element.is("input")&&this.autoUpdateInput&&(this.element.val(this.startDate.format(this.locale.format)),this.element.trigger("change"))},remove:function(){this.container.remove(),this.element.off(".daterangepicker"),this.element.removeData()}},e.fn.daterangepicker=function(t,s){return this.each(function(){var a=e(this);a.data("daterangepicker")&&a.data("daterangepicker").remove(),a.data("daterangepicker",new i(a,t,s))}),this},i});