@voicenter-team/events-sdk 0.0.39 → 0.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/voicenter-events-sdk.cjs.js +28 -29
- package/dist/voicenter-events-sdk.cjs.js.map +1 -1
- package/dist/voicenter-events-sdk.d.ts +184 -50
- package/dist/voicenter-events-sdk.es.js +6289 -6098
- package/dist/voicenter-events-sdk.es.js.map +1 -1
- package/dist/voicenter-events-sdk.iife.js +28 -29
- package/dist/voicenter-events-sdk.iife.js.map +1 -1
- package/dist/voicenter-events-sdk.umd.js +28 -29
- package/dist/voicenter-events-sdk.umd.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,46 +1,45 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var xv=Object.defineProperty;var Ov=(a,i,n)=>i in a?xv(a,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):a[i]=n;var wt=(a,i,n)=>(Ov(a,typeof i!="symbol"?i+"":i,n),n);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var jn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Rv(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var Ou={exports:{}},Ru={exports:{}};(function(){var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i={rotl:function(n,s){return n<<s|n>>>32-s},rotr:function(n,s){return n<<32-s|n>>>s},endian:function(n){if(n.constructor==Number)return i.rotl(n,8)&16711935|i.rotl(n,24)&4278255360;for(var s=0;s<n.length;s++)n[s]=i.endian(n[s]);return n},randomBytes:function(n){for(var s=[];n>0;n--)s.push(Math.floor(Math.random()*256));return s},bytesToWords:function(n){for(var s=[],u=0,h=0;u<n.length;u++,h+=8)s[h>>>5]|=n[u]<<24-h%32;return s},wordsToBytes:function(n){for(var s=[],u=0;u<n.length*32;u+=8)s.push(n[u>>>5]>>>24-u%32&255);return s},bytesToHex:function(n){for(var s=[],u=0;u<n.length;u++)s.push((n[u]>>>4).toString(16)),s.push((n[u]&15).toString(16));return s.join("")},hexToBytes:function(n){for(var s=[],u=0;u<n.length;u+=2)s.push(parseInt(n.substr(u,2),16));return s},bytesToBase64:function(n){for(var s=[],u=0;u<n.length;u+=3)for(var h=n[u]<<16|n[u+1]<<8|n[u+2],m=0;m<4;m++)u*8+m*6<=n.length*8?s.push(a.charAt(h>>>6*(3-m)&63)):s.push("=");return s.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/ig,"");for(var s=[],u=0,h=0;u<n.length;h=++u%4)h!=0&&s.push((a.indexOf(n.charAt(u-1))&Math.pow(2,-2*h+8)-1)<<h*2|a.indexOf(n.charAt(u))>>>6-h*2);return s}};Ru.exports=i})();var Iv=Ru.exports,ks={utf8:{stringToBytes:function(a){return ks.bin.stringToBytes(unescape(encodeURIComponent(a)))},bytesToString:function(a){return decodeURIComponent(escape(ks.bin.bytesToString(a)))}},bin:{stringToBytes:function(a){for(var i=[],n=0;n<a.length;n++)i.push(a.charCodeAt(n)&255);return i},bytesToString:function(a){for(var i=[],n=0;n<a.length;n++)i.push(String.fromCharCode(a[n]));return i.join("")}}},gu=ks;/*!
|
|
2
2
|
* Determine if an object is a Buffer
|
|
3
3
|
*
|
|
4
4
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
5
5
|
* @license MIT
|
|
6
|
-
*/var Sv=function(r){return r!=null&&(su(r)||kv(r)||!!r._isBuffer)};function su(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function kv(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&su(r.slice(0,0))}(function(){var r=Cv,o=Kc.utf8,n=Sv,s=Kc.bin,c=function(f,v){f.constructor==String?v&&v.encoding==="binary"?f=s.stringToBytes(f):f=o.stringToBytes(f):n(f)?f=Array.prototype.slice.call(f,0):!Array.isArray(f)&&f.constructor!==Uint8Array&&(f=f.toString());for(var d=r.bytesToWords(f),b=f.length*8,p=1732584193,_=-271733879,g=-1732584194,l=271733878,u=0;u<d.length;u++)d[u]=(d[u]<<8|d[u]>>>24)&16711935|(d[u]<<24|d[u]>>>8)&4278255360;d[b>>>5]|=128<<b%32,d[(b+64>>>9<<4)+14]=b;for(var w=c._ff,A=c._gg,k=c._hh,L=c._ii,u=0;u<d.length;u+=16){var Y=p,J=_,N=g,U=l;p=w(p,_,g,l,d[u+0],7,-680876936),l=w(l,p,_,g,d[u+1],12,-389564586),g=w(g,l,p,_,d[u+2],17,606105819),_=w(_,g,l,p,d[u+3],22,-1044525330),p=w(p,_,g,l,d[u+4],7,-176418897),l=w(l,p,_,g,d[u+5],12,1200080426),g=w(g,l,p,_,d[u+6],17,-1473231341),_=w(_,g,l,p,d[u+7],22,-45705983),p=w(p,_,g,l,d[u+8],7,1770035416),l=w(l,p,_,g,d[u+9],12,-1958414417),g=w(g,l,p,_,d[u+10],17,-42063),_=w(_,g,l,p,d[u+11],22,-1990404162),p=w(p,_,g,l,d[u+12],7,1804603682),l=w(l,p,_,g,d[u+13],12,-40341101),g=w(g,l,p,_,d[u+14],17,-1502002290),_=w(_,g,l,p,d[u+15],22,1236535329),p=A(p,_,g,l,d[u+1],5,-165796510),l=A(l,p,_,g,d[u+6],9,-1069501632),g=A(g,l,p,_,d[u+11],14,643717713),_=A(_,g,l,p,d[u+0],20,-373897302),p=A(p,_,g,l,d[u+5],5,-701558691),l=A(l,p,_,g,d[u+10],9,38016083),g=A(g,l,p,_,d[u+15],14,-660478335),_=A(_,g,l,p,d[u+4],20,-405537848),p=A(p,_,g,l,d[u+9],5,568446438),l=A(l,p,_,g,d[u+14],9,-1019803690),g=A(g,l,p,_,d[u+3],14,-187363961),_=A(_,g,l,p,d[u+8],20,1163531501),p=A(p,_,g,l,d[u+13],5,-1444681467),l=A(l,p,_,g,d[u+2],9,-51403784),g=A(g,l,p,_,d[u+7],14,1735328473),_=A(_,g,l,p,d[u+12],20,-1926607734),p=k(p,_,g,l,d[u+5],4,-378558),l=k(l,p,_,g,d[u+8],11,-2022574463),g=k(g,l,p,_,d[u+11],16,1839030562),_=k(_,g,l,p,d[u+14],23,-35309556),p=k(p,_,g,l,d[u+1],4,-1530992060),l=k(l,p,_,g,d[u+4],11,1272893353),g=k(g,l,p,_,d[u+7],16,-155497632),_=k(_,g,l,p,d[u+10],23,-1094730640),p=k(p,_,g,l,d[u+13],4,681279174),l=k(l,p,_,g,d[u+0],11,-358537222),g=k(g,l,p,_,d[u+3],16,-722521979),_=k(_,g,l,p,d[u+6],23,76029189),p=k(p,_,g,l,d[u+9],4,-640364487),l=k(l,p,_,g,d[u+12],11,-421815835),g=k(g,l,p,_,d[u+15],16,530742520),_=k(_,g,l,p,d[u+2],23,-995338651),p=L(p,_,g,l,d[u+0],6,-198630844),l=L(l,p,_,g,d[u+7],10,1126891415),g=L(g,l,p,_,d[u+14],15,-1416354905),_=L(_,g,l,p,d[u+5],21,-57434055),p=L(p,_,g,l,d[u+12],6,1700485571),l=L(l,p,_,g,d[u+3],10,-1894986606),g=L(g,l,p,_,d[u+10],15,-1051523),_=L(_,g,l,p,d[u+1],21,-2054922799),p=L(p,_,g,l,d[u+8],6,1873313359),l=L(l,p,_,g,d[u+15],10,-30611744),g=L(g,l,p,_,d[u+6],15,-1560198380),_=L(_,g,l,p,d[u+13],21,1309151649),p=L(p,_,g,l,d[u+4],6,-145523070),l=L(l,p,_,g,d[u+11],10,-1120210379),g=L(g,l,p,_,d[u+2],15,718787259),_=L(_,g,l,p,d[u+9],21,-343485551),p=p+Y>>>0,_=_+J>>>0,g=g+N>>>0,l=l+U>>>0}return r.endian([p,_,g,l])};c._ff=function(f,v,d,b,p,_,g){var l=f+(v&d|~v&b)+(p>>>0)+g;return(l<<_|l>>>32-_)+v},c._gg=function(f,v,d,b,p,_,g){var l=f+(v&b|d&~b)+(p>>>0)+g;return(l<<_|l>>>32-_)+v},c._hh=function(f,v,d,b,p,_,g){var l=f+(v^d^b)+(p>>>0)+g;return(l<<_|l>>>32-_)+v},c._ii=function(f,v,d,b,p,_,g){var l=f+(d^(v|~b))+(p>>>0)+g;return(l<<_|l>>>32-_)+v},c._blocksize=16,c._digestsize=16,iu.exports=function(f,v){if(f==null)throw new Error("Illegal argument "+f);var d=r.wordsToBytes(c(f,v));return v&&v.asBytes?d:v&&v.asString?s.bytesToString(d):r.bytesToHex(d)}})();var Av=iu.exports;const xv=bv(Av);var wn=(r=>(r.MAIN="main",r.NEXT="next",r))(wn||{}),Je=(r=>(r.USER="User",r.TOKEN="Token",r))(Je||{});class lr{static async getSessionStorageDataByKey(o,n=!0){if(typeof chrome<"u"&&typeof chrome.storage<"u"){const s=await chrome.storage.session.get(o);if(s[o])return n?JSON.parse(s[o]):s[o]}if(typeof window<"u"){const s=window.sessionStorage.getItem(o);if(s)return n?JSON.parse(s):s}}static async updateSessionStorageKey(o,n){typeof chrome<"u"&&typeof chrome.storage<"u"&&await chrome.storage.session.set({[o]:JSON.stringify(n)}),typeof window<"u"&&window.sessionStorage.setItem(o,JSON.stringify(n))}static clearSessionStorage(){typeof chrome<"u"&&typeof chrome.storage<"u"&&chrome.storage.session.clear(),typeof window<"u"&&window.sessionStorage.clear()}}var Yt=(r=>(r.INFO="INFO",r.WARN="WARN",r.ERROR="ERROR",r))(Yt||{});class Ev{constructor(o){St(this,"delay",1e3);St(this,"lastLoginTimestamp");St(this,"token");St(this,"storageKey");this.eventsSdkClass=o,this.eventsSdkClass=o,this.storageKey=""}async login(o){const n={token:o.token,email:o.email,password:o.password};if(this.storageKey=xv(JSON.stringify({...o,loggerSocketConnection:null})),this.lastLoginTimestamp&&this.lastLoginTimestamp+this.delay>new Date().getTime())return;this.updateLastLoginTimestamp(),await this.checkLoginStatus(this.storageKey)||(lr.clearSessionStorage(),await this.userLoginFunction(n,this.storageKey,o.loginType))}updateLastLoginTimestamp(){this.lastLoginTimestamp=new Date().getTime()}async checkLoginStatus(o){const n=await lr.getSessionStorageDataByKey(o);return n?(this.eventsSdkClass.loggerClass.log(Yt.INFO,"got data from session",n),this.onLoginResponse(n),!0):!1}async userLoginFunction(o,n,s){let c,f,v;this.eventsSdkClass.options.isNewStack?(c=await this.externalLogin(this.eventsSdkClass.options.loginUrl,o,s),f=await this.getSettings(c.Data.AccessToken),v={...c.Data,...f}):(c=await this.externalLogin(this.eventsSdkClass.options.loginUrl,o,s),v={...c.Data.Socket}),this.onLoginResponse(v),await lr.updateSessionStorageKey(n,v)}onLoginResponse(o){if(!this.eventsSdkClass.options.isNewStack&&this.eventsSdkClass.options.servers&&(this.eventsSdkClass.servers=[...this.eventsSdkClass.options.servers],this.eventsSdkClass.server=this.eventsSdkClass.servers.reduce((n,s)=>n.Priority>s.Priority?n:s)),this.eventsSdkClass.options.isNewStack&&this.eventsSdkClass.options.servers&&(this.eventsSdkClass.servers=[...this.eventsSdkClass.options.servers],this.eventsSdkClass.server=this.eventsSdkClass.servers.reduce((n,s)=>n.Priority>s.Priority?n:s)),o.MonitorList&&o.MonitorList.length&&(this.eventsSdkClass.servers=[...o.MonitorList],this.eventsSdkClass.server=this.eventsSdkClass.servers.reduce((n,s)=>n.Priority>s.Priority?n:s)),!this.eventsSdkClass.options.isNewStack&&!this.eventsSdkClass.servers.length&&o.URLList&&(this.eventsSdkClass.URLList=o.URLList),!this.eventsSdkClass.options.isNewStack&&!this.eventsSdkClass.URLList.length&&!this.eventsSdkClass.servers.length)throw new Error("Socket servers not defined");if(this.eventsSdkClass.options.isNewStack&&!this.eventsSdkClass.servers.length)throw new Error("Socket servers not defined");this.eventsSdkClass.server&&this.eventsSdkClass.socketIoClass.getSocketIoFunction(`v=${this.eventsSdkClass.server.Version}`),!this.eventsSdkClass.server&&this.eventsSdkClass.URLList.length&&this.eventsSdkClass.socketIoClass.getSocketIoFunction(`v=${o.Client}`),o.IdentityCode&&(this.token=o.IdentityCode,this.eventsSdkClass.connect(wn.MAIN)),o.Token&&(this.token=o.Token,this.eventsSdkClass.connect(wn.MAIN)),o.RefreshToken&&o.IdentityCodeExpiry&&this.eventsSdkClass.options.loginType===Je.USER&&(this.eventsSdkClass.options.refreshToken=o.RefreshToken,this.eventsSdkClass.options.tokenExpiry=o.IdentityCodeExpiry,this.handleTokenExpiry()),o.RefreshToken&&o.TokenExpiry&&this.eventsSdkClass.options.loginType===Je.USER&&(this.eventsSdkClass.options.refreshToken=o.RefreshToken,this.eventsSdkClass.options.tokenExpiry=o.TokenExpiry,this.handleTokenExpiry())}handleTokenExpiry(){if(!this.eventsSdkClass.options.refreshTokenUrl)throw new Error("refreshTokenUrl not provided");let o;if(this.eventsSdkClass.options.tokenExpiry)o=new Date(this.eventsSdkClass.options.tokenExpiry);else return;const n=o.getTime()-new Date().getTime()-5e3,s=Math.min(n,2147483647);setTimeout(async()=>{if(this.eventsSdkClass.options.refreshToken){this.eventsSdkClass.socketIoClass.closeAllConnections();let c,f;if(this.eventsSdkClass.options.isNewStack){const v=await this.refreshToken(this.eventsSdkClass.options.refreshTokenUrl,this.eventsSdkClass.options.refreshToken);c=await this.getSettings(v.Data.AccessToken),f={...v.Data,...c}}else f={...(await this.refreshToken(this.eventsSdkClass.options.refreshTokenUrl,this.eventsSdkClass.options.refreshToken)).Data.Socket};this.onLoginResponse(f),await lr.updateSessionStorageKey(this.storageKey,f)}},s)}async externalLogin(o,{password:n,token:s,email:c},f){if(!o)throw new Error("loginUrl not provided");let v;this.eventsSdkClass.options.isNewStack?f===Je.TOKEN?v=JSON.stringify({identityType:Je.TOKEN,token:s}):v=JSON.stringify({identityType:Je.USER,username:c,password:n}):this.eventsSdkClass.options.loginType===Je.TOKEN?(v=JSON.stringify({token:s}),o=`${o}/${Je.TOKEN}`):(v=JSON.stringify({email:c,pin:n}),o=`${o}/${Je.USER}`);try{const d=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:v});if(!d.ok&&d.status===400)throw new Error("Bad body request. Login type or isNewStack values not correct or not provided");if(!d.ok&&d.status===401)throw new Error("Unauthorized. Invalid token provided");if(!d.ok&&d.status===403)throw new Error("Forbidden. Identity token not provided or not valid");const b=await d.json();if(b.error)throw new Error(b.error);return b}catch(d){throw this.eventsSdkClass.loggerClass.log(Yt.ERROR,`External login ${o}`,d),d}}async getSettings(o){try{if(!this.eventsSdkClass.options.getSettingsUrl)throw new Error("getSettingsUrl not provided");const n=await fetch(this.eventsSdkClass.options.getSettingsUrl,{headers:{Authorization:`Bearer ${o}`}});if(!n.ok&&n.status===401)throw new Error("Unauthorized. Access token not provided or not valid");return n.json()}catch(n){throw this.eventsSdkClass.loggerClass.log(Yt.ERROR,`Get settings ${this.eventsSdkClass.options.getSettingsUrl}`,n),n}}async refreshToken(o,n){try{return(await fetch(o,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${n}`}})).json()}catch(s){throw this.eventsSdkClass.loggerClass.log(Yt.ERROR,`Refresh token ${o}`,s),s}}}var fi={exports:{}};/**
|
|
6
|
+
*/var Lv=function(a){return a!=null&&(Iu(a)||Nv(a)||!!a._isBuffer)};function Iu(a){return!!a.constructor&&typeof a.constructor.isBuffer=="function"&&a.constructor.isBuffer(a)}function Nv(a){return typeof a.readFloatLE=="function"&&typeof a.slice=="function"&&Iu(a.slice(0,0))}(function(){var a=Iv,i=gu.utf8,n=Lv,s=gu.bin,u=function(h,m){h.constructor==String?m&&m.encoding==="binary"?h=s.stringToBytes(h):h=i.stringToBytes(h):n(h)?h=Array.prototype.slice.call(h,0):!Array.isArray(h)&&h.constructor!==Uint8Array&&(h=h.toString());for(var g=a.bytesToWords(h),S=h.length*8,v=1732584193,_=-271733879,y=-1732584194,l=271733878,f=0;f<g.length;f++)g[f]=(g[f]<<8|g[f]>>>24)&16711935|(g[f]<<24|g[f]>>>8)&4278255360;g[S>>>5]|=128<<S%32,g[(S+64>>>9<<4)+14]=S;for(var b=u._ff,E=u._gg,x=u._hh,W=u._ii,f=0;f<g.length;f+=16){var st=v,V=_,ot=y,$=l;v=b(v,_,y,l,g[f+0],7,-680876936),l=b(l,v,_,y,g[f+1],12,-389564586),y=b(y,l,v,_,g[f+2],17,606105819),_=b(_,y,l,v,g[f+3],22,-1044525330),v=b(v,_,y,l,g[f+4],7,-176418897),l=b(l,v,_,y,g[f+5],12,1200080426),y=b(y,l,v,_,g[f+6],17,-1473231341),_=b(_,y,l,v,g[f+7],22,-45705983),v=b(v,_,y,l,g[f+8],7,1770035416),l=b(l,v,_,y,g[f+9],12,-1958414417),y=b(y,l,v,_,g[f+10],17,-42063),_=b(_,y,l,v,g[f+11],22,-1990404162),v=b(v,_,y,l,g[f+12],7,1804603682),l=b(l,v,_,y,g[f+13],12,-40341101),y=b(y,l,v,_,g[f+14],17,-1502002290),_=b(_,y,l,v,g[f+15],22,1236535329),v=E(v,_,y,l,g[f+1],5,-165796510),l=E(l,v,_,y,g[f+6],9,-1069501632),y=E(y,l,v,_,g[f+11],14,643717713),_=E(_,y,l,v,g[f+0],20,-373897302),v=E(v,_,y,l,g[f+5],5,-701558691),l=E(l,v,_,y,g[f+10],9,38016083),y=E(y,l,v,_,g[f+15],14,-660478335),_=E(_,y,l,v,g[f+4],20,-405537848),v=E(v,_,y,l,g[f+9],5,568446438),l=E(l,v,_,y,g[f+14],9,-1019803690),y=E(y,l,v,_,g[f+3],14,-187363961),_=E(_,y,l,v,g[f+8],20,1163531501),v=E(v,_,y,l,g[f+13],5,-1444681467),l=E(l,v,_,y,g[f+2],9,-51403784),y=E(y,l,v,_,g[f+7],14,1735328473),_=E(_,y,l,v,g[f+12],20,-1926607734),v=x(v,_,y,l,g[f+5],4,-378558),l=x(l,v,_,y,g[f+8],11,-2022574463),y=x(y,l,v,_,g[f+11],16,1839030562),_=x(_,y,l,v,g[f+14],23,-35309556),v=x(v,_,y,l,g[f+1],4,-1530992060),l=x(l,v,_,y,g[f+4],11,1272893353),y=x(y,l,v,_,g[f+7],16,-155497632),_=x(_,y,l,v,g[f+10],23,-1094730640),v=x(v,_,y,l,g[f+13],4,681279174),l=x(l,v,_,y,g[f+0],11,-358537222),y=x(y,l,v,_,g[f+3],16,-722521979),_=x(_,y,l,v,g[f+6],23,76029189),v=x(v,_,y,l,g[f+9],4,-640364487),l=x(l,v,_,y,g[f+12],11,-421815835),y=x(y,l,v,_,g[f+15],16,530742520),_=x(_,y,l,v,g[f+2],23,-995338651),v=W(v,_,y,l,g[f+0],6,-198630844),l=W(l,v,_,y,g[f+7],10,1126891415),y=W(y,l,v,_,g[f+14],15,-1416354905),_=W(_,y,l,v,g[f+5],21,-57434055),v=W(v,_,y,l,g[f+12],6,1700485571),l=W(l,v,_,y,g[f+3],10,-1894986606),y=W(y,l,v,_,g[f+10],15,-1051523),_=W(_,y,l,v,g[f+1],21,-2054922799),v=W(v,_,y,l,g[f+8],6,1873313359),l=W(l,v,_,y,g[f+15],10,-30611744),y=W(y,l,v,_,g[f+6],15,-1560198380),_=W(_,y,l,v,g[f+13],21,1309151649),v=W(v,_,y,l,g[f+4],6,-145523070),l=W(l,v,_,y,g[f+11],10,-1120210379),y=W(y,l,v,_,g[f+2],15,718787259),_=W(_,y,l,v,g[f+9],21,-343485551),v=v+st>>>0,_=_+V>>>0,y=y+ot>>>0,l=l+$>>>0}return a.endian([v,_,y,l])};u._ff=function(h,m,g,S,v,_,y){var l=h+(m&g|~m&S)+(v>>>0)+y;return(l<<_|l>>>32-_)+m},u._gg=function(h,m,g,S,v,_,y){var l=h+(m&S|g&~S)+(v>>>0)+y;return(l<<_|l>>>32-_)+m},u._hh=function(h,m,g,S,v,_,y){var l=h+(m^g^S)+(v>>>0)+y;return(l<<_|l>>>32-_)+m},u._ii=function(h,m,g,S,v,_,y){var l=h+(g^(m|~S))+(v>>>0)+y;return(l<<_|l>>>32-_)+m},u._blocksize=16,u._digestsize=16,Ou.exports=function(h,m){if(h==null)throw new Error("Illegal argument "+h);var g=a.wordsToBytes(u(h,m));return m&&m.asBytes?g:m&&m.asString?s.bytesToString(g):a.bytesToHex(g)}})();var Bv=Ou.exports;const Uv=Rv(Bv);var pn=(a=>(a.MAIN="main",a.NEXT="next",a))(pn||{}),ze=(a=>(a.USER="User",a.TOKEN="Token",a))(ze||{});class Qn{static async getSessionStorageDataByKey(i,n=!0){if(typeof chrome<"u"&&typeof chrome.storage<"u"){const s=await chrome.storage.session.get(i);if(s[i])return n?JSON.parse(s[i]):s[i]}if(typeof window<"u"){const s=window.sessionStorage.getItem(i);if(s)return n?JSON.parse(s):s}}static async updateSessionStorageKey(i,n){typeof chrome<"u"&&typeof chrome.storage<"u"&&await chrome.storage.session.set({[i]:JSON.stringify(n)}),typeof window<"u"&&window.sessionStorage.setItem(i,JSON.stringify(n))}static clearSessionStorage(){typeof chrome<"u"&&typeof chrome.storage<"u"&&chrome.storage.session.clear(),typeof window<"u"&&window.sessionStorage.clear()}}var Jt=(a=>(a.INFO="INFO",a.WARN="WARN",a.ERROR="ERROR",a))(Jt||{});class Dv{constructor(i){wt(this,"delay",1e3);wt(this,"lastLoginTimestamp");wt(this,"token");wt(this,"storageKey");this.eventsSdkClass=i,this.eventsSdkClass=i,this.storageKey=""}async login(i){const n={token:i.token,email:i.email,password:i.password};if(this.storageKey=Uv(JSON.stringify({...i,loggerSocketConnection:null})),this.lastLoginTimestamp&&this.lastLoginTimestamp+this.delay>new Date().getTime())return;this.updateLastLoginTimestamp(),await this.checkLoginStatus(this.storageKey)||(Qn.clearSessionStorage(),await this.userLoginFunction(n,this.storageKey,i.loginType))}updateLastLoginTimestamp(){this.lastLoginTimestamp=new Date().getTime()}async checkLoginStatus(i){const n=await Qn.getSessionStorageDataByKey(i);return n?(this.eventsSdkClass.loggerClass.log(Jt.INFO,"got data from session",n),this.onLoginResponse(n),!0):!1}async userLoginFunction(i,n,s){let u,h,m;this.eventsSdkClass.options.isNewStack?(u=await this.externalLogin(this.eventsSdkClass.options.loginUrl,i,s),h=await this.getSettings(u.Data.AccessToken),m={...u.Data,...h}):(u=await this.externalLogin(this.eventsSdkClass.options.loginUrl,i,s),m={...u.Data.Socket}),this.onLoginResponse(m),await Qn.updateSessionStorageKey(n,m)}onLoginResponse(i){if(!this.eventsSdkClass.options.isNewStack&&this.eventsSdkClass.options.servers&&(this.eventsSdkClass.servers=[...this.eventsSdkClass.options.servers],this.eventsSdkClass.server=this.eventsSdkClass.servers.reduce((n,s)=>n.Priority>s.Priority?n:s)),this.eventsSdkClass.options.isNewStack&&this.eventsSdkClass.options.servers&&(this.eventsSdkClass.servers=[...this.eventsSdkClass.options.servers],this.eventsSdkClass.server=this.eventsSdkClass.servers.reduce((n,s)=>n.Priority>s.Priority?n:s)),i.MonitorList&&i.MonitorList.length&&(this.eventsSdkClass.servers=[...i.MonitorList],this.eventsSdkClass.server=this.eventsSdkClass.servers.reduce((n,s)=>n.Priority>s.Priority?n:s)),!this.eventsSdkClass.options.isNewStack&&!this.eventsSdkClass.servers.length&&i.URLList&&(this.eventsSdkClass.URLList=i.URLList),!this.eventsSdkClass.options.isNewStack&&!this.eventsSdkClass.URLList.length&&!this.eventsSdkClass.servers.length)throw new Error("Socket servers not defined");if(this.eventsSdkClass.options.isNewStack&&!this.eventsSdkClass.servers.length)throw new Error("Socket servers not defined");this.eventsSdkClass.server&&this.eventsSdkClass.socketIoClass.getSocketIoFunction(`v=${this.eventsSdkClass.server.Version}`),!this.eventsSdkClass.server&&this.eventsSdkClass.URLList.length&&this.eventsSdkClass.socketIoClass.getSocketIoFunction(`v=${i.Client}`),i.IdentityCode&&(this.token=i.IdentityCode,this.eventsSdkClass.connect(pn.MAIN)),i.Token&&(this.token=i.Token,this.eventsSdkClass.connect(pn.MAIN)),i.RefreshToken&&i.IdentityCodeExpiry&&this.eventsSdkClass.options.loginType===ze.USER&&(this.eventsSdkClass.options.refreshToken=i.RefreshToken,this.eventsSdkClass.options.tokenExpiry=i.IdentityCodeExpiry,this.handleTokenExpiry()),i.RefreshToken&&i.TokenExpiry&&this.eventsSdkClass.options.loginType===ze.USER&&(this.eventsSdkClass.options.refreshToken=i.RefreshToken,this.eventsSdkClass.options.tokenExpiry=i.TokenExpiry,this.handleTokenExpiry())}handleTokenExpiry(){if(!this.eventsSdkClass.options.refreshTokenUrl)throw new Error("refreshTokenUrl not provided");let i;if(this.eventsSdkClass.options.tokenExpiry)i=new Date(this.eventsSdkClass.options.tokenExpiry);else return;const n=i.getTime()-new Date().getTime()-5e3,s=Math.min(n,2147483647);setTimeout(async()=>{if(this.eventsSdkClass.options.refreshToken){this.eventsSdkClass.socketIoClass.closeAllConnections();let u,h;if(this.eventsSdkClass.options.isNewStack){const m=await this.refreshToken(this.eventsSdkClass.options.refreshTokenUrl,this.eventsSdkClass.options.refreshToken);u=await this.getSettings(m.Data.AccessToken),h={...m.Data,...u}}else h={...(await this.refreshToken(this.eventsSdkClass.options.refreshTokenUrl,this.eventsSdkClass.options.refreshToken)).Data.Socket};this.onLoginResponse(h),await Qn.updateSessionStorageKey(this.storageKey,h)}},s)}async externalLogin(i,{password:n,token:s,email:u},h){if(!i)throw new Error("loginUrl not provided");let m;this.eventsSdkClass.options.isNewStack?h===ze.TOKEN?m=JSON.stringify({identityType:ze.TOKEN,token:s}):m=JSON.stringify({identityType:ze.USER,username:u,password:n}):this.eventsSdkClass.options.loginType===ze.TOKEN?(m=JSON.stringify({token:s}),i=`${i}/${ze.TOKEN}`):(m=JSON.stringify({email:u,pin:n}),i=`${i}/${ze.USER}`);try{const g=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:m});if(!g.ok&&g.status===400)throw new Error("Bad body request. Login type or isNewStack values not correct or not provided");if(!g.ok&&g.status===401)throw new Error("Unauthorized. Invalid token provided");if(!g.ok&&g.status===403)throw new Error("Forbidden. Identity token not provided or not valid");const S=await g.json();if(S.error)throw new Error(S.error);return S}catch(g){throw this.eventsSdkClass.loggerClass.log(Jt.ERROR,`External login ${i}`,g),g}}async getSettings(i){try{if(!this.eventsSdkClass.options.getSettingsUrl)throw new Error("getSettingsUrl not provided");const n=await fetch(this.eventsSdkClass.options.getSettingsUrl,{headers:{Authorization:`Bearer ${i}`}});if(!n.ok&&n.status===401)throw new Error("Unauthorized. Access token not provided or not valid");return n.json()}catch(n){throw this.eventsSdkClass.loggerClass.log(Jt.ERROR,`Get settings ${this.eventsSdkClass.options.getSettingsUrl}`,n),n}}async refreshToken(i,n){try{return(await fetch(i,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${n}`}})).json()}catch(s){throw this.eventsSdkClass.loggerClass.log(Jt.ERROR,`Refresh token ${i}`,s),s}}}var Zr={exports:{}};/**
|
|
7
7
|
* @license
|
|
8
8
|
* Lodash <https://lodash.com/>
|
|
9
9
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
10
10
|
* Released under MIT license <https://lodash.com/license>
|
|
11
11
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
12
12
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
13
|
-
*/fi.exports;(function(r,o){(function(){var n,s="4.17.21",c=200,f="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",v="Expected a function",d="Invalid `variable` option passed into `_.template`",b="__lodash_hash_undefined__",p=500,_="__lodash_placeholder__",g=1,l=2,u=4,w=1,A=2,k=1,L=2,Y=4,J=8,N=16,U=32,T=64,I=128,P=256,R=512,B=30,H="...",z=800,G=16,F=1,pt=2,ct=3,xt=1/0,ut=9007199254740991,Gt=17976931348623157e292,Ie=NaN,ce=4294967295,vr=ce-1,$=ce>>>1,Q=[["ary",I],["bind",k],["bindKey",L],["curry",J],["curryRight",N],["flip",R],["partial",U],["partialRight",T],["rearg",P]],X="[object Arguments]",rt="[object Array]",K="[object AsyncFunction]",et="[object Boolean]",nt="[object Date]",Z="[object DOMException]",at="[object Error]",kt="[object Function]",$t="[object GeneratorFunction]",It="[object Map]",Ae="[object Number]",Gn="[object Null]",ue="[object Object]",Cn="[object Promise]",$n="[object Proxy]",Zt="[object RegExp]",Qt="[object Set]",Ne="[object String]",Be="[object Symbol]",Jn="[object Undefined]",Fe="[object WeakMap]",jn="[object WeakSet]",Ye="[object ArrayBuffer]",Sn="[object DataView]",_i="[object Float32Array]",wi="[object Float64Array]",bi="[object Int8Array]",Ci="[object Int16Array]",Si="[object Int32Array]",ki="[object Uint8Array]",Ai="[object Uint8ClampedArray]",xi="[object Uint16Array]",Ei="[object Uint32Array]",Mu=/\b__p \+= '';/g,qu=/\b(__p \+=) '' \+/g,Wu=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ds=/&(?:amp|lt|gt|quot|#39);/g,gs=/[&<>"']/g,Hu=RegExp(ds.source),Ku=RegExp(gs.source),zu=/<%-([\s\S]+?)%>/g,Xu=/<%([\s\S]+?)%>/g,ys=/<%=([\s\S]+?)%>/g,Gu=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$u=/^\w*$/,Ju=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ti=/[\\^$.*+?()[\]{}|]/g,ju=RegExp(Ti.source),Ri=/^\s+/,Yu=/\s/,Vu=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Zu=/\{\n\/\* \[wrapped with (.+)\] \*/,Qu=/,? & /,tf=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ef=/[()=,{}\[\]\/\s]/,nf=/\\(\\)?/g,rf=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,vs=/\w*$/,of=/^[-+]0x[0-9a-f]+$/i,sf=/^0b[01]+$/i,af=/^\[object .+?Constructor\]$/,cf=/^0o[0-7]+$/i,uf=/^(?:0|[1-9]\d*)$/,ff=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,mr=/($^)/,hf=/['\n\r\u2028\u2029\\]/g,_r="\\ud800-\\udfff",lf="\\u0300-\\u036f",pf="\\ufe20-\\ufe2f",df="\\u20d0-\\u20ff",ms=lf+pf+df,_s="\\u2700-\\u27bf",ws="a-z\\xdf-\\xf6\\xf8-\\xff",gf="\\xac\\xb1\\xd7\\xf7",yf="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",vf="\\u2000-\\u206f",mf=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",bs="A-Z\\xc0-\\xd6\\xd8-\\xde",Cs="\\ufe0e\\ufe0f",Ss=gf+yf+vf+mf,Oi="['’]",_f="["+_r+"]",ks="["+Ss+"]",wr="["+ms+"]",As="\\d+",wf="["+_s+"]",xs="["+ws+"]",Es="[^"+_r+Ss+As+_s+ws+bs+"]",Ii="\\ud83c[\\udffb-\\udfff]",bf="(?:"+wr+"|"+Ii+")",Ts="[^"+_r+"]",Ni="(?:\\ud83c[\\udde6-\\uddff]){2}",Bi="[\\ud800-\\udbff][\\udc00-\\udfff]",kn="["+bs+"]",Rs="\\u200d",Os="(?:"+xs+"|"+Es+")",Cf="(?:"+kn+"|"+Es+")",Is="(?:"+Oi+"(?:d|ll|m|re|s|t|ve))?",Ns="(?:"+Oi+"(?:D|LL|M|RE|S|T|VE))?",Bs=bf+"?",Ls="["+Cs+"]?",Sf="(?:"+Rs+"(?:"+[Ts,Ni,Bi].join("|")+")"+Ls+Bs+")*",kf="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Af="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Us=Ls+Bs+Sf,xf="(?:"+[wf,Ni,Bi].join("|")+")"+Us,Ef="(?:"+[Ts+wr+"?",wr,Ni,Bi,_f].join("|")+")",Tf=RegExp(Oi,"g"),Rf=RegExp(wr,"g"),Li=RegExp(Ii+"(?="+Ii+")|"+Ef+Us,"g"),Of=RegExp([kn+"?"+xs+"+"+Is+"(?="+[ks,kn,"$"].join("|")+")",Cf+"+"+Ns+"(?="+[ks,kn+Os,"$"].join("|")+")",kn+"?"+Os+"+"+Is,kn+"+"+Ns,Af,kf,As,xf].join("|"),"g"),If=RegExp("["+Rs+_r+ms+Cs+"]"),Nf=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Bf=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Lf=-1,Ot={};Ot[_i]=Ot[wi]=Ot[bi]=Ot[Ci]=Ot[Si]=Ot[ki]=Ot[Ai]=Ot[xi]=Ot[Ei]=!0,Ot[X]=Ot[rt]=Ot[Ye]=Ot[et]=Ot[Sn]=Ot[nt]=Ot[at]=Ot[kt]=Ot[It]=Ot[Ae]=Ot[ue]=Ot[Zt]=Ot[Qt]=Ot[Ne]=Ot[Fe]=!1;var Rt={};Rt[X]=Rt[rt]=Rt[Ye]=Rt[Sn]=Rt[et]=Rt[nt]=Rt[_i]=Rt[wi]=Rt[bi]=Rt[Ci]=Rt[Si]=Rt[It]=Rt[Ae]=Rt[ue]=Rt[Zt]=Rt[Qt]=Rt[Ne]=Rt[Be]=Rt[ki]=Rt[Ai]=Rt[xi]=Rt[Ei]=!0,Rt[at]=Rt[kt]=Rt[Fe]=!1;var Uf={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Df={"&":"&","<":"<",">":">",'"':""","'":"'"},Pf={"&":"&","<":"<",">":">",""":'"',"'":"'"},Ff={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Mf=parseFloat,qf=parseInt,Ds=typeof hr=="object"&&hr&&hr.Object===Object&&hr,Wf=typeof self=="object"&&self&&self.Object===Object&&self,Kt=Ds||Wf||Function("return this")(),Ui=o&&!o.nodeType&&o,hn=Ui&&!0&&r&&!r.nodeType&&r,Ps=hn&&hn.exports===Ui,Di=Ps&&Ds.process,ye=function(){try{var x=hn&&hn.require&&hn.require("util").types;return x||Di&&Di.binding&&Di.binding("util")}catch{}}(),Fs=ye&&ye.isArrayBuffer,Ms=ye&&ye.isDate,qs=ye&&ye.isMap,Ws=ye&&ye.isRegExp,Hs=ye&&ye.isSet,Ks=ye&&ye.isTypedArray;function fe(x,D,O){switch(O.length){case 0:return x.call(D);case 1:return x.call(D,O[0]);case 2:return x.call(D,O[0],O[1]);case 3:return x.call(D,O[0],O[1],O[2])}return x.apply(D,O)}function Hf(x,D,O,V){for(var ft=-1,Ct=x==null?0:x.length;++ft<Ct;){var Ft=x[ft];D(V,Ft,O(Ft),x)}return V}function ve(x,D){for(var O=-1,V=x==null?0:x.length;++O<V&&D(x[O],O,x)!==!1;);return x}function Kf(x,D){for(var O=x==null?0:x.length;O--&&D(x[O],O,x)!==!1;);return x}function zs(x,D){for(var O=-1,V=x==null?0:x.length;++O<V;)if(!D(x[O],O,x))return!1;return!0}function Ve(x,D){for(var O=-1,V=x==null?0:x.length,ft=0,Ct=[];++O<V;){var Ft=x[O];D(Ft,O,x)&&(Ct[ft++]=Ft)}return Ct}function br(x,D){var O=x==null?0:x.length;return!!O&&An(x,D,0)>-1}function Pi(x,D,O){for(var V=-1,ft=x==null?0:x.length;++V<ft;)if(O(D,x[V]))return!0;return!1}function Nt(x,D){for(var O=-1,V=x==null?0:x.length,ft=Array(V);++O<V;)ft[O]=D(x[O],O,x);return ft}function Ze(x,D){for(var O=-1,V=D.length,ft=x.length;++O<V;)x[ft+O]=D[O];return x}function Fi(x,D,O,V){var ft=-1,Ct=x==null?0:x.length;for(V&&Ct&&(O=x[++ft]);++ft<Ct;)O=D(O,x[ft],ft,x);return O}function zf(x,D,O,V){var ft=x==null?0:x.length;for(V&&ft&&(O=x[--ft]);ft--;)O=D(O,x[ft],ft,x);return O}function Mi(x,D){for(var O=-1,V=x==null?0:x.length;++O<V;)if(D(x[O],O,x))return!0;return!1}var Xf=qi("length");function Gf(x){return x.split("")}function $f(x){return x.match(tf)||[]}function Xs(x,D,O){var V;return O(x,function(ft,Ct,Ft){if(D(ft,Ct,Ft))return V=Ct,!1}),V}function Cr(x,D,O,V){for(var ft=x.length,Ct=O+(V?1:-1);V?Ct--:++Ct<ft;)if(D(x[Ct],Ct,x))return Ct;return-1}function An(x,D,O){return D===D?oh(x,D,O):Cr(x,Gs,O)}function Jf(x,D,O,V){for(var ft=O-1,Ct=x.length;++ft<Ct;)if(V(x[ft],D))return ft;return-1}function Gs(x){return x!==x}function $s(x,D){var O=x==null?0:x.length;return O?Hi(x,D)/O:Ie}function qi(x){return function(D){return D==null?n:D[x]}}function Wi(x){return function(D){return x==null?n:x[D]}}function Js(x,D,O,V,ft){return ft(x,function(Ct,Ft,Tt){O=V?(V=!1,Ct):D(O,Ct,Ft,Tt)}),O}function jf(x,D){var O=x.length;for(x.sort(D);O--;)x[O]=x[O].value;return x}function Hi(x,D){for(var O,V=-1,ft=x.length;++V<ft;){var Ct=D(x[V]);Ct!==n&&(O=O===n?Ct:O+Ct)}return O}function Ki(x,D){for(var O=-1,V=Array(x);++O<x;)V[O]=D(O);return V}function Yf(x,D){return Nt(D,function(O){return[O,x[O]]})}function js(x){return x&&x.slice(0,Qs(x)+1).replace(Ri,"")}function he(x){return function(D){return x(D)}}function zi(x,D){return Nt(D,function(O){return x[O]})}function Yn(x,D){return x.has(D)}function Ys(x,D){for(var O=-1,V=x.length;++O<V&&An(D,x[O],0)>-1;);return O}function Vs(x,D){for(var O=x.length;O--&&An(D,x[O],0)>-1;);return O}function Vf(x,D){for(var O=x.length,V=0;O--;)x[O]===D&&++V;return V}var Zf=Wi(Uf),Qf=Wi(Df);function th(x){return"\\"+Ff[x]}function eh(x,D){return x==null?n:x[D]}function xn(x){return If.test(x)}function nh(x){return Nf.test(x)}function rh(x){for(var D,O=[];!(D=x.next()).done;)O.push(D.value);return O}function Xi(x){var D=-1,O=Array(x.size);return x.forEach(function(V,ft){O[++D]=[ft,V]}),O}function Zs(x,D){return function(O){return x(D(O))}}function Qe(x,D){for(var O=-1,V=x.length,ft=0,Ct=[];++O<V;){var Ft=x[O];(Ft===D||Ft===_)&&(x[O]=_,Ct[ft++]=O)}return Ct}function Sr(x){var D=-1,O=Array(x.size);return x.forEach(function(V){O[++D]=V}),O}function ih(x){var D=-1,O=Array(x.size);return x.forEach(function(V){O[++D]=[V,V]}),O}function oh(x,D,O){for(var V=O-1,ft=x.length;++V<ft;)if(x[V]===D)return V;return-1}function sh(x,D,O){for(var V=O+1;V--;)if(x[V]===D)return V;return V}function En(x){return xn(x)?ch(x):Xf(x)}function xe(x){return xn(x)?uh(x):Gf(x)}function Qs(x){for(var D=x.length;D--&&Yu.test(x.charAt(D)););return D}var ah=Wi(Pf);function ch(x){for(var D=Li.lastIndex=0;Li.test(x);)++D;return D}function uh(x){return x.match(Li)||[]}function fh(x){return x.match(Of)||[]}var hh=function x(D){D=D==null?Kt:Tn.defaults(Kt.Object(),D,Tn.pick(Kt,Bf));var O=D.Array,V=D.Date,ft=D.Error,Ct=D.Function,Ft=D.Math,Tt=D.Object,Gi=D.RegExp,lh=D.String,me=D.TypeError,kr=O.prototype,ph=Ct.prototype,Rn=Tt.prototype,Ar=D["__core-js_shared__"],xr=ph.toString,Et=Rn.hasOwnProperty,dh=0,ta=function(){var t=/[^.]+$/.exec(Ar&&Ar.keys&&Ar.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Er=Rn.toString,gh=xr.call(Tt),yh=Kt._,vh=Gi("^"+xr.call(Et).replace(Ti,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Tr=Ps?D.Buffer:n,tn=D.Symbol,Rr=D.Uint8Array,ea=Tr?Tr.allocUnsafe:n,Or=Zs(Tt.getPrototypeOf,Tt),na=Tt.create,ra=Rn.propertyIsEnumerable,Ir=kr.splice,ia=tn?tn.isConcatSpreadable:n,Vn=tn?tn.iterator:n,ln=tn?tn.toStringTag:n,Nr=function(){try{var t=vn(Tt,"defineProperty");return t({},"",{}),t}catch{}}(),mh=D.clearTimeout!==Kt.clearTimeout&&D.clearTimeout,_h=V&&V.now!==Kt.Date.now&&V.now,wh=D.setTimeout!==Kt.setTimeout&&D.setTimeout,Br=Ft.ceil,Lr=Ft.floor,$i=Tt.getOwnPropertySymbols,bh=Tr?Tr.isBuffer:n,oa=D.isFinite,Ch=kr.join,Sh=Zs(Tt.keys,Tt),Mt=Ft.max,Jt=Ft.min,kh=V.now,Ah=D.parseInt,sa=Ft.random,xh=kr.reverse,Ji=vn(D,"DataView"),Zn=vn(D,"Map"),ji=vn(D,"Promise"),On=vn(D,"Set"),Qn=vn(D,"WeakMap"),tr=vn(Tt,"create"),Ur=Qn&&new Qn,In={},Eh=mn(Ji),Th=mn(Zn),Rh=mn(ji),Oh=mn(On),Ih=mn(Qn),Dr=tn?tn.prototype:n,er=Dr?Dr.valueOf:n,aa=Dr?Dr.toString:n;function y(t){if(Lt(t)&&!ht(t)&&!(t instanceof mt)){if(t instanceof _e)return t;if(Et.call(t,"__wrapped__"))return cc(t)}return new _e(t)}var Nn=function(){function t(){}return function(e){if(!Bt(e))return{};if(na)return na(e);t.prototype=e;var i=new t;return t.prototype=n,i}}();function Pr(){}function _e(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=n}y.templateSettings={escape:zu,evaluate:Xu,interpolate:ys,variable:"",imports:{_:y}},y.prototype=Pr.prototype,y.prototype.constructor=y,_e.prototype=Nn(Pr.prototype),_e.prototype.constructor=_e;function mt(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ce,this.__views__=[]}function Nh(){var t=new mt(this.__wrapped__);return t.__actions__=re(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=re(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=re(this.__views__),t}function Bh(){if(this.__filtered__){var t=new mt(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function Lh(){var t=this.__wrapped__.value(),e=this.__dir__,i=ht(t),a=e<0,h=i?t.length:0,m=Gl(0,h,this.__views__),C=m.start,S=m.end,E=S-C,M=a?S:C-1,q=this.__iteratees__,W=q.length,j=0,tt=Jt(E,this.__takeCount__);if(!i||!a&&h==E&&tt==E)return Ia(t,this.__actions__);var ot=[];t:for(;E--&&j<tt;){M+=e;for(var gt=-1,st=t[M];++gt<W;){var vt=q[gt],_t=vt.iteratee,de=vt.type,ne=_t(st);if(de==pt)st=ne;else if(!ne){if(de==F)continue t;break t}}ot[j++]=st}return ot}mt.prototype=Nn(Pr.prototype),mt.prototype.constructor=mt;function pn(t){var e=-1,i=t==null?0:t.length;for(this.clear();++e<i;){var a=t[e];this.set(a[0],a[1])}}function Uh(){this.__data__=tr?tr(null):{},this.size=0}function Dh(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Ph(t){var e=this.__data__;if(tr){var i=e[t];return i===b?n:i}return Et.call(e,t)?e[t]:n}function Fh(t){var e=this.__data__;return tr?e[t]!==n:Et.call(e,t)}function Mh(t,e){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=tr&&e===n?b:e,this}pn.prototype.clear=Uh,pn.prototype.delete=Dh,pn.prototype.get=Ph,pn.prototype.has=Fh,pn.prototype.set=Mh;function Me(t){var e=-1,i=t==null?0:t.length;for(this.clear();++e<i;){var a=t[e];this.set(a[0],a[1])}}function qh(){this.__data__=[],this.size=0}function Wh(t){var e=this.__data__,i=Fr(e,t);if(i<0)return!1;var a=e.length-1;return i==a?e.pop():Ir.call(e,i,1),--this.size,!0}function Hh(t){var e=this.__data__,i=Fr(e,t);return i<0?n:e[i][1]}function Kh(t){return Fr(this.__data__,t)>-1}function zh(t,e){var i=this.__data__,a=Fr(i,t);return a<0?(++this.size,i.push([t,e])):i[a][1]=e,this}Me.prototype.clear=qh,Me.prototype.delete=Wh,Me.prototype.get=Hh,Me.prototype.has=Kh,Me.prototype.set=zh;function qe(t){var e=-1,i=t==null?0:t.length;for(this.clear();++e<i;){var a=t[e];this.set(a[0],a[1])}}function Xh(){this.size=0,this.__data__={hash:new pn,map:new(Zn||Me),string:new pn}}function Gh(t){var e=Yr(this,t).delete(t);return this.size-=e?1:0,e}function $h(t){return Yr(this,t).get(t)}function Jh(t){return Yr(this,t).has(t)}function jh(t,e){var i=Yr(this,t),a=i.size;return i.set(t,e),this.size+=i.size==a?0:1,this}qe.prototype.clear=Xh,qe.prototype.delete=Gh,qe.prototype.get=$h,qe.prototype.has=Jh,qe.prototype.set=jh;function dn(t){var e=-1,i=t==null?0:t.length;for(this.__data__=new qe;++e<i;)this.add(t[e])}function Yh(t){return this.__data__.set(t,b),this}function Vh(t){return this.__data__.has(t)}dn.prototype.add=dn.prototype.push=Yh,dn.prototype.has=Vh;function Ee(t){var e=this.__data__=new Me(t);this.size=e.size}function Zh(){this.__data__=new Me,this.size=0}function Qh(t){var e=this.__data__,i=e.delete(t);return this.size=e.size,i}function tl(t){return this.__data__.get(t)}function el(t){return this.__data__.has(t)}function nl(t,e){var i=this.__data__;if(i instanceof Me){var a=i.__data__;if(!Zn||a.length<c-1)return a.push([t,e]),this.size=++i.size,this;i=this.__data__=new qe(a)}return i.set(t,e),this.size=i.size,this}Ee.prototype.clear=Zh,Ee.prototype.delete=Qh,Ee.prototype.get=tl,Ee.prototype.has=el,Ee.prototype.set=nl;function ca(t,e){var i=ht(t),a=!i&&_n(t),h=!i&&!a&&sn(t),m=!i&&!a&&!h&&Dn(t),C=i||a||h||m,S=C?Ki(t.length,lh):[],E=S.length;for(var M in t)(e||Et.call(t,M))&&!(C&&(M=="length"||h&&(M=="offset"||M=="parent")||m&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||ze(M,E)))&&S.push(M);return S}function ua(t){var e=t.length;return e?t[so(0,e-1)]:n}function rl(t,e){return Vr(re(t),gn(e,0,t.length))}function il(t){return Vr(re(t))}function Yi(t,e,i){(i!==n&&!Te(t[e],i)||i===n&&!(e in t))&&We(t,e,i)}function nr(t,e,i){var a=t[e];(!(Et.call(t,e)&&Te(a,i))||i===n&&!(e in t))&&We(t,e,i)}function Fr(t,e){for(var i=t.length;i--;)if(Te(t[i][0],e))return i;return-1}function ol(t,e,i,a){return en(t,function(h,m,C){e(a,h,i(h),C)}),a}function fa(t,e){return t&&Ue(e,Wt(e),t)}function sl(t,e){return t&&Ue(e,oe(e),t)}function We(t,e,i){e=="__proto__"&&Nr?Nr(t,e,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[e]=i}function Vi(t,e){for(var i=-1,a=e.length,h=O(a),m=t==null;++i<a;)h[i]=m?n:No(t,e[i]);return h}function gn(t,e,i){return t===t&&(i!==n&&(t=t<=i?t:i),e!==n&&(t=t>=e?t:e)),t}function we(t,e,i,a,h,m){var C,S=e&g,E=e&l,M=e&u;if(i&&(C=h?i(t,a,h,m):i(t)),C!==n)return C;if(!Bt(t))return t;var q=ht(t);if(q){if(C=Jl(t),!S)return re(t,C)}else{var W=jt(t),j=W==kt||W==$t;if(sn(t))return La(t,S);if(W==ue||W==X||j&&!h){if(C=E||j?{}:Qa(t),!S)return E?Pl(t,sl(C,t)):Dl(t,fa(C,t))}else{if(!Rt[W])return h?t:{};C=jl(t,W,S)}}m||(m=new Ee);var tt=m.get(t);if(tt)return tt;m.set(t,C),Tc(t)?t.forEach(function(st){C.add(we(st,e,i,st,t,m))}):xc(t)&&t.forEach(function(st,vt){C.set(vt,we(st,e,i,vt,t,m))});var ot=M?E?mo:vo:E?oe:Wt,gt=q?n:ot(t);return ve(gt||t,function(st,vt){gt&&(vt=st,st=t[vt]),nr(C,vt,we(st,e,i,vt,t,m))}),C}function al(t){var e=Wt(t);return function(i){return ha(i,t,e)}}function ha(t,e,i){var a=i.length;if(t==null)return!a;for(t=Tt(t);a--;){var h=i[a],m=e[h],C=t[h];if(C===n&&!(h in t)||!m(C))return!1}return!0}function la(t,e,i){if(typeof t!="function")throw new me(v);return ur(function(){t.apply(n,i)},e)}function rr(t,e,i,a){var h=-1,m=br,C=!0,S=t.length,E=[],M=e.length;if(!S)return E;i&&(e=Nt(e,he(i))),a?(m=Pi,C=!1):e.length>=c&&(m=Yn,C=!1,e=new dn(e));t:for(;++h<S;){var q=t[h],W=i==null?q:i(q);if(q=a||q!==0?q:0,C&&W===W){for(var j=M;j--;)if(e[j]===W)continue t;E.push(q)}else m(e,W,a)||E.push(q)}return E}var en=Ma(Le),pa=Ma(Qi,!0);function cl(t,e){var i=!0;return en(t,function(a,h,m){return i=!!e(a,h,m),i}),i}function Mr(t,e,i){for(var a=-1,h=t.length;++a<h;){var m=t[a],C=e(m);if(C!=null&&(S===n?C===C&&!pe(C):i(C,S)))var S=C,E=m}return E}function ul(t,e,i,a){var h=t.length;for(i=dt(i),i<0&&(i=-i>h?0:h+i),a=a===n||a>h?h:dt(a),a<0&&(a+=h),a=i>a?0:Oc(a);i<a;)t[i++]=e;return t}function da(t,e){var i=[];return en(t,function(a,h,m){e(a,h,m)&&i.push(a)}),i}function zt(t,e,i,a,h){var m=-1,C=t.length;for(i||(i=Vl),h||(h=[]);++m<C;){var S=t[m];e>0&&i(S)?e>1?zt(S,e-1,i,a,h):Ze(h,S):a||(h[h.length]=S)}return h}var Zi=qa(),ga=qa(!0);function Le(t,e){return t&&Zi(t,e,Wt)}function Qi(t,e){return t&&ga(t,e,Wt)}function qr(t,e){return Ve(e,function(i){return Xe(t[i])})}function yn(t,e){e=rn(e,t);for(var i=0,a=e.length;t!=null&&i<a;)t=t[De(e[i++])];return i&&i==a?t:n}function ya(t,e,i){var a=e(t);return ht(t)?a:Ze(a,i(t))}function te(t){return t==null?t===n?Jn:Gn:ln&&ln in Tt(t)?Xl(t):ip(t)}function to(t,e){return t>e}function fl(t,e){return t!=null&&Et.call(t,e)}function hl(t,e){return t!=null&&e in Tt(t)}function ll(t,e,i){return t>=Jt(e,i)&&t<Mt(e,i)}function eo(t,e,i){for(var a=i?Pi:br,h=t[0].length,m=t.length,C=m,S=O(m),E=1/0,M=[];C--;){var q=t[C];C&&e&&(q=Nt(q,he(e))),E=Jt(q.length,E),S[C]=!i&&(e||h>=120&&q.length>=120)?new dn(C&&q):n}q=t[0];var W=-1,j=S[0];t:for(;++W<h&&M.length<E;){var tt=q[W],ot=e?e(tt):tt;if(tt=i||tt!==0?tt:0,!(j?Yn(j,ot):a(M,ot,i))){for(C=m;--C;){var gt=S[C];if(!(gt?Yn(gt,ot):a(t[C],ot,i)))continue t}j&&j.push(ot),M.push(tt)}}return M}function pl(t,e,i,a){return Le(t,function(h,m,C){e(a,i(h),m,C)}),a}function ir(t,e,i){e=rn(e,t),t=rc(t,e);var a=t==null?t:t[De(Ce(e))];return a==null?n:fe(a,t,i)}function va(t){return Lt(t)&&te(t)==X}function dl(t){return Lt(t)&&te(t)==Ye}function gl(t){return Lt(t)&&te(t)==nt}function or(t,e,i,a,h){return t===e?!0:t==null||e==null||!Lt(t)&&!Lt(e)?t!==t&&e!==e:yl(t,e,i,a,or,h)}function yl(t,e,i,a,h,m){var C=ht(t),S=ht(e),E=C?rt:jt(t),M=S?rt:jt(e);E=E==X?ue:E,M=M==X?ue:M;var q=E==ue,W=M==ue,j=E==M;if(j&&sn(t)){if(!sn(e))return!1;C=!0,q=!1}if(j&&!q)return m||(m=new Ee),C||Dn(t)?Ya(t,e,i,a,h,m):Kl(t,e,E,i,a,h,m);if(!(i&w)){var tt=q&&Et.call(t,"__wrapped__"),ot=W&&Et.call(e,"__wrapped__");if(tt||ot){var gt=tt?t.value():t,st=ot?e.value():e;return m||(m=new Ee),h(gt,st,i,a,m)}}return j?(m||(m=new Ee),zl(t,e,i,a,h,m)):!1}function vl(t){return Lt(t)&&jt(t)==It}function no(t,e,i,a){var h=i.length,m=h,C=!a;if(t==null)return!m;for(t=Tt(t);h--;){var S=i[h];if(C&&S[2]?S[1]!==t[S[0]]:!(S[0]in t))return!1}for(;++h<m;){S=i[h];var E=S[0],M=t[E],q=S[1];if(C&&S[2]){if(M===n&&!(E in t))return!1}else{var W=new Ee;if(a)var j=a(M,q,E,t,e,W);if(!(j===n?or(q,M,w|A,a,W):j))return!1}}return!0}function ma(t){if(!Bt(t)||Ql(t))return!1;var e=Xe(t)?vh:af;return e.test(mn(t))}function ml(t){return Lt(t)&&te(t)==Zt}function _l(t){return Lt(t)&&jt(t)==Qt}function wl(t){return Lt(t)&&ri(t.length)&&!!Ot[te(t)]}function _a(t){return typeof t=="function"?t:t==null?se:typeof t=="object"?ht(t)?Ca(t[0],t[1]):ba(t):Wc(t)}function ro(t){if(!cr(t))return Sh(t);var e=[];for(var i in Tt(t))Et.call(t,i)&&i!="constructor"&&e.push(i);return e}function bl(t){if(!Bt(t))return rp(t);var e=cr(t),i=[];for(var a in t)a=="constructor"&&(e||!Et.call(t,a))||i.push(a);return i}function io(t,e){return t<e}function wa(t,e){var i=-1,a=ie(t)?O(t.length):[];return en(t,function(h,m,C){a[++i]=e(h,m,C)}),a}function ba(t){var e=wo(t);return e.length==1&&e[0][2]?ec(e[0][0],e[0][1]):function(i){return i===t||no(i,t,e)}}function Ca(t,e){return Co(t)&&tc(e)?ec(De(t),e):function(i){var a=No(i,t);return a===n&&a===e?Bo(i,t):or(e,a,w|A)}}function Wr(t,e,i,a,h){t!==e&&Zi(e,function(m,C){if(h||(h=new Ee),Bt(m))Cl(t,e,C,i,Wr,a,h);else{var S=a?a(ko(t,C),m,C+"",t,e,h):n;S===n&&(S=m),Yi(t,C,S)}},oe)}function Cl(t,e,i,a,h,m,C){var S=ko(t,i),E=ko(e,i),M=C.get(E);if(M){Yi(t,i,M);return}var q=m?m(S,E,i+"",t,e,C):n,W=q===n;if(W){var j=ht(E),tt=!j&&sn(E),ot=!j&&!tt&&Dn(E);q=E,j||tt||ot?ht(S)?q=S:Ut(S)?q=re(S):tt?(W=!1,q=La(E,!0)):ot?(W=!1,q=Ua(E,!0)):q=[]:fr(E)||_n(E)?(q=S,_n(S)?q=Ic(S):(!Bt(S)||Xe(S))&&(q=Qa(E))):W=!1}W&&(C.set(E,q),h(q,E,a,m,C),C.delete(E)),Yi(t,i,q)}function Sa(t,e){var i=t.length;if(i)return e+=e<0?i:0,ze(e,i)?t[e]:n}function ka(t,e,i){e.length?e=Nt(e,function(m){return ht(m)?function(C){return yn(C,m.length===1?m[0]:m)}:m}):e=[se];var a=-1;e=Nt(e,he(it()));var h=wa(t,function(m,C,S){var E=Nt(e,function(M){return M(m)});return{criteria:E,index:++a,value:m}});return jf(h,function(m,C){return Ul(m,C,i)})}function Sl(t,e){return Aa(t,e,function(i,a){return Bo(t,a)})}function Aa(t,e,i){for(var a=-1,h=e.length,m={};++a<h;){var C=e[a],S=yn(t,C);i(S,C)&&sr(m,rn(C,t),S)}return m}function kl(t){return function(e){return yn(e,t)}}function oo(t,e,i,a){var h=a?Jf:An,m=-1,C=e.length,S=t;for(t===e&&(e=re(e)),i&&(S=Nt(t,he(i)));++m<C;)for(var E=0,M=e[m],q=i?i(M):M;(E=h(S,q,E,a))>-1;)S!==t&&Ir.call(S,E,1),Ir.call(t,E,1);return t}function xa(t,e){for(var i=t?e.length:0,a=i-1;i--;){var h=e[i];if(i==a||h!==m){var m=h;ze(h)?Ir.call(t,h,1):uo(t,h)}}return t}function so(t,e){return t+Lr(sa()*(e-t+1))}function Al(t,e,i,a){for(var h=-1,m=Mt(Br((e-t)/(i||1)),0),C=O(m);m--;)C[a?m:++h]=t,t+=i;return C}function ao(t,e){var i="";if(!t||e<1||e>ut)return i;do e%2&&(i+=t),e=Lr(e/2),e&&(t+=t);while(e);return i}function yt(t,e){return Ao(nc(t,e,se),t+"")}function xl(t){return ua(Pn(t))}function El(t,e){var i=Pn(t);return Vr(i,gn(e,0,i.length))}function sr(t,e,i,a){if(!Bt(t))return t;e=rn(e,t);for(var h=-1,m=e.length,C=m-1,S=t;S!=null&&++h<m;){var E=De(e[h]),M=i;if(E==="__proto__"||E==="constructor"||E==="prototype")return t;if(h!=C){var q=S[E];M=a?a(q,E,S):n,M===n&&(M=Bt(q)?q:ze(e[h+1])?[]:{})}nr(S,E,M),S=S[E]}return t}var Ea=Ur?function(t,e){return Ur.set(t,e),t}:se,Tl=Nr?function(t,e){return Nr(t,"toString",{configurable:!0,enumerable:!1,value:Uo(e),writable:!0})}:se;function Rl(t){return Vr(Pn(t))}function be(t,e,i){var a=-1,h=t.length;e<0&&(e=-e>h?0:h+e),i=i>h?h:i,i<0&&(i+=h),h=e>i?0:i-e>>>0,e>>>=0;for(var m=O(h);++a<h;)m[a]=t[a+e];return m}function Ol(t,e){var i;return en(t,function(a,h,m){return i=e(a,h,m),!i}),!!i}function Hr(t,e,i){var a=0,h=t==null?a:t.length;if(typeof e=="number"&&e===e&&h<=$){for(;a<h;){var m=a+h>>>1,C=t[m];C!==null&&!pe(C)&&(i?C<=e:C<e)?a=m+1:h=m}return h}return co(t,e,se,i)}function co(t,e,i,a){var h=0,m=t==null?0:t.length;if(m===0)return 0;e=i(e);for(var C=e!==e,S=e===null,E=pe(e),M=e===n;h<m;){var q=Lr((h+m)/2),W=i(t[q]),j=W!==n,tt=W===null,ot=W===W,gt=pe(W);if(C)var st=a||ot;else M?st=ot&&(a||j):S?st=ot&&j&&(a||!tt):E?st=ot&&j&&!tt&&(a||!gt):tt||gt?st=!1:st=a?W<=e:W<e;st?h=q+1:m=q}return Jt(m,vr)}function Ta(t,e){for(var i=-1,a=t.length,h=0,m=[];++i<a;){var C=t[i],S=e?e(C):C;if(!i||!Te(S,E)){var E=S;m[h++]=C===0?0:C}}return m}function Ra(t){return typeof t=="number"?t:pe(t)?Ie:+t}function le(t){if(typeof t=="string")return t;if(ht(t))return Nt(t,le)+"";if(pe(t))return aa?aa.call(t):"";var e=t+"";return e=="0"&&1/t==-xt?"-0":e}function nn(t,e,i){var a=-1,h=br,m=t.length,C=!0,S=[],E=S;if(i)C=!1,h=Pi;else if(m>=c){var M=e?null:Wl(t);if(M)return Sr(M);C=!1,h=Yn,E=new dn}else E=e?[]:S;t:for(;++a<m;){var q=t[a],W=e?e(q):q;if(q=i||q!==0?q:0,C&&W===W){for(var j=E.length;j--;)if(E[j]===W)continue t;e&&E.push(W),S.push(q)}else h(E,W,i)||(E!==S&&E.push(W),S.push(q))}return S}function uo(t,e){return e=rn(e,t),t=rc(t,e),t==null||delete t[De(Ce(e))]}function Oa(t,e,i,a){return sr(t,e,i(yn(t,e)),a)}function Kr(t,e,i,a){for(var h=t.length,m=a?h:-1;(a?m--:++m<h)&&e(t[m],m,t););return i?be(t,a?0:m,a?m+1:h):be(t,a?m+1:0,a?h:m)}function Ia(t,e){var i=t;return i instanceof mt&&(i=i.value()),Fi(e,function(a,h){return h.func.apply(h.thisArg,Ze([a],h.args))},i)}function fo(t,e,i){var a=t.length;if(a<2)return a?nn(t[0]):[];for(var h=-1,m=O(a);++h<a;)for(var C=t[h],S=-1;++S<a;)S!=h&&(m[h]=rr(m[h]||C,t[S],e,i));return nn(zt(m,1),e,i)}function Na(t,e,i){for(var a=-1,h=t.length,m=e.length,C={};++a<h;){var S=a<m?e[a]:n;i(C,t[a],S)}return C}function ho(t){return Ut(t)?t:[]}function lo(t){return typeof t=="function"?t:se}function rn(t,e){return ht(t)?t:Co(t,e)?[t]:ac(At(t))}var Il=yt;function on(t,e,i){var a=t.length;return i=i===n?a:i,!e&&i>=a?t:be(t,e,i)}var Ba=mh||function(t){return Kt.clearTimeout(t)};function La(t,e){if(e)return t.slice();var i=t.length,a=ea?ea(i):new t.constructor(i);return t.copy(a),a}function po(t){var e=new t.constructor(t.byteLength);return new Rr(e).set(new Rr(t)),e}function Nl(t,e){var i=e?po(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.byteLength)}function Bl(t){var e=new t.constructor(t.source,vs.exec(t));return e.lastIndex=t.lastIndex,e}function Ll(t){return er?Tt(er.call(t)):{}}function Ua(t,e){var i=e?po(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}function Da(t,e){if(t!==e){var i=t!==n,a=t===null,h=t===t,m=pe(t),C=e!==n,S=e===null,E=e===e,M=pe(e);if(!S&&!M&&!m&&t>e||m&&C&&E&&!S&&!M||a&&C&&E||!i&&E||!h)return 1;if(!a&&!m&&!M&&t<e||M&&i&&h&&!a&&!m||S&&i&&h||!C&&h||!E)return-1}return 0}function Ul(t,e,i){for(var a=-1,h=t.criteria,m=e.criteria,C=h.length,S=i.length;++a<C;){var E=Da(h[a],m[a]);if(E){if(a>=S)return E;var M=i[a];return E*(M=="desc"?-1:1)}}return t.index-e.index}function Pa(t,e,i,a){for(var h=-1,m=t.length,C=i.length,S=-1,E=e.length,M=Mt(m-C,0),q=O(E+M),W=!a;++S<E;)q[S]=e[S];for(;++h<C;)(W||h<m)&&(q[i[h]]=t[h]);for(;M--;)q[S++]=t[h++];return q}function Fa(t,e,i,a){for(var h=-1,m=t.length,C=-1,S=i.length,E=-1,M=e.length,q=Mt(m-S,0),W=O(q+M),j=!a;++h<q;)W[h]=t[h];for(var tt=h;++E<M;)W[tt+E]=e[E];for(;++C<S;)(j||h<m)&&(W[tt+i[C]]=t[h++]);return W}function re(t,e){var i=-1,a=t.length;for(e||(e=O(a));++i<a;)e[i]=t[i];return e}function Ue(t,e,i,a){var h=!i;i||(i={});for(var m=-1,C=e.length;++m<C;){var S=e[m],E=a?a(i[S],t[S],S,i,t):n;E===n&&(E=t[S]),h?We(i,S,E):nr(i,S,E)}return i}function Dl(t,e){return Ue(t,bo(t),e)}function Pl(t,e){return Ue(t,Va(t),e)}function zr(t,e){return function(i,a){var h=ht(i)?Hf:ol,m=e?e():{};return h(i,t,it(a,2),m)}}function Bn(t){return yt(function(e,i){var a=-1,h=i.length,m=h>1?i[h-1]:n,C=h>2?i[2]:n;for(m=t.length>3&&typeof m=="function"?(h--,m):n,C&&ee(i[0],i[1],C)&&(m=h<3?n:m,h=1),e=Tt(e);++a<h;){var S=i[a];S&&t(e,S,a,m)}return e})}function Ma(t,e){return function(i,a){if(i==null)return i;if(!ie(i))return t(i,a);for(var h=i.length,m=e?h:-1,C=Tt(i);(e?m--:++m<h)&&a(C[m],m,C)!==!1;);return i}}function qa(t){return function(e,i,a){for(var h=-1,m=Tt(e),C=a(e),S=C.length;S--;){var E=C[t?S:++h];if(i(m[E],E,m)===!1)break}return e}}function Fl(t,e,i){var a=e&k,h=ar(t);function m(){var C=this&&this!==Kt&&this instanceof m?h:t;return C.apply(a?i:this,arguments)}return m}function Wa(t){return function(e){e=At(e);var i=xn(e)?xe(e):n,a=i?i[0]:e.charAt(0),h=i?on(i,1).join(""):e.slice(1);return a[t]()+h}}function Ln(t){return function(e){return Fi(Mc(Fc(e).replace(Tf,"")),t,"")}}function ar(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var i=Nn(t.prototype),a=t.apply(i,e);return Bt(a)?a:i}}function Ml(t,e,i){var a=ar(t);function h(){for(var m=arguments.length,C=O(m),S=m,E=Un(h);S--;)C[S]=arguments[S];var M=m<3&&C[0]!==E&&C[m-1]!==E?[]:Qe(C,E);if(m-=M.length,m<i)return Ga(t,e,Xr,h.placeholder,n,C,M,n,n,i-m);var q=this&&this!==Kt&&this instanceof h?a:t;return fe(q,this,C)}return h}function Ha(t){return function(e,i,a){var h=Tt(e);if(!ie(e)){var m=it(i,3);e=Wt(e),i=function(S){return m(h[S],S,h)}}var C=t(e,i,a);return C>-1?h[m?e[C]:C]:n}}function Ka(t){return Ke(function(e){var i=e.length,a=i,h=_e.prototype.thru;for(t&&e.reverse();a--;){var m=e[a];if(typeof m!="function")throw new me(v);if(h&&!C&&jr(m)=="wrapper")var C=new _e([],!0)}for(a=C?a:i;++a<i;){m=e[a];var S=jr(m),E=S=="wrapper"?_o(m):n;E&&So(E[0])&&E[1]==(I|J|U|P)&&!E[4].length&&E[9]==1?C=C[jr(E[0])].apply(C,E[3]):C=m.length==1&&So(m)?C[S]():C.thru(m)}return function(){var M=arguments,q=M[0];if(C&&M.length==1&&ht(q))return C.plant(q).value();for(var W=0,j=i?e[W].apply(this,M):q;++W<i;)j=e[W].call(this,j);return j}})}function Xr(t,e,i,a,h,m,C,S,E,M){var q=e&I,W=e&k,j=e&L,tt=e&(J|N),ot=e&R,gt=j?n:ar(t);function st(){for(var vt=arguments.length,_t=O(vt),de=vt;de--;)_t[de]=arguments[de];if(tt)var ne=Un(st),ge=Vf(_t,ne);if(a&&(_t=Pa(_t,a,h,tt)),m&&(_t=Fa(_t,m,C,tt)),vt-=ge,tt&&vt<M){var Dt=Qe(_t,ne);return Ga(t,e,Xr,st.placeholder,i,_t,Dt,S,E,M-vt)}var Re=W?i:this,$e=j?Re[t]:t;return vt=_t.length,S?_t=op(_t,S):ot&&vt>1&&_t.reverse(),q&&E<vt&&(_t.length=E),this&&this!==Kt&&this instanceof st&&($e=gt||ar($e)),$e.apply(Re,_t)}return st}function za(t,e){return function(i,a){return pl(i,t,e(a),{})}}function Gr(t,e){return function(i,a){var h;if(i===n&&a===n)return e;if(i!==n&&(h=i),a!==n){if(h===n)return a;typeof i=="string"||typeof a=="string"?(i=le(i),a=le(a)):(i=Ra(i),a=Ra(a)),h=t(i,a)}return h}}function go(t){return Ke(function(e){return e=Nt(e,he(it())),yt(function(i){var a=this;return t(e,function(h){return fe(h,a,i)})})})}function $r(t,e){e=e===n?" ":le(e);var i=e.length;if(i<2)return i?ao(e,t):e;var a=ao(e,Br(t/En(e)));return xn(e)?on(xe(a),0,t).join(""):a.slice(0,t)}function ql(t,e,i,a){var h=e&k,m=ar(t);function C(){for(var S=-1,E=arguments.length,M=-1,q=a.length,W=O(q+E),j=this&&this!==Kt&&this instanceof C?m:t;++M<q;)W[M]=a[M];for(;E--;)W[M++]=arguments[++S];return fe(j,h?i:this,W)}return C}function Xa(t){return function(e,i,a){return a&&typeof a!="number"&&ee(e,i,a)&&(i=a=n),e=Ge(e),i===n?(i=e,e=0):i=Ge(i),a=a===n?e<i?1:-1:Ge(a),Al(e,i,a,t)}}function Jr(t){return function(e,i){return typeof e=="string"&&typeof i=="string"||(e=Se(e),i=Se(i)),t(e,i)}}function Ga(t,e,i,a,h,m,C,S,E,M){var q=e&J,W=q?C:n,j=q?n:C,tt=q?m:n,ot=q?n:m;e|=q?U:T,e&=~(q?T:U),e&Y||(e&=~(k|L));var gt=[t,e,h,tt,W,ot,j,S,E,M],st=i.apply(n,gt);return So(t)&&ic(st,gt),st.placeholder=a,oc(st,t,e)}function yo(t){var e=Ft[t];return function(i,a){if(i=Se(i),a=a==null?0:Jt(dt(a),292),a&&oa(i)){var h=(At(i)+"e").split("e"),m=e(h[0]+"e"+(+h[1]+a));return h=(At(m)+"e").split("e"),+(h[0]+"e"+(+h[1]-a))}return e(i)}}var Wl=On&&1/Sr(new On([,-0]))[1]==xt?function(t){return new On(t)}:Fo;function $a(t){return function(e){var i=jt(e);return i==It?Xi(e):i==Qt?ih(e):Yf(e,t(e))}}function He(t,e,i,a,h,m,C,S){var E=e&L;if(!E&&typeof t!="function")throw new me(v);var M=a?a.length:0;if(M||(e&=~(U|T),a=h=n),C=C===n?C:Mt(dt(C),0),S=S===n?S:dt(S),M-=h?h.length:0,e&T){var q=a,W=h;a=h=n}var j=E?n:_o(t),tt=[t,e,i,a,h,q,W,m,C,S];if(j&&np(tt,j),t=tt[0],e=tt[1],i=tt[2],a=tt[3],h=tt[4],S=tt[9]=tt[9]===n?E?0:t.length:Mt(tt[9]-M,0),!S&&e&(J|N)&&(e&=~(J|N)),!e||e==k)var ot=Fl(t,e,i);else e==J||e==N?ot=Ml(t,e,S):(e==U||e==(k|U))&&!h.length?ot=ql(t,e,i,a):ot=Xr.apply(n,tt);var gt=j?Ea:ic;return oc(gt(ot,tt),t,e)}function Ja(t,e,i,a){return t===n||Te(t,Rn[i])&&!Et.call(a,i)?e:t}function ja(t,e,i,a,h,m){return Bt(t)&&Bt(e)&&(m.set(e,t),Wr(t,e,n,ja,m),m.delete(e)),t}function Hl(t){return fr(t)?n:t}function Ya(t,e,i,a,h,m){var C=i&w,S=t.length,E=e.length;if(S!=E&&!(C&&E>S))return!1;var M=m.get(t),q=m.get(e);if(M&&q)return M==e&&q==t;var W=-1,j=!0,tt=i&A?new dn:n;for(m.set(t,e),m.set(e,t);++W<S;){var ot=t[W],gt=e[W];if(a)var st=C?a(gt,ot,W,e,t,m):a(ot,gt,W,t,e,m);if(st!==n){if(st)continue;j=!1;break}if(tt){if(!Mi(e,function(vt,_t){if(!Yn(tt,_t)&&(ot===vt||h(ot,vt,i,a,m)))return tt.push(_t)})){j=!1;break}}else if(!(ot===gt||h(ot,gt,i,a,m))){j=!1;break}}return m.delete(t),m.delete(e),j}function Kl(t,e,i,a,h,m,C){switch(i){case Sn:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Ye:return!(t.byteLength!=e.byteLength||!m(new Rr(t),new Rr(e)));case et:case nt:case Ae:return Te(+t,+e);case at:return t.name==e.name&&t.message==e.message;case Zt:case Ne:return t==e+"";case It:var S=Xi;case Qt:var E=a&w;if(S||(S=Sr),t.size!=e.size&&!E)return!1;var M=C.get(t);if(M)return M==e;a|=A,C.set(t,e);var q=Ya(S(t),S(e),a,h,m,C);return C.delete(t),q;case Be:if(er)return er.call(t)==er.call(e)}return!1}function zl(t,e,i,a,h,m){var C=i&w,S=vo(t),E=S.length,M=vo(e),q=M.length;if(E!=q&&!C)return!1;for(var W=E;W--;){var j=S[W];if(!(C?j in e:Et.call(e,j)))return!1}var tt=m.get(t),ot=m.get(e);if(tt&&ot)return tt==e&&ot==t;var gt=!0;m.set(t,e),m.set(e,t);for(var st=C;++W<E;){j=S[W];var vt=t[j],_t=e[j];if(a)var de=C?a(_t,vt,j,e,t,m):a(vt,_t,j,t,e,m);if(!(de===n?vt===_t||h(vt,_t,i,a,m):de)){gt=!1;break}st||(st=j=="constructor")}if(gt&&!st){var ne=t.constructor,ge=e.constructor;ne!=ge&&"constructor"in t&&"constructor"in e&&!(typeof ne=="function"&&ne instanceof ne&&typeof ge=="function"&&ge instanceof ge)&&(gt=!1)}return m.delete(t),m.delete(e),gt}function Ke(t){return Ao(nc(t,n,hc),t+"")}function vo(t){return ya(t,Wt,bo)}function mo(t){return ya(t,oe,Va)}var _o=Ur?function(t){return Ur.get(t)}:Fo;function jr(t){for(var e=t.name+"",i=In[e],a=Et.call(In,e)?i.length:0;a--;){var h=i[a],m=h.func;if(m==null||m==t)return h.name}return e}function Un(t){var e=Et.call(y,"placeholder")?y:t;return e.placeholder}function it(){var t=y.iteratee||Do;return t=t===Do?_a:t,arguments.length?t(arguments[0],arguments[1]):t}function Yr(t,e){var i=t.__data__;return Zl(e)?i[typeof e=="string"?"string":"hash"]:i.map}function wo(t){for(var e=Wt(t),i=e.length;i--;){var a=e[i],h=t[a];e[i]=[a,h,tc(h)]}return e}function vn(t,e){var i=eh(t,e);return ma(i)?i:n}function Xl(t){var e=Et.call(t,ln),i=t[ln];try{t[ln]=n;var a=!0}catch{}var h=Er.call(t);return a&&(e?t[ln]=i:delete t[ln]),h}var bo=$i?function(t){return t==null?[]:(t=Tt(t),Ve($i(t),function(e){return ra.call(t,e)}))}:Mo,Va=$i?function(t){for(var e=[];t;)Ze(e,bo(t)),t=Or(t);return e}:Mo,jt=te;(Ji&&jt(new Ji(new ArrayBuffer(1)))!=Sn||Zn&&jt(new Zn)!=It||ji&&jt(ji.resolve())!=Cn||On&&jt(new On)!=Qt||Qn&&jt(new Qn)!=Fe)&&(jt=function(t){var e=te(t),i=e==ue?t.constructor:n,a=i?mn(i):"";if(a)switch(a){case Eh:return Sn;case Th:return It;case Rh:return Cn;case Oh:return Qt;case Ih:return Fe}return e});function Gl(t,e,i){for(var a=-1,h=i.length;++a<h;){var m=i[a],C=m.size;switch(m.type){case"drop":t+=C;break;case"dropRight":e-=C;break;case"take":e=Jt(e,t+C);break;case"takeRight":t=Mt(t,e-C);break}}return{start:t,end:e}}function $l(t){var e=t.match(Zu);return e?e[1].split(Qu):[]}function Za(t,e,i){e=rn(e,t);for(var a=-1,h=e.length,m=!1;++a<h;){var C=De(e[a]);if(!(m=t!=null&&i(t,C)))break;t=t[C]}return m||++a!=h?m:(h=t==null?0:t.length,!!h&&ri(h)&&ze(C,h)&&(ht(t)||_n(t)))}function Jl(t){var e=t.length,i=new t.constructor(e);return e&&typeof t[0]=="string"&&Et.call(t,"index")&&(i.index=t.index,i.input=t.input),i}function Qa(t){return typeof t.constructor=="function"&&!cr(t)?Nn(Or(t)):{}}function jl(t,e,i){var a=t.constructor;switch(e){case Ye:return po(t);case et:case nt:return new a(+t);case Sn:return Nl(t,i);case _i:case wi:case bi:case Ci:case Si:case ki:case Ai:case xi:case Ei:return Ua(t,i);case It:return new a;case Ae:case Ne:return new a(t);case Zt:return Bl(t);case Qt:return new a;case Be:return Ll(t)}}function Yl(t,e){var i=e.length;if(!i)return t;var a=i-1;return e[a]=(i>1?"& ":"")+e[a],e=e.join(i>2?", ":" "),t.replace(Vu,`{
|
|
13
|
+
*/Zr.exports;(function(a,i){(function(){var n,s="4.17.21",u=200,h="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",m="Expected a function",g="Invalid `variable` option passed into `_.template`",S="__lodash_hash_undefined__",v=500,_="__lodash_placeholder__",y=1,l=2,f=4,b=1,E=2,x=1,W=2,st=4,V=8,ot=16,$=32,D=64,M=128,H=256,L=512,U=30,X="...",Q=800,j=16,B=1,kt=2,At=3,Ot=1/0,ut=9007199254740991,$t=17976931348623157e292,xe=NaN,se=4294967295,er=se-1,q=se>>>1,J=[["ary",M],["bind",x],["bindKey",W],["curry",V],["curryRight",ot],["flip",L],["partial",$],["partialRight",D],["rearg",H]],F="[object Arguments]",et="[object Array]",P="[object AsyncFunction]",Z="[object Boolean]",tt="[object Date]",z="[object DOMException]",at="[object Error]",bt="[object Function]",Gt="[object GeneratorFunction]",Rt="[object Map]",Se="[object Number]",Ln="[object Null]",oe="[object Object]",dn="[object Promise]",Nn="[object Proxy]",Vt="[object RegExp]",Yt="[object Set]",Oe="[object String]",Re="[object Symbol]",Bn="[object Undefined]",De="[object WeakMap]",Un="[object WeakSet]",Xe="[object ArrayBuffer]",gn="[object DataView]",ti="[object Float32Array]",ei="[object Float64Array]",ni="[object Int8Array]",ri="[object Int16Array]",ii="[object Int32Array]",si="[object Uint8Array]",oi="[object Uint8ClampedArray]",ai="[object Uint16Array]",ui="[object Uint32Array]",Ju=/\b__p \+= '';/g,Vu=/\b(__p \+=) '' \+/g,Yu=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ms=/&(?:amp|lt|gt|quot|#39);/g,qs=/[&<>"']/g,ju=RegExp(Ms.source),Zu=RegExp(qs.source),Qu=/<%-([\s\S]+?)%>/g,tc=/<%([\s\S]+?)%>/g,Ws=/<%=([\s\S]+?)%>/g,ec=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nc=/^\w*$/,rc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ci=/[\\^$.*+?()[\]{}|]/g,ic=RegExp(ci.source),fi=/^\s+/,sc=/\s/,oc=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ac=/\{\n\/\* \[wrapped with (.+)\] \*/,uc=/,? & /,cc=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fc=/[()=,{}\[\]\/\s]/,hc=/\\(\\)?/g,lc=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ks=/\w*$/,pc=/^[-+]0x[0-9a-f]+$/i,dc=/^0b[01]+$/i,gc=/^\[object .+?Constructor\]$/,vc=/^0o[0-7]+$/i,yc=/^(?:0|[1-9]\d*)$/,mc=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,nr=/($^)/,_c=/['\n\r\u2028\u2029\\]/g,rr="\\ud800-\\udfff",wc="\\u0300-\\u036f",bc="\\ufe20-\\ufe2f",Sc="\\u20d0-\\u20ff",Hs=wc+bc+Sc,$s="\\u2700-\\u27bf",Gs="a-z\\xdf-\\xf6\\xf8-\\xff",Cc="\\xac\\xb1\\xd7\\xf7",kc="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ac="\\u2000-\\u206f",Ec=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",zs="A-Z\\xc0-\\xd6\\xd8-\\xde",Xs="\\ufe0e\\ufe0f",Js=Cc+kc+Ac+Ec,hi="['’]",Tc="["+rr+"]",Vs="["+Js+"]",ir="["+Hs+"]",Ys="\\d+",xc="["+$s+"]",js="["+Gs+"]",Zs="[^"+rr+Js+Ys+$s+Gs+zs+"]",li="\\ud83c[\\udffb-\\udfff]",Oc="(?:"+ir+"|"+li+")",Qs="[^"+rr+"]",pi="(?:\\ud83c[\\udde6-\\uddff]){2}",di="[\\ud800-\\udbff][\\udc00-\\udfff]",vn="["+zs+"]",to="\\u200d",eo="(?:"+js+"|"+Zs+")",Rc="(?:"+vn+"|"+Zs+")",no="(?:"+hi+"(?:d|ll|m|re|s|t|ve))?",ro="(?:"+hi+"(?:D|LL|M|RE|S|T|VE))?",io=Oc+"?",so="["+Xs+"]?",Ic="(?:"+to+"(?:"+[Qs,pi,di].join("|")+")"+so+io+")*",Lc="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Nc="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",oo=so+io+Ic,Bc="(?:"+[xc,pi,di].join("|")+")"+oo,Uc="(?:"+[Qs+ir+"?",ir,pi,di,Tc].join("|")+")",Dc=RegExp(hi,"g"),Pc=RegExp(ir,"g"),gi=RegExp(li+"(?="+li+")|"+Uc+oo,"g"),Fc=RegExp([vn+"?"+js+"+"+no+"(?="+[Vs,vn,"$"].join("|")+")",Rc+"+"+ro+"(?="+[Vs,vn+eo,"$"].join("|")+")",vn+"?"+eo+"+"+no,vn+"+"+ro,Nc,Lc,Ys,Bc].join("|"),"g"),Mc=RegExp("["+to+rr+Hs+Xs+"]"),qc=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Wc=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Kc=-1,xt={};xt[ti]=xt[ei]=xt[ni]=xt[ri]=xt[ii]=xt[si]=xt[oi]=xt[ai]=xt[ui]=!0,xt[F]=xt[et]=xt[Xe]=xt[Z]=xt[gn]=xt[tt]=xt[at]=xt[bt]=xt[Rt]=xt[Se]=xt[oe]=xt[Vt]=xt[Yt]=xt[Oe]=xt[De]=!1;var Tt={};Tt[F]=Tt[et]=Tt[Xe]=Tt[gn]=Tt[Z]=Tt[tt]=Tt[ti]=Tt[ei]=Tt[ni]=Tt[ri]=Tt[ii]=Tt[Rt]=Tt[Se]=Tt[oe]=Tt[Vt]=Tt[Yt]=Tt[Oe]=Tt[Re]=Tt[si]=Tt[oi]=Tt[ai]=Tt[ui]=!0,Tt[at]=Tt[bt]=Tt[De]=!1;var Hc={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},$c={"&":"&","<":"<",">":">",'"':""","'":"'"},Gc={"&":"&","<":"<",">":">",""":'"',"'":"'"},zc={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Xc=parseFloat,Jc=parseInt,ao=typeof jn=="object"&&jn&&jn.Object===Object&&jn,Vc=typeof self=="object"&&self&&self.Object===Object&&self,Wt=ao||Vc||Function("return this")(),vi=i&&!i.nodeType&&i,rn=vi&&!0&&a&&!a.nodeType&&a,uo=rn&&rn.exports===vi,yi=uo&&ao.process,pe=function(){try{var k=rn&&rn.require&&rn.require("util").types;return k||yi&&yi.binding&&yi.binding("util")}catch{}}(),co=pe&&pe.isArrayBuffer,fo=pe&&pe.isDate,ho=pe&&pe.isMap,lo=pe&&pe.isRegExp,po=pe&&pe.isSet,go=pe&&pe.isTypedArray;function ae(k,O,T){switch(T.length){case 0:return k.call(O);case 1:return k.call(O,T[0]);case 2:return k.call(O,T[0],T[1]);case 3:return k.call(O,T[0],T[1],T[2])}return k.apply(O,T)}function Yc(k,O,T,G){for(var ct=-1,_t=k==null?0:k.length;++ct<_t;){var Pt=k[ct];O(G,Pt,T(Pt),k)}return G}function de(k,O){for(var T=-1,G=k==null?0:k.length;++T<G&&O(k[T],T,k)!==!1;);return k}function jc(k,O){for(var T=k==null?0:k.length;T--&&O(k[T],T,k)!==!1;);return k}function vo(k,O){for(var T=-1,G=k==null?0:k.length;++T<G;)if(!O(k[T],T,k))return!1;return!0}function Je(k,O){for(var T=-1,G=k==null?0:k.length,ct=0,_t=[];++T<G;){var Pt=k[T];O(Pt,T,k)&&(_t[ct++]=Pt)}return _t}function sr(k,O){var T=k==null?0:k.length;return!!T&&yn(k,O,0)>-1}function mi(k,O,T){for(var G=-1,ct=k==null?0:k.length;++G<ct;)if(T(O,k[G]))return!0;return!1}function It(k,O){for(var T=-1,G=k==null?0:k.length,ct=Array(G);++T<G;)ct[T]=O(k[T],T,k);return ct}function Ve(k,O){for(var T=-1,G=O.length,ct=k.length;++T<G;)k[ct+T]=O[T];return k}function _i(k,O,T,G){var ct=-1,_t=k==null?0:k.length;for(G&&_t&&(T=k[++ct]);++ct<_t;)T=O(T,k[ct],ct,k);return T}function Zc(k,O,T,G){var ct=k==null?0:k.length;for(G&&ct&&(T=k[--ct]);ct--;)T=O(T,k[ct],ct,k);return T}function wi(k,O){for(var T=-1,G=k==null?0:k.length;++T<G;)if(O(k[T],T,k))return!0;return!1}var Qc=bi("length");function tf(k){return k.split("")}function ef(k){return k.match(cc)||[]}function yo(k,O,T){var G;return T(k,function(ct,_t,Pt){if(O(ct,_t,Pt))return G=_t,!1}),G}function or(k,O,T,G){for(var ct=k.length,_t=T+(G?1:-1);G?_t--:++_t<ct;)if(O(k[_t],_t,k))return _t;return-1}function yn(k,O,T){return O===O?df(k,O,T):or(k,mo,T)}function nf(k,O,T,G){for(var ct=T-1,_t=k.length;++ct<_t;)if(G(k[ct],O))return ct;return-1}function mo(k){return k!==k}function _o(k,O){var T=k==null?0:k.length;return T?Ci(k,O)/T:xe}function bi(k){return function(O){return O==null?n:O[k]}}function Si(k){return function(O){return k==null?n:k[O]}}function wo(k,O,T,G,ct){return ct(k,function(_t,Pt,Et){T=G?(G=!1,_t):O(T,_t,Pt,Et)}),T}function rf(k,O){var T=k.length;for(k.sort(O);T--;)k[T]=k[T].value;return k}function Ci(k,O){for(var T,G=-1,ct=k.length;++G<ct;){var _t=O(k[G]);_t!==n&&(T=T===n?_t:T+_t)}return T}function ki(k,O){for(var T=-1,G=Array(k);++T<k;)G[T]=O(T);return G}function sf(k,O){return It(O,function(T){return[T,k[T]]})}function bo(k){return k&&k.slice(0,Ao(k)+1).replace(fi,"")}function ue(k){return function(O){return k(O)}}function Ai(k,O){return It(O,function(T){return k[T]})}function Dn(k,O){return k.has(O)}function So(k,O){for(var T=-1,G=k.length;++T<G&&yn(O,k[T],0)>-1;);return T}function Co(k,O){for(var T=k.length;T--&&yn(O,k[T],0)>-1;);return T}function of(k,O){for(var T=k.length,G=0;T--;)k[T]===O&&++G;return G}var af=Si(Hc),uf=Si($c);function cf(k){return"\\"+zc[k]}function ff(k,O){return k==null?n:k[O]}function mn(k){return Mc.test(k)}function hf(k){return qc.test(k)}function lf(k){for(var O,T=[];!(O=k.next()).done;)T.push(O.value);return T}function Ei(k){var O=-1,T=Array(k.size);return k.forEach(function(G,ct){T[++O]=[ct,G]}),T}function ko(k,O){return function(T){return k(O(T))}}function Ye(k,O){for(var T=-1,G=k.length,ct=0,_t=[];++T<G;){var Pt=k[T];(Pt===O||Pt===_)&&(k[T]=_,_t[ct++]=T)}return _t}function ar(k){var O=-1,T=Array(k.size);return k.forEach(function(G){T[++O]=G}),T}function pf(k){var O=-1,T=Array(k.size);return k.forEach(function(G){T[++O]=[G,G]}),T}function df(k,O,T){for(var G=T-1,ct=k.length;++G<ct;)if(k[G]===O)return G;return-1}function gf(k,O,T){for(var G=T+1;G--;)if(k[G]===O)return G;return G}function _n(k){return mn(k)?yf(k):Qc(k)}function Ce(k){return mn(k)?mf(k):tf(k)}function Ao(k){for(var O=k.length;O--&&sc.test(k.charAt(O)););return O}var vf=Si(Gc);function yf(k){for(var O=gi.lastIndex=0;gi.test(k);)++O;return O}function mf(k){return k.match(gi)||[]}function _f(k){return k.match(Fc)||[]}var wf=function k(O){O=O==null?Wt:wn.defaults(Wt.Object(),O,wn.pick(Wt,Wc));var T=O.Array,G=O.Date,ct=O.Error,_t=O.Function,Pt=O.Math,Et=O.Object,Ti=O.RegExp,bf=O.String,ge=O.TypeError,ur=T.prototype,Sf=_t.prototype,bn=Et.prototype,cr=O["__core-js_shared__"],fr=Sf.toString,Ct=bn.hasOwnProperty,Cf=0,Eo=function(){var t=/[^.]+$/.exec(cr&&cr.keys&&cr.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),hr=bn.toString,kf=fr.call(Et),Af=Wt._,Ef=Ti("^"+fr.call(Ct).replace(ci,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),lr=uo?O.Buffer:n,je=O.Symbol,pr=O.Uint8Array,To=lr?lr.allocUnsafe:n,dr=ko(Et.getPrototypeOf,Et),xo=Et.create,Oo=bn.propertyIsEnumerable,gr=ur.splice,Ro=je?je.isConcatSpreadable:n,Pn=je?je.iterator:n,sn=je?je.toStringTag:n,vr=function(){try{var t=fn(Et,"defineProperty");return t({},"",{}),t}catch{}}(),Tf=O.clearTimeout!==Wt.clearTimeout&&O.clearTimeout,xf=G&&G.now!==Wt.Date.now&&G.now,Of=O.setTimeout!==Wt.setTimeout&&O.setTimeout,yr=Pt.ceil,mr=Pt.floor,xi=Et.getOwnPropertySymbols,Rf=lr?lr.isBuffer:n,Io=O.isFinite,If=ur.join,Lf=ko(Et.keys,Et),Ft=Pt.max,zt=Pt.min,Nf=G.now,Bf=O.parseInt,Lo=Pt.random,Uf=ur.reverse,Oi=fn(O,"DataView"),Fn=fn(O,"Map"),Ri=fn(O,"Promise"),Sn=fn(O,"Set"),Mn=fn(O,"WeakMap"),qn=fn(Et,"create"),_r=Mn&&new Mn,Cn={},Df=hn(Oi),Pf=hn(Fn),Ff=hn(Ri),Mf=hn(Sn),qf=hn(Mn),wr=je?je.prototype:n,Wn=wr?wr.valueOf:n,No=wr?wr.toString:n;function p(t){if(Nt(t)&&!ft(t)&&!(t instanceof vt)){if(t instanceof ve)return t;if(Ct.call(t,"__wrapped__"))return Ba(t)}return new ve(t)}var kn=function(){function t(){}return function(e){if(!Lt(e))return{};if(xo)return xo(e);t.prototype=e;var r=new t;return t.prototype=n,r}}();function br(){}function ve(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=n}p.templateSettings={escape:Qu,evaluate:tc,interpolate:Ws,variable:"",imports:{_:p}},p.prototype=br.prototype,p.prototype.constructor=p,ve.prototype=kn(br.prototype),ve.prototype.constructor=ve;function vt(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=se,this.__views__=[]}function Wf(){var t=new vt(this.__wrapped__);return t.__actions__=te(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=te(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=te(this.__views__),t}function Kf(){if(this.__filtered__){var t=new vt(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function Hf(){var t=this.__wrapped__.value(),e=this.__dir__,r=ft(t),o=e<0,c=r?t.length:0,d=el(0,c,this.__views__),w=d.start,C=d.end,A=C-w,R=o?C:w-1,I=this.__iteratees__,N=I.length,K=0,Y=zt(A,this.__takeCount__);if(!r||!o&&c==A&&Y==A)return ra(t,this.__actions__);var rt=[];t:for(;A--&&K<Y;){R+=e;for(var pt=-1,it=t[R];++pt<N;){var gt=I[pt],yt=gt.iteratee,he=gt.type,Qt=yt(it);if(he==kt)it=Qt;else if(!Qt){if(he==B)continue t;break t}}rt[K++]=it}return rt}vt.prototype=kn(br.prototype),vt.prototype.constructor=vt;function on(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}function $f(){this.__data__=qn?qn(null):{},this.size=0}function Gf(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function zf(t){var e=this.__data__;if(qn){var r=e[t];return r===S?n:r}return Ct.call(e,t)?e[t]:n}function Xf(t){var e=this.__data__;return qn?e[t]!==n:Ct.call(e,t)}function Jf(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=qn&&e===n?S:e,this}on.prototype.clear=$f,on.prototype.delete=Gf,on.prototype.get=zf,on.prototype.has=Xf,on.prototype.set=Jf;function Pe(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}function Vf(){this.__data__=[],this.size=0}function Yf(t){var e=this.__data__,r=Sr(e,t);if(r<0)return!1;var o=e.length-1;return r==o?e.pop():gr.call(e,r,1),--this.size,!0}function jf(t){var e=this.__data__,r=Sr(e,t);return r<0?n:e[r][1]}function Zf(t){return Sr(this.__data__,t)>-1}function Qf(t,e){var r=this.__data__,o=Sr(r,t);return o<0?(++this.size,r.push([t,e])):r[o][1]=e,this}Pe.prototype.clear=Vf,Pe.prototype.delete=Yf,Pe.prototype.get=jf,Pe.prototype.has=Zf,Pe.prototype.set=Qf;function Fe(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}function th(){this.size=0,this.__data__={hash:new on,map:new(Fn||Pe),string:new on}}function eh(t){var e=Br(this,t).delete(t);return this.size-=e?1:0,e}function nh(t){return Br(this,t).get(t)}function rh(t){return Br(this,t).has(t)}function ih(t,e){var r=Br(this,t),o=r.size;return r.set(t,e),this.size+=r.size==o?0:1,this}Fe.prototype.clear=th,Fe.prototype.delete=eh,Fe.prototype.get=nh,Fe.prototype.has=rh,Fe.prototype.set=ih;function an(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new Fe;++e<r;)this.add(t[e])}function sh(t){return this.__data__.set(t,S),this}function oh(t){return this.__data__.has(t)}an.prototype.add=an.prototype.push=sh,an.prototype.has=oh;function ke(t){var e=this.__data__=new Pe(t);this.size=e.size}function ah(){this.__data__=new Pe,this.size=0}function uh(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function ch(t){return this.__data__.get(t)}function fh(t){return this.__data__.has(t)}function hh(t,e){var r=this.__data__;if(r instanceof Pe){var o=r.__data__;if(!Fn||o.length<u-1)return o.push([t,e]),this.size=++r.size,this;r=this.__data__=new Fe(o)}return r.set(t,e),this.size=r.size,this}ke.prototype.clear=ah,ke.prototype.delete=uh,ke.prototype.get=ch,ke.prototype.has=fh,ke.prototype.set=hh;function Bo(t,e){var r=ft(t),o=!r&&ln(t),c=!r&&!o&&nn(t),d=!r&&!o&&!c&&xn(t),w=r||o||c||d,C=w?ki(t.length,bf):[],A=C.length;for(var R in t)(e||Ct.call(t,R))&&!(w&&(R=="length"||c&&(R=="offset"||R=="parent")||d&&(R=="buffer"||R=="byteLength"||R=="byteOffset")||Ke(R,A)))&&C.push(R);return C}function Uo(t){var e=t.length;return e?t[Wi(0,e-1)]:n}function lh(t,e){return Ur(te(t),un(e,0,t.length))}function ph(t){return Ur(te(t))}function Ii(t,e,r){(r!==n&&!Ae(t[e],r)||r===n&&!(e in t))&&Me(t,e,r)}function Kn(t,e,r){var o=t[e];(!(Ct.call(t,e)&&Ae(o,r))||r===n&&!(e in t))&&Me(t,e,r)}function Sr(t,e){for(var r=t.length;r--;)if(Ae(t[r][0],e))return r;return-1}function dh(t,e,r,o){return Ze(t,function(c,d,w){e(o,c,r(c),w)}),o}function Do(t,e){return t&&Le(e,Mt(e),t)}function gh(t,e){return t&&Le(e,ne(e),t)}function Me(t,e,r){e=="__proto__"&&vr?vr(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function Li(t,e){for(var r=-1,o=e.length,c=T(o),d=t==null;++r<o;)c[r]=d?n:ls(t,e[r]);return c}function un(t,e,r){return t===t&&(r!==n&&(t=t<=r?t:r),e!==n&&(t=t>=e?t:e)),t}function ye(t,e,r,o,c,d){var w,C=e&y,A=e&l,R=e&f;if(r&&(w=c?r(t,o,c,d):r(t)),w!==n)return w;if(!Lt(t))return t;var I=ft(t);if(I){if(w=rl(t),!C)return te(t,w)}else{var N=Xt(t),K=N==bt||N==Gt;if(nn(t))return oa(t,C);if(N==oe||N==F||K&&!c){if(w=A||K?{}:Aa(t),!C)return A?zh(t,gh(w,t)):Gh(t,Do(w,t))}else{if(!Tt[N])return c?t:{};w=il(t,N,C)}}d||(d=new ke);var Y=d.get(t);if(Y)return Y;d.set(t,w),tu(t)?t.forEach(function(it){w.add(ye(it,e,r,it,t,d))}):Za(t)&&t.forEach(function(it,gt){w.set(gt,ye(it,e,r,gt,t,d))});var rt=R?A?Zi:ji:A?ne:Mt,pt=I?n:rt(t);return de(pt||t,function(it,gt){pt&&(gt=it,it=t[gt]),Kn(w,gt,ye(it,e,r,gt,t,d))}),w}function vh(t){var e=Mt(t);return function(r){return Po(r,t,e)}}function Po(t,e,r){var o=r.length;if(t==null)return!o;for(t=Et(t);o--;){var c=r[o],d=e[c],w=t[c];if(w===n&&!(c in t)||!d(w))return!1}return!0}function Fo(t,e,r){if(typeof t!="function")throw new ge(m);return Vn(function(){t.apply(n,r)},e)}function Hn(t,e,r,o){var c=-1,d=sr,w=!0,C=t.length,A=[],R=e.length;if(!C)return A;r&&(e=It(e,ue(r))),o?(d=mi,w=!1):e.length>=u&&(d=Dn,w=!1,e=new an(e));t:for(;++c<C;){var I=t[c],N=r==null?I:r(I);if(I=o||I!==0?I:0,w&&N===N){for(var K=R;K--;)if(e[K]===N)continue t;A.push(I)}else d(e,N,o)||A.push(I)}return A}var Ze=ha(Ie),Mo=ha(Bi,!0);function yh(t,e){var r=!0;return Ze(t,function(o,c,d){return r=!!e(o,c,d),r}),r}function Cr(t,e,r){for(var o=-1,c=t.length;++o<c;){var d=t[o],w=e(d);if(w!=null&&(C===n?w===w&&!fe(w):r(w,C)))var C=w,A=d}return A}function mh(t,e,r,o){var c=t.length;for(r=ht(r),r<0&&(r=-r>c?0:c+r),o=o===n||o>c?c:ht(o),o<0&&(o+=c),o=r>o?0:nu(o);r<o;)t[r++]=e;return t}function qo(t,e){var r=[];return Ze(t,function(o,c,d){e(o,c,d)&&r.push(o)}),r}function Kt(t,e,r,o,c){var d=-1,w=t.length;for(r||(r=ol),c||(c=[]);++d<w;){var C=t[d];e>0&&r(C)?e>1?Kt(C,e-1,r,o,c):Ve(c,C):o||(c[c.length]=C)}return c}var Ni=la(),Wo=la(!0);function Ie(t,e){return t&&Ni(t,e,Mt)}function Bi(t,e){return t&&Wo(t,e,Mt)}function kr(t,e){return Je(e,function(r){return He(t[r])})}function cn(t,e){e=tn(e,t);for(var r=0,o=e.length;t!=null&&r<o;)t=t[Ne(e[r++])];return r&&r==o?t:n}function Ko(t,e,r){var o=e(t);return ft(t)?o:Ve(o,r(t))}function jt(t){return t==null?t===n?Bn:Ln:sn&&sn in Et(t)?tl(t):pl(t)}function Ui(t,e){return t>e}function _h(t,e){return t!=null&&Ct.call(t,e)}function wh(t,e){return t!=null&&e in Et(t)}function bh(t,e,r){return t>=zt(e,r)&&t<Ft(e,r)}function Di(t,e,r){for(var o=r?mi:sr,c=t[0].length,d=t.length,w=d,C=T(d),A=1/0,R=[];w--;){var I=t[w];w&&e&&(I=It(I,ue(e))),A=zt(I.length,A),C[w]=!r&&(e||c>=120&&I.length>=120)?new an(w&&I):n}I=t[0];var N=-1,K=C[0];t:for(;++N<c&&R.length<A;){var Y=I[N],rt=e?e(Y):Y;if(Y=r||Y!==0?Y:0,!(K?Dn(K,rt):o(R,rt,r))){for(w=d;--w;){var pt=C[w];if(!(pt?Dn(pt,rt):o(t[w],rt,r)))continue t}K&&K.push(rt),R.push(Y)}}return R}function Sh(t,e,r,o){return Ie(t,function(c,d,w){e(o,r(c),d,w)}),o}function $n(t,e,r){e=tn(e,t),t=Oa(t,e);var o=t==null?t:t[Ne(_e(e))];return o==null?n:ae(o,t,r)}function Ho(t){return Nt(t)&&jt(t)==F}function Ch(t){return Nt(t)&&jt(t)==Xe}function kh(t){return Nt(t)&&jt(t)==tt}function Gn(t,e,r,o,c){return t===e?!0:t==null||e==null||!Nt(t)&&!Nt(e)?t!==t&&e!==e:Ah(t,e,r,o,Gn,c)}function Ah(t,e,r,o,c,d){var w=ft(t),C=ft(e),A=w?et:Xt(t),R=C?et:Xt(e);A=A==F?oe:A,R=R==F?oe:R;var I=A==oe,N=R==oe,K=A==R;if(K&&nn(t)){if(!nn(e))return!1;w=!0,I=!1}if(K&&!I)return d||(d=new ke),w||xn(t)?Sa(t,e,r,o,c,d):Zh(t,e,A,r,o,c,d);if(!(r&b)){var Y=I&&Ct.call(t,"__wrapped__"),rt=N&&Ct.call(e,"__wrapped__");if(Y||rt){var pt=Y?t.value():t,it=rt?e.value():e;return d||(d=new ke),c(pt,it,r,o,d)}}return K?(d||(d=new ke),Qh(t,e,r,o,c,d)):!1}function Eh(t){return Nt(t)&&Xt(t)==Rt}function Pi(t,e,r,o){var c=r.length,d=c,w=!o;if(t==null)return!d;for(t=Et(t);c--;){var C=r[c];if(w&&C[2]?C[1]!==t[C[0]]:!(C[0]in t))return!1}for(;++c<d;){C=r[c];var A=C[0],R=t[A],I=C[1];if(w&&C[2]){if(R===n&&!(A in t))return!1}else{var N=new ke;if(o)var K=o(R,I,A,t,e,N);if(!(K===n?Gn(I,R,b|E,o,N):K))return!1}}return!0}function $o(t){if(!Lt(t)||ul(t))return!1;var e=He(t)?Ef:gc;return e.test(hn(t))}function Th(t){return Nt(t)&&jt(t)==Vt}function xh(t){return Nt(t)&&Xt(t)==Yt}function Oh(t){return Nt(t)&&Wr(t.length)&&!!xt[jt(t)]}function Go(t){return typeof t=="function"?t:t==null?re:typeof t=="object"?ft(t)?Jo(t[0],t[1]):Xo(t):pu(t)}function Fi(t){if(!Jn(t))return Lf(t);var e=[];for(var r in Et(t))Ct.call(t,r)&&r!="constructor"&&e.push(r);return e}function Rh(t){if(!Lt(t))return ll(t);var e=Jn(t),r=[];for(var o in t)o=="constructor"&&(e||!Ct.call(t,o))||r.push(o);return r}function Mi(t,e){return t<e}function zo(t,e){var r=-1,o=ee(t)?T(t.length):[];return Ze(t,function(c,d,w){o[++r]=e(c,d,w)}),o}function Xo(t){var e=ts(t);return e.length==1&&e[0][2]?Ta(e[0][0],e[0][1]):function(r){return r===t||Pi(r,t,e)}}function Jo(t,e){return ns(t)&&Ea(e)?Ta(Ne(t),e):function(r){var o=ls(r,t);return o===n&&o===e?ps(r,t):Gn(e,o,b|E)}}function Ar(t,e,r,o,c){t!==e&&Ni(e,function(d,w){if(c||(c=new ke),Lt(d))Ih(t,e,w,r,Ar,o,c);else{var C=o?o(is(t,w),d,w+"",t,e,c):n;C===n&&(C=d),Ii(t,w,C)}},ne)}function Ih(t,e,r,o,c,d,w){var C=is(t,r),A=is(e,r),R=w.get(A);if(R){Ii(t,r,R);return}var I=d?d(C,A,r+"",t,e,w):n,N=I===n;if(N){var K=ft(A),Y=!K&&nn(A),rt=!K&&!Y&&xn(A);I=A,K||Y||rt?ft(C)?I=C:Bt(C)?I=te(C):Y?(N=!1,I=oa(A,!0)):rt?(N=!1,I=aa(A,!0)):I=[]:Yn(A)||ln(A)?(I=C,ln(C)?I=ru(C):(!Lt(C)||He(C))&&(I=Aa(A))):N=!1}N&&(w.set(A,I),c(I,A,o,d,w),w.delete(A)),Ii(t,r,I)}function Vo(t,e){var r=t.length;if(r)return e+=e<0?r:0,Ke(e,r)?t[e]:n}function Yo(t,e,r){e.length?e=It(e,function(d){return ft(d)?function(w){return cn(w,d.length===1?d[0]:d)}:d}):e=[re];var o=-1;e=It(e,ue(nt()));var c=zo(t,function(d,w,C){var A=It(e,function(R){return R(d)});return{criteria:A,index:++o,value:d}});return rf(c,function(d,w){return $h(d,w,r)})}function Lh(t,e){return jo(t,e,function(r,o){return ps(t,o)})}function jo(t,e,r){for(var o=-1,c=e.length,d={};++o<c;){var w=e[o],C=cn(t,w);r(C,w)&&zn(d,tn(w,t),C)}return d}function Nh(t){return function(e){return cn(e,t)}}function qi(t,e,r,o){var c=o?nf:yn,d=-1,w=e.length,C=t;for(t===e&&(e=te(e)),r&&(C=It(t,ue(r)));++d<w;)for(var A=0,R=e[d],I=r?r(R):R;(A=c(C,I,A,o))>-1;)C!==t&&gr.call(C,A,1),gr.call(t,A,1);return t}function Zo(t,e){for(var r=t?e.length:0,o=r-1;r--;){var c=e[r];if(r==o||c!==d){var d=c;Ke(c)?gr.call(t,c,1):$i(t,c)}}return t}function Wi(t,e){return t+mr(Lo()*(e-t+1))}function Bh(t,e,r,o){for(var c=-1,d=Ft(yr((e-t)/(r||1)),0),w=T(d);d--;)w[o?d:++c]=t,t+=r;return w}function Ki(t,e){var r="";if(!t||e<1||e>ut)return r;do e%2&&(r+=t),e=mr(e/2),e&&(t+=t);while(e);return r}function dt(t,e){return ss(xa(t,e,re),t+"")}function Uh(t){return Uo(On(t))}function Dh(t,e){var r=On(t);return Ur(r,un(e,0,r.length))}function zn(t,e,r,o){if(!Lt(t))return t;e=tn(e,t);for(var c=-1,d=e.length,w=d-1,C=t;C!=null&&++c<d;){var A=Ne(e[c]),R=r;if(A==="__proto__"||A==="constructor"||A==="prototype")return t;if(c!=w){var I=C[A];R=o?o(I,A,C):n,R===n&&(R=Lt(I)?I:Ke(e[c+1])?[]:{})}Kn(C,A,R),C=C[A]}return t}var Qo=_r?function(t,e){return _r.set(t,e),t}:re,Ph=vr?function(t,e){return vr(t,"toString",{configurable:!0,enumerable:!1,value:gs(e),writable:!0})}:re;function Fh(t){return Ur(On(t))}function me(t,e,r){var o=-1,c=t.length;e<0&&(e=-e>c?0:c+e),r=r>c?c:r,r<0&&(r+=c),c=e>r?0:r-e>>>0,e>>>=0;for(var d=T(c);++o<c;)d[o]=t[o+e];return d}function Mh(t,e){var r;return Ze(t,function(o,c,d){return r=e(o,c,d),!r}),!!r}function Er(t,e,r){var o=0,c=t==null?o:t.length;if(typeof e=="number"&&e===e&&c<=q){for(;o<c;){var d=o+c>>>1,w=t[d];w!==null&&!fe(w)&&(r?w<=e:w<e)?o=d+1:c=d}return c}return Hi(t,e,re,r)}function Hi(t,e,r,o){var c=0,d=t==null?0:t.length;if(d===0)return 0;e=r(e);for(var w=e!==e,C=e===null,A=fe(e),R=e===n;c<d;){var I=mr((c+d)/2),N=r(t[I]),K=N!==n,Y=N===null,rt=N===N,pt=fe(N);if(w)var it=o||rt;else R?it=rt&&(o||K):C?it=rt&&K&&(o||!Y):A?it=rt&&K&&!Y&&(o||!pt):Y||pt?it=!1:it=o?N<=e:N<e;it?c=I+1:d=I}return zt(d,er)}function ta(t,e){for(var r=-1,o=t.length,c=0,d=[];++r<o;){var w=t[r],C=e?e(w):w;if(!r||!Ae(C,A)){var A=C;d[c++]=w===0?0:w}}return d}function ea(t){return typeof t=="number"?t:fe(t)?xe:+t}function ce(t){if(typeof t=="string")return t;if(ft(t))return It(t,ce)+"";if(fe(t))return No?No.call(t):"";var e=t+"";return e=="0"&&1/t==-Ot?"-0":e}function Qe(t,e,r){var o=-1,c=sr,d=t.length,w=!0,C=[],A=C;if(r)w=!1,c=mi;else if(d>=u){var R=e?null:Yh(t);if(R)return ar(R);w=!1,c=Dn,A=new an}else A=e?[]:C;t:for(;++o<d;){var I=t[o],N=e?e(I):I;if(I=r||I!==0?I:0,w&&N===N){for(var K=A.length;K--;)if(A[K]===N)continue t;e&&A.push(N),C.push(I)}else c(A,N,r)||(A!==C&&A.push(N),C.push(I))}return C}function $i(t,e){return e=tn(e,t),t=Oa(t,e),t==null||delete t[Ne(_e(e))]}function na(t,e,r,o){return zn(t,e,r(cn(t,e)),o)}function Tr(t,e,r,o){for(var c=t.length,d=o?c:-1;(o?d--:++d<c)&&e(t[d],d,t););return r?me(t,o?0:d,o?d+1:c):me(t,o?d+1:0,o?c:d)}function ra(t,e){var r=t;return r instanceof vt&&(r=r.value()),_i(e,function(o,c){return c.func.apply(c.thisArg,Ve([o],c.args))},r)}function Gi(t,e,r){var o=t.length;if(o<2)return o?Qe(t[0]):[];for(var c=-1,d=T(o);++c<o;)for(var w=t[c],C=-1;++C<o;)C!=c&&(d[c]=Hn(d[c]||w,t[C],e,r));return Qe(Kt(d,1),e,r)}function ia(t,e,r){for(var o=-1,c=t.length,d=e.length,w={};++o<c;){var C=o<d?e[o]:n;r(w,t[o],C)}return w}function zi(t){return Bt(t)?t:[]}function Xi(t){return typeof t=="function"?t:re}function tn(t,e){return ft(t)?t:ns(t,e)?[t]:Na(St(t))}var qh=dt;function en(t,e,r){var o=t.length;return r=r===n?o:r,!e&&r>=o?t:me(t,e,r)}var sa=Tf||function(t){return Wt.clearTimeout(t)};function oa(t,e){if(e)return t.slice();var r=t.length,o=To?To(r):new t.constructor(r);return t.copy(o),o}function Ji(t){var e=new t.constructor(t.byteLength);return new pr(e).set(new pr(t)),e}function Wh(t,e){var r=e?Ji(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}function Kh(t){var e=new t.constructor(t.source,Ks.exec(t));return e.lastIndex=t.lastIndex,e}function Hh(t){return Wn?Et(Wn.call(t)):{}}function aa(t,e){var r=e?Ji(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function ua(t,e){if(t!==e){var r=t!==n,o=t===null,c=t===t,d=fe(t),w=e!==n,C=e===null,A=e===e,R=fe(e);if(!C&&!R&&!d&&t>e||d&&w&&A&&!C&&!R||o&&w&&A||!r&&A||!c)return 1;if(!o&&!d&&!R&&t<e||R&&r&&c&&!o&&!d||C&&r&&c||!w&&c||!A)return-1}return 0}function $h(t,e,r){for(var o=-1,c=t.criteria,d=e.criteria,w=c.length,C=r.length;++o<w;){var A=ua(c[o],d[o]);if(A){if(o>=C)return A;var R=r[o];return A*(R=="desc"?-1:1)}}return t.index-e.index}function ca(t,e,r,o){for(var c=-1,d=t.length,w=r.length,C=-1,A=e.length,R=Ft(d-w,0),I=T(A+R),N=!o;++C<A;)I[C]=e[C];for(;++c<w;)(N||c<d)&&(I[r[c]]=t[c]);for(;R--;)I[C++]=t[c++];return I}function fa(t,e,r,o){for(var c=-1,d=t.length,w=-1,C=r.length,A=-1,R=e.length,I=Ft(d-C,0),N=T(I+R),K=!o;++c<I;)N[c]=t[c];for(var Y=c;++A<R;)N[Y+A]=e[A];for(;++w<C;)(K||c<d)&&(N[Y+r[w]]=t[c++]);return N}function te(t,e){var r=-1,o=t.length;for(e||(e=T(o));++r<o;)e[r]=t[r];return e}function Le(t,e,r,o){var c=!r;r||(r={});for(var d=-1,w=e.length;++d<w;){var C=e[d],A=o?o(r[C],t[C],C,r,t):n;A===n&&(A=t[C]),c?Me(r,C,A):Kn(r,C,A)}return r}function Gh(t,e){return Le(t,es(t),e)}function zh(t,e){return Le(t,Ca(t),e)}function xr(t,e){return function(r,o){var c=ft(r)?Yc:dh,d=e?e():{};return c(r,t,nt(o,2),d)}}function An(t){return dt(function(e,r){var o=-1,c=r.length,d=c>1?r[c-1]:n,w=c>2?r[2]:n;for(d=t.length>3&&typeof d=="function"?(c--,d):n,w&&Zt(r[0],r[1],w)&&(d=c<3?n:d,c=1),e=Et(e);++o<c;){var C=r[o];C&&t(e,C,o,d)}return e})}function ha(t,e){return function(r,o){if(r==null)return r;if(!ee(r))return t(r,o);for(var c=r.length,d=e?c:-1,w=Et(r);(e?d--:++d<c)&&o(w[d],d,w)!==!1;);return r}}function la(t){return function(e,r,o){for(var c=-1,d=Et(e),w=o(e),C=w.length;C--;){var A=w[t?C:++c];if(r(d[A],A,d)===!1)break}return e}}function Xh(t,e,r){var o=e&x,c=Xn(t);function d(){var w=this&&this!==Wt&&this instanceof d?c:t;return w.apply(o?r:this,arguments)}return d}function pa(t){return function(e){e=St(e);var r=mn(e)?Ce(e):n,o=r?r[0]:e.charAt(0),c=r?en(r,1).join(""):e.slice(1);return o[t]()+c}}function En(t){return function(e){return _i(hu(fu(e).replace(Dc,"")),t,"")}}function Xn(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var r=kn(t.prototype),o=t.apply(r,e);return Lt(o)?o:r}}function Jh(t,e,r){var o=Xn(t);function c(){for(var d=arguments.length,w=T(d),C=d,A=Tn(c);C--;)w[C]=arguments[C];var R=d<3&&w[0]!==A&&w[d-1]!==A?[]:Ye(w,A);if(d-=R.length,d<r)return ma(t,e,Or,c.placeholder,n,w,R,n,n,r-d);var I=this&&this!==Wt&&this instanceof c?o:t;return ae(I,this,w)}return c}function da(t){return function(e,r,o){var c=Et(e);if(!ee(e)){var d=nt(r,3);e=Mt(e),r=function(C){return d(c[C],C,c)}}var w=t(e,r,o);return w>-1?c[d?e[w]:w]:n}}function ga(t){return We(function(e){var r=e.length,o=r,c=ve.prototype.thru;for(t&&e.reverse();o--;){var d=e[o];if(typeof d!="function")throw new ge(m);if(c&&!w&&Nr(d)=="wrapper")var w=new ve([],!0)}for(o=w?o:r;++o<r;){d=e[o];var C=Nr(d),A=C=="wrapper"?Qi(d):n;A&&rs(A[0])&&A[1]==(M|V|$|H)&&!A[4].length&&A[9]==1?w=w[Nr(A[0])].apply(w,A[3]):w=d.length==1&&rs(d)?w[C]():w.thru(d)}return function(){var R=arguments,I=R[0];if(w&&R.length==1&&ft(I))return w.plant(I).value();for(var N=0,K=r?e[N].apply(this,R):I;++N<r;)K=e[N].call(this,K);return K}})}function Or(t,e,r,o,c,d,w,C,A,R){var I=e&M,N=e&x,K=e&W,Y=e&(V|ot),rt=e&L,pt=K?n:Xn(t);function it(){for(var gt=arguments.length,yt=T(gt),he=gt;he--;)yt[he]=arguments[he];if(Y)var Qt=Tn(it),le=of(yt,Qt);if(o&&(yt=ca(yt,o,c,Y)),d&&(yt=fa(yt,d,w,Y)),gt-=le,Y&><R){var Ut=Ye(yt,Qt);return ma(t,e,Or,it.placeholder,r,yt,Ut,C,A,R-gt)}var Ee=N?r:this,Ge=K?Ee[t]:t;return gt=yt.length,C?yt=dl(yt,C):rt&>>1&&yt.reverse(),I&&A<gt&&(yt.length=A),this&&this!==Wt&&this instanceof it&&(Ge=pt||Xn(Ge)),Ge.apply(Ee,yt)}return it}function va(t,e){return function(r,o){return Sh(r,t,e(o),{})}}function Rr(t,e){return function(r,o){var c;if(r===n&&o===n)return e;if(r!==n&&(c=r),o!==n){if(c===n)return o;typeof r=="string"||typeof o=="string"?(r=ce(r),o=ce(o)):(r=ea(r),o=ea(o)),c=t(r,o)}return c}}function Vi(t){return We(function(e){return e=It(e,ue(nt())),dt(function(r){var o=this;return t(e,function(c){return ae(c,o,r)})})})}function Ir(t,e){e=e===n?" ":ce(e);var r=e.length;if(r<2)return r?Ki(e,t):e;var o=Ki(e,yr(t/_n(e)));return mn(e)?en(Ce(o),0,t).join(""):o.slice(0,t)}function Vh(t,e,r,o){var c=e&x,d=Xn(t);function w(){for(var C=-1,A=arguments.length,R=-1,I=o.length,N=T(I+A),K=this&&this!==Wt&&this instanceof w?d:t;++R<I;)N[R]=o[R];for(;A--;)N[R++]=arguments[++C];return ae(K,c?r:this,N)}return w}function ya(t){return function(e,r,o){return o&&typeof o!="number"&&Zt(e,r,o)&&(r=o=n),e=$e(e),r===n?(r=e,e=0):r=$e(r),o=o===n?e<r?1:-1:$e(o),Bh(e,r,o,t)}}function Lr(t){return function(e,r){return typeof e=="string"&&typeof r=="string"||(e=we(e),r=we(r)),t(e,r)}}function ma(t,e,r,o,c,d,w,C,A,R){var I=e&V,N=I?w:n,K=I?n:w,Y=I?d:n,rt=I?n:d;e|=I?$:D,e&=~(I?D:$),e&st||(e&=~(x|W));var pt=[t,e,c,Y,N,rt,K,C,A,R],it=r.apply(n,pt);return rs(t)&&Ra(it,pt),it.placeholder=o,Ia(it,t,e)}function Yi(t){var e=Pt[t];return function(r,o){if(r=we(r),o=o==null?0:zt(ht(o),292),o&&Io(r)){var c=(St(r)+"e").split("e"),d=e(c[0]+"e"+(+c[1]+o));return c=(St(d)+"e").split("e"),+(c[0]+"e"+(+c[1]-o))}return e(r)}}var Yh=Sn&&1/ar(new Sn([,-0]))[1]==Ot?function(t){return new Sn(t)}:ms;function _a(t){return function(e){var r=Xt(e);return r==Rt?Ei(e):r==Yt?pf(e):sf(e,t(e))}}function qe(t,e,r,o,c,d,w,C){var A=e&W;if(!A&&typeof t!="function")throw new ge(m);var R=o?o.length:0;if(R||(e&=~($|D),o=c=n),w=w===n?w:Ft(ht(w),0),C=C===n?C:ht(C),R-=c?c.length:0,e&D){var I=o,N=c;o=c=n}var K=A?n:Qi(t),Y=[t,e,r,o,c,I,N,d,w,C];if(K&&hl(Y,K),t=Y[0],e=Y[1],r=Y[2],o=Y[3],c=Y[4],C=Y[9]=Y[9]===n?A?0:t.length:Ft(Y[9]-R,0),!C&&e&(V|ot)&&(e&=~(V|ot)),!e||e==x)var rt=Xh(t,e,r);else e==V||e==ot?rt=Jh(t,e,C):(e==$||e==(x|$))&&!c.length?rt=Vh(t,e,r,o):rt=Or.apply(n,Y);var pt=K?Qo:Ra;return Ia(pt(rt,Y),t,e)}function wa(t,e,r,o){return t===n||Ae(t,bn[r])&&!Ct.call(o,r)?e:t}function ba(t,e,r,o,c,d){return Lt(t)&&Lt(e)&&(d.set(e,t),Ar(t,e,n,ba,d),d.delete(e)),t}function jh(t){return Yn(t)?n:t}function Sa(t,e,r,o,c,d){var w=r&b,C=t.length,A=e.length;if(C!=A&&!(w&&A>C))return!1;var R=d.get(t),I=d.get(e);if(R&&I)return R==e&&I==t;var N=-1,K=!0,Y=r&E?new an:n;for(d.set(t,e),d.set(e,t);++N<C;){var rt=t[N],pt=e[N];if(o)var it=w?o(pt,rt,N,e,t,d):o(rt,pt,N,t,e,d);if(it!==n){if(it)continue;K=!1;break}if(Y){if(!wi(e,function(gt,yt){if(!Dn(Y,yt)&&(rt===gt||c(rt,gt,r,o,d)))return Y.push(yt)})){K=!1;break}}else if(!(rt===pt||c(rt,pt,r,o,d))){K=!1;break}}return d.delete(t),d.delete(e),K}function Zh(t,e,r,o,c,d,w){switch(r){case gn:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Xe:return!(t.byteLength!=e.byteLength||!d(new pr(t),new pr(e)));case Z:case tt:case Se:return Ae(+t,+e);case at:return t.name==e.name&&t.message==e.message;case Vt:case Oe:return t==e+"";case Rt:var C=Ei;case Yt:var A=o&b;if(C||(C=ar),t.size!=e.size&&!A)return!1;var R=w.get(t);if(R)return R==e;o|=E,w.set(t,e);var I=Sa(C(t),C(e),o,c,d,w);return w.delete(t),I;case Re:if(Wn)return Wn.call(t)==Wn.call(e)}return!1}function Qh(t,e,r,o,c,d){var w=r&b,C=ji(t),A=C.length,R=ji(e),I=R.length;if(A!=I&&!w)return!1;for(var N=A;N--;){var K=C[N];if(!(w?K in e:Ct.call(e,K)))return!1}var Y=d.get(t),rt=d.get(e);if(Y&&rt)return Y==e&&rt==t;var pt=!0;d.set(t,e),d.set(e,t);for(var it=w;++N<A;){K=C[N];var gt=t[K],yt=e[K];if(o)var he=w?o(yt,gt,K,e,t,d):o(gt,yt,K,t,e,d);if(!(he===n?gt===yt||c(gt,yt,r,o,d):he)){pt=!1;break}it||(it=K=="constructor")}if(pt&&!it){var Qt=t.constructor,le=e.constructor;Qt!=le&&"constructor"in t&&"constructor"in e&&!(typeof Qt=="function"&&Qt instanceof Qt&&typeof le=="function"&&le instanceof le)&&(pt=!1)}return d.delete(t),d.delete(e),pt}function We(t){return ss(xa(t,n,Pa),t+"")}function ji(t){return Ko(t,Mt,es)}function Zi(t){return Ko(t,ne,Ca)}var Qi=_r?function(t){return _r.get(t)}:ms;function Nr(t){for(var e=t.name+"",r=Cn[e],o=Ct.call(Cn,e)?r.length:0;o--;){var c=r[o],d=c.func;if(d==null||d==t)return c.name}return e}function Tn(t){var e=Ct.call(p,"placeholder")?p:t;return e.placeholder}function nt(){var t=p.iteratee||vs;return t=t===vs?Go:t,arguments.length?t(arguments[0],arguments[1]):t}function Br(t,e){var r=t.__data__;return al(e)?r[typeof e=="string"?"string":"hash"]:r.map}function ts(t){for(var e=Mt(t),r=e.length;r--;){var o=e[r],c=t[o];e[r]=[o,c,Ea(c)]}return e}function fn(t,e){var r=ff(t,e);return $o(r)?r:n}function tl(t){var e=Ct.call(t,sn),r=t[sn];try{t[sn]=n;var o=!0}catch{}var c=hr.call(t);return o&&(e?t[sn]=r:delete t[sn]),c}var es=xi?function(t){return t==null?[]:(t=Et(t),Je(xi(t),function(e){return Oo.call(t,e)}))}:_s,Ca=xi?function(t){for(var e=[];t;)Ve(e,es(t)),t=dr(t);return e}:_s,Xt=jt;(Oi&&Xt(new Oi(new ArrayBuffer(1)))!=gn||Fn&&Xt(new Fn)!=Rt||Ri&&Xt(Ri.resolve())!=dn||Sn&&Xt(new Sn)!=Yt||Mn&&Xt(new Mn)!=De)&&(Xt=function(t){var e=jt(t),r=e==oe?t.constructor:n,o=r?hn(r):"";if(o)switch(o){case Df:return gn;case Pf:return Rt;case Ff:return dn;case Mf:return Yt;case qf:return De}return e});function el(t,e,r){for(var o=-1,c=r.length;++o<c;){var d=r[o],w=d.size;switch(d.type){case"drop":t+=w;break;case"dropRight":e-=w;break;case"take":e=zt(e,t+w);break;case"takeRight":t=Ft(t,e-w);break}}return{start:t,end:e}}function nl(t){var e=t.match(ac);return e?e[1].split(uc):[]}function ka(t,e,r){e=tn(e,t);for(var o=-1,c=e.length,d=!1;++o<c;){var w=Ne(e[o]);if(!(d=t!=null&&r(t,w)))break;t=t[w]}return d||++o!=c?d:(c=t==null?0:t.length,!!c&&Wr(c)&&Ke(w,c)&&(ft(t)||ln(t)))}function rl(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&Ct.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function Aa(t){return typeof t.constructor=="function"&&!Jn(t)?kn(dr(t)):{}}function il(t,e,r){var o=t.constructor;switch(e){case Xe:return Ji(t);case Z:case tt:return new o(+t);case gn:return Wh(t,r);case ti:case ei:case ni:case ri:case ii:case si:case oi:case ai:case ui:return aa(t,r);case Rt:return new o;case Se:case Oe:return new o(t);case Vt:return Kh(t);case Yt:return new o;case Re:return Hh(t)}}function sl(t,e){var r=e.length;if(!r)return t;var o=r-1;return e[o]=(r>1?"& ":"")+e[o],e=e.join(r>2?", ":" "),t.replace(oc,`{
|
|
14
14
|
/* [wrapped with `+e+`] */
|
|
15
|
-
`)}function Vl(t){return ht(t)||_n(t)||!!(ia&&t&&t[ia])}function ze(t,e){var i=typeof t;return e=e??ut,!!e&&(i=="number"||i!="symbol"&&uf.test(t))&&t>-1&&t%1==0&&t<e}function ee(t,e,i){if(!Bt(i))return!1;var a=typeof e;return(a=="number"?ie(i)&&ze(e,i.length):a=="string"&&e in i)?Te(i[e],t):!1}function Co(t,e){if(ht(t))return!1;var i=typeof t;return i=="number"||i=="symbol"||i=="boolean"||t==null||pe(t)?!0:$u.test(t)||!Gu.test(t)||e!=null&&t in Tt(e)}function Zl(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function So(t){var e=jr(t),i=y[e];if(typeof i!="function"||!(e in mt.prototype))return!1;if(t===i)return!0;var a=_o(i);return!!a&&t===a[0]}function Ql(t){return!!ta&&ta in t}var tp=Ar?Xe:qo;function cr(t){var e=t&&t.constructor,i=typeof e=="function"&&e.prototype||Rn;return t===i}function tc(t){return t===t&&!Bt(t)}function ec(t,e){return function(i){return i==null?!1:i[t]===e&&(e!==n||t in Tt(i))}}function ep(t){var e=ei(t,function(a){return i.size===p&&i.clear(),a}),i=e.cache;return e}function np(t,e){var i=t[1],a=e[1],h=i|a,m=h<(k|L|I),C=a==I&&i==J||a==I&&i==P&&t[7].length<=e[8]||a==(I|P)&&e[7].length<=e[8]&&i==J;if(!(m||C))return t;a&k&&(t[2]=e[2],h|=i&k?0:Y);var S=e[3];if(S){var E=t[3];t[3]=E?Pa(E,S,e[4]):S,t[4]=E?Qe(t[3],_):e[4]}return S=e[5],S&&(E=t[5],t[5]=E?Fa(E,S,e[6]):S,t[6]=E?Qe(t[5],_):e[6]),S=e[7],S&&(t[7]=S),a&I&&(t[8]=t[8]==null?e[8]:Jt(t[8],e[8])),t[9]==null&&(t[9]=e[9]),t[0]=e[0],t[1]=h,t}function rp(t){var e=[];if(t!=null)for(var i in Tt(t))e.push(i);return e}function ip(t){return Er.call(t)}function nc(t,e,i){return e=Mt(e===n?t.length-1:e,0),function(){for(var a=arguments,h=-1,m=Mt(a.length-e,0),C=O(m);++h<m;)C[h]=a[e+h];h=-1;for(var S=O(e+1);++h<e;)S[h]=a[h];return S[e]=i(C),fe(t,this,S)}}function rc(t,e){return e.length<2?t:yn(t,be(e,0,-1))}function op(t,e){for(var i=t.length,a=Jt(e.length,i),h=re(t);a--;){var m=e[a];t[a]=ze(m,i)?h[m]:n}return t}function ko(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var ic=sc(Ea),ur=wh||function(t,e){return Kt.setTimeout(t,e)},Ao=sc(Tl);function oc(t,e,i){var a=e+"";return Ao(t,Yl(a,sp($l(a),i)))}function sc(t){var e=0,i=0;return function(){var a=kh(),h=G-(a-i);if(i=a,h>0){if(++e>=z)return arguments[0]}else e=0;return t.apply(n,arguments)}}function Vr(t,e){var i=-1,a=t.length,h=a-1;for(e=e===n?a:e;++i<e;){var m=so(i,h),C=t[m];t[m]=t[i],t[i]=C}return t.length=e,t}var ac=ep(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Ju,function(i,a,h,m){e.push(h?m.replace(nf,"$1"):a||i)}),e});function De(t){if(typeof t=="string"||pe(t))return t;var e=t+"";return e=="0"&&1/t==-xt?"-0":e}function mn(t){if(t!=null){try{return xr.call(t)}catch{}try{return t+""}catch{}}return""}function sp(t,e){return ve(Q,function(i){var a="_."+i[0];e&i[1]&&!br(t,a)&&t.push(a)}),t.sort()}function cc(t){if(t instanceof mt)return t.clone();var e=new _e(t.__wrapped__,t.__chain__);return e.__actions__=re(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}function ap(t,e,i){(i?ee(t,e,i):e===n)?e=1:e=Mt(dt(e),0);var a=t==null?0:t.length;if(!a||e<1)return[];for(var h=0,m=0,C=O(Br(a/e));h<a;)C[m++]=be(t,h,h+=e);return C}function cp(t){for(var e=-1,i=t==null?0:t.length,a=0,h=[];++e<i;){var m=t[e];m&&(h[a++]=m)}return h}function up(){var t=arguments.length;if(!t)return[];for(var e=O(t-1),i=arguments[0],a=t;a--;)e[a-1]=arguments[a];return Ze(ht(i)?re(i):[i],zt(e,1))}var fp=yt(function(t,e){return Ut(t)?rr(t,zt(e,1,Ut,!0)):[]}),hp=yt(function(t,e){var i=Ce(e);return Ut(i)&&(i=n),Ut(t)?rr(t,zt(e,1,Ut,!0),it(i,2)):[]}),lp=yt(function(t,e){var i=Ce(e);return Ut(i)&&(i=n),Ut(t)?rr(t,zt(e,1,Ut,!0),n,i):[]});function pp(t,e,i){var a=t==null?0:t.length;return a?(e=i||e===n?1:dt(e),be(t,e<0?0:e,a)):[]}function dp(t,e,i){var a=t==null?0:t.length;return a?(e=i||e===n?1:dt(e),e=a-e,be(t,0,e<0?0:e)):[]}function gp(t,e){return t&&t.length?Kr(t,it(e,3),!0,!0):[]}function yp(t,e){return t&&t.length?Kr(t,it(e,3),!0):[]}function vp(t,e,i,a){var h=t==null?0:t.length;return h?(i&&typeof i!="number"&&ee(t,e,i)&&(i=0,a=h),ul(t,e,i,a)):[]}function uc(t,e,i){var a=t==null?0:t.length;if(!a)return-1;var h=i==null?0:dt(i);return h<0&&(h=Mt(a+h,0)),Cr(t,it(e,3),h)}function fc(t,e,i){var a=t==null?0:t.length;if(!a)return-1;var h=a-1;return i!==n&&(h=dt(i),h=i<0?Mt(a+h,0):Jt(h,a-1)),Cr(t,it(e,3),h,!0)}function hc(t){var e=t==null?0:t.length;return e?zt(t,1):[]}function mp(t){var e=t==null?0:t.length;return e?zt(t,xt):[]}function _p(t,e){var i=t==null?0:t.length;return i?(e=e===n?1:dt(e),zt(t,e)):[]}function wp(t){for(var e=-1,i=t==null?0:t.length,a={};++e<i;){var h=t[e];a[h[0]]=h[1]}return a}function lc(t){return t&&t.length?t[0]:n}function bp(t,e,i){var a=t==null?0:t.length;if(!a)return-1;var h=i==null?0:dt(i);return h<0&&(h=Mt(a+h,0)),An(t,e,h)}function Cp(t){var e=t==null?0:t.length;return e?be(t,0,-1):[]}var Sp=yt(function(t){var e=Nt(t,ho);return e.length&&e[0]===t[0]?eo(e):[]}),kp=yt(function(t){var e=Ce(t),i=Nt(t,ho);return e===Ce(i)?e=n:i.pop(),i.length&&i[0]===t[0]?eo(i,it(e,2)):[]}),Ap=yt(function(t){var e=Ce(t),i=Nt(t,ho);return e=typeof e=="function"?e:n,e&&i.pop(),i.length&&i[0]===t[0]?eo(i,n,e):[]});function xp(t,e){return t==null?"":Ch.call(t,e)}function Ce(t){var e=t==null?0:t.length;return e?t[e-1]:n}function Ep(t,e,i){var a=t==null?0:t.length;if(!a)return-1;var h=a;return i!==n&&(h=dt(i),h=h<0?Mt(a+h,0):Jt(h,a-1)),e===e?sh(t,e,h):Cr(t,Gs,h,!0)}function Tp(t,e){return t&&t.length?Sa(t,dt(e)):n}var Rp=yt(pc);function pc(t,e){return t&&t.length&&e&&e.length?oo(t,e):t}function Op(t,e,i){return t&&t.length&&e&&e.length?oo(t,e,it(i,2)):t}function Ip(t,e,i){return t&&t.length&&e&&e.length?oo(t,e,n,i):t}var Np=Ke(function(t,e){var i=t==null?0:t.length,a=Vi(t,e);return xa(t,Nt(e,function(h){return ze(h,i)?+h:h}).sort(Da)),a});function Bp(t,e){var i=[];if(!(t&&t.length))return i;var a=-1,h=[],m=t.length;for(e=it(e,3);++a<m;){var C=t[a];e(C,a,t)&&(i.push(C),h.push(a))}return xa(t,h),i}function xo(t){return t==null?t:xh.call(t)}function Lp(t,e,i){var a=t==null?0:t.length;return a?(i&&typeof i!="number"&&ee(t,e,i)?(e=0,i=a):(e=e==null?0:dt(e),i=i===n?a:dt(i)),be(t,e,i)):[]}function Up(t,e){return Hr(t,e)}function Dp(t,e,i){return co(t,e,it(i,2))}function Pp(t,e){var i=t==null?0:t.length;if(i){var a=Hr(t,e);if(a<i&&Te(t[a],e))return a}return-1}function Fp(t,e){return Hr(t,e,!0)}function Mp(t,e,i){return co(t,e,it(i,2),!0)}function qp(t,e){var i=t==null?0:t.length;if(i){var a=Hr(t,e,!0)-1;if(Te(t[a],e))return a}return-1}function Wp(t){return t&&t.length?Ta(t):[]}function Hp(t,e){return t&&t.length?Ta(t,it(e,2)):[]}function Kp(t){var e=t==null?0:t.length;return e?be(t,1,e):[]}function zp(t,e,i){return t&&t.length?(e=i||e===n?1:dt(e),be(t,0,e<0?0:e)):[]}function Xp(t,e,i){var a=t==null?0:t.length;return a?(e=i||e===n?1:dt(e),e=a-e,be(t,e<0?0:e,a)):[]}function Gp(t,e){return t&&t.length?Kr(t,it(e,3),!1,!0):[]}function $p(t,e){return t&&t.length?Kr(t,it(e,3)):[]}var Jp=yt(function(t){return nn(zt(t,1,Ut,!0))}),jp=yt(function(t){var e=Ce(t);return Ut(e)&&(e=n),nn(zt(t,1,Ut,!0),it(e,2))}),Yp=yt(function(t){var e=Ce(t);return e=typeof e=="function"?e:n,nn(zt(t,1,Ut,!0),n,e)});function Vp(t){return t&&t.length?nn(t):[]}function Zp(t,e){return t&&t.length?nn(t,it(e,2)):[]}function Qp(t,e){return e=typeof e=="function"?e:n,t&&t.length?nn(t,n,e):[]}function Eo(t){if(!(t&&t.length))return[];var e=0;return t=Ve(t,function(i){if(Ut(i))return e=Mt(i.length,e),!0}),Ki(e,function(i){return Nt(t,qi(i))})}function dc(t,e){if(!(t&&t.length))return[];var i=Eo(t);return e==null?i:Nt(i,function(a){return fe(e,n,a)})}var td=yt(function(t,e){return Ut(t)?rr(t,e):[]}),ed=yt(function(t){return fo(Ve(t,Ut))}),nd=yt(function(t){var e=Ce(t);return Ut(e)&&(e=n),fo(Ve(t,Ut),it(e,2))}),rd=yt(function(t){var e=Ce(t);return e=typeof e=="function"?e:n,fo(Ve(t,Ut),n,e)}),id=yt(Eo);function od(t,e){return Na(t||[],e||[],nr)}function sd(t,e){return Na(t||[],e||[],sr)}var ad=yt(function(t){var e=t.length,i=e>1?t[e-1]:n;return i=typeof i=="function"?(t.pop(),i):n,dc(t,i)});function gc(t){var e=y(t);return e.__chain__=!0,e}function cd(t,e){return e(t),t}function Zr(t,e){return e(t)}var ud=Ke(function(t){var e=t.length,i=e?t[0]:0,a=this.__wrapped__,h=function(m){return Vi(m,t)};return e>1||this.__actions__.length||!(a instanceof mt)||!ze(i)?this.thru(h):(a=a.slice(i,+i+(e?1:0)),a.__actions__.push({func:Zr,args:[h],thisArg:n}),new _e(a,this.__chain__).thru(function(m){return e&&!m.length&&m.push(n),m}))});function fd(){return gc(this)}function hd(){return new _e(this.value(),this.__chain__)}function ld(){this.__values__===n&&(this.__values__=Rc(this.value()));var t=this.__index__>=this.__values__.length,e=t?n:this.__values__[this.__index__++];return{done:t,value:e}}function pd(){return this}function dd(t){for(var e,i=this;i instanceof Pr;){var a=cc(i);a.__index__=0,a.__values__=n,e?h.__wrapped__=a:e=a;var h=a;i=i.__wrapped__}return h.__wrapped__=t,e}function gd(){var t=this.__wrapped__;if(t instanceof mt){var e=t;return this.__actions__.length&&(e=new mt(this)),e=e.reverse(),e.__actions__.push({func:Zr,args:[xo],thisArg:n}),new _e(e,this.__chain__)}return this.thru(xo)}function yd(){return Ia(this.__wrapped__,this.__actions__)}var vd=zr(function(t,e,i){Et.call(t,i)?++t[i]:We(t,i,1)});function md(t,e,i){var a=ht(t)?zs:cl;return i&&ee(t,e,i)&&(e=n),a(t,it(e,3))}function _d(t,e){var i=ht(t)?Ve:da;return i(t,it(e,3))}var wd=Ha(uc),bd=Ha(fc);function Cd(t,e){return zt(Qr(t,e),1)}function Sd(t,e){return zt(Qr(t,e),xt)}function kd(t,e,i){return i=i===n?1:dt(i),zt(Qr(t,e),i)}function yc(t,e){var i=ht(t)?ve:en;return i(t,it(e,3))}function vc(t,e){var i=ht(t)?Kf:pa;return i(t,it(e,3))}var Ad=zr(function(t,e,i){Et.call(t,i)?t[i].push(e):We(t,i,[e])});function xd(t,e,i,a){t=ie(t)?t:Pn(t),i=i&&!a?dt(i):0;var h=t.length;return i<0&&(i=Mt(h+i,0)),ii(t)?i<=h&&t.indexOf(e,i)>-1:!!h&&An(t,e,i)>-1}var Ed=yt(function(t,e,i){var a=-1,h=typeof e=="function",m=ie(t)?O(t.length):[];return en(t,function(C){m[++a]=h?fe(e,C,i):ir(C,e,i)}),m}),Td=zr(function(t,e,i){We(t,i,e)});function Qr(t,e){var i=ht(t)?Nt:wa;return i(t,it(e,3))}function Rd(t,e,i,a){return t==null?[]:(ht(e)||(e=e==null?[]:[e]),i=a?n:i,ht(i)||(i=i==null?[]:[i]),ka(t,e,i))}var Od=zr(function(t,e,i){t[i?0:1].push(e)},function(){return[[],[]]});function Id(t,e,i){var a=ht(t)?Fi:Js,h=arguments.length<3;return a(t,it(e,4),i,h,en)}function Nd(t,e,i){var a=ht(t)?zf:Js,h=arguments.length<3;return a(t,it(e,4),i,h,pa)}function Bd(t,e){var i=ht(t)?Ve:da;return i(t,ni(it(e,3)))}function Ld(t){var e=ht(t)?ua:xl;return e(t)}function Ud(t,e,i){(i?ee(t,e,i):e===n)?e=1:e=dt(e);var a=ht(t)?rl:El;return a(t,e)}function Dd(t){var e=ht(t)?il:Rl;return e(t)}function Pd(t){if(t==null)return 0;if(ie(t))return ii(t)?En(t):t.length;var e=jt(t);return e==It||e==Qt?t.size:ro(t).length}function Fd(t,e,i){var a=ht(t)?Mi:Ol;return i&&ee(t,e,i)&&(e=n),a(t,it(e,3))}var Md=yt(function(t,e){if(t==null)return[];var i=e.length;return i>1&&ee(t,e[0],e[1])?e=[]:i>2&&ee(e[0],e[1],e[2])&&(e=[e[0]]),ka(t,zt(e,1),[])}),ti=_h||function(){return Kt.Date.now()};function qd(t,e){if(typeof e!="function")throw new me(v);return t=dt(t),function(){if(--t<1)return e.apply(this,arguments)}}function mc(t,e,i){return e=i?n:e,e=t&&e==null?t.length:e,He(t,I,n,n,n,n,e)}function _c(t,e){var i;if(typeof e!="function")throw new me(v);return t=dt(t),function(){return--t>0&&(i=e.apply(this,arguments)),t<=1&&(e=n),i}}var To=yt(function(t,e,i){var a=k;if(i.length){var h=Qe(i,Un(To));a|=U}return He(t,a,e,i,h)}),wc=yt(function(t,e,i){var a=k|L;if(i.length){var h=Qe(i,Un(wc));a|=U}return He(e,a,t,i,h)});function bc(t,e,i){e=i?n:e;var a=He(t,J,n,n,n,n,n,e);return a.placeholder=bc.placeholder,a}function Cc(t,e,i){e=i?n:e;var a=He(t,N,n,n,n,n,n,e);return a.placeholder=Cc.placeholder,a}function Sc(t,e,i){var a,h,m,C,S,E,M=0,q=!1,W=!1,j=!0;if(typeof t!="function")throw new me(v);e=Se(e)||0,Bt(i)&&(q=!!i.leading,W="maxWait"in i,m=W?Mt(Se(i.maxWait)||0,e):m,j="trailing"in i?!!i.trailing:j);function tt(Dt){var Re=a,$e=h;return a=h=n,M=Dt,C=t.apply($e,Re),C}function ot(Dt){return M=Dt,S=ur(vt,e),q?tt(Dt):C}function gt(Dt){var Re=Dt-E,$e=Dt-M,Hc=e-Re;return W?Jt(Hc,m-$e):Hc}function st(Dt){var Re=Dt-E,$e=Dt-M;return E===n||Re>=e||Re<0||W&&$e>=m}function vt(){var Dt=ti();if(st(Dt))return _t(Dt);S=ur(vt,gt(Dt))}function _t(Dt){return S=n,j&&a?tt(Dt):(a=h=n,C)}function de(){S!==n&&Ba(S),M=0,a=E=h=S=n}function ne(){return S===n?C:_t(ti())}function ge(){var Dt=ti(),Re=st(Dt);if(a=arguments,h=this,E=Dt,Re){if(S===n)return ot(E);if(W)return Ba(S),S=ur(vt,e),tt(E)}return S===n&&(S=ur(vt,e)),C}return ge.cancel=de,ge.flush=ne,ge}var Wd=yt(function(t,e){return la(t,1,e)}),Hd=yt(function(t,e,i){return la(t,Se(e)||0,i)});function Kd(t){return He(t,R)}function ei(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new me(v);var i=function(){var a=arguments,h=e?e.apply(this,a):a[0],m=i.cache;if(m.has(h))return m.get(h);var C=t.apply(this,a);return i.cache=m.set(h,C)||m,C};return i.cache=new(ei.Cache||qe),i}ei.Cache=qe;function ni(t){if(typeof t!="function")throw new me(v);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function zd(t){return _c(2,t)}var Xd=Il(function(t,e){e=e.length==1&&ht(e[0])?Nt(e[0],he(it())):Nt(zt(e,1),he(it()));var i=e.length;return yt(function(a){for(var h=-1,m=Jt(a.length,i);++h<m;)a[h]=e[h].call(this,a[h]);return fe(t,this,a)})}),Ro=yt(function(t,e){var i=Qe(e,Un(Ro));return He(t,U,n,e,i)}),kc=yt(function(t,e){var i=Qe(e,Un(kc));return He(t,T,n,e,i)}),Gd=Ke(function(t,e){return He(t,P,n,n,n,e)});function $d(t,e){if(typeof t!="function")throw new me(v);return e=e===n?e:dt(e),yt(t,e)}function Jd(t,e){if(typeof t!="function")throw new me(v);return e=e==null?0:Mt(dt(e),0),yt(function(i){var a=i[e],h=on(i,0,e);return a&&Ze(h,a),fe(t,this,h)})}function jd(t,e,i){var a=!0,h=!0;if(typeof t!="function")throw new me(v);return Bt(i)&&(a="leading"in i?!!i.leading:a,h="trailing"in i?!!i.trailing:h),Sc(t,e,{leading:a,maxWait:e,trailing:h})}function Yd(t){return mc(t,1)}function Vd(t,e){return Ro(lo(e),t)}function Zd(){if(!arguments.length)return[];var t=arguments[0];return ht(t)?t:[t]}function Qd(t){return we(t,u)}function tg(t,e){return e=typeof e=="function"?e:n,we(t,u,e)}function eg(t){return we(t,g|u)}function ng(t,e){return e=typeof e=="function"?e:n,we(t,g|u,e)}function rg(t,e){return e==null||ha(t,e,Wt(e))}function Te(t,e){return t===e||t!==t&&e!==e}var ig=Jr(to),og=Jr(function(t,e){return t>=e}),_n=va(function(){return arguments}())?va:function(t){return Lt(t)&&Et.call(t,"callee")&&!ra.call(t,"callee")},ht=O.isArray,sg=Fs?he(Fs):dl;function ie(t){return t!=null&&ri(t.length)&&!Xe(t)}function Ut(t){return Lt(t)&&ie(t)}function ag(t){return t===!0||t===!1||Lt(t)&&te(t)==et}var sn=bh||qo,cg=Ms?he(Ms):gl;function ug(t){return Lt(t)&&t.nodeType===1&&!fr(t)}function fg(t){if(t==null)return!0;if(ie(t)&&(ht(t)||typeof t=="string"||typeof t.splice=="function"||sn(t)||Dn(t)||_n(t)))return!t.length;var e=jt(t);if(e==It||e==Qt)return!t.size;if(cr(t))return!ro(t).length;for(var i in t)if(Et.call(t,i))return!1;return!0}function hg(t,e){return or(t,e)}function lg(t,e,i){i=typeof i=="function"?i:n;var a=i?i(t,e):n;return a===n?or(t,e,n,i):!!a}function Oo(t){if(!Lt(t))return!1;var e=te(t);return e==at||e==Z||typeof t.message=="string"&&typeof t.name=="string"&&!fr(t)}function pg(t){return typeof t=="number"&&oa(t)}function Xe(t){if(!Bt(t))return!1;var e=te(t);return e==kt||e==$t||e==K||e==$n}function Ac(t){return typeof t=="number"&&t==dt(t)}function ri(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ut}function Bt(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function Lt(t){return t!=null&&typeof t=="object"}var xc=qs?he(qs):vl;function dg(t,e){return t===e||no(t,e,wo(e))}function gg(t,e,i){return i=typeof i=="function"?i:n,no(t,e,wo(e),i)}function yg(t){return Ec(t)&&t!=+t}function vg(t){if(tp(t))throw new ft(f);return ma(t)}function mg(t){return t===null}function _g(t){return t==null}function Ec(t){return typeof t=="number"||Lt(t)&&te(t)==Ae}function fr(t){if(!Lt(t)||te(t)!=ue)return!1;var e=Or(t);if(e===null)return!0;var i=Et.call(e,"constructor")&&e.constructor;return typeof i=="function"&&i instanceof i&&xr.call(i)==gh}var Io=Ws?he(Ws):ml;function wg(t){return Ac(t)&&t>=-ut&&t<=ut}var Tc=Hs?he(Hs):_l;function ii(t){return typeof t=="string"||!ht(t)&&Lt(t)&&te(t)==Ne}function pe(t){return typeof t=="symbol"||Lt(t)&&te(t)==Be}var Dn=Ks?he(Ks):wl;function bg(t){return t===n}function Cg(t){return Lt(t)&&jt(t)==Fe}function Sg(t){return Lt(t)&&te(t)==jn}var kg=Jr(io),Ag=Jr(function(t,e){return t<=e});function Rc(t){if(!t)return[];if(ie(t))return ii(t)?xe(t):re(t);if(Vn&&t[Vn])return rh(t[Vn]());var e=jt(t),i=e==It?Xi:e==Qt?Sr:Pn;return i(t)}function Ge(t){if(!t)return t===0?t:0;if(t=Se(t),t===xt||t===-xt){var e=t<0?-1:1;return e*Gt}return t===t?t:0}function dt(t){var e=Ge(t),i=e%1;return e===e?i?e-i:e:0}function Oc(t){return t?gn(dt(t),0,ce):0}function Se(t){if(typeof t=="number")return t;if(pe(t))return Ie;if(Bt(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Bt(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=js(t);var i=sf.test(t);return i||cf.test(t)?qf(t.slice(2),i?2:8):of.test(t)?Ie:+t}function Ic(t){return Ue(t,oe(t))}function xg(t){return t?gn(dt(t),-ut,ut):t===0?t:0}function At(t){return t==null?"":le(t)}var Eg=Bn(function(t,e){if(cr(e)||ie(e)){Ue(e,Wt(e),t);return}for(var i in e)Et.call(e,i)&&nr(t,i,e[i])}),Nc=Bn(function(t,e){Ue(e,oe(e),t)}),oi=Bn(function(t,e,i,a){Ue(e,oe(e),t,a)}),Tg=Bn(function(t,e,i,a){Ue(e,Wt(e),t,a)}),Rg=Ke(Vi);function Og(t,e){var i=Nn(t);return e==null?i:fa(i,e)}var Ig=yt(function(t,e){t=Tt(t);var i=-1,a=e.length,h=a>2?e[2]:n;for(h&&ee(e[0],e[1],h)&&(a=1);++i<a;)for(var m=e[i],C=oe(m),S=-1,E=C.length;++S<E;){var M=C[S],q=t[M];(q===n||Te(q,Rn[M])&&!Et.call(t,M))&&(t[M]=m[M])}return t}),Ng=yt(function(t){return t.push(n,ja),fe(Bc,n,t)});function Bg(t,e){return Xs(t,it(e,3),Le)}function Lg(t,e){return Xs(t,it(e,3),Qi)}function Ug(t,e){return t==null?t:Zi(t,it(e,3),oe)}function Dg(t,e){return t==null?t:ga(t,it(e,3),oe)}function Pg(t,e){return t&&Le(t,it(e,3))}function Fg(t,e){return t&&Qi(t,it(e,3))}function Mg(t){return t==null?[]:qr(t,Wt(t))}function qg(t){return t==null?[]:qr(t,oe(t))}function No(t,e,i){var a=t==null?n:yn(t,e);return a===n?i:a}function Wg(t,e){return t!=null&&Za(t,e,fl)}function Bo(t,e){return t!=null&&Za(t,e,hl)}var Hg=za(function(t,e,i){e!=null&&typeof e.toString!="function"&&(e=Er.call(e)),t[e]=i},Uo(se)),Kg=za(function(t,e,i){e!=null&&typeof e.toString!="function"&&(e=Er.call(e)),Et.call(t,e)?t[e].push(i):t[e]=[i]},it),zg=yt(ir);function Wt(t){return ie(t)?ca(t):ro(t)}function oe(t){return ie(t)?ca(t,!0):bl(t)}function Xg(t,e){var i={};return e=it(e,3),Le(t,function(a,h,m){We(i,e(a,h,m),a)}),i}function Gg(t,e){var i={};return e=it(e,3),Le(t,function(a,h,m){We(i,h,e(a,h,m))}),i}var $g=Bn(function(t,e,i){Wr(t,e,i)}),Bc=Bn(function(t,e,i,a){Wr(t,e,i,a)}),Jg=Ke(function(t,e){var i={};if(t==null)return i;var a=!1;e=Nt(e,function(m){return m=rn(m,t),a||(a=m.length>1),m}),Ue(t,mo(t),i),a&&(i=we(i,g|l|u,Hl));for(var h=e.length;h--;)uo(i,e[h]);return i});function jg(t,e){return Lc(t,ni(it(e)))}var Yg=Ke(function(t,e){return t==null?{}:Sl(t,e)});function Lc(t,e){if(t==null)return{};var i=Nt(mo(t),function(a){return[a]});return e=it(e),Aa(t,i,function(a,h){return e(a,h[0])})}function Vg(t,e,i){e=rn(e,t);var a=-1,h=e.length;for(h||(h=1,t=n);++a<h;){var m=t==null?n:t[De(e[a])];m===n&&(a=h,m=i),t=Xe(m)?m.call(t):m}return t}function Zg(t,e,i){return t==null?t:sr(t,e,i)}function Qg(t,e,i,a){return a=typeof a=="function"?a:n,t==null?t:sr(t,e,i,a)}var Uc=$a(Wt),Dc=$a(oe);function ty(t,e,i){var a=ht(t),h=a||sn(t)||Dn(t);if(e=it(e,4),i==null){var m=t&&t.constructor;h?i=a?new m:[]:Bt(t)?i=Xe(m)?Nn(Or(t)):{}:i={}}return(h?ve:Le)(t,function(C,S,E){return e(i,C,S,E)}),i}function ey(t,e){return t==null?!0:uo(t,e)}function ny(t,e,i){return t==null?t:Oa(t,e,lo(i))}function ry(t,e,i,a){return a=typeof a=="function"?a:n,t==null?t:Oa(t,e,lo(i),a)}function Pn(t){return t==null?[]:zi(t,Wt(t))}function iy(t){return t==null?[]:zi(t,oe(t))}function oy(t,e,i){return i===n&&(i=e,e=n),i!==n&&(i=Se(i),i=i===i?i:0),e!==n&&(e=Se(e),e=e===e?e:0),gn(Se(t),e,i)}function sy(t,e,i){return e=Ge(e),i===n?(i=e,e=0):i=Ge(i),t=Se(t),ll(t,e,i)}function ay(t,e,i){if(i&&typeof i!="boolean"&&ee(t,e,i)&&(e=i=n),i===n&&(typeof e=="boolean"?(i=e,e=n):typeof t=="boolean"&&(i=t,t=n)),t===n&&e===n?(t=0,e=1):(t=Ge(t),e===n?(e=t,t=0):e=Ge(e)),t>e){var a=t;t=e,e=a}if(i||t%1||e%1){var h=sa();return Jt(t+h*(e-t+Mf("1e-"+((h+"").length-1))),e)}return so(t,e)}var cy=Ln(function(t,e,i){return e=e.toLowerCase(),t+(i?Pc(e):e)});function Pc(t){return Lo(At(t).toLowerCase())}function Fc(t){return t=At(t),t&&t.replace(ff,Zf).replace(Rf,"")}function uy(t,e,i){t=At(t),e=le(e);var a=t.length;i=i===n?a:gn(dt(i),0,a);var h=i;return i-=e.length,i>=0&&t.slice(i,h)==e}function fy(t){return t=At(t),t&&Ku.test(t)?t.replace(gs,Qf):t}function hy(t){return t=At(t),t&&ju.test(t)?t.replace(Ti,"\\$&"):t}var ly=Ln(function(t,e,i){return t+(i?"-":"")+e.toLowerCase()}),py=Ln(function(t,e,i){return t+(i?" ":"")+e.toLowerCase()}),dy=Wa("toLowerCase");function gy(t,e,i){t=At(t),e=dt(e);var a=e?En(t):0;if(!e||a>=e)return t;var h=(e-a)/2;return $r(Lr(h),i)+t+$r(Br(h),i)}function yy(t,e,i){t=At(t),e=dt(e);var a=e?En(t):0;return e&&a<e?t+$r(e-a,i):t}function vy(t,e,i){t=At(t),e=dt(e);var a=e?En(t):0;return e&&a<e?$r(e-a,i)+t:t}function my(t,e,i){return i||e==null?e=0:e&&(e=+e),Ah(At(t).replace(Ri,""),e||0)}function _y(t,e,i){return(i?ee(t,e,i):e===n)?e=1:e=dt(e),ao(At(t),e)}function wy(){var t=arguments,e=At(t[0]);return t.length<3?e:e.replace(t[1],t[2])}var by=Ln(function(t,e,i){return t+(i?"_":"")+e.toLowerCase()});function Cy(t,e,i){return i&&typeof i!="number"&&ee(t,e,i)&&(e=i=n),i=i===n?ce:i>>>0,i?(t=At(t),t&&(typeof e=="string"||e!=null&&!Io(e))&&(e=le(e),!e&&xn(t))?on(xe(t),0,i):t.split(e,i)):[]}var Sy=Ln(function(t,e,i){return t+(i?" ":"")+Lo(e)});function ky(t,e,i){return t=At(t),i=i==null?0:gn(dt(i),0,t.length),e=le(e),t.slice(i,i+e.length)==e}function Ay(t,e,i){var a=y.templateSettings;i&&ee(t,e,i)&&(e=n),t=At(t),e=oi({},e,a,Ja);var h=oi({},e.imports,a.imports,Ja),m=Wt(h),C=zi(h,m),S,E,M=0,q=e.interpolate||mr,W="__p += '",j=Gi((e.escape||mr).source+"|"+q.source+"|"+(q===ys?rf:mr).source+"|"+(e.evaluate||mr).source+"|$","g"),tt="//# sourceURL="+(Et.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Lf+"]")+`
|
|
16
|
-
`;t.replace(
|
|
17
|
-
__e(`+
|
|
18
|
-
'`),
|
|
19
|
-
`+
|
|
20
|
-
__p += '`),
|
|
21
|
-
((__t = (`+
|
|
22
|
-
'`),
|
|
23
|
-
`;var
|
|
24
|
-
`+
|
|
15
|
+
`)}function ol(t){return ft(t)||ln(t)||!!(Ro&&t&&t[Ro])}function Ke(t,e){var r=typeof t;return e=e??ut,!!e&&(r=="number"||r!="symbol"&&yc.test(t))&&t>-1&&t%1==0&&t<e}function Zt(t,e,r){if(!Lt(r))return!1;var o=typeof e;return(o=="number"?ee(r)&&Ke(e,r.length):o=="string"&&e in r)?Ae(r[e],t):!1}function ns(t,e){if(ft(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||fe(t)?!0:nc.test(t)||!ec.test(t)||e!=null&&t in Et(e)}function al(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function rs(t){var e=Nr(t),r=p[e];if(typeof r!="function"||!(e in vt.prototype))return!1;if(t===r)return!0;var o=Qi(r);return!!o&&t===o[0]}function ul(t){return!!Eo&&Eo in t}var cl=cr?He:ws;function Jn(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||bn;return t===r}function Ea(t){return t===t&&!Lt(t)}function Ta(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==n||t in Et(r))}}function fl(t){var e=Mr(t,function(o){return r.size===v&&r.clear(),o}),r=e.cache;return e}function hl(t,e){var r=t[1],o=e[1],c=r|o,d=c<(x|W|M),w=o==M&&r==V||o==M&&r==H&&t[7].length<=e[8]||o==(M|H)&&e[7].length<=e[8]&&r==V;if(!(d||w))return t;o&x&&(t[2]=e[2],c|=r&x?0:st);var C=e[3];if(C){var A=t[3];t[3]=A?ca(A,C,e[4]):C,t[4]=A?Ye(t[3],_):e[4]}return C=e[5],C&&(A=t[5],t[5]=A?fa(A,C,e[6]):C,t[6]=A?Ye(t[5],_):e[6]),C=e[7],C&&(t[7]=C),o&M&&(t[8]=t[8]==null?e[8]:zt(t[8],e[8])),t[9]==null&&(t[9]=e[9]),t[0]=e[0],t[1]=c,t}function ll(t){var e=[];if(t!=null)for(var r in Et(t))e.push(r);return e}function pl(t){return hr.call(t)}function xa(t,e,r){return e=Ft(e===n?t.length-1:e,0),function(){for(var o=arguments,c=-1,d=Ft(o.length-e,0),w=T(d);++c<d;)w[c]=o[e+c];c=-1;for(var C=T(e+1);++c<e;)C[c]=o[c];return C[e]=r(w),ae(t,this,C)}}function Oa(t,e){return e.length<2?t:cn(t,me(e,0,-1))}function dl(t,e){for(var r=t.length,o=zt(e.length,r),c=te(t);o--;){var d=e[o];t[o]=Ke(d,r)?c[d]:n}return t}function is(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var Ra=La(Qo),Vn=Of||function(t,e){return Wt.setTimeout(t,e)},ss=La(Ph);function Ia(t,e,r){var o=e+"";return ss(t,sl(o,gl(nl(o),r)))}function La(t){var e=0,r=0;return function(){var o=Nf(),c=j-(o-r);if(r=o,c>0){if(++e>=Q)return arguments[0]}else e=0;return t.apply(n,arguments)}}function Ur(t,e){var r=-1,o=t.length,c=o-1;for(e=e===n?o:e;++r<e;){var d=Wi(r,c),w=t[d];t[d]=t[r],t[r]=w}return t.length=e,t}var Na=fl(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(rc,function(r,o,c,d){e.push(c?d.replace(hc,"$1"):o||r)}),e});function Ne(t){if(typeof t=="string"||fe(t))return t;var e=t+"";return e=="0"&&1/t==-Ot?"-0":e}function hn(t){if(t!=null){try{return fr.call(t)}catch{}try{return t+""}catch{}}return""}function gl(t,e){return de(J,function(r){var o="_."+r[0];e&r[1]&&!sr(t,o)&&t.push(o)}),t.sort()}function Ba(t){if(t instanceof vt)return t.clone();var e=new ve(t.__wrapped__,t.__chain__);return e.__actions__=te(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}function vl(t,e,r){(r?Zt(t,e,r):e===n)?e=1:e=Ft(ht(e),0);var o=t==null?0:t.length;if(!o||e<1)return[];for(var c=0,d=0,w=T(yr(o/e));c<o;)w[d++]=me(t,c,c+=e);return w}function yl(t){for(var e=-1,r=t==null?0:t.length,o=0,c=[];++e<r;){var d=t[e];d&&(c[o++]=d)}return c}function ml(){var t=arguments.length;if(!t)return[];for(var e=T(t-1),r=arguments[0],o=t;o--;)e[o-1]=arguments[o];return Ve(ft(r)?te(r):[r],Kt(e,1))}var _l=dt(function(t,e){return Bt(t)?Hn(t,Kt(e,1,Bt,!0)):[]}),wl=dt(function(t,e){var r=_e(e);return Bt(r)&&(r=n),Bt(t)?Hn(t,Kt(e,1,Bt,!0),nt(r,2)):[]}),bl=dt(function(t,e){var r=_e(e);return Bt(r)&&(r=n),Bt(t)?Hn(t,Kt(e,1,Bt,!0),n,r):[]});function Sl(t,e,r){var o=t==null?0:t.length;return o?(e=r||e===n?1:ht(e),me(t,e<0?0:e,o)):[]}function Cl(t,e,r){var o=t==null?0:t.length;return o?(e=r||e===n?1:ht(e),e=o-e,me(t,0,e<0?0:e)):[]}function kl(t,e){return t&&t.length?Tr(t,nt(e,3),!0,!0):[]}function Al(t,e){return t&&t.length?Tr(t,nt(e,3),!0):[]}function El(t,e,r,o){var c=t==null?0:t.length;return c?(r&&typeof r!="number"&&Zt(t,e,r)&&(r=0,o=c),mh(t,e,r,o)):[]}function Ua(t,e,r){var o=t==null?0:t.length;if(!o)return-1;var c=r==null?0:ht(r);return c<0&&(c=Ft(o+c,0)),or(t,nt(e,3),c)}function Da(t,e,r){var o=t==null?0:t.length;if(!o)return-1;var c=o-1;return r!==n&&(c=ht(r),c=r<0?Ft(o+c,0):zt(c,o-1)),or(t,nt(e,3),c,!0)}function Pa(t){var e=t==null?0:t.length;return e?Kt(t,1):[]}function Tl(t){var e=t==null?0:t.length;return e?Kt(t,Ot):[]}function xl(t,e){var r=t==null?0:t.length;return r?(e=e===n?1:ht(e),Kt(t,e)):[]}function Ol(t){for(var e=-1,r=t==null?0:t.length,o={};++e<r;){var c=t[e];o[c[0]]=c[1]}return o}function Fa(t){return t&&t.length?t[0]:n}function Rl(t,e,r){var o=t==null?0:t.length;if(!o)return-1;var c=r==null?0:ht(r);return c<0&&(c=Ft(o+c,0)),yn(t,e,c)}function Il(t){var e=t==null?0:t.length;return e?me(t,0,-1):[]}var Ll=dt(function(t){var e=It(t,zi);return e.length&&e[0]===t[0]?Di(e):[]}),Nl=dt(function(t){var e=_e(t),r=It(t,zi);return e===_e(r)?e=n:r.pop(),r.length&&r[0]===t[0]?Di(r,nt(e,2)):[]}),Bl=dt(function(t){var e=_e(t),r=It(t,zi);return e=typeof e=="function"?e:n,e&&r.pop(),r.length&&r[0]===t[0]?Di(r,n,e):[]});function Ul(t,e){return t==null?"":If.call(t,e)}function _e(t){var e=t==null?0:t.length;return e?t[e-1]:n}function Dl(t,e,r){var o=t==null?0:t.length;if(!o)return-1;var c=o;return r!==n&&(c=ht(r),c=c<0?Ft(o+c,0):zt(c,o-1)),e===e?gf(t,e,c):or(t,mo,c,!0)}function Pl(t,e){return t&&t.length?Vo(t,ht(e)):n}var Fl=dt(Ma);function Ma(t,e){return t&&t.length&&e&&e.length?qi(t,e):t}function Ml(t,e,r){return t&&t.length&&e&&e.length?qi(t,e,nt(r,2)):t}function ql(t,e,r){return t&&t.length&&e&&e.length?qi(t,e,n,r):t}var Wl=We(function(t,e){var r=t==null?0:t.length,o=Li(t,e);return Zo(t,It(e,function(c){return Ke(c,r)?+c:c}).sort(ua)),o});function Kl(t,e){var r=[];if(!(t&&t.length))return r;var o=-1,c=[],d=t.length;for(e=nt(e,3);++o<d;){var w=t[o];e(w,o,t)&&(r.push(w),c.push(o))}return Zo(t,c),r}function os(t){return t==null?t:Uf.call(t)}function Hl(t,e,r){var o=t==null?0:t.length;return o?(r&&typeof r!="number"&&Zt(t,e,r)?(e=0,r=o):(e=e==null?0:ht(e),r=r===n?o:ht(r)),me(t,e,r)):[]}function $l(t,e){return Er(t,e)}function Gl(t,e,r){return Hi(t,e,nt(r,2))}function zl(t,e){var r=t==null?0:t.length;if(r){var o=Er(t,e);if(o<r&&Ae(t[o],e))return o}return-1}function Xl(t,e){return Er(t,e,!0)}function Jl(t,e,r){return Hi(t,e,nt(r,2),!0)}function Vl(t,e){var r=t==null?0:t.length;if(r){var o=Er(t,e,!0)-1;if(Ae(t[o],e))return o}return-1}function Yl(t){return t&&t.length?ta(t):[]}function jl(t,e){return t&&t.length?ta(t,nt(e,2)):[]}function Zl(t){var e=t==null?0:t.length;return e?me(t,1,e):[]}function Ql(t,e,r){return t&&t.length?(e=r||e===n?1:ht(e),me(t,0,e<0?0:e)):[]}function tp(t,e,r){var o=t==null?0:t.length;return o?(e=r||e===n?1:ht(e),e=o-e,me(t,e<0?0:e,o)):[]}function ep(t,e){return t&&t.length?Tr(t,nt(e,3),!1,!0):[]}function np(t,e){return t&&t.length?Tr(t,nt(e,3)):[]}var rp=dt(function(t){return Qe(Kt(t,1,Bt,!0))}),ip=dt(function(t){var e=_e(t);return Bt(e)&&(e=n),Qe(Kt(t,1,Bt,!0),nt(e,2))}),sp=dt(function(t){var e=_e(t);return e=typeof e=="function"?e:n,Qe(Kt(t,1,Bt,!0),n,e)});function op(t){return t&&t.length?Qe(t):[]}function ap(t,e){return t&&t.length?Qe(t,nt(e,2)):[]}function up(t,e){return e=typeof e=="function"?e:n,t&&t.length?Qe(t,n,e):[]}function as(t){if(!(t&&t.length))return[];var e=0;return t=Je(t,function(r){if(Bt(r))return e=Ft(r.length,e),!0}),ki(e,function(r){return It(t,bi(r))})}function qa(t,e){if(!(t&&t.length))return[];var r=as(t);return e==null?r:It(r,function(o){return ae(e,n,o)})}var cp=dt(function(t,e){return Bt(t)?Hn(t,e):[]}),fp=dt(function(t){return Gi(Je(t,Bt))}),hp=dt(function(t){var e=_e(t);return Bt(e)&&(e=n),Gi(Je(t,Bt),nt(e,2))}),lp=dt(function(t){var e=_e(t);return e=typeof e=="function"?e:n,Gi(Je(t,Bt),n,e)}),pp=dt(as);function dp(t,e){return ia(t||[],e||[],Kn)}function gp(t,e){return ia(t||[],e||[],zn)}var vp=dt(function(t){var e=t.length,r=e>1?t[e-1]:n;return r=typeof r=="function"?(t.pop(),r):n,qa(t,r)});function Wa(t){var e=p(t);return e.__chain__=!0,e}function yp(t,e){return e(t),t}function Dr(t,e){return e(t)}var mp=We(function(t){var e=t.length,r=e?t[0]:0,o=this.__wrapped__,c=function(d){return Li(d,t)};return e>1||this.__actions__.length||!(o instanceof vt)||!Ke(r)?this.thru(c):(o=o.slice(r,+r+(e?1:0)),o.__actions__.push({func:Dr,args:[c],thisArg:n}),new ve(o,this.__chain__).thru(function(d){return e&&!d.length&&d.push(n),d}))});function _p(){return Wa(this)}function wp(){return new ve(this.value(),this.__chain__)}function bp(){this.__values__===n&&(this.__values__=eu(this.value()));var t=this.__index__>=this.__values__.length,e=t?n:this.__values__[this.__index__++];return{done:t,value:e}}function Sp(){return this}function Cp(t){for(var e,r=this;r instanceof br;){var o=Ba(r);o.__index__=0,o.__values__=n,e?c.__wrapped__=o:e=o;var c=o;r=r.__wrapped__}return c.__wrapped__=t,e}function kp(){var t=this.__wrapped__;if(t instanceof vt){var e=t;return this.__actions__.length&&(e=new vt(this)),e=e.reverse(),e.__actions__.push({func:Dr,args:[os],thisArg:n}),new ve(e,this.__chain__)}return this.thru(os)}function Ap(){return ra(this.__wrapped__,this.__actions__)}var Ep=xr(function(t,e,r){Ct.call(t,r)?++t[r]:Me(t,r,1)});function Tp(t,e,r){var o=ft(t)?vo:yh;return r&&Zt(t,e,r)&&(e=n),o(t,nt(e,3))}function xp(t,e){var r=ft(t)?Je:qo;return r(t,nt(e,3))}var Op=da(Ua),Rp=da(Da);function Ip(t,e){return Kt(Pr(t,e),1)}function Lp(t,e){return Kt(Pr(t,e),Ot)}function Np(t,e,r){return r=r===n?1:ht(r),Kt(Pr(t,e),r)}function Ka(t,e){var r=ft(t)?de:Ze;return r(t,nt(e,3))}function Ha(t,e){var r=ft(t)?jc:Mo;return r(t,nt(e,3))}var Bp=xr(function(t,e,r){Ct.call(t,r)?t[r].push(e):Me(t,r,[e])});function Up(t,e,r,o){t=ee(t)?t:On(t),r=r&&!o?ht(r):0;var c=t.length;return r<0&&(r=Ft(c+r,0)),Kr(t)?r<=c&&t.indexOf(e,r)>-1:!!c&&yn(t,e,r)>-1}var Dp=dt(function(t,e,r){var o=-1,c=typeof e=="function",d=ee(t)?T(t.length):[];return Ze(t,function(w){d[++o]=c?ae(e,w,r):$n(w,e,r)}),d}),Pp=xr(function(t,e,r){Me(t,r,e)});function Pr(t,e){var r=ft(t)?It:zo;return r(t,nt(e,3))}function Fp(t,e,r,o){return t==null?[]:(ft(e)||(e=e==null?[]:[e]),r=o?n:r,ft(r)||(r=r==null?[]:[r]),Yo(t,e,r))}var Mp=xr(function(t,e,r){t[r?0:1].push(e)},function(){return[[],[]]});function qp(t,e,r){var o=ft(t)?_i:wo,c=arguments.length<3;return o(t,nt(e,4),r,c,Ze)}function Wp(t,e,r){var o=ft(t)?Zc:wo,c=arguments.length<3;return o(t,nt(e,4),r,c,Mo)}function Kp(t,e){var r=ft(t)?Je:qo;return r(t,qr(nt(e,3)))}function Hp(t){var e=ft(t)?Uo:Uh;return e(t)}function $p(t,e,r){(r?Zt(t,e,r):e===n)?e=1:e=ht(e);var o=ft(t)?lh:Dh;return o(t,e)}function Gp(t){var e=ft(t)?ph:Fh;return e(t)}function zp(t){if(t==null)return 0;if(ee(t))return Kr(t)?_n(t):t.length;var e=Xt(t);return e==Rt||e==Yt?t.size:Fi(t).length}function Xp(t,e,r){var o=ft(t)?wi:Mh;return r&&Zt(t,e,r)&&(e=n),o(t,nt(e,3))}var Jp=dt(function(t,e){if(t==null)return[];var r=e.length;return r>1&&Zt(t,e[0],e[1])?e=[]:r>2&&Zt(e[0],e[1],e[2])&&(e=[e[0]]),Yo(t,Kt(e,1),[])}),Fr=xf||function(){return Wt.Date.now()};function Vp(t,e){if(typeof e!="function")throw new ge(m);return t=ht(t),function(){if(--t<1)return e.apply(this,arguments)}}function $a(t,e,r){return e=r?n:e,e=t&&e==null?t.length:e,qe(t,M,n,n,n,n,e)}function Ga(t,e){var r;if(typeof e!="function")throw new ge(m);return t=ht(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=n),r}}var us=dt(function(t,e,r){var o=x;if(r.length){var c=Ye(r,Tn(us));o|=$}return qe(t,o,e,r,c)}),za=dt(function(t,e,r){var o=x|W;if(r.length){var c=Ye(r,Tn(za));o|=$}return qe(e,o,t,r,c)});function Xa(t,e,r){e=r?n:e;var o=qe(t,V,n,n,n,n,n,e);return o.placeholder=Xa.placeholder,o}function Ja(t,e,r){e=r?n:e;var o=qe(t,ot,n,n,n,n,n,e);return o.placeholder=Ja.placeholder,o}function Va(t,e,r){var o,c,d,w,C,A,R=0,I=!1,N=!1,K=!0;if(typeof t!="function")throw new ge(m);e=we(e)||0,Lt(r)&&(I=!!r.leading,N="maxWait"in r,d=N?Ft(we(r.maxWait)||0,e):d,K="trailing"in r?!!r.trailing:K);function Y(Ut){var Ee=o,Ge=c;return o=c=n,R=Ut,w=t.apply(Ge,Ee),w}function rt(Ut){return R=Ut,C=Vn(gt,e),I?Y(Ut):w}function pt(Ut){var Ee=Ut-A,Ge=Ut-R,du=e-Ee;return N?zt(du,d-Ge):du}function it(Ut){var Ee=Ut-A,Ge=Ut-R;return A===n||Ee>=e||Ee<0||N&&Ge>=d}function gt(){var Ut=Fr();if(it(Ut))return yt(Ut);C=Vn(gt,pt(Ut))}function yt(Ut){return C=n,K&&o?Y(Ut):(o=c=n,w)}function he(){C!==n&&sa(C),R=0,o=A=c=C=n}function Qt(){return C===n?w:yt(Fr())}function le(){var Ut=Fr(),Ee=it(Ut);if(o=arguments,c=this,A=Ut,Ee){if(C===n)return rt(A);if(N)return sa(C),C=Vn(gt,e),Y(A)}return C===n&&(C=Vn(gt,e)),w}return le.cancel=he,le.flush=Qt,le}var Yp=dt(function(t,e){return Fo(t,1,e)}),jp=dt(function(t,e,r){return Fo(t,we(e)||0,r)});function Zp(t){return qe(t,L)}function Mr(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new ge(m);var r=function(){var o=arguments,c=e?e.apply(this,o):o[0],d=r.cache;if(d.has(c))return d.get(c);var w=t.apply(this,o);return r.cache=d.set(c,w)||d,w};return r.cache=new(Mr.Cache||Fe),r}Mr.Cache=Fe;function qr(t){if(typeof t!="function")throw new ge(m);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function Qp(t){return Ga(2,t)}var td=qh(function(t,e){e=e.length==1&&ft(e[0])?It(e[0],ue(nt())):It(Kt(e,1),ue(nt()));var r=e.length;return dt(function(o){for(var c=-1,d=zt(o.length,r);++c<d;)o[c]=e[c].call(this,o[c]);return ae(t,this,o)})}),cs=dt(function(t,e){var r=Ye(e,Tn(cs));return qe(t,$,n,e,r)}),Ya=dt(function(t,e){var r=Ye(e,Tn(Ya));return qe(t,D,n,e,r)}),ed=We(function(t,e){return qe(t,H,n,n,n,e)});function nd(t,e){if(typeof t!="function")throw new ge(m);return e=e===n?e:ht(e),dt(t,e)}function rd(t,e){if(typeof t!="function")throw new ge(m);return e=e==null?0:Ft(ht(e),0),dt(function(r){var o=r[e],c=en(r,0,e);return o&&Ve(c,o),ae(t,this,c)})}function id(t,e,r){var o=!0,c=!0;if(typeof t!="function")throw new ge(m);return Lt(r)&&(o="leading"in r?!!r.leading:o,c="trailing"in r?!!r.trailing:c),Va(t,e,{leading:o,maxWait:e,trailing:c})}function sd(t){return $a(t,1)}function od(t,e){return cs(Xi(e),t)}function ad(){if(!arguments.length)return[];var t=arguments[0];return ft(t)?t:[t]}function ud(t){return ye(t,f)}function cd(t,e){return e=typeof e=="function"?e:n,ye(t,f,e)}function fd(t){return ye(t,y|f)}function hd(t,e){return e=typeof e=="function"?e:n,ye(t,y|f,e)}function ld(t,e){return e==null||Po(t,e,Mt(e))}function Ae(t,e){return t===e||t!==t&&e!==e}var pd=Lr(Ui),dd=Lr(function(t,e){return t>=e}),ln=Ho(function(){return arguments}())?Ho:function(t){return Nt(t)&&Ct.call(t,"callee")&&!Oo.call(t,"callee")},ft=T.isArray,gd=co?ue(co):Ch;function ee(t){return t!=null&&Wr(t.length)&&!He(t)}function Bt(t){return Nt(t)&&ee(t)}function vd(t){return t===!0||t===!1||Nt(t)&&jt(t)==Z}var nn=Rf||ws,yd=fo?ue(fo):kh;function md(t){return Nt(t)&&t.nodeType===1&&!Yn(t)}function _d(t){if(t==null)return!0;if(ee(t)&&(ft(t)||typeof t=="string"||typeof t.splice=="function"||nn(t)||xn(t)||ln(t)))return!t.length;var e=Xt(t);if(e==Rt||e==Yt)return!t.size;if(Jn(t))return!Fi(t).length;for(var r in t)if(Ct.call(t,r))return!1;return!0}function wd(t,e){return Gn(t,e)}function bd(t,e,r){r=typeof r=="function"?r:n;var o=r?r(t,e):n;return o===n?Gn(t,e,n,r):!!o}function fs(t){if(!Nt(t))return!1;var e=jt(t);return e==at||e==z||typeof t.message=="string"&&typeof t.name=="string"&&!Yn(t)}function Sd(t){return typeof t=="number"&&Io(t)}function He(t){if(!Lt(t))return!1;var e=jt(t);return e==bt||e==Gt||e==P||e==Nn}function ja(t){return typeof t=="number"&&t==ht(t)}function Wr(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ut}function Lt(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function Nt(t){return t!=null&&typeof t=="object"}var Za=ho?ue(ho):Eh;function Cd(t,e){return t===e||Pi(t,e,ts(e))}function kd(t,e,r){return r=typeof r=="function"?r:n,Pi(t,e,ts(e),r)}function Ad(t){return Qa(t)&&t!=+t}function Ed(t){if(cl(t))throw new ct(h);return $o(t)}function Td(t){return t===null}function xd(t){return t==null}function Qa(t){return typeof t=="number"||Nt(t)&&jt(t)==Se}function Yn(t){if(!Nt(t)||jt(t)!=oe)return!1;var e=dr(t);if(e===null)return!0;var r=Ct.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&fr.call(r)==kf}var hs=lo?ue(lo):Th;function Od(t){return ja(t)&&t>=-ut&&t<=ut}var tu=po?ue(po):xh;function Kr(t){return typeof t=="string"||!ft(t)&&Nt(t)&&jt(t)==Oe}function fe(t){return typeof t=="symbol"||Nt(t)&&jt(t)==Re}var xn=go?ue(go):Oh;function Rd(t){return t===n}function Id(t){return Nt(t)&&Xt(t)==De}function Ld(t){return Nt(t)&&jt(t)==Un}var Nd=Lr(Mi),Bd=Lr(function(t,e){return t<=e});function eu(t){if(!t)return[];if(ee(t))return Kr(t)?Ce(t):te(t);if(Pn&&t[Pn])return lf(t[Pn]());var e=Xt(t),r=e==Rt?Ei:e==Yt?ar:On;return r(t)}function $e(t){if(!t)return t===0?t:0;if(t=we(t),t===Ot||t===-Ot){var e=t<0?-1:1;return e*$t}return t===t?t:0}function ht(t){var e=$e(t),r=e%1;return e===e?r?e-r:e:0}function nu(t){return t?un(ht(t),0,se):0}function we(t){if(typeof t=="number")return t;if(fe(t))return xe;if(Lt(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Lt(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=bo(t);var r=dc.test(t);return r||vc.test(t)?Jc(t.slice(2),r?2:8):pc.test(t)?xe:+t}function ru(t){return Le(t,ne(t))}function Ud(t){return t?un(ht(t),-ut,ut):t===0?t:0}function St(t){return t==null?"":ce(t)}var Dd=An(function(t,e){if(Jn(e)||ee(e)){Le(e,Mt(e),t);return}for(var r in e)Ct.call(e,r)&&Kn(t,r,e[r])}),iu=An(function(t,e){Le(e,ne(e),t)}),Hr=An(function(t,e,r,o){Le(e,ne(e),t,o)}),Pd=An(function(t,e,r,o){Le(e,Mt(e),t,o)}),Fd=We(Li);function Md(t,e){var r=kn(t);return e==null?r:Do(r,e)}var qd=dt(function(t,e){t=Et(t);var r=-1,o=e.length,c=o>2?e[2]:n;for(c&&Zt(e[0],e[1],c)&&(o=1);++r<o;)for(var d=e[r],w=ne(d),C=-1,A=w.length;++C<A;){var R=w[C],I=t[R];(I===n||Ae(I,bn[R])&&!Ct.call(t,R))&&(t[R]=d[R])}return t}),Wd=dt(function(t){return t.push(n,ba),ae(su,n,t)});function Kd(t,e){return yo(t,nt(e,3),Ie)}function Hd(t,e){return yo(t,nt(e,3),Bi)}function $d(t,e){return t==null?t:Ni(t,nt(e,3),ne)}function Gd(t,e){return t==null?t:Wo(t,nt(e,3),ne)}function zd(t,e){return t&&Ie(t,nt(e,3))}function Xd(t,e){return t&&Bi(t,nt(e,3))}function Jd(t){return t==null?[]:kr(t,Mt(t))}function Vd(t){return t==null?[]:kr(t,ne(t))}function ls(t,e,r){var o=t==null?n:cn(t,e);return o===n?r:o}function Yd(t,e){return t!=null&&ka(t,e,_h)}function ps(t,e){return t!=null&&ka(t,e,wh)}var jd=va(function(t,e,r){e!=null&&typeof e.toString!="function"&&(e=hr.call(e)),t[e]=r},gs(re)),Zd=va(function(t,e,r){e!=null&&typeof e.toString!="function"&&(e=hr.call(e)),Ct.call(t,e)?t[e].push(r):t[e]=[r]},nt),Qd=dt($n);function Mt(t){return ee(t)?Bo(t):Fi(t)}function ne(t){return ee(t)?Bo(t,!0):Rh(t)}function tg(t,e){var r={};return e=nt(e,3),Ie(t,function(o,c,d){Me(r,e(o,c,d),o)}),r}function eg(t,e){var r={};return e=nt(e,3),Ie(t,function(o,c,d){Me(r,c,e(o,c,d))}),r}var ng=An(function(t,e,r){Ar(t,e,r)}),su=An(function(t,e,r,o){Ar(t,e,r,o)}),rg=We(function(t,e){var r={};if(t==null)return r;var o=!1;e=It(e,function(d){return d=tn(d,t),o||(o=d.length>1),d}),Le(t,Zi(t),r),o&&(r=ye(r,y|l|f,jh));for(var c=e.length;c--;)$i(r,e[c]);return r});function ig(t,e){return ou(t,qr(nt(e)))}var sg=We(function(t,e){return t==null?{}:Lh(t,e)});function ou(t,e){if(t==null)return{};var r=It(Zi(t),function(o){return[o]});return e=nt(e),jo(t,r,function(o,c){return e(o,c[0])})}function og(t,e,r){e=tn(e,t);var o=-1,c=e.length;for(c||(c=1,t=n);++o<c;){var d=t==null?n:t[Ne(e[o])];d===n&&(o=c,d=r),t=He(d)?d.call(t):d}return t}function ag(t,e,r){return t==null?t:zn(t,e,r)}function ug(t,e,r,o){return o=typeof o=="function"?o:n,t==null?t:zn(t,e,r,o)}var au=_a(Mt),uu=_a(ne);function cg(t,e,r){var o=ft(t),c=o||nn(t)||xn(t);if(e=nt(e,4),r==null){var d=t&&t.constructor;c?r=o?new d:[]:Lt(t)?r=He(d)?kn(dr(t)):{}:r={}}return(c?de:Ie)(t,function(w,C,A){return e(r,w,C,A)}),r}function fg(t,e){return t==null?!0:$i(t,e)}function hg(t,e,r){return t==null?t:na(t,e,Xi(r))}function lg(t,e,r,o){return o=typeof o=="function"?o:n,t==null?t:na(t,e,Xi(r),o)}function On(t){return t==null?[]:Ai(t,Mt(t))}function pg(t){return t==null?[]:Ai(t,ne(t))}function dg(t,e,r){return r===n&&(r=e,e=n),r!==n&&(r=we(r),r=r===r?r:0),e!==n&&(e=we(e),e=e===e?e:0),un(we(t),e,r)}function gg(t,e,r){return e=$e(e),r===n?(r=e,e=0):r=$e(r),t=we(t),bh(t,e,r)}function vg(t,e,r){if(r&&typeof r!="boolean"&&Zt(t,e,r)&&(e=r=n),r===n&&(typeof e=="boolean"?(r=e,e=n):typeof t=="boolean"&&(r=t,t=n)),t===n&&e===n?(t=0,e=1):(t=$e(t),e===n?(e=t,t=0):e=$e(e)),t>e){var o=t;t=e,e=o}if(r||t%1||e%1){var c=Lo();return zt(t+c*(e-t+Xc("1e-"+((c+"").length-1))),e)}return Wi(t,e)}var yg=En(function(t,e,r){return e=e.toLowerCase(),t+(r?cu(e):e)});function cu(t){return ds(St(t).toLowerCase())}function fu(t){return t=St(t),t&&t.replace(mc,af).replace(Pc,"")}function mg(t,e,r){t=St(t),e=ce(e);var o=t.length;r=r===n?o:un(ht(r),0,o);var c=r;return r-=e.length,r>=0&&t.slice(r,c)==e}function _g(t){return t=St(t),t&&Zu.test(t)?t.replace(qs,uf):t}function wg(t){return t=St(t),t&&ic.test(t)?t.replace(ci,"\\$&"):t}var bg=En(function(t,e,r){return t+(r?"-":"")+e.toLowerCase()}),Sg=En(function(t,e,r){return t+(r?" ":"")+e.toLowerCase()}),Cg=pa("toLowerCase");function kg(t,e,r){t=St(t),e=ht(e);var o=e?_n(t):0;if(!e||o>=e)return t;var c=(e-o)/2;return Ir(mr(c),r)+t+Ir(yr(c),r)}function Ag(t,e,r){t=St(t),e=ht(e);var o=e?_n(t):0;return e&&o<e?t+Ir(e-o,r):t}function Eg(t,e,r){t=St(t),e=ht(e);var o=e?_n(t):0;return e&&o<e?Ir(e-o,r)+t:t}function Tg(t,e,r){return r||e==null?e=0:e&&(e=+e),Bf(St(t).replace(fi,""),e||0)}function xg(t,e,r){return(r?Zt(t,e,r):e===n)?e=1:e=ht(e),Ki(St(t),e)}function Og(){var t=arguments,e=St(t[0]);return t.length<3?e:e.replace(t[1],t[2])}var Rg=En(function(t,e,r){return t+(r?"_":"")+e.toLowerCase()});function Ig(t,e,r){return r&&typeof r!="number"&&Zt(t,e,r)&&(e=r=n),r=r===n?se:r>>>0,r?(t=St(t),t&&(typeof e=="string"||e!=null&&!hs(e))&&(e=ce(e),!e&&mn(t))?en(Ce(t),0,r):t.split(e,r)):[]}var Lg=En(function(t,e,r){return t+(r?" ":"")+ds(e)});function Ng(t,e,r){return t=St(t),r=r==null?0:un(ht(r),0,t.length),e=ce(e),t.slice(r,r+e.length)==e}function Bg(t,e,r){var o=p.templateSettings;r&&Zt(t,e,r)&&(e=n),t=St(t),e=Hr({},e,o,wa);var c=Hr({},e.imports,o.imports,wa),d=Mt(c),w=Ai(c,d),C,A,R=0,I=e.interpolate||nr,N="__p += '",K=Ti((e.escape||nr).source+"|"+I.source+"|"+(I===Ws?lc:nr).source+"|"+(e.evaluate||nr).source+"|$","g"),Y="//# sourceURL="+(Ct.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Kc+"]")+`
|
|
16
|
+
`;t.replace(K,function(it,gt,yt,he,Qt,le){return yt||(yt=he),N+=t.slice(R,le).replace(_c,cf),gt&&(C=!0,N+=`' +
|
|
17
|
+
__e(`+gt+`) +
|
|
18
|
+
'`),Qt&&(A=!0,N+=`';
|
|
19
|
+
`+Qt+`;
|
|
20
|
+
__p += '`),yt&&(N+=`' +
|
|
21
|
+
((__t = (`+yt+`)) == null ? '' : __t) +
|
|
22
|
+
'`),R=le+it.length,it}),N+=`';
|
|
23
|
+
`;var rt=Ct.call(e,"variable")&&e.variable;if(!rt)N=`with (obj) {
|
|
24
|
+
`+N+`
|
|
25
25
|
}
|
|
26
|
-
`;else if(
|
|
27
|
-
`+(
|
|
28
|
-
`)+"var __t, __p = ''"+(
|
|
26
|
+
`;else if(fc.test(rt))throw new ct(g);N=(A?N.replace(Ju,""):N).replace(Vu,"$1").replace(Yu,"$1;"),N="function("+(rt||"obj")+`) {
|
|
27
|
+
`+(rt?"":`obj || (obj = {});
|
|
28
|
+
`)+"var __t, __p = ''"+(C?", __e = _.escape":"")+(A?`, __j = Array.prototype.join;
|
|
29
29
|
function print() { __p += __j.call(arguments, '') }
|
|
30
30
|
`:`;
|
|
31
|
-
`)+
|
|
32
|
-
}`;var gt=qc(function(){return Ct(m,tt+"return "+W).apply(n,C)});if(gt.source=W,Oo(gt))throw gt;return gt}function xy(t){return At(t).toLowerCase()}function Ey(t){return At(t).toUpperCase()}function Ty(t,e,i){if(t=At(t),t&&(i||e===n))return js(t);if(!t||!(e=le(e)))return t;var a=xe(t),h=xe(e),m=Ys(a,h),C=Vs(a,h)+1;return on(a,m,C).join("")}function Ry(t,e,i){if(t=At(t),t&&(i||e===n))return t.slice(0,Qs(t)+1);if(!t||!(e=le(e)))return t;var a=xe(t),h=Vs(a,xe(e))+1;return on(a,0,h).join("")}function Oy(t,e,i){if(t=At(t),t&&(i||e===n))return t.replace(Ri,"");if(!t||!(e=le(e)))return t;var a=xe(t),h=Ys(a,xe(e));return on(a,h).join("")}function Iy(t,e){var i=B,a=H;if(Bt(e)){var h="separator"in e?e.separator:h;i="length"in e?dt(e.length):i,a="omission"in e?le(e.omission):a}t=At(t);var m=t.length;if(xn(t)){var C=xe(t);m=C.length}if(i>=m)return t;var S=i-En(a);if(S<1)return a;var E=C?on(C,0,S).join(""):t.slice(0,S);if(h===n)return E+a;if(C&&(S+=E.length-S),Io(h)){if(t.slice(S).search(h)){var M,q=E;for(h.global||(h=Gi(h.source,At(vs.exec(h))+"g")),h.lastIndex=0;M=h.exec(q);)var W=M.index;E=E.slice(0,W===n?S:W)}}else if(t.indexOf(le(h),S)!=S){var j=E.lastIndexOf(h);j>-1&&(E=E.slice(0,j))}return E+a}function Ny(t){return t=At(t),t&&Hu.test(t)?t.replace(ds,ah):t}var By=Ln(function(t,e,i){return t+(i?" ":"")+e.toUpperCase()}),Lo=Wa("toUpperCase");function Mc(t,e,i){return t=At(t),e=i?n:e,e===n?nh(t)?fh(t):$f(t):t.match(e)||[]}var qc=yt(function(t,e){try{return fe(t,n,e)}catch(i){return Oo(i)?i:new ft(i)}}),Ly=Ke(function(t,e){return ve(e,function(i){i=De(i),We(t,i,To(t[i],t))}),t});function Uy(t){var e=t==null?0:t.length,i=it();return t=e?Nt(t,function(a){if(typeof a[1]!="function")throw new me(v);return[i(a[0]),a[1]]}):[],yt(function(a){for(var h=-1;++h<e;){var m=t[h];if(fe(m[0],this,a))return fe(m[1],this,a)}})}function Dy(t){return al(we(t,g))}function Uo(t){return function(){return t}}function Py(t,e){return t==null||t!==t?e:t}var Fy=Ka(),My=Ka(!0);function se(t){return t}function Do(t){return _a(typeof t=="function"?t:we(t,g))}function qy(t){return ba(we(t,g))}function Wy(t,e){return Ca(t,we(e,g))}var Hy=yt(function(t,e){return function(i){return ir(i,t,e)}}),Ky=yt(function(t,e){return function(i){return ir(t,i,e)}});function Po(t,e,i){var a=Wt(e),h=qr(e,a);i==null&&!(Bt(e)&&(h.length||!a.length))&&(i=e,e=t,t=this,h=qr(e,Wt(e)));var m=!(Bt(i)&&"chain"in i)||!!i.chain,C=Xe(t);return ve(h,function(S){var E=e[S];t[S]=E,C&&(t.prototype[S]=function(){var M=this.__chain__;if(m||M){var q=t(this.__wrapped__),W=q.__actions__=re(this.__actions__);return W.push({func:E,args:arguments,thisArg:t}),q.__chain__=M,q}return E.apply(t,Ze([this.value()],arguments))})}),t}function zy(){return Kt._===this&&(Kt._=yh),this}function Fo(){}function Xy(t){return t=dt(t),yt(function(e){return Sa(e,t)})}var Gy=go(Nt),$y=go(zs),Jy=go(Mi);function Wc(t){return Co(t)?qi(De(t)):kl(t)}function jy(t){return function(e){return t==null?n:yn(t,e)}}var Yy=Xa(),Vy=Xa(!0);function Mo(){return[]}function qo(){return!1}function Zy(){return{}}function Qy(){return""}function tv(){return!0}function ev(t,e){if(t=dt(t),t<1||t>ut)return[];var i=ce,a=Jt(t,ce);e=it(e),t-=ce;for(var h=Ki(a,e);++i<t;)e(i);return h}function nv(t){return ht(t)?Nt(t,De):pe(t)?[t]:re(ac(At(t)))}function rv(t){var e=++dh;return At(t)+e}var iv=Gr(function(t,e){return t+e},0),ov=yo("ceil"),sv=Gr(function(t,e){return t/e},1),av=yo("floor");function cv(t){return t&&t.length?Mr(t,se,to):n}function uv(t,e){return t&&t.length?Mr(t,it(e,2),to):n}function fv(t){return $s(t,se)}function hv(t,e){return $s(t,it(e,2))}function lv(t){return t&&t.length?Mr(t,se,io):n}function pv(t,e){return t&&t.length?Mr(t,it(e,2),io):n}var dv=Gr(function(t,e){return t*e},1),gv=yo("round"),yv=Gr(function(t,e){return t-e},0);function vv(t){return t&&t.length?Hi(t,se):0}function mv(t,e){return t&&t.length?Hi(t,it(e,2)):0}return y.after=qd,y.ary=mc,y.assign=Eg,y.assignIn=Nc,y.assignInWith=oi,y.assignWith=Tg,y.at=Rg,y.before=_c,y.bind=To,y.bindAll=Ly,y.bindKey=wc,y.castArray=Zd,y.chain=gc,y.chunk=ap,y.compact=cp,y.concat=up,y.cond=Uy,y.conforms=Dy,y.constant=Uo,y.countBy=vd,y.create=Og,y.curry=bc,y.curryRight=Cc,y.debounce=Sc,y.defaults=Ig,y.defaultsDeep=Ng,y.defer=Wd,y.delay=Hd,y.difference=fp,y.differenceBy=hp,y.differenceWith=lp,y.drop=pp,y.dropRight=dp,y.dropRightWhile=gp,y.dropWhile=yp,y.fill=vp,y.filter=_d,y.flatMap=Cd,y.flatMapDeep=Sd,y.flatMapDepth=kd,y.flatten=hc,y.flattenDeep=mp,y.flattenDepth=_p,y.flip=Kd,y.flow=Fy,y.flowRight=My,y.fromPairs=wp,y.functions=Mg,y.functionsIn=qg,y.groupBy=Ad,y.initial=Cp,y.intersection=Sp,y.intersectionBy=kp,y.intersectionWith=Ap,y.invert=Hg,y.invertBy=Kg,y.invokeMap=Ed,y.iteratee=Do,y.keyBy=Td,y.keys=Wt,y.keysIn=oe,y.map=Qr,y.mapKeys=Xg,y.mapValues=Gg,y.matches=qy,y.matchesProperty=Wy,y.memoize=ei,y.merge=$g,y.mergeWith=Bc,y.method=Hy,y.methodOf=Ky,y.mixin=Po,y.negate=ni,y.nthArg=Xy,y.omit=Jg,y.omitBy=jg,y.once=zd,y.orderBy=Rd,y.over=Gy,y.overArgs=Xd,y.overEvery=$y,y.overSome=Jy,y.partial=Ro,y.partialRight=kc,y.partition=Od,y.pick=Yg,y.pickBy=Lc,y.property=Wc,y.propertyOf=jy,y.pull=Rp,y.pullAll=pc,y.pullAllBy=Op,y.pullAllWith=Ip,y.pullAt=Np,y.range=Yy,y.rangeRight=Vy,y.rearg=Gd,y.reject=Bd,y.remove=Bp,y.rest=$d,y.reverse=xo,y.sampleSize=Ud,y.set=Zg,y.setWith=Qg,y.shuffle=Dd,y.slice=Lp,y.sortBy=Md,y.sortedUniq=Wp,y.sortedUniqBy=Hp,y.split=Cy,y.spread=Jd,y.tail=Kp,y.take=zp,y.takeRight=Xp,y.takeRightWhile=Gp,y.takeWhile=$p,y.tap=cd,y.throttle=jd,y.thru=Zr,y.toArray=Rc,y.toPairs=Uc,y.toPairsIn=Dc,y.toPath=nv,y.toPlainObject=Ic,y.transform=ty,y.unary=Yd,y.union=Jp,y.unionBy=jp,y.unionWith=Yp,y.uniq=Vp,y.uniqBy=Zp,y.uniqWith=Qp,y.unset=ey,y.unzip=Eo,y.unzipWith=dc,y.update=ny,y.updateWith=ry,y.values=Pn,y.valuesIn=iy,y.without=td,y.words=Mc,y.wrap=Vd,y.xor=ed,y.xorBy=nd,y.xorWith=rd,y.zip=id,y.zipObject=od,y.zipObjectDeep=sd,y.zipWith=ad,y.entries=Uc,y.entriesIn=Dc,y.extend=Nc,y.extendWith=oi,Po(y,y),y.add=iv,y.attempt=qc,y.camelCase=cy,y.capitalize=Pc,y.ceil=ov,y.clamp=oy,y.clone=Qd,y.cloneDeep=eg,y.cloneDeepWith=ng,y.cloneWith=tg,y.conformsTo=rg,y.deburr=Fc,y.defaultTo=Py,y.divide=sv,y.endsWith=uy,y.eq=Te,y.escape=fy,y.escapeRegExp=hy,y.every=md,y.find=wd,y.findIndex=uc,y.findKey=Bg,y.findLast=bd,y.findLastIndex=fc,y.findLastKey=Lg,y.floor=av,y.forEach=yc,y.forEachRight=vc,y.forIn=Ug,y.forInRight=Dg,y.forOwn=Pg,y.forOwnRight=Fg,y.get=No,y.gt=ig,y.gte=og,y.has=Wg,y.hasIn=Bo,y.head=lc,y.identity=se,y.includes=xd,y.indexOf=bp,y.inRange=sy,y.invoke=zg,y.isArguments=_n,y.isArray=ht,y.isArrayBuffer=sg,y.isArrayLike=ie,y.isArrayLikeObject=Ut,y.isBoolean=ag,y.isBuffer=sn,y.isDate=cg,y.isElement=ug,y.isEmpty=fg,y.isEqual=hg,y.isEqualWith=lg,y.isError=Oo,y.isFinite=pg,y.isFunction=Xe,y.isInteger=Ac,y.isLength=ri,y.isMap=xc,y.isMatch=dg,y.isMatchWith=gg,y.isNaN=yg,y.isNative=vg,y.isNil=_g,y.isNull=mg,y.isNumber=Ec,y.isObject=Bt,y.isObjectLike=Lt,y.isPlainObject=fr,y.isRegExp=Io,y.isSafeInteger=wg,y.isSet=Tc,y.isString=ii,y.isSymbol=pe,y.isTypedArray=Dn,y.isUndefined=bg,y.isWeakMap=Cg,y.isWeakSet=Sg,y.join=xp,y.kebabCase=ly,y.last=Ce,y.lastIndexOf=Ep,y.lowerCase=py,y.lowerFirst=dy,y.lt=kg,y.lte=Ag,y.max=cv,y.maxBy=uv,y.mean=fv,y.meanBy=hv,y.min=lv,y.minBy=pv,y.stubArray=Mo,y.stubFalse=qo,y.stubObject=Zy,y.stubString=Qy,y.stubTrue=tv,y.multiply=dv,y.nth=Tp,y.noConflict=zy,y.noop=Fo,y.now=ti,y.pad=gy,y.padEnd=yy,y.padStart=vy,y.parseInt=my,y.random=ay,y.reduce=Id,y.reduceRight=Nd,y.repeat=_y,y.replace=wy,y.result=Vg,y.round=gv,y.runInContext=x,y.sample=Ld,y.size=Pd,y.snakeCase=by,y.some=Fd,y.sortedIndex=Up,y.sortedIndexBy=Dp,y.sortedIndexOf=Pp,y.sortedLastIndex=Fp,y.sortedLastIndexBy=Mp,y.sortedLastIndexOf=qp,y.startCase=Sy,y.startsWith=ky,y.subtract=yv,y.sum=vv,y.sumBy=mv,y.template=Ay,y.times=ev,y.toFinite=Ge,y.toInteger=dt,y.toLength=Oc,y.toLower=xy,y.toNumber=Se,y.toSafeInteger=xg,y.toString=At,y.toUpper=Ey,y.trim=Ty,y.trimEnd=Ry,y.trimStart=Oy,y.truncate=Iy,y.unescape=Ny,y.uniqueId=rv,y.upperCase=By,y.upperFirst=Lo,y.each=yc,y.eachRight=vc,y.first=lc,Po(y,function(){var t={};return Le(y,function(e,i){Et.call(y.prototype,i)||(t[i]=e)}),t}(),{chain:!1}),y.VERSION=s,ve(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){y[t].placeholder=y}),ve(["drop","take"],function(t,e){mt.prototype[t]=function(i){i=i===n?1:Mt(dt(i),0);var a=this.__filtered__&&!e?new mt(this):this.clone();return a.__filtered__?a.__takeCount__=Jt(i,a.__takeCount__):a.__views__.push({size:Jt(i,ce),type:t+(a.__dir__<0?"Right":"")}),a},mt.prototype[t+"Right"]=function(i){return this.reverse()[t](i).reverse()}}),ve(["filter","map","takeWhile"],function(t,e){var i=e+1,a=i==F||i==ct;mt.prototype[t]=function(h){var m=this.clone();return m.__iteratees__.push({iteratee:it(h,3),type:i}),m.__filtered__=m.__filtered__||a,m}}),ve(["head","last"],function(t,e){var i="take"+(e?"Right":"");mt.prototype[t]=function(){return this[i](1).value()[0]}}),ve(["initial","tail"],function(t,e){var i="drop"+(e?"":"Right");mt.prototype[t]=function(){return this.__filtered__?new mt(this):this[i](1)}}),mt.prototype.compact=function(){return this.filter(se)},mt.prototype.find=function(t){return this.filter(t).head()},mt.prototype.findLast=function(t){return this.reverse().find(t)},mt.prototype.invokeMap=yt(function(t,e){return typeof t=="function"?new mt(this):this.map(function(i){return ir(i,t,e)})}),mt.prototype.reject=function(t){return this.filter(ni(it(t)))},mt.prototype.slice=function(t,e){t=dt(t);var i=this;return i.__filtered__&&(t>0||e<0)?new mt(i):(t<0?i=i.takeRight(-t):t&&(i=i.drop(t)),e!==n&&(e=dt(e),i=e<0?i.dropRight(-e):i.take(e-t)),i)},mt.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},mt.prototype.toArray=function(){return this.take(ce)},Le(mt.prototype,function(t,e){var i=/^(?:filter|find|map|reject)|While$/.test(e),a=/^(?:head|last)$/.test(e),h=y[a?"take"+(e=="last"?"Right":""):e],m=a||/^find/.test(e);h&&(y.prototype[e]=function(){var C=this.__wrapped__,S=a?[1]:arguments,E=C instanceof mt,M=S[0],q=E||ht(C),W=function(vt){var _t=h.apply(y,Ze([vt],S));return a&&j?_t[0]:_t};q&&i&&typeof M=="function"&&M.length!=1&&(E=q=!1);var j=this.__chain__,tt=!!this.__actions__.length,ot=m&&!j,gt=E&&!tt;if(!m&&q){C=gt?C:new mt(this);var st=t.apply(C,S);return st.__actions__.push({func:Zr,args:[W],thisArg:n}),new _e(st,j)}return ot&>?t.apply(this,S):(st=this.thru(W),ot?a?st.value()[0]:st.value():st)})}),ve(["pop","push","shift","sort","splice","unshift"],function(t){var e=kr[t],i=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",a=/^(?:pop|shift)$/.test(t);y.prototype[t]=function(){var h=arguments;if(a&&!this.__chain__){var m=this.value();return e.apply(ht(m)?m:[],h)}return this[i](function(C){return e.apply(ht(C)?C:[],h)})}}),Le(mt.prototype,function(t,e){var i=y[e];if(i){var a=i.name+"";Et.call(In,a)||(In[a]=[]),In[a].push({name:e,func:i})}}),In[Xr(n,L).name]=[{name:"wrapper",func:n}],mt.prototype.clone=Nh,mt.prototype.reverse=Bh,mt.prototype.value=Lh,y.prototype.at=ud,y.prototype.chain=fd,y.prototype.commit=hd,y.prototype.next=ld,y.prototype.plant=dd,y.prototype.reverse=gd,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=yd,y.prototype.first=y.prototype.head,Vn&&(y.prototype[Vn]=pd),y},Tn=hh();hn?((hn.exports=Tn)._=Tn,Ui._=Tn):Kt._=Tn}).call(hr)})(fi,fi.exports);var Tv=fi.exports;const Rv={isNewStack:!1,forceNew:!0,reconnectionDelay:1e4,reconnectionDelayMax:1e4,maxReconnectAttempts:5,timeout:1e4,keepAliveTimeout:6e4,idleInterval:6e4*5,protocol:"https",transports:["websocket"],upgrade:!1,serverFetchStrategy:"static",serverType:0,useLogger:!0,loggerServer:"http://socketlog.voicenter.co",loggerConfig:{logToConsole:!0,overloadGlobalConsole:!1,namespace:"events-sdk",socketEmitInterval:1e4},loggerConnectOptions:{reconnection:!0,reconnectionDelay:5e3,reconnectionAttempts:10,perMessageDeflate:void 0,upgrade:!1,transports:["websocket"],debug:!1}};function Ov(){return function r(o,n,s){function c(d,b){if(!n[d]){if(!o[d]){var p=typeof require=="function"&&require;if(!b&&p)return p(d,!0);if(f)return f(d,!0);throw new Error("Cannot find module '"+d+"'")}var _=n[d]={exports:{}};o[d][0].call(_.exports,function(g){var l=o[d][1][g];return c(l||g)},_,_.exports,r,o,n,s)}return n[d].exports}for(var f=typeof require=="function"&&require,v=0;v<s.length;v++)c(s[v]);return c}({1:[function(r,o){o.exports=r("./lib/")},{"./lib/":2}],2:[function(r,o,n){function s(p,_){typeof p=="object"&&(_=p,p=void 0),_=_||{};var g,l=c(p),u=l.source,w=l.id;return _.forceNew||_["force new connection"]||_.multiplex===!1?(d("ignoring socket cache for %s",u),g=v(u,_)):(b[w]||(d("new io instance for %s",u),b[w]=v(u,_)),g=b[w]),g.socket(l.path)}var c=r("./url"),f=r("socket.io-parser"),v=r("./manager"),d=r("debug")("socket.io-client");o.exports=n=s;var b=n.managers={};n.protocol=f.protocol,n.connect=s,n.Manager=r("./manager"),n.Socket=r("./socket")},{"./manager":3,"./socket":5,"./url":6,debug:10,"socket.io-parser":44}],3:[function(r,o){function n(l,u){return this instanceof n?(l&&typeof l=="object"&&(u=l,l=void 0),u=u||{},u.path=u.path||"/socket.io",this.nsps={},this.subs=[],this.opts=u,this.reconnection(u.reconnection!==!1),this.reconnectionAttempts(u.reconnectionAttempts||1/0),this.reconnectionDelay(u.reconnectionDelay||1e3),this.reconnectionDelayMax(u.reconnectionDelayMax||5e3),this.randomizationFactor(u.randomizationFactor||.5),this.backoff=new g({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(u.timeout==null?2e4:u.timeout),this.readyState="closed",this.uri=l,this.connected=[],this.encoding=!1,this.packetBuffer=[],this.encoder=new v.Encoder,this.decoder=new v.Decoder,this.autoConnect=u.autoConnect!==!1,void(this.autoConnect&&this.open())):new n(l,u)}var s=(r("./url"),r("engine.io-client")),c=r("./socket"),f=r("component-emitter"),v=r("socket.io-parser"),d=r("./on"),b=r("component-bind"),p=(r("object-component"),r("debug")("socket.io-client:manager")),_=r("indexof"),g=r("backo2");o.exports=n,n.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var l in this.nsps)this.nsps[l].emit.apply(this.nsps[l],arguments)},n.prototype.updateSocketIds=function(){for(var l in this.nsps)this.nsps[l].id=this.engine.id},f(n.prototype),n.prototype.reconnection=function(l){return arguments.length?(this._reconnection=!!l,this):this._reconnection},n.prototype.reconnectionAttempts=function(l){return arguments.length?(this._reconnectionAttempts=l,this):this._reconnectionAttempts},n.prototype.reconnectionDelay=function(l){return arguments.length?(this._reconnectionDelay=l,this.backoff&&this.backoff.setMin(l),this):this._reconnectionDelay},n.prototype.randomizationFactor=function(l){return arguments.length?(this._randomizationFactor=l,this.backoff&&this.backoff.setJitter(l),this):this._randomizationFactor},n.prototype.reconnectionDelayMax=function(l){return arguments.length?(this._reconnectionDelayMax=l,this.backoff&&this.backoff.setMax(l),this):this._reconnectionDelayMax},n.prototype.timeout=function(l){return arguments.length?(this._timeout=l,this):this._timeout},n.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()},n.prototype.open=n.prototype.connect=function(l){if(p("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;p("opening %s",this.uri),this.engine=s(this.uri,this.opts);var u=this.engine,w=this;this.readyState="opening",this.skipReconnect=!1;var A=d(u,"open",function(){w.onopen(),l&&l()}),k=d(u,"error",function(J){if(p("connect_error"),w.cleanup(),w.readyState="closed",w.emitAll("connect_error",J),l){var N=new Error("Connection error");N.data=J,l(N)}else w.maybeReconnectOnOpen()});if(this._timeout!==!1){var L=this._timeout;p("connect attempt will timeout after %d",L);var Y=setTimeout(function(){p("connect attempt timed out after %d",L),A.destroy(),u.close(),u.emit("error","timeout"),w.emitAll("connect_timeout",L)},L);this.subs.push({destroy:function(){clearTimeout(Y)}})}return this.subs.push(A),this.subs.push(k),this},n.prototype.onopen=function(){p("open"),this.cleanup(),this.readyState="open",this.emit("open");var l=this.engine;this.subs.push(d(l,"data",b(this,"ondata"))),this.subs.push(d(this.decoder,"decoded",b(this,"ondecoded"))),this.subs.push(d(l,"error",b(this,"onerror"))),this.subs.push(d(l,"close",b(this,"onclose")))},n.prototype.ondata=function(l){this.decoder.add(l)},n.prototype.ondecoded=function(l){this.emit("packet",l)},n.prototype.onerror=function(l){p("error",l),this.emitAll("error",l)},n.prototype.socket=function(l){var u=this.nsps[l];if(!u){u=new c(this,l),this.nsps[l]=u;var w=this;u.on("connect",function(){u.id=w.engine.id,~_(w.connected,u)||w.connected.push(u)})}return u},n.prototype.destroy=function(l){var u=_(this.connected,l);~u&&this.connected.splice(u,1),this.connected.length||this.close()},n.prototype.packet=function(l){p("writing packet %j",l);var u=this;u.encoding?u.packetBuffer.push(l):(u.encoding=!0,this.encoder.encode(l,function(w){for(var A=0;A<w.length;A++)u.engine.write(w[A]);u.encoding=!1,u.processPacketQueue()}))},n.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var l=this.packetBuffer.shift();this.packet(l)}},n.prototype.cleanup=function(){for(var l;l=this.subs.shift();)l.destroy();this.packetBuffer=[],this.encoding=!1,this.decoder.destroy()},n.prototype.close=n.prototype.disconnect=function(){this.skipReconnect=!0,this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},n.prototype.onclose=function(l){p("close"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",l),this._reconnection&&!this.skipReconnect&&this.reconnect()},n.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var l=this;if(this.backoff.attempts>=this._reconnectionAttempts)p("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var u=this.backoff.duration();p("will wait %dms before reconnect attempt",u),this.reconnecting=!0;var w=setTimeout(function(){l.skipReconnect||(p("attempting reconnect"),l.emitAll("reconnect_attempt",l.backoff.attempts),l.emitAll("reconnecting",l.backoff.attempts),l.skipReconnect||l.open(function(A){A?(p("reconnect attempt error"),l.reconnecting=!1,l.reconnect(),l.emitAll("reconnect_error",A.data)):(p("reconnect success"),l.onreconnect())}))},u);this.subs.push({destroy:function(){clearTimeout(w)}})}},n.prototype.onreconnect=function(){var l=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",l)}},{"./on":4,"./socket":5,"./url":6,backo2:7,"component-bind":8,"component-emitter":9,debug:10,"engine.io-client":11,indexof:40,"object-component":41,"socket.io-parser":44}],4:[function(r,o){function n(s,c,f){return s.on(c,f),{destroy:function(){s.removeListener(c,f)}}}o.exports=n},{}],5:[function(r,o,n){function s(u,w){this.io=u,this.nsp=w,this.json=this,this.ids=0,this.acks={},this.io.autoConnect&&this.open(),this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0}var c=r("socket.io-parser"),f=r("component-emitter"),v=r("to-array"),d=r("./on"),b=r("component-bind"),p=r("debug")("socket.io-client:socket"),_=r("has-binary");o.exports=s;var g={connect:1,connect_error:1,connect_timeout:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1},l=f.prototype.emit;f(s.prototype),s.prototype.subEvents=function(){if(!this.subs){var u=this.io;this.subs=[d(u,"open",b(this,"onopen")),d(u,"packet",b(this,"onpacket")),d(u,"close",b(this,"onclose"))]}},s.prototype.open=s.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),this.io.readyState=="open"&&this.onopen(),this)},s.prototype.send=function(){var u=v(arguments);return u.unshift("message"),this.emit.apply(this,u),this},s.prototype.emit=function(u){if(g.hasOwnProperty(u))return l.apply(this,arguments),this;var w=v(arguments),A=c.EVENT;_(w)&&(A=c.BINARY_EVENT);var k={type:A,data:w};return typeof w[w.length-1]=="function"&&(p("emitting packet with ack id %d",this.ids),this.acks[this.ids]=w.pop(),k.id=this.ids++),this.connected?this.packet(k):this.sendBuffer.push(k),this},s.prototype.packet=function(u){u.nsp=this.nsp,this.io.packet(u)},s.prototype.onopen=function(){p("transport is open - connecting"),this.nsp!="/"&&this.packet({type:c.CONNECT})},s.prototype.onclose=function(u){p("close (%s)",u),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",u)},s.prototype.onpacket=function(u){if(u.nsp==this.nsp)switch(u.type){case c.CONNECT:this.onconnect();break;case c.EVENT:this.onevent(u);break;case c.BINARY_EVENT:this.onevent(u);break;case c.ACK:this.onack(u);break;case c.BINARY_ACK:this.onack(u);break;case c.DISCONNECT:this.ondisconnect();break;case c.ERROR:this.emit("error",u.data)}},s.prototype.onevent=function(u){var w=u.data||[];p("emitting event %j",w),u.id!=null&&(p("attaching ack callback to event"),w.push(this.ack(u.id))),this.connected?l.apply(this,w):this.receiveBuffer.push(w)},s.prototype.ack=function(u){var w=this,A=!1;return function(){if(!A){A=!0;var k=v(arguments);p("sending ack %j",k);var L=_(k)?c.BINARY_ACK:c.ACK;w.packet({type:L,id:u,data:k})}}},s.prototype.onack=function(u){p("calling ack %s with %j",u.id,u.data);var w=this.acks[u.id];w.apply(this,u.data),delete this.acks[u.id]},s.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},s.prototype.emitBuffered=function(){var u;for(u=0;u<this.receiveBuffer.length;u++)l.apply(this,this.receiveBuffer[u]);for(this.receiveBuffer=[],u=0;u<this.sendBuffer.length;u++)this.packet(this.sendBuffer[u]);this.sendBuffer=[]},s.prototype.ondisconnect=function(){p("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},s.prototype.destroy=function(){if(this.subs){for(var u=0;u<this.subs.length;u++)this.subs[u].destroy();this.subs=null}this.io.destroy(this)},s.prototype.close=s.prototype.disconnect=function(){return this.connected&&(p("performing disconnect (%s)",this.nsp),this.packet({type:c.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}},{"./on":4,"component-bind":8,"component-emitter":9,debug:10,"has-binary":36,"socket.io-parser":44,"to-array":48}],6:[function(r,o){(function(n){function s(v,p){var b=v,p=p||n.location;return v==null&&(v=p.protocol+"//"+p.host),typeof v=="string"&&(v.charAt(0)=="/"&&(v=v.charAt(1)=="/"?p.protocol+v:p.hostname+v),/^(https?|wss?):\/\//.test(v)||(f("protocol-less url %s",v),v=typeof p<"u"?p.protocol+"//"+v:"https://"+v),f("parse %s",v),b=c(v)),b.port||(/^(http|ws)$/.test(b.protocol)?b.port="80":/^(http|ws)s$/.test(b.protocol)&&(b.port="443")),b.path=b.path||"/",b.id=b.protocol+"://"+b.host+":"+b.port,b.href=b.protocol+"://"+b.host+(p&&p.port==b.port?"":":"+b.port),b}var c=r("parseuri"),f=r("debug")("socket.io-client:url");o.exports=s}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{debug:10,parseuri:42}],7:[function(r,o){function n(s){s=s||{},this.ms=s.min||100,this.max=s.max||1e4,this.factor=s.factor||2,this.jitter=s.jitter>0&&s.jitter<=1?s.jitter:0,this.attempts=0}o.exports=n,n.prototype.duration=function(){var s=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var c=Math.random(),f=Math.floor(c*this.jitter*s);s=1&Math.floor(10*c)?s+f:s-f}return 0|Math.min(s,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(s){this.ms=s},n.prototype.setMax=function(s){this.max=s},n.prototype.setJitter=function(s){this.jitter=s}},{}],8:[function(r,o){var n=[].slice;o.exports=function(s,c){if(typeof c=="string"&&(c=s[c]),typeof c!="function")throw new Error("bind() requires a function");var f=n.call(arguments,2);return function(){return c.apply(s,f.concat(n.call(arguments)))}}},{}],9:[function(r,o){function n(c){return c?s(c):void 0}function s(c){for(var f in n.prototype)c[f]=n.prototype[f];return c}o.exports=n,n.prototype.on=n.prototype.addEventListener=function(c,f){return this._callbacks=this._callbacks||{},(this._callbacks[c]=this._callbacks[c]||[]).push(f),this},n.prototype.once=function(c,f){function v(){d.off(c,v),f.apply(this,arguments)}var d=this;return this._callbacks=this._callbacks||{},v.fn=f,this.on(c,v),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(c,f){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var v=this._callbacks[c];if(!v)return this;if(arguments.length==1)return delete this._callbacks[c],this;for(var d,b=0;b<v.length;b++)if(d=v[b],d===f||d.fn===f){v.splice(b,1);break}return this},n.prototype.emit=function(c){this._callbacks=this._callbacks||{};var f=[].slice.call(arguments,1),v=this._callbacks[c];if(v){v=v.slice(0);for(var d=0,b=v.length;b>d;++d)v[d].apply(this,f)}return this},n.prototype.listeners=function(c){return this._callbacks=this._callbacks||{},this._callbacks[c]||[]},n.prototype.hasListeners=function(c){return!!this.listeners(c).length}},{}],10:[function(r,o){function n(c){return n.enabled(c)?function(f){f=s(f);var v=new Date,d=v-(n[c]||v);n[c]=v,f=c+" "+f+" +"+n.humanize(d),window.console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}:function(){}}function s(c){return c instanceof Error?c.stack||c.message:c}o.exports=n,n.names=[],n.skips=[],n.enable=function(c){try{localStorage.debug=c}catch{}for(var f=(c||"").split(/[\s,]+/),v=f.length,d=0;v>d;d++)c=f[d].replace("*",".*?"),c[0]==="-"?n.skips.push(new RegExp("^"+c.substr(1)+"$")):n.names.push(new RegExp("^"+c+"$"))},n.disable=function(){n.enable("")},n.humanize=function(c){var f=1e3,v=6e4,d=60*v;return c>=d?(c/d).toFixed(1)+"h":c>=v?(c/v).toFixed(1)+"m":c>=f?(c/f|0)+"s":c+"ms"},n.enabled=function(c){for(var f=0,v=n.skips.length;v>f;f++)if(n.skips[f].test(c))return!1;for(var f=0,v=n.names.length;v>f;f++)if(n.names[f].test(c))return!0;return!1};try{window.localStorage&&n.enable(localStorage.debug)}catch{}},{}],11:[function(r,o){o.exports=r("./lib/")},{"./lib/":12}],12:[function(r,o){o.exports=r("./socket"),o.exports.parser=r("engine.io-parser")},{"./socket":13,"engine.io-parser":25}],13:[function(r,o){(function(n){function s(u,w){if(!(this instanceof s))return new s(u,w);if(w=w||{},u&&typeof u=="object"&&(w=u,u=null),u&&(u=_(u),w.host=u.host,w.secure=u.protocol=="https"||u.protocol=="wss",w.port=u.port,u.query&&(w.query=u.query)),this.secure=w.secure!=null?w.secure:n.location&&location.protocol=="https:",w.host){var A=w.host.split(":");w.hostname=A.shift(),A.length?w.port=A.pop():w.port||(w.port=this.secure?"443":"80")}this.agent=w.agent||!1,this.hostname=w.hostname||(n.location?location.hostname:"localhost"),this.port=w.port||(n.location&&location.port?location.port:this.secure?443:80),this.query=w.query||{},typeof this.query=="string"&&(this.query=l.decode(this.query)),this.upgrade=w.upgrade!==!1,this.path=(w.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!w.forceJSONP,this.jsonp=w.jsonp!==!1,this.forceBase64=!!w.forceBase64,this.enablesXDR=!!w.enablesXDR,this.timestampParam=w.timestampParam||"t",this.timestampRequests=w.timestampRequests,this.transports=w.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.callbackBuffer=[],this.policyPort=w.policyPort||843,this.rememberUpgrade=w.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=w.onlyBinaryUpgrades,this.pfx=w.pfx||null,this.key=w.key||null,this.passphrase=w.passphrase||null,this.cert=w.cert||null,this.ca=w.ca||null,this.ciphers=w.ciphers||null,this.rejectUnauthorized=w.rejectUnauthorized||null,this.open()}function c(u){var w={};for(var A in u)u.hasOwnProperty(A)&&(w[A]=u[A]);return w}var f=r("./transports"),v=r("component-emitter"),d=r("debug")("engine.io-client:socket"),b=r("indexof"),p=r("engine.io-parser"),_=r("parseuri"),g=r("parsejson"),l=r("parseqs");o.exports=s,s.priorWebsocketSuccess=!1,v(s.prototype),s.protocol=p.protocol,s.Socket=s,s.Transport=r("./transport"),s.transports=r("./transports"),s.parser=r("engine.io-parser"),s.prototype.createTransport=function(u){d('creating transport "%s"',u);var w=c(this.query);w.EIO=p.protocol,w.transport=u,this.id&&(w.sid=this.id);var A=new f[u]({agent:this.agent,hostname:this.hostname,port:this.port,secure:this.secure,path:this.path,query:w,forceJSONP:this.forceJSONP,jsonp:this.jsonp,forceBase64:this.forceBase64,enablesXDR:this.enablesXDR,timestampRequests:this.timestampRequests,timestampParam:this.timestampParam,policyPort:this.policyPort,socket:this,pfx:this.pfx,key:this.key,passphrase:this.passphrase,cert:this.cert,ca:this.ca,ciphers:this.ciphers,rejectUnauthorized:this.rejectUnauthorized});return A},s.prototype.open=function(){var w;if(this.rememberUpgrade&&s.priorWebsocketSuccess&&this.transports.indexOf("websocket")!=-1)w="websocket";else{if(this.transports.length==0){var u=this;return void setTimeout(function(){u.emit("error","No transports available")},0)}w=this.transports[0]}this.readyState="opening";var w;try{w=this.createTransport(w)}catch{return this.transports.shift(),void this.open()}w.open(),this.setTransport(w)},s.prototype.setTransport=function(u){d("setting transport %s",u.name);var w=this;this.transport&&(d("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=u,u.on("drain",function(){w.onDrain()}).on("packet",function(A){w.onPacket(A)}).on("error",function(A){w.onError(A)}).on("close",function(){w.onClose("transport close")})},s.prototype.probe=function(u){function w(){if(I.onlyBinaryUpgrades){var P=!this.supportsBinary&&I.transport.supportsBinary;T=T||P}T||(d('probe transport "%s" opened',u),U.send([{type:"ping",data:"probe"}]),U.once("packet",function(R){if(!T)if(R.type=="pong"&&R.data=="probe"){if(d('probe transport "%s" pong',u),I.upgrading=!0,I.emit("upgrading",U),!U)return;s.priorWebsocketSuccess=U.name=="websocket",d('pausing current transport "%s"',I.transport.name),I.transport.pause(function(){T||I.readyState!="closed"&&(d("changing transport and sending upgrade packet"),N(),I.setTransport(U),U.send([{type:"upgrade"}]),I.emit("upgrade",U),U=null,I.upgrading=!1,I.flush())})}else{d('probe transport "%s" failed',u);var B=new Error("probe error");B.transport=U.name,I.emit("upgradeError",B)}}))}function A(){T||(T=!0,N(),U.close(),U=null)}function k(P){var R=new Error("probe error: "+P);R.transport=U.name,A(),d('probe transport "%s" failed because of error: %s',u,P),I.emit("upgradeError",R)}function L(){k("transport closed")}function Y(){k("socket closed")}function J(P){U&&P.name!=U.name&&(d('"%s" works - aborting "%s"',P.name,U.name),A())}function N(){U.removeListener("open",w),U.removeListener("error",k),U.removeListener("close",L),I.removeListener("close",Y),I.removeListener("upgrading",J)}d('probing transport "%s"',u);var U=this.createTransport(u,{probe:1}),T=!1,I=this;s.priorWebsocketSuccess=!1,U.once("open",w),U.once("error",k),U.once("close",L),this.once("close",Y),this.once("upgrading",J),U.open()},s.prototype.onOpen=function(){if(d("socket open"),this.readyState="open",s.priorWebsocketSuccess=this.transport.name=="websocket",this.emit("open"),this.flush(),this.readyState=="open"&&this.upgrade&&this.transport.pause){d("starting upgrade probes");for(var u=0,w=this.upgrades.length;w>u;u++)this.probe(this.upgrades[u])}},s.prototype.onPacket=function(u){if(this.readyState=="opening"||this.readyState=="open")switch(d('socket receive: type "%s", data "%s"',u.type,u.data),this.emit("packet",u),this.emit("heartbeat"),u.type){case"open":this.onHandshake(g(u.data));break;case"pong":this.setPing();break;case"error":var w=new Error("server error");w.code=u.data,this.emit("error",w);break;case"message":this.emit("data",u.data),this.emit("message",u.data)}else d('packet received with socket readyState "%s"',this.readyState)},s.prototype.onHandshake=function(u){this.emit("handshake",u),this.id=u.sid,this.transport.query.sid=u.sid,this.upgrades=this.filterUpgrades(u.upgrades),this.pingInterval=u.pingInterval,this.pingTimeout=u.pingTimeout,this.onOpen(),this.readyState!="closed"&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},s.prototype.onHeartbeat=function(u){clearTimeout(this.pingTimeoutTimer);var w=this;w.pingTimeoutTimer=setTimeout(function(){w.readyState!="closed"&&w.onClose("ping timeout")},u||w.pingInterval+w.pingTimeout)},s.prototype.setPing=function(){var u=this;clearTimeout(u.pingIntervalTimer),u.pingIntervalTimer=setTimeout(function(){d("writing ping packet - expecting pong within %sms",u.pingTimeout),u.ping(),u.onHeartbeat(u.pingTimeout)},u.pingInterval)},s.prototype.ping=function(){this.sendPacket("ping")},s.prototype.onDrain=function(){for(var u=0;u<this.prevBufferLen;u++)this.callbackBuffer[u]&&this.callbackBuffer[u]();this.writeBuffer.splice(0,this.prevBufferLen),this.callbackBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length==0?this.emit("drain"):this.flush()},s.prototype.flush=function(){this.readyState!="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(d("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},s.prototype.write=s.prototype.send=function(u,w){return this.sendPacket("message",u,w),this},s.prototype.sendPacket=function(u,w,A){if(this.readyState!="closing"&&this.readyState!="closed"){var k={type:u,data:w};this.emit("packetCreate",k),this.writeBuffer.push(k),this.callbackBuffer.push(A),this.flush()}},s.prototype.close=function(){function u(){k.onClose("forced close"),d("socket closing - telling transport to close"),k.transport.close()}function w(){k.removeListener("upgrade",w),k.removeListener("upgradeError",w),u()}function A(){k.once("upgrade",w),k.once("upgradeError",w)}if(this.readyState=="opening"||this.readyState=="open"){this.readyState="closing";var k=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?A():u()}):this.upgrading?A():u()}return this},s.prototype.onError=function(u){d("socket error %j",u),s.priorWebsocketSuccess=!1,this.emit("error",u),this.onClose("transport error",u)},s.prototype.onClose=function(u,w){if(this.readyState=="opening"||this.readyState=="open"||this.readyState=="closing"){d('socket close with reason: "%s"',u);var A=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),setTimeout(function(){A.writeBuffer=[],A.callbackBuffer=[],A.prevBufferLen=0},0),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",u,w)}},s.prototype.filterUpgrades=function(u){for(var w=[],A=0,k=u.length;k>A;A++)~b(this.transports,u[A])&&w.push(u[A]);return w}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./transport":14,"./transports":15,"component-emitter":9,debug:22,"engine.io-parser":25,indexof:40,parsejson:32,parseqs:33,parseuri:34}],14:[function(r,o){function n(f){this.path=f.path,this.hostname=f.hostname,this.port=f.port,this.secure=f.secure,this.query=f.query,this.timestampParam=f.timestampParam,this.timestampRequests=f.timestampRequests,this.readyState="",this.agent=f.agent||!1,this.socket=f.socket,this.enablesXDR=f.enablesXDR,this.pfx=f.pfx,this.key=f.key,this.passphrase=f.passphrase,this.cert=f.cert,this.ca=f.ca,this.ciphers=f.ciphers,this.rejectUnauthorized=f.rejectUnauthorized}var s=r("engine.io-parser"),c=r("component-emitter");o.exports=n,c(n.prototype),n.timestamps=0,n.prototype.onError=function(f,v){var d=new Error(f);return d.type="TransportError",d.description=v,this.emit("error",d),this},n.prototype.open=function(){return(this.readyState=="closed"||this.readyState=="")&&(this.readyState="opening",this.doOpen()),this},n.prototype.close=function(){return(this.readyState=="opening"||this.readyState=="open")&&(this.doClose(),this.onClose()),this},n.prototype.send=function(f){if(this.readyState!="open")throw new Error("Transport not open");this.write(f)},n.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},n.prototype.onData=function(f){var v=s.decodePacket(f,this.socket.binaryType);this.onPacket(v)},n.prototype.onPacket=function(f){this.emit("packet",f)},n.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},{"component-emitter":9,"engine.io-parser":25}],15:[function(r,o,n){(function(s){function c(p){var _,g=!1,l=!1,u=p.jsonp!==!1;if(s.location){var w=location.protocol=="https:",A=location.port;A||(A=w?443:80),g=p.hostname!=location.hostname||A!=p.port,l=p.secure!=w}if(p.xdomain=g,p.xscheme=l,_=new f(p),"open"in _&&!p.forceJSONP)return new v(p);if(!u)throw new Error("JSONP disabled");return new d(p)}var f=r("xmlhttprequest"),v=r("./polling-xhr"),d=r("./polling-jsonp"),b=r("./websocket");n.polling=c,n.websocket=b}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./polling-jsonp":16,"./polling-xhr":17,"./websocket":19,xmlhttprequest:20}],16:[function(r,o){(function(n){function s(){}function c(_){f.call(this,_),this.query=this.query||{},d||(n.___eio||(n.___eio=[]),d=n.___eio),this.index=d.length;var g=this;d.push(function(l){g.onData(l)}),this.query.j=this.index,n.document&&n.addEventListener&&n.addEventListener("beforeunload",function(){g.script&&(g.script.onerror=s)},!1)}var f=r("./polling"),v=r("component-inherit");o.exports=c;var d,b=/\n/g,p=/\\n/g;v(c,f),c.prototype.supportsBinary=!1,c.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),f.prototype.doClose.call(this)},c.prototype.doPoll=function(){var _=this,g=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),g.async=!0,g.src=this.uri(),g.onerror=function(w){_.onError("jsonp poll error",w)};var l=document.getElementsByTagName("script")[0];l.parentNode.insertBefore(g,l),this.script=g;var u=typeof navigator<"u"&&/gecko/i.test(navigator.userAgent);u&&setTimeout(function(){var w=document.createElement("iframe");document.body.appendChild(w),document.body.removeChild(w)},100)},c.prototype.doWrite=function(_,g){function l(){u(),g()}function u(){if(w.iframe)try{w.form.removeChild(w.iframe)}catch(N){w.onError("jsonp polling iframe removal error",N)}try{var J='<iframe src="javascript:0" name="'+w.iframeId+'">';A=document.createElement(J)}catch{A=document.createElement("iframe"),A.name=w.iframeId,A.src="javascript:0"}A.id=w.iframeId,w.form.appendChild(A),w.iframe=A}var w=this;if(!this.form){var A,k=document.createElement("form"),L=document.createElement("textarea"),Y=this.iframeId="eio_iframe_"+this.index;k.className="socketio",k.style.position="absolute",k.style.top="-1000px",k.style.left="-1000px",k.target=Y,k.method="POST",k.setAttribute("accept-charset","utf-8"),L.name="d",k.appendChild(L),document.body.appendChild(k),this.form=k,this.area=L}this.form.action=this.uri(),u(),_=_.replace(p,`\\
|
|
33
|
-
`),this.area.value=_.replace(b,"\\n");try{this.form.submit()}catch{}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){w.iframe.readyState=="complete"&&l()}:this.iframe.onload=l}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./polling":18,"component-inherit":21}],17:[function(r,o){(function(n){function s(){}function c(l){if(b.call(this,l),n.location){var u=location.protocol=="https:",w=location.port;w||(w=u?443:80),this.xd=l.hostname!=n.location.hostname||w!=l.port,this.xs=l.secure!=u}}function f(l){this.method=l.method||"GET",this.uri=l.uri,this.xd=!!l.xd,this.xs=!!l.xs,this.async=l.async!==!1,this.data=l.data!=null?l.data:null,this.agent=l.agent,this.isBinary=l.isBinary,this.supportsBinary=l.supportsBinary,this.enablesXDR=l.enablesXDR,this.pfx=l.pfx,this.key=l.key,this.passphrase=l.passphrase,this.cert=l.cert,this.ca=l.ca,this.ciphers=l.ciphers,this.rejectUnauthorized=l.rejectUnauthorized,this.create()}function v(){for(var l in f.requests)f.requests.hasOwnProperty(l)&&f.requests[l].abort()}var d=r("xmlhttprequest"),b=r("./polling"),p=r("component-emitter"),_=r("component-inherit"),g=r("debug")("engine.io-client:polling-xhr");o.exports=c,o.exports.Request=f,_(c,b),c.prototype.supportsBinary=!0,c.prototype.request=function(l){return l=l||{},l.uri=this.uri(),l.xd=this.xd,l.xs=this.xs,l.agent=this.agent||!1,l.supportsBinary=this.supportsBinary,l.enablesXDR=this.enablesXDR,l.pfx=this.pfx,l.key=this.key,l.passphrase=this.passphrase,l.cert=this.cert,l.ca=this.ca,l.ciphers=this.ciphers,l.rejectUnauthorized=this.rejectUnauthorized,new f(l)},c.prototype.doWrite=function(l,u){var w=typeof l!="string"&&l!==void 0,A=this.request({method:"POST",data:l,isBinary:w}),k=this;A.on("success",u),A.on("error",function(L){k.onError("xhr post error",L)}),this.sendXhr=A},c.prototype.doPoll=function(){g("xhr poll");var l=this.request(),u=this;l.on("data",function(w){u.onData(w)}),l.on("error",function(w){u.onError("xhr poll error",w)}),this.pollXhr=l},p(f.prototype),f.prototype.create=function(){var l={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};l.pfx=this.pfx,l.key=this.key,l.passphrase=this.passphrase,l.cert=this.cert,l.ca=this.ca,l.ciphers=this.ciphers,l.rejectUnauthorized=this.rejectUnauthorized;var u=this.xhr=new d(l),w=this;try{if(g("xhr open %s: %s",this.method,this.uri),u.open(this.method,this.uri,this.async),this.supportsBinary&&(u.responseType="arraybuffer"),this.method=="POST")try{this.isBinary?u.setRequestHeader("Content-type","application/octet-stream"):u.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}"withCredentials"in u&&(u.withCredentials=!0),this.hasXDR()?(u.onload=function(){w.onLoad()},u.onerror=function(){w.onError(u.responseText)}):u.onreadystatechange=function(){u.readyState==4&&(u.status==200||u.status==1223?w.onLoad():setTimeout(function(){w.onError(u.status)},0))},g("xhr data %s",this.data),u.send(this.data)}catch(A){return void setTimeout(function(){w.onError(A)},0)}n.document&&(this.index=f.requestsCount++,f.requests[this.index]=this)},f.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},f.prototype.onData=function(l){this.emit("data",l),this.onSuccess()},f.prototype.onError=function(l){this.emit("error",l),this.cleanup(!0)},f.prototype.cleanup=function(l){if(typeof this.xhr<"u"&&this.xhr!==null){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=s:this.xhr.onreadystatechange=s,l)try{this.xhr.abort()}catch{}n.document&&delete f.requests[this.index],this.xhr=null}},f.prototype.onLoad=function(){var l;try{var u;try{u=this.xhr.getResponseHeader("Content-Type").split(";")[0]}catch{}l=u==="application/octet-stream"?this.xhr.response:this.supportsBinary?"ok":this.xhr.responseText}catch(w){this.onError(w)}l!=null&&this.onData(l)},f.prototype.hasXDR=function(){return typeof n.XDomainRequest<"u"&&!this.xs&&this.enablesXDR},f.prototype.abort=function(){this.cleanup()},n.document&&(f.requestsCount=0,f.requests={},n.attachEvent?n.attachEvent("onunload",v):n.addEventListener&&n.addEventListener("beforeunload",v,!1))}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./polling":18,"component-emitter":9,"component-inherit":21,debug:22,xmlhttprequest:20}],18:[function(r,o){function n(p){var _=p&&p.forceBase64;(!b||_)&&(this.supportsBinary=!1),s.call(this,p)}var s=r("../transport"),c=r("parseqs"),f=r("engine.io-parser"),v=r("component-inherit"),d=r("debug")("engine.io-client:polling");o.exports=n;var b=function(){var p=r("xmlhttprequest"),_=new p({xdomain:!1});return _.responseType!=null}();v(n,s),n.prototype.name="polling",n.prototype.doOpen=function(){this.poll()},n.prototype.pause=function(p){function _(){d("paused"),g.readyState="paused",p()}var g=this;if(this.readyState="pausing",this.polling||!this.writable){var l=0;this.polling&&(d("we are currently polling - waiting to pause"),l++,this.once("pollComplete",function(){d("pre-pause polling complete"),--l||_()})),this.writable||(d("we are currently writing - waiting to pause"),l++,this.once("drain",function(){d("pre-pause writing complete"),--l||_()}))}else _()},n.prototype.poll=function(){d("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},n.prototype.onData=function(p){var _=this;d("polling got data %s",p);var g=function(l){return _.readyState=="opening"&&_.onOpen(),l.type=="close"?(_.onClose(),!1):void _.onPacket(l)};f.decodePayload(p,this.socket.binaryType,g),this.readyState!="closed"&&(this.polling=!1,this.emit("pollComplete"),this.readyState=="open"?this.poll():d('ignoring poll - transport state "%s"',this.readyState))},n.prototype.doClose=function(){function p(){d("writing close packet"),_.write([{type:"close"}])}var _=this;this.readyState=="open"?(d("transport open - closing"),p()):(d("transport not open - deferring close"),this.once("open",p))},n.prototype.write=function(p){var g=this;this.writable=!1;var _=function(){g.writable=!0,g.emit("drain")},g=this;f.encodePayload(p,this.supportsBinary,function(l){g.doWrite(l,_)})},n.prototype.uri=function(){var p=this.query||{},_=this.secure?"https":"http",g="";return this.timestampRequests!==!1&&(p[this.timestampParam]=+new Date+"-"+s.timestamps++),this.supportsBinary||p.sid||(p.b64=1),p=c.encode(p),this.port&&(_=="https"&&this.port!=443||_=="http"&&this.port!=80)&&(g=":"+this.port),p.length&&(p="?"+p),_+"://"+this.hostname+g+this.path+p}},{"../transport":14,"component-inherit":21,debug:22,"engine.io-parser":25,parseqs:33,xmlhttprequest:20}],19:[function(r,o){function n(p){var _=p&&p.forceBase64;_&&(this.supportsBinary=!1),s.call(this,p)}var s=r("../transport"),c=r("engine.io-parser"),f=r("parseqs"),v=r("component-inherit"),d=r("debug")("engine.io-client:websocket"),b=r("ws");o.exports=n,v(n,s),n.prototype.name="websocket",n.prototype.supportsBinary=!0,n.prototype.doOpen=function(){if(this.check()){var p=this.uri(),_=void 0,g={agent:this.agent};g.pfx=this.pfx,g.key=this.key,g.passphrase=this.passphrase,g.cert=this.cert,g.ca=this.ca,g.ciphers=this.ciphers,g.rejectUnauthorized=this.rejectUnauthorized,this.ws=new b(p,_,g),this.ws.binaryType===void 0&&(this.supportsBinary=!1),this.ws.binaryType="arraybuffer",this.addEventListeners()}},n.prototype.addEventListeners=function(){var p=this;this.ws.onopen=function(){p.onOpen()},this.ws.onclose=function(){p.onClose()},this.ws.onmessage=function(_){p.onData(_.data)},this.ws.onerror=function(_){p.onError("websocket error",_)}},typeof navigator<"u"&&/iPad|iPhone|iPod/i.test(navigator.userAgent)&&(n.prototype.onData=function(p){var _=this;setTimeout(function(){s.prototype.onData.call(_,p)},0)}),n.prototype.write=function(p){function _(){g.writable=!0,g.emit("drain")}var g=this;this.writable=!1;for(var l=0,u=p.length;u>l;l++)c.encodePacket(p[l],this.supportsBinary,function(w){try{g.ws.send(w)}catch{d("websocket closed before onclose event")}});setTimeout(_,0)},n.prototype.onClose=function(){s.prototype.onClose.call(this)},n.prototype.doClose=function(){typeof this.ws<"u"&&this.ws.close()},n.prototype.uri=function(){var p=this.query||{},_=this.secure?"wss":"ws",g="";return this.port&&(_=="wss"&&this.port!=443||_=="ws"&&this.port!=80)&&(g=":"+this.port),this.timestampRequests&&(p[this.timestampParam]=+new Date),this.supportsBinary||(p.b64=1),p=f.encode(p),p.length&&(p="?"+p),_+"://"+this.hostname+g+this.path+p},n.prototype.check=function(){return!(!b||"__initialize"in b&&this.name===n.prototype.name)}},{"../transport":14,"component-inherit":21,debug:22,"engine.io-parser":25,parseqs:33,ws:35}],20:[function(r,o){var n=r("has-cors");o.exports=function(s){var c=s.xdomain,f=s.xscheme,v=s.enablesXDR;try{if(typeof XMLHttpRequest<"u"&&(!c||n))return new XMLHttpRequest}catch{}try{if(typeof XDomainRequest<"u"&&!f&&v)return new XDomainRequest}catch{}if(!c)try{return new ActiveXObject("Microsoft.XMLHTTP")}catch{}}},{"has-cors":38}],21:[function(r,o){o.exports=function(n,s){var c=function(){};c.prototype=s.prototype,n.prototype=new c,n.prototype.constructor=n}},{}],22:[function(r,o,n){function s(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function c(){var b=arguments,p=this.useColors;if(b[0]=(p?"%c":"")+this.namespace+(p?" %c":" ")+b[0]+(p?"%c ":" ")+"+"+n.humanize(this.diff),!p)return b;var _="color: "+this.color;b=[b[0],_,"color: inherit"].concat(Array.prototype.slice.call(b,1));var g=0,l=0;return b[0].replace(/%[a-z%]/g,function(u){u!=="%%"&&(g++,u==="%c"&&(l=g))}),b.splice(l,0,_),b}function f(){return typeof console=="object"&&typeof console.log=="function"&&Function.prototype.apply.call(console.log,console,arguments)}function v(b){try{b==null?localStorage.removeItem("debug"):localStorage.debug=b}catch{}}function d(){var b;try{b=localStorage.debug}catch{}return b}n=o.exports=r("./debug"),n.log=f,n.formatArgs=c,n.save=v,n.load=d,n.useColors=s,n.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],n.formatters.j=function(b){return JSON.stringify(b)},n.enable(d())},{"./debug":23}],23:[function(r,o,n){function s(){return n.colors[_++%n.colors.length]}function c(g){function l(){}function u(){var A=u,k=+new Date,L=k-(p||k);A.diff=L,A.prev=p,A.curr=k,p=k,A.useColors==null&&(A.useColors=n.useColors()),A.color==null&&A.useColors&&(A.color=s());var Y=Array.prototype.slice.call(arguments);Y[0]=n.coerce(Y[0]),typeof Y[0]!="string"&&(Y=["%o"].concat(Y));var J=0;Y[0]=Y[0].replace(/%([a-z%])/g,function(U,T){if(U==="%%")return U;J++;var I=n.formatters[T];if(typeof I=="function"){var P=Y[J];U=I.call(A,P),Y.splice(J,1),J--}return U}),typeof n.formatArgs=="function"&&(Y=n.formatArgs.apply(A,Y));var N=u.log||n.log||console.log.bind(console);N.apply(A,Y)}l.enabled=!1,u.enabled=!0;var w=n.enabled(g)?u:l;return w.namespace=g,w}function f(g){n.save(g);for(var l=(g||"").split(/[\s,]+/),u=l.length,w=0;u>w;w++)l[w]&&(g=l[w].replace(/\*/g,".*?"),g[0]==="-"?n.skips.push(new RegExp("^"+g.substr(1)+"$")):n.names.push(new RegExp("^"+g+"$")))}function v(){n.enable("")}function d(g){var l,u;for(l=0,u=n.skips.length;u>l;l++)if(n.skips[l].test(g))return!1;for(l=0,u=n.names.length;u>l;l++)if(n.names[l].test(g))return!0;return!1}function b(g){return g instanceof Error?g.stack||g.message:g}n=o.exports=c,n.coerce=b,n.disable=v,n.enable=f,n.enabled=d,n.humanize=r("ms"),n.names=[],n.skips=[],n.formatters={};var p,_=0},{ms:24}],24:[function(r,o){function n(g){var l=/^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(g);if(l){var u=parseFloat(l[1]),w=(l[2]||"ms").toLowerCase();switch(w){case"years":case"year":case"y":return u*_;case"days":case"day":case"d":return u*p;case"hours":case"hour":case"h":return u*b;case"minutes":case"minute":case"m":return u*d;case"seconds":case"second":case"s":return u*v;case"ms":return u}}}function s(g){return g>=p?Math.round(g/p)+"d":g>=b?Math.round(g/b)+"h":g>=d?Math.round(g/d)+"m":g>=v?Math.round(g/v)+"s":g+"ms"}function c(g){return f(g,p,"day")||f(g,b,"hour")||f(g,d,"minute")||f(g,v,"second")||g+" ms"}function f(g,l,u){return l>g?void 0:1.5*l>g?Math.floor(g/l)+" "+u:Math.ceil(g/l)+" "+u+"s"}var v=1e3,d=60*v,b=60*d,p=24*b,_=365.25*p;o.exports=function(g,l){return l=l||{},typeof g=="string"?n(g):l.long?c(g):s(g)}},{}],25:[function(r,o,n){(function(s){function c(T,I){var P="b"+n.packets[T.type]+T.data.data;return I(P)}function f(T,I,P){if(!I)return n.encodeBase64Packet(T,P);var R=T.data,B=new Uint8Array(R),H=new Uint8Array(1+R.byteLength);H[0]=Y[T.type];for(var z=0;z<B.length;z++)H[z+1]=B[z];return P(H.buffer)}function v(T,I,P){if(!I)return n.encodeBase64Packet(T,P);var R=new FileReader;return R.onload=function(){T.data=R.result,n.encodePacket(T,I,!0,P)},R.readAsArrayBuffer(T.data)}function d(T,I,P){if(!I)return n.encodeBase64Packet(T,P);if(L)return v(T,I,P);var R=new Uint8Array(1);R[0]=Y[T.type];var B=new U([R.buffer,T.data]);return P(B)}function b(T,I,P){for(var R=new Array(T.length),B=u(T.length,P),H=function(G,F,pt){I(F,function(ct,xt){R[G]=xt,pt(ct,R)})},z=0;z<T.length;z++)H(z,T[z],B)}var p=r("./keys"),_=r("has-binary"),g=r("arraybuffer.slice"),l=r("base64-arraybuffer"),u=r("after"),w=r("utf8"),A=navigator.userAgent.match(/Android/i),k=/PhantomJS/i.test(navigator.userAgent),L=A||k;n.protocol=3;var Y=n.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},J=p(Y),N={type:"error",data:"parser error"},U=r("blob");n.encodePacket=function(T,I,P,R){typeof I=="function"&&(R=I,I=!1),typeof P=="function"&&(R=P,P=null);var B=T.data===void 0?void 0:T.data.buffer||T.data;if(s.ArrayBuffer&&B instanceof ArrayBuffer)return f(T,I,R);if(U&&B instanceof s.Blob)return d(T,I,R);if(B&&B.base64)return c(T,R);var H=Y[T.type];return T.data!==void 0&&(H+=P?w.encode(String(T.data)):String(T.data)),R(""+H)},n.encodeBase64Packet=function(T,I){var P="b"+n.packets[T.type];if(U&&T.data instanceof U){var R=new FileReader;return R.onload=function(){var F=R.result.split(",")[1];I(P+F)},R.readAsDataURL(T.data)}var B;try{B=String.fromCharCode.apply(null,new Uint8Array(T.data))}catch{for(var H=new Uint8Array(T.data),z=new Array(H.length),G=0;G<H.length;G++)z[G]=H[G];B=String.fromCharCode.apply(null,z)}return P+=s.btoa(B),I(P)},n.decodePacket=function(T,I,P){if(typeof T=="string"||T===void 0){if(T.charAt(0)=="b")return n.decodeBase64Packet(T.substr(1),I);if(P)try{T=w.decode(T)}catch{return N}var B=T.charAt(0);return Number(B)==B&&J[B]?T.length>1?{type:J[B],data:T.substring(1)}:{type:J[B]}:N}var R=new Uint8Array(T),B=R[0],H=g(T,1);return U&&I==="blob"&&(H=new U([H])),{type:J[B],data:H}},n.decodeBase64Packet=function(T,I){var P=J[T.charAt(0)];if(!s.ArrayBuffer)return{type:P,data:{base64:!0,data:T.substr(1)}};var R=l.decode(T.substr(1));return I==="blob"&&U&&(R=new U([R])),{type:P,data:R}},n.encodePayload=function(T,I,P){function R(z){return z.length+":"+z}function B(z,G){n.encodePacket(z,H?I:!1,!0,function(F){G(null,R(F))})}typeof I=="function"&&(P=I,I=null);var H=_(T);return I&&H?U&&!L?n.encodePayloadAsBlob(T,P):n.encodePayloadAsArrayBuffer(T,P):T.length?void b(T,B,function(z,G){return P(G.join(""))}):P("0:")},n.decodePayload=function(T,I,P){if(typeof T!="string")return n.decodePayloadAsBinary(T,I,P);typeof I=="function"&&(P=I,I=null);var R;if(T=="")return P(N,0,1);for(var B,H,z="",G=0,F=T.length;F>G;G++){var pt=T.charAt(G);if(pt!=":")z+=pt;else{if(z==""||z!=(B=Number(z))||(H=T.substr(G+1,B),z!=H.length))return P(N,0,1);if(H.length){if(R=n.decodePacket(H,I,!0),N.type==R.type&&N.data==R.data)return P(N,0,1);var ct=P(R,G+B,F);if(ct===!1)return}G+=B,z=""}}return z!=""?P(N,0,1):void 0},n.encodePayloadAsArrayBuffer=function(T,I){function P(R,B){n.encodePacket(R,!0,!0,function(H){return B(null,H)})}return T.length?void b(T,P,function(R,B){var H=B.reduce(function(F,pt){var ct;return ct=typeof pt=="string"?pt.length:pt.byteLength,F+ct.toString().length+ct+2},0),z=new Uint8Array(H),G=0;return B.forEach(function(F){var pt=typeof F=="string",ct=F;if(pt){for(var xt=new Uint8Array(F.length),ut=0;ut<F.length;ut++)xt[ut]=F.charCodeAt(ut);ct=xt.buffer}z[G++]=pt?0:1;for(var Gt=ct.byteLength.toString(),ut=0;ut<Gt.length;ut++)z[G++]=parseInt(Gt[ut]);z[G++]=255;for(var xt=new Uint8Array(ct),ut=0;ut<xt.length;ut++)z[G++]=xt[ut]}),I(z.buffer)}):I(new ArrayBuffer(0))},n.encodePayloadAsBlob=function(T,I){function P(R,B){n.encodePacket(R,!0,!0,function(H){var z=new Uint8Array(1);if(z[0]=1,typeof H=="string"){for(var G=new Uint8Array(H.length),F=0;F<H.length;F++)G[F]=H.charCodeAt(F);H=G.buffer,z[0]=0}for(var pt=H instanceof ArrayBuffer?H.byteLength:H.size,ct=pt.toString(),xt=new Uint8Array(ct.length+1),F=0;F<ct.length;F++)xt[F]=parseInt(ct[F]);if(xt[ct.length]=255,U){var ut=new U([z.buffer,xt.buffer,H]);B(null,ut)}})}b(T,P,function(R,B){return I(new U(B))})},n.decodePayloadAsBinary=function(T,I,P){typeof I=="function"&&(P=I,I=null);for(var R=T,B=[],H=!1;R.byteLength>0;){for(var z=new Uint8Array(R),G=z[0]===0,F="",pt=1;z[pt]!=255;pt++){if(F.length>310){H=!0;break}F+=z[pt]}if(H)return P(N,0,1);R=g(R,2+F.length),F=parseInt(F);var ct=g(R,0,F);if(G)try{ct=String.fromCharCode.apply(null,new Uint8Array(ct))}catch{var xt=new Uint8Array(ct);ct="";for(var pt=0;pt<xt.length;pt++)ct+=String.fromCharCode(xt[pt])}B.push(ct),R=g(R,F)}var ut=B.length;B.forEach(function(Gt,Ie){P(n.decodePacket(Gt,I,!0),Ie,ut)})}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./keys":26,after:27,"arraybuffer.slice":28,"base64-arraybuffer":29,blob:30,"has-binary":36,utf8:31}],26:[function(r,o){o.exports=Object.keys||function(n){var s=[],c=Object.prototype.hasOwnProperty;for(var f in n)c.call(n,f)&&s.push(f);return s}},{}],27:[function(r,o){function n(c,f,v){function d(p,_){if(d.count<=0)throw new Error("after called too many times");--d.count,p?(b=!0,f(p),f=v):d.count!==0||b||f(null,_)}var b=!1;return v=v||s,d.count=c,c===0?f():d}function s(){}o.exports=n},{}],28:[function(r,o){o.exports=function(n,s,c){var f=n.byteLength;if(s=s||0,c=c||f,n.slice)return n.slice(s,c);if(0>s&&(s+=f),0>c&&(c+=f),c>f&&(c=f),s>=f||s>=c||f===0)return new ArrayBuffer(0);for(var v=new Uint8Array(n),d=new Uint8Array(c-s),b=s,p=0;c>b;b++,p++)d[p]=v[b];return d.buffer}},{}],29:[function(r,o,n){(function(s){n.encode=function(c){var f,v=new Uint8Array(c),d=v.length,b="";for(f=0;d>f;f+=3)b+=s[v[f]>>2],b+=s[(3&v[f])<<4|v[f+1]>>4],b+=s[(15&v[f+1])<<2|v[f+2]>>6],b+=s[63&v[f+2]];return d%3===2?b=b.substring(0,b.length-1)+"=":d%3===1&&(b=b.substring(0,b.length-2)+"=="),b},n.decode=function(c){var f,v,d,b,p,_=.75*c.length,g=c.length,l=0;c[c.length-1]==="="&&(_--,c[c.length-2]==="="&&_--);var u=new ArrayBuffer(_),w=new Uint8Array(u);for(f=0;g>f;f+=4)v=s.indexOf(c[f]),d=s.indexOf(c[f+1]),b=s.indexOf(c[f+2]),p=s.indexOf(c[f+3]),w[l++]=v<<2|d>>4,w[l++]=(15&d)<<4|b>>2,w[l++]=(3&b)<<6|63&p;return u}})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},{}],30:[function(r,o){(function(n){function s(_){for(var g=0;g<_.length;g++){var l=_[g];if(l.buffer instanceof ArrayBuffer){var u=l.buffer;if(l.byteLength!==u.byteLength){var w=new Uint8Array(l.byteLength);w.set(new Uint8Array(u,l.byteOffset,l.byteLength)),u=w.buffer}_[g]=u}}}function c(_,g){g=g||{};var l=new v;s(_);for(var u=0;u<_.length;u++)l.append(_[u]);return g.type?l.getBlob(g.type):l.getBlob()}function f(_,g){return s(_),new Blob(_,g||{})}var v=n.BlobBuilder||n.WebKitBlobBuilder||n.MSBlobBuilder||n.MozBlobBuilder,d=function(){try{var _=new Blob(["hi"]);return _.size===2}catch{return!1}}(),b=d&&function(){try{var _=new Blob([new Uint8Array([1,2])]);return _.size===2}catch{return!1}}(),p=v&&v.prototype.append&&v.prototype.getBlob;o.exports=function(){return d?b?n.Blob:f:p?c:void 0}()}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],31:[function(r,o,n){(function(s){(function(c){function f(R){for(var B,H,z=[],G=0,F=R.length;F>G;)B=R.charCodeAt(G++),B>=55296&&56319>=B&&F>G?(H=R.charCodeAt(G++),(64512&H)==56320?z.push(((1023&B)<<10)+(1023&H)+65536):(z.push(B),G--)):z.push(B);return z}function v(R){for(var B,H=R.length,z=-1,G="";++z<H;)B=R[z],B>65535&&(B-=65536,G+=N(B>>>10&1023|55296),B=56320|1023&B),G+=N(B);return G}function d(R){if(R>=55296&&57343>=R)throw Error("Lone surrogate U+"+R.toString(16).toUpperCase()+" is not a scalar value")}function b(R,B){return N(R>>B&63|128)}function p(R){if(!(4294967168&R))return N(R);var B="";return 4294965248&R?4294901760&R?!(4292870144&R)&&(B=N(R>>18&7|240),B+=b(R,12),B+=b(R,6)):(d(R),B=N(R>>12&15|224),B+=b(R,6)):B=N(R>>6&31|192),B+=N(63&R|128)}function _(R){for(var B,H=f(R),z=H.length,G=-1,F="";++G<z;)B=H[G],F+=p(B);return F}function g(){if(J>=Y)throw Error("Invalid byte index");var R=255&L[J];if(J++,(192&R)==128)return 63&R;throw Error("Invalid continuation byte")}function l(){var R,B,H,z,G;if(J>Y)throw Error("Invalid byte index");if(J==Y)return!1;if(R=255&L[J],J++,(128&R)==0)return R;if((224&R)==192){var B=g();if(G=(31&R)<<6|B,G>=128)return G;throw Error("Invalid continuation byte")}if((240&R)==224){if(B=g(),H=g(),G=(15&R)<<12|B<<6|H,G>=2048)return d(G),G;throw Error("Invalid continuation byte")}if((248&R)==240&&(B=g(),H=g(),z=g(),G=(15&R)<<18|B<<12|H<<6|z,G>=65536&&1114111>=G))return G;throw Error("Invalid UTF-8 detected")}function u(R){L=f(R),Y=L.length,J=0;for(var B,H=[];(B=l())!==!1;)H.push(B);return v(H)}var w=typeof n=="object"&&n,A=typeof o=="object"&&o&&o.exports==w&&o,k=typeof s=="object"&&s;(k.global===k||k.window===k)&&(c=k);var L,Y,J,N=String.fromCharCode,U={version:"2.0.0",encode:_,decode:u};if(w&&!w.nodeType)if(A)A.exports=U;else{var T={},I=T.hasOwnProperty;for(var P in U)I.call(U,P)&&(w[P]=U[P])}else c.utf8=U})(this)}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],32:[function(r,o){(function(n){var s=/^[\],:{}\s]*$/,c=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,f=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,v=/(?:^|:|,)(?:\s*\[)+/g,d=/^\s+/,b=/\s+$/;o.exports=function(p){return typeof p=="string"&&p?(p=p.replace(d,"").replace(b,""),n.JSON&&JSON.parse?JSON.parse(p):s.test(p.replace(c,"@").replace(f,"]").replace(v,""))?new Function("return "+p)():void 0):null}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],33:[function(r,o,n){n.encode=function(s){var c="";for(var f in s)s.hasOwnProperty(f)&&(c.length&&(c+="&"),c+=encodeURIComponent(f)+"="+encodeURIComponent(s[f]));return c},n.decode=function(s){for(var c={},f=s.split("&"),v=0,d=f.length;d>v;v++){var b=f[v].split("=");c[decodeURIComponent(b[0])]=decodeURIComponent(b[1])}return c}},{}],34:[function(r,o){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,s=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];o.exports=function(c){var f=c,v=c.indexOf("["),d=c.indexOf("]");v!=-1&&d!=-1&&(c=c.substring(0,v)+c.substring(v,d).replace(/:/g,";")+c.substring(d,c.length));for(var b=n.exec(c||""),p={},_=14;_--;)p[s[_]]=b[_]||"";return v!=-1&&d!=-1&&(p.source=f,p.host=p.host.substring(1,p.host.length-1).replace(/;/g,":"),p.authority=p.authority.replace("[","").replace("]","").replace(/;/g,":"),p.ipv6uri=!0),p}},{}],35:[function(r,o){function n(f,v){return v?new c(f,v):new c(f)}var s=function(){return self}(),c=s.WebSocket||s.MozWebSocket;o.exports=c?n:null,c&&(n.prototype=c.prototype)},{}],36:[function(r,o){(function(n){function s(f){function v(d){if(!d)return!1;if(n.Buffer&&n.Buffer.isBuffer(d)||n.ArrayBuffer&&d instanceof ArrayBuffer||n.Blob&&d instanceof Blob||n.File&&d instanceof File)return!0;if(c(d)){for(var b=0;b<d.length;b++)if(v(d[b]))return!0}else if(d&&typeof d=="object"){d.toJSON&&(d=d.toJSON());for(var p in d)if(Object.prototype.hasOwnProperty.call(d,p)&&v(d[p]))return!0}return!1}return v(f)}var c=r("isarray");o.exports=s}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{isarray:37}],37:[function(r,o){o.exports=Array.isArray||function(n){return Object.prototype.toString.call(n)=="[object Array]"}},{}],38:[function(r,o){var n=r("global");try{o.exports="XMLHttpRequest"in n&&"withCredentials"in new n.XMLHttpRequest}catch{o.exports=!1}},{global:39}],39:[function(r,o){o.exports=function(){return this}()},{}],40:[function(r,o){var n=[].indexOf;o.exports=function(s,c){if(n)return s.indexOf(c);for(var f=0;f<s.length;++f)if(s[f]===c)return f;return-1}},{}],41:[function(r,o,n){var s=Object.prototype.hasOwnProperty;n.keys=Object.keys||function(c){var f=[];for(var v in c)s.call(c,v)&&f.push(v);return f},n.values=function(c){var f=[];for(var v in c)s.call(c,v)&&f.push(c[v]);return f},n.merge=function(c,f){for(var v in f)s.call(f,v)&&(c[v]=f[v]);return c},n.length=function(c){return n.keys(c).length},n.isEmpty=function(c){return n.length(c)==0}},{}],42:[function(r,o){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,s=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];o.exports=function(c){for(var f=n.exec(c||""),v={},d=14;d--;)v[s[d]]=f[d]||"";return v}},{}],43:[function(r,o,n){(function(s){var c=r("isarray"),f=r("./is-buffer");n.deconstructPacket=function(v){function d(g){if(!g)return g;if(f(g)){var l={_placeholder:!0,num:b.length};return b.push(g),l}if(c(g)){for(var u=new Array(g.length),w=0;w<g.length;w++)u[w]=d(g[w]);return u}if(typeof g=="object"&&!(g instanceof Date)){var u={};for(var A in g)u[A]=d(g[A]);return u}return g}var b=[],p=v.data,_=v;return _.data=d(p),_.attachments=b.length,{packet:_,buffers:b}},n.reconstructPacket=function(v,d){function b(p){if(p&&p._placeholder){var _=d[p.num];return _}if(c(p)){for(var g=0;g<p.length;g++)p[g]=b(p[g]);return p}if(p&&typeof p=="object"){for(var l in p)p[l]=b(p[l]);return p}return p}return v.data=b(v.data),v.attachments=void 0,v},n.removeBlobs=function(v,d){function b(g,l,u){if(!g)return g;if(s.Blob&&g instanceof Blob||s.File&&g instanceof File){p++;var w=new FileReader;w.onload=function(){u?u[l]=this.result:_=this.result,--p||d(_)},w.readAsArrayBuffer(g)}else if(c(g))for(var A=0;A<g.length;A++)b(g[A],A,g);else if(g&&typeof g=="object"&&!f(g))for(var k in g)b(g[k],k,g)}var p=0,_=v;b(_),p||d(_)}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./is-buffer":45,isarray:46}],44:[function(r,o,n){function s(){}function c(A){var k="",L=!1;return k+=A.type,(n.BINARY_EVENT==A.type||n.BINARY_ACK==A.type)&&(k+=A.attachments,k+="-"),A.nsp&&A.nsp!="/"&&(L=!0,k+=A.nsp),A.id!=null&&(L&&(k+=",",L=!1),k+=A.id),A.data!=null&&(L&&(k+=","),k+=g.stringify(A.data)),_("encoded %j as %s",A,k),k}function f(A,k){function L(Y){var J=u.deconstructPacket(Y),N=c(J.packet),U=J.buffers;U.unshift(N),k(U)}u.removeBlobs(A,L)}function v(){this.reconstructor=null}function d(A){var k={},L=0;if(k.type=Number(A.charAt(0)),n.types[k.type]==null)return p();if(n.BINARY_EVENT==k.type||n.BINARY_ACK==k.type){for(var Y="";A.charAt(++L)!="-"&&(Y+=A.charAt(L),L!=A.length););if(Y!=Number(Y)||A.charAt(L)!="-")throw new Error("Illegal attachments");k.attachments=Number(Y)}if(A.charAt(L+1)=="/")for(k.nsp="";++L;){var J=A.charAt(L);if(J==","||(k.nsp+=J,L==A.length))break}else k.nsp="/";var N=A.charAt(L+1);if(N!==""&&Number(N)==N){for(k.id="";++L;){var J=A.charAt(L);if(J==null||Number(J)!=J){--L;break}if(k.id+=A.charAt(L),L==A.length)break}k.id=Number(k.id)}if(A.charAt(++L))try{k.data=g.parse(A.substr(L))}catch{return p()}return _("decoded %s as %j",A,k),k}function b(A){this.reconPack=A,this.buffers=[]}function p(){return{type:n.ERROR,data:"parser error"}}var _=r("debug")("socket.io-parser"),g=r("json3"),l=(r("isarray"),r("component-emitter")),u=r("./binary"),w=r("./is-buffer");n.protocol=4,n.types=["CONNECT","DISCONNECT","EVENT","BINARY_EVENT","ACK","BINARY_ACK","ERROR"],n.CONNECT=0,n.DISCONNECT=1,n.EVENT=2,n.ACK=3,n.ERROR=4,n.BINARY_EVENT=5,n.BINARY_ACK=6,n.Encoder=s,n.Decoder=v,s.prototype.encode=function(A,k){if(_("encoding packet %j",A),n.BINARY_EVENT==A.type||n.BINARY_ACK==A.type)f(A,k);else{var L=c(A);k([L])}},l(v.prototype),v.prototype.add=function(A){var k;if(typeof A=="string")k=d(A),n.BINARY_EVENT==k.type||n.BINARY_ACK==k.type?(this.reconstructor=new b(k),this.reconstructor.reconPack.attachments===0&&this.emit("decoded",k)):this.emit("decoded",k);else{if(!w(A)&&!A.base64)throw new Error("Unknown type: "+A);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");k=this.reconstructor.takeBinaryData(A),k&&(this.reconstructor=null,this.emit("decoded",k))}},v.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},b.prototype.takeBinaryData=function(A){if(this.buffers.push(A),this.buffers.length==this.reconPack.attachments){var k=u.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),k}return null},b.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},{"./binary":43,"./is-buffer":45,"component-emitter":9,debug:10,isarray:46,json3:47}],45:[function(r,o){(function(n){function s(c){return n.Buffer&&n.Buffer.isBuffer(c)||n.ArrayBuffer&&c instanceof ArrayBuffer}o.exports=s}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],46:[function(r,o){o.exports=r(37)},{}],47:[function(r,o,n){(function(s){function c($){if(c[$]!==d)return c[$];var Q;if($=="bug-string-char-index")Q=!1;else if($=="json")Q=c("json-stringify")&&c("json-parse");else{var X,rt='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if($=="json-stringify"){var K=_.stringify,et=typeof K=="function"&&g;if(et){(X=function(){return 1}).toJSON=X;try{et=K(0)==="0"&&K(new Number)==="0"&&K(new String)=='""'&&K(b)===d&&K(d)===d&&K()===d&&K(X)==="1"&&K([X])=="[1]"&&K([d])=="[null]"&&K(null)=="null"&&K([d,b,null])=="[null,null,null]"&&K({a:[X,!0,!1,null,`\0\b
|
|
34
|
-
\f\r `]})==
|
|
31
|
+
`)+N+`return __p
|
|
32
|
+
}`;var pt=lu(function(){return _t(d,Y+"return "+N).apply(n,w)});if(pt.source=N,fs(pt))throw pt;return pt}function Ug(t){return St(t).toLowerCase()}function Dg(t){return St(t).toUpperCase()}function Pg(t,e,r){if(t=St(t),t&&(r||e===n))return bo(t);if(!t||!(e=ce(e)))return t;var o=Ce(t),c=Ce(e),d=So(o,c),w=Co(o,c)+1;return en(o,d,w).join("")}function Fg(t,e,r){if(t=St(t),t&&(r||e===n))return t.slice(0,Ao(t)+1);if(!t||!(e=ce(e)))return t;var o=Ce(t),c=Co(o,Ce(e))+1;return en(o,0,c).join("")}function Mg(t,e,r){if(t=St(t),t&&(r||e===n))return t.replace(fi,"");if(!t||!(e=ce(e)))return t;var o=Ce(t),c=So(o,Ce(e));return en(o,c).join("")}function qg(t,e){var r=U,o=X;if(Lt(e)){var c="separator"in e?e.separator:c;r="length"in e?ht(e.length):r,o="omission"in e?ce(e.omission):o}t=St(t);var d=t.length;if(mn(t)){var w=Ce(t);d=w.length}if(r>=d)return t;var C=r-_n(o);if(C<1)return o;var A=w?en(w,0,C).join(""):t.slice(0,C);if(c===n)return A+o;if(w&&(C+=A.length-C),hs(c)){if(t.slice(C).search(c)){var R,I=A;for(c.global||(c=Ti(c.source,St(Ks.exec(c))+"g")),c.lastIndex=0;R=c.exec(I);)var N=R.index;A=A.slice(0,N===n?C:N)}}else if(t.indexOf(ce(c),C)!=C){var K=A.lastIndexOf(c);K>-1&&(A=A.slice(0,K))}return A+o}function Wg(t){return t=St(t),t&&ju.test(t)?t.replace(Ms,vf):t}var Kg=En(function(t,e,r){return t+(r?" ":"")+e.toUpperCase()}),ds=pa("toUpperCase");function hu(t,e,r){return t=St(t),e=r?n:e,e===n?hf(t)?_f(t):ef(t):t.match(e)||[]}var lu=dt(function(t,e){try{return ae(t,n,e)}catch(r){return fs(r)?r:new ct(r)}}),Hg=We(function(t,e){return de(e,function(r){r=Ne(r),Me(t,r,us(t[r],t))}),t});function $g(t){var e=t==null?0:t.length,r=nt();return t=e?It(t,function(o){if(typeof o[1]!="function")throw new ge(m);return[r(o[0]),o[1]]}):[],dt(function(o){for(var c=-1;++c<e;){var d=t[c];if(ae(d[0],this,o))return ae(d[1],this,o)}})}function Gg(t){return vh(ye(t,y))}function gs(t){return function(){return t}}function zg(t,e){return t==null||t!==t?e:t}var Xg=ga(),Jg=ga(!0);function re(t){return t}function vs(t){return Go(typeof t=="function"?t:ye(t,y))}function Vg(t){return Xo(ye(t,y))}function Yg(t,e){return Jo(t,ye(e,y))}var jg=dt(function(t,e){return function(r){return $n(r,t,e)}}),Zg=dt(function(t,e){return function(r){return $n(t,r,e)}});function ys(t,e,r){var o=Mt(e),c=kr(e,o);r==null&&!(Lt(e)&&(c.length||!o.length))&&(r=e,e=t,t=this,c=kr(e,Mt(e)));var d=!(Lt(r)&&"chain"in r)||!!r.chain,w=He(t);return de(c,function(C){var A=e[C];t[C]=A,w&&(t.prototype[C]=function(){var R=this.__chain__;if(d||R){var I=t(this.__wrapped__),N=I.__actions__=te(this.__actions__);return N.push({func:A,args:arguments,thisArg:t}),I.__chain__=R,I}return A.apply(t,Ve([this.value()],arguments))})}),t}function Qg(){return Wt._===this&&(Wt._=Af),this}function ms(){}function tv(t){return t=ht(t),dt(function(e){return Vo(e,t)})}var ev=Vi(It),nv=Vi(vo),rv=Vi(wi);function pu(t){return ns(t)?bi(Ne(t)):Nh(t)}function iv(t){return function(e){return t==null?n:cn(t,e)}}var sv=ya(),ov=ya(!0);function _s(){return[]}function ws(){return!1}function av(){return{}}function uv(){return""}function cv(){return!0}function fv(t,e){if(t=ht(t),t<1||t>ut)return[];var r=se,o=zt(t,se);e=nt(e),t-=se;for(var c=ki(o,e);++r<t;)e(r);return c}function hv(t){return ft(t)?It(t,Ne):fe(t)?[t]:te(Na(St(t)))}function lv(t){var e=++Cf;return St(t)+e}var pv=Rr(function(t,e){return t+e},0),dv=Yi("ceil"),gv=Rr(function(t,e){return t/e},1),vv=Yi("floor");function yv(t){return t&&t.length?Cr(t,re,Ui):n}function mv(t,e){return t&&t.length?Cr(t,nt(e,2),Ui):n}function _v(t){return _o(t,re)}function wv(t,e){return _o(t,nt(e,2))}function bv(t){return t&&t.length?Cr(t,re,Mi):n}function Sv(t,e){return t&&t.length?Cr(t,nt(e,2),Mi):n}var Cv=Rr(function(t,e){return t*e},1),kv=Yi("round"),Av=Rr(function(t,e){return t-e},0);function Ev(t){return t&&t.length?Ci(t,re):0}function Tv(t,e){return t&&t.length?Ci(t,nt(e,2)):0}return p.after=Vp,p.ary=$a,p.assign=Dd,p.assignIn=iu,p.assignInWith=Hr,p.assignWith=Pd,p.at=Fd,p.before=Ga,p.bind=us,p.bindAll=Hg,p.bindKey=za,p.castArray=ad,p.chain=Wa,p.chunk=vl,p.compact=yl,p.concat=ml,p.cond=$g,p.conforms=Gg,p.constant=gs,p.countBy=Ep,p.create=Md,p.curry=Xa,p.curryRight=Ja,p.debounce=Va,p.defaults=qd,p.defaultsDeep=Wd,p.defer=Yp,p.delay=jp,p.difference=_l,p.differenceBy=wl,p.differenceWith=bl,p.drop=Sl,p.dropRight=Cl,p.dropRightWhile=kl,p.dropWhile=Al,p.fill=El,p.filter=xp,p.flatMap=Ip,p.flatMapDeep=Lp,p.flatMapDepth=Np,p.flatten=Pa,p.flattenDeep=Tl,p.flattenDepth=xl,p.flip=Zp,p.flow=Xg,p.flowRight=Jg,p.fromPairs=Ol,p.functions=Jd,p.functionsIn=Vd,p.groupBy=Bp,p.initial=Il,p.intersection=Ll,p.intersectionBy=Nl,p.intersectionWith=Bl,p.invert=jd,p.invertBy=Zd,p.invokeMap=Dp,p.iteratee=vs,p.keyBy=Pp,p.keys=Mt,p.keysIn=ne,p.map=Pr,p.mapKeys=tg,p.mapValues=eg,p.matches=Vg,p.matchesProperty=Yg,p.memoize=Mr,p.merge=ng,p.mergeWith=su,p.method=jg,p.methodOf=Zg,p.mixin=ys,p.negate=qr,p.nthArg=tv,p.omit=rg,p.omitBy=ig,p.once=Qp,p.orderBy=Fp,p.over=ev,p.overArgs=td,p.overEvery=nv,p.overSome=rv,p.partial=cs,p.partialRight=Ya,p.partition=Mp,p.pick=sg,p.pickBy=ou,p.property=pu,p.propertyOf=iv,p.pull=Fl,p.pullAll=Ma,p.pullAllBy=Ml,p.pullAllWith=ql,p.pullAt=Wl,p.range=sv,p.rangeRight=ov,p.rearg=ed,p.reject=Kp,p.remove=Kl,p.rest=nd,p.reverse=os,p.sampleSize=$p,p.set=ag,p.setWith=ug,p.shuffle=Gp,p.slice=Hl,p.sortBy=Jp,p.sortedUniq=Yl,p.sortedUniqBy=jl,p.split=Ig,p.spread=rd,p.tail=Zl,p.take=Ql,p.takeRight=tp,p.takeRightWhile=ep,p.takeWhile=np,p.tap=yp,p.throttle=id,p.thru=Dr,p.toArray=eu,p.toPairs=au,p.toPairsIn=uu,p.toPath=hv,p.toPlainObject=ru,p.transform=cg,p.unary=sd,p.union=rp,p.unionBy=ip,p.unionWith=sp,p.uniq=op,p.uniqBy=ap,p.uniqWith=up,p.unset=fg,p.unzip=as,p.unzipWith=qa,p.update=hg,p.updateWith=lg,p.values=On,p.valuesIn=pg,p.without=cp,p.words=hu,p.wrap=od,p.xor=fp,p.xorBy=hp,p.xorWith=lp,p.zip=pp,p.zipObject=dp,p.zipObjectDeep=gp,p.zipWith=vp,p.entries=au,p.entriesIn=uu,p.extend=iu,p.extendWith=Hr,ys(p,p),p.add=pv,p.attempt=lu,p.camelCase=yg,p.capitalize=cu,p.ceil=dv,p.clamp=dg,p.clone=ud,p.cloneDeep=fd,p.cloneDeepWith=hd,p.cloneWith=cd,p.conformsTo=ld,p.deburr=fu,p.defaultTo=zg,p.divide=gv,p.endsWith=mg,p.eq=Ae,p.escape=_g,p.escapeRegExp=wg,p.every=Tp,p.find=Op,p.findIndex=Ua,p.findKey=Kd,p.findLast=Rp,p.findLastIndex=Da,p.findLastKey=Hd,p.floor=vv,p.forEach=Ka,p.forEachRight=Ha,p.forIn=$d,p.forInRight=Gd,p.forOwn=zd,p.forOwnRight=Xd,p.get=ls,p.gt=pd,p.gte=dd,p.has=Yd,p.hasIn=ps,p.head=Fa,p.identity=re,p.includes=Up,p.indexOf=Rl,p.inRange=gg,p.invoke=Qd,p.isArguments=ln,p.isArray=ft,p.isArrayBuffer=gd,p.isArrayLike=ee,p.isArrayLikeObject=Bt,p.isBoolean=vd,p.isBuffer=nn,p.isDate=yd,p.isElement=md,p.isEmpty=_d,p.isEqual=wd,p.isEqualWith=bd,p.isError=fs,p.isFinite=Sd,p.isFunction=He,p.isInteger=ja,p.isLength=Wr,p.isMap=Za,p.isMatch=Cd,p.isMatchWith=kd,p.isNaN=Ad,p.isNative=Ed,p.isNil=xd,p.isNull=Td,p.isNumber=Qa,p.isObject=Lt,p.isObjectLike=Nt,p.isPlainObject=Yn,p.isRegExp=hs,p.isSafeInteger=Od,p.isSet=tu,p.isString=Kr,p.isSymbol=fe,p.isTypedArray=xn,p.isUndefined=Rd,p.isWeakMap=Id,p.isWeakSet=Ld,p.join=Ul,p.kebabCase=bg,p.last=_e,p.lastIndexOf=Dl,p.lowerCase=Sg,p.lowerFirst=Cg,p.lt=Nd,p.lte=Bd,p.max=yv,p.maxBy=mv,p.mean=_v,p.meanBy=wv,p.min=bv,p.minBy=Sv,p.stubArray=_s,p.stubFalse=ws,p.stubObject=av,p.stubString=uv,p.stubTrue=cv,p.multiply=Cv,p.nth=Pl,p.noConflict=Qg,p.noop=ms,p.now=Fr,p.pad=kg,p.padEnd=Ag,p.padStart=Eg,p.parseInt=Tg,p.random=vg,p.reduce=qp,p.reduceRight=Wp,p.repeat=xg,p.replace=Og,p.result=og,p.round=kv,p.runInContext=k,p.sample=Hp,p.size=zp,p.snakeCase=Rg,p.some=Xp,p.sortedIndex=$l,p.sortedIndexBy=Gl,p.sortedIndexOf=zl,p.sortedLastIndex=Xl,p.sortedLastIndexBy=Jl,p.sortedLastIndexOf=Vl,p.startCase=Lg,p.startsWith=Ng,p.subtract=Av,p.sum=Ev,p.sumBy=Tv,p.template=Bg,p.times=fv,p.toFinite=$e,p.toInteger=ht,p.toLength=nu,p.toLower=Ug,p.toNumber=we,p.toSafeInteger=Ud,p.toString=St,p.toUpper=Dg,p.trim=Pg,p.trimEnd=Fg,p.trimStart=Mg,p.truncate=qg,p.unescape=Wg,p.uniqueId=lv,p.upperCase=Kg,p.upperFirst=ds,p.each=Ka,p.eachRight=Ha,p.first=Fa,ys(p,function(){var t={};return Ie(p,function(e,r){Ct.call(p.prototype,r)||(t[r]=e)}),t}(),{chain:!1}),p.VERSION=s,de(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){p[t].placeholder=p}),de(["drop","take"],function(t,e){vt.prototype[t]=function(r){r=r===n?1:Ft(ht(r),0);var o=this.__filtered__&&!e?new vt(this):this.clone();return o.__filtered__?o.__takeCount__=zt(r,o.__takeCount__):o.__views__.push({size:zt(r,se),type:t+(o.__dir__<0?"Right":"")}),o},vt.prototype[t+"Right"]=function(r){return this.reverse()[t](r).reverse()}}),de(["filter","map","takeWhile"],function(t,e){var r=e+1,o=r==B||r==At;vt.prototype[t]=function(c){var d=this.clone();return d.__iteratees__.push({iteratee:nt(c,3),type:r}),d.__filtered__=d.__filtered__||o,d}}),de(["head","last"],function(t,e){var r="take"+(e?"Right":"");vt.prototype[t]=function(){return this[r](1).value()[0]}}),de(["initial","tail"],function(t,e){var r="drop"+(e?"":"Right");vt.prototype[t]=function(){return this.__filtered__?new vt(this):this[r](1)}}),vt.prototype.compact=function(){return this.filter(re)},vt.prototype.find=function(t){return this.filter(t).head()},vt.prototype.findLast=function(t){return this.reverse().find(t)},vt.prototype.invokeMap=dt(function(t,e){return typeof t=="function"?new vt(this):this.map(function(r){return $n(r,t,e)})}),vt.prototype.reject=function(t){return this.filter(qr(nt(t)))},vt.prototype.slice=function(t,e){t=ht(t);var r=this;return r.__filtered__&&(t>0||e<0)?new vt(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==n&&(e=ht(e),r=e<0?r.dropRight(-e):r.take(e-t)),r)},vt.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},vt.prototype.toArray=function(){return this.take(se)},Ie(vt.prototype,function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),o=/^(?:head|last)$/.test(e),c=p[o?"take"+(e=="last"?"Right":""):e],d=o||/^find/.test(e);c&&(p.prototype[e]=function(){var w=this.__wrapped__,C=o?[1]:arguments,A=w instanceof vt,R=C[0],I=A||ft(w),N=function(gt){var yt=c.apply(p,Ve([gt],C));return o&&K?yt[0]:yt};I&&r&&typeof R=="function"&&R.length!=1&&(A=I=!1);var K=this.__chain__,Y=!!this.__actions__.length,rt=d&&!K,pt=A&&!Y;if(!d&&I){w=pt?w:new vt(this);var it=t.apply(w,C);return it.__actions__.push({func:Dr,args:[N],thisArg:n}),new ve(it,K)}return rt&&pt?t.apply(this,C):(it=this.thru(N),rt?o?it.value()[0]:it.value():it)})}),de(["pop","push","shift","sort","splice","unshift"],function(t){var e=ur[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",o=/^(?:pop|shift)$/.test(t);p.prototype[t]=function(){var c=arguments;if(o&&!this.__chain__){var d=this.value();return e.apply(ft(d)?d:[],c)}return this[r](function(w){return e.apply(ft(w)?w:[],c)})}}),Ie(vt.prototype,function(t,e){var r=p[e];if(r){var o=r.name+"";Ct.call(Cn,o)||(Cn[o]=[]),Cn[o].push({name:e,func:r})}}),Cn[Or(n,W).name]=[{name:"wrapper",func:n}],vt.prototype.clone=Wf,vt.prototype.reverse=Kf,vt.prototype.value=Hf,p.prototype.at=mp,p.prototype.chain=_p,p.prototype.commit=wp,p.prototype.next=bp,p.prototype.plant=Cp,p.prototype.reverse=kp,p.prototype.toJSON=p.prototype.valueOf=p.prototype.value=Ap,p.prototype.first=p.prototype.head,Pn&&(p.prototype[Pn]=Sp),p},wn=wf();rn?((rn.exports=wn)._=wn,vi._=wn):Wt._=wn}).call(jn)})(Zr,Zr.exports);var Pv=Zr.exports;const Fv={isNewStack:!1,forceNew:!0,reconnectionDelay:1e4,reconnectionDelayMax:1e4,maxReconnectAttempts:5,timeout:1e4,keepAliveTimeout:6e4,idleInterval:6e4*5,protocol:"https",transports:["websocket"],upgrade:!1,serverFetchStrategy:"static",serverType:0,useLogger:!0,loggerServer:"http://socketlog.voicenter.co",loggerConfig:{logToConsole:!0,overloadGlobalConsole:!1,namespace:"events-sdk",socketEmitInterval:1e4},loggerConnectOptions:{reconnection:!0,reconnectionDelay:5e3,reconnectionAttempts:10,perMessageDeflate:void 0,upgrade:!1,transports:["websocket"],debug:!1}};function Mv(){return function a(i,n,s){function u(g,S){if(!n[g]){if(!i[g]){var v=typeof require=="function"&&require;if(!S&&v)return v(g,!0);if(h)return h(g,!0);throw new Error("Cannot find module '"+g+"'")}var _=n[g]={exports:{}};i[g][0].call(_.exports,function(y){var l=i[g][1][y];return u(l||y)},_,_.exports,a,i,n,s)}return n[g].exports}for(var h=typeof require=="function"&&require,m=0;m<s.length;m++)u(s[m]);return u}({1:[function(a,i){i.exports=a("./lib/")},{"./lib/":2}],2:[function(a,i,n){function s(v,_){typeof v=="object"&&(_=v,v=void 0),_=_||{};var y,l=u(v),f=l.source,b=l.id;return _.forceNew||_["force new connection"]||_.multiplex===!1?(g("ignoring socket cache for %s",f),y=m(f,_)):(S[b]||(g("new io instance for %s",f),S[b]=m(f,_)),y=S[b]),y.socket(l.path)}var u=a("./url"),h=a("socket.io-parser"),m=a("./manager"),g=a("debug")("socket.io-client");i.exports=n=s;var S=n.managers={};n.protocol=h.protocol,n.connect=s,n.Manager=a("./manager"),n.Socket=a("./socket")},{"./manager":3,"./socket":5,"./url":6,debug:10,"socket.io-parser":44}],3:[function(a,i){function n(l,f){return this instanceof n?(l&&typeof l=="object"&&(f=l,l=void 0),f=f||{},f.path=f.path||"/socket.io",this.nsps={},this.subs=[],this.opts=f,this.reconnection(f.reconnection!==!1),this.reconnectionAttempts(f.reconnectionAttempts||1/0),this.reconnectionDelay(f.reconnectionDelay||1e3),this.reconnectionDelayMax(f.reconnectionDelayMax||5e3),this.randomizationFactor(f.randomizationFactor||.5),this.backoff=new y({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(f.timeout==null?2e4:f.timeout),this.readyState="closed",this.uri=l,this.connected=[],this.encoding=!1,this.packetBuffer=[],this.encoder=new m.Encoder,this.decoder=new m.Decoder,this.autoConnect=f.autoConnect!==!1,void(this.autoConnect&&this.open())):new n(l,f)}var s=(a("./url"),a("engine.io-client")),u=a("./socket"),h=a("component-emitter"),m=a("socket.io-parser"),g=a("./on"),S=a("component-bind"),v=(a("object-component"),a("debug")("socket.io-client:manager")),_=a("indexof"),y=a("backo2");i.exports=n,n.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var l in this.nsps)this.nsps[l].emit.apply(this.nsps[l],arguments)},n.prototype.updateSocketIds=function(){for(var l in this.nsps)this.nsps[l].id=this.engine.id},h(n.prototype),n.prototype.reconnection=function(l){return arguments.length?(this._reconnection=!!l,this):this._reconnection},n.prototype.reconnectionAttempts=function(l){return arguments.length?(this._reconnectionAttempts=l,this):this._reconnectionAttempts},n.prototype.reconnectionDelay=function(l){return arguments.length?(this._reconnectionDelay=l,this.backoff&&this.backoff.setMin(l),this):this._reconnectionDelay},n.prototype.randomizationFactor=function(l){return arguments.length?(this._randomizationFactor=l,this.backoff&&this.backoff.setJitter(l),this):this._randomizationFactor},n.prototype.reconnectionDelayMax=function(l){return arguments.length?(this._reconnectionDelayMax=l,this.backoff&&this.backoff.setMax(l),this):this._reconnectionDelayMax},n.prototype.timeout=function(l){return arguments.length?(this._timeout=l,this):this._timeout},n.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()},n.prototype.open=n.prototype.connect=function(l){if(v("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;v("opening %s",this.uri),this.engine=s(this.uri,this.opts);var f=this.engine,b=this;this.readyState="opening",this.skipReconnect=!1;var E=g(f,"open",function(){b.onopen(),l&&l()}),x=g(f,"error",function(V){if(v("connect_error"),b.cleanup(),b.readyState="closed",b.emitAll("connect_error",V),l){var ot=new Error("Connection error");ot.data=V,l(ot)}else b.maybeReconnectOnOpen()});if(this._timeout!==!1){var W=this._timeout;v("connect attempt will timeout after %d",W);var st=setTimeout(function(){v("connect attempt timed out after %d",W),E.destroy(),f.close(),f.emit("error","timeout"),b.emitAll("connect_timeout",W)},W);this.subs.push({destroy:function(){clearTimeout(st)}})}return this.subs.push(E),this.subs.push(x),this},n.prototype.onopen=function(){v("open"),this.cleanup(),this.readyState="open",this.emit("open");var l=this.engine;this.subs.push(g(l,"data",S(this,"ondata"))),this.subs.push(g(this.decoder,"decoded",S(this,"ondecoded"))),this.subs.push(g(l,"error",S(this,"onerror"))),this.subs.push(g(l,"close",S(this,"onclose")))},n.prototype.ondata=function(l){this.decoder.add(l)},n.prototype.ondecoded=function(l){this.emit("packet",l)},n.prototype.onerror=function(l){v("error",l),this.emitAll("error",l)},n.prototype.socket=function(l){var f=this.nsps[l];if(!f){f=new u(this,l),this.nsps[l]=f;var b=this;f.on("connect",function(){f.id=b.engine.id,~_(b.connected,f)||b.connected.push(f)})}return f},n.prototype.destroy=function(l){var f=_(this.connected,l);~f&&this.connected.splice(f,1),this.connected.length||this.close()},n.prototype.packet=function(l){v("writing packet %j",l);var f=this;f.encoding?f.packetBuffer.push(l):(f.encoding=!0,this.encoder.encode(l,function(b){for(var E=0;E<b.length;E++)f.engine.write(b[E]);f.encoding=!1,f.processPacketQueue()}))},n.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var l=this.packetBuffer.shift();this.packet(l)}},n.prototype.cleanup=function(){for(var l;l=this.subs.shift();)l.destroy();this.packetBuffer=[],this.encoding=!1,this.decoder.destroy()},n.prototype.close=n.prototype.disconnect=function(){this.skipReconnect=!0,this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},n.prototype.onclose=function(l){v("close"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",l),this._reconnection&&!this.skipReconnect&&this.reconnect()},n.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var l=this;if(this.backoff.attempts>=this._reconnectionAttempts)v("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var f=this.backoff.duration();v("will wait %dms before reconnect attempt",f),this.reconnecting=!0;var b=setTimeout(function(){l.skipReconnect||(v("attempting reconnect"),l.emitAll("reconnect_attempt",l.backoff.attempts),l.emitAll("reconnecting",l.backoff.attempts),l.skipReconnect||l.open(function(E){E?(v("reconnect attempt error"),l.reconnecting=!1,l.reconnect(),l.emitAll("reconnect_error",E.data)):(v("reconnect success"),l.onreconnect())}))},f);this.subs.push({destroy:function(){clearTimeout(b)}})}},n.prototype.onreconnect=function(){var l=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",l)}},{"./on":4,"./socket":5,"./url":6,backo2:7,"component-bind":8,"component-emitter":9,debug:10,"engine.io-client":11,indexof:40,"object-component":41,"socket.io-parser":44}],4:[function(a,i){function n(s,u,h){return s.on(u,h),{destroy:function(){s.removeListener(u,h)}}}i.exports=n},{}],5:[function(a,i,n){function s(f,b){this.io=f,this.nsp=b,this.json=this,this.ids=0,this.acks={},this.io.autoConnect&&this.open(),this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0}var u=a("socket.io-parser"),h=a("component-emitter"),m=a("to-array"),g=a("./on"),S=a("component-bind"),v=a("debug")("socket.io-client:socket"),_=a("has-binary");i.exports=s;var y={connect:1,connect_error:1,connect_timeout:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1},l=h.prototype.emit;h(s.prototype),s.prototype.subEvents=function(){if(!this.subs){var f=this.io;this.subs=[g(f,"open",S(this,"onopen")),g(f,"packet",S(this,"onpacket")),g(f,"close",S(this,"onclose"))]}},s.prototype.open=s.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),this.io.readyState=="open"&&this.onopen(),this)},s.prototype.send=function(){var f=m(arguments);return f.unshift("message"),this.emit.apply(this,f),this},s.prototype.emit=function(f){if(y.hasOwnProperty(f))return l.apply(this,arguments),this;var b=m(arguments),E=u.EVENT;_(b)&&(E=u.BINARY_EVENT);var x={type:E,data:b};return typeof b[b.length-1]=="function"&&(v("emitting packet with ack id %d",this.ids),this.acks[this.ids]=b.pop(),x.id=this.ids++),this.connected?this.packet(x):this.sendBuffer.push(x),this},s.prototype.packet=function(f){f.nsp=this.nsp,this.io.packet(f)},s.prototype.onopen=function(){v("transport is open - connecting"),this.nsp!="/"&&this.packet({type:u.CONNECT})},s.prototype.onclose=function(f){v("close (%s)",f),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",f)},s.prototype.onpacket=function(f){if(f.nsp==this.nsp)switch(f.type){case u.CONNECT:this.onconnect();break;case u.EVENT:this.onevent(f);break;case u.BINARY_EVENT:this.onevent(f);break;case u.ACK:this.onack(f);break;case u.BINARY_ACK:this.onack(f);break;case u.DISCONNECT:this.ondisconnect();break;case u.ERROR:this.emit("error",f.data)}},s.prototype.onevent=function(f){var b=f.data||[];v("emitting event %j",b),f.id!=null&&(v("attaching ack callback to event"),b.push(this.ack(f.id))),this.connected?l.apply(this,b):this.receiveBuffer.push(b)},s.prototype.ack=function(f){var b=this,E=!1;return function(){if(!E){E=!0;var x=m(arguments);v("sending ack %j",x);var W=_(x)?u.BINARY_ACK:u.ACK;b.packet({type:W,id:f,data:x})}}},s.prototype.onack=function(f){v("calling ack %s with %j",f.id,f.data);var b=this.acks[f.id];b.apply(this,f.data),delete this.acks[f.id]},s.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},s.prototype.emitBuffered=function(){var f;for(f=0;f<this.receiveBuffer.length;f++)l.apply(this,this.receiveBuffer[f]);for(this.receiveBuffer=[],f=0;f<this.sendBuffer.length;f++)this.packet(this.sendBuffer[f]);this.sendBuffer=[]},s.prototype.ondisconnect=function(){v("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},s.prototype.destroy=function(){if(this.subs){for(var f=0;f<this.subs.length;f++)this.subs[f].destroy();this.subs=null}this.io.destroy(this)},s.prototype.close=s.prototype.disconnect=function(){return this.connected&&(v("performing disconnect (%s)",this.nsp),this.packet({type:u.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}},{"./on":4,"component-bind":8,"component-emitter":9,debug:10,"has-binary":36,"socket.io-parser":44,"to-array":48}],6:[function(a,i){(function(n){function s(m,v){var S=m,v=v||n.location;return m==null&&(m=v.protocol+"//"+v.host),typeof m=="string"&&(m.charAt(0)=="/"&&(m=m.charAt(1)=="/"?v.protocol+m:v.hostname+m),/^(https?|wss?):\/\//.test(m)||(h("protocol-less url %s",m),m=typeof v<"u"?v.protocol+"//"+m:"https://"+m),h("parse %s",m),S=u(m)),S.port||(/^(http|ws)$/.test(S.protocol)?S.port="80":/^(http|ws)s$/.test(S.protocol)&&(S.port="443")),S.path=S.path||"/",S.id=S.protocol+"://"+S.host+":"+S.port,S.href=S.protocol+"://"+S.host+(v&&v.port==S.port?"":":"+S.port),S}var u=a("parseuri"),h=a("debug")("socket.io-client:url");i.exports=s}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{debug:10,parseuri:42}],7:[function(a,i){function n(s){s=s||{},this.ms=s.min||100,this.max=s.max||1e4,this.factor=s.factor||2,this.jitter=s.jitter>0&&s.jitter<=1?s.jitter:0,this.attempts=0}i.exports=n,n.prototype.duration=function(){var s=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var u=Math.random(),h=Math.floor(u*this.jitter*s);s=1&Math.floor(10*u)?s+h:s-h}return 0|Math.min(s,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(s){this.ms=s},n.prototype.setMax=function(s){this.max=s},n.prototype.setJitter=function(s){this.jitter=s}},{}],8:[function(a,i){var n=[].slice;i.exports=function(s,u){if(typeof u=="string"&&(u=s[u]),typeof u!="function")throw new Error("bind() requires a function");var h=n.call(arguments,2);return function(){return u.apply(s,h.concat(n.call(arguments)))}}},{}],9:[function(a,i){function n(u){return u?s(u):void 0}function s(u){for(var h in n.prototype)u[h]=n.prototype[h];return u}i.exports=n,n.prototype.on=n.prototype.addEventListener=function(u,h){return this._callbacks=this._callbacks||{},(this._callbacks[u]=this._callbacks[u]||[]).push(h),this},n.prototype.once=function(u,h){function m(){g.off(u,m),h.apply(this,arguments)}var g=this;return this._callbacks=this._callbacks||{},m.fn=h,this.on(u,m),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(u,h){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var m=this._callbacks[u];if(!m)return this;if(arguments.length==1)return delete this._callbacks[u],this;for(var g,S=0;S<m.length;S++)if(g=m[S],g===h||g.fn===h){m.splice(S,1);break}return this},n.prototype.emit=function(u){this._callbacks=this._callbacks||{};var h=[].slice.call(arguments,1),m=this._callbacks[u];if(m){m=m.slice(0);for(var g=0,S=m.length;S>g;++g)m[g].apply(this,h)}return this},n.prototype.listeners=function(u){return this._callbacks=this._callbacks||{},this._callbacks[u]||[]},n.prototype.hasListeners=function(u){return!!this.listeners(u).length}},{}],10:[function(a,i){function n(u){return n.enabled(u)?function(h){h=s(h);var m=new Date,g=m-(n[u]||m);n[u]=m,h=u+" "+h+" +"+n.humanize(g),window.console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}:function(){}}function s(u){return u instanceof Error?u.stack||u.message:u}i.exports=n,n.names=[],n.skips=[],n.enable=function(u){try{localStorage.debug=u}catch{}for(var h=(u||"").split(/[\s,]+/),m=h.length,g=0;m>g;g++)u=h[g].replace("*",".*?"),u[0]==="-"?n.skips.push(new RegExp("^"+u.substr(1)+"$")):n.names.push(new RegExp("^"+u+"$"))},n.disable=function(){n.enable("")},n.humanize=function(u){var h=1e3,m=6e4,g=60*m;return u>=g?(u/g).toFixed(1)+"h":u>=m?(u/m).toFixed(1)+"m":u>=h?(u/h|0)+"s":u+"ms"},n.enabled=function(u){for(var h=0,m=n.skips.length;m>h;h++)if(n.skips[h].test(u))return!1;for(var h=0,m=n.names.length;m>h;h++)if(n.names[h].test(u))return!0;return!1};try{window.localStorage&&n.enable(localStorage.debug)}catch{}},{}],11:[function(a,i){i.exports=a("./lib/")},{"./lib/":12}],12:[function(a,i){i.exports=a("./socket"),i.exports.parser=a("engine.io-parser")},{"./socket":13,"engine.io-parser":25}],13:[function(a,i){(function(n){function s(f,b){if(!(this instanceof s))return new s(f,b);if(b=b||{},f&&typeof f=="object"&&(b=f,f=null),f&&(f=_(f),b.host=f.host,b.secure=f.protocol=="https"||f.protocol=="wss",b.port=f.port,f.query&&(b.query=f.query)),this.secure=b.secure!=null?b.secure:n.location&&location.protocol=="https:",b.host){var E=b.host.split(":");b.hostname=E.shift(),E.length?b.port=E.pop():b.port||(b.port=this.secure?"443":"80")}this.agent=b.agent||!1,this.hostname=b.hostname||(n.location?location.hostname:"localhost"),this.port=b.port||(n.location&&location.port?location.port:this.secure?443:80),this.query=b.query||{},typeof this.query=="string"&&(this.query=l.decode(this.query)),this.upgrade=b.upgrade!==!1,this.path=(b.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!b.forceJSONP,this.jsonp=b.jsonp!==!1,this.forceBase64=!!b.forceBase64,this.enablesXDR=!!b.enablesXDR,this.timestampParam=b.timestampParam||"t",this.timestampRequests=b.timestampRequests,this.transports=b.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.callbackBuffer=[],this.policyPort=b.policyPort||843,this.rememberUpgrade=b.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=b.onlyBinaryUpgrades,this.pfx=b.pfx||null,this.key=b.key||null,this.passphrase=b.passphrase||null,this.cert=b.cert||null,this.ca=b.ca||null,this.ciphers=b.ciphers||null,this.rejectUnauthorized=b.rejectUnauthorized||null,this.open()}function u(f){var b={};for(var E in f)f.hasOwnProperty(E)&&(b[E]=f[E]);return b}var h=a("./transports"),m=a("component-emitter"),g=a("debug")("engine.io-client:socket"),S=a("indexof"),v=a("engine.io-parser"),_=a("parseuri"),y=a("parsejson"),l=a("parseqs");i.exports=s,s.priorWebsocketSuccess=!1,m(s.prototype),s.protocol=v.protocol,s.Socket=s,s.Transport=a("./transport"),s.transports=a("./transports"),s.parser=a("engine.io-parser"),s.prototype.createTransport=function(f){g('creating transport "%s"',f);var b=u(this.query);b.EIO=v.protocol,b.transport=f,this.id&&(b.sid=this.id);var E=new h[f]({agent:this.agent,hostname:this.hostname,port:this.port,secure:this.secure,path:this.path,query:b,forceJSONP:this.forceJSONP,jsonp:this.jsonp,forceBase64:this.forceBase64,enablesXDR:this.enablesXDR,timestampRequests:this.timestampRequests,timestampParam:this.timestampParam,policyPort:this.policyPort,socket:this,pfx:this.pfx,key:this.key,passphrase:this.passphrase,cert:this.cert,ca:this.ca,ciphers:this.ciphers,rejectUnauthorized:this.rejectUnauthorized});return E},s.prototype.open=function(){var b;if(this.rememberUpgrade&&s.priorWebsocketSuccess&&this.transports.indexOf("websocket")!=-1)b="websocket";else{if(this.transports.length==0){var f=this;return void setTimeout(function(){f.emit("error","No transports available")},0)}b=this.transports[0]}this.readyState="opening";var b;try{b=this.createTransport(b)}catch{return this.transports.shift(),void this.open()}b.open(),this.setTransport(b)},s.prototype.setTransport=function(f){g("setting transport %s",f.name);var b=this;this.transport&&(g("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=f,f.on("drain",function(){b.onDrain()}).on("packet",function(E){b.onPacket(E)}).on("error",function(E){b.onError(E)}).on("close",function(){b.onClose("transport close")})},s.prototype.probe=function(f){function b(){if(M.onlyBinaryUpgrades){var H=!this.supportsBinary&&M.transport.supportsBinary;D=D||H}D||(g('probe transport "%s" opened',f),$.send([{type:"ping",data:"probe"}]),$.once("packet",function(L){if(!D)if(L.type=="pong"&&L.data=="probe"){if(g('probe transport "%s" pong',f),M.upgrading=!0,M.emit("upgrading",$),!$)return;s.priorWebsocketSuccess=$.name=="websocket",g('pausing current transport "%s"',M.transport.name),M.transport.pause(function(){D||M.readyState!="closed"&&(g("changing transport and sending upgrade packet"),ot(),M.setTransport($),$.send([{type:"upgrade"}]),M.emit("upgrade",$),$=null,M.upgrading=!1,M.flush())})}else{g('probe transport "%s" failed',f);var U=new Error("probe error");U.transport=$.name,M.emit("upgradeError",U)}}))}function E(){D||(D=!0,ot(),$.close(),$=null)}function x(H){var L=new Error("probe error: "+H);L.transport=$.name,E(),g('probe transport "%s" failed because of error: %s',f,H),M.emit("upgradeError",L)}function W(){x("transport closed")}function st(){x("socket closed")}function V(H){$&&H.name!=$.name&&(g('"%s" works - aborting "%s"',H.name,$.name),E())}function ot(){$.removeListener("open",b),$.removeListener("error",x),$.removeListener("close",W),M.removeListener("close",st),M.removeListener("upgrading",V)}g('probing transport "%s"',f);var $=this.createTransport(f,{probe:1}),D=!1,M=this;s.priorWebsocketSuccess=!1,$.once("open",b),$.once("error",x),$.once("close",W),this.once("close",st),this.once("upgrading",V),$.open()},s.prototype.onOpen=function(){if(g("socket open"),this.readyState="open",s.priorWebsocketSuccess=this.transport.name=="websocket",this.emit("open"),this.flush(),this.readyState=="open"&&this.upgrade&&this.transport.pause){g("starting upgrade probes");for(var f=0,b=this.upgrades.length;b>f;f++)this.probe(this.upgrades[f])}},s.prototype.onPacket=function(f){if(this.readyState=="opening"||this.readyState=="open")switch(g('socket receive: type "%s", data "%s"',f.type,f.data),this.emit("packet",f),this.emit("heartbeat"),f.type){case"open":this.onHandshake(y(f.data));break;case"pong":this.setPing();break;case"error":var b=new Error("server error");b.code=f.data,this.emit("error",b);break;case"message":this.emit("data",f.data),this.emit("message",f.data)}else g('packet received with socket readyState "%s"',this.readyState)},s.prototype.onHandshake=function(f){this.emit("handshake",f),this.id=f.sid,this.transport.query.sid=f.sid,this.upgrades=this.filterUpgrades(f.upgrades),this.pingInterval=f.pingInterval,this.pingTimeout=f.pingTimeout,this.onOpen(),this.readyState!="closed"&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},s.prototype.onHeartbeat=function(f){clearTimeout(this.pingTimeoutTimer);var b=this;b.pingTimeoutTimer=setTimeout(function(){b.readyState!="closed"&&b.onClose("ping timeout")},f||b.pingInterval+b.pingTimeout)},s.prototype.setPing=function(){var f=this;clearTimeout(f.pingIntervalTimer),f.pingIntervalTimer=setTimeout(function(){g("writing ping packet - expecting pong within %sms",f.pingTimeout),f.ping(),f.onHeartbeat(f.pingTimeout)},f.pingInterval)},s.prototype.ping=function(){this.sendPacket("ping")},s.prototype.onDrain=function(){for(var f=0;f<this.prevBufferLen;f++)this.callbackBuffer[f]&&this.callbackBuffer[f]();this.writeBuffer.splice(0,this.prevBufferLen),this.callbackBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length==0?this.emit("drain"):this.flush()},s.prototype.flush=function(){this.readyState!="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(g("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},s.prototype.write=s.prototype.send=function(f,b){return this.sendPacket("message",f,b),this},s.prototype.sendPacket=function(f,b,E){if(this.readyState!="closing"&&this.readyState!="closed"){var x={type:f,data:b};this.emit("packetCreate",x),this.writeBuffer.push(x),this.callbackBuffer.push(E),this.flush()}},s.prototype.close=function(){function f(){x.onClose("forced close"),g("socket closing - telling transport to close"),x.transport.close()}function b(){x.removeListener("upgrade",b),x.removeListener("upgradeError",b),f()}function E(){x.once("upgrade",b),x.once("upgradeError",b)}if(this.readyState=="opening"||this.readyState=="open"){this.readyState="closing";var x=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?E():f()}):this.upgrading?E():f()}return this},s.prototype.onError=function(f){g("socket error %j",f),s.priorWebsocketSuccess=!1,this.emit("error",f),this.onClose("transport error",f)},s.prototype.onClose=function(f,b){if(this.readyState=="opening"||this.readyState=="open"||this.readyState=="closing"){g('socket close with reason: "%s"',f);var E=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),setTimeout(function(){E.writeBuffer=[],E.callbackBuffer=[],E.prevBufferLen=0},0),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",f,b)}},s.prototype.filterUpgrades=function(f){for(var b=[],E=0,x=f.length;x>E;E++)~S(this.transports,f[E])&&b.push(f[E]);return b}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./transport":14,"./transports":15,"component-emitter":9,debug:22,"engine.io-parser":25,indexof:40,parsejson:32,parseqs:33,parseuri:34}],14:[function(a,i){function n(h){this.path=h.path,this.hostname=h.hostname,this.port=h.port,this.secure=h.secure,this.query=h.query,this.timestampParam=h.timestampParam,this.timestampRequests=h.timestampRequests,this.readyState="",this.agent=h.agent||!1,this.socket=h.socket,this.enablesXDR=h.enablesXDR,this.pfx=h.pfx,this.key=h.key,this.passphrase=h.passphrase,this.cert=h.cert,this.ca=h.ca,this.ciphers=h.ciphers,this.rejectUnauthorized=h.rejectUnauthorized}var s=a("engine.io-parser"),u=a("component-emitter");i.exports=n,u(n.prototype),n.timestamps=0,n.prototype.onError=function(h,m){var g=new Error(h);return g.type="TransportError",g.description=m,this.emit("error",g),this},n.prototype.open=function(){return(this.readyState=="closed"||this.readyState=="")&&(this.readyState="opening",this.doOpen()),this},n.prototype.close=function(){return(this.readyState=="opening"||this.readyState=="open")&&(this.doClose(),this.onClose()),this},n.prototype.send=function(h){if(this.readyState!="open")throw new Error("Transport not open");this.write(h)},n.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},n.prototype.onData=function(h){var m=s.decodePacket(h,this.socket.binaryType);this.onPacket(m)},n.prototype.onPacket=function(h){this.emit("packet",h)},n.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},{"component-emitter":9,"engine.io-parser":25}],15:[function(a,i,n){(function(s){function u(v){var _,y=!1,l=!1,f=v.jsonp!==!1;if(s.location){var b=location.protocol=="https:",E=location.port;E||(E=b?443:80),y=v.hostname!=location.hostname||E!=v.port,l=v.secure!=b}if(v.xdomain=y,v.xscheme=l,_=new h(v),"open"in _&&!v.forceJSONP)return new m(v);if(!f)throw new Error("JSONP disabled");return new g(v)}var h=a("xmlhttprequest"),m=a("./polling-xhr"),g=a("./polling-jsonp"),S=a("./websocket");n.polling=u,n.websocket=S}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./polling-jsonp":16,"./polling-xhr":17,"./websocket":19,xmlhttprequest:20}],16:[function(a,i){(function(n){function s(){}function u(_){h.call(this,_),this.query=this.query||{},g||(n.___eio||(n.___eio=[]),g=n.___eio),this.index=g.length;var y=this;g.push(function(l){y.onData(l)}),this.query.j=this.index,n.document&&n.addEventListener&&n.addEventListener("beforeunload",function(){y.script&&(y.script.onerror=s)},!1)}var h=a("./polling"),m=a("component-inherit");i.exports=u;var g,S=/\n/g,v=/\\n/g;m(u,h),u.prototype.supportsBinary=!1,u.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),h.prototype.doClose.call(this)},u.prototype.doPoll=function(){var _=this,y=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),y.async=!0,y.src=this.uri(),y.onerror=function(b){_.onError("jsonp poll error",b)};var l=document.getElementsByTagName("script")[0];l.parentNode.insertBefore(y,l),this.script=y;var f=typeof navigator<"u"&&/gecko/i.test(navigator.userAgent);f&&setTimeout(function(){var b=document.createElement("iframe");document.body.appendChild(b),document.body.removeChild(b)},100)},u.prototype.doWrite=function(_,y){function l(){f(),y()}function f(){if(b.iframe)try{b.form.removeChild(b.iframe)}catch(ot){b.onError("jsonp polling iframe removal error",ot)}try{var V='<iframe src="javascript:0" name="'+b.iframeId+'">';E=document.createElement(V)}catch{E=document.createElement("iframe"),E.name=b.iframeId,E.src="javascript:0"}E.id=b.iframeId,b.form.appendChild(E),b.iframe=E}var b=this;if(!this.form){var E,x=document.createElement("form"),W=document.createElement("textarea"),st=this.iframeId="eio_iframe_"+this.index;x.className="socketio",x.style.position="absolute",x.style.top="-1000px",x.style.left="-1000px",x.target=st,x.method="POST",x.setAttribute("accept-charset","utf-8"),W.name="d",x.appendChild(W),document.body.appendChild(x),this.form=x,this.area=W}this.form.action=this.uri(),f(),_=_.replace(v,`\\
|
|
33
|
+
`),this.area.value=_.replace(S,"\\n");try{this.form.submit()}catch{}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){b.iframe.readyState=="complete"&&l()}:this.iframe.onload=l}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./polling":18,"component-inherit":21}],17:[function(a,i){(function(n){function s(){}function u(l){if(S.call(this,l),n.location){var f=location.protocol=="https:",b=location.port;b||(b=f?443:80),this.xd=l.hostname!=n.location.hostname||b!=l.port,this.xs=l.secure!=f}}function h(l){this.method=l.method||"GET",this.uri=l.uri,this.xd=!!l.xd,this.xs=!!l.xs,this.async=l.async!==!1,this.data=l.data!=null?l.data:null,this.agent=l.agent,this.isBinary=l.isBinary,this.supportsBinary=l.supportsBinary,this.enablesXDR=l.enablesXDR,this.pfx=l.pfx,this.key=l.key,this.passphrase=l.passphrase,this.cert=l.cert,this.ca=l.ca,this.ciphers=l.ciphers,this.rejectUnauthorized=l.rejectUnauthorized,this.create()}function m(){for(var l in h.requests)h.requests.hasOwnProperty(l)&&h.requests[l].abort()}var g=a("xmlhttprequest"),S=a("./polling"),v=a("component-emitter"),_=a("component-inherit"),y=a("debug")("engine.io-client:polling-xhr");i.exports=u,i.exports.Request=h,_(u,S),u.prototype.supportsBinary=!0,u.prototype.request=function(l){return l=l||{},l.uri=this.uri(),l.xd=this.xd,l.xs=this.xs,l.agent=this.agent||!1,l.supportsBinary=this.supportsBinary,l.enablesXDR=this.enablesXDR,l.pfx=this.pfx,l.key=this.key,l.passphrase=this.passphrase,l.cert=this.cert,l.ca=this.ca,l.ciphers=this.ciphers,l.rejectUnauthorized=this.rejectUnauthorized,new h(l)},u.prototype.doWrite=function(l,f){var b=typeof l!="string"&&l!==void 0,E=this.request({method:"POST",data:l,isBinary:b}),x=this;E.on("success",f),E.on("error",function(W){x.onError("xhr post error",W)}),this.sendXhr=E},u.prototype.doPoll=function(){y("xhr poll");var l=this.request(),f=this;l.on("data",function(b){f.onData(b)}),l.on("error",function(b){f.onError("xhr poll error",b)}),this.pollXhr=l},v(h.prototype),h.prototype.create=function(){var l={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};l.pfx=this.pfx,l.key=this.key,l.passphrase=this.passphrase,l.cert=this.cert,l.ca=this.ca,l.ciphers=this.ciphers,l.rejectUnauthorized=this.rejectUnauthorized;var f=this.xhr=new g(l),b=this;try{if(y("xhr open %s: %s",this.method,this.uri),f.open(this.method,this.uri,this.async),this.supportsBinary&&(f.responseType="arraybuffer"),this.method=="POST")try{this.isBinary?f.setRequestHeader("Content-type","application/octet-stream"):f.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}"withCredentials"in f&&(f.withCredentials=!0),this.hasXDR()?(f.onload=function(){b.onLoad()},f.onerror=function(){b.onError(f.responseText)}):f.onreadystatechange=function(){f.readyState==4&&(f.status==200||f.status==1223?b.onLoad():setTimeout(function(){b.onError(f.status)},0))},y("xhr data %s",this.data),f.send(this.data)}catch(E){return void setTimeout(function(){b.onError(E)},0)}n.document&&(this.index=h.requestsCount++,h.requests[this.index]=this)},h.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},h.prototype.onData=function(l){this.emit("data",l),this.onSuccess()},h.prototype.onError=function(l){this.emit("error",l),this.cleanup(!0)},h.prototype.cleanup=function(l){if(typeof this.xhr<"u"&&this.xhr!==null){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=s:this.xhr.onreadystatechange=s,l)try{this.xhr.abort()}catch{}n.document&&delete h.requests[this.index],this.xhr=null}},h.prototype.onLoad=function(){var l;try{var f;try{f=this.xhr.getResponseHeader("Content-Type").split(";")[0]}catch{}l=f==="application/octet-stream"?this.xhr.response:this.supportsBinary?"ok":this.xhr.responseText}catch(b){this.onError(b)}l!=null&&this.onData(l)},h.prototype.hasXDR=function(){return typeof n.XDomainRequest<"u"&&!this.xs&&this.enablesXDR},h.prototype.abort=function(){this.cleanup()},n.document&&(h.requestsCount=0,h.requests={},n.attachEvent?n.attachEvent("onunload",m):n.addEventListener&&n.addEventListener("beforeunload",m,!1))}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./polling":18,"component-emitter":9,"component-inherit":21,debug:22,xmlhttprequest:20}],18:[function(a,i){function n(v){var _=v&&v.forceBase64;(!S||_)&&(this.supportsBinary=!1),s.call(this,v)}var s=a("../transport"),u=a("parseqs"),h=a("engine.io-parser"),m=a("component-inherit"),g=a("debug")("engine.io-client:polling");i.exports=n;var S=function(){var v=a("xmlhttprequest"),_=new v({xdomain:!1});return _.responseType!=null}();m(n,s),n.prototype.name="polling",n.prototype.doOpen=function(){this.poll()},n.prototype.pause=function(v){function _(){g("paused"),y.readyState="paused",v()}var y=this;if(this.readyState="pausing",this.polling||!this.writable){var l=0;this.polling&&(g("we are currently polling - waiting to pause"),l++,this.once("pollComplete",function(){g("pre-pause polling complete"),--l||_()})),this.writable||(g("we are currently writing - waiting to pause"),l++,this.once("drain",function(){g("pre-pause writing complete"),--l||_()}))}else _()},n.prototype.poll=function(){g("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},n.prototype.onData=function(v){var _=this;g("polling got data %s",v);var y=function(l){return _.readyState=="opening"&&_.onOpen(),l.type=="close"?(_.onClose(),!1):void _.onPacket(l)};h.decodePayload(v,this.socket.binaryType,y),this.readyState!="closed"&&(this.polling=!1,this.emit("pollComplete"),this.readyState=="open"?this.poll():g('ignoring poll - transport state "%s"',this.readyState))},n.prototype.doClose=function(){function v(){g("writing close packet"),_.write([{type:"close"}])}var _=this;this.readyState=="open"?(g("transport open - closing"),v()):(g("transport not open - deferring close"),this.once("open",v))},n.prototype.write=function(v){var y=this;this.writable=!1;var _=function(){y.writable=!0,y.emit("drain")},y=this;h.encodePayload(v,this.supportsBinary,function(l){y.doWrite(l,_)})},n.prototype.uri=function(){var v=this.query||{},_=this.secure?"https":"http",y="";return this.timestampRequests!==!1&&(v[this.timestampParam]=+new Date+"-"+s.timestamps++),this.supportsBinary||v.sid||(v.b64=1),v=u.encode(v),this.port&&(_=="https"&&this.port!=443||_=="http"&&this.port!=80)&&(y=":"+this.port),v.length&&(v="?"+v),_+"://"+this.hostname+y+this.path+v}},{"../transport":14,"component-inherit":21,debug:22,"engine.io-parser":25,parseqs:33,xmlhttprequest:20}],19:[function(a,i){function n(v){var _=v&&v.forceBase64;_&&(this.supportsBinary=!1),s.call(this,v)}var s=a("../transport"),u=a("engine.io-parser"),h=a("parseqs"),m=a("component-inherit"),g=a("debug")("engine.io-client:websocket"),S=a("ws");i.exports=n,m(n,s),n.prototype.name="websocket",n.prototype.supportsBinary=!0,n.prototype.doOpen=function(){if(this.check()){var v=this.uri(),_=void 0,y={agent:this.agent};y.pfx=this.pfx,y.key=this.key,y.passphrase=this.passphrase,y.cert=this.cert,y.ca=this.ca,y.ciphers=this.ciphers,y.rejectUnauthorized=this.rejectUnauthorized,this.ws=new S(v,_,y),this.ws.binaryType===void 0&&(this.supportsBinary=!1),this.ws.binaryType="arraybuffer",this.addEventListeners()}},n.prototype.addEventListeners=function(){var v=this;this.ws.onopen=function(){v.onOpen()},this.ws.onclose=function(){v.onClose()},this.ws.onmessage=function(_){v.onData(_.data)},this.ws.onerror=function(_){v.onError("websocket error",_)}},typeof navigator<"u"&&/iPad|iPhone|iPod/i.test(navigator.userAgent)&&(n.prototype.onData=function(v){var _=this;setTimeout(function(){s.prototype.onData.call(_,v)},0)}),n.prototype.write=function(v){function _(){y.writable=!0,y.emit("drain")}var y=this;this.writable=!1;for(var l=0,f=v.length;f>l;l++)u.encodePacket(v[l],this.supportsBinary,function(b){try{y.ws.send(b)}catch{g("websocket closed before onclose event")}});setTimeout(_,0)},n.prototype.onClose=function(){s.prototype.onClose.call(this)},n.prototype.doClose=function(){typeof this.ws<"u"&&this.ws.close()},n.prototype.uri=function(){var v=this.query||{},_=this.secure?"wss":"ws",y="";return this.port&&(_=="wss"&&this.port!=443||_=="ws"&&this.port!=80)&&(y=":"+this.port),this.timestampRequests&&(v[this.timestampParam]=+new Date),this.supportsBinary||(v.b64=1),v=h.encode(v),v.length&&(v="?"+v),_+"://"+this.hostname+y+this.path+v},n.prototype.check=function(){return!(!S||"__initialize"in S&&this.name===n.prototype.name)}},{"../transport":14,"component-inherit":21,debug:22,"engine.io-parser":25,parseqs:33,ws:35}],20:[function(a,i){var n=a("has-cors");i.exports=function(s){var u=s.xdomain,h=s.xscheme,m=s.enablesXDR;try{if(typeof XMLHttpRequest<"u"&&(!u||n))return new XMLHttpRequest}catch{}try{if(typeof XDomainRequest<"u"&&!h&&m)return new XDomainRequest}catch{}if(!u)try{return new ActiveXObject("Microsoft.XMLHTTP")}catch{}}},{"has-cors":38}],21:[function(a,i){i.exports=function(n,s){var u=function(){};u.prototype=s.prototype,n.prototype=new u,n.prototype.constructor=n}},{}],22:[function(a,i,n){function s(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function u(){var S=arguments,v=this.useColors;if(S[0]=(v?"%c":"")+this.namespace+(v?" %c":" ")+S[0]+(v?"%c ":" ")+"+"+n.humanize(this.diff),!v)return S;var _="color: "+this.color;S=[S[0],_,"color: inherit"].concat(Array.prototype.slice.call(S,1));var y=0,l=0;return S[0].replace(/%[a-z%]/g,function(f){f!=="%%"&&(y++,f==="%c"&&(l=y))}),S.splice(l,0,_),S}function h(){return typeof console=="object"&&typeof console.log=="function"&&Function.prototype.apply.call(console.log,console,arguments)}function m(S){try{S==null?localStorage.removeItem("debug"):localStorage.debug=S}catch{}}function g(){var S;try{S=localStorage.debug}catch{}return S}n=i.exports=a("./debug"),n.log=h,n.formatArgs=u,n.save=m,n.load=g,n.useColors=s,n.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],n.formatters.j=function(S){return JSON.stringify(S)},n.enable(g())},{"./debug":23}],23:[function(a,i,n){function s(){return n.colors[_++%n.colors.length]}function u(y){function l(){}function f(){var E=f,x=+new Date,W=x-(v||x);E.diff=W,E.prev=v,E.curr=x,v=x,E.useColors==null&&(E.useColors=n.useColors()),E.color==null&&E.useColors&&(E.color=s());var st=Array.prototype.slice.call(arguments);st[0]=n.coerce(st[0]),typeof st[0]!="string"&&(st=["%o"].concat(st));var V=0;st[0]=st[0].replace(/%([a-z%])/g,function($,D){if($==="%%")return $;V++;var M=n.formatters[D];if(typeof M=="function"){var H=st[V];$=M.call(E,H),st.splice(V,1),V--}return $}),typeof n.formatArgs=="function"&&(st=n.formatArgs.apply(E,st));var ot=f.log||n.log||console.log.bind(console);ot.apply(E,st)}l.enabled=!1,f.enabled=!0;var b=n.enabled(y)?f:l;return b.namespace=y,b}function h(y){n.save(y);for(var l=(y||"").split(/[\s,]+/),f=l.length,b=0;f>b;b++)l[b]&&(y=l[b].replace(/\*/g,".*?"),y[0]==="-"?n.skips.push(new RegExp("^"+y.substr(1)+"$")):n.names.push(new RegExp("^"+y+"$")))}function m(){n.enable("")}function g(y){var l,f;for(l=0,f=n.skips.length;f>l;l++)if(n.skips[l].test(y))return!1;for(l=0,f=n.names.length;f>l;l++)if(n.names[l].test(y))return!0;return!1}function S(y){return y instanceof Error?y.stack||y.message:y}n=i.exports=u,n.coerce=S,n.disable=m,n.enable=h,n.enabled=g,n.humanize=a("ms"),n.names=[],n.skips=[],n.formatters={};var v,_=0},{ms:24}],24:[function(a,i){function n(y){var l=/^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(y);if(l){var f=parseFloat(l[1]),b=(l[2]||"ms").toLowerCase();switch(b){case"years":case"year":case"y":return f*_;case"days":case"day":case"d":return f*v;case"hours":case"hour":case"h":return f*S;case"minutes":case"minute":case"m":return f*g;case"seconds":case"second":case"s":return f*m;case"ms":return f}}}function s(y){return y>=v?Math.round(y/v)+"d":y>=S?Math.round(y/S)+"h":y>=g?Math.round(y/g)+"m":y>=m?Math.round(y/m)+"s":y+"ms"}function u(y){return h(y,v,"day")||h(y,S,"hour")||h(y,g,"minute")||h(y,m,"second")||y+" ms"}function h(y,l,f){return l>y?void 0:1.5*l>y?Math.floor(y/l)+" "+f:Math.ceil(y/l)+" "+f+"s"}var m=1e3,g=60*m,S=60*g,v=24*S,_=365.25*v;i.exports=function(y,l){return l=l||{},typeof y=="string"?n(y):l.long?u(y):s(y)}},{}],25:[function(a,i,n){(function(s){function u(D,M){var H="b"+n.packets[D.type]+D.data.data;return M(H)}function h(D,M,H){if(!M)return n.encodeBase64Packet(D,H);var L=D.data,U=new Uint8Array(L),X=new Uint8Array(1+L.byteLength);X[0]=st[D.type];for(var Q=0;Q<U.length;Q++)X[Q+1]=U[Q];return H(X.buffer)}function m(D,M,H){if(!M)return n.encodeBase64Packet(D,H);var L=new FileReader;return L.onload=function(){D.data=L.result,n.encodePacket(D,M,!0,H)},L.readAsArrayBuffer(D.data)}function g(D,M,H){if(!M)return n.encodeBase64Packet(D,H);if(W)return m(D,M,H);var L=new Uint8Array(1);L[0]=st[D.type];var U=new $([L.buffer,D.data]);return H(U)}function S(D,M,H){for(var L=new Array(D.length),U=f(D.length,H),X=function(j,B,kt){M(B,function(At,Ot){L[j]=Ot,kt(At,L)})},Q=0;Q<D.length;Q++)X(Q,D[Q],U)}var v=a("./keys"),_=a("has-binary"),y=a("arraybuffer.slice"),l=a("base64-arraybuffer"),f=a("after"),b=a("utf8"),E=navigator.userAgent.match(/Android/i),x=/PhantomJS/i.test(navigator.userAgent),W=E||x;n.protocol=3;var st=n.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},V=v(st),ot={type:"error",data:"parser error"},$=a("blob");n.encodePacket=function(D,M,H,L){typeof M=="function"&&(L=M,M=!1),typeof H=="function"&&(L=H,H=null);var U=D.data===void 0?void 0:D.data.buffer||D.data;if(s.ArrayBuffer&&U instanceof ArrayBuffer)return h(D,M,L);if($&&U instanceof s.Blob)return g(D,M,L);if(U&&U.base64)return u(D,L);var X=st[D.type];return D.data!==void 0&&(X+=H?b.encode(String(D.data)):String(D.data)),L(""+X)},n.encodeBase64Packet=function(D,M){var H="b"+n.packets[D.type];if($&&D.data instanceof $){var L=new FileReader;return L.onload=function(){var B=L.result.split(",")[1];M(H+B)},L.readAsDataURL(D.data)}var U;try{U=String.fromCharCode.apply(null,new Uint8Array(D.data))}catch{for(var X=new Uint8Array(D.data),Q=new Array(X.length),j=0;j<X.length;j++)Q[j]=X[j];U=String.fromCharCode.apply(null,Q)}return H+=s.btoa(U),M(H)},n.decodePacket=function(D,M,H){if(typeof D=="string"||D===void 0){if(D.charAt(0)=="b")return n.decodeBase64Packet(D.substr(1),M);if(H)try{D=b.decode(D)}catch{return ot}var U=D.charAt(0);return Number(U)==U&&V[U]?D.length>1?{type:V[U],data:D.substring(1)}:{type:V[U]}:ot}var L=new Uint8Array(D),U=L[0],X=y(D,1);return $&&M==="blob"&&(X=new $([X])),{type:V[U],data:X}},n.decodeBase64Packet=function(D,M){var H=V[D.charAt(0)];if(!s.ArrayBuffer)return{type:H,data:{base64:!0,data:D.substr(1)}};var L=l.decode(D.substr(1));return M==="blob"&&$&&(L=new $([L])),{type:H,data:L}},n.encodePayload=function(D,M,H){function L(Q){return Q.length+":"+Q}function U(Q,j){n.encodePacket(Q,X?M:!1,!0,function(B){j(null,L(B))})}typeof M=="function"&&(H=M,M=null);var X=_(D);return M&&X?$&&!W?n.encodePayloadAsBlob(D,H):n.encodePayloadAsArrayBuffer(D,H):D.length?void S(D,U,function(Q,j){return H(j.join(""))}):H("0:")},n.decodePayload=function(D,M,H){if(typeof D!="string")return n.decodePayloadAsBinary(D,M,H);typeof M=="function"&&(H=M,M=null);var L;if(D=="")return H(ot,0,1);for(var U,X,Q="",j=0,B=D.length;B>j;j++){var kt=D.charAt(j);if(kt!=":")Q+=kt;else{if(Q==""||Q!=(U=Number(Q))||(X=D.substr(j+1,U),Q!=X.length))return H(ot,0,1);if(X.length){if(L=n.decodePacket(X,M,!0),ot.type==L.type&&ot.data==L.data)return H(ot,0,1);var At=H(L,j+U,B);if(At===!1)return}j+=U,Q=""}}return Q!=""?H(ot,0,1):void 0},n.encodePayloadAsArrayBuffer=function(D,M){function H(L,U){n.encodePacket(L,!0,!0,function(X){return U(null,X)})}return D.length?void S(D,H,function(L,U){var X=U.reduce(function(B,kt){var At;return At=typeof kt=="string"?kt.length:kt.byteLength,B+At.toString().length+At+2},0),Q=new Uint8Array(X),j=0;return U.forEach(function(B){var kt=typeof B=="string",At=B;if(kt){for(var Ot=new Uint8Array(B.length),ut=0;ut<B.length;ut++)Ot[ut]=B.charCodeAt(ut);At=Ot.buffer}Q[j++]=kt?0:1;for(var $t=At.byteLength.toString(),ut=0;ut<$t.length;ut++)Q[j++]=parseInt($t[ut]);Q[j++]=255;for(var Ot=new Uint8Array(At),ut=0;ut<Ot.length;ut++)Q[j++]=Ot[ut]}),M(Q.buffer)}):M(new ArrayBuffer(0))},n.encodePayloadAsBlob=function(D,M){function H(L,U){n.encodePacket(L,!0,!0,function(X){var Q=new Uint8Array(1);if(Q[0]=1,typeof X=="string"){for(var j=new Uint8Array(X.length),B=0;B<X.length;B++)j[B]=X.charCodeAt(B);X=j.buffer,Q[0]=0}for(var kt=X instanceof ArrayBuffer?X.byteLength:X.size,At=kt.toString(),Ot=new Uint8Array(At.length+1),B=0;B<At.length;B++)Ot[B]=parseInt(At[B]);if(Ot[At.length]=255,$){var ut=new $([Q.buffer,Ot.buffer,X]);U(null,ut)}})}S(D,H,function(L,U){return M(new $(U))})},n.decodePayloadAsBinary=function(D,M,H){typeof M=="function"&&(H=M,M=null);for(var L=D,U=[],X=!1;L.byteLength>0;){for(var Q=new Uint8Array(L),j=Q[0]===0,B="",kt=1;Q[kt]!=255;kt++){if(B.length>310){X=!0;break}B+=Q[kt]}if(X)return H(ot,0,1);L=y(L,2+B.length),B=parseInt(B);var At=y(L,0,B);if(j)try{At=String.fromCharCode.apply(null,new Uint8Array(At))}catch{var Ot=new Uint8Array(At);At="";for(var kt=0;kt<Ot.length;kt++)At+=String.fromCharCode(Ot[kt])}U.push(At),L=y(L,B)}var ut=U.length;U.forEach(function($t,xe){H(n.decodePacket($t,M,!0),xe,ut)})}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./keys":26,after:27,"arraybuffer.slice":28,"base64-arraybuffer":29,blob:30,"has-binary":36,utf8:31}],26:[function(a,i){i.exports=Object.keys||function(n){var s=[],u=Object.prototype.hasOwnProperty;for(var h in n)u.call(n,h)&&s.push(h);return s}},{}],27:[function(a,i){function n(u,h,m){function g(v,_){if(g.count<=0)throw new Error("after called too many times");--g.count,v?(S=!0,h(v),h=m):g.count!==0||S||h(null,_)}var S=!1;return m=m||s,g.count=u,u===0?h():g}function s(){}i.exports=n},{}],28:[function(a,i){i.exports=function(n,s,u){var h=n.byteLength;if(s=s||0,u=u||h,n.slice)return n.slice(s,u);if(0>s&&(s+=h),0>u&&(u+=h),u>h&&(u=h),s>=h||s>=u||h===0)return new ArrayBuffer(0);for(var m=new Uint8Array(n),g=new Uint8Array(u-s),S=s,v=0;u>S;S++,v++)g[v]=m[S];return g.buffer}},{}],29:[function(a,i,n){(function(s){n.encode=function(u){var h,m=new Uint8Array(u),g=m.length,S="";for(h=0;g>h;h+=3)S+=s[m[h]>>2],S+=s[(3&m[h])<<4|m[h+1]>>4],S+=s[(15&m[h+1])<<2|m[h+2]>>6],S+=s[63&m[h+2]];return g%3===2?S=S.substring(0,S.length-1)+"=":g%3===1&&(S=S.substring(0,S.length-2)+"=="),S},n.decode=function(u){var h,m,g,S,v,_=.75*u.length,y=u.length,l=0;u[u.length-1]==="="&&(_--,u[u.length-2]==="="&&_--);var f=new ArrayBuffer(_),b=new Uint8Array(f);for(h=0;y>h;h+=4)m=s.indexOf(u[h]),g=s.indexOf(u[h+1]),S=s.indexOf(u[h+2]),v=s.indexOf(u[h+3]),b[l++]=m<<2|g>>4,b[l++]=(15&g)<<4|S>>2,b[l++]=(3&S)<<6|63&v;return f}})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},{}],30:[function(a,i){(function(n){function s(_){for(var y=0;y<_.length;y++){var l=_[y];if(l.buffer instanceof ArrayBuffer){var f=l.buffer;if(l.byteLength!==f.byteLength){var b=new Uint8Array(l.byteLength);b.set(new Uint8Array(f,l.byteOffset,l.byteLength)),f=b.buffer}_[y]=f}}}function u(_,y){y=y||{};var l=new m;s(_);for(var f=0;f<_.length;f++)l.append(_[f]);return y.type?l.getBlob(y.type):l.getBlob()}function h(_,y){return s(_),new Blob(_,y||{})}var m=n.BlobBuilder||n.WebKitBlobBuilder||n.MSBlobBuilder||n.MozBlobBuilder,g=function(){try{var _=new Blob(["hi"]);return _.size===2}catch{return!1}}(),S=g&&function(){try{var _=new Blob([new Uint8Array([1,2])]);return _.size===2}catch{return!1}}(),v=m&&m.prototype.append&&m.prototype.getBlob;i.exports=function(){return g?S?n.Blob:h:v?u:void 0}()}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],31:[function(a,i,n){(function(s){(function(u){function h(L){for(var U,X,Q=[],j=0,B=L.length;B>j;)U=L.charCodeAt(j++),U>=55296&&56319>=U&&B>j?(X=L.charCodeAt(j++),(64512&X)==56320?Q.push(((1023&U)<<10)+(1023&X)+65536):(Q.push(U),j--)):Q.push(U);return Q}function m(L){for(var U,X=L.length,Q=-1,j="";++Q<X;)U=L[Q],U>65535&&(U-=65536,j+=ot(U>>>10&1023|55296),U=56320|1023&U),j+=ot(U);return j}function g(L){if(L>=55296&&57343>=L)throw Error("Lone surrogate U+"+L.toString(16).toUpperCase()+" is not a scalar value")}function S(L,U){return ot(L>>U&63|128)}function v(L){if(!(4294967168&L))return ot(L);var U="";return 4294965248&L?4294901760&L?!(4292870144&L)&&(U=ot(L>>18&7|240),U+=S(L,12),U+=S(L,6)):(g(L),U=ot(L>>12&15|224),U+=S(L,6)):U=ot(L>>6&31|192),U+=ot(63&L|128)}function _(L){for(var U,X=h(L),Q=X.length,j=-1,B="";++j<Q;)U=X[j],B+=v(U);return B}function y(){if(V>=st)throw Error("Invalid byte index");var L=255&W[V];if(V++,(192&L)==128)return 63&L;throw Error("Invalid continuation byte")}function l(){var L,U,X,Q,j;if(V>st)throw Error("Invalid byte index");if(V==st)return!1;if(L=255&W[V],V++,(128&L)==0)return L;if((224&L)==192){var U=y();if(j=(31&L)<<6|U,j>=128)return j;throw Error("Invalid continuation byte")}if((240&L)==224){if(U=y(),X=y(),j=(15&L)<<12|U<<6|X,j>=2048)return g(j),j;throw Error("Invalid continuation byte")}if((248&L)==240&&(U=y(),X=y(),Q=y(),j=(15&L)<<18|U<<12|X<<6|Q,j>=65536&&1114111>=j))return j;throw Error("Invalid UTF-8 detected")}function f(L){W=h(L),st=W.length,V=0;for(var U,X=[];(U=l())!==!1;)X.push(U);return m(X)}var b=typeof n=="object"&&n,E=typeof i=="object"&&i&&i.exports==b&&i,x=typeof s=="object"&&s;(x.global===x||x.window===x)&&(u=x);var W,st,V,ot=String.fromCharCode,$={version:"2.0.0",encode:_,decode:f};if(b&&!b.nodeType)if(E)E.exports=$;else{var D={},M=D.hasOwnProperty;for(var H in $)M.call($,H)&&(b[H]=$[H])}else u.utf8=$})(this)}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],32:[function(a,i){(function(n){var s=/^[\],:{}\s]*$/,u=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,h=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,m=/(?:^|:|,)(?:\s*\[)+/g,g=/^\s+/,S=/\s+$/;i.exports=function(v){return typeof v=="string"&&v?(v=v.replace(g,"").replace(S,""),n.JSON&&JSON.parse?JSON.parse(v):s.test(v.replace(u,"@").replace(h,"]").replace(m,""))?new Function("return "+v)():void 0):null}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],33:[function(a,i,n){n.encode=function(s){var u="";for(var h in s)s.hasOwnProperty(h)&&(u.length&&(u+="&"),u+=encodeURIComponent(h)+"="+encodeURIComponent(s[h]));return u},n.decode=function(s){for(var u={},h=s.split("&"),m=0,g=h.length;g>m;m++){var S=h[m].split("=");u[decodeURIComponent(S[0])]=decodeURIComponent(S[1])}return u}},{}],34:[function(a,i){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,s=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];i.exports=function(u){var h=u,m=u.indexOf("["),g=u.indexOf("]");m!=-1&&g!=-1&&(u=u.substring(0,m)+u.substring(m,g).replace(/:/g,";")+u.substring(g,u.length));for(var S=n.exec(u||""),v={},_=14;_--;)v[s[_]]=S[_]||"";return m!=-1&&g!=-1&&(v.source=h,v.host=v.host.substring(1,v.host.length-1).replace(/;/g,":"),v.authority=v.authority.replace("[","").replace("]","").replace(/;/g,":"),v.ipv6uri=!0),v}},{}],35:[function(a,i){function n(h,m){return m?new u(h,m):new u(h)}var s=function(){return self}(),u=s.WebSocket||s.MozWebSocket;i.exports=u?n:null,u&&(n.prototype=u.prototype)},{}],36:[function(a,i){(function(n){function s(h){function m(g){if(!g)return!1;if(n.Buffer&&n.Buffer.isBuffer(g)||n.ArrayBuffer&&g instanceof ArrayBuffer||n.Blob&&g instanceof Blob||n.File&&g instanceof File)return!0;if(u(g)){for(var S=0;S<g.length;S++)if(m(g[S]))return!0}else if(g&&typeof g=="object"){g.toJSON&&(g=g.toJSON());for(var v in g)if(Object.prototype.hasOwnProperty.call(g,v)&&m(g[v]))return!0}return!1}return m(h)}var u=a("isarray");i.exports=s}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{isarray:37}],37:[function(a,i){i.exports=Array.isArray||function(n){return Object.prototype.toString.call(n)=="[object Array]"}},{}],38:[function(a,i){var n=a("global");try{i.exports="XMLHttpRequest"in n&&"withCredentials"in new n.XMLHttpRequest}catch{i.exports=!1}},{global:39}],39:[function(a,i){i.exports=function(){return this}()},{}],40:[function(a,i){var n=[].indexOf;i.exports=function(s,u){if(n)return s.indexOf(u);for(var h=0;h<s.length;++h)if(s[h]===u)return h;return-1}},{}],41:[function(a,i,n){var s=Object.prototype.hasOwnProperty;n.keys=Object.keys||function(u){var h=[];for(var m in u)s.call(u,m)&&h.push(m);return h},n.values=function(u){var h=[];for(var m in u)s.call(u,m)&&h.push(u[m]);return h},n.merge=function(u,h){for(var m in h)s.call(h,m)&&(u[m]=h[m]);return u},n.length=function(u){return n.keys(u).length},n.isEmpty=function(u){return n.length(u)==0}},{}],42:[function(a,i){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,s=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];i.exports=function(u){for(var h=n.exec(u||""),m={},g=14;g--;)m[s[g]]=h[g]||"";return m}},{}],43:[function(a,i,n){(function(s){var u=a("isarray"),h=a("./is-buffer");n.deconstructPacket=function(m){function g(y){if(!y)return y;if(h(y)){var l={_placeholder:!0,num:S.length};return S.push(y),l}if(u(y)){for(var f=new Array(y.length),b=0;b<y.length;b++)f[b]=g(y[b]);return f}if(typeof y=="object"&&!(y instanceof Date)){var f={};for(var E in y)f[E]=g(y[E]);return f}return y}var S=[],v=m.data,_=m;return _.data=g(v),_.attachments=S.length,{packet:_,buffers:S}},n.reconstructPacket=function(m,g){function S(v){if(v&&v._placeholder){var _=g[v.num];return _}if(u(v)){for(var y=0;y<v.length;y++)v[y]=S(v[y]);return v}if(v&&typeof v=="object"){for(var l in v)v[l]=S(v[l]);return v}return v}return m.data=S(m.data),m.attachments=void 0,m},n.removeBlobs=function(m,g){function S(y,l,f){if(!y)return y;if(s.Blob&&y instanceof Blob||s.File&&y instanceof File){v++;var b=new FileReader;b.onload=function(){f?f[l]=this.result:_=this.result,--v||g(_)},b.readAsArrayBuffer(y)}else if(u(y))for(var E=0;E<y.length;E++)S(y[E],E,y);else if(y&&typeof y=="object"&&!h(y))for(var x in y)S(y[x],x,y)}var v=0,_=m;S(_),v||g(_)}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./is-buffer":45,isarray:46}],44:[function(a,i,n){function s(){}function u(E){var x="",W=!1;return x+=E.type,(n.BINARY_EVENT==E.type||n.BINARY_ACK==E.type)&&(x+=E.attachments,x+="-"),E.nsp&&E.nsp!="/"&&(W=!0,x+=E.nsp),E.id!=null&&(W&&(x+=",",W=!1),x+=E.id),E.data!=null&&(W&&(x+=","),x+=y.stringify(E.data)),_("encoded %j as %s",E,x),x}function h(E,x){function W(st){var V=f.deconstructPacket(st),ot=u(V.packet),$=V.buffers;$.unshift(ot),x($)}f.removeBlobs(E,W)}function m(){this.reconstructor=null}function g(E){var x={},W=0;if(x.type=Number(E.charAt(0)),n.types[x.type]==null)return v();if(n.BINARY_EVENT==x.type||n.BINARY_ACK==x.type){for(var st="";E.charAt(++W)!="-"&&(st+=E.charAt(W),W!=E.length););if(st!=Number(st)||E.charAt(W)!="-")throw new Error("Illegal attachments");x.attachments=Number(st)}if(E.charAt(W+1)=="/")for(x.nsp="";++W;){var V=E.charAt(W);if(V==","||(x.nsp+=V,W==E.length))break}else x.nsp="/";var ot=E.charAt(W+1);if(ot!==""&&Number(ot)==ot){for(x.id="";++W;){var V=E.charAt(W);if(V==null||Number(V)!=V){--W;break}if(x.id+=E.charAt(W),W==E.length)break}x.id=Number(x.id)}if(E.charAt(++W))try{x.data=y.parse(E.substr(W))}catch{return v()}return _("decoded %s as %j",E,x),x}function S(E){this.reconPack=E,this.buffers=[]}function v(){return{type:n.ERROR,data:"parser error"}}var _=a("debug")("socket.io-parser"),y=a("json3"),l=(a("isarray"),a("component-emitter")),f=a("./binary"),b=a("./is-buffer");n.protocol=4,n.types=["CONNECT","DISCONNECT","EVENT","BINARY_EVENT","ACK","BINARY_ACK","ERROR"],n.CONNECT=0,n.DISCONNECT=1,n.EVENT=2,n.ACK=3,n.ERROR=4,n.BINARY_EVENT=5,n.BINARY_ACK=6,n.Encoder=s,n.Decoder=m,s.prototype.encode=function(E,x){if(_("encoding packet %j",E),n.BINARY_EVENT==E.type||n.BINARY_ACK==E.type)h(E,x);else{var W=u(E);x([W])}},l(m.prototype),m.prototype.add=function(E){var x;if(typeof E=="string")x=g(E),n.BINARY_EVENT==x.type||n.BINARY_ACK==x.type?(this.reconstructor=new S(x),this.reconstructor.reconPack.attachments===0&&this.emit("decoded",x)):this.emit("decoded",x);else{if(!b(E)&&!E.base64)throw new Error("Unknown type: "+E);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");x=this.reconstructor.takeBinaryData(E),x&&(this.reconstructor=null,this.emit("decoded",x))}},m.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},S.prototype.takeBinaryData=function(E){if(this.buffers.push(E),this.buffers.length==this.reconPack.attachments){var x=f.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),x}return null},S.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},{"./binary":43,"./is-buffer":45,"component-emitter":9,debug:10,isarray:46,json3:47}],45:[function(a,i){(function(n){function s(u){return n.Buffer&&n.Buffer.isBuffer(u)||n.ArrayBuffer&&u instanceof ArrayBuffer}i.exports=s}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],46:[function(a,i){i.exports=a(37)},{}],47:[function(a,i,n){(function(s){function u(q){if(u[q]!==g)return u[q];var J;if(q=="bug-string-char-index")J=!1;else if(q=="json")J=u("json-stringify")&&u("json-parse");else{var F,et='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if(q=="json-stringify"){var P=_.stringify,Z=typeof P=="function"&&y;if(Z){(F=function(){return 1}).toJSON=F;try{Z=P(0)==="0"&&P(new Number)==="0"&&P(new String)=='""'&&P(S)===g&&P(g)===g&&P()===g&&P(F)==="1"&&P([F])=="[1]"&&P([g])=="[null]"&&P(null)=="null"&&P([g,S,null])=="[null,null,null]"&&P({a:[F,!0,!1,null,`\0\b
|
|
34
|
+
\f\r `]})==et&&P(null,F)==="1"&&P([1,2],null,1)==`[
|
|
35
35
|
1,
|
|
36
36
|
2
|
|
37
|
-
]`&&
|
|
38
|
-
`+
|
|
39
|
-
`+
|
|
40
|
-
`+
|
|
41
|
-
`+
|
|
42
|
-
`+
|
|
43
|
-
`+
|
|
44
|
-
`,102:"\f",114:"\r"},ut=function(){throw F=pt=null,SyntaxError()},Gt=function(){for(var $,Q,X,rt,K,et=pt,nt=et.length;nt>F;)switch(K=et.charCodeAt(F)){case 9:case 10:case 13:case 32:F++;break;case 123:case 125:case 91:case 93:case 58:case 44:return $=Y?et.charAt(F):et[F],F++,$;case 34:for($="@",F++;nt>F;)if(K=et.charCodeAt(F),32>K)ut();else if(K==92)switch(K=et.charCodeAt(++F)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:$+=xt[K],F++;break;case 117:for(Q=++F,X=F+4;X>F;F++)K=et.charCodeAt(F),K>=48&&57>=K||K>=97&&102>=K||K>=65&&70>=K||ut();$+=ct("0x"+et.slice(Q,F));break;default:ut()}else{if(K==34)break;for(K=et.charCodeAt(F),Q=F;K>=32&&K!=92&&K!=34;)K=et.charCodeAt(++F);$+=et.slice(Q,F)}if(et.charCodeAt(F)==34)return F++,$;ut();default:if(Q=F,K==45&&(rt=!0,K=et.charCodeAt(++F)),K>=48&&57>=K){for(K==48&&(K=et.charCodeAt(F+1),K>=48&&57>=K)&&ut(),rt=!1;nt>F&&(K=et.charCodeAt(F),K>=48&&57>=K);F++);if(et.charCodeAt(F)==46){for(X=++F;nt>X&&(K=et.charCodeAt(X),K>=48&&57>=K);X++);X==F&&ut(),F=X}if(K=et.charCodeAt(F),K==101||K==69){for(K=et.charCodeAt(++F),(K==43||K==45)&&F++,X=F;nt>X&&(K=et.charCodeAt(X),K>=48&&57>=K);X++);X==F&&ut(),F=X}return+et.slice(Q,F)}if(rt&&ut(),et.slice(F,F+4)=="true")return F+=4,!0;if(et.slice(F,F+5)=="false")return F+=5,!1;if(et.slice(F,F+4)=="null")return F+=4,null;ut()}return"$"},Ie=function($){var Q,X;if($=="$"&&ut(),typeof $=="string"){if((Y?$.charAt(0):$[0])=="@")return $.slice(1);if($=="["){for(Q=[];$=Gt(),$!="]";X||(X=!0))X&&($==","?($=Gt(),$=="]"&&ut()):ut()),$==","&&ut(),Q.push(Ie($));return Q}if($=="{"){for(Q={};$=Gt(),$!="}";X||(X=!0))X&&($==","?($=Gt(),$=="}"&&ut()):ut()),($==","||typeof $!="string"||(Y?$.charAt(0):$[0])!="@"||Gt()!=":")&&ut(),Q[$.slice(1)]=Ie(Gt());return Q}ut()}return $},ce=function($,Q,X){var rt=vr($,Q,X);rt===d?delete $[Q]:$[Q]=rt},vr=function($,Q,X){var rt,K=$[Q];if(typeof K=="object"&&K)if(b.call(K)==k)for(rt=K.length;rt--;)ce(K,rt,X);else v(K,function(et){ce(K,et,X)});return X.call($,Q,K)};_.parse=function($,Q){var X,rt;return F=0,pt=""+$,X=Ie(Gt()),Gt()!="$"&&ut(),F=pt=null,Q&&b.call(Q)==l?vr((rt={},rt[""]=X,rt),"",Q):X}}}})(this)},{}],48:[function(r,o){function n(s,c){var f=[];c=c||0;for(var v=c||0;v<s.length;v++)f[v-c]=s[v];return f}o.exports=n},{}]},{},[1])(1)}const Iv=Object.freeze(Object.defineProperty({__proto__:null,default:Ov},Symbol.toStringTag,{value:"Module"})),Nv=Object.assign({"./v1_3_7.js":Iv}),Bv=/v\d+_\d+_\d+/;function Lv(r){return typeof r=="function"}const $o=Object.entries(Nv).reduce((r,o)=>{var c;const n=o[1].default,s=(c=o[0].match(Bv))==null?void 0:c[0];return Lv(n)&&s&&(r[s]=n()),r},{}),au=r=>{if(r in $o)return $o[r];throw new Error(`Socket version ${r} not found`)},Uv=(r,...o)=>au(r)(...o),Dv={...$o,getSocketVersion:au,makeSocketVersion:Uv};var cu=(r=>(r.RINGING="Ringing",r.TALKING="Talking",r.DIALING="Dialing",r.HOLD="Hold",r))(cu||{}),uu=(r=>(r.INCOMING="Incoming",r.OUTGOING="Outgoing",r))(uu||{}),fu=(r=>(r.AUTOMATIC="Automatic",r.IVR="IVR",r))(fu||{}),hu=(r=>(r.INCOMINC="Incoming",r.OUTGOING="Outgoing",r.SPY="Spy",r.CLICK2CALL="Click2Call",r))(hu||{}),lu=(r=>(r.RESPONSE_FROM_API_VALID="RESPONSE_FROM_API_VALID",r.RESPONSE_FROM_API_INVALID="RESPONSE_FROM_API_INVALID",r))(lu||{}),lt=(r=>(r.ALL_DIALER_STATUS="AllDialersStatus",r.ALL_EXTENSION_STATUS="AllExtensionsStatus",r.ALL_USERS_STATUS="AllUsersStatus",r.CONNECT="connect",r.DISCONNECT="disconnect",r.CONNECT_ERROR_EVENT="connect_error",r.EXTENSION_EVENT="ExtensionEvent",r.KEEP_ALIVE="keepalive",r.KEEP_ALIVE_RESPONSE="keepaliveResponse",r.LOGIN_STATUS="loginStatus",r.LOGIN_SUCCESS="loginSuccess",r.QUEUE_EVENT="QueueEvent",r.ONLINE_STATUS_EVENT="onlineStatusEvent",r.DIALER_EVENT="DialerEvent",r.EXTENSIONS_UPDATED="ExtensionsUpdated",r))(lt||{}),ns=(r=>(r.NEWCALL="NEWCALL",r.ANSWER="ANSWER",r.HOLD="HOLD",r.UNHOLD="UNHOLD",r.HANGUP="HANGUP",r.USER_STATUS_UPDATE="userStatusUpdate",r))(ns||{}),pu=(r=>(r.NORMAL_HANGUP="Normal hangup",r.USER_BUSY="User busy",r.CALL_REJECTED="Call Rejected",r.UNALLOCATED_NUMBER="Unallocated (unassigned) number",r.UNKNOWN="Unknown",r.NO_USER_RESPONDING="No user responding",r.USER_ALERTING="User alerting, no answer",r.ANSWERED_ELSEWHERE="Answered elsewhere",r))(pu||{}),du=(r=>(r.ANSWER="ANSWER",r.ABANDONED="ABANDONED",r.EXIT="EXIT",r.JOIN="JOIN",r))(du||{});class Pv{static mapExtensionEvent(o){const n=o.reason;let s,c;return o.data.currentCall&&(c=this.configureUTCForObject(o.data.currentCall,["callAnswered","callStarted"],o.servertime,o.servertimeoffset)),n===ns.HANGUP?s={...o,reason:n,data:{...o.data,currentCall:c?{...c,duration:Date.now()-((c==null?void 0:c.callAnswered_UTC_CLIENT)??0)}:void 0}}:s={...o,data:{...o.data,currentCall:c},reason:n},s}static assignProperty(o,n,s){o[n]=s}static configureUTCForObject(o,n,s,c){const f=(s-c*60)*1e3,v=Date.now()-f,d={};return n.forEach(b=>{const p=o[b];if(console.log("####################"),console.log("property",b),console.log("value",p),console.log("####################"),p===0)this.assignProperty(d,`${b}_UTC`,0),this.assignProperty(d,`${b}_UTC_CLIENT`,0);else{const _=(p-c*60)*1e3;this.assignProperty(d,`${b}_UTC`,_),this.assignProperty(d,`${b}_UTC_CLIENT`,_+v)}}),{...o,...d}}}class Fv{constructor(o){St(this,"io");St(this,"ioFunction");St(this,"lastEventTimestamp",new Date().getTime());St(this,"doReconnect",!0);St(this,"keepAliveInterval");St(this,"keepReconnectInterval");St(this,"connected",!1);this.eventsSdkClass=o,this.eventsSdkClass=o}getSocketIoFunction(o){const n=o.split("v="),s="v".concat(n[n.length-1]).replaceAll(".","_");this.ioFunction=Dv.getSocketVersion(s)}initSocketConnection(){const o=this.eventsSdkClass.authClass.token,n=this.eventsSdkClass.options.protocol,s=this.eventsSdkClass.server;try{const c=s?s.Domain:this.eventsSdkClass.URL,f=s?`${n}://${c}`:this.eventsSdkClass.URL;this.eventsSdkClass.loggerClass.log(Yt.INFO,"Connecting to..",f),this.eventsSdkClass.eventEmitterClass.emit(lt.ONLINE_STATUS_EVENT,{isSocketConnected:!1,attemptToConnect:f});const v={reconnection:!1,upgrade:!1,transports:["websocket"],forceNew:!0,query:{token:o},timeout:this.eventsSdkClass.options.timeout};if(o&&(v.query={token:o}),this.ioFunction&&f)this.io=this.ioFunction(f,v);else throw new Error("Socket server url no defined")}catch(c){this.eventsSdkClass.loggerClass.log(Yt.ERROR,"init socket connection error",c)}}initSocketEvents(){this.io&&this.io.on(lt.LOGIN_SUCCESS,o=>this.eventsSdkClass.eventEmitterClass.emit(lt.LOGIN_SUCCESS,o)).on(lt.QUEUE_EVENT,o=>this.eventsSdkClass.eventEmitterClass.emit(lt.QUEUE_EVENT,o)).on(lt.EXTENSION_EVENT,o=>{const n=Pv.mapExtensionEvent(o);n&&this.eventsSdkClass.eventEmitterClass.emit(lt.EXTENSION_EVENT,n)}).on(lt.DIALER_EVENT,o=>this.eventsSdkClass.eventEmitterClass.emit(lt.DIALER_EVENT,o)).on(lt.LOGIN_STATUS,o=>this.eventsSdkClass.eventEmitterClass.emit(lt.LOGIN_STATUS,o)).on(lt.ALL_EXTENSION_STATUS,o=>this.eventsSdkClass.eventEmitterClass.emit(lt.ALL_EXTENSION_STATUS,o)).on(lt.ALL_DIALER_STATUS,o=>this.eventsSdkClass.eventEmitterClass.emit(lt.ALL_DIALER_STATUS,o)).on(lt.KEEP_ALIVE_RESPONSE,o=>this.onKeepAliveResponse(o)).on(lt.CONNECT,()=>this.onConnect()).on(lt.DISCONNECT,o=>this.onDisconnect(o)).on(lt.CONNECT_ERROR_EVENT,o=>this.onConnectError(o)).on(lt.EXTENSIONS_UPDATED,o=>{this.eventsSdkClass.eventEmitterClass.emit(lt.EXTENSIONS_UPDATED,o)})}clearKeepAliveInterval(){this.keepAliveInterval&&clearInterval(this.keepAliveInterval)}initKeepAlive(){this.clearKeepAliveInterval(),this.keepAliveInterval=setInterval(async()=>{if(new Date().getTime()>this.lastEventTimestamp+this.eventsSdkClass.options.keepAliveTimeout&&this.io){this.eventsSdkClass.emit(lt.KEEP_ALIVE,this.eventsSdkClass.authClass.token),this.eventsSdkClass.loggerClass.log(Yt.INFO,`EMIT -> ${lt.KEEP_ALIVE}`,this.eventsSdkClass.authClass.token);return}},this.eventsSdkClass.options.keepAliveTimeout)}closeAllConnections(){var o;this.io&&(this.io.close(),(o=this.io)==null||o.disconnect(),this.io=void 0),lr.clearSessionStorage()}onKeepAliveResponse(o){if(this.eventsSdkClass.loggerClass.log(Yt.INFO,lt.KEEP_ALIVE_RESPONSE),o.errorCode){this.initSocketConnection();return}this.connected?this.lastEventTimestamp=new Date().getTime():this.initSocketConnection()}onConnect(){this.keepReconnectInterval&&clearInterval(this.keepReconnectInterval),this.connected=!0,this.eventsSdkClass.loggerClass.log(Yt.INFO,lt.CONNECT,this.eventsSdkClass.reconnectOptions),this.eventsSdkClass.eventEmitterClass.emit(lt.ONLINE_STATUS_EVENT,{isSocketConnected:!0})}onDisconnect(o){this.connected=!1,this.eventsSdkClass.loggerClass.log(Yt.INFO,lt.DISCONNECT,o),this.closeAllConnections(),this.eventsSdkClass.eventEmitterClass.emit(lt.ONLINE_STATUS_EVENT,{isSocketConnected:!1}),this.doReconnect&&(console.log("attempt to connect..."),this.eventsSdkClass.connect(wn.NEXT))}onConnectError(o){this.eventsSdkClass.eventEmitterClass.emit(lt.ONLINE_STATUS_EVENT,{isSocketConnected:!1}),this.eventsSdkClass.loggerClass.log(Yt.ERROR,lt.CONNECT_ERROR_EVENT,o),setTimeout(()=>{this.eventsSdkClass.connect(wn.NEXT)},this.eventsSdkClass.options.reconnectionDelay)}}var Mv=Object.defineProperty,qv=(r,o,n)=>o in r?Mv(r,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[o]=n,Ht=(r,o,n)=>(qv(r,typeof o!="symbol"?o+"":o,n),n);function Wv(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Hv(r){if(r.__esModule)return r;var o=r.default;if(typeof o=="function"){var n=function s(){return this instanceof s?Reflect.construct(o,arguments,this.constructor):o.apply(this,arguments)};n.prototype=o.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(r).forEach(function(s){var c=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(n,s,c.get?c:{enumerable:!0,get:function(){return r[s]}})}),n}var Jo={exports:{}},Kv=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,zv=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],gu=function(r){var o=r,n=r.indexOf("["),s=r.indexOf("]");n!=-1&&s!=-1&&(r=r.substring(0,n)+r.substring(n,s).replace(/:/g,";")+r.substring(s,r.length));for(var c=Kv.exec(r||""),f={},v=14;v--;)f[zv[v]]=c[v]||"";return n!=-1&&s!=-1&&(f.source=o,f.host=f.host.substring(1,f.host.length-1).replace(/;/g,":"),f.authority=f.authority.replace("[","").replace("]","").replace(/;/g,":"),f.ipv6uri=!0),f.pathNames=Xv(f,f.path),f.queryKey=Gv(f,f.query),f};function Xv(r,o){var n=/\/{2,9}/g,s=o.replace(n,"/").split("/");return(o.substr(0,1)=="/"||o.length===0)&&s.splice(0,1),o.substr(o.length-1,1)=="/"&&s.splice(s.length-1,1),s}function Gv(r,o){var n={};return o.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,c,f){c&&(n[c]=f)}),n}var jo={exports:{}},Yo={exports:{}},pr=1e3,dr=pr*60,gr=dr*60,yr=gr*24,$v=yr*365.25,Jv=function(r,o){o=o||{};var n=typeof r;if(n==="string"&&r.length>0)return jv(r);if(n==="number"&&isNaN(r)===!1)return o.long?Vv(r):Yv(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function jv(r){if(r=String(r),!(r.length>100)){var o=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(r);if(o){var n=parseFloat(o[1]),s=(o[2]||"ms").toLowerCase();switch(s){case"years":case"year":case"yrs":case"yr":case"y":return n*$v;case"days":case"day":case"d":return n*yr;case"hours":case"hour":case"hrs":case"hr":case"h":return n*gr;case"minutes":case"minute":case"mins":case"min":case"m":return n*dr;case"seconds":case"second":case"secs":case"sec":case"s":return n*pr;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function Yv(r){return r>=yr?Math.round(r/yr)+"d":r>=gr?Math.round(r/gr)+"h":r>=dr?Math.round(r/dr)+"m":r>=pr?Math.round(r/pr)+"s":r+"ms"}function Vv(r){return si(r,yr,"day")||si(r,gr,"hour")||si(r,dr,"minute")||si(r,pr,"second")||r+" ms"}function si(r,o,n){if(!(r<o))return r<o*1.5?Math.floor(r/o)+" "+n:Math.ceil(r/o)+" "+n+"s"}(function(r,o){o=r.exports=s.debug=s.default=s,o.coerce=b,o.disable=v,o.enable=f,o.enabled=d,o.humanize=Jv,o.instances=[],o.names=[],o.skips=[],o.formatters={};function n(p){var _=0,g;for(g in p)_=(_<<5)-_+p.charCodeAt(g),_|=0;return o.colors[Math.abs(_)%o.colors.length]}function s(p){var _;function g(){if(g.enabled){var l=g,u=+new Date,w=u-(_||u);l.diff=w,l.prev=_,l.curr=u,_=u;for(var A=new Array(arguments.length),k=0;k<A.length;k++)A[k]=arguments[k];A[0]=o.coerce(A[0]),typeof A[0]!="string"&&A.unshift("%O");var L=0;A[0]=A[0].replace(/%([a-zA-Z%])/g,function(J,N){if(J==="%%")return J;L++;var U=o.formatters[N];if(typeof U=="function"){var T=A[L];J=U.call(l,T),A.splice(L,1),L--}return J}),o.formatArgs.call(l,A);var Y=g.log||o.log||console.log.bind(console);Y.apply(l,A)}}return g.namespace=p,g.enabled=o.enabled(p),g.useColors=o.useColors(),g.color=n(p),g.destroy=c,typeof o.init=="function"&&o.init(g),o.instances.push(g),g}function c(){var p=o.instances.indexOf(this);return p!==-1?(o.instances.splice(p,1),!0):!1}function f(p){o.save(p),o.names=[],o.skips=[];var _,g=(typeof p=="string"?p:"").split(/[\s,]+/),l=g.length;for(_=0;_<l;_++)g[_]&&(p=g[_].replace(/\*/g,".*?"),p[0]==="-"?o.skips.push(new RegExp("^"+p.substr(1)+"$")):o.names.push(new RegExp("^"+p+"$")));for(_=0;_<o.instances.length;_++){var u=o.instances[_];u.enabled=o.enabled(u.namespace)}}function v(){o.enable("")}function d(p){if(p[p.length-1]==="*")return!0;var _,g;for(_=0,g=o.skips.length;_<g;_++)if(o.skips[_].test(p))return!1;for(_=0,g=o.names.length;_<g;_++)if(o.names[_].test(p))return!0;return!1}function b(p){return p instanceof Error?p.stack||p.message:p}})(Yo,Yo.exports);var Zv=Yo.exports;(function(r,o){o=r.exports=Zv,o.log=c,o.formatArgs=s,o.save=f,o.load=v,o.useColors=n,o.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:d(),o.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","#33CCCC","#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"];function n(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}o.formatters.j=function(b){try{return JSON.stringify(b)}catch(p){return"[UnexpectedJSONParseError]: "+p.message}};function s(b){var p=this.useColors;if(b[0]=(p?"%c":"")+this.namespace+(p?" %c":" ")+b[0]+(p?"%c ":" ")+"+"+o.humanize(this.diff),!!p){var _="color: "+this.color;b.splice(1,0,_,"color: inherit");var g=0,l=0;b[0].replace(/%[a-zA-Z%]/g,function(u){u!=="%%"&&(g++,u==="%c"&&(l=g))}),b.splice(l,0,_)}}function c(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function f(b){try{b==null?o.storage.removeItem("debug"):o.storage.debug=b}catch{}}function v(){var b;try{b=o.storage.debug}catch{}return!b&&typeof process<"u"&&"env"in process&&(b=process.env.DEBUG),b}o.enable(v());function d(){try{return window.localStorage}catch{}}})(jo,jo.exports);var je=jo.exports,Qv=gu,zc=je("socket.io-client:url"),t0=e0;function e0(r,o){var n=r;o=o||typeof location<"u"&&location,r==null&&(r=o.protocol+"//"+o.host),typeof r=="string"&&(r.charAt(0)==="/"&&(r.charAt(1)==="/"?r=o.protocol+r:r=o.host+r),/^(https?|wss?):\/\//.test(r)||(zc("protocol-less url %s",r),typeof o<"u"?r=o.protocol+"//"+r:r="https://"+r),zc("parse %s",r),n=Qv(r)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";var s=n.host.indexOf(":")!==-1,c=s?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+c+":"+n.port,n.href=n.protocol+"://"+c+(o&&o.port===n.port?"":":"+n.port),n}var gi={},yu={exports:{}};(function(r){r.exports=o;function o(s){if(s)return n(s)}function n(s){for(var c in o.prototype)s[c]=o.prototype[c];return s}o.prototype.on=o.prototype.addEventListener=function(s,c){return this._callbacks=this._callbacks||{},(this._callbacks["$"+s]=this._callbacks["$"+s]||[]).push(c),this},o.prototype.once=function(s,c){function f(){this.off(s,f),c.apply(this,arguments)}return f.fn=c,this.on(s,f),this},o.prototype.off=o.prototype.removeListener=o.prototype.removeAllListeners=o.prototype.removeEventListener=function(s,c){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var f=this._callbacks["$"+s];if(!f)return this;if(arguments.length==1)return delete this._callbacks["$"+s],this;for(var v,d=0;d<f.length;d++)if(v=f[d],v===c||v.fn===c){f.splice(d,1);break}return f.length===0&&delete this._callbacks["$"+s],this},o.prototype.emit=function(s){this._callbacks=this._callbacks||{};for(var c=new Array(arguments.length-1),f=this._callbacks["$"+s],v=1;v<arguments.length;v++)c[v-1]=arguments[v];if(f){f=f.slice(0);for(var v=0,d=f.length;v<d;++v)f[v].apply(this,c)}return this},o.prototype.listeners=function(s){return this._callbacks=this._callbacks||{},this._callbacks["$"+s]||[]},o.prototype.hasListeners=function(s){return!!this.listeners(s).length}})(yu);var Wn=yu.exports,yi={},n0={}.toString,rs=Array.isArray||function(r){return n0.call(r)=="[object Array]"},vu=s0,r0=typeof Buffer=="function"&&typeof Buffer.isBuffer=="function",i0=typeof ArrayBuffer=="function",o0=function(r){return typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r.buffer instanceof ArrayBuffer};function s0(r){return r0&&Buffer.isBuffer(r)||i0&&(r instanceof ArrayBuffer||o0(r))}var is=rs,mu=vu,_u=Object.prototype.toString,a0=typeof Blob=="function"||typeof Blob<"u"&&_u.call(Blob)==="[object BlobConstructor]",c0=typeof File=="function"||typeof File<"u"&&_u.call(File)==="[object FileConstructor]";yi.deconstructPacket=function(r){var o=[],n=r.data,s=r;return s.data=Vo(n,o),s.attachments=o.length,{packet:s,buffers:o}};function Vo(r,o){if(!r)return r;if(mu(r)){var n={_placeholder:!0,num:o.length};return o.push(r),n}else if(is(r)){for(var s=new Array(r.length),c=0;c<r.length;c++)s[c]=Vo(r[c],o);return s}else if(typeof r=="object"&&!(r instanceof Date)){var s={};for(var f in r)s[f]=Vo(r[f],o);return s}return r}yi.reconstructPacket=function(r,o){return r.data=Zo(r.data,o),r.attachments=void 0,r};function Zo(r,o){if(!r)return r;if(r&&r._placeholder===!0){var n=typeof r.num=="number"&&r.num>=0&&r.num<o.length;if(n)return o[r.num];throw new Error("illegal attachments")}else if(is(r))for(var s=0;s<r.length;s++)r[s]=Zo(r[s],o);else if(typeof r=="object")for(var c in r)r[c]=Zo(r[c],o);return r}yi.removeBlobs=function(r,o){function n(f,v,d){if(!f)return f;if(a0&&f instanceof Blob||c0&&f instanceof File){s++;var b=new FileReader;b.onload=function(){d?d[v]=this.result:c=this.result,--s||o(c)},b.readAsArrayBuffer(f)}else if(is(f))for(var p=0;p<f.length;p++)n(f[p],p,f);else if(typeof f=="object"&&!mu(f))for(var _ in f)n(f[_],_,f)}var s=0,c=r;n(c),s||o(c)};(function(r){var o=je("socket.io-parser"),n=Wn,s=yi,c=rs,f=vu;r.protocol=4,r.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],r.CONNECT=0,r.DISCONNECT=1,r.EVENT=2,r.ACK=3,r.ERROR=4,r.BINARY_EVENT=5,r.BINARY_ACK=6,r.Encoder=v,r.Decoder=g;function v(){}var d=r.ERROR+'"encode error"';v.prototype.encode=function(k,L){if(o("encoding packet %j",k),r.BINARY_EVENT===k.type||r.BINARY_ACK===k.type)_(k,L);else{var Y=b(k);L([Y])}};function b(k){var L=""+k.type;if((r.BINARY_EVENT===k.type||r.BINARY_ACK===k.type)&&(L+=k.attachments+"-"),k.nsp&&k.nsp!=="/"&&(L+=k.nsp+","),k.id!=null&&(L+=k.id),k.data!=null){var Y=p(k.data);if(Y!==!1)L+=Y;else return d}return o("encoded %j as %s",k,L),L}function p(k){try{return JSON.stringify(k)}catch{return!1}}function _(k,L){function Y(J){var N=s.deconstructPacket(J),U=b(N.packet),T=N.buffers;T.unshift(U),L(T)}s.removeBlobs(k,Y)}function g(){this.reconstructor=null}n(g.prototype),g.prototype.add=function(k){var L;if(typeof k=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");L=l(k),r.BINARY_EVENT===L.type||r.BINARY_ACK===L.type?(this.reconstructor=new w(L),this.reconstructor.reconPack.attachments===0&&this.emit("decoded",L)):this.emit("decoded",L)}else if(f(k)||k.base64)if(this.reconstructor)L=this.reconstructor.takeBinaryData(k),L&&(this.reconstructor=null,this.emit("decoded",L));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+k)};function l(k){var L=0,Y={type:Number(k.charAt(0))};if(r.types[Y.type]==null)return A("unknown packet type "+Y.type);if(r.BINARY_EVENT===Y.type||r.BINARY_ACK===Y.type){for(var J=L+1;k.charAt(++L)!=="-"&&L!=k.length;);var N=k.substring(J,L);if(N!=Number(N)||k.charAt(L)!=="-")throw new Error("Illegal attachments");Y.attachments=Number(N)}if(k.charAt(L+1)==="/"){for(var J=L+1;++L;){var U=k.charAt(L);if(U===","||L===k.length)break}Y.nsp=k.substring(J,L)}else Y.nsp="/";var T=k.charAt(L+1);if(T!==""&&Number(T)==T){for(var J=L+1;++L;){var U=k.charAt(L);if(U==null||Number(U)!=U){--L;break}if(L===k.length)break}Y.id=Number(k.substring(J,L+1))}if(k.charAt(++L)){var I=u(k.substr(L)),P=I!==!1&&(Y.type===r.ERROR||c(I));if(P)Y.data=I;else return A("invalid payload")}return o("decoded %s as %j",k,Y),Y}function u(k){try{return JSON.parse(k)}catch{return!1}}g.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()};function w(k){this.reconPack=k,this.buffers=[]}w.prototype.takeBinaryData=function(k){if(this.buffers.push(k),this.buffers.length===this.reconPack.attachments){var L=s.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),L}return null},w.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]};function A(k){return{type:r.ERROR,data:"parser error: "+k}}})(gi);var os={exports:{}},vi={},Qo={exports:{}};try{Qo.exports=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{Qo.exports=!1}var u0=Qo.exports,ss=function(){return typeof self<"u"?self:typeof window<"u"?window:Function("return this")()}(),f0=u0,h0=ss,as=function(r){var o=r.xdomain,n=r.xscheme,s=r.enablesXDR;try{if(typeof XMLHttpRequest<"u"&&(!o||f0))return new XMLHttpRequest}catch{}try{if(typeof XDomainRequest<"u"&&!n&&s)return new XDomainRequest}catch{}if(!o)try{return new h0[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}},cs={exports:{}},bn={},l0=Object.keys||function(r){var o=[],n=Object.prototype.hasOwnProperty;for(var s in r)n.call(r,s)&&o.push(s);return o},p0=rs,wu=Object.prototype.toString,d0=typeof Blob=="function"||typeof Blob<"u"&&wu.call(Blob)==="[object BlobConstructor]",g0=typeof File=="function"||typeof File<"u"&&wu.call(File)==="[object FileConstructor]",bu=ui;function ui(r){if(!r||typeof r!="object")return!1;if(p0(r)){for(var o=0,n=r.length;o<n;o++)if(ui(r[o]))return!0;return!1}if(typeof Buffer=="function"&&Buffer.isBuffer&&Buffer.isBuffer(r)||typeof ArrayBuffer=="function"&&r instanceof ArrayBuffer||d0&&r instanceof Blob||g0&&r instanceof File)return!0;if(r.toJSON&&typeof r.toJSON=="function"&&arguments.length===1)return ui(r.toJSON(),!0);for(var s in r)if(Object.prototype.hasOwnProperty.call(r,s)&&ui(r[s]))return!0;return!1}var y0=function(r,o,n){var s=r.byteLength;if(o=o||0,n=n||s,r.slice)return r.slice(o,n);if(o<0&&(o+=s),n<0&&(n+=s),n>s&&(n=s),o>=s||o>=n||s===0)return new ArrayBuffer(0);for(var c=new Uint8Array(r),f=new Uint8Array(n-o),v=o,d=0;v<n;v++,d++)f[d]=c[v];return f.buffer},v0=m0;function m0(r,o,n){var s=!1;return n=n||_0,c.count=r,r===0?o():c;function c(f,v){if(c.count<=0)throw new Error("after called too many times");--c.count,f?(s=!0,o(f),o=n):c.count===0&&!s&&o(null,v)}}function _0(){}/*! https://mths.be/utf8js v2.1.2 by @mathias */var cn=String.fromCharCode;function Cu(r){for(var o=[],n=0,s=r.length,c,f;n<s;)c=r.charCodeAt(n++),c>=55296&&c<=56319&&n<s?(f=r.charCodeAt(n++),(f&64512)==56320?o.push(((c&1023)<<10)+(f&1023)+65536):(o.push(c),n--)):o.push(c);return o}function w0(r){for(var o=r.length,n=-1,s,c="";++n<o;)s=r[n],s>65535&&(s-=65536,c+=cn(s>>>10&1023|55296),s=56320|s&1023),c+=cn(s);return c}function Su(r,o){if(r>=55296&&r<=57343){if(o)throw Error("Lone surrogate U+"+r.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function Wo(r,o){return cn(r>>o&63|128)}function b0(r,o){if(!(r&4294967168))return cn(r);var n="";return r&4294965248?r&4294901760?r&4292870144||(n=cn(r>>18&7|240),n+=Wo(r,12),n+=Wo(r,6)):(Su(r,o)||(r=65533),n=cn(r>>12&15|224),n+=Wo(r,6)):n=cn(r>>6&31|192),n+=cn(r&63|128),n}function C0(r,o){o=o||{};for(var n=o.strict!==!1,s=Cu(r),c=s.length,f=-1,v,d="";++f<c;)v=s[f],d+=b0(v,n);return d}function Fn(){if(un>=li)throw Error("Invalid byte index");var r=hi[un]&255;if(un++,(r&192)==128)return r&63;throw Error("Invalid continuation byte")}function S0(r){var o,n,s,c,f;if(un>li)throw Error("Invalid byte index");if(un==li)return!1;if(o=hi[un]&255,un++,!(o&128))return o;if((o&224)==192){if(n=Fn(),f=(o&31)<<6|n,f>=128)return f;throw Error("Invalid continuation byte")}if((o&240)==224){if(n=Fn(),s=Fn(),f=(o&15)<<12|n<<6|s,f>=2048)return Su(f,r)?f:65533;throw Error("Invalid continuation byte")}if((o&248)==240&&(n=Fn(),s=Fn(),c=Fn(),f=(o&7)<<18|n<<12|s<<6|c,f>=65536&&f<=1114111))return f;throw Error("Invalid UTF-8 detected")}var hi,li,un;function k0(r,o){o=o||{};var n=o.strict!==!1;hi=Cu(r),li=hi.length,un=0;for(var s=[],c;(c=S0(n))!==!1;)s.push(c);return w0(s)}var A0={version:"2.1.2",encode:C0,decode:k0},Ho={},Xc;function x0(){return Xc||(Xc=1,function(r){Ho.encode=function(o){var n=new Uint8Array(o),s,c=n.length,f="";for(s=0;s<c;s+=3)f+=r[n[s]>>2],f+=r[(n[s]&3)<<4|n[s+1]>>4],f+=r[(n[s+1]&15)<<2|n[s+2]>>6],f+=r[n[s+2]&63];return c%3===2?f=f.substring(0,f.length-1)+"=":c%3===1&&(f=f.substring(0,f.length-2)+"=="),f},Ho.decode=function(o){var n=o.length*.75,s=o.length,c,f=0,v,d,b,p;o[o.length-1]==="="&&(n--,o[o.length-2]==="="&&n--);var _=new ArrayBuffer(n),g=new Uint8Array(_);for(c=0;c<s;c+=4)v=r.indexOf(o[c]),d=r.indexOf(o[c+1]),b=r.indexOf(o[c+2]),p=r.indexOf(o[c+3]),g[f++]=v<<2|d>>4,g[f++]=(d&15)<<4|b>>2,g[f++]=(b&3)<<6|p&63;return _}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")),Ho}var Ko,Gc;function E0(){if(Gc)return Ko;Gc=1;var r=typeof r<"u"?r:typeof WebKitBlobBuilder<"u"?WebKitBlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:!1,o=function(){try{var d=new Blob(["hi"]);return d.size===2}catch{return!1}}(),n=o&&function(){try{var d=new Blob([new Uint8Array([1,2])]);return d.size===2}catch{return!1}}(),s=r&&r.prototype.append&&r.prototype.getBlob;function c(d){return d.map(function(b){if(b.buffer instanceof ArrayBuffer){var p=b.buffer;if(b.byteLength!==p.byteLength){var _=new Uint8Array(b.byteLength);_.set(new Uint8Array(p,b.byteOffset,b.byteLength)),p=_.buffer}return p}return b})}function f(d,b){b=b||{};var p=new r;return c(d).forEach(function(_){p.append(_)}),b.type?p.getBlob(b.type):p.getBlob()}function v(d,b){return new Blob(c(d),b||{})}return typeof Blob<"u"&&(f.prototype=Blob.prototype,v.prototype=Blob.prototype),Ko=function(){return o?n?Blob:v:s?f:void 0}(),Ko}(function(r){var o=l0,n=bu,s=y0,c=v0,f=A0,v;typeof ArrayBuffer<"u"&&(v=x0());var d=typeof navigator<"u"&&/Android/i.test(navigator.userAgent),b=typeof navigator<"u"&&/PhantomJS/i.test(navigator.userAgent),p=d||b;r.protocol=3;var _=r.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},g=o(_),l={type:"error",data:"parser error"},u=E0();r.encodePacket=function(N,U,T,I){typeof U=="function"&&(I=U,U=!1),typeof T=="function"&&(I=T,T=null);var P=N.data===void 0?void 0:N.data.buffer||N.data;if(typeof ArrayBuffer<"u"&&P instanceof ArrayBuffer)return A(N,U,I);if(typeof u<"u"&&P instanceof u)return L(N,U,I);if(P&&P.base64)return w(N,I);var R=_[N.type];return N.data!==void 0&&(R+=T?f.encode(String(N.data),{strict:!1}):String(N.data)),I(""+R)};function w(N,U){var T="b"+r.packets[N.type]+N.data.data;return U(T)}function A(N,U,T){if(!U)return r.encodeBase64Packet(N,T);var I=N.data,P=new Uint8Array(I),R=new Uint8Array(1+I.byteLength);R[0]=_[N.type];for(var B=0;B<P.length;B++)R[B+1]=P[B];return T(R.buffer)}function k(N,U,T){if(!U)return r.encodeBase64Packet(N,T);var I=new FileReader;return I.onload=function(){r.encodePacket({type:N.type,data:I.result},U,!0,T)},I.readAsArrayBuffer(N.data)}function L(N,U,T){if(!U)return r.encodeBase64Packet(N,T);if(p)return k(N,U,T);var I=new Uint8Array(1);I[0]=_[N.type];var P=new u([I.buffer,N.data]);return T(P)}r.encodeBase64Packet=function(N,U){var T="b"+r.packets[N.type];if(typeof u<"u"&&N.data instanceof u){var I=new FileReader;return I.onload=function(){var z=I.result.split(",")[1];U(T+z)},I.readAsDataURL(N.data)}var P;try{P=String.fromCharCode.apply(null,new Uint8Array(N.data))}catch{for(var R=new Uint8Array(N.data),B=new Array(R.length),H=0;H<R.length;H++)B[H]=R[H];P=String.fromCharCode.apply(null,B)}return T+=btoa(P),U(T)},r.decodePacket=function(N,U,T){if(N===void 0)return l;if(typeof N=="string"){if(N.charAt(0)==="b")return r.decodeBase64Packet(N.substr(1),U);if(T&&(N=Y(N),N===!1))return l;var P=N.charAt(0);return Number(P)!=P||!g[P]?l:N.length>1?{type:g[P],data:N.substring(1)}:{type:g[P]}}var I=new Uint8Array(N),P=I[0],R=s(N,1);return u&&U==="blob"&&(R=new u([R])),{type:g[P],data:R}};function Y(N){try{N=f.decode(N,{strict:!1})}catch{return!1}return N}r.decodeBase64Packet=function(N,U){var T=g[N.charAt(0)];if(!v)return{type:T,data:{base64:!0,data:N.substr(1)}};var I=v.decode(N.substr(1));return U==="blob"&&u&&(I=new u([I])),{type:T,data:I}},r.encodePayload=function(N,U,T){typeof U=="function"&&(T=U,U=null);var I=n(N);if(U&&I)return u&&!p?r.encodePayloadAsBlob(N,T):r.encodePayloadAsArrayBuffer(N,T);if(!N.length)return T("0:");function P(B){return B.length+":"+B}function R(B,H){r.encodePacket(B,I?U:!1,!1,function(z){H(null,P(z))})}J(N,R,function(B,H){return T(H.join(""))})};function J(N,U,T){for(var I=new Array(N.length),P=c(N.length,T),R=function(H,z,G){U(z,function(F,pt){I[H]=pt,G(F,I)})},B=0;B<N.length;B++)R(B,N[B],P)}r.decodePayload=function(N,U,T){if(typeof N!="string")return r.decodePayloadAsBinary(N,U,T);typeof U=="function"&&(T=U,U=null);var I;if(N==="")return T(l,0,1);for(var P="",R,B,H=0,z=N.length;H<z;H++){var G=N.charAt(H);if(G!==":"){P+=G;continue}if(P===""||P!=(R=Number(P))||(B=N.substr(H+1,R),P!=B.length))return T(l,0,1);if(B.length){if(I=r.decodePacket(B,U,!1),l.type===I.type&&l.data===I.data)return T(l,0,1);var F=T(I,H+R,z);if(F===!1)return}H+=R,P=""}if(P!=="")return T(l,0,1)},r.encodePayloadAsArrayBuffer=function(N,U){if(!N.length)return U(new ArrayBuffer(0));function T(I,P){r.encodePacket(I,!0,!0,function(R){return P(null,R)})}J(N,T,function(I,P){var R=P.reduce(function(z,G){var F;return typeof G=="string"?F=G.length:F=G.byteLength,z+F.toString().length+F+2},0),B=new Uint8Array(R),H=0;return P.forEach(function(z){var G=typeof z=="string",F=z;if(G){for(var pt=new Uint8Array(z.length),ct=0;ct<z.length;ct++)pt[ct]=z.charCodeAt(ct);F=pt.buffer}G?B[H++]=0:B[H++]=1;for(var xt=F.byteLength.toString(),ct=0;ct<xt.length;ct++)B[H++]=parseInt(xt[ct]);B[H++]=255;for(var pt=new Uint8Array(F),ct=0;ct<pt.length;ct++)B[H++]=pt[ct]}),U(B.buffer)})},r.encodePayloadAsBlob=function(N,U){function T(I,P){r.encodePacket(I,!0,!0,function(R){var B=new Uint8Array(1);if(B[0]=1,typeof R=="string"){for(var H=new Uint8Array(R.length),z=0;z<R.length;z++)H[z]=R.charCodeAt(z);R=H.buffer,B[0]=0}for(var G=R instanceof ArrayBuffer?R.byteLength:R.size,F=G.toString(),pt=new Uint8Array(F.length+1),z=0;z<F.length;z++)pt[z]=parseInt(F[z]);if(pt[F.length]=255,u){var ct=new u([B.buffer,pt.buffer,R]);P(null,ct)}})}J(N,T,function(I,P){return U(new u(P))})},r.decodePayloadAsBinary=function(N,U,T){typeof U=="function"&&(T=U,U=null);for(var I=N,P=[];I.byteLength>0;){for(var R=new Uint8Array(I),B=R[0]===0,H="",z=1;R[z]!==255;z++){if(H.length>310)return T(l,0,1);H+=R[z]}I=s(I,2+H.length),H=parseInt(H);var G=s(I,0,H);if(B)try{G=String.fromCharCode.apply(null,new Uint8Array(G))}catch{var F=new Uint8Array(G);G="";for(var z=0;z<F.length;z++)G+=String.fromCharCode(F[z])}P.push(G),I=s(I,H)}var pt=P.length;P.forEach(function(ct,xt){T(r.decodePacket(ct,U,!0),xt,pt)})}})(bn);var zo,$c;function us(){if($c)return zo;$c=1;var r=bn,o=Wn;zo=n;function n(s){this.path=s.path,this.hostname=s.hostname,this.port=s.port,this.secure=s.secure,this.query=s.query,this.timestampParam=s.timestampParam,this.timestampRequests=s.timestampRequests,this.readyState="",this.agent=s.agent||!1,this.socket=s.socket,this.enablesXDR=s.enablesXDR,this.withCredentials=s.withCredentials,this.pfx=s.pfx,this.key=s.key,this.passphrase=s.passphrase,this.cert=s.cert,this.ca=s.ca,this.ciphers=s.ciphers,this.rejectUnauthorized=s.rejectUnauthorized,this.forceNode=s.forceNode,this.isReactNative=s.isReactNative,this.extraHeaders=s.extraHeaders,this.localAddress=s.localAddress}return o(n.prototype),n.prototype.onError=function(s,c){var f=new Error(s);return f.type="TransportError",f.description=c,this.emit("error",f),this},n.prototype.open=function(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this},n.prototype.close=function(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this},n.prototype.send=function(s){if(this.readyState==="open")this.write(s);else throw new Error("Transport not open")},n.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},n.prototype.onData=function(s){var c=r.decodePacket(s,this.socket.binaryType);this.onPacket(c)},n.prototype.onPacket=function(s){this.emit("packet",s)},n.prototype.onClose=function(){this.readyState="closed",this.emit("close")},zo}var Hn={};Hn.encode=function(r){var o="";for(var n in r)r.hasOwnProperty(n)&&(o.length&&(o+="&"),o+=encodeURIComponent(n)+"="+encodeURIComponent(r[n]));return o};Hn.decode=function(r){for(var o={},n=r.split("&"),s=0,c=n.length;s<c;s++){var f=n[s].split("=");o[decodeURIComponent(f[0])]=decodeURIComponent(f[1])}return o};var mi=function(r,o){var n=function(){};n.prototype=o.prototype,r.prototype=new n,r.prototype.constructor=r},ku="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),pi=64,Au={},Jc=0,fn=0,jc;function ts(r){var o="";do o=ku[r%pi]+o,r=Math.floor(r/pi);while(r>0);return o}function T0(r){var o=0;for(fn=0;fn<r.length;fn++)o=o*pi+Au[r.charAt(fn)];return o}function fs(){var r=ts(+new Date);return r!==jc?(Jc=0,jc=r):r+"."+ts(Jc++)}for(;fn<pi;fn++)Au[ku[fn]]=fn;fs.encode=ts;fs.decode=T0;var xu=fs,Eu=us(),R0=Hn,Tu=bn,O0=mi,I0=xu,Oe=je("engine.io-client:polling"),Ru=Pe,N0=function(){var r=as,o=new r({xdomain:!1});return o.responseType!=null}();function Pe(r){var o=r&&r.forceBase64;(!N0||o)&&(this.supportsBinary=!1),Eu.call(this,r)}O0(Pe,Eu);Pe.prototype.name="polling";Pe.prototype.doOpen=function(){this.poll()};Pe.prototype.pause=function(r){var o=this;this.readyState="pausing";function n(){Oe("paused"),o.readyState="paused",r()}if(this.polling||!this.writable){var s=0;this.polling&&(Oe("we are currently polling - waiting to pause"),s++,this.once("pollComplete",function(){Oe("pre-pause polling complete"),--s||n()})),this.writable||(Oe("we are currently writing - waiting to pause"),s++,this.once("drain",function(){Oe("pre-pause writing complete"),--s||n()}))}else n()};Pe.prototype.poll=function(){Oe("polling"),this.polling=!0,this.doPoll(),this.emit("poll")};Pe.prototype.onData=function(r){var o=this;Oe("polling got data %s",r);var n=function(s,c,f){if(o.readyState==="opening"&&s.type==="open"&&o.onOpen(),s.type==="close")return o.onClose(),!1;o.onPacket(s)};Tu.decodePayload(r,this.socket.binaryType,n),this.readyState!=="closed"&&(this.polling=!1,this.emit("pollComplete"),this.readyState==="open"?this.poll():Oe('ignoring poll - transport state "%s"',this.readyState))};Pe.prototype.doClose=function(){var r=this;function o(){Oe("writing close packet"),r.write([{type:"close"}])}this.readyState==="open"?(Oe("transport open - closing"),o()):(Oe("transport not open - deferring close"),this.once("open",o))};Pe.prototype.write=function(r){var o=this;this.writable=!1;var n=function(){o.writable=!0,o.emit("drain")};Tu.encodePayload(r,this.supportsBinary,function(s){o.doWrite(s,n)})};Pe.prototype.uri=function(){var r=this.query||{},o=this.secure?"https":"http",n="";this.timestampRequests!==!1&&(r[this.timestampParam]=I0()),!this.supportsBinary&&!r.sid&&(r.b64=1),r=R0.encode(r),this.port&&(o==="https"&&Number(this.port)!==443||o==="http"&&Number(this.port)!==80)&&(n=":"+this.port),r.length&&(r="?"+r);var s=this.hostname.indexOf(":")!==-1;return o+"://"+(s?"["+this.hostname+"]":this.hostname)+n+this.path+r};var B0=as,Ou=Ru,L0=Wn,U0=mi,es=je("engine.io-client:polling-xhr"),D0=ss;cs.exports=Kn;cs.exports.Request=qt;function Yc(){}function Kn(r){if(Ou.call(this,r),this.requestTimeout=r.requestTimeout,this.extraHeaders=r.extraHeaders,typeof location<"u"){var o=location.protocol==="https:",n=location.port;n||(n=o?443:80),this.xd=typeof location<"u"&&r.hostname!==location.hostname||n!==r.port,this.xs=r.secure!==o}}U0(Kn,Ou);Kn.prototype.supportsBinary=!0;Kn.prototype.request=function(r){return r=r||{},r.uri=this.uri(),r.xd=this.xd,r.xs=this.xs,r.agent=this.agent||!1,r.supportsBinary=this.supportsBinary,r.enablesXDR=this.enablesXDR,r.withCredentials=this.withCredentials,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,r.requestTimeout=this.requestTimeout,r.extraHeaders=this.extraHeaders,new qt(r)};Kn.prototype.doWrite=function(r,o){var n=typeof r!="string"&&r!==void 0,s=this.request({method:"POST",data:r,isBinary:n}),c=this;s.on("success",o),s.on("error",function(f){c.onError("xhr post error",f)}),this.sendXhr=s};Kn.prototype.doPoll=function(){es("xhr poll");var r=this.request(),o=this;r.on("data",function(n){o.onData(n)}),r.on("error",function(n){o.onError("xhr poll error",n)}),this.pollXhr=r};function qt(r){this.method=r.method||"GET",this.uri=r.uri,this.xd=!!r.xd,this.xs=!!r.xs,this.async=r.async!==!1,this.data=r.data!==void 0?r.data:null,this.agent=r.agent,this.isBinary=r.isBinary,this.supportsBinary=r.supportsBinary,this.enablesXDR=r.enablesXDR,this.withCredentials=r.withCredentials,this.requestTimeout=r.requestTimeout,this.pfx=r.pfx,this.key=r.key,this.passphrase=r.passphrase,this.cert=r.cert,this.ca=r.ca,this.ciphers=r.ciphers,this.rejectUnauthorized=r.rejectUnauthorized,this.extraHeaders=r.extraHeaders,this.create()}L0(qt.prototype);qt.prototype.create=function(){var r={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};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;var o=this.xhr=new B0(r),n=this;try{es("xhr open %s: %s",this.method,this.uri),o.open(this.method,this.uri,this.async);try{if(this.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(var s in this.extraHeaders)this.extraHeaders.hasOwnProperty(s)&&o.setRequestHeader(s,this.extraHeaders[s])}}catch{}if(this.method==="POST")try{this.isBinary?o.setRequestHeader("Content-type","application/octet-stream"):o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in o&&(o.withCredentials=this.withCredentials),this.requestTimeout&&(o.timeout=this.requestTimeout),this.hasXDR()?(o.onload=function(){n.onLoad()},o.onerror=function(){n.onError(o.responseText)}):o.onreadystatechange=function(){if(o.readyState===2)try{var c=o.getResponseHeader("Content-Type");(n.supportsBinary&&c==="application/octet-stream"||c==="application/octet-stream; charset=UTF-8")&&(o.responseType="arraybuffer")}catch{}o.readyState===4&&(o.status===200||o.status===1223?n.onLoad():setTimeout(function(){n.onError(typeof o.status=="number"?o.status:0)},0))},es("xhr data %s",this.data),o.send(this.data)}catch(c){setTimeout(function(){n.onError(c)},0);return}typeof document<"u"&&(this.index=qt.requestsCount++,qt.requests[this.index]=this)};qt.prototype.onSuccess=function(){this.emit("success"),this.cleanup()};qt.prototype.onData=function(r){this.emit("data",r),this.onSuccess()};qt.prototype.onError=function(r){this.emit("error",r),this.cleanup(!0)};qt.prototype.cleanup=function(r){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=Yc:this.xhr.onreadystatechange=Yc,r)try{this.xhr.abort()}catch{}typeof document<"u"&&delete qt.requests[this.index],this.xhr=null}};qt.prototype.onLoad=function(){var r;try{var o;try{o=this.xhr.getResponseHeader("Content-Type")}catch{}o==="application/octet-stream"||o==="application/octet-stream; charset=UTF-8"?r=this.xhr.response||this.xhr.responseText:r=this.xhr.responseText}catch(n){this.onError(n)}r!=null&&this.onData(r)};qt.prototype.hasXDR=function(){return typeof XDomainRequest<"u"&&!this.xs&&this.enablesXDR};qt.prototype.abort=function(){this.cleanup()};qt.requestsCount=0;qt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Vc);else if(typeof addEventListener=="function"){var P0="onpagehide"in D0?"pagehide":"unload";addEventListener(P0,Vc,!1)}}function Vc(){for(var r in qt.requests)qt.requests.hasOwnProperty(r)&&qt.requests[r].abort()}var F0=cs.exports,hs=Ru,M0=mi,Zc=ss,q0=zn,W0=/\n/g,H0=/\\n/g,ai;function K0(){}function zn(r){hs.call(this,r),this.query=this.query||{},ai||(ai=Zc.___eio=Zc.___eio||[]),this.index=ai.length;var o=this;ai.push(function(n){o.onData(n)}),this.query.j=this.index,typeof addEventListener=="function"&&addEventListener("beforeunload",function(){o.script&&(o.script.onerror=K0)},!1)}M0(zn,hs);zn.prototype.supportsBinary=!1;zn.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),hs.prototype.doClose.call(this)};zn.prototype.doPoll=function(){var r=this,o=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),o.async=!0,o.src=this.uri(),o.onerror=function(c){r.onError("jsonp poll error",c)};var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(o,n):(document.head||document.body).appendChild(o),this.script=o;var s=typeof navigator<"u"&&/gecko/i.test(navigator.userAgent);s&&setTimeout(function(){var c=document.createElement("iframe");document.body.appendChild(c),document.body.removeChild(c)},100)};zn.prototype.doWrite=function(r,o){var n=this;if(!this.form){var s=document.createElement("form"),c=document.createElement("textarea"),f=this.iframeId="eio_iframe_"+this.index,v;s.className="socketio",s.style.position="absolute",s.style.top="-1000px",s.style.left="-1000px",s.target=f,s.method="POST",s.setAttribute("accept-charset","utf-8"),c.name="d",s.appendChild(c),document.body.appendChild(s),this.form=s,this.area=c}this.form.action=this.uri();function d(){b(),o()}function b(){if(n.iframe)try{n.form.removeChild(n.iframe)}catch(_){n.onError("jsonp polling iframe removal error",_)}try{var p='<iframe src="javascript:0" name="'+n.iframeId+'">';v=document.createElement(p)}catch{v=document.createElement("iframe"),v.name=n.iframeId,v.src="javascript:0"}v.id=n.iframeId,n.form.appendChild(v),n.iframe=v}b(),r=r.replace(H0,`\\
|
|
45
|
-
`),this.area.value=r.replace(W0,"\\n");try{this.form.submit()}catch{}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){n.iframe.readyState==="complete"&&d()}:this.iframe.onload=d};const z0={},X0=Object.freeze(Object.defineProperty({__proto__:null,default:z0},Symbol.toStringTag,{value:"Module"})),G0=Hv(X0);var ls=us(),$0=bn,J0=Hn,j0=mi,Y0=xu,V0=je("engine.io-client:websocket"),di,ps;typeof WebSocket<"u"?di=WebSocket:typeof self<"u"&&(di=self.WebSocket||self.MozWebSocket);if(typeof window>"u")try{ps=G0}catch{}var qn=di||ps,Z0=ke;function ke(r){var o=r&&r.forceBase64;o&&(this.supportsBinary=!1),this.perMessageDeflate=r.perMessageDeflate,this.usingBrowserWebSocket=di&&!r.forceNode,this.protocols=r.protocols,this.usingBrowserWebSocket||(qn=ps),ls.call(this,r)}j0(ke,ls);ke.prototype.name="websocket";ke.prototype.supportsBinary=!0;ke.prototype.doOpen=function(){if(this.check()){var r=this.uri(),o=this.protocols,n={};this.isReactNative||(n.agent=this.agent,n.perMessageDeflate=this.perMessageDeflate,n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized),this.extraHeaders&&(n.headers=this.extraHeaders),this.localAddress&&(n.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket&&!this.isReactNative?o?new qn(r,o):new qn(r):new qn(r,o,n)}catch(s){return this.emit("error",s)}this.ws.binaryType===void 0&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}};ke.prototype.addEventListeners=function(){var r=this;this.ws.onopen=function(){r.onOpen()},this.ws.onclose=function(){r.onClose()},this.ws.onmessage=function(o){r.onData(o.data)},this.ws.onerror=function(o){r.onError("websocket error",o)}};ke.prototype.write=function(r){var o=this;this.writable=!1;for(var n=r.length,s=0,c=n;s<c;s++)(function(v){$0.encodePacket(v,o.supportsBinary,function(d){if(!o.usingBrowserWebSocket){var b={};if(v.options&&(b.compress=v.options.compress),o.perMessageDeflate){var p=typeof d=="string"?Buffer.byteLength(d):d.length;p<o.perMessageDeflate.threshold&&(b.compress=!1)}}try{o.usingBrowserWebSocket?o.ws.send(d):o.ws.send(d,b)}catch{V0("websocket closed before onclose event")}--n||f()})})(r[s]);function f(){o.emit("flush"),setTimeout(function(){o.writable=!0,o.emit("drain")},0)}};ke.prototype.onClose=function(){ls.prototype.onClose.call(this)};ke.prototype.doClose=function(){typeof this.ws<"u"&&this.ws.close()};ke.prototype.uri=function(){var r=this.query||{},o=this.secure?"wss":"ws",n="";this.port&&(o==="wss"&&Number(this.port)!==443||o==="ws"&&Number(this.port)!==80)&&(n=":"+this.port),this.timestampRequests&&(r[this.timestampParam]=Y0()),this.supportsBinary||(r.b64=1),r=J0.encode(r),r.length&&(r="?"+r);var s=this.hostname.indexOf(":")!==-1;return o+"://"+(s?"["+this.hostname+"]":this.hostname)+n+this.path+r};ke.prototype.check=function(){return!!qn&&!("__initialize"in qn&&this.name===ke.prototype.name)};var Q0=as,tm=F0,em=q0,nm=Z0;vi.polling=rm;vi.websocket=nm;function rm(r){var o,n=!1,s=!1,c=r.jsonp!==!1;if(typeof location<"u"){var f=location.protocol==="https:",v=location.port;v||(v=f?443:80),n=r.hostname!==location.hostname||v!==r.port,s=r.secure!==f}if(r.xdomain=n,r.xscheme=s,o=new Q0(r),"open"in o&&!r.forceJSONP)return new tm(r);if(!c)throw new Error("JSONP disabled");return new em(r)}var im=[].indexOf,Iu=function(r,o){if(im)return r.indexOf(o);for(var n=0;n<r.length;++n)if(r[n]===o)return n;return-1},om=vi,sm=Wn,Pt=je("engine.io-client:socket"),am=Iu,Nu=bn,Qc=gu,cm=Hn,um=wt;function wt(r,o){if(!(this instanceof wt))return new wt(r,o);o=o||{},r&&typeof r=="object"&&(o=r,r=null),r?(r=Qc(r),o.hostname=r.host,o.secure=r.protocol==="https"||r.protocol==="wss",o.port=r.port,r.query&&(o.query=r.query)):o.host&&(o.hostname=Qc(o.host).host),this.secure=o.secure!=null?o.secure:typeof location<"u"&&location.protocol==="https:",o.hostname&&!o.port&&(o.port=this.secure?"443":"80"),this.agent=o.agent||!1,this.hostname=o.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=o.port||(typeof location<"u"&&location.port?location.port:this.secure?443:80),this.query=o.query||{},typeof this.query=="string"&&(this.query=cm.decode(this.query)),this.upgrade=o.upgrade!==!1,this.path=(o.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!o.forceJSONP,this.jsonp=o.jsonp!==!1,this.forceBase64=!!o.forceBase64,this.enablesXDR=!!o.enablesXDR,this.withCredentials=o.withCredentials!==!1,this.timestampParam=o.timestampParam||"t",this.timestampRequests=o.timestampRequests,this.transports=o.transports||["polling","websocket"],this.transportOptions=o.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=o.policyPort||843,this.rememberUpgrade=o.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=o.onlyBinaryUpgrades,this.perMessageDeflate=o.perMessageDeflate!==!1?o.perMessageDeflate||{}:!1,this.perMessageDeflate===!0&&(this.perMessageDeflate={}),this.perMessageDeflate&&this.perMessageDeflate.threshold==null&&(this.perMessageDeflate.threshold=1024),this.pfx=o.pfx||void 0,this.key=o.key||void 0,this.passphrase=o.passphrase||void 0,this.cert=o.cert||void 0,this.ca=o.ca||void 0,this.ciphers=o.ciphers||void 0,this.rejectUnauthorized=o.rejectUnauthorized===void 0?!0:o.rejectUnauthorized,this.forceNode=!!o.forceNode,this.isReactNative=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",(typeof self>"u"||this.isReactNative)&&(o.extraHeaders&&Object.keys(o.extraHeaders).length>0&&(this.extraHeaders=o.extraHeaders),o.localAddress&&(this.localAddress=o.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}wt.priorWebsocketSuccess=!1;sm(wt.prototype);wt.protocol=Nu.protocol;wt.Socket=wt;wt.Transport=us();wt.transports=vi;wt.parser=bn;wt.prototype.createTransport=function(r){Pt('creating transport "%s"',r);var o=fm(this.query);o.EIO=Nu.protocol,o.transport=r;var n=this.transportOptions[r]||{};this.id&&(o.sid=this.id);var s=new om[r]({query:o,socket:this,agent:n.agent||this.agent,hostname:n.hostname||this.hostname,port:n.port||this.port,secure:n.secure||this.secure,path:n.path||this.path,forceJSONP:n.forceJSONP||this.forceJSONP,jsonp:n.jsonp||this.jsonp,forceBase64:n.forceBase64||this.forceBase64,enablesXDR:n.enablesXDR||this.enablesXDR,withCredentials:n.withCredentials||this.withCredentials,timestampRequests:n.timestampRequests||this.timestampRequests,timestampParam:n.timestampParam||this.timestampParam,policyPort:n.policyPort||this.policyPort,pfx:n.pfx||this.pfx,key:n.key||this.key,passphrase:n.passphrase||this.passphrase,cert:n.cert||this.cert,ca:n.ca||this.ca,ciphers:n.ciphers||this.ciphers,rejectUnauthorized:n.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:n.perMessageDeflate||this.perMessageDeflate,extraHeaders:n.extraHeaders||this.extraHeaders,forceNode:n.forceNode||this.forceNode,localAddress:n.localAddress||this.localAddress,requestTimeout:n.requestTimeout||this.requestTimeout,protocols:n.protocols||void 0,isReactNative:this.isReactNative});return s};function fm(r){var o={};for(var n in r)r.hasOwnProperty(n)&&(o[n]=r[n]);return o}wt.prototype.open=function(){var r;if(this.rememberUpgrade&&wt.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)r="websocket";else if(this.transports.length===0){var o=this;setTimeout(function(){o.emit("error","No transports available")},0);return}else r=this.transports[0];this.readyState="opening";try{r=this.createTransport(r)}catch{this.transports.shift(),this.open();return}r.open(),this.setTransport(r)};wt.prototype.setTransport=function(r){Pt("setting transport %s",r.name);var o=this;this.transport&&(Pt("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=r,r.on("drain",function(){o.onDrain()}).on("packet",function(n){o.onPacket(n)}).on("error",function(n){o.onError(n)}).on("close",function(){o.onClose("transport close")})};wt.prototype.probe=function(r){Pt('probing transport "%s"',r);var o=this.createTransport(r,{probe:1}),n=!1,s=this;wt.priorWebsocketSuccess=!1;function c(){if(s.onlyBinaryUpgrades){var g=!this.supportsBinary&&s.transport.supportsBinary;n=n||g}n||(Pt('probe transport "%s" opened',r),o.send([{type:"ping",data:"probe"}]),o.once("packet",function(l){if(!n)if(l.type==="pong"&&l.data==="probe"){if(Pt('probe transport "%s" pong',r),s.upgrading=!0,s.emit("upgrading",o),!o)return;wt.priorWebsocketSuccess=o.name==="websocket",Pt('pausing current transport "%s"',s.transport.name),s.transport.pause(function(){n||s.readyState!=="closed"&&(Pt("changing transport and sending upgrade packet"),_(),s.setTransport(o),o.send([{type:"upgrade"}]),s.emit("upgrade",o),o=null,s.upgrading=!1,s.flush())})}else{Pt('probe transport "%s" failed',r);var u=new Error("probe error");u.transport=o.name,s.emit("upgradeError",u)}}))}function f(){n||(n=!0,_(),o.close(),o=null)}function v(g){var l=new Error("probe error: "+g);l.transport=o.name,f(),Pt('probe transport "%s" failed because of error: %s',r,g),s.emit("upgradeError",l)}function d(){v("transport closed")}function b(){v("socket closed")}function p(g){o&&g.name!==o.name&&(Pt('"%s" works - aborting "%s"',g.name,o.name),f())}function _(){o.removeListener("open",c),o.removeListener("error",v),o.removeListener("close",d),s.removeListener("close",b),s.removeListener("upgrading",p)}o.once("open",c),o.once("error",v),o.once("close",d),this.once("close",b),this.once("upgrading",p),o.open()};wt.prototype.onOpen=function(){if(Pt("socket open"),this.readyState="open",wt.priorWebsocketSuccess=this.transport.name==="websocket",this.emit("open"),this.flush(),this.readyState==="open"&&this.upgrade&&this.transport.pause){Pt("starting upgrade probes");for(var r=0,o=this.upgrades.length;r<o;r++)this.probe(this.upgrades[r])}};wt.prototype.onPacket=function(r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(Pt('socket receive: type "%s", data "%s"',r.type,r.data),this.emit("packet",r),this.emit("heartbeat"),r.type){case"open":this.onHandshake(JSON.parse(r.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var o=new Error("server error");o.code=r.data,this.onError(o);break;case"message":this.emit("data",r.data),this.emit("message",r.data);break}else Pt('packet received with socket readyState "%s"',this.readyState)};wt.prototype.onHandshake=function(r){this.emit("handshake",r),this.id=r.sid,this.transport.query.sid=r.sid,this.upgrades=this.filterUpgrades(r.upgrades),this.pingInterval=r.pingInterval,this.pingTimeout=r.pingTimeout,this.onOpen(),this.readyState!=="closed"&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))};wt.prototype.onHeartbeat=function(r){clearTimeout(this.pingTimeoutTimer);var o=this;o.pingTimeoutTimer=setTimeout(function(){o.readyState!=="closed"&&o.onClose("ping timeout")},r||o.pingInterval+o.pingTimeout)};wt.prototype.setPing=function(){var r=this;clearTimeout(r.pingIntervalTimer),r.pingIntervalTimer=setTimeout(function(){Pt("writing ping packet - expecting pong within %sms",r.pingTimeout),r.ping(),r.onHeartbeat(r.pingTimeout)},r.pingInterval)};wt.prototype.ping=function(){var r=this;this.sendPacket("ping",function(){r.emit("ping")})};wt.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emit("drain"):this.flush()};wt.prototype.flush=function(){this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(Pt("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))};wt.prototype.write=wt.prototype.send=function(r,o,n){return this.sendPacket("message",r,o,n),this};wt.prototype.sendPacket=function(r,o,n,s){if(typeof o=="function"&&(s=o,o=void 0),typeof n=="function"&&(s=n,n=null),!(this.readyState==="closing"||this.readyState==="closed")){n=n||{},n.compress=n.compress!==!1;var c={type:r,data:o,options:n};this.emit("packetCreate",c),this.writeBuffer.push(c),s&&this.once("flush",s),this.flush()}};wt.prototype.close=function(){if(this.readyState==="opening"||this.readyState==="open"){this.readyState="closing";var r=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?s():o()}):this.upgrading?s():o()}function o(){r.onClose("forced close"),Pt("socket closing - telling transport to close"),r.transport.close()}function n(){r.removeListener("upgrade",n),r.removeListener("upgradeError",n),o()}function s(){r.once("upgrade",n),r.once("upgradeError",n)}return this};wt.prototype.onError=function(r){Pt("socket error %j",r),wt.priorWebsocketSuccess=!1,this.emit("error",r),this.onClose("transport error",r)};wt.prototype.onClose=function(r,o){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){Pt('socket close with reason: "%s"',r);var n=this;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",r,o),n.writeBuffer=[],n.prevBufferLen=0}};wt.prototype.filterUpgrades=function(r){for(var o=[],n=0,s=r.length;n<s;n++)~am(this.transports,r[n])&&o.push(r[n]);return o};os.exports=um;os.exports.parser=bn;var hm=os.exports,Bu={exports:{}},lm=pm;function pm(r,o){var n=[];o=o||0;for(var s=o||0;s<r.length;s++)n[s-o]=r[s];return n}var Lu=dm;function dm(r,o,n){return r.on(o,n),{destroy:function(){r.removeListener(o,n)}}}var tu=[].slice,Uu=function(r,o){if(typeof o=="string"&&(o=r[o]),typeof o!="function")throw new Error("bind() requires a function");var n=tu.call(arguments,2);return function(){return o.apply(r,n.concat(tu.call(arguments)))}};(function(r,o){var n=gi,s=Wn,c=lm,f=Lu,v=Uu,d=je("socket.io-client:socket"),b=Hn,p=bu;r.exports=l;var _={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},g=s.prototype.emit;function l(u,w,A){this.io=u,this.nsp=w,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.flags={},A&&A.query&&(this.query=A.query),this.io.autoConnect&&this.open()}s(l.prototype),l.prototype.subEvents=function(){if(!this.subs){var u=this.io;this.subs=[f(u,"open",v(this,"onopen")),f(u,"packet",v(this,"onpacket")),f(u,"close",v(this,"onclose"))]}},l.prototype.open=l.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.reconnecting||this.io.open(),this.io.readyState==="open"&&this.onopen(),this.emit("connecting"),this)},l.prototype.send=function(){var u=c(arguments);return u.unshift("message"),this.emit.apply(this,u),this},l.prototype.emit=function(u){if(_.hasOwnProperty(u))return g.apply(this,arguments),this;var w=c(arguments),A={type:(this.flags.binary!==void 0?this.flags.binary:p(w))?n.BINARY_EVENT:n.EVENT,data:w};return A.options={},A.options.compress=!this.flags||this.flags.compress!==!1,typeof w[w.length-1]=="function"&&(d("emitting packet with ack id %d",this.ids),this.acks[this.ids]=w.pop(),A.id=this.ids++),this.connected?this.packet(A):this.sendBuffer.push(A),this.flags={},this},l.prototype.packet=function(u){u.nsp=this.nsp,this.io.packet(u)},l.prototype.onopen=function(){if(d("transport is open - connecting"),this.nsp!=="/")if(this.query){var u=typeof this.query=="object"?b.encode(this.query):this.query;d("sending connect packet with query %s",u),this.packet({type:n.CONNECT,query:u})}else this.packet({type:n.CONNECT})},l.prototype.onclose=function(u){d("close (%s)",u),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",u)},l.prototype.onpacket=function(u){var w=u.nsp===this.nsp,A=u.type===n.ERROR&&u.nsp==="/";if(!(!w&&!A))switch(u.type){case n.CONNECT:this.onconnect();break;case n.EVENT:this.onevent(u);break;case n.BINARY_EVENT:this.onevent(u);break;case n.ACK:this.onack(u);break;case n.BINARY_ACK:this.onack(u);break;case n.DISCONNECT:this.ondisconnect();break;case n.ERROR:this.emit("error",u.data);break}},l.prototype.onevent=function(u){var w=u.data||[];d("emitting event %j",w),u.id!=null&&(d("attaching ack callback to event"),w.push(this.ack(u.id))),this.connected?g.apply(this,w):this.receiveBuffer.push(w)},l.prototype.ack=function(u){var w=this,A=!1;return function(){if(!A){A=!0;var k=c(arguments);d("sending ack %j",k),w.packet({type:p(k)?n.BINARY_ACK:n.ACK,id:u,data:k})}}},l.prototype.onack=function(u){var w=this.acks[u.id];typeof w=="function"?(d("calling ack %s with %j",u.id,u.data),w.apply(this,u.data),delete this.acks[u.id]):d("bad ack %s",u.id)},l.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emitBuffered(),this.emit("connect")},l.prototype.emitBuffered=function(){var u;for(u=0;u<this.receiveBuffer.length;u++)g.apply(this,this.receiveBuffer[u]);for(this.receiveBuffer=[],u=0;u<this.sendBuffer.length;u++)this.packet(this.sendBuffer[u]);this.sendBuffer=[]},l.prototype.ondisconnect=function(){d("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},l.prototype.destroy=function(){if(this.subs){for(var u=0;u<this.subs.length;u++)this.subs[u].destroy();this.subs=null}this.io.destroy(this)},l.prototype.close=l.prototype.disconnect=function(){return this.connected&&(d("performing disconnect (%s)",this.nsp),this.packet({type:n.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},l.prototype.compress=function(u){return this.flags.compress=u,this},l.prototype.binary=function(u){return this.flags.binary=u,this}})(Bu);var Du=Bu.exports,gm=Xn;function Xn(r){r=r||{},this.ms=r.min||100,this.max=r.max||1e4,this.factor=r.factor||2,this.jitter=r.jitter>0&&r.jitter<=1?r.jitter:0,this.attempts=0}Xn.prototype.duration=function(){var r=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var o=Math.random(),n=Math.floor(o*this.jitter*r);r=Math.floor(o*10)&1?r+n:r-n}return Math.min(r,this.max)|0};Xn.prototype.reset=function(){this.attempts=0};Xn.prototype.setMin=function(r){this.ms=r};Xn.prototype.setMax=function(r){this.max=r};Xn.prototype.setJitter=function(r){this.jitter=r};var ym=hm,vm=Du,mm=Wn,_m=gi,an=Lu,Mn=Uu,Vt=je("socket.io-client:manager"),Pu=Iu,wm=gm,Fu=Object.prototype.hasOwnProperty,eu=bt;function bt(r,o){if(!(this instanceof bt))return new bt(r,o);r&&typeof r=="object"&&(o=r,r=void 0),o=o||{},o.path=o.path||"/socket.io",this.nsps={},this.subs=[],this.opts=o,this.reconnection(o.reconnection!==!1),this.reconnectionAttempts(o.reconnectionAttempts||1/0),this.reconnectionDelay(o.reconnectionDelay||1e3),this.reconnectionDelayMax(o.reconnectionDelayMax||5e3),this.randomizationFactor(o.randomizationFactor||.5),this.backoff=new wm({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(o.timeout==null?2e4:o.timeout),this.readyState="closed",this.uri=r,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var n=o.parser||_m;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this.autoConnect=o.autoConnect!==!1,this.autoConnect&&this.open()}bt.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var r in this.nsps)Fu.call(this.nsps,r)&&this.nsps[r].emit.apply(this.nsps[r],arguments)};bt.prototype.updateSocketIds=function(){for(var r in this.nsps)Fu.call(this.nsps,r)&&(this.nsps[r].id=this.generateId(r))};bt.prototype.generateId=function(r){return(r==="/"?"":r+"#")+this.engine.id};mm(bt.prototype);bt.prototype.reconnection=function(r){return arguments.length?(this._reconnection=!!r,this):this._reconnection};bt.prototype.reconnectionAttempts=function(r){return arguments.length?(this._reconnectionAttempts=r,this):this._reconnectionAttempts};bt.prototype.reconnectionDelay=function(r){return arguments.length?(this._reconnectionDelay=r,this.backoff&&this.backoff.setMin(r),this):this._reconnectionDelay};bt.prototype.randomizationFactor=function(r){return arguments.length?(this._randomizationFactor=r,this.backoff&&this.backoff.setJitter(r),this):this._randomizationFactor};bt.prototype.reconnectionDelayMax=function(r){return arguments.length?(this._reconnectionDelayMax=r,this.backoff&&this.backoff.setMax(r),this):this._reconnectionDelayMax};bt.prototype.timeout=function(r){return arguments.length?(this._timeout=r,this):this._timeout};bt.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()};bt.prototype.open=bt.prototype.connect=function(r,o){if(Vt("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;Vt("opening %s",this.uri),this.engine=ym(this.uri,this.opts);var n=this.engine,s=this;this.readyState="opening",this.skipReconnect=!1;var c=an(n,"open",function(){s.onopen(),r&&r()}),f=an(n,"error",function(b){if(Vt("connect_error"),s.cleanup(),s.readyState="closed",s.emitAll("connect_error",b),r){var p=new Error("Connection error");p.data=b,r(p)}else s.maybeReconnectOnOpen()});if(this._timeout!==!1){var v=this._timeout;Vt("connect attempt will timeout after %d",v),v===0&&c.destroy();var d=setTimeout(function(){Vt("connect attempt timed out after %d",v),c.destroy(),n.close(),n.emit("error","timeout"),s.emitAll("connect_timeout",v)},v);this.subs.push({destroy:function(){clearTimeout(d)}})}return this.subs.push(c),this.subs.push(f),this};bt.prototype.onopen=function(){Vt("open"),this.cleanup(),this.readyState="open",this.emit("open");var r=this.engine;this.subs.push(an(r,"data",Mn(this,"ondata"))),this.subs.push(an(r,"ping",Mn(this,"onping"))),this.subs.push(an(r,"pong",Mn(this,"onpong"))),this.subs.push(an(r,"error",Mn(this,"onerror"))),this.subs.push(an(r,"close",Mn(this,"onclose"))),this.subs.push(an(this.decoder,"decoded",Mn(this,"ondecoded")))};bt.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")};bt.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)};bt.prototype.ondata=function(r){this.decoder.add(r)};bt.prototype.ondecoded=function(r){this.emit("packet",r)};bt.prototype.onerror=function(r){Vt("error",r),this.emitAll("error",r)};bt.prototype.socket=function(r,o){var n=this.nsps[r];if(!n){n=new vm(this,r,o),this.nsps[r]=n;var s=this;n.on("connecting",c),n.on("connect",function(){n.id=s.generateId(r)}),this.autoConnect&&c()}function c(){~Pu(s.connecting,n)||s.connecting.push(n)}return n};bt.prototype.destroy=function(r){var o=Pu(this.connecting,r);~o&&this.connecting.splice(o,1),!this.connecting.length&&this.close()};bt.prototype.packet=function(r){Vt("writing packet %j",r);var o=this;r.query&&r.type===0&&(r.nsp+="?"+r.query),o.encoding?o.packetBuffer.push(r):(o.encoding=!0,this.encoder.encode(r,function(n){for(var s=0;s<n.length;s++)o.engine.write(n[s],r.options);o.encoding=!1,o.processPacketQueue()}))};bt.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var r=this.packetBuffer.shift();this.packet(r)}};bt.prototype.cleanup=function(){Vt("cleanup");for(var r=this.subs.length,o=0;o<r;o++){var n=this.subs.shift();n.destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()};bt.prototype.close=bt.prototype.disconnect=function(){Vt("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,this.readyState==="opening"&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()};bt.prototype.onclose=function(r){Vt("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",r),this._reconnection&&!this.skipReconnect&&this.reconnect()};bt.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var r=this;if(this.backoff.attempts>=this._reconnectionAttempts)Vt("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var o=this.backoff.duration();Vt("will wait %dms before reconnect attempt",o),this.reconnecting=!0;var n=setTimeout(function(){r.skipReconnect||(Vt("attempting reconnect"),r.emitAll("reconnect_attempt",r.backoff.attempts),r.emitAll("reconnecting",r.backoff.attempts),!r.skipReconnect&&r.open(function(s){s?(Vt("reconnect attempt error"),r.reconnecting=!1,r.reconnect(),r.emitAll("reconnect_error",s.data)):(Vt("reconnect success"),r.onreconnect())}))},o);this.subs.push({destroy:function(){clearTimeout(n)}})}};bt.prototype.onreconnect=function(){var r=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",r)};(function(r,o){var n=t0,s=gi,c=eu,f=je("socket.io-client");r.exports=o=d;var v=o.managers={};function d(b,p){typeof b=="object"&&(p=b,b=void 0),p=p||{};var _=n(b),g=_.source,l=_.id,u=_.path,w=v[l]&&u in v[l].nsps,A=p.forceNew||p["force new connection"]||p.multiplex===!1||w,k;return A?(f("ignoring socket cache for %s",g),k=c(g,p)):(v[l]||(f("new io instance for %s",g),v[l]=c(g,p)),k=v[l]),_.query&&!p.query&&(p.query=_.query),k.socket(_.path,p)}o.protocol=s.protocol,o.connect=d,o.Manager=eu,o.Socket=Du})(Jo,Jo.exports);var bm=Jo.exports;const Cm=Wv(bm);let ci;const Sm=new Uint8Array(16);function km(){if(!ci&&(ci=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ci))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ci(Sm)}const Xt=[];for(let r=0;r<256;++r)Xt.push((r+256).toString(16).slice(1));function Am(r,o=0){return Xt[r[o+0]]+Xt[r[o+1]]+Xt[r[o+2]]+Xt[r[o+3]]+"-"+Xt[r[o+4]]+Xt[r[o+5]]+"-"+Xt[r[o+6]]+Xt[r[o+7]]+"-"+Xt[r[o+8]]+Xt[r[o+9]]+"-"+Xt[r[o+10]]+Xt[r[o+11]]+Xt[r[o+12]]+Xt[r[o+13]]+Xt[r[o+14]]+Xt[r[o+15]]}const xm=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),nu={randomUUID:xm};function Em(r,o,n){if(nu.randomUUID&&!o&&!r)return nu.randomUUID();r=r||{};const s=r.random||(r.rng||km)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,o){n=n||0;for(let c=0;c<16;++c)o[n+c]=s[c];return o}return Am(s)}function Tm(r){return!!r&&(typeof r=="object"||typeof r=="function")&&typeof r.then=="function"}function Rm(r,o){const n=o.map(c=>JSON.stringify(c)).join(" "),s=new Date().toISOString();return JSON.stringify({level:r,time:s,message:n})}function Om(r){const o=r[0],n=r.slice(1);return{level:o,logs:n}}function Im(r,o){const n=JSON.parse(r);return o.forEach(s=>delete n[s]),n}const Nm={reconnection:!0,reconnectionDelay:5e3,reconnectionAttempts:10,upgrade:!1,transports:["websocket"],debug:!1},Xo={logToConsole:!0,overloadGlobalConsole:!1,socketEmitInterval:6e4};let ae=console;class ru{constructor(o){Ht(this,"logToConsole"),Ht(this,"overloadGlobalConsole"),Ht(this,"namespace"),Ht(this,"socketEmitInterval"),Ht(this,"storageId"),Ht(this,"emitInProgress"),Ht(this,"queue"),Ht(this,"processing"),Ht(this,"interval"),Ht(this,"logIndex"),Ht(this,"socket"),Ht(this,"getItem"),Ht(this,"setItem"),Ht(this,"parseLog"),Ht(this,"_logMethod"),Ht(this,"_warnMethod"),Ht(this,"_errorMethod"),Ht(this,"_debugMethod");const{loggerOptions:n}=o;if(!n.namespace)throw new Error("Config property 'namespace' should be provided!");this.setupStorageFunctions(n.getItem,n.setItem,n.parseLog),this.namespace=n.namespace,this.socketEmitInterval=n.socketEmitInterval||Xo.socketEmitInterval,this.logToConsole=n.logToConsole!==void 0?n.logToConsole:Xo.logToConsole,this.overloadGlobalConsole=n.overloadGlobalConsole!==void 0?n.overloadGlobalConsole:Xo.overloadGlobalConsole,this.storageId=this.getStorageName(),this.queue=[],this.processing=!1,this.emitInProgress=!1,this.logIndex=0,this.init(o)}setupStorageFunctions(o,n,s){this.getItem=o&&typeof o=="function"?this.promisifyStorageFunction(o):this.defaultGetItemFunction,this.setItem=n&&typeof n=="function"?this.promisifyStorageFunction(n):this.defaultSetItemFunction,this.parseLog=s&&typeof s=="function"?s:Rm}promisifyStorageFunction(o){const n=o("");return Tm(n)?o:async(...s)=>new Promise((c,f)=>{try{const v=o(...s);c(v)}catch(v){f(v)}})}init(o){const{socket:n,url:s,socketOptions:c={}}=o;this._logMethod=ae.log.bind(ae),this._warnMethod=ae.warn.bind(ae),this._errorMethod=ae.error.bind(ae),this._debugMethod=ae.debug.bind(ae),this.initStorage().then(()=>{if(n)this.socket=n;else if(s)this.socket=this.createConnection(s,c);else throw new Error("Must provide either a 'socket' or a 'url' for socket connection");this.interval=setInterval(async()=>{await this.emitLogs()},this.socketEmitInterval),this.overloadGlobalConsole&&this._overloadConsole()})}createConnection(o,n={}){const s={...Nm,...n};return Cm(o,s)}async emitLogs(){if(!this.emitInProgress)try{const o=await this.getItem(this.storageId);if(!o)return;let n=[];this.emitInProgress=!0;const s=JSON.parse(o);let c=Object.keys(s);if(!c.length)return;if(!this.socket||!this.socket.connected)throw new Error("Socket is disconnected");for(const d of c)await this.socket.emit("Log",s[d]),n.push(d);const f=await this.getItem(this.storageId);if(!f)return;const v=Im(f,n);await this.setItem(this.storageId,JSON.stringify(v))}catch(o){this._errorMethod(o)}finally{this.emitInProgress=!1}}disconnectSocket(){!this.socket||!this.interval||(this.socket.disconnect(),clearInterval(this.interval))}_overloadConsole(){const o=this;ae=Object.assign(ae,{log:function(){o.log(...arguments)},warn:function(){o.warn(...arguments)},error:function(){o.error(...arguments)},debug:function(){o.debug(...arguments)}})}async initStorage(){const o=await this.getItem(this.storageId);(!o||typeof o!="string")&&await this.setItem(this.storageId,JSON.stringify({}))}async resetStorage(){await this.setItem(this.storageId,JSON.stringify({}))}getStorageName(){const o=Em();return this.namespace.toString().toUpperCase()+o+Date.now()}async processLog(...o){try{if(o.length<2)return;const n=await this.getItem(this.storageId);if(!n)return;const{level:s,logs:c}=Om(o),f=JSON.parse(n),v=this.formItemKey(s);f[v]=this.parseLog(s,c),await this.setItem(this.storageId,JSON.stringify(f))}catch(n){this._errorMethod(n)}}async processQueue(){if(this.processing||this.queue.length===0)return;this.processing=!0;const o=this.queue.shift();await this.processLog(...o).finally(()=>{this.processing=!1,this.processQueue()})}log(...o){const n=["INFO",...o];this.queue.push(n),this.logToConsole&&this._logMethod.apply(ae,o),this.processQueue()}warn(...o){const n=["WARN",...o];this.queue.push(n),this.logToConsole&&this._warnMethod.apply(ae,o),this.processQueue()}error(...o){const n=["ERROR",...o];this.queue.push(n),this.logToConsole&&this._errorMethod.apply(ae,o),this.processQueue()}debug(...o){const n=["DEBUG",...o];this.queue.push(n),this.logToConsole&&this._debugMethod.apply(ae,o),this.processQueue()}async defaultGetItemFunction(o){return localStorage.getItem(o)}async defaultSetItemFunction(o,n){try{localStorage.setItem(o,n)}catch(s){this._errorMethod(s)}}formItemKey(o){const n=new Date().toISOString();return this.logIndex++,`${o}-${this.namespace}-${n}-${this.logIndex}`}}class Bm{constructor(o){St(this,"io");St(this,"storageLogger");this.eventsSdkClass=o,this.eventsSdkClass=o}init(){this.eventsSdkClass.options.useLogger&&(this.eventsSdkClass.options.loggerSocketConnection?this.io=this.eventsSdkClass.options.loggerSocketConnection:this.eventsSdkClass.socketIoClass.ioFunction&&(this.io=this.eventsSdkClass.socketIoClass.ioFunction(this.eventsSdkClass.options.loggerServer,this.eventsSdkClass.options.loggerConnectOptions)),this.io?this.storageLogger=new ru({socket:this.io,loggerOptions:this.eventsSdkClass.options.loggerConfig}):this.storageLogger=new ru({url:this.eventsSdkClass.options.loggerServer,socketOptions:this.eventsSdkClass.options.loggerConnectOptions,loggerOptions:this.eventsSdkClass.options.loggerConfig}))}log(o,n,...s){const c=[n,...s];this.storageLogger?o===Yt.INFO?this.storageLogger.log(c):o===Yt.ERROR&&this.storageLogger.error(c):o===Yt.INFO?console.log(c):o===Yt.ERROR&&console.error(c)}}class Lm{constructor(o){St(this,"listeners",{[lt.ALL_EXTENSION_STATUS]:[],[lt.ALL_DIALER_STATUS]:[],[lt.ALL_USERS_STATUS]:[],[lt.QUEUE_EVENT]:[],[lt.EXTENSION_EVENT]:[],[lt.DIALER_EVENT]:[],[lt.LOGIN_SUCCESS]:[],[lt.LOGIN_STATUS]:[],[lt.KEEP_ALIVE_RESPONSE]:[],[lt.ONLINE_STATUS_EVENT]:[],[lt.EXTENSIONS_UPDATED]:[]});St(this,"allListeners",[]);this.eventsSdkClass=o,this.eventsSdkClass=o}on(o,n){o==="*"?this.allListeners.push(n):this.listeners[o].push(n)}off(o,n){if(o==="*")this.allListeners=this.allListeners.filter(s=>s!==n);else{const c=this.listeners[o].filter(f=>f!==n);this.listeners={...this.listeners,[o]:c}}}emit(o,n){this.eventsSdkClass.socketIoClass.lastEventTimestamp=new Date().getTime(),this.listeners[o].forEach(c=>c({name:o,data:n}));const s={name:o,data:n};this.allListeners.forEach(c=>c(s))}}class Um{constructor(o){St(this,"argumentOptions");St(this,"options");St(this,"servers",[]);St(this,"URLList",[]);St(this,"server");St(this,"URL");St(this,"socket");St(this,"mainServer");St(this,"alreadyAttemptedOtherServers",[]);St(this,"authClass",new Ev(this));St(this,"socketIoClass",new Fv(this));St(this,"loggerClass",new Bm(this));St(this,"eventEmitterClass",new Lm(this));St(this,"reconnectOptions");St(this,"retryConnection");this.options={...Rv,...o},this.reconnectOptions={retryCount:1,maxReconnectAttempts:this.options.maxReconnectAttempts,reconnectionDelay:this.options.reconnectionDelay,minReconnectionDelay:this.options.reconnectionDelay,maxReconnectionDelay:6e4*5},this.server=this.options.fallbackServer,this.retryConnection=Tv.debounce(this.connect.bind(this),this.reconnectOptions.reconnectionDelay,{leading:!0,trailing:!1}),this.argumentOptions={...o}}on(o,n){this.eventEmitterClass.on(o,n)}emit(o,n){this.socketIoClass.io&&this.socketIoClass.io.emit(o,n)}connect(o){o===wn.MAIN&&this.findMainServer(),o===wn.NEXT&&this.findNextServer(),this.socketIoClass.doReconnect=!0,this.socketIoClass.initSocketConnection(),this.socketIoClass.initSocketEvents(),this.socketIoClass.initKeepAlive(),this.loggerClass.init()}disconnect(){this.socketIoClass.doReconnect=!1,this.socketIoClass.closeAllConnections()}clearKeepAliveInterval(){this.socketIoClass.clearKeepAliveInterval()}findMainServer(){this.servers.length?(this.mainServer=this.servers.reduce((o,n)=>n.Priority>o.Priority?n:o),this.server=this.mainServer):this.URLList.length&&(this.URL=this.URLList[0])}findNextServer(){if(this.servers.length)if(this.server.Priority===this.mainServer.Priority){let o=this.servers.filter(n=>n.Priority!==this.mainServer.Priority&&this.alreadyAttemptedOtherServers.indexOf(n.Priority)+1===0);o.length||(this.alreadyAttemptedOtherServers=[],o=this.servers.filter(n=>n.Priority!==this.mainServer.Priority&&this.alreadyAttemptedOtherServers.indexOf(n.Priority)+1===0)),o.length&&(this.server=o.reduce((n,s)=>s.Priority>n.Priority?s:n),this.alreadyAttemptedOtherServers.push(this.server.Priority))}else this.server=this.mainServer;else if(this.URLList.length)if(this.URL===this.URLList[0]){let o=this.URLList.filter(n=>n!==this.URLList[0]&&this.alreadyAttemptedOtherServers.indexOf(n)+1===0);o.length||(this.alreadyAttemptedOtherServers=[],o=this.URLList.filter(n=>n!==this.URLList[0]&&this.alreadyAttemptedOtherServers.indexOf(n)+1===0)),o.length&&(this.URL=o[0],this.alreadyAttemptedOtherServers.push(this.URL))}else this.URL=this.URLList[0]}async init(){return this.socket,await this.authClass.login(this.options),this.getServers(),!0}getServers(){this.options.serverFetchStrategy==="static"&&this.argumentOptions.servers&&Array.isArray(this.argumentOptions.servers)&&this.argumentOptions.servers.length>1&&(this.servers=this.argumentOptions.servers)}}exports.CallStatusEnum=cu;exports.CallTypeEnum=uu;exports.DialerTypeEnum=fu;exports.DirectionEnum=hu;exports.DoNotCallMeStatusCodeEnum=lu;exports.EventsEnum=lt;exports.ExtensionEventReasonEnum=ns;exports.ExtensionHangupCauseEnum=pu;exports.QueueEventReasonEnum=du;exports.default=Um;
|
|
37
|
+
]`&&P(new Date(-864e13))=='"-271821-04-20T00:00:00.000Z"'&&P(new Date(864e13))=='"+275760-09-13T00:00:00.000Z"'&&P(new Date(-621987552e5))=='"-000001-01-01T00:00:00.000Z"'&&P(new Date(-1))=='"1969-12-31T23:59:59.999Z"'}catch{Z=!1}}J=Z}if(q=="json-parse"){var tt=_.parse;if(typeof tt=="function")try{if(tt("0")===0&&!tt(!1)){F=tt(et);var z=F.a.length==5&&F.a[0]===1;if(z){try{z=!tt('" "')}catch{}if(z)try{z=tt("01")!==1}catch{}if(z)try{z=tt("1.")!==1}catch{}}}}catch{z=!1}J=z}}return u[q]=!!J}var h,m,g,S={}.toString,v=typeof JSON=="object"&&JSON,_=typeof n=="object"&&n&&!n.nodeType&&n;_&&v?(_.stringify=v.stringify,_.parse=v.parse):_=s.JSON=v||{};var y=new Date(-0xc782b5b800cec);try{y=y.getUTCFullYear()==-109252&&y.getUTCMonth()===0&&y.getUTCDate()===1&&y.getUTCHours()==10&&y.getUTCMinutes()==37&&y.getUTCSeconds()==6&&y.getUTCMilliseconds()==708}catch{}if(!u("json")){var l="[object Function]",f="[object Date]",b="[object Number]",E="[object String]",x="[object Array]",W="[object Boolean]",st=u("bug-string-char-index");if(!y)var V=Math.floor,ot=[0,31,59,90,120,151,181,212,243,273,304,334],$=function(q,J){return ot[J]+365*(q-1970)+V((q-1969+(J=+(J>1)))/4)-V((q-1901+J)/100)+V((q-1601+J)/400)};(h={}.hasOwnProperty)||(h=function(q){var J,F={};return(F.__proto__=null,F.__proto__={toString:1},F).toString!=S?h=function(et){var P=this.__proto__,Z=et in(this.__proto__=null,this);return this.__proto__=P,Z}:(J=F.constructor,h=function(et){var P=(this.constructor||J).prototype;return et in this&&!(et in P&&this[et]===P[et])}),F=null,h.call(this,q)});var D={boolean:1,number:1,string:1,undefined:1},M=function(q,J){var F=typeof q[J];return F=="object"?!!q[J]:!D[F]};if(m=function(q,J){var F,et,P,Z=0;(F=function(){this.valueOf=0}).prototype.valueOf=0,et=new F;for(P in et)h.call(et,P)&&Z++;return F=et=null,Z?m=Z==2?function(tt,z){var at,bt={},Gt=S.call(tt)==l;for(at in tt)Gt&&at=="prototype"||h.call(bt,at)||!(bt[at]=1)||!h.call(tt,at)||z(at)}:function(tt,z){var at,bt,Gt=S.call(tt)==l;for(at in tt)Gt&&at=="prototype"||!h.call(tt,at)||(bt=at==="constructor")||z(at);(bt||h.call(tt,at="constructor"))&&z(at)}:(et=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],m=function(tt,z){var at,bt,Gt=S.call(tt)==l,Rt=!Gt&&typeof tt.constructor!="function"&&M(tt,"hasOwnProperty")?tt.hasOwnProperty:h;for(at in tt)Gt&&at=="prototype"||!Rt.call(tt,at)||z(at);for(bt=et.length;at=et[--bt];Rt.call(tt,at)&&z(at));}),m(q,J)},!u("json-stringify")){var H={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},L="000000",U=function(q,J){return(L+(J||0)).slice(-q)},X="\\u00",Q=function(q){var J,F='"',et=0,P=q.length,Z=P>10&&st;for(Z&&(J=q.split(""));P>et;et++){var tt=q.charCodeAt(et);switch(tt){case 8:case 9:case 10:case 12:case 13:case 34:case 92:F+=H[tt];break;default:if(32>tt){F+=X+U(2,tt.toString(16));break}F+=Z?J[et]:st?q.charAt(et):q[et]}}return F+'"'},j=function(q,J,F,et,P,Z,tt){var z,at,bt,Gt,Rt,Se,Ln,oe,dn,Nn,Vt,Yt,Oe,Re,Bn,De;try{z=J[q]}catch{}if(typeof z=="object"&&z)if(at=S.call(z),at!=f||h.call(z,"toJSON"))typeof z.toJSON=="function"&&(at!=b&&at!=E&&at!=x||h.call(z,"toJSON"))&&(z=z.toJSON(q));else if(z>-1/0&&1/0>z){if($){for(Rt=V(z/864e5),bt=V(Rt/365.2425)+1970-1;$(bt+1,0)<=Rt;bt++);for(Gt=V((Rt-$(bt,0))/30.42);$(bt,Gt+1)<=Rt;Gt++);Rt=1+Rt-$(bt,Gt),Se=(z%864e5+864e5)%864e5,Ln=V(Se/36e5)%24,oe=V(Se/6e4)%60,dn=V(Se/1e3)%60,Nn=Se%1e3}else bt=z.getUTCFullYear(),Gt=z.getUTCMonth(),Rt=z.getUTCDate(),Ln=z.getUTCHours(),oe=z.getUTCMinutes(),dn=z.getUTCSeconds(),Nn=z.getUTCMilliseconds();z=(0>=bt||bt>=1e4?(0>bt?"-":"+")+U(6,0>bt?-bt:bt):U(4,bt))+"-"+U(2,Gt+1)+"-"+U(2,Rt)+"T"+U(2,Ln)+":"+U(2,oe)+":"+U(2,dn)+"."+U(3,Nn)+"Z"}else z=null;if(F&&(z=F.call(J,q,z)),z===null)return"null";if(at=S.call(z),at==W)return""+z;if(at==b)return z>-1/0&&1/0>z?""+z:"null";if(at==E)return Q(""+z);if(typeof z=="object"){for(Re=tt.length;Re--;)if(tt[Re]===z)throw TypeError();if(tt.push(z),Vt=[],Bn=Z,Z+=P,at==x){for(Oe=0,Re=z.length;Re>Oe;Oe++)Yt=j(Oe,z,F,et,P,Z,tt),Vt.push(Yt===g?"null":Yt);De=Vt.length?P?`[
|
|
38
|
+
`+Z+Vt.join(`,
|
|
39
|
+
`+Z)+`
|
|
40
|
+
`+Bn+"]":"["+Vt.join(",")+"]":"[]"}else m(et||z,function(Un){var Xe=j(Un,z,F,et,P,Z,tt);Xe!==g&&Vt.push(Q(Un)+":"+(P?" ":"")+Xe)}),De=Vt.length?P?`{
|
|
41
|
+
`+Z+Vt.join(`,
|
|
42
|
+
`+Z)+`
|
|
43
|
+
`+Bn+"}":"{"+Vt.join(",")+"}":"{}";return tt.pop(),De}};_.stringify=function(q,J,F){var et,P,Z,tt;if(typeof J=="function"||typeof J=="object"&&J){if((tt=S.call(J))==l)P=J;else if(tt==x){Z={};for(var z,at=0,bt=J.length;bt>at;z=J[at++],tt=S.call(z),(tt==E||tt==b)&&(Z[z]=1));}}if(F)if((tt=S.call(F))==b){if((F-=F%1)>0)for(et="",F>10&&(F=10);et.length<F;et+=" ");}else tt==E&&(et=F.length<=10?F:F.slice(0,10));return j("",(z={},z[""]=q,z),P,Z,et,"",[])}}if(!u("json-parse")){var B,kt,At=String.fromCharCode,Ot={92:"\\",34:'"',47:"/",98:"\b",116:" ",110:`
|
|
44
|
+
`,102:"\f",114:"\r"},ut=function(){throw B=kt=null,SyntaxError()},$t=function(){for(var q,J,F,et,P,Z=kt,tt=Z.length;tt>B;)switch(P=Z.charCodeAt(B)){case 9:case 10:case 13:case 32:B++;break;case 123:case 125:case 91:case 93:case 58:case 44:return q=st?Z.charAt(B):Z[B],B++,q;case 34:for(q="@",B++;tt>B;)if(P=Z.charCodeAt(B),32>P)ut();else if(P==92)switch(P=Z.charCodeAt(++B)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:q+=Ot[P],B++;break;case 117:for(J=++B,F=B+4;F>B;B++)P=Z.charCodeAt(B),P>=48&&57>=P||P>=97&&102>=P||P>=65&&70>=P||ut();q+=At("0x"+Z.slice(J,B));break;default:ut()}else{if(P==34)break;for(P=Z.charCodeAt(B),J=B;P>=32&&P!=92&&P!=34;)P=Z.charCodeAt(++B);q+=Z.slice(J,B)}if(Z.charCodeAt(B)==34)return B++,q;ut();default:if(J=B,P==45&&(et=!0,P=Z.charCodeAt(++B)),P>=48&&57>=P){for(P==48&&(P=Z.charCodeAt(B+1),P>=48&&57>=P)&&ut(),et=!1;tt>B&&(P=Z.charCodeAt(B),P>=48&&57>=P);B++);if(Z.charCodeAt(B)==46){for(F=++B;tt>F&&(P=Z.charCodeAt(F),P>=48&&57>=P);F++);F==B&&ut(),B=F}if(P=Z.charCodeAt(B),P==101||P==69){for(P=Z.charCodeAt(++B),(P==43||P==45)&&B++,F=B;tt>F&&(P=Z.charCodeAt(F),P>=48&&57>=P);F++);F==B&&ut(),B=F}return+Z.slice(J,B)}if(et&&ut(),Z.slice(B,B+4)=="true")return B+=4,!0;if(Z.slice(B,B+5)=="false")return B+=5,!1;if(Z.slice(B,B+4)=="null")return B+=4,null;ut()}return"$"},xe=function(q){var J,F;if(q=="$"&&ut(),typeof q=="string"){if((st?q.charAt(0):q[0])=="@")return q.slice(1);if(q=="["){for(J=[];q=$t(),q!="]";F||(F=!0))F&&(q==","?(q=$t(),q=="]"&&ut()):ut()),q==","&&ut(),J.push(xe(q));return J}if(q=="{"){for(J={};q=$t(),q!="}";F||(F=!0))F&&(q==","?(q=$t(),q=="}"&&ut()):ut()),(q==","||typeof q!="string"||(st?q.charAt(0):q[0])!="@"||$t()!=":")&&ut(),J[q.slice(1)]=xe($t());return J}ut()}return q},se=function(q,J,F){var et=er(q,J,F);et===g?delete q[J]:q[J]=et},er=function(q,J,F){var et,P=q[J];if(typeof P=="object"&&P)if(S.call(P)==x)for(et=P.length;et--;)se(P,et,F);else m(P,function(Z){se(P,Z,F)});return F.call(q,J,P)};_.parse=function(q,J){var F,et;return B=0,kt=""+q,F=xe($t()),$t()!="$"&&ut(),B=kt=null,J&&S.call(J)==l?er((et={},et[""]=F,et),"",J):F}}}})(this)},{}],48:[function(a,i){function n(s,u){var h=[];u=u||0;for(var m=u||0;m<s.length;m++)h[m-u]=s[m];return h}i.exports=n},{}]},{},[1])(1)}const qv=Object.freeze(Object.defineProperty({__proto__:null,default:Mv},Symbol.toStringTag,{value:"Module"})),Wv=Object.assign({"./v1_3_7.js":qv}),Kv=/v\d+_\d+_\d+/;function Hv(a){return typeof a=="function"}const As=Object.entries(Wv).reduce((a,i)=>{var u;const n=i[1].default,s=(u=i[0].match(Kv))==null?void 0:u[0];return Hv(n)&&s&&(a[s]=n()),a},{}),Lu=a=>{if(a in As)return As[a];throw new Error(`Socket version ${a} not found`)},$v=(a,...i)=>Lu(a)(...i),Gv={...As,getSocketVersion:Lu,makeSocketVersion:$v};var lt=(a=>(a.ALL_DIALER_STATUS="AllDialersStatus",a.ALL_EXTENSION_STATUS="AllExtensionsStatus",a.ALL_USERS_STATUS="AllUsersStatus",a.CONNECT="connect",a.DISCONNECT="disconnect",a.CONNECT_ERROR_EVENT="connect_error",a.EXTENSION_EVENT="ExtensionEvent",a.KEEP_ALIVE="keepalive",a.KEEP_ALIVE_RESPONSE="keepaliveResponse",a.LOGIN_STATUS="loginStatus",a.LOGIN_SUCCESS="loginSuccess",a.QUEUE_EVENT="QueueEvent",a.ONLINE_STATUS_EVENT="onlineStatusEvent",a.DIALER_EVENT="DialerEvent",a.EXTENSIONS_UPDATED="ExtensionsUpdated",a))(lt||{}),Nu=(a=>(a.NEWCALL="NEWCALL",a.ANSWER="ANSWER",a.HOLD="HOLD",a.UNHOLD="UNHOLD",a.HANGUP="HANGUP",a.USER_STATUS_UPDATE="userStatusUpdate",a))(Nu||{});class vu{static mapExtensionEvent(i){const n=i.reason;let s,u;return i.data.currentCall&&(u=this.configureUTCForObject(i.data.currentCall,["callAnswered","callStarted"],i.servertime,i.servertimeoffset)),n===Nu.HANGUP?s={...i,reason:n,data:{...i.data,currentCall:u?{...u,duration:Date.now()-((u==null?void 0:u.callAnswered_UTC_CLIENT)??0)}:void 0}}:s={...i,data:{...i.data,currentCall:u},reason:n},s}static mapAllExtensionStatus(i){return{...i,extensions:i.extensions.map(n=>({...n,currentCall:n.currentCall?this.configureUTCForObject(n.currentCall,["callAnswered","callStarted"],i.servertime,i.servertimeoffset):void 0}))}}static assignProperty(i,n,s){i[n]=s}static configureUTCForObject(i,n,s,u){const h=(s-u*60)*1e3,m=Date.now()-h,g={};return n.forEach(S=>{const v=i[S];if(console.log("####################"),console.log("property",S),console.log("value",v),console.log("####################"),v===0)this.assignProperty(g,`${S}_UTC`,0),this.assignProperty(g,`${S}_UTC_CLIENT`,0);else{const _=(v-u*60)*1e3;this.assignProperty(g,`${S}_UTC`,_),this.assignProperty(g,`${S}_UTC_CLIENT`,_+m)}}),{...i,...g}}}var Ls=(a=>(a.UPDATE_MONITORED_EXTENSIONS="updateMonitoredExtensions",a.KEEP_ALIVE="keepAlive",a))(Ls||{});class zv{constructor(i){wt(this,"io");wt(this,"ioFunction");wt(this,"lastEventTimestamp",new Date().getTime());wt(this,"doReconnect",!0);wt(this,"keepAliveInterval");wt(this,"keepReconnectInterval");wt(this,"connected",!1);this.eventsSdkClass=i,this.eventsSdkClass=i}getSocketIoFunction(i){const n=i.split("v="),s="v".concat(n[n.length-1]).replaceAll(".","_");this.ioFunction=Gv.getSocketVersion(s)}initSocketConnection(){const i=this.eventsSdkClass.authClass.token,n=this.eventsSdkClass.options.protocol,s=this.eventsSdkClass.server;try{const u=s?s.Domain:this.eventsSdkClass.URL,h=s?`${n}://${u}`:this.eventsSdkClass.URL;this.eventsSdkClass.loggerClass.log(Jt.INFO,"Connecting to..",h),this.eventsSdkClass.eventEmitterClass.emit(lt.ONLINE_STATUS_EVENT,{isSocketConnected:!1,attemptToConnect:h});const m={reconnection:!1,upgrade:!1,transports:["websocket"],forceNew:!0,query:{token:i},timeout:this.eventsSdkClass.options.timeout};if(i&&(m.query={token:i}),this.ioFunction&&h)this.io=this.ioFunction(h,m);else throw new Error("Socket server url no defined")}catch(u){this.eventsSdkClass.loggerClass.log(Jt.ERROR,"init socket connection error",u)}}clearKeepAliveInterval(){this.keepAliveInterval&&clearInterval(this.keepAliveInterval)}initKeepAlive(){this.clearKeepAliveInterval(),this.keepAliveInterval=setInterval(async()=>{if(new Date().getTime()>this.lastEventTimestamp+this.eventsSdkClass.options.keepAliveTimeout&&this.io&&this.eventsSdkClass.authClass.token){this.eventsSdkClass.emit(Ls.KEEP_ALIVE,this.eventsSdkClass.authClass.token),this.eventsSdkClass.loggerClass.log(Jt.INFO,`EMIT -> ${lt.KEEP_ALIVE}`,this.eventsSdkClass.authClass.token);return}},this.eventsSdkClass.options.keepAliveTimeout)}closeAllConnections(){var i;this.io&&(this.io.close(),(i=this.io)==null||i.disconnect(),this.io=void 0),Qn.clearSessionStorage()}initSocketEvents(){this.io&&this.io.on(lt.LOGIN_SUCCESS,i=>this.onLoginSuccessEvent(i)).on(lt.QUEUE_EVENT,i=>this.onQueueEvent(i)).on(lt.EXTENSION_EVENT,i=>this.onExtensionEvent(i)).on(lt.DIALER_EVENT,i=>this.onDialerEvent(i)).on(lt.LOGIN_STATUS,i=>this.onLoginStatusEvent(i)).on(lt.ALL_EXTENSION_STATUS,i=>this.onAllExtensionStatus(i)).on(lt.ALL_DIALER_STATUS,i=>this.onAllDialerStatus(i)).on(lt.KEEP_ALIVE_RESPONSE,i=>this.onKeepAliveResponse(i)).on(lt.EXTENSIONS_UPDATED,i=>this.onExtensionsUpdatedEvent(i)).on(lt.CONNECT,()=>this.onConnect()).on(lt.DISCONNECT,i=>this.onDisconnect(i)).on(lt.CONNECT_ERROR_EVENT,i=>this.onConnectError(i))}onLoginSuccessEvent(i){this.eventsSdkClass.eventEmitterClass.emit(lt.LOGIN_SUCCESS,i)}onQueueEvent(i){this.eventsSdkClass.eventEmitterClass.emit(lt.QUEUE_EVENT,i)}onExtensionEvent(i){const n=vu.mapExtensionEvent(i);n&&this.eventsSdkClass.eventEmitterClass.emit(lt.EXTENSION_EVENT,n)}onDialerEvent(i){this.eventsSdkClass.eventEmitterClass.emit(lt.DIALER_EVENT,i)}onLoginStatusEvent(i){this.eventsSdkClass.eventEmitterClass.emit(lt.LOGIN_STATUS,i)}onAllExtensionStatus(i){const n=vu.mapAllExtensionStatus(i);this.eventsSdkClass.eventEmitterClass.emit(lt.ALL_EXTENSION_STATUS,n)}onAllDialerStatus(i){this.eventsSdkClass.eventEmitterClass.emit(lt.ALL_DIALER_STATUS,i)}onKeepAliveResponse(i){if(this.eventsSdkClass.loggerClass.log(Jt.INFO,lt.KEEP_ALIVE_RESPONSE),i.errorCode){this.initSocketConnection();return}this.connected?this.lastEventTimestamp=new Date().getTime():this.initSocketConnection()}onExtensionsUpdatedEvent(i){this.eventsSdkClass.eventEmitterClass.emit(lt.EXTENSIONS_UPDATED,i)}onConnect(){this.keepReconnectInterval&&clearInterval(this.keepReconnectInterval),this.connected=!0,this.eventsSdkClass.loggerClass.log(Jt.INFO,lt.CONNECT,this.eventsSdkClass.reconnectOptions),this.eventsSdkClass.eventEmitterClass.emit(lt.ONLINE_STATUS_EVENT,{isSocketConnected:!0})}onDisconnect(i){this.connected=!1,this.eventsSdkClass.loggerClass.log(Jt.INFO,lt.DISCONNECT,i),this.closeAllConnections(),this.eventsSdkClass.eventEmitterClass.emit(lt.ONLINE_STATUS_EVENT,{isSocketConnected:!1}),this.doReconnect&&(console.log("attempt to connect..."),this.eventsSdkClass.connect(pn.NEXT))}onConnectError(i){this.eventsSdkClass.eventEmitterClass.emit(lt.ONLINE_STATUS_EVENT,{isSocketConnected:!1}),this.eventsSdkClass.loggerClass.log(Jt.ERROR,lt.CONNECT_ERROR_EVENT,i),setTimeout(()=>{this.eventsSdkClass.connect(pn.NEXT)},this.eventsSdkClass.options.reconnectionDelay)}}var Xv=Object.defineProperty,Jv=(a,i,n)=>i in a?Xv(a,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):a[i]=n,qt=(a,i,n)=>(Jv(a,typeof i!="symbol"?i+"":i,n),n);const Ue=Object.create(null);Ue.open="0";Ue.close="1";Ue.ping="2";Ue.pong="3";Ue.message="4";Ue.upgrade="5";Ue.noop="6";const Vr=Object.create(null);Object.keys(Ue).forEach(a=>{Vr[Ue[a]]=a});const Es={type:"error",data:"parser error"},Bu=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Uu=typeof ArrayBuffer=="function",Du=a=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(a):a&&a.buffer instanceof ArrayBuffer,Ns=({type:a,data:i},n,s)=>Bu&&i instanceof Blob?n?s(i):yu(i,s):Uu&&(i instanceof ArrayBuffer||Du(i))?n?s(i):yu(new Blob([i]),s):s(Ue[a]+(i||"")),yu=(a,i)=>{const n=new FileReader;return n.onload=function(){const s=n.result.split(",")[1];i("b"+(s||""))},n.readAsDataURL(a)};function mu(a){return a instanceof Uint8Array?a:a instanceof ArrayBuffer?new Uint8Array(a):new Uint8Array(a.buffer,a.byteOffset,a.byteLength)}let bs;function Vv(a,i){if(Bu&&a.data instanceof Blob)return a.data.arrayBuffer().then(mu).then(i);if(Uu&&(a.data instanceof ArrayBuffer||Du(a.data)))return i(mu(a.data));Ns(a,!1,n=>{bs||(bs=new TextEncoder),i(bs.encode(n))})}const _u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",tr=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let a=0;a<_u.length;a++)tr[_u.charCodeAt(a)]=a;const Yv=a=>{let i=a.length*.75,n=a.length,s,u=0,h,m,g,S;a[a.length-1]==="="&&(i--,a[a.length-2]==="="&&i--);const v=new ArrayBuffer(i),_=new Uint8Array(v);for(s=0;s<n;s+=4)h=tr[a.charCodeAt(s)],m=tr[a.charCodeAt(s+1)],g=tr[a.charCodeAt(s+2)],S=tr[a.charCodeAt(s+3)],_[u++]=h<<2|m>>4,_[u++]=(m&15)<<4|g>>2,_[u++]=(g&3)<<6|S&63;return v},jv=typeof ArrayBuffer=="function",Bs=(a,i)=>{if(typeof a!="string")return{type:"message",data:Pu(a,i)};const n=a.charAt(0);return n==="b"?{type:"message",data:Zv(a.substring(1),i)}:Vr[n]?a.length>1?{type:Vr[n],data:a.substring(1)}:{type:Vr[n]}:Es},Zv=(a,i)=>{if(jv){const n=Yv(a);return Pu(n,i)}else return{base64:!0,data:a}},Pu=(a,i)=>{switch(i){case"blob":return a instanceof Blob?a:new Blob([a]);case"arraybuffer":default:return a instanceof ArrayBuffer?a:a.buffer}},Fu="",Qv=(a,i)=>{const n=a.length,s=new Array(n);let u=0;a.forEach((h,m)=>{Ns(h,!1,g=>{s[m]=g,++u===n&&i(s.join(Fu))})})},ty=(a,i)=>{const n=a.split(Fu),s=[];for(let u=0;u<n.length;u++){const h=Bs(n[u],i);if(s.push(h),h.type==="error")break}return s};function ey(){return new TransformStream({transform(a,i){Vv(a,n=>{const s=n.length;let u;if(s<126)u=new Uint8Array(1),new DataView(u.buffer).setUint8(0,s);else if(s<65536){u=new Uint8Array(3);const h=new DataView(u.buffer);h.setUint8(0,126),h.setUint16(1,s)}else{u=new Uint8Array(9);const h=new DataView(u.buffer);h.setUint8(0,127),h.setBigUint64(1,BigInt(s))}a.data&&typeof a.data!="string"&&(u[0]|=128),i.enqueue(u),i.enqueue(n)})}})}let Ss;function $r(a){return a.reduce((i,n)=>i+n.length,0)}function Gr(a,i){if(a[0].length===i)return a.shift();const n=new Uint8Array(i);let s=0;for(let u=0;u<i;u++)n[u]=a[0][s++],s===a[0].length&&(a.shift(),s=0);return a.length&&s<a[0].length&&(a[0]=a[0].slice(s)),n}function ny(a,i){Ss||(Ss=new TextDecoder);const n=[];let s=0,u=-1,h=!1;return new TransformStream({transform(m,g){for(n.push(m);;){if(s===0){if($r(n)<1)break;const S=Gr(n,1);h=(S[0]&128)===128,u=S[0]&127,u<126?s=3:u===126?s=1:s=2}else if(s===1){if($r(n)<2)break;const S=Gr(n,2);u=new DataView(S.buffer,S.byteOffset,S.length).getUint16(0),s=3}else if(s===2){if($r(n)<8)break;const S=Gr(n,8),v=new DataView(S.buffer,S.byteOffset,S.length),_=v.getUint32(0);if(_>Math.pow(2,21)-1){g.enqueue(Es);break}u=_*Math.pow(2,32)+v.getUint32(4),s=3}else{if($r(n)<u)break;const S=Gr(n,u);g.enqueue(Bs(h?S:Ss.decode(S),i)),s=0}if(u===0||u>a){g.enqueue(Es);break}}}})}const Mu=4;function Dt(a){if(a)return ry(a)}function ry(a){for(var i in Dt.prototype)a[i]=Dt.prototype[i];return a}Dt.prototype.on=Dt.prototype.addEventListener=function(a,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+a]=this._callbacks["$"+a]||[]).push(i),this};Dt.prototype.once=function(a,i){function n(){this.off(a,n),i.apply(this,arguments)}return n.fn=i,this.on(a,n),this};Dt.prototype.off=Dt.prototype.removeListener=Dt.prototype.removeAllListeners=Dt.prototype.removeEventListener=function(a,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+a];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+a],this;for(var s,u=0;u<n.length;u++)if(s=n[u],s===i||s.fn===i){n.splice(u,1);break}return n.length===0&&delete this._callbacks["$"+a],this};Dt.prototype.emit=function(a){this._callbacks=this._callbacks||{};for(var i=new Array(arguments.length-1),n=this._callbacks["$"+a],s=1;s<arguments.length;s++)i[s-1]=arguments[s];if(n){n=n.slice(0);for(var s=0,u=n.length;s<u;++s)n[s].apply(this,i)}return this};Dt.prototype.emitReserved=Dt.prototype.emit;Dt.prototype.listeners=function(a){return this._callbacks=this._callbacks||{},this._callbacks["$"+a]||[]};Dt.prototype.hasListeners=function(a){return!!this.listeners(a).length};const be=typeof self<"u"?self:typeof window<"u"?window:Function("return this")();function qu(a,...i){return i.reduce((n,s)=>(a.hasOwnProperty(s)&&(n[s]=a[s]),n),{})}const iy=be.setTimeout,sy=be.clearTimeout;function Qr(a,i){i.useNativeTimers?(a.setTimeoutFn=iy.bind(be),a.clearTimeoutFn=sy.bind(be)):(a.setTimeoutFn=be.setTimeout.bind(be),a.clearTimeoutFn=be.clearTimeout.bind(be))}const oy=1.33;function ay(a){return typeof a=="string"?uy(a):Math.ceil((a.byteLength||a.size)*oy)}function uy(a){let i=0,n=0;for(let s=0,u=a.length;s<u;s++)i=a.charCodeAt(s),i<128?n+=1:i<2048?n+=2:i<55296||i>=57344?n+=3:(s++,n+=4);return n}function cy(a){let i="";for(let n in a)a.hasOwnProperty(n)&&(i.length&&(i+="&"),i+=encodeURIComponent(n)+"="+encodeURIComponent(a[n]));return i}function fy(a){let i={},n=a.split("&");for(let s=0,u=n.length;s<u;s++){let h=n[s].split("=");i[decodeURIComponent(h[0])]=decodeURIComponent(h[1])}return i}class hy extends Error{constructor(i,n,s){super(i),this.description=n,this.context=s,this.type="TransportError"}}class Us extends Dt{constructor(i){super(),this.writable=!1,Qr(this,i),this.opts=i,this.query=i.query,this.socket=i.socket}onError(i,n,s){return super.emitReserved("error",new hy(i,n,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(i){this.readyState==="open"&&this.write(i)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(i){const n=Bs(i,this.socket.binaryType);this.onPacket(n)}onPacket(i){super.emitReserved("packet",i)}onClose(i){this.readyState="closed",super.emitReserved("close",i)}pause(i){}createUri(i,n={}){return i+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const i=this.opts.hostname;return i.indexOf(":")===-1?i:"["+i+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(i){const n=cy(i);return n.length?"?"+n:""}}const Wu="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Ts=64,ly={};let wu=0,zr=0,bu;function Su(a){let i="";do i=Wu[a%Ts]+i,a=Math.floor(a/Ts);while(a>0);return i}function Ku(){const a=Su(+new Date);return a!==bu?(wu=0,bu=a):a+"."+Su(wu++)}for(;zr<Ts;zr++)ly[Wu[zr]]=zr;let Hu=!1;try{Hu=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const py=Hu;function $u(a){const i=a.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!i||py))return new XMLHttpRequest}catch{}if(!i)try{return new be[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function dy(){}const gy=function(){return new $u({xdomain:!1}).responseType!=null}();class vy extends Us{constructor(i){if(super(i),this.polling=!1,typeof location<"u"){const s=location.protocol==="https:";let u=location.port;u||(u=s?"443":"80"),this.xd=typeof location<"u"&&i.hostname!==location.hostname||u!==i.port}const n=i&&i.forceBase64;this.supportsBinary=gy&&!n,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(i){this.readyState="pausing";const n=()=>{this.readyState="paused",i()};if(this.polling||!this.writable){let s=0;this.polling&&(s++,this.once("pollComplete",function(){--s||n()})),this.writable||(s++,this.once("drain",function(){--s||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(i){const n=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};ty(i,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const i=()=>{this.write([{type:"close"}])};this.readyState==="open"?i():this.once("open",i)}write(i){this.writable=!1,Qv(i,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const i=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Ku()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(i,n)}request(i={}){return Object.assign(i,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new Be(this.uri(),i)}doWrite(i,n){const s=this.request({method:"POST",data:i});s.on("success",n),s.on("error",(u,h)=>{this.onError("xhr post error",u,h)})}doPoll(){const i=this.request();i.on("data",this.onData.bind(this)),i.on("error",(n,s)=>{this.onError("xhr poll error",n,s)}),this.pollXhr=i}}class Be extends Dt{constructor(i,n){super(),Qr(this,n),this.opts=n,this.method=n.method||"GET",this.uri=i,this.data=n.data!==void 0?n.data:null,this.create()}create(){var i;const n=qu(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const s=this.xhr=new $u(n);try{s.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let u in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(u)&&s.setRequestHeader(u,this.opts.extraHeaders[u])}}catch{}if(this.method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(i=this.opts.cookieJar)===null||i===void 0||i.addCookies(s),"withCredentials"in s&&(s.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(s.timeout=this.opts.requestTimeout),s.onreadystatechange=()=>{var u;s.readyState===3&&((u=this.opts.cookieJar)===null||u===void 0||u.parseCookies(s)),s.readyState===4&&(s.status===200||s.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof s.status=="number"?s.status:0)},0))},s.send(this.data)}catch(u){this.setTimeoutFn(()=>{this.onError(u)},0);return}typeof document<"u"&&(this.index=Be.requestsCount++,Be.requests[this.index]=this)}onError(i){this.emitReserved("error",i,this.xhr),this.cleanup(!0)}cleanup(i){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=dy,i)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Be.requests[this.index],this.xhr=null}}onLoad(){const i=this.xhr.responseText;i!==null&&(this.emitReserved("data",i),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Be.requestsCount=0;Be.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Cu);else if(typeof addEventListener=="function"){const a="onpagehide"in be?"pagehide":"unload";addEventListener(a,Cu,!1)}}function Cu(){for(let a in Be.requests)Be.requests.hasOwnProperty(a)&&Be.requests[a].abort()}const Ds=typeof Promise=="function"&&typeof Promise.resolve=="function"?a=>Promise.resolve().then(a):(a,i)=>i(a,0),Xr=be.WebSocket||be.MozWebSocket,ku=!0,yy="arraybuffer",Au=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class my extends Us{constructor(i){super(i),this.supportsBinary=!i.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const i=this.uri(),n=this.opts.protocols,s=Au?{}:qu(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=ku&&!Au?n?new Xr(i,n):new Xr(i):new Xr(i,n,s)}catch(u){return this.emitReserved("error",u)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=i=>this.onClose({description:"websocket connection closed",context:i}),this.ws.onmessage=i=>this.onData(i.data),this.ws.onerror=i=>this.onError("websocket error",i)}write(i){this.writable=!1;for(let n=0;n<i.length;n++){const s=i[n],u=n===i.length-1;Ns(s,this.supportsBinary,h=>{try{ku&&this.ws.send(h)}catch{}u&&Ds(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const i=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Ku()),this.supportsBinary||(n.b64=1),this.createUri(i,n)}check(){return!!Xr}}class _y extends Us{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(i=>{this.onError("webtransport error",i)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(i=>{const n=ny(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=i.readable.pipeThrough(n).getReader(),u=ey();u.readable.pipeTo(i.writable),this.writer=u.writable.getWriter();const h=()=>{s.read().then(({done:g,value:S})=>{g||(this.onPacket(S),h())}).catch(g=>{})};h();const m={type:"open"};this.query.sid&&(m.data=`{"sid":"${this.query.sid}"}`),this.writer.write(m).then(()=>this.onOpen())})}))}write(i){this.writable=!1;for(let n=0;n<i.length;n++){const s=i[n],u=n===i.length-1;this.writer.write(s).then(()=>{u&&Ds(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var i;(i=this.transport)===null||i===void 0||i.close()}}const wy={websocket:my,webtransport:_y,polling:vy},by=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Sy=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function xs(a){if(a.length>2e3)throw"URI too long";const i=a,n=a.indexOf("["),s=a.indexOf("]");n!=-1&&s!=-1&&(a=a.substring(0,n)+a.substring(n,s).replace(/:/g,";")+a.substring(s,a.length));let u=by.exec(a||""),h={},m=14;for(;m--;)h[Sy[m]]=u[m]||"";return n!=-1&&s!=-1&&(h.source=i,h.host=h.host.substring(1,h.host.length-1).replace(/;/g,":"),h.authority=h.authority.replace("[","").replace("]","").replace(/;/g,":"),h.ipv6uri=!0),h.pathNames=Cy(h,h.path),h.queryKey=ky(h,h.query),h}function Cy(a,i){const n=/\/{2,9}/g,s=i.replace(n,"/").split("/");return(i.slice(0,1)=="/"||i.length===0)&&s.splice(0,1),i.slice(-1)=="/"&&s.splice(s.length-1,1),s}function ky(a,i){const n={};return i.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,u,h){u&&(n[u]=h)}),n}let Gu=class Rn extends Dt{constructor(i,n={}){super(),this.binaryType=yy,this.writeBuffer=[],i&&typeof i=="object"&&(n=i,i=null),i?(i=xs(i),n.hostname=i.host,n.secure=i.protocol==="https"||i.protocol==="wss",n.port=i.port,i.query&&(n.query=i.query)):n.host&&(n.hostname=xs(n.host).host),Qr(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=fy(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(i){const n=Object.assign({},this.opts.query);n.EIO=Mu,n.transport=i,this.id&&(n.sid=this.id);const s=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[i]);return new wy[i](s)}open(){let i;if(this.opts.rememberUpgrade&&Rn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)i="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else i=this.transports[0];this.readyState="opening";try{i=this.createTransport(i)}catch{this.transports.shift(),this.open();return}i.open(),this.setTransport(i)}setTransport(i){this.transport&&this.transport.removeAllListeners(),this.transport=i,i.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(i){let n=this.createTransport(i),s=!1;Rn.priorWebsocketSuccess=!1;const u=()=>{s||(n.send([{type:"ping",data:"probe"}]),n.once("packet",y=>{if(!s)if(y.type==="pong"&&y.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Rn.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(_(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const l=new Error("probe error");l.transport=n.name,this.emitReserved("upgradeError",l)}}))};function h(){s||(s=!0,_(),n.close(),n=null)}const m=y=>{const l=new Error("probe error: "+y);l.transport=n.name,h(),this.emitReserved("upgradeError",l)};function g(){m("transport closed")}function S(){m("socket closed")}function v(y){n&&y.name!==n.name&&h()}const _=()=>{n.removeListener("open",u),n.removeListener("error",m),n.removeListener("close",g),this.off("close",S),this.off("upgrading",v)};n.once("open",u),n.once("error",m),n.once("close",g),this.once("close",S),this.once("upgrading",v),this.upgrades.indexOf("webtransport")!==-1&&i!=="webtransport"?this.setTimeoutFn(()=>{s||n.open()},200):n.open()}onOpen(){if(this.readyState="open",Rn.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let i=0;const n=this.upgrades.length;for(;i<n;i++)this.probe(this.upgrades[i])}}onPacket(i){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",i),this.emitReserved("heartbeat"),this.resetPingTimeout(),i.type){case"open":this.onHandshake(JSON.parse(i.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const n=new Error("server error");n.code=i.data,this.onError(n);break;case"message":this.emitReserved("data",i.data),this.emitReserved("message",i.data);break}}onHandshake(i){this.emitReserved("handshake",i),this.id=i.sid,this.transport.query.sid=i.sid,this.upgrades=this.filterUpgrades(i.upgrades),this.pingInterval=i.pingInterval,this.pingTimeout=i.pingTimeout,this.maxPayload=i.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const i=this.getWritablePackets();this.transport.send(i),this.prevBufferLen=i.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let i=1;for(let n=0;n<this.writeBuffer.length;n++){const s=this.writeBuffer[n].data;if(s&&(i+=ay(s)),n>0&&i>this.maxPayload)return this.writeBuffer.slice(0,n);i+=2}return this.writeBuffer}write(i,n,s){return this.sendPacket("message",i,n,s),this}send(i,n,s){return this.sendPacket("message",i,n,s),this}sendPacket(i,n,s,u){if(typeof n=="function"&&(u=n,n=void 0),typeof s=="function"&&(u=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const h={type:i,data:n,options:s};this.emitReserved("packetCreate",h),this.writeBuffer.push(h),u&&this.once("flush",u),this.flush()}close(){const i=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),i()},s=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():i()}):this.upgrading?s():i()),this}onError(i){Rn.priorWebsocketSuccess=!1,this.emitReserved("error",i),this.onClose("transport error",i)}onClose(i,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",i,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(i){const n=[];let s=0;const u=i.length;for(;s<u;s++)~this.transports.indexOf(i[s])&&n.push(i[s]);return n}};Gu.protocol=Mu;function Ay(a,i="",n){let s=a;n=n||typeof location<"u"&&location,a==null&&(a=n.protocol+"//"+n.host),typeof a=="string"&&(a.charAt(0)==="/"&&(a.charAt(1)==="/"?a=n.protocol+a:a=n.host+a),/^(https?|wss?):\/\//.test(a)||(typeof n<"u"?a=n.protocol+"//"+a:a="https://"+a),s=xs(a)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const u=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+u+":"+s.port+i,s.href=s.protocol+"://"+u+(n&&n.port===s.port?"":":"+s.port),s}const Ey=typeof ArrayBuffer=="function",Ty=a=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(a):a.buffer instanceof ArrayBuffer,zu=Object.prototype.toString,xy=typeof Blob=="function"||typeof Blob<"u"&&zu.call(Blob)==="[object BlobConstructor]",Oy=typeof File=="function"||typeof File<"u"&&zu.call(File)==="[object FileConstructor]";function Ps(a){return Ey&&(a instanceof ArrayBuffer||Ty(a))||xy&&a instanceof Blob||Oy&&a instanceof File}function Yr(a,i){if(!a||typeof a!="object")return!1;if(Array.isArray(a)){for(let n=0,s=a.length;n<s;n++)if(Yr(a[n]))return!0;return!1}if(Ps(a))return!0;if(a.toJSON&&typeof a.toJSON=="function"&&arguments.length===1)return Yr(a.toJSON(),!0);for(const n in a)if(Object.prototype.hasOwnProperty.call(a,n)&&Yr(a[n]))return!0;return!1}function Ry(a){const i=[],n=a.data,s=a;return s.data=Os(n,i),s.attachments=i.length,{packet:s,buffers:i}}function Os(a,i){if(!a)return a;if(Ps(a)){const n={_placeholder:!0,num:i.length};return i.push(a),n}else if(Array.isArray(a)){const n=new Array(a.length);for(let s=0;s<a.length;s++)n[s]=Os(a[s],i);return n}else if(typeof a=="object"&&!(a instanceof Date)){const n={};for(const s in a)Object.prototype.hasOwnProperty.call(a,s)&&(n[s]=Os(a[s],i));return n}return a}function Iy(a,i){return a.data=Rs(a.data,i),delete a.attachments,a}function Rs(a,i){if(!a)return a;if(a&&a._placeholder===!0){if(typeof a.num=="number"&&a.num>=0&&a.num<i.length)return i[a.num];throw new Error("illegal attachments")}else if(Array.isArray(a))for(let n=0;n<a.length;n++)a[n]=Rs(a[n],i);else if(typeof a=="object")for(const n in a)Object.prototype.hasOwnProperty.call(a,n)&&(a[n]=Rs(a[n],i));return a}const Ly=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Ny=5;var mt;(function(a){a[a.CONNECT=0]="CONNECT",a[a.DISCONNECT=1]="DISCONNECT",a[a.EVENT=2]="EVENT",a[a.ACK=3]="ACK",a[a.CONNECT_ERROR=4]="CONNECT_ERROR",a[a.BINARY_EVENT=5]="BINARY_EVENT",a[a.BINARY_ACK=6]="BINARY_ACK"})(mt||(mt={}));class By{constructor(i){this.replacer=i}encode(i){return(i.type===mt.EVENT||i.type===mt.ACK)&&Yr(i)?this.encodeAsBinary({type:i.type===mt.EVENT?mt.BINARY_EVENT:mt.BINARY_ACK,nsp:i.nsp,data:i.data,id:i.id}):[this.encodeAsString(i)]}encodeAsString(i){let n=""+i.type;return(i.type===mt.BINARY_EVENT||i.type===mt.BINARY_ACK)&&(n+=i.attachments+"-"),i.nsp&&i.nsp!=="/"&&(n+=i.nsp+","),i.id!=null&&(n+=i.id),i.data!=null&&(n+=JSON.stringify(i.data,this.replacer)),n}encodeAsBinary(i){const n=Ry(i),s=this.encodeAsString(n.packet),u=n.buffers;return u.unshift(s),u}}function Eu(a){return Object.prototype.toString.call(a)==="[object Object]"}class Fs extends Dt{constructor(i){super(),this.reviver=i}add(i){let n;if(typeof i=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(i);const s=n.type===mt.BINARY_EVENT;s||n.type===mt.BINARY_ACK?(n.type=s?mt.EVENT:mt.ACK,this.reconstructor=new Uy(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Ps(i)||i.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(i),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+i)}decodeString(i){let n=0;const s={type:Number(i.charAt(0))};if(mt[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===mt.BINARY_EVENT||s.type===mt.BINARY_ACK){const h=n+1;for(;i.charAt(++n)!=="-"&&n!=i.length;);const m=i.substring(h,n);if(m!=Number(m)||i.charAt(n)!=="-")throw new Error("Illegal attachments");s.attachments=Number(m)}if(i.charAt(n+1)==="/"){const h=n+1;for(;++n&&!(i.charAt(n)===","||n===i.length););s.nsp=i.substring(h,n)}else s.nsp="/";const u=i.charAt(n+1);if(u!==""&&Number(u)==u){const h=n+1;for(;++n;){const m=i.charAt(n);if(m==null||Number(m)!=m){--n;break}if(n===i.length)break}s.id=Number(i.substring(h,n+1))}if(i.charAt(++n)){const h=this.tryParse(i.substr(n));if(Fs.isPayloadValid(s.type,h))s.data=h;else throw new Error("invalid payload")}return s}tryParse(i){try{return JSON.parse(i,this.reviver)}catch{return!1}}static isPayloadValid(i,n){switch(i){case mt.CONNECT:return Eu(n);case mt.DISCONNECT:return n===void 0;case mt.CONNECT_ERROR:return typeof n=="string"||Eu(n);case mt.EVENT:case mt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Ly.indexOf(n[0])===-1);case mt.ACK:case mt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Uy{constructor(i){this.packet=i,this.buffers=[],this.reconPack=i}takeBinaryData(i){if(this.buffers.push(i),this.buffers.length===this.reconPack.attachments){const n=Iy(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Dy=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Fs,Encoder:By,get PacketType(){return mt},protocol:Ny},Symbol.toStringTag,{value:"Module"}));function Te(a,i,n){return a.on(i,n),function(){a.off(i,n)}}const Py=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Xu extends Dt{constructor(i,n,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=i,this.nsp=n,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const i=this.io;this.subs=[Te(i,"open",this.onopen.bind(this)),Te(i,"packet",this.onpacket.bind(this)),Te(i,"error",this.onerror.bind(this)),Te(i,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...i){return i.unshift("message"),this.emit.apply(this,i),this}emit(i,...n){if(Py.hasOwnProperty(i))throw new Error('"'+i.toString()+'" is a reserved event name');if(n.unshift(i),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const s={type:mt.EVENT,data:n};if(s.options={},s.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const h=this.ids++,m=n.pop();this._registerAckCallback(h,m),s.id=h}const u=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!u||!this.connected)||(this.connected?(this.notifyOutgoingListeners(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(i,n){var s;const u=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(u===void 0){this.acks[i]=n;return}const h=this.io.setTimeoutFn(()=>{delete this.acks[i];for(let m=0;m<this.sendBuffer.length;m++)this.sendBuffer[m].id===i&&this.sendBuffer.splice(m,1);n.call(this,new Error("operation has timed out"))},u);this.acks[i]=(...m)=>{this.io.clearTimeoutFn(h),n.apply(this,[null,...m])}}emitWithAck(i,...n){const s=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((u,h)=>{n.push((m,g)=>s?m?h(m):u(g):u(m)),this.emit(i,...n)})}_addToQueue(i){let n;typeof i[i.length-1]=="function"&&(n=i.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:i,flags:Object.assign({fromQueue:!0},this.flags)};i.push((u,...h)=>s!==this._queue[0]?void 0:(u!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(u)):(this._queue.shift(),n&&n(null,...h)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(i=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!i||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(i){i.nsp=this.nsp,this.io._packet(i)}onopen(){typeof this.auth=="function"?this.auth(i=>{this._sendConnectPacket(i)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(i){this.packet({type:mt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},i):i})}onerror(i){this.connected||this.emitReserved("connect_error",i)}onclose(i,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",i,n)}onpacket(i){if(i.nsp===this.nsp)switch(i.type){case mt.CONNECT:i.data&&i.data.sid?this.onconnect(i.data.sid,i.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case mt.EVENT:case mt.BINARY_EVENT:this.onevent(i);break;case mt.ACK:case mt.BINARY_ACK:this.onack(i);break;case mt.DISCONNECT:this.ondisconnect();break;case mt.CONNECT_ERROR:this.destroy();const n=new Error(i.data.message);n.data=i.data.data,this.emitReserved("connect_error",n);break}}onevent(i){const n=i.data||[];i.id!=null&&n.push(this.ack(i.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(i){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const s of n)s.apply(this,i)}super.emit.apply(this,i),this._pid&&i.length&&typeof i[i.length-1]=="string"&&(this._lastOffset=i[i.length-1])}ack(i){const n=this;let s=!1;return function(...u){s||(s=!0,n.packet({type:mt.ACK,id:i,data:u}))}}onack(i){const n=this.acks[i.id];typeof n=="function"&&(n.apply(this,i.data),delete this.acks[i.id])}onconnect(i,n){this.id=i,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(i=>this.emitEvent(i)),this.receiveBuffer=[],this.sendBuffer.forEach(i=>{this.notifyOutgoingListeners(i),this.packet(i)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(i=>i()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:mt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(i){return this.flags.compress=i,this}get volatile(){return this.flags.volatile=!0,this}timeout(i){return this.flags.timeout=i,this}onAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(i),this}prependAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(i),this}offAny(i){if(!this._anyListeners)return this;if(i){const n=this._anyListeners;for(let s=0;s<n.length;s++)if(i===n[s])return n.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(i),this}prependAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(i),this}offAnyOutgoing(i){if(!this._anyOutgoingListeners)return this;if(i){const n=this._anyOutgoingListeners;for(let s=0;s<n.length;s++)if(i===n[s])return n.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(i){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const s of n)s.apply(this,i.data)}}}function In(a){a=a||{},this.ms=a.min||100,this.max=a.max||1e4,this.factor=a.factor||2,this.jitter=a.jitter>0&&a.jitter<=1?a.jitter:0,this.attempts=0}In.prototype.duration=function(){var a=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var i=Math.random(),n=Math.floor(i*this.jitter*a);a=Math.floor(i*10)&1?a+n:a-n}return Math.min(a,this.max)|0};In.prototype.reset=function(){this.attempts=0};In.prototype.setMin=function(a){this.ms=a};In.prototype.setMax=function(a){this.max=a};In.prototype.setJitter=function(a){this.jitter=a};class Is extends Dt{constructor(i,n){var s;super(),this.nsps={},this.subs=[],i&&typeof i=="object"&&(n=i,i=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Qr(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((s=n.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new In({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=i;const u=n.parser||Dy;this.encoder=new u.Encoder,this.decoder=new u.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(i){return arguments.length?(this._reconnection=!!i,this):this._reconnection}reconnectionAttempts(i){return i===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=i,this)}reconnectionDelay(i){var n;return i===void 0?this._reconnectionDelay:(this._reconnectionDelay=i,(n=this.backoff)===null||n===void 0||n.setMin(i),this)}randomizationFactor(i){var n;return i===void 0?this._randomizationFactor:(this._randomizationFactor=i,(n=this.backoff)===null||n===void 0||n.setJitter(i),this)}reconnectionDelayMax(i){var n;return i===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=i,(n=this.backoff)===null||n===void 0||n.setMax(i),this)}timeout(i){return arguments.length?(this._timeout=i,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(i){if(~this._readyState.indexOf("open"))return this;this.engine=new Gu(this.uri,this.opts);const n=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const u=Te(n,"open",function(){s.onopen(),i&&i()}),h=g=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",g),i?i(g):this.maybeReconnectOnOpen()},m=Te(n,"error",h);if(this._timeout!==!1){const g=this._timeout,S=this.setTimeoutFn(()=>{u(),h(new Error("timeout")),n.close()},g);this.opts.autoUnref&&S.unref(),this.subs.push(()=>{this.clearTimeoutFn(S)})}return this.subs.push(u),this.subs.push(m),this}connect(i){return this.open(i)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const i=this.engine;this.subs.push(Te(i,"ping",this.onping.bind(this)),Te(i,"data",this.ondata.bind(this)),Te(i,"error",this.onerror.bind(this)),Te(i,"close",this.onclose.bind(this)),Te(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(i){try{this.decoder.add(i)}catch(n){this.onclose("parse error",n)}}ondecoded(i){Ds(()=>{this.emitReserved("packet",i)},this.setTimeoutFn)}onerror(i){this.emitReserved("error",i)}socket(i,n){let s=this.nsps[i];return s?this._autoConnect&&!s.active&&s.connect():(s=new Xu(this,i,n),this.nsps[i]=s),s}_destroy(i){const n=Object.keys(this.nsps);for(const s of n)if(this.nsps[s].active)return;this._close()}_packet(i){const n=this.encoder.encode(i);for(let s=0;s<n.length;s++)this.engine.write(n[s],i.options)}cleanup(){this.subs.forEach(i=>i()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(i,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",i,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const i=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{i.skipReconnect||(this.emitReserved("reconnect_attempt",i.backoff.attempts),!i.skipReconnect&&i.open(u=>{u?(i._reconnecting=!1,i.reconnect(),this.emitReserved("reconnect_error",u)):i.onreconnect()}))},n);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const i=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",i)}}const Zn={};function jr(a,i){typeof a=="object"&&(i=a,a=void 0),i=i||{};const n=Ay(a,i.path||"/socket.io"),s=n.source,u=n.id,h=n.path,m=Zn[u]&&h in Zn[u].nsps,g=i.forceNew||i["force new connection"]||i.multiplex===!1||m;let S;return g?S=new Is(s,i):(Zn[u]||(Zn[u]=new Is(s,i)),S=Zn[u]),n.query&&!i.query&&(i.query=n.queryKey),S.socket(n.path,i)}Object.assign(jr,{Manager:Is,Socket:Xu,io:jr,connect:jr});let Jr;const Fy=new Uint8Array(16);function My(){if(!Jr&&(Jr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Jr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Jr(Fy)}const Ht=[];for(let a=0;a<256;++a)Ht.push((a+256).toString(16).slice(1));function qy(a,i=0){return Ht[a[i+0]]+Ht[a[i+1]]+Ht[a[i+2]]+Ht[a[i+3]]+"-"+Ht[a[i+4]]+Ht[a[i+5]]+"-"+Ht[a[i+6]]+Ht[a[i+7]]+"-"+Ht[a[i+8]]+Ht[a[i+9]]+"-"+Ht[a[i+10]]+Ht[a[i+11]]+Ht[a[i+12]]+Ht[a[i+13]]+Ht[a[i+14]]+Ht[a[i+15]]}const Wy=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Tu={randomUUID:Wy};function Ky(a,i,n){if(Tu.randomUUID&&!i&&!a)return Tu.randomUUID();a=a||{};const s=a.random||(a.rng||My)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,i){n=n||0;for(let u=0;u<16;++u)i[n+u]=s[u];return i}return qy(s)}function Hy(a){return!!a&&(typeof a=="object"||typeof a=="function")&&typeof a.then=="function"}function $y(a,i){const n=i.map(u=>JSON.stringify(u)).join(" "),s=new Date().toISOString();return JSON.stringify({level:a,time:s,message:n})}function Gy(a){const i=String(a[0]),n=a.slice(1);return{level:i,logs:n}}function zy(a,i){const n=JSON.parse(a);return i.forEach(s=>delete n[s]),n}const Xy={reconnection:!0,reconnectionDelay:5e3,reconnectionAttempts:10,upgrade:!1,transports:["websocket"],debug:!1},Cs={logToConsole:!0,overloadGlobalConsole:!1,socketEmitInterval:6e4};let ie=console;class xu{constructor(i){qt(this,"logToConsole"),qt(this,"overloadGlobalConsole"),qt(this,"namespace"),qt(this,"socketEmitInterval"),qt(this,"storageId"),qt(this,"emitInProgress"),qt(this,"queue"),qt(this,"processing"),qt(this,"interval"),qt(this,"logIndex"),qt(this,"socket"),qt(this,"getItem"),qt(this,"setItem"),qt(this,"parseLog"),qt(this,"_logMethod"),qt(this,"_warnMethod"),qt(this,"_errorMethod"),qt(this,"_debugMethod");const{loggerOptions:n}=i;if(!n.namespace)throw new Error("Config property 'namespace' should be provided!");this.setupStorageFunctions(n.getItem,n.setItem,n.parseLog),this.namespace=n.namespace,this.socketEmitInterval=n.socketEmitInterval||Cs.socketEmitInterval,this.logToConsole=n.logToConsole!==void 0?n.logToConsole:Cs.logToConsole,this.overloadGlobalConsole=n.overloadGlobalConsole!==void 0?n.overloadGlobalConsole:Cs.overloadGlobalConsole,this.storageId=this.getStorageName(),this.queue=[],this.processing=!1,this.emitInProgress=!1,this.logIndex=0,this.init(i)}setupStorageFunctions(i,n,s){this.getItem=i&&typeof i=="function"?this.promisifyStorageFunction(i):this.defaultGetItemFunction,this.setItem=n&&typeof n=="function"?this.promisifyStorageFunction(n):this.defaultSetItemFunction,this.parseLog=s&&typeof s=="function"?s:$y}promisifyStorageFunction(i){const n=i("");return Hy(n)?async(...s)=>new Promise((u,h)=>{try{const m=i(...s);u(m)}catch(m){h(m)}}):i}init(i){const{socket:n,url:s,socketOptions:u={}}=i;this._logMethod=ie.log.bind(ie),this._warnMethod=ie.warn.bind(ie),this._errorMethod=ie.error.bind(ie),this._debugMethod=ie.debug.bind(ie),this.initStorage().then(()=>{if(n)this.socket=n;else if(s)this.socket=this.createConnection(s,u);else throw new Error("Must provide either a 'socket' or a 'url' for socket connection");this.interval=setInterval(async()=>{await this.emitLogs()},this.socketEmitInterval),this.overloadGlobalConsole&&this._overloadConsole()})}createConnection(i,n={}){const s={...Xy,...n};return jr(i,s)}async emitLogs(){if(!this.emitInProgress)try{const i=await this.getItem(this.storageId);if(!i)return;const n=[];this.emitInProgress=!0;const s=JSON.parse(i),u=Object.keys(s);if(!u.length)return;if(!this.socket||!this.socket.connected)throw new Error("Socket is disconnected");for(const g of u)this.socket.emit("Log",s[g]),n.push(g);const h=await this.getItem(this.storageId);if(!h)return;const m=zy(h,n);await this.setItem(this.storageId,JSON.stringify(m))}catch(i){this._errorMethod(i)}finally{this.emitInProgress=!1}}disconnectSocket(){!this.socket||!this.interval||(this.socket.disconnect(),clearInterval(this.interval))}_overloadConsole(){ie=Object.assign(ie,{log:(...i)=>{this.log(...i)},warn:(...i)=>{this.warn(...i)},error:(...i)=>{this.error(...i)},debug:(...i)=>{this.debug(...i)}})}async initStorage(){const i=await this.getItem(this.storageId);(!i||typeof i!="string")&&await this.setItem(this.storageId,JSON.stringify({}))}async resetStorage(){await this.setItem(this.storageId,JSON.stringify({}))}getStorageName(){const i=Ky();return this.namespace.toString().toUpperCase()+i+Date.now()}async processLog(...i){try{if(i.length<2)return;const n=await this.getItem(this.storageId);if(!n)return;const{level:s,logs:u}=Gy(i),h=JSON.parse(n),m=this.formItemKey(s);h[m]=this.parseLog(s,u),await this.setItem(this.storageId,JSON.stringify(h))}catch(n){this._errorMethod(n)}}async processQueue(){if(this.processing||this.queue.length===0)return;const i=this.queue.shift();i&&(this.processing=!0,await this.processLog(...i).finally(()=>{this.processing=!1,this.processQueue()}))}log(...i){const n=["INFO",...i];this.queue.push(n),this.logToConsole&&this._logMethod.apply(ie,i),this.processQueue()}warn(...i){const n=["WARN",...i];this.queue.push(n),this.logToConsole&&this._warnMethod.apply(ie,i),this.processQueue()}error(...i){const n=["ERROR",...i];this.queue.push(n),this.logToConsole&&this._errorMethod.apply(ie,i),this.processQueue()}debug(...i){const n=["DEBUG",...i];this.queue.push(n),this.logToConsole&&this._debugMethod.apply(ie,i),this.processQueue()}async defaultGetItemFunction(i){return localStorage.getItem(i)}async defaultSetItemFunction(i,n){try{localStorage.setItem(i,n)}catch(s){this._errorMethod(s)}}formItemKey(i){const n=new Date().toISOString();return this.logIndex++,`${i}-${this.namespace}-${n}-${this.logIndex}`}}class Jy{constructor(i){wt(this,"io");wt(this,"storageLogger");this.eventsSdkClass=i,this.eventsSdkClass=i}init(){this.eventsSdkClass.options.useLogger&&(this.eventsSdkClass.options.loggerSocketConnection?this.io=this.eventsSdkClass.options.loggerSocketConnection:this.eventsSdkClass.socketIoClass.ioFunction&&(this.io=this.eventsSdkClass.socketIoClass.ioFunction(this.eventsSdkClass.options.loggerServer,this.eventsSdkClass.options.loggerConnectOptions)),this.io?this.storageLogger=new xu({socket:this.io,loggerOptions:this.eventsSdkClass.options.loggerConfig}):this.storageLogger=new xu({url:this.eventsSdkClass.options.loggerServer,socketOptions:this.eventsSdkClass.options.loggerConnectOptions,loggerOptions:this.eventsSdkClass.options.loggerConfig}))}log(i,n,...s){const u=[n,...s];this.storageLogger?i===Jt.INFO?this.storageLogger.log(u):i===Jt.ERROR&&this.storageLogger.error(u):i===Jt.INFO?console.log(u):i===Jt.ERROR&&console.error(u)}}class Vy{constructor(i){wt(this,"listeners",{[lt.ALL_EXTENSION_STATUS]:[],[lt.ALL_DIALER_STATUS]:[],[lt.ALL_USERS_STATUS]:[],[lt.QUEUE_EVENT]:[],[lt.EXTENSION_EVENT]:[],[lt.DIALER_EVENT]:[],[lt.LOGIN_SUCCESS]:[],[lt.LOGIN_STATUS]:[],[lt.KEEP_ALIVE_RESPONSE]:[],[lt.ONLINE_STATUS_EVENT]:[],[lt.EXTENSIONS_UPDATED]:[]});wt(this,"allListeners",[]);this.eventsSdkClass=i,this.eventsSdkClass=i}on(i,n){i==="*"?this.allListeners.push(n):this.listeners[i].push(n)}off(i,n){if(i==="*")this.allListeners=this.allListeners.filter(s=>s!==n);else{const u=this.listeners[i].filter(h=>h!==n);this.listeners={...this.listeners,[i]:u}}}emit(i,n){this.eventsSdkClass.socketIoClass.lastEventTimestamp=new Date().getTime(),this.listeners[i].forEach(u=>u({name:i,data:n}));const s={name:i,data:n};this.allListeners.forEach(u=>u(s))}}class Yy{constructor(i){wt(this,"argumentOptions");wt(this,"options");wt(this,"servers",[]);wt(this,"URLList",[]);wt(this,"server");wt(this,"URL");wt(this,"socket");wt(this,"mainServer");wt(this,"alreadyAttemptedOtherServers",[]);wt(this,"authClass",new Dv(this));wt(this,"socketIoClass",new zv(this));wt(this,"loggerClass",new Jy(this));wt(this,"eventEmitterClass",new Vy(this));wt(this,"reconnectOptions");wt(this,"retryConnection");this.options={...Fv,...i},this.reconnectOptions={retryCount:1,maxReconnectAttempts:this.options.maxReconnectAttempts,reconnectionDelay:this.options.reconnectionDelay,minReconnectionDelay:this.options.reconnectionDelay,maxReconnectionDelay:6e4*5},this.server=this.options.fallbackServer,this.retryConnection=Pv.debounce(this.connect.bind(this),this.reconnectOptions.reconnectionDelay,{leading:!0,trailing:!1}),this.argumentOptions={...i}}on(i,n){this.eventEmitterClass.on(i,n)}emit(i,...n){this.socketIoClass.io&&this.socketIoClass.io.emit(i,...n)}connect(i){i===pn.MAIN&&this.findMainServer(),i===pn.NEXT&&this.findNextServer(),this.socketIoClass.doReconnect=!0,this.socketIoClass.initSocketConnection(),this.socketIoClass.initSocketEvents(),this.socketIoClass.initKeepAlive(),this.loggerClass.init()}disconnect(){this.socketIoClass.doReconnect=!1,this.socketIoClass.closeAllConnections()}clearKeepAliveInterval(){this.socketIoClass.clearKeepAliveInterval()}findMainServer(){this.servers.length?(this.mainServer=this.servers.reduce((i,n)=>n.Priority>i.Priority?n:i),this.server=this.mainServer):this.URLList.length&&(this.URL=this.URLList[0])}findNextServer(){if(this.servers.length)if(this.server.Priority===this.mainServer.Priority){let i=this.servers.filter(n=>n.Priority!==this.mainServer.Priority&&this.alreadyAttemptedOtherServers.indexOf(n.Priority)+1===0);i.length||(this.alreadyAttemptedOtherServers=[],i=this.servers.filter(n=>n.Priority!==this.mainServer.Priority&&this.alreadyAttemptedOtherServers.indexOf(n.Priority)+1===0)),i.length&&(this.server=i.reduce((n,s)=>s.Priority>n.Priority?s:n),this.alreadyAttemptedOtherServers.push(this.server.Priority))}else this.server=this.mainServer;else if(this.URLList.length)if(this.URL===this.URLList[0]){let i=this.URLList.filter(n=>n!==this.URLList[0]&&this.alreadyAttemptedOtherServers.indexOf(n)+1===0);i.length||(this.alreadyAttemptedOtherServers=[],i=this.URLList.filter(n=>n!==this.URLList[0]&&this.alreadyAttemptedOtherServers.indexOf(n)+1===0)),i.length&&(this.URL=i[0],this.alreadyAttemptedOtherServers.push(this.URL))}else this.URL=this.URLList[0]}async init(){return this.socket,await this.authClass.login(this.options),this.getServers(),!0}getServers(){this.options.serverFetchStrategy==="static"&&this.argumentOptions.servers&&Array.isArray(this.argumentOptions.servers)&&this.argumentOptions.servers.length>1&&(this.servers=this.argumentOptions.servers)}}exports.ServerListenerEventsEnum=Ls;exports.default=Yy;
|
|
46
45
|
//# sourceMappingURL=voicenter-events-sdk.cjs.js.map
|