1!function i(s,a,p){function c(e,t){if(!a[e]){if(!s[e]){var r="function"==typeof require&&require;if(!t&&r)return r(e,!0);if(u)return u(e,!0);var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}var o=a[e]={exports:{}};s[e][0].call(o.exports,function(t){return c(s[e][1][t]||t)},o,o.exports,i,s,a,p)}return a[e].exports}for(var u="function"==typeof require&&require,t=0;t<p.length;t++)c(p[t]);return c}({1:[function(t,e,r){function s(){}e.exports=function(t,r,n){var o=!1;return n=n||s,0===(i.count=t)?r():i;function i(t,e){if(i.count<=0)throw new Error("after called too many times");--i.count,t?(o=!0,r(t),r=n):0!==i.count||o||r(null,e)}}},{}],2:[function(t,e,r){e.exports=function(t,e,r){var n=t.byteLength;if(e=e||0,r=r||n,t.slice)return t.slice(e,r);if(e<0&&(e+=n),r<0&&(r+=n),n<r&&(r=n),n<=e||r<=e||0===n)return new ArrayBuffer(0);for(var o=new Uint8Array(t),i=new Uint8Array(r-e),s=e,a=0;s<r;s++,a++)i[a]=o[s];return i.buffer}},{}],3:[function(t,e,r){function n(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=0<t.jitter&&t.jitter<=1?t.jitter:0,this.attempts=0}(e.exports=n).prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),r=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-r:t+r}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}},{}],4:[function(t,e,r){!function(){"use strict";for(var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=new Uint8Array(256),t=0;t<i.length;t++)f[i.charCodeAt(t)]=t;r.encode=function(t){var e,r=new Uint8Array(t),n=r.length,o="";for(e=0;e<n;e+=3)o+=i[r[e]>>2],o+=i[(3&r[e])<<4|r[e+1]>>4],o+=i[(15&r[e+1])<<2|r[e+2]>>6],o+=i[63&r[e+2]];return n%3==2?o=o.substring(0,o.length-1)+"=":n%3==1&&(o=o.substring(0,o.length-2)+"=="),o},r.decode=function(t){var e,r,n,o,i,s=.75*t.length,a=t.length,p=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var c=new ArrayBuffer(s),u=new Uint8Array(c);for(e=0;e<a;e+=4)r=f[t.charCodeAt(e)],n=f[t.charCodeAt(e+1)],o=f[t.charCodeAt(e+2)],i=f[t.charCodeAt(e+3)],u[p++]=r<<2|n>>4,u[p++]=(15&n)<<4|o>>2,u[p++]=(3&o)<<6|63&i;return c}}()},{}],5:[function(t,e,r){"use strict";r.byteLength=function(t){var e=l(t),r=e[0],n=e[1];return 3*(r+n)/4-n},r.toByteArray=function(t){for(var e,r=l(t),n=r[0],o=r[1],i=new h((c=n,u=o,3*(c+u)/4-u)),s=0,a=0<o?n-4:n,p=0;p<a;p+=4)e=f[t.charCodeAt(p)]<<18|f[t.charCodeAt(p+1)]<<12|f[t.charCodeAt(p+2)]<<6|f[t.charCodeAt(p+3)],i[s++]=e>>16&255,i[s++]=e>>8&255,i[s++]=255&e;var c,u;2===o&&(e=f[t.charCodeAt(p)]<<2|f[t.charCodeAt(p+1)]>>4,i[s++]=255&e);1===o&&(e=f[t.charCodeAt(p)]<<10|f[t.charCodeAt(p+1)]<<4|f[t.charCodeAt(p+2)]>>2,i[s++]=e>>8&255,i[s++]=255&e);return i},r.fromByteArray=function(t){for(var e,r=t.length,n=r%3,o=[],i=0,s=r-n;i<s;i+=16383)o.push(p(t,i,s<i+16383?s:i+16383));1===n?(e=t[r-1],o.push(a[e>>2]+a[e<<4&63]+"==")):2===n&&(e=(t[r-2]<<8)+t[r-1],o.push(a[e>>10]+a[e>>4&63]+a[e<<2&63]+"="));return o.join("")};for(var a=[],f=[],h="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,i=n.length;o<i;++o)a[o]=n[o],f[n.charCodeAt(o)]=o;function l(t){var e=t.length;if(0<e%4)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function p(t,e,r){for(var n,o,i=[],s=e;s<r;s+=3)n=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),i.push(a[(o=n)>>18&63]+a[o>>12&63]+a[o>>6&63]+a[63&o]);return i.join("")}f["-".charCodeAt(0)]=62,f["_".charCodeAt(0)]=63},{}],6:[function(t,e,r){var n=void 0!==n?n:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder&&MozBlobBuilder,o=function(){try{return 2===new Blob(["hi"]).size}catch(t){return!1}}(),i=o&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(t){return!1}}(),s=n&&n.prototype.append&&n.prototype.getBlob;function a(t){return t.map(function(t){if(t.buffer instanceof ArrayBuffer){var e=t.buffer;
1if(t.byteLength!==e.byteLength){var r=new Uint8Array(t.byteLength);r.set(new Uint8Array(e,t.byteOffset,t.byteLength)),e=r.buffer}return e}return t})}function p(t,e){e=e||{};var r=new n;return a(t).forEach(function(t){r.append(t)}),e.type?r.getBlob(e.type):r.getBlob()}function c(t,e){return new Blob(a(t),e||{})}"undefined"!=typeof Blob&&(p.prototype=Blob.prototype,c.prototype=Blob.prototype),e.exports=o?i?Blob:c:s?p:void 0},{}],7:[function(t,e,r){},{}],8:[function(t,e,r){"use strict";var o=[],s=function(t,e){var r=document.head||document.getElementsByTagName("head")[0],n=o[o.length-1];if((e=e||{}).insertAt=e.insertAt||"bottom","top"===e.insertAt)n?n.nextSibling?r.insertBefore(t,n.nextSibling):r.appendChild(t):r.insertBefore(t,r.firstChild),o.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");r.appendChild(t)}};e.exports={createLink:function(t,e){var r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("link");for(var o in n.href=t,n.rel="stylesheet",e)if(e.hasOwnProperty(o)){var i=e[o];n.setAttribute("data-"+o,i)}r.appendChild(n)},createStyle:function(t,e,r){r=r||{};var n=document.createElement("style");for(var o in n.type="text/css",e)if(e.hasOwnProperty(o)){var i=e[o];n.setAttribute("data-"+o,i)}n.sheet?(n.innerHTML=t,n.sheet.cssText=t,s(n,{insertAt:r.insertAt})):n.styleSheet?(s(n,{insertAt:r.insertAt}),n.styleSheet.cssText=t):(n.appendChild(document.createTextNode(t)),s(n,{insertAt:r.insertAt}))}}},{}],9:[function(t,e,r){"use strict";var n=t("base64-js"),i=t("ieee754");r.Buffer=f,r.SlowBuffer=function(t){+t!=t&&(t=0);return f.alloc(+t)},r.INSPECT_MAX_BYTES=50;var o=2147483647;function s(t){if(o<t)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return e.__proto__=f.prototype,e}function f(t,e,r){if("number"!=typeof t)return a(t,e,r);if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return c(t)}function a(t,e,r){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!f.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|l(t,e),n=s(r),o=n.write(t,e);o!==r&&(n=n.slice(0,o));return n}(t,e);if(ArrayBuffer.isView(t))return u(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(j(t,ArrayBuffer)||t&&j(t.buffer,ArrayBuffer))return function(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r);return n.__proto__=f.prototype,n}(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return f.from(n,e,r);var o=function(t){if(f.isBuffer(t)){var e=0|h(t.length),r=s(e);return 0===r.length||t.copy(r,0,0,e),r}if(void 0!==t.length)return"number"!=typeof t.length||I(t.length)?s(0):u(t);if("Buffer"===t.type&&Array.isArray(t.data))return u(t.data)}(t);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return f.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function p(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function c(t){return p(t),s(t<0?0:0|h(t))}function u(t){for(var e=t.length<0?0:0|h(t.length),r=s(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function h(t){if(o<=t)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function l(t,e){if(f.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||j(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=2<arguments.length&&!0===arguments[2];if(!n&&0===r)return 0;for(var o=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return U(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return O(t).length;default:if(o)return n?-1:U(t).length;e=(""+e).toLowerCase(),o=!0}}function d(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function y(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):2147483647<r?r=2147483647:r<-2147483648&&(r=-2147483648),I(r=+r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}
1else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=f.from(e,n)),f.isBuffer(e))return 0===e.length?-1:g(t,e,r,n,o);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):g(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function g(t,e,r,n,o){var i,s=1,a=t.length,p=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a/=s=2,p/=2,r/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){var u=-1;for(i=r;i<a;i++)if(c(t,i)===c(e,-1===u?0:i-u)){if(-1===u&&(u=i),i-u+1===p)return u*s}else-1!==u&&(i-=i-u),u=-1}else for(a<r+p&&(r=a-p),i=r;0<=i;i--){for(var f=!0,h=0;h<p;h++)if(c(t,i+h)!==c(e,h)){f=!1;break}if(f)return i}return-1}function m(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?o<(n=Number(n))&&(n=o):n=o;var i=e.length;i/2<n&&(n=i/2);for(var s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(I(a))return s;t[r+s]=a}return s}function b(t,e,r,n){return L(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function v(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function w(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i,s,a,p,c=t[o],u=null,f=239<c?4:223<c?3:191<c?2:1;if(o+f<=r)switch(f){case 1:c<128&&(u=c);break;case 2:128==(192&(i=t[o+1]))&&127<(p=(31&c)<<6|63&i)&&(u=p);break;case 3:i=t[o+1],s=t[o+2],128==(192&i)&&128==(192&s)&&2047<(p=(15&c)<<12|(63&i)<<6|63&s)&&(p<55296||57343<p)&&(u=p);break;case 4:i=t[o+1],s=t[o+2],a=t[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&65535<(p=(15&c)<<18|(63&i)<<12|(63&s)<<6|63&a)&&p<1114112&&(u=p)}null===u?(u=65533,f=1):65535<u&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),o+=f}return function(t){var e=t.length;if(e<=x)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=x));return r}(n)}r.kMaxLength=o,(f.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}())||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),f.poolSize=8192,f.from=function(t,e,r){return a(t,e,r)},f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,f.alloc=function(t,e,r){return o=e,i=r,p(n=t),n<=0?s(n):void 0!==o?"string"==typeof i?s(n).fill(o,i):s(n).fill(o):s(n);var n,o,i},f.allocUnsafe=function(t){return c(t)},f.allocUnsafeSlow=function(t){return c(t)},f.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==f.prototype},f.compare=function(t,e){if(j(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),j(e,Uint8Array)&&(e=f.from(e,e.offset,e.byteLength)),!f.isBuffer(t)||!f.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},f.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return f.alloc(0);var r;if(void 0===e)for(r=e=0;r<t.length;++r)e+=t[r].length;var n=f.allocUnsafe(e),o=0;for(r=0;r<t.length;++r){var i=t[r];
1if(j(i,Uint8Array)&&(i=f.from(i)),!f.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,o),o+=i.length}return n},f.byteLength=l,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)d(this,e,e+1);return this},f.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)d(this,e,e+3),d(this,e+1,e+2);return this},f.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)d(this,e,e+7),d(this,e+1,e+6),d(this,e+2,e+5),d(this,e+3,e+4);return this},f.prototype.toLocaleString=f.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?w(this,0,t):function(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return A(this,e,r);case"utf8":case"utf-8":return w(this,e,r);case"ascii":return k(this,e,r);case"latin1":case"binary":return C(this,e,r);case"base64":return v(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},f.prototype.equals=function(t){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===f.compare(this,t)},f.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),"<Buffer "+t+">"},f.prototype.compare=function(t,e,r,n,o){if(j(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),!f.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(o<=n&&r<=e)return 0;if(o<=n)return-1;if(r<=e)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(i,s),p=this.slice(n,o),c=t.slice(e,r),u=0;u<a;++u)if(p[u]!==c[u]){i=p[u],s=c[u];break}return i<s?-1:s<i?1:0},f.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},f.prototype.indexOf=function(t,e,r){return y(this,t,e,r,!0)},f.prototype.lastIndexOf=function(t,e,r){return y(this,t,e,r,!1)},f.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-e;if((void 0===r||o<r)&&(r=o),0<t.length&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i,s,a,p,c,u,f,h,l,d=!1;;)switch(n){case"hex":return m(this,t,e,r);case"utf8":case"utf-8":return h=e,l=r,L(U(t,(f=this).length-h),f,h,l);case"ascii":return b(this,t,e,r);case"latin1":case"binary":return b(this,t,e,r);case"base64":return p=this,c=e,u=r,L(O(t),p,c,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return s=e,a=r,L(function(t,e){for(var r,n,o,i=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(t,(i=this).length-s),i,s,a);default:if(d)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),d=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var x=4096;function k(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function C(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function A(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||n<r)&&(r=n);for(var o="",i=e;i<r;++i)o+=N(t[i]);return o}function E(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function B(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(r<t+e)throw new RangeError("Trying to access beyond buffer length")}function T(t,e,r,n,o,i){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(o<e||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function P(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function S(t,e,r,n,o){return e=+e,r>>>=0,o||P(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function _(t,e,r,n,o){return e=+e,r>>>=0,o||P(t,0,r,8),i.write(t,e,r,n,52,8),r+8}f.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):r<t&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):r<e&&(e=r),e<t&&(e=t);var n=this.subarray(t,e);return n.__proto__=f.prototype,n},f.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||B(t,e,this.length);for(var n=this[t],o=1,i=0;
vendor: 5,958 bytes, line 1
1++i<e&&(o*=256);)n+=this[t+i]*o;return n},f.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||B(t,e,this.length);for(var n=this[t+--e],o=1;0<e&&(o*=256);)n+=this[t+--e]*o;return n},f.prototype.readUInt8=function(t,e){return t>>>=0,e||B(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,e){return t>>>=0,e||B(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,e){return t>>>=0,e||B(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,e){return t>>>=0,e||B(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUInt32BE=function(t,e){return t>>>=0,e||B(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||B(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return(o*=128)<=n&&(n-=Math.pow(2,8*e)),n},f.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||B(t,e,this.length);for(var n=e,o=1,i=this[t+--n];0<n&&(o*=256);)i+=this[t+--n]*o;return(o*=128)<=i&&(i-=Math.pow(2,8*e)),i},f.prototype.readInt8=function(t,e){return t>>>=0,e||B(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,e){t>>>=0,e||B(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt16BE=function(t,e){t>>>=0,e||B(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt32LE=function(t,e){return t>>>=0,e||B(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,e){return t>>>=0,e||B(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,e){return t>>>=0,e||B(t,4,this.length),i.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,e){return t>>>=0,e||B(t,4,this.length),i.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,e){return t>>>=0,e||B(t,8,this.length),i.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,e){return t>>>=0,e||B(t,8,this.length),i.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||T(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=t/o&255;return e+r},f.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||T(this,t,e,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[e+o]=255&t;0<=--o&&(i*=256);)this[e+o]=t/i&255;return e+r},f.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,1,255,0),this[e]=255&t,e+1},f.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},f.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},f.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},f.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},f.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var o=Math.pow(2,8*r-1);T(this,t,e,r,o-1,-o)}var i=0,s=1,a=0;for(this[e]=255&t;++i<r&&(s*=256);)t<0&&0===a&&0!==this[e+i-1]&&(a=1),this[e+i]=(t/s>>0)-a&255;return e+r},f.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var o=Math.pow(2,8*r-1);T(this,t,e,r,o-1,-o)}var i=r-1,s=1,a=0;for(this[e+i]=255&t;0<=--i&&(s*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/s>>0)-a&255;return e+r},f.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},f.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},f.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},f.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},f.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},f.prototype.writeFloatLE=function(t,e,r){return S(this,t,e,!0,r)},f.prototype.writeFloatBE=function(t,e,r){return S(this,t,e,!1,r)},f.prototype.writeDoubleLE=function(t,e,r){return _(this,t,e,!0,r)},f.prototype.writeDoubleBE=function(t,e,r){return _(this,t,e,!1,r)},f.prototype.copy=function(t,e,r,n){if(!f.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),0<n&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var o=n-r;if(this===t&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(e,r,n);else if(this===t&&r<e&&e<n)for(var i=o-1;0<=i;--i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return o},f.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!f.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var o=t.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(t=o)}}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{var s=f.isBuffer(t)?t:f.from(t,n),a=s.length;
1if(0===a)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=s[i%a]}return this};var R=/[^+/0-9A-Za-z-_]/g;function N(t){return t<16?"0"+t.toString(16):t.toString(16)}function U(t,e){var r;e=e||1/0;for(var n=t.length,o=null,i=[],s=0;s<n;++s){if(55295<(r=t.charCodeAt(s))&&r<57344){if(!o){if(56319<r){-1<(e-=3)&&i.push(239,191,189);continue}if(s+1===n){-1<(e-=3)&&i.push(239,191,189);continue}o=r;continue}if(r<56320){-1<(e-=3)&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&-1<(e-=3)&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function O(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(R,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function L(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function j(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function I(t){return t!=t}},{"base64-js":5,ieee754:29}],10:[function(t,e,r){var n=[].slice;e.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)))}}},{}],11:[function(t,e,r){function n(t){if(t)return function(t){for(var e in n.prototype)t[e]=n.prototype[e];return t}(t)}void 0!==e&&(e.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 r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),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 r,n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<n.length;o++)if((r=n[o])===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),r=this._callbacks["$"+t];if(r)for(var n=0,o=(r=r.slice(0)).length;n<o;++n)r[n].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}},{}],12:[function(t,e,r){e.exports=function(t,e){var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],13:[function(r,n,i){(function(e){function t(){var t;try{t=i.storage.debug}catch(t){}return!t&&void 0!==e&&"env"in e&&(t=e.env.DEBUG),t}(i=n.exports=r("./debug")).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},i.formatArgs=function(t){var e=this.useColors;if(t[0]=(e?"%c":"")+this.namespace+(e?" %c":" ")+t[0]+(e?"%c ":" ")+"+"+i.humanize(this.diff),!e)return;var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&(n++,"%c"===t&&(o=n))}),t.splice(o,0,r)},i.save=function(t){try{null==t?i.storage.removeItem("debug"):i.storage.debug=t}catch(t){}},i.load=t,i.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},i.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),i.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33
1CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],i.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},i.enable(t())}).call(this,r("_process"))},{"./debug":14,_process:35}],14:[function(t,e,p){function r(t){var n;function a(){if(a.enabled){var o=a,t=+new Date,e=t-(n||t);o.diff=e,o.prev=n,o.curr=t,n=t;for(var i=new Array(arguments.length),r=0;r<i.length;r++)i[r]=arguments[r];i[0]=p.coerce(i[0]),"string"!=typeof i[0]&&i.unshift("%O");var s=0;i[0]=i[0].replace(/%([a-zA-Z%])/g,function(t,e){if("%%"===t)return t;s++;var r=p.formatters[e];if("function"==typeof r){var n=i[s];t=r.call(o,n),i.splice(s,1),s--}return t}),p.formatArgs.call(o,i),(a.log||p.log||console.log.bind(console)).apply(o,i)}}return a.namespace=t,a.enabled=p.enabled(t),a.useColors=p.useColors(),a.color=function(t){var e,r=0;for(e in t)r=(r<<5)-r+t.charCodeAt(e),r|=0;return p.colors[Math.abs(r)%p.colors.length]}(t),a.destroy=o,"function"==typeof p.init&&p.init(a),p.instances.push(a),a}function o(){var t=p.instances.indexOf(this);return-1!==t&&(p.instances.splice(t,1),!0)}(p=e.exports=r.debug=r.default=r).coerce=function(t){return t instanceof Error?t.stack||t.message:t},p.disable=function(){p.enable("")},p.enable=function(t){var e;p.save(t),p.names=[],p.skips=[];var r=("string"==typeof t?t:"").split(/[\s,]+/),n=r.length;for(e=0;e<n;e++)r[e]&&("-"===(t=r[e].replace(/\*/g,".*?"))[0]?p.skips.push(new RegExp("^"+t.substr(1)+"$")):p.names.push(new RegExp("^"+t+"$")));for(e=0;e<p.instances.length;e++){var o=p.instances[e];o.enabled=p.enabled(o.namespace)}},p.enabled=function(t){if("*"===t[t.length-1])return!0;var e,r;for(e=0,r=p.skips.length;e<r;e++)if(p.skips[e].test(t))return!1;for(e=0,r=p.names.length;e<r;e++)if(p.names[e].test(t))return!0;return!1},p.humanize=t("ms"),p.instances=[],p.names=[],p.skips=[],p.formatters={}},{ms:32}],15:[function(t,e,r){e.exports=t("./socket"),e.exports.parser=t("engine.io-parser")},{"./socket":16,"engine.io-parser":24}],16:[function(e,r,t){(function(n){var o=e("./transports/index"),t=e("component-emitter"),f=e("debug")("engine.io-client:socket"),i=e("indexof"),s=e("engine.io-parser"),a=e("parseuri"),p=e("parseqs");function h(t,e){if(!(this instanceof h))return new h(t,e);e=e||{},t&&"object"==typeof t&&(e=t,t=null),t?(t=a(t),e.hostname=t.host,e.secure="https"===t.protocol||"wss"===t.protocol,e.port=t.port,t.query&&(e.query=t.query)):e.host&&(e.hostname=a(e.host).host),this.secure=null!=e.secure?e.secure:n.location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.agent=e.agent||!1,this.hostname=e.hostname||(n.location?location.hostname:"localhost"),this.port=e.port||(n.location&&location.port?location.port:this.secure?443:80),this.query=e.query||{},"string"==typeof this.query&&(this.query=p.decode(this.query)),this.upgrade=!1!==e.upgrade,this.path=(e.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!e.forceJSONP,this.jsonp=!1!==e.jsonp,this.forceBase64=!!e.forceBase64,this.enablesXDR=!!e.enablesXDR,this.timestampParam=e.timestampParam||"t",this.timestampRequests=e.timestampRequests,this.transports=e.transports||["polling","websocket"],this.transportOptions=e.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=e.policyPort||843,this.rememberUpgrade=e.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=e.onlyBinaryUpgrades,this.perMessageDeflate=!1!==e.perMessageDeflate&&(e.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=e.pfx||null,this.key=e.key||null,this.passphrase=e.passphrase||null,this.cert=e.cert||null,this.ca=e.ca||null,this.ciphers=e.ciphers||null,this.rejectUnauthorized=void 0===e.rejectUnauthorized||e.rejectUnauthorized,this.forceNo
1de=!!e.forceNode;var r="object"==typeof n&&n;r.global===r&&(e.extraHeaders&&0<Object.keys(e.extraHeaders).length&&(this.extraHeaders=e.extraHeaders),e.localAddress&&(this.localAddress=e.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}(r.exports=h).priorWebsocketSuccess=!1,t(h.prototype),h.protocol=s.protocol,(h.Socket=h).Transport=e("./transport"),h.transports=e("./transports/index"),h.parser=e("engine.io-parser"),h.prototype.createTransport=function(t){f('creating transport "%s"',t);var e=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}(this.query);e.EIO=s.protocol,e.transport=t;var r=this.transportOptions[t]||{};return this.id&&(e.sid=this.id),new o[t]({query:e,socket:this,agent:r.agent||this.agent,hostname:r.hostname||this.hostname,port:r.port||this.port,secure:r.secure||this.secure,path:r.path||this.path,forceJSONP:r.forceJSONP||this.forceJSONP,jsonp:r.jsonp||this.jsonp,forceBase64:r.forceBase64||this.forceBase64,enablesXDR:r.enablesXDR||this.enablesXDR,timestampRequests:r.timestampRequests||this.timestampRequests,timestampParam:r.timestampParam||this.timestampParam,policyPort:r.policyPort||this.policyPort,pfx:r.pfx||this.pfx,key:r.key||this.key,passphrase:r.passphrase||this.passphrase,cert:r.cert||this.cert,ca:r.ca||this.ca,ciphers:r.ciphers||this.ciphers,rejectUnauthorized:r.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:r.perMessageDeflate||this.perMessageDeflate,extraHeaders:r.extraHeaders||this.extraHeaders,forceNode:r.forceNode||this.forceNode,localAddress:r.localAddress||this.localAddress,requestTimeout:r.requestTimeout||this.requestTimeout,protocols:r.protocols||void 0})},h.prototype.open=function(){var t;if(this.rememberUpgrade&&h.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";try{t=this.createTransport(t)}catch(t){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)},h.prototype.setTransport=function(t){f("setting transport %s",t.name);var e=this;this.transport&&(f("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),(this.transport=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")})},h.prototype.probe=function(r){f('probing transport "%s"',r);var n=this.createTransport(r,{probe:1}),o=!1,i=this;function t(){if(i.onlyBinaryUpgrades){var t=!this.supportsBinary&&i.transport.supportsBinary;o=o||t}o||(f('probe transport "%s" opened',r),n.send([{type:"ping",data:"probe"}]),n.once("packet",function(t){if(!o)if("pong"===t.type&&"probe"===t.data){if(f('probe transport "%s" pong',r),i.upgrading=!0,i.emit("upgrading",n),!n)return;h.priorWebsocketSuccess="websocket"===n.name,f('pausing current transport "%s"',i.transport.name),i.transport.pause(function(){o||"closed"!==i.readyState&&(f("changing transport and sending upgrade packet"),u(),i.setTransport(n),n.send([{type:"upgrade"}]),i.emit("upgrade",n),n=null,i.upgrading=!1,i.flush())})}else{f('probe transport "%s" failed',r);var e=new Error("probe error");e.transport=n.name,i.emit("upgradeError",e)}}))}function s(){o||(o=!0,u(),n.close(),n=null)}function e(t){var e=new Error("probe error: "+t);e.transport=n.name,s(),f('probe transport "%s" failed because of error: %s',r,t),i.emit("upgradeError",e)}function a(){e("transport closed")}function p(){e("socket closed")}function c(t){n&&t.name!==n.name&&(f('"%s" works - aborting "%s"',t.name,n.name),s())}function u(){n.removeListener("open",t),n.removeListener("error",e),n.removeListener("close",a),i.removeListener("close",p),i.removeListener("upgrading",c)}h.priorWebsocketSuccess=!1,n.once("open",t),n.once("error",e),n.once("close",a),this.once("close",p),this.once("upgrading",c),n.open()},h.prototype.onOpen=function(){if(f("socket open"),this.readyState="open",h.priorWebsocketSuccess="websocket"===this.transport.name,this.emit
1("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){f("starting upgrade probes");for(var t=0,e=this.upgrades.length;t<e;t++)this.probe(this.upgrades[t])}},h.prototype.onPacket=function(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(f('socket receive: type "%s", data "%s"',t.type,t.data),this.emit("packet",t),this.emit("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var e=new Error("server error");e.code=t.data,this.onError(e);break;case"message":this.emit("data",t.data),this.emit("message",t.data)}else f('packet received with socket readyState "%s"',this.readyState)},h.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))},h.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)},h.prototype.setPing=function(){var t=this;clearTimeout(t.pingIntervalTimer),t.pingIntervalTimer=setTimeout(function(){f("writing ping packet - expecting pong within %sms",t.pingTimeout),t.ping(),t.onHeartbeat(t.pingTimeout)},t.pingInterval)},h.prototype.ping=function(){var t=this;this.sendPacket("ping",function(){t.emit("ping")})},h.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),(this.prevBufferLen=0)===this.writeBuffer.length?this.emit("drain"):this.flush()},h.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(f("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},h.prototype.write=h.prototype.send=function(t,e,r){return this.sendPacket("message",t,e,r),this},h.prototype.sendPacket=function(t,e,r,n){if("function"==typeof e&&(n=e,e=void 0),"function"==typeof r&&(n=r,r=null),"closing"!==this.readyState&&"closed"!==this.readyState){(r=r||{}).compress=!1!==r.compress;var o={type:t,data:e,options:r};this.emit("packetCreate",o),this.writeBuffer.push(o),n&&this.once("flush",n),this.flush()}},h.prototype.close=function(){if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var t=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?n():e()}):this.upgrading?n():e()}function e(){t.onClose("forced close"),f("socket closing - telling transport to close"),t.transport.close()}function r(){t.removeListener("upgrade",r),t.removeListener("upgradeError",r),e()}function n(){t.once("upgrade",r),t.once("upgradeError",r)}return this},h.prototype.onError=function(t){f("socket error %j",t),h.priorWebsocketSuccess=!1,this.emit("error",t),this.onClose("transport error",t)},h.prototype.onClose=function(t,e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){f('socket close with reason: "%s"',t);clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",t,e),this.writeBuffer=[],this.prevBufferLen=0}},h.prototype.filterUpgrades=function(t){for(var e=[],r=0,n=t.length;r<n;r++)~i(this.transports,t[r])&&e.push(t[r]);return e}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./transport":17,"./transports/index":18,"component-emitter":11,debug:13,"engine.io-parser":24,indexof:30,parseqs:33,parseuri:34}],17:[function(t,e,r){var n=t("engine.io-parser");function o(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.t
1imestampRequests,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,this.forceNode=t.forceNode,this.extraHeaders=t.extraHeaders,this.localAddress=t.localAddress}t("component-emitter")((e.exports=o).prototype),o.prototype.onError=function(t,e){var r=new Error(t);return r.type="TransportError",r.description=e,this.emit("error",r),this},o.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},o.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},o.prototype.send=function(t){if("open"!==this.readyState)throw new Error("Transport not open");this.write(t)},o.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},o.prototype.onData=function(t){var e=n.decodePacket(t,this.socket.binaryType);this.onPacket(e)},o.prototype.onPacket=function(t){this.emit("packet",t)},o.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},{"component-emitter":11,"engine.io-parser":24}],18:[function(e,t,r){(function(s){var a=e("xmlhttprequest-ssl"),p=e("./polling-xhr"),c=e("./polling-jsonp"),t=e("./websocket");r.polling=function(t){var e=!1,r=!1,n=!1!==t.jsonp;if(s.location){var o="https:"===location.protocol,i=location.port;i||(i=o?443:80),e=t.hostname!==location.hostname||i!==t.port,r=t.secure!==o}{if(t.xdomain=e,t.xscheme=r,"open"in new a(t)&&!t.forceJSONP)return new p(t);if(!n)throw new Error("JSONP disabled");return new c(t)}},r.websocket=t}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./polling-jsonp":19,"./polling-xhr":20,"./websocket":22,"xmlhttprequest-ssl":23}],19:[function(s,a,t){(function(r){var n=s("./polling"),t=s("component-inherit");a.exports=e;var o,c=/\n/g,u=/\\n/g;function i(){}function e(t){n.call(this,t),this.query=this.query||{},o||(r.___eio||(r.___eio=[]),o=r.___eio),this.index=o.length;var e=this;o.push(function(t){e.onData(t)}),this.query.j=this.index,r.document&&r.addEventListener&&r.addEventListener("beforeunload",function(){e.script&&(e.script.onerror=i)},!1)}t(e,n),e.prototype.supportsBinary=!1,e.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),n.prototype.doClose.call(this)},e.prototype.doPoll=function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(t){e.onError("jsonp poll error",t)};var r=document.getElementsByTagName("script")[0];r?r.parentNode.insertBefore(t,r):(document.head||document.body).appendChild(t),this.script=t,"undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent)&&setTimeout(function(){var t=document.createElement("iframe");document.body.appendChild(t),document.body.removeChild(t)},100)},e.prototype.doWrite=function(t,e){var r=this;if(!this.form){var n,o=document.createElement("form"),i=document.createElement("textarea"),s=this.iframeId="eio_iframe_"+this.index;o.className="socketio",o.style.position="absolute",o.style.top="-1000px",o.style.left="-1000px",o.target=s,o.method="POST",o.setAttribute("accept-charset","utf-8"),i.name="d",o.appendChild(i),document.body.appendChild(o),this.form=o,this.area=i}function a(){p(),e()}function p(){if(r.iframe)try{r.form.removeChild(r.iframe)}catch(t){r.onError("jsonp polling iframe removal error",t)}try{var t='<iframe src="javascript:0" name="'+r.iframeId+'">';n=document.createElement(t)}catch(t){(n=document.createElement("iframe")).name=r.iframeId,n.src="javascript:0"}n.id=r.iframeId,r.form.appendChild(n),r.iframe=n}this.form.action=this.uri(),p(),t=t.replace(u,"\\\n"),this.area.value=t.replace(c,"\\n");try{this.form.submit()}catch(t){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===r.iframe.readyState&&a()}:this.iframe.onload=a}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./polling":21,"component-inherit":12}],20:[function(u,f,t){(function(o){var i=u("xmlhttprequest-ssl"),n=u("./polling"),t=u("component-emitter"),e=u("component-inherit"),s=u("debug")("engine.io-client:polling-xhr");function r(){}function a(t){if(n.call(this,t),this.requestTimeout=t.requestTimeout,this.extraHeaders=t.extraHeaders,o.location){var e="https:"===location.protocol,r=location.port;r||(r=e?443:80),this.xd=t.hostname!==o.location.hostname||r!==t.port,this.xs=t.secure!==e}}function p(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.requestTimeout=t.requestTimeout,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.extraHeaders=t.extraHeaders,this.create()}function c(){for(var t in p.requests)p.requests.hasOwnProperty(t)&&p.requests[t].abort()}
1f.exports=a,f.exports.Request=p,e(a,n),a.prototype.supportsBinary=!0,a.prototype.request=function(t){return(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,t.requestTimeout=this.requestTimeout,t.extraHeaders=this.extraHeaders,new p(t)},a.prototype.doWrite=function(t,e){var r="string"!=typeof t&&void 0!==t,n=this.request({method:"POST",data:t,isBinary:r}),o=this;n.on("success",e),n.on("error",function(t){o.onError("xhr post error",t)}),this.sendXhr=n},a.prototype.doPoll=function(){s("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},t(p.prototype),p.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 e=this.xhr=new i(t),r=this;try{s("xhr open %s: %s",this.method,this.uri),e.open(this.method,this.uri,this.async);try{if(this.extraHeaders)for(var n in e.setDisableHeaderCheck&&e.setDisableHeaderCheck(!0),this.extraHeaders)this.extraHeaders.hasOwnProperty(n)&&e.setRequestHeader(n,this.extraHeaders[n])}catch(t){}if("POST"===this.method)try{this.isBinary?e.setRequestHeader("Content-type","application/octet-stream"):e.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{e.setRequestHeader("Accept","*/*")}catch(t){}"withCredentials"in e&&(e.withCredentials=!0),this.requestTimeout&&(e.timeout=this.requestTimeout),this.hasXDR()?(e.onload=function(){r.onLoad()},e.onerror=function(){r.onError(e.responseText)}):e.onreadystatechange=function(){if(2===e.readyState)try{var t=e.getResponseHeader("Content-Type");r.supportsBinary&&"application/octet-stream"===t&&(e.responseType="arraybuffer")}catch(t){}4===e.readyState&&(200===e.status||1223===e.status?r.onLoad():setTimeout(function(){r.onError(e.status)},0))},s("xhr data %s",this.data),e.send(this.data)}catch(t){return void setTimeout(function(){r.onError(t)},0)}o.document&&(this.index=p.requestsCount++,p.requests[this.index]=this)},p.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},p.prototype.onData=function(t){this.emit("data",t),this.onSuccess()},p.prototype.onError=function(t){this.emit("error",t),this.cleanup(!0)},p.prototype.cleanup=function(t){if(void 0!==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(t){}o.document&&delete p.requests[this.index],this.xhr=null}},p.prototype.onLoad=function(){var t;try{var e;try{e=this.xhr.getResponseHeader("Content-Type")}catch(t){}t="application/octet-stream"===e&&this.xhr.response||this.xhr.responseText}catch(t){this.onError(t)}null!=t&&this.onData(t)},p.prototype.hasXDR=function(){return void 0!==o.XDomainRequest&&!this.xs&&this.enablesXDR},p.prototype.abort=function(){this.cleanup()},p.requestsCount=0,p.requests={},o.document&&(o.attachEvent?o.attachEvent("onunload",c):o.addEventListener&&o.addEventListener("beforeunload",c,!1))}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./polling":21,"component-emitter":11,"component-inherit":12,debug:13,"xmlhttprequest-ssl":23}],21:[function(t,e,r){var n=t("../transport"),o=t("parseqs"),i=t("engine.io-parser"),s=t("component-inherit"),a=t("yeast"),p=t("debug")("engine.io-client:polling");e.exports=u;var c=null!=new(t("xmlhttprequest-ssl"))({xdomain:!1}).responseType;function u(t){var e=t&&t.forceBase64;c&&!e||(this.supportsBinary=!1),n.call(this,t)}s(u,n),u.prototype.name="polling",u.prototype.doOpen=function(){this.poll()},u.prototype.pause=function(t){var e=this;function r(){p("paused"),e.readyState="paused",t()}if(this.readyState="pausing",this.polling||!this.writable){var n=0;this.polling&&(p("we are currently polling - waiting to pause"),n++,this.once("pollComplete",function(){p("pre-pause polling complete"),--n||r()})),this.writable||(p("we are currently writing - waiting to pause"),n++,this.once("drain",function(){p("pre-pause writing complete"),--n||r()}))}else r()},u.prototype.poll=function(){p("polling"),this.polling=!0,this.doPoll(),this.emit
1("poll")},u.prototype.onData=function(t){var n=this;p("polling got data %s",t);i.decodePayload(t,this.socket.binaryType,function(t,e,r){if("opening"===n.readyState&&n.onOpen(),"close"===t.type)return n.onClose(),!1;n.onPacket(t)}),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():p('ignoring poll - transport state "%s"',this.readyState))},u.prototype.doClose=function(){var t=this;function e(){p("writing close packet"),t.write([{type:"close"}])}"open"===this.readyState?(p("transport open - closing"),e()):(p("transport not open - deferring close"),this.once("open",e))},u.prototype.write=function(t){var e=this;this.writable=!1;var r=function(){e.writable=!0,e.emit("drain")};i.encodePayload(t,this.supportsBinary,function(t){e.doWrite(t,r)})},u.prototype.uri=function(){var t=this.query||{},e=this.secure?"https":"http",r="";return!1!==this.timestampRequests&&(t[this.timestampParam]=a()),this.supportsBinary||t.sid||(t.b64=1),t=o.encode(t),this.port&&("https"===e&&443!==Number(this.port)||"http"===e&&80!==Number(this.port))&&(r=":"+this.port),t.length&&(t="?"+t),e+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+r+this.path+t}},{"../transport":17,"component-inherit":12,debug:13,"engine.io-parser":24,parseqs:33,"xmlhttprequest-ssl":23,yeast:45}],22:[function(f,h,t){(function(s){var e,r=f("../transport"),a=f("engine.io-parser"),n=f("parseqs"),t=f("component-inherit"),o=f("yeast"),p=f("debug")("engine.io-client:websocket"),i=s.WebSocket||s.MozWebSocket;if("undefined"==typeof window)try{e=f("ws")}catch(t){}var c=i;function u(t){t&&t.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=t.perMessageDeflate,this.usingBrowserWebSocket=i&&!t.forceNode,this.protocols=t.protocols,this.usingBrowserWebSocket||(c=e),r.call(this,t)}c||"undefined"!=typeof window||(c=e),t(h.exports=u,r),u.prototype.name="websocket",u.prototype.supportsBinary=!0,u.prototype.doOpen=function(){if(this.check()){var t=this.uri(),e=this.protocols,r={agent:this.agent,perMessageDeflate:this.perMessageDeflate};r.pfx=this.pfx,r.key=this.key,r.passphrase=this.passphrase,r.cert=this.cert,r.ca=this.ca,r.ciphers=this.ciphers,r.rejectUnauthorized=this.rejectUnauthorized,this.extraHeaders&&(r.headers=this.extraHeaders),this.localAddress&&(r.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket?e?new c(t,e):new c(t):new c(t,e,r)}catch(t){return this.emit("error",t)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},u.prototype.addEventListeners=function(){var e=this;this.ws.onopen=function(){e.onOpen()},this.ws.onclose=function(){e.onClose()},this.ws.onmessage=function(t){e.onData(t.data)},this.ws.onerror=function(t){e.onError("websocket error",t)}},u.prototype.write=function(t){var n=this;this.writable=!1;for(var o=t.length,e=0,r=o;e<r;e++)!function(r){a.encodePacket(r,n.supportsBinary,function(t){if(!n.usingBrowserWebSocket){var e={};if(r.options&&(e.compress=r.options.compress),n.perMessageDeflate)("string"==typeof t?s.Buffer.byteLength(t):t.length)<n.perMessageDeflate.threshold&&(e.compress=!1)}try{n.usingBrowserWebSocket?n.ws.send(t):n.ws.send(t,e)}catch(t){p("websocket closed before onclose event")}--o||i()})}(t[e]);function i(){n.emit("flush"),setTimeout(function(){n.writable=!0,n.emit("drain")},0)}},u.prototype.onClose=function(){r.prototype.onClose.call(this)},u.prototype.doClose=function(){void 0!==this.ws&&this.ws.close()},u.prototype.uri=function(){var t=this.query||{},e=this.secure?"wss":"ws",r="";return this.port&&("wss"===e&&443!==Number(this.port)||"ws"===e&&80!==Number(this.port))&&(r=":"+this.port),this.timestampRequests&&(t[this.timestampParam]=o()),this.supportsBinary||(t.b64=1),(t=n.encode(t)).length&&(t="?"+t),e+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+r+this.path+t},u.prototype.check=function(){return!(!c||"__initialize"in c&&this.name===u.prototype.name)}
1}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../transport":17,"component-inherit":12,debug:13,"engine.io-parser":24,parseqs:33,ws:7,yeast:45}],23:[function(t,e,r){(function(o){var i=t("has-cors");e.exports=function(t){var e=t.xdomain,r=t.xscheme,n=t.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!e||i))return new XMLHttpRequest}catch(t){}try{if("undefined"!=typeof XDomainRequest&&!r&&n)return new XDomainRequest}catch(t){}if(!e)try{return new(o[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"has-cors":28}],24:[function(t,e,h){var o,r=t("./keys"),i=t("has-binary2"),l=t("arraybuffer.slice"),a=t("after"),c=t("./utf8");"undefined"!=typeof ArrayBuffer&&(o=t("base64-arraybuffer"));var n="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),s="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),u=n||s;h.protocol=3;var f=h.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},p=r(f),d={type:"error",data:"parser error"},y=t("blob");function g(t,e,r){for(var o=new Array(t.length),n=a(t.length,r),i=function(r,t,n){e(t,function(t,e){o[r]=e,n(t,o)})},s=0;s<t.length;s++)i(s,t[s],n)}h.encodePacket=function(t,e,r,n){"function"==typeof e&&(n=e,e=!1),"function"==typeof r&&(n=r,r=null);var o,i,s,a=void 0===t.data?void 0:t.data.buffer||t.data;if("undefined"!=typeof ArrayBuffer&&a instanceof ArrayBuffer)return function(t,e,r){if(!e)return h.encodeBase64Packet(t,r);var n=t.data,o=new Uint8Array(n),i=new Uint8Array(1+n.byteLength);i[0]=f[t.type];for(var s=0;s<o.length;s++)i[s+1]=o[s];return r(i.buffer)}(t,e,n);if(void 0!==y&&a instanceof y)return function(t,e,r){if(!e)return h.encodeBase64Packet(t,r);if(u)return function(t,e,r){if(!e)return h.encodeBase64Packet(t,r);var n=new FileReader;return n.onload=function(){h.encodePacket({type:t.type,data:n.result},e,!0,r)},n.readAsArrayBuffer(t.data)}(t,e,r);var n=new Uint8Array(1);n[0]=f[t.type];var o=new y([n.buffer,t.data]);return r(o)}(t,e,n);if(a&&a.base64)return o=t,i=n,s="b"+h.packets[o.type]+o.data.data,i(s);var p=f[t.type];return void 0!==t.data&&(p+=r?c.encode(String(t.data),{strict:!1}):String(t.data)),n(""+p)},h.encodeBase64Packet=function(e,r){var n,o="b"+h.packets[e.type];if(void 0!==y&&e.data instanceof y){var i=new FileReader;return i.onload=function(){var t=i.result.split(",")[1];r(o+t)},i.readAsDataURL(e.data)}try{n=String.fromCharCode.apply(null,new Uint8Array(e.data))}catch(t){for(var s=new Uint8Array(e.data),a=new Array(s.length),p=0;p<s.length;p++)a[p]=s[p];n=String.fromCharCode.apply(null,a)}return o+=btoa(n),r(o)},h.decodePacket=function(t,e,r){if(void 0===t)return d;if("string"==typeof t){if("b"===t.charAt(0))return h.decodeBase64Packet(t.substr(1),e);if(r&&!1===(t=function(t){try{t=c.decode(t,{strict:!1})}catch(t){return!1}return t}(t)))return d;var n=t.charAt(0);return Number(n)==n&&p[n]?1<t.length?{type:p[n],data:t.substring(1)}:{type:p[n]}:d}n=new Uint8Array(t)[0];var o=l(t,1);return y&&"blob"===e&&(o=new y([o])),{type:p[n],data:o}},h.decodeBase64Packet=function(t,e){var r=p[t.charAt(0)];if(!o)return{type:r,data:{base64:!0,data:t.substr(1)}};var n=o.decode(t.substr(1));return"blob"===e&&y&&(n=new y([n])),{type:r,data:n}},h.encodePayload=function(t,e,r){"function"==typeof e&&(r=e,e=null);var n=i(t);if(e&&n)return y&&!u?h.encodePayloadAsBlob(t,r):h.encodePayloadAsArrayBuffer(t,r);if(!t.length)return r("0:");g(t,function(t,r){h.encodePacket(t,!!n&&e,!1,function(t){var e;r(null,(e=t).length+":"+e)})},function(t,e){return r(e.join(""))})},h.decodePayload=function(t,e,r){if("string"!=typeof t)return h.decodePayloadAsBinary(t,e,r);var n;if("function"==typeof e&&(r=e,e=null),""===t)return r(d,0,1);for(var o,i,s="",a=0,p=t.length;a<p;a++){var c=t.charAt(a);if(":"===c){if(""===s||s!=(o=Number(s)))return r(d,0,1);if(s!=(i=t.substr(a+1,o)).length)return r(d,0,1);if(i.length){if(n=h.decodePacket(i,e,!1),d.type===n.type&&d.data===n.data)return r(d,0,1);if(!1===r(n,a+o,p))return}a+=o,s=""}else s+=c}return""!==s?r(d,0,1):void 0},h.encodePayloadAsArrayBuffer=function(t,n){if(!t.length)return n(new ArrayBuffer(0));g(t,function(t,e){h.encodePacket(t,!0,!0,function(t){return e(null,t)})},function(t,e){var r=e.reduce(function(t,e){var r;return t+(r="string"==typeof e?e.length:e.byteLength).toString().length+r+2},0),s=new Uint8Array(r),a=0;return e.forEach(function(t){var e="string"==typeof t,r=t;if(e){for(var n=new Uint8Array(t.length),o=0;o<t.length;o++)n[o]=t.charCodeAt(o);r=n.buffer}s[a++]=e?0:1;var i=r.byteLength.toString();for(o=0;o<i.length;o++)s[a++]=parseInt(i[o]);s[a++]=255;for(n=new Uint8Array(r),o=0;o<n.length;o++)s[a++]=n[o]}),n(s.buffer)})},h.encodePayloadAsBlob=function(t,r){g(t,function(t,a){h.encodePacket(t,!0,!0,function(t){var e=new Uint8Array(1);
1if(e[0]=1,"string"==typeof t){for(var r=new Uint8Array(t.length),n=0;n<t.length;n++)r[n]=t.charCodeAt(n);t=r.buffer,e[0]=0}var o=(t instanceof ArrayBuffer?t.byteLength:t.size).toString(),i=new Uint8Array(o.length+1);for(n=0;n<o.length;n++)i[n]=parseInt(o[n]);if(i[o.length]=255,y){var s=new y([e.buffer,i.buffer,t]);a(null,s)}})},function(t,e){return r(new y(e))})},h.decodePayloadAsBinary=function(t,r,n){"function"==typeof r&&(n=r,r=null);for(var e=t,o=[];0<e.byteLength;){for(var i=new Uint8Array(e),s=0===i[0],a="",p=1;255!==i[p];p++){if(310<a.length)return n(d,0,1);a+=i[p]}e=l(e,2+a.length),a=parseInt(a);var c=l(e,0,a);if(s)try{c=String.fromCharCode.apply(null,new Uint8Array(c))}catch(t){var u=new Uint8Array(c);c="";for(p=0;p<u.length;p++)c+=String.fromCharCode(u[p])}o.push(c),e=l(e,a)}var f=o.length;o.forEach(function(t,e){n(h.decodePacket(t,r,!0),e,f)})}},{"./keys":25,"./utf8":26,after:1,"arraybuffer.slice":2,"base64-arraybuffer":4,blob:6,"has-binary2":27}],25:[function(t,e,r){e.exports=Object.keys||function(t){var e=[],r=Object.prototype.hasOwnProperty;for(var n in t)r.call(t,n)&&e.push(n);return e}},{}],26:[function(t,e,r){var i,s,a,p=String.fromCharCode;function c(t){for(var e,r,n=[],o=0,i=t.length;o<i;)55296<=(e=t.charCodeAt(o++))&&e<=56319&&o<i?56320==(64512&(r=t.charCodeAt(o++)))?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),o--):n.push(e);return n}function n(t,e){if(55296<=t&&t<=57343){if(e)throw Error("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function o(t,e){return p(t>>e&63|128)}function u(t,e){if(0==(4294967168&t))return p(t);var r="";return 0==(4294965248&t)?r=p(t>>6&31|192):0==(4294901760&t)?(n(t,e)||(t=65533),r=p(t>>12&15|224),r+=o(t,6)):0==(4292870144&t)&&(r=p(t>>18&7|240),r+=o(t,12),r+=o(t,6)),r+=p(63&t|128)}function f(){if(s<=a)throw Error("Invalid byte index");var t=255&i[a];if(a++,128==(192&t))return 63&t;throw Error("Invalid continuation byte")}function h(t){var e,r;if(s<a)throw Error("Invalid byte index");if(a==s)return!1;if(e=255&i[a],a++,0==(128&e))return e;if(192==(224&e)){if(128<=(r=(31&e)<<6|f()))return r;throw Error("Invalid continuation byte")}if(224==(240&e)){if(2048<=(r=(15&e)<<12|f()<<6|f()))return n(r,t)?r:65533;throw Error("Invalid continuation byte")}if(240==(248&e)&&65536<=(r=(7&e)<<18|f()<<12|f()<<6|f())&&r<=1114111)return r;throw Error("Invalid UTF-8 detected")}e.exports={version:"2.1.2",encode:function(t,e){for(var r=!1!==(e=e||{}).strict,n=c(t),o=n.length,i=-1,s="";++i<o;)s+=u(n[i],r);return s},decode:function(t,e){var r=!1!==(e=e||{}).strict;i=c(t),s=i.length,a=0;for(var n,o=[];!1!==(n=h(r));)o.push(n);return function(t){for(var e,r=t.length,n=-1,o="";++n<r;)65535<(e=t[n])&&(o+=p((e-=65536)>>>10&1023|55296),e=56320|1023&e),o+=p(e);return o}(o)}}},{}],27:[function(e,r,t){(function(i){var s=e("isarray"),t=Object.prototype.toString,a="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===t.call(Blob),p="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===t.call(File);r.exports=function t(e){if(!e||"object"!=typeof e)return!1;if(s(e)){for(var r=0,n=e.length;r<n;r++)if(t(e[r]))return!0;return!1}if("function"==typeof i&&i.isBuffer&&i.isBuffer(e)||"function"==typeof ArrayBuffer&&e instanceof ArrayBuffer||a&&e instanceof Blob||p&&e instanceof File)return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return t(e.toJSON(),!0);for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t(e[o]))return!0;return!1}}).call(this,e("buffer").Buffer)},{buffer:9,isarray:31}],28:[function(t,e,r){try{e.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){e.exports=!1}},{}],29:[function(t,e,r){r.read=function(t,e,r,n,o){var i,s,a=8*o-n-1,p=(1<<a)-1,c=p>>1,u=-7,f=r?o-1:0,h=r?-1:1,l=t[e+f];for(f+=h,i=l&(1<<-u)-1,l>>=-u,u+=a;0<u;i=256*i+t[e+f],f+=h,u-=8);for(s=i&(1<<-u)-1,i>>=-u,u+=n;0<u;s=256*s+t[e+f],f+=h,u-=8);if(0===i)i=1-c;else{if(i===p)return s?NaN:1/0*(l?-1:1);s+=Math.pow(2,n),i-=c}return(l?-1:1)*s*Math.pow(2,i-n)},r.write=function(t,e,r,n,o,i){var s,a,p,c=8*i-o-1,u=(1<<c)-1,f=u>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,l=n?0:i-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=u):(s=Math.floor(Math.log(e)/Math.LN2),e*(p=Math.pow(2,-s))<1&&(s--,p*=2),2<=(e+=1<=s+f?h/p:h*Math.pow(2,1-f))*p&&(s++,p/=2),u<=s+f?(a=0,s=u):1<=s+f?(a=(e*p-1)
1*Math.pow(2,o),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,o),s=0));8<=o;t[r+l]=255&a,l+=d,a/=256,o-=8);for(s=s<<o|a,c+=o;0<c;t[r+l]=255&s,l+=d,s/=256,c-=8);t[r+l-d]|=128*y}},{}],30:[function(t,e,r){var n=[].indexOf;e.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}},{}],31:[function(t,e,r){var n={}.toString;e.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},{}],32:[function(t,e,r){var o=36e5,i=864e5;function s(t,e,r){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+r:Math.ceil(t/e)+" "+r+"s"}e.exports=function(t,e){e=e||{};var r,n=typeof t;if("string"===n&&0<t.length)return function(t){if(100<(t=String(t)).length)return;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)return;var r=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*r;case"days":case"day":case"d":return r*i;case"hours":case"hour":case"hrs":case"hr":case"h":return r*o;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*r;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}(t);if("number"===n&&!1===isNaN(t))return e.long?s(r=t,i,"day")||s(r,o,"hour")||s(r,6e4,"minute")||s(r,1e3,"second")||r+" ms":function(t){if(i<=t)return Math.round(t/i)+"d";if(o<=t)return Math.round(t/o)+"h";if(6e4<=t)return Math.round(t/6e4)+"m";if(1e3<=t)return Math.round(t/1e3)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},{}],33:[function(t,e,r){r.encode=function(t){var e="";for(var r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e},r.decode=function(t){for(var e={},r=t.split("&"),n=0,o=r.length;n<o;n++){var i=r[n].split("=");e[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return e}},{}],34:[function(t,e,r){var a=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,p=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];e.exports=function(t){var e=t,r=t.indexOf("["),n=t.indexOf("]");-1!=r&&-1!=n&&(t=t.substring(0,r)+t.substring(r,n).replace(/:/g,";")+t.substring(n,t.length));for(var o=a.exec(t||""),i={},s=14;s--;)i[p[s]]=o[s]||"";return-1!=r&&-1!=n&&(i.source=e,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i}},{}],35:[function(t,e,r){var n,o,i=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function p(e){if(n===setTimeout)return setTimeout(e,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:s}catch(t){n=s}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(t){o=a}}();var c,u=[],f=!1,h=-1;function l(){f&&c&&(f=!1,c.length?u=c.concat(u):h=-1,u.length&&d())}function d(){if(!f){var t=p(l);f=!0;for(var e=u.length;e;){for(c=u,u=[];++h<e;)c&&c[h].run();h=-1,e=u.length}c=null,f=!1,function(e){if(o===clearTimeout)return clearTimeout(e);if((o===a||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this,e)}}}(t)}}function y(t,e){this.fun=t,this.array=e}function g(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(1<arguments.length)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];u.push(new y(t,e)),1!==u.length||f||p(d)},y.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],36:[function(t,e,r){var p=t("./url"),n=t("socket.io-parser"),c=t("./manager"),u=t
1("debug")("socket.io-client");e.exports=r=o;var f=r.managers={};function o(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var r,n=p(t),o=n.source,i=n.id,s=n.path,a=f[i]&&s in f[i].nsps;return r=e.forceNew||e["force new connection"]||!1===e.multiplex||a?(u("ignoring socket cache for %s",o),c(o,e)):(f[i]||(u("new io instance for %s",o),f[i]=c(o,e)),f[i]),n.query&&!e.query&&(e.query=n.query),r.socket(n.path,e)}r.protocol=n.protocol,r.connect=o,r.Manager=t("./manager"),r.Socket=t("./socket")},{"./manager":37,"./socket":39,"./url":40,debug:13,"socket.io-parser":42}],37:[function(t,e,r){var p=t("engine.io-client"),i=t("./socket"),n=t("component-emitter"),o=t("socket.io-parser"),c=t("./on"),s=t("component-bind"),u=t("debug")("socket.io-client:manager"),a=t("indexof"),f=t("backo2"),h=Object.prototype.hasOwnProperty;function l(t,e){if(!(this instanceof l))return new l(t,e);t&&"object"==typeof t&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",this.nsps={},this.subs=[],this.opts=e,this.reconnection(!1!==e.reconnection),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.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var r=e.parser||o;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this.autoConnect=!1!==e.autoConnect,this.autoConnect&&this.open()}(e.exports=l).prototype.emitAll=function(){for(var t in this.emit.apply(this,arguments),this.nsps)h.call(this.nsps,t)&&this.nsps[t].emit.apply(this.nsps[t],arguments)},l.prototype.updateSocketIds=function(){for(var t in this.nsps)h.call(this.nsps,t)&&(this.nsps[t].id=this.generateId(t))},l.prototype.generateId=function(t){return("/"===t?"":t+"#")+this.engine.id},n(l.prototype),l.prototype.reconnection=function(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection},l.prototype.reconnectionAttempts=function(t){return arguments.length?(this._reconnectionAttempts=t,this):this._reconnectionAttempts},l.prototype.reconnectionDelay=function(t){return arguments.length?(this._reconnectionDelay=t,this.backoff&&this.backoff.setMin(t),this):this._reconnectionDelay},l.prototype.randomizationFactor=function(t){return arguments.length?(this._randomizationFactor=t,this.backoff&&this.backoff.setJitter(t),this):this._randomizationFactor},l.prototype.reconnectionDelayMax=function(t){return arguments.length?(this._reconnectionDelayMax=t,this.backoff&&this.backoff.setMax(t),this):this._reconnectionDelayMax},l.prototype.timeout=function(t){return arguments.length?(this._timeout=t,this):this._timeout},l.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},l.prototype.open=l.prototype.connect=function(r,t){if(u("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;u("opening %s",this.uri),this.engine=p(this.uri,this.opts);var e=this.engine,n=this;this.readyState="opening",this.skipReconnect=!1;var o=c(e,"open",function(){n.onopen(),r&&r()}),i=c(e,"error",function(t){if(u("connect_error"),n.cleanup(),n.readyState="closed",n.emitAll("connect_error",t),r){var e=new Error("Connection error");e.data=t,r(e)}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),o.destroy(),e.close(),e.emit("error","timeout"),n.emitAll("connect_timeout",s)},s);this.subs.push({destroy:function(){clearTimeout(a)}})}return this.subs.push(o),this.subs.push(i),this},l.prototype.onopen=function(){u("open"),this.cleanup(),this.readyState="open",this.emit("open");var t=this.engine;this.subs.push(c(t,"data",s(this,"ondata"))),this.subs.push(c(t,"ping",s(this,"onping"))),this.subs.push(c(t,"pong",s(this,"onpong"))),this.subs.push(c(t,"error",s(this,"onerror"))),this.subs.push(c(t,"close",s(this,"onclose"))),this.subs.push(c(this.decoder,"decoded",s(this,"ondecoded")))},l.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},l.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},l.prototype.ondata=function(t){this.decoder.add(t)}
1,l.prototype.ondecoded=function(t){this.emit("packet",t)},l.prototype.onerror=function(t){u("error",t),this.emitAll("error",t)},l.prototype.socket=function(t,e){var r=this.nsps[t];if(!r){r=new i(this,t,e),this.nsps[t]=r;var n=this;r.on("connecting",o),r.on("connect",function(){r.id=n.generateId(t)}),this.autoConnect&&o()}function o(){~a(n.connecting,r)||n.connecting.push(r)}return r},l.prototype.destroy=function(t){var e=a(this.connecting,t);~e&&this.connecting.splice(e,1),this.connecting.length||this.close()},l.prototype.packet=function(r){u("writing packet %j",r);var n=this;r.query&&0===r.type&&(r.nsp+="?"+r.query),n.encoding?n.packetBuffer.push(r):(n.encoding=!0,this.encoder.encode(r,function(t){for(var e=0;e<t.length;e++)n.engine.write(t[e],r.options);n.encoding=!1,n.processPacketQueue()}))},l.prototype.processPacketQueue=function(){if(0<this.packetBuffer.length&&!this.encoding){var t=this.packetBuffer.shift();this.packet(t)}},l.prototype.cleanup=function(){u("cleanup");for(var t=this.subs.length,e=0;e<t;e++){this.subs.shift().destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},l.prototype.close=l.prototype.disconnect=function(){u("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},l.prototype.onclose=function(t){u("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",t),this._reconnection&&!this.skipReconnect&&this.reconnect()},l.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var e=this;if(this.backoff.attempts>=this._reconnectionAttempts)u("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var t=this.backoff.duration();u("will wait %dms before reconnect attempt",t),this.reconnecting=!0;var r=setTimeout(function(){e.skipReconnect||(u("attempting reconnect"),e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),e.skipReconnect||e.open(function(t){t?(u("reconnect attempt error"),e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",t.data)):(u("reconnect success"),e.onreconnect())}))},t);this.subs.push({destroy:function(){clearTimeout(r)}})}},l.prototype.onreconnect=function(){var t=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",t)}},{"./on":38,"./socket":39,backo2:3,"component-bind":10,"component-emitter":11,debug:13,"engine.io-client":15,indexof:30,"socket.io-parser":42}],38:[function(t,e,r){e.exports=function(t,e,r){return t.on(e,r),{destroy:function(){t.removeListener(e,r)}}}},{}],39:[function(t,e,r){var o=t("socket.io-parser"),n=t("component-emitter"),i=t("to-array"),s=t("./on"),a=t("component-bind"),p=t("debug")("socket.io-client:socket"),c=t("parseqs"),u=t("has-binary2");e.exports=l;var f={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},h=n.prototype.emit;function l(t,e,r){this.io=t,this.nsp=e,(this.json=this).ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.flags={},r&&r.query&&(this.query=r.query),this.io.autoConnect&&this.open()}n(l.prototype),l.prototype.subEvents=function(){if(!this.subs){var t=this.io;this.subs=[s(t,"open",a(this,"onopen")),s(t,"packet",a(this,"onpacket")),s(t,"close",a(this,"onclose"))]}},l.prototype.open=l.prototype.connect=function(){return this.connected||(this.subEvents(),this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting")),this},l.prototype.send=function(){var t=i(arguments);return t.unshift("message"),this.emit.apply(this,t),this},l.prototype.emit=function(t){if(f.hasOwnProperty(t))return h.apply(this,arguments),this;var e=i(arguments),r={type:(void 0!==this.flags.binary?this.flags.binary:u(e))?o.BINARY_EVENT:o.EVENT,data:e,options:{}};return r.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof e[e.length-1]&&(p("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.flags={},this},l.prototype.packet=function(t){t.nsp=this.nsp,this.io.packet(t)},l.prototype.onopen=function(){if(p("transport is open - connecting"),"/"!==this.nsp)if(this.query){var t="object"==typeof this.query?c.encode(this.query):this.query;p("sending connect packet with query %s",t),this.packet({type:o.CONNECT,query:t})}else this.packet({type:o.CONNECT})},l.prototype.onclose=function(t){p("close (%s)",t),this.connected=!1,this.disconnected=!0,delete this.id,this.emit
1("disconnect",t)},l.prototype.onpacket=function(t){var e=t.nsp===this.nsp,r=t.type===o.ERROR&&"/"===t.nsp;if(e||r)switch(t.type){case o.CONNECT:this.onconnect();break;case o.EVENT:case o.BINARY_EVENT:this.onevent(t);break;case o.ACK:case o.BINARY_ACK:this.onack(t);break;case o.DISCONNECT:this.ondisconnect();break;case o.ERROR:this.emit("error",t.data)}},l.prototype.onevent=function(t){var e=t.data||[];p("emitting event %j",e),null!=t.id&&(p("attaching ack callback to event"),e.push(this.ack(t.id))),this.connected?h.apply(this,e):this.receiveBuffer.push(e)},l.prototype.ack=function(e){var r=this,n=!1;return function(){if(!n){n=!0;var t=i(arguments);p("sending ack %j",t),r.packet({type:u(t)?o.BINARY_ACK:o.ACK,id:e,data:t})}}},l.prototype.onack=function(t){var e=this.acks[t.id];"function"==typeof e?(p("calling ack %s with %j",t.id,t.data),e.apply(this,t.data),delete this.acks[t.id]):p("bad ack %s",t.id)},l.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},l.prototype.emitBuffered=function(){var t;for(t=0;t<this.receiveBuffer.length;t++)h.apply(this,this.receiveBuffer[t]);for(this.receiveBuffer=[],t=0;t<this.sendBuffer.length;t++)this.packet(this.sendBuffer[t]);this.sendBuffer=[]},l.prototype.ondisconnect=function(){p("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},l.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)},l.prototype.close=l.prototype.disconnect=function(){return this.connected&&(p("performing disconnect (%s)",this.nsp),this.packet({type:o.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},l.prototype.compress=function(t){return this.flags.compress=t,this},l.prototype.binary=function(t){return this.flags.binary=t,this}},{"./on":38,"component-bind":10,"component-emitter":11,debug:13,"has-binary2":27,parseqs:33,"socket.io-parser":42,"to-array":44}],40:[function(t,e,r){(function(o){var i=t("parseuri"),s=t("debug")("socket.io-client:url");e.exports=function(t,e){var r=t;e=e||o.location,null==t&&(t=e.protocol+"//"+e.host);"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?e.protocol+t:e.host+t),/^(https?|wss?):\/\//.test(t)||(s("protocol-less url %s",t),t=void 0!==e?e.protocol+"//"+t:"https://"+t),s("parse %s",t),r=i(t));r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443"));r.path=r.path||"/";var n=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+n+":"+r.port,r.href=r.protocol+"://"+n+(e&&e.port===r.port?"":":"+r.port),r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{debug:13,parseuri:34}],41:[function(r,t,n){(function(t){var u=r("isarray"),f=r("./is-buffer"),e=Object.prototype.toString,h="function"==typeof t.Blob||"[object BlobConstructor]"===e.call(t.Blob),l="function"==typeof t.File||"[object FileConstructor]"===e.call(t.File);n.deconstructPacket=function(t){var e=[],r=t.data,n=t;return n.data=function t(e,r){if(!e)return e;{if(f(e)){var n={_placeholder:!0,num:r.length};return r.push(e),n}if(u(e)){for(var o=new Array(e.length),i=0;i<e.length;i++)o[i]=t(e[i],r);return o}if("object"==typeof e&&!(e instanceof Date)){var o={};for(var s in e)o[s]=t(e[s],r);return o}}return e}(r,e),n.attachments=e.length,{packet:n,buffers:e}},n.reconstructPacket=function(t,e){return t.data=function t(e,r){if(!e)return e;{if(e&&e._placeholder)return r[e.num];if(u(e))for(var n=0;n<e.length;n++)e[n]=t(e[n],r);else if("object"==typeof e)for(var o in e)e[o]=t(e[o],r)}return e}(t.data,e),t.attachments=void 0,t},n.removeBlobs=function(t,a){var p=0,c=t;!function t(e,r,n){if(!e)return e;if(h&&e instanceof Blob||l&&e instanceof File){p++;var o=new FileReader;o.onload=function(){n?n[r]=this.result:c=this.result,--p||a(c)},o.readAsArrayBuffer(e)}else if(u(e))for(var i=0;i<e.length;i++)t(e[i],i,e);else if("object"==typeof e&&!f(e))for(var s in e)t(e[s],s,e)}(c),p||a(c)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./is-buffer":43,isarray:31}],42:[function(t,e,p){var c=t("debug")("socket.io-parser"),r=t("component-emitter"),i=t("./binary"),u=t("isarray"),n=t("./is-buffer");function o(){}p.protocol=4,p.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],p.CONNECT=0,p.DISCONNECT=1,p.EVENT=2,p.ACK=3,p.ERROR=4,p.BINARY_EVENT=5,p.BINARY_ACK=6,p.Encoder=o,p.Decoder=f;var s=p.ERROR+'"encode error"';function a(t){var e=""+t.type;if(p.BINARY_EVENT!==t.type&&p.BINARY_ACK!==t.type||(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data){var r=function(t){try{return JSON.stringify(t)}catch(t){return!1}}(t.data);if(!1===r)return s;e+=r}return c("encoded %j as %s",t,e),e}function f(){this.reconstructor=null}function h(t){this.reconPack=t,this.buffers=[]}function l(t){return{type:p.ERROR,data:"parser error: "+t}}o.prototype.encode=function(t,e){var r,o;(c("encoding packet %j",t),p.BINARY_EVENT===t.type||p.BINARY_ACK===t.type)?(r=t,o=e,i.removeBlobs(r,function(t){var e=i.deconstructPacket(t),r=a(e.packet),n=e.buffers;n.unshift(r),o(n)})):e([a(t)])},r(f.prototype),f.prototype.add=function(t){var e;if("string"==typeof t)e=function(t){var e=0,r={type:Number(t.charAt(0))};if(null==p.types[r.type])return l("unknown packet type "+r.type);if(p.BINARY_EVENT===r.type||p.BINARY_ACK===r.type){for(var n="";"-"!==t.charAt(++e)&&(n+=t.charAt(e),e!=t.length););if(n!=Number(n)||"-"!==t.charAt(e))throw new Error("Illegal attachments");r.attachments=Number(n)}if("/"===t.charAt(e+1))for(r.nsp="";++e;){var o=t.charAt(e);if(","===o)break;if(r.nsp+=o,e===t.length)break}else r.nsp="/";var i=t.charAt(e+1);if(""!==i&&Number(i)==i){for(r.id="";++e;){var o=t.charAt(e);if(null==o||Number(o)!=o){--e;break}if(r.id+=t.charAt(e),e===t.length)break}r.id=Number(r.id)}if(t.charAt(++e)){var s=function(t){try{return JSON.parse(t)}catch(t){return!1}}(t.substr(e)),a=!1!==s&&(r.type===p.ERROR||u(s));if(!a)return l("invalid payload");r.data=s}return c("decoded %s as %j",t,r),r}(t),p.BINARY_EVENT===e.type||p.BINARY_ACK===e.type?(this.reconstructor=new h(e),0===this.reconstructor.reconPack.attachments&&this.emit
1("decoded",e)):this.emit("decoded",e);else{if(!n(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(e=this.reconstructor.takeBinaryData(t))&&(this.reconstructor=null,this.emit("decoded",e))}},f.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},h.prototype.takeBinaryData=function(t){if(this.buffers.push(t),this.buffers.length!==this.reconPack.attachments)return null;var e=i.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),e},h.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},{"./binary":41,"./is-buffer":43,"component-emitter":11,debug:13,isarray:31}],43:[function(t,i,e){(function(e){i.exports=function(t){return r&&e.Buffer.isBuffer(t)||n&&(t instanceof e.ArrayBuffer||o(t))};var r="function"==typeof e.Buffer&&"function"==typeof e.Buffer.isBuffer,n="function"==typeof e.ArrayBuffer,o=n&&"function"==typeof e.ArrayBuffer.isView?e.ArrayBuffer.isView:function(t){return t.buffer instanceof e.ArrayBuffer}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],44:[function(t,e,r){e.exports=function(t,e){for(var r=[],n=(e=e||0)||0;n<t.length;n++)r[n-e]=t[n];return r}},{}],45:[function(t,e,r){"use strict";var n,o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),i=64,s={},a=0,p=0;function c(t){for(var e="";e=o[t%i]+e,0<(t=Math.floor(t/i)););return e}function u(){var t=c(+new Date);return t!==n?(a=0,n=t):t+"."+c(a++)}for(;p<i;p++)s[o[p]]=p;u.encode=c,u.decode=function(t){var e=0;for(p=0;p<t.length;p++)e=e*i+s[t.charAt(p)];return e},e.exports=u},{}],46:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.HelpersStatic=void 0;var n=function(){function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}}(),a=t("../config/config.js");r.HelpersStatic=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return n(t,null,[{key:"loadCss",value:function(n){return new Promise(function(t,e){var r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=a.config.widgetUrl+n,r.onload=t,r.onerror=e,document.getElementsByTagName("head")[0].appendChild(r)})}},{key:"loadScript",value:function(i,s){return new Promise(function(t,e){var r=document.createElement("script");r.src=a.config.widgetUrl+i;var n=s&&s.data;if(n)for(var o in n)n.hasOwnProperty(o)&&(r.dataset[o]=n[o]);s&&s.async&&(r.async=!0),s&&s.defer&&(r.defer=!0),r.onreadystatechange=t,r.onload=t,r.onerror=e,document.getElementsByTagName("body")[0].appendChild(r)})}},{key:"calcRandColor",value:function(t){if(t){var e="abcdefghijklmnopqrstuvwxyz".indexOf(t[0].toLowerCase())+1;return 4<e&&e<=8?"darkred":8<e&&e<=12?"blueviolet":12<e&&e<=16?"darkslategray":16<e&&e<=20?"yellowgreen":20<e&&e<=24?"dodgerblue":24<e&&e<=29?"palevioletred":"orange"}}},{key:"calcRand",value:function(t){var e=t[0],r=t[1];return Math.floor(Math.random().toFixed(1)*(r-e))+e}},{key:"randomizeArray",value:function(t){return t&&t.sort(function(t,e){return.5-Math.random()})}},{key:"linkify",value:function(t){return t&&t.replace(/(^|[^(?:=">)]|<\w+>|<\/\w+>)(https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*))/gi,'$1<a href="$2" target="_blank">$2</a>')}}]),t}()},{"../config/config.js":49}],47:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Log=void 0;var n=function(){function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}}(),o=t("../config/config.js");r.Log=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return n(t,null,[{key:"message",value:function(){if(o.config&&!o.config.production){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];e&&e.length&&(e.unshift("Status.net widget log: "),console.log.apply(null,e))}}},{key:"error",value:function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];e&&e.length&&(e.unshift("Status.net widget error: "),console.error.apply(null,e))}}]),t}()},{"../config/config.js":49}],48:[function(t,e,r){"use strict";
1Object.defineProperty(r,"__esModule",{value:!0}),r.RestApi=void 0;var n=function(){function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}}(),o=t("../config/config.js");r.RestApi=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.host=o.config.apiUrl,this.headers=new Headers({"content-type":"application/json"})}return n(t,[{key:"getWidget",value:function(r,t){var n=this;if(!r)return Promise.reject(new Error("rest-api > getWidget: widget id undefined"));var o=this.host+"/widgets/"+r+"?$sort=%7B%22createdAt%22:-1%7D";return t&&(t.limit&&(o+="&$limit="+t.limit),t.skip&&(o+="&$skip="+t.skip)),new Promise(function(t,e){fetch(o,{method:"GET",headers:n.headers}).then(function(t){if(200===t.status)return t.json();throw new Error(t.statusText)}).then(t).catch(function(t){e(new Error("Widget data loading error "+r+" error: ",t))})})}}]),t}()},{"../config/config.js":49}],49:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.config={production:!0,widgetUrl:"https://wg.status.net",apiUrl:"https://api.status.net",appUrl:"https://app.status.net"}},{}],50:[function(t,e,r){var n="#sprWdgt-updsPopup{position:fixed!important;left:24px!important;bottom:24px!important;z-index:9999!important;font-family:Muli,Helvetica,Arial,sans-serif!important;font-weight:400!important;letter-spacing:normal!important;line-height:20px!important;display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important;-webkit-border-radius:6px!important;border-radius:6px!important;visibility:hidden!important;opacity:0!important;-webkit-transition:opacity .3s ease-in-out,visibility .3s ease-in-out!important;-o-transition:opacity .3s ease-in-out,visibility .3s ease-in-out!important;transition:opacity .3s ease-in-out,visibility .3s ease-in-out!important}#sprWdgt-updsPopup.sprWdgt-updsPopup-isVisible{visibility:visible!important;opacity:1!important}#sprWdgt-updsPopup-sidebar{display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important;width:48px!important}#sprWdgt-updsPopup-close{display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important;position:absolute;top:12px;right:12px;width:16px;height:16px;opacity:.25;cursor:pointer}#sprWdgt-updsPopup-close:hover{opacity:.75}#sprWdgt-updsPopup-item{padding:15px!important;background:#fff!important;-webkit-border-radius:6px!important;border-radius:6px!important;-webkit-box-shadow:0 0 24px rgba(116,123,154,.3)!important;box-shadow:0 0 24px rgba(116,123,154,.3)!important;position:relative!important;-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important;display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important}#sprWdgt-updsPopup-item-avatar{width:36px!important;height:36px!important;-webkit-border-radius:50%;border-radius:50%;text-transform:uppercase!important;line-height:36px!important;text-align:center!important;background:#f1f1f1!important;color:#fff!important;font-size:14px!important;margin-top:4px!important;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}#sprWdgt-updsPopup-item-avatar img.sprWdgt-updsPopup-rb{width:24px!important;height:24px!important}#sprWdgt-updsPopup-item-avatar img.sprWdgt-updsPopup-usr{width:36px!important;height:36px!important;-webkit-border-radius:50%;border-radius:50%}#sprWdgt-updsPopup-item-author{display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-orient:horizontal!important;-webkit-box-direction:normal!important;-webkit-flex-direction:row!important;-ms-flex-direction:row!important;flex-direction:row!important;-webkit-flex-wrap:nowrap!important;-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important;padding:5px 0!important}#sprWdgt-updsPopup-item-author strong{font-weight:800!important;text-transform:uppercase!important;letter-spacing:.2px!important;font-size:13px!important;color:#565656!important}#sprWdgt-updsPopup-item-author span{color:rgba(111,111,111,.5)!important;margin-left:12px!important;font-size:13px!important}#sprWdgt-updsPopup-item-text{max-height:87px!important;-webkit-transition:max-height .3s!important;-o-transition:max-height .3s!important;transition:max-height .3s!important;width:288px!important;overflow:hidden!important;font-weight:400!important;line-height:16px!important;margin-bottom:3px!important}#sprWdgt-updsPopup-item-text,#sprWdgt-updsPopup-item-text *{font-size:13px!important;font-family:Muli,Helvetica,Arial,sans-serif!important;line-height:16px!important;font-weight:400!important}#sprWdgt-updsPopup-item-text p{font-size:13px!important;color:#565656!important;font-family:Muli,Helvetica,Arial,sans-serif!important;line-height:16px!important}#sprWdgt-updsPopup-item-text a,#sprWdgt-updsPopup-item-text a *{color:#6082e2!important;text-decoration:none!important}#sprWdgt-updsPopup-item-text a:hover{text-decoration:underline!important}#sprWdgt-updsPopup-item-text strong{font-weight:700!important}#sprWdgt-updsPopup-item-link{text-align:left!important;position:relative!important;top:2px!important;display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-align:center!important;-webkit-align-items:center!important;-ms-flex-align:center!important;align-items:center!important}#sprWdgt-updsPopup-item-link a{text-decoration:none!important;letter-spacing:.2px!important;font-weight:500!important;display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-align:center!important;-webkit-align-items:center!important;-ms-flex-align:center!important;align-items:center!important}#sprWdgt-updsPopup-item-link a span{padding-left:4px!important;font-size:11px!important;color:rgba(111,111,111,.5)!important}#sprWdgt-updsPopup-item-link a:hover span{color:#2cd090!important}#sprWdgt-updsPopup-item p{padding:0!important;margin:0!important}#sprWdgt-updsPopup-item-error{position:absolute!important;top:0!important;right:0!important;bottom:0!important;left:0!important;padding:12px!important;color:#f05829!important;font-size:16px!important;font-weight:600!important;-webkit-user-select:none!important;-moz-user-select:none!important;
1-ms-user-select:none!important;user-select:none!important;background:#fff!important;display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-align:center!important;-webkit-align-items:center!important;-ms-flex-align:center!important;align-items:center!important;-webkit-box-pack:center!important;-webkit-justify-content:center!important;-ms-flex-pack:center!important;justify-content:center!important;text-align:center!important;border:1px solid #f05829!important;-webkit-border-radius:6px!important;border-radius:6px!important}@media (max-width:432px){#sprWdgt-updsPopup{right:24px!important;font-size:12px!important}#sprWdgt-updsPopup-sidebar{display:none!important}#sprWdgt-updsPopup-item-text{width:auto!important;margin-left:0!important}}";t("browserify-css").createStyle(n,{href:"src/widgets/updates-popup/updates-popup.css"},{insertAt:"bottom"}),e.exports=n},{"browserify-css":8}],51:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.UpdatesPopupWidget=void 0;var n,o=function(){function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}}(),i=t("../../common/rest-api.js"),l=t("../../common/helpers.js"),s=t("../../common/log.js"),a=t("socket.io-client"),p=(n=a)&&n.__esModule?n:{default:n},c=t("../../config/config.js");t("./updates-popup.css");var u=[2e3,5e3],f=r.UpdatesPopupWidget=function(){function r(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),this.widget=t,this.updates=e,this.crntUpdIndx=0,this.wasWidgetClosedManually=!1,this.socket=void 0,this.api=new i.RestApi}return o(r,[{key:"init",value:function(){if(this.refs=this._renderPopupTmpl(),this._expandPopupOnHover(),this._cancelPopupOnClick(),!this.updates||!this.updates.data)return s.Log.error("Widget updates data undefined");2<this.updates.data.length&&l.HelpersStatic.randomizeArray(this.updates.data),setTimeout(this._changePopup.bind(this),3e3),this.updates.data.length<this.updates.total&&this._periodicallyLoadRemainingUpdates(),this._subscribeToSocketEvents()}},{key:"_subscribeToSocketEvents",value:function(){var r=this;this.socket=p.default.connect(c.config.apiUrl),this.socket.on("connect",function(){r.socket.emit("/widgets/subscribe",{widgetId:r.widget.id})}),this.socket.on("api/updates created_widget",function(t){t&&t.id&&(s.Log.message("new update was created",t),r.updates.data.splice(r.crntUpdIndx+1,0,t),r.updates.total++,1===r.updates.total&&r._changePopup())}),this.socket.on("api/updates patched_widget",function(e){if(e&&e.id){s.Log.message("update was patched",e);var t=r.updates.data.findIndex(function(t){return t&&t.id===e.id});-1<t&&(r.updates.data[t]=e)}})}},{key:"_changePopup",value:function(){if(!this.wasWidgetClosedManually){if(!this.updates.total)return s.Log.message("updates are absent");var t=this.updates.data[this.crntUpdIndx];if(!t)return s.Log.error("Incorrect update");this._setPopupContent(t),this._showPopup(),this.popupVsblIntrvlObj=setTimeout(this._gotoNextPopup.bind(this),15e3)}}},{key:"_gotoNextPopup",value:function(){this._hidePopup(),this.crntUpdIndx<this.updates.data.length-1?this.crntUpdIndx++:this.crntUpdIndx=0,setTimeout(this._changePopup.bind(this),l.HelpersStatic.calcRand(u))}},{key:"_expandPopupOnHover",value:function(){var t=this,e=this.refs,r=e.wdgEl,n=e.itemTextEl;r.addEventListener("mouseenter",function(){n.setAttribute("style","max-height:"+n.scrollHeight+"px !important"),t.mouseLeaveIntrvlObj&&clearTimeout(t.mouseLeaveIntrvlObj),t.popupVsblIntrvlObj&&clearTimeout(t.popupVsblIntrvlObj)}),r.addEventListener("mouseleave",function(){t.hasError||(n.style.maxHeight="",t.mouseLeaveIntrvlObj=setTimeout(t._gotoNextPopup.bind(t),2e3))})}},{key:"_closeWidgetManually",value:function(){this._hidePopup(),this.wasWidgetClosedManually=!0,this.socket.close()}},{key:"_cancelPopupOnClick",value:function(){var t=this;this.refs.itemCloseEl.addEventListener("click",function(){t._closeWidgetManually()})}},{key:"_periodicallyLoadRemainingUpdates",value:function(){var n=this,e=setInterval(function(){return n.wasWidgetClosedManually?(s.Log.message("cancel loading, as popup was closed"),clearInterval(e)):n.updates.data.length>=n.widget.numLastUpdates||n.updates.data.length>=n.updates.total?(s.Log.message("all "+n.updates.data.length+" updates loaded"),clearInterval(e)):(s.Log.message("load remaining "+(n.updates.total-n.updates.data.length)+" updates, loaded ",n.updates.data.length),void n.api.getWidget(n.widget.id,{skip:n.updates.data.length}).then(function(t){var e=t&&t.widget;if(!e)throw new Error("widget undefined");if(!e.isActive)throw new Error("widget none active");n.widget=e;var r=t.updates;if(!r||!r.data)throw new Error("widget updates data undefined");0<r.data.length&&(l.HelpersStatic.randomizeArray(r.data),n.updates.data=n.updates.data.concat(r.data))}).catch(function(t){clearInterval(e),clearTimeout(n.popupVsblIntrvlObj),s.Log.error(t)}))},6e4)}},{key:"_renderPopupTmpl",value:function(){var t=document.createElement("div");t.id="sprWdgt-updsPopup";var e=document.createElement("div");e.id="sprWdgt-updsPopup-item";var r=document.createElement("div");r.id="sprWdgt-updsPopup-sidebar",e.appendChild(r);var n=document.createElement("div");n.id="sprWdgt-updsPopup-content",e.appendChild(n);var o=document.createElement("div");o.id="sprWdgt-updsPopup-close",o.innerHTML='<svg viewPort="0 0 12 12" version="1.1" xmlns="http://www.w3.org/2000/svg">\n <line x1="1" y1="14" x2="14" y2="1" stroke="black" stroke-width="1"/>\n <line x1="1" y1="1" x2="14" y2="14" stroke="black" stroke-width="1"/>\n </svg>',e.appendChild(o);var i=document.createElement("div");i.id="sprWdgt-updsPopup-item-avatar",r.appendChild(i);var s=document.createElement("div");s.id="sprWdgt-updsPopup-item-author";var a=document.createElement("strong"),p=document.createElement("span");s.appendChild(a),s.appendChild(p),n.appendChild(s);var c=document.createElement("div");c.id="sprWdgt-updsPopup-item-text",n.appendChild(c);var u=document.createElement("div");u.id="sprWdgt-updsPopup-item-link";var f=document.createElement("a");f.href="https://status.net?utm_source="+window.location.host+"&utm_medium=status_popup_widget",f.target="_blank",f.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="12" viewBox="0 0 24 24" fill="none"\n stroke="#2CD090" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline>\n </svg>';var h=document.createElement("span");return h.textContent="status.net",f.appendChild(h),u.appendChild(f),n.appendChild(u),t.appendChild(e),setTimeout(function(){document.getElementsByTagName("body")[0].appendChild(t)},1e3),{wdgEl:t,itemEl:e,itemAvtrEl:i,itemTextEl:c,authorNameEl:a,updateTimeEl:p,itemCloseEl:o}}},{key:"_setPopupContent",value:function(t){var e=t&&t.creator,r=this.refs,n=r.itemAvtrEl,o=r.itemTextEl,i=r.authorNameEl,s=r.updateTimeEl;if(e&&t.creatorType&&2===t.creatorType)if(e.robotAvatarType&&"logo"===e.robotAvatarType){var a=e.robotType.indexOf("webhook_")<0?"webhook":e.robotType.slice(8);n.innerHTML='<img src="https://status.net/assets/logos/'+a+'.png" \n class="sprWdgt-updsPopup-rb" \n style="width:24px;height:24px;">',n.setAttribute("style","background-color:transparent!important")}else{n.textContent=""+(e.name?e.name[0]:"");var p=l.HelpersStatic.calcRandColor(e.name);n.setAttribute("style","background-color:"+p+" !important")}else if(e&&e.avatarUrl)n.innerHTML='<img src="'+e.avatarUrl+'" class="sprWdgt-updsPopup-usr">',n.setAttribute("style","background-color:transparent!important");else if(e&&(e.firstName||e.lastName)){n.textContent=""+(e.firstName?e.firstName[0]:"")+(e.lastName?e.lastName[0]:"");var c=l.HelpersStatic.calcRandColor(e.lastName||e.firstName);n.setAttribute("style","background-color:"+c+" !important")}else n.textContent="";if(t.creatorType&&2===t.creatorType?i.textContent=e&&e.name?e.name:"":e&&(e.firstName||e.lastName)?i.textContent=(e.firstName?e.firstName:"")+" "+(e.lastName?e.lastName:""):i.textContent="",t&&t.createdAt){var u=Date.now()-new Date(t.createdAt).getTime(),f=Math.ceil(u/36e5),h=Math.ceil(u/6e4);s.textContent=0<=h&&h<60?h+" "+(1===h?"minute":"minutes")+" ago":1<=f&&f<=12?f+" "+(1===f?"hour":"hours")+" ago":""}else s.textContent="";t.updateValue?o.innerHTML=l.HelpersStatic.linkify(t.updateValue):o.textContent=""}},{key:"_showPopup",value:function(){this.refs.wdgEl.classList.add("sprWdgt-updsPopup-isVisible")}},{key:"_hidePopup",value:function(){this.refs.wdgEl.classList.remove("sprWdgt-updsPopup-isVisible")}}]),r}();window.SprWidgetsUpdatesPopup=f},{"../../common/helpers.js":46,"../../common/log.js":47,"../../common/rest-api.js":48,"../../config/config.js":49,"./updates-popup.css":50,"socket.io-client":36}]},{},[51]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.