webpack-dev-server 1.12.0 → 1.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
- !function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){function r(){h?(console.log("[WDS] App hot update..."),window.postMessage("webpackHotUpdate"+p,"*")):(console.log("[WDS] App updated. Reloading..."),window.location.reload())}var o=n(54),i=n(48),s=n(52),a=document.getElementsByTagName("script"),c=o.parse(a[a.length-1].getAttribute("src").replace(/\/[^\/]+$/,""));i=i.connect(o.format({protocol:c.protocol,auth:c.auth,hostname:"0.0.0.0"===c.hostname?window.location.hostname:c.hostname,port:c.port}),{path:"/"===c.path?null:c.path});var h=!1,u=!0,p="";i.on("hot",function(){h=!0,console.log("[WDS] Hot Module Replacement enabled.")}),i.on("invalid",function(){console.log("[WDS] App updated. Recompiling...")}),i.on("hash",function(t){p=t}),i.on("still-ok",function(){console.log("[WDS] Nothing changed.")}),i.on("ok",function(){return u?u=!1:void r()}),i.on("warnings",function(t){console.log("[WDS] Warnings while compiling.");for(var e=0;e<t.length;e++)console.warn(s(t[e]));return u?u=!1:void r()}),i.on("errors",function(t){console.log("[WDS] Errors while compiling.");for(var e=0;e<t.length;e++)console.error(s(t[e]));return u?u=!1:void r()}),i.on("proxy-error",function(t){console.log("[WDS] Proxy error.");for(var e=0;e<t.length;e++)console.error(s(t[e]));return u?u=!1:void r()}),i.on("disconnect",function(){console.error("[WDS] Disconnected!")})},function(t,e){function n(t){return t?r(t):void 0}function r(t){for(var e in n.prototype)t[e]=n.prototype[e];return t}t.exports=n,n.prototype.on=n.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks[t]=this._callbacks[t]||[]).push(e),this},n.prototype.once=function(t,e){function n(){r.off(t,n),e.apply(this,arguments)}var r=this;return this._callbacks=this._callbacks||{},n.fn=e,this.on(t,n),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks[t];if(!n)return this;if(1==arguments.length)return delete this._callbacks[t],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===e||r.fn===e){n.splice(o,1);break}return this},n.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),n=this._callbacks[t];if(n){n=n.slice(0);for(var r=0,o=n.length;o>r;++r)n[r].apply(this,e)}return this},n.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks[t]||[]},n.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e,n){(function(t){function r(t,n){var r="b"+e.packets[t.type]+t.data.data;return n(r)}function o(t,n,r){if(!n)return e.encodeBase64Packet(t,r);var o=t.data,i=new Uint8Array(o),s=new Uint8Array(1+o.byteLength);s[0]=g[t.type];for(var a=0;a<i.length;a++)s[a+1]=i[a];return r(s.buffer)}function i(t,n,r){if(!n)return e.encodeBase64Packet(t,r);var o=new FileReader;return o.onload=function(){t.data=o.result,e.encodePacket(t,n,!0,r)},o.readAsArrayBuffer(t.data)}function s(t,n,r){if(!n)return e.encodeBase64Packet(t,r);if(m)return i(t,n,r);var o=new Uint8Array(1);o[0]=g[t.type];var s=new w([o.buffer,t.data]);return r(s)}function a(t,e,n){for(var r=new Array(t.length),o=f(t.length,n),i=function(t,n,o){e(n,function(e,n){r[t]=n,o(e,r)})},s=0;s<t.length;s++)i(s,t[s],o)}var c=n(37),h=n(14),u=n(24),p=n(26),f=n(22),l=n(55),d=navigator.userAgent.match(/Android/i),y=/PhantomJS/i.test(navigator.userAgent),m=d||y;e.protocol=3;var g=e.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},v=c(g),b={type:"error",data:"parser error"},w=n(27);e.encodePacket=function(e,n,i,a){"function"==typeof n&&(a=n,n=!1),"function"==typeof i&&(a=i,i=null);var c=void 0===e.data?void 0:e.data.buffer||e.data;if(t.ArrayBuffer&&c instanceof ArrayBuffer)return o(e,n,a);if(w&&c instanceof t.Blob)return s(e,n,a);if(c&&c.base64)return r(e,a);var h=g[e.type];return void 0!==e.data&&(h+=i?l.encode(String(e.data)):String(e.data)),a(""+h)},e.encodeBase64Packet=function(n,r){var o="b"+e.packets[n.type];if(w&&n.data instanceof w){var i=new FileReader;return i.onload=function(){var t=i.result.split(",")[1];r(o+t)},i.readAsDataURL(n.data)}var s;try{s=String.fromCharCode.apply(null,new Uint8Array(n.data))}catch(a){for(var c=new Uint8Array(n.data),h=new Array(c.length),u=0;u<c.length;u++)h[u]=c[u];s=String.fromCharCode.apply(null,h)}return o+=t.btoa(s),r(o)},e.decodePacket=function(t,n,r){if("string"==typeof t||void 0===t){if("b"==t.charAt(0))return e.decodeBase64Packet(t.substr(1),n);if(r)try{t=l.decode(t)}catch(o){return b}var i=t.charAt(0);return Number(i)==i&&v[i]?t.length>1?{type:v[i],data:t.substring(1)}:{type:v[i]}:b}var s=new Uint8Array(t),i=s[0],a=u(t,1);return w&&"blob"===n&&(a=new w([a])),{type:v[i],data:a}},e.decodeBase64Packet=function(e,n){var r=v[e.charAt(0)];if(!t.ArrayBuffer)return{type:r,data:{base64:!0,data:e.substr(1)}};var o=p.decode(e.substr(1));return"blob"===n&&w&&(o=new w([o])),{type:r,data:o}},e.encodePayload=function(t,n,r){function o(t){return t.length+":"+t}function i(t,r){e.encodePacket(t,s?n:!1,!0,function(t){r(null,o(t))})}"function"==typeof n&&(r=n,n=null);var s=h(t);return n&&s?w&&!m?e.encodePayloadAsBlob(t,r):e.encodePayloadAsArrayBuffer(t,r):t.length?void a(t,i,function(t,e){return r(e.join(""))}):r("0:")},e.decodePayload=function(t,n,r){if("string"!=typeof t)return e.decodePayloadAsBinary(t,n,r);"function"==typeof n&&(r=n,n=null);var o;if(""==t)return r(b,0,1);for(var i,s,a="",c=0,h=t.length;h>c;c++){var u=t.charAt(c);if(":"!=u)a+=u;else{if(""==a||a!=(i=Number(a)))return r(b,0,1);if(s=t.substr(c+1,i),a!=s.length)return r(b,0,1);if(s.length){if(o=e.decodePacket(s,n,!0),b.type==o.type&&b.data==o.data)return r(b,0,1);var p=r(o,c+i,h);if(!1===p)return}c+=i,a=""}}return""!=a?r(b,0,1):void 0},e.encodePayloadAsArrayBuffer=function(t,n){function r(t,n){e.encodePacket(t,!0,!0,function(t){return n(null,t)})}return t.length?void a(t,r,function(t,e){var r=e.reduce(function(t,e){var n;return n="string"==typeof e?e.length:e.byteLength,t+n.toString().length+n+2},0),o=new Uint8Array(r),i=0;return e.forEach(function(t){var e="string"==typeof t,n=t;if(e){for(var r=new Uint8Array(t.length),s=0;s<t.length;s++)r[s]=t.charCodeAt(s);n=r.buffer}e?o[i++]=0:o[i++]=1;for(var a=n.byteLength.toString(),s=0;s<a.length;s++)o[i++]=parseInt(a[s]);o[i++]=255;for(var r=new Uint8Array(n),s=0;s<r.length;s++)o[i++]=r[s]}),n(o.buffer)}):n(new ArrayBuffer(0))},e.encodePayloadAsBlob=function(t,n){function r(t,n){e.encodePacket(t,!0,!0,function(t){var e=new Uint8Array(1);if(e[0]=1,"string"==typeof t){for(var r=new Uint8Array(t.length),o=0;o<t.length;o++)r[o]=t.charCodeAt(o);t=r.buffer,e[0]=0}for(var i=t instanceof ArrayBuffer?t.byteLength:t.size,s=i.toString(),a=new Uint8Array(s.length+1),o=0;o<s.length;o++)a[o]=parseInt(s[o]);if(a[s.length]=255,w){var c=new w([e.buffer,a.buffer,t]);n(null,c)}})}a(t,r,function(t,e){return n(new w(e))})},e.decodePayloadAsBinary=function(t,n,r){"function"==typeof n&&(r=n,n=null);for(var o=t,i=[],s=!1;o.byteLength>0;){for(var a=new Uint8Array(o),c=0===a[0],h="",p=1;255!=a[p];p++){if(h.length>310){s=!0;break}h+=a[p]}if(s)return r(b,0,1);o=u(o,2+h.length),h=parseInt(h);var f=u(o,0,h);if(c)try{f=String.fromCharCode.apply(null,new Uint8Array(f))}catch(l){var d=new Uint8Array(f);f="";for(var p=0;p<d.length;p++)f+=String.fromCharCode(d[p])}i.push(f),o=u(o,h)}var y=i.length;i.forEach(function(t,o){r(e.decodePacket(t,n,!0),o,y)})}}).call(e,function(){return this}())},function(t,e){t.exports=function(t,e){var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e,n){function r(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function o(){var t=arguments,n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),!n)return t;var r="color: "+this.color;t=[t[0],r,"color: inherit"].concat(Array.prototype.slice.call(t,1));var o=0,i=0;return t[0].replace(/%[a-z%]/g,function(t){"%%"!==t&&(o++,"%c"===t&&(i=o))}),t.splice(i,0,r),t}function i(){return"object"==typeof console&&"function"==typeof console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(t){try{null==t?localStorage.removeItem("debug"):localStorage.debug=t}catch(e){}}function a(){var t;try{t=localStorage.debug}catch(e){}return t}e=t.exports=n(34),e.log=i,e.formatArgs=o,e.save=s,e.load=a,e.useColors=r,e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(t){return JSON.stringify(t)},e.enable(a())},function(t,e){function n(t){return n.enabled(t)?function(e){e=r(e);var o=new Date,i=o-(n[t]||o);n[t]=o,e=t+" "+e+" +"+n.humanize(i),window.console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}:function(){}}function r(t){return t instanceof Error?t.stack||t.message:t}t.exports=n,n.names=[],n.skips=[],n.enable=function(t){try{localStorage.debug=t}catch(e){}for(var r=(t||"").split(/[\s,]+/),o=r.length,i=0;o>i;i++)t=r[i].replace("*",".*?"),"-"===t[0]?n.skips.push(new RegExp("^"+t.substr(1)+"$")):n.names.push(new RegExp("^"+t+"$"))},n.disable=function(){n.enable("")},n.humanize=function(t){var e=1e3,n=6e4,r=60*n;return t>=r?(t/r).toFixed(1)+"h":t>=n?(t/n).toFixed(1)+"m":t>=e?(t/e|0)+"s":t+"ms"},n.enabled=function(t){for(var e=0,r=n.skips.length;r>e;e++)if(n.skips[e].test(t))return!1;for(var e=0,r=n.names.length;r>e;e++)if(n.names[e].test(t))return!0;return!1};try{window.localStorage&&n.enable(localStorage.debug)}catch(o){}},function(t,e,n){function r(t){this.path=t.path,this.hostname=t.hostname,this.port=t.port,this.secure=t.secure,this.query=t.query,this.timestampParam=t.timestampParam,this.timestampRequests=t.timestampRequests,this.readyState="",this.agent=t.agent||!1,this.socket=t.socket,this.enablesXDR=t.enablesXDR,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized}var o=n(2),i=n(1);t.exports=r,i(r.prototype),r.timestamps=0,r.prototype.onError=function(t,e){var n=new Error(t);return n.type="TransportError",n.description=e,this.emit("error",n),this},r.prototype.open=function(){return("closed"==this.readyState||""==this.readyState)&&(this.readyState="opening",this.doOpen()),this},r.prototype.close=function(){return("opening"==this.readyState||"open"==this.readyState)&&(this.doClose(),this.onClose()),this},r.prototype.send=function(t){if("open"!=this.readyState)throw new Error("Transport not open");this.write(t)},r.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},r.prototype.onData=function(t){var e=o.decodePacket(t,this.socket.binaryType);this.onPacket(e)},r.prototype.onPacket=function(t){this.emit("packet",t)},r.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},function(t,e,n){var r=n(39);t.exports=function(t){var e=t.xdomain,n=t.xscheme,o=t.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!e||r))return new XMLHttpRequest}catch(i){}try{if("undefined"!=typeof XDomainRequest&&!n&&o)return new XDomainRequest}catch(i){}if(!e)try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(i){}}},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e){e.encode=function(t){var e="";for(var n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e},e.decode=function(t){for(var e={},n=t.split("&"),r=0,o=n.length;o>r;r++){var i=n[r].split("=");e[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return e}},function(t,e,n){function r(){}function o(t){var n="",r=!1;return n+=t.type,(e.BINARY_EVENT==t.type||e.BINARY_ACK==t.type)&&(n+=t.attachments,n+="-"),t.nsp&&"/"!=t.nsp&&(r=!0,n+=t.nsp),null!=t.id&&(r&&(n+=",",r=!1),n+=t.id),null!=t.data&&(r&&(n+=","),n+=p.stringify(t.data)),u("encoded %j as %s",t,n),n}function i(t,e){function n(t){var n=l.deconstructPacket(t),r=o(n.packet),i=n.buffers;i.unshift(r),e(i)}l.removeBlobs(t,n)}function s(){this.reconstructor=null}function a(t){var n={},r=0;if(n.type=Number(t.charAt(0)),null==e.types[n.type])return h();if(e.BINARY_EVENT==n.type||e.BINARY_ACK==n.type){for(var o="";"-"!=t.charAt(++r)&&(o+=t.charAt(r),r!=t.length););if(o!=Number(o)||"-"!=t.charAt(r))throw new Error("Illegal attachments");n.attachments=Number(o)}if("/"==t.charAt(r+1))for(n.nsp="";++r;){var i=t.charAt(r);if(","==i)break;if(n.nsp+=i,r==t.length)break}else n.nsp="/";var s=t.charAt(r+1);if(""!==s&&Number(s)==s){for(n.id="";++r;){var i=t.charAt(r);if(null==i||Number(i)!=i){--r;break}if(n.id+=t.charAt(r),r==t.length)break}n.id=Number(n.id)}if(t.charAt(++r))try{n.data=p.parse(t.substr(r))}catch(a){return h()}return u("decoded %s as %j",t,n),n}function c(t){this.reconPack=t,this.buffers=[]}function h(t){return{type:e.ERROR,data:"parser error"}}var u=n(51)("socket.io-parser"),p=n(40),f=(n(8),n(1)),l=n(50),d=n(20);e.protocol=4,e.types=["CONNECT","DISCONNECT","EVENT","BINARY_EVENT","ACK","BINARY_ACK","ERROR"],e.CONNECT=0,e.DISCONNECT=1,e.EVENT=2,e.ACK=3,e.ERROR=4,e.BINARY_EVENT=5,e.BINARY_ACK=6,e.Encoder=r,e.Decoder=s,r.prototype.encode=function(t,n){if(u("encoding packet %j",t),e.BINARY_EVENT==t.type||e.BINARY_ACK==t.type)i(t,n);else{var r=o(t);n([r])}},f(s.prototype),s.prototype.add=function(t){var n;if("string"==typeof t)n=a(t),e.BINARY_EVENT==n.type||e.BINARY_ACK==n.type?(this.reconstructor=new c(n),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",n)):this.emit("decoded",n);else{if(!d(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,this.emit("decoded",n))}},s.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},c.prototype.takeBinaryData=function(t){if(this.buffers.push(t),this.buffers.length==this.reconPack.attachments){var e=l.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null},c.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},function(t,e){var n=[].slice;t.exports=function(t,e){if("string"==typeof e&&(e=t[e]),"function"!=typeof e)throw new Error("bind() requires a function");var r=n.call(arguments,2);return function(){return e.apply(t,r.concat(n.call(arguments)))}}},function(t,e,n){(function(t){function r(e){var n,r=!1,a=!1,c=!1!==e.jsonp;if(t.location){var h="https:"==location.protocol,u=location.port;u||(u=h?443:80),r=e.hostname!=location.hostname||u!=e.port,a=e.secure!=h}if(e.xdomain=r,e.xscheme=a,n=new o(e),"open"in n&&!e.forceJSONP)return new i(e);if(!c)throw new Error("JSONP disabled");return new s(e)}var o=n(7),i=n(32),s=n(31),a=n(33);e.polling=r,e.websocket=a}).call(e,function(){return this}())},function(t,e,n){function r(t){var e=t&&t.forceBase64;(!h||e)&&(this.supportsBinary=!1),o.call(this,t)}var o=n(6),i=n(9),s=n(2),a=n(3),c=n(4)("engine.io-client:polling");t.exports=r;var h=function(){var t=n(7),e=new t({xdomain:!1});return null!=e.responseType}();a(r,o),r.prototype.name="polling",r.prototype.doOpen=function(){this.poll()},r.prototype.pause=function(t){function e(){c("paused"),n.readyState="paused",t()}var n=this;if(this.readyState="pausing",this.polling||!this.writable){var r=0;this.polling&&(c("we are currently polling - waiting to pause"),r++,this.once("pollComplete",function(){c("pre-pause polling complete"),--r||e()})),this.writable||(c("we are currently writing - waiting to pause"),r++,this.once("drain",function(){c("pre-pause writing complete"),--r||e()}))}else e()},r.prototype.poll=function(){c("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},r.prototype.onData=function(t){var e=this;c("polling got data %s",t);var n=function(t,n,r){return"opening"==e.readyState&&e.onOpen(),"close"==t.type?(e.onClose(),!1):void e.onPacket(t)};s.decodePayload(t,this.socket.binaryType,n),"closed"!=this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"==this.readyState?this.poll():c('ignoring poll - transport state "%s"',this.readyState))},r.prototype.doClose=function(){function t(){c("writing close packet"),e.write([{type:"close"}])}var e=this;"open"==this.readyState?(c("transport open - closing"),t()):(c("transport not open - deferring close"),this.once("open",t))},r.prototype.write=function(t){var e=this;this.writable=!1;var n=function(){e.writable=!0,e.emit("drain")},e=this;s.encodePayload(t,this.supportsBinary,function(t){e.doWrite(t,n)})},r.prototype.uri=function(){var t=this.query||{},e=this.secure?"https":"http",n="";return!1!==this.timestampRequests&&(t[this.timestampParam]=+new Date+"-"+o.timestamps++),this.supportsBinary||t.sid||(t.b64=1),t=i.encode(t),this.port&&("https"==e&&443!=this.port||"http"==e&&80!=this.port)&&(n=":"+this.port),t.length&&(t="?"+t),e+"://"+this.hostname+n+this.path+t}},function(t,e,n){(function(e){function r(t){function n(t){if(!t)return!1;if(e.Buffer&&e.Buffer.isBuffer(t)||e.ArrayBuffer&&t instanceof ArrayBuffer||e.Blob&&t instanceof Blob||e.File&&t instanceof File)return!0;if(o(t)){for(var r=0;r<t.length;r++)if(n(t[r]))return!0}else if(t&&"object"==typeof t){t.toJSON&&(t=t.toJSON());for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&n(t[i]))return!0}return!1}return n(t)}var o=n(8);t.exports=r}).call(e,function(){return this}())},function(t,e){var n=[].indexOf;t.exports=function(t,e){if(n)return t.indexOf(e);for(var r=0;r<t.length;++r)if(t[r]===e)return r;return-1}},function(t,e,n){function r(t,e){return this instanceof r?(t&&"object"==typeof t&&(e=t,t=void 0),e=e||{},e.path=e.path||"/socket.io",this.nsps={},this.subs=[],this.opts=e,this.reconnection(e.reconnection!==!1),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(e.randomizationFactor||.5),this.backoff=new f({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this.readyState="closed",this.uri=t,this.connected=[],this.encoding=!1,this.packetBuffer=[],this.encoder=new a.Encoder,this.decoder=new a.Decoder,this.autoConnect=e.autoConnect!==!1,void(this.autoConnect&&this.open())):new r(t,e)}var o=(n(19),n(28)),i=n(18),s=n(1),a=n(10),c=n(17),h=n(11),u=(n(41),n(5)("socket.io-client:manager")),p=n(15),f=n(25);t.exports=r,r.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var t in this.nsps)this.nsps[t].emit.apply(this.nsps[t],arguments)},r.prototype.updateSocketIds=function(){for(var t in this.nsps)this.nsps[t].id=this.engine.id},s(r.prototype),r.prototype.reconnection=function(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection},r.prototype.reconnectionAttempts=function(t){return arguments.length?(this._reconnectionAttempts=t,this):this._reconnectionAttempts},r.prototype.reconnectionDelay=function(t){return arguments.length?(this._reconnectionDelay=t,this.backoff&&this.backoff.setMin(t),this):this._reconnectionDelay},r.prototype.randomizationFactor=function(t){return arguments.length?(this._randomizationFactor=t,this.backoff&&this.backoff.setJitter(t),this):this._randomizationFactor},r.prototype.reconnectionDelayMax=function(t){return arguments.length?(this._reconnectionDelayMax=t,this.backoff&&this.backoff.setMax(t),this):this._reconnectionDelayMax},r.prototype.timeout=function(t){return arguments.length?(this._timeout=t,this):this._timeout},r.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},r.prototype.open=r.prototype.connect=function(t){if(u("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;u("opening %s",this.uri),this.engine=o(this.uri,this.opts);var e=this.engine,n=this;this.readyState="opening",this.skipReconnect=!1;var r=c(e,"open",function(){n.onopen(),t&&t()}),i=c(e,"error",function(e){if(u("connect_error"),n.cleanup(),n.readyState="closed",n.emitAll("connect_error",e),t){var r=new Error("Connection error");r.data=e,t(r)}else n.maybeReconnectOnOpen()});if(!1!==this._timeout){var s=this._timeout;u("connect attempt will timeout after %d",s);var a=setTimeout(function(){u("connect attempt timed out after %d",s),r.destroy(),e.close(),e.emit("error","timeout"),n.emitAll("connect_timeout",s)},s);this.subs.push({destroy:function(){clearTimeout(a)}})}return this.subs.push(r),this.subs.push(i),this},r.prototype.onopen=function(){u("open"),this.cleanup(),this.readyState="open",this.emit("open");var t=this.engine;this.subs.push(c(t,"data",h(this,"ondata"))),this.subs.push(c(this.decoder,"decoded",h(this,"ondecoded"))),this.subs.push(c(t,"error",h(this,"onerror"))),this.subs.push(c(t,"close",h(this,"onclose")))},r.prototype.ondata=function(t){this.decoder.add(t)},r.prototype.ondecoded=function(t){this.emit("packet",t)},r.prototype.onerror=function(t){u("error",t),this.emitAll("error",t)},r.prototype.socket=function(t){var e=this.nsps[t];if(!e){e=new i(this,t),this.nsps[t]=e;var n=this;e.on("connect",function(){e.id=n.engine.id,~p(n.connected,e)||n.connected.push(e)})}return e},r.prototype.destroy=function(t){var e=p(this.connected,t);~e&&this.connected.splice(e,1),this.connected.length||this.close()},r.prototype.packet=function(t){u("writing packet %j",t);var e=this;e.encoding?e.packetBuffer.push(t):(e.encoding=!0,this.encoder.encode(t,function(t){for(var n=0;n<t.length;n++)e.engine.write(t[n]);e.encoding=!1,e.processPacketQueue()}))},r.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var t=this.packetBuffer.shift();this.packet(t)}},r.prototype.cleanup=function(){for(var t;t=this.subs.shift();)t.destroy();this.packetBuffer=[],this.encoding=!1,this.decoder.destroy()},r.prototype.close=r.prototype.disconnect=function(){this.skipReconnect=!0,this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},r.prototype.onclose=function(t){u("close"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",t),this._reconnection&&!this.skipReconnect&&this.reconnect()},r.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var t=this;if(this.backoff.attempts>=this._reconnectionAttempts)u("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var e=this.backoff.duration();u("will wait %dms before reconnect attempt",e),this.reconnecting=!0;var n=setTimeout(function(){t.skipReconnect||(u("attempting reconnect"),t.emitAll("reconnect_attempt",t.backoff.attempts),t.emitAll("reconnecting",t.backoff.attempts),t.skipReconnect||t.open(function(e){e?(u("reconnect attempt error"),t.reconnecting=!1,t.reconnect(),t.emitAll("reconnect_error",e.data)):(u("reconnect success"),t.onreconnect())}))},e);this.subs.push({destroy:function(){clearTimeout(n)}})}},r.prototype.onreconnect=function(){var t=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",t)}},function(t,e){function n(t,e,n){return t.on(e,n),{destroy:function(){t.removeListener(e,n)}}}t.exports=n},function(t,e,n){function r(t,e){this.io=t,this.nsp=e,this.json=this,this.ids=0,this.acks={},this.io.autoConnect&&this.open(),this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0}var o=n(10),i=n(1),s=n(53),a=n(17),c=n(11),h=n(5)("socket.io-client:socket"),u=n(14);t.exports=e=r;var p={connect:1,connect_error:1,connect_timeout:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1},f=i.prototype.emit;i(r.prototype),r.prototype.subEvents=function(){if(!this.subs){var t=this.io;this.subs=[a(t,"open",c(this,"onopen")),a(t,"packet",c(this,"onpacket")),a(t,"close",c(this,"onclose"))]}},r.prototype.open=r.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),"open"==this.io.readyState&&this.onopen(),this)},r.prototype.send=function(){var t=s(arguments);return t.unshift("message"),this.emit.apply(this,t),this},r.prototype.emit=function(t){if(p.hasOwnProperty(t))return f.apply(this,arguments),this;var e=s(arguments),n=o.EVENT;u(e)&&(n=o.BINARY_EVENT);var r={type:n,data:e};return"function"==typeof e[e.length-1]&&(h("emitting packet with ack id %d",this.ids),this.acks[this.ids]=e.pop(),r.id=this.ids++),this.connected?this.packet(r):this.sendBuffer.push(r),this},r.prototype.packet=function(t){t.nsp=this.nsp,this.io.packet(t)},r.prototype.onopen=function(){h("transport is open - connecting"),"/"!=this.nsp&&this.packet({type:o.CONNECT})},r.prototype.onclose=function(t){h("close (%s)",t),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",t)},r.prototype.onpacket=function(t){if(t.nsp==this.nsp)switch(t.type){case o.CONNECT:this.onconnect();break;case o.EVENT:this.onevent(t);break;case o.BINARY_EVENT:this.onevent(t);break;case o.ACK:this.onack(t);break;case o.BINARY_ACK:this.onack(t);break;case o.DISCONNECT:this.ondisconnect();break;case o.ERROR:this.emit("error",t.data)}},r.prototype.onevent=function(t){var e=t.data||[];h("emitting event %j",e),null!=t.id&&(h("attaching ack callback to event"),e.push(this.ack(t.id))),this.connected?f.apply(this,e):this.receiveBuffer.push(e)},r.prototype.ack=function(t){var e=this,n=!1;return function(){if(!n){n=!0;var r=s(arguments);h("sending ack %j",r);var i=u(r)?o.BINARY_ACK:o.ACK;e.packet({type:i,id:t,data:r})}}},r.prototype.onack=function(t){h("calling ack %s with %j",t.id,t.data);var e=this.acks[t.id];e.apply(this,t.data),delete this.acks[t.id]},r.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},r.prototype.emitBuffered=function(){var t;for(t=0;t<this.receiveBuffer.length;t++)f.apply(this,this.receiveBuffer[t]);for(this.receiveBuffer=[],t=0;t<this.sendBuffer.length;t++)this.packet(this.sendBuffer[t]);this.sendBuffer=[]},r.prototype.ondisconnect=function(){h("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},r.prototype.destroy=function(){if(this.subs){for(var t=0;t<this.subs.length;t++)this.subs[t].destroy();this.subs=null}this.io.destroy(this)},r.prototype.close=r.prototype.disconnect=function(){return this.connected&&(h("performing disconnect (%s)",this.nsp),this.packet({type:o.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}},function(t,e,n){(function(e){function r(t,n){var r=t,n=n||e.location;return null==t&&(t=n.protocol+"//"+n.host),"string"==typeof t&&("/"==t.charAt(0)&&(t="/"==t.charAt(1)?n.protocol+t:n.hostname+t),/^(https?|wss?):\/\//.test(t)||(i("protocol-less url %s",t),t="undefined"!=typeof n?n.protocol+"//"+t:"https://"+t),i("parse %s",t),r=o(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/",r.id=r.protocol+"://"+r.host+":"+r.port,r.href=r.protocol+"://"+r.host+(n&&n.port==r.port?"":":"+r.port),r}var o=n(43),i=n(5)("socket.io-client:url");t.exports=r}).call(e,function(){return this}())},function(t,e){(function(e){function n(t){return e.Buffer&&e.Buffer.isBuffer(t)||e.ArrayBuffer&&t instanceof ArrayBuffer}t.exports=n}).call(e,function(){return this}())},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){function n(t,e,n){function o(t,r){if(o.count<=0)throw new Error("after called too many times");--o.count,t?(i=!0,e(t),e=n):0!==o.count||i||e(null,r)}var i=!1;return n=n||r,o.count=t,0===t?e():o}function r(){}t.exports=n},function(t,e){"use strict";t.exports=function(){return/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g}},function(t,e){t.exports=function(t,e,n){var r=t.byteLength;if(e=e||0,n=n||r,t.slice)return t.slice(e,n);if(0>e&&(e+=r),0>n&&(n+=r),n>r&&(n=r),e>=r||e>=n||0===r)return new ArrayBuffer(0);for(var o=new Uint8Array(t),i=new Uint8Array(n-e),s=e,a=0;n>s;s++,a++)i[a]=o[s];return i.buffer}},function(t,e){function n(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}t.exports=n,n.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-n:t+n}return 0|Math.min(t,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(t){this.ms=t},n.prototype.setMax=function(t){this.max=t},n.prototype.setJitter=function(t){this.jitter=t}},function(t,e){!function(t){"use strict";e.encode=function(e){var n,r=new Uint8Array(e),o=r.length,i="";for(n=0;o>n;n+=3)i+=t[r[n]>>2],i+=t[(3&r[n])<<4|r[n+1]>>4],i+=t[(15&r[n+1])<<2|r[n+2]>>6],i+=t[63&r[n+2]];return o%3===2?i=i.substring(0,i.length-1)+"=":o%3===1&&(i=i.substring(0,i.length-2)+"=="),i},e.decode=function(e){var n,r,o,i,s,a=.75*e.length,c=e.length,h=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var u=new ArrayBuffer(a),p=new Uint8Array(u);for(n=0;c>n;n+=4)r=t.indexOf(e[n]),o=t.indexOf(e[n+1]),i=t.indexOf(e[n+2]),s=t.indexOf(e[n+3]),p[h++]=r<<2|o>>4,p[h++]=(15&o)<<4|i>>2,p[h++]=(3&i)<<6|63&s;return u}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},function(t,e){(function(e){function n(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.buffer instanceof ArrayBuffer){var r=n.buffer;if(n.byteLength!==r.byteLength){var o=new Uint8Array(n.byteLength);o.set(new Uint8Array(r,n.byteOffset,n.byteLength)),r=o.buffer}t[e]=r}}}function r(t,e){e=e||{};var r=new i;n(t);for(var o=0;o<t.length;o++)r.append(t[o]);return e.type?r.getBlob(e.type):r.getBlob()}function o(t,e){return n(t),new Blob(t,e||{})}var i=e.BlobBuilder||e.WebKitBlobBuilder||e.MSBlobBuilder||e.MozBlobBuilder,s=function(){try{var t=new Blob(["hi"]);return 2===t.size}catch(e){return!1}}(),a=s&&function(){try{var t=new Blob([new Uint8Array([1,2])]);return 2===t.size}catch(e){return!1}}(),c=i&&i.prototype.append&&i.prototype.getBlob;t.exports=function(){return s?a?e.Blob:o:c?r:void 0}()}).call(e,function(){return this}())},function(t,e,n){t.exports=n(29)},function(t,e,n){t.exports=n(30),t.exports.parser=n(2)},function(t,e,n){(function(e){function r(t,n){if(!(this instanceof r))return new r(t,n);if(n=n||{},t&&"object"==typeof t&&(n=t,t=null),t&&(t=u(t),n.host=t.host,n.secure="https"==t.protocol||"wss"==t.protocol,n.port=t.port,t.query&&(n.query=t.query)),this.secure=null!=n.secure?n.secure:e.location&&"https:"==location.protocol,n.host){var o=n.host.split(":");n.hostname=o.shift(),o.length?n.port=o.pop():n.port||(n.port=this.secure?"443":"80")}this.agent=n.agent||!1,this.hostname=n.hostname||(e.location?location.hostname:"localhost"),this.port=n.port||(e.location&&location.port?location.port:this.secure?443:80),this.query=n.query||{},"string"==typeof this.query&&(this.query=f.decode(this.query)),this.upgrade=!1!==n.upgrade,this.path=(n.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!n.forceJSONP,this.jsonp=!1!==n.jsonp,this.forceBase64=!!n.forceBase64,this.enablesXDR=!!n.enablesXDR,this.timestampParam=n.timestampParam||"t",this.timestampRequests=n.timestampRequests,this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.callbackBuffer=[],this.policyPort=n.policyPort||843,this.rememberUpgrade=n.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=n.onlyBinaryUpgrades,this.pfx=n.pfx||null,this.key=n.key||null,
2
- this.passphrase=n.passphrase||null,this.cert=n.cert||null,this.ca=n.ca||null,this.ciphers=n.ciphers||null,this.rejectUnauthorized=n.rejectUnauthorized||null,this.open()}function o(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}var i=n(12),s=n(1),a=n(4)("engine.io-client:socket"),c=n(15),h=n(2),u=n(36),p=n(42),f=n(9);t.exports=r,r.priorWebsocketSuccess=!1,s(r.prototype),r.protocol=h.protocol,r.Socket=r,r.Transport=n(6),r.transports=n(12),r.parser=n(2),r.prototype.createTransport=function(t){a('creating transport "%s"',t);var e=o(this.query);e.EIO=h.protocol,e.transport=t,this.id&&(e.sid=this.id);var n=new i[t]({agent:this.agent,hostname:this.hostname,port:this.port,secure:this.secure,path:this.path,query:e,forceJSONP:this.forceJSONP,jsonp:this.jsonp,forceBase64:this.forceBase64,enablesXDR:this.enablesXDR,timestampRequests:this.timestampRequests,timestampParam:this.timestampParam,policyPort:this.policyPort,socket:this,pfx:this.pfx,key:this.key,passphrase:this.passphrase,cert:this.cert,ca:this.ca,ciphers:this.ciphers,rejectUnauthorized:this.rejectUnauthorized});return n},r.prototype.open=function(){var t;if(this.rememberUpgrade&&r.priorWebsocketSuccess&&-1!=this.transports.indexOf("websocket"))t="websocket";else{if(0==this.transports.length){var e=this;return void setTimeout(function(){e.emit("error","No transports available")},0)}t=this.transports[0]}this.readyState="opening";var t;try{t=this.createTransport(t)}catch(n){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)},r.prototype.setTransport=function(t){a("setting transport %s",t.name);var e=this;this.transport&&(a("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",function(){e.onDrain()}).on("packet",function(t){e.onPacket(t)}).on("error",function(t){e.onError(t)}).on("close",function(){e.onClose("transport close")})},r.prototype.probe=function(t){function e(){if(f.onlyBinaryUpgrades){var e=!this.supportsBinary&&f.transport.supportsBinary;p=p||e}p||(a('probe transport "%s" opened',t),u.send([{type:"ping",data:"probe"}]),u.once("packet",function(e){if(!p)if("pong"==e.type&&"probe"==e.data){if(a('probe transport "%s" pong',t),f.upgrading=!0,f.emit("upgrading",u),!u)return;r.priorWebsocketSuccess="websocket"==u.name,a('pausing current transport "%s"',f.transport.name),f.transport.pause(function(){p||"closed"!=f.readyState&&(a("changing transport and sending upgrade packet"),h(),f.setTransport(u),u.send([{type:"upgrade"}]),f.emit("upgrade",u),u=null,f.upgrading=!1,f.flush())})}else{a('probe transport "%s" failed',t);var n=new Error("probe error");n.transport=u.name,f.emit("upgradeError",n)}}))}function n(){p||(p=!0,h(),u.close(),u=null)}function o(e){var r=new Error("probe error: "+e);r.transport=u.name,n(),a('probe transport "%s" failed because of error: %s',t,e),f.emit("upgradeError",r)}function i(){o("transport closed")}function s(){o("socket closed")}function c(t){u&&t.name!=u.name&&(a('"%s" works - aborting "%s"',t.name,u.name),n())}function h(){u.removeListener("open",e),u.removeListener("error",o),u.removeListener("close",i),f.removeListener("close",s),f.removeListener("upgrading",c)}a('probing transport "%s"',t);var u=this.createTransport(t,{probe:1}),p=!1,f=this;r.priorWebsocketSuccess=!1,u.once("open",e),u.once("error",o),u.once("close",i),this.once("close",s),this.once("upgrading",c),u.open()},r.prototype.onOpen=function(){if(a("socket open"),this.readyState="open",r.priorWebsocketSuccess="websocket"==this.transport.name,this.emit("open"),this.flush(),"open"==this.readyState&&this.upgrade&&this.transport.pause){a("starting upgrade probes");for(var t=0,e=this.upgrades.length;e>t;t++)this.probe(this.upgrades[t])}},r.prototype.onPacket=function(t){if("opening"==this.readyState||"open"==this.readyState)switch(a('socket receive: type "%s", data "%s"',t.type,t.data),this.emit("packet",t),this.emit("heartbeat"),t.type){case"open":this.onHandshake(p(t.data));break;case"pong":this.setPing();break;case"error":var e=new Error("server error");e.code=t.data,this.emit("error",e);break;case"message":this.emit("data",t.data),this.emit("message",t.data)}else a('packet received with socket readyState "%s"',this.readyState)},r.prototype.onHandshake=function(t){this.emit("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.onOpen(),"closed"!=this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},r.prototype.onHeartbeat=function(t){clearTimeout(this.pingTimeoutTimer);var e=this;e.pingTimeoutTimer=setTimeout(function(){"closed"!=e.readyState&&e.onClose("ping timeout")},t||e.pingInterval+e.pingTimeout)},r.prototype.setPing=function(){var t=this;clearTimeout(t.pingIntervalTimer),t.pingIntervalTimer=setTimeout(function(){a("writing ping packet - expecting pong within %sms",t.pingTimeout),t.ping(),t.onHeartbeat(t.pingTimeout)},t.pingInterval)},r.prototype.ping=function(){this.sendPacket("ping")},r.prototype.onDrain=function(){for(var t=0;t<this.prevBufferLen;t++)this.callbackBuffer[t]&&this.callbackBuffer[t]();this.writeBuffer.splice(0,this.prevBufferLen),this.callbackBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0==this.writeBuffer.length?this.emit("drain"):this.flush()},r.prototype.flush=function(){"closed"!=this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(a("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},r.prototype.write=r.prototype.send=function(t,e){return this.sendPacket("message",t,e),this},r.prototype.sendPacket=function(t,e,n){if("closing"!=this.readyState&&"closed"!=this.readyState){var r={type:t,data:e};this.emit("packetCreate",r),this.writeBuffer.push(r),this.callbackBuffer.push(n),this.flush()}},r.prototype.close=function(){function t(){r.onClose("forced close"),a("socket closing - telling transport to close"),r.transport.close()}function e(){r.removeListener("upgrade",e),r.removeListener("upgradeError",e),t()}function n(){r.once("upgrade",e),r.once("upgradeError",e)}if("opening"==this.readyState||"open"==this.readyState){this.readyState="closing";var r=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?n():t()}):this.upgrading?n():t()}return this},r.prototype.onError=function(t){a("socket error %j",t),r.priorWebsocketSuccess=!1,this.emit("error",t),this.onClose("transport error",t)},r.prototype.onClose=function(t,e){if("opening"==this.readyState||"open"==this.readyState||"closing"==this.readyState){a('socket close with reason: "%s"',t);var n=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),setTimeout(function(){n.writeBuffer=[],n.callbackBuffer=[],n.prevBufferLen=0},0),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",t,e)}},r.prototype.filterUpgrades=function(t){for(var e=[],n=0,r=t.length;r>n;n++)~c(this.transports,t[n])&&e.push(t[n]);return e}}).call(e,function(){return this}())},function(t,e,n){(function(e){function r(){}function o(t){i.call(this,t),this.query=this.query||{},a||(e.___eio||(e.___eio=[]),a=e.___eio),this.index=a.length;var n=this;a.push(function(t){n.onData(t)}),this.query.j=this.index,e.document&&e.addEventListener&&e.addEventListener("beforeunload",function(){n.script&&(n.script.onerror=r)},!1)}var i=n(13),s=n(3);t.exports=o;var a,c=/\n/g,h=/\\n/g;s(o,i),o.prototype.supportsBinary=!1,o.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),i.prototype.doClose.call(this)},o.prototype.doPoll=function(){var t=this,e=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),e.async=!0,e.src=this.uri(),e.onerror=function(e){t.onError("jsonp poll error",e)};var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n),this.script=e;var r="undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent);r&&setTimeout(function(){var t=document.createElement("iframe");document.body.appendChild(t),document.body.removeChild(t)},100)},o.prototype.doWrite=function(t,e){function n(){r(),e()}function r(){if(o.iframe)try{o.form.removeChild(o.iframe)}catch(t){o.onError("jsonp polling iframe removal error",t)}try{var e='<iframe src="javascript:0" name="'+o.iframeId+'">';i=document.createElement(e)}catch(t){i=document.createElement("iframe"),i.name=o.iframeId,i.src="javascript:0"}i.id=o.iframeId,o.form.appendChild(i),o.iframe=i}var o=this;if(!this.form){var i,s=document.createElement("form"),a=document.createElement("textarea"),u=this.iframeId="eio_iframe_"+this.index;s.className="socketio",s.style.position="absolute",s.style.top="-1000px",s.style.left="-1000px",s.target=u,s.method="POST",s.setAttribute("accept-charset","utf-8"),a.name="d",s.appendChild(a),document.body.appendChild(s),this.form=s,this.area=a}this.form.action=this.uri(),r(),t=t.replace(h,"\\\n"),this.area.value=t.replace(c,"\\n");try{this.form.submit()}catch(p){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"==o.iframe.readyState&&n()}:this.iframe.onload=n}}).call(e,function(){return this}())},function(t,e,n){(function(e){function r(){}function o(t){if(c.call(this,t),e.location){var n="https:"==location.protocol,r=location.port;r||(r=n?443:80),this.xd=t.hostname!=e.location.hostname||r!=t.port,this.xs=t.secure!=n}}function i(t){this.method=t.method||"GET",this.uri=t.uri,this.xd=!!t.xd,this.xs=!!t.xs,this.async=!1!==t.async,this.data=void 0!=t.data?t.data:null,this.agent=t.agent,this.isBinary=t.isBinary,this.supportsBinary=t.supportsBinary,this.enablesXDR=t.enablesXDR,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized,this.create()}function s(){for(var t in i.requests)i.requests.hasOwnProperty(t)&&i.requests[t].abort()}var a=n(7),c=n(13),h=n(1),u=n(3),p=n(4)("engine.io-client:polling-xhr");t.exports=o,t.exports.Request=i,u(o,c),o.prototype.supportsBinary=!0,o.prototype.request=function(t){return t=t||{},t.uri=this.uri(),t.xd=this.xd,t.xs=this.xs,t.agent=this.agent||!1,t.supportsBinary=this.supportsBinary,t.enablesXDR=this.enablesXDR,t.pfx=this.pfx,t.key=this.key,t.passphrase=this.passphrase,t.cert=this.cert,t.ca=this.ca,t.ciphers=this.ciphers,t.rejectUnauthorized=this.rejectUnauthorized,new i(t)},o.prototype.doWrite=function(t,e){var n="string"!=typeof t&&void 0!==t,r=this.request({method:"POST",data:t,isBinary:n}),o=this;r.on("success",e),r.on("error",function(t){o.onError("xhr post error",t)}),this.sendXhr=r},o.prototype.doPoll=function(){p("xhr poll");var t=this.request(),e=this;t.on("data",function(t){e.onData(t)}),t.on("error",function(t){e.onError("xhr poll error",t)}),this.pollXhr=t},h(i.prototype),i.prototype.create=function(){var t={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};t.pfx=this.pfx,t.key=this.key,t.passphrase=this.passphrase,t.cert=this.cert,t.ca=this.ca,t.ciphers=this.ciphers,t.rejectUnauthorized=this.rejectUnauthorized;var n=this.xhr=new a(t),r=this;try{if(p("xhr open %s: %s",this.method,this.uri),n.open(this.method,this.uri,this.async),this.supportsBinary&&(n.responseType="arraybuffer"),"POST"==this.method)try{this.isBinary?n.setRequestHeader("Content-type","application/octet-stream"):n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(o){}"withCredentials"in n&&(n.withCredentials=!0),this.hasXDR()?(n.onload=function(){r.onLoad()},n.onerror=function(){r.onError(n.responseText)}):n.onreadystatechange=function(){4==n.readyState&&(200==n.status||1223==n.status?r.onLoad():setTimeout(function(){r.onError(n.status)},0))},p("xhr data %s",this.data),n.send(this.data)}catch(o){return void setTimeout(function(){r.onError(o)},0)}e.document&&(this.index=i.requestsCount++,i.requests[this.index]=this)},i.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},i.prototype.onData=function(t){this.emit("data",t),this.onSuccess()},i.prototype.onError=function(t){this.emit("error",t),this.cleanup(!0)},i.prototype.cleanup=function(t){if("undefined"!=typeof this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=r:this.xhr.onreadystatechange=r,t)try{this.xhr.abort()}catch(n){}e.document&&delete i.requests[this.index],this.xhr=null}},i.prototype.onLoad=function(){var t;try{var e;try{e=this.xhr.getResponseHeader("Content-Type").split(";")[0]}catch(n){}t="application/octet-stream"===e?this.xhr.response:this.supportsBinary?"ok":this.xhr.responseText}catch(n){this.onError(n)}null!=t&&this.onData(t)},i.prototype.hasXDR=function(){return"undefined"!=typeof e.XDomainRequest&&!this.xs&&this.enablesXDR},i.prototype.abort=function(){this.cleanup()},e.document&&(i.requestsCount=0,i.requests={},e.attachEvent?e.attachEvent("onunload",s):e.addEventListener&&e.addEventListener("beforeunload",s,!1))}).call(e,function(){return this}())},function(t,e,n){function r(t){var e=t&&t.forceBase64;e&&(this.supportsBinary=!1),o.call(this,t)}var o=n(6),i=n(2),s=n(9),a=n(3),c=n(4)("engine.io-client:websocket"),h=n(57);t.exports=r,a(r,o),r.prototype.name="websocket",r.prototype.supportsBinary=!0,r.prototype.doOpen=function(){if(this.check()){var t=this.uri(),e=void 0,n={agent:this.agent};n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized,this.ws=new h(t,e,n),void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.binaryType="arraybuffer",this.addEventListeners()}},r.prototype.addEventListeners=function(){var t=this;this.ws.onopen=function(){t.onOpen()},this.ws.onclose=function(){t.onClose()},this.ws.onmessage=function(e){t.onData(e.data)},this.ws.onerror=function(e){t.onError("websocket error",e)}},"undefined"!=typeof navigator&&/iPad|iPhone|iPod/i.test(navigator.userAgent)&&(r.prototype.onData=function(t){var e=this;setTimeout(function(){o.prototype.onData.call(e,t)},0)}),r.prototype.write=function(t){function e(){n.writable=!0,n.emit("drain")}var n=this;this.writable=!1;for(var r=0,o=t.length;o>r;r++)i.encodePacket(t[r],this.supportsBinary,function(t){try{n.ws.send(t)}catch(e){c("websocket closed before onclose event")}});setTimeout(e,0)},r.prototype.onClose=function(){o.prototype.onClose.call(this)},r.prototype.doClose=function(){"undefined"!=typeof this.ws&&this.ws.close()},r.prototype.uri=function(){var t=this.query||{},e=this.secure?"wss":"ws",n="";return this.port&&("wss"==e&&443!=this.port||"ws"==e&&80!=this.port)&&(n=":"+this.port),this.timestampRequests&&(t[this.timestampParam]=+new Date),this.supportsBinary||(t.b64=1),t=s.encode(t),t.length&&(t="?"+t),e+"://"+this.hostname+n+this.path+t},r.prototype.check=function(){return!(!h||"__initialize"in h&&this.name===r.prototype.name)}},function(t,e,n){function r(){return e.colors[u++%e.colors.length]}function o(t){function n(){}function o(){var t=o,n=+new Date,i=n-(h||n);t.diff=i,t.prev=h,t.curr=n,h=n,null==t.useColors&&(t.useColors=e.useColors()),null==t.color&&t.useColors&&(t.color=r());var s=Array.prototype.slice.call(arguments);s[0]=e.coerce(s[0]),"string"!=typeof s[0]&&(s=["%o"].concat(s));var a=0;s[0]=s[0].replace(/%([a-z%])/g,function(n,r){if("%%"===n)return n;a++;var o=e.formatters[r];if("function"==typeof o){var i=s[a];n=o.call(t,i),s.splice(a,1),a--}return n}),"function"==typeof e.formatArgs&&(s=e.formatArgs.apply(t,s));var c=o.log||e.log||console.log.bind(console);c.apply(t,s)}n.enabled=!1,o.enabled=!0;var i=e.enabled(t)?o:n;return i.namespace=t,i}function i(t){e.save(t);for(var n=(t||"").split(/[\s,]+/),r=n.length,o=0;r>o;o++)n[o]&&(t=n[o].replace(/\*/g,".*?"),"-"===t[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))}function s(){e.enable("")}function a(t){var n,r;for(n=0,r=e.skips.length;r>n;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;r>n;n++)if(e.names[n].test(t))return!0;return!1}function c(t){return t instanceof Error?t.stack||t.message:t}e=t.exports=o,e.coerce=c,e.disable=s,e.enable=i,e.enabled=a,e.humanize=n(35),e.names=[],e.skips=[],e.formatters={};var h,u=0},function(t,e){function n(t){var e=/^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"y":return n*u;case"days":case"day":case"d":return n*h;case"hours":case"hour":case"h":return n*c;case"minutes":case"minute":case"m":return n*a;case"seconds":case"second":case"s":return n*s;case"ms":return n}}}function r(t){return t>=h?Math.round(t/h)+"d":t>=c?Math.round(t/c)+"h":t>=a?Math.round(t/a)+"m":t>=s?Math.round(t/s)+"s":t+"ms"}function o(t){return i(t,h,"day")||i(t,c,"hour")||i(t,a,"minute")||i(t,s,"second")||t+" ms"}function i(t,e,n){return e>t?void 0:1.5*e>t?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}var s=1e3,a=60*s,c=60*a,h=24*c,u=365.25*h;t.exports=function(t,e){return e=e||{},"string"==typeof t?n(t):e["long"]?o(t):r(t)}},function(t,e){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];t.exports=function(t){var e=t,o=t.indexOf("["),i=t.indexOf("]");-1!=o&&-1!=i&&(t=t.substring(0,o)+t.substring(o,i).replace(/:/g,";")+t.substring(i,t.length));for(var s=n.exec(t||""),a={},c=14;c--;)a[r[c]]=s[c]||"";return-1!=o&&-1!=i&&(a.source=e,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a}},function(t,e){t.exports=Object.keys||function(t){var e=[],n=Object.prototype.hasOwnProperty;for(var r in t)n.call(t,r)&&e.push(r);return e}},function(t,e){t.exports=function(){return this}()},function(t,e,n){var r=n(38);try{t.exports="XMLHttpRequest"in r&&"withCredentials"in new r.XMLHttpRequest}catch(o){t.exports=!1}},function(t,e,n){var r;!function(o){function i(t){if(i[t]!==c)return i[t];var e;if("bug-string-char-index"==t)e="a"!="a"[0];else if("json"==t)e=i("json-stringify")&&i("json-parse");else{var n,r='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==t){var o=f.stringify,s="function"==typeof o&&l;if(s){(n=function(){return 1}).toJSON=n;try{s="0"===o(0)&&"0"===o(new Number)&&'""'==o(new String)&&o(h)===c&&o(c)===c&&o()===c&&"1"===o(n)&&"[1]"==o([n])&&"[null]"==o([c])&&"null"==o(null)&&"[null,null,null]"==o([c,h,null])&&o({a:[n,!0,!1,null,"\x00\b\n\f\r "]})==r&&"1"===o(null,n)&&"[\n 1,\n 2\n]"==o([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==o(new Date(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==o(new Date(864e13))&&'"-000001-01-01T00:00:00.000Z"'==o(new Date(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==o(new Date(-1))}catch(a){s=!1}}e=s}if("json-parse"==t){var u=f.parse;if("function"==typeof u)try{if(0===u("0")&&!u(!1)){n=u(r);var p=5==n.a.length&&1===n.a[0];if(p){try{p=!u('" "')}catch(a){}if(p)try{p=1!==u("01")}catch(a){}if(p)try{p=1!==u("1.")}catch(a){}}}}catch(a){p=!1}e=p}}return i[t]=!!e}var s,a,c,h={}.toString,u=n(56),p="object"==typeof JSON&&JSON,f="object"==typeof e&&e&&!e.nodeType&&e;f&&p?(f.stringify=p.stringify,f.parse=p.parse):f=o.JSON=p||{};var l=new Date(-0xc782b5b800cec);try{l=-109252==l.getUTCFullYear()&&0===l.getUTCMonth()&&1===l.getUTCDate()&&10==l.getUTCHours()&&37==l.getUTCMinutes()&&6==l.getUTCSeconds()&&708==l.getUTCMilliseconds()}catch(d){}if(!i("json")){var y="[object Function]",m="[object Date]",g="[object Number]",v="[object String]",b="[object Array]",w="[object Boolean]",k=i("bug-string-char-index");if(!l)var x=Math.floor,A=[0,31,59,90,120,151,181,212,243,273,304,334],C=function(t,e){return A[e]+365*(t-1970)+x((t-1969+(e=+(e>1)))/4)-x((t-1901+e)/100)+x((t-1601+e)/400)};(s={}.hasOwnProperty)||(s=function(t){var e,n={};return(n.__proto__=null,n.__proto__={toString:1},n).toString!=h?s=function(t){var e=this.__proto__,n=t in(this.__proto__=null,this);return this.__proto__=e,n}:(e=n.constructor,s=function(t){var n=(this.constructor||e).prototype;return t in this&&!(t in n&&this[t]===n[t])}),n=null,s.call(this,t)});var B={"boolean":1,number:1,string:1,undefined:1},S=function(t,e){var n=typeof t[e];return"object"==n?!!t[e]:!B[n]};if(a=function(t,e){var n,r,o,i=0;(n=function(){this.valueOf=0}).prototype.valueOf=0,r=new n;for(o in r)s.call(r,o)&&i++;return n=r=null,i?a=2==i?function(t,e){var n,r={},o=h.call(t)==y;for(n in t)o&&"prototype"==n||s.call(r,n)||!(r[n]=1)||!s.call(t,n)||e(n)}:function(t,e){var n,r,o=h.call(t)==y;for(n in t)o&&"prototype"==n||!s.call(t,n)||(r="constructor"===n)||e(n);(r||s.call(t,n="constructor"))&&e(n)}:(r=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],a=function(t,e){var n,o,i=h.call(t)==y,a=!i&&"function"!=typeof t.constructor&&S(t,"hasOwnProperty")?t.hasOwnProperty:s;for(n in t)i&&"prototype"==n||!a.call(t,n)||e(n);for(o=r.length;n=r[--o];a.call(t,n)&&e(n));}),a(t,e)},!i("json-stringify")){var E={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},j="000000",R=function(t,e){return(j+(e||0)).slice(-t)},O="\\u00",T=function(t){var e,n='"',r=0,o=t.length,i=o>10&&k;for(i&&(e=t.split(""));o>r;r++){var s=t.charCodeAt(r);switch(s){case 8:case 9:case 10:case 12:case 13:case 34:case 92:n+=E[s];break;default:if(32>s){n+=O+R(2,s.toString(16));break}n+=i?e[r]:k?t.charAt(r):t[r]}}return n+'"'},_=function(t,e,n,r,o,i,u){var p,f,l,d,y,k,A,B,S,E,j,O,P,N,U,D;try{p=e[t]}catch(I){}if("object"==typeof p&&p)if(f=h.call(p),f!=m||s.call(p,"toJSON"))"function"==typeof p.toJSON&&(f!=g&&f!=v&&f!=b||s.call(p,"toJSON"))&&(p=p.toJSON(t));else if(p>-1/0&&1/0>p){if(C){for(y=x(p/864e5),l=x(y/365.2425)+1970-1;C(l+1,0)<=y;l++);for(d=x((y-C(l,0))/30.42);C(l,d+1)<=y;d++);y=1+y-C(l,d),k=(p%864e5+864e5)%864e5,A=x(k/36e5)%24,B=x(k/6e4)%60,S=x(k/1e3)%60,E=k%1e3}else l=p.getUTCFullYear(),d=p.getUTCMonth(),y=p.getUTCDate(),A=p.getUTCHours(),B=p.getUTCMinutes(),S=p.getUTCSeconds(),E=p.getUTCMilliseconds();p=(0>=l||l>=1e4?(0>l?"-":"+")+R(6,0>l?-l:l):R(4,l))+"-"+R(2,d+1)+"-"+R(2,y)+"T"+R(2,A)+":"+R(2,B)+":"+R(2,S)+"."+R(3,E)+"Z"}else p=null;if(n&&(p=n.call(e,t,p)),null===p)return"null";if(f=h.call(p),f==w)return""+p;if(f==g)return p>-1/0&&1/0>p?""+p:"null";if(f==v)return T(""+p);if("object"==typeof p){for(N=u.length;N--;)if(u[N]===p)throw TypeError();if(u.push(p),j=[],U=i,i+=o,f==b){for(P=0,N=p.length;N>P;P++)O=_(P,p,n,r,o,i,u),j.push(O===c?"null":O);D=j.length?o?"[\n"+i+j.join(",\n"+i)+"\n"+U+"]":"["+j.join(",")+"]":"[]"}else a(r||p,function(t){var e=_(t,p,n,r,o,i,u);e!==c&&j.push(T(t)+":"+(o?" ":"")+e)}),D=j.length?o?"{\n"+i+j.join(",\n"+i)+"\n"+U+"}":"{"+j.join(",")+"}":"{}";return u.pop(),D}};f.stringify=function(t,e,n){var r,o,i,s;if("function"==typeof e||"object"==typeof e&&e)if((s=h.call(e))==y)o=e;else if(s==b){i={};for(var a,c=0,u=e.length;u>c;a=e[c++],s=h.call(a),(s==v||s==g)&&(i[a]=1));}if(n)if((s=h.call(n))==g){if((n-=n%1)>0)for(r="",n>10&&(n=10);r.length<n;r+=" ");}else s==v&&(r=n.length<=10?n:n.slice(0,10));return _("",(a={},a[""]=t,a),o,i,r,"",[])}}if(!i("json-parse")){var P,N,U=String.fromCharCode,D={92:"\\",34:'"',47:"/",98:"\b",116:" ",110:"\n",102:"\f",114:"\r"},I=function(){throw P=N=null,SyntaxError()},q=function(){for(var t,e,n,r,o,i=N,s=i.length;s>P;)switch(o=i.charCodeAt(P)){case 9:case 10:case 13:case 32:P++;break;case 123:case 125:case 91:case 93:case 58:case 44:return t=k?i.charAt(P):i[P],P++,t;case 34:for(t="@",P++;s>P;)if(o=i.charCodeAt(P),32>o)I();else if(92==o)switch(o=i.charCodeAt(++P)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:t+=D[o],P++;break;case 117:for(e=++P,n=P+4;n>P;P++)o=i.charCodeAt(P),o>=48&&57>=o||o>=97&&102>=o||o>=65&&70>=o||I();t+=U("0x"+i.slice(e,P));break;default:I()}else{if(34==o)break;for(o=i.charCodeAt(P),e=P;o>=32&&92!=o&&34!=o;)o=i.charCodeAt(++P);t+=i.slice(e,P)}if(34==i.charCodeAt(P))return P++,t;I();default:if(e=P,45==o&&(r=!0,o=i.charCodeAt(++P)),o>=48&&57>=o){for(48==o&&(o=i.charCodeAt(P+1),o>=48&&57>=o)&&I(),r=!1;s>P&&(o=i.charCodeAt(P),o>=48&&57>=o);P++);if(46==i.charCodeAt(P)){for(n=++P;s>n&&(o=i.charCodeAt(n),o>=48&&57>=o);n++);n==P&&I(),P=n}if(o=i.charCodeAt(P),101==o||69==o){for(o=i.charCodeAt(++P),(43==o||45==o)&&P++,n=P;s>n&&(o=i.charCodeAt(n),o>=48&&57>=o);n++);n==P&&I(),P=n}return+i.slice(e,P)}if(r&&I(),"true"==i.slice(P,P+4))return P+=4,!0;if("false"==i.slice(P,P+5))return P+=5,!1;if("null"==i.slice(P,P+4))return P+=4,null;I()}return"$"},L=function(t){var e,n;if("$"==t&&I(),"string"==typeof t){if("@"==(k?t.charAt(0):t[0]))return t.slice(1);if("["==t){for(e=[];t=q(),"]"!=t;n||(n=!0))n&&(","==t?(t=q(),"]"==t&&I()):I()),","==t&&I(),e.push(L(t));return e}if("{"==t){for(e={};t=q(),"}"!=t;n||(n=!0))n&&(","==t?(t=q(),"}"==t&&I()):I()),(","==t||"string"!=typeof t||"@"!=(k?t.charAt(0):t[0])||":"!=q())&&I(),e[t.slice(1)]=L(q());return e}I()}return t},M=function(t,e,n){var r=z(t,e,n);r===c?delete t[e]:t[e]=r},z=function(t,e,n){var r,o=t[e];if("object"==typeof o&&o)if(h.call(o)==b)for(r=o.length;r--;)M(o,r,n);else a(o,function(t){M(o,t,n)});return n.call(t,e,o)};f.parse=function(t,e){var n,r;return P=0,N=""+t,n=L(q()),"$"!=q()&&I(),P=N=null,e&&h.call(e)==y?z((r={},r[""]=n,r),"",e):n}}}u&&(r=function(){return f}.call(e,n,e,t),!(void 0!==r&&(t.exports=r)))}(this)},function(t,e){var n=Object.prototype.hasOwnProperty;e.keys=Object.keys||function(t){var e=[];for(var r in t)n.call(t,r)&&e.push(r);return e},e.values=function(t){var e=[];for(var r in t)n.call(t,r)&&e.push(t[r]);return e},e.merge=function(t,e){for(var r in e)n.call(e,r)&&(t[r]=e[r]);return t},e.length=function(t){return e.keys(t).length},e.isEmpty=function(t){return 0==e.length(t)}},function(t,e){(function(e){var n=/^[\],:{}\s]*$/,r=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,o=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,i=/(?:^|:|,)(?:\s*\[)+/g,s=/^\s+/,a=/\s+$/;t.exports=function(t){return"string"==typeof t&&t?(t=t.replace(s,"").replace(a,""),e.JSON&&JSON.parse?JSON.parse(t):n.test(t.replace(r,"@").replace(o,"]").replace(i,""))?new Function("return "+t)():void 0):null}}).call(e,function(){return this}())},function(t,e){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];t.exports=function(t){for(var e=n.exec(t||""),o={},i=14;i--;)o[r[i]]=e[i]||"";return o}},function(t,e,n){var r;(function(t,o){!function(i){function s(t){throw RangeError(_[t])}function a(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function c(t,e){var n=t.split("@"),r="";n.length>1&&(r=n[0]+"@",t=n[1]),t=t.replace(T,".");var o=t.split("."),i=a(o,e).join(".");return r+i}function h(t){for(var e,n,r=[],o=0,i=t.length;i>o;)e=t.charCodeAt(o++),e>=55296&&56319>=e&&i>o?(n=t.charCodeAt(o++),56320==(64512&n)?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),o--)):r.push(e);return r}function u(t){return a(t,function(t){var e="";return t>65535&&(t-=65536,e+=U(t>>>10&1023|55296),t=56320|1023&t),e+=U(t)}).join("")}function p(t){return 10>t-48?t-22:26>t-65?t-65:26>t-97?t-97:k}function f(t,e){return t+22+75*(26>t)-((0!=e)<<5)}function l(t,e,n){var r=0;for(t=n?N(t/B):t>>1,t+=N(t/e);t>P*A>>1;r+=k)t=N(t/P);return N(r+(P+1)*t/(t+C))}function d(t){var e,n,r,o,i,a,c,h,f,d,y=[],m=t.length,g=0,v=E,b=S;for(n=t.lastIndexOf(j),0>n&&(n=0),r=0;n>r;++r)t.charCodeAt(r)>=128&&s("not-basic"),y.push(t.charCodeAt(r));for(o=n>0?n+1:0;m>o;){for(i=g,a=1,c=k;o>=m&&s("invalid-input"),h=p(t.charCodeAt(o++)),(h>=k||h>N((w-g)/a))&&s("overflow"),g+=h*a,f=b>=c?x:c>=b+A?A:c-b,!(f>h);c+=k)d=k-f,a>N(w/d)&&s("overflow"),a*=d;e=y.length+1,b=l(g-i,e,0==i),N(g/e)>w-v&&s("overflow"),v+=N(g/e),g%=e,y.splice(g++,0,v)}return u(y)}function y(t){var e,n,r,o,i,a,c,u,p,d,y,m,g,v,b,C=[];for(t=h(t),m=t.length,e=E,n=0,i=S,a=0;m>a;++a)y=t[a],128>y&&C.push(U(y));for(r=o=C.length,o&&C.push(j);m>r;){for(c=w,a=0;m>a;++a)y=t[a],y>=e&&c>y&&(c=y);for(g=r+1,c-e>N((w-n)/g)&&s("overflow"),n+=(c-e)*g,e=c,a=0;m>a;++a)if(y=t[a],e>y&&++n>w&&s("overflow"),y==e){for(u=n,p=k;d=i>=p?x:p>=i+A?A:p-i,!(d>u);p+=k)b=u-d,v=k-d,C.push(U(f(d+b%v,0))),u=N(b/v);C.push(U(f(u,0))),i=l(n,g,r==o),n=0,++r}++n,++e}return C.join("")}function m(t){return c(t,function(t){return R.test(t)?d(t.slice(4).toLowerCase()):t})}function g(t){return c(t,function(t){return O.test(t)?"xn--"+y(t):t})}var v=("object"==typeof e&&e&&!e.nodeType&&e,"object"==typeof t&&t&&!t.nodeType&&t,"object"==typeof o&&o);(v.global===v||v.window===v||v.self===v)&&(i=v);var b,w=2147483647,k=36,x=1,A=26,C=38,B=700,S=72,E=128,j="-",R=/^xn--/,O=/[^\x20-\x7E]/,T=/[\x2E\u3002\uFF0E\uFF61]/g,_={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},P=k-x,N=Math.floor,U=String.fromCharCode;b={version:"1.3.2",ucs2:{decode:h,encode:u},decode:d,encode:y,toASCII:g,toUnicode:m},r=function(){return b}.call(e,n,e,t),!(void 0!==r&&(t.exports=r))}(this)}).call(e,n(21)(t),function(){return this}())},function(t,e){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,r,o){e=e||"&",r=r||"=";var i={};if("string"!=typeof t||0===t.length)return i;var s=/\+/g;t=t.split(e);var a=1e3;o&&"number"==typeof o.maxKeys&&(a=o.maxKeys);var c=t.length;a>0&&c>a&&(c=a);for(var h=0;c>h;++h){var u,p,f,l,d=t[h].replace(s,"%20"),y=d.indexOf(r);y>=0?(u=d.substr(0,y),p=d.substr(y+1)):(u=d,p=""),f=decodeURIComponent(u),l=decodeURIComponent(p),n(i,f)?Array.isArray(i[f])?i[f].push(l):i[f]=[i[f],l]:i[f]=l}return i}},function(t,e){"use strict";var n=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,r,o){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map(function(o){var i=encodeURIComponent(n(o))+r;return Array.isArray(t[o])?t[o].map(function(t){return i+encodeURIComponent(n(t))}).join(e):i+encodeURIComponent(n(t[o]))}).join(e):o?encodeURIComponent(n(o))+r+encodeURIComponent(n(t)):""}},function(t,e,n){"use strict";e.decode=e.parse=n(45),e.encode=e.stringify=n(46)},function(t,e,n){t.exports=n(49)},function(t,e,n){function r(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var n,r=o(t),i=r.source,h=r.id;return e.forceNew||e["force new connection"]||!1===e.multiplex?(a("ignoring socket cache for %s",i),n=s(i,e)):(c[h]||(a("new io instance for %s",i),c[h]=s(i,e)),n=c[h]),n.socket(r.path)}var o=n(19),i=n(10),s=n(16),a=n(5)("socket.io-client");t.exports=e=r;var c=e.managers={};e.protocol=i.protocol,e.connect=r,e.Manager=n(16),e.Socket=n(18)},function(t,e,n){(function(t){var r=n(8),o=n(20);e.deconstructPacket=function(t){function e(t){if(!t)return t;if(o(t)){var i={_placeholder:!0,num:n.length};return n.push(t),i}if(r(t)){for(var s=new Array(t.length),a=0;a<t.length;a++)s[a]=e(t[a]);return s}if("object"==typeof t&&!(t instanceof Date)){var s={};for(var c in t)s[c]=e(t[c]);return s}return t}var n=[],i=t.data,s=t;return s.data=e(i),s.attachments=n.length,{packet:s,buffers:n}},e.reconstructPacket=function(t,e){function n(t){if(t&&t._placeholder){var o=e[t.num];return o}if(r(t)){for(var i=0;i<t.length;i++)t[i]=n(t[i]);
3
- return t}if(t&&"object"==typeof t){for(var s in t)t[s]=n(t[s]);return t}return t}return t.data=n(t.data),t.attachments=void 0,t},e.removeBlobs=function(e,n){function i(e,c,h){if(!e)return e;if(t.Blob&&e instanceof Blob||t.File&&e instanceof File){s++;var u=new FileReader;u.onload=function(){h?h[c]=this.result:a=this.result,--s||n(a)},u.readAsArrayBuffer(e)}else if(r(e))for(var p=0;p<e.length;p++)i(e[p],p,e);else if(e&&"object"==typeof e&&!o(e))for(var f in e)i(e[f],f,e)}var s=0,a=e;i(a),s||n(a)}}).call(e,function(){return this}())},function(t,e){function n(t){return n.enabled(t)?function(e){e=r(e);var o=new Date,i=o-(n[t]||o);n[t]=o,e=t+" "+e+" +"+n.humanize(i),window.console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}:function(){}}function r(t){return t instanceof Error?t.stack||t.message:t}t.exports=n,n.names=[],n.skips=[],n.enable=function(t){try{localStorage.debug=t}catch(e){}for(var r=(t||"").split(/[\s,]+/),o=r.length,i=0;o>i;i++)t=r[i].replace("*",".*?"),"-"===t[0]?n.skips.push(new RegExp("^"+t.substr(1)+"$")):n.names.push(new RegExp("^"+t+"$"))},n.disable=function(){n.enable("")},n.humanize=function(t){var e=1e3,n=6e4,r=60*n;return t>=r?(t/r).toFixed(1)+"h":t>=n?(t/n).toFixed(1)+"m":t>=e?(t/e|0)+"s":t+"ms"},n.enabled=function(t){for(var e=0,r=n.skips.length;r>e;e++)if(n.skips[e].test(t))return!1;for(var e=0,r=n.names.length;r>e;e++)if(n.names[e].test(t))return!0;return!1};try{window.localStorage&&n.enable(localStorage.debug)}catch(o){}},function(t,e,n){"use strict";var r=n(23)();t.exports=function(t){return"string"==typeof t?t.replace(r,""):t}},function(t,e){function n(t,e){var n=[];e=e||0;for(var r=e||0;r<t.length;r++)n[r-e]=t[r];return n}t.exports=n},function(t,e,n){function r(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function o(t,e,n){if(t&&h(t)&&t instanceof r)return t;var o=new r;return o.parse(t,e,n),o}function i(t){return c(t)&&(t=o(t)),t instanceof r?t.format():r.prototype.format.call(t)}function s(t,e){return o(t,!1,!0).resolve(e)}function a(t,e){return t?o(t,!1,!0).resolveObject(e):e}function c(t){return"string"==typeof t}function h(t){return"object"==typeof t&&null!==t}function u(t){return null===t}function p(t){return null==t}var f=n(44);e.parse=o,e.resolve=s,e.resolveObject=a,e.format=i,e.Url=r;var l=/^([a-z0-9.+-]+:)/i,d=/:[0-9]*$/,y=["<",">",'"',"`"," ","\r","\n"," "],m=["{","}","|","\\","^","`"].concat(y),g=["'"].concat(m),v=["%","/","?",";","#"].concat(g),b=["/","?","#"],w=255,k=/^[a-z0-9A-Z_-]{0,63}$/,x=/^([a-z0-9A-Z_-]{0,63})(.*)$/,A={javascript:!0,"javascript:":!0},C={javascript:!0,"javascript:":!0},B={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},S=n(47);r.prototype.parse=function(t,e,n){if(!c(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var r=t;r=r.trim();var o=l.exec(r);if(o){o=o[0];var i=o.toLowerCase();this.protocol=i,r=r.substr(o.length)}if(n||o||r.match(/^\/\/[^@\/]+@[^@\/]+/)){var s="//"===r.substr(0,2);!s||o&&C[o]||(r=r.substr(2),this.slashes=!0)}if(!C[o]&&(s||o&&!B[o])){for(var a=-1,h=0;h<b.length;h++){var u=r.indexOf(b[h]);-1!==u&&(-1===a||a>u)&&(a=u)}var p,d;d=-1===a?r.lastIndexOf("@"):r.lastIndexOf("@",a),-1!==d&&(p=r.slice(0,d),r=r.slice(d+1),this.auth=decodeURIComponent(p)),a=-1;for(var h=0;h<v.length;h++){var u=r.indexOf(v[h]);-1!==u&&(-1===a||a>u)&&(a=u)}-1===a&&(a=r.length),this.host=r.slice(0,a),r=r.slice(a),this.parseHost(),this.hostname=this.hostname||"";var y="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!y)for(var m=this.hostname.split(/\./),h=0,E=m.length;E>h;h++){var j=m[h];if(j&&!j.match(k)){for(var R="",O=0,T=j.length;T>O;O++)R+=j.charCodeAt(O)>127?"x":j[O];if(!R.match(k)){var _=m.slice(0,h),P=m.slice(h+1),N=j.match(x);N&&(_.push(N[1]),P.unshift(N[2])),P.length&&(r="/"+P.join(".")+r),this.hostname=_.join(".");break}}}if(this.hostname.length>w?this.hostname="":this.hostname=this.hostname.toLowerCase(),!y){for(var U=this.hostname.split("."),D=[],h=0;h<U.length;++h){var I=U[h];D.push(I.match(/[^A-Za-z0-9_-]/)?"xn--"+f.encode(I):I)}this.hostname=D.join(".")}var q=this.port?":"+this.port:"",L=this.hostname||"";this.host=L+q,this.href+=this.host,y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==r[0]&&(r="/"+r))}if(!A[i])for(var h=0,E=g.length;E>h;h++){var M=g[h],z=encodeURIComponent(M);z===M&&(z=escape(M)),r=r.split(M).join(z)}var F=r.indexOf("#");-1!==F&&(this.hash=r.substr(F),r=r.slice(0,F));var X=r.indexOf("?");if(-1!==X?(this.search=r.substr(X),this.query=r.substr(X+1),e&&(this.query=S.parse(this.query)),r=r.slice(0,X)):e&&(this.search="",this.query={}),r&&(this.pathname=r),B[i]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var q=this.pathname||"",I=this.search||"";this.path=q+I}return this.href=this.format(),this},r.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,i="";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&h(this.query)&&Object.keys(this.query).length&&(i=S.stringify(this.query));var s=this.search||i&&"?"+i||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||B[e])&&o!==!1?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),n=n.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),s=s.replace("#","%23"),e+o+n+s+r},r.prototype.resolve=function(t){return this.resolveObject(o(t,!1,!0)).format()},r.prototype.resolveObject=function(t){if(c(t)){var e=new r;e.parse(t,!1,!0),t=e}var n=new r;if(Object.keys(this).forEach(function(t){n[t]=this[t]},this),n.hash=t.hash,""===t.href)return n.href=n.format(),n;if(t.slashes&&!t.protocol)return Object.keys(t).forEach(function(e){"protocol"!==e&&(n[e]=t[e])}),B[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n;if(t.protocol&&t.protocol!==n.protocol){if(!B[t.protocol])return Object.keys(t).forEach(function(e){n[e]=t[e]}),n.href=n.format(),n;if(n.protocol=t.protocol,t.host||C[t.protocol])n.pathname=t.pathname;else{for(var o=(t.pathname||"").split("/");o.length&&!(t.host=o.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==o[0]&&o.unshift(""),o.length<2&&o.unshift(""),n.pathname=o.join("/")}if(n.search=t.search,n.query=t.query,n.host=t.host||"",n.auth=t.auth,n.hostname=t.hostname||t.host,n.port=t.port,n.pathname||n.search){var i=n.pathname||"",s=n.search||"";n.path=i+s}return n.slashes=n.slashes||t.slashes,n.href=n.format(),n}var a=n.pathname&&"/"===n.pathname.charAt(0),h=t.host||t.pathname&&"/"===t.pathname.charAt(0),f=h||a||n.host&&t.pathname,l=f,d=n.pathname&&n.pathname.split("/")||[],o=t.pathname&&t.pathname.split("/")||[],y=n.protocol&&!B[n.protocol];if(y&&(n.hostname="",n.port=null,n.host&&(""===d[0]?d[0]=n.host:d.unshift(n.host)),n.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===o[0]?o[0]=t.host:o.unshift(t.host)),t.host=null),f=f&&(""===o[0]||""===d[0])),h)n.host=t.host||""===t.host?t.host:n.host,n.hostname=t.hostname||""===t.hostname?t.hostname:n.hostname,n.search=t.search,n.query=t.query,d=o;else if(o.length)d||(d=[]),d.pop(),d=d.concat(o),n.search=t.search,n.query=t.query;else if(!p(t.search)){if(y){n.hostname=n.host=d.shift();var m=n.host&&n.host.indexOf("@")>0?n.host.split("@"):!1;m&&(n.auth=m.shift(),n.host=n.hostname=m.shift())}return n.search=t.search,n.query=t.query,u(n.pathname)&&u(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!d.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var g=d.slice(-1)[0],v=(n.host||t.host)&&("."===g||".."===g)||""===g,b=0,w=d.length;w>=0;w--)g=d[w],"."==g?d.splice(w,1):".."===g?(d.splice(w,1),b++):b&&(d.splice(w,1),b--);if(!f&&!l)for(;b--;b)d.unshift("..");!f||""===d[0]||d[0]&&"/"===d[0].charAt(0)||d.unshift(""),v&&"/"!==d.join("/").substr(-1)&&d.push("");var k=""===d[0]||d[0]&&"/"===d[0].charAt(0);if(y){n.hostname=n.host=k?"":d.length?d.shift():"";var m=n.host&&n.host.indexOf("@")>0?n.host.split("@"):!1;m&&(n.auth=m.shift(),n.host=n.hostname=m.shift())}return f=f||n.host&&d.length,f&&!k&&d.unshift(""),d.length?n.pathname=d.join("/"):(n.pathname=null,n.path=null),u(n.pathname)&&u(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var t=this.host,e=d.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e,n){var r;(function(t,o){!function(i){function s(t){for(var e,n,r=[],o=0,i=t.length;i>o;)e=t.charCodeAt(o++),e>=55296&&56319>=e&&i>o?(n=t.charCodeAt(o++),56320==(64512&n)?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),o--)):r.push(e);return r}function a(t){for(var e,n=t.length,r=-1,o="";++r<n;)e=t[r],e>65535&&(e-=65536,o+=w(e>>>10&1023|55296),e=56320|1023&e),o+=w(e);return o}function c(t){if(t>=55296&&57343>=t)throw Error("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function h(t,e){return w(t>>e&63|128)}function u(t){if(0==(4294967168&t))return w(t);var e="";return 0==(4294965248&t)?e=w(t>>6&31|192):0==(4294901760&t)?(c(t),e=w(t>>12&15|224),e+=h(t,6)):0==(4292870144&t)&&(e=w(t>>18&7|240),e+=h(t,12),e+=h(t,6)),e+=w(63&t|128)}function p(t){for(var e,n=s(t),r=n.length,o=-1,i="";++o<r;)e=n[o],i+=u(e);return i}function f(){if(b>=v)throw Error("Invalid byte index");var t=255&g[b];if(b++,128==(192&t))return 63&t;throw Error("Invalid continuation byte")}function l(){var t,e,n,r,o;if(b>v)throw Error("Invalid byte index");if(b==v)return!1;if(t=255&g[b],b++,0==(128&t))return t;if(192==(224&t)){var e=f();if(o=(31&t)<<6|e,o>=128)return o;throw Error("Invalid continuation byte")}if(224==(240&t)){if(e=f(),n=f(),o=(15&t)<<12|e<<6|n,o>=2048)return c(o),o;throw Error("Invalid continuation byte")}if(240==(248&t)&&(e=f(),n=f(),r=f(),o=(15&t)<<18|e<<12|n<<6|r,o>=65536&&1114111>=o))return o;throw Error("Invalid UTF-8 detected")}function d(t){g=s(t),v=g.length,b=0;for(var e,n=[];(e=l())!==!1;)n.push(e);return a(n)}var y="object"==typeof e&&e,m=("object"==typeof t&&t&&t.exports==y&&t,"object"==typeof o&&o);(m.global===m||m.window===m)&&(i=m);var g,v,b,w=String.fromCharCode,k={version:"2.0.0",encode:p,decode:d};r=function(){return k}.call(e,n,e,t),!(void 0!==r&&(t.exports=r))}(this)}).call(e,n(21)(t),function(){return this}())},function(t,e){(function(e){t.exports=e}).call(e,{})},function(t,e){function n(t,e,n){var r;return r=e?new o(t,e):new o(t)}var r=function(){return this}(),o=r.WebSocket||r.MozWebSocket;t.exports=o?n:null,o&&(n.prototype=o.prototype)}]);
1
+ !function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){function r(){h?(console.log("[WDS] App hot update..."),window.postMessage("webpackHotUpdate"+p,"*")):(console.log("[WDS] App updated. Reloading..."),window.location.reload())}var o=n(38),i=n(39),s=n(70),a=document.getElementsByTagName("script"),c=a[a.length-1].getAttribute("src").replace(/\/[^\/]+$/,""),u=o.parse(c?c:"/"),l=null,h=!1,f=!0,p="",d={hot:function(){h=!0,console.log("[WDS] Hot Module Replacement enabled.")},invalid:function(){console.log("[WDS] App updated. Recompiling...")},hash:function(t){p=t},"still-ok":function(){console.log("[WDS] Nothing changed.")},ok:function(){return f?f=!1:void r()},warnings:function(t){console.log("[WDS] Warnings while compiling.");for(var e=0;e<t.length;e++)console.warn(s(t[e]));return f?f=!1:void r()},errors:function(t){console.log("[WDS] Errors while compiling.");for(var e=0;e<t.length;e++)console.error(s(t[e]));return f?f=!1:void r()},"proxy-error":function(t){console.log("[WDS] Proxy error.");for(var e=0;e<t.length;e++)console.error(s(t[e]));return f?f=!1:void r()}},m=function(){l=new i(o.format({protocol:u.protocol,auth:u.auth,hostname:"0.0.0.0"===u.hostname?window.location.hostname:u.hostname,port:u.port,pathname:"/"===u.path?"/sockjs-node":u.path})),l.onclose=function(){console.error("[WDS] Disconnected!"),l=null,setTimeout(function(){m()},2e3)},l.onmessage=function(t){var e=JSON.parse(t.data);d[e.type](e.data)}};m()},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e){function n(){u=!1,s.length?c=s.concat(c):l=-1,c.length&&r()}function r(){if(!u){var t=setTimeout(n);u=!0;for(var e=c.length;e;){for(s=c,c=[];++l<e;)s[l].run();l=-1,e=c.length}s=null,u=!1,clearTimeout(t)}}function o(t,e){this.fun=t,this.array=e}function i(){}var s,a=t.exports={},c=[],u=!1,l=-1;a.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new o(t,e)),1!==c.length||u||setTimeout(r,0)},o.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=i,a.addListener=i,a.once=i,a.off=i,a.removeListener=i,a.removeAllListeners=i,a.emit=i,a.binding=function(t){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(t){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(t,e,n){function r(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function o(){var t=arguments,n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),!n)return t;var r="color: "+this.color;t=[t[0],r,"color: inherit"].concat(Array.prototype.slice.call(t,1));var o=0,i=0;return t[0].replace(/%[a-z%]/g,function(t){"%%"!==t&&(o++,"%c"===t&&(i=o))}),t.splice(i,0,r),t}function i(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(n){}}function a(){var t;try{t=e.storage.debug}catch(n){}return t}function c(){try{return window.localStorage}catch(t){}}e=t.exports=n(65),e.log=i,e.formatArgs=o,e.save=s,e.load=a,e.useColors=r,e.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:c(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(t){return JSON.stringify(t)},e.enable(a())},function(t,e,n){"use strict";function r(){i.call(this)}var o=n(1),i=n(20);o(r,i),r.prototype.removeAllListeners=function(t){t?delete this._listeners[t]:this._listeners={}},r.prototype.once=function(t,e){function n(){r.removeListener(t,n),o||(o=!0,e.apply(this,arguments))}var r=this,o=!1;this.on(t,n)},r.prototype.emit=function(t){var e=this._listeners[t];if(e)for(var n=Array.prototype.slice.call(arguments,1),r=0;r<e.length;r++)e[r].apply(this,n)},r.prototype.on=r.prototype.addListener=i.prototype.addEventListener,r.prototype.removeListener=i.prototype.removeEventListener,t.exports.EventEmitter=r},function(t,e,n){(function(e){"use strict";var r=n(19),o=function(){};"production"!==e.env.NODE_ENV&&(o=n(3)("sockjs-client:utils:url")),t.exports={getOrigin:function(t){if(!t)return null;var e=new r(t);if("file:"===e.protocol)return null;var n=e.port;return n||(n="https:"===e.protocol?"443":"80"),e.protocol+"//"+e.hostname+":"+n},isOriginEqual:function(t,e){var n=this.getOrigin(t)===this.getOrigin(e);return o("same",t,e,n),n},isSchemeEqual:function(t,e){return t.split(":")[0]===e.split(":")[0]},addPath:function(t,e){var n=t.split("?");return n[0]+e+(n[1]?"?"+n[1]:"")},addQuery:function(t,e){return t+(-1===t.indexOf("?")?"?"+e:"&"+e)}}}).call(e,n(2))},function(t,e,n){var r;(function(t,o){(function(){function i(t,e){function n(t){if(n[t]!==v)return n[t];var i;if("bug-string-char-index"==t)i="a"!="a"[0];else if("json"==t)i=n("json-stringify")&&n("json-parse");else{var s,a='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==t){var u=e.stringify,l="function"==typeof u&&b;if(l){(s=function(){return 1}).toJSON=s;try{l="0"===u(0)&&"0"===u(new r)&&'""'==u(new o)&&u(y)===v&&u(v)===v&&u()===v&&"1"===u(s)&&"[1]"==u([s])&&"[null]"==u([v])&&"null"==u(null)&&"[null,null,null]"==u([v,y,null])&&u({a:[s,!0,!1,null,"\x00\b\n\f\r "]})==a&&"1"===u(null,s)&&"[\n 1,\n 2\n]"==u([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==u(new c(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==u(new c(864e13))&&'"-000001-01-01T00:00:00.000Z"'==u(new c(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==u(new c(-1))}catch(h){l=!1}}i=l}if("json-parse"==t){var f=e.parse;if("function"==typeof f)try{if(0===f("0")&&!f(!1)){s=f(a);var p=5==s.a.length&&1===s.a[0];if(p){try{p=!f('" "')}catch(h){}if(p)try{p=1!==f("01")}catch(h){}if(p)try{p=1!==f("1.")}catch(h){}}}}catch(h){p=!1}i=p}}return n[t]=!!i}t||(t=u.Object()),e||(e=u.Object());var r=t.Number||u.Number,o=t.String||u.String,s=t.Object||u.Object,c=t.Date||u.Date,l=t.SyntaxError||u.SyntaxError,h=t.TypeError||u.TypeError,f=t.Math||u.Math,p=t.JSON||u.JSON;"object"==typeof p&&p&&(e.stringify=p.stringify,e.parse=p.parse);var d,m,v,g=s.prototype,y=g.toString,b=new c(-0xc782b5b800cec);try{b=-109252==b.getUTCFullYear()&&0===b.getUTCMonth()&&1===b.getUTCDate()&&10==b.getUTCHours()&&37==b.getUTCMinutes()&&6==b.getUTCSeconds()&&708==b.getUTCMilliseconds()}catch(w){}if(!n("json")){var x="[object Function]",_="[object Date]",E="[object Number]",O="[object String]",j="[object Array]",S="[object Boolean]",T=n("bug-string-char-index");if(!b)var C=f.floor,N=[0,31,59,90,120,151,181,212,243,273,304,334],A=function(t,e){return N[e]+365*(t-1970)+C((t-1969+(e=+(e>1)))/4)-C((t-1901+e)/100)+C((t-1601+e)/400)};if((d=g.hasOwnProperty)||(d=function(t){var e,n={};return(n.__proto__=null,n.__proto__={toString:1},n).toString!=y?d=function(t){var e=this.__proto__,n=t in(this.__proto__=null,this);return this.__proto__=e,n}:(e=n.constructor,d=function(t){var n=(this.constructor||e).prototype;return t in this&&!(t in n&&this[t]===n[t])}),n=null,d.call(this,t)}),m=function(t,e){var n,r,o,i=0;(n=function(){this.valueOf=0}).prototype.valueOf=0,r=new n;for(o in r)d.call(r,o)&&i++;return n=r=null,i?m=2==i?function(t,e){var n,r={},o=y.call(t)==x;for(n in t)o&&"prototype"==n||d.call(r,n)||!(r[n]=1)||!d.call(t,n)||e(n)}:function(t,e){var n,r,o=y.call(t)==x;for(n in t)o&&"prototype"==n||!d.call(t,n)||(r="constructor"===n)||e(n);(r||d.call(t,n="constructor"))&&e(n)}:(r=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],m=function(t,e){var n,o,i=y.call(t)==x,s=!i&&"function"!=typeof t.constructor&&a[typeof t.hasOwnProperty]&&t.hasOwnProperty||d;for(n in t)i&&"prototype"==n||!s.call(t,n)||e(n);for(o=r.length;n=r[--o];s.call(t,n)&&e(n));}),m(t,e)},!n("json-stringify")){var k={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},I="000000",R=function(t,e){return(I+(e||0)).slice(-t)},D="\\u00",P=function(t){for(var e='"',n=0,r=t.length,o=!T||r>10,i=o&&(T?t.split(""):t);r>n;n++){var s=t.charCodeAt(n);switch(s){case 8:case 9:case 10:case 12:case 13:case 34:case 92:e+=k[s];break;default:if(32>s){e+=D+R(2,s.toString(16));break}e+=o?i[n]:t.charAt(n)}}return e+'"'},U=function(t,e,n,r,o,i,s){var a,c,u,l,f,p,g,b,w,x,T,N,k,I,D,L;try{a=e[t]}catch(M){}if("object"==typeof a&&a)if(c=y.call(a),c!=_||d.call(a,"toJSON"))"function"==typeof a.toJSON&&(c!=E&&c!=O&&c!=j||d.call(a,"toJSON"))&&(a=a.toJSON(t));else if(a>-1/0&&1/0>a){if(A){for(f=C(a/864e5),u=C(f/365.2425)+1970-1;A(u+1,0)<=f;u++);for(l=C((f-A(u,0))/30.42);A(u,l+1)<=f;l++);f=1+f-A(u,l),p=(a%864e5+864e5)%864e5,g=C(p/36e5)%24,b=C(p/6e4)%60,w=C(p/1e3)%60,x=p%1e3}else u=a.getUTCFullYear(),l=a.getUTCMonth(),f=a.getUTCDate(),g=a.getUTCHours(),b=a.getUTCMinutes(),w=a.getUTCSeconds(),x=a.getUTCMilliseconds();a=(0>=u||u>=1e4?(0>u?"-":"+")+R(6,0>u?-u:u):R(4,u))+"-"+R(2,l+1)+"-"+R(2,f)+"T"+R(2,g)+":"+R(2,b)+":"+R(2,w)+"."+R(3,x)+"Z"}else a=null;if(n&&(a=n.call(e,t,a)),null===a)return"null";if(c=y.call(a),c==S)return""+a;if(c==E)return a>-1/0&&1/0>a?""+a:"null";if(c==O)return P(""+a);if("object"==typeof a){for(I=s.length;I--;)if(s[I]===a)throw h();if(s.push(a),T=[],D=i,i+=o,c==j){for(k=0,I=a.length;I>k;k++)N=U(k,a,n,r,o,i,s),T.push(N===v?"null":N);L=T.length?o?"[\n"+i+T.join(",\n"+i)+"\n"+D+"]":"["+T.join(",")+"]":"[]"}else m(r||a,function(t){var e=U(t,a,n,r,o,i,s);e!==v&&T.push(P(t)+":"+(o?" ":"")+e)}),L=T.length?o?"{\n"+i+T.join(",\n"+i)+"\n"+D+"}":"{"+T.join(",")+"}":"{}";return s.pop(),L}};e.stringify=function(t,e,n){var r,o,i,s;if(a[typeof e]&&e)if((s=y.call(e))==x)o=e;else if(s==j){i={};for(var c,u=0,l=e.length;l>u;c=e[u++],s=y.call(c),(s==O||s==E)&&(i[c]=1));}if(n)if((s=y.call(n))==E){if((n-=n%1)>0)for(r="",n>10&&(n=10);r.length<n;r+=" ");}else s==O&&(r=n.length<=10?n:n.slice(0,10));return U("",(c={},c[""]=t,c),o,i,r,"",[])}}if(!n("json-parse")){var L,M,q=o.fromCharCode,W={92:"\\",34:'"',47:"/",98:"\b",116:" ",110:"\n",102:"\f",114:"\r"},J=function(){throw L=M=null,l()},B=function(){for(var t,e,n,r,o,i=M,s=i.length;s>L;)switch(o=i.charCodeAt(L)){case 9:case 10:case 13:case 32:L++;break;case 123:case 125:case 91:case 93:case 58:case 44:return t=T?i.charAt(L):i[L],L++,t;case 34:for(t="@",L++;s>L;)if(o=i.charCodeAt(L),32>o)J();else if(92==o)switch(o=i.charCodeAt(++L)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:t+=W[o],L++;break;case 117:for(e=++L,n=L+4;n>L;L++)o=i.charCodeAt(L),o>=48&&57>=o||o>=97&&102>=o||o>=65&&70>=o||J();t+=q("0x"+i.slice(e,L));break;default:J()}else{if(34==o)break;for(o=i.charCodeAt(L),e=L;o>=32&&92!=o&&34!=o;)o=i.charCodeAt(++L);t+=i.slice(e,L)}if(34==i.charCodeAt(L))return L++,t;J();default:if(e=L,45==o&&(r=!0,o=i.charCodeAt(++L)),o>=48&&57>=o){for(48==o&&(o=i.charCodeAt(L+1),o>=48&&57>=o)&&J(),r=!1;s>L&&(o=i.charCodeAt(L),o>=48&&57>=o);L++);if(46==i.charCodeAt(L)){for(n=++L;s>n&&(o=i.charCodeAt(n),o>=48&&57>=o);n++);n==L&&J(),L=n}if(o=i.charCodeAt(L),101==o||69==o){for(o=i.charCodeAt(++L),(43==o||45==o)&&L++,n=L;s>n&&(o=i.charCodeAt(n),o>=48&&57>=o);n++);n==L&&J(),L=n}return+i.slice(e,L)}if(r&&J(),"true"==i.slice(L,L+4))return L+=4,!0;if("false"==i.slice(L,L+5))return L+=5,!1;if("null"==i.slice(L,L+4))return L+=4,null;J()}return"$"},V=function(t){var e,n;if("$"==t&&J(),"string"==typeof t){if("@"==(T?t.charAt(0):t[0]))return t.slice(1);if("["==t){for(e=[];t=B(),"]"!=t;n||(n=!0))n&&(","==t?(t=B(),"]"==t&&J()):J()),","==t&&J(),e.push(V(t));return e}if("{"==t){for(e={};t=B(),"}"!=t;n||(n=!0))n&&(","==t?(t=B(),"}"==t&&J()):J()),(","==t||"string"!=typeof t||"@"!=(T?t.charAt(0):t[0])||":"!=B())&&J(),e[t.slice(1)]=V(B());return e}J()}return t},F=function(t,e,n){var r=H(t,e,n);r===v?delete t[e]:t[e]=r},H=function(t,e,n){var r,o=t[e];if("object"==typeof o&&o)if(y.call(o)==j)for(r=o.length;r--;)F(o,r,n);else m(o,function(t){F(o,t,n)});return n.call(t,e,o)};e.parse=function(t,e){var n,r;return L=0,M=""+t,n=V(B()),"$"!=B()&&J(),L=M=null,e&&y.call(e)==x?H((r={},r[""]=n,r),"",e):n}}}return e.runInContext=i,e}var s=n(72),a={"function":!0,object:!0},c=a[typeof e]&&e&&!e.nodeType&&e,u=a[typeof window]&&window||this,l=c&&a[typeof t]&&t&&!t.nodeType&&"object"==typeof o&&o;if(!l||l.global!==l&&l.window!==l&&l.self!==l||(u=l),c&&!s)i(u,c);else{var h=u.JSON,f=u.JSON3,p=!1,d=i(u,u.JSON3={noConflict:function(){return p||(p=!0,u.JSON=h,u.JSON3=f,h=f=null),d}});u.JSON={parse:d.parse,stringify:d.stringify}}s&&(r=function(){return d}.call(e,n,e,t),!(void 0!==r&&(t.exports=r)))}).call(this)}).call(e,n(33)(t),function(){return this}())},function(t,e,n){(function(e){"use strict";var r=n(9),o={},i=!1,s=e.chrome&&e.chrome.app&&e.chrome.app.runtime;t.exports={attachEvent:function(t,n){"undefined"!=typeof e.addEventListener?e.addEventListener(t,n,!1):e.document&&e.attachEvent&&(e.document.attachEvent("on"+t,n),e.attachEvent("on"+t,n))},detachEvent:function(t,n){"undefined"!=typeof e.addEventListener?e.removeEventListener(t,n,!1):e.document&&e.detachEvent&&(e.document.detachEvent("on"+t,n),e.detachEvent("on"+t,n))},unloadAdd:function(t){if(s)return null;var e=r.string(8);return o[e]=t,i&&setTimeout(this.triggerUnloadCallbacks,0),e},unloadDel:function(t){t in o&&delete o[t]},triggerUnloadCallbacks:function(){for(var t in o)o[t](),delete o[t]}};var a=function(){i||(i=!0,t.exports.triggerUnloadCallbacks())};s||t.exports.attachEvent("unload",a)}).call(e,function(){return this}())},function(t,e,n){(function(e){"use strict";function r(t){return function(e,n,r){c("create ajax sender",e,n);var o={};"string"==typeof n&&(o.headers={"Content-type":"text/plain"});var i=s.addPath(e,"/xhr_send"),a=new t("POST",i,n,o);return a.once("finish",function(t){return c("finish",t),a=null,200!==t&&204!==t?r(new Error("http status "+t)):void r()}),function(){c("abort"),a.close(),a=null;var t=new Error("Aborted");t.code=1e3,r(t)}}}function o(t,e,n,o){a.call(this,t,e,r(o),n,o)}var i=n(1),s=n(5),a=n(29),c=function(){};"production"!==e.env.NODE_ENV&&(c=n(3)("sockjs-client:ajax-based")),i(o,a),t.exports=o}).call(e,n(2))},function(t,e,n){"use strict";var r=n(61),o="abcdefghijklmnopqrstuvwxyz012345";t.exports={string:function(t){for(var e=o.length,n=r.randomBytes(t),i=[],s=0;t>s;s++)i.push(o.substr(n[s]%e,1));return i.join("")},number:function(t){return Math.floor(Math.random()*t)},numberString:function(t){var e=(""+(t-1)).length,n=new Array(e+1).join("0");return(n+this.number(t)).slice(-e)}}},function(t,e,n){"use strict";function r(t,e,n){i.call(this,t,e,n,{noCredentials:!0})}var o=n(1),i=n(24);o(r,i),r.enabled=i.enabled,t.exports=r},function(t,e){(function(e){"use strict";t.exports={isOpera:function(){return e.navigator&&/opera/i.test(e.navigator.userAgent)},isKonqueror:function(){return e.navigator&&/konqueror/i.test(e.navigator.userAgent)},hasDomain:function(){if(!e.document)return!0;try{return!!e.document.domain}catch(t){return!1}}}}).call(e,function(){return this}())},function(t,e,n){(function(e,r){"use strict";var o=n(7),i=n(6),s=n(11),a=function(){};"production"!==e.env.NODE_ENV&&(a=n(3)("sockjs-client:utils:iframe")),t.exports={WPrefix:"_jp",currentWindowId:null,polluteGlobalNamespace:function(){t.exports.WPrefix in r||(r[t.exports.WPrefix]={})},postMessage:function(e,n){r.parent!==r?r.parent.postMessage(i.stringify({windowId:t.exports.currentWindowId,type:e,data:n||""}),"*"):a("Cannot postMessage, no parent window.",e,n)},createIframe:function(t,e){var n,i,s=r.document.createElement("iframe"),c=function(){a("unattach"),clearTimeout(n);try{s.onload=null}catch(t){}s.onerror=null},u=function(){a("cleanup"),s&&(c(),setTimeout(function(){s&&s.parentNode.removeChild(s),s=null},0),o.unloadDel(i))},l=function(t){a("onerror",t),s&&(u(),e(t))},h=function(t,e){a("post",t,e);try{setTimeout(function(){s&&s.contentWindow&&s.contentWindow.postMessage(t,e)},0)}catch(n){}};return s.src=t,s.style.display="none",s.style.position="absolute",s.onerror=function(){l("onerror")},s.onload=function(){a("onload"),clearTimeout(n),n=setTimeout(function(){l("onload timeout")},2e3)},r.document.body.appendChild(s),n=setTimeout(function(){l("timeout")},15e3),i=o.unloadAdd(u),{post:h,cleanup:u,loaded:c}},createHtmlfile:function(e,n){var i,s,c,u=["Active"].concat("Object").join("X"),l=new r[u]("htmlfile"),h=function(){clearTimeout(i),c.onerror=null},f=function(){l&&(h(),o.unloadDel(s),c.parentNode.removeChild(c),c=l=null,CollectGarbage())},p=function(t){a("onerror",t),l&&(f(),n(t))},d=function(t,e){try{setTimeout(function(){c&&c.contentWindow&&c.contentWindow.postMessage(t,e)},0)}catch(n){}};l.open(),l.write('<html><script>document.domain="'+r.document.domain+'";</script></html>'),l.close(),l.parentWindow[t.exports.WPrefix]=r[t.exports.WPrefix];var m=l.createElement("div");return l.body.appendChild(m),c=l.createElement("iframe"),m.appendChild(c),c.src=e,c.onerror=function(){p("onerror")},i=setTimeout(function(){p("timeout")},15e3),s=o.unloadAdd(f),{post:d,cleanup:f,loaded:h}}},t.exports.iframeEnabled=!1,r.document&&(t.exports.iframeEnabled=("function"==typeof r.postMessage||"object"==typeof r.postMessage)&&!s.isKonqueror())}).call(e,n(2),function(){return this}())},function(t,e,n){(function(e){"use strict";function r(t,e){s(t),i.call(this);var n=this;this.bufferPosition=0,this.xo=new e("POST",t,null),this.xo.on("chunk",this._chunkHandler.bind(this)),this.xo.once("finish",function(t,e){s("finish",t,e),n._chunkHandler(t,e),n.xo=null;var r=200===t?"network":"permanent";s("close",r),n.emit("close",null,r),n._cleanup()})}var o=n(1),i=n(4).EventEmitter,s=function(){};"production"!==e.env.NODE_ENV&&(s=n(3)("sockjs-client:receiver:xhr")),o(r,i),r.prototype._chunkHandler=function(t,e){if(s("_chunkHandler",t),200===t&&e)for(var n=-1;;this.bufferPosition+=n+1){var r=e.slice(this.bufferPosition);if(n=r.indexOf("\n"),-1===n)break;var o=r.slice(0,n);o&&(s("message",o),this.emit("message",o))}},r.prototype._cleanup=function(){s("_cleanup"),this.removeAllListeners()},r.prototype.abort=function(){s("abort"),this.xo&&(this.xo.close(),s("close"),this.emit("close",null,"user"),this.xo=null),this._cleanup()},t.exports=r}).call(e,n(2))},function(t,e,n){"use strict";function r(t,e,n,r){i.call(this,t,e,n,r)}var o=n(1),i=n(24);o(r,i),r.enabled=i.enabled&&i.supportsCORS,t.exports=r},function(t,e){"use strict";function n(t){this.type=t}n.prototype.initEvent=function(t,e,n){return this.type=t,this.bubbles=e,this.cancelable=n,this.timeStamp=+new Date,this},n.prototype.stopPropagation=function(){},n.prototype.preventDefault=function(){},n.CAPTURING_PHASE=1,n.AT_TARGET=2,n.BUBBLING_PHASE=3,t.exports=n},function(t,e,n){(function(e){"use strict";var r=n(1),o=n(28),i=n(18);t.exports=function(t){function n(e,n){o.call(this,t.transportName,e,n)}return r(n,o),n.enabled=function(n,r){if(!e.document)return!1;var s=i.extend({},r);return s.sameOrigin=!0,t.enabled(s)&&o.enabled()},n.transportName="iframe-"+t.transportName,n.needBody=!0,n.roundTrips=o.roundTrips+t.roundTrips-1,n.facadeTransport=t,n}}).call(e,function(){return this}())},function(t,e,n){(function(e,r){"use strict";function o(t,e,n){l(t,e);var r=this;i.call(this),setTimeout(function(){r._start(t,e,n)},0)}var i=n(4).EventEmitter,s=n(1),a=n(7),c=n(11),u=n(5),l=function(){};"production"!==e.env.NODE_ENV&&(l=n(3)("sockjs-client:sender:xdr")),s(o,i),o.prototype._start=function(t,e,n){l("_start");var o=this,i=new r.XDomainRequest;e=u.addQuery(e,"t="+ +new Date),i.onerror=function(){l("onerror"),o._error()},i.ontimeout=function(){l("ontimeout"),o._error()},i.onprogress=function(){l("progress",i.responseText),o.emit("chunk",200,i.responseText)},i.onload=function(){l("load"),o.emit("finish",200,i.responseText),o._cleanup(!1)},this.xdr=i,this.unloadRef=a.unloadAdd(function(){o._cleanup(!0)});try{this.xdr.open(t,e),this.timeout&&(this.xdr.timeout=this.timeout),this.xdr.send(n)}catch(s){this._error()}},o.prototype._error=function(){this.emit("finish",0,""),this._cleanup(!1)},o.prototype._cleanup=function(t){if(l("cleanup",t),this.xdr){if(this.removeAllListeners(),a.unloadDel(this.unloadRef),this.xdr.ontimeout=this.xdr.onerror=this.xdr.onprogress=this.xdr.onload=null,t)try{this.xdr.abort()}catch(e){}this.unloadRef=this.xdr=null}},o.prototype.close=function(){l("close"),this._cleanup(!0)},o.enabled=!(!r.XDomainRequest||!c.hasDomain()),t.exports=o}).call(e,n(2),function(){return this}())},function(t,e){"use strict";t.exports={isObject:function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},extend:function(t){if(!this.isObject(t))return t;for(var e,n,r=1,o=arguments.length;o>r;r++){e=arguments[r];for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t}}},function(t,e,n){"use strict";function r(t,e,n){if(!(this instanceof r))return new r(t,e,n);var u,l,h,f,p=a.test(t),d=typeof e,m=this,v=0;for("object"!==d&&"string"!==d&&(n=e,e=null),n&&"function"!=typeof n&&(n=s.parse),e=i(e);v<c.length;v++)l=c[v],u=l[0],f=l[1],u!==u?m[f]=t:"string"==typeof u?~(h=t.indexOf(u))&&("number"==typeof l[2]?(m[f]=t.slice(0,h),t=t.slice(h+l[2])):(m[f]=t.slice(h),t=t.slice(0,h))):(h=u.exec(t))&&(m[f]=h[1],t=t.slice(0,t.length-h[0].length)),m[f]=m[f]||(l[3]||"port"===f&&p?e[f]||"":""),l[4]&&(m[f]=m[f].toLowerCase());n&&(m.query=n(m.query)),o(m.port,m.protocol)||(m.host=m.hostname,m.port=""),m.username=m.password="",m.auth&&(l=m.auth.split(":"),m.username=l[0]||"",m.password=l[1]||""),m.href=m.toString()}var o=n(69),i=n(67),s=n(68),a=/^\/(?!\/)/,c=[["#","hash"],["?","query"],["//","protocol",2,1,1],["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/\:(\d+)$/,"port"],[NaN,"hostname",void 0,1,1]];r.prototype.set=function(t,e,n){var r=this;return"query"===t?("string"==typeof e&&e.length&&(e=(n||s.parse)(e)),r[t]=e):"port"===t?(r[t]=e,o(e,r.protocol)?e&&(r.host=r.hostname+":"+e):(r.host=r.hostname,r[t]="")):"hostname"===t?(r[t]=e,r.port&&(e+=":"+r.port),r.host=e):"host"===t?(r[t]=e,/\:\d+/.test(e)&&(e=e.split(":"),r.hostname=e[0],r.port=e[1])):r[t]=e,r.href=r.toString(),r},r.prototype.toString=function(t){t&&"function"==typeof t||(t=s.stringify);var e,n=this,r=n.protocol+"//";return n.username&&(r+=n.username,n.password&&(r+=":"+n.password),r+="@"),r+=n.hostname,n.port&&(r+=":"+n.port),r+=n.pathname,e="object"==typeof n.query?t(n.query):n.query,e&&(r+="?"!==e.charAt(0)?"?"+e:e),n.hash&&(r+=n.hash),r},r.qs=s,r.location=i,t.exports=r},function(t,e){"use strict";function n(){this._listeners={}}n.prototype.addEventListener=function(t,e){t in this._listeners||(this._listeners[t]=[]);var n=this._listeners[t];-1===n.indexOf(e)&&(n=n.concat([e])),this._listeners[t]=n},n.prototype.removeEventListener=function(t,e){var n=this._listeners[t];if(n){var r=n.indexOf(e);return-1!==r?void(n.length>1?this._listeners[t]=n.slice(0,r).concat(n.slice(r+1)):delete this._listeners[t]):void 0}},n.prototype.dispatchEvent=function(t){var e=t.type,n=Array.prototype.slice.call(arguments,0);if(this["on"+e]&&this["on"+e].apply(this,n),e in this._listeners)for(var r=this._listeners[e],o=0;o<r.length;o++)r[o].apply(this,n)},t.exports=n},function(t,e,n){(function(e){"use strict";function r(t,e){o.call(this);var n=this,r=+new Date;this.xo=new e("GET",t),this.xo.once("finish",function(t,e){var o,i;if(200===t){if(i=+new Date-r,e)try{o=s.parse(e)}catch(u){c("bad json",e)}a.isObject(o)||(o={})}n.emit("finish",o,i),n.removeAllListeners()})}var o=n(4).EventEmitter,i=n(1),s=n(6),a=n(18),c=function(){};"production"!==e.env.NODE_ENV&&(c=n(3)("sockjs-client:info-ajax")),i(r,o),r.prototype.close=function(){this.removeAllListeners(),this.xo.close()},t.exports=r}).call(e,n(2))},function(t,e,n){"use strict";function r(t){var e=this;i.call(this),this.ir=new c(t,a),this.ir.once("finish",function(t,n){e.ir=null,e.emit("message",s.stringify([t,n]))})}var o=n(1),i=n(4).EventEmitter,s=n(6),a=n(10),c=n(21);o(r,i),r.transportName="iframe-info-receiver",r.prototype.close=function(){this.ir&&(this.ir.close(),this.ir=null),this.removeAllListeners()},t.exports=r},function(t,e){(function(e){"use strict";t.exports=e.location||{origin:"http://localhost:80",protocol:"http",host:"localhost",port:80,href:"http://localhost/",hash:""}}).call(e,function(){return this}())},function(t,e,n){(function(e,r){"use strict";function o(t,e,n,r){l(t,e);var o=this;i.call(this),setTimeout(function(){o._start(t,e,n,r)},0)}var i=n(4).EventEmitter,s=n(1),a=n(7),c=n(5),u=e.XMLHttpRequest,l=function(){};"production"!==r.env.NODE_ENV&&(l=n(3)("sockjs-client:browser:xhr")),s(o,i),o.prototype._start=function(t,e,n,r){var i=this;try{this.xhr=new u}catch(s){}if(!this.xhr)return l("no xhr"),this.emit("finish",0,"no xhr support"),void this._cleanup();e=c.addQuery(e,"t="+ +new Date),this.unloadRef=a.unloadAdd(function(){l("unload cleanup"),i._cleanup(!0)});try{this.xhr.open(t,e,!0),this.timeout&&"timeout"in this.xhr&&(this.xhr.timeout=this.timeout,this.xhr.ontimeout=function(){l("xhr timeout"),i.emit("finish",0,""),i._cleanup(!1)})}catch(h){return l("exception",h),this.emit("finish",0,""),void this._cleanup(!1)}if(r&&r.noCredentials||!o.supportsCORS||(l("withCredentials"),this.xhr.withCredentials="true"),r&&r.headers)for(var f in r.headers)this.xhr.setRequestHeader(f,r.headers[f]);this.xhr.onreadystatechange=function(){if(i.xhr){var t,e,n=i.xhr;switch(l("readyState",n.readyState),n.readyState){case 3:try{e=n.status,t=n.responseText}catch(r){}l("status",e),1223===e&&(e=204),200===e&&t&&t.length>0&&(l("chunk"),i.emit("chunk",e,t));break;case 4:e=n.status,l("status",e),1223===e&&(e=204),(12005===e||12029===e)&&(e=0),l("finish",e,n.responseText),i.emit("finish",e,n.responseText),i._cleanup(!1)}}};try{i.xhr.send(n)}catch(h){i.emit("finish",0,""),i._cleanup(!1)}},o.prototype._cleanup=function(t){if(l("cleanup"),this.xhr){if(this.removeAllListeners(),a.unloadDel(this.unloadRef),this.xhr.onreadystatechange=function(){},this.xhr.ontimeout&&(this.xhr.ontimeout=null),t)try{this.xhr.abort()}catch(e){}this.unloadRef=this.xhr=null}},o.prototype.close=function(){l("close"),this._cleanup(!0)},o.enabled=!!u;var h=["Active"].concat("Object").join("X");!o.enabled&&h in e&&(l("overriding xmlhttprequest"),u=function(){try{return new e[h]("Microsoft.XMLHTTP")}catch(t){return null}},o.enabled=!!new u);var f=!1;try{f="withCredentials"in new u}catch(p){}o.supportsCORS=f,t.exports=o}).call(e,function(){return this}(),n(2))},function(t,e){(function(e){t.exports=e.EventSource}).call(e,function(){return this}())},function(t,e,n){"use strict";function r(t){if(!r.enabled())throw new Error("Transport created when disabled");i.call(this,t,"/eventsource",s,a)}var o=n(1),i=n(8),s=n(53),a=n(14),c=n(25);o(r,i),r.enabled=function(){return!!c},r.transportName="eventsource",r.roundTrips=2,t.exports=r},function(t,e,n){"use strict";function r(t){if(!i.enabled)throw new Error("Transport created when disabled");a.call(this,t,"/htmlfile",i,s)}var o=n(1),i=n(54),s=n(10),a=n(8);o(r,a),r.enabled=function(t){return i.enabled&&t.sameOrigin},r.transportName="htmlfile",r.roundTrips=2,t.exports=r},function(t,e,n){(function(e){"use strict";function r(t,e,n){if(!r.enabled())throw new Error("Transport created when disabled");s.call(this);var o=this;this.origin=c.getOrigin(n),this.baseUrl=n,this.transUrl=e,this.transport=t,this.windowId=h.string(8);var i=c.addPath(n,"/iframe.html")+"#"+this.windowId;f(t,e,i),this.iframeObj=u.createIframe(i,function(t){f("err callback"),o.emit("close",1006,"Unable to load an iframe ("+t+")"),o.close()}),this.onmessageCallback=this._message.bind(this),l.attachEvent("message",this.onmessageCallback)}var o=n(1),i=n(6),s=n(4).EventEmitter,a=n(32),c=n(5),u=n(12),l=n(7),h=n(9),f=function(){};"production"!==e.env.NODE_ENV&&(f=n(3)("sockjs-client:transport:iframe")),o(r,s),r.prototype.close=function(){if(f("close"),this.removeAllListeners(),this.iframeObj){l.detachEvent("message",this.onmessageCallback);try{this.postMessage("c")}catch(t){}this.iframeObj.cleanup(),this.iframeObj=null,this.onmessageCallback=this.iframeObj=null}},r.prototype._message=function(t){if(f("message",t.data),!c.isOriginEqual(t.origin,this.origin))return void f("not same origin",t.origin,this.origin);var e;try{e=i.parse(t.data)}catch(n){return void f("bad json",t.data)}if(e.windowId!==this.windowId)return void f("mismatched window id",e.windowId,this.windowId);switch(e.type){case"s":this.iframeObj.loaded(),this.postMessage("s",i.stringify([a,this.transport,this.transUrl,this.baseUrl]));break;case"t":this.emit("message",e.data);break;case"c":var r;try{r=i.parse(e.data)}catch(n){return void f("bad json",e.data)}this.emit("close",r[0],r[1]),this.close()}},r.prototype.postMessage=function(t,e){f("postMessage",t,e),this.iframeObj.post(i.stringify({windowId:this.windowId,type:t,data:e||""}),this.origin)},r.prototype.send=function(t){f("send",t),this.postMessage("m",t)},r.enabled=function(){return u.iframeEnabled},r.transportName="iframe",r.roundTrips=2,t.exports=r}).call(e,n(2))},function(t,e,n){(function(e){"use strict";function r(t,e,n,r,o){var u=i.addPath(t,e);c(u);var l=this;s.call(this,t,n),this.poll=new a(r,u,o),this.poll.on("message",function(t){c("poll message",t),l.emit("message",t)}),this.poll.once("close",function(t,e){c("poll close",t,e),l.poll=null,l.emit("close",t,e),l.close()})}var o=n(1),i=n(5),s=n(51),a=n(52),c=function(){};"production"!==e.env.NODE_ENV&&(c=n(3)("sockjs-client:sender-receiver")),o(r,s),r.prototype.close=function(){c("close"),this.removeAllListeners(),this.poll&&(this.poll.abort(),this.poll=null),this.stop()},t.exports=r}).call(e,n(2))},function(t,e,n){"use strict";function r(t){if(!a.enabled)throw new Error("Transport created when disabled");i.call(this,t,"/xhr_streaming",s,a)}var o=n(1),i=n(8),s=n(13),a=n(17);o(r,i),r.enabled=function(t){return t.cookie_needed||t.nullOrigin?!1:a.enabled&&t.sameScheme},r.transportName="xdr-streaming",r.roundTrips=2,t.exports=r},function(t,e,n){"use strict";function r(t){if(!c.enabled&&!a.enabled)throw new Error("Transport created when disabled");i.call(this,t,"/xhr",s,a)}var o=n(1),i=n(8),s=n(13),a=n(14),c=n(10);o(r,i),r.enabled=function(t){return t.nullOrigin?!1:c.enabled&&t.sameOrigin?!0:a.enabled},r.transportName="xhr-polling",r.roundTrips=2,t.exports=r},function(t,e){t.exports="1.0.3"},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e,n){var r;(function(t,o){!function(i){function s(t){throw RangeError(I[t])}function a(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function c(t,e){var n=t.split("@"),r="";n.length>1&&(r=n[0]+"@",t=n[1]),t=t.replace(k,".");var o=t.split("."),i=a(o,e).join(".");return r+i}function u(t){for(var e,n,r=[],o=0,i=t.length;i>o;)e=t.charCodeAt(o++),e>=55296&&56319>=e&&i>o?(n=t.charCodeAt(o++),56320==(64512&n)?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),o--)):r.push(e);return r}function l(t){return a(t,function(t){var e="";return t>65535&&(t-=65536,e+=P(t>>>10&1023|55296),t=56320|1023&t),e+=P(t)}).join("")}function h(t){return 10>t-48?t-22:26>t-65?t-65:26>t-97?t-97:x}function f(t,e){return t+22+75*(26>t)-((0!=e)<<5)}function p(t,e,n){var r=0;for(t=n?D(t/j):t>>1,t+=D(t/e);t>R*E>>1;r+=x)t=D(t/R);return D(r+(R+1)*t/(t+O))}function d(t){var e,n,r,o,i,a,c,u,f,d,m=[],v=t.length,g=0,y=T,b=S;for(n=t.lastIndexOf(C),0>n&&(n=0),r=0;n>r;++r)t.charCodeAt(r)>=128&&s("not-basic"),m.push(t.charCodeAt(r));for(o=n>0?n+1:0;v>o;){for(i=g,a=1,c=x;o>=v&&s("invalid-input"),u=h(t.charCodeAt(o++)),(u>=x||u>D((w-g)/a))&&s("overflow"),
2
+ g+=u*a,f=b>=c?_:c>=b+E?E:c-b,!(f>u);c+=x)d=x-f,a>D(w/d)&&s("overflow"),a*=d;e=m.length+1,b=p(g-i,e,0==i),D(g/e)>w-y&&s("overflow"),y+=D(g/e),g%=e,m.splice(g++,0,y)}return l(m)}function m(t){var e,n,r,o,i,a,c,l,h,d,m,v,g,y,b,O=[];for(t=u(t),v=t.length,e=T,n=0,i=S,a=0;v>a;++a)m=t[a],128>m&&O.push(P(m));for(r=o=O.length,o&&O.push(C);v>r;){for(c=w,a=0;v>a;++a)m=t[a],m>=e&&c>m&&(c=m);for(g=r+1,c-e>D((w-n)/g)&&s("overflow"),n+=(c-e)*g,e=c,a=0;v>a;++a)if(m=t[a],e>m&&++n>w&&s("overflow"),m==e){for(l=n,h=x;d=i>=h?_:h>=i+E?E:h-i,!(d>l);h+=x)b=l-d,y=x-d,O.push(P(f(d+b%y,0))),l=D(b/y);O.push(P(f(l,0))),i=p(n,g,r==o),n=0,++r}++n,++e}return O.join("")}function v(t){return c(t,function(t){return N.test(t)?d(t.slice(4).toLowerCase()):t})}function g(t){return c(t,function(t){return A.test(t)?"xn--"+m(t):t})}var y=("object"==typeof e&&e&&!e.nodeType&&e,"object"==typeof t&&t&&!t.nodeType&&t,"object"==typeof o&&o);(y.global===y||y.window===y||y.self===y)&&(i=y);var b,w=2147483647,x=36,_=1,E=26,O=38,j=700,S=72,T=128,C="-",N=/^xn--/,A=/[^\x20-\x7E]/,k=/[\x2E\u3002\uFF0E\uFF61]/g,I={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},R=x-_,D=Math.floor,P=String.fromCharCode;b={version:"1.3.2",ucs2:{decode:u,encode:l},decode:d,encode:m,toASCII:g,toUnicode:v},r=function(){return b}.call(e,n,e,t),!(void 0!==r&&(t.exports=r))}(this)}).call(e,n(33)(t),function(){return this}())},function(t,e){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,r,o){e=e||"&",r=r||"=";var i={};if("string"!=typeof t||0===t.length)return i;var s=/\+/g;t=t.split(e);var a=1e3;o&&"number"==typeof o.maxKeys&&(a=o.maxKeys);var c=t.length;a>0&&c>a&&(c=a);for(var u=0;c>u;++u){var l,h,f,p,d=t[u].replace(s,"%20"),m=d.indexOf(r);m>=0?(l=d.substr(0,m),h=d.substr(m+1)):(l=d,h=""),f=decodeURIComponent(l),p=decodeURIComponent(h),n(i,f)?Array.isArray(i[f])?i[f].push(p):i[f]=[i[f],p]:i[f]=p}return i}},function(t,e){"use strict";var n=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,r,o){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map(function(o){var i=encodeURIComponent(n(o))+r;return Array.isArray(t[o])?t[o].map(function(t){return i+encodeURIComponent(n(t))}).join(e):i+encodeURIComponent(n(t[o]))}).join(e):o?encodeURIComponent(n(o))+r+encodeURIComponent(n(t)):""}},function(t,e,n){"use strict";e.decode=e.parse=n(35),e.encode=e.stringify=n(36)},function(t,e,n){function r(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function o(t,e,n){if(t&&u(t)&&t instanceof r)return t;var o=new r;return o.parse(t,e,n),o}function i(t){return c(t)&&(t=o(t)),t instanceof r?t.format():r.prototype.format.call(t)}function s(t,e){return o(t,!1,!0).resolve(e)}function a(t,e){return t?o(t,!1,!0).resolveObject(e):e}function c(t){return"string"==typeof t}function u(t){return"object"==typeof t&&null!==t}function l(t){return null===t}function h(t){return null==t}var f=n(34);e.parse=o,e.resolve=s,e.resolveObject=a,e.format=i,e.Url=r;var p=/^([a-z0-9.+-]+:)/i,d=/:[0-9]*$/,m=["<",">",'"',"`"," ","\r","\n"," "],v=["{","}","|","\\","^","`"].concat(m),g=["'"].concat(v),y=["%","/","?",";","#"].concat(g),b=["/","?","#"],w=255,x=/^[a-z0-9A-Z_-]{0,63}$/,_=/^([a-z0-9A-Z_-]{0,63})(.*)$/,E={javascript:!0,"javascript:":!0},O={javascript:!0,"javascript:":!0},j={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},S=n(37);r.prototype.parse=function(t,e,n){if(!c(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var r=t;r=r.trim();var o=p.exec(r);if(o){o=o[0];var i=o.toLowerCase();this.protocol=i,r=r.substr(o.length)}if(n||o||r.match(/^\/\/[^@\/]+@[^@\/]+/)){var s="//"===r.substr(0,2);!s||o&&O[o]||(r=r.substr(2),this.slashes=!0)}if(!O[o]&&(s||o&&!j[o])){for(var a=-1,u=0;u<b.length;u++){var l=r.indexOf(b[u]);-1!==l&&(-1===a||a>l)&&(a=l)}var h,d;d=-1===a?r.lastIndexOf("@"):r.lastIndexOf("@",a),-1!==d&&(h=r.slice(0,d),r=r.slice(d+1),this.auth=decodeURIComponent(h)),a=-1;for(var u=0;u<y.length;u++){var l=r.indexOf(y[u]);-1!==l&&(-1===a||a>l)&&(a=l)}-1===a&&(a=r.length),this.host=r.slice(0,a),r=r.slice(a),this.parseHost(),this.hostname=this.hostname||"";var m="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!m)for(var v=this.hostname.split(/\./),u=0,T=v.length;T>u;u++){var C=v[u];if(C&&!C.match(x)){for(var N="",A=0,k=C.length;k>A;A++)N+=C.charCodeAt(A)>127?"x":C[A];if(!N.match(x)){var I=v.slice(0,u),R=v.slice(u+1),D=C.match(_);D&&(I.push(D[1]),R.unshift(D[2])),R.length&&(r="/"+R.join(".")+r),this.hostname=I.join(".");break}}}if(this.hostname.length>w?this.hostname="":this.hostname=this.hostname.toLowerCase(),!m){for(var P=this.hostname.split("."),U=[],u=0;u<P.length;++u){var L=P[u];U.push(L.match(/[^A-Za-z0-9_-]/)?"xn--"+f.encode(L):L)}this.hostname=U.join(".")}var M=this.port?":"+this.port:"",q=this.hostname||"";this.host=q+M,this.href+=this.host,m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==r[0]&&(r="/"+r))}if(!E[i])for(var u=0,T=g.length;T>u;u++){var W=g[u],J=encodeURIComponent(W);J===W&&(J=escape(W)),r=r.split(W).join(J)}var B=r.indexOf("#");-1!==B&&(this.hash=r.substr(B),r=r.slice(0,B));var V=r.indexOf("?");if(-1!==V?(this.search=r.substr(V),this.query=r.substr(V+1),e&&(this.query=S.parse(this.query)),r=r.slice(0,V)):e&&(this.search="",this.query={}),r&&(this.pathname=r),j[i]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var M=this.pathname||"",L=this.search||"";this.path=M+L}return this.href=this.format(),this},r.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,i="";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&u(this.query)&&Object.keys(this.query).length&&(i=S.stringify(this.query));var s=this.search||i&&"?"+i||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||j[e])&&o!==!1?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),n=n.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),s=s.replace("#","%23"),e+o+n+s+r},r.prototype.resolve=function(t){return this.resolveObject(o(t,!1,!0)).format()},r.prototype.resolveObject=function(t){if(c(t)){var e=new r;e.parse(t,!1,!0),t=e}var n=new r;if(Object.keys(this).forEach(function(t){n[t]=this[t]},this),n.hash=t.hash,""===t.href)return n.href=n.format(),n;if(t.slashes&&!t.protocol)return Object.keys(t).forEach(function(e){"protocol"!==e&&(n[e]=t[e])}),j[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n;if(t.protocol&&t.protocol!==n.protocol){if(!j[t.protocol])return Object.keys(t).forEach(function(e){n[e]=t[e]}),n.href=n.format(),n;if(n.protocol=t.protocol,t.host||O[t.protocol])n.pathname=t.pathname;else{for(var o=(t.pathname||"").split("/");o.length&&!(t.host=o.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==o[0]&&o.unshift(""),o.length<2&&o.unshift(""),n.pathname=o.join("/")}if(n.search=t.search,n.query=t.query,n.host=t.host||"",n.auth=t.auth,n.hostname=t.hostname||t.host,n.port=t.port,n.pathname||n.search){var i=n.pathname||"",s=n.search||"";n.path=i+s}return n.slashes=n.slashes||t.slashes,n.href=n.format(),n}var a=n.pathname&&"/"===n.pathname.charAt(0),u=t.host||t.pathname&&"/"===t.pathname.charAt(0),f=u||a||n.host&&t.pathname,p=f,d=n.pathname&&n.pathname.split("/")||[],o=t.pathname&&t.pathname.split("/")||[],m=n.protocol&&!j[n.protocol];if(m&&(n.hostname="",n.port=null,n.host&&(""===d[0]?d[0]=n.host:d.unshift(n.host)),n.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===o[0]?o[0]=t.host:o.unshift(t.host)),t.host=null),f=f&&(""===o[0]||""===d[0])),u)n.host=t.host||""===t.host?t.host:n.host,n.hostname=t.hostname||""===t.hostname?t.hostname:n.hostname,n.search=t.search,n.query=t.query,d=o;else if(o.length)d||(d=[]),d.pop(),d=d.concat(o),n.search=t.search,n.query=t.query;else if(!h(t.search)){if(m){n.hostname=n.host=d.shift();var v=n.host&&n.host.indexOf("@")>0?n.host.split("@"):!1;v&&(n.auth=v.shift(),n.host=n.hostname=v.shift())}return n.search=t.search,n.query=t.query,l(n.pathname)&&l(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!d.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var g=d.slice(-1)[0],y=(n.host||t.host)&&("."===g||".."===g)||""===g,b=0,w=d.length;w>=0;w--)g=d[w],"."==g?d.splice(w,1):".."===g?(d.splice(w,1),b++):b&&(d.splice(w,1),b--);if(!f&&!p)for(;b--;b)d.unshift("..");!f||""===d[0]||d[0]&&"/"===d[0].charAt(0)||d.unshift(""),y&&"/"!==d.join("/").substr(-1)&&d.push("");var x=""===d[0]||d[0]&&"/"===d[0].charAt(0);if(m){n.hostname=n.host=x?"":d.length?d.shift():"";var v=n.host&&n.host.indexOf("@")>0?n.host.split("@"):!1;v&&(n.auth=v.shift(),n.host=n.hostname=v.shift())}return f=f||n.host&&d.length,f&&!x&&d.unshift(""),d.length?n.pathname=d.join("/"):(n.pathname=null,n.path=null),l(n.pathname)&&l(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var t=this.host,e=d.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e,n){(function(e){"use strict";var r=n(48);t.exports=n(46)(r),"_sockjs_onload"in e&&setTimeout(e._sockjs_onload,1)}).call(e,function(){return this}())},function(t,e,n){"use strict";function r(){i.call(this),this.initEvent("close",!1,!1),this.wasClean=!1,this.code=0,this.reason=""}var o=n(1),i=n(15);o(r,i),t.exports=r},function(t,e,n){"use strict";function r(t){i.call(this),this.initEvent("message",!1,!1),this.data=t}var o=n(1),i=n(15);o(r,i),t.exports=r},function(t,e,n){"use strict";function r(t){this._transport=t,t.on("message",this._transportMessage.bind(this)),t.on("close",this._transportClose.bind(this))}var o=n(6),i=n(12);r.prototype._transportClose=function(t,e){i.postMessage("c",o.stringify([t,e]))},r.prototype._transportMessage=function(t){i.postMessage("t",t)},r.prototype._send=function(t){this._transport.send(t)},r.prototype._close=function(){this._transport.close(),this._transport.removeAllListeners()},t.exports=r},function(t,e,n){(function(e){"use strict";var r=n(5),o=n(7),i=n(6),s=n(42),a=n(22),c=n(12),u=n(23),l=function(){};"production"!==e.env.NODE_ENV&&(l=n(3)("sockjs-client:iframe-bootstrap")),t.exports=function(t,e){var n={};e.forEach(function(t){t.facadeTransport&&(n[t.facadeTransport.transportName]=t.facadeTransport)}),n[a.transportName]=a;var h;t.bootstrap_iframe=function(){var e;c.currentWindowId=u.hash.slice(1);var a=function(o){if(o.source===parent&&("undefined"==typeof h&&(h=o.origin),o.origin===h)){var a;try{a=i.parse(o.data)}catch(f){return void l("bad json",o.data)}if(a.windowId===c.currentWindowId)switch(a.type){case"s":var p;try{p=i.parse(a.data)}catch(f){l("bad json",a.data);break}var d=p[0],m=p[1],v=p[2],g=p[3];if(l(d,m,v,g),d!==t.version)throw new Error('Incompatibile SockJS! Main site uses: "'+d+'", the iframe: "'+t.version+'".');if(!r.isOriginEqual(v,u.href)||!r.isOriginEqual(g,u.href))throw new Error("Can't connect to different domain from within an iframe. ("+u.href+", "+v+", "+g+")");e=new s(new n[m](v,g));break;case"m":e._send(a.data);break;case"c":e&&e._close(),e=null}}};o.attachEvent("message",a),c.postMessage("s")}}}).call(e,n(2))},function(t,e,n){(function(e,r){"use strict";function o(t,e){var n=this;i.call(this);var o=function(){var r=n.ifr=new u(l.transportName,e,t);r.once("message",function(t){if(t){var e;try{e=a.parse(t)}catch(r){return h("bad json",t),n.emit("finish"),void n.close()}var o=e[0],i=e[1];n.emit("finish",o,i)}n.close()}),r.once("close",function(){n.emit("finish"),n.close()})};r.document.body?o():c.attachEvent("load",o)}var i=n(4).EventEmitter,s=n(1),a=n(6),c=n(7),u=n(28),l=n(22),h=function(){};"production"!==e.env.NODE_ENV&&(h=n(3)("sockjs-client:info-iframe")),s(o,i),o.enabled=function(){return u.enabled()},o.prototype.close=function(){this.ifr&&this.ifr.close(),this.removeAllListeners(),this.ifr=null},t.exports=o}).call(e,n(2),function(){return this}())},function(t,e,n){(function(e){"use strict";function r(t,e){p(t);var n=this;o.call(this),setTimeout(function(){n.doXhr(t,e)},0)}var o=n(4).EventEmitter,i=n(1),s=n(5),a=n(17),c=n(14),u=n(10),l=n(57),h=n(44),f=n(21),p=function(){};"production"!==e.env.NODE_ENV&&(p=n(3)("sockjs-client:info-receiver")),i(r,o),r._getReceiver=function(t,e,n){return n.sameOrigin?new f(e,u):c.enabled?new f(e,c):a.enabled&&n.sameScheme?new f(e,a):h.enabled()?new h(t,e):new f(e,l)},r.prototype.doXhr=function(t,e){var n=this,o=s.addPath(t,"/info");p("doXhr",o),this.xo=r._getReceiver(t,o,e),this.timeoutRef=setTimeout(function(){p("timeout"),n._cleanup(!1),n.emit("finish")},r.timeout),this.xo.once("finish",function(t,e){p("finish",t,e),n._cleanup(!0),n.emit("finish",t,e)})},r.prototype._cleanup=function(t){p("_cleanup"),clearTimeout(this.timeoutRef),this.timeoutRef=null,!t&&this.xo&&this.xo.close(),this.xo=null},r.prototype.close=function(){p("close"),this.removeAllListeners(),this._cleanup(!1)},r.timeout=8e3,t.exports=r}).call(e,n(2))},function(t,e,n){(function(e,r){"use strict";function o(t,e,n){if(!(this instanceof o))return new o(t,e,n);if(arguments.length<1)throw new TypeError("Failed to construct 'SockJS: 1 argument required, but only 0 present");y.call(this),this.readyState=o.CONNECTING,this.extensions="",this.protocol="",n=n||{},n.protocols_whitelist&&v.warn("'protocols_whitelist' is DEPRECATED. Use 'transports' instead."),this._transportsWhitelist=n.transports;var r=n.sessionId||8;if("function"==typeof r)this._generateSessionId=r;else{if("number"!=typeof r)throw new TypeError("If sessionId is used in the options, it needs to be a number or a function.");this._generateSessionId=function(){return u.string(r)}}this._server=n.server||u.numberString(1e3);var i=new s(t);if(!i.host||!i.protocol)throw new SyntaxError("The URL '"+t+"' is invalid");if(i.hash)throw new SyntaxError("The URL must not contain a fragment");if("http:"!==i.protocol&&"https:"!==i.protocol)throw new SyntaxError("The URL's scheme must be either 'http:' or 'https:'. '"+i.protocol+"' is not allowed.");var a="https:"===i.protocol;if("https"===b.protocol&&!a)throw new Error("SecurityError: An insecure SockJS connection may not be initiated from a page loaded over HTTPS");e?Array.isArray(e)||(e=[e]):e=[];var c=e.sort();c.forEach(function(t,e){if(!t)throw new SyntaxError("The protocols entry '"+t+"' is invalid.");if(e<c.length-1&&t===c[e+1])throw new SyntaxError("The protocols entry '"+t+"' is duplicated.")});var l=h.getOrigin(b.href);this._origin=l?l.toLowerCase():null,i.set("pathname",i.pathname.replace(/\/+$/,"")),this.url=i.href,E("using url",this.url),this._urlInfo={nullOrigin:!m.hasDomain(),sameOrigin:h.isOriginEqual(this.url,b.href),sameScheme:h.isSchemeEqual(this.url,b.href)},this._ir=new _(this.url,this._urlInfo),this._ir.once("finish",this._receiveInfo.bind(this))}function i(t){return 1e3===t||t>=3e3&&4999>=t}n(47);var s=n(19),a=n(1),c=n(6),u=n(9),l=n(62),h=n(5),f=n(7),p=n(64),d=n(18),m=n(11),v=n(63),g=n(15),y=n(20),b=n(23),w=n(40),x=n(41),_=n(45),E=function(){};"production"!==e.env.NODE_ENV&&(r.dbg=n(3),E=r.dbg("sockjs-client:main"));var O;a(o,y),o.prototype.close=function(t,e){if(t&&!i(t))throw new Error("InvalidAccessError: Invalid code");if(e&&e.length>123)throw new SyntaxError("reason argument has an invalid length");if(this.readyState!==o.CLOSING&&this.readyState!==o.CLOSED){var n=!0;this._close(t||1e3,e||"Normal closure",n)}},o.prototype.send=function(t){if("string"!=typeof t&&(t=""+t),this.readyState===o.CONNECTING)throw new Error("InvalidStateError: The connection has not been established yet");this.readyState===o.OPEN&&this._transport.send(l.quote(t))},o.version=n(32),o.CONNECTING=0,o.OPEN=1,o.CLOSING=2,o.CLOSED=3,o.prototype._receiveInfo=function(t,e){if(E("_receiveInfo",e),this._ir=null,!t)return void this._close(1002,"Cannot connect to server");this._rto=this.countRTO(e),this._transUrl=t.base_url?t.base_url:this.url,t=d.extend(t,this._urlInfo),E("info",t);var n=O.filterToEnabled(this._transportsWhitelist,t);this._transports=n.main,E(this._transports.length+" enabled transports"),this._connect()},o.prototype._connect=function(){for(var t=this._transports.shift();t;t=this._transports.shift()){if(E("attempt",t.transportName),t.needBody&&(!r.document.body||"undefined"!=typeof r.document.readyState&&"complete"!==r.document.readyState&&"interactive"!==r.document.readyState))return E("waiting for body"),this._transports.unshift(t),void f.attachEvent("load",this._connect.bind(this));var e=this._rto*t.roundTrips||5e3;this._transportTimeoutId=setTimeout(this._transportTimeout.bind(this),e),E("using timeout",e);var n=h.addPath(this._transUrl,"/"+this._server+"/"+this._generateSessionId());E("transport url",n);var o=new t(n,this._transUrl);return o.on("message",this._transportMessage.bind(this)),o.once("close",this._transportClose.bind(this)),o.transportName=t.transportName,void(this._transport=o)}this._close(2e3,"All transports failed",!1)},o.prototype._transportTimeout=function(){E("_transportTimeout"),this.readyState===o.CONNECTING&&this._transportClose(2007,"Transport timed out")},o.prototype._transportMessage=function(t){E("_transportMessage",t);var e,n=this,r=t.slice(0,1),o=t.slice(1);switch(r){case"o":return void this._open();case"h":return this.dispatchEvent(new g("heartbeat")),void E("heartbeat",this.transport)}if(o)try{e=c.parse(o)}catch(i){E("bad json",o)}if("undefined"==typeof e)return void E("empty payload",o);switch(r){case"a":Array.isArray(e)&&e.forEach(function(t){E("message",n.transport,t),n.dispatchEvent(new x(t))});break;case"m":E("message",this.transport,e),this.dispatchEvent(new x(e));break;case"c":Array.isArray(e)&&2===e.length&&this._close(e[0],e[1],!0)}},o.prototype._transportClose=function(t,e){return E("_transportClose",this.transport,t,e),this._transport&&(this._transport.removeAllListeners(),this._transport=null,this.transport=null),i(t)||2e3===t||this.readyState!==o.CONNECTING?void this._close(t,e):void this._connect()},o.prototype._open=function(){E("_open",this._transport.transportName,this.readyState),this.readyState===o.CONNECTING?(this._transportTimeoutId&&(clearTimeout(this._transportTimeoutId),this._transportTimeoutId=null),this.readyState=o.OPEN,this.transport=this._transport.transportName,this.dispatchEvent(new g("open")),E("connected",this.transport)):this._close(1006,"Server lost session")},o.prototype._close=function(t,e,n){E("_close",this.transport,t,e,n,this.readyState);var r=!1;if(this._ir&&(r=!0,this._ir.close(),this._ir=null),this._transport&&(this._transport.close(),this._transport=null,this.transport=null),this.readyState===o.CLOSED)throw new Error("InvalidStateError: SockJS has already been closed");this.readyState=o.CLOSING,setTimeout(function(){this.readyState=o.CLOSED,r&&this.dispatchEvent(new g("error"));var i=new w("close");i.wasClean=n||!1,i.code=t||1e3,i.reason=e,this.dispatchEvent(i),this.onmessage=this.onclose=this.onerror=null,E("disconnected")}.bind(this),0)},o.prototype.countRTO=function(t){return t>100?4*t:300+t},t.exports=function(t){return O=p(t),n(43)(o,t),o}}).call(e,n(2),function(){return this}())},function(t,e){"use strict";function n(t){var e=+t;return e!==e?e=0:0!==e&&e!==1/0&&e!==-(1/0)&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}function r(t){return t>>>0}function o(){}var i,s=Array.prototype,a=Object.prototype,c=Function.prototype,u=String.prototype,l=s.slice,h=a.toString,f=function(t){return"[object Function]"===a.toString.call(t)},p=function(t){return"[object Array]"===h.call(t)},d=function(t){return"[object String]"===h.call(t)},m=Object.defineProperty&&function(){try{return Object.defineProperty({},"x",{}),!0}catch(t){return!1}}();i=m?function(t,e,n,r){!r&&e in t||Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:!0,value:n})}:function(t,e,n,r){!r&&e in t||(t[e]=n)};var v=function(t,e,n){for(var r in e)a.hasOwnProperty.call(e,r)&&i(t,r,e[r],n)},g=function(t){if(null==t)throw new TypeError("can't convert "+t+" to object");return Object(t)};v(c,{bind:function(t){var e=this;if(!f(e))throw new TypeError("Function.prototype.bind called on incompatible "+e);for(var n=l.call(arguments,1),r=function(){if(this instanceof c){var r=e.apply(this,n.concat(l.call(arguments)));return Object(r)===r?r:this}return e.apply(t,n.concat(l.call(arguments)))},i=Math.max(0,e.length-n.length),s=[],a=0;i>a;a++)s.push("$"+a);var c=Function("binder","return function ("+s.join(",")+"){ return binder.apply(this, arguments); }")(r);return e.prototype&&(o.prototype=e.prototype,c.prototype=new o,o.prototype=null),c}}),v(Array,{isArray:p});var y=Object("a"),b="a"!==y[0]||!(0 in y),w=function(t){var e=!0,n=!0;return t&&(t.call("foo",function(t,n,r){"object"!=typeof r&&(e=!1)}),t.call([1],function(){n="string"==typeof this},"x")),!!t&&e&&n};v(s,{forEach:function(t){var e=g(this),n=b&&d(this)?this.split(""):e,r=arguments[1],o=-1,i=n.length>>>0;if(!f(t))throw new TypeError;for(;++o<i;)o in n&&t.call(r,n[o],o,e)}},!w(s.forEach));var x=Array.prototype.indexOf&&-1!==[0,1].indexOf(1,2);v(s,{indexOf:function(t){var e=b&&d(this)?this.split(""):g(this),r=e.length>>>0;if(!r)return-1;var o=0;for(arguments.length>1&&(o=n(arguments[1])),o=o>=0?o:Math.max(0,r+o);r>o;o++)if(o in e&&e[o]===t)return o;return-1}},x);var _=u.split;2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||"t"==="tesst".split(/(s)*/)[1]||4!=="test".split(/(?:)/,-1).length||"".split(/.?/).length||".".split(/()()/).length>1?!function(){var t=void 0===/()??/.exec("")[1];u.split=function(e,n){var o=this;if(void 0===e&&0===n)return[];if("[object RegExp]"!==h.call(e))return _.call(this,e,n);var i,a,c,u,l=[],f=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":""),p=0;for(e=new RegExp(e.source,f+"g"),o+="",t||(i=new RegExp("^"+e.source+"$(?!\\s)",f)),n=void 0===n?-1>>>0:r(n);(a=e.exec(o))&&(c=a.index+a[0].length,!(c>p&&(l.push(o.slice(p,a.index)),!t&&a.length>1&&a[0].replace(i,function(){for(var t=1;t<arguments.length-2;t++)void 0===arguments[t]&&(a[t]=void 0)}),a.length>1&&a.index<o.length&&s.push.apply(l,a.slice(1)),u=a[0].length,p=c,l.length>=n)));)e.lastIndex===a.index&&e.lastIndex++;return p===o.length?(u||!e.test(""))&&l.push(""):l.push(o.slice(p)),l.length>n?l.slice(0,n):l}}():"0".split(void 0,0).length&&(u.split=function(t,e){return void 0===t&&0===e?[]:_.call(this,t,e)});var E=" \n\x0B\f\r   ᠎              \u2028\u2029\ufeff",O="​",j="["+E+"]",S=new RegExp("^"+j+j+"*"),T=new RegExp(j+j+"*$"),C=u.trim&&(E.trim()||!O.trim());v(u,{trim:function(){if(void 0===this||null===this)throw new TypeError("can't convert "+this+" to object");return String(this).replace(S,"").replace(T,"")}},C);var N=u.substr,A="".substr&&"b"!=="0b".substr(-1);v(u,{substr:function(t,e){return N.call(this,0>t&&(t=this.length+t)<0?0:t,e)}},A)},function(t,e,n){"use strict";t.exports=[n(58),n(60),n(30),n(26),n(16)(n(26)),n(27),n(16)(n(27)),n(31),n(59),n(16)(n(31)),n(50)]},function(t,e){(function(e){t.exports=e.WebSocket||e.MozWebSocket}).call(e,function(){return this}())},function(t,e,n){(function(e){"use strict";function r(t){if(!r.enabled())throw new Error("Transport created when disabled");i.call(this,t,"/jsonp",a,s)}var o=n(1),i=n(29),s=n(55),a=n(56);o(r,i),r.enabled=function(){return!!e.document},r.transportName="jsonp-polling",r.roundTrips=1,r.needBody=!0,t.exports=r}).call(e,function(){return this}())},function(t,e,n){(function(e){"use strict";function r(t,e){s(t),i.call(this),this.sendBuffer=[],this.sender=e,this.url=t}var o=n(1),i=n(4).EventEmitter,s=function(){};"production"!==e.env.NODE_ENV&&(s=n(3)("sockjs-client:buffered-sender")),o(r,i),r.prototype.send=function(t){s("send",t),this.sendBuffer.push(t),this.sendStop||this.sendSchedule()},r.prototype.sendScheduleWait=function(){s("sendScheduleWait");var t,e=this;this.sendStop=function(){s("sendStop"),e.sendStop=null,clearTimeout(t)},t=setTimeout(function(){s("timeout"),e.sendStop=null,e.sendSchedule()},25)},r.prototype.sendSchedule=function(){s("sendSchedule",this.sendBuffer.length);var t=this;if(this.sendBuffer.length>0){var e="["+this.sendBuffer.join(",")+"]";this.sendStop=this.sender(this.url,e,function(e){t.sendStop=null,e?(s("error",e),t.emit("close",e.code||1006,"Sending error: "+e),t._cleanup()):t.sendScheduleWait()}),this.sendBuffer=[]}},r.prototype._cleanup=function(){s("_cleanup"),this.removeAllListeners()},r.prototype.stop=function(){s("stop"),this._cleanup(),this.sendStop&&(this.sendStop(),this.sendStop=null)},t.exports=r}).call(e,n(2))},function(t,e,n){(function(e){"use strict";function r(t,e,n){s(e),i.call(this),this.Receiver=t,this.receiveUrl=e,this.AjaxObject=n,this._scheduleReceiver()}var o=n(1),i=n(4).EventEmitter,s=function(){};"production"!==e.env.NODE_ENV&&(s=n(3)("sockjs-client:polling")),o(r,i),r.prototype._scheduleReceiver=function(){s("_scheduleReceiver");var t=this,e=this.poll=new this.Receiver(this.receiveUrl,this.AjaxObject);e.on("message",function(e){s("message",e),t.emit("message",e)}),e.once("close",function(n,r){s("close",n,r,t.pollIsClosing),t.poll=e=null,t.pollIsClosing||("network"===r?t._scheduleReceiver():(t.emit("close",n||1006,r),t.removeAllListeners()))})},r.prototype.abort=function(){s("abort"),this.removeAllListeners(),this.pollIsClosing=!0,this.poll&&this.poll.abort()},t.exports=r}).call(e,n(2))},function(t,e,n){(function(e){"use strict";function r(t){a(t),i.call(this);var e=this,n=this.es=new s(t);n.onmessage=function(t){a("message",t.data),e.emit("message",decodeURI(t.data))},n.onerror=function(t){a("error",n.readyState,t);var r=2!==n.readyState?"network":"permanent";e._cleanup(),e._close(r)}}var o=n(1),i=n(4).EventEmitter,s=n(25),a=function(){};"production"!==e.env.NODE_ENV&&(a=n(3)("sockjs-client:receiver:eventsource")),o(r,i),r.prototype.abort=function(){a("abort"),this._cleanup(),this._close("user")},r.prototype._cleanup=function(){a("cleanup");var t=this.es;t&&(t.onmessage=t.onerror=null,t.close(),this.es=null)},r.prototype._close=function(t){a("close",t);var e=this;setTimeout(function(){e.emit("close",null,t),e.removeAllListeners()},200)},t.exports=r}).call(e,n(2))},function(t,e,n){(function(e,r){"use strict";function o(t){l(t),c.call(this);var e=this;s.polluteGlobalNamespace(),this.id="a"+u.string(6),t=a.addQuery(t,"c="+decodeURIComponent(s.WPrefix+"."+this.id)),l("using htmlfile",o.htmlfileEnabled);var n=o.htmlfileEnabled?s.createHtmlfile:s.createIframe;r[s.WPrefix][this.id]={start:function(){l("start"),e.iframeObj.loaded()},message:function(t){l("message",t),e.emit("message",t)},stop:function(){l("stop"),e._cleanup(),e._close("network")}},this.iframeObj=n(t,function(){l("callback"),e._cleanup(),e._close("permanent")})}var i=n(1),s=n(12),a=n(5),c=n(4).EventEmitter,u=n(9),l=function(){};"production"!==e.env.NODE_ENV&&(l=n(3)("sockjs-client:receiver:htmlfile")),i(o,c),o.prototype.abort=function(){l("abort"),this._cleanup(),this._close("user")},o.prototype._cleanup=function(){l("_cleanup"),this.iframeObj&&(this.iframeObj.cleanup(),this.iframeObj=null),delete r[s.WPrefix][this.id]},o.prototype._close=function(t){l("_close",t),this.emit("close",null,t),this.removeAllListeners()},o.htmlfileEnabled=!1;var h=["Active"].concat("Object").join("X");if(h in r)try{o.htmlfileEnabled=!!new r[h]("htmlfile")}catch(f){}o.enabled=o.htmlfileEnabled||s.iframeEnabled,t.exports=o}).call(e,n(2),function(){return this}())},function(t,e,n){(function(e,r){"use strict";function o(t){h(t);var e=this;l.call(this),i.polluteGlobalNamespace(),this.id="a"+s.string(6);var n=c.addQuery(t,"c="+encodeURIComponent(i.WPrefix+"."+this.id));r[i.WPrefix][this.id]=this._callback.bind(this),this._createScript(n),this.timeoutId=setTimeout(function(){h("timeout"),e._abort(new Error("JSONP script loaded abnormally (timeout)"))},o.timeout)}var i=n(12),s=n(9),a=n(11),c=n(5),u=n(1),l=n(4).EventEmitter,h=function(){};"production"!==e.env.NODE_ENV&&(h=n(3)("sockjs-client:receiver:jsonp")),u(o,l),o.prototype.abort=function(){if(h("abort"),r[i.WPrefix][this.id]){var t=new Error("JSONP user aborted read");t.code=1e3,this._abort(t)}},o.timeout=35e3,o.scriptErrorTimeout=1e3,o.prototype._callback=function(t){h("_callback",t),this._cleanup(),this.aborting||(t&&(h("message",t),this.emit("message",t)),this.emit("close",null,"network"),this.removeAllListeners())},o.prototype._abort=function(t){h("_abort",t),this._cleanup(),this.aborting=!0,this.emit("close",t.code,t.message),this.removeAllListeners()},o.prototype._cleanup=function(){if(h("_cleanup"),clearTimeout(this.timeoutId),this.script2&&(this.script2.parentNode.removeChild(this.script2),this.script2=null),this.script){var t=this.script;t.parentNode.removeChild(t),t.onreadystatechange=t.onerror=t.onload=t.onclick=null,this.script=null}delete r[i.WPrefix][this.id]},o.prototype._scriptError=function(){h("_scriptError");var t=this;this.errorTimer||(this.errorTimer=setTimeout(function(){t.loadedOkay||t._abort(new Error("JSONP script loaded abnormally (onerror)"))},o.scriptErrorTimeout))},o.prototype._createScript=function(t){h("_createScript",t);var e,n=this,o=this.script=r.document.createElement("script");if(o.id="a"+s.string(8),o.src=t,o.type="text/javascript",o.charset="UTF-8",o.onerror=this._scriptError.bind(this),o.onload=function(){h("onload"),n._abort(new Error("JSONP script loaded abnormally (onload)"))},o.onreadystatechange=function(){if(h("onreadystatechange",o.readyState),/loaded|closed/.test(o.readyState)){if(o&&o.htmlFor&&o.onclick){n.loadedOkay=!0;try{o.onclick()}catch(t){}}o&&n._abort(new Error("JSONP script loaded abnormally (onreadystatechange)"))}},"undefined"==typeof o.async&&r.document.attachEvent)if(a.isOpera())e=this.script2=r.document.createElement("script"),e.text="try{var a = document.getElementById('"+o.id+"'); if(a)a.onerror();}catch(x){};",o.async=e.async=!1;else{try{o.htmlFor=o.id,o.event="onclick"}catch(i){}o.async=!0}"undefined"!=typeof o.async&&(o.async=!0);var c=r.document.getElementsByTagName("head")[0];c.insertBefore(o,c.firstChild),e&&c.insertBefore(e,c.firstChild)},t.exports=o}).call(e,n(2),function(){return this}())},function(t,e,n){(function(e,r){"use strict";function o(t){c("createIframe",t);try{return r.document.createElement('<iframe name="'+t+'">')}catch(e){var n=r.document.createElement("iframe");return n.name=t,n}}function i(){c("createForm"),u=r.document.createElement("form"),u.style.display="none",u.style.position="absolute",u.method="POST",u.enctype="application/x-www-form-urlencoded",u.acceptCharset="UTF-8",l=r.document.createElement("textarea"),l.name="d",u.appendChild(l),r.document.body.appendChild(u)}var s=n(9),a=n(5),c=function(){};"production"!==e.env.NODE_ENV&&(c=n(3)("sockjs-client:sender:jsonp"));var u,l;t.exports=function(t,e,n){c(t,e),u||i();var r="a"+s.string(8);u.target=r,u.action=a.addQuery(a.addPath(t,"/jsonp_send"),"i="+r);var h=o(r);h.id=r,h.style.display="none",u.appendChild(h);try{l.value=e}catch(f){}u.submit();var p=function(t){c("completed",r,t),h.onerror&&(h.onreadystatechange=h.onerror=h.onload=null,setTimeout(function(){c("cleaning up",r),h.parentNode.removeChild(h),h=null},500),l.value="",n(t))};return h.onerror=function(){c("onerror",r),p()},h.onload=function(){c("onload",r),p()},h.onreadystatechange=function(t){c("onreadystatechange",r,h.readyState,t),"complete"===h.readyState&&p()},function(){c("aborted",r),p(new Error("Aborted"));
3
+ }}}).call(e,n(2),function(){return this}())},function(t,e,n){"use strict";function r(){var t=this;o.call(this),this.to=setTimeout(function(){t.emit("finish",200,"{}")},r.timeout)}var o=n(4).EventEmitter,i=n(1);i(r,o),r.prototype.close=function(){clearTimeout(this.to)},r.timeout=2e3,t.exports=r},function(t,e,n){(function(e){"use strict";function r(t){if(!r.enabled())throw new Error("Transport created when disabled");a.call(this),u("constructor",t);var e=this,n=i.addPath(t,"/websocket");n="https"===n.slice(0,5)?"wss"+n.slice(5):"ws"+n.slice(4),this.url=n,this.ws=new c(this.url),this.ws.onmessage=function(t){u("message event",t.data),e.emit("message",t.data)},this.unloadRef=o.unloadAdd(function(){u("unload"),e.ws.close()}),this.ws.onclose=function(t){u("close event",t.code,t.reason),e.emit("close",t.code,t.reason),e._cleanup()},this.ws.onerror=function(t){u("error event",t),e.emit("close",1006,"WebSocket connection broken"),e._cleanup()}}var o=n(7),i=n(5),s=n(1),a=n(4).EventEmitter,c=n(49),u=function(){};"production"!==e.env.NODE_ENV&&(u=n(3)("sockjs-client:websocket")),s(r,a),r.prototype.send=function(t){var e="["+t+"]";u("send",e),this.ws.send(e)},r.prototype.close=function(){u("close"),this.ws&&this.ws.close(),this._cleanup()},r.prototype._cleanup=function(){u("_cleanup");var t=this.ws;t&&(t.onmessage=t.onclose=t.onerror=null),o.unloadDel(this.unloadRef),this.unloadRef=this.ws=null,this.removeAllListeners()},r.enabled=function(){return u("enabled"),!!c},r.transportName="websocket",r.roundTrips=2,t.exports=r}).call(e,n(2))},function(t,e,n){"use strict";function r(t){if(!c.enabled)throw new Error("Transport created when disabled");i.call(this,t,"/xhr",a,c)}var o=n(1),i=n(8),s=n(30),a=n(13),c=n(17);o(r,i),r.enabled=s.enabled,r.transportName="xdr-polling",r.roundTrips=2,t.exports=r},function(t,e,n){(function(e){"use strict";function r(t){if(!c.enabled&&!a.enabled)throw new Error("Transport created when disabled");i.call(this,t,"/xhr_streaming",s,a)}var o=n(1),i=n(8),s=n(13),a=n(14),c=n(10),u=n(11);o(r,i),r.enabled=function(t){return t.nullOrigin?!1:u.isOpera()?!1:a.enabled},r.transportName="xhr-streaming",r.roundTrips=2,r.needBody=!!e.document,t.exports=r}).call(e,function(){return this}())},function(t,e){(function(e){"use strict";e.crypto&&e.crypto.getRandomValues?t.exports.randomBytes=function(t){var n=new Uint8Array(t);return e.crypto.getRandomValues(n),n}:t.exports.randomBytes=function(t){for(var e=new Array(t),n=0;t>n;n++)e[n]=Math.floor(256*Math.random());return e}}).call(e,function(){return this}())},function(t,e,n){"use strict";var r,o=n(6),i=/[\x00-\x1f\ud800-\udfff\ufffe\uffff\u0300-\u0333\u033d-\u0346\u034a-\u034c\u0350-\u0352\u0357-\u0358\u035c-\u0362\u0374\u037e\u0387\u0591-\u05af\u05c4\u0610-\u0617\u0653-\u0654\u0657-\u065b\u065d-\u065e\u06df-\u06e2\u06eb-\u06ec\u0730\u0732-\u0733\u0735-\u0736\u073a\u073d\u073f-\u0741\u0743\u0745\u0747\u07eb-\u07f1\u0951\u0958-\u095f\u09dc-\u09dd\u09df\u0a33\u0a36\u0a59-\u0a5b\u0a5e\u0b5c-\u0b5d\u0e38-\u0e39\u0f43\u0f4d\u0f52\u0f57\u0f5c\u0f69\u0f72-\u0f76\u0f78\u0f80-\u0f83\u0f93\u0f9d\u0fa2\u0fa7\u0fac\u0fb9\u1939-\u193a\u1a17\u1b6b\u1cda-\u1cdb\u1dc0-\u1dcf\u1dfc\u1dfe\u1f71\u1f73\u1f75\u1f77\u1f79\u1f7b\u1f7d\u1fbb\u1fbe\u1fc9\u1fcb\u1fd3\u1fdb\u1fe3\u1feb\u1fee-\u1fef\u1ff9\u1ffb\u1ffd\u2000-\u2001\u20d0-\u20d1\u20d4-\u20d7\u20e7-\u20e9\u2126\u212a-\u212b\u2329-\u232a\u2adc\u302b-\u302c\uaab2-\uaab3\uf900-\ufa0d\ufa10\ufa12\ufa15-\ufa1e\ufa20\ufa22\ufa25-\ufa26\ufa2a-\ufa2d\ufa30-\ufa6d\ufa70-\ufad9\ufb1d\ufb1f\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufb4e\ufff0-\uffff]/g,s=function(t){var e,n={},r=[];for(e=0;65536>e;e++)r.push(String.fromCharCode(e));return t.lastIndex=0,r.join("").replace(t,function(t){return n[t]="\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4),""}),t.lastIndex=0,n};t.exports={quote:function(t){var e=o.stringify(t);return i.lastIndex=0,i.test(e)?(r||(r=s(i)),e.replace(i,function(t){return r[t]})):e}}},function(t,e){(function(e){"use strict";var n={};["log","debug","warn"].forEach(function(t){var r=e.console&&e.console[t]&&e.console[t].apply;n[t]=r?function(){return e.console[t].apply(e.console,arguments)}:"log"===t?function(){}:n.log}),t.exports=n}).call(e,function(){return this}())},function(t,e,n){(function(e){"use strict";var r=function(){};"production"!==e.env.NODE_ENV&&(r=n(3)("sockjs-client:utils:transport")),t.exports=function(t){return{filterToEnabled:function(e,n){var o={main:[],facade:[]};return e?"string"==typeof e&&(e=[e]):e=[],t.forEach(function(t){return t?"websocket"===t.transportName&&n.websocket===!1?void r("disabled from server","websocket"):e.length&&-1===e.indexOf(t.transportName)?void r("not in whitelist",t.transportName):void(t.enabled(n)?(r("enabled",t.transportName),o.main.push(t),t.facadeTransport&&o.facade.push(t.facadeTransport)):r("disabled",t.transportName)):void 0}),o}}}}).call(e,n(2))},function(t,e,n){function r(){return e.colors[l++%e.colors.length]}function o(t){function n(){}function o(){var t=o,n=+new Date,i=n-(u||n);t.diff=i,t.prev=u,t.curr=n,u=n,null==t.useColors&&(t.useColors=e.useColors()),null==t.color&&t.useColors&&(t.color=r());var s=Array.prototype.slice.call(arguments);s[0]=e.coerce(s[0]),"string"!=typeof s[0]&&(s=["%o"].concat(s));var a=0;s[0]=s[0].replace(/%([a-z%])/g,function(n,r){if("%%"===n)return n;a++;var o=e.formatters[r];if("function"==typeof o){var i=s[a];n=o.call(t,i),s.splice(a,1),a--}return n}),"function"==typeof e.formatArgs&&(s=e.formatArgs.apply(t,s));var c=o.log||e.log||console.log.bind(console);c.apply(t,s)}n.enabled=!1,o.enabled=!0;var i=e.enabled(t)?o:n;return i.namespace=t,i}function i(t){e.save(t);for(var n=(t||"").split(/[\s,]+/),r=n.length,o=0;r>o;o++)n[o]&&(t=n[o].replace(/\*/g,".*?"),"-"===t[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))}function s(){e.enable("")}function a(t){var n,r;for(n=0,r=e.skips.length;r>n;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;r>n;n++)if(e.names[n].test(t))return!0;return!1}function c(t){return t instanceof Error?t.stack||t.message:t}e=t.exports=o,e.coerce=c,e.disable=s,e.enable=i,e.enabled=a,e.humanize=n(66),e.names=[],e.skips=[],e.formatters={};var u,l=0},function(t,e){function n(t){if(t=""+t,!(t.length>1e4)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*l;case"days":case"day":case"d":return n*u;case"hours":case"hour":case"hrs":case"hr":case"h":return n*c;case"minutes":case"minute":case"mins":case"min":case"m":return n*a;case"seconds":case"second":case"secs":case"sec":case"s":return n*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n}}}}function r(t){return t>=u?Math.round(t/u)+"d":t>=c?Math.round(t/c)+"h":t>=a?Math.round(t/a)+"m":t>=s?Math.round(t/s)+"s":t+"ms"}function o(t){return i(t,u,"day")||i(t,c,"hour")||i(t,a,"minute")||i(t,s,"second")||t+" ms"}function i(t,e,n){return e>t?void 0:1.5*e>t?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}var s=1e3,a=60*s,c=60*a,u=24*c,l=365.25*u;t.exports=function(t,e){return e=e||{},"string"==typeof t?n(t):e["long"]?o(t):r(t)}},function(t,e,n){(function(e){"use strict";var r,o={hash:1,query:1};t.exports=function(t){t=t||e.location||{},r=r||n(19);var i,s={},a=typeof t;if("blob:"===t.protocol)s=new r(unescape(t.pathname),{});else if("string"===a){s=new r(t,{});for(i in o)delete s[i]}else if("object"===a)for(i in t)i in o||(s[i]=t[i]);return s}}).call(e,function(){return this}())},function(t,e){"use strict";function n(t){for(var e,n=/([^=?&]+)=([^&]*)/g,r={};e=n.exec(t);r[decodeURIComponent(e[1])]=decodeURIComponent(e[2]));return r}function r(t,e){e=e||"";var n=[];"string"!=typeof e&&(e="?");for(var r in t)o.call(t,r)&&n.push(encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return n.length?e+n.join("&"):""}var o=Object.prototype.hasOwnProperty;e.stringify=r,e.parse=n},function(t,e){"use strict";t.exports=function(t,e){if(e=e.split(":")[0],t=+t,!t)return!1;switch(e){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t}},function(t,e,n){"use strict";var r=n(71)();t.exports=function(t){return"string"==typeof t?t.replace(r,""):t}},function(t,e){"use strict";t.exports=function(){return/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g}},function(t,e){(function(e){t.exports=e}).call(e,{})}]);
package/client/index.js CHANGED
@@ -1,77 +1,89 @@
1
1
  var url = require('url');
2
- var io = require("socket.io-client");
2
+ var SockJS = require("sockjs-client");
3
3
  var stripAnsi = require('strip-ansi');
4
4
  var scriptElements = document.getElementsByTagName("script");
5
+ var scriptHost = scriptElements[scriptElements.length-1].getAttribute("src").replace(/\/[^\/]+$/, "");
5
6
 
7
+ // If this bundle is inlined, use the resource query to get the correct url.
8
+ // Else, get the url from the <script> this file was called with.
6
9
  var urlParts = url.parse(typeof __resourceQuery === "string" && __resourceQuery ?
7
10
  __resourceQuery.substr(1) :
8
- scriptElements[scriptElements.length-1].getAttribute("src").replace(/\/[^\/]+$/, "")
9
- );
10
-
11
- io = io.connect(
12
- url.format({
13
- protocol: urlParts.protocol,
14
- auth: urlParts.auth,
15
- hostname: (urlParts.hostname === '0.0.0.0') ? window.location.hostname : urlParts.hostname,
16
- port: urlParts.port
17
- }), {
18
- path: urlParts.path === '/' ? null : urlParts.path
19
- }
11
+ (scriptHost ? scriptHost : "/")
20
12
  );
21
13
 
14
+ var sock = null;
22
15
  var hot = false;
23
16
  var initial = true;
24
17
  var currentHash = "";
25
18
 
26
- io.on("hot", function() {
27
- hot = true;
28
- console.log("[WDS] Hot Module Replacement enabled.");
29
- });
30
-
31
- io.on("invalid", function() {
32
- console.log("[WDS] App updated. Recompiling...");
33
- });
34
-
35
- io.on("hash", function(hash) {
36
- currentHash = hash;
37
- });
38
-
39
- io.on("still-ok", function() {
40
- console.log("[WDS] Nothing changed.")
41
- });
19
+ var onSocketMsg = {
20
+ hot: function() {
21
+ hot = true;
22
+ console.log("[WDS] Hot Module Replacement enabled.");
23
+ },
24
+ invalid: function() {
25
+ console.log("[WDS] App updated. Recompiling...");
26
+ },
27
+ hash: function(hash) {
28
+ currentHash = hash;
29
+ },
30
+ "still-ok": function() {
31
+ console.log("[WDS] Nothing changed.")
32
+ },
33
+ ok: function() {
34
+ if(initial) return initial = false;
35
+ reloadApp();
36
+ },
37
+ warnings: function(warnings) {
38
+ console.log("[WDS] Warnings while compiling.");
39
+ for(var i = 0; i < warnings.length; i++)
40
+ console.warn(stripAnsi(warnings[i]));
41
+ if(initial) return initial = false;
42
+ reloadApp();
43
+ },
44
+ errors: function(errors) {
45
+ console.log("[WDS] Errors while compiling.");
46
+ for(var i = 0; i < errors.length; i++)
47
+ console.error(stripAnsi(errors[i]));
48
+ if(initial) return initial = false;
49
+ reloadApp();
50
+ },
51
+ "proxy-error": function(errors) {
52
+ console.log("[WDS] Proxy error.");
53
+ for(var i = 0; i < errors.length; i++)
54
+ console.error(stripAnsi(errors[i]));
55
+ if(initial) return initial = false;
56
+ reloadApp();
57
+ }
58
+ };
42
59
 
43
- io.on("ok", function() {
44
- if(initial) return initial = false;
45
- reloadApp();
46
- });
60
+ var newConnection = function() {
61
+ sock = new SockJS(url.format({
62
+ protocol: urlParts.protocol,
63
+ auth: urlParts.auth,
64
+ hostname: (urlParts.hostname === '0.0.0.0') ? window.location.hostname : urlParts.hostname,
65
+ port: urlParts.port,
66
+ pathname: urlParts.path === '/' ? "/sockjs-node" : urlParts.path
67
+ }));
47
68
 
48
- io.on("warnings", function(warnings) {
49
- console.log("[WDS] Warnings while compiling.");
50
- for(var i = 0; i < warnings.length; i++)
51
- console.warn(stripAnsi(warnings[i]));
52
- if(initial) return initial = false;
53
- reloadApp();
54
- });
69
+ sock.onclose = function() {
70
+ console.error("[WDS] Disconnected!");
55
71
 
56
- io.on("errors", function(errors) {
57
- console.log("[WDS] Errors while compiling.");
58
- for(var i = 0; i < errors.length; i++)
59
- console.error(stripAnsi(errors[i]));
60
- if(initial) return initial = false;
61
- reloadApp();
62
- });
72
+ // Try to reconnect.
73
+ sock = null;
74
+ setTimeout(function () {
75
+ newConnection();
76
+ }, 2000);
77
+ };
63
78
 
64
- io.on("proxy-error", function(errors) {
65
- console.log("[WDS] Proxy error.");
66
- for(var i = 0; i < errors.length; i++)
67
- console.error(stripAnsi(errors[i]));
68
- if(initial) return initial = false;
69
- reloadApp();
70
- });
79
+ sock.onmessage = function(e) {
80
+ // This assumes that all data sent via the websocket is JSON.
81
+ var msg = JSON.parse(e.data);
82
+ onSocketMsg[msg.type](msg.data);
83
+ };
84
+ };
71
85
 
72
- io.on("disconnect", function() {
73
- console.error("[WDS] Disconnected!");
74
- });
86
+ newConnection();
75
87
 
76
88
  function reloadApp() {
77
89
  if(hot) {