hardlounge/client/build/build.js

8 lines
247 KiB
JavaScript
Raw Normal View History

2014-09-09 21:55:45 +00:00
(function(){var a=function(a){"use strict";a=a?a:{};var b={bgColor:"#d00",textColor:"#fff",fontFamily:"sans-serif",fontStyle:"bold",type:"circle",position:"down",animation:"slide",elementId:false};var c,d,e,f,g,h,i,j,k,l,m,n,o;o={};o.ff=/firefox/i.test(navigator.userAgent.toLowerCase());o.chrome=/chrome/i.test(navigator.userAgent.toLowerCase());o.opera=/opera/i.test(navigator.userAgent.toLowerCase());o.ie=/msie/i.test(navigator.userAgent.toLowerCase())||/trident/i.test(navigator.userAgent.toLowerCase());o.supported=o.chrome||o.ff||o.opera;var p=[];m=function(){};j=n=false;var q=function(){c=B(b,a);c.bgColor=A(c.bgColor);c.textColor=A(c.textColor);c.position=c.position.toLowerCase();c.animation=D.types[""+c.animation]?c.animation:b.animation;var j=c.position.indexOf("up")>-1;var k=c.position.indexOf("left")>-1;if(j||k){for(var l=0;l<D.types[""+c.animation].length;l++){var m=D.types[""+c.animation][l];if(j){if(m.y<.6){m.y=m.y-.4}else{m.y=m.y-2*m.y+(1-m.w)}}if(k){if(m.x<.6){m.x=m.x-.4}else{m.x=m.x-2*m.x+(1-m.h)}}D.types[""+c.animation][l]=m}}c.type=s[""+c.type]?c.type:b.type;try{d=z.getIcon();g=document.createElement("canvas");i=document.createElement("img");if(d.hasAttribute("href")){i.setAttribute("src",d.getAttribute("href"));i.onload=function(){e=i.height>0?i.height:32;f=i.width>0?i.width:32;g.height=e;g.width=f;h=g.getContext("2d");r.ready()}}else{i.setAttribute("src","");e=32;f=32;i.height=e;i.width=f;g.height=e;g.width=f;h=g.getContext("2d");r.ready()}}catch(n){throw"Error initializing favico. Message: "+n.message}};var r={};r.ready=function(){j=true;r.reset();m()};r.reset=function(){p=[];k=false;h.clearRect(0,0,f,e);h.drawImage(i,0,0,f,e);z.setIcon(g)};r.start=function(){if(!j||l){return}var a=function(){k=p[0];l=false;if(p.length>0){p.shift();r.start()}else{}};if(p.length>0){l=true;if(k){D.run(k.options,function(){D.run(p[0].options,function(){a()},false)},true)}else{D.run(p[0].options,function(){a()},false)}}};var s={};var t=function(a){a.n=typeof a.n==="number"?Math.abs(a.n|0):a.n;a.x=f*a.x;a.y=e*a.y;a.w=f*a.w;a.h=e*a.h;a.len=(""+a.n).length;return a};s.circle=function(a){a=t(a);var b=false;if(a.len===2){a.x=a.x-a.w*.4;a.w=a.w*1.4;b=true}else if(a.len>=3){a.x=a.x-a.w*.65;a.w=a.w*1.65;b=true}h.clearRect(0,0,f,e);h.drawImage(i,0,0,f,e);h.beginPath();h.font=c.fontStyle+" "+Math.floor(a.h*(a.n>99?.85:1))+"px "+c.fontFamily;h.textAlign="center";if(b){h.moveTo(a.x+a.w/2,a.y);h.lineTo(a.x+a.w-a.h/2,a.y);h.quadraticCurveTo(a.x+a.w,a.y,a.x+a.w,a.y+a.h/2);h.lineTo(a.x+a.w,a.y+a.h-a.h/2);h.quadraticCurveTo(a.x+a.w,a.y+a.h,a.x+a.w-a.h/2,a.y+a.h);h.lineTo(a.x+a.h/2,a.y+a.h);h.quadraticCurveTo(a.x,a.y+a.h,a.x,a.y+a.h-a.h/2);h.lineTo(a.x,a.y+a.h/2);h.quadraticCurveTo(a.x,a.y,a.x+a.h/2,a.y)}else{h.arc(a.x+a.w/2,a.y+a.h/2,a.h/2,0,2*Math.PI)}h.fillStyle="rgba("+c.bgColor.r+","+c.bgColor.g+","+c.bgColor.b+","+a.o+")";h.fill();h.closePath();h.beginPath();h.stroke();h.fillStyle="rgba("+c.textColor.r+","+c.textColor.g+","+c.textColor.b+","+a.o+")";if(typeof a.n==="number"&&a.n>999){h.fillText((a.n>9999?9:Math.floor(a.n/1e3))+"k+",Math.floor(a.x+a.w/2),Math.floor(a.y+a.h-a.h*.2))}else{h.fillText(a.n,Math.floor(a.x+a.w/2),Math.floor(a.y+a.h-a.h*.15))}h.closePath()};s.rectangle=function(a){a=t(a);var b=false;if(a.len===2){a.x=a.x-a.w*.4;a.w=a.w*1.4;b=true}else if(a.len>=3){a.x=a.x-a.w*.65;a.w=a.w*1.65;b=true}h.clearRect(0,0,f,e);h.drawImage(i,0,0,f,e);h.beginPath();h.font="bold "+Math.floor(a.h*(a.n>99?.9:1))+"px sans-serif";h.textAlign="center";h.fillStyle="rgba("+c.bgColor.r+","+c.bgColor.g+","+c.bgColor.b+","+a.o+")";h.fillRect(a.x,a.y,a.w,a.h);h.fillStyle="rgba("+c.textColor.r+","+c.textColor.g+","+c.textColor.b+","+a.o+")";if(typeof a.n==="number"&&a.len>3){h.fillText((a.n>9999?9:Math.floor(a.n/1e3))+"k+",Math.floor(a.x+a.w/2),Math.floor(a.y+a.h-a.h*.2))}else{h.fillText(a.n,Math.floor(a.x+a.w/2),Math.floor(a.y+a.h-a.h*.15))}h.closePath()};var u=function(a,b){m=function(){try{if(typeof a==="number"?a>0:a!==""){if(D.types[""+b]){c.animation=b}p.push({type:"badge",options:{n:a}});if(p.length>100){throw"Too many badges requests in queu
if(e==null){return b==="!="}if(!b){return true}e+="";return b==="="?e===c:b==="!="?e!==c:b==="^="?c&&e.indexOf(c)===0:b==="*="?c&&e.indexOf(c)>-1:b==="$="?c&&e.slice(-c.length)===c:b==="~="?(" "+e+" ").indexOf(c)>-1:b==="|="?e===c||e.slice(0,c.length+1)===c+"-":false}},CHILD:function(a,b,c,d,e){var f=a.slice(0,3)!=="nth",g=a.slice(-4)!=="last",h=b==="of-type";return d===1&&e===0?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p]){if(h?l.nodeName.toLowerCase()===r:l.nodeType===1){return false}}o=p=a==="only"&&!o&&"nextSibling"}return true}o=[g?q.firstChild:q.lastChild];if(g&&s){k=q[u]||(q[u]={});j=k[a]||[];n=j[0]===w&&j[1];m=j[0]===w&&j[2];l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop()){if(l.nodeType===1&&++m&&l===b){k[a]=[w,n,m];break}}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w){m=j[1]}else{while(l=++n&&l&&l[p]||(m=n=0)||o.pop()){if((h?l.nodeName.toLowerCase()===r:l.nodeType===1)&&++m){if(s){(l[u]||(l[u]={}))[a]=[w,m]}if(l===b){break}}}}m-=e;return m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);if(e[u]){return e(b)}if(e.length>1){c=[a,a,"",b];return d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--){d=K.call(a,f[g]);a[d]=!(c[d]=f[g])}}):function(a){return e(a,0,c)}}return e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--){if(f=g[h]){a[h]=!(b[h]=f)}}}):function(a,e,f){b[0]=a;d(b,null,f,c);return!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){if(!W.test(a||"")){fb.error("unsupported lang: "+a)}a=a.replace(cb,db).toLowerCase();return function(b){var c;do{if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang")){c=c.toLowerCase();return c===a||c.indexOf(a+"-")===0}}while((b=b.parentNode)&&b.nodeType===1);return false}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===false},disabled:function(a){return a.disabled===true},checked:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&!!a.checked||b==="option"&&!!a.selected},selected:function(a){if(a.parentNode){a.parentNode.selectedIndex}return a.selected===true},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling){if(a.nodeType<6){return false}}return true},parent:function(a){return!d.pseudos["empty"](a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&a.type==="button"||b==="button"},text:function(a){var b;return a.nodeName.toLowerCase()==="input"&&a.type==="text"&&((b=a.getAttribute("type"))==null||b.toLowerCase()==="text")},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[c<0?c+b:c]}),even:nb(function(a,b){var c=0;for(;c<b;c+=2){a.push(c)}return a}),odd:nb(function(a,b){var c=1;for(;c<b;c+=2){a.push(c)}return a}),lt:nb(function(a,b,c){var d=c<0?c+b:c;for(;--d>=0;){a.push(d)}return a}),gt:nb(function(a,b,c){var d=c<0?c+b:c;for(;++d<b;){a.push(d)}return a})}};d.pseudos["nth"]=d.pseudos["eq"];for(b in{radio:true,checkbox:true,file:true,password:true,image:true}){d.pseudos[b]=lb(b)}for(b in{submit:true,reset:true}){d.pseudos[b]=mb(b)}function pb(){}pb.prototype=d.filters=d.pseudos;d.setFilters=new pb;g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k){return b?0:k.slice(0)}h=a;i=[];j=d.preFilter;while(h){if(!c||(e=S.exec(h))){if(e){h=h.slice(e[0].length)||h}i.push(f=[])}c=false;if(e=T.exec(h)){c=e.shift();f.push({value:c,type:e[0].replace(R," "
}}}}if(M.hasData(a)){h=M.access(a);i=n.extend({},h);M.set(b,i)}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return b===undefined||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();if(c==="input"&&T.test(a.type)){b.checked=a.checked}else if(c==="input"||c==="textarea"){b.defaultValue=a.defaultValue}}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(true),i=n.contains(a.ownerDocument,a);if(!k.noCloneChecked&&(a.nodeType===1||a.nodeType===11)&&!n.isXMLDoc(a)){g=ob(h);f=ob(a);for(d=0,e=f.length;d<e;d++){pb(f[d],g[d])}}if(b){if(c){f=f||ob(a);g=g||ob(h);for(d=0,e=f.length;d<e;d++){nb(f[d],g[d])}}else{nb(a,h)}}g=ob(h,"script");if(g.length>0){mb(g,!i&&ob(a,"script"))}return h},buildFragment:function(a,b,c,d){var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;for(;m<o;m++){e=a[m];if(e||e===0){if(n.type(e)==="object"){n.merge(l,e.nodeType?[e]:e)}else if(!cb.test(e)){l.push(b.createTextNode(e))}else{f=f||k.appendChild(b.createElement("div"));g=(bb.exec(e)||["",""])[1].toLowerCase();h=ib[g]||ib._default;f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2];j=h[0];while(j--){f=f.lastChild}n.merge(l,f.childNodes);f=k.firstChild;f.textContent=""}}}k.textContent="";m=0;while(e=l[m++]){if(d&&n.inArray(e,d)!==-1){continue}i=n.contains(e.ownerDocument,e);f=ob(k.appendChild(e),"script");if(i){mb(f)}if(c){j=0;while(e=f[j++]){if(fb.test(e.type||"")){c.push(e)}}}}return k},cleanData:function(a){var b,c,d,e,f=n.event.special,g=0;for(;(c=a[g])!==undefined;g++){if(n.acceptData(c)){e=c[L.expando];if(e&&(b=L.cache[e])){if(b.events){for(d in b.events){if(f[d]){n.event.remove(c,d)}else{n.removeEvent(c,d,b.handle)}}}if(L.cache[e]){delete L.cache[e]}}}delete M.cache[c[M.expando]]}}});n.fn.extend({text:function(a){return J(this,function(a){return a===undefined?n.text(this):this.empty().each(function(){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){this.textContent=a}})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){if(this.parentNode){this.parentNode.insertBefore(a,this)}})},after:function(){return this.domManip(arguments,function(a){if(this.parentNode){this.parentNode.insertBefore(a,this.nextSibling)}})},remove:function(a,b){var c,d=a?n.filter(a,this):this,e=0;for(;(c=d[e])!=null;e++){if(!b&&c.nodeType===1){n.cleanData(ob(c))}if(c.parentNode){if(b&&n.contains(c.ownerDocument,c)){mb(ob(c,"script"))}c.parentNode.removeChild(c)}}return this},empty:function(){var a,b=0;for(;(a=this[b])!=null;b++){if(a.nodeType===1){n.cleanData(ob(a,false));a.textContent=""}}return this},clone:function(a,b){a=a==null?false:a;b=b==null?a:b;return this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(a===undefined&&b.nodeType===1){return b.innerHTML}if(typeof a==="string"&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;c<d;c++){b=this[c]||{};if(b.nodeType===1){n.cleanData(ob(b,false));b.innerHTML=a}}b=0}catch(e){}}if(b){this.empty().append(a)}},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];this.domManip(arguments,function(b){a=this.parentNode;n.cleanData(ob(this));if(a){a.replaceChild(b,this)}});return a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,true)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&typeof p==="string"&&!k.checkClone&&eb.test(p)){return this.each(function(c){var d=m.eq(c);if(q){a[0]=p.call(this,c,d.html())}d.domManip(a,b)})}if(l){c=n.buildFragment(a,this[0].ownerDocument,false,this);d=c.fi
}});n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){if(n.isFunction(c)){e=e||d;d=c;c=undefined}return n.ajax({url:a,type:b,dataType:e,data:c,success:d})}});n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}});n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:false,global:false,"throws":true})};n.fn.extend({wrapAll:function(a){var b;if(n.isFunction(a)){return this.each(function(b){n(this).wrapAll(a.call(this,b))})}if(this[0]){b=n(a,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){b.insertBefore(this[0])}b.map(function(){var a=this;while(a.firstElementChild){a=a.firstElementChild}return a}).append(this)}return this},wrapInner:function(a){if(n.isFunction(a)){return this.each(function(b){n(this).wrapInner(a.call(this,b))})}return this.each(function(){var b=n(this),c=b.contents();if(c.length){c.wrapAll(a)}else{b.append(a)}})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){if(!n.nodeName(this,"body")){n(this).replaceWith(this.childNodes)}}).end()}});n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0};n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var wc=/%20/g,xc=/\[\]$/,yc=/\r?\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;function Bc(a,b,c,d){var e;if(n.isArray(b)){n.each(b,function(b,e){if(c||xc.test(a)){d(a,e)}else{Bc(a+"["+(typeof e==="object"?b:"")+"]",e,c,d)}})}else if(!c&&n.type(b)==="object"){for(e in b){Bc(a+"["+e+"]",b[e],c,d)}}else{d(a,b)}}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():b==null?"":b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(b===undefined){b=n.ajaxSettings&&n.ajaxSettings.traditional}if(n.isArray(a)||a.jquery&&!n.isPlainObject(a)){n.each(a,function(){e(this.name,this.value)})}else{for(c in a){Bc(c,a[c],b,e)}}return d.join("&").replace(wc,"+")};n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Ac.test(this.nodeName)&&!zc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return c==null?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(yc,"\r\n")}}):{name:b.name,value:c.replace(yc,"\r\n")}}).get()}});n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cc=0,Dc={},Ec={0:200,1223:204},Fc=n.ajaxSettings.xhr();if(a.ActiveXObject){n(a).on("unload",function(){for(var a in Dc){Dc[a]()}})}k.cors=!!Fc&&"withCredentials"in Fc;k.ajax=Fc=!!Fc;n.ajaxTransport(function(a){var b;if(k.cors||Fc&&!a.crossDomain){return{send:function(c,d){var e,f=a.xhr(),g=++Cc;f.open(a.type,a.url,a.async,a.username,a.password);if(a.xhrFields){for(e in a.xhrFields){f[e]=a.xhrFields[e]}}if(a.mimeType&&f.overrideMimeType){f.overrideMimeType(a.mimeType)}if(!a.crossDomain&&!c["X-Requested-With"]){c["X-Requested-With"]="XMLHttpRequest"}for(e in c){f.setRequestHeader(e,c[e])}b=function(a){return function(){if(b){delete Dc[g];b=f.onload=f.onerror=null;if(a==="abort"){f.abort()}else if(a==="error"){d(f.status,f.statusText)}else{d(Ec[f.status]||f.status,f.statusText,typeof f.responseText==="string"?{text:f.responseText}:undefined,f.getAllResponseHeaders())}}}};f.onload=b();f.onerror=b("error");b=Dc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b){throw h}}},abort:function(){if(b){b()}}}}});n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){n.globalEval(a);return a}}});n.ajaxPrefilter("script",function(a){if(a.cache===undefined){a.cache=false}if(a.crossDomain){a.type="GET"}});n.ajaxTransport("script",function(a){if(a
Z[g+"o"]=db(Z[g],g)}while(Y.length){g=Y.pop();Z[g+g]=cb(Z[g],2)}Z.DDDD=cb(Z.DDD,3);function eb(){}function fb(a){xb(a);hb(this,a)}function gb(a){var b=qb(a),c=b.year||0,d=b.quarter||0,e=b.month||0,f=b.week||0,g=b.day||0,h=b.hour||0,i=b.minute||0,j=b.second||0,k=b.millisecond||0;this._milliseconds=+k+j*1e3+i*6e4+h*36e5;this._days=+g+f*7;this._months=+e+d*3+c*12;this._data={};this._bubble()}function hb(a,b){for(var c in b){if(b.hasOwnProperty(c)){a[c]=b[c]}}if(b.hasOwnProperty("toString")){a.toString=b.toString}if(b.hasOwnProperty("valueOf")){a.valueOf=b.valueOf}return a}function ib(a){var b={},c;for(c in a){if(a.hasOwnProperty(c)&&p.hasOwnProperty(c)){b[c]=a[c]}}return b}function jb(a){if(a<0){return Math.ceil(a)}else{return Math.floor(a)}}function kb(a,b,c){var d=""+Math.abs(a),e=a>=0;while(d.length<b){d="0"+d}return(e?c?"+":"":"-")+d}function lb(a,c,d,e){var f=c._milliseconds,g=c._days,h=c._months;e=e==null?true:e;if(f){a._d.setTime(+a._d+f*d)}if(g){fc(a,"Date",ec(a,"Date")+g*d)}if(h){dc(a,ec(a,"Month")+h*d)}if(e){b.updateOffset(a,g||h)}}function mb(a){return Object.prototype.toString.call(a)==="[object Array]"}function nb(a){return Object.prototype.toString.call(a)==="[object Date]"||a instanceof Date}function ob(a,b,c){var d=Math.min(a.length,b.length),e=Math.abs(a.length-b.length),f=0,g;for(g=0;g<d;g++){if(c&&a[g]!==b[g]||!c&&sb(a[g])!==sb(b[g])){f++}}return f+e}function pb(a){if(a){var b=a.toLowerCase().replace(/(.)s$/,"$1");a=T[a]||U[b]||b}return a}function qb(a){var b={},c,d;for(d in a){if(a.hasOwnProperty(d)){c=pb(d);if(c){b[c]=a[d]}}}return b}function rb(c){var d,e;if(c.indexOf("week")===0){d=7;e="day"}else if(c.indexOf("month")===0){d=12;e="month"}else{return}b[c]=function(f,g){var h,i,j=b.fn._lang[c],k=[];if(typeof f==="number"){g=f;f=a}i=function(a){var c=b().utc().set(e,a);return j.call(b.fn._lang,c,f||"")};if(g!=null){return i(g)}else{for(h=0;h<d;h++){k.push(i(h))}return k}}}function sb(a){var b=+a,c=0;if(b!==0&&isFinite(b)){if(b>=0){c=Math.floor(b)}else{c=Math.ceil(b)}}return c}function tb(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function ub(a,c,d){return _b(b([a,11,31+c-d]),c,d).week}function vb(a){return wb(a)?366:365}function wb(a){return a%4===0&&a%100!==0||a%400===0}function xb(a){var b;if(a._a&&a._pf.overflow===-2){b=a._a[i]<0||a._a[i]>11?i:a._a[j]<1||a._a[j]>tb(a._a[h],a._a[i])?j:a._a[k]<0||a._a[k]>23?k:a._a[l]<0||a._a[l]>59?l:a._a[m]<0||a._a[m]>59?m:a._a[n]<0||a._a[n]>999?n:-1;if(a._pf._overflowDayOfYear&&(b<h||b>j)){b=j}a._pf.overflow=b}}function yb(a){if(a._isValid==null){a._isValid=!isNaN(a._d.getTime())&&a._pf.overflow<0&&!a._pf.empty&&!a._pf.invalidMonth&&!a._pf.nullInput&&!a._pf.invalidFormat&&!a._pf.userInvalidated;if(a._strict){a._isValid=a._isValid&&a._pf.charsLeftOver===0&&a._pf.unusedTokens.length===0}}return a._isValid}function zb(a){return a?a.toLowerCase().replace("_","-"):a}function Ab(a,c){return c._isUTC?b(a).zone(c._offset||0):b(a).local()}hb(eb.prototype,{set:function(a){var b,c;for(c in a){b=a[c];if(typeof b==="function"){this[c]=b}else{this["_"+c]=b}}},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(a){return this._months[a.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a){var c,d,e;if(!this._monthsParse){this._monthsParse=[]}for(c=0;c<12;c++){if(!this._monthsParse[c]){d=b.utc([2e3,c]);e="^"+this.months(d,"")+"|^"+this.monthsShort(d,"");this._monthsParse[c]=new RegExp(e.replace(".",""),"i")}if(this._monthsParse[c].test(a)){return c}}},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var c,d,e;if(!this._weekdaysParse){this._weekdaysParse=[]}for(c=
};n.prototype.open=n.prototype.connect=function(){if(this.connected)return this;this.io.open();if("open"==this.io.readyState)this.onopen();return this};n.prototype.send=function(){var a=f(arguments);a.unshift("message");this.emit.apply(this,a);return this};n.prototype.emit=function(a){if(l.hasOwnProperty(a)){m.apply(this,arguments);return this}var b=f(arguments);var c=d.EVENT;if(j(b)){c=d.BINARY_EVENT}var e={type:c,data:b};if("function"==typeof b[b.length-1]){i("emitting packet with ack id %d",this.ids);this.acks[this.ids]=b.pop();e.id=this.ids++}if(this.connected){this.packet(e)}else{this.sendBuffer.push(e)}return this};n.prototype.packet=function(a){a.nsp=this.nsp;this.io.packet(a)};n.prototype.onopen=function(){i("transport is open - connecting");if("/"!=this.nsp){this.packet({type:d.CONNECT})}};n.prototype.onclose=function(a){i("close (%s)",a);this.connected=false;this.disconnected=true;this.emit("disconnect",a)};n.prototype.onpacket=function(a){if(a.nsp!=this.nsp)return;switch(a.type){case d.CONNECT:this.onconnect();break;case d.EVENT:this.onevent(a);break;case d.BINARY_EVENT:this.onevent(a);break;case d.ACK:this.onack(a);break;case d.BINARY_ACK:this.onack(a);break;case d.DISCONNECT:this.ondisconnect();break;case d.ERROR:this.emit("error",a.data);break}};n.prototype.onevent=function(a){var b=a.data||[];i("emitting event %j",b);if(null!=a.id){i("attaching ack callback to event");b.push(this.ack(a.id))}if(this.connected){m.apply(this,b)}else{this.receiveBuffer.push(b)}};n.prototype.ack=function(a){var b=this;var c=false;return function(){if(c)return;c=true;var e=f(arguments);i("sending ack %j",e);var g=j(e)?d.BINARY_ACK:d.ACK;b.packet({type:g,id:a,data:e})}};n.prototype.onack=function(a){i("calling ack %s with %j",a.id,a.data);var b=this.acks[a.id];b.apply(this,a.data);delete this.acks[a.id]};n.prototype.onconnect=function(){this.connected=true;this.disconnected=false;this.emit("connect");this.emitBuffered()};n.prototype.emitBuffered=function(){var a;for(a=0;a<this.receiveBuffer.length;a++){m.apply(this,this.receiveBuffer[a])}this.receiveBuffer=[];for(a=0;a<this.sendBuffer.length;a++){this.packet(this.sendBuffer[a])}this.sendBuffer=[]};n.prototype.ondisconnect=function(){i("server disconnect (%s)",this.nsp);this.destroy();this.onclose("io server disconnect")};n.prototype.destroy=function(){for(var a=0;a<this.subs.length;a++){this.subs[a].destroy()}this.io.destroy(this)};n.prototype.close=n.prototype.disconnect=function(){if(!this.connected)return this;i("performing disconnect (%s)",this.nsp);this.packet({type:d.DISCONNECT});this.destroy();this.onclose("io client disconnect");return this}},{"./on":4,"component-bind":7,"component-emitter":8,debug:9,"has-binary-data":32,indexof:36,"socket.io-parser":40,"to-array":43}],6:[function(a,b,c){var d=typeof self!=="undefined"?self:typeof window!=="undefined"?window:{};var e=a("parseuri");var f=a("debug")("socket.io-client:url");b.exports=g;function g(a,b){var c=a;var b=b||d.location;if(null==a)a=b.protocol+"//"+b.hostname;if("string"==typeof a){if("/"==a.charAt(0)){if("undefined"!=typeof b){a=b.hostname+a}}if(!/^(https?|wss?):\/\//.test(a)){f("protocol-less url %s",a);if("undefined"!=typeof b){a=b.protocol+"//"+a}else{a="https://"+a}}f("parse %s",a);c=e(a)}if(!c.port){if(/^(http|ws)$/.test(c.protocol)){c.port="80"}else if(/^(http|ws)s$/.test(c.protocol)){c.port="443"}}c.path=c.path||"/";c.id=c.protocol+"://"+c.host+":"+c.port;c.href=c.protocol+"://"+c.host+(b&&b.port==c.port?"":":"+c.port);return c}},{debug:9,parseuri:38}],7:[function(a,b,c){var d=[].slice;b.exports=function(a,b){if("string"==typeof b)b=a[b];if("function"!=typeof b)throw new Error("bind() requires a function");var c=d.call(arguments,2);return function(){return b.apply(a,c.concat(d.call(arguments)))}}},{}],8:[function(a,b,c){b.exports=d;function d(a){if(a)return e(a)}function e(a){for(var b in d.prototype){a[b]=d.prototype[b]}return a}d.prototype.on=d.prototype.addEventListener=function(a,b){this._callbacks=this._callbacks||{};(this._callbacks[a]=this._callbacks[a]||[]).push(b);return this};d.prototype.once=func
b=null}var e=a;var g=[];while(e.byteLength>0){var h=new Uint8Array(e);var i=h[0]===0;var j="";for(var k=1;;k++){if(h[k]==255)break;j+=h[k]}e=f(e,2+j.length);j=parseInt(j);var l=f(e,0,j);if(i){try{l=String.fromCharCode.apply(null,new Uint8Array(l))}catch(m){var n=new Uint8Array(l);l="";for(var k=0;k<n.length;k++){l+=String.fromCharCode(n[k])}}}g.push(l);e=f(e,j)}var o=g.length;g.forEach(function(a,e){d(c.decodePacket(a,b),e,o)})}},{"./keys":23,after:24,"arraybuffer.slice":25,"base64-arraybuffer":26,blob:27,utf8:28}],23:[function(a,b,c){b.exports=Object.keys||function d(a){var b=[];var c=Object.prototype.hasOwnProperty;for(var d in a){if(c.call(a,d)){b.push(d)}}return b}},{}],24:[function(a,b,c){b.exports=d;function d(a,b,c){var d=false;c=c||e;f.count=a;return a===0?b():f;function f(a,e){if(f.count<=0){throw new Error("after called too many times")}--f.count;if(a){d=true;b(a);b=c}else if(f.count===0&&!d){b(null,e)}}}function e(){}},{}],25:[function(a,b,c){b.exports=function(a,b,c){var d=a.byteLength;b=b||0;c=c||d;if(a.slice){return a.slice(b,c)}if(b<0){b+=d}if(c<0){c+=d}if(c>d){c=d}if(b>=d||b>=c||d===0){return new ArrayBuffer(0)}var e=new Uint8Array(a);var f=new Uint8Array(c-b);for(var g=b,h=0;g<c;g++,h++){f[h]=e[g]}return f.buffer}},{}],26:[function(a,b,c){(function(a){"use strict";c.encode=function(b){var c=new Uint8Array(b),d,e=c.length,f="";for(d=0;d<e;d+=3){f+=a[c[d]>>2];f+=a[(c[d]&3)<<4|c[d+1]>>4];f+=a[(c[d+1]&15)<<2|c[d+2]>>6];f+=a[c[d+2]&63]}if(e%3===2){f=f.substring(0,f.length-1)+"="}else if(e%3===1){f=f.substring(0,f.length-2)+"=="}return f};c.decode=function(b){var c=b.length*.75,d=b.length,e,f=0,g,h,i,j;if(b[b.length-1]==="="){c--;if(b[b.length-2]==="="){c--}}var k=new ArrayBuffer(c),l=new Uint8Array(k);for(e=0;e<d;e+=4){g=a.indexOf(b[e]);h=a.indexOf(b[e+1]);i=a.indexOf(b[e+2]);j=a.indexOf(b[e+3]);l[f++]=g<<2|h>>4;l[f++]=(h&15)<<4|i>>2;l[f++]=(i&3)<<6|j&63}return k}})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},{}],27:[function(a,b,c){var d=typeof self!=="undefined"?self:typeof window!=="undefined"?window:{};var e=d.BlobBuilder||d.WebKitBlobBuilder||d.MSBlobBuilder||d.MozBlobBuilder;var f=function(){try{var a=new Blob(["hi"]);return a.size==2}catch(b){return false}}();var g=e&&e.prototype.append&&e.prototype.getBlob;function h(a,b){b=b||{};var c=new e;for(var d=0;d<a.length;d++){c.append(a[d])}return b.type?c.getBlob(b.type):c.getBlob()}b.exports=function(){if(f){return d.Blob}else if(g){return h}else{return undefined}}()},{}],28:[function(b,c,d){var e=typeof self!=="undefined"?self:typeof window!=="undefined"?window:{};(function(b){var f=typeof d=="object"&&d;var g=typeof c=="object"&&c&&c.exports==f&&c;var h=typeof e=="object"&&e;if(h.global===h||h.window===h){b=h}var i=String.fromCharCode;function j(a){var b=[];var c=0;var d=a.length;var e;var f;while(c<d){e=a.charCodeAt(c++);if(e>=55296&&e<=56319&&c<d){f=a.charCodeAt(c++);if((f&64512)==56320){b.push(((e&1023)<<10)+(f&1023)+65536)}else{b.push(e);c--}}else{b.push(e)}}return b}function k(a){var b=a.length;var c=-1;var d;var e="";while(++c<b){d=a[c];if(d>65535){d-=65536;e+=i(d>>>10&1023|55296);d=56320|d&1023}e+=i(d)}return e}function l(a,b){return i(a>>b&63|128)}function m(a){if((a&4294967168)==0){return i(a)}var b="";if((a&4294965248)==0){b=i(a>>6&31|192)}else if((a&4294901760)==0){b=i(a>>12&15|224);b+=l(a,6)}else if((a&4292870144)==0){b=i(a>>18&7|240);b+=l(a,12);b+=l(a,6)}b+=i(a&63|128);return b}function n(a){var b=j(a);var c=b.length;var d=-1;var e;var f="";while(++d<c){e=b[d];f+=m(e)}return f}function o(){if(s>=r){throw Error("Invalid byte index")}var a=q[s]&255;s++;if((a&192)==128){return a&63}throw Error("Invalid continuation byte")}function p(){var a;var b;var c;var d;var e;if(s>r){throw Error("Invalid byte index")}if(s==r){return false}a=q[s]&255;s++;if((a&128)==0){return a}if((a&224)==192){var b=o();e=(a&31)<<6|b;if(e>=128){return e}else{throw Error("Invalid continuation byte")}}if((a&240)==224){b=o();c=o();e=(a&15)<<12|b<<6|c;if(e>=2048){return e}else{throw Error("Invalid continuation byte")}}if((a&248)==240){b=o();c=o();d=o(
s=function(a,b){return function(c,d){if(c===undefined){return this._parts[a]||""}else{if(c!==null){c=c+"";if(c.charAt(0)===b){c=c.substring(1)}}this._parts[a]=c;this.build(!d);return this}}};for(r in q){g[r]=s(r,q[r])}q={search:["?","query"],hash:["#","fragment"]};s=function(a,b){return function(c,d){var e=this[a](c,d);return typeof e==="string"&&e.length?b+e:e}};for(r in q){g[r]=s(q[r][1],q[r][0])}g.pathname=function(a,b){if(a===undefined||a===true){var c=this._parts.path||(this._parts.hostname?"/":"");return a?f.decodePath(c):c}else{this._parts.path=a?f.recodePath(a):"/";this.build(!b);return this}};g.path=g.pathname;g.href=function(a,b){var c;if(a===undefined){return this.toString()}this._string="";this._parts=f._parts();var d=a instanceof f;var e=typeof a==="object"&&(a.hostname||a.path||a.pathname);if(a.nodeName){var g=f.getDomAttribute(a);a=a[g]||"";e=false}if(!d&&e&&a.pathname!==undefined){a=a.toString()}if(typeof a==="string"){this._parts=f.parse(a,this._parts)}else if(d||e){var i=d?a._parts:a;for(c in i){if(h.call(this._parts,c)){this._parts[c]=i[c]}}}else{throw new TypeError("invalid input")}this.build(!b);return this};g.is=function(a){var b=false;var d=false;var e=false;var g=false;var h=false;var i=false;var j=false;var k=!this._parts.urn;if(this._parts.hostname){k=false;d=f.ip4_expression.test(this._parts.hostname);e=f.ip6_expression.test(this._parts.hostname);b=d||e;g=!b;h=g&&c&&c.has(this._parts.hostname);i=g&&f.idn_expression.test(this._parts.hostname);j=g&&f.punycode_expression.test(this._parts.hostname)}switch(a.toLowerCase()){case"relative":return k;case"absolute":return!k;case"domain":case"name":return g;case"sld":return h;case"ip":return b;case"ip4":case"ipv4":case"inet4":return d;case"ip6":case"ipv6":case"inet6":return e;case"idn":return i;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return j}return null};var t=g.protocol;var u=g.port;var v=g.hostname;g.protocol=function(a,b){if(a!==undefined){if(a){a=a.replace(/:(\/\/)?$/,"");if(!a.match(f.protocol_expression)){throw new TypeError('Protocol "'+a+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]")}}}return t.call(this,a,b)};g.scheme=g.protocol;g.port=function(a,b){if(this._parts.urn){return a===undefined?"":this}if(a!==undefined){if(a===0){a=null}if(a){a+="";if(a.charAt(0)===":"){a=a.substring(1)}if(a.match(/[^0-9]/)){throw new TypeError('Port "'+a+'" contains characters other than [0-9]')}}}return u.call(this,a,b)};g.hostname=function(a,b){if(this._parts.urn){return a===undefined?"":this}if(a!==undefined){var c={};f.parseHost(a,c);a=c.hostname}return v.call(this,a,b)};g.host=function(a,b){if(this._parts.urn){return a===undefined?"":this}if(a===undefined){return this._parts.hostname?f.buildHost(this._parts):""}else{f.parseHost(a,this._parts);this.build(!b);return this}};g.authority=function(a,b){if(this._parts.urn){return a===undefined?"":this}if(a===undefined){return this._parts.hostname?f.buildAuthority(this._parts):""}else{f.parseAuthority(a,this._parts);this.build(!b);return this}};g.userinfo=function(a,b){if(this._parts.urn){return a===undefined?"":this}if(a===undefined){if(!this._parts.username){return""}var c=f.buildUserinfo(this._parts);return c.substring(0,c.length-1)}else{if(a[a.length-1]!=="@"){a+="@"}f.parseUserinfo(a,this._parts);this.build(!b);return this}};g.resource=function(a,b){var c;if(a===undefined){return this.path()+this.search()+this.hash()}c=f.parse(a);this._parts.path=c.path;this._parts.query=c.query;this._parts.fragment=c.fragment;this.build(!b);return this};g.subdomain=function(a,b){if(this._parts.urn){return a===undefined?"":this}if(a===undefined){if(!this._parts.hostname||this.is("IP")){return""}var c=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,c)||""}else{var d=this._parts.hostname.length-this.domain().length;var e=this._parts.hostname.substring(0,d);var g=new RegExp("^"+i(e));if(a&&a.charAt(a.length-1)!=="."){a+="."}if(a){f.ensureValidHostname(a)}this._parts.hostname=this._parts.hostname.replace(g,a);this.build