pusher-js
Version:
Pusher Channels JavaScript library for browsers, React Native, NodeJS and web workers
2 lines • 92.5 kB
JavaScript
/*! For license information please see pusher-with-encryption.min.js.LICENSE.txt */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Pusher=e():t.Pusher=e()}(self,()=>(()=>{var t={594(t,e){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},n(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i=256,s=function(){function t(t){void 0===t&&(t="="),this._paddingCharacter=t}return t.prototype.encodedLength=function(t){return this._paddingCharacter?(t+2)/3*4|0:(8*t+5)/6|0},t.prototype.encode=function(t){for(var e="",n=0;n<t.length-2;n+=3){var r=t[n]<<16|t[n+1]<<8|t[n+2];e+=this._encodeByte(r>>>18&63),e+=this._encodeByte(r>>>12&63),e+=this._encodeByte(r>>>6&63),e+=this._encodeByte(r>>>0&63)}var i=t.length-n;return i>0&&(r=t[n]<<16|(2===i?t[n+1]<<8:0),e+=this._encodeByte(r>>>18&63),e+=this._encodeByte(r>>>12&63),e+=2===i?this._encodeByte(r>>>6&63):this._paddingCharacter||"",e+=this._paddingCharacter||""),e},t.prototype.maxDecodedLength=function(t){return this._paddingCharacter?t/4*3|0:(6*t+7)/8|0},t.prototype.decodedLength=function(t){return this.maxDecodedLength(t.length-this._getPaddingLength(t))},t.prototype.decode=function(t){if(0===t.length)return new Uint8Array(0);for(var e=this._getPaddingLength(t),n=t.length-e,r=new Uint8Array(this.maxDecodedLength(n)),s=0,o=0,a=0,c=0,h=0,u=0,l=0;o<n-4;o+=4)c=this._decodeChar(t.charCodeAt(o+0)),h=this._decodeChar(t.charCodeAt(o+1)),u=this._decodeChar(t.charCodeAt(o+2)),l=this._decodeChar(t.charCodeAt(o+3)),r[s++]=c<<2|h>>>4,r[s++]=h<<4|u>>>2,r[s++]=u<<6|l,a|=c&i,a|=h&i,a|=u&i,a|=l&i;if(o<n-1&&(c=this._decodeChar(t.charCodeAt(o)),h=this._decodeChar(t.charCodeAt(o+1)),r[s++]=c<<2|h>>>4,a|=c&i,a|=h&i),o<n-2&&(u=this._decodeChar(t.charCodeAt(o+2)),r[s++]=h<<4|u>>>2,a|=u&i),o<n-3&&(l=this._decodeChar(t.charCodeAt(o+3)),r[s++]=u<<6|l,a|=l&i),0!==a)throw new Error("Base64Coder: incorrect characters for decoding");return r},t.prototype._encodeByte=function(t){var e=t;return e+=65,e+=25-t>>>8&6,e+=51-t>>>8&-75,e+=61-t>>>8&-15,e+=62-t>>>8&3,String.fromCharCode(e)},t.prototype._decodeChar=function(t){var e=i;return e+=(42-t&t-44)>>>8&-256+t-43+62,e+=(46-t&t-48)>>>8&-256+t-47+63,e+=(47-t&t-58)>>>8&-256+t-48+52,(e+=(64-t&t-91)>>>8&-256+t-65+0)+((96-t&t-123)>>>8&-256+t-97+26)},t.prototype._getPaddingLength=function(t){var e=0;if(this._paddingCharacter){for(var n=t.length-1;n>=0&&t[n]===this._paddingCharacter;n--)e++;if(t.length<4||e>2)throw new Error("Base64Coder: incorrect padding")}return e},t}();e.Coder=s;var o=new s;e.encode=function(t){return o.encode(t)},e.decode=function(t){return o.decode(t)};var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype._encodeByte=function(t){var e=t;return e+=65,e+=25-t>>>8&6,e+=51-t>>>8&-75,e+=61-t>>>8&-13,e+=62-t>>>8&49,String.fromCharCode(e)},e.prototype._decodeChar=function(t){var e=i;return e+=(44-t&t-46)>>>8&-256+t-45+62,e+=(94-t&t-96)>>>8&-256+t-95+63,e+=(47-t&t-58)>>>8&-256+t-48+52,(e+=(64-t&t-91)>>>8&-256+t-65+0)+((96-t&t-123)>>>8&-256+t-97+26)},e}(s);e.URLSafeCoder=a;var c=new a;e.encodeURLSafe=function(t){return c.encode(t)},e.decodeURLSafe=function(t){return c.decode(t)},e.encodedLength=function(t){return o.encodedLength(t)},e.maxDecodedLength=function(t){return o.maxDecodedLength(t)},e.decodedLength=function(t){return o.decodedLength(t)}},978(t,e){"use strict";var n="utf8: invalid source encoding";e.D4=function(t){for(var e=[],r=0;r<t.length;r++){var i=t[r];if(128&i){var s=void 0;if(i<224){if(r>=t.length)throw new Error(n);if(128!=(192&(o=t[++r])))throw new Error(n);i=(31&i)<<6|63&o,s=128}else if(i<240){if(r>=t.length-1)throw new Error(n);var o=t[++r],a=t[++r];if(128!=(192&o)||128!=(192&a))throw new Error(n);i=(15&i)<<12|(63&o)<<6|63&a,s=2048}else{if(!(i<248))throw new Error(n);if(r>=t.length-2)throw new Error(n);o=t[++r],a=t[++r];var c=t[++r];if(128!=(192&o)||128!=(192&a)||128!=(192&c))throw new Error(n);i=(15&i)<<18|(63&o)<<12|(63&a)<<6|63&c,s=65536}if(i<s||i>=55296&&i<=57343)throw new Error(n);if(i>=65536){if(i>1114111)throw new Error(n);i-=65536,e.push(String.fromCharCode(55296|i>>10)),i=56320|1023&i}}e.push(String.fromCharCode(i))}return e.join("")}},601(t,e,n){!function(t){"use strict";var e=function(t){var e,n=new Float64Array(16);if(t)for(e=0;e<t.length;e++)n[e]=t[e];return n},r=function(){throw new Error("no PRNG")},i=new Uint8Array(16),s=new Uint8Array(32);s[0]=9;var o=e(),a=e([1]),c=e([56129,1]),h=e([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),u=e([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),l=e([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),d=e([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),p=e([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function f(t,e,n,r){t[e]=n>>24&255,t[e+1]=n>>16&255,t[e+2]=n>>8&255,t[e+3]=255&n,t[e+4]=r>>24&255,t[e+5]=r>>16&255,t[e+6]=r>>8&255,t[e+7]=255&r}function g(t,e,n,r,i){var s,o=0;for(s=0;s<i;s++)o|=t[e+s]^n[r+s];return(1&o-1>>>8)-1}function v(t,e,n,r){return g(t,e,n,r,16)}function b(t,e,n,r){return g(t,e,n,r,32)}function y(t,e,n,r){!function(t,e,n,r){for(var i,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,h=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,l=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,d=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,f=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,g=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,v=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,b=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,y=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,m=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,w=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,_=s,S=o,k=a,C=c,T=h,E=u,x=l,A=d,P=p,L=f,O=g,U=v,R=b,I=y,M=m,D=w,N=0;N<20;N+=2)_^=(i=(R^=(i=(P^=(i=(T^=(i=_+R|0)<<7|i>>>25)+_|0)<<9|i>>>23)+T|0)<<13|i>>>19)+P|0)<<18|i>>>14,E^=(i=(S^=(i=(I^=(i=(L^=(i=E+S|0)<<7|i>>>25)+E|0)<<9|i>>>23)+L|0)<<13|i>>>19)+I|0)<<18|i>>>14,O^=(i=(x^=(i=(k^=(i=(M^=(i=O+x|0)<<7|i>>>25)+O|0)<<9|i>>>23)+M|0)<<13|i>>>19)+k|0)<<18|i>>>14,D^=(i=(U^=(i=(A^=(i=(C^=(i=D+U|0)<<7|i>>>25)+D|0)<<9|i>>>23)+C|0)<<13|i>>>19)+A|0)<<18|i>>>14,_^=(i=(C^=(i=(k^=(i=(S^=(i=_+C|0)<<7|i>>>25)+_|0)<<9|i>>>23)+S|0)<<13|i>>>19)+k|0)<<18|i>>>14,E^=(i=(T^=(i=(A^=(i=(x^=(i=E+T|0)<<7|i>>>25)+E|0)<<9|i>>>23)+x|0)<<13|i>>>19)+A|0)<<18|i>>>14,O^=(i=(L^=(i=(P^=(i=(U^=(i=O+L|0)<<7|i>>>25)+O|0)<<9|i>>>23)+U|0)<<13|i>>>19)+P|0)<<18|i>>>14,D^=(i=(M^=(i=(I^=(i=(R^=(i=D+M|0)<<7|i>>>25)+D|0)<<9|i>>>23)+R|0)<<13|i>>>19)+I|0)<<18|i>>>14;_=_+s|0,S=S+o|0,k=k+a|0,C=C+c|0,T=T+h|0,E=E+u|0,x=x+l|0,A=A+d|0,P=P+p|0,L=L+f|0,O=O+g|0,U=U+v|0,R=R+b|0,I=I+y|0,M=M+m|0,D=D+w|0,t[0]=_>>>0&255,t[1]=_>>>8&255,t[2]=_>>>16&255,t[3]=_>>>24&255,t[4]=S>>>0&255,t[5]=S>>>8&255,t[6]=S>>>16&255,t[7]=S>>>24&255,t[8]=k>>>0&255,t[9]=k>>>8&255,t[10]=k>>>16&255,t[11]=k>>>24&255,t[12]=C>>>0&255,t[13]=C>>>8&255,t[14]=C>>>16&255,t[15]=C>>>24&255,t[16]=T>>>0&255,t[17]=T>>>8&255,t[18]=T>>>16&255,t[19]=T>>>24&255,t[20]=E>>>0&255,t[21]=E>>>8&255,t[22]=E>>>16&255,t[23]=E>>>24&255,t[24]=x>>>0&255,t[25]=x>>>8&255,t[26]=x>>>16&255,t[27]=x>>>24&255,t[28]=A>>>0&255,t[29]=A>>>8&255,t[30]=A>>>16&255,t[31]=A>>>24&255,t[32]=P>>>0&255,t[33]=P>>>8&255,t[34]=P>>>16&255,t[35]=P>>>24&255,t[36]=L>>>0&255,t[37]=L>>>8&255,t[38]=L>>>16&255,t[39]=L>>>24&255,t[40]=O>>>0&255,t[41]=O>>>8&255,t[42]=O>>>16&255,t[43]=O>>>24&255,t[44]=U>>>0&255,t[45]=U>>>8&255,t[46]=U>>>16&255,t[47]=U>>>24&255,t[48]=R>>>0&255,t[49]=R>>>8&255,t[50]=R>>>16&255,t[51]=R>>>24&255,t[52]=I>>>0&255,t[53]=I>>>8&255,t[54]=I>>>16&255,t[55]=I>>>24&255,t[56]=M>>>0&255,t[57]=M>>>8&255,t[58]=M>>>16&255,t[59]=M>>>24&255,t[60]=D>>>0&255,t[61]=D>>>8&255,t[62]=D>>>16&255,t[63]=D>>>24&255}(t,e,n,r)}function m(t,e,n,r){!function(t,e,n,r){for(var i,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,h=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,l=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,d=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,f=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,g=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,v=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,b=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,y=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,m=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,w=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,_=0;_<20;_+=2)s^=(i=(b^=(i=(p^=(i=(h^=(i=s+b|0)<<7|i>>>25)+s|0)<<9|i>>>23)+h|0)<<13|i>>>19)+p|0)<<18|i>>>14,u^=(i=(o^=(i=(y^=(i=(f^=(i=u+o|0)<<7|i>>>25)+u|0)<<9|i>>>23)+f|0)<<13|i>>>19)+y|0)<<18|i>>>14,g^=(i=(l^=(i=(a^=(i=(m^=(i=g+l|0)<<7|i>>>25)+g|0)<<9|i>>>23)+m|0)<<13|i>>>19)+a|0)<<18|i>>>14,w^=(i=(v^=(i=(d^=(i=(c^=(i=w+v|0)<<7|i>>>25)+w|0)<<9|i>>>23)+c|0)<<13|i>>>19)+d|0)<<18|i>>>14,s^=(i=(c^=(i=(a^=(i=(o^=(i=s+c|0)<<7|i>>>25)+s|0)<<9|i>>>23)+o|0)<<13|i>>>19)+a|0)<<18|i>>>14,u^=(i=(h^=(i=(d^=(i=(l^=(i=u+h|0)<<7|i>>>25)+u|0)<<9|i>>>23)+l|0)<<13|i>>>19)+d|0)<<18|i>>>14,g^=(i=(f^=(i=(p^=(i=(v^=(i=g+f|0)<<7|i>>>25)+g|0)<<9|i>>>23)+v|0)<<13|i>>>19)+p|0)<<18|i>>>14,w^=(i=(m^=(i=(y^=(i=(b^=(i=w+m|0)<<7|i>>>25)+w|0)<<9|i>>>23)+b|0)<<13|i>>>19)+y|0)<<18|i>>>14;t[0]=s>>>0&255,t[1]=s>>>8&255,t[2]=s>>>16&255,t[3]=s>>>24&255,t[4]=u>>>0&255,t[5]=u>>>8&255,t[6]=u>>>16&255,t[7]=u>>>24&255,t[8]=g>>>0&255,t[9]=g>>>8&255,t[10]=g>>>16&255,t[11]=g>>>24&255,t[12]=w>>>0&255,t[13]=w>>>8&255,t[14]=w>>>16&255,t[15]=w>>>24&255,t[16]=l>>>0&255,t[17]=l>>>8&255,t[18]=l>>>16&255,t[19]=l>>>24&255,t[20]=d>>>0&255,t[21]=d>>>8&255,t[22]=d>>>16&255,t[23]=d>>>24&255,t[24]=p>>>0&255,t[25]=p>>>8&255,t[26]=p>>>16&255,t[27]=p>>>24&255,t[28]=f>>>0&255,t[29]=f>>>8&255,t[30]=f>>>16&255,t[31]=f>>>24&255}(t,e,n,r)}var w=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function _(t,e,n,r,i,s,o){var a,c,h=new Uint8Array(16),u=new Uint8Array(64);for(c=0;c<16;c++)h[c]=0;for(c=0;c<8;c++)h[c]=s[c];for(;i>=64;){for(y(u,h,o,w),c=0;c<64;c++)t[e+c]=n[r+c]^u[c];for(a=1,c=8;c<16;c++)a=a+(255&h[c])|0,h[c]=255&a,a>>>=8;i-=64,e+=64,r+=64}if(i>0)for(y(u,h,o,w),c=0;c<i;c++)t[e+c]=n[r+c]^u[c];return 0}function S(t,e,n,r,i){var s,o,a=new Uint8Array(16),c=new Uint8Array(64);for(o=0;o<16;o++)a[o]=0;for(o=0;o<8;o++)a[o]=r[o];for(;n>=64;){for(y(c,a,i,w),o=0;o<64;o++)t[e+o]=c[o];for(s=1,o=8;o<16;o++)s=s+(255&a[o])|0,a[o]=255&s,s>>>=8;n-=64,e+=64}if(n>0)for(y(c,a,i,w),o=0;o<n;o++)t[e+o]=c[o];return 0}function k(t,e,n,r,i){var s=new Uint8Array(32);m(s,r,i,w);for(var o=new Uint8Array(8),a=0;a<8;a++)o[a]=r[a+16];return S(t,e,n,o,s)}function C(t,e,n,r,i,s,o){var a=new Uint8Array(32);m(a,s,o,w);for(var c=new Uint8Array(8),h=0;h<8;h++)c[h]=s[h+16];return _(t,e,n,r,i,c,a)}var T=function(t){var e,n,r,i,s,o,a,c;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,e=255&t[0]|(255&t[1])<<8,this.r[0]=8191&e,n=255&t[2]|(255&t[3])<<8,this.r[1]=8191&(e>>>13|n<<3),r=255&t[4]|(255&t[5])<<8,this.r[2]=7939&(n>>>10|r<<6),i=255&t[6]|(255&t[7])<<8,this.r[3]=8191&(r>>>7|i<<9),s=255&t[8]|(255&t[9])<<8,this.r[4]=255&(i>>>4|s<<12),this.r[5]=s>>>1&8190,o=255&t[10]|(255&t[11])<<8,this.r[6]=8191&(s>>>14|o<<2),a=255&t[12]|(255&t[13])<<8,this.r[7]=8065&(o>>>11|a<<5),c=255&t[14]|(255&t[15])<<8,this.r[8]=8191&(a>>>8|c<<8),this.r[9]=c>>>5&127,this.pad[0]=255&t[16]|(255&t[17])<<8,this.pad[1]=255&t[18]|(255&t[19])<<8,this.pad[2]=255&t[20]|(255&t[21])<<8,this.pad[3]=255&t[22]|(255&t[23])<<8,this.pad[4]=255&t[24]|(255&t[25])<<8,this.pad[5]=255&t[26]|(255&t[27])<<8,this.pad[6]=255&t[28]|(255&t[29])<<8,this.pad[7]=255&t[30]|(255&t[31])<<8};function E(t,e,n,r,i,s){var o=new T(s);return o.update(n,r,i),o.finish(t,e),0}function x(t,e,n,r,i,s){var o=new Uint8Array(16);return E(o,0,n,r,i,s),v(t,e,o,0)}function A(t,e,n,r,i){var s;if(n<32)return-1;for(C(t,0,e,0,n,r,i),E(t,16,t,32,n-32,t),s=0;s<16;s++)t[s]=0;return 0}function P(t,e,n,r,i){var s,o=new Uint8Array(32);if(n<32)return-1;if(k(o,0,32,r,i),0!==x(e,16,e,32,n-32,o))return-1;for(C(t,0,e,0,n,r,i),s=0;s<32;s++)t[s]=0;return 0}function L(t,e){var n;for(n=0;n<16;n++)t[n]=0|e[n]}function O(t){var e,n,r=1;for(e=0;e<16;e++)n=t[e]+r+65535,r=Math.floor(n/65536),t[e]=n-65536*r;t[0]+=r-1+37*(r-1)}function U(t,e,n){for(var r,i=~(n-1),s=0;s<16;s++)r=i&(t[s]^e[s]),t[s]^=r,e[s]^=r}function R(t,n){var r,i,s,o=e(),a=e();for(r=0;r<16;r++)a[r]=n[r];for(O(a),O(a),O(a),i=0;i<2;i++){for(o[0]=a[0]-65517,r=1;r<15;r++)o[r]=a[r]-65535-(o[r-1]>>16&1),o[r-1]&=65535;o[15]=a[15]-32767-(o[14]>>16&1),s=o[15]>>16&1,o[14]&=65535,U(a,o,1-s)}for(r=0;r<16;r++)t[2*r]=255&a[r],t[2*r+1]=a[r]>>8}function I(t,e){var n=new Uint8Array(32),r=new Uint8Array(32);return R(n,t),R(r,e),b(n,0,r,0)}function M(t){var e=new Uint8Array(32);return R(e,t),1&e[0]}function D(t,e){var n;for(n=0;n<16;n++)t[n]=e[2*n]+(e[2*n+1]<<8);t[15]&=32767}function N(t,e,n){for(var r=0;r<16;r++)t[r]=e[r]+n[r]}function j(t,e,n){for(var r=0;r<16;r++)t[r]=e[r]-n[r]}function B(t,e,n){var r,i,s=0,o=0,a=0,c=0,h=0,u=0,l=0,d=0,p=0,f=0,g=0,v=0,b=0,y=0,m=0,w=0,_=0,S=0,k=0,C=0,T=0,E=0,x=0,A=0,P=0,L=0,O=0,U=0,R=0,I=0,M=0,D=n[0],N=n[1],j=n[2],B=n[3],z=n[4],H=n[5],q=n[6],F=n[7],$=n[8],X=n[9],J=n[10],Y=n[11],K=n[12],W=n[13],G=n[14],Z=n[15];s+=(r=e[0])*D,o+=r*N,a+=r*j,c+=r*B,h+=r*z,u+=r*H,l+=r*q,d+=r*F,p+=r*$,f+=r*X,g+=r*J,v+=r*Y,b+=r*K,y+=r*W,m+=r*G,w+=r*Z,o+=(r=e[1])*D,a+=r*N,c+=r*j,h+=r*B,u+=r*z,l+=r*H,d+=r*q,p+=r*F,f+=r*$,g+=r*X,v+=r*J,b+=r*Y,y+=r*K,m+=r*W,w+=r*G,_+=r*Z,a+=(r=e[2])*D,c+=r*N,h+=r*j,u+=r*B,l+=r*z,d+=r*H,p+=r*q,f+=r*F,g+=r*$,v+=r*X,b+=r*J,y+=r*Y,m+=r*K,w+=r*W,_+=r*G,S+=r*Z,c+=(r=e[3])*D,h+=r*N,u+=r*j,l+=r*B,d+=r*z,p+=r*H,f+=r*q,g+=r*F,v+=r*$,b+=r*X,y+=r*J,m+=r*Y,w+=r*K,_+=r*W,S+=r*G,k+=r*Z,h+=(r=e[4])*D,u+=r*N,l+=r*j,d+=r*B,p+=r*z,f+=r*H,g+=r*q,v+=r*F,b+=r*$,y+=r*X,m+=r*J,w+=r*Y,_+=r*K,S+=r*W,k+=r*G,C+=r*Z,u+=(r=e[5])*D,l+=r*N,d+=r*j,p+=r*B,f+=r*z,g+=r*H,v+=r*q,b+=r*F,y+=r*$,m+=r*X,w+=r*J,_+=r*Y,S+=r*K,k+=r*W,C+=r*G,T+=r*Z,l+=(r=e[6])*D,d+=r*N,p+=r*j,f+=r*B,g+=r*z,v+=r*H,b+=r*q,y+=r*F,m+=r*$,w+=r*X,_+=r*J,S+=r*Y,k+=r*K,C+=r*W,T+=r*G,E+=r*Z,d+=(r=e[7])*D,p+=r*N,f+=r*j,g+=r*B,v+=r*z,b+=r*H,y+=r*q,m+=r*F,w+=r*$,_+=r*X,S+=r*J,k+=r*Y,C+=r*K,T+=r*W,E+=r*G,x+=r*Z,p+=(r=e[8])*D,f+=r*N,g+=r*j,v+=r*B,b+=r*z,y+=r*H,m+=r*q,w+=r*F,_+=r*$,S+=r*X,k+=r*J,C+=r*Y,T+=r*K,E+=r*W,x+=r*G,A+=r*Z,f+=(r=e[9])*D,g+=r*N,v+=r*j,b+=r*B,y+=r*z,m+=r*H,w+=r*q,_+=r*F,S+=r*$,k+=r*X,C+=r*J,T+=r*Y,E+=r*K,x+=r*W,A+=r*G,P+=r*Z,g+=(r=e[10])*D,v+=r*N,b+=r*j,y+=r*B,m+=r*z,w+=r*H,_+=r*q,S+=r*F,k+=r*$,C+=r*X,T+=r*J,E+=r*Y,x+=r*K,A+=r*W,P+=r*G,L+=r*Z,v+=(r=e[11])*D,b+=r*N,y+=r*j,m+=r*B,w+=r*z,_+=r*H,S+=r*q,k+=r*F,C+=r*$,T+=r*X,E+=r*J,x+=r*Y,A+=r*K,P+=r*W,L+=r*G,O+=r*Z,b+=(r=e[12])*D,y+=r*N,m+=r*j,w+=r*B,_+=r*z,S+=r*H,k+=r*q,C+=r*F,T+=r*$,E+=r*X,x+=r*J,A+=r*Y,P+=r*K,L+=r*W,O+=r*G,U+=r*Z,y+=(r=e[13])*D,m+=r*N,w+=r*j,_+=r*B,S+=r*z,k+=r*H,C+=r*q,T+=r*F,E+=r*$,x+=r*X,A+=r*J,P+=r*Y,L+=r*K,O+=r*W,U+=r*G,R+=r*Z,m+=(r=e[14])*D,w+=r*N,_+=r*j,S+=r*B,k+=r*z,C+=r*H,T+=r*q,E+=r*F,x+=r*$,A+=r*X,P+=r*J,L+=r*Y,O+=r*K,U+=r*W,R+=r*G,I+=r*Z,w+=(r=e[15])*D,o+=38*(S+=r*j),a+=38*(k+=r*B),c+=38*(C+=r*z),h+=38*(T+=r*H),u+=38*(E+=r*q),l+=38*(x+=r*F),d+=38*(A+=r*$),p+=38*(P+=r*X),f+=38*(L+=r*J),g+=38*(O+=r*Y),v+=38*(U+=r*K),b+=38*(R+=r*W),y+=38*(I+=r*G),m+=38*(M+=r*Z),s=(r=(s+=38*(_+=r*N))+(i=1)+65535)-65536*(i=Math.floor(r/65536)),o=(r=o+i+65535)-65536*(i=Math.floor(r/65536)),a=(r=a+i+65535)-65536*(i=Math.floor(r/65536)),c=(r=c+i+65535)-65536*(i=Math.floor(r/65536)),h=(r=h+i+65535)-65536*(i=Math.floor(r/65536)),u=(r=u+i+65535)-65536*(i=Math.floor(r/65536)),l=(r=l+i+65535)-65536*(i=Math.floor(r/65536)),d=(r=d+i+65535)-65536*(i=Math.floor(r/65536)),p=(r=p+i+65535)-65536*(i=Math.floor(r/65536)),f=(r=f+i+65535)-65536*(i=Math.floor(r/65536)),g=(r=g+i+65535)-65536*(i=Math.floor(r/65536)),v=(r=v+i+65535)-65536*(i=Math.floor(r/65536)),b=(r=b+i+65535)-65536*(i=Math.floor(r/65536)),y=(r=y+i+65535)-65536*(i=Math.floor(r/65536)),m=(r=m+i+65535)-65536*(i=Math.floor(r/65536)),w=(r=w+i+65535)-65536*(i=Math.floor(r/65536)),s=(r=(s+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(r/65536)),o=(r=o+i+65535)-65536*(i=Math.floor(r/65536)),a=(r=a+i+65535)-65536*(i=Math.floor(r/65536)),c=(r=c+i+65535)-65536*(i=Math.floor(r/65536)),h=(r=h+i+65535)-65536*(i=Math.floor(r/65536)),u=(r=u+i+65535)-65536*(i=Math.floor(r/65536)),l=(r=l+i+65535)-65536*(i=Math.floor(r/65536)),d=(r=d+i+65535)-65536*(i=Math.floor(r/65536)),p=(r=p+i+65535)-65536*(i=Math.floor(r/65536)),f=(r=f+i+65535)-65536*(i=Math.floor(r/65536)),g=(r=g+i+65535)-65536*(i=Math.floor(r/65536)),v=(r=v+i+65535)-65536*(i=Math.floor(r/65536)),b=(r=b+i+65535)-65536*(i=Math.floor(r/65536)),y=(r=y+i+65535)-65536*(i=Math.floor(r/65536)),m=(r=m+i+65535)-65536*(i=Math.floor(r/65536)),w=(r=w+i+65535)-65536*(i=Math.floor(r/65536)),s+=i-1+37*(i-1),t[0]=s,t[1]=o,t[2]=a,t[3]=c,t[4]=h,t[5]=u,t[6]=l,t[7]=d,t[8]=p,t[9]=f,t[10]=g,t[11]=v,t[12]=b,t[13]=y,t[14]=m,t[15]=w}function z(t,e){B(t,e,e)}function H(t,n){var r,i=e();for(r=0;r<16;r++)i[r]=n[r];for(r=253;r>=0;r--)z(i,i),2!==r&&4!==r&&B(i,i,n);for(r=0;r<16;r++)t[r]=i[r]}function q(t,n){var r,i=e();for(r=0;r<16;r++)i[r]=n[r];for(r=250;r>=0;r--)z(i,i),1!==r&&B(i,i,n);for(r=0;r<16;r++)t[r]=i[r]}function F(t,n,r){var i,s,o=new Uint8Array(32),a=new Float64Array(80),h=e(),u=e(),l=e(),d=e(),p=e(),f=e();for(s=0;s<31;s++)o[s]=n[s];for(o[31]=127&n[31]|64,o[0]&=248,D(a,r),s=0;s<16;s++)u[s]=a[s],d[s]=h[s]=l[s]=0;for(h[0]=d[0]=1,s=254;s>=0;--s)U(h,u,i=o[s>>>3]>>>(7&s)&1),U(l,d,i),N(p,h,l),j(h,h,l),N(l,u,d),j(u,u,d),z(d,p),z(f,h),B(h,l,h),B(l,u,p),N(p,h,l),j(h,h,l),z(u,h),j(l,d,f),B(h,l,c),N(h,h,d),B(l,l,h),B(h,d,f),B(d,u,a),z(u,p),U(h,u,i),U(l,d,i);for(s=0;s<16;s++)a[s+16]=h[s],a[s+32]=l[s],a[s+48]=u[s],a[s+64]=d[s];var g=a.subarray(32),v=a.subarray(16);return H(g,g),B(v,v,g),R(t,v),0}function $(t,e){return F(t,e,s)}function X(t,e){return r(e,32),$(t,e)}function J(t,e,n){var r=new Uint8Array(32);return F(r,n,e),m(t,i,r,w)}T.prototype.blocks=function(t,e,n){for(var r,i,s,o,a,c,h,u,l,d,p,f,g,v,b,y,m,w,_,S=this.fin?0:2048,k=this.h[0],C=this.h[1],T=this.h[2],E=this.h[3],x=this.h[4],A=this.h[5],P=this.h[6],L=this.h[7],O=this.h[8],U=this.h[9],R=this.r[0],I=this.r[1],M=this.r[2],D=this.r[3],N=this.r[4],j=this.r[5],B=this.r[6],z=this.r[7],H=this.r[8],q=this.r[9];n>=16;)d=l=0,d+=(k+=8191&(r=255&t[e+0]|(255&t[e+1])<<8))*R,d+=(C+=8191&(r>>>13|(i=255&t[e+2]|(255&t[e+3])<<8)<<3))*(5*q),d+=(T+=8191&(i>>>10|(s=255&t[e+4]|(255&t[e+5])<<8)<<6))*(5*H),d+=(E+=8191&(s>>>7|(o=255&t[e+6]|(255&t[e+7])<<8)<<9))*(5*z),l=(d+=(x+=8191&(o>>>4|(a=255&t[e+8]|(255&t[e+9])<<8)<<12))*(5*B))>>>13,d&=8191,d+=(A+=a>>>1&8191)*(5*j),d+=(P+=8191&(a>>>14|(c=255&t[e+10]|(255&t[e+11])<<8)<<2))*(5*N),d+=(L+=8191&(c>>>11|(h=255&t[e+12]|(255&t[e+13])<<8)<<5))*(5*D),d+=(O+=8191&(h>>>8|(u=255&t[e+14]|(255&t[e+15])<<8)<<8))*(5*M),p=l+=(d+=(U+=u>>>5|S)*(5*I))>>>13,p+=k*I,p+=C*R,p+=T*(5*q),p+=E*(5*H),l=(p+=x*(5*z))>>>13,p&=8191,p+=A*(5*B),p+=P*(5*j),p+=L*(5*N),p+=O*(5*D),l+=(p+=U*(5*M))>>>13,p&=8191,f=l,f+=k*M,f+=C*I,f+=T*R,f+=E*(5*q),l=(f+=x*(5*H))>>>13,f&=8191,f+=A*(5*z),f+=P*(5*B),f+=L*(5*j),f+=O*(5*N),g=l+=(f+=U*(5*D))>>>13,g+=k*D,g+=C*M,g+=T*I,g+=E*R,l=(g+=x*(5*q))>>>13,g&=8191,g+=A*(5*H),g+=P*(5*z),g+=L*(5*B),g+=O*(5*j),v=l+=(g+=U*(5*N))>>>13,v+=k*N,v+=C*D,v+=T*M,v+=E*I,l=(v+=x*R)>>>13,v&=8191,v+=A*(5*q),v+=P*(5*H),v+=L*(5*z),v+=O*(5*B),b=l+=(v+=U*(5*j))>>>13,b+=k*j,b+=C*N,b+=T*D,b+=E*M,l=(b+=x*I)>>>13,b&=8191,b+=A*R,b+=P*(5*q),b+=L*(5*H),b+=O*(5*z),y=l+=(b+=U*(5*B))>>>13,y+=k*B,y+=C*j,y+=T*N,y+=E*D,l=(y+=x*M)>>>13,y&=8191,y+=A*I,y+=P*R,y+=L*(5*q),y+=O*(5*H),m=l+=(y+=U*(5*z))>>>13,m+=k*z,m+=C*B,m+=T*j,m+=E*N,l=(m+=x*D)>>>13,m&=8191,m+=A*M,m+=P*I,m+=L*R,m+=O*(5*q),w=l+=(m+=U*(5*H))>>>13,w+=k*H,w+=C*z,w+=T*B,w+=E*j,l=(w+=x*N)>>>13,w&=8191,w+=A*D,w+=P*M,w+=L*I,w+=O*R,_=l+=(w+=U*(5*q))>>>13,_+=k*q,_+=C*H,_+=T*z,_+=E*B,l=(_+=x*j)>>>13,_&=8191,_+=A*N,_+=P*D,_+=L*M,_+=O*I,k=d=8191&(l=(l=((l+=(_+=U*R)>>>13)<<2)+l|0)+(d&=8191)|0),C=p+=l>>>=13,T=f&=8191,E=g&=8191,x=v&=8191,A=b&=8191,P=y&=8191,L=m&=8191,O=w&=8191,U=_&=8191,e+=16,n-=16;this.h[0]=k,this.h[1]=C,this.h[2]=T,this.h[3]=E,this.h[4]=x,this.h[5]=A,this.h[6]=P,this.h[7]=L,this.h[8]=O,this.h[9]=U},T.prototype.finish=function(t,e){var n,r,i,s,o=new Uint16Array(10);if(this.leftover){for(s=this.leftover,this.buffer[s++]=1;s<16;s++)this.buffer[s]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,s=2;s<10;s++)this.h[s]+=n,n=this.h[s]>>>13,this.h[s]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,o[0]=this.h[0]+5,n=o[0]>>>13,o[0]&=8191,s=1;s<10;s++)o[s]=this.h[s]+n,n=o[s]>>>13,o[s]&=8191;for(o[9]-=8192,r=(1^n)-1,s=0;s<10;s++)o[s]&=r;for(r=~r,s=0;s<10;s++)this.h[s]=this.h[s]&r|o[s];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,s=1;s<8;s++)i=(this.h[s]+this.pad[s]|0)+(i>>>16)|0,this.h[s]=65535&i;t[e+0]=this.h[0]>>>0&255,t[e+1]=this.h[0]>>>8&255,t[e+2]=this.h[1]>>>0&255,t[e+3]=this.h[1]>>>8&255,t[e+4]=this.h[2]>>>0&255,t[e+5]=this.h[2]>>>8&255,t[e+6]=this.h[3]>>>0&255,t[e+7]=this.h[3]>>>8&255,t[e+8]=this.h[4]>>>0&255,t[e+9]=this.h[4]>>>8&255,t[e+10]=this.h[5]>>>0&255,t[e+11]=this.h[5]>>>8&255,t[e+12]=this.h[6]>>>0&255,t[e+13]=this.h[6]>>>8&255,t[e+14]=this.h[7]>>>0&255,t[e+15]=this.h[7]>>>8&255},T.prototype.update=function(t,e,n){var r,i;if(this.leftover){for((i=16-this.leftover)>n&&(i=n),r=0;r<i;r++)this.buffer[this.leftover+r]=t[e+r];if(n-=i,e+=i,this.leftover+=i,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(i=n-n%16,this.blocks(t,e,i),e+=i,n-=i),n){for(r=0;r<n;r++)this.buffer[this.leftover+r]=t[e+r];this.leftover+=n}};var Y=A,K=P,W=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function G(t,e,n,r){for(var i,s,o,a,c,h,u,l,d,p,f,g,v,b,y,m,w,_,S,k,C,T,E,x,A,P,L=new Int32Array(16),O=new Int32Array(16),U=t[0],R=t[1],I=t[2],M=t[3],D=t[4],N=t[5],j=t[6],B=t[7],z=e[0],H=e[1],q=e[2],F=e[3],$=e[4],X=e[5],J=e[6],Y=e[7],K=0;r>=128;){for(S=0;S<16;S++)k=8*S+K,L[S]=n[k+0]<<24|n[k+1]<<16|n[k+2]<<8|n[k+3],O[S]=n[k+4]<<24|n[k+5]<<16|n[k+6]<<8|n[k+7];for(S=0;S<80;S++)if(i=U,s=R,o=I,a=M,c=D,h=N,u=j,d=z,p=H,f=q,g=F,v=$,b=X,y=J,E=65535&(T=Y),x=T>>>16,A=65535&(C=B),P=C>>>16,E+=65535&(T=($>>>14|D<<18)^($>>>18|D<<14)^(D>>>9|$<<23)),x+=T>>>16,A+=65535&(C=(D>>>14|$<<18)^(D>>>18|$<<14)^($>>>9|D<<23)),P+=C>>>16,E+=65535&(T=$&X^~$&J),x+=T>>>16,A+=65535&(C=D&N^~D&j),P+=C>>>16,E+=65535&(T=W[2*S+1]),x+=T>>>16,A+=65535&(C=W[2*S]),P+=C>>>16,C=L[S%16],x+=(T=O[S%16])>>>16,A+=65535&C,P+=C>>>16,A+=(x+=(E+=65535&T)>>>16)>>>16,E=65535&(T=_=65535&E|x<<16),x=T>>>16,A=65535&(C=w=65535&A|(P+=A>>>16)<<16),P=C>>>16,E+=65535&(T=(z>>>28|U<<4)^(U>>>2|z<<30)^(U>>>7|z<<25)),x+=T>>>16,A+=65535&(C=(U>>>28|z<<4)^(z>>>2|U<<30)^(z>>>7|U<<25)),P+=C>>>16,x+=(T=z&H^z&q^H&q)>>>16,A+=65535&(C=U&R^U&I^R&I),P+=C>>>16,l=65535&(A+=(x+=(E+=65535&T)>>>16)>>>16)|(P+=A>>>16)<<16,m=65535&E|x<<16,E=65535&(T=g),x=T>>>16,A=65535&(C=a),P=C>>>16,x+=(T=_)>>>16,A+=65535&(C=w),P+=C>>>16,R=i,I=s,M=o,D=a=65535&(A+=(x+=(E+=65535&T)>>>16)>>>16)|(P+=A>>>16)<<16,N=c,j=h,B=u,U=l,H=d,q=p,F=f,$=g=65535&E|x<<16,X=v,J=b,Y=y,z=m,S%16==15)for(k=0;k<16;k++)C=L[k],E=65535&(T=O[k]),x=T>>>16,A=65535&C,P=C>>>16,C=L[(k+9)%16],E+=65535&(T=O[(k+9)%16]),x+=T>>>16,A+=65535&C,P+=C>>>16,w=L[(k+1)%16],E+=65535&(T=((_=O[(k+1)%16])>>>1|w<<31)^(_>>>8|w<<24)^(_>>>7|w<<25)),x+=T>>>16,A+=65535&(C=(w>>>1|_<<31)^(w>>>8|_<<24)^w>>>7),P+=C>>>16,w=L[(k+14)%16],x+=(T=((_=O[(k+14)%16])>>>19|w<<13)^(w>>>29|_<<3)^(_>>>6|w<<26))>>>16,A+=65535&(C=(w>>>19|_<<13)^(_>>>29|w<<3)^w>>>6),P+=C>>>16,P+=(A+=(x+=(E+=65535&T)>>>16)>>>16)>>>16,L[k]=65535&A|P<<16,O[k]=65535&E|x<<16;E=65535&(T=z),x=T>>>16,A=65535&(C=U),P=C>>>16,C=t[0],x+=(T=e[0])>>>16,A+=65535&C,P+=C>>>16,P+=(A+=(x+=(E+=65535&T)>>>16)>>>16)>>>16,t[0]=U=65535&A|P<<16,e[0]=z=65535&E|x<<16,E=65535&(T=H),x=T>>>16,A=65535&(C=R),P=C>>>16,C=t[1],x+=(T=e[1])>>>16,A+=65535&C,P+=C>>>16,P+=(A+=(x+=(E+=65535&T)>>>16)>>>16)>>>16,t[1]=R=65535&A|P<<16,e[1]=H=65535&E|x<<16,E=65535&(T=q),x=T>>>16,A=65535&(C=I),P=C>>>16,C=t[2],x+=(T=e[2])>>>16,A+=65535&C,P+=C>>>16,P+=(A+=(x+=(E+=65535&T)>>>16)>>>16)>>>16,t[2]=I=65535&A|P<<16,e[2]=q=65535&E|x<<16,E=65535&(T=F),x=T>>>16,A=65535&(C=M),P=C>>>16,C=t[3],x+=(T=e[3])>>>16,A+=65535&C,P+=C>>>16,P+=(A+=(x+=(E+=65535&T)>>>16)>>>16)>>>16,t[3]=M=65535&A|P<<16,e[3]=F=65535&E|x<<16,E=65535&(T=$),x=T>>>16,A=65535&(C=D),P=C>>>16,C=t[4],x+=(T=e[4])>>>16,A+=65535&C,P+=C>>>16,P+=(A+=(x+=(E+=65535&T)>>>16)>>>16)>>>16,t[4]=D=65535&A|P<<16,e[4]=$=65535&E|x<<16,E=65535&(T=X),x=T>>>16,A=65535&(C=N),P=C>>>16,C=t[5],x+=(T=e[5])>>>16,A+=65535&C,P+=C>>>16,P+=(A+=(x+=(E+=65535&T)>>>16)>>>16)>>>16,t[5]=N=65535&A|P<<16,e[5]=X=65535&E|x<<16,E=65535&(T=J),x=T>>>16,A=65535&(C=j),P=C>>>16,C=t[6],x+=(T=e[6])>>>16,A+=65535&C,P+=C>>>16,P+=(A+=(x+=(E+=65535&T)>>>16)>>>16)>>>16,t[6]=j=65535&A|P<<16,e[6]=J=65535&E|x<<16,E=65535&(T=Y),x=T>>>16,A=65535&(C=B),P=C>>>16,C=t[7],x+=(T=e[7])>>>16,A+=65535&C,P+=C>>>16,P+=(A+=(x+=(E+=65535&T)>>>16)>>>16)>>>16,t[7]=B=65535&A|P<<16,e[7]=Y=65535&E|x<<16,K+=128,r-=128}return r}function Z(t,e,n){var r,i=new Int32Array(8),s=new Int32Array(8),o=new Uint8Array(256),a=n;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,s[0]=4089235720,s[1]=2227873595,s[2]=4271175723,s[3]=1595750129,s[4]=2917565137,s[5]=725511199,s[6]=4215389547,s[7]=327033209,G(i,s,e,n),n%=128,r=0;r<n;r++)o[r]=e[a-n+r];for(o[n]=128,o[(n=256-128*(n<112?1:0))-9]=0,f(o,n-8,a/536870912|0,a<<3),G(i,s,o,n),r=0;r<8;r++)f(t,8*r,i[r],s[r]);return 0}function V(t,n){var r=e(),i=e(),s=e(),o=e(),a=e(),c=e(),h=e(),l=e(),d=e();j(r,t[1],t[0]),j(d,n[1],n[0]),B(r,r,d),N(i,t[0],t[1]),N(d,n[0],n[1]),B(i,i,d),B(s,t[3],n[3]),B(s,s,u),B(o,t[2],n[2]),N(o,o,o),j(a,i,r),j(c,o,s),N(h,o,s),N(l,i,r),B(t[0],a,c),B(t[1],l,h),B(t[2],h,c),B(t[3],a,l)}function Q(t,e,n){var r;for(r=0;r<4;r++)U(t[r],e[r],n)}function tt(t,n){var r=e(),i=e(),s=e();H(s,n[2]),B(r,n[0],s),B(i,n[1],s),R(t,i),t[31]^=M(r)<<7}function et(t,e,n){var r,i;for(L(t[0],o),L(t[1],a),L(t[2],a),L(t[3],o),i=255;i>=0;--i)Q(t,e,r=n[i/8|0]>>(7&i)&1),V(e,t),V(t,t),Q(t,e,r)}function nt(t,n){var r=[e(),e(),e(),e()];L(r[0],l),L(r[1],d),L(r[2],a),B(r[3],l,d),et(t,r,n)}function rt(t,n,i){var s,o=new Uint8Array(64),a=[e(),e(),e(),e()];for(i||r(n,32),Z(o,n,32),o[0]&=248,o[31]&=127,o[31]|=64,nt(a,o),tt(t,a),s=0;s<32;s++)n[s+32]=t[s];return 0}var it=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function st(t,e){var n,r,i,s;for(r=63;r>=32;--r){for(n=0,i=r-32,s=r-12;i<s;++i)e[i]+=n-16*e[r]*it[i-(r-32)],n=Math.floor((e[i]+128)/256),e[i]-=256*n;e[i]+=n,e[r]=0}for(n=0,i=0;i<32;i++)e[i]+=n-(e[31]>>4)*it[i],n=e[i]>>8,e[i]&=255;for(i=0;i<32;i++)e[i]-=n*it[i];for(r=0;r<32;r++)e[r+1]+=e[r]>>8,t[r]=255&e[r]}function ot(t){var e,n=new Float64Array(64);for(e=0;e<64;e++)n[e]=t[e];for(e=0;e<64;e++)t[e]=0;st(t,n)}function at(t,n,r,i){var s,o,a=new Uint8Array(64),c=new Uint8Array(64),h=new Uint8Array(64),u=new Float64Array(64),l=[e(),e(),e(),e()];Z(a,i,32),a[0]&=248,a[31]&=127,a[31]|=64;var d=r+64;for(s=0;s<r;s++)t[64+s]=n[s];for(s=0;s<32;s++)t[32+s]=a[32+s];for(Z(h,t.subarray(32),r+32),ot(h),nt(l,h),tt(t,l),s=32;s<64;s++)t[s]=i[s];for(Z(c,t,r+64),ot(c),s=0;s<64;s++)u[s]=0;for(s=0;s<32;s++)u[s]=h[s];for(s=0;s<32;s++)for(o=0;o<32;o++)u[s+o]+=c[s]*a[o];return st(t.subarray(32),u),d}function ct(t,n,r,i){var s,c=new Uint8Array(32),u=new Uint8Array(64),l=[e(),e(),e(),e()],d=[e(),e(),e(),e()];if(r<64)return-1;if(function(t,n){var r=e(),i=e(),s=e(),c=e(),u=e(),l=e(),d=e();return L(t[2],a),D(t[1],n),z(s,t[1]),B(c,s,h),j(s,s,t[2]),N(c,t[2],c),z(u,c),z(l,u),B(d,l,u),B(r,d,s),B(r,r,c),q(r,r),B(r,r,s),B(r,r,c),B(r,r,c),B(t[0],r,c),z(i,t[0]),B(i,i,c),I(i,s)&&B(t[0],t[0],p),z(i,t[0]),B(i,i,c),I(i,s)?-1:(M(t[0])===n[31]>>7&&j(t[0],o,t[0]),B(t[3],t[0],t[1]),0)}(d,i))return-1;for(s=0;s<r;s++)t[s]=n[s];for(s=0;s<32;s++)t[s+32]=i[s];if(Z(u,t,r),ot(u),et(l,d,u),nt(d,n.subarray(32)),V(l,d),tt(c,l),r-=64,b(n,0,c,0)){for(s=0;s<r;s++)t[s]=0;return-1}for(s=0;s<r;s++)t[s]=n[s+64];return r}var ht,ut=64,lt=32,dt=64;function pt(t,e){if(32!==t.length)throw new Error("bad key size");if(24!==e.length)throw new Error("bad nonce size")}function ft(){for(var t=0;t<arguments.length;t++)if(!(arguments[t]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function gt(t){for(var e=0;e<t.length;e++)t[e]=0}t.lowlevel={crypto_core_hsalsa20:m,crypto_stream_xor:C,crypto_stream:k,crypto_stream_salsa20_xor:_,crypto_stream_salsa20:S,crypto_onetimeauth:E,crypto_onetimeauth_verify:x,crypto_verify_16:v,crypto_verify_32:b,crypto_secretbox:A,crypto_secretbox_open:P,crypto_scalarmult:F,crypto_scalarmult_base:$,crypto_box_beforenm:J,crypto_box_afternm:Y,crypto_box:function(t,e,n,r,i,s){var o=new Uint8Array(32);return J(o,i,s),Y(t,e,n,r,o)},crypto_box_open:function(t,e,n,r,i,s){var o=new Uint8Array(32);return J(o,i,s),K(t,e,n,r,o)},crypto_box_keypair:X,crypto_hash:Z,crypto_sign:at,crypto_sign_keypair:rt,crypto_sign_open:ct,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:ut,crypto_sign_PUBLICKEYBYTES:lt,crypto_sign_SECRETKEYBYTES:dt,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:e,D:h,L:it,pack25519:R,unpack25519:D,M:B,A:N,S:z,Z:j,pow2523:q,add:V,set25519:L,modL:st,scalarmult:et,scalarbase:nt},t.randomBytes=function(t){var e=new Uint8Array(t);return r(e,t),e},t.secretbox=function(t,e,n){ft(t,e,n),pt(n,e);for(var r=new Uint8Array(32+t.length),i=new Uint8Array(r.length),s=0;s<t.length;s++)r[s+32]=t[s];return A(i,r,r.length,e,n),i.subarray(16)},t.secretbox.open=function(t,e,n){ft(t,e,n),pt(n,e);for(var r=new Uint8Array(16+t.length),i=new Uint8Array(r.length),s=0;s<t.length;s++)r[s+16]=t[s];return r.length<32||0!==P(i,r,r.length,e,n)?null:i.subarray(32)},t.secretbox.keyLength=32,t.secretbox.nonceLength=24,t.secretbox.overheadLength=16,t.scalarMult=function(t,e){if(ft(t,e),32!==t.length)throw new Error("bad n size");if(32!==e.length)throw new Error("bad p size");var n=new Uint8Array(32);return F(n,t,e),n},t.scalarMult.base=function(t){if(ft(t),32!==t.length)throw new Error("bad n size");var e=new Uint8Array(32);return $(e,t),e},t.scalarMult.scalarLength=32,t.scalarMult.groupElementLength=32,t.box=function(e,n,r,i){var s=t.box.before(r,i);return t.secretbox(e,n,s)},t.box.before=function(t,e){ft(t,e),function(t,e){if(32!==t.length)throw new Error("bad public key size");if(32!==e.length)throw new Error("bad secret key size")}(t,e);var n=new Uint8Array(32);return J(n,t,e),n},t.box.after=t.secretbox,t.box.open=function(e,n,r,i){var s=t.box.before(r,i);return t.secretbox.open(e,n,s)},t.box.open.after=t.secretbox.open,t.box.keyPair=function(){var t=new Uint8Array(32),e=new Uint8Array(32);return X(t,e),{publicKey:t,secretKey:e}},t.box.keyPair.fromSecretKey=function(t){if(ft(t),32!==t.length)throw new Error("bad secret key size");var e=new Uint8Array(32);return $(e,t),{publicKey:e,secretKey:new Uint8Array(t)}},t.box.publicKeyLength=32,t.box.secretKeyLength=32,t.box.sharedKeyLength=32,t.box.nonceLength=24,t.box.overheadLength=t.secretbox.overheadLength,t.sign=function(t,e){if(ft(t,e),e.length!==dt)throw new Error("bad secret key size");var n=new Uint8Array(ut+t.length);return at(n,t,t.length,e),n},t.sign.open=function(t,e){if(ft(t,e),e.length!==lt)throw new Error("bad public key size");var n=new Uint8Array(t.length),r=ct(n,t,t.length,e);if(r<0)return null;for(var i=new Uint8Array(r),s=0;s<i.length;s++)i[s]=n[s];return i},t.sign.detached=function(e,n){for(var r=t.sign(e,n),i=new Uint8Array(ut),s=0;s<i.length;s++)i[s]=r[s];return i},t.sign.detached.verify=function(t,e,n){if(ft(t,e,n),e.length!==ut)throw new Error("bad signature size");if(n.length!==lt)throw new Error("bad public key size");var r,i=new Uint8Array(ut+t.length),s=new Uint8Array(ut+t.length);for(r=0;r<ut;r++)i[r]=e[r];for(r=0;r<t.length;r++)i[r+ut]=t[r];return ct(s,i,i.length,n)>=0},t.sign.keyPair=function(){var t=new Uint8Array(lt),e=new Uint8Array(dt);return rt(t,e),{publicKey:t,secretKey:e}},t.sign.keyPair.fromSecretKey=function(t){if(ft(t),t.length!==dt)throw new Error("bad secret key size");for(var e=new Uint8Array(lt),n=0;n<e.length;n++)e[n]=t[32+n];return{publicKey:e,secretKey:new Uint8Array(t)}},t.sign.keyPair.fromSeed=function(t){if(ft(t),32!==t.length)throw new Error("bad seed size");for(var e=new Uint8Array(lt),n=new Uint8Array(dt),r=0;r<32;r++)n[r]=t[r];return rt(e,n,!0),{publicKey:e,secretKey:n}},t.sign.publicKeyLength=lt,t.sign.secretKeyLength=dt,t.sign.seedLength=32,t.sign.signatureLength=ut,t.hash=function(t){ft(t);var e=new Uint8Array(64);return Z(e,t,t.length),e},t.hash.hashLength=64,t.verify=function(t,e){return ft(t,e),0!==t.length&&0!==e.length&&t.length===e.length&&0===g(t,0,e,0,t.length)},t.setPRNG=function(t){r=t},(ht="undefined"!=typeof self?self.crypto||self.msCrypto:null)&&ht.getRandomValues?t.setPRNG(function(t,e){var n,r=new Uint8Array(e);for(n=0;n<e;n+=65536)ht.getRandomValues(r.subarray(n,n+Math.min(e-n,65536)));for(n=0;n<e;n++)t[n]=r[n];gt(r)}):(ht=n(281))&&ht.randomBytes&&t.setPRNG(function(t,e){var n,r=ht.randomBytes(e);for(n=0;n<e;n++)t[n]=r[n];gt(r)})}(t.exports?t.exports:self.nacl=self.nacl||{})},42(t,e,n){t.exports=n(499).default},499(t,e,n){"use strict";n.d(e,{default:()=>Ge});class r{constructor(t,e){this.lastId=0,this.prefix=t,this.name=e}create(t){this.lastId++;var e=this.lastId,n=this.prefix+e,r=this.name+"["+e+"]",i=!1,s=function(){i||(t.apply(null,arguments),i=!0)};return this[e]=s,{number:e,id:n,name:r,callback:s}}remove(t){delete this[t.number]}}var i=new r("_pusher_script_","Pusher.ScriptReceivers");const s="8.5.0",o=7,a=80,c=443,h="",u="sockjs.pusher.com",l=80,d=443,p="/pusher",f="stats.pusher.com",g="/pusher/auth",v="ajax",b=12e4,y=3e4,m=1e4,w={endpoint:"/pusher/user-auth",transport:"ajax"},_={endpoint:"/pusher/auth",transport:"ajax"},S="http://js.pusher.com",k="https://js.pusher.com",C="";var T=new r("_pusher_dependencies","Pusher.DependenciesReceivers"),E=new class{constructor(t){this.options=t,this.receivers=t.receivers||i,this.loading={}}load(t,e,n){var r=this;if(r.loading[t]&&r.loading[t].length>0)r.loading[t].push(n);else{r.loading[t]=[n];var i=Ee.createScriptRequest(r.getPath(t,e)),s=r.receivers.create(function(e){if(r.receivers.remove(s),r.loading[t]){var n=r.loading[t];delete r.loading[t];for(var o=function(t){t||i.cleanup()},a=0;a<n.length;a++)n[a](e,o)}});i.send(s)}}getRoot(t){var e=Ee.getDocument().location.protocol;return(t&&t.useTLS||"https:"===e?this.options.cdn_https:this.options.cdn_http).replace(/\/*$/,"")+"/"+this.options.version}getPath(t,e){return this.getRoot(e)+"/"+t+this.options.suffix+".js"}}({cdn_http:S,cdn_https:k,version:s,suffix:C,receivers:T});const x={baseUrl:"https://pusher.com",urls:{authenticationEndpoint:{path:"/docs/channels/server_api/authenticating_users"},authorizationEndpoint:{path:"/docs/channels/server_api/authorizing-users/"},javascriptQuickStart:{path:"/docs/javascript_quick_start"},triggeringClientEvents:{path:"/docs/client_api_guide/client_events#trigger-events"},encryptedChannelSupport:{fullUrl:"https://github.com/pusher/pusher-js/tree/cc491015371a4bde5743d1c87a0fbac0feb53195#encrypted-channel-support"}}},A=function(t){const e=x.urls[t];if(!e)return"";let n;return e.fullUrl?n=e.fullUrl:e.path&&(n=x.baseUrl+e.path),n?`See: ${n}`:""};var P;!function(t){t.UserAuthentication="user-authentication",t.ChannelAuthorization="channel-authorization"}(P||(P={}));class L extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class O extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class U extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class R extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class I extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class M extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class D extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class N extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class j extends Error{constructor(t,e){super(e),this.status=t,Object.setPrototypeOf(this,new.target.prototype)}}const B=function(t,e,n,r,i){const s=Ee.createXHR();for(var o in s.open("POST",n.endpoint,!0),s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),n.headers)s.setRequestHeader(o,n.headers[o]);if(null!=n.headersProvider){let t=n.headersProvider();for(var o in t)s.setRequestHeader(o,t[o])}return s.onreadystatechange=function(){if(4===s.readyState)if(200===s.status){let t,e=!1;try{t=JSON.parse(s.responseText),e=!0}catch(t){i(new j(200,`JSON returned from ${r.toString()} endpoint was invalid, yet status code was 200. Data was: ${s.responseText}`),null)}e&&i(null,t)}else{let t="";switch(r){case P.UserAuthentication:t=A("authenticationEndpoint");break;case P.ChannelAuthorization:t=`Clients must be authorized to join private or presence channels. ${A("authorizationEndpoint")}`}i(new j(s.status,`Unable to retrieve auth string from ${r.toString()} endpoint - received status: ${s.status} from ${n.endpoint}. ${t}`),null)}},s.send(e),s};for(var z=String.fromCharCode,H="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",q={},F=0;F<64;F++)q[H.charAt(F)]=F;var $=function(t){var e=t.charCodeAt(0);return e<128?t:e<2048?z(192|e>>>6)+z(128|63&e):z(224|e>>>12&15)+z(128|e>>>6&63)+z(128|63&e)},X=function(t){var e=[0,2,1][t.length%3],n=t.charCodeAt(0)<<16|(t.length>1?t.charCodeAt(1):0)<<8|(t.length>2?t.charCodeAt(2):0);return[H.charAt(n>>>18),H.charAt(n>>>12&63),e>=2?"=":H.charAt(n>>>6&63),e>=1?"=":H.charAt(63&n)].join("")},J=window.btoa||function(t){return t.replace(/[\s\S]{1,3}/g,X)};const Y=class{constructor(t,e,n,r){this.clear=e,this.timer=t(()=>{this.timer&&(this.timer=r(this.timer))},n)}isRunning(){return null!==this.timer}ensureAborted(){this.timer&&(this.clear(this.timer),this.timer=null)}};function K(t){window.clearTimeout(t)}function W(t){window.clearInterval(t)}class G extends Y{constructor(t,e){super(setTimeout,K,t,function(t){return e(),null})}}class Z extends Y{constructor(t,e){super(setInterval,W,t,function(t){return e(),t})}}var V={now:()=>Date.now?Date.now():(new Date).valueOf(),defer:t=>new G(0,t),method(t,...e){var n=Array.prototype.slice.call(arguments,1);return function(e){return e[t].apply(e,n.concat(arguments))}}};const Q=V;function tt(t,...e){for(var n=0;n<e.length;n++){var r=e[n];for(var i in r)r[i]&&r[i].constructor&&r[i].constructor===Object?t[i]=tt(t[i]||{},r[i]):t[i]=r[i]}return t}function et(){for(var t=["Pusher"],e=0;e<arguments.length;e++)"string"==typeof arguments[e]?t.push(arguments[e]):t.push(lt(arguments[e]));return t.join(" : ")}function nt(t,e){var n=Array.prototype.indexOf;if(null===t)return-1;if(n&&t.indexOf===n)return t.indexOf(e);for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}function rt(t,e){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(t[n],n,t)}function it(t){var e=[];return rt(t,function(t,n){e.push(n)}),e}function st(t,e,n){for(var r=0;r<t.length;r++)e.call(n||window,t[r],r,t)}function ot(t,e){for(var n=[],r=0;r<t.length;r++)n.push(e(t[r],r,t,n));return n}function at(t,e){e=e||function(t){return!!t};for(var n=[],r=0;r<t.length;r++)e(t[r],r,t,n)&&n.push(t[r]);return n}function ct(t,e){var n={};return rt(t,function(r,i){(e&&e(r,i,t,n)||Boolean(r))&&(n[i]=r)}),n}function ht(t,e){for(var n=0;n<t.length;n++)if(e(t[n],n,t))return!0;return!1}function ut(t){return e=function(t){return"object"==typeof t&&(t=lt(t)),encodeURIComponent((e=t.toString(),J(e.replace(/[^\x00-\x7F]/g,$))));var e},n={},rt(t,function(t,r){n[r]=e(t)}),n;var e,n}function lt(t){try{return JSON.stringify(t)}catch(r){return JSON.stringify((e=[],n=[],function t(r,i){var s,o,a;switch(typeof r){case"object":if(!r)return null;for(s=0;s<e.length;s+=1)if(e[s]===r)return{$ref:n[s]};if(e.push(r),n.push(i),"[object Array]"===Object.prototype.toString.apply(r))for(a=[],s=0;s<r.length;s+=1)a[s]=t(r[s],i+"["+s+"]");else for(o in a={},r)Object.prototype.hasOwnProperty.call(r,o)&&(a[o]=t(r[o],i+"["+JSON.stringify(o)+"]"));return a;case"number":case"string":case"boolean":return r}}(t,"$")))}var e,n}const dt=new class{constructor(){this.globalLog=t=>{window.console&&window.console.log&&window.console.log(t)}}debug(...t){this.log(this.globalLog,t)}warn(...t){this.log(this.globalLogWarn,t)}error(...t){this.log(this.globalLogError,t)}globalLogWarn(t){window.console&&window.console.warn?window.console.warn(t):this.globalLog(t)}globalLogError(t){window.console&&window.console.error?window.console.error(t):this.globalLogWarn(t)}log(t,...e){var n=et.apply(this,arguments);Ke.log?Ke.log(n):Ke.logToConsole&&t.bind(this)(n)}},pt=function(t,e,n,r,i){void 0===n.headers&&null==n.headersProvider||dt.warn(`To send headers with the ${r.toString()} request, you must use AJAX, rather than JSONP.`);var s=t.nextAuthCallbackID.toString();t.nextAuthCallbackID++;var o=t.getDocument(),a=o.createElement("script");t.auth_callbacks[s]=function(t){i(null,t)};var c="Pusher.auth_callbacks['"+s+"']";a.src=n.endpoint+"?callback="+encodeURIComponent(c)+"&"+e;var h=o.getElementsByTagName("head")[0]||o.documentElement;h.insertBefore(a,h.firstChild)};class ft{constructor(t){this.src=t}send(t){var e=this,n="Error loading "+e.src;e.script=document.createElement("script"),e.script.id=t.id,e.script.src=e.src,e.script.type="text/javascript",e.script.charset="UTF-8",e.script.addEventListener?(e.script.onerror=function(){t.callback(n)},e.script.onload=function(){t.callback(null)}):e.script.onreadystatechange=function(){"loaded"!==e.script.readyState&&"complete"!==e.script.readyState||t.callback(null)},void 0===e.script.async&&document.attachEvent&&/opera/i.test(navigator.userAgent)?(e.errorScript=document.createElement("script"),e.errorScript.id=t.id+"_error",e.errorScript.text=t.name+"('"+n+"');",e.script.async=e.errorScript.async=!1):e.script.async=!0;var r=document.getElementsByTagName("head")[0];r.insertBefore(e.script,r.firstChild),e.errorScript&&r.insertBefore(e.errorScript,e.script.nextSibling)}cleanup(){this.script&&(this.script.onload=this.script.onerror=null,this.script.onreadystatechange=null),this.script&&this.script.parentNode&&this.script.parentNode.removeChild(this.script),this.errorScript&&this.errorScript.parentNode&&this.errorScript.parentNode.removeChild(this.errorScript),this.script=null,this.errorScript=null}}class gt{constructor(t,e){this.url=t,this.data=e}send(t){if(!this.request){var e=(r=this.data,ot((i=ut(ct(r,function(t){return void 0!==t})),s=[],rt(i,function(t,e){s.push([e,t])}),s),Q.method("join","=")).join("&")),n=this.url+"/"+t.number+"?"+e;this.request=Ee.createScriptRequest(n),this.request.send(t)}var r,i,s}cleanup(){this.request&&this.request.cleanup()}}const vt={name:"jsonp",getAgent:function(t,e){return function(n,r){var s="http"+(e?"s":"")+"://"+(t.host||t.options.host)+t.options.path,o=Ee.createJSONPRequest(s,n),a=Ee.ScriptReceivers.create(function(e,n){i.remove(a),o.cleanup(),n&&n.host&&(t.host=n.host),r&&r(e,n)});o.send(a)}}};function bt(t,e,n){return t+(e.useTLS?"s":"")+"://"+(e.useTLS?e.hostTLS:e.hostNonTLS)+n}function yt(t,e){return"/app/"+t+"?protocol="+o+"&client=js&version="+s+(e?"&"+e:"")}var mt={getInitial:function(t,e){return bt("ws",e,(e.httpPath||"")+yt(t,"flash=false"))}},wt={getInitial:function(t,e){return bt("http",e,(e.httpPath||"/pusher")+yt(t))}},_t={getInitial:function(t,e){return bt("http",e,e.httpPath||"/pusher")},getPath:function(t,e){return yt(t)}};class St{constructor(){this._callbacks={}}get(t){return this._callbacks[kt(t)]}add(t,e,n){var r=kt(t);this._callbacks[r]=this._callbacks[r]||[],this._callbacks[r].push({fn:e,context:n})}remove(t,e,n){if(t||e||n){var r=t?[kt(t)]:it(this._callbacks);e||n?this.removeCallback(r,e,n):this.removeAllCallbacks(r)}else this._callbacks={}}removeCallback(t,e,n){st(t,function(t){this._callbacks[t]=at(this._callbacks[t]||[],function(t){return e&&e!==t.fn||n&&n!==t.context}),0===this._callbacks[t].length&&delete this._callbacks[t]},this)}removeAllCallbacks(t){st(t,function(t){delete this._callbacks[t]},this)}}function kt(t){return"_"+t}class Ct{constructor(t){this.callbacks=new St,this.global_callbacks=[],this.failThrough=t}bind(t,e,n){return this.callbacks.add(t,e,n),this}bind_global(t){return this.global_callbacks.push(t),this}unbind(t,e,n){return this.callbacks.remove(t,e,n),this}unbind_global(t){return t?(this.global_callbacks=at(this.global_callbacks||[],e=>e!==t),this):(this.global_callbacks=[],this)}unbind_all(){return this.unbind(),this.unbind_global(),this}emit(t,e,n){for(var r=0;r<this.global_callbacks.length;r++)this.global_callbacks[r](t,e);var i=this.callbacks.get(t),s=[];if(n?s.push(e,n):e&&s.push(e),i&&i.length>0)for(r=0;r<i.length;r++)i[r].fn.apply(i[r].context||window,s);else this.failThrough&&this.failThrough(t,e);return this}}class Tt extends Ct{constructor(t,e,n,r,i){super(),this.initialize=Ee.transportConnectionInitializer,this.hooks=t,this.name=e,this.priority=n,this.key=r,this.options=i,this.state="new",this.timeline=i.timeline,this.activityTimeout=i.activityTimeout,this.id=this.timeline.generateUniqueID()}handlesActivityChecks(){return Boolean(this.hooks.handlesActivityChecks)}supportsPing(){return Boolean(this.hooks.supportsPing)}connect(){if(this.socket||"initialized"!==this.state)return!1;var t=this.hooks.urls.getInitial(this.key,this.options);try{this.socket=this.hooks.getSocket(t,this.options)}catch(t){return Q.defer(()=>{this.onError(t),this.changeState("closed")}),!1}return this.bindListeners(),dt.debug("Connecting",{transport:this.name,url:t}),this.changeState("connecting"),!0}close(){return!!this.socket&&(this.socket.close(),!0)}send(t){return"open"===this.state&&(Q.defer(()=>{this.socket&&this.socket.send(t)}),!0)}ping(){"open"===this.state&&this.supportsPing()&&this.socket.ping()}onOpen(){this.hooks.beforeOpen&&this.hooks.beforeOpen(this.socket,this.hooks.urls.getPath(this.key,this.options)),this.changeState("open"),this.socket.onopen=void 0}onError(t){this.emit("error",{type:"WebSocketError",error:t}),this.timeline.error(this.buildTimelineMessage({error:t.toString()}))}onClose(t){t?this.changeState("closed",{code:t.code,reason:t.reason,wasClean:t.wasClean}):this.changeState("closed"),this.unbindListeners(),this.socket=void 0}onMessage(t){this.emit("message",t)}onActivity(){this.emit("activity")}bindListeners(){this.socket.onopen=()=