};n.prototype.open=n.prototype.connect=function(){if(this.connected)returnthis;this.io.open();if("open"==this.io.readyState)this.onopen();returnthis};n.prototype.send=function(){vara=f(arguments);a.unshift("message");this.emit.apply(this,a);returnthis};n.prototype.emit=function(a){if(l.hasOwnProperty(a)){m.apply(this,arguments);returnthis}varb=f(arguments);varc=d.EVENT;if(j(b)){c=d.BINARY_EVENT}vare={type:c,data:b};if("function"==typeofb[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)}returnthis};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){cased.CONNECT:this.onconnect();break;cased.EVENT:this.onevent(a);break;cased.BINARY_EVENT:this.onevent(a);break;cased.ACK:this.onack(a);break;cased.BINARY_ACK:this.onack(a);break;cased.DISCONNECT:this.ondisconnect();break;cased.ERROR:this.emit("error",a.data);break}};n.prototype.onevent=function(a){varb=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){varb=this;varc=false;returnfunction(){if(c)return;c=true;vare=f(arguments);i("sending ack %j",e);varg=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);varb=this.acks[a.id];b.apply(this,a.data);deletethis.acks[a.id]};n.prototype.onconnect=function(){this.connected=true;this.disconnected=false;this.emit("connect");this.emitBuffered()};n.prototype.emitBuffered=function(){vara;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(vara=0;a<this.subs.length;a++){this.subs[a].destroy()}this.io.destroy(this)};n.prototype.close=n.prototype.disconnect=function(){if(!this.connected)returnthis;i("performing disconnect (%s)",this.nsp);this.packet({type:d.DISCONNECT});this.destroy();this.onclose("io client disconnect");returnthis}},{"./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){vard=typeofself!=="undefined"?self:typeofwindow!=="undefined"?window:{};vare=a("parseuri");varf=a("debug")("socket.io-client:url");b.exports=g;functiong(a,b){varc=a;varb=b||d.location;if(null==a)a=b.protocol+"//"+b.hostname;if("string"==typeofa){if("/"==a.charAt(0)){if("undefined"!=typeofb){a=b.hostname+a}}if(!/^(https?|wss?):\/\//.test(a)){f("protocol-less url %s",a);if("undefined"!=typeofb){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"}elseif(/^(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);returnc}},{debug:9,parseuri:38}],7:[function(a,b,c){vard=[].slice;b.exports=function(a,b){if("string"==typeofb)b=a[b];if("function"!=typeofb)thrownewError("bind() requires a function");varc=d.call(arguments,2);returnfunction(){returnb.apply(a,c.concat(d.call(arguments)))}}},{}],8:[function(a,b,c){b.exports=d;functiond(a){if(a)returne(a)}functione(a){for(varbind.prototype){a[b]=d.prototype[b]}returna}d.prototype.on=d.prototype.addEventListener=function(a,b){this._callbacks=this._callbacks||{};(this._callbacks[a]=this._callbacks[a]||[]).push(b);returnthis};d.prototype.once=func
b=null}vare=a;varg=[];while(e.byteLength>0){varh=newUint8Array(e);vari=h[0]===0;varj="";for(vark=1;;k++){if(h[k]==255)break;j+=h[k]}e=f(e,2+j.length);j=parseInt(j);varl=f(e,0,j);if(i){try{l=String.fromCharCode.apply(null,newUint8Array(l))}catch(m){varn=newUint8Array(l);l="";for(vark=0;k<n.length;k++){l+=String.fromCharCode(n[k])}}}g.push(l);e=f(e,j)}varo=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||functiond(a){varb=[];varc=Object.prototype.hasOwnProperty;for(vardina){if(c.call(a,d)){b.push(d)}}returnb}},{}],24:[function(a,b,c){b.exports=d;functiond(a,b,c){vard=false;c=c||e;f.count=a;returna===0?b():f;functionf(a,e){if(f.count<=0){thrownewError("after called too many times")}--f.count;if(a){d=true;b(a);b=c}elseif(f.count===0&&!d){b(null,e)}}}functione(){}},{}],25:[function(a,b,c){b.exports=function(a,b,c){vard=a.byteLength;b=b||0;c=c||d;if(a.slice){returna.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){returnnewArrayBuffer(0)}vare=newUint8Array(a);varf=newUint8Array(c-b);for(varg=b,h=0;g<c;g++,h++){f[h]=e[g]}returnf.buffer}},{}],26:[function(a,b,c){(function(a){"use strict";c.encode=function(b){varc=newUint8Array(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)+"="}elseif(e%3===1){f=f.substring(0,f.length-2)+"=="}returnf};c.decode=function(b){varc=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--}}vark=newArrayBuffer(c),l=newUint8Array(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}returnk}})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},{}],27:[function(a,b,c){vard=typeofself!=="undefined"?self:typeofwindow!=="undefined"?window:{};vare=d.BlobBuilder||d.WebKitBlobBuilder||d.MSBlobBuilder||d.MozBlobBuilder;varf=function(){try{vara=newBlob(["hi"]);returna.size==2}catch(b){returnfalse}}();varg=e&&e.prototype.append&&e.prototype.getBlob;functionh(a,b){b=b||{};varc=newe;for(vard=0;d<a.length;d++){c.append(a[d])}returnb.type?c.getBlob(b.type):c.getBlob()}b.exports=function(){if(f){returnd.Blob}elseif(g){returnh}else{returnundefined}}()},{}],28:[function(b,c,d){vare=typeofself!=="undefined"?self:typeofwindow!=="undefined"?window:{};(function(b){varf=typeofd=="object"&&d;varg=typeofc=="object"&&c&&c.exports==f&&c;varh=typeofe=="object"&&e;if(h.global===h||h.window===h){b=h}vari=String.fromCharCode;functionj(a){varb=[];varc=0;vard=a.length;vare;varf;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)}}returnb}functionk(a){varb=a.length;varc=-1;vard;vare="";while(++c<b){d=a[c];if(d>65535){d-=65536;e+=i(d>>>10&1023|55296);d=56320|d&1023}e+=i(d)}returne}functionl(a,b){returni(a>>b&63|128)}functionm(a){if((a&4294967168)==0){returni(a)}varb="";if((a&4294965248)==0){b=i(a>>6&31|192)}elseif((a&4294901760)==0){b=i(a>>12&15|224);b+=l(a,6)}elseif((a&4292870144)==0){b=i(a>>18&7|240);b+=l(a,12);b+=l(a,6)}b+=i(a&63|128);returnb}functionn(a){varb=j(a);varc=b.length;vard=-1;vare;varf="";while(++d<c){e=b[d];f+=m(e)}returnf}functiono(){if(s>=r){throwError("Invalid byte index")}vara=q[s]&255;s++;if((a&192)==128){returna&63}throwError("Invalid continuation byte")}functionp(){vara;varb;varc;vard;vare;if(s>r){throwError("Invalid byte index")}if(s==r){returnfalse}a=q[s]&255;s++;if((a&128)==0){returna}if((a&224)==192){varb=o();e=(a&31)<<6|b;if(e>=128){returne}else{throwError("Invalid continuation byte")}}if((a&240)==224){b=o();c=o();e=(a&15)<<12|b<<6|c;if(e>=2048){returne}else{throwError("Invalid continuation byte")}}if((a&248)==240){b=o();c=o();d=o(
s=function(a,b){returnfunction(c,d){if(c===undefined){returnthis._parts[a]||""}else{if(c!==null){c=c+"";if(c.charAt(0)===b){c=c.substring(1)}}this._parts[a]=c;this.build(!d);returnthis}}};for(rinq){g[r]=s(r,q[r])}q={search:["?","query"],hash:["#","fragment"]};s=function(a,b){returnfunction(c,d){vare=this[a](c,d);returntypeofe==="string"&&e.length?b+e:e}};for(rinq){g[r]=s(q[r][1],q[r][0])}g.pathname=function(a,b){if(a===undefined||a===true){varc=this._parts.path||(this._parts.hostname?"/":"");returna?f.decodePath(c):c}else{this._parts.path=a?f.recodePath(a):"/";this.build(!b);returnthis}};g.path=g.pathname;g.href=function(a,b){varc;if(a===undefined){returnthis.toString()}this._string="";this._parts=f._parts();vard=ainstanceoff;vare=typeofa==="object"&&(a.hostname||a.path||a.pathname);if(a.nodeName){varg=f.getDomAttribute(a);a=a[g]||"";e=false}if(!d&&e&&a.pathname!==undefined){a=a.toString()}if(typeofa==="string"){this._parts=f.parse(a,this._parts)}elseif(d||e){vari=d?a._parts:a;for(cini){if(h.call(this._parts,c)){this._parts[c]=i[c]}}}else{thrownewTypeError("invalid input")}this.build(!b);returnthis};g.is=function(a){varb=false;vard=false;vare=false;varg=false;varh=false;vari=false;varj=false;vark=!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":returnk;case"absolute":return!k;case"domain":case"name":returng;case"sld":returnh;case"ip":returnb;case"ip4":case"ipv4":case"inet4":returnd;case"ip6":case"ipv6":case"inet6":returne;case"idn":returni;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":returnj}returnnull};vart=g.protocol;varu=g.port;varv=g.hostname;g.protocol=function(a,b){if(a!==undefined){if(a){a=a.replace(/:(\/\/)?$/,"");if(!a.match(f.protocol_expression)){thrownewTypeError('Protocol "'+a+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]")}}}returnt.call(this,a,b)};g.scheme=g.protocol;g.port=function(a,b){if(this._parts.urn){returna===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]/)){thrownewTypeError('Port "'+a+'" contains characters other than [0-9]')}}}returnu.call(this,a,b)};g.hostname=function(a,b){if(this._parts.urn){returna===undefined?"":this}if(a!==undefined){varc={};f.parseHost(a,c);a=c.hostname}returnv.call(this,a,b)};g.host=function(a,b){if(this._parts.urn){returna===undefined?"":this}if(a===undefined){returnthis._parts.hostname?f.buildHost(this._parts):""}else{f.parseHost(a,this._parts);this.build(!b);returnthis}};g.authority=function(a,b){if(this._parts.urn){returna===undefined?"":this}if(a===undefined){returnthis._parts.hostname?f.buildAuthority(this._parts):""}else{f.parseAuthority(a,this._parts);this.build(!b);returnthis}};g.userinfo=function(a,b){if(this._parts.urn){returna===undefined?"":this}if(a===undefined){if(!this._parts.username){return""}varc=f.buildUserinfo(this._parts);returnc.substring(0,c.length-1)}else{if(a[a.length-1]!=="@"){a+="@"}f.parseUserinfo(a,this._parts);this.build(!b);returnthis}};g.resource=function(a,b){varc;if(a===undefined){returnthis.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);returnthis};g.subdomain=function(a,b){if(this._parts.urn){returna===undefined?"":this}if(a===undefined){if(!this._parts.hostname||this.is("IP")){return""}varc=this._parts.hostname.length-this.domain().length-1;returnthis._parts.hostname.substring(0,c)||""}else{vard=this._parts.hostname.length-this.domain().length;vare=this._parts.hostname.substring(0,d);varg=newRegExp("^"+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