0&&i[p-1]==0;p--);for(;d>0&&t[d-1]==0;d--);h=g.length-1;for(o=0;o31)throw new Error("Too many bits.");var t=0,n=0,r=Math.floor(e/8),i=(1</?`~ \\'\"+-",s=Lt(1,1,1),o=new Array(0),u=o,a=o,f=o,l=o,c=o,h=o,p=o,d=o,v=o,m=o,g=o,y=o,b=o,w=o,E=o,S=o,x=o,T=o,N=o,C=o,k=o,L=o,A=o,O=o,M=o,_=o,D=o,P=o,H=o,B=o,j=o,F=o,I=o,q=o,R=o,U=o,z=o,W=o,X=o,V=o,$=o,J=o,K=o,Q=o,on=function(){var e=0,t={};for(;e<256;++e)t[e]=String.fromCharCode(e);return t}(),fn=function(){if(typeof e!="undefined"&&typeof e.randomBytes=="function")return function(t){try{var n=e.randomBytes(t)}catch(r){throw r}return Array.prototype.slice.call(n,0)};if(typeof e!="undefined"&&typeof e.getRandomValues=="function")return function(t){var n=new Uint8Array(t);return e.getRandomValues(n),Array.prototype.slice.call(n,0)};console.log("Keys should not be generated without CSPRNG.");return}();return{str2bigInt:At,bigInt2str:Dt,int2bigInt:Lt,multMod:ht,powMod:at,inverseMod:ct,randBigInt:dt,randBigInt_:vt,equals:Mt,equalsInt:Ot,sub:ft,mod:st,modInt:kt,mult:ut,divInt_:Ut,rightShift_:Ft,dup:Pt,greater:Tt,add:lt,isZero:_t,bitSize:et,millerRabin:Z,divide_:Nt,trim:Zt,primes:P,findPrimes:G,getSeed:ln,divMod:nn,subMod:rn,twoToThe:sn,bigInt2bits:un,ba2bigInt:an}}),function(){"use strict";function e(){}function n(e,t){var n=e.length;while(n--)if(e[n].listener===t)return n;return-1}function r(e){return function(){return this[e].apply(this,arguments)}}var t=e.prototype;t.getListeners=function(t){var n=this._getEvents(),r,i;if(typeof t=="object"){r={};for(i in n)n.hasOwnProperty(i)&&t.test(i)&&(r[i]=n[i])}else r=n[t]||(n[t]=[]);return r},t.flattenListeners=function(t){var n=[],r;for(r=0;r0;t--)n=e.length?e.substr(-2,2):"0",e=e.substr(0,e.length-2),r=a(parseInt(n,16))+r;return r},t.packINT=function(e){return t.packBytes(e,i.INT)},t.packCtr=function(e){return t.padCtr(t.packBytes(e,i.CTR))},t.padCtr=function(e){return e+"\0\0\0\0\0\0\0\0"},t.unpackCtr=function(e){return e=t.toByteArray(e.substring(0,8)),t.unpack(e)},t.unpack=function(e){var t=0,n=0,r=e.length;for(;n65535)return["Too many fragments"];if(l==1)return[null,e];var c,h,p,d,v,m=[];for(c=1;c<=l;c++)h=(c-1)*r,p=c*r,d=e.slice(h,p),v=s,i&&(v+=f),v+=","+c+",",v+=l+",",v+=d+",",m.push(v);return[null,m]},t.splitype=function l(e,n){var r=[];return e.forEach(function(e){var s;switch(e){case"PUBKEY":s=l(["SHORT","MPI","MPI","MPI","MPI"],n).join("");break;case"DATA":case"MPI":s=n.substring(0,t.readLen(n)+4);break;default:s=n.substring(0,i[e])}r.push(s),n=n.substring(s.length)}),r};var f=function(){var e=0,t={};for(;e<256;++e)t[String.fromCharCode(e)]=e;for(e=128;e<256;++e)t[String.fromCharCode(63232+e)]=e;return t}();t.toByteArray=function(e){var t=[],n=e.split(""),r=-1,i=n.length,s=i%8;while(s--)++r,t[r]=f[n[r]];s=i>>3;while(s--)t.push(f[n[++r]],f[n[++r]],f[n[++r]],f[n[++r]],f[n[++r]],f[n[++r]],f[n[++r]],f[n[++r]]);return t}}.call(this),function(){"use strict";function c(){var e=(new Date).getTime();return function(t){if(!l||typeof console=="undefined")return;var n=(new Date).getTime();console.log(t+": "+(n-e)),e=n}}function h(e,t){var r=n.randBigInt(n.bitSize(t));return s.between(r,e,t)?r:h(e,t)}function d(e,t){var r,i=3e4,s=n.bitSize(e),o=n.primes;o.length===0&&(o=n.findPrimes(i)),p.length!=e.length&&(p=n.dup(e));for(r=0;r-1){s=t+1,o=e.length;for(u=1,a=0;s=1&&(p=p.substring(0,d).split(""),t[l]==="v"&&p.forEach(function(e){Object.hasOwnProperty.call(h,e)&&o.push(h[e])})),{cls:"query",ver:o}}if(c===":"){l+=1;var v=t.substring(l,l+4);if(v.length<4)return{msg:t};v=n.enc.Base64.parse(v).toString(n.enc.Latin1);var m=v.substring(0,2),g=v.substring(2);if(!e["ALLOW_V"+i.unpackSHORT(m)])return{msg:t};l+=4;var y=t.substring(l).indexOf(".");if(!~y)return{msg:t};t=n.enc.Base64.parse(t.substring(l,l+y)),t=n.enc.Latin1.stringify(t);var b;m===r.OTR_VERSION_3&&(b=t.substring(0,8),t=t.substring(8));var w;return~["","\n","",""].indexOf(g)?w="ake":g===""&&(w="data"),{version:m,type:g,msg:t,cls:w,instance_tags:b}}return t.substring(l,l+7)===" Error:"?(e.ERROR_START_AKE&&e.sendQueryMsg(),{msg:t.substring(l+7),cls:"error"}):{msg:t}},t.initFragment=function(e){e.fragment={s:"",j:0,k:0}},t.msgFragment=function(e,t,n){t=t.split(",");if(n){var r=t.shift().split("|"),s=i.packINT(parseInt(r[0],16)),o=i.packINT(parseInt(r[1],16));if(e.checkInstanceTags(s+o))return}if(t.length<4||isNaN(parseInt(t[0],10))||isNaN(parseInt(t[1],10)))return;var u=parseInt(t[0],10),a=parseInt(t[1],10);t=t[2];if(a=d)return this.error("Should have rekeyed by now.");r.send_counter+=1;var i=u.packCtr(r.send_counter),s=this.ake.otr_version+"",a=this.ake.otr_version===o.OTR_VERSION_3;a&&(s+=this.our_instance_tag,s+=this.their_instance_tag),s+="\0",s+=u.packINT(this.our_keyid-1),s+=u.packINT(this.their_keyid),s+=u.packMPI(this.our_dh.publicKey),s+=i.substring(0,8);if(Math.ceil(e.length/8)>=v)return this.error("Message is too long.");var f=u.encryptAes(t.enc.Latin1.parse(e),r.sendenc,i);return s+=u.packData(f),s+=u.make1Mac(s,r.sendmac),s+=u.packData(this.oldMacKeys.splice(0).join("")),s=u.wrapMsg(s,this.fragment_size,a,this.our_instance_tag,this.their_instance_tag),s[0]?this.error(s[0]):(n&&this.trigger("file",["send",r.extra_symkey,n]),s[1])},m.prototype.handleDataMsg=function(e){var n=e.version+e.type;this.ake.otr_version===o.OTR_VERSION_3&&(n+=e.instance_tags);var r=["BYTE","INT","INT","MPI","CTR","DATA","MAC","DATA"];e=u.splitype(r,e.msg);var i=e[0]==="";if(this.msgstate!==o.MSGSTATE_ENCRYPTED||e.length!==8){i||this.error("Received an unreadable encrypted message.",!0);return}var s=this.our_keyid-u.readLen(e[2]),a=this.their_keyid-u.readLen(e[1]);if(s<0||s>1){i||this.error("Not of our latest keys.",!0);return}if(a<0||a>1){i||this.error("Not of your latest keys.",!0);return}var f=a?this.their_old_y:this.their_y;if(a===1&&!f){i||this.error("Do not have that key.");return}var l=this.sessKeys[s][a],c=u.unpackCtr(e[4]);if(c<=l.rcv_counter){i||this.error("Counter in message is not larger.");return}l.rcv_counter=c,n+=e.slice(0,6).join("");var h=u.make1Mac(n,l.rcvmac);if(!u.compare(e[6],h)){i||this.error("MACs do not match.");return}l.rcvmacused=!0;var p=u.decryptAes(e[5].substring(4),l.rcvenc,u.padCtr(e[4]));p=p.toString(t.enc.Latin1),s||this.rotateOurKeys(),a||this.rotateTheirKeys(u.readMPI(e[3]));var d=p.indexOf("\0");return~d&&(this.handleTLVs(p.substring(d+1),l),p=p.substring(0,d)),p=t.enc.Latin1.parse(p),p.toString(t.enc.Utf8)},m.prototype.handleTLVs=function(e,n){var r,i,s;for(;e.length;){r=u.unpackSHORT(e.substr(0,2)),i=u.unpackSHORT(e.substr(2,2)),s=e.substr(4,i);if(s.length0&&this.doAKE(e)}e.msg&&this.trigger("ui",[e.msg,!!e.encrypted])},m.prototype.checkInstanceTags=function(e){var t=u.readLen(e.substr(0,4)),n=u.readLen(e.substr(4,4));if(n&&n!==u.readLen(this.our_instance_tag))return!0;if(u.readLen(this.their_instance_tag)){if(u.readLen(this.their_instance_tag)!==t)return!0}else{if(t<100)return!0;this.their_instance_tag=u.packINT(t)}},m.prototype.doAKE=function(e){this.ALLOW_V3&&~e.ver.indexOf(o.OTR_VERSION_3)?this.ake.initiateAKE(o.OTR_VERSION_3):this.ALLOW_V2&&~e.ver.indexOf(o.OTR_VERSION_2)?this.ake.initiateAKE(o.OTR_VERSION_2):this.error("OTR conversation requested, but no compatible protocol version found.")},m.prototype.error=function(e,t){if(t){this.debug||(e="An OTR error has occurred."),e="?OTR Error:"+e,this.io(e);return}this.trigger("error",[e])},m.prototype.sendStored=function(){var e=this;this.storedMgs.splice(0).forEach(function(t){var n=e.prepareMsg(t.msg);e.io(n,t.meta)})},m.prototype.sendFile=function(e){if(this.msgstate!==o.MSGSTATE_ENCRYPTED)return this.error("Not ready to encrypt.");if(this.ake.otr_version!==o.OTR_VERSION_3)return this.error("Protocol v3 required.");if(!e)return this.error("Please specify a filename.");var n=t.enc.Utf8.parse(e);n=n.toString(t.enc.Latin1);if(n.length>=65532)return this.error("filename is too long.");var r="\0";r+="\0\b",r+=u.packSHORT(4+n.length),r+="\0\0\0",r+=n,r=this.prepareMsg(r,e),this.io(r)},m.prototype.endOtr=function(){this.msgstate===o.MSGSTATE_ENCRYPTED&&(this.sendMsg("\0\0\0\0"),this.sm&&(this.smw&&this.sm.worker.terminate(),this.sm=null)),this.msgstate=o.MSGSTATE_PLAINTEXT,this.receivedPlaintext=!1,this.trigger("status",[o.STATUS_END_OTR])},m.makeInstanceTag=function(){var e=n.randBigInt(32);return n.greater(n.str2bigInt("100",16),e)?m.makeInstanceTag():u.packINT(parseInt(n.bigInt2str(e,10),10))}}.call(this),{OTR:this.OTR,DSA:this.DSA}}),function(e,t){typeof exports=="object"&&typeof module!="undefined"?module.exports=t():typeof define=="function"&&define.amd?define("moment",t):e.moment=t()}(this,function(){"use strict";function t(){return e.apply(null,arguments)}function n(t){e=t}function r(e){return Object.prototype.toString.call(e)==="[object Array]"}function i(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function s(e,t){var n=[],r;for(r=0;r0)for(n in p)r=p[n],i=t[r],typeof i!="undefined"&&(e[r]=i);return e}function m(e){d(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),v===!1&&(v=!0,t.updateOffset(this),v=!1)}function g(e){return e instanceof m||e!=null&&e._isAMomentObject!=null}function y(e){return e<0?Math.ceil(e):Math.floor(e)}function b(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=y(t)),n}function w(e,t,n){var r=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),s=0,o;for(o=0;o0){i=C(s.slice(0,n).join("-"));if(i)return i;if(r&&r.length>=n&&w(s,r,!0)>=n-1)break;n--}t++}return null}function C(e){var t=null;if(!S[e]&&typeof module!="undefined"&&module&&module.exports)try{t=x._abbr,require("./locale/"+e),k(t)}catch(n){}return S[e]}function k(e,t){var n;return e&&(typeof t=="undefined"?n=A(e):n=L(e,t),n&&(x=n)),x._abbr}function L(e,t){return t!==null?(t.abbr=e,S[e]=S[e]||new E,S[e].set(t),k(e),S[e]):(delete S[e],null)}function A(e){var t;e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr);if(!e)return x;if(!r(e)){t=C(e);if(t)return t;e=[e]}return N(e)}function M(e,t){var n=e.toLowerCase();O[n]=O[n+"s"]=O[t]=e}function _(e){return typeof e=="string"?O[e]||O[e.toLowerCase()]:undefined}function D(e){var t={},n,r;for(r in e)o(e,r)&&(n=_(r),n&&(t[n]=e[r]));return t}function P(e,n){return function(r){return r!=null?(B(this,e,r),t.updateOffset(this,n),this):H(this,e)}}function H(e,t){return e._d["get"+(e._isUTC?"UTC":"")+t]()}function B(e,t,n){return e._d["set"+(e._isUTC?"UTC":"")+t](n)}function j(e,t){var n;if(typeof e=="object")for(n in e)this.set(n,e[n]);else{e=_(e);if(typeof this[e]=="function")return this[e](t)}return this}function F(e,t,n){var r=""+Math.abs(e),i=t-r.length,s=e>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}function z(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(U[e]=i),t&&(U[t[0]]=function(){return F(i.apply(this,arguments),t[1],t[2])}),n&&(U[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function W(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function X(e){var t=e.match(I),n,r;for(n=0,r=t.length;n=0&&q.test(e))e=e.replace(q,r),q.lastIndex=0,n-=1;return e}function ft(e){return typeof e=="function"&&Object.prototype.toString.call(e)==="[object Function]"}function lt(e,t,n){at[e]=ft(t)?t:function(e){return e&&n?n:t}}function ct(e,t){return o(at,e)?at[e](t._strict,t._locale):new RegExp(ht(e))}function ht(e){return e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,i){return t||n||r||i}).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function dt(e,t){var n,r=t;typeof e=="string"&&(e=[e]),typeof t=="number"&&(r=function(e,n){n[t]=b(e)});for(n=0;n11?yt:n[bt]<1||n[bt]>Tt(n[gt],n[yt])?bt:n[wt]<0||n[wt]>24||n[wt]===24&&(n[Et]!==0||n[St]!==0||n[xt]!==0)?wt:n[Et]<0||n[Et]>59?Et:n[St]<0||n[St]>59?St:n[xt]<0||n[xt]>999?xt:-1,l(e)._overflowDayOfYear&&(tbt)&&(t=bt),l(e).overflow=t),e}function Pt(e){t.suppressDeprecationWarnings===!1&&typeof console!="undefined"&&console.warn&&console.warn("Deprecation warning: "+e)}function Ht(e,t){var n=!0;return u(function(){return n&&(Pt(e+"\n"+(new Error).stack),n=!1),t.apply(this,arguments)},t)}function jt(e,t){Bt[e]||(Pt(t),Bt[e]=!0)}function Ut(e){var t,n,r=e._i,i=Ft.exec(r);if(i){l(e).iso=!0;for(t=0,n=It.length;tr&&(i-=7),i0?e:e-1,dayOfYear:a>0?a:Vt(e-1)+a}}function sn(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}function on(e,t,n){return e!=null?e:t!=null?t:n}function un(e){var t=new Date;return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function an(e){var t,n,r=[],i,s;if(e._d)return;i=un(e),e._w&&e._a[bt]==null&&e._a[yt]==null&&fn(e),e._dayOfYear&&(s=on(e._a[gt],i[gt]),e._dayOfYear>Vt(s)&&(l(e)._overflowDayOfYear=!0),n=Xt(s,0,e._dayOfYear),e._a[yt]=n.getUTCMonth(),e._a[bt]=n.getUTCDate());for(t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[wt]===24&&e._a[Et]===0&&e._a[St]===0&&e._a[xt]===0&&(e._nextDay=!0,e._a[wt]=0),e._d=(e._useUTC?Xt:Wt).apply(null,r),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[wt]=24)}function fn(e){var t,n,r,i,s,o,u;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(s=1,o=4,n=on(t.GG,e._a[gt],Qt(yn(),1,4).year),r=on(t.W,1),i=on(t.E,1)):(s=e._locale._week.dow,o=e._locale._week.doy,n=on(t.gg,e._a[gt],Qt(yn(),s,o).year),r=on(t.w,1),t.d!=null?(i=t.d,i0&&l(e).unusedInput.push(u),n=n.slice(n.indexOf(i)+i.length),f+=i.length),U[o]?(i?l(e).empty=!1:l(e).unusedTokens.push(o),mt(o,i,e)):e._strict&&!i&&l(e).unusedTokens.push(o);l(e).charsLeftOver=a-f,n.length>0&&l(e).unusedInput.push(n),l(e).bigHour===!0&&e._a[wt]<=12&&e._a[wt]>0&&(l(e).bigHour=undefined),e._a[wt]=cn(e._locale,e._a[wt],e._meridiem),an(e),Dt(e)}function cn(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):e.isPM!=null?(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0),t):t}function hn(e){var t,n,r,i,s;if(e._f.length===0){l(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;ithis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Fn(){if(typeof this._isDSTShifted!="undefined")return this._isDSTShifted;var e={};d(e,this),e=vn(e);if(e._a){var t=e._isUTC?a(e._a):yn(e._a);this._isDSTShifted=this.isValid()&&w(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function In(){return!this._isUTC}function qn(){return this._isUTC}function Rn(){return this._isUTC&&this._offset===0}function Wn(e,t){var n=e,r=null,i,s,u;return Nn(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:typeof e=="number"?(n={},t?n[t]=e:n.milliseconds=e):(r=Un.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:b(r[bt])*i,h:b(r[wt])*i,m:b(r[Et])*i,s:b(r[St])*i,ms:b(r[xt])*i}):(r=zn.exec(e))?(i=r[1]==="-"?-1:1,n={y:Xn(r[2],i),M:Xn(r[3],i),d:Xn(r[4],i),h:Xn(r[5],i),m:Xn(r[6],i),s:Xn(r[7],i),w:Xn(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(u=$n(yn(n.from),yn(n.to)),n={},n.ms=u.milliseconds,n.M=u.months),s=new Tn(n),Nn(e)&&o(e,"_locale")&&(s._locale=e._locale),s}function Xn(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Vn(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t- +e.clone().add(n.months,"M"),n}function $n(e,t){var n;return t=An(t,e),e.isBefore(t)?n=Vn(e,t):(n=Vn(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n}function Jn(e,t){return function(n,r){var i,s;return r!==null&&!isNaN(+r)&&(jt(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period)."),s=n,n=r,r=s),n=typeof n=="string"?+n:n,i=Wn(n,r),Kn(this,i,e),this}}function Kn(e,n,r,i){var s=n._milliseconds,o=n._days,u=n._months;i=i==null?!0:i,s&&e._d.setTime(+e._d+s*r),o&&B(e,"Date",H(e,"Date")+o*r),u&&Ot(e,H(e,"Month")+u*r),i&&t.updateOffset(e,o||u)}function Yn(e,t){var n=e||yn(),r=An(n,this).startOf("day"),i=this.diff(r,"days",!0),s=i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse";return this.format(t&&t[s]||this.localeData().calendar(s,this,yn(n)))}function Zn(){return new m(this)}function er(e,t){var n;return t=_(typeof t!="undefined"?t:"millisecond"),t==="millisecond"?(e=g(e)?e:yn(e),+this>+e):(n=g(e)?+e:+yn(e),n<+this.clone().startOf(t))}function tr(e,t){var n;return t=_(typeof t!="undefined"?t:"millisecond"),t==="millisecond"?(e=g(e)?e:yn(e),+this<+e):(n=g(e)?+e:+yn(e),+this.clone().endOf(t)11?n?"pm":"PM":n?"am":"AM"}function ei(e,t){t[xt]=b(("0."+e)*1e3)}function ni(){return this._isUTC?"UTC":""}function ri(){return this._isUTC?"Coordinated Universal Time":""}function oi(e){return yn(e*1e3)}function ui(){return yn.apply(null,arguments).parseZone()}function fi(e,t,n){var r=this._calendar[e];return typeof r=="function"?r.call(t,n):r}function ci(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])}function pi(){return this._invalidDate}function mi(e){return this._ordinal.replace("%d",e)}function gi(e){return e}function bi(e,t,n,r){var i=this._relativeTime[n];return typeof i=="function"?i(e,t,n,r):i.replace(/%d/i,e)}function wi(e,t){var n=this._relativeTime[e>0?"future":"past"];return typeof n=="function"?n(t):n.replace(/%s/i,t)}function Ei(e){var t,n;for(n in e)t=e[n],typeof t=="function"?this[n]=t:this["_"+n]=t;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function xi(e,t,n,r){var i=A(),s=a().set(r,t);return i[n](s,e)}function Ti(e,t,n,r,i){typeof e=="number"&&(t=e,e=undefined),e=e||"";if(t!=null)return xi(e,t,n,i);var s,o=[];for(s=0;s=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Hi(Fi(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=y(e/1e3),r.seconds=i%60,s=y(i/60),r.minutes=s%60,o=y(s/60),r.hours=o%24,t+=y(o/24),a=y(ji(t)),n+=a,t-=Hi(Fi(a)),u=y(n/12),n%=12,r.days=t,r.months=n,r.years=u,this}function ji(e){return e*4800/146097}function Fi(e){return e*146097/4800}function Ii(e){var t,n,r=this._milliseconds;e=_(e);if(e==="month"||e==="year")return t=this._days+r/864e5,n=this._months+ji(t),e==="month"?n:n/12;t=this._days+Math.round(Fi(this._months));switch(e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function qi(){return this._milliseconds+this._days*864e5+this._months%12*2592e6+b(this._months/12)*31536e6}function Ri(e){return function(){return this.as(e)}}function Qi(e){return e=_(e),this[e+"s"]()}function Gi(e){return function(){return this._data[e]}}function ss(){return y(this.days()/7)}function as(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function fs(e,t,n){var r=Wn(e).abs(),i=os(r.as("s")),s=os(r.as("m")),o=os(r.as("h")),u=os(r.as("d")),a=os(r.as("M")),f=os(r.as("y")),l=i0,l[4]=n,as.apply(null,l)}function ls(e,t){return us[e]===undefined?!1:t===undefined?us[e]:(us[e]=t,!0)}function cs(e){var t=this.localeData(),n=fs(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)}function ps(){var e=hs(this._milliseconds)/1e3,t=hs(this._days),n=hs(this._months),r,i,s;r=y(e/60),i=y(r/60),e%=60,r%=60,s=y(n/12),n%=12;var o=s,u=n,a=t,f=i,l=r,c=e,h=this.asSeconds();return h?(h<0?"-":"")+"P"+(o?o+"Y":"")+(u?u+"M":"")+(a?a+"D":"")+(f||l||c?"T":"")+(f?f+"H":"")+(l?l+"M":"")+(c?c+"S":""):"P0D"}var e,p=t.momentProperties=[],v=!1,S={},x,O={},I=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,q=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,R={},U={},J=/\d/,K=/\d\d/,Q=/\d{3}/,G=/\d{4}/,Y=/[+-]?\d{6}/,Z=/\d\d?/,et=/\d{1,3}/,tt=/\d{1,4}/,nt=/[+-]?\d{1,6}/,rt=/\d+/,it=/[+-]?\d+/,st=/Z|[+-]\d\d:?\d\d/gi,ot=/[+-]?\d+(\.\d{1,3})?/,ut=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,at={},pt={},gt=0,yt=1,bt=2,wt=3,Et=4,St=5,xt=6;z("M",["MM",2],"Mo",function(){return this.month()+1}),z("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),z("MMMM",0,0,function(e){return this.localeData().months(this,e)}),M("month","M"),lt("M",Z),lt("MM",Z,K),lt("MMM",ut),lt("MMMM",ut),dt(["M","MM"],function(e,t){t[yt]=b(e)-1}),dt(["MMM","MMMM"],function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);i!=null?t[yt]=i:l(n).invalidMonth=e});var Nt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),kt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Bt={};t.suppressDeprecationWarnings=!1;var Ft=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,It=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],qt=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],Rt=/^\/?Date\((\-?\d+)/i;t.createFromInputFallback=Ht("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":""))}),z(0,["YY",2],0,function(){return this.year()%100}),z(0,["YYYY",4],0,"year"),z(0,["YYYYY",5],0,"year"),z(0,["YYYYYY",6,!0],0,"year"),M("year","y"),lt("Y",it),lt("YY",Z,K),lt("YYYY",tt,G),lt("YYYYY",nt,Y),lt("YYYYYY",nt,Y),dt(["YYYYY","YYYYYY"],gt),dt("YYYY",function(e,n){n[gt]=e.length===2?t.parseTwoDigitYear(e):b(e)}),dt("YY",function(e,n){n[gt]=t.parseTwoDigitYear(e)}),t.parseTwoDigitYear=function(e){return b(e)+(b(e)>68?1900:2e3)};var Jt=P("FullYear",!1);z("w",["ww",2],"wo","week"),z("W",["WW",2],"Wo","isoWeek"),M("week","w"),M("isoWeek","W"),lt("w",Z),lt("ww",Z,K),lt("W",Z),lt("WW",Z,K),vt(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=b(e)});var Yt={dow:0,doy:6};z("DDD",["DDDD",3],"DDDo","dayOfYear"),M("dayOfYear","DDD"),lt("DDD",et),lt("DDDD",Q),dt(["DDD","DDDD"],function(e,t,n){n._dayOfYear=b(e)}),t.ISO_8601=function(){};var bn=Ht("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var e=yn.apply(null,arguments);return ethis?this:e});Cn("Z",":"),Cn("ZZ",""),lt("Z",st),lt("ZZ",st),dt(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Ln(e)});var kn=/([\+\-]|\d\d)/gi;t.updateOffset=function(){};var Un=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,zn=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;Wn.fn=Tn.prototype;var Qn=Jn(1,"add"),Gn=Jn(-1,"subtract");t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var dr=Ht("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===undefined?this.localeData():this.locale(e)});z(0,["gg",2],0,function(){return this.weekYear()%100}),z(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Cr("gggg","weekYear"),Cr("ggggg","weekYear"),Cr("GGGG","isoWeekYear"),Cr("GGGGG","isoWeekYear"),M("weekYear","gg"),M("isoWeekYear","GG"),lt("G",it),lt("g",it),lt("GG",Z,K),lt("gg",Z,K),lt("GGGG",tt,G),lt("gggg",tt,G),lt("GGGGG",nt,Y),lt("ggggg",nt,Y),vt(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=b(e)}),vt(["gg","GG"],function(e,n,r,i){n[i]=t.parseTwoDigitYear(e)}),z("Q",0,0,"quarter"),M("quarter","Q"),lt("Q",J),dt("Q",function(e,t){t[yt]=(b(e)-1)*3}),z("D",["DD",2],"Do","date"),M("date","D"),lt("D",Z),lt("DD",Z,K),lt("Do",function(e,t){return e?t._ordinalParse:t._ordinalParseLenient}),dt(["D","DD"],bt),dt("Do",function(e,t){t[bt]=b(e.match(Z)[0],10)});var Dr=P("Date",!0);z("d",0,"do","day"),z("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),z("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),z("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),z("e",0,0,"weekday"),z("E",0,0,"isoWeekday"),M("day","d"),M("weekday","e"),M("isoWeekday","E"),lt("d",Z),lt("e",Z),lt("E",Z),lt("dd",ut),lt("ddd",ut),lt("dddd",ut),vt(["dd","ddd","dddd"],function(e,t,n){var r=n._locale.weekdaysParse(e);r!=null?t.d=r:l(n).invalidWeekday=e}),vt(["d","e","E"],function(e,t,n,r){t[r]=b(e)});var Hr="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),jr="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ir="Su_Mo_Tu_We_Th_Fr_Sa".split("_");z("H",["HH",2],0,"hour"),z("h",["hh",2],0,function(){return this.hours()%12||12}),Xr("a",!0),Xr("A",!1),M("hour","h"),lt("a",Vr),lt("A",Vr),lt("H",Z),lt("h",Z),lt("HH",Z,K),lt("hh",Z,K),dt(["H","HH"],wt),dt(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),dt(["h","hh"],function(e,t,n){t[wt]=b(e),l(n).bigHour=!0});var Jr=/[ap]\.?m?\.?/i,Qr=P("Hours",!0);z("m",["mm",2],0,"minute"),M("minute","m"),lt("m",Z),lt("mm",Z,K),dt(["m","mm"],Et);var Gr=P("Minutes",!1);z("s",["ss",2],0,"second"),M("second","s"),lt("s",Z),lt("ss",Z,K),dt(["s","ss"],St);var Yr=P("Seconds",!1);z("S",0,0,function(){return~~(this.millisecond()/100)}),z(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),z(0,["SSS",3],0,"millisecond"),z(0,["SSSS",4],0,function(){return this.millisecond()*10}),z(0,["SSSSS",5],0,function(){return this.millisecond()*100}),z(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),z(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),z(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),z(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),M("millisecond","ms"),lt("S",et,J),lt("SS",et,K),lt("SSS",et,Q);var Zr;for(Zr="SSSS";Zr.length<=9;Zr+="S")lt(Zr,rt);for(Zr="S";Zr.length<=9;Zr+="S")dt(Zr,ei);var ti=P("Milliseconds",!1);z("z",0,0,"zoneAbbr"),z("zz",0,0,"zoneName");var ii=m.prototype;ii.add=Qn,ii.calendar=Yn,ii.clone=Zn,ii.diff=ir,ii.endOf=gr,ii.format=ar,ii.from=fr,ii.fromNow=lr,ii.to=cr,ii.toNow=hr,ii.get=j,ii.invalidAt=Nr,ii.isAfter=er,ii.isBefore=tr,ii.isBetween=nr,ii.isSame=rr,ii.isValid=xr,ii.lang=dr,ii.locale=pr,ii.localeData=vr,ii.max=wn,ii.min=bn,ii.parsingFlags=Tr,ii.set=j,ii.startOf=mr,ii.subtract=Gn,ii.toArray=Er,ii.toObject=Sr,ii.toDate=wr,ii.toISOString=ur,ii.toJSON=ur,ii.toString=or,ii.unix=br,ii.valueOf=yr,ii.year=Jt,ii.isLeapYear=Kt,ii.weekYear=Lr,ii.isoWeekYear=Ar,ii.quarter=ii.quarters=_r,ii.month=Mt,ii.daysInMonth=_t,ii.week=ii.weeks=tn,ii.isoWeek=ii.isoWeeks=nn,ii.weeksInYear=Mr,ii.isoWeeksInYear=Or,ii.date=Dr,ii.day=ii.days=Ur,ii.weekday=zr,ii.isoWeekday=Wr,ii.dayOfYear=sn,ii.hour=ii.hours=Qr,ii.minute=ii.minutes=Gr,ii.second=ii.seconds=Yr,ii.millisecond=ii.milliseconds=ti,ii.utcOffset=Mn,ii.utc=Dn,ii.local=Pn,ii.parseZone=Hn,ii.hasAlignedHourOffset=Bn,ii.isDST=jn,ii.isDSTShifted=Fn,ii.isLocal=In,ii.isUtcOffset=qn,ii.isUtc=Rn,ii.isUTC=Rn,ii.zoneAbbr=ni,ii.zoneName=ri,ii.dates=Ht("dates accessor is deprecated. Use date instead.",Dr),ii.months=Ht("months accessor is deprecated. Use month instead",Mt),ii.years=Ht("years accessor is deprecated. Use year instead",Jt),ii.zone=Ht("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",_n);var si=ii,ai={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},li={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"},hi="Invalid date",di="%d",vi=/\d{1,2}/,yi={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"},Si=E.prototype;Si._calendar=ai,Si.calendar=fi,Si._longDateFormat=li,Si.longDateFormat=ci,Si._invalidDate=hi,Si.invalidDate=pi,Si._ordinal=di,Si.ordinal=mi,Si._ordinalParse=vi,Si.preparse=gi,Si.postformat=gi,Si._relativeTime=yi,Si.relativeTime=bi,Si.pastFuture=wi,Si.set=Ei,Si.months=Ct,Si._months=Nt,Si.monthsShort=Lt,Si._monthsShort=kt,Si.monthsParse=At,Si.week=Gt,Si._week=Yt,Si.firstDayOfYear=en,Si.firstDayOfWeek=Zt,Si.weekdays=Br,Si._weekdays=Hr,Si.weekdaysMin=qr,Si._weekdaysMin=Ir,Si.weekdaysShort=Fr,Si._weekdaysShort=jr,Si.weekdaysParse=Rr,Si.isPM=$r,Si._meridiemParse=Jr,Si.meridiem=Kr,k("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=b(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}}),t.lang=Ht("moment.lang is deprecated. Use moment.locale instead.",k),t.langData=Ht("moment.langData is deprecated. Use moment.localeData instead.",A);var Oi=Math.abs,Ui=Ri("ms"),zi=Ri("s"),Wi=Ri("m"),Xi=Ri("h"),Vi=Ri("d"),$i=Ri("w"),Ji=Ri("M"),Ki=Ri("y"),Yi=Gi("milliseconds"),Zi=Gi("seconds"),es=Gi("minutes"),ts=Gi("hours"),ns=Gi("days"),rs=Gi("months"),is=Gi("years"),os=Math.round,us={s:45,m:45,h:22,d:26,M:11},hs=Math.abs,ds=Tn.prototype;ds.abs=Mi,ds.add=Di,ds.subtract=Pi,ds.as=Ii,ds.asMilliseconds=Ui,ds.asSeconds=zi,ds.asMinutes=Wi,ds.asHours=Xi,ds.asDays=Vi,ds.asWeeks=$i,ds.asMonths=Ji,ds.asYears=Ki,ds.valueOf=qi,ds._bubble=Bi,ds.get=Qi,ds.milliseconds=Yi,ds.seconds=Zi,ds.minutes=es,ds.hours=ts,ds.days=ns,ds.weeks=ss,ds.months=rs,ds.years=is,ds.humanize=cs,ds.toISOString=ps,ds.toString=ps,ds.toJSON=ps,ds.locale=pr,ds.localeData=vr,ds.toIsoString=Ht("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ps),ds.lang=dr,z("X",0,0,"unix"),z("x",0,0,"valueOf"),lt("x",it),lt("X",ot),dt("X",function(e,t,n){n._d=new Date(parseFloat(e,10)*1e3)}),dt("x",function(e,t,n){n._d=new Date(b(e))}),t.version="2.10.6",n(yn),t.fn=si,t.min=Sn,t.max=xn,t.utc=a,t.unix=oi,t.months=Ni,t.isDate=i,t.locale=k,t.invalid=h,t.duration=Wn,t.isMoment=g,t.weekdays=ki,t.parseZone=ui,t.localeData=A,t.isDuration=Nn,t.monthsShort=Ci,t.weekdaysMin=Ai,t.defineLocale=L,t.weekdaysShort=Li,t.normalizeUnits=_,t.relativeTimeThreshold=ls;var vs=t;return vs}),function(e,t){typeof exports=="object"&&typeof module!="undefined"?t(require("../moment")):typeof define=="function"&&define.amd?define("moment_af",["moment"],t):t(e.moment)}(this,function(e){"use strict";var t=e.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,t,n){return e<12?n?"vm":"VM":n?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[Môre om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},ordinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(e===1||e===8||e>=20?"ste":"de")},week:{dow:1,doy:4}});return t}),function(e,t){typeof exports=="object"&&typeof module!="undefined"?t(require("../moment")):typeof define=="function"&&define.amd?define("moment_de",["moment"],t):t(e.moment)}(this,function(e){"use strict";function t(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}var n=e.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[Heute um] LT [Uhr]",sameElse:"L",nextDay:"[Morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[Gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,M:t,MM:t,y:t,yy:t},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return n}),function(e,t){typeof exports=="object"&&typeof module!="undefined"?t(require("../moment")):typeof define=="function"&&define.amd?define("moment_es",["moment"],t):t(e.moment)}(this,function(e){"use strict";var t="Ene._Feb._Mar._Abr._May._Jun._Jul._Ago._Sep._Oct._Nov._Dic.".split("_"),n="Ene_Feb_Mar_Abr_May_Jun_Jul_Ago_Sep_Oct_Nov_Dic".split("_"),r=e.defineLocale("es",{months:"Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre".split("_"),monthsShort:function(e,r){return/-MMM-/.test(r)?n[e.month()]:t[e.month()]},weekdays:"Domingo_Lunes_Martes_Miércoles_Jueves_Viernes_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mié._Jue._Vie._Sáb.".split("_"),weekdaysMin:"Do_Lu_Ma_Mi_Ju_Vi_Sá".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(this.hours()!==1?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(this.hours()!==1?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(this.hours()!==1?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(this.hours()!==1?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(this.hours()!==1?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return r}),function(e,t){typeof exports=="object"&&typeof module!="undefined"?t(require("../moment")):typeof define=="function"&&define.amd?define("moment_fr",["moment"],t):t(e.moment)}(this,function(e){"use strict";var t=e.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinalParse:/\d{1,2}(er|)/,ordinal:function(e){return e+(e===1?"er":"")},week:{dow:1,doy:4}});return t}),function(e,t){typeof exports=="object"&&typeof module!="undefined"?t(require("../moment")):typeof define=="function"&&define.amd?define("moment_he",["moment"],t):t(e.moment)}(this,function(e){"use strict";var t=e.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(e){return e===2?"שעתיים":e+" שעות"},d:"יום",dd:function(e){return e===2?"יומיים":e+" ימים"},M:"חודש",MM:function(e){return e===2?"חודשיים":e+" חודשים"},y:"שנה",yy:function(e){return e===2?"שנתיים":e%10===0&&e!==10?e+" שנה":e+" שנים"}}});return t}),function(e,t){typeof exports=="object"&&typeof module!="undefined"?t(require("../moment")):typeof define=="function"&&define.amd?define("moment_hu",["moment"],t):t(e.moment)}(this,function(e){"use strict";function n(e,t,n,r){var i=e,s;switch(n){case"s":return r||t?"néhány másodperc":"néhány másodperce";case"m":return"egy"+(r||t?" perc":" perce");case"mm":return i+(r||t?" perc":" perce");case"h":return"egy"+(r||t?" óra":" órája");case"hh":return i+(r||t?" óra":" órája");case"d":return"egy"+(r||t?" nap":" napja");case"dd":return i+(r||t?" nap":" napja");case"M":return"egy"+(r||t?" hónap":" hónapja");case"MM":return i+(r||t?" hónap":" hónapja");case"y":return"egy"+(r||t?" év":" éve");case"yy":return i+(r||t?" év":" éve")}return""}function r(e){return(e?"":"[múlt] ")+"["+t[this.day()]+"] LT[-kor]"}var t="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" "),i=e.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(e){return e.charAt(1).toLowerCase()==="u"},meridiem:function(e,t,n){return e<12?n===!0?"de":"DE":n===!0?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return r.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return r.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return i}),function(e,t){typeof exports=="object"&&typeof module!="undefined"?t(require("../moment")):typeof define=="function"&&define.amd?define("moment_id",["moment"],t):t(e.moment)}(this,function(e){"use strict";var t=e.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(e,t){e===12&&(e=0);if(t==="pagi")return e;if(t==="siang")return e>=11?e:e+12;if(t==="sore"||t==="malam")return e+12},meridiem:function(e,t,n){return e<11?"pagi":e<15?"siang":e<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}});return t}),function(e,t){typeof exports=="object"&&typeof module!="undefined"?t(require("../moment")):typeof define=="function"&&define.amd?define("moment_it",["moment"],t):t(e.moment)}(this,function(e){"use strict";var t=e.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"Domenica_Lunedì_Martedì_Mercoledì_Giovedì_Venerdì_Sabato".split("_"),weekdaysShort:"Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),weekdaysMin:"D_L_Ma_Me_G_V_S".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t}),function(e,t){typeof exports=="object"&&typeof module!="undefined"?t(require("../moment")):typeof define=="function"&&define.amd?define("moment_ja",["moment"],t):t(e.moment)}(this,function(e){"use strict";var t=e.defineLocale("ja",{months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"Ah時m分",LTS:"Ah時m分s秒",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah時m分",LLLL:"YYYY年M月D日Ah時m分 dddd"},meridiemParse:/午前|午後/i,isPM:function(e){return e==="午後"},meridiem:function(e,t,n){return e<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:"[来週]dddd LT",lastDay:"[昨日] LT",lastWeek:"[前週]dddd LT",sameElse:"L"},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}});return t}),function(e,t){typeof exports=="object"&&typeof module!="undefined"?t(require("../moment")):typeof define=="function"&&define.amd?define("moment_nb",["moment"],t):t(e.moment)}(this,function(e){"use strict";var t=e.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tirs_ons_tors_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"H.mm",LTS:"H.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H.mm",LLLL:"dddd D. MMMM YYYY [kl.] H.mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"for %s siden",s:"noen sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t}),function(e,t){typeof exports=="object"&&typeof module!="undefined"?t(require("../moment")):typeof define=="function"&&define.amd?define("moment_nl",["moment"],t):t(e.moment)}(this,function(e){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),r=e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,r){return/-MMM-/.test(r)?n[e.month()]:t[e.month()]},weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"Zo_Ma_Di_Wo_Do_Vr_Za".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},ordinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(e===1||e===8||e>=20?"ste":"de")},week:{dow:1,doy:4}});return r}),function(e,t){typeof exports=="object"&&typeof module!="undefined"?t(require("../moment")):typeof define=="function"&&define.amd?define("moment_pl",["moment"],t):t(e.moment)}(this,function(e){"use strict";function r(e){return e%10<5&&e%10>1&&~~(e/10)%10!==1}function i(e,t,n){var i=e+" ";switch(n){case"m":return t?"minuta":"minutę";case"mm":return i+(r(e)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return i+(r(e)?"godziny":"godzin");case"MM":return i+(r(e)?"miesiące":"miesięcy");case"yy":return i+(r(e)?"lata":"lat")}}var t="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),n="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_"),s=e.defineLocale("pl",{months:function(e,r){return r===""?"("+n[e.month()]+"|"+t[e.month()]+")":/D MMMM/.test(r)?n[e.month()]:t[e.month()]},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"nie_pon_wt_śr_czw_pt_sb".split("_"),weekdaysMin:"N_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:"[W] dddd [o] LT",lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:i,mm:i,h:i,hh:i,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:i,y:"rok",yy:i},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return s}),function(e,t){typeof exports=="object"&&typeof module!="undefined"?t(require("../moment")):typeof define=="function"&&define.amd?define("moment_pt-br",["moment"],t):t(e.moment)}(this,function(e){"use strict";var t=e.defineLocale("pt-br",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-Feira_Terça-Feira_Quarta-Feira_Quinta-Feira_Sexta-Feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Dom_2ª_3ª_4ª_5ª_6ª_Sáb".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return this.day()===0||this.day()===6?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atrás",s:"poucos segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinalParse:/\d{1,2}º/,ordinal:"%dº"});return t}),function(e,t){typeof exports=="object"&&typeof module!="undefined"?t(require("../moment")):typeof define=="function"&&define.amd?define("moment_ru",["moment"],t):t(e.moment)}(this,function(e){"use strict";function t(e,t){var n=e.split("_");return t%10===1&&t%100!==11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}function n(e,n,r){var i={mm:n?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"};return r==="m"?n?"минута":"минуту":e+" "+t(i[r],+e)}function r(e,t){var n={nominative:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),accusative:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_")},r=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(t)?"accusative":"nominative";return n[r][e.month()]}function i(e,t){var n={nominative:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),accusative:"янв_фев_мар_апр_мая_июня_июля_авг_сен_окт_ноя_дек".split("_")},r=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(t)?"accusative":"nominative";return n[r][e.month()]}function s(e,t){var n={nominative:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),accusative:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_")},r=/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/.test(t)?"accusative":"nominative";return n[r][e.day()]}var o=e.defineLocale("ru",{months:r,monthsShort:i,weekdays:s,weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[й|я]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сегодня в] LT",nextDay:"[Завтра в] LT",lastDay:"[Вчера в] LT",nextWeek:function(){return this.day()===2?"[Во] dddd [в] LT":"[В] dddd [в] LT"},lastWeek:function(e){if(e.week()===this.week())return this.day()===2?"[Во] dddd [в] LT":"[В] dddd [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:n,mm:n,h:"час",hh:n,d:"день",dd:n,M:"месяц",MM:n,y:"год",yy:n},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(e){return/^(дня|вечера)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночи":e<12?"утра":e<17?"дня":"вечера"},ordinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":return e+"-й";case"D":return e+"-го";case"w":case"W":return e+"-я";default:return e}},week:{dow:1,doy:7}});return o}),function(e,t){typeof exports=="object"&&typeof module!="undefined"?t(require("../moment")):typeof define=="function"&&define.amd?define("moment_uk",["moment"],t):t(e.moment)}(this,function(e){"use strict";function t(e,t){var n=e.split("_");return t%10===1&&t%100!==11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}function n(e,n,r){var i={mm:"хвилина_хвилини_хвилин",hh:"година_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"};return r==="m"?n?"хвилина":"хвилину":r==="h"?n?"година":"годину":e+" "+t(i[r],+e)}function r(e,t){var n={nominative:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_"),accusative:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_")},r=/D[oD]? *MMMM?/.test(t)?"accusative":"nominative";return n[r][e.month()]}function i(e,t){var n={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")},r=/(\[[ВвУу]\]) ?dddd/.test(t)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(t)?"genitive":"nominative";return n[r][e.day()]}function s(e){return function(){return e+"о"+(this.hours()===11?"б":"")+"] LT"}}var o=e.defineLocale("uk",{months:r,monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:i,weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:s("[Сьогодні "),nextDay:s("[Завтра "),lastDay:s("[Вчора "),nextWeek:s("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return s("[Минулої] dddd [").call(this);case 1:case 2:case 4:return s("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",m:n,mm:n,h:"годину",hh:n,d:"день",dd:n,M:"місяць",MM:n,y:"рік",yy:n},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(e){return/^(дня|вечора)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночі":e<12?"ранку":e<17?"дня":"вечора"},ordinalParse:/\d{1,2}-(й|го)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e+"-й";case"D":return e+"-го";default:return e}},week:{dow:1,doy:7}});return o}),function(e,t){typeof exports=="object"&&typeof module!="undefined"?t(require("../moment")):typeof define=="function"&&define.amd?define("moment_zh",["moment"],t):t(e.moment)}(this,function(e){"use strict";var t=e.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"Ah点mm分",LTS:"Ah点m分s秒",L:"YYYY-MM-DD",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日Ah点mm分",LLLL:"YYYY年MMMD日ddddAh点mm分",l:"YYYY-MM-DD",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日Ah点mm分",llll:"YYYY年MMMD日ddddAh点mm分"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return e===12&&(e=0),t==="凌晨"||t==="早上"||t==="上午"?e:t==="下午"||t==="晚上"?e+12:e>=11?e:e+12},meridiem:function(e,t,n){var r=e*100+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:function(){return this.minutes()===0?"[今天]Ah[点整]":"[今天]LT"},nextDay:function(){return this.minutes()===0?"[明天]Ah[点整]":"[明天]LT"},lastDay:function(){return this.minutes()===0?"[昨天]Ah[点整]":"[昨天]LT"},nextWeek:function(){var t,n;return t=e().startOf("week"),n=this.unix()-t.unix()>=604800?"[下]":"[本]",this.minutes()===0?n+"dddAh点整":n+"dddAh点mm"},lastWeek:function(){var t,n;return t=e().startOf("week"),n=this.unix()>5]|=128<<24-r%32,e[(r+64>>9<<4)+15]=r;var o=new Array(80),u=1732584193,a=-271733879,f=-1732584194,l=271733878,c=-1009589776,h,p,d,v,m,g,y,b;for(h=0;h16&&(r=e(r,t.length*8));var i=new Array(16),s=new Array(16);for(var u=0;u<16;u++)i[u]=r[u]^909522486,s[u]=r[u]^1549556828;var a=e(i.concat(o(n)),512+n.length*8);return e(s.concat(a),672)}function i(e,t){var n=(e&65535)+(t&65535),r=(e>>16)+(t>>16)+(n>>16);return r<<16|n&65535}function s(e,t){return e<>>32-t}function o(e){var t=[],n=255;for(var r=0;r>5]|=(e.charCodeAt(r/8)&n)<<24-r%32;return t}function u(e){var t="",n=255;for(var r=0;r>5]>>>24-r%32&n);return t}function a(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n="",r,i;for(var s=0;s>2]>>8*(3-s%4)&255)<<16|(e[s+1>>2]>>8*(3-(s+1)%4)&255)<<8|e[s+2>>2]>>8*(3-(s+2)%4)&255;for(i=0;i<4;i++)s*8+i*6>e.length*32?n+="=":n+=t.charAt(r>>6*(3-i)&63)}return n}return{b64_hmac_sha1:function(e,t){return a(r(e,t))},b64_sha1:function(t){return a(e(o(t),t.length*8))},binb2str:u,core_hmac_sha1:r,str_hmac_sha1:function(e,t){return u(r(e,t))},str_sha1:function(t){return u(e(o(t),t.length*8))}}}),function(e,t){typeof define=="function"&&define.amd?define("strophe-base64",[],function(){return t()}):e.Base64=t()}(this,function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",t={encode:function(t){var n="",r,i,s,o,u,a,f,l=0;do r=t.charCodeAt(l++),i=t.charCodeAt(l++),s=t.charCodeAt(l++),o=r>>2,u=(r&3)<<4|i>>4,a=(i&15)<<2|s>>6,f=s&63,isNaN(i)?(u=(r&3)<<4,a=f=64):isNaN(s)&&(f=64),n=n+e.charAt(o)+e.charAt(u)+e.charAt(a)+e.charAt(f);while(l>4,i=(u&15)<<4|a>>2,s=(a&3)<<6|f,n+=String.fromCharCode(r),a!=64&&(n+=String.fromCharCode(i)),f!=64&&(n+=String.fromCharCode(s));while(l>16)+(t>>16)+(n>>16);return r<<16|n&65535},n=function(e,t){return e<>>32-t},r=function(e){var t=[];for(var n=0;n>5]|=(e.charCodeAt(n/8)&255)<>5]>>>n%32&255);return t},s=function(e){var t="0123456789abcdef",n="";for(var r=0;r>2]>>r%4*8+4&15)+t.charAt(e[r>>2]>>r%4*8&15);return n},o=function(e,r,i,s,o,u){return t(n(t(t(r,e),t(s,u)),o),i)},u=function(e,t,n,r,i,s,u){return o(t&n|~t&r,e,t,i,s,u)},a=function(e,t,n,r,i,s,u){return o(t&r|n&~r,e,t,i,s,u)},f=function(e,t,n,r,i,s,u){return o(t^n^r,e,t,i,s,u)},l=function(e,t,n,r,i,s,u){return o(n^(t|~r),e,t,i,s,u)},c=function(e,n){e[n>>5]|=128<>>9<<4)+14]=n;var r=1732584193,i=-271733879,s=-1732584194,o=271733878,c,h,p,d;for(var v=0;v0)for(var n=0;n/g,">"),e=e.replace(/'/g,"'"),e=e.replace(/"/g,"""),e},xmlunescape:function(e){return e=e.replace(/\&/g,"&"),e=e.replace(/</g,"<"),e=e.replace(/>/g,">"),e=e.replace(/'/g,"'"),e=e.replace(/"/g,'"'),e},xmlTextNode:function(e){return r.xmlGenerator().createTextNode(e)},xmlHtmlNode:function(e){var t;if(window.DOMParser){var n=new DOMParser;t=n.parseFromString(e,"text/xml")}else t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e);return t},getText:function(e){if(!e)return null;var t="";e.childNodes.length===0&&e.nodeType==r.ElementType.TEXT&&(t+=e.nodeValue);for(var n=0;n0&&(u=a.join("; "),n.setAttribute(o,u))}else n.setAttribute(o,u)}for(t=0;t/g,"\\3e").replace(/@/g,"\\40")},unescapeNode:function(e){return typeof e!="string"?e:e.replace(/\\20/g," ").replace(/\\22/g,'"').replace(/\\26/g,"&").replace(/\\27/g,"'").replace(/\\2f/g,"/").replace(/\\3a/g,":").replace(/\\3c/g,"<").replace(/\\3e/g,">").replace(/\\40/g,"@").replace(/\\5c/g,"\\")},getNodeFromJid:function(e){return e.indexOf("@")<0?null:e.split("@")[0]},getDomainFromJid:function(e){var t=r.getBareJidFromJid(e);if(t.indexOf("@")<0)return t;var n=t.split("@");return n.splice(0,1),n.join("@")},getResourceFromJid:function(e){var t=e.split("/");return t.length<2?null:(t.splice(0,1),t.join("/"))},getBareJidFromJid:function(e){return e?e.split("/")[0]:null},log:function(e,t){return},debug:function(e){this.log(this.LogLevel.DEBUG,e)},info:function(e){this.log(this.LogLevel.INFO,e)},warn:function(e){this.log(this.LogLevel.WARN,e)},error:function(e){this.log(this.LogLevel.ERROR,e)},fatal:function(e){this.log(this.LogLevel.FATAL,e)},serialize:function(e){var t;if(!e)return null;typeof e.tree=="function"&&(e=e.tree());var n=e.nodeName,i,s;e.getAttribute("_realname")&&(n=e.getAttribute("_realname")),t="<"+n;for(i=0;i/g,">").replace(/0){t+=">";for(i=0;i"}}t+=""+n+">"}else t+="/>";return t},_requestId:0,_connectionPlugins:{},addConnectionPlugin:function(e,t){r._connectionPlugins[e]=t}},r.Builder=function(e,t){if(e=="presence"||e=="message"||e=="iq")t&&!t.xmlns?t.xmlns=r.NS.CLIENT:t||(t={xmlns:r.NS.CLIENT});this.nodeTree=r.xmlElement(e,t),this.node=this.nodeTree},r.Builder.prototype={tree:function(){return this.nodeTree},toString:function(){return r.serialize(this.nodeTree)},up:function(){return this.node=this.node.parentNode,this},attrs:function(e){for(var t in e)e.hasOwnProperty(t)&&(e[t]===undefined?this.node.removeAttribute(t):this.node.setAttribute(t,e[t]));return this},c:function(e,t,n){var i=r.xmlElement(e,t,n);return this.node.appendChild(i),typeof n!="string"&&(this.node=i),this},cnode:function(e){var t,n=r.xmlGenerator();try{t=n.importNode!==undefined}catch(i){t=!1}var s=t?n.importNode(e,!0):r.copyElement(e);return this.node.appendChild(s),this.node=s,this},t:function(e){var t=r.xmlTextNode(e);return this.node.appendChild(t),this},h:function(e){var t=document.createElement("body");t.innerHTML=e;var n=r.createHtml(t);while(n.childNodes.length>0)this.node.appendChild(n.childNodes[0]);return this}},r.Handler=function(e,t,n,i,s,o,u){this.handler=e,this.ns=t,this.name=n,this.type=i,this.id=s,this.options=u||{matchBare:!1},this.options.matchBare||(this.options.matchBare=!1),this.options.matchBare?this.from=o?r.getBareJidFromJid(o):null:this.from=o,this.user=!0},r.Handler.prototype={isMatch:function(e){var t,n=null;this.options.matchBare?n=r.getBareJidFromJid(e.getAttribute("from")):n=e.getAttribute("from"),t=!1;if(!this.ns)t=!0;else{var i=this;r.forEachChild(e,null,function(e){e.getAttribute("xmlns")==i.ns&&(t=!0)}),t=t||e.getAttribute("xmlns")==this.ns}var s=e.getAttribute("type");return!t||!!this.name&&!r.isTagEqual(e,this.name)||!!this.type&&(Array.isArray(this.type)?this.type.indexOf(s)==-1:s!=this.type)||!!this.id&&e.getAttribute("id")!=this.id||!!this.from&&n!=this.from?!1:!0},run:function(e){var t=null;try{t=this.handler(e)}catch(n){throw n.sourceURL?r.fatal("error: "+this.handler+" "+n.sourceURL+":"+n.line+" - "+n.name+": "+n.message):n.fileName?(typeof console!="undefined"&&(console.trace(),console.error(this.handler," - error - ",n,n.message)),r.fatal("error: "+this.handler+" "+n.fileName+":"+n.lineNumber+" - "+n.name+": "+n.message)):r.fatal("error: "+n.message+"\n"+n.stack),n}return t},toString:function(){return"{Handler: "+this.handler+"("+this.name+","+this.id+","+this.ns+")}"}},r.TimedHandler=function(e,t){this.period=e,this.handler=t,this.lastCalled=(new Date).getTime(),this.user=!0},r.TimedHandler.prototype={run:function(){return this.lastCalled=(new Date).getTime(),this.handler()},reset:function(){this.lastCalled=(new Date).getTime()},toString:function(){return"{TimedHandler: "+this.handler+"("+this.period+")}"}},r.Connection=function(e,t){this.service=e,this.options=t||{};var n=this.options.protocol||"";e.indexOf("ws:")===0||e.indexOf("wss:")===0||n.indexOf("ws")===0?this._proto=new r.Websocket(this):this._proto=new r.Bosh(this),this.jid="",this.domain=null,this.features=null,this._sasl_data={},this.do_session=!1,this.do_bind=!1,this.timedHandlers=[],this.handlers=[],this.removeTimeds=[],this.removeHandlers=[],this.addTimeds=[],this.addHandlers=[],this._authentication={},this._idleTimeout=null,this._disconnectTimeout=null,this.authenticated=!1,this.connected=!1,this.disconnecting=!1,this.do_authentication=!0,this.paused=!1,this.restored=!1,this._data=[],this._uniqueId=0,this._sasl_success_handler=null,this._sasl_failure_handler=null,this._sasl_challenge_handler=null,this.maxRetries=5,this._idleTimeout=setTimeout(this._onIdle.bind(this),100);for(var i in r._connectionPlugins)if(r._connectionPlugins.hasOwnProperty(i)){var s=r._connectionPlugins[i],o=function(){};o.prototype=s,this[i]=new o,this[i].init(this)}},r.Connection.prototype={reset:function(){this._proto._reset(),this.do_session=!1,this.do_bind=!1,this.timedHandlers=[],this.handlers=[],this.removeTimeds=[],this.removeHandlers=[],this.addTimeds=[],this.addHandlers=[],this._authentication={},this.authenticated=!1,this.connected=!1,this.disconnecting=!1,this.restored=!1,this._data=[],this._requests=[],this._uniqueId=0},pause:function(){this.paused=!0},resume:function(){this.paused=!1},getUniqueId:function(e){var t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=Math.random()*16|0,n=e=="x"?t:t&3|8;return n.toString(16)});return typeof e=="string"||typeof e=="number"?t+":"+e:t+""},connect:function(e,t,n,i,s,o,u){this.jid=e,this.authzid=r.getBareJidFromJid(this.jid),this.authcid=u||r.getNodeFromJid(this.jid),this.pass=t,this.servtype="xmpp",this.connect_callback=n,this.disconnecting=!1,this.connected=!1,this.authenticated=!1,this.restored=!1,this.domain=r.getDomainFromJid(this.jid),this._changeConnectStatus(r.Status.CONNECTING,null),this._proto._connect(i,s,o)},attach:function(e,t,n,i,s,o,u){if(!(this._proto instanceof r.Bosh))throw{name:"StropheSessionError",message:'The "attach" method can only be used with a BOSH connection.'};this._proto._attach(e,t,n,i,s,o,u)},restore:function(e,t,n,r,i){if(!this._sessionCachingSupported())throw{name:"StropheSessionError",message:'The "restore" method can only be used with a BOSH connection.'};this._proto._restore(e,t,n,r,i)},_sessionCachingSupported:function(){if(this._proto instanceof r.Bosh){if(!JSON)return!1;try{window.sessionStorage.setItem("_strophe_","_strophe_"),window.sessionStorage.removeItem("_strophe_")}catch(e){return!1}return!0}return!1},xmlInput:function(e){return},xmlOutput:function(e){return},rawInput:function(e){return},rawOutput:function(e){return},nextValidRid:function(e){return},send:function(e){if(e===null)return;if(typeof e.sort=="function")for(var t=0;t=0&&this.addHandlers.splice(t,1)},disconnect:function(e){this._changeConnectStatus(r.Status.DISCONNECTING,e),r.info("Disconnect was called because: "+e);if(this.connected){var t=!1;this.disconnecting=!0,this.authenticated&&(t=u({xmlns:r.NS.CLIENT,type:"unavailable"})),this._disconnectTimeout=this._addSysTimedHandler(3e3,this._onDisconnectTimeout.bind(this)),this._proto._disconnect(t)}else r.info("Disconnect was called before Strophe connected to the server"),this._proto._abortAllRequests()},_changeConnectStatus:function(e,t){for(var n in r._connectionPlugins)if(r._connectionPlugins.hasOwnProperty(n)){var i=this[n];if(i.statusChanged)try{i.statusChanged(e,t)}catch(s){r.error(""+n+" plugin caused an exception "+"changing status: "+s)}}if(this.connect_callback)try{this.connect_callback(e,t)}catch(o){r.error("User connection callback caused an exception: "+o)}},_doDisconnect:function(e){typeof this._idleTimeout=="number"&&clearTimeout(this._idleTimeout),this._disconnectTimeout!==null&&(this.deleteTimedHandler(this._disconnectTimeout),this._disconnectTimeout=null),r.info("_doDisconnect was called"),this._proto._doDisconnect(),this.authenticated=!1,this.disconnecting=!1,this.restored=!1,this.handlers=[],this.timedHandlers=[],this.removeTimeds=[],this.removeHandlers=[],this.addTimeds=[],this.addHandlers=[],this._changeConnectStatus(r.Status.DISCONNECTED,e),this.connected=!1},_dataRecv:function(e,t){r.info("_dataRecv called");var n=this._proto._reqToData(e);if(n===null)return;this.xmlInput!==r.Connection.prototype.xmlInput&&(n.nodeName===this._proto.strip&&n.childNodes.length?this.xmlInput(n.childNodes[0]):this.xmlInput(n)),this.rawInput!==r.Connection.prototype.rawInput&&(t?this.rawInput(t):this.rawInput(r.serialize(n)));var i,s;while(this.removeHandlers.length>0)s=this.removeHandlers.pop(),i=this.handlers.indexOf(s),i>=0&&this.handlers.splice(i,1);while(this.addHandlers.length>0)this.handlers.push(this.addHandlers.pop());if(this.disconnecting&&this._proto._emptyQueue()){this._doDisconnect();return}var o=n.getAttribute("type"),u,a;if(o!==null&&o=="terminate"){if(this.disconnecting)return;u=n.getAttribute("condition"),a=n.getElementsByTagName("conflict"),u!==null?(u=="remote-stream-error"&&a.length>0&&(u="conflict"),this._changeConnectStatus(r.Status.CONNFAIL,u)):this._changeConnectStatus(r.Status.CONNFAIL,"unknown"),this._doDisconnect(u);return}var f=this;r.forEachChild(n,null,function(e){var t,n;n=f.handlers,f.handlers=[];for(t=0;t0:o=i.getElementsByTagName("stream:features").length>0||i.getElementsByTagName("features").length>0;var u=i.getElementsByTagName("mechanism"),a=[],f,l,c=!1;if(!o){this._proto._no_auth_received(t);return}if(u.length>0)for(f=0;f0,c=this._authentication.legacy_auth||a.length>0;if(!c){this._proto._no_auth_received(t);return}this.do_authentication!==!1&&this.authenticate(a)},authenticate:function(e){var n;for(n=0;ne[s].prototype.priority&&(s=u);if(s!=n){var a=e[n];e[n]=e[s],e[s]=a}}var f=!1;for(n=0;n0&&(n="conflict"),this._changeConnectStatus(r.Status.AUTHFAIL,n),!1}var i=e.getElementsByTagName("bind"),s;if(!(i.length>0))return r.info("SASL binding failed."),this._changeConnectStatus(r.Status.AUTHFAIL,null),!1;s=i[0].getElementsByTagName("jid"),s.length>0&&(this.jid=r.getText(s[0]),this.do_session?(this._addSysHandler(this._sasl_session_cb.bind(this),null,null,null,"_session_auth_2"),this.send(o({type:"set",id:"_session_auth_2"}).c("session",{xmlns:r.NS.SESSION}).tree())):(this.authenticated=!0,this._changeConnectStatus(r.Status.CONNECTED,null)))},_sasl_session_cb:function(e){if(e.getAttribute("type")=="result")this.authenticated=!0,this._changeConnectStatus(r.Status.CONNECTED,null);else if(e.getAttribute("type")=="error")return r.info("Session creation failed."),this._changeConnectStatus(r.Status.AUTHFAIL,null),!1;return!1},_sasl_failure_cb:function(e){return this._sasl_success_handler&&(this.deleteHandler(this._sasl_success_handler),this._sasl_success_handler=null),this._sasl_challenge_handler&&(this.deleteHandler(this._sasl_challenge_handler),this._sasl_challenge_handler=null),this._sasl_mechanism&&this._sasl_mechanism.onFailure(),this._changeConnectStatus(r.Status.AUTHFAIL,null),!1},_auth2_cb:function(e){return e.getAttribute("type")=="result"?(this.authenticated=!0,this._changeConnectStatus(r.Status.CONNECTED,null)):e.getAttribute("type")=="error"&&(this._changeConnectStatus(r.Status.AUTHFAIL,null),this.disconnect("authentication failed")),!1},_addSysTimedHandler:function(e,t){var n=new r.TimedHandler(e,t);return n.user=!1,this.addTimeds.push(n),n},_addSysHandler:function(e,t,n,i,s){var o=new r.Handler(e,t,n,i,s);return o.user=!1,this.addHandlers.push(o),o},_onDisconnectTimeout:function(){return r.info("_onDisconnectTimeout was called"),this._proto._onDisconnectTimeout(),this._doDisconnect(),!1},_onIdle:function(){var e,t,n,r;while(this.addTimeds.length>0)this.timedHandlers.push(this.addTimeds.pop());while(this.removeTimeds.length>0)t=this.removeTimeds.pop(),e=this.timedHandlers.indexOf(t),e>=0&&this.timedHandlers.splice(e,1);var i=(new Date).getTime();r=[];for(e=0;e0&&(r="conflict"),this._conn._changeConnectStatus(e.Status.CONNFAIL,r)):this._conn._changeConnectStatus(e.Status.CONNFAIL,"unknown"),this._conn._doDisconnect(r),e.Status.CONNFAIL;this.sid||(this.sid=t.getAttribute("sid"));var s=t.getAttribute("requests");s&&(this.window=parseInt(s,10));var o=t.getAttribute("hold");o&&(this.hold=parseInt(o,10));var u=t.getAttribute("wait");u&&(this.wait=parseInt(u,10))},_disconnect:function(e){this._sendTerminate(e)},_doDisconnect:function(){this.sid=null,this.rid=Math.floor(Math.random()*4294967295),window.sessionStorage.removeItem("strophe-bosh-session"),this._conn.nextValidRid(this.rid)},_emptyQueue:function(){return this._requests.length===0},_hitError:function(t){this.errors++,e.warn("request errored, status: "+t+", number of errors: "+this.errors),this.errors>4&&this._conn._onDisconnectTimeout()},_no_auth_received:function(t){t?t=t.bind(this._conn):t=this._conn._connect_cb.bind(this._conn);var n=this._buildBody();this._requests.push(new e.Request(n.tree(),this._onRequestStateChange.bind(this,t.bind(this._conn)),n.tree().getAttribute("rid"))),this._throttledRequestHandler()},_onDisconnectTimeout:function(){this._abortAllRequests()},_abortAllRequests:function(){var t;while(this._requests.length>0)t=this._requests.pop(),t.abort=!0,t.xhr.abort(),t.xhr.onreadystatechange=function(){}},_onIdle:function(){var t=this._conn._data;this._conn.authenticated&&this._requests.length===0&&t.length===0&&!this._conn.disconnecting&&(e.info("no requests during idle cycle, sending blank request"),t.push(null));if(this._conn.paused)return;if(this._requests.length<2&&t.length>0){var n=this._buildBody();for(var r=0;r0){var i=this._requests[0].age();this._requests[0].dead!==null&&this._requests[0].timeDead()>Math.floor(e.SECONDARY_TIMEOUT*this.wait)&&this._throttledRequestHandler(),i>Math.floor(e.TIMEOUT*this.wait)&&(e.warn("Request "+this._requests[0].id+" timed out, over "+Math.floor(e.TIMEOUT*this.wait)+" seconds since last activity"),this._throttledRequestHandler())}},_onRequestStateChange:function(t,n){e.debug("request id "+n.id+"."+n.sends+" state changed to "+n.xhr.readyState);if(n.abort){n.abort=!1;return}var r;if(n.xhr.readyState==4){r=0;try{r=n.xhr.status}catch(i){}typeof r=="undefined"&&(r=0);if(this.disconnecting&&r>=400){this._hitError(r);return}var s=this._requests[0]==n,o=this._requests[1]==n;if(r>0&&r<500||n.sends>5)this._removeRequest(n),e.debug("request id "+n.id+" should now be removed");if(r==200)(o||s&&this._requests.length>0&&this._requests[0].age()>Math.floor(e.SECONDARY_TIMEOUT*this.wait))&&this._restartRequest(0),this._conn.nextValidRid(Number(n.rid)+1),e.debug("request id "+n.id+"."+n.sends+" got 200"),t(n),this.errors=0;else{e.error("request id "+n.id+"."+n.sends+" error "+r+" happened");if(r===0||r>=400&&r<600||r>=12e3)this._hitError(r),r>=400&&r<500&&(this._conn._changeConnectStatus(e.Status.DISCONNECTING,null),this._conn._doDisconnect())}r>0&&r<500||n.sends>5||this._throttledRequestHandler()}},_processRequest:function(t){var n=this,r=this._requests[t],i=-1;try{r.xhr.readyState==4&&(i=r.xhr.status)}catch(s){e.error("caught an error in _requests["+t+"], reqStatus: "+i)}typeof i=="undefined"&&(i=-1);if(r.sends>this._conn.maxRetries){this._conn._onDisconnectTimeout();return}var o=r.age(),u=!isNaN(o)&&o>Math.floor(e.TIMEOUT*this.wait),a=r.dead!==null&&r.timeDead()>Math.floor(e.SECONDARY_TIMEOUT*this.wait),f=r.xhr.readyState==4&&(i<1||i>=500);if(u||a||f)a&&e.error("Request "+this._requests[t].id+" timed out (secondary), restarting"),r.abort=!0,r.xhr.abort(),r.xhr.onreadystatechange=function(){},this._requests[t]=new e.Request(r.xmlData,r.origFunc,r.rid,r.sends),r=this._requests[t];if(r.xhr.readyState===0){e.debug("request id "+r.id+"."+r.sends+" posting");try{r.xhr.open("POST",this._conn.service,this._conn.options.sync?!1:!0),r.xhr.setRequestHeader("Content-Type","text/xml; charset=utf-8")}catch(l){e.error("XHR open failed."),this._conn.connected||this._conn._changeConnectStatus(e.Status.CONNFAIL,"bad-service"),this._conn.disconnect();return}var c=function(){r.date=new Date;if(n._conn.options.customHeaders){var e=n._conn.options.customHeaders;for(var t in e)e.hasOwnProperty(t)&&r.xhr.setRequestHeader(t,e[t])}r.xhr.send(r.data)};if(r.sends>1){var h=Math.min(Math.floor(e.TIMEOUT*this.wait),Math.pow(r.sends,3))*1e3;setTimeout(c,h)}else c();r.sends++,this._conn.xmlOutput!==e.Connection.prototype.xmlOutput&&(r.xmlData.nodeName===this.strip&&r.xmlData.childNodes.length?this._conn.xmlOutput(r.xmlData.childNodes[0]):this._conn.xmlOutput(r.xmlData)),this._conn.rawOutput!==e.Connection.prototype.rawOutput&&this._conn.rawOutput(r.data)}else e.debug("_processRequest: "+(t===0?"first":"second")+" request has readyState of "+r.xhr.readyState)},_removeRequest:function(t){e.debug("removing request");var n;for(n=this._requests.length-1;n>=0;n--)t==this._requests[n]&&this._requests.splice(n,1);t.xhr.onreadystatechange=function(){},this._throttledRequestHandler()},_restartRequest:function(e){var t=this._requests[e];t.dead===null&&(t.dead=new Date),this._processRequest(e)},_reqToData:function(e){try{return e.getResponse()}catch(t){if(t!="parsererror")throw t;this._conn.disconnect("strophe-parsererror")}},_sendTerminate:function(t){e.info("_sendTerminate was called");var n=this._buildBody().attrs({type:"terminate"});t&&n.cnode(t.tree());var r=new e.Request(n.tree(),this._onRequestStateChange.bind(this,this._conn._dataRecv.bind(this._conn)),n.tree().getAttribute("rid"));this._requests.push(r),this._throttledRequestHandler()},_send:function(){clearTimeout(this._conn._idleTimeout),this._throttledRequestHandler(),this._conn._idleTimeout=setTimeout(this._conn._onIdle.bind(this._conn),100)},_sendRestart:function(){this._throttledRequestHandler(),clearTimeout(this._conn._idleTimeout)},_throttledRequestHandler:function(){this._requests?e.debug("_throttledRequestHandler called with "+this._requests.length+" requests"):e.debug("_throttledRequestHandler called with undefined requests");if(!this._requests||this._requests.length===0)return;this._requests.length>0&&this._processRequest(0),this._requests.length>1&&Math.abs(this._requests[0].rid-this._requests[1].rid)":r!==e.NS.FRAMING&&(n="Wrong xmlns in : "+r);var i=t.getAttribute("version");return typeof i!="string"?n="Missing version in ":i!=="1.0"&&(n="Wrong version in : "+i),n?(this._conn._changeConnectStatus(e.Status.CONNFAIL,n),this._conn._doDisconnect(),!1):!0},_connect_cb_wrapper:function(t){if(t.data.indexOf("\s*)*/,"");if(n==="")return;var r=(new DOMParser).parseFromString(n,"text/xml").documentElement;this._conn.xmlInput(r),this._conn.rawInput(t.data),this._handleStreamStart(r)&&this._connect_cb(r)}else if(t.data.indexOf(" tag.")}}this._conn._doDisconnect()},_doDisconnect:function(){e.info("WebSockets _doDisconnect was called"),this._closeSocket()},_streamWrap:function(e){return""+e+""},_closeSocket:function(){if(this.socket)try{this.socket.close()}catch(e){}this.socket=null},_emptyQueue:function(){return!0},_onClose:function(){this._conn.connected&&!this._conn.disconnecting?(e.error("Websocket closed unexcectedly"),this._conn._doDisconnect()):e.info("Websocket closed")},_no_auth_received:function(t){e.error("Server did not send any auth methods"),this._conn._changeConnectStatus(e.Status.CONNFAIL,"Server did not send any auth methods"),t&&(t=t.bind(this._conn),t()),this._conn._doDisconnect()},_onDisconnectTimeout:function(){},_abortAllRequests:function(){},_onError:function(t){e.error("Websocket error "+t),this._conn._changeConnectStatus(e.Status.CONNFAIL,"The WebSocket connection could not be established was disconnected."),this._disconnect()},_onIdle:function(){var t=this._conn._data;if(t.length>0&&!this._conn.paused){for(var n=0;n';if(t.data===i){this._conn.rawInput(i),this._conn.xmlInput(t),this._conn.disconnecting||this._conn._doDisconnect();return}if(t.data.search("").attr(e);this.setElement(r,!1)}else this.setElement(n.result(this,"el"),!1)}}),t.sync=function(e,r,i){var s=N[e];n.defaults(i||(i={}),{emulateHTTP:t.emulateHTTP,emulateJSON:t.emulateJSON});var o={type:s,dataType:"json"};i.url||(o.url=n.result(r,"url")||F()),i.data==null&&r&&(e==="create"||e==="update"||e==="patch")&&(o.contentType="application/json",o.data=JSON.stringify(i.attrs||r.toJSON(i))),i.emulateJSON&&(o.contentType="application/x-www-form-urlencoded",o.data=o.data?{model:o.data}:{});if(i.emulateHTTP&&(s==="PUT"||s==="DELETE"||s==="PATCH")){o.type="POST",i.emulateJSON&&(o.data._method=s);var u=i.beforeSend;i.beforeSend=function(e){e.setRequestHeader("X-HTTP-Method-Override",s);if(u)return u.apply(this,arguments)}}o.type!=="GET"&&!i.emulateJSON&&(o.processData=!1),o.type==="PATCH"&&T&&(o.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")});var a=i.xhr=t.ajax(n.extend(o,i));return r.trigger("request",r,a,i),a};var T=typeof window!="undefined"&&!!window.ActiveXObject&&(!window.XMLHttpRequest||!(new XMLHttpRequest).dispatchEvent),N={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};t.ajax=function(){return t.$.ajax.apply(t.$,arguments)};var C=t.Router=function(e){e||(e={}),e.routes&&(this.routes=e.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},k=/\((.*?)\)/g,L=/(\(\?)?:\w+/g,A=/\*\w+/g,O=/[\-{}\[\]+?.,\\\^$|#\s]/g;n.extend(C.prototype,f,{initialize:function(){},route:function(e,r,i){n.isRegExp(e)||(e=this._routeToRegExp(e)),n.isFunction(r)&&(i=r,r=""),i||(i=this[r]);var s=this;return t.history.route(e,function(n){var o=s._extractParameters(e,n);s.execute(i,o),s.trigger.apply(s,["route:"+r].concat(o)),s.trigger("route",r,o),t.history.trigger("route",s,r,o)}),this},execute:function(e,t){e&&e.apply(this,t)},navigate:function(e,n){return t.history.navigate(e,n),this},_bindRoutes:function(){if(!this.routes)return;this.routes=n.result(this,"routes");var e,t=n.keys(this.routes);while((e=t.pop())!=null)this.route(e,this.routes[e])},_routeToRegExp:function(e){return e=e.replace(O,"\\$&").replace(k,"(?:$1)?").replace(L,function(e,t){return t?e:"([^/?]+)"}).replace(A,"([^?]*?)"),new RegExp("^"+e+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(e,t){var r=e.exec(t).slice(1);return n.map(r,function(e,t){return t===r.length-1?e||null:e?decodeURIComponent(e):null})}});var M=t.History=function(){this.handlers=[],n.bindAll(this,"checkUrl"),typeof window!="undefined"&&(this.location=window.location,this.history=window.history)},_=/^[#\/]|\s+$/g,D=/^\/+|\/+$/g,P=/msie [\w.]+/,H=/\/$/,B=/#.*$/;M.started=!1,n.extend(M.prototype,f,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root},getHash:function(e){var t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:""},getFragment:function(e,t){if(e==null)if(this._hasPushState||!this._wantsHashChange||t){e=decodeURI(this.location.pathname+this.location.search);var n=this.root.replace(H,"");e.indexOf(n)||(e=e.slice(n.length))}else e=this.getHash();return e.replace(_,"")},start:function(e){if(M.started)throw new Error("Backbone.history has already been started");M.started=!0,this.options=n.extend({root:"/"},this.options,e),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var r=this.getFragment(),i=document.documentMode,s=P.exec(navigator.userAgent.toLowerCase())&&(!i||i<=7);this.root=("/"+this.root+"/").replace(D,"/");if(s&&this._wantsHashChange){var o=t.$('