@voicenter-team/events-sdk 0.0.23 → 0.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,45 +1,46 @@
1
- "use strict";var vg=Object.defineProperty;var yg=(m,v,r)=>v in m?vg(m,v,{enumerable:!0,configurable:!0,writable:!0,value:r}):m[v]=r;var me=(m,v,r)=>(yg(m,typeof v!="symbol"?v+"":v,r),r);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var Wn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _g(m){return m&&m.__esModule&&Object.prototype.hasOwnProperty.call(m,"default")?m.default:m}var Ia={exports:{}},Na={exports:{}};(function(){var m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",v={rotl:function(r,l){return r<<l|r>>>32-l},rotr:function(r,l){return r<<32-l|r>>>l},endian:function(r){if(r.constructor==Number)return v.rotl(r,8)&16711935|v.rotl(r,24)&4278255360;for(var l=0;l<r.length;l++)r[l]=v.endian(r[l]);return r},randomBytes:function(r){for(var l=[];r>0;r--)l.push(Math.floor(Math.random()*256));return l},bytesToWords:function(r){for(var l=[],c=0,g=0;c<r.length;c++,g+=8)l[g>>>5]|=r[c]<<24-g%32;return l},wordsToBytes:function(r){for(var l=[],c=0;c<r.length*32;c+=8)l.push(r[c>>>5]>>>24-c%32&255);return l},bytesToHex:function(r){for(var l=[],c=0;c<r.length;c++)l.push((r[c]>>>4).toString(16)),l.push((r[c]&15).toString(16));return l.join("")},hexToBytes:function(r){for(var l=[],c=0;c<r.length;c+=2)l.push(parseInt(r.substr(c,2),16));return l},bytesToBase64:function(r){for(var l=[],c=0;c<r.length;c+=3)for(var g=r[c]<<16|r[c+1]<<8|r[c+2],w=0;w<4;w++)c*8+w*6<=r.length*8?l.push(m.charAt(g>>>6*(3-w)&63)):l.push("=");return l.join("")},base64ToBytes:function(r){r=r.replace(/[^A-Z0-9+\/]/ig,"");for(var l=[],c=0,g=0;c<r.length;g=++c%4)g!=0&&l.push((m.indexOf(r.charAt(c-1))&Math.pow(2,-2*g+8)-1)<<g*2|m.indexOf(r.charAt(c))>>>6-g*2);return l}};Na.exports=v})();var mg=Na.exports,ji={utf8:{stringToBytes:function(m){return ji.bin.stringToBytes(unescape(encodeURIComponent(m)))},bytesToString:function(m){return decodeURIComponent(escape(ji.bin.bytesToString(m)))}},bin:{stringToBytes:function(m){for(var v=[],r=0;r<m.length;r++)v.push(m.charCodeAt(r)&255);return v},bytesToString:function(m){for(var v=[],r=0;r<m.length;r++)v.push(String.fromCharCode(m[r]));return v.join("")}}},La=ji;/*!
1
+ "use strict";var vv=Object.defineProperty;var mv=(r,o,n)=>o in r?vv(r,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[o]=n;var St=(r,o,n)=>(mv(r,typeof o!="symbol"?o+"":o,n),n);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var fr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _v(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var tc={exports:{}},ec={exports:{}};(function(){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o={rotl:function(n,a){return n<<a|n>>>32-a},rotr:function(n,a){return n<<32-a|n>>>a},endian:function(n){if(n.constructor==Number)return o.rotl(n,8)&16711935|o.rotl(n,24)&4278255360;for(var a=0;a<n.length;a++)n[a]=o.endian(n[a]);return n},randomBytes:function(n){for(var a=[];n>0;n--)a.push(Math.floor(Math.random()*256));return a},bytesToWords:function(n){for(var a=[],c=0,f=0;c<n.length;c++,f+=8)a[f>>>5]|=n[c]<<24-f%32;return a},wordsToBytes:function(n){for(var a=[],c=0;c<n.length*32;c+=8)a.push(n[c>>>5]>>>24-c%32&255);return a},bytesToHex:function(n){for(var a=[],c=0;c<n.length;c++)a.push((n[c]>>>4).toString(16)),a.push((n[c]&15).toString(16));return a.join("")},hexToBytes:function(n){for(var a=[],c=0;c<n.length;c+=2)a.push(parseInt(n.substr(c,2),16));return a},bytesToBase64:function(n){for(var a=[],c=0;c<n.length;c+=3)for(var f=n[c]<<16|n[c+1]<<8|n[c+2],v=0;v<4;v++)c*8+v*6<=n.length*8?a.push(r.charAt(f>>>6*(3-v)&63)):a.push("=");return a.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/ig,"");for(var a=[],c=0,f=0;c<n.length;f=++c%4)f!=0&&a.push((r.indexOf(n.charAt(c-1))&Math.pow(2,-2*f+8)-1)<<f*2|r.indexOf(n.charAt(c))>>>6-f*2);return a}};ec.exports=o})();var wv=ec.exports,zo={utf8:{stringToBytes:function(r){return zo.bin.stringToBytes(unescape(encodeURIComponent(r)))},bytesToString:function(r){return decodeURIComponent(escape(zo.bin.bytesToString(r)))}},bin:{stringToBytes:function(r){for(var o=[],n=0;n<r.length;n++)o.push(r.charCodeAt(n)&255);return o},bytesToString:function(r){for(var o=[],n=0;n<r.length;n++)o.push(String.fromCharCode(r[n]));return o.join("")}}},qu=zo;/*!
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 wg=function(m){return m!=null&&(Ba(m)||Sg(m)||!!m._isBuffer)};function Ba(m){return!!m.constructor&&typeof m.constructor.isBuffer=="function"&&m.constructor.isBuffer(m)}function Sg(m){return typeof m.readFloatLE=="function"&&typeof m.slice=="function"&&Ba(m.slice(0,0))}(function(){var m=mg,v=La.utf8,r=wg,l=La.bin,c=function(g,w){g.constructor==String?w&&w.encoding==="binary"?g=l.stringToBytes(g):g=v.stringToBytes(g):r(g)?g=Array.prototype.slice.call(g,0):!Array.isArray(g)&&g.constructor!==Uint8Array&&(g=g.toString());for(var d=m.bytesToWords(g),A=g.length*8,h=1732584193,_=-271733879,p=-1732584194,a=271733878,s=0;s<d.length;s++)d[s]=(d[s]<<8|d[s]>>>24)&16711935|(d[s]<<24|d[s]>>>8)&4278255360;d[A>>>5]|=128<<A%32,d[(A+64>>>9<<4)+14]=A;for(var S=c._ff,k=c._gg,T=c._hh,q=c._ii,s=0;s<d.length;s+=16){var oe=h,Y=_,se=p,z=a;h=S(h,_,p,a,d[s+0],7,-680876936),a=S(a,h,_,p,d[s+1],12,-389564586),p=S(p,a,h,_,d[s+2],17,606105819),_=S(_,p,a,h,d[s+3],22,-1044525330),h=S(h,_,p,a,d[s+4],7,-176418897),a=S(a,h,_,p,d[s+5],12,1200080426),p=S(p,a,h,_,d[s+6],17,-1473231341),_=S(_,p,a,h,d[s+7],22,-45705983),h=S(h,_,p,a,d[s+8],7,1770035416),a=S(a,h,_,p,d[s+9],12,-1958414417),p=S(p,a,h,_,d[s+10],17,-42063),_=S(_,p,a,h,d[s+11],22,-1990404162),h=S(h,_,p,a,d[s+12],7,1804603682),a=S(a,h,_,p,d[s+13],12,-40341101),p=S(p,a,h,_,d[s+14],17,-1502002290),_=S(_,p,a,h,d[s+15],22,1236535329),h=k(h,_,p,a,d[s+1],5,-165796510),a=k(a,h,_,p,d[s+6],9,-1069501632),p=k(p,a,h,_,d[s+11],14,643717713),_=k(_,p,a,h,d[s+0],20,-373897302),h=k(h,_,p,a,d[s+5],5,-701558691),a=k(a,h,_,p,d[s+10],9,38016083),p=k(p,a,h,_,d[s+15],14,-660478335),_=k(_,p,a,h,d[s+4],20,-405537848),h=k(h,_,p,a,d[s+9],5,568446438),a=k(a,h,_,p,d[s+14],9,-1019803690),p=k(p,a,h,_,d[s+3],14,-187363961),_=k(_,p,a,h,d[s+8],20,1163531501),h=k(h,_,p,a,d[s+13],5,-1444681467),a=k(a,h,_,p,d[s+2],9,-51403784),p=k(p,a,h,_,d[s+7],14,1735328473),_=k(_,p,a,h,d[s+12],20,-1926607734),h=T(h,_,p,a,d[s+5],4,-378558),a=T(a,h,_,p,d[s+8],11,-2022574463),p=T(p,a,h,_,d[s+11],16,1839030562),_=T(_,p,a,h,d[s+14],23,-35309556),h=T(h,_,p,a,d[s+1],4,-1530992060),a=T(a,h,_,p,d[s+4],11,1272893353),p=T(p,a,h,_,d[s+7],16,-155497632),_=T(_,p,a,h,d[s+10],23,-1094730640),h=T(h,_,p,a,d[s+13],4,681279174),a=T(a,h,_,p,d[s+0],11,-358537222),p=T(p,a,h,_,d[s+3],16,-722521979),_=T(_,p,a,h,d[s+6],23,76029189),h=T(h,_,p,a,d[s+9],4,-640364487),a=T(a,h,_,p,d[s+12],11,-421815835),p=T(p,a,h,_,d[s+15],16,530742520),_=T(_,p,a,h,d[s+2],23,-995338651),h=q(h,_,p,a,d[s+0],6,-198630844),a=q(a,h,_,p,d[s+7],10,1126891415),p=q(p,a,h,_,d[s+14],15,-1416354905),_=q(_,p,a,h,d[s+5],21,-57434055),h=q(h,_,p,a,d[s+12],6,1700485571),a=q(a,h,_,p,d[s+3],10,-1894986606),p=q(p,a,h,_,d[s+10],15,-1051523),_=q(_,p,a,h,d[s+1],21,-2054922799),h=q(h,_,p,a,d[s+8],6,1873313359),a=q(a,h,_,p,d[s+15],10,-30611744),p=q(p,a,h,_,d[s+6],15,-1560198380),_=q(_,p,a,h,d[s+13],21,1309151649),h=q(h,_,p,a,d[s+4],6,-145523070),a=q(a,h,_,p,d[s+11],10,-1120210379),p=q(p,a,h,_,d[s+2],15,718787259),_=q(_,p,a,h,d[s+9],21,-343485551),h=h+oe>>>0,_=_+Y>>>0,p=p+se>>>0,a=a+z>>>0}return m.endian([h,_,p,a])};c._ff=function(g,w,d,A,h,_,p){var a=g+(w&d|~w&A)+(h>>>0)+p;return(a<<_|a>>>32-_)+w},c._gg=function(g,w,d,A,h,_,p){var a=g+(w&A|d&~A)+(h>>>0)+p;return(a<<_|a>>>32-_)+w},c._hh=function(g,w,d,A,h,_,p){var a=g+(w^d^A)+(h>>>0)+p;return(a<<_|a>>>32-_)+w},c._ii=function(g,w,d,A,h,_,p){var a=g+(d^(w|~A))+(h>>>0)+p;return(a<<_|a>>>32-_)+w},c._blocksize=16,c._digestsize=16,Ia.exports=function(g,w){if(g==null)throw new Error("Illegal argument "+g);var d=m.wordsToBytes(c(g,w));return w&&w.asBytes?d:w&&w.asString?l.bytesToString(d):m.bytesToHex(d)}})();var Cg=Ia.exports;const bg=_g(Cg);var rn=(m=>(m.MAIN="main",m.NEXT="next",m))(rn||{}),Pt=(m=>(m.USER="User",m.TOKEN="Token",m))(Pt||{});class qn{static async getSessionStorageDataByKey(v,r=!0){if(typeof chrome<"u"&&typeof chrome.storage<"u"){const l=await chrome.storage.session.get(v);if(l[v])return r?JSON.parse(l[v]):l[v]}if(typeof window<"u"){const l=window.sessionStorage.getItem(v);if(l)return r?JSON.parse(l):l}}static async updateSessionStorageKey(v,r){typeof chrome<"u"&&typeof chrome.storage<"u"&&await chrome.storage.session.set({[v]:JSON.stringify(r)}),typeof window<"u"&&window.sessionStorage.setItem(v,JSON.stringify(r))}static clearSessionStorage(){typeof chrome<"u"&&typeof chrome.storage<"u"&&chrome.storage.session.clear(),typeof window<"u"&&window.sessionStorage.clear()}}var ze=(m=>(m.INFO="INFO",m.WARN="WARN",m.ERROR="ERROR",m))(ze||{});class Ag{constructor(v){me(this,"delay",1e3);me(this,"lastLoginTimestamp");me(this,"token");me(this,"storageKey");this.eventsSdkClass=v,this.eventsSdkClass=v,this.storageKey=""}async login(v){const r={token:v.token,email:v.email,password:v.password};if(this.storageKey=bg(JSON.stringify({...v,loggerSocketConnection:null})),this.lastLoginTimestamp&&this.lastLoginTimestamp+this.delay>new Date().getTime())return;this.updateLastLoginTimestamp(),await this.checkLoginStatus(this.storageKey)||(qn.clearSessionStorage(),await this.userLoginFunction(r,this.storageKey,v.loginType))}updateLastLoginTimestamp(){this.lastLoginTimestamp=new Date().getTime()}async checkLoginStatus(v){const r=await qn.getSessionStorageDataByKey(v);return r?(this.eventsSdkClass.loggerClass.log(ze.INFO,"got data from session",r),this.onLoginResponse(r),!0):!1}async userLoginFunction(v,r,l){let c,g,w;this.eventsSdkClass.options.isNewStack?(c=await this.externalLogin(this.eventsSdkClass.options.loginUrl,v,l),g=await this.getSettings(c.Data.AccessToken),w={...c.Data,...g}):(c=await this.externalLogin(this.eventsSdkClass.options.loginUrl,v,l),w={...c.Data.Socket}),this.onLoginResponse(w),await qn.updateSessionStorageKey(r,w)}onLoginResponse(v){if(!this.eventsSdkClass.options.isNewStack&&this.eventsSdkClass.options.servers&&(this.eventsSdkClass.servers=[...this.eventsSdkClass.options.servers],this.eventsSdkClass.server=this.eventsSdkClass.servers.reduce((r,l)=>r.Priority>l.Priority?r:l)),this.eventsSdkClass.options.isNewStack&&this.eventsSdkClass.options.servers&&(this.eventsSdkClass.servers=[...this.eventsSdkClass.options.servers],this.eventsSdkClass.server=this.eventsSdkClass.servers.reduce((r,l)=>r.Priority>l.Priority?r:l)),v.MonitorList&&v.MonitorList.length&&(this.eventsSdkClass.servers=[...v.MonitorList],this.eventsSdkClass.server=this.eventsSdkClass.servers.reduce((r,l)=>r.Priority>l.Priority?r:l)),!this.eventsSdkClass.options.isNewStack&&!this.eventsSdkClass.servers.length&&v.URLList&&(this.eventsSdkClass.URLList=v.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.loggerClass.init()),!this.eventsSdkClass.server&&this.eventsSdkClass.URLList.length&&this.eventsSdkClass.socketIoClass.getSocketIoFunction(`v=${v.Client}`),v.IdentityCode&&(this.token=v.IdentityCode,this.eventsSdkClass.connect(rn.MAIN)),v.Token&&(this.token=v.Token,this.eventsSdkClass.connect(rn.MAIN)),v.RefreshToken&&v.IdentityCodeExpiry&&this.eventsSdkClass.options.loginType===Pt.USER&&(this.eventsSdkClass.options.refreshToken=v.RefreshToken,this.eventsSdkClass.options.tokenExpiry=v.IdentityCodeExpiry,this.handleTokenExpiry()),v.RefreshToken&&v.TokenExpiry&&this.eventsSdkClass.options.loginType===Pt.USER&&(this.eventsSdkClass.options.refreshToken=v.RefreshToken,this.eventsSdkClass.options.tokenExpiry=v.TokenExpiry,this.handleTokenExpiry())}handleTokenExpiry(){if(!this.eventsSdkClass.options.refreshTokenUrl)throw new Error("refreshTokenUrl not provided");let v;if(this.eventsSdkClass.options.tokenExpiry)v=new Date(this.eventsSdkClass.options.tokenExpiry);else return;const r=v.getTime()-new Date().getTime()-5e3,l=Math.min(r,2147483647);setTimeout(async()=>{if(this.eventsSdkClass.options.refreshToken){this.eventsSdkClass.socketIoClass.closeAllConnections();let c,g;if(this.eventsSdkClass.options.isNewStack){const w=await this.refreshToken(this.eventsSdkClass.options.refreshTokenUrl,this.eventsSdkClass.options.refreshToken);c=await this.getSettings(w.Data.AccessToken),g={...w.Data,...c}}else g={...(await this.refreshToken(this.eventsSdkClass.options.refreshTokenUrl,this.eventsSdkClass.options.refreshToken)).Data.Socket};this.onLoginResponse(g),await qn.updateSessionStorageKey(this.storageKey,g)}},l)}async externalLogin(v,{password:r,token:l,email:c},g){if(!v)throw new Error("loginUrl not provided");let w;this.eventsSdkClass.options.isNewStack?g===Pt.TOKEN?w=JSON.stringify({identityType:Pt.TOKEN,token:l}):w=JSON.stringify({identityType:Pt.USER,username:c,password:r}):this.eventsSdkClass.options.loginType===Pt.TOKEN?(w=JSON.stringify({token:l}),v=`${v}/${Pt.TOKEN}`):(w=JSON.stringify({email:c,pin:r}),v=`${v}/${Pt.USER}`);try{const d=await fetch(v,{method:"POST",headers:{"Content-Type":"application/json"},body:w});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 A=await d.json();if(A.error)throw new Error(A.error);return A}catch(d){throw this.eventsSdkClass.loggerClass.log(ze.ERROR,`External login ${v}`,d),d}}async getSettings(v){try{if(!this.eventsSdkClass.options.getSettingsUrl)throw new Error("getSettingsUrl not provided");const r=await fetch(this.eventsSdkClass.options.getSettingsUrl,{headers:{Authorization:`Bearer ${v}`}});if(!r.ok&&r.status===401)throw new Error("Unauthorized. Access token not provided or not valid");return r.json()}catch(r){throw this.eventsSdkClass.loggerClass.log(ze.ERROR,`Get settings ${this.eventsSdkClass.options.getSettingsUrl}`,r),r}}async refreshToken(v,r){try{return(await fetch(v,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`}})).json()}catch(l){throw this.eventsSdkClass.loggerClass.log(ze.ERROR,`Refresh token ${v}`,l),l}}}var Lr={exports:{}};/**
6
+ */var bv=function(r){return r!=null&&(nc(r)||Cv(r)||!!r._isBuffer)};function nc(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function Cv(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&nc(r.slice(0,0))}(function(){var r=wv,o=qu.utf8,n=bv,a=qu.bin,c=function(f,v){f.constructor==String?v&&v.encoding==="binary"?f=a.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,tc.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?a.bytesToString(d):r.bytesToHex(d)}})();var Sv=tc.exports;const kv=_v(Sv);var _n=(r=>(r.MAIN="main",r.NEXT="next",r))(_n||{}),$e=(r=>(r.USER="User",r.TOKEN="Token",r))($e||{});class hr{static async getSessionStorageDataByKey(o,n=!0){if(typeof chrome<"u"&&typeof chrome.storage<"u"){const a=await chrome.storage.session.get(o);if(a[o])return n?JSON.parse(a[o]):a[o]}if(typeof window<"u"){const a=window.sessionStorage.getItem(o);if(a)return n?JSON.parse(a):a}}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 jt=(r=>(r.INFO="INFO",r.WARN="WARN",r.ERROR="ERROR",r))(jt||{});class Av{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=kv(JSON.stringify({...o,loggerSocketConnection:null})),this.lastLoginTimestamp&&this.lastLoginTimestamp+this.delay>new Date().getTime())return;this.updateLastLoginTimestamp(),await this.checkLoginStatus(this.storageKey)||(hr.clearSessionStorage(),await this.userLoginFunction(n,this.storageKey,o.loginType))}updateLastLoginTimestamp(){this.lastLoginTimestamp=new Date().getTime()}async checkLoginStatus(o){const n=await hr.getSessionStorageDataByKey(o);return n?(this.eventsSdkClass.loggerClass.log(jt.INFO,"got data from session",n),this.onLoginResponse(n),!0):!1}async userLoginFunction(o,n,a){let c,f,v;this.eventsSdkClass.options.isNewStack?(c=await this.externalLogin(this.eventsSdkClass.options.loginUrl,o,a),f=await this.getSettings(c.Data.AccessToken),v={...c.Data,...f}):(c=await this.externalLogin(this.eventsSdkClass.options.loginUrl,o,a),v={...c.Data.Socket}),this.onLoginResponse(v),await hr.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,a)=>n.Priority>a.Priority?n:a)),this.eventsSdkClass.options.isNewStack&&this.eventsSdkClass.options.servers&&(this.eventsSdkClass.servers=[...this.eventsSdkClass.options.servers],this.eventsSdkClass.server=this.eventsSdkClass.servers.reduce((n,a)=>n.Priority>a.Priority?n:a)),o.MonitorList&&o.MonitorList.length&&(this.eventsSdkClass.servers=[...o.MonitorList],this.eventsSdkClass.server=this.eventsSdkClass.servers.reduce((n,a)=>n.Priority>a.Priority?n:a)),!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(_n.MAIN)),o.Token&&(this.token=o.Token,this.eventsSdkClass.connect(_n.MAIN)),o.RefreshToken&&o.IdentityCodeExpiry&&this.eventsSdkClass.options.loginType===$e.USER&&(this.eventsSdkClass.options.refreshToken=o.RefreshToken,this.eventsSdkClass.options.tokenExpiry=o.IdentityCodeExpiry,this.handleTokenExpiry()),o.RefreshToken&&o.TokenExpiry&&this.eventsSdkClass.options.loginType===$e.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,a=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 hr.updateSessionStorageKey(this.storageKey,f)}},a)}async externalLogin(o,{password:n,token:a,email:c},f){if(!o)throw new Error("loginUrl not provided");let v;this.eventsSdkClass.options.isNewStack?f===$e.TOKEN?v=JSON.stringify({identityType:$e.TOKEN,token:a}):v=JSON.stringify({identityType:$e.USER,username:c,password:n}):this.eventsSdkClass.options.loginType===$e.TOKEN?(v=JSON.stringify({token:a}),o=`${o}/${$e.TOKEN}`):(v=JSON.stringify({email:c,pin:n}),o=`${o}/${$e.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(jt.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(jt.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(a){throw this.eventsSdkClass.loggerClass.log(jt.ERROR,`Refresh token ${o}`,a),a}}}var ui={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
- */Lr.exports;(function(m,v){(function(){var r,l="4.17.21",c=200,g="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",w="Expected a function",d="Invalid `variable` option passed into `_.template`",A="__lodash_hash_undefined__",h=500,_="__lodash_placeholder__",p=1,a=2,s=4,S=1,k=2,T=1,q=2,oe=4,Y=8,se=16,z=32,D=64,M=128,H=256,I=512,U=30,X="...",j=800,V=16,B=1,be=2,Ae=3,Te=1/0,ue=9007199254740991,We=17976931348623157e292,St=NaN,et=4294967295,Kn=et-1,W=et>>>1,J=[["ary",M],["bind",T],["bindKey",q],["curry",Y],["curryRight",se],["flip",I],["partial",z],["partialRight",D],["rearg",H]],F="[object Arguments]",te="[object Array]",P="[object AsyncFunction]",Q="[object Boolean]",ee="[object Date]",$="[object DOMException]",ae="[object Error]",we="[object Function]",qe="[object GeneratorFunction]",Re="[object Map]",vt="[object Number]",Sn="[object Null]",tt="[object Object]",on="[object Promise]",Cn="[object Proxy]",Ge="[object RegExp]",$e="[object Set]",Ct="[object String]",bt="[object Symbol]",bn="[object Undefined]",Et="[object WeakMap]",An="[object WeakSet]",Ft="[object ArrayBuffer]",sn="[object DataView]",Ir="[object Float32Array]",Nr="[object Float64Array]",Br="[object Int8Array]",Ur="[object Int16Array]",Dr="[object Int32Array]",Pr="[object Uint8Array]",Fr="[object Uint8ClampedArray]",Mr="[object Uint16Array]",Wr="[object Uint32Array]",Da=/\b__p \+= '';/g,Pa=/\b(__p \+=) '' \+/g,Fa=/(__e\(.*?\)|\b__t\)) \+\n'';/g,to=/&(?:amp|lt|gt|quot|#39);/g,no=/[&<>"']/g,Ma=RegExp(to.source),Wa=RegExp(no.source),qa=/<%-([\s\S]+?)%>/g,Ka=/<%([\s\S]+?)%>/g,ro=/<%=([\s\S]+?)%>/g,Ha=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,za=/^\w*$/,Ga=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qr=/[\\^$.*+?()[\]{}|]/g,$a=RegExp(qr.source),Kr=/^\s+/,Xa=/\s/,Ja=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ya=/\{\n\/\* \[wrapped with (.+)\] \*/,Za=/,? & /,Va=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Qa=/[()=,{}\[\]\/\s]/,ja=/\\(\\)?/g,eu=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,io=/\w*$/,tu=/^[-+]0x[0-9a-f]+$/i,nu=/^0b[01]+$/i,ru=/^\[object .+?Constructor\]$/,iu=/^0o[0-7]+$/i,ou=/^(?:0|[1-9]\d*)$/,su=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Hn=/($^)/,au=/['\n\r\u2028\u2029\\]/g,zn="\\ud800-\\udfff",uu="\\u0300-\\u036f",fu="\\ufe20-\\ufe2f",cu="\\u20d0-\\u20ff",oo=uu+fu+cu,so="\\u2700-\\u27bf",ao="a-z\\xdf-\\xf6\\xf8-\\xff",lu="\\xac\\xb1\\xd7\\xf7",hu="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",pu="\\u2000-\\u206f",du=" \\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",uo="A-Z\\xc0-\\xd6\\xd8-\\xde",fo="\\ufe0e\\ufe0f",co=lu+hu+pu+du,Hr="['’]",gu="["+zn+"]",lo="["+co+"]",Gn="["+oo+"]",ho="\\d+",vu="["+so+"]",po="["+ao+"]",go="[^"+zn+co+ho+so+ao+uo+"]",zr="\\ud83c[\\udffb-\\udfff]",yu="(?:"+Gn+"|"+zr+")",vo="[^"+zn+"]",Gr="(?:\\ud83c[\\udde6-\\uddff]){2}",$r="[\\ud800-\\udbff][\\udc00-\\udfff]",an="["+uo+"]",yo="\\u200d",_o="(?:"+po+"|"+go+")",_u="(?:"+an+"|"+go+")",mo="(?:"+Hr+"(?:d|ll|m|re|s|t|ve))?",wo="(?:"+Hr+"(?:D|LL|M|RE|S|T|VE))?",So=yu+"?",Co="["+fo+"]?",mu="(?:"+yo+"(?:"+[vo,Gr,$r].join("|")+")"+Co+So+")*",wu="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Su="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",bo=Co+So+mu,Cu="(?:"+[vu,Gr,$r].join("|")+")"+bo,bu="(?:"+[vo+Gn+"?",Gn,Gr,$r,gu].join("|")+")",Au=RegExp(Hr,"g"),xu=RegExp(Gn,"g"),Xr=RegExp(zr+"(?="+zr+")|"+bu+bo,"g"),ku=RegExp([an+"?"+po+"+"+mo+"(?="+[lo,an,"$"].join("|")+")",_u+"+"+wo+"(?="+[lo,an+_o,"$"].join("|")+")",an+"?"+_o+"+"+mo,an+"+"+wo,Su,wu,ho,Cu].join("|"),"g"),Eu=RegExp("["+yo+zn+oo+fo+"]"),Tu=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ru=["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"],Ou=-1,Ee={};Ee[Ir]=Ee[Nr]=Ee[Br]=Ee[Ur]=Ee[Dr]=Ee[Pr]=Ee[Fr]=Ee[Mr]=Ee[Wr]=!0,Ee[F]=Ee[te]=Ee[Ft]=Ee[Q]=Ee[sn]=Ee[ee]=Ee[ae]=Ee[we]=Ee[Re]=Ee[vt]=Ee[tt]=Ee[Ge]=Ee[$e]=Ee[Ct]=Ee[Et]=!1;var ke={};ke[F]=ke[te]=ke[Ft]=ke[sn]=ke[Q]=ke[ee]=ke[Ir]=ke[Nr]=ke[Br]=ke[Ur]=ke[Dr]=ke[Re]=ke[vt]=ke[tt]=ke[Ge]=ke[$e]=ke[Ct]=ke[bt]=ke[Pr]=ke[Fr]=ke[Mr]=ke[Wr]=!0,ke[ae]=ke[we]=ke[Et]=!1;var Lu={À:"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"},Iu={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Nu={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Bu={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Uu=parseFloat,Du=parseInt,Ao=typeof Wn=="object"&&Wn&&Wn.Object===Object&&Wn,Pu=typeof self=="object"&&self&&self.Object===Object&&self,Fe=Ao||Pu||Function("return this")(),Jr=v&&!v.nodeType&&v,Jt=Jr&&!0&&m&&!m.nodeType&&m,xo=Jt&&Jt.exports===Jr,Yr=xo&&Ao.process,ut=function(){try{var b=Jt&&Jt.require&&Jt.require("util").types;return b||Yr&&Yr.binding&&Yr.binding("util")}catch{}}(),ko=ut&&ut.isArrayBuffer,Eo=ut&&ut.isDate,To=ut&&ut.isMap,Ro=ut&&ut.isRegExp,Oo=ut&&ut.isSet,Lo=ut&&ut.isTypedArray;function nt(b,R,E){switch(E.length){case 0:return b.call(R);case 1:return b.call(R,E[0]);case 2:return b.call(R,E[0],E[1]);case 3:return b.call(R,E[0],E[1],E[2])}return b.apply(R,E)}function Fu(b,R,E,G){for(var fe=-1,_e=b==null?0:b.length;++fe<_e;){var Ue=b[fe];R(G,Ue,E(Ue),b)}return G}function ft(b,R){for(var E=-1,G=b==null?0:b.length;++E<G&&R(b[E],E,b)!==!1;);return b}function Mu(b,R){for(var E=b==null?0:b.length;E--&&R(b[E],E,b)!==!1;);return b}function Io(b,R){for(var E=-1,G=b==null?0:b.length;++E<G;)if(!R(b[E],E,b))return!1;return!0}function Mt(b,R){for(var E=-1,G=b==null?0:b.length,fe=0,_e=[];++E<G;){var Ue=b[E];R(Ue,E,b)&&(_e[fe++]=Ue)}return _e}function $n(b,R){var E=b==null?0:b.length;return!!E&&un(b,R,0)>-1}function Zr(b,R,E){for(var G=-1,fe=b==null?0:b.length;++G<fe;)if(E(R,b[G]))return!0;return!1}function Oe(b,R){for(var E=-1,G=b==null?0:b.length,fe=Array(G);++E<G;)fe[E]=R(b[E],E,b);return fe}function Wt(b,R){for(var E=-1,G=R.length,fe=b.length;++E<G;)b[fe+E]=R[E];return b}function Vr(b,R,E,G){var fe=-1,_e=b==null?0:b.length;for(G&&_e&&(E=b[++fe]);++fe<_e;)E=R(E,b[fe],fe,b);return E}function Wu(b,R,E,G){var fe=b==null?0:b.length;for(G&&fe&&(E=b[--fe]);fe--;)E=R(E,b[fe],fe,b);return E}function Qr(b,R){for(var E=-1,G=b==null?0:b.length;++E<G;)if(R(b[E],E,b))return!0;return!1}var qu=jr("length");function Ku(b){return b.split("")}function Hu(b){return b.match(Va)||[]}function No(b,R,E){var G;return E(b,function(fe,_e,Ue){if(R(fe,_e,Ue))return G=_e,!1}),G}function Xn(b,R,E,G){for(var fe=b.length,_e=E+(G?1:-1);G?_e--:++_e<fe;)if(R(b[_e],_e,b))return _e;return-1}function un(b,R,E){return R===R?tf(b,R,E):Xn(b,Bo,E)}function zu(b,R,E,G){for(var fe=E-1,_e=b.length;++fe<_e;)if(G(b[fe],R))return fe;return-1}function Bo(b){return b!==b}function Uo(b,R){var E=b==null?0:b.length;return E?ti(b,R)/E:St}function jr(b){return function(R){return R==null?r:R[b]}}function ei(b){return function(R){return b==null?r:b[R]}}function Do(b,R,E,G,fe){return fe(b,function(_e,Ue,xe){E=G?(G=!1,_e):R(E,_e,Ue,xe)}),E}function Gu(b,R){var E=b.length;for(b.sort(R);E--;)b[E]=b[E].value;return b}function ti(b,R){for(var E,G=-1,fe=b.length;++G<fe;){var _e=R(b[G]);_e!==r&&(E=E===r?_e:E+_e)}return E}function ni(b,R){for(var E=-1,G=Array(b);++E<b;)G[E]=R(E);return G}function $u(b,R){return Oe(R,function(E){return[E,b[E]]})}function Po(b){return b&&b.slice(0,qo(b)+1).replace(Kr,"")}function rt(b){return function(R){return b(R)}}function ri(b,R){return Oe(R,function(E){return b[E]})}function xn(b,R){return b.has(R)}function Fo(b,R){for(var E=-1,G=b.length;++E<G&&un(R,b[E],0)>-1;);return E}function Mo(b,R){for(var E=b.length;E--&&un(R,b[E],0)>-1;);return E}function Xu(b,R){for(var E=b.length,G=0;E--;)b[E]===R&&++G;return G}var Ju=ei(Lu),Yu=ei(Iu);function Zu(b){return"\\"+Bu[b]}function Vu(b,R){return b==null?r:b[R]}function fn(b){return Eu.test(b)}function Qu(b){return Tu.test(b)}function ju(b){for(var R,E=[];!(R=b.next()).done;)E.push(R.value);return E}function ii(b){var R=-1,E=Array(b.size);return b.forEach(function(G,fe){E[++R]=[fe,G]}),E}function Wo(b,R){return function(E){return b(R(E))}}function qt(b,R){for(var E=-1,G=b.length,fe=0,_e=[];++E<G;){var Ue=b[E];(Ue===R||Ue===_)&&(b[E]=_,_e[fe++]=E)}return _e}function Jn(b){var R=-1,E=Array(b.size);return b.forEach(function(G){E[++R]=G}),E}function ef(b){var R=-1,E=Array(b.size);return b.forEach(function(G){E[++R]=[G,G]}),E}function tf(b,R,E){for(var G=E-1,fe=b.length;++G<fe;)if(b[G]===R)return G;return-1}function nf(b,R,E){for(var G=E+1;G--;)if(b[G]===R)return G;return G}function cn(b){return fn(b)?of(b):qu(b)}function yt(b){return fn(b)?sf(b):Ku(b)}function qo(b){for(var R=b.length;R--&&Xa.test(b.charAt(R)););return R}var rf=ei(Nu);function of(b){for(var R=Xr.lastIndex=0;Xr.test(b);)++R;return R}function sf(b){return b.match(Xr)||[]}function af(b){return b.match(ku)||[]}var uf=function b(R){R=R==null?Fe:ln.defaults(Fe.Object(),R,ln.pick(Fe,Ru));var E=R.Array,G=R.Date,fe=R.Error,_e=R.Function,Ue=R.Math,xe=R.Object,oi=R.RegExp,ff=R.String,ct=R.TypeError,Yn=E.prototype,cf=_e.prototype,hn=xe.prototype,Zn=R["__core-js_shared__"],Vn=cf.toString,Ce=hn.hasOwnProperty,lf=0,Ko=function(){var e=/[^.]+$/.exec(Zn&&Zn.keys&&Zn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Qn=hn.toString,hf=Vn.call(xe),pf=Fe._,df=oi("^"+Vn.call(Ce).replace(qr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),jn=xo?R.Buffer:r,Kt=R.Symbol,er=R.Uint8Array,Ho=jn?jn.allocUnsafe:r,tr=Wo(xe.getPrototypeOf,xe),zo=xe.create,Go=hn.propertyIsEnumerable,nr=Yn.splice,$o=Kt?Kt.isConcatSpreadable:r,kn=Kt?Kt.iterator:r,Yt=Kt?Kt.toStringTag:r,rr=function(){try{var e=en(xe,"defineProperty");return e({},"",{}),e}catch{}}(),gf=R.clearTimeout!==Fe.clearTimeout&&R.clearTimeout,vf=G&&G.now!==Fe.Date.now&&G.now,yf=R.setTimeout!==Fe.setTimeout&&R.setTimeout,ir=Ue.ceil,or=Ue.floor,si=xe.getOwnPropertySymbols,_f=jn?jn.isBuffer:r,Xo=R.isFinite,mf=Yn.join,wf=Wo(xe.keys,xe),De=Ue.max,Ke=Ue.min,Sf=G.now,Cf=R.parseInt,Jo=Ue.random,bf=Yn.reverse,ai=en(R,"DataView"),En=en(R,"Map"),ui=en(R,"Promise"),pn=en(R,"Set"),Tn=en(R,"WeakMap"),Rn=en(xe,"create"),sr=Tn&&new Tn,dn={},Af=tn(ai),xf=tn(En),kf=tn(ui),Ef=tn(pn),Tf=tn(Tn),ar=Kt?Kt.prototype:r,On=ar?ar.valueOf:r,Yo=ar?ar.toString:r;function u(e){if(Ie(e)&&!ce(e)&&!(e instanceof ve)){if(e instanceof lt)return e;if(Ce.call(e,"__wrapped__"))return Zs(e)}return new lt(e)}var gn=function(){function e(){}return function(t){if(!Le(t))return{};if(zo)return zo(t);e.prototype=t;var n=new e;return e.prototype=r,n}}();function ur(){}function lt(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}u.templateSettings={escape:qa,evaluate:Ka,interpolate:ro,variable:"",imports:{_:u}},u.prototype=ur.prototype,u.prototype.constructor=u,lt.prototype=gn(ur.prototype),lt.prototype.constructor=lt;function ve(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=et,this.__views__=[]}function Rf(){var e=new ve(this.__wrapped__);return e.__actions__=Ze(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ze(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ze(this.__views__),e}function Of(){if(this.__filtered__){var e=new ve(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function Lf(){var e=this.__wrapped__.value(),t=this.__dir__,n=ce(e),i=t<0,o=n?e.length:0,f=Hc(0,o,this.__views__),y=f.start,C=f.end,x=C-y,O=i?C:y-1,L=this.__iteratees__,N=L.length,K=0,Z=Ke(x,this.__takeCount__);if(!n||!i&&o==x&&Z==x)return ms(e,this.__actions__);var re=[];e:for(;x--&&K<Z;){O+=t;for(var he=-1,ie=e[O];++he<N;){var ge=L[he],ye=ge.iteratee,st=ge.type,Ye=ye(ie);if(st==be)ie=Ye;else if(!Ye){if(st==B)continue e;break e}}re[K++]=ie}return re}ve.prototype=gn(ur.prototype),ve.prototype.constructor=ve;function Zt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function If(){this.__data__=Rn?Rn(null):{},this.size=0}function Nf(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Bf(e){var t=this.__data__;if(Rn){var n=t[e];return n===A?r:n}return Ce.call(t,e)?t[e]:r}function Uf(e){var t=this.__data__;return Rn?t[e]!==r:Ce.call(t,e)}function Df(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Rn&&t===r?A:t,this}Zt.prototype.clear=If,Zt.prototype.delete=Nf,Zt.prototype.get=Bf,Zt.prototype.has=Uf,Zt.prototype.set=Df;function Tt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Pf(){this.__data__=[],this.size=0}function Ff(e){var t=this.__data__,n=fr(t,e);if(n<0)return!1;var i=t.length-1;return n==i?t.pop():nr.call(t,n,1),--this.size,!0}function Mf(e){var t=this.__data__,n=fr(t,e);return n<0?r:t[n][1]}function Wf(e){return fr(this.__data__,e)>-1}function qf(e,t){var n=this.__data__,i=fr(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}Tt.prototype.clear=Pf,Tt.prototype.delete=Ff,Tt.prototype.get=Mf,Tt.prototype.has=Wf,Tt.prototype.set=qf;function Rt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Kf(){this.size=0,this.__data__={hash:new Zt,map:new(En||Tt),string:new Zt}}function Hf(e){var t=Sr(this,e).delete(e);return this.size-=t?1:0,t}function zf(e){return Sr(this,e).get(e)}function Gf(e){return Sr(this,e).has(e)}function $f(e,t){var n=Sr(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}Rt.prototype.clear=Kf,Rt.prototype.delete=Hf,Rt.prototype.get=zf,Rt.prototype.has=Gf,Rt.prototype.set=$f;function Vt(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Rt;++t<n;)this.add(e[t])}function Xf(e){return this.__data__.set(e,A),this}function Jf(e){return this.__data__.has(e)}Vt.prototype.add=Vt.prototype.push=Xf,Vt.prototype.has=Jf;function _t(e){var t=this.__data__=new Tt(e);this.size=t.size}function Yf(){this.__data__=new Tt,this.size=0}function Zf(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Vf(e){return this.__data__.get(e)}function Qf(e){return this.__data__.has(e)}function jf(e,t){var n=this.__data__;if(n instanceof Tt){var i=n.__data__;if(!En||i.length<c-1)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Rt(i)}return n.set(e,t),this.size=n.size,this}_t.prototype.clear=Yf,_t.prototype.delete=Zf,_t.prototype.get=Vf,_t.prototype.has=Qf,_t.prototype.set=jf;function Zo(e,t){var n=ce(e),i=!n&&nn(e),o=!n&&!i&&Xt(e),f=!n&&!i&&!o&&mn(e),y=n||i||o||f,C=y?ni(e.length,ff):[],x=C.length;for(var O in e)(t||Ce.call(e,O))&&!(y&&(O=="length"||o&&(O=="offset"||O=="parent")||f&&(O=="buffer"||O=="byteLength"||O=="byteOffset")||Nt(O,x)))&&C.push(O);return C}function Vo(e){var t=e.length;return t?e[mi(0,t-1)]:r}function ec(e,t){return Cr(Ze(e),Qt(t,0,e.length))}function tc(e){return Cr(Ze(e))}function fi(e,t,n){(n!==r&&!mt(e[t],n)||n===r&&!(t in e))&&Ot(e,t,n)}function Ln(e,t,n){var i=e[t];(!(Ce.call(e,t)&&mt(i,n))||n===r&&!(t in e))&&Ot(e,t,n)}function fr(e,t){for(var n=e.length;n--;)if(mt(e[n][0],t))return n;return-1}function nc(e,t,n,i){return Ht(e,function(o,f,y){t(i,o,n(o),y)}),i}function Qo(e,t){return e&&xt(t,Pe(t),e)}function rc(e,t){return e&&xt(t,Qe(t),e)}function Ot(e,t,n){t=="__proto__"&&rr?rr(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ci(e,t){for(var n=-1,i=t.length,o=E(i),f=e==null;++n<i;)o[n]=f?r:zi(e,t[n]);return o}function Qt(e,t,n){return e===e&&(n!==r&&(e=e<=n?e:n),t!==r&&(e=e>=t?e:t)),e}function ht(e,t,n,i,o,f){var y,C=t&p,x=t&a,O=t&s;if(n&&(y=o?n(e,i,o,f):n(e)),y!==r)return y;if(!Le(e))return e;var L=ce(e);if(L){if(y=Gc(e),!C)return Ze(e,y)}else{var N=He(e),K=N==we||N==qe;if(Xt(e))return Cs(e,C);if(N==tt||N==F||K&&!o){if(y=x||K?{}:qs(e),!C)return x?Bc(e,rc(y,e)):Nc(e,Qo(y,e))}else{if(!ke[N])return o?e:{};y=$c(e,N,C)}}f||(f=new _t);var Z=f.get(e);if(Z)return Z;f.set(e,y),va(e)?e.forEach(function(ie){y.add(ht(ie,t,n,ie,e,f))}):da(e)&&e.forEach(function(ie,ge){y.set(ge,ht(ie,t,n,ge,e,f))});var re=O?x?Oi:Ri:x?Qe:Pe,he=L?r:re(e);return ft(he||e,function(ie,ge){he&&(ge=ie,ie=e[ge]),Ln(y,ge,ht(ie,t,n,ge,e,f))}),y}function ic(e){var t=Pe(e);return function(n){return jo(n,e,t)}}function jo(e,t,n){var i=n.length;if(e==null)return!i;for(e=xe(e);i--;){var o=n[i],f=t[o],y=e[o];if(y===r&&!(o in e)||!f(y))return!1}return!0}function es(e,t,n){if(typeof e!="function")throw new ct(w);return Fn(function(){e.apply(r,n)},t)}function In(e,t,n,i){var o=-1,f=$n,y=!0,C=e.length,x=[],O=t.length;if(!C)return x;n&&(t=Oe(t,rt(n))),i?(f=Zr,y=!1):t.length>=c&&(f=xn,y=!1,t=new Vt(t));e:for(;++o<C;){var L=e[o],N=n==null?L:n(L);if(L=i||L!==0?L:0,y&&N===N){for(var K=O;K--;)if(t[K]===N)continue e;x.push(L)}else f(t,N,i)||x.push(L)}return x}var Ht=Es(At),ts=Es(hi,!0);function oc(e,t){var n=!0;return Ht(e,function(i,o,f){return n=!!t(i,o,f),n}),n}function cr(e,t,n){for(var i=-1,o=e.length;++i<o;){var f=e[i],y=t(f);if(y!=null&&(C===r?y===y&&!ot(y):n(y,C)))var C=y,x=f}return x}function sc(e,t,n,i){var o=e.length;for(n=le(n),n<0&&(n=-n>o?0:o+n),i=i===r||i>o?o:le(i),i<0&&(i+=o),i=n>i?0:_a(i);n<i;)e[n++]=t;return e}function ns(e,t){var n=[];return Ht(e,function(i,o,f){t(i,o,f)&&n.push(i)}),n}function Me(e,t,n,i,o){var f=-1,y=e.length;for(n||(n=Jc),o||(o=[]);++f<y;){var C=e[f];t>0&&n(C)?t>1?Me(C,t-1,n,i,o):Wt(o,C):i||(o[o.length]=C)}return o}var li=Ts(),rs=Ts(!0);function At(e,t){return e&&li(e,t,Pe)}function hi(e,t){return e&&rs(e,t,Pe)}function lr(e,t){return Mt(t,function(n){return Bt(e[n])})}function jt(e,t){t=Gt(t,e);for(var n=0,i=t.length;e!=null&&n<i;)e=e[kt(t[n++])];return n&&n==i?e:r}function is(e,t,n){var i=t(e);return ce(e)?i:Wt(i,n(e))}function Xe(e){return e==null?e===r?bn:Sn:Yt&&Yt in xe(e)?Kc(e):tl(e)}function pi(e,t){return e>t}function ac(e,t){return e!=null&&Ce.call(e,t)}function uc(e,t){return e!=null&&t in xe(e)}function fc(e,t,n){return e>=Ke(t,n)&&e<De(t,n)}function di(e,t,n){for(var i=n?Zr:$n,o=e[0].length,f=e.length,y=f,C=E(f),x=1/0,O=[];y--;){var L=e[y];y&&t&&(L=Oe(L,rt(t))),x=Ke(L.length,x),C[y]=!n&&(t||o>=120&&L.length>=120)?new Vt(y&&L):r}L=e[0];var N=-1,K=C[0];e:for(;++N<o&&O.length<x;){var Z=L[N],re=t?t(Z):Z;if(Z=n||Z!==0?Z:0,!(K?xn(K,re):i(O,re,n))){for(y=f;--y;){var he=C[y];if(!(he?xn(he,re):i(e[y],re,n)))continue e}K&&K.push(re),O.push(Z)}}return O}function cc(e,t,n,i){return At(e,function(o,f,y){t(i,n(o),f,y)}),i}function Nn(e,t,n){t=Gt(t,e),e=Gs(e,t);var i=e==null?e:e[kt(dt(t))];return i==null?r:nt(i,e,n)}function os(e){return Ie(e)&&Xe(e)==F}function lc(e){return Ie(e)&&Xe(e)==Ft}function hc(e){return Ie(e)&&Xe(e)==ee}function Bn(e,t,n,i,o){return e===t?!0:e==null||t==null||!Ie(e)&&!Ie(t)?e!==e&&t!==t:pc(e,t,n,i,Bn,o)}function pc(e,t,n,i,o,f){var y=ce(e),C=ce(t),x=y?te:He(e),O=C?te:He(t);x=x==F?tt:x,O=O==F?tt:O;var L=x==tt,N=O==tt,K=x==O;if(K&&Xt(e)){if(!Xt(t))return!1;y=!0,L=!1}if(K&&!L)return f||(f=new _t),y||mn(e)?Fs(e,t,n,i,o,f):Wc(e,t,x,n,i,o,f);if(!(n&S)){var Z=L&&Ce.call(e,"__wrapped__"),re=N&&Ce.call(t,"__wrapped__");if(Z||re){var he=Z?e.value():e,ie=re?t.value():t;return f||(f=new _t),o(he,ie,n,i,f)}}return K?(f||(f=new _t),qc(e,t,n,i,o,f)):!1}function dc(e){return Ie(e)&&He(e)==Re}function gi(e,t,n,i){var o=n.length,f=o,y=!i;if(e==null)return!f;for(e=xe(e);o--;){var C=n[o];if(y&&C[2]?C[1]!==e[C[0]]:!(C[0]in e))return!1}for(;++o<f;){C=n[o];var x=C[0],O=e[x],L=C[1];if(y&&C[2]){if(O===r&&!(x in e))return!1}else{var N=new _t;if(i)var K=i(O,L,x,e,t,N);if(!(K===r?Bn(L,O,S|k,i,N):K))return!1}}return!0}function ss(e){if(!Le(e)||Zc(e))return!1;var t=Bt(e)?df:ru;return t.test(tn(e))}function gc(e){return Ie(e)&&Xe(e)==Ge}function vc(e){return Ie(e)&&He(e)==$e}function yc(e){return Ie(e)&&Tr(e.length)&&!!Ee[Xe(e)]}function as(e){return typeof e=="function"?e:e==null?je:typeof e=="object"?ce(e)?cs(e[0],e[1]):fs(e):Ra(e)}function vi(e){if(!Pn(e))return wf(e);var t=[];for(var n in xe(e))Ce.call(e,n)&&n!="constructor"&&t.push(n);return t}function _c(e){if(!Le(e))return el(e);var t=Pn(e),n=[];for(var i in e)i=="constructor"&&(t||!Ce.call(e,i))||n.push(i);return n}function yi(e,t){return e<t}function us(e,t){var n=-1,i=Ve(e)?E(e.length):[];return Ht(e,function(o,f,y){i[++n]=t(o,f,y)}),i}function fs(e){var t=Ii(e);return t.length==1&&t[0][2]?Hs(t[0][0],t[0][1]):function(n){return n===e||gi(n,e,t)}}function cs(e,t){return Bi(e)&&Ks(t)?Hs(kt(e),t):function(n){var i=zi(n,e);return i===r&&i===t?Gi(n,e):Bn(t,i,S|k)}}function hr(e,t,n,i,o){e!==t&&li(t,function(f,y){if(o||(o=new _t),Le(f))mc(e,t,y,n,hr,i,o);else{var C=i?i(Di(e,y),f,y+"",e,t,o):r;C===r&&(C=f),fi(e,y,C)}},Qe)}function mc(e,t,n,i,o,f,y){var C=Di(e,n),x=Di(t,n),O=y.get(x);if(O){fi(e,n,O);return}var L=f?f(C,x,n+"",e,t,y):r,N=L===r;if(N){var K=ce(x),Z=!K&&Xt(x),re=!K&&!Z&&mn(x);L=x,K||Z||re?ce(C)?L=C:Ne(C)?L=Ze(C):Z?(N=!1,L=Cs(x,!0)):re?(N=!1,L=bs(x,!0)):L=[]:Mn(x)||nn(x)?(L=C,nn(C)?L=ma(C):(!Le(C)||Bt(C))&&(L=qs(x))):N=!1}N&&(y.set(x,L),o(L,x,i,f,y),y.delete(x)),fi(e,n,L)}function ls(e,t){var n=e.length;if(n)return t+=t<0?n:0,Nt(t,n)?e[t]:r}function hs(e,t,n){t.length?t=Oe(t,function(f){return ce(f)?function(y){return jt(y,f.length===1?f[0]:f)}:f}):t=[je];var i=-1;t=Oe(t,rt(ne()));var o=us(e,function(f,y,C){var x=Oe(t,function(O){return O(f)});return{criteria:x,index:++i,value:f}});return Gu(o,function(f,y){return Ic(f,y,n)})}function wc(e,t){return ps(e,t,function(n,i){return Gi(e,i)})}function ps(e,t,n){for(var i=-1,o=t.length,f={};++i<o;){var y=t[i],C=jt(e,y);n(C,y)&&Un(f,Gt(y,e),C)}return f}function Sc(e){return function(t){return jt(t,e)}}function _i(e,t,n,i){var o=i?zu:un,f=-1,y=t.length,C=e;for(e===t&&(t=Ze(t)),n&&(C=Oe(e,rt(n)));++f<y;)for(var x=0,O=t[f],L=n?n(O):O;(x=o(C,L,x,i))>-1;)C!==e&&nr.call(C,x,1),nr.call(e,x,1);return e}function ds(e,t){for(var n=e?t.length:0,i=n-1;n--;){var o=t[n];if(n==i||o!==f){var f=o;Nt(o)?nr.call(e,o,1):Ci(e,o)}}return e}function mi(e,t){return e+or(Jo()*(t-e+1))}function Cc(e,t,n,i){for(var o=-1,f=De(ir((t-e)/(n||1)),0),y=E(f);f--;)y[i?f:++o]=e,e+=n;return y}function wi(e,t){var n="";if(!e||t<1||t>ue)return n;do t%2&&(n+=e),t=or(t/2),t&&(e+=e);while(t);return n}function de(e,t){return Pi(zs(e,t,je),e+"")}function bc(e){return Vo(wn(e))}function Ac(e,t){var n=wn(e);return Cr(n,Qt(t,0,n.length))}function Un(e,t,n,i){if(!Le(e))return e;t=Gt(t,e);for(var o=-1,f=t.length,y=f-1,C=e;C!=null&&++o<f;){var x=kt(t[o]),O=n;if(x==="__proto__"||x==="constructor"||x==="prototype")return e;if(o!=y){var L=C[x];O=i?i(L,x,C):r,O===r&&(O=Le(L)?L:Nt(t[o+1])?[]:{})}Ln(C,x,O),C=C[x]}return e}var gs=sr?function(e,t){return sr.set(e,t),e}:je,xc=rr?function(e,t){return rr(e,"toString",{configurable:!0,enumerable:!1,value:Xi(t),writable:!0})}:je;function kc(e){return Cr(wn(e))}function pt(e,t,n){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var f=E(o);++i<o;)f[i]=e[i+t];return f}function Ec(e,t){var n;return Ht(e,function(i,o,f){return n=t(i,o,f),!n}),!!n}function pr(e,t,n){var i=0,o=e==null?i:e.length;if(typeof t=="number"&&t===t&&o<=W){for(;i<o;){var f=i+o>>>1,y=e[f];y!==null&&!ot(y)&&(n?y<=t:y<t)?i=f+1:o=f}return o}return Si(e,t,je,n)}function Si(e,t,n,i){var o=0,f=e==null?0:e.length;if(f===0)return 0;t=n(t);for(var y=t!==t,C=t===null,x=ot(t),O=t===r;o<f;){var L=or((o+f)/2),N=n(e[L]),K=N!==r,Z=N===null,re=N===N,he=ot(N);if(y)var ie=i||re;else O?ie=re&&(i||K):C?ie=re&&K&&(i||!Z):x?ie=re&&K&&!Z&&(i||!he):Z||he?ie=!1:ie=i?N<=t:N<t;ie?o=L+1:f=L}return Ke(f,Kn)}function vs(e,t){for(var n=-1,i=e.length,o=0,f=[];++n<i;){var y=e[n],C=t?t(y):y;if(!n||!mt(C,x)){var x=C;f[o++]=y===0?0:y}}return f}function ys(e){return typeof e=="number"?e:ot(e)?St:+e}function it(e){if(typeof e=="string")return e;if(ce(e))return Oe(e,it)+"";if(ot(e))return Yo?Yo.call(e):"";var t=e+"";return t=="0"&&1/e==-Te?"-0":t}function zt(e,t,n){var i=-1,o=$n,f=e.length,y=!0,C=[],x=C;if(n)y=!1,o=Zr;else if(f>=c){var O=t?null:Fc(e);if(O)return Jn(O);y=!1,o=xn,x=new Vt}else x=t?[]:C;e:for(;++i<f;){var L=e[i],N=t?t(L):L;if(L=n||L!==0?L:0,y&&N===N){for(var K=x.length;K--;)if(x[K]===N)continue e;t&&x.push(N),C.push(L)}else o(x,N,n)||(x!==C&&x.push(N),C.push(L))}return C}function Ci(e,t){return t=Gt(t,e),e=Gs(e,t),e==null||delete e[kt(dt(t))]}function _s(e,t,n,i){return Un(e,t,n(jt(e,t)),i)}function dr(e,t,n,i){for(var o=e.length,f=i?o:-1;(i?f--:++f<o)&&t(e[f],f,e););return n?pt(e,i?0:f,i?f+1:o):pt(e,i?f+1:0,i?o:f)}function ms(e,t){var n=e;return n instanceof ve&&(n=n.value()),Vr(t,function(i,o){return o.func.apply(o.thisArg,Wt([i],o.args))},n)}function bi(e,t,n){var i=e.length;if(i<2)return i?zt(e[0]):[];for(var o=-1,f=E(i);++o<i;)for(var y=e[o],C=-1;++C<i;)C!=o&&(f[o]=In(f[o]||y,e[C],t,n));return zt(Me(f,1),t,n)}function ws(e,t,n){for(var i=-1,o=e.length,f=t.length,y={};++i<o;){var C=i<f?t[i]:r;n(y,e[i],C)}return y}function Ai(e){return Ne(e)?e:[]}function xi(e){return typeof e=="function"?e:je}function Gt(e,t){return ce(e)?e:Bi(e,t)?[e]:Ys(Se(e))}var Tc=de;function $t(e,t,n){var i=e.length;return n=n===r?i:n,!t&&n>=i?e:pt(e,t,n)}var Ss=gf||function(e){return Fe.clearTimeout(e)};function Cs(e,t){if(t)return e.slice();var n=e.length,i=Ho?Ho(n):new e.constructor(n);return e.copy(i),i}function ki(e){var t=new e.constructor(e.byteLength);return new er(t).set(new er(e)),t}function Rc(e,t){var n=t?ki(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function Oc(e){var t=new e.constructor(e.source,io.exec(e));return t.lastIndex=e.lastIndex,t}function Lc(e){return On?xe(On.call(e)):{}}function bs(e,t){var n=t?ki(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function As(e,t){if(e!==t){var n=e!==r,i=e===null,o=e===e,f=ot(e),y=t!==r,C=t===null,x=t===t,O=ot(t);if(!C&&!O&&!f&&e>t||f&&y&&x&&!C&&!O||i&&y&&x||!n&&x||!o)return 1;if(!i&&!f&&!O&&e<t||O&&n&&o&&!i&&!f||C&&n&&o||!y&&o||!x)return-1}return 0}function Ic(e,t,n){for(var i=-1,o=e.criteria,f=t.criteria,y=o.length,C=n.length;++i<y;){var x=As(o[i],f[i]);if(x){if(i>=C)return x;var O=n[i];return x*(O=="desc"?-1:1)}}return e.index-t.index}function xs(e,t,n,i){for(var o=-1,f=e.length,y=n.length,C=-1,x=t.length,O=De(f-y,0),L=E(x+O),N=!i;++C<x;)L[C]=t[C];for(;++o<y;)(N||o<f)&&(L[n[o]]=e[o]);for(;O--;)L[C++]=e[o++];return L}function ks(e,t,n,i){for(var o=-1,f=e.length,y=-1,C=n.length,x=-1,O=t.length,L=De(f-C,0),N=E(L+O),K=!i;++o<L;)N[o]=e[o];for(var Z=o;++x<O;)N[Z+x]=t[x];for(;++y<C;)(K||o<f)&&(N[Z+n[y]]=e[o++]);return N}function Ze(e,t){var n=-1,i=e.length;for(t||(t=E(i));++n<i;)t[n]=e[n];return t}function xt(e,t,n,i){var o=!n;n||(n={});for(var f=-1,y=t.length;++f<y;){var C=t[f],x=i?i(n[C],e[C],C,n,e):r;x===r&&(x=e[C]),o?Ot(n,C,x):Ln(n,C,x)}return n}function Nc(e,t){return xt(e,Ni(e),t)}function Bc(e,t){return xt(e,Ms(e),t)}function gr(e,t){return function(n,i){var o=ce(n)?Fu:nc,f=t?t():{};return o(n,e,ne(i,2),f)}}function vn(e){return de(function(t,n){var i=-1,o=n.length,f=o>1?n[o-1]:r,y=o>2?n[2]:r;for(f=e.length>3&&typeof f=="function"?(o--,f):r,y&&Je(n[0],n[1],y)&&(f=o<3?r:f,o=1),t=xe(t);++i<o;){var C=n[i];C&&e(t,C,i,f)}return t})}function Es(e,t){return function(n,i){if(n==null)return n;if(!Ve(n))return e(n,i);for(var o=n.length,f=t?o:-1,y=xe(n);(t?f--:++f<o)&&i(y[f],f,y)!==!1;);return n}}function Ts(e){return function(t,n,i){for(var o=-1,f=xe(t),y=i(t),C=y.length;C--;){var x=y[e?C:++o];if(n(f[x],x,f)===!1)break}return t}}function Uc(e,t,n){var i=t&T,o=Dn(e);function f(){var y=this&&this!==Fe&&this instanceof f?o:e;return y.apply(i?n:this,arguments)}return f}function Rs(e){return function(t){t=Se(t);var n=fn(t)?yt(t):r,i=n?n[0]:t.charAt(0),o=n?$t(n,1).join(""):t.slice(1);return i[e]()+o}}function yn(e){return function(t){return Vr(Ea(ka(t).replace(Au,"")),e,"")}}function Dn(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=gn(e.prototype),i=e.apply(n,t);return Le(i)?i:n}}function Dc(e,t,n){var i=Dn(e);function o(){for(var f=arguments.length,y=E(f),C=f,x=_n(o);C--;)y[C]=arguments[C];var O=f<3&&y[0]!==x&&y[f-1]!==x?[]:qt(y,x);if(f-=O.length,f<n)return Bs(e,t,vr,o.placeholder,r,y,O,r,r,n-f);var L=this&&this!==Fe&&this instanceof o?i:e;return nt(L,this,y)}return o}function Os(e){return function(t,n,i){var o=xe(t);if(!Ve(t)){var f=ne(n,3);t=Pe(t),n=function(C){return f(o[C],C,o)}}var y=e(t,n,i);return y>-1?o[f?t[y]:y]:r}}function Ls(e){return It(function(t){var n=t.length,i=n,o=lt.prototype.thru;for(e&&t.reverse();i--;){var f=t[i];if(typeof f!="function")throw new ct(w);if(o&&!y&&wr(f)=="wrapper")var y=new lt([],!0)}for(i=y?i:n;++i<n;){f=t[i];var C=wr(f),x=C=="wrapper"?Li(f):r;x&&Ui(x[0])&&x[1]==(M|Y|z|H)&&!x[4].length&&x[9]==1?y=y[wr(x[0])].apply(y,x[3]):y=f.length==1&&Ui(f)?y[C]():y.thru(f)}return function(){var O=arguments,L=O[0];if(y&&O.length==1&&ce(L))return y.plant(L).value();for(var N=0,K=n?t[N].apply(this,O):L;++N<n;)K=t[N].call(this,K);return K}})}function vr(e,t,n,i,o,f,y,C,x,O){var L=t&M,N=t&T,K=t&q,Z=t&(Y|se),re=t&I,he=K?r:Dn(e);function ie(){for(var ge=arguments.length,ye=E(ge),st=ge;st--;)ye[st]=arguments[st];if(Z)var Ye=_n(ie),at=Xu(ye,Ye);if(i&&(ye=xs(ye,i,o,Z)),f&&(ye=ks(ye,f,y,Z)),ge-=at,Z&&ge<O){var Be=qt(ye,Ye);return Bs(e,t,vr,ie.placeholder,n,ye,Be,C,x,O-ge)}var wt=N?n:this,Dt=K?wt[e]:e;return ge=ye.length,C?ye=nl(ye,C):re&&ge>1&&ye.reverse(),L&&x<ge&&(ye.length=x),this&&this!==Fe&&this instanceof ie&&(Dt=he||Dn(Dt)),Dt.apply(wt,ye)}return ie}function Is(e,t){return function(n,i){return cc(n,e,t(i),{})}}function yr(e,t){return function(n,i){var o;if(n===r&&i===r)return t;if(n!==r&&(o=n),i!==r){if(o===r)return i;typeof n=="string"||typeof i=="string"?(n=it(n),i=it(i)):(n=ys(n),i=ys(i)),o=e(n,i)}return o}}function Ei(e){return It(function(t){return t=Oe(t,rt(ne())),de(function(n){var i=this;return e(t,function(o){return nt(o,i,n)})})})}function _r(e,t){t=t===r?" ":it(t);var n=t.length;if(n<2)return n?wi(t,e):t;var i=wi(t,ir(e/cn(t)));return fn(t)?$t(yt(i),0,e).join(""):i.slice(0,e)}function Pc(e,t,n,i){var o=t&T,f=Dn(e);function y(){for(var C=-1,x=arguments.length,O=-1,L=i.length,N=E(L+x),K=this&&this!==Fe&&this instanceof y?f:e;++O<L;)N[O]=i[O];for(;x--;)N[O++]=arguments[++C];return nt(K,o?n:this,N)}return y}function Ns(e){return function(t,n,i){return i&&typeof i!="number"&&Je(t,n,i)&&(n=i=r),t=Ut(t),n===r?(n=t,t=0):n=Ut(n),i=i===r?t<n?1:-1:Ut(i),Cc(t,n,i,e)}}function mr(e){return function(t,n){return typeof t=="string"&&typeof n=="string"||(t=gt(t),n=gt(n)),e(t,n)}}function Bs(e,t,n,i,o,f,y,C,x,O){var L=t&Y,N=L?y:r,K=L?r:y,Z=L?f:r,re=L?r:f;t|=L?z:D,t&=~(L?D:z),t&oe||(t&=~(T|q));var he=[e,t,o,Z,N,re,K,C,x,O],ie=n.apply(r,he);return Ui(e)&&$s(ie,he),ie.placeholder=i,Xs(ie,e,t)}function Ti(e){var t=Ue[e];return function(n,i){if(n=gt(n),i=i==null?0:Ke(le(i),292),i&&Xo(n)){var o=(Se(n)+"e").split("e"),f=t(o[0]+"e"+(+o[1]+i));return o=(Se(f)+"e").split("e"),+(o[0]+"e"+(+o[1]-i))}return t(n)}}var Fc=pn&&1/Jn(new pn([,-0]))[1]==Te?function(e){return new pn(e)}:Zi;function Us(e){return function(t){var n=He(t);return n==Re?ii(t):n==$e?ef(t):$u(t,e(t))}}function Lt(e,t,n,i,o,f,y,C){var x=t&q;if(!x&&typeof e!="function")throw new ct(w);var O=i?i.length:0;if(O||(t&=~(z|D),i=o=r),y=y===r?y:De(le(y),0),C=C===r?C:le(C),O-=o?o.length:0,t&D){var L=i,N=o;i=o=r}var K=x?r:Li(e),Z=[e,t,n,i,o,L,N,f,y,C];if(K&&jc(Z,K),e=Z[0],t=Z[1],n=Z[2],i=Z[3],o=Z[4],C=Z[9]=Z[9]===r?x?0:e.length:De(Z[9]-O,0),!C&&t&(Y|se)&&(t&=~(Y|se)),!t||t==T)var re=Uc(e,t,n);else t==Y||t==se?re=Dc(e,t,C):(t==z||t==(T|z))&&!o.length?re=Pc(e,t,n,i):re=vr.apply(r,Z);var he=K?gs:$s;return Xs(he(re,Z),e,t)}function Ds(e,t,n,i){return e===r||mt(e,hn[n])&&!Ce.call(i,n)?t:e}function Ps(e,t,n,i,o,f){return Le(e)&&Le(t)&&(f.set(t,e),hr(e,t,r,Ps,f),f.delete(t)),e}function Mc(e){return Mn(e)?r:e}function Fs(e,t,n,i,o,f){var y=n&S,C=e.length,x=t.length;if(C!=x&&!(y&&x>C))return!1;var O=f.get(e),L=f.get(t);if(O&&L)return O==t&&L==e;var N=-1,K=!0,Z=n&k?new Vt:r;for(f.set(e,t),f.set(t,e);++N<C;){var re=e[N],he=t[N];if(i)var ie=y?i(he,re,N,t,e,f):i(re,he,N,e,t,f);if(ie!==r){if(ie)continue;K=!1;break}if(Z){if(!Qr(t,function(ge,ye){if(!xn(Z,ye)&&(re===ge||o(re,ge,n,i,f)))return Z.push(ye)})){K=!1;break}}else if(!(re===he||o(re,he,n,i,f))){K=!1;break}}return f.delete(e),f.delete(t),K}function Wc(e,t,n,i,o,f,y){switch(n){case sn:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ft:return!(e.byteLength!=t.byteLength||!f(new er(e),new er(t)));case Q:case ee:case vt:return mt(+e,+t);case ae:return e.name==t.name&&e.message==t.message;case Ge:case Ct:return e==t+"";case Re:var C=ii;case $e:var x=i&S;if(C||(C=Jn),e.size!=t.size&&!x)return!1;var O=y.get(e);if(O)return O==t;i|=k,y.set(e,t);var L=Fs(C(e),C(t),i,o,f,y);return y.delete(e),L;case bt:if(On)return On.call(e)==On.call(t)}return!1}function qc(e,t,n,i,o,f){var y=n&S,C=Ri(e),x=C.length,O=Ri(t),L=O.length;if(x!=L&&!y)return!1;for(var N=x;N--;){var K=C[N];if(!(y?K in t:Ce.call(t,K)))return!1}var Z=f.get(e),re=f.get(t);if(Z&&re)return Z==t&&re==e;var he=!0;f.set(e,t),f.set(t,e);for(var ie=y;++N<x;){K=C[N];var ge=e[K],ye=t[K];if(i)var st=y?i(ye,ge,K,t,e,f):i(ge,ye,K,e,t,f);if(!(st===r?ge===ye||o(ge,ye,n,i,f):st)){he=!1;break}ie||(ie=K=="constructor")}if(he&&!ie){var Ye=e.constructor,at=t.constructor;Ye!=at&&"constructor"in e&&"constructor"in t&&!(typeof Ye=="function"&&Ye instanceof Ye&&typeof at=="function"&&at instanceof at)&&(he=!1)}return f.delete(e),f.delete(t),he}function It(e){return Pi(zs(e,r,js),e+"")}function Ri(e){return is(e,Pe,Ni)}function Oi(e){return is(e,Qe,Ms)}var Li=sr?function(e){return sr.get(e)}:Zi;function wr(e){for(var t=e.name+"",n=dn[t],i=Ce.call(dn,t)?n.length:0;i--;){var o=n[i],f=o.func;if(f==null||f==e)return o.name}return t}function _n(e){var t=Ce.call(u,"placeholder")?u:e;return t.placeholder}function ne(){var e=u.iteratee||Ji;return e=e===Ji?as:e,arguments.length?e(arguments[0],arguments[1]):e}function Sr(e,t){var n=e.__data__;return Yc(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Ii(e){for(var t=Pe(e),n=t.length;n--;){var i=t[n],o=e[i];t[n]=[i,o,Ks(o)]}return t}function en(e,t){var n=Vu(e,t);return ss(n)?n:r}function Kc(e){var t=Ce.call(e,Yt),n=e[Yt];try{e[Yt]=r;var i=!0}catch{}var o=Qn.call(e);return i&&(t?e[Yt]=n:delete e[Yt]),o}var Ni=si?function(e){return e==null?[]:(e=xe(e),Mt(si(e),function(t){return Go.call(e,t)}))}:Vi,Ms=si?function(e){for(var t=[];e;)Wt(t,Ni(e)),e=tr(e);return t}:Vi,He=Xe;(ai&&He(new ai(new ArrayBuffer(1)))!=sn||En&&He(new En)!=Re||ui&&He(ui.resolve())!=on||pn&&He(new pn)!=$e||Tn&&He(new Tn)!=Et)&&(He=function(e){var t=Xe(e),n=t==tt?e.constructor:r,i=n?tn(n):"";if(i)switch(i){case Af:return sn;case xf:return Re;case kf:return on;case Ef:return $e;case Tf:return Et}return t});function Hc(e,t,n){for(var i=-1,o=n.length;++i<o;){var f=n[i],y=f.size;switch(f.type){case"drop":e+=y;break;case"dropRight":t-=y;break;case"take":t=Ke(t,e+y);break;case"takeRight":e=De(e,t-y);break}}return{start:e,end:t}}function zc(e){var t=e.match(Ya);return t?t[1].split(Za):[]}function Ws(e,t,n){t=Gt(t,e);for(var i=-1,o=t.length,f=!1;++i<o;){var y=kt(t[i]);if(!(f=e!=null&&n(e,y)))break;e=e[y]}return f||++i!=o?f:(o=e==null?0:e.length,!!o&&Tr(o)&&Nt(y,o)&&(ce(e)||nn(e)))}function Gc(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&Ce.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function qs(e){return typeof e.constructor=="function"&&!Pn(e)?gn(tr(e)):{}}function $c(e,t,n){var i=e.constructor;switch(t){case Ft:return ki(e);case Q:case ee:return new i(+e);case sn:return Rc(e,n);case Ir:case Nr:case Br:case Ur:case Dr:case Pr:case Fr:case Mr:case Wr:return bs(e,n);case Re:return new i;case vt:case Ct:return new i(e);case Ge:return Oc(e);case $e:return new i;case bt:return Lc(e)}}function Xc(e,t){var n=t.length;if(!n)return e;var i=n-1;return t[i]=(n>1?"& ":"")+t[i],t=t.join(n>2?", ":" "),e.replace(Ja,`{
14
- /* [wrapped with `+t+`] */
15
- `)}function Jc(e){return ce(e)||nn(e)||!!($o&&e&&e[$o])}function Nt(e,t){var n=typeof e;return t=t??ue,!!t&&(n=="number"||n!="symbol"&&ou.test(e))&&e>-1&&e%1==0&&e<t}function Je(e,t,n){if(!Le(n))return!1;var i=typeof t;return(i=="number"?Ve(n)&&Nt(t,n.length):i=="string"&&t in n)?mt(n[t],e):!1}function Bi(e,t){if(ce(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||ot(e)?!0:za.test(e)||!Ha.test(e)||t!=null&&e in xe(t)}function Yc(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ui(e){var t=wr(e),n=u[t];if(typeof n!="function"||!(t in ve.prototype))return!1;if(e===n)return!0;var i=Li(n);return!!i&&e===i[0]}function Zc(e){return!!Ko&&Ko in e}var Vc=Zn?Bt:Qi;function Pn(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||hn;return e===n}function Ks(e){return e===e&&!Le(e)}function Hs(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==r||e in xe(n))}}function Qc(e){var t=kr(e,function(i){return n.size===h&&n.clear(),i}),n=t.cache;return t}function jc(e,t){var n=e[1],i=t[1],o=n|i,f=o<(T|q|M),y=i==M&&n==Y||i==M&&n==H&&e[7].length<=t[8]||i==(M|H)&&t[7].length<=t[8]&&n==Y;if(!(f||y))return e;i&T&&(e[2]=t[2],o|=n&T?0:oe);var C=t[3];if(C){var x=e[3];e[3]=x?xs(x,C,t[4]):C,e[4]=x?qt(e[3],_):t[4]}return C=t[5],C&&(x=e[5],e[5]=x?ks(x,C,t[6]):C,e[6]=x?qt(e[5],_):t[6]),C=t[7],C&&(e[7]=C),i&M&&(e[8]=e[8]==null?t[8]:Ke(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=o,e}function el(e){var t=[];if(e!=null)for(var n in xe(e))t.push(n);return t}function tl(e){return Qn.call(e)}function zs(e,t,n){return t=De(t===r?e.length-1:t,0),function(){for(var i=arguments,o=-1,f=De(i.length-t,0),y=E(f);++o<f;)y[o]=i[t+o];o=-1;for(var C=E(t+1);++o<t;)C[o]=i[o];return C[t]=n(y),nt(e,this,C)}}function Gs(e,t){return t.length<2?e:jt(e,pt(t,0,-1))}function nl(e,t){for(var n=e.length,i=Ke(t.length,n),o=Ze(e);i--;){var f=t[i];e[i]=Nt(f,n)?o[f]:r}return e}function Di(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var $s=Js(gs),Fn=yf||function(e,t){return Fe.setTimeout(e,t)},Pi=Js(xc);function Xs(e,t,n){var i=t+"";return Pi(e,Xc(i,rl(zc(i),n)))}function Js(e){var t=0,n=0;return function(){var i=Sf(),o=V-(i-n);if(n=i,o>0){if(++t>=j)return arguments[0]}else t=0;return e.apply(r,arguments)}}function Cr(e,t){var n=-1,i=e.length,o=i-1;for(t=t===r?i:t;++n<t;){var f=mi(n,o),y=e[f];e[f]=e[n],e[n]=y}return e.length=t,e}var Ys=Qc(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Ga,function(n,i,o,f){t.push(o?f.replace(ja,"$1"):i||n)}),t});function kt(e){if(typeof e=="string"||ot(e))return e;var t=e+"";return t=="0"&&1/e==-Te?"-0":t}function tn(e){if(e!=null){try{return Vn.call(e)}catch{}try{return e+""}catch{}}return""}function rl(e,t){return ft(J,function(n){var i="_."+n[0];t&n[1]&&!$n(e,i)&&e.push(i)}),e.sort()}function Zs(e){if(e instanceof ve)return e.clone();var t=new lt(e.__wrapped__,e.__chain__);return t.__actions__=Ze(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function il(e,t,n){(n?Je(e,t,n):t===r)?t=1:t=De(le(t),0);var i=e==null?0:e.length;if(!i||t<1)return[];for(var o=0,f=0,y=E(ir(i/t));o<i;)y[f++]=pt(e,o,o+=t);return y}function ol(e){for(var t=-1,n=e==null?0:e.length,i=0,o=[];++t<n;){var f=e[t];f&&(o[i++]=f)}return o}function sl(){var e=arguments.length;if(!e)return[];for(var t=E(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Wt(ce(n)?Ze(n):[n],Me(t,1))}var al=de(function(e,t){return Ne(e)?In(e,Me(t,1,Ne,!0)):[]}),ul=de(function(e,t){var n=dt(t);return Ne(n)&&(n=r),Ne(e)?In(e,Me(t,1,Ne,!0),ne(n,2)):[]}),fl=de(function(e,t){var n=dt(t);return Ne(n)&&(n=r),Ne(e)?In(e,Me(t,1,Ne,!0),r,n):[]});function cl(e,t,n){var i=e==null?0:e.length;return i?(t=n||t===r?1:le(t),pt(e,t<0?0:t,i)):[]}function ll(e,t,n){var i=e==null?0:e.length;return i?(t=n||t===r?1:le(t),t=i-t,pt(e,0,t<0?0:t)):[]}function hl(e,t){return e&&e.length?dr(e,ne(t,3),!0,!0):[]}function pl(e,t){return e&&e.length?dr(e,ne(t,3),!0):[]}function dl(e,t,n,i){var o=e==null?0:e.length;return o?(n&&typeof n!="number"&&Je(e,t,n)&&(n=0,i=o),sc(e,t,n,i)):[]}function Vs(e,t,n){var i=e==null?0:e.length;if(!i)return-1;var o=n==null?0:le(n);return o<0&&(o=De(i+o,0)),Xn(e,ne(t,3),o)}function Qs(e,t,n){var i=e==null?0:e.length;if(!i)return-1;var o=i-1;return n!==r&&(o=le(n),o=n<0?De(i+o,0):Ke(o,i-1)),Xn(e,ne(t,3),o,!0)}function js(e){var t=e==null?0:e.length;return t?Me(e,1):[]}function gl(e){var t=e==null?0:e.length;return t?Me(e,Te):[]}function vl(e,t){var n=e==null?0:e.length;return n?(t=t===r?1:le(t),Me(e,t)):[]}function yl(e){for(var t=-1,n=e==null?0:e.length,i={};++t<n;){var o=e[t];i[o[0]]=o[1]}return i}function ea(e){return e&&e.length?e[0]:r}function _l(e,t,n){var i=e==null?0:e.length;if(!i)return-1;var o=n==null?0:le(n);return o<0&&(o=De(i+o,0)),un(e,t,o)}function ml(e){var t=e==null?0:e.length;return t?pt(e,0,-1):[]}var wl=de(function(e){var t=Oe(e,Ai);return t.length&&t[0]===e[0]?di(t):[]}),Sl=de(function(e){var t=dt(e),n=Oe(e,Ai);return t===dt(n)?t=r:n.pop(),n.length&&n[0]===e[0]?di(n,ne(t,2)):[]}),Cl=de(function(e){var t=dt(e),n=Oe(e,Ai);return t=typeof t=="function"?t:r,t&&n.pop(),n.length&&n[0]===e[0]?di(n,r,t):[]});function bl(e,t){return e==null?"":mf.call(e,t)}function dt(e){var t=e==null?0:e.length;return t?e[t-1]:r}function Al(e,t,n){var i=e==null?0:e.length;if(!i)return-1;var o=i;return n!==r&&(o=le(n),o=o<0?De(i+o,0):Ke(o,i-1)),t===t?nf(e,t,o):Xn(e,Bo,o,!0)}function xl(e,t){return e&&e.length?ls(e,le(t)):r}var kl=de(ta);function ta(e,t){return e&&e.length&&t&&t.length?_i(e,t):e}function El(e,t,n){return e&&e.length&&t&&t.length?_i(e,t,ne(n,2)):e}function Tl(e,t,n){return e&&e.length&&t&&t.length?_i(e,t,r,n):e}var Rl=It(function(e,t){var n=e==null?0:e.length,i=ci(e,t);return ds(e,Oe(t,function(o){return Nt(o,n)?+o:o}).sort(As)),i});function Ol(e,t){var n=[];if(!(e&&e.length))return n;var i=-1,o=[],f=e.length;for(t=ne(t,3);++i<f;){var y=e[i];t(y,i,e)&&(n.push(y),o.push(i))}return ds(e,o),n}function Fi(e){return e==null?e:bf.call(e)}function Ll(e,t,n){var i=e==null?0:e.length;return i?(n&&typeof n!="number"&&Je(e,t,n)?(t=0,n=i):(t=t==null?0:le(t),n=n===r?i:le(n)),pt(e,t,n)):[]}function Il(e,t){return pr(e,t)}function Nl(e,t,n){return Si(e,t,ne(n,2))}function Bl(e,t){var n=e==null?0:e.length;if(n){var i=pr(e,t);if(i<n&&mt(e[i],t))return i}return-1}function Ul(e,t){return pr(e,t,!0)}function Dl(e,t,n){return Si(e,t,ne(n,2),!0)}function Pl(e,t){var n=e==null?0:e.length;if(n){var i=pr(e,t,!0)-1;if(mt(e[i],t))return i}return-1}function Fl(e){return e&&e.length?vs(e):[]}function Ml(e,t){return e&&e.length?vs(e,ne(t,2)):[]}function Wl(e){var t=e==null?0:e.length;return t?pt(e,1,t):[]}function ql(e,t,n){return e&&e.length?(t=n||t===r?1:le(t),pt(e,0,t<0?0:t)):[]}function Kl(e,t,n){var i=e==null?0:e.length;return i?(t=n||t===r?1:le(t),t=i-t,pt(e,t<0?0:t,i)):[]}function Hl(e,t){return e&&e.length?dr(e,ne(t,3),!1,!0):[]}function zl(e,t){return e&&e.length?dr(e,ne(t,3)):[]}var Gl=de(function(e){return zt(Me(e,1,Ne,!0))}),$l=de(function(e){var t=dt(e);return Ne(t)&&(t=r),zt(Me(e,1,Ne,!0),ne(t,2))}),Xl=de(function(e){var t=dt(e);return t=typeof t=="function"?t:r,zt(Me(e,1,Ne,!0),r,t)});function Jl(e){return e&&e.length?zt(e):[]}function Yl(e,t){return e&&e.length?zt(e,ne(t,2)):[]}function Zl(e,t){return t=typeof t=="function"?t:r,e&&e.length?zt(e,r,t):[]}function Mi(e){if(!(e&&e.length))return[];var t=0;return e=Mt(e,function(n){if(Ne(n))return t=De(n.length,t),!0}),ni(t,function(n){return Oe(e,jr(n))})}function na(e,t){if(!(e&&e.length))return[];var n=Mi(e);return t==null?n:Oe(n,function(i){return nt(t,r,i)})}var Vl=de(function(e,t){return Ne(e)?In(e,t):[]}),Ql=de(function(e){return bi(Mt(e,Ne))}),jl=de(function(e){var t=dt(e);return Ne(t)&&(t=r),bi(Mt(e,Ne),ne(t,2))}),eh=de(function(e){var t=dt(e);return t=typeof t=="function"?t:r,bi(Mt(e,Ne),r,t)}),th=de(Mi);function nh(e,t){return ws(e||[],t||[],Ln)}function rh(e,t){return ws(e||[],t||[],Un)}var ih=de(function(e){var t=e.length,n=t>1?e[t-1]:r;return n=typeof n=="function"?(e.pop(),n):r,na(e,n)});function ra(e){var t=u(e);return t.__chain__=!0,t}function oh(e,t){return t(e),e}function br(e,t){return t(e)}var sh=It(function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,o=function(f){return ci(f,e)};return t>1||this.__actions__.length||!(i instanceof ve)||!Nt(n)?this.thru(o):(i=i.slice(n,+n+(t?1:0)),i.__actions__.push({func:br,args:[o],thisArg:r}),new lt(i,this.__chain__).thru(function(f){return t&&!f.length&&f.push(r),f}))});function ah(){return ra(this)}function uh(){return new lt(this.value(),this.__chain__)}function fh(){this.__values__===r&&(this.__values__=ya(this.value()));var e=this.__index__>=this.__values__.length,t=e?r:this.__values__[this.__index__++];return{done:e,value:t}}function ch(){return this}function lh(e){for(var t,n=this;n instanceof ur;){var i=Zs(n);i.__index__=0,i.__values__=r,t?o.__wrapped__=i:t=i;var o=i;n=n.__wrapped__}return o.__wrapped__=e,t}function hh(){var e=this.__wrapped__;if(e instanceof ve){var t=e;return this.__actions__.length&&(t=new ve(this)),t=t.reverse(),t.__actions__.push({func:br,args:[Fi],thisArg:r}),new lt(t,this.__chain__)}return this.thru(Fi)}function ph(){return ms(this.__wrapped__,this.__actions__)}var dh=gr(function(e,t,n){Ce.call(e,n)?++e[n]:Ot(e,n,1)});function gh(e,t,n){var i=ce(e)?Io:oc;return n&&Je(e,t,n)&&(t=r),i(e,ne(t,3))}function vh(e,t){var n=ce(e)?Mt:ns;return n(e,ne(t,3))}var yh=Os(Vs),_h=Os(Qs);function mh(e,t){return Me(Ar(e,t),1)}function wh(e,t){return Me(Ar(e,t),Te)}function Sh(e,t,n){return n=n===r?1:le(n),Me(Ar(e,t),n)}function ia(e,t){var n=ce(e)?ft:Ht;return n(e,ne(t,3))}function oa(e,t){var n=ce(e)?Mu:ts;return n(e,ne(t,3))}var Ch=gr(function(e,t,n){Ce.call(e,n)?e[n].push(t):Ot(e,n,[t])});function bh(e,t,n,i){e=Ve(e)?e:wn(e),n=n&&!i?le(n):0;var o=e.length;return n<0&&(n=De(o+n,0)),Rr(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&un(e,t,n)>-1}var Ah=de(function(e,t,n){var i=-1,o=typeof t=="function",f=Ve(e)?E(e.length):[];return Ht(e,function(y){f[++i]=o?nt(t,y,n):Nn(y,t,n)}),f}),xh=gr(function(e,t,n){Ot(e,n,t)});function Ar(e,t){var n=ce(e)?Oe:us;return n(e,ne(t,3))}function kh(e,t,n,i){return e==null?[]:(ce(t)||(t=t==null?[]:[t]),n=i?r:n,ce(n)||(n=n==null?[]:[n]),hs(e,t,n))}var Eh=gr(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});function Th(e,t,n){var i=ce(e)?Vr:Do,o=arguments.length<3;return i(e,ne(t,4),n,o,Ht)}function Rh(e,t,n){var i=ce(e)?Wu:Do,o=arguments.length<3;return i(e,ne(t,4),n,o,ts)}function Oh(e,t){var n=ce(e)?Mt:ns;return n(e,Er(ne(t,3)))}function Lh(e){var t=ce(e)?Vo:bc;return t(e)}function Ih(e,t,n){(n?Je(e,t,n):t===r)?t=1:t=le(t);var i=ce(e)?ec:Ac;return i(e,t)}function Nh(e){var t=ce(e)?tc:kc;return t(e)}function Bh(e){if(e==null)return 0;if(Ve(e))return Rr(e)?cn(e):e.length;var t=He(e);return t==Re||t==$e?e.size:vi(e).length}function Uh(e,t,n){var i=ce(e)?Qr:Ec;return n&&Je(e,t,n)&&(t=r),i(e,ne(t,3))}var Dh=de(function(e,t){if(e==null)return[];var n=t.length;return n>1&&Je(e,t[0],t[1])?t=[]:n>2&&Je(t[0],t[1],t[2])&&(t=[t[0]]),hs(e,Me(t,1),[])}),xr=vf||function(){return Fe.Date.now()};function Ph(e,t){if(typeof t!="function")throw new ct(w);return e=le(e),function(){if(--e<1)return t.apply(this,arguments)}}function sa(e,t,n){return t=n?r:t,t=e&&t==null?e.length:t,Lt(e,M,r,r,r,r,t)}function aa(e,t){var n;if(typeof t!="function")throw new ct(w);return e=le(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=r),n}}var Wi=de(function(e,t,n){var i=T;if(n.length){var o=qt(n,_n(Wi));i|=z}return Lt(e,i,t,n,o)}),ua=de(function(e,t,n){var i=T|q;if(n.length){var o=qt(n,_n(ua));i|=z}return Lt(t,i,e,n,o)});function fa(e,t,n){t=n?r:t;var i=Lt(e,Y,r,r,r,r,r,t);return i.placeholder=fa.placeholder,i}function ca(e,t,n){t=n?r:t;var i=Lt(e,se,r,r,r,r,r,t);return i.placeholder=ca.placeholder,i}function la(e,t,n){var i,o,f,y,C,x,O=0,L=!1,N=!1,K=!0;if(typeof e!="function")throw new ct(w);t=gt(t)||0,Le(n)&&(L=!!n.leading,N="maxWait"in n,f=N?De(gt(n.maxWait)||0,t):f,K="trailing"in n?!!n.trailing:K);function Z(Be){var wt=i,Dt=o;return i=o=r,O=Be,y=e.apply(Dt,wt),y}function re(Be){return O=Be,C=Fn(ge,t),L?Z(Be):y}function he(Be){var wt=Be-x,Dt=Be-O,Oa=t-wt;return N?Ke(Oa,f-Dt):Oa}function ie(Be){var wt=Be-x,Dt=Be-O;return x===r||wt>=t||wt<0||N&&Dt>=f}function ge(){var Be=xr();if(ie(Be))return ye(Be);C=Fn(ge,he(Be))}function ye(Be){return C=r,K&&i?Z(Be):(i=o=r,y)}function st(){C!==r&&Ss(C),O=0,i=x=o=C=r}function Ye(){return C===r?y:ye(xr())}function at(){var Be=xr(),wt=ie(Be);if(i=arguments,o=this,x=Be,wt){if(C===r)return re(x);if(N)return Ss(C),C=Fn(ge,t),Z(x)}return C===r&&(C=Fn(ge,t)),y}return at.cancel=st,at.flush=Ye,at}var Fh=de(function(e,t){return es(e,1,t)}),Mh=de(function(e,t,n){return es(e,gt(t)||0,n)});function Wh(e){return Lt(e,I)}function kr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new ct(w);var n=function(){var i=arguments,o=t?t.apply(this,i):i[0],f=n.cache;if(f.has(o))return f.get(o);var y=e.apply(this,i);return n.cache=f.set(o,y)||f,y};return n.cache=new(kr.Cache||Rt),n}kr.Cache=Rt;function Er(e){if(typeof e!="function")throw new ct(w);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function qh(e){return aa(2,e)}var Kh=Tc(function(e,t){t=t.length==1&&ce(t[0])?Oe(t[0],rt(ne())):Oe(Me(t,1),rt(ne()));var n=t.length;return de(function(i){for(var o=-1,f=Ke(i.length,n);++o<f;)i[o]=t[o].call(this,i[o]);return nt(e,this,i)})}),qi=de(function(e,t){var n=qt(t,_n(qi));return Lt(e,z,r,t,n)}),ha=de(function(e,t){var n=qt(t,_n(ha));return Lt(e,D,r,t,n)}),Hh=It(function(e,t){return Lt(e,H,r,r,r,t)});function zh(e,t){if(typeof e!="function")throw new ct(w);return t=t===r?t:le(t),de(e,t)}function Gh(e,t){if(typeof e!="function")throw new ct(w);return t=t==null?0:De(le(t),0),de(function(n){var i=n[t],o=$t(n,0,t);return i&&Wt(o,i),nt(e,this,o)})}function $h(e,t,n){var i=!0,o=!0;if(typeof e!="function")throw new ct(w);return Le(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),la(e,t,{leading:i,maxWait:t,trailing:o})}function Xh(e){return sa(e,1)}function Jh(e,t){return qi(xi(t),e)}function Yh(){if(!arguments.length)return[];var e=arguments[0];return ce(e)?e:[e]}function Zh(e){return ht(e,s)}function Vh(e,t){return t=typeof t=="function"?t:r,ht(e,s,t)}function Qh(e){return ht(e,p|s)}function jh(e,t){return t=typeof t=="function"?t:r,ht(e,p|s,t)}function ep(e,t){return t==null||jo(e,t,Pe(t))}function mt(e,t){return e===t||e!==e&&t!==t}var tp=mr(pi),np=mr(function(e,t){return e>=t}),nn=os(function(){return arguments}())?os:function(e){return Ie(e)&&Ce.call(e,"callee")&&!Go.call(e,"callee")},ce=E.isArray,rp=ko?rt(ko):lc;function Ve(e){return e!=null&&Tr(e.length)&&!Bt(e)}function Ne(e){return Ie(e)&&Ve(e)}function ip(e){return e===!0||e===!1||Ie(e)&&Xe(e)==Q}var Xt=_f||Qi,op=Eo?rt(Eo):hc;function sp(e){return Ie(e)&&e.nodeType===1&&!Mn(e)}function ap(e){if(e==null)return!0;if(Ve(e)&&(ce(e)||typeof e=="string"||typeof e.splice=="function"||Xt(e)||mn(e)||nn(e)))return!e.length;var t=He(e);if(t==Re||t==$e)return!e.size;if(Pn(e))return!vi(e).length;for(var n in e)if(Ce.call(e,n))return!1;return!0}function up(e,t){return Bn(e,t)}function fp(e,t,n){n=typeof n=="function"?n:r;var i=n?n(e,t):r;return i===r?Bn(e,t,r,n):!!i}function Ki(e){if(!Ie(e))return!1;var t=Xe(e);return t==ae||t==$||typeof e.message=="string"&&typeof e.name=="string"&&!Mn(e)}function cp(e){return typeof e=="number"&&Xo(e)}function Bt(e){if(!Le(e))return!1;var t=Xe(e);return t==we||t==qe||t==P||t==Cn}function pa(e){return typeof e=="number"&&e==le(e)}function Tr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ue}function Le(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Ie(e){return e!=null&&typeof e=="object"}var da=To?rt(To):dc;function lp(e,t){return e===t||gi(e,t,Ii(t))}function hp(e,t,n){return n=typeof n=="function"?n:r,gi(e,t,Ii(t),n)}function pp(e){return ga(e)&&e!=+e}function dp(e){if(Vc(e))throw new fe(g);return ss(e)}function gp(e){return e===null}function vp(e){return e==null}function ga(e){return typeof e=="number"||Ie(e)&&Xe(e)==vt}function Mn(e){if(!Ie(e)||Xe(e)!=tt)return!1;var t=tr(e);if(t===null)return!0;var n=Ce.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Vn.call(n)==hf}var Hi=Ro?rt(Ro):gc;function yp(e){return pa(e)&&e>=-ue&&e<=ue}var va=Oo?rt(Oo):vc;function Rr(e){return typeof e=="string"||!ce(e)&&Ie(e)&&Xe(e)==Ct}function ot(e){return typeof e=="symbol"||Ie(e)&&Xe(e)==bt}var mn=Lo?rt(Lo):yc;function _p(e){return e===r}function mp(e){return Ie(e)&&He(e)==Et}function wp(e){return Ie(e)&&Xe(e)==An}var Sp=mr(yi),Cp=mr(function(e,t){return e<=t});function ya(e){if(!e)return[];if(Ve(e))return Rr(e)?yt(e):Ze(e);if(kn&&e[kn])return ju(e[kn]());var t=He(e),n=t==Re?ii:t==$e?Jn:wn;return n(e)}function Ut(e){if(!e)return e===0?e:0;if(e=gt(e),e===Te||e===-Te){var t=e<0?-1:1;return t*We}return e===e?e:0}function le(e){var t=Ut(e),n=t%1;return t===t?n?t-n:t:0}function _a(e){return e?Qt(le(e),0,et):0}function gt(e){if(typeof e=="number")return e;if(ot(e))return St;if(Le(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Le(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Po(e);var n=nu.test(e);return n||iu.test(e)?Du(e.slice(2),n?2:8):tu.test(e)?St:+e}function ma(e){return xt(e,Qe(e))}function bp(e){return e?Qt(le(e),-ue,ue):e===0?e:0}function Se(e){return e==null?"":it(e)}var Ap=vn(function(e,t){if(Pn(t)||Ve(t)){xt(t,Pe(t),e);return}for(var n in t)Ce.call(t,n)&&Ln(e,n,t[n])}),wa=vn(function(e,t){xt(t,Qe(t),e)}),Or=vn(function(e,t,n,i){xt(t,Qe(t),e,i)}),xp=vn(function(e,t,n,i){xt(t,Pe(t),e,i)}),kp=It(ci);function Ep(e,t){var n=gn(e);return t==null?n:Qo(n,t)}var Tp=de(function(e,t){e=xe(e);var n=-1,i=t.length,o=i>2?t[2]:r;for(o&&Je(t[0],t[1],o)&&(i=1);++n<i;)for(var f=t[n],y=Qe(f),C=-1,x=y.length;++C<x;){var O=y[C],L=e[O];(L===r||mt(L,hn[O])&&!Ce.call(e,O))&&(e[O]=f[O])}return e}),Rp=de(function(e){return e.push(r,Ps),nt(Sa,r,e)});function Op(e,t){return No(e,ne(t,3),At)}function Lp(e,t){return No(e,ne(t,3),hi)}function Ip(e,t){return e==null?e:li(e,ne(t,3),Qe)}function Np(e,t){return e==null?e:rs(e,ne(t,3),Qe)}function Bp(e,t){return e&&At(e,ne(t,3))}function Up(e,t){return e&&hi(e,ne(t,3))}function Dp(e){return e==null?[]:lr(e,Pe(e))}function Pp(e){return e==null?[]:lr(e,Qe(e))}function zi(e,t,n){var i=e==null?r:jt(e,t);return i===r?n:i}function Fp(e,t){return e!=null&&Ws(e,t,ac)}function Gi(e,t){return e!=null&&Ws(e,t,uc)}var Mp=Is(function(e,t,n){t!=null&&typeof t.toString!="function"&&(t=Qn.call(t)),e[t]=n},Xi(je)),Wp=Is(function(e,t,n){t!=null&&typeof t.toString!="function"&&(t=Qn.call(t)),Ce.call(e,t)?e[t].push(n):e[t]=[n]},ne),qp=de(Nn);function Pe(e){return Ve(e)?Zo(e):vi(e)}function Qe(e){return Ve(e)?Zo(e,!0):_c(e)}function Kp(e,t){var n={};return t=ne(t,3),At(e,function(i,o,f){Ot(n,t(i,o,f),i)}),n}function Hp(e,t){var n={};return t=ne(t,3),At(e,function(i,o,f){Ot(n,o,t(i,o,f))}),n}var zp=vn(function(e,t,n){hr(e,t,n)}),Sa=vn(function(e,t,n,i){hr(e,t,n,i)}),Gp=It(function(e,t){var n={};if(e==null)return n;var i=!1;t=Oe(t,function(f){return f=Gt(f,e),i||(i=f.length>1),f}),xt(e,Oi(e),n),i&&(n=ht(n,p|a|s,Mc));for(var o=t.length;o--;)Ci(n,t[o]);return n});function $p(e,t){return Ca(e,Er(ne(t)))}var Xp=It(function(e,t){return e==null?{}:wc(e,t)});function Ca(e,t){if(e==null)return{};var n=Oe(Oi(e),function(i){return[i]});return t=ne(t),ps(e,n,function(i,o){return t(i,o[0])})}function Jp(e,t,n){t=Gt(t,e);var i=-1,o=t.length;for(o||(o=1,e=r);++i<o;){var f=e==null?r:e[kt(t[i])];f===r&&(i=o,f=n),e=Bt(f)?f.call(e):f}return e}function Yp(e,t,n){return e==null?e:Un(e,t,n)}function Zp(e,t,n,i){return i=typeof i=="function"?i:r,e==null?e:Un(e,t,n,i)}var ba=Us(Pe),Aa=Us(Qe);function Vp(e,t,n){var i=ce(e),o=i||Xt(e)||mn(e);if(t=ne(t,4),n==null){var f=e&&e.constructor;o?n=i?new f:[]:Le(e)?n=Bt(f)?gn(tr(e)):{}:n={}}return(o?ft:At)(e,function(y,C,x){return t(n,y,C,x)}),n}function Qp(e,t){return e==null?!0:Ci(e,t)}function jp(e,t,n){return e==null?e:_s(e,t,xi(n))}function ed(e,t,n,i){return i=typeof i=="function"?i:r,e==null?e:_s(e,t,xi(n),i)}function wn(e){return e==null?[]:ri(e,Pe(e))}function td(e){return e==null?[]:ri(e,Qe(e))}function nd(e,t,n){return n===r&&(n=t,t=r),n!==r&&(n=gt(n),n=n===n?n:0),t!==r&&(t=gt(t),t=t===t?t:0),Qt(gt(e),t,n)}function rd(e,t,n){return t=Ut(t),n===r?(n=t,t=0):n=Ut(n),e=gt(e),fc(e,t,n)}function id(e,t,n){if(n&&typeof n!="boolean"&&Je(e,t,n)&&(t=n=r),n===r&&(typeof t=="boolean"?(n=t,t=r):typeof e=="boolean"&&(n=e,e=r)),e===r&&t===r?(e=0,t=1):(e=Ut(e),t===r?(t=e,e=0):t=Ut(t)),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var o=Jo();return Ke(e+o*(t-e+Uu("1e-"+((o+"").length-1))),t)}return mi(e,t)}var od=yn(function(e,t,n){return t=t.toLowerCase(),e+(n?xa(t):t)});function xa(e){return $i(Se(e).toLowerCase())}function ka(e){return e=Se(e),e&&e.replace(su,Ju).replace(xu,"")}function sd(e,t,n){e=Se(e),t=it(t);var i=e.length;n=n===r?i:Qt(le(n),0,i);var o=n;return n-=t.length,n>=0&&e.slice(n,o)==t}function ad(e){return e=Se(e),e&&Wa.test(e)?e.replace(no,Yu):e}function ud(e){return e=Se(e),e&&$a.test(e)?e.replace(qr,"\\$&"):e}var fd=yn(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),cd=yn(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),ld=Rs("toLowerCase");function hd(e,t,n){e=Se(e),t=le(t);var i=t?cn(e):0;if(!t||i>=t)return e;var o=(t-i)/2;return _r(or(o),n)+e+_r(ir(o),n)}function pd(e,t,n){e=Se(e),t=le(t);var i=t?cn(e):0;return t&&i<t?e+_r(t-i,n):e}function dd(e,t,n){e=Se(e),t=le(t);var i=t?cn(e):0;return t&&i<t?_r(t-i,n)+e:e}function gd(e,t,n){return n||t==null?t=0:t&&(t=+t),Cf(Se(e).replace(Kr,""),t||0)}function vd(e,t,n){return(n?Je(e,t,n):t===r)?t=1:t=le(t),wi(Se(e),t)}function yd(){var e=arguments,t=Se(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var _d=yn(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});function md(e,t,n){return n&&typeof n!="number"&&Je(e,t,n)&&(t=n=r),n=n===r?et:n>>>0,n?(e=Se(e),e&&(typeof t=="string"||t!=null&&!Hi(t))&&(t=it(t),!t&&fn(e))?$t(yt(e),0,n):e.split(t,n)):[]}var wd=yn(function(e,t,n){return e+(n?" ":"")+$i(t)});function Sd(e,t,n){return e=Se(e),n=n==null?0:Qt(le(n),0,e.length),t=it(t),e.slice(n,n+t.length)==t}function Cd(e,t,n){var i=u.templateSettings;n&&Je(e,t,n)&&(t=r),e=Se(e),t=Or({},t,i,Ds);var o=Or({},t.imports,i.imports,Ds),f=Pe(o),y=ri(o,f),C,x,O=0,L=t.interpolate||Hn,N="__p += '",K=oi((t.escape||Hn).source+"|"+L.source+"|"+(L===ro?eu:Hn).source+"|"+(t.evaluate||Hn).source+"|$","g"),Z="//# sourceURL="+(Ce.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ou+"]")+`
16
- `;e.replace(K,function(ie,ge,ye,st,Ye,at){return ye||(ye=st),N+=e.slice(O,at).replace(au,Zu),ge&&(C=!0,N+=`' +
17
- __e(`+ge+`) +
18
- '`),Ye&&(x=!0,N+=`';
19
- `+Ye+`;
20
- __p += '`),ye&&(N+=`' +
21
- ((__t = (`+ye+`)) == null ? '' : __t) +
22
- '`),O=at+ie.length,ie}),N+=`';
23
- `;var re=Ce.call(t,"variable")&&t.variable;if(!re)N=`with (obj) {
24
- `+N+`
13
+ */ui.exports;(function(r,o){(function(){var n,a="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,X=16,F=1,lt=2,ut=3,xt=1/0,ct=9007199254740991,Gt=17976931348623157e292,Oe=NaN,ae=4294967295,yr=ae-1,$=ae>>>1,Q=[["ary",I],["bind",k],["bindKey",L],["curry",J],["curryRight",N],["flip",R],["partial",U],["partialRight",T],["rearg",P]],G="[object Arguments]",rt="[object Array]",K="[object AsyncFunction]",et="[object Boolean]",nt="[object Date]",Z="[object DOMException]",at="[object Error]",kt="[object Function]",Xt="[object GeneratorFunction]",It="[object Map]",ke="[object Number]",Gn="[object Null]",ue="[object Object]",bn="[object Promise]",Xn="[object Proxy]",Vt="[object RegExp]",Zt="[object Set]",Ie="[object String]",Ne="[object Symbol]",$n="[object Undefined]",Pe="[object WeakMap]",Jn="[object WeakSet]",je="[object ArrayBuffer]",Cn="[object DataView]",vi="[object Float32Array]",mi="[object Float64Array]",_i="[object Int8Array]",wi="[object Int16Array]",bi="[object Int32Array]",Ci="[object Uint8Array]",Si="[object Uint8ClampedArray]",ki="[object Uint16Array]",Ai="[object Uint32Array]",Pc=/\b__p \+= '';/g,Fc=/\b(__p \+=) '' \+/g,Mc=/(__e\(.*?\)|\b__t\)) \+\n'';/g,hs=/&(?:amp|lt|gt|quot|#39);/g,ls=/[&<>"']/g,qc=RegExp(hs.source),Wc=RegExp(ls.source),Hc=/<%-([\s\S]+?)%>/g,Kc=/<%([\s\S]+?)%>/g,ps=/<%=([\s\S]+?)%>/g,zc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Gc=/^\w*$/,Xc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xi=/[\\^$.*+?()[\]{}|]/g,$c=RegExp(xi.source),Ei=/^\s+/,Jc=/\s/,jc=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Yc=/\{\n\/\* \[wrapped with (.+)\] \*/,Vc=/,? & /,Zc=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Qc=/[()=,{}\[\]\/\s]/,tf=/\\(\\)?/g,ef=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ds=/\w*$/,nf=/^[-+]0x[0-9a-f]+$/i,rf=/^0b[01]+$/i,of=/^\[object .+?Constructor\]$/,sf=/^0o[0-7]+$/i,af=/^(?:0|[1-9]\d*)$/,uf=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,vr=/($^)/,cf=/['\n\r\u2028\u2029\\]/g,mr="\\ud800-\\udfff",ff="\\u0300-\\u036f",hf="\\ufe20-\\ufe2f",lf="\\u20d0-\\u20ff",gs=ff+hf+lf,ys="\\u2700-\\u27bf",vs="a-z\\xdf-\\xf6\\xf8-\\xff",pf="\\xac\\xb1\\xd7\\xf7",df="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",gf="\\u2000-\\u206f",yf=" \\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",ms="A-Z\\xc0-\\xd6\\xd8-\\xde",_s="\\ufe0e\\ufe0f",ws=pf+df+gf+yf,Ti="['’]",vf="["+mr+"]",bs="["+ws+"]",_r="["+gs+"]",Cs="\\d+",mf="["+ys+"]",Ss="["+vs+"]",ks="[^"+mr+ws+Cs+ys+vs+ms+"]",Ri="\\ud83c[\\udffb-\\udfff]",_f="(?:"+_r+"|"+Ri+")",As="[^"+mr+"]",Oi="(?:\\ud83c[\\udde6-\\uddff]){2}",Ii="[\\ud800-\\udbff][\\udc00-\\udfff]",Sn="["+ms+"]",xs="\\u200d",Es="(?:"+Ss+"|"+ks+")",wf="(?:"+Sn+"|"+ks+")",Ts="(?:"+Ti+"(?:d|ll|m|re|s|t|ve))?",Rs="(?:"+Ti+"(?:D|LL|M|RE|S|T|VE))?",Os=_f+"?",Is="["+_s+"]?",bf="(?:"+xs+"(?:"+[As,Oi,Ii].join("|")+")"+Is+Os+")*",Cf="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Sf="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ns=Is+Os+bf,kf="(?:"+[mf,Oi,Ii].join("|")+")"+Ns,Af="(?:"+[As+_r+"?",_r,Oi,Ii,vf].join("|")+")",xf=RegExp(Ti,"g"),Ef=RegExp(_r,"g"),Ni=RegExp(Ri+"(?="+Ri+")|"+Af+Ns,"g"),Tf=RegExp([Sn+"?"+Ss+"+"+Ts+"(?="+[bs,Sn,"$"].join("|")+")",wf+"+"+Rs+"(?="+[bs,Sn+Es,"$"].join("|")+")",Sn+"?"+Es+"+"+Ts,Sn+"+"+Rs,Sf,Cf,Cs,kf].join("|"),"g"),Rf=RegExp("["+xs+mr+gs+_s+"]"),Of=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,If=["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"],Nf=-1,Ot={};Ot[vi]=Ot[mi]=Ot[_i]=Ot[wi]=Ot[bi]=Ot[Ci]=Ot[Si]=Ot[ki]=Ot[Ai]=!0,Ot[G]=Ot[rt]=Ot[je]=Ot[et]=Ot[Cn]=Ot[nt]=Ot[at]=Ot[kt]=Ot[It]=Ot[ke]=Ot[ue]=Ot[Vt]=Ot[Zt]=Ot[Ie]=Ot[Pe]=!1;var Rt={};Rt[G]=Rt[rt]=Rt[je]=Rt[Cn]=Rt[et]=Rt[nt]=Rt[vi]=Rt[mi]=Rt[_i]=Rt[wi]=Rt[bi]=Rt[It]=Rt[ke]=Rt[ue]=Rt[Vt]=Rt[Zt]=Rt[Ie]=Rt[Ne]=Rt[Ci]=Rt[Si]=Rt[ki]=Rt[Ai]=!0,Rt[at]=Rt[kt]=Rt[Pe]=!1;var Bf={À:"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"},Lf={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Uf={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Df={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Pf=parseFloat,Ff=parseInt,Bs=typeof fr=="object"&&fr&&fr.Object===Object&&fr,Mf=typeof self=="object"&&self&&self.Object===Object&&self,Kt=Bs||Mf||Function("return this")(),Bi=o&&!o.nodeType&&o,fn=Bi&&!0&&r&&!r.nodeType&&r,Ls=fn&&fn.exports===Bi,Li=Ls&&Bs.process,ge=function(){try{var x=fn&&fn.require&&fn.require("util").types;return x||Li&&Li.binding&&Li.binding("util")}catch{}}(),Us=ge&&ge.isArrayBuffer,Ds=ge&&ge.isDate,Ps=ge&&ge.isMap,Fs=ge&&ge.isRegExp,Ms=ge&&ge.isSet,qs=ge&&ge.isTypedArray;function ce(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 qf(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 ye(x,D){for(var O=-1,V=x==null?0:x.length;++O<V&&D(x[O],O,x)!==!1;);return x}function Wf(x,D){for(var O=x==null?0:x.length;O--&&D(x[O],O,x)!==!1;);return x}function Ws(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 Ye(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 wr(x,D){var O=x==null?0:x.length;return!!O&&kn(x,D,0)>-1}function Ui(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 Ve(x,D){for(var O=-1,V=D.length,ft=x.length;++O<V;)x[ft+O]=D[O];return x}function Di(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 Hf(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 Pi(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 Kf=Fi("length");function zf(x){return x.split("")}function Gf(x){return x.match(Zc)||[]}function Hs(x,D,O){var V;return O(x,function(ft,Ct,Ft){if(D(ft,Ct,Ft))return V=Ct,!1}),V}function br(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 kn(x,D,O){return D===D?rh(x,D,O):br(x,Ks,O)}function Xf(x,D,O,V){for(var ft=O-1,Ct=x.length;++ft<Ct;)if(V(x[ft],D))return ft;return-1}function Ks(x){return x!==x}function zs(x,D){var O=x==null?0:x.length;return O?qi(x,D)/O:Oe}function Fi(x){return function(D){return D==null?n:D[x]}}function Mi(x){return function(D){return x==null?n:x[D]}}function Gs(x,D,O,V,ft){return ft(x,function(Ct,Ft,Tt){O=V?(V=!1,Ct):D(O,Ct,Ft,Tt)}),O}function $f(x,D){var O=x.length;for(x.sort(D);O--;)x[O]=x[O].value;return x}function qi(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 Wi(x,D){for(var O=-1,V=Array(x);++O<x;)V[O]=D(O);return V}function Jf(x,D){return Nt(D,function(O){return[O,x[O]]})}function Xs(x){return x&&x.slice(0,Ys(x)+1).replace(Ei,"")}function fe(x){return function(D){return x(D)}}function Hi(x,D){return Nt(D,function(O){return x[O]})}function jn(x,D){return x.has(D)}function $s(x,D){for(var O=-1,V=x.length;++O<V&&kn(D,x[O],0)>-1;);return O}function Js(x,D){for(var O=x.length;O--&&kn(D,x[O],0)>-1;);return O}function jf(x,D){for(var O=x.length,V=0;O--;)x[O]===D&&++V;return V}var Yf=Mi(Bf),Vf=Mi(Lf);function Zf(x){return"\\"+Df[x]}function Qf(x,D){return x==null?n:x[D]}function An(x){return Rf.test(x)}function th(x){return Of.test(x)}function eh(x){for(var D,O=[];!(D=x.next()).done;)O.push(D.value);return O}function Ki(x){var D=-1,O=Array(x.size);return x.forEach(function(V,ft){O[++D]=[ft,V]}),O}function js(x,D){return function(O){return x(D(O))}}function Ze(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 Cr(x){var D=-1,O=Array(x.size);return x.forEach(function(V){O[++D]=V}),O}function nh(x){var D=-1,O=Array(x.size);return x.forEach(function(V){O[++D]=[V,V]}),O}function rh(x,D,O){for(var V=O-1,ft=x.length;++V<ft;)if(x[V]===D)return V;return-1}function ih(x,D,O){for(var V=O+1;V--;)if(x[V]===D)return V;return V}function xn(x){return An(x)?sh(x):Kf(x)}function Ae(x){return An(x)?ah(x):zf(x)}function Ys(x){for(var D=x.length;D--&&Jc.test(x.charAt(D)););return D}var oh=Mi(Uf);function sh(x){for(var D=Ni.lastIndex=0;Ni.test(x);)++D;return D}function ah(x){return x.match(Ni)||[]}function uh(x){return x.match(Tf)||[]}var ch=function x(D){D=D==null?Kt:En.defaults(Kt.Object(),D,En.pick(Kt,If));var O=D.Array,V=D.Date,ft=D.Error,Ct=D.Function,Ft=D.Math,Tt=D.Object,zi=D.RegExp,fh=D.String,ve=D.TypeError,Sr=O.prototype,hh=Ct.prototype,Tn=Tt.prototype,kr=D["__core-js_shared__"],Ar=hh.toString,Et=Tn.hasOwnProperty,lh=0,Vs=function(){var t=/[^.]+$/.exec(kr&&kr.keys&&kr.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),xr=Tn.toString,ph=Ar.call(Tt),dh=Kt._,gh=zi("^"+Ar.call(Et).replace(xi,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Er=Ls?D.Buffer:n,Qe=D.Symbol,Tr=D.Uint8Array,Zs=Er?Er.allocUnsafe:n,Rr=js(Tt.getPrototypeOf,Tt),Qs=Tt.create,ta=Tn.propertyIsEnumerable,Or=Sr.splice,ea=Qe?Qe.isConcatSpreadable:n,Yn=Qe?Qe.iterator:n,hn=Qe?Qe.toStringTag:n,Ir=function(){try{var t=yn(Tt,"defineProperty");return t({},"",{}),t}catch{}}(),yh=D.clearTimeout!==Kt.clearTimeout&&D.clearTimeout,vh=V&&V.now!==Kt.Date.now&&V.now,mh=D.setTimeout!==Kt.setTimeout&&D.setTimeout,Nr=Ft.ceil,Br=Ft.floor,Gi=Tt.getOwnPropertySymbols,_h=Er?Er.isBuffer:n,na=D.isFinite,wh=Sr.join,bh=js(Tt.keys,Tt),Mt=Ft.max,$t=Ft.min,Ch=V.now,Sh=D.parseInt,ra=Ft.random,kh=Sr.reverse,Xi=yn(D,"DataView"),Vn=yn(D,"Map"),$i=yn(D,"Promise"),Rn=yn(D,"Set"),Zn=yn(D,"WeakMap"),Qn=yn(Tt,"create"),Lr=Zn&&new Zn,On={},Ah=vn(Xi),xh=vn(Vn),Eh=vn($i),Th=vn(Rn),Rh=vn(Zn),Ur=Qe?Qe.prototype:n,tr=Ur?Ur.valueOf:n,ia=Ur?Ur.toString:n;function y(t){if(Lt(t)&&!ht(t)&&!(t instanceof mt)){if(t instanceof me)return t;if(Et.call(t,"__wrapped__"))return ou(t)}return new me(t)}var In=function(){function t(){}return function(e){if(!Bt(e))return{};if(Qs)return Qs(e);t.prototype=e;var i=new t;return t.prototype=n,i}}();function Dr(){}function me(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=n}y.templateSettings={escape:Hc,evaluate:Kc,interpolate:ps,variable:"",imports:{_:y}},y.prototype=Dr.prototype,y.prototype.constructor=y,me.prototype=In(Dr.prototype),me.prototype.constructor=me;function mt(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ae,this.__views__=[]}function Oh(){var t=new mt(this.__wrapped__);return t.__actions__=ne(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ne(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ne(this.__views__),t}function Ih(){if(this.__filtered__){var t=new mt(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function Nh(){var t=this.__wrapped__.value(),e=this.__dir__,i=ht(t),s=e<0,h=i?t.length:0,m=zl(0,h,this.__views__),C=m.start,S=m.end,E=S-C,M=s?S:C-1,q=this.__iteratees__,W=q.length,j=0,tt=$t(E,this.__takeCount__);if(!i||!s&&h==E&&tt==E)return Ta(t,this.__actions__);var ot=[];t:for(;E--&&j<tt;){M+=e;for(var dt=-1,st=t[M];++dt<W;){var vt=q[dt],_t=vt.iteratee,pe=vt.type,ee=_t(st);if(pe==lt)st=ee;else if(!ee){if(pe==F)continue t;break t}}ot[j++]=st}return ot}mt.prototype=In(Dr.prototype),mt.prototype.constructor=mt;function ln(t){var e=-1,i=t==null?0:t.length;for(this.clear();++e<i;){var s=t[e];this.set(s[0],s[1])}}function Bh(){this.__data__=Qn?Qn(null):{},this.size=0}function Lh(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Uh(t){var e=this.__data__;if(Qn){var i=e[t];return i===b?n:i}return Et.call(e,t)?e[t]:n}function Dh(t){var e=this.__data__;return Qn?e[t]!==n:Et.call(e,t)}function Ph(t,e){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=Qn&&e===n?b:e,this}ln.prototype.clear=Bh,ln.prototype.delete=Lh,ln.prototype.get=Uh,ln.prototype.has=Dh,ln.prototype.set=Ph;function Fe(t){var e=-1,i=t==null?0:t.length;for(this.clear();++e<i;){var s=t[e];this.set(s[0],s[1])}}function Fh(){this.__data__=[],this.size=0}function Mh(t){var e=this.__data__,i=Pr(e,t);if(i<0)return!1;var s=e.length-1;return i==s?e.pop():Or.call(e,i,1),--this.size,!0}function qh(t){var e=this.__data__,i=Pr(e,t);return i<0?n:e[i][1]}function Wh(t){return Pr(this.__data__,t)>-1}function Hh(t,e){var i=this.__data__,s=Pr(i,t);return s<0?(++this.size,i.push([t,e])):i[s][1]=e,this}Fe.prototype.clear=Fh,Fe.prototype.delete=Mh,Fe.prototype.get=qh,Fe.prototype.has=Wh,Fe.prototype.set=Hh;function Me(t){var e=-1,i=t==null?0:t.length;for(this.clear();++e<i;){var s=t[e];this.set(s[0],s[1])}}function Kh(){this.size=0,this.__data__={hash:new ln,map:new(Vn||Fe),string:new ln}}function zh(t){var e=jr(this,t).delete(t);return this.size-=e?1:0,e}function Gh(t){return jr(this,t).get(t)}function Xh(t){return jr(this,t).has(t)}function $h(t,e){var i=jr(this,t),s=i.size;return i.set(t,e),this.size+=i.size==s?0:1,this}Me.prototype.clear=Kh,Me.prototype.delete=zh,Me.prototype.get=Gh,Me.prototype.has=Xh,Me.prototype.set=$h;function pn(t){var e=-1,i=t==null?0:t.length;for(this.__data__=new Me;++e<i;)this.add(t[e])}function Jh(t){return this.__data__.set(t,b),this}function jh(t){return this.__data__.has(t)}pn.prototype.add=pn.prototype.push=Jh,pn.prototype.has=jh;function xe(t){var e=this.__data__=new Fe(t);this.size=e.size}function Yh(){this.__data__=new Fe,this.size=0}function Vh(t){var e=this.__data__,i=e.delete(t);return this.size=e.size,i}function Zh(t){return this.__data__.get(t)}function Qh(t){return this.__data__.has(t)}function tl(t,e){var i=this.__data__;if(i instanceof Fe){var s=i.__data__;if(!Vn||s.length<c-1)return s.push([t,e]),this.size=++i.size,this;i=this.__data__=new Me(s)}return i.set(t,e),this.size=i.size,this}xe.prototype.clear=Yh,xe.prototype.delete=Vh,xe.prototype.get=Zh,xe.prototype.has=Qh,xe.prototype.set=tl;function oa(t,e){var i=ht(t),s=!i&&mn(t),h=!i&&!s&&on(t),m=!i&&!s&&!h&&Un(t),C=i||s||h||m,S=C?Wi(t.length,fh):[],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")||Ke(M,E)))&&S.push(M);return S}function sa(t){var e=t.length;return e?t[io(0,e-1)]:n}function el(t,e){return Yr(ne(t),dn(e,0,t.length))}function nl(t){return Yr(ne(t))}function Ji(t,e,i){(i!==n&&!Ee(t[e],i)||i===n&&!(e in t))&&qe(t,e,i)}function er(t,e,i){var s=t[e];(!(Et.call(t,e)&&Ee(s,i))||i===n&&!(e in t))&&qe(t,e,i)}function Pr(t,e){for(var i=t.length;i--;)if(Ee(t[i][0],e))return i;return-1}function rl(t,e,i,s){return tn(t,function(h,m,C){e(s,h,i(h),C)}),s}function aa(t,e){return t&&Le(e,Wt(e),t)}function il(t,e){return t&&Le(e,ie(e),t)}function qe(t,e,i){e=="__proto__"&&Ir?Ir(t,e,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[e]=i}function ji(t,e){for(var i=-1,s=e.length,h=O(s),m=t==null;++i<s;)h[i]=m?n:Oo(t,e[i]);return h}function dn(t,e,i){return t===t&&(i!==n&&(t=t<=i?t:i),e!==n&&(t=t>=e?t:e)),t}function _e(t,e,i,s,h,m){var C,S=e&g,E=e&l,M=e&u;if(i&&(C=h?i(t,s,h,m):i(t)),C!==n)return C;if(!Bt(t))return t;var q=ht(t);if(q){if(C=Xl(t),!S)return ne(t,C)}else{var W=Jt(t),j=W==kt||W==Xt;if(on(t))return Ia(t,S);if(W==ue||W==G||j&&!h){if(C=E||j?{}:Ya(t),!S)return E?Ul(t,il(C,t)):Ll(t,aa(C,t))}else{if(!Rt[W])return h?t:{};C=$l(t,W,S)}}m||(m=new xe);var tt=m.get(t);if(tt)return tt;m.set(t,C),Au(t)?t.forEach(function(st){C.add(_e(st,e,i,st,t,m))}):Su(t)&&t.forEach(function(st,vt){C.set(vt,_e(st,e,i,vt,t,m))});var ot=M?E?yo:go:E?ie:Wt,dt=q?n:ot(t);return ye(dt||t,function(st,vt){dt&&(vt=st,st=t[vt]),er(C,vt,_e(st,e,i,vt,t,m))}),C}function ol(t){var e=Wt(t);return function(i){return ua(i,t,e)}}function ua(t,e,i){var s=i.length;if(t==null)return!s;for(t=Tt(t);s--;){var h=i[s],m=e[h],C=t[h];if(C===n&&!(h in t)||!m(C))return!1}return!0}function ca(t,e,i){if(typeof t!="function")throw new ve(v);return ur(function(){t.apply(n,i)},e)}function nr(t,e,i,s){var h=-1,m=wr,C=!0,S=t.length,E=[],M=e.length;if(!S)return E;i&&(e=Nt(e,fe(i))),s?(m=Ui,C=!1):e.length>=c&&(m=jn,C=!1,e=new pn(e));t:for(;++h<S;){var q=t[h],W=i==null?q:i(q);if(q=s||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,s)||E.push(q)}return E}var tn=Da(Be),fa=Da(Vi,!0);function sl(t,e){var i=!0;return tn(t,function(s,h,m){return i=!!e(s,h,m),i}),i}function Fr(t,e,i){for(var s=-1,h=t.length;++s<h;){var m=t[s],C=e(m);if(C!=null&&(S===n?C===C&&!le(C):i(C,S)))var S=C,E=m}return E}function al(t,e,i,s){var h=t.length;for(i=pt(i),i<0&&(i=-i>h?0:h+i),s=s===n||s>h?h:pt(s),s<0&&(s+=h),s=i>s?0:Eu(s);i<s;)t[i++]=e;return t}function ha(t,e){var i=[];return tn(t,function(s,h,m){e(s,h,m)&&i.push(s)}),i}function zt(t,e,i,s,h){var m=-1,C=t.length;for(i||(i=jl),h||(h=[]);++m<C;){var S=t[m];e>0&&i(S)?e>1?zt(S,e-1,i,s,h):Ve(h,S):s||(h[h.length]=S)}return h}var Yi=Pa(),la=Pa(!0);function Be(t,e){return t&&Yi(t,e,Wt)}function Vi(t,e){return t&&la(t,e,Wt)}function Mr(t,e){return Ye(e,function(i){return ze(t[i])})}function gn(t,e){e=nn(e,t);for(var i=0,s=e.length;t!=null&&i<s;)t=t[Ue(e[i++])];return i&&i==s?t:n}function pa(t,e,i){var s=e(t);return ht(t)?s:Ve(s,i(t))}function Qt(t){return t==null?t===n?$n:Gn:hn&&hn in Tt(t)?Kl(t):np(t)}function Zi(t,e){return t>e}function ul(t,e){return t!=null&&Et.call(t,e)}function cl(t,e){return t!=null&&e in Tt(t)}function fl(t,e,i){return t>=$t(e,i)&&t<Mt(e,i)}function Qi(t,e,i){for(var s=i?Ui:wr,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,fe(e))),E=$t(q.length,E),S[C]=!i&&(e||h>=120&&q.length>=120)?new pn(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?jn(j,ot):s(M,ot,i))){for(C=m;--C;){var dt=S[C];if(!(dt?jn(dt,ot):s(t[C],ot,i)))continue t}j&&j.push(ot),M.push(tt)}}return M}function hl(t,e,i,s){return Be(t,function(h,m,C){e(s,i(h),m,C)}),s}function rr(t,e,i){e=nn(e,t),t=tu(t,e);var s=t==null?t:t[Ue(be(e))];return s==null?n:ce(s,t,i)}function da(t){return Lt(t)&&Qt(t)==G}function ll(t){return Lt(t)&&Qt(t)==je}function pl(t){return Lt(t)&&Qt(t)==nt}function ir(t,e,i,s,h){return t===e?!0:t==null||e==null||!Lt(t)&&!Lt(e)?t!==t&&e!==e:dl(t,e,i,s,ir,h)}function dl(t,e,i,s,h,m){var C=ht(t),S=ht(e),E=C?rt:Jt(t),M=S?rt:Jt(e);E=E==G?ue:E,M=M==G?ue:M;var q=E==ue,W=M==ue,j=E==M;if(j&&on(t)){if(!on(e))return!1;C=!0,q=!1}if(j&&!q)return m||(m=new xe),C||Un(t)?$a(t,e,i,s,h,m):Wl(t,e,E,i,s,h,m);if(!(i&w)){var tt=q&&Et.call(t,"__wrapped__"),ot=W&&Et.call(e,"__wrapped__");if(tt||ot){var dt=tt?t.value():t,st=ot?e.value():e;return m||(m=new xe),h(dt,st,i,s,m)}}return j?(m||(m=new xe),Hl(t,e,i,s,h,m)):!1}function gl(t){return Lt(t)&&Jt(t)==It}function to(t,e,i,s){var h=i.length,m=h,C=!s;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 xe;if(s)var j=s(M,q,E,t,e,W);if(!(j===n?ir(q,M,w|A,s,W):j))return!1}}return!0}function ga(t){if(!Bt(t)||Vl(t))return!1;var e=ze(t)?gh:of;return e.test(vn(t))}function yl(t){return Lt(t)&&Qt(t)==Vt}function vl(t){return Lt(t)&&Jt(t)==Zt}function ml(t){return Lt(t)&&ni(t.length)&&!!Ot[Qt(t)]}function ya(t){return typeof t=="function"?t:t==null?oe:typeof t=="object"?ht(t)?_a(t[0],t[1]):ma(t):Fu(t)}function eo(t){if(!ar(t))return bh(t);var e=[];for(var i in Tt(t))Et.call(t,i)&&i!="constructor"&&e.push(i);return e}function _l(t){if(!Bt(t))return ep(t);var e=ar(t),i=[];for(var s in t)s=="constructor"&&(e||!Et.call(t,s))||i.push(s);return i}function no(t,e){return t<e}function va(t,e){var i=-1,s=re(t)?O(t.length):[];return tn(t,function(h,m,C){s[++i]=e(h,m,C)}),s}function ma(t){var e=mo(t);return e.length==1&&e[0][2]?Za(e[0][0],e[0][1]):function(i){return i===t||to(i,t,e)}}function _a(t,e){return wo(t)&&Va(e)?Za(Ue(t),e):function(i){var s=Oo(i,t);return s===n&&s===e?Io(i,t):ir(e,s,w|A)}}function qr(t,e,i,s,h){t!==e&&Yi(e,function(m,C){if(h||(h=new xe),Bt(m))wl(t,e,C,i,qr,s,h);else{var S=s?s(Co(t,C),m,C+"",t,e,h):n;S===n&&(S=m),Ji(t,C,S)}},ie)}function wl(t,e,i,s,h,m,C){var S=Co(t,i),E=Co(e,i),M=C.get(E);if(M){Ji(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&&on(E),ot=!j&&!tt&&Un(E);q=E,j||tt||ot?ht(S)?q=S:Ut(S)?q=ne(S):tt?(W=!1,q=Ia(E,!0)):ot?(W=!1,q=Na(E,!0)):q=[]:cr(E)||mn(E)?(q=S,mn(S)?q=Tu(S):(!Bt(S)||ze(S))&&(q=Ya(E))):W=!1}W&&(C.set(E,q),h(q,E,s,m,C),C.delete(E)),Ji(t,i,q)}function wa(t,e){var i=t.length;if(i)return e+=e<0?i:0,Ke(e,i)?t[e]:n}function ba(t,e,i){e.length?e=Nt(e,function(m){return ht(m)?function(C){return gn(C,m.length===1?m[0]:m)}:m}):e=[oe];var s=-1;e=Nt(e,fe(it()));var h=va(t,function(m,C,S){var E=Nt(e,function(M){return M(m)});return{criteria:E,index:++s,value:m}});return $f(h,function(m,C){return Bl(m,C,i)})}function bl(t,e){return Ca(t,e,function(i,s){return Io(t,s)})}function Ca(t,e,i){for(var s=-1,h=e.length,m={};++s<h;){var C=e[s],S=gn(t,C);i(S,C)&&or(m,nn(C,t),S)}return m}function Cl(t){return function(e){return gn(e,t)}}function ro(t,e,i,s){var h=s?Xf:kn,m=-1,C=e.length,S=t;for(t===e&&(e=ne(e)),i&&(S=Nt(t,fe(i)));++m<C;)for(var E=0,M=e[m],q=i?i(M):M;(E=h(S,q,E,s))>-1;)S!==t&&Or.call(S,E,1),Or.call(t,E,1);return t}function Sa(t,e){for(var i=t?e.length:0,s=i-1;i--;){var h=e[i];if(i==s||h!==m){var m=h;Ke(h)?Or.call(t,h,1):ao(t,h)}}return t}function io(t,e){return t+Br(ra()*(e-t+1))}function Sl(t,e,i,s){for(var h=-1,m=Mt(Nr((e-t)/(i||1)),0),C=O(m);m--;)C[s?m:++h]=t,t+=i;return C}function oo(t,e){var i="";if(!t||e<1||e>ct)return i;do e%2&&(i+=t),e=Br(e/2),e&&(t+=t);while(e);return i}function yt(t,e){return So(Qa(t,e,oe),t+"")}function kl(t){return sa(Dn(t))}function Al(t,e){var i=Dn(t);return Yr(i,dn(e,0,i.length))}function or(t,e,i,s){if(!Bt(t))return t;e=nn(e,t);for(var h=-1,m=e.length,C=m-1,S=t;S!=null&&++h<m;){var E=Ue(e[h]),M=i;if(E==="__proto__"||E==="constructor"||E==="prototype")return t;if(h!=C){var q=S[E];M=s?s(q,E,S):n,M===n&&(M=Bt(q)?q:Ke(e[h+1])?[]:{})}er(S,E,M),S=S[E]}return t}var ka=Lr?function(t,e){return Lr.set(t,e),t}:oe,xl=Ir?function(t,e){return Ir(t,"toString",{configurable:!0,enumerable:!1,value:Bo(e),writable:!0})}:oe;function El(t){return Yr(Dn(t))}function we(t,e,i){var s=-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);++s<h;)m[s]=t[s+e];return m}function Tl(t,e){var i;return tn(t,function(s,h,m){return i=e(s,h,m),!i}),!!i}function Wr(t,e,i){var s=0,h=t==null?s:t.length;if(typeof e=="number"&&e===e&&h<=$){for(;s<h;){var m=s+h>>>1,C=t[m];C!==null&&!le(C)&&(i?C<=e:C<e)?s=m+1:h=m}return h}return so(t,e,oe,i)}function so(t,e,i,s){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=le(e),M=e===n;h<m;){var q=Br((h+m)/2),W=i(t[q]),j=W!==n,tt=W===null,ot=W===W,dt=le(W);if(C)var st=s||ot;else M?st=ot&&(s||j):S?st=ot&&j&&(s||!tt):E?st=ot&&j&&!tt&&(s||!dt):tt||dt?st=!1:st=s?W<=e:W<e;st?h=q+1:m=q}return $t(m,yr)}function Aa(t,e){for(var i=-1,s=t.length,h=0,m=[];++i<s;){var C=t[i],S=e?e(C):C;if(!i||!Ee(S,E)){var E=S;m[h++]=C===0?0:C}}return m}function xa(t){return typeof t=="number"?t:le(t)?Oe:+t}function he(t){if(typeof t=="string")return t;if(ht(t))return Nt(t,he)+"";if(le(t))return ia?ia.call(t):"";var e=t+"";return e=="0"&&1/t==-xt?"-0":e}function en(t,e,i){var s=-1,h=wr,m=t.length,C=!0,S=[],E=S;if(i)C=!1,h=Ui;else if(m>=c){var M=e?null:Ml(t);if(M)return Cr(M);C=!1,h=jn,E=new pn}else E=e?[]:S;t:for(;++s<m;){var q=t[s],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 ao(t,e){return e=nn(e,t),t=tu(t,e),t==null||delete t[Ue(be(e))]}function Ea(t,e,i,s){return or(t,e,i(gn(t,e)),s)}function Hr(t,e,i,s){for(var h=t.length,m=s?h:-1;(s?m--:++m<h)&&e(t[m],m,t););return i?we(t,s?0:m,s?m+1:h):we(t,s?m+1:0,s?h:m)}function Ta(t,e){var i=t;return i instanceof mt&&(i=i.value()),Di(e,function(s,h){return h.func.apply(h.thisArg,Ve([s],h.args))},i)}function uo(t,e,i){var s=t.length;if(s<2)return s?en(t[0]):[];for(var h=-1,m=O(s);++h<s;)for(var C=t[h],S=-1;++S<s;)S!=h&&(m[h]=nr(m[h]||C,t[S],e,i));return en(zt(m,1),e,i)}function Ra(t,e,i){for(var s=-1,h=t.length,m=e.length,C={};++s<h;){var S=s<m?e[s]:n;i(C,t[s],S)}return C}function co(t){return Ut(t)?t:[]}function fo(t){return typeof t=="function"?t:oe}function nn(t,e){return ht(t)?t:wo(t,e)?[t]:iu(At(t))}var Rl=yt;function rn(t,e,i){var s=t.length;return i=i===n?s:i,!e&&i>=s?t:we(t,e,i)}var Oa=yh||function(t){return Kt.clearTimeout(t)};function Ia(t,e){if(e)return t.slice();var i=t.length,s=Zs?Zs(i):new t.constructor(i);return t.copy(s),s}function ho(t){var e=new t.constructor(t.byteLength);return new Tr(e).set(new Tr(t)),e}function Ol(t,e){var i=e?ho(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.byteLength)}function Il(t){var e=new t.constructor(t.source,ds.exec(t));return e.lastIndex=t.lastIndex,e}function Nl(t){return tr?Tt(tr.call(t)):{}}function Na(t,e){var i=e?ho(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}function Ba(t,e){if(t!==e){var i=t!==n,s=t===null,h=t===t,m=le(t),C=e!==n,S=e===null,E=e===e,M=le(e);if(!S&&!M&&!m&&t>e||m&&C&&E&&!S&&!M||s&&C&&E||!i&&E||!h)return 1;if(!s&&!m&&!M&&t<e||M&&i&&h&&!s&&!m||S&&i&&h||!C&&h||!E)return-1}return 0}function Bl(t,e,i){for(var s=-1,h=t.criteria,m=e.criteria,C=h.length,S=i.length;++s<C;){var E=Ba(h[s],m[s]);if(E){if(s>=S)return E;var M=i[s];return E*(M=="desc"?-1:1)}}return t.index-e.index}function La(t,e,i,s){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=!s;++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 Ua(t,e,i,s){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=!s;++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 ne(t,e){var i=-1,s=t.length;for(e||(e=O(s));++i<s;)e[i]=t[i];return e}function Le(t,e,i,s){var h=!i;i||(i={});for(var m=-1,C=e.length;++m<C;){var S=e[m],E=s?s(i[S],t[S],S,i,t):n;E===n&&(E=t[S]),h?qe(i,S,E):er(i,S,E)}return i}function Ll(t,e){return Le(t,_o(t),e)}function Ul(t,e){return Le(t,Ja(t),e)}function Kr(t,e){return function(i,s){var h=ht(i)?qf:rl,m=e?e():{};return h(i,t,it(s,2),m)}}function Nn(t){return yt(function(e,i){var s=-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&&te(i[0],i[1],C)&&(m=h<3?n:m,h=1),e=Tt(e);++s<h;){var S=i[s];S&&t(e,S,s,m)}return e})}function Da(t,e){return function(i,s){if(i==null)return i;if(!re(i))return t(i,s);for(var h=i.length,m=e?h:-1,C=Tt(i);(e?m--:++m<h)&&s(C[m],m,C)!==!1;);return i}}function Pa(t){return function(e,i,s){for(var h=-1,m=Tt(e),C=s(e),S=C.length;S--;){var E=C[t?S:++h];if(i(m[E],E,m)===!1)break}return e}}function Dl(t,e,i){var s=e&k,h=sr(t);function m(){var C=this&&this!==Kt&&this instanceof m?h:t;return C.apply(s?i:this,arguments)}return m}function Fa(t){return function(e){e=At(e);var i=An(e)?Ae(e):n,s=i?i[0]:e.charAt(0),h=i?rn(i,1).join(""):e.slice(1);return s[t]()+h}}function Bn(t){return function(e){return Di(Du(Uu(e).replace(xf,"")),t,"")}}function sr(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=In(t.prototype),s=t.apply(i,e);return Bt(s)?s:i}}function Pl(t,e,i){var s=sr(t);function h(){for(var m=arguments.length,C=O(m),S=m,E=Ln(h);S--;)C[S]=arguments[S];var M=m<3&&C[0]!==E&&C[m-1]!==E?[]:Ze(C,E);if(m-=M.length,m<i)return Ka(t,e,zr,h.placeholder,n,C,M,n,n,i-m);var q=this&&this!==Kt&&this instanceof h?s:t;return ce(q,this,C)}return h}function Ma(t){return function(e,i,s){var h=Tt(e);if(!re(e)){var m=it(i,3);e=Wt(e),i=function(S){return m(h[S],S,h)}}var C=t(e,i,s);return C>-1?h[m?e[C]:C]:n}}function qa(t){return He(function(e){var i=e.length,s=i,h=me.prototype.thru;for(t&&e.reverse();s--;){var m=e[s];if(typeof m!="function")throw new ve(v);if(h&&!C&&Jr(m)=="wrapper")var C=new me([],!0)}for(s=C?s:i;++s<i;){m=e[s];var S=Jr(m),E=S=="wrapper"?vo(m):n;E&&bo(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&&bo(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 zr(t,e,i,s,h,m,C,S,E,M){var q=e&I,W=e&k,j=e&L,tt=e&(J|N),ot=e&R,dt=j?n:sr(t);function st(){for(var vt=arguments.length,_t=O(vt),pe=vt;pe--;)_t[pe]=arguments[pe];if(tt)var ee=Ln(st),de=jf(_t,ee);if(s&&(_t=La(_t,s,h,tt)),m&&(_t=Ua(_t,m,C,tt)),vt-=de,tt&&vt<M){var Dt=Ze(_t,ee);return Ka(t,e,zr,st.placeholder,i,_t,Dt,S,E,M-vt)}var Te=W?i:this,Xe=j?Te[t]:t;return vt=_t.length,S?_t=rp(_t,S):ot&&vt>1&&_t.reverse(),q&&E<vt&&(_t.length=E),this&&this!==Kt&&this instanceof st&&(Xe=dt||sr(Xe)),Xe.apply(Te,_t)}return st}function Wa(t,e){return function(i,s){return hl(i,t,e(s),{})}}function Gr(t,e){return function(i,s){var h;if(i===n&&s===n)return e;if(i!==n&&(h=i),s!==n){if(h===n)return s;typeof i=="string"||typeof s=="string"?(i=he(i),s=he(s)):(i=xa(i),s=xa(s)),h=t(i,s)}return h}}function lo(t){return He(function(e){return e=Nt(e,fe(it())),yt(function(i){var s=this;return t(e,function(h){return ce(h,s,i)})})})}function Xr(t,e){e=e===n?" ":he(e);var i=e.length;if(i<2)return i?oo(e,t):e;var s=oo(e,Nr(t/xn(e)));return An(e)?rn(Ae(s),0,t).join(""):s.slice(0,t)}function Fl(t,e,i,s){var h=e&k,m=sr(t);function C(){for(var S=-1,E=arguments.length,M=-1,q=s.length,W=O(q+E),j=this&&this!==Kt&&this instanceof C?m:t;++M<q;)W[M]=s[M];for(;E--;)W[M++]=arguments[++S];return ce(j,h?i:this,W)}return C}function Ha(t){return function(e,i,s){return s&&typeof s!="number"&&te(e,i,s)&&(i=s=n),e=Ge(e),i===n?(i=e,e=0):i=Ge(i),s=s===n?e<i?1:-1:Ge(s),Sl(e,i,s,t)}}function $r(t){return function(e,i){return typeof e=="string"&&typeof i=="string"||(e=Ce(e),i=Ce(i)),t(e,i)}}function Ka(t,e,i,s,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 dt=[t,e,h,tt,W,ot,j,S,E,M],st=i.apply(n,dt);return bo(t)&&eu(st,dt),st.placeholder=s,nu(st,t,e)}function po(t){var e=Ft[t];return function(i,s){if(i=Ce(i),s=s==null?0:$t(pt(s),292),s&&na(i)){var h=(At(i)+"e").split("e"),m=e(h[0]+"e"+(+h[1]+s));return h=(At(m)+"e").split("e"),+(h[0]+"e"+(+h[1]-s))}return e(i)}}var Ml=Rn&&1/Cr(new Rn([,-0]))[1]==xt?function(t){return new Rn(t)}:Do;function za(t){return function(e){var i=Jt(e);return i==It?Ki(e):i==Zt?nh(e):Jf(e,t(e))}}function We(t,e,i,s,h,m,C,S){var E=e&L;if(!E&&typeof t!="function")throw new ve(v);var M=s?s.length:0;if(M||(e&=~(U|T),s=h=n),C=C===n?C:Mt(pt(C),0),S=S===n?S:pt(S),M-=h?h.length:0,e&T){var q=s,W=h;s=h=n}var j=E?n:vo(t),tt=[t,e,i,s,h,q,W,m,C,S];if(j&&tp(tt,j),t=tt[0],e=tt[1],i=tt[2],s=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=Dl(t,e,i);else e==J||e==N?ot=Pl(t,e,S):(e==U||e==(k|U))&&!h.length?ot=Fl(t,e,i,s):ot=zr.apply(n,tt);var dt=j?ka:eu;return nu(dt(ot,tt),t,e)}function Ga(t,e,i,s){return t===n||Ee(t,Tn[i])&&!Et.call(s,i)?e:t}function Xa(t,e,i,s,h,m){return Bt(t)&&Bt(e)&&(m.set(e,t),qr(t,e,n,Xa,m),m.delete(e)),t}function ql(t){return cr(t)?n:t}function $a(t,e,i,s,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 pn:n;for(m.set(t,e),m.set(e,t);++W<S;){var ot=t[W],dt=e[W];if(s)var st=C?s(dt,ot,W,e,t,m):s(ot,dt,W,t,e,m);if(st!==n){if(st)continue;j=!1;break}if(tt){if(!Pi(e,function(vt,_t){if(!jn(tt,_t)&&(ot===vt||h(ot,vt,i,s,m)))return tt.push(_t)})){j=!1;break}}else if(!(ot===dt||h(ot,dt,i,s,m))){j=!1;break}}return m.delete(t),m.delete(e),j}function Wl(t,e,i,s,h,m,C){switch(i){case Cn:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case je:return!(t.byteLength!=e.byteLength||!m(new Tr(t),new Tr(e)));case et:case nt:case ke:return Ee(+t,+e);case at:return t.name==e.name&&t.message==e.message;case Vt:case Ie:return t==e+"";case It:var S=Ki;case Zt:var E=s&w;if(S||(S=Cr),t.size!=e.size&&!E)return!1;var M=C.get(t);if(M)return M==e;s|=A,C.set(t,e);var q=$a(S(t),S(e),s,h,m,C);return C.delete(t),q;case Ne:if(tr)return tr.call(t)==tr.call(e)}return!1}function Hl(t,e,i,s,h,m){var C=i&w,S=go(t),E=S.length,M=go(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 dt=!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(s)var pe=C?s(_t,vt,j,e,t,m):s(vt,_t,j,t,e,m);if(!(pe===n?vt===_t||h(vt,_t,i,s,m):pe)){dt=!1;break}st||(st=j=="constructor")}if(dt&&!st){var ee=t.constructor,de=e.constructor;ee!=de&&"constructor"in t&&"constructor"in e&&!(typeof ee=="function"&&ee instanceof ee&&typeof de=="function"&&de instanceof de)&&(dt=!1)}return m.delete(t),m.delete(e),dt}function He(t){return So(Qa(t,n,uu),t+"")}function go(t){return pa(t,Wt,_o)}function yo(t){return pa(t,ie,Ja)}var vo=Lr?function(t){return Lr.get(t)}:Do;function Jr(t){for(var e=t.name+"",i=On[e],s=Et.call(On,e)?i.length:0;s--;){var h=i[s],m=h.func;if(m==null||m==t)return h.name}return e}function Ln(t){var e=Et.call(y,"placeholder")?y:t;return e.placeholder}function it(){var t=y.iteratee||Lo;return t=t===Lo?ya:t,arguments.length?t(arguments[0],arguments[1]):t}function jr(t,e){var i=t.__data__;return Yl(e)?i[typeof e=="string"?"string":"hash"]:i.map}function mo(t){for(var e=Wt(t),i=e.length;i--;){var s=e[i],h=t[s];e[i]=[s,h,Va(h)]}return e}function yn(t,e){var i=Qf(t,e);return ga(i)?i:n}function Kl(t){var e=Et.call(t,hn),i=t[hn];try{t[hn]=n;var s=!0}catch{}var h=xr.call(t);return s&&(e?t[hn]=i:delete t[hn]),h}var _o=Gi?function(t){return t==null?[]:(t=Tt(t),Ye(Gi(t),function(e){return ta.call(t,e)}))}:Po,Ja=Gi?function(t){for(var e=[];t;)Ve(e,_o(t)),t=Rr(t);return e}:Po,Jt=Qt;(Xi&&Jt(new Xi(new ArrayBuffer(1)))!=Cn||Vn&&Jt(new Vn)!=It||$i&&Jt($i.resolve())!=bn||Rn&&Jt(new Rn)!=Zt||Zn&&Jt(new Zn)!=Pe)&&(Jt=function(t){var e=Qt(t),i=e==ue?t.constructor:n,s=i?vn(i):"";if(s)switch(s){case Ah:return Cn;case xh:return It;case Eh:return bn;case Th:return Zt;case Rh:return Pe}return e});function zl(t,e,i){for(var s=-1,h=i.length;++s<h;){var m=i[s],C=m.size;switch(m.type){case"drop":t+=C;break;case"dropRight":e-=C;break;case"take":e=$t(e,t+C);break;case"takeRight":t=Mt(t,e-C);break}}return{start:t,end:e}}function Gl(t){var e=t.match(Yc);return e?e[1].split(Vc):[]}function ja(t,e,i){e=nn(e,t);for(var s=-1,h=e.length,m=!1;++s<h;){var C=Ue(e[s]);if(!(m=t!=null&&i(t,C)))break;t=t[C]}return m||++s!=h?m:(h=t==null?0:t.length,!!h&&ni(h)&&Ke(C,h)&&(ht(t)||mn(t)))}function Xl(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 Ya(t){return typeof t.constructor=="function"&&!ar(t)?In(Rr(t)):{}}function $l(t,e,i){var s=t.constructor;switch(e){case je:return ho(t);case et:case nt:return new s(+t);case Cn:return Ol(t,i);case vi:case mi:case _i:case wi:case bi:case Ci:case Si:case ki:case Ai:return Na(t,i);case It:return new s;case ke:case Ie:return new s(t);case Vt:return Il(t);case Zt:return new s;case Ne:return Nl(t)}}function Jl(t,e){var i=e.length;if(!i)return t;var s=i-1;return e[s]=(i>1?"& ":"")+e[s],e=e.join(i>2?", ":" "),t.replace(jc,`{
14
+ /* [wrapped with `+e+`] */
15
+ `)}function jl(t){return ht(t)||mn(t)||!!(ea&&t&&t[ea])}function Ke(t,e){var i=typeof t;return e=e??ct,!!e&&(i=="number"||i!="symbol"&&af.test(t))&&t>-1&&t%1==0&&t<e}function te(t,e,i){if(!Bt(i))return!1;var s=typeof e;return(s=="number"?re(i)&&Ke(e,i.length):s=="string"&&e in i)?Ee(i[e],t):!1}function wo(t,e){if(ht(t))return!1;var i=typeof t;return i=="number"||i=="symbol"||i=="boolean"||t==null||le(t)?!0:Gc.test(t)||!zc.test(t)||e!=null&&t in Tt(e)}function Yl(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function bo(t){var e=Jr(t),i=y[e];if(typeof i!="function"||!(e in mt.prototype))return!1;if(t===i)return!0;var s=vo(i);return!!s&&t===s[0]}function Vl(t){return!!Vs&&Vs in t}var Zl=kr?ze:Fo;function ar(t){var e=t&&t.constructor,i=typeof e=="function"&&e.prototype||Tn;return t===i}function Va(t){return t===t&&!Bt(t)}function Za(t,e){return function(i){return i==null?!1:i[t]===e&&(e!==n||t in Tt(i))}}function Ql(t){var e=ti(t,function(s){return i.size===p&&i.clear(),s}),i=e.cache;return e}function tp(t,e){var i=t[1],s=e[1],h=i|s,m=h<(k|L|I),C=s==I&&i==J||s==I&&i==P&&t[7].length<=e[8]||s==(I|P)&&e[7].length<=e[8]&&i==J;if(!(m||C))return t;s&k&&(t[2]=e[2],h|=i&k?0:Y);var S=e[3];if(S){var E=t[3];t[3]=E?La(E,S,e[4]):S,t[4]=E?Ze(t[3],_):e[4]}return S=e[5],S&&(E=t[5],t[5]=E?Ua(E,S,e[6]):S,t[6]=E?Ze(t[5],_):e[6]),S=e[7],S&&(t[7]=S),s&I&&(t[8]=t[8]==null?e[8]:$t(t[8],e[8])),t[9]==null&&(t[9]=e[9]),t[0]=e[0],t[1]=h,t}function ep(t){var e=[];if(t!=null)for(var i in Tt(t))e.push(i);return e}function np(t){return xr.call(t)}function Qa(t,e,i){return e=Mt(e===n?t.length-1:e,0),function(){for(var s=arguments,h=-1,m=Mt(s.length-e,0),C=O(m);++h<m;)C[h]=s[e+h];h=-1;for(var S=O(e+1);++h<e;)S[h]=s[h];return S[e]=i(C),ce(t,this,S)}}function tu(t,e){return e.length<2?t:gn(t,we(e,0,-1))}function rp(t,e){for(var i=t.length,s=$t(e.length,i),h=ne(t);s--;){var m=e[s];t[s]=Ke(m,i)?h[m]:n}return t}function Co(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var eu=ru(ka),ur=mh||function(t,e){return Kt.setTimeout(t,e)},So=ru(xl);function nu(t,e,i){var s=e+"";return So(t,Jl(s,ip(Gl(s),i)))}function ru(t){var e=0,i=0;return function(){var s=Ch(),h=X-(s-i);if(i=s,h>0){if(++e>=z)return arguments[0]}else e=0;return t.apply(n,arguments)}}function Yr(t,e){var i=-1,s=t.length,h=s-1;for(e=e===n?s:e;++i<e;){var m=io(i,h),C=t[m];t[m]=t[i],t[i]=C}return t.length=e,t}var iu=Ql(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Xc,function(i,s,h,m){e.push(h?m.replace(tf,"$1"):s||i)}),e});function Ue(t){if(typeof t=="string"||le(t))return t;var e=t+"";return e=="0"&&1/t==-xt?"-0":e}function vn(t){if(t!=null){try{return Ar.call(t)}catch{}try{return t+""}catch{}}return""}function ip(t,e){return ye(Q,function(i){var s="_."+i[0];e&i[1]&&!wr(t,s)&&t.push(s)}),t.sort()}function ou(t){if(t instanceof mt)return t.clone();var e=new me(t.__wrapped__,t.__chain__);return e.__actions__=ne(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}function op(t,e,i){(i?te(t,e,i):e===n)?e=1:e=Mt(pt(e),0);var s=t==null?0:t.length;if(!s||e<1)return[];for(var h=0,m=0,C=O(Nr(s/e));h<s;)C[m++]=we(t,h,h+=e);return C}function sp(t){for(var e=-1,i=t==null?0:t.length,s=0,h=[];++e<i;){var m=t[e];m&&(h[s++]=m)}return h}function ap(){var t=arguments.length;if(!t)return[];for(var e=O(t-1),i=arguments[0],s=t;s--;)e[s-1]=arguments[s];return Ve(ht(i)?ne(i):[i],zt(e,1))}var up=yt(function(t,e){return Ut(t)?nr(t,zt(e,1,Ut,!0)):[]}),cp=yt(function(t,e){var i=be(e);return Ut(i)&&(i=n),Ut(t)?nr(t,zt(e,1,Ut,!0),it(i,2)):[]}),fp=yt(function(t,e){var i=be(e);return Ut(i)&&(i=n),Ut(t)?nr(t,zt(e,1,Ut,!0),n,i):[]});function hp(t,e,i){var s=t==null?0:t.length;return s?(e=i||e===n?1:pt(e),we(t,e<0?0:e,s)):[]}function lp(t,e,i){var s=t==null?0:t.length;return s?(e=i||e===n?1:pt(e),e=s-e,we(t,0,e<0?0:e)):[]}function pp(t,e){return t&&t.length?Hr(t,it(e,3),!0,!0):[]}function dp(t,e){return t&&t.length?Hr(t,it(e,3),!0):[]}function gp(t,e,i,s){var h=t==null?0:t.length;return h?(i&&typeof i!="number"&&te(t,e,i)&&(i=0,s=h),al(t,e,i,s)):[]}function su(t,e,i){var s=t==null?0:t.length;if(!s)return-1;var h=i==null?0:pt(i);return h<0&&(h=Mt(s+h,0)),br(t,it(e,3),h)}function au(t,e,i){var s=t==null?0:t.length;if(!s)return-1;var h=s-1;return i!==n&&(h=pt(i),h=i<0?Mt(s+h,0):$t(h,s-1)),br(t,it(e,3),h,!0)}function uu(t){var e=t==null?0:t.length;return e?zt(t,1):[]}function yp(t){var e=t==null?0:t.length;return e?zt(t,xt):[]}function vp(t,e){var i=t==null?0:t.length;return i?(e=e===n?1:pt(e),zt(t,e)):[]}function mp(t){for(var e=-1,i=t==null?0:t.length,s={};++e<i;){var h=t[e];s[h[0]]=h[1]}return s}function cu(t){return t&&t.length?t[0]:n}function _p(t,e,i){var s=t==null?0:t.length;if(!s)return-1;var h=i==null?0:pt(i);return h<0&&(h=Mt(s+h,0)),kn(t,e,h)}function wp(t){var e=t==null?0:t.length;return e?we(t,0,-1):[]}var bp=yt(function(t){var e=Nt(t,co);return e.length&&e[0]===t[0]?Qi(e):[]}),Cp=yt(function(t){var e=be(t),i=Nt(t,co);return e===be(i)?e=n:i.pop(),i.length&&i[0]===t[0]?Qi(i,it(e,2)):[]}),Sp=yt(function(t){var e=be(t),i=Nt(t,co);return e=typeof e=="function"?e:n,e&&i.pop(),i.length&&i[0]===t[0]?Qi(i,n,e):[]});function kp(t,e){return t==null?"":wh.call(t,e)}function be(t){var e=t==null?0:t.length;return e?t[e-1]:n}function Ap(t,e,i){var s=t==null?0:t.length;if(!s)return-1;var h=s;return i!==n&&(h=pt(i),h=h<0?Mt(s+h,0):$t(h,s-1)),e===e?ih(t,e,h):br(t,Ks,h,!0)}function xp(t,e){return t&&t.length?wa(t,pt(e)):n}var Ep=yt(fu);function fu(t,e){return t&&t.length&&e&&e.length?ro(t,e):t}function Tp(t,e,i){return t&&t.length&&e&&e.length?ro(t,e,it(i,2)):t}function Rp(t,e,i){return t&&t.length&&e&&e.length?ro(t,e,n,i):t}var Op=He(function(t,e){var i=t==null?0:t.length,s=ji(t,e);return Sa(t,Nt(e,function(h){return Ke(h,i)?+h:h}).sort(Ba)),s});function Ip(t,e){var i=[];if(!(t&&t.length))return i;var s=-1,h=[],m=t.length;for(e=it(e,3);++s<m;){var C=t[s];e(C,s,t)&&(i.push(C),h.push(s))}return Sa(t,h),i}function ko(t){return t==null?t:kh.call(t)}function Np(t,e,i){var s=t==null?0:t.length;return s?(i&&typeof i!="number"&&te(t,e,i)?(e=0,i=s):(e=e==null?0:pt(e),i=i===n?s:pt(i)),we(t,e,i)):[]}function Bp(t,e){return Wr(t,e)}function Lp(t,e,i){return so(t,e,it(i,2))}function Up(t,e){var i=t==null?0:t.length;if(i){var s=Wr(t,e);if(s<i&&Ee(t[s],e))return s}return-1}function Dp(t,e){return Wr(t,e,!0)}function Pp(t,e,i){return so(t,e,it(i,2),!0)}function Fp(t,e){var i=t==null?0:t.length;if(i){var s=Wr(t,e,!0)-1;if(Ee(t[s],e))return s}return-1}function Mp(t){return t&&t.length?Aa(t):[]}function qp(t,e){return t&&t.length?Aa(t,it(e,2)):[]}function Wp(t){var e=t==null?0:t.length;return e?we(t,1,e):[]}function Hp(t,e,i){return t&&t.length?(e=i||e===n?1:pt(e),we(t,0,e<0?0:e)):[]}function Kp(t,e,i){var s=t==null?0:t.length;return s?(e=i||e===n?1:pt(e),e=s-e,we(t,e<0?0:e,s)):[]}function zp(t,e){return t&&t.length?Hr(t,it(e,3),!1,!0):[]}function Gp(t,e){return t&&t.length?Hr(t,it(e,3)):[]}var Xp=yt(function(t){return en(zt(t,1,Ut,!0))}),$p=yt(function(t){var e=be(t);return Ut(e)&&(e=n),en(zt(t,1,Ut,!0),it(e,2))}),Jp=yt(function(t){var e=be(t);return e=typeof e=="function"?e:n,en(zt(t,1,Ut,!0),n,e)});function jp(t){return t&&t.length?en(t):[]}function Yp(t,e){return t&&t.length?en(t,it(e,2)):[]}function Vp(t,e){return e=typeof e=="function"?e:n,t&&t.length?en(t,n,e):[]}function Ao(t){if(!(t&&t.length))return[];var e=0;return t=Ye(t,function(i){if(Ut(i))return e=Mt(i.length,e),!0}),Wi(e,function(i){return Nt(t,Fi(i))})}function hu(t,e){if(!(t&&t.length))return[];var i=Ao(t);return e==null?i:Nt(i,function(s){return ce(e,n,s)})}var Zp=yt(function(t,e){return Ut(t)?nr(t,e):[]}),Qp=yt(function(t){return uo(Ye(t,Ut))}),td=yt(function(t){var e=be(t);return Ut(e)&&(e=n),uo(Ye(t,Ut),it(e,2))}),ed=yt(function(t){var e=be(t);return e=typeof e=="function"?e:n,uo(Ye(t,Ut),n,e)}),nd=yt(Ao);function rd(t,e){return Ra(t||[],e||[],er)}function id(t,e){return Ra(t||[],e||[],or)}var od=yt(function(t){var e=t.length,i=e>1?t[e-1]:n;return i=typeof i=="function"?(t.pop(),i):n,hu(t,i)});function lu(t){var e=y(t);return e.__chain__=!0,e}function sd(t,e){return e(t),t}function Vr(t,e){return e(t)}var ad=He(function(t){var e=t.length,i=e?t[0]:0,s=this.__wrapped__,h=function(m){return ji(m,t)};return e>1||this.__actions__.length||!(s instanceof mt)||!Ke(i)?this.thru(h):(s=s.slice(i,+i+(e?1:0)),s.__actions__.push({func:Vr,args:[h],thisArg:n}),new me(s,this.__chain__).thru(function(m){return e&&!m.length&&m.push(n),m}))});function ud(){return lu(this)}function cd(){return new me(this.value(),this.__chain__)}function fd(){this.__values__===n&&(this.__values__=xu(this.value()));var t=this.__index__>=this.__values__.length,e=t?n:this.__values__[this.__index__++];return{done:t,value:e}}function hd(){return this}function ld(t){for(var e,i=this;i instanceof Dr;){var s=ou(i);s.__index__=0,s.__values__=n,e?h.__wrapped__=s:e=s;var h=s;i=i.__wrapped__}return h.__wrapped__=t,e}function pd(){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:Vr,args:[ko],thisArg:n}),new me(e,this.__chain__)}return this.thru(ko)}function dd(){return Ta(this.__wrapped__,this.__actions__)}var gd=Kr(function(t,e,i){Et.call(t,i)?++t[i]:qe(t,i,1)});function yd(t,e,i){var s=ht(t)?Ws:sl;return i&&te(t,e,i)&&(e=n),s(t,it(e,3))}function vd(t,e){var i=ht(t)?Ye:ha;return i(t,it(e,3))}var md=Ma(su),_d=Ma(au);function wd(t,e){return zt(Zr(t,e),1)}function bd(t,e){return zt(Zr(t,e),xt)}function Cd(t,e,i){return i=i===n?1:pt(i),zt(Zr(t,e),i)}function pu(t,e){var i=ht(t)?ye:tn;return i(t,it(e,3))}function du(t,e){var i=ht(t)?Wf:fa;return i(t,it(e,3))}var Sd=Kr(function(t,e,i){Et.call(t,i)?t[i].push(e):qe(t,i,[e])});function kd(t,e,i,s){t=re(t)?t:Dn(t),i=i&&!s?pt(i):0;var h=t.length;return i<0&&(i=Mt(h+i,0)),ri(t)?i<=h&&t.indexOf(e,i)>-1:!!h&&kn(t,e,i)>-1}var Ad=yt(function(t,e,i){var s=-1,h=typeof e=="function",m=re(t)?O(t.length):[];return tn(t,function(C){m[++s]=h?ce(e,C,i):rr(C,e,i)}),m}),xd=Kr(function(t,e,i){qe(t,i,e)});function Zr(t,e){var i=ht(t)?Nt:va;return i(t,it(e,3))}function Ed(t,e,i,s){return t==null?[]:(ht(e)||(e=e==null?[]:[e]),i=s?n:i,ht(i)||(i=i==null?[]:[i]),ba(t,e,i))}var Td=Kr(function(t,e,i){t[i?0:1].push(e)},function(){return[[],[]]});function Rd(t,e,i){var s=ht(t)?Di:Gs,h=arguments.length<3;return s(t,it(e,4),i,h,tn)}function Od(t,e,i){var s=ht(t)?Hf:Gs,h=arguments.length<3;return s(t,it(e,4),i,h,fa)}function Id(t,e){var i=ht(t)?Ye:ha;return i(t,ei(it(e,3)))}function Nd(t){var e=ht(t)?sa:kl;return e(t)}function Bd(t,e,i){(i?te(t,e,i):e===n)?e=1:e=pt(e);var s=ht(t)?el:Al;return s(t,e)}function Ld(t){var e=ht(t)?nl:El;return e(t)}function Ud(t){if(t==null)return 0;if(re(t))return ri(t)?xn(t):t.length;var e=Jt(t);return e==It||e==Zt?t.size:eo(t).length}function Dd(t,e,i){var s=ht(t)?Pi:Tl;return i&&te(t,e,i)&&(e=n),s(t,it(e,3))}var Pd=yt(function(t,e){if(t==null)return[];var i=e.length;return i>1&&te(t,e[0],e[1])?e=[]:i>2&&te(e[0],e[1],e[2])&&(e=[e[0]]),ba(t,zt(e,1),[])}),Qr=vh||function(){return Kt.Date.now()};function Fd(t,e){if(typeof e!="function")throw new ve(v);return t=pt(t),function(){if(--t<1)return e.apply(this,arguments)}}function gu(t,e,i){return e=i?n:e,e=t&&e==null?t.length:e,We(t,I,n,n,n,n,e)}function yu(t,e){var i;if(typeof e!="function")throw new ve(v);return t=pt(t),function(){return--t>0&&(i=e.apply(this,arguments)),t<=1&&(e=n),i}}var xo=yt(function(t,e,i){var s=k;if(i.length){var h=Ze(i,Ln(xo));s|=U}return We(t,s,e,i,h)}),vu=yt(function(t,e,i){var s=k|L;if(i.length){var h=Ze(i,Ln(vu));s|=U}return We(e,s,t,i,h)});function mu(t,e,i){e=i?n:e;var s=We(t,J,n,n,n,n,n,e);return s.placeholder=mu.placeholder,s}function _u(t,e,i){e=i?n:e;var s=We(t,N,n,n,n,n,n,e);return s.placeholder=_u.placeholder,s}function wu(t,e,i){var s,h,m,C,S,E,M=0,q=!1,W=!1,j=!0;if(typeof t!="function")throw new ve(v);e=Ce(e)||0,Bt(i)&&(q=!!i.leading,W="maxWait"in i,m=W?Mt(Ce(i.maxWait)||0,e):m,j="trailing"in i?!!i.trailing:j);function tt(Dt){var Te=s,Xe=h;return s=h=n,M=Dt,C=t.apply(Xe,Te),C}function ot(Dt){return M=Dt,S=ur(vt,e),q?tt(Dt):C}function dt(Dt){var Te=Dt-E,Xe=Dt-M,Mu=e-Te;return W?$t(Mu,m-Xe):Mu}function st(Dt){var Te=Dt-E,Xe=Dt-M;return E===n||Te>=e||Te<0||W&&Xe>=m}function vt(){var Dt=Qr();if(st(Dt))return _t(Dt);S=ur(vt,dt(Dt))}function _t(Dt){return S=n,j&&s?tt(Dt):(s=h=n,C)}function pe(){S!==n&&Oa(S),M=0,s=E=h=S=n}function ee(){return S===n?C:_t(Qr())}function de(){var Dt=Qr(),Te=st(Dt);if(s=arguments,h=this,E=Dt,Te){if(S===n)return ot(E);if(W)return Oa(S),S=ur(vt,e),tt(E)}return S===n&&(S=ur(vt,e)),C}return de.cancel=pe,de.flush=ee,de}var Md=yt(function(t,e){return ca(t,1,e)}),qd=yt(function(t,e,i){return ca(t,Ce(e)||0,i)});function Wd(t){return We(t,R)}function ti(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new ve(v);var i=function(){var s=arguments,h=e?e.apply(this,s):s[0],m=i.cache;if(m.has(h))return m.get(h);var C=t.apply(this,s);return i.cache=m.set(h,C)||m,C};return i.cache=new(ti.Cache||Me),i}ti.Cache=Me;function ei(t){if(typeof t!="function")throw new ve(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 Hd(t){return yu(2,t)}var Kd=Rl(function(t,e){e=e.length==1&&ht(e[0])?Nt(e[0],fe(it())):Nt(zt(e,1),fe(it()));var i=e.length;return yt(function(s){for(var h=-1,m=$t(s.length,i);++h<m;)s[h]=e[h].call(this,s[h]);return ce(t,this,s)})}),Eo=yt(function(t,e){var i=Ze(e,Ln(Eo));return We(t,U,n,e,i)}),bu=yt(function(t,e){var i=Ze(e,Ln(bu));return We(t,T,n,e,i)}),zd=He(function(t,e){return We(t,P,n,n,n,e)});function Gd(t,e){if(typeof t!="function")throw new ve(v);return e=e===n?e:pt(e),yt(t,e)}function Xd(t,e){if(typeof t!="function")throw new ve(v);return e=e==null?0:Mt(pt(e),0),yt(function(i){var s=i[e],h=rn(i,0,e);return s&&Ve(h,s),ce(t,this,h)})}function $d(t,e,i){var s=!0,h=!0;if(typeof t!="function")throw new ve(v);return Bt(i)&&(s="leading"in i?!!i.leading:s,h="trailing"in i?!!i.trailing:h),wu(t,e,{leading:s,maxWait:e,trailing:h})}function Jd(t){return gu(t,1)}function jd(t,e){return Eo(fo(e),t)}function Yd(){if(!arguments.length)return[];var t=arguments[0];return ht(t)?t:[t]}function Vd(t){return _e(t,u)}function Zd(t,e){return e=typeof e=="function"?e:n,_e(t,u,e)}function Qd(t){return _e(t,g|u)}function tg(t,e){return e=typeof e=="function"?e:n,_e(t,g|u,e)}function eg(t,e){return e==null||ua(t,e,Wt(e))}function Ee(t,e){return t===e||t!==t&&e!==e}var ng=$r(Zi),rg=$r(function(t,e){return t>=e}),mn=da(function(){return arguments}())?da:function(t){return Lt(t)&&Et.call(t,"callee")&&!ta.call(t,"callee")},ht=O.isArray,ig=Us?fe(Us):ll;function re(t){return t!=null&&ni(t.length)&&!ze(t)}function Ut(t){return Lt(t)&&re(t)}function og(t){return t===!0||t===!1||Lt(t)&&Qt(t)==et}var on=_h||Fo,sg=Ds?fe(Ds):pl;function ag(t){return Lt(t)&&t.nodeType===1&&!cr(t)}function ug(t){if(t==null)return!0;if(re(t)&&(ht(t)||typeof t=="string"||typeof t.splice=="function"||on(t)||Un(t)||mn(t)))return!t.length;var e=Jt(t);if(e==It||e==Zt)return!t.size;if(ar(t))return!eo(t).length;for(var i in t)if(Et.call(t,i))return!1;return!0}function cg(t,e){return ir(t,e)}function fg(t,e,i){i=typeof i=="function"?i:n;var s=i?i(t,e):n;return s===n?ir(t,e,n,i):!!s}function To(t){if(!Lt(t))return!1;var e=Qt(t);return e==at||e==Z||typeof t.message=="string"&&typeof t.name=="string"&&!cr(t)}function hg(t){return typeof t=="number"&&na(t)}function ze(t){if(!Bt(t))return!1;var e=Qt(t);return e==kt||e==Xt||e==K||e==Xn}function Cu(t){return typeof t=="number"&&t==pt(t)}function ni(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ct}function Bt(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function Lt(t){return t!=null&&typeof t=="object"}var Su=Ps?fe(Ps):gl;function lg(t,e){return t===e||to(t,e,mo(e))}function pg(t,e,i){return i=typeof i=="function"?i:n,to(t,e,mo(e),i)}function dg(t){return ku(t)&&t!=+t}function gg(t){if(Zl(t))throw new ft(f);return ga(t)}function yg(t){return t===null}function vg(t){return t==null}function ku(t){return typeof t=="number"||Lt(t)&&Qt(t)==ke}function cr(t){if(!Lt(t)||Qt(t)!=ue)return!1;var e=Rr(t);if(e===null)return!0;var i=Et.call(e,"constructor")&&e.constructor;return typeof i=="function"&&i instanceof i&&Ar.call(i)==ph}var Ro=Fs?fe(Fs):yl;function mg(t){return Cu(t)&&t>=-ct&&t<=ct}var Au=Ms?fe(Ms):vl;function ri(t){return typeof t=="string"||!ht(t)&&Lt(t)&&Qt(t)==Ie}function le(t){return typeof t=="symbol"||Lt(t)&&Qt(t)==Ne}var Un=qs?fe(qs):ml;function _g(t){return t===n}function wg(t){return Lt(t)&&Jt(t)==Pe}function bg(t){return Lt(t)&&Qt(t)==Jn}var Cg=$r(no),Sg=$r(function(t,e){return t<=e});function xu(t){if(!t)return[];if(re(t))return ri(t)?Ae(t):ne(t);if(Yn&&t[Yn])return eh(t[Yn]());var e=Jt(t),i=e==It?Ki:e==Zt?Cr:Dn;return i(t)}function Ge(t){if(!t)return t===0?t:0;if(t=Ce(t),t===xt||t===-xt){var e=t<0?-1:1;return e*Gt}return t===t?t:0}function pt(t){var e=Ge(t),i=e%1;return e===e?i?e-i:e:0}function Eu(t){return t?dn(pt(t),0,ae):0}function Ce(t){if(typeof t=="number")return t;if(le(t))return Oe;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=Xs(t);var i=rf.test(t);return i||sf.test(t)?Ff(t.slice(2),i?2:8):nf.test(t)?Oe:+t}function Tu(t){return Le(t,ie(t))}function kg(t){return t?dn(pt(t),-ct,ct):t===0?t:0}function At(t){return t==null?"":he(t)}var Ag=Nn(function(t,e){if(ar(e)||re(e)){Le(e,Wt(e),t);return}for(var i in e)Et.call(e,i)&&er(t,i,e[i])}),Ru=Nn(function(t,e){Le(e,ie(e),t)}),ii=Nn(function(t,e,i,s){Le(e,ie(e),t,s)}),xg=Nn(function(t,e,i,s){Le(e,Wt(e),t,s)}),Eg=He(ji);function Tg(t,e){var i=In(t);return e==null?i:aa(i,e)}var Rg=yt(function(t,e){t=Tt(t);var i=-1,s=e.length,h=s>2?e[2]:n;for(h&&te(e[0],e[1],h)&&(s=1);++i<s;)for(var m=e[i],C=ie(m),S=-1,E=C.length;++S<E;){var M=C[S],q=t[M];(q===n||Ee(q,Tn[M])&&!Et.call(t,M))&&(t[M]=m[M])}return t}),Og=yt(function(t){return t.push(n,Xa),ce(Ou,n,t)});function Ig(t,e){return Hs(t,it(e,3),Be)}function Ng(t,e){return Hs(t,it(e,3),Vi)}function Bg(t,e){return t==null?t:Yi(t,it(e,3),ie)}function Lg(t,e){return t==null?t:la(t,it(e,3),ie)}function Ug(t,e){return t&&Be(t,it(e,3))}function Dg(t,e){return t&&Vi(t,it(e,3))}function Pg(t){return t==null?[]:Mr(t,Wt(t))}function Fg(t){return t==null?[]:Mr(t,ie(t))}function Oo(t,e,i){var s=t==null?n:gn(t,e);return s===n?i:s}function Mg(t,e){return t!=null&&ja(t,e,ul)}function Io(t,e){return t!=null&&ja(t,e,cl)}var qg=Wa(function(t,e,i){e!=null&&typeof e.toString!="function"&&(e=xr.call(e)),t[e]=i},Bo(oe)),Wg=Wa(function(t,e,i){e!=null&&typeof e.toString!="function"&&(e=xr.call(e)),Et.call(t,e)?t[e].push(i):t[e]=[i]},it),Hg=yt(rr);function Wt(t){return re(t)?oa(t):eo(t)}function ie(t){return re(t)?oa(t,!0):_l(t)}function Kg(t,e){var i={};return e=it(e,3),Be(t,function(s,h,m){qe(i,e(s,h,m),s)}),i}function zg(t,e){var i={};return e=it(e,3),Be(t,function(s,h,m){qe(i,h,e(s,h,m))}),i}var Gg=Nn(function(t,e,i){qr(t,e,i)}),Ou=Nn(function(t,e,i,s){qr(t,e,i,s)}),Xg=He(function(t,e){var i={};if(t==null)return i;var s=!1;e=Nt(e,function(m){return m=nn(m,t),s||(s=m.length>1),m}),Le(t,yo(t),i),s&&(i=_e(i,g|l|u,ql));for(var h=e.length;h--;)ao(i,e[h]);return i});function $g(t,e){return Iu(t,ei(it(e)))}var Jg=He(function(t,e){return t==null?{}:bl(t,e)});function Iu(t,e){if(t==null)return{};var i=Nt(yo(t),function(s){return[s]});return e=it(e),Ca(t,i,function(s,h){return e(s,h[0])})}function jg(t,e,i){e=nn(e,t);var s=-1,h=e.length;for(h||(h=1,t=n);++s<h;){var m=t==null?n:t[Ue(e[s])];m===n&&(s=h,m=i),t=ze(m)?m.call(t):m}return t}function Yg(t,e,i){return t==null?t:or(t,e,i)}function Vg(t,e,i,s){return s=typeof s=="function"?s:n,t==null?t:or(t,e,i,s)}var Nu=za(Wt),Bu=za(ie);function Zg(t,e,i){var s=ht(t),h=s||on(t)||Un(t);if(e=it(e,4),i==null){var m=t&&t.constructor;h?i=s?new m:[]:Bt(t)?i=ze(m)?In(Rr(t)):{}:i={}}return(h?ye:Be)(t,function(C,S,E){return e(i,C,S,E)}),i}function Qg(t,e){return t==null?!0:ao(t,e)}function ty(t,e,i){return t==null?t:Ea(t,e,fo(i))}function ey(t,e,i,s){return s=typeof s=="function"?s:n,t==null?t:Ea(t,e,fo(i),s)}function Dn(t){return t==null?[]:Hi(t,Wt(t))}function ny(t){return t==null?[]:Hi(t,ie(t))}function ry(t,e,i){return i===n&&(i=e,e=n),i!==n&&(i=Ce(i),i=i===i?i:0),e!==n&&(e=Ce(e),e=e===e?e:0),dn(Ce(t),e,i)}function iy(t,e,i){return e=Ge(e),i===n?(i=e,e=0):i=Ge(i),t=Ce(t),fl(t,e,i)}function oy(t,e,i){if(i&&typeof i!="boolean"&&te(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 s=t;t=e,e=s}if(i||t%1||e%1){var h=ra();return $t(t+h*(e-t+Pf("1e-"+((h+"").length-1))),e)}return io(t,e)}var sy=Bn(function(t,e,i){return e=e.toLowerCase(),t+(i?Lu(e):e)});function Lu(t){return No(At(t).toLowerCase())}function Uu(t){return t=At(t),t&&t.replace(uf,Yf).replace(Ef,"")}function ay(t,e,i){t=At(t),e=he(e);var s=t.length;i=i===n?s:dn(pt(i),0,s);var h=i;return i-=e.length,i>=0&&t.slice(i,h)==e}function uy(t){return t=At(t),t&&Wc.test(t)?t.replace(ls,Vf):t}function cy(t){return t=At(t),t&&$c.test(t)?t.replace(xi,"\\$&"):t}var fy=Bn(function(t,e,i){return t+(i?"-":"")+e.toLowerCase()}),hy=Bn(function(t,e,i){return t+(i?" ":"")+e.toLowerCase()}),ly=Fa("toLowerCase");function py(t,e,i){t=At(t),e=pt(e);var s=e?xn(t):0;if(!e||s>=e)return t;var h=(e-s)/2;return Xr(Br(h),i)+t+Xr(Nr(h),i)}function dy(t,e,i){t=At(t),e=pt(e);var s=e?xn(t):0;return e&&s<e?t+Xr(e-s,i):t}function gy(t,e,i){t=At(t),e=pt(e);var s=e?xn(t):0;return e&&s<e?Xr(e-s,i)+t:t}function yy(t,e,i){return i||e==null?e=0:e&&(e=+e),Sh(At(t).replace(Ei,""),e||0)}function vy(t,e,i){return(i?te(t,e,i):e===n)?e=1:e=pt(e),oo(At(t),e)}function my(){var t=arguments,e=At(t[0]);return t.length<3?e:e.replace(t[1],t[2])}var _y=Bn(function(t,e,i){return t+(i?"_":"")+e.toLowerCase()});function wy(t,e,i){return i&&typeof i!="number"&&te(t,e,i)&&(e=i=n),i=i===n?ae:i>>>0,i?(t=At(t),t&&(typeof e=="string"||e!=null&&!Ro(e))&&(e=he(e),!e&&An(t))?rn(Ae(t),0,i):t.split(e,i)):[]}var by=Bn(function(t,e,i){return t+(i?" ":"")+No(e)});function Cy(t,e,i){return t=At(t),i=i==null?0:dn(pt(i),0,t.length),e=he(e),t.slice(i,i+e.length)==e}function Sy(t,e,i){var s=y.templateSettings;i&&te(t,e,i)&&(e=n),t=At(t),e=ii({},e,s,Ga);var h=ii({},e.imports,s.imports,Ga),m=Wt(h),C=Hi(h,m),S,E,M=0,q=e.interpolate||vr,W="__p += '",j=zi((e.escape||vr).source+"|"+q.source+"|"+(q===ps?ef:vr).source+"|"+(e.evaluate||vr).source+"|$","g"),tt="//# sourceURL="+(Et.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Nf+"]")+`
16
+ `;t.replace(j,function(st,vt,_t,pe,ee,de){return _t||(_t=pe),W+=t.slice(M,de).replace(cf,Zf),vt&&(S=!0,W+=`' +
17
+ __e(`+vt+`) +
18
+ '`),ee&&(E=!0,W+=`';
19
+ `+ee+`;
20
+ __p += '`),_t&&(W+=`' +
21
+ ((__t = (`+_t+`)) == null ? '' : __t) +
22
+ '`),M=de+st.length,st}),W+=`';
23
+ `;var ot=Et.call(e,"variable")&&e.variable;if(!ot)W=`with (obj) {
24
+ `+W+`
25
25
  }
26
- `;else if(Qa.test(re))throw new fe(d);N=(x?N.replace(Da,""):N).replace(Pa,"$1").replace(Fa,"$1;"),N="function("+(re||"obj")+`) {
27
- `+(re?"":`obj || (obj = {});
28
- `)+"var __t, __p = ''"+(C?", __e = _.escape":"")+(x?`, __j = Array.prototype.join;
26
+ `;else if(Qc.test(ot))throw new ft(d);W=(E?W.replace(Pc,""):W).replace(Fc,"$1").replace(Mc,"$1;"),W="function("+(ot||"obj")+`) {
27
+ `+(ot?"":`obj || (obj = {});
28
+ `)+"var __t, __p = ''"+(S?", __e = _.escape":"")+(E?`, __j = Array.prototype.join;
29
29
  function print() { __p += __j.call(arguments, '') }
30
30
  `:`;
31
- `)+N+`return __p
32
- }`;var he=Ta(function(){return _e(f,Z+"return "+N).apply(r,y)});if(he.source=N,Ki(he))throw he;return he}function bd(e){return Se(e).toLowerCase()}function Ad(e){return Se(e).toUpperCase()}function xd(e,t,n){if(e=Se(e),e&&(n||t===r))return Po(e);if(!e||!(t=it(t)))return e;var i=yt(e),o=yt(t),f=Fo(i,o),y=Mo(i,o)+1;return $t(i,f,y).join("")}function kd(e,t,n){if(e=Se(e),e&&(n||t===r))return e.slice(0,qo(e)+1);if(!e||!(t=it(t)))return e;var i=yt(e),o=Mo(i,yt(t))+1;return $t(i,0,o).join("")}function Ed(e,t,n){if(e=Se(e),e&&(n||t===r))return e.replace(Kr,"");if(!e||!(t=it(t)))return e;var i=yt(e),o=Fo(i,yt(t));return $t(i,o).join("")}function Td(e,t){var n=U,i=X;if(Le(t)){var o="separator"in t?t.separator:o;n="length"in t?le(t.length):n,i="omission"in t?it(t.omission):i}e=Se(e);var f=e.length;if(fn(e)){var y=yt(e);f=y.length}if(n>=f)return e;var C=n-cn(i);if(C<1)return i;var x=y?$t(y,0,C).join(""):e.slice(0,C);if(o===r)return x+i;if(y&&(C+=x.length-C),Hi(o)){if(e.slice(C).search(o)){var O,L=x;for(o.global||(o=oi(o.source,Se(io.exec(o))+"g")),o.lastIndex=0;O=o.exec(L);)var N=O.index;x=x.slice(0,N===r?C:N)}}else if(e.indexOf(it(o),C)!=C){var K=x.lastIndexOf(o);K>-1&&(x=x.slice(0,K))}return x+i}function Rd(e){return e=Se(e),e&&Ma.test(e)?e.replace(to,rf):e}var Od=yn(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),$i=Rs("toUpperCase");function Ea(e,t,n){return e=Se(e),t=n?r:t,t===r?Qu(e)?af(e):Hu(e):e.match(t)||[]}var Ta=de(function(e,t){try{return nt(e,r,t)}catch(n){return Ki(n)?n:new fe(n)}}),Ld=It(function(e,t){return ft(t,function(n){n=kt(n),Ot(e,n,Wi(e[n],e))}),e});function Id(e){var t=e==null?0:e.length,n=ne();return e=t?Oe(e,function(i){if(typeof i[1]!="function")throw new ct(w);return[n(i[0]),i[1]]}):[],de(function(i){for(var o=-1;++o<t;){var f=e[o];if(nt(f[0],this,i))return nt(f[1],this,i)}})}function Nd(e){return ic(ht(e,p))}function Xi(e){return function(){return e}}function Bd(e,t){return e==null||e!==e?t:e}var Ud=Ls(),Dd=Ls(!0);function je(e){return e}function Ji(e){return as(typeof e=="function"?e:ht(e,p))}function Pd(e){return fs(ht(e,p))}function Fd(e,t){return cs(e,ht(t,p))}var Md=de(function(e,t){return function(n){return Nn(n,e,t)}}),Wd=de(function(e,t){return function(n){return Nn(e,n,t)}});function Yi(e,t,n){var i=Pe(t),o=lr(t,i);n==null&&!(Le(t)&&(o.length||!i.length))&&(n=t,t=e,e=this,o=lr(t,Pe(t)));var f=!(Le(n)&&"chain"in n)||!!n.chain,y=Bt(e);return ft(o,function(C){var x=t[C];e[C]=x,y&&(e.prototype[C]=function(){var O=this.__chain__;if(f||O){var L=e(this.__wrapped__),N=L.__actions__=Ze(this.__actions__);return N.push({func:x,args:arguments,thisArg:e}),L.__chain__=O,L}return x.apply(e,Wt([this.value()],arguments))})}),e}function qd(){return Fe._===this&&(Fe._=pf),this}function Zi(){}function Kd(e){return e=le(e),de(function(t){return ls(t,e)})}var Hd=Ei(Oe),zd=Ei(Io),Gd=Ei(Qr);function Ra(e){return Bi(e)?jr(kt(e)):Sc(e)}function $d(e){return function(t){return e==null?r:jt(e,t)}}var Xd=Ns(),Jd=Ns(!0);function Vi(){return[]}function Qi(){return!1}function Yd(){return{}}function Zd(){return""}function Vd(){return!0}function Qd(e,t){if(e=le(e),e<1||e>ue)return[];var n=et,i=Ke(e,et);t=ne(t),e-=et;for(var o=ni(i,t);++n<e;)t(n);return o}function jd(e){return ce(e)?Oe(e,kt):ot(e)?[e]:Ze(Ys(Se(e)))}function eg(e){var t=++lf;return Se(e)+t}var tg=yr(function(e,t){return e+t},0),ng=Ti("ceil"),rg=yr(function(e,t){return e/t},1),ig=Ti("floor");function og(e){return e&&e.length?cr(e,je,pi):r}function sg(e,t){return e&&e.length?cr(e,ne(t,2),pi):r}function ag(e){return Uo(e,je)}function ug(e,t){return Uo(e,ne(t,2))}function fg(e){return e&&e.length?cr(e,je,yi):r}function cg(e,t){return e&&e.length?cr(e,ne(t,2),yi):r}var lg=yr(function(e,t){return e*t},1),hg=Ti("round"),pg=yr(function(e,t){return e-t},0);function dg(e){return e&&e.length?ti(e,je):0}function gg(e,t){return e&&e.length?ti(e,ne(t,2)):0}return u.after=Ph,u.ary=sa,u.assign=Ap,u.assignIn=wa,u.assignInWith=Or,u.assignWith=xp,u.at=kp,u.before=aa,u.bind=Wi,u.bindAll=Ld,u.bindKey=ua,u.castArray=Yh,u.chain=ra,u.chunk=il,u.compact=ol,u.concat=sl,u.cond=Id,u.conforms=Nd,u.constant=Xi,u.countBy=dh,u.create=Ep,u.curry=fa,u.curryRight=ca,u.debounce=la,u.defaults=Tp,u.defaultsDeep=Rp,u.defer=Fh,u.delay=Mh,u.difference=al,u.differenceBy=ul,u.differenceWith=fl,u.drop=cl,u.dropRight=ll,u.dropRightWhile=hl,u.dropWhile=pl,u.fill=dl,u.filter=vh,u.flatMap=mh,u.flatMapDeep=wh,u.flatMapDepth=Sh,u.flatten=js,u.flattenDeep=gl,u.flattenDepth=vl,u.flip=Wh,u.flow=Ud,u.flowRight=Dd,u.fromPairs=yl,u.functions=Dp,u.functionsIn=Pp,u.groupBy=Ch,u.initial=ml,u.intersection=wl,u.intersectionBy=Sl,u.intersectionWith=Cl,u.invert=Mp,u.invertBy=Wp,u.invokeMap=Ah,u.iteratee=Ji,u.keyBy=xh,u.keys=Pe,u.keysIn=Qe,u.map=Ar,u.mapKeys=Kp,u.mapValues=Hp,u.matches=Pd,u.matchesProperty=Fd,u.memoize=kr,u.merge=zp,u.mergeWith=Sa,u.method=Md,u.methodOf=Wd,u.mixin=Yi,u.negate=Er,u.nthArg=Kd,u.omit=Gp,u.omitBy=$p,u.once=qh,u.orderBy=kh,u.over=Hd,u.overArgs=Kh,u.overEvery=zd,u.overSome=Gd,u.partial=qi,u.partialRight=ha,u.partition=Eh,u.pick=Xp,u.pickBy=Ca,u.property=Ra,u.propertyOf=$d,u.pull=kl,u.pullAll=ta,u.pullAllBy=El,u.pullAllWith=Tl,u.pullAt=Rl,u.range=Xd,u.rangeRight=Jd,u.rearg=Hh,u.reject=Oh,u.remove=Ol,u.rest=zh,u.reverse=Fi,u.sampleSize=Ih,u.set=Yp,u.setWith=Zp,u.shuffle=Nh,u.slice=Ll,u.sortBy=Dh,u.sortedUniq=Fl,u.sortedUniqBy=Ml,u.split=md,u.spread=Gh,u.tail=Wl,u.take=ql,u.takeRight=Kl,u.takeRightWhile=Hl,u.takeWhile=zl,u.tap=oh,u.throttle=$h,u.thru=br,u.toArray=ya,u.toPairs=ba,u.toPairsIn=Aa,u.toPath=jd,u.toPlainObject=ma,u.transform=Vp,u.unary=Xh,u.union=Gl,u.unionBy=$l,u.unionWith=Xl,u.uniq=Jl,u.uniqBy=Yl,u.uniqWith=Zl,u.unset=Qp,u.unzip=Mi,u.unzipWith=na,u.update=jp,u.updateWith=ed,u.values=wn,u.valuesIn=td,u.without=Vl,u.words=Ea,u.wrap=Jh,u.xor=Ql,u.xorBy=jl,u.xorWith=eh,u.zip=th,u.zipObject=nh,u.zipObjectDeep=rh,u.zipWith=ih,u.entries=ba,u.entriesIn=Aa,u.extend=wa,u.extendWith=Or,Yi(u,u),u.add=tg,u.attempt=Ta,u.camelCase=od,u.capitalize=xa,u.ceil=ng,u.clamp=nd,u.clone=Zh,u.cloneDeep=Qh,u.cloneDeepWith=jh,u.cloneWith=Vh,u.conformsTo=ep,u.deburr=ka,u.defaultTo=Bd,u.divide=rg,u.endsWith=sd,u.eq=mt,u.escape=ad,u.escapeRegExp=ud,u.every=gh,u.find=yh,u.findIndex=Vs,u.findKey=Op,u.findLast=_h,u.findLastIndex=Qs,u.findLastKey=Lp,u.floor=ig,u.forEach=ia,u.forEachRight=oa,u.forIn=Ip,u.forInRight=Np,u.forOwn=Bp,u.forOwnRight=Up,u.get=zi,u.gt=tp,u.gte=np,u.has=Fp,u.hasIn=Gi,u.head=ea,u.identity=je,u.includes=bh,u.indexOf=_l,u.inRange=rd,u.invoke=qp,u.isArguments=nn,u.isArray=ce,u.isArrayBuffer=rp,u.isArrayLike=Ve,u.isArrayLikeObject=Ne,u.isBoolean=ip,u.isBuffer=Xt,u.isDate=op,u.isElement=sp,u.isEmpty=ap,u.isEqual=up,u.isEqualWith=fp,u.isError=Ki,u.isFinite=cp,u.isFunction=Bt,u.isInteger=pa,u.isLength=Tr,u.isMap=da,u.isMatch=lp,u.isMatchWith=hp,u.isNaN=pp,u.isNative=dp,u.isNil=vp,u.isNull=gp,u.isNumber=ga,u.isObject=Le,u.isObjectLike=Ie,u.isPlainObject=Mn,u.isRegExp=Hi,u.isSafeInteger=yp,u.isSet=va,u.isString=Rr,u.isSymbol=ot,u.isTypedArray=mn,u.isUndefined=_p,u.isWeakMap=mp,u.isWeakSet=wp,u.join=bl,u.kebabCase=fd,u.last=dt,u.lastIndexOf=Al,u.lowerCase=cd,u.lowerFirst=ld,u.lt=Sp,u.lte=Cp,u.max=og,u.maxBy=sg,u.mean=ag,u.meanBy=ug,u.min=fg,u.minBy=cg,u.stubArray=Vi,u.stubFalse=Qi,u.stubObject=Yd,u.stubString=Zd,u.stubTrue=Vd,u.multiply=lg,u.nth=xl,u.noConflict=qd,u.noop=Zi,u.now=xr,u.pad=hd,u.padEnd=pd,u.padStart=dd,u.parseInt=gd,u.random=id,u.reduce=Th,u.reduceRight=Rh,u.repeat=vd,u.replace=yd,u.result=Jp,u.round=hg,u.runInContext=b,u.sample=Lh,u.size=Bh,u.snakeCase=_d,u.some=Uh,u.sortedIndex=Il,u.sortedIndexBy=Nl,u.sortedIndexOf=Bl,u.sortedLastIndex=Ul,u.sortedLastIndexBy=Dl,u.sortedLastIndexOf=Pl,u.startCase=wd,u.startsWith=Sd,u.subtract=pg,u.sum=dg,u.sumBy=gg,u.template=Cd,u.times=Qd,u.toFinite=Ut,u.toInteger=le,u.toLength=_a,u.toLower=bd,u.toNumber=gt,u.toSafeInteger=bp,u.toString=Se,u.toUpper=Ad,u.trim=xd,u.trimEnd=kd,u.trimStart=Ed,u.truncate=Td,u.unescape=Rd,u.uniqueId=eg,u.upperCase=Od,u.upperFirst=$i,u.each=ia,u.eachRight=oa,u.first=ea,Yi(u,function(){var e={};return At(u,function(t,n){Ce.call(u.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),u.VERSION=l,ft(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){u[e].placeholder=u}),ft(["drop","take"],function(e,t){ve.prototype[e]=function(n){n=n===r?1:De(le(n),0);var i=this.__filtered__&&!t?new ve(this):this.clone();return i.__filtered__?i.__takeCount__=Ke(n,i.__takeCount__):i.__views__.push({size:Ke(n,et),type:e+(i.__dir__<0?"Right":"")}),i},ve.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),ft(["filter","map","takeWhile"],function(e,t){var n=t+1,i=n==B||n==Ae;ve.prototype[e]=function(o){var f=this.clone();return f.__iteratees__.push({iteratee:ne(o,3),type:n}),f.__filtered__=f.__filtered__||i,f}}),ft(["head","last"],function(e,t){var n="take"+(t?"Right":"");ve.prototype[e]=function(){return this[n](1).value()[0]}}),ft(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");ve.prototype[e]=function(){return this.__filtered__?new ve(this):this[n](1)}}),ve.prototype.compact=function(){return this.filter(je)},ve.prototype.find=function(e){return this.filter(e).head()},ve.prototype.findLast=function(e){return this.reverse().find(e)},ve.prototype.invokeMap=de(function(e,t){return typeof e=="function"?new ve(this):this.map(function(n){return Nn(n,e,t)})}),ve.prototype.reject=function(e){return this.filter(Er(ne(e)))},ve.prototype.slice=function(e,t){e=le(e);var n=this;return n.__filtered__&&(e>0||t<0)?new ve(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==r&&(t=le(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},ve.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},ve.prototype.toArray=function(){return this.take(et)},At(ve.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=u[i?"take"+(t=="last"?"Right":""):t],f=i||/^find/.test(t);o&&(u.prototype[t]=function(){var y=this.__wrapped__,C=i?[1]:arguments,x=y instanceof ve,O=C[0],L=x||ce(y),N=function(ge){var ye=o.apply(u,Wt([ge],C));return i&&K?ye[0]:ye};L&&n&&typeof O=="function"&&O.length!=1&&(x=L=!1);var K=this.__chain__,Z=!!this.__actions__.length,re=f&&!K,he=x&&!Z;if(!f&&L){y=he?y:new ve(this);var ie=e.apply(y,C);return ie.__actions__.push({func:br,args:[N],thisArg:r}),new lt(ie,K)}return re&&he?e.apply(this,C):(ie=this.thru(N),re?i?ie.value()[0]:ie.value():ie)})}),ft(["pop","push","shift","sort","splice","unshift"],function(e){var t=Yn[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);u.prototype[e]=function(){var o=arguments;if(i&&!this.__chain__){var f=this.value();return t.apply(ce(f)?f:[],o)}return this[n](function(y){return t.apply(ce(y)?y:[],o)})}}),At(ve.prototype,function(e,t){var n=u[t];if(n){var i=n.name+"";Ce.call(dn,i)||(dn[i]=[]),dn[i].push({name:t,func:n})}}),dn[vr(r,q).name]=[{name:"wrapper",func:r}],ve.prototype.clone=Rf,ve.prototype.reverse=Of,ve.prototype.value=Lf,u.prototype.at=sh,u.prototype.chain=ah,u.prototype.commit=uh,u.prototype.next=fh,u.prototype.plant=lh,u.prototype.reverse=hh,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=ph,u.prototype.first=u.prototype.head,kn&&(u.prototype[kn]=ch),u},ln=uf();Jt?((Jt.exports=ln)._=ln,Jr._=ln):Fe._=ln}).call(Wn)})(Lr,Lr.exports);var xg=Lr.exports;const kg={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 Eg(){return function m(v,r,l){function c(d,A){if(!r[d]){if(!v[d]){var h=typeof require=="function"&&require;if(!A&&h)return h(d,!0);if(g)return g(d,!0);throw new Error("Cannot find module '"+d+"'")}var _=r[d]={exports:{}};v[d][0].call(_.exports,function(p){var a=v[d][1][p];return c(a||p)},_,_.exports,m,v,r,l)}return r[d].exports}for(var g=typeof require=="function"&&require,w=0;w<l.length;w++)c(l[w]);return c}({1:[function(m,v){v.exports=m("./lib/")},{"./lib/":2}],2:[function(m,v,r){function l(h,_){typeof h=="object"&&(_=h,h=void 0),_=_||{};var p,a=c(h),s=a.source,S=a.id;return _.forceNew||_["force new connection"]||_.multiplex===!1?(d("ignoring socket cache for %s",s),p=w(s,_)):(A[S]||(d("new io instance for %s",s),A[S]=w(s,_)),p=A[S]),p.socket(a.path)}var c=m("./url"),g=m("socket.io-parser"),w=m("./manager"),d=m("debug")("socket.io-client");v.exports=r=l;var A=r.managers={};r.protocol=g.protocol,r.connect=l,r.Manager=m("./manager"),r.Socket=m("./socket")},{"./manager":3,"./socket":5,"./url":6,debug:10,"socket.io-parser":44}],3:[function(m,v){function r(a,s){return this instanceof r?(a&&typeof a=="object"&&(s=a,a=void 0),s=s||{},s.path=s.path||"/socket.io",this.nsps={},this.subs=[],this.opts=s,this.reconnection(s.reconnection!==!1),this.reconnectionAttempts(s.reconnectionAttempts||1/0),this.reconnectionDelay(s.reconnectionDelay||1e3),this.reconnectionDelayMax(s.reconnectionDelayMax||5e3),this.randomizationFactor(s.randomizationFactor||.5),this.backoff=new p({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(s.timeout==null?2e4:s.timeout),this.readyState="closed",this.uri=a,this.connected=[],this.encoding=!1,this.packetBuffer=[],this.encoder=new w.Encoder,this.decoder=new w.Decoder,this.autoConnect=s.autoConnect!==!1,void(this.autoConnect&&this.open())):new r(a,s)}var l=(m("./url"),m("engine.io-client")),c=m("./socket"),g=m("component-emitter"),w=m("socket.io-parser"),d=m("./on"),A=m("component-bind"),h=(m("object-component"),m("debug")("socket.io-client:manager")),_=m("indexof"),p=m("backo2");v.exports=r,r.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var a in this.nsps)this.nsps[a].emit.apply(this.nsps[a],arguments)},r.prototype.updateSocketIds=function(){for(var a in this.nsps)this.nsps[a].id=this.engine.id},g(r.prototype),r.prototype.reconnection=function(a){return arguments.length?(this._reconnection=!!a,this):this._reconnection},r.prototype.reconnectionAttempts=function(a){return arguments.length?(this._reconnectionAttempts=a,this):this._reconnectionAttempts},r.prototype.reconnectionDelay=function(a){return arguments.length?(this._reconnectionDelay=a,this.backoff&&this.backoff.setMin(a),this):this._reconnectionDelay},r.prototype.randomizationFactor=function(a){return arguments.length?(this._randomizationFactor=a,this.backoff&&this.backoff.setJitter(a),this):this._randomizationFactor},r.prototype.reconnectionDelayMax=function(a){return arguments.length?(this._reconnectionDelayMax=a,this.backoff&&this.backoff.setMax(a),this):this._reconnectionDelayMax},r.prototype.timeout=function(a){return arguments.length?(this._timeout=a,this):this._timeout},r.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()},r.prototype.open=r.prototype.connect=function(a){if(h("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;h("opening %s",this.uri),this.engine=l(this.uri,this.opts);var s=this.engine,S=this;this.readyState="opening",this.skipReconnect=!1;var k=d(s,"open",function(){S.onopen(),a&&a()}),T=d(s,"error",function(Y){if(h("connect_error"),S.cleanup(),S.readyState="closed",S.emitAll("connect_error",Y),a){var se=new Error("Connection error");se.data=Y,a(se)}else S.maybeReconnectOnOpen()});if(this._timeout!==!1){var q=this._timeout;h("connect attempt will timeout after %d",q);var oe=setTimeout(function(){h("connect attempt timed out after %d",q),k.destroy(),s.close(),s.emit("error","timeout"),S.emitAll("connect_timeout",q)},q);this.subs.push({destroy:function(){clearTimeout(oe)}})}return this.subs.push(k),this.subs.push(T),this},r.prototype.onopen=function(){h("open"),this.cleanup(),this.readyState="open",this.emit("open");var a=this.engine;this.subs.push(d(a,"data",A(this,"ondata"))),this.subs.push(d(this.decoder,"decoded",A(this,"ondecoded"))),this.subs.push(d(a,"error",A(this,"onerror"))),this.subs.push(d(a,"close",A(this,"onclose")))},r.prototype.ondata=function(a){this.decoder.add(a)},r.prototype.ondecoded=function(a){this.emit("packet",a)},r.prototype.onerror=function(a){h("error",a),this.emitAll("error",a)},r.prototype.socket=function(a){var s=this.nsps[a];if(!s){s=new c(this,a),this.nsps[a]=s;var S=this;s.on("connect",function(){s.id=S.engine.id,~_(S.connected,s)||S.connected.push(s)})}return s},r.prototype.destroy=function(a){var s=_(this.connected,a);~s&&this.connected.splice(s,1),this.connected.length||this.close()},r.prototype.packet=function(a){h("writing packet %j",a);var s=this;s.encoding?s.packetBuffer.push(a):(s.encoding=!0,this.encoder.encode(a,function(S){for(var k=0;k<S.length;k++)s.engine.write(S[k]);s.encoding=!1,s.processPacketQueue()}))},r.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var a=this.packetBuffer.shift();this.packet(a)}},r.prototype.cleanup=function(){for(var a;a=this.subs.shift();)a.destroy();this.packetBuffer=[],this.encoding=!1,this.decoder.destroy()},r.prototype.close=r.prototype.disconnect=function(){this.skipReconnect=!0,this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},r.prototype.onclose=function(a){h("close"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",a),this._reconnection&&!this.skipReconnect&&this.reconnect()},r.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var a=this;if(this.backoff.attempts>=this._reconnectionAttempts)h("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var s=this.backoff.duration();h("will wait %dms before reconnect attempt",s),this.reconnecting=!0;var S=setTimeout(function(){a.skipReconnect||(h("attempting reconnect"),a.emitAll("reconnect_attempt",a.backoff.attempts),a.emitAll("reconnecting",a.backoff.attempts),a.skipReconnect||a.open(function(k){k?(h("reconnect attempt error"),a.reconnecting=!1,a.reconnect(),a.emitAll("reconnect_error",k.data)):(h("reconnect success"),a.onreconnect())}))},s);this.subs.push({destroy:function(){clearTimeout(S)}})}},r.prototype.onreconnect=function(){var a=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",a)}},{"./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(m,v){function r(l,c,g){return l.on(c,g),{destroy:function(){l.removeListener(c,g)}}}v.exports=r},{}],5:[function(m,v,r){function l(s,S){this.io=s,this.nsp=S,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=m("socket.io-parser"),g=m("component-emitter"),w=m("to-array"),d=m("./on"),A=m("component-bind"),h=m("debug")("socket.io-client:socket"),_=m("has-binary");v.exports=l;var p={connect:1,connect_error:1,connect_timeout:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1},a=g.prototype.emit;g(l.prototype),l.prototype.subEvents=function(){if(!this.subs){var s=this.io;this.subs=[d(s,"open",A(this,"onopen")),d(s,"packet",A(this,"onpacket")),d(s,"close",A(this,"onclose"))]}},l.prototype.open=l.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),this.io.readyState=="open"&&this.onopen(),this)},l.prototype.send=function(){var s=w(arguments);return s.unshift("message"),this.emit.apply(this,s),this},l.prototype.emit=function(s){if(p.hasOwnProperty(s))return a.apply(this,arguments),this;var S=w(arguments),k=c.EVENT;_(S)&&(k=c.BINARY_EVENT);var T={type:k,data:S};return typeof S[S.length-1]=="function"&&(h("emitting packet with ack id %d",this.ids),this.acks[this.ids]=S.pop(),T.id=this.ids++),this.connected?this.packet(T):this.sendBuffer.push(T),this},l.prototype.packet=function(s){s.nsp=this.nsp,this.io.packet(s)},l.prototype.onopen=function(){h("transport is open - connecting"),this.nsp!="/"&&this.packet({type:c.CONNECT})},l.prototype.onclose=function(s){h("close (%s)",s),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",s)},l.prototype.onpacket=function(s){if(s.nsp==this.nsp)switch(s.type){case c.CONNECT:this.onconnect();break;case c.EVENT:this.onevent(s);break;case c.BINARY_EVENT:this.onevent(s);break;case c.ACK:this.onack(s);break;case c.BINARY_ACK:this.onack(s);break;case c.DISCONNECT:this.ondisconnect();break;case c.ERROR:this.emit("error",s.data)}},l.prototype.onevent=function(s){var S=s.data||[];h("emitting event %j",S),s.id!=null&&(h("attaching ack callback to event"),S.push(this.ack(s.id))),this.connected?a.apply(this,S):this.receiveBuffer.push(S)},l.prototype.ack=function(s){var S=this,k=!1;return function(){if(!k){k=!0;var T=w(arguments);h("sending ack %j",T);var q=_(T)?c.BINARY_ACK:c.ACK;S.packet({type:q,id:s,data:T})}}},l.prototype.onack=function(s){h("calling ack %s with %j",s.id,s.data);var S=this.acks[s.id];S.apply(this,s.data),delete this.acks[s.id]},l.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},l.prototype.emitBuffered=function(){var s;for(s=0;s<this.receiveBuffer.length;s++)a.apply(this,this.receiveBuffer[s]);for(this.receiveBuffer=[],s=0;s<this.sendBuffer.length;s++)this.packet(this.sendBuffer[s]);this.sendBuffer=[]},l.prototype.ondisconnect=function(){h("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},l.prototype.destroy=function(){if(this.subs){for(var s=0;s<this.subs.length;s++)this.subs[s].destroy();this.subs=null}this.io.destroy(this)},l.prototype.close=l.prototype.disconnect=function(){return this.connected&&(h("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(m,v){(function(r){function l(w,h){var A=w,h=h||r.location;return w==null&&(w=h.protocol+"//"+h.host),typeof w=="string"&&(w.charAt(0)=="/"&&(w=w.charAt(1)=="/"?h.protocol+w:h.hostname+w),/^(https?|wss?):\/\//.test(w)||(g("protocol-less url %s",w),w=typeof h<"u"?h.protocol+"//"+w:"https://"+w),g("parse %s",w),A=c(w)),A.port||(/^(http|ws)$/.test(A.protocol)?A.port="80":/^(http|ws)s$/.test(A.protocol)&&(A.port="443")),A.path=A.path||"/",A.id=A.protocol+"://"+A.host+":"+A.port,A.href=A.protocol+"://"+A.host+(h&&h.port==A.port?"":":"+A.port),A}var c=m("parseuri"),g=m("debug")("socket.io-client:url");v.exports=l}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{debug:10,parseuri:42}],7:[function(m,v){function r(l){l=l||{},this.ms=l.min||100,this.max=l.max||1e4,this.factor=l.factor||2,this.jitter=l.jitter>0&&l.jitter<=1?l.jitter:0,this.attempts=0}v.exports=r,r.prototype.duration=function(){var l=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var c=Math.random(),g=Math.floor(c*this.jitter*l);l=1&Math.floor(10*c)?l+g:l-g}return 0|Math.min(l,this.max)},r.prototype.reset=function(){this.attempts=0},r.prototype.setMin=function(l){this.ms=l},r.prototype.setMax=function(l){this.max=l},r.prototype.setJitter=function(l){this.jitter=l}},{}],8:[function(m,v){var r=[].slice;v.exports=function(l,c){if(typeof c=="string"&&(c=l[c]),typeof c!="function")throw new Error("bind() requires a function");var g=r.call(arguments,2);return function(){return c.apply(l,g.concat(r.call(arguments)))}}},{}],9:[function(m,v){function r(c){return c?l(c):void 0}function l(c){for(var g in r.prototype)c[g]=r.prototype[g];return c}v.exports=r,r.prototype.on=r.prototype.addEventListener=function(c,g){return this._callbacks=this._callbacks||{},(this._callbacks[c]=this._callbacks[c]||[]).push(g),this},r.prototype.once=function(c,g){function w(){d.off(c,w),g.apply(this,arguments)}var d=this;return this._callbacks=this._callbacks||{},w.fn=g,this.on(c,w),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(c,g){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var w=this._callbacks[c];if(!w)return this;if(arguments.length==1)return delete this._callbacks[c],this;for(var d,A=0;A<w.length;A++)if(d=w[A],d===g||d.fn===g){w.splice(A,1);break}return this},r.prototype.emit=function(c){this._callbacks=this._callbacks||{};var g=[].slice.call(arguments,1),w=this._callbacks[c];if(w){w=w.slice(0);for(var d=0,A=w.length;A>d;++d)w[d].apply(this,g)}return this},r.prototype.listeners=function(c){return this._callbacks=this._callbacks||{},this._callbacks[c]||[]},r.prototype.hasListeners=function(c){return!!this.listeners(c).length}},{}],10:[function(m,v){function r(c){return r.enabled(c)?function(g){g=l(g);var w=new Date,d=w-(r[c]||w);r[c]=w,g=c+" "+g+" +"+r.humanize(d),window.console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}:function(){}}function l(c){return c instanceof Error?c.stack||c.message:c}v.exports=r,r.names=[],r.skips=[],r.enable=function(c){try{localStorage.debug=c}catch{}for(var g=(c||"").split(/[\s,]+/),w=g.length,d=0;w>d;d++)c=g[d].replace("*",".*?"),c[0]==="-"?r.skips.push(new RegExp("^"+c.substr(1)+"$")):r.names.push(new RegExp("^"+c+"$"))},r.disable=function(){r.enable("")},r.humanize=function(c){var g=1e3,w=6e4,d=60*w;return c>=d?(c/d).toFixed(1)+"h":c>=w?(c/w).toFixed(1)+"m":c>=g?(c/g|0)+"s":c+"ms"},r.enabled=function(c){for(var g=0,w=r.skips.length;w>g;g++)if(r.skips[g].test(c))return!1;for(var g=0,w=r.names.length;w>g;g++)if(r.names[g].test(c))return!0;return!1};try{window.localStorage&&r.enable(localStorage.debug)}catch{}},{}],11:[function(m,v){v.exports=m("./lib/")},{"./lib/":12}],12:[function(m,v){v.exports=m("./socket"),v.exports.parser=m("engine.io-parser")},{"./socket":13,"engine.io-parser":25}],13:[function(m,v){(function(r){function l(s,S){if(!(this instanceof l))return new l(s,S);if(S=S||{},s&&typeof s=="object"&&(S=s,s=null),s&&(s=_(s),S.host=s.host,S.secure=s.protocol=="https"||s.protocol=="wss",S.port=s.port,s.query&&(S.query=s.query)),this.secure=S.secure!=null?S.secure:r.location&&location.protocol=="https:",S.host){var k=S.host.split(":");S.hostname=k.shift(),k.length?S.port=k.pop():S.port||(S.port=this.secure?"443":"80")}this.agent=S.agent||!1,this.hostname=S.hostname||(r.location?location.hostname:"localhost"),this.port=S.port||(r.location&&location.port?location.port:this.secure?443:80),this.query=S.query||{},typeof this.query=="string"&&(this.query=a.decode(this.query)),this.upgrade=S.upgrade!==!1,this.path=(S.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!S.forceJSONP,this.jsonp=S.jsonp!==!1,this.forceBase64=!!S.forceBase64,this.enablesXDR=!!S.enablesXDR,this.timestampParam=S.timestampParam||"t",this.timestampRequests=S.timestampRequests,this.transports=S.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.callbackBuffer=[],this.policyPort=S.policyPort||843,this.rememberUpgrade=S.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=S.onlyBinaryUpgrades,this.pfx=S.pfx||null,this.key=S.key||null,this.passphrase=S.passphrase||null,this.cert=S.cert||null,this.ca=S.ca||null,this.ciphers=S.ciphers||null,this.rejectUnauthorized=S.rejectUnauthorized||null,this.open()}function c(s){var S={};for(var k in s)s.hasOwnProperty(k)&&(S[k]=s[k]);return S}var g=m("./transports"),w=m("component-emitter"),d=m("debug")("engine.io-client:socket"),A=m("indexof"),h=m("engine.io-parser"),_=m("parseuri"),p=m("parsejson"),a=m("parseqs");v.exports=l,l.priorWebsocketSuccess=!1,w(l.prototype),l.protocol=h.protocol,l.Socket=l,l.Transport=m("./transport"),l.transports=m("./transports"),l.parser=m("engine.io-parser"),l.prototype.createTransport=function(s){d('creating transport "%s"',s);var S=c(this.query);S.EIO=h.protocol,S.transport=s,this.id&&(S.sid=this.id);var k=new g[s]({agent:this.agent,hostname:this.hostname,port:this.port,secure:this.secure,path:this.path,query:S,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 k},l.prototype.open=function(){var S;if(this.rememberUpgrade&&l.priorWebsocketSuccess&&this.transports.indexOf("websocket")!=-1)S="websocket";else{if(this.transports.length==0){var s=this;return void setTimeout(function(){s.emit("error","No transports available")},0)}S=this.transports[0]}this.readyState="opening";var S;try{S=this.createTransport(S)}catch{return this.transports.shift(),void this.open()}S.open(),this.setTransport(S)},l.prototype.setTransport=function(s){d("setting transport %s",s.name);var S=this;this.transport&&(d("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=s,s.on("drain",function(){S.onDrain()}).on("packet",function(k){S.onPacket(k)}).on("error",function(k){S.onError(k)}).on("close",function(){S.onClose("transport close")})},l.prototype.probe=function(s){function S(){if(M.onlyBinaryUpgrades){var H=!this.supportsBinary&&M.transport.supportsBinary;D=D||H}D||(d('probe transport "%s" opened',s),z.send([{type:"ping",data:"probe"}]),z.once("packet",function(I){if(!D)if(I.type=="pong"&&I.data=="probe"){if(d('probe transport "%s" pong',s),M.upgrading=!0,M.emit("upgrading",z),!z)return;l.priorWebsocketSuccess=z.name=="websocket",d('pausing current transport "%s"',M.transport.name),M.transport.pause(function(){D||M.readyState!="closed"&&(d("changing transport and sending upgrade packet"),se(),M.setTransport(z),z.send([{type:"upgrade"}]),M.emit("upgrade",z),z=null,M.upgrading=!1,M.flush())})}else{d('probe transport "%s" failed',s);var U=new Error("probe error");U.transport=z.name,M.emit("upgradeError",U)}}))}function k(){D||(D=!0,se(),z.close(),z=null)}function T(H){var I=new Error("probe error: "+H);I.transport=z.name,k(),d('probe transport "%s" failed because of error: %s',s,H),M.emit("upgradeError",I)}function q(){T("transport closed")}function oe(){T("socket closed")}function Y(H){z&&H.name!=z.name&&(d('"%s" works - aborting "%s"',H.name,z.name),k())}function se(){z.removeListener("open",S),z.removeListener("error",T),z.removeListener("close",q),M.removeListener("close",oe),M.removeListener("upgrading",Y)}d('probing transport "%s"',s);var z=this.createTransport(s,{probe:1}),D=!1,M=this;l.priorWebsocketSuccess=!1,z.once("open",S),z.once("error",T),z.once("close",q),this.once("close",oe),this.once("upgrading",Y),z.open()},l.prototype.onOpen=function(){if(d("socket open"),this.readyState="open",l.priorWebsocketSuccess=this.transport.name=="websocket",this.emit("open"),this.flush(),this.readyState=="open"&&this.upgrade&&this.transport.pause){d("starting upgrade probes");for(var s=0,S=this.upgrades.length;S>s;s++)this.probe(this.upgrades[s])}},l.prototype.onPacket=function(s){if(this.readyState=="opening"||this.readyState=="open")switch(d('socket receive: type "%s", data "%s"',s.type,s.data),this.emit("packet",s),this.emit("heartbeat"),s.type){case"open":this.onHandshake(p(s.data));break;case"pong":this.setPing();break;case"error":var S=new Error("server error");S.code=s.data,this.emit("error",S);break;case"message":this.emit("data",s.data),this.emit("message",s.data)}else d('packet received with socket readyState "%s"',this.readyState)},l.prototype.onHandshake=function(s){this.emit("handshake",s),this.id=s.sid,this.transport.query.sid=s.sid,this.upgrades=this.filterUpgrades(s.upgrades),this.pingInterval=s.pingInterval,this.pingTimeout=s.pingTimeout,this.onOpen(),this.readyState!="closed"&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},l.prototype.onHeartbeat=function(s){clearTimeout(this.pingTimeoutTimer);var S=this;S.pingTimeoutTimer=setTimeout(function(){S.readyState!="closed"&&S.onClose("ping timeout")},s||S.pingInterval+S.pingTimeout)},l.prototype.setPing=function(){var s=this;clearTimeout(s.pingIntervalTimer),s.pingIntervalTimer=setTimeout(function(){d("writing ping packet - expecting pong within %sms",s.pingTimeout),s.ping(),s.onHeartbeat(s.pingTimeout)},s.pingInterval)},l.prototype.ping=function(){this.sendPacket("ping")},l.prototype.onDrain=function(){for(var s=0;s<this.prevBufferLen;s++)this.callbackBuffer[s]&&this.callbackBuffer[s]();this.writeBuffer.splice(0,this.prevBufferLen),this.callbackBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length==0?this.emit("drain"):this.flush()},l.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"))},l.prototype.write=l.prototype.send=function(s,S){return this.sendPacket("message",s,S),this},l.prototype.sendPacket=function(s,S,k){if(this.readyState!="closing"&&this.readyState!="closed"){var T={type:s,data:S};this.emit("packetCreate",T),this.writeBuffer.push(T),this.callbackBuffer.push(k),this.flush()}},l.prototype.close=function(){function s(){T.onClose("forced close"),d("socket closing - telling transport to close"),T.transport.close()}function S(){T.removeListener("upgrade",S),T.removeListener("upgradeError",S),s()}function k(){T.once("upgrade",S),T.once("upgradeError",S)}if(this.readyState=="opening"||this.readyState=="open"){this.readyState="closing";var T=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?k():s()}):this.upgrading?k():s()}return this},l.prototype.onError=function(s){d("socket error %j",s),l.priorWebsocketSuccess=!1,this.emit("error",s),this.onClose("transport error",s)},l.prototype.onClose=function(s,S){if(this.readyState=="opening"||this.readyState=="open"||this.readyState=="closing"){d('socket close with reason: "%s"',s);var k=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),setTimeout(function(){k.writeBuffer=[],k.callbackBuffer=[],k.prevBufferLen=0},0),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",s,S)}},l.prototype.filterUpgrades=function(s){for(var S=[],k=0,T=s.length;T>k;k++)~A(this.transports,s[k])&&S.push(s[k]);return S}}).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(m,v){function r(g){this.path=g.path,this.hostname=g.hostname,this.port=g.port,this.secure=g.secure,this.query=g.query,this.timestampParam=g.timestampParam,this.timestampRequests=g.timestampRequests,this.readyState="",this.agent=g.agent||!1,this.socket=g.socket,this.enablesXDR=g.enablesXDR,this.pfx=g.pfx,this.key=g.key,this.passphrase=g.passphrase,this.cert=g.cert,this.ca=g.ca,this.ciphers=g.ciphers,this.rejectUnauthorized=g.rejectUnauthorized}var l=m("engine.io-parser"),c=m("component-emitter");v.exports=r,c(r.prototype),r.timestamps=0,r.prototype.onError=function(g,w){var d=new Error(g);return d.type="TransportError",d.description=w,this.emit("error",d),this},r.prototype.open=function(){return(this.readyState=="closed"||this.readyState=="")&&(this.readyState="opening",this.doOpen()),this},r.prototype.close=function(){return(this.readyState=="opening"||this.readyState=="open")&&(this.doClose(),this.onClose()),this},r.prototype.send=function(g){if(this.readyState!="open")throw new Error("Transport not open");this.write(g)},r.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},r.prototype.onData=function(g){var w=l.decodePacket(g,this.socket.binaryType);this.onPacket(w)},r.prototype.onPacket=function(g){this.emit("packet",g)},r.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},{"component-emitter":9,"engine.io-parser":25}],15:[function(m,v,r){(function(l){function c(h){var _,p=!1,a=!1,s=h.jsonp!==!1;if(l.location){var S=location.protocol=="https:",k=location.port;k||(k=S?443:80),p=h.hostname!=location.hostname||k!=h.port,a=h.secure!=S}if(h.xdomain=p,h.xscheme=a,_=new g(h),"open"in _&&!h.forceJSONP)return new w(h);if(!s)throw new Error("JSONP disabled");return new d(h)}var g=m("xmlhttprequest"),w=m("./polling-xhr"),d=m("./polling-jsonp"),A=m("./websocket");r.polling=c,r.websocket=A}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./polling-jsonp":16,"./polling-xhr":17,"./websocket":19,xmlhttprequest:20}],16:[function(m,v){(function(r){function l(){}function c(_){g.call(this,_),this.query=this.query||{},d||(r.___eio||(r.___eio=[]),d=r.___eio),this.index=d.length;var p=this;d.push(function(a){p.onData(a)}),this.query.j=this.index,r.document&&r.addEventListener&&r.addEventListener("beforeunload",function(){p.script&&(p.script.onerror=l)},!1)}var g=m("./polling"),w=m("component-inherit");v.exports=c;var d,A=/\n/g,h=/\\n/g;w(c,g),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),g.prototype.doClose.call(this)},c.prototype.doPoll=function(){var _=this,p=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),p.async=!0,p.src=this.uri(),p.onerror=function(S){_.onError("jsonp poll error",S)};var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(p,a),this.script=p;var s=typeof navigator<"u"&&/gecko/i.test(navigator.userAgent);s&&setTimeout(function(){var S=document.createElement("iframe");document.body.appendChild(S),document.body.removeChild(S)},100)},c.prototype.doWrite=function(_,p){function a(){s(),p()}function s(){if(S.iframe)try{S.form.removeChild(S.iframe)}catch(se){S.onError("jsonp polling iframe removal error",se)}try{var Y='<iframe src="javascript:0" name="'+S.iframeId+'">';k=document.createElement(Y)}catch{k=document.createElement("iframe"),k.name=S.iframeId,k.src="javascript:0"}k.id=S.iframeId,S.form.appendChild(k),S.iframe=k}var S=this;if(!this.form){var k,T=document.createElement("form"),q=document.createElement("textarea"),oe=this.iframeId="eio_iframe_"+this.index;T.className="socketio",T.style.position="absolute",T.style.top="-1000px",T.style.left="-1000px",T.target=oe,T.method="POST",T.setAttribute("accept-charset","utf-8"),q.name="d",T.appendChild(q),document.body.appendChild(T),this.form=T,this.area=q}this.form.action=this.uri(),s(),_=_.replace(h,`\\
33
- `),this.area.value=_.replace(A,"\\n");try{this.form.submit()}catch{}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){S.iframe.readyState=="complete"&&a()}:this.iframe.onload=a}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./polling":18,"component-inherit":21}],17:[function(m,v){(function(r){function l(){}function c(a){if(A.call(this,a),r.location){var s=location.protocol=="https:",S=location.port;S||(S=s?443:80),this.xd=a.hostname!=r.location.hostname||S!=a.port,this.xs=a.secure!=s}}function g(a){this.method=a.method||"GET",this.uri=a.uri,this.xd=!!a.xd,this.xs=!!a.xs,this.async=a.async!==!1,this.data=a.data!=null?a.data:null,this.agent=a.agent,this.isBinary=a.isBinary,this.supportsBinary=a.supportsBinary,this.enablesXDR=a.enablesXDR,this.pfx=a.pfx,this.key=a.key,this.passphrase=a.passphrase,this.cert=a.cert,this.ca=a.ca,this.ciphers=a.ciphers,this.rejectUnauthorized=a.rejectUnauthorized,this.create()}function w(){for(var a in g.requests)g.requests.hasOwnProperty(a)&&g.requests[a].abort()}var d=m("xmlhttprequest"),A=m("./polling"),h=m("component-emitter"),_=m("component-inherit"),p=m("debug")("engine.io-client:polling-xhr");v.exports=c,v.exports.Request=g,_(c,A),c.prototype.supportsBinary=!0,c.prototype.request=function(a){return a=a||{},a.uri=this.uri(),a.xd=this.xd,a.xs=this.xs,a.agent=this.agent||!1,a.supportsBinary=this.supportsBinary,a.enablesXDR=this.enablesXDR,a.pfx=this.pfx,a.key=this.key,a.passphrase=this.passphrase,a.cert=this.cert,a.ca=this.ca,a.ciphers=this.ciphers,a.rejectUnauthorized=this.rejectUnauthorized,new g(a)},c.prototype.doWrite=function(a,s){var S=typeof a!="string"&&a!==void 0,k=this.request({method:"POST",data:a,isBinary:S}),T=this;k.on("success",s),k.on("error",function(q){T.onError("xhr post error",q)}),this.sendXhr=k},c.prototype.doPoll=function(){p("xhr poll");var a=this.request(),s=this;a.on("data",function(S){s.onData(S)}),a.on("error",function(S){s.onError("xhr poll error",S)}),this.pollXhr=a},h(g.prototype),g.prototype.create=function(){var a={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};a.pfx=this.pfx,a.key=this.key,a.passphrase=this.passphrase,a.cert=this.cert,a.ca=this.ca,a.ciphers=this.ciphers,a.rejectUnauthorized=this.rejectUnauthorized;var s=this.xhr=new d(a),S=this;try{if(p("xhr open %s: %s",this.method,this.uri),s.open(this.method,this.uri,this.async),this.supportsBinary&&(s.responseType="arraybuffer"),this.method=="POST")try{this.isBinary?s.setRequestHeader("Content-type","application/octet-stream"):s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}"withCredentials"in s&&(s.withCredentials=!0),this.hasXDR()?(s.onload=function(){S.onLoad()},s.onerror=function(){S.onError(s.responseText)}):s.onreadystatechange=function(){s.readyState==4&&(s.status==200||s.status==1223?S.onLoad():setTimeout(function(){S.onError(s.status)},0))},p("xhr data %s",this.data),s.send(this.data)}catch(k){return void setTimeout(function(){S.onError(k)},0)}r.document&&(this.index=g.requestsCount++,g.requests[this.index]=this)},g.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},g.prototype.onData=function(a){this.emit("data",a),this.onSuccess()},g.prototype.onError=function(a){this.emit("error",a),this.cleanup(!0)},g.prototype.cleanup=function(a){if(typeof this.xhr<"u"&&this.xhr!==null){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=l:this.xhr.onreadystatechange=l,a)try{this.xhr.abort()}catch{}r.document&&delete g.requests[this.index],this.xhr=null}},g.prototype.onLoad=function(){var a;try{var s;try{s=this.xhr.getResponseHeader("Content-Type").split(";")[0]}catch{}a=s==="application/octet-stream"?this.xhr.response:this.supportsBinary?"ok":this.xhr.responseText}catch(S){this.onError(S)}a!=null&&this.onData(a)},g.prototype.hasXDR=function(){return typeof r.XDomainRequest<"u"&&!this.xs&&this.enablesXDR},g.prototype.abort=function(){this.cleanup()},r.document&&(g.requestsCount=0,g.requests={},r.attachEvent?r.attachEvent("onunload",w):r.addEventListener&&r.addEventListener("beforeunload",w,!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(m,v){function r(h){var _=h&&h.forceBase64;(!A||_)&&(this.supportsBinary=!1),l.call(this,h)}var l=m("../transport"),c=m("parseqs"),g=m("engine.io-parser"),w=m("component-inherit"),d=m("debug")("engine.io-client:polling");v.exports=r;var A=function(){var h=m("xmlhttprequest"),_=new h({xdomain:!1});return _.responseType!=null}();w(r,l),r.prototype.name="polling",r.prototype.doOpen=function(){this.poll()},r.prototype.pause=function(h){function _(){d("paused"),p.readyState="paused",h()}var p=this;if(this.readyState="pausing",this.polling||!this.writable){var a=0;this.polling&&(d("we are currently polling - waiting to pause"),a++,this.once("pollComplete",function(){d("pre-pause polling complete"),--a||_()})),this.writable||(d("we are currently writing - waiting to pause"),a++,this.once("drain",function(){d("pre-pause writing complete"),--a||_()}))}else _()},r.prototype.poll=function(){d("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},r.prototype.onData=function(h){var _=this;d("polling got data %s",h);var p=function(a){return _.readyState=="opening"&&_.onOpen(),a.type=="close"?(_.onClose(),!1):void _.onPacket(a)};g.decodePayload(h,this.socket.binaryType,p),this.readyState!="closed"&&(this.polling=!1,this.emit("pollComplete"),this.readyState=="open"?this.poll():d('ignoring poll - transport state "%s"',this.readyState))},r.prototype.doClose=function(){function h(){d("writing close packet"),_.write([{type:"close"}])}var _=this;this.readyState=="open"?(d("transport open - closing"),h()):(d("transport not open - deferring close"),this.once("open",h))},r.prototype.write=function(h){var p=this;this.writable=!1;var _=function(){p.writable=!0,p.emit("drain")},p=this;g.encodePayload(h,this.supportsBinary,function(a){p.doWrite(a,_)})},r.prototype.uri=function(){var h=this.query||{},_=this.secure?"https":"http",p="";return this.timestampRequests!==!1&&(h[this.timestampParam]=+new Date+"-"+l.timestamps++),this.supportsBinary||h.sid||(h.b64=1),h=c.encode(h),this.port&&(_=="https"&&this.port!=443||_=="http"&&this.port!=80)&&(p=":"+this.port),h.length&&(h="?"+h),_+"://"+this.hostname+p+this.path+h}},{"../transport":14,"component-inherit":21,debug:22,"engine.io-parser":25,parseqs:33,xmlhttprequest:20}],19:[function(m,v){function r(h){var _=h&&h.forceBase64;_&&(this.supportsBinary=!1),l.call(this,h)}var l=m("../transport"),c=m("engine.io-parser"),g=m("parseqs"),w=m("component-inherit"),d=m("debug")("engine.io-client:websocket"),A=m("ws");v.exports=r,w(r,l),r.prototype.name="websocket",r.prototype.supportsBinary=!0,r.prototype.doOpen=function(){if(this.check()){var h=this.uri(),_=void 0,p={agent:this.agent};p.pfx=this.pfx,p.key=this.key,p.passphrase=this.passphrase,p.cert=this.cert,p.ca=this.ca,p.ciphers=this.ciphers,p.rejectUnauthorized=this.rejectUnauthorized,this.ws=new A(h,_,p),this.ws.binaryType===void 0&&(this.supportsBinary=!1),this.ws.binaryType="arraybuffer",this.addEventListeners()}},r.prototype.addEventListeners=function(){var h=this;this.ws.onopen=function(){h.onOpen()},this.ws.onclose=function(){h.onClose()},this.ws.onmessage=function(_){h.onData(_.data)},this.ws.onerror=function(_){h.onError("websocket error",_)}},typeof navigator<"u"&&/iPad|iPhone|iPod/i.test(navigator.userAgent)&&(r.prototype.onData=function(h){var _=this;setTimeout(function(){l.prototype.onData.call(_,h)},0)}),r.prototype.write=function(h){function _(){p.writable=!0,p.emit("drain")}var p=this;this.writable=!1;for(var a=0,s=h.length;s>a;a++)c.encodePacket(h[a],this.supportsBinary,function(S){try{p.ws.send(S)}catch{d("websocket closed before onclose event")}});setTimeout(_,0)},r.prototype.onClose=function(){l.prototype.onClose.call(this)},r.prototype.doClose=function(){typeof this.ws<"u"&&this.ws.close()},r.prototype.uri=function(){var h=this.query||{},_=this.secure?"wss":"ws",p="";return this.port&&(_=="wss"&&this.port!=443||_=="ws"&&this.port!=80)&&(p=":"+this.port),this.timestampRequests&&(h[this.timestampParam]=+new Date),this.supportsBinary||(h.b64=1),h=g.encode(h),h.length&&(h="?"+h),_+"://"+this.hostname+p+this.path+h},r.prototype.check=function(){return!(!A||"__initialize"in A&&this.name===r.prototype.name)}},{"../transport":14,"component-inherit":21,debug:22,"engine.io-parser":25,parseqs:33,ws:35}],20:[function(m,v){var r=m("has-cors");v.exports=function(l){var c=l.xdomain,g=l.xscheme,w=l.enablesXDR;try{if(typeof XMLHttpRequest<"u"&&(!c||r))return new XMLHttpRequest}catch{}try{if(typeof XDomainRequest<"u"&&!g&&w)return new XDomainRequest}catch{}if(!c)try{return new ActiveXObject("Microsoft.XMLHTTP")}catch{}}},{"has-cors":38}],21:[function(m,v){v.exports=function(r,l){var c=function(){};c.prototype=l.prototype,r.prototype=new c,r.prototype.constructor=r}},{}],22:[function(m,v,r){function l(){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 A=arguments,h=this.useColors;if(A[0]=(h?"%c":"")+this.namespace+(h?" %c":" ")+A[0]+(h?"%c ":" ")+"+"+r.humanize(this.diff),!h)return A;var _="color: "+this.color;A=[A[0],_,"color: inherit"].concat(Array.prototype.slice.call(A,1));var p=0,a=0;return A[0].replace(/%[a-z%]/g,function(s){s!=="%%"&&(p++,s==="%c"&&(a=p))}),A.splice(a,0,_),A}function g(){return typeof console=="object"&&typeof console.log=="function"&&Function.prototype.apply.call(console.log,console,arguments)}function w(A){try{A==null?localStorage.removeItem("debug"):localStorage.debug=A}catch{}}function d(){var A;try{A=localStorage.debug}catch{}return A}r=v.exports=m("./debug"),r.log=g,r.formatArgs=c,r.save=w,r.load=d,r.useColors=l,r.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],r.formatters.j=function(A){return JSON.stringify(A)},r.enable(d())},{"./debug":23}],23:[function(m,v,r){function l(){return r.colors[_++%r.colors.length]}function c(p){function a(){}function s(){var k=s,T=+new Date,q=T-(h||T);k.diff=q,k.prev=h,k.curr=T,h=T,k.useColors==null&&(k.useColors=r.useColors()),k.color==null&&k.useColors&&(k.color=l());var oe=Array.prototype.slice.call(arguments);oe[0]=r.coerce(oe[0]),typeof oe[0]!="string"&&(oe=["%o"].concat(oe));var Y=0;oe[0]=oe[0].replace(/%([a-z%])/g,function(z,D){if(z==="%%")return z;Y++;var M=r.formatters[D];if(typeof M=="function"){var H=oe[Y];z=M.call(k,H),oe.splice(Y,1),Y--}return z}),typeof r.formatArgs=="function"&&(oe=r.formatArgs.apply(k,oe));var se=s.log||r.log||console.log.bind(console);se.apply(k,oe)}a.enabled=!1,s.enabled=!0;var S=r.enabled(p)?s:a;return S.namespace=p,S}function g(p){r.save(p);for(var a=(p||"").split(/[\s,]+/),s=a.length,S=0;s>S;S++)a[S]&&(p=a[S].replace(/\*/g,".*?"),p[0]==="-"?r.skips.push(new RegExp("^"+p.substr(1)+"$")):r.names.push(new RegExp("^"+p+"$")))}function w(){r.enable("")}function d(p){var a,s;for(a=0,s=r.skips.length;s>a;a++)if(r.skips[a].test(p))return!1;for(a=0,s=r.names.length;s>a;a++)if(r.names[a].test(p))return!0;return!1}function A(p){return p instanceof Error?p.stack||p.message:p}r=v.exports=c,r.coerce=A,r.disable=w,r.enable=g,r.enabled=d,r.humanize=m("ms"),r.names=[],r.skips=[],r.formatters={};var h,_=0},{ms:24}],24:[function(m,v){function r(p){var a=/^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(p);if(a){var s=parseFloat(a[1]),S=(a[2]||"ms").toLowerCase();switch(S){case"years":case"year":case"y":return s*_;case"days":case"day":case"d":return s*h;case"hours":case"hour":case"h":return s*A;case"minutes":case"minute":case"m":return s*d;case"seconds":case"second":case"s":return s*w;case"ms":return s}}}function l(p){return p>=h?Math.round(p/h)+"d":p>=A?Math.round(p/A)+"h":p>=d?Math.round(p/d)+"m":p>=w?Math.round(p/w)+"s":p+"ms"}function c(p){return g(p,h,"day")||g(p,A,"hour")||g(p,d,"minute")||g(p,w,"second")||p+" ms"}function g(p,a,s){return a>p?void 0:1.5*a>p?Math.floor(p/a)+" "+s:Math.ceil(p/a)+" "+s+"s"}var w=1e3,d=60*w,A=60*d,h=24*A,_=365.25*h;v.exports=function(p,a){return a=a||{},typeof p=="string"?r(p):a.long?c(p):l(p)}},{}],25:[function(m,v,r){(function(l){function c(D,M){var H="b"+r.packets[D.type]+D.data.data;return M(H)}function g(D,M,H){if(!M)return r.encodeBase64Packet(D,H);var I=D.data,U=new Uint8Array(I),X=new Uint8Array(1+I.byteLength);X[0]=oe[D.type];for(var j=0;j<U.length;j++)X[j+1]=U[j];return H(X.buffer)}function w(D,M,H){if(!M)return r.encodeBase64Packet(D,H);var I=new FileReader;return I.onload=function(){D.data=I.result,r.encodePacket(D,M,!0,H)},I.readAsArrayBuffer(D.data)}function d(D,M,H){if(!M)return r.encodeBase64Packet(D,H);if(q)return w(D,M,H);var I=new Uint8Array(1);I[0]=oe[D.type];var U=new z([I.buffer,D.data]);return H(U)}function A(D,M,H){for(var I=new Array(D.length),U=s(D.length,H),X=function(V,B,be){M(B,function(Ae,Te){I[V]=Te,be(Ae,I)})},j=0;j<D.length;j++)X(j,D[j],U)}var h=m("./keys"),_=m("has-binary"),p=m("arraybuffer.slice"),a=m("base64-arraybuffer"),s=m("after"),S=m("utf8"),k=navigator.userAgent.match(/Android/i),T=/PhantomJS/i.test(navigator.userAgent),q=k||T;r.protocol=3;var oe=r.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},Y=h(oe),se={type:"error",data:"parser error"},z=m("blob");r.encodePacket=function(D,M,H,I){typeof M=="function"&&(I=M,M=!1),typeof H=="function"&&(I=H,H=null);var U=D.data===void 0?void 0:D.data.buffer||D.data;if(l.ArrayBuffer&&U instanceof ArrayBuffer)return g(D,M,I);if(z&&U instanceof l.Blob)return d(D,M,I);if(U&&U.base64)return c(D,I);var X=oe[D.type];return D.data!==void 0&&(X+=H?S.encode(String(D.data)):String(D.data)),I(""+X)},r.encodeBase64Packet=function(D,M){var H="b"+r.packets[D.type];if(z&&D.data instanceof z){var I=new FileReader;return I.onload=function(){var B=I.result.split(",")[1];M(H+B)},I.readAsDataURL(D.data)}var U;try{U=String.fromCharCode.apply(null,new Uint8Array(D.data))}catch{for(var X=new Uint8Array(D.data),j=new Array(X.length),V=0;V<X.length;V++)j[V]=X[V];U=String.fromCharCode.apply(null,j)}return H+=l.btoa(U),M(H)},r.decodePacket=function(D,M,H){if(typeof D=="string"||D===void 0){if(D.charAt(0)=="b")return r.decodeBase64Packet(D.substr(1),M);if(H)try{D=S.decode(D)}catch{return se}var U=D.charAt(0);return Number(U)==U&&Y[U]?D.length>1?{type:Y[U],data:D.substring(1)}:{type:Y[U]}:se}var I=new Uint8Array(D),U=I[0],X=p(D,1);return z&&M==="blob"&&(X=new z([X])),{type:Y[U],data:X}},r.decodeBase64Packet=function(D,M){var H=Y[D.charAt(0)];if(!l.ArrayBuffer)return{type:H,data:{base64:!0,data:D.substr(1)}};var I=a.decode(D.substr(1));return M==="blob"&&z&&(I=new z([I])),{type:H,data:I}},r.encodePayload=function(D,M,H){function I(j){return j.length+":"+j}function U(j,V){r.encodePacket(j,X?M:!1,!0,function(B){V(null,I(B))})}typeof M=="function"&&(H=M,M=null);var X=_(D);return M&&X?z&&!q?r.encodePayloadAsBlob(D,H):r.encodePayloadAsArrayBuffer(D,H):D.length?void A(D,U,function(j,V){return H(V.join(""))}):H("0:")},r.decodePayload=function(D,M,H){if(typeof D!="string")return r.decodePayloadAsBinary(D,M,H);typeof M=="function"&&(H=M,M=null);var I;if(D=="")return H(se,0,1);for(var U,X,j="",V=0,B=D.length;B>V;V++){var be=D.charAt(V);if(be!=":")j+=be;else{if(j==""||j!=(U=Number(j))||(X=D.substr(V+1,U),j!=X.length))return H(se,0,1);if(X.length){if(I=r.decodePacket(X,M,!0),se.type==I.type&&se.data==I.data)return H(se,0,1);var Ae=H(I,V+U,B);if(Ae===!1)return}V+=U,j=""}}return j!=""?H(se,0,1):void 0},r.encodePayloadAsArrayBuffer=function(D,M){function H(I,U){r.encodePacket(I,!0,!0,function(X){return U(null,X)})}return D.length?void A(D,H,function(I,U){var X=U.reduce(function(B,be){var Ae;return Ae=typeof be=="string"?be.length:be.byteLength,B+Ae.toString().length+Ae+2},0),j=new Uint8Array(X),V=0;return U.forEach(function(B){var be=typeof B=="string",Ae=B;if(be){for(var Te=new Uint8Array(B.length),ue=0;ue<B.length;ue++)Te[ue]=B.charCodeAt(ue);Ae=Te.buffer}j[V++]=be?0:1;for(var We=Ae.byteLength.toString(),ue=0;ue<We.length;ue++)j[V++]=parseInt(We[ue]);j[V++]=255;for(var Te=new Uint8Array(Ae),ue=0;ue<Te.length;ue++)j[V++]=Te[ue]}),M(j.buffer)}):M(new ArrayBuffer(0))},r.encodePayloadAsBlob=function(D,M){function H(I,U){r.encodePacket(I,!0,!0,function(X){var j=new Uint8Array(1);if(j[0]=1,typeof X=="string"){for(var V=new Uint8Array(X.length),B=0;B<X.length;B++)V[B]=X.charCodeAt(B);X=V.buffer,j[0]=0}for(var be=X instanceof ArrayBuffer?X.byteLength:X.size,Ae=be.toString(),Te=new Uint8Array(Ae.length+1),B=0;B<Ae.length;B++)Te[B]=parseInt(Ae[B]);if(Te[Ae.length]=255,z){var ue=new z([j.buffer,Te.buffer,X]);U(null,ue)}})}A(D,H,function(I,U){return M(new z(U))})},r.decodePayloadAsBinary=function(D,M,H){typeof M=="function"&&(H=M,M=null);for(var I=D,U=[],X=!1;I.byteLength>0;){for(var j=new Uint8Array(I),V=j[0]===0,B="",be=1;j[be]!=255;be++){if(B.length>310){X=!0;break}B+=j[be]}if(X)return H(se,0,1);I=p(I,2+B.length),B=parseInt(B);var Ae=p(I,0,B);if(V)try{Ae=String.fromCharCode.apply(null,new Uint8Array(Ae))}catch{var Te=new Uint8Array(Ae);Ae="";for(var be=0;be<Te.length;be++)Ae+=String.fromCharCode(Te[be])}U.push(Ae),I=p(I,B)}var ue=U.length;U.forEach(function(We,St){H(r.decodePacket(We,M,!0),St,ue)})}}).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(m,v){v.exports=Object.keys||function(r){var l=[],c=Object.prototype.hasOwnProperty;for(var g in r)c.call(r,g)&&l.push(g);return l}},{}],27:[function(m,v){function r(c,g,w){function d(h,_){if(d.count<=0)throw new Error("after called too many times");--d.count,h?(A=!0,g(h),g=w):d.count!==0||A||g(null,_)}var A=!1;return w=w||l,d.count=c,c===0?g():d}function l(){}v.exports=r},{}],28:[function(m,v){v.exports=function(r,l,c){var g=r.byteLength;if(l=l||0,c=c||g,r.slice)return r.slice(l,c);if(0>l&&(l+=g),0>c&&(c+=g),c>g&&(c=g),l>=g||l>=c||g===0)return new ArrayBuffer(0);for(var w=new Uint8Array(r),d=new Uint8Array(c-l),A=l,h=0;c>A;A++,h++)d[h]=w[A];return d.buffer}},{}],29:[function(m,v,r){(function(l){r.encode=function(c){var g,w=new Uint8Array(c),d=w.length,A="";for(g=0;d>g;g+=3)A+=l[w[g]>>2],A+=l[(3&w[g])<<4|w[g+1]>>4],A+=l[(15&w[g+1])<<2|w[g+2]>>6],A+=l[63&w[g+2]];return d%3===2?A=A.substring(0,A.length-1)+"=":d%3===1&&(A=A.substring(0,A.length-2)+"=="),A},r.decode=function(c){var g,w,d,A,h,_=.75*c.length,p=c.length,a=0;c[c.length-1]==="="&&(_--,c[c.length-2]==="="&&_--);var s=new ArrayBuffer(_),S=new Uint8Array(s);for(g=0;p>g;g+=4)w=l.indexOf(c[g]),d=l.indexOf(c[g+1]),A=l.indexOf(c[g+2]),h=l.indexOf(c[g+3]),S[a++]=w<<2|d>>4,S[a++]=(15&d)<<4|A>>2,S[a++]=(3&A)<<6|63&h;return s}})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},{}],30:[function(m,v){(function(r){function l(_){for(var p=0;p<_.length;p++){var a=_[p];if(a.buffer instanceof ArrayBuffer){var s=a.buffer;if(a.byteLength!==s.byteLength){var S=new Uint8Array(a.byteLength);S.set(new Uint8Array(s,a.byteOffset,a.byteLength)),s=S.buffer}_[p]=s}}}function c(_,p){p=p||{};var a=new w;l(_);for(var s=0;s<_.length;s++)a.append(_[s]);return p.type?a.getBlob(p.type):a.getBlob()}function g(_,p){return l(_),new Blob(_,p||{})}var w=r.BlobBuilder||r.WebKitBlobBuilder||r.MSBlobBuilder||r.MozBlobBuilder,d=function(){try{var _=new Blob(["hi"]);return _.size===2}catch{return!1}}(),A=d&&function(){try{var _=new Blob([new Uint8Array([1,2])]);return _.size===2}catch{return!1}}(),h=w&&w.prototype.append&&w.prototype.getBlob;v.exports=function(){return d?A?r.Blob:g:h?c:void 0}()}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],31:[function(m,v,r){(function(l){(function(c){function g(I){for(var U,X,j=[],V=0,B=I.length;B>V;)U=I.charCodeAt(V++),U>=55296&&56319>=U&&B>V?(X=I.charCodeAt(V++),(64512&X)==56320?j.push(((1023&U)<<10)+(1023&X)+65536):(j.push(U),V--)):j.push(U);return j}function w(I){for(var U,X=I.length,j=-1,V="";++j<X;)U=I[j],U>65535&&(U-=65536,V+=se(U>>>10&1023|55296),U=56320|1023&U),V+=se(U);return V}function d(I){if(I>=55296&&57343>=I)throw Error("Lone surrogate U+"+I.toString(16).toUpperCase()+" is not a scalar value")}function A(I,U){return se(I>>U&63|128)}function h(I){if(!(4294967168&I))return se(I);var U="";return 4294965248&I?4294901760&I?!(4292870144&I)&&(U=se(I>>18&7|240),U+=A(I,12),U+=A(I,6)):(d(I),U=se(I>>12&15|224),U+=A(I,6)):U=se(I>>6&31|192),U+=se(63&I|128)}function _(I){for(var U,X=g(I),j=X.length,V=-1,B="";++V<j;)U=X[V],B+=h(U);return B}function p(){if(Y>=oe)throw Error("Invalid byte index");var I=255&q[Y];if(Y++,(192&I)==128)return 63&I;throw Error("Invalid continuation byte")}function a(){var I,U,X,j,V;if(Y>oe)throw Error("Invalid byte index");if(Y==oe)return!1;if(I=255&q[Y],Y++,(128&I)==0)return I;if((224&I)==192){var U=p();if(V=(31&I)<<6|U,V>=128)return V;throw Error("Invalid continuation byte")}if((240&I)==224){if(U=p(),X=p(),V=(15&I)<<12|U<<6|X,V>=2048)return d(V),V;throw Error("Invalid continuation byte")}if((248&I)==240&&(U=p(),X=p(),j=p(),V=(15&I)<<18|U<<12|X<<6|j,V>=65536&&1114111>=V))return V;throw Error("Invalid UTF-8 detected")}function s(I){q=g(I),oe=q.length,Y=0;for(var U,X=[];(U=a())!==!1;)X.push(U);return w(X)}var S=typeof r=="object"&&r,k=typeof v=="object"&&v&&v.exports==S&&v,T=typeof l=="object"&&l;(T.global===T||T.window===T)&&(c=T);var q,oe,Y,se=String.fromCharCode,z={version:"2.0.0",encode:_,decode:s};if(S&&!S.nodeType)if(k)k.exports=z;else{var D={},M=D.hasOwnProperty;for(var H in z)M.call(z,H)&&(S[H]=z[H])}else c.utf8=z})(this)}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],32:[function(m,v){(function(r){var l=/^[\],:{}\s]*$/,c=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,g=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,w=/(?:^|:|,)(?:\s*\[)+/g,d=/^\s+/,A=/\s+$/;v.exports=function(h){return typeof h=="string"&&h?(h=h.replace(d,"").replace(A,""),r.JSON&&JSON.parse?JSON.parse(h):l.test(h.replace(c,"@").replace(g,"]").replace(w,""))?new Function("return "+h)():void 0):null}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],33:[function(m,v,r){r.encode=function(l){var c="";for(var g in l)l.hasOwnProperty(g)&&(c.length&&(c+="&"),c+=encodeURIComponent(g)+"="+encodeURIComponent(l[g]));return c},r.decode=function(l){for(var c={},g=l.split("&"),w=0,d=g.length;d>w;w++){var A=g[w].split("=");c[decodeURIComponent(A[0])]=decodeURIComponent(A[1])}return c}},{}],34:[function(m,v){var r=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,l=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];v.exports=function(c){var g=c,w=c.indexOf("["),d=c.indexOf("]");w!=-1&&d!=-1&&(c=c.substring(0,w)+c.substring(w,d).replace(/:/g,";")+c.substring(d,c.length));for(var A=r.exec(c||""),h={},_=14;_--;)h[l[_]]=A[_]||"";return w!=-1&&d!=-1&&(h.source=g,h.host=h.host.substring(1,h.host.length-1).replace(/;/g,":"),h.authority=h.authority.replace("[","").replace("]","").replace(/;/g,":"),h.ipv6uri=!0),h}},{}],35:[function(m,v){function r(g,w){return w?new c(g,w):new c(g)}var l=function(){return self}(),c=l.WebSocket||l.MozWebSocket;v.exports=c?r:null,c&&(r.prototype=c.prototype)},{}],36:[function(m,v){(function(r){function l(g){function w(d){if(!d)return!1;if(r.Buffer&&r.Buffer.isBuffer(d)||r.ArrayBuffer&&d instanceof ArrayBuffer||r.Blob&&d instanceof Blob||r.File&&d instanceof File)return!0;if(c(d)){for(var A=0;A<d.length;A++)if(w(d[A]))return!0}else if(d&&typeof d=="object"){d.toJSON&&(d=d.toJSON());for(var h in d)if(Object.prototype.hasOwnProperty.call(d,h)&&w(d[h]))return!0}return!1}return w(g)}var c=m("isarray");v.exports=l}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{isarray:37}],37:[function(m,v){v.exports=Array.isArray||function(r){return Object.prototype.toString.call(r)=="[object Array]"}},{}],38:[function(m,v){var r=m("global");try{v.exports="XMLHttpRequest"in r&&"withCredentials"in new r.XMLHttpRequest}catch{v.exports=!1}},{global:39}],39:[function(m,v){v.exports=function(){return this}()},{}],40:[function(m,v){var r=[].indexOf;v.exports=function(l,c){if(r)return l.indexOf(c);for(var g=0;g<l.length;++g)if(l[g]===c)return g;return-1}},{}],41:[function(m,v,r){var l=Object.prototype.hasOwnProperty;r.keys=Object.keys||function(c){var g=[];for(var w in c)l.call(c,w)&&g.push(w);return g},r.values=function(c){var g=[];for(var w in c)l.call(c,w)&&g.push(c[w]);return g},r.merge=function(c,g){for(var w in g)l.call(g,w)&&(c[w]=g[w]);return c},r.length=function(c){return r.keys(c).length},r.isEmpty=function(c){return r.length(c)==0}},{}],42:[function(m,v){var r=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,l=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];v.exports=function(c){for(var g=r.exec(c||""),w={},d=14;d--;)w[l[d]]=g[d]||"";return w}},{}],43:[function(m,v,r){(function(l){var c=m("isarray"),g=m("./is-buffer");r.deconstructPacket=function(w){function d(p){if(!p)return p;if(g(p)){var a={_placeholder:!0,num:A.length};return A.push(p),a}if(c(p)){for(var s=new Array(p.length),S=0;S<p.length;S++)s[S]=d(p[S]);return s}if(typeof p=="object"&&!(p instanceof Date)){var s={};for(var k in p)s[k]=d(p[k]);return s}return p}var A=[],h=w.data,_=w;return _.data=d(h),_.attachments=A.length,{packet:_,buffers:A}},r.reconstructPacket=function(w,d){function A(h){if(h&&h._placeholder){var _=d[h.num];return _}if(c(h)){for(var p=0;p<h.length;p++)h[p]=A(h[p]);return h}if(h&&typeof h=="object"){for(var a in h)h[a]=A(h[a]);return h}return h}return w.data=A(w.data),w.attachments=void 0,w},r.removeBlobs=function(w,d){function A(p,a,s){if(!p)return p;if(l.Blob&&p instanceof Blob||l.File&&p instanceof File){h++;var S=new FileReader;S.onload=function(){s?s[a]=this.result:_=this.result,--h||d(_)},S.readAsArrayBuffer(p)}else if(c(p))for(var k=0;k<p.length;k++)A(p[k],k,p);else if(p&&typeof p=="object"&&!g(p))for(var T in p)A(p[T],T,p)}var h=0,_=w;A(_),h||d(_)}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./is-buffer":45,isarray:46}],44:[function(m,v,r){function l(){}function c(k){var T="",q=!1;return T+=k.type,(r.BINARY_EVENT==k.type||r.BINARY_ACK==k.type)&&(T+=k.attachments,T+="-"),k.nsp&&k.nsp!="/"&&(q=!0,T+=k.nsp),k.id!=null&&(q&&(T+=",",q=!1),T+=k.id),k.data!=null&&(q&&(T+=","),T+=p.stringify(k.data)),_("encoded %j as %s",k,T),T}function g(k,T){function q(oe){var Y=s.deconstructPacket(oe),se=c(Y.packet),z=Y.buffers;z.unshift(se),T(z)}s.removeBlobs(k,q)}function w(){this.reconstructor=null}function d(k){var T={},q=0;if(T.type=Number(k.charAt(0)),r.types[T.type]==null)return h();if(r.BINARY_EVENT==T.type||r.BINARY_ACK==T.type){for(var oe="";k.charAt(++q)!="-"&&(oe+=k.charAt(q),q!=k.length););if(oe!=Number(oe)||k.charAt(q)!="-")throw new Error("Illegal attachments");T.attachments=Number(oe)}if(k.charAt(q+1)=="/")for(T.nsp="";++q;){var Y=k.charAt(q);if(Y==","||(T.nsp+=Y,q==k.length))break}else T.nsp="/";var se=k.charAt(q+1);if(se!==""&&Number(se)==se){for(T.id="";++q;){var Y=k.charAt(q);if(Y==null||Number(Y)!=Y){--q;break}if(T.id+=k.charAt(q),q==k.length)break}T.id=Number(T.id)}if(k.charAt(++q))try{T.data=p.parse(k.substr(q))}catch{return h()}return _("decoded %s as %j",k,T),T}function A(k){this.reconPack=k,this.buffers=[]}function h(){return{type:r.ERROR,data:"parser error"}}var _=m("debug")("socket.io-parser"),p=m("json3"),a=(m("isarray"),m("component-emitter")),s=m("./binary"),S=m("./is-buffer");r.protocol=4,r.types=["CONNECT","DISCONNECT","EVENT","BINARY_EVENT","ACK","BINARY_ACK","ERROR"],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=l,r.Decoder=w,l.prototype.encode=function(k,T){if(_("encoding packet %j",k),r.BINARY_EVENT==k.type||r.BINARY_ACK==k.type)g(k,T);else{var q=c(k);T([q])}},a(w.prototype),w.prototype.add=function(k){var T;if(typeof k=="string")T=d(k),r.BINARY_EVENT==T.type||r.BINARY_ACK==T.type?(this.reconstructor=new A(T),this.reconstructor.reconPack.attachments===0&&this.emit("decoded",T)):this.emit("decoded",T);else{if(!S(k)&&!k.base64)throw new Error("Unknown type: "+k);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");T=this.reconstructor.takeBinaryData(k),T&&(this.reconstructor=null,this.emit("decoded",T))}},w.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},A.prototype.takeBinaryData=function(k){if(this.buffers.push(k),this.buffers.length==this.reconPack.attachments){var T=s.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),T}return null},A.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},{"./binary":43,"./is-buffer":45,"component-emitter":9,debug:10,isarray:46,json3:47}],45:[function(m,v){(function(r){function l(c){return r.Buffer&&r.Buffer.isBuffer(c)||r.ArrayBuffer&&c instanceof ArrayBuffer}v.exports=l}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],46:[function(m,v){v.exports=m(37)},{}],47:[function(m,v,r){(function(l){function c(W){if(c[W]!==d)return c[W];var J;if(W=="bug-string-char-index")J=!1;else if(W=="json")J=c("json-stringify")&&c("json-parse");else{var F,te='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if(W=="json-stringify"){var P=_.stringify,Q=typeof P=="function"&&p;if(Q){(F=function(){return 1}).toJSON=F;try{Q=P(0)==="0"&&P(new Number)==="0"&&P(new String)=='""'&&P(A)===d&&P(d)===d&&P()===d&&P(F)==="1"&&P([F])=="[1]"&&P([d])=="[null]"&&P(null)=="null"&&P([d,A,null])=="[null,null,null]"&&P({a:[F,!0,!1,null,`\0\b
34
- \f\r `]})==te&&P(null,F)==="1"&&P([1,2],null,1)==`[
31
+ `)+W+`return __p
32
+ }`;var dt=Pu(function(){return Ct(m,tt+"return "+W).apply(n,C)});if(dt.source=W,To(dt))throw dt;return dt}function ky(t){return At(t).toLowerCase()}function Ay(t){return At(t).toUpperCase()}function xy(t,e,i){if(t=At(t),t&&(i||e===n))return Xs(t);if(!t||!(e=he(e)))return t;var s=Ae(t),h=Ae(e),m=$s(s,h),C=Js(s,h)+1;return rn(s,m,C).join("")}function Ey(t,e,i){if(t=At(t),t&&(i||e===n))return t.slice(0,Ys(t)+1);if(!t||!(e=he(e)))return t;var s=Ae(t),h=Js(s,Ae(e))+1;return rn(s,0,h).join("")}function Ty(t,e,i){if(t=At(t),t&&(i||e===n))return t.replace(Ei,"");if(!t||!(e=he(e)))return t;var s=Ae(t),h=$s(s,Ae(e));return rn(s,h).join("")}function Ry(t,e){var i=B,s=H;if(Bt(e)){var h="separator"in e?e.separator:h;i="length"in e?pt(e.length):i,s="omission"in e?he(e.omission):s}t=At(t);var m=t.length;if(An(t)){var C=Ae(t);m=C.length}if(i>=m)return t;var S=i-xn(s);if(S<1)return s;var E=C?rn(C,0,S).join(""):t.slice(0,S);if(h===n)return E+s;if(C&&(S+=E.length-S),Ro(h)){if(t.slice(S).search(h)){var M,q=E;for(h.global||(h=zi(h.source,At(ds.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(he(h),S)!=S){var j=E.lastIndexOf(h);j>-1&&(E=E.slice(0,j))}return E+s}function Oy(t){return t=At(t),t&&qc.test(t)?t.replace(hs,oh):t}var Iy=Bn(function(t,e,i){return t+(i?" ":"")+e.toUpperCase()}),No=Fa("toUpperCase");function Du(t,e,i){return t=At(t),e=i?n:e,e===n?th(t)?uh(t):Gf(t):t.match(e)||[]}var Pu=yt(function(t,e){try{return ce(t,n,e)}catch(i){return To(i)?i:new ft(i)}}),Ny=He(function(t,e){return ye(e,function(i){i=Ue(i),qe(t,i,xo(t[i],t))}),t});function By(t){var e=t==null?0:t.length,i=it();return t=e?Nt(t,function(s){if(typeof s[1]!="function")throw new ve(v);return[i(s[0]),s[1]]}):[],yt(function(s){for(var h=-1;++h<e;){var m=t[h];if(ce(m[0],this,s))return ce(m[1],this,s)}})}function Ly(t){return ol(_e(t,g))}function Bo(t){return function(){return t}}function Uy(t,e){return t==null||t!==t?e:t}var Dy=qa(),Py=qa(!0);function oe(t){return t}function Lo(t){return ya(typeof t=="function"?t:_e(t,g))}function Fy(t){return ma(_e(t,g))}function My(t,e){return _a(t,_e(e,g))}var qy=yt(function(t,e){return function(i){return rr(i,t,e)}}),Wy=yt(function(t,e){return function(i){return rr(t,i,e)}});function Uo(t,e,i){var s=Wt(e),h=Mr(e,s);i==null&&!(Bt(e)&&(h.length||!s.length))&&(i=e,e=t,t=this,h=Mr(e,Wt(e)));var m=!(Bt(i)&&"chain"in i)||!!i.chain,C=ze(t);return ye(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__=ne(this.__actions__);return W.push({func:E,args:arguments,thisArg:t}),q.__chain__=M,q}return E.apply(t,Ve([this.value()],arguments))})}),t}function Hy(){return Kt._===this&&(Kt._=dh),this}function Do(){}function Ky(t){return t=pt(t),yt(function(e){return wa(e,t)})}var zy=lo(Nt),Gy=lo(Ws),Xy=lo(Pi);function Fu(t){return wo(t)?Fi(Ue(t)):Cl(t)}function $y(t){return function(e){return t==null?n:gn(t,e)}}var Jy=Ha(),jy=Ha(!0);function Po(){return[]}function Fo(){return!1}function Yy(){return{}}function Vy(){return""}function Zy(){return!0}function Qy(t,e){if(t=pt(t),t<1||t>ct)return[];var i=ae,s=$t(t,ae);e=it(e),t-=ae;for(var h=Wi(s,e);++i<t;)e(i);return h}function tv(t){return ht(t)?Nt(t,Ue):le(t)?[t]:ne(iu(At(t)))}function ev(t){var e=++lh;return At(t)+e}var nv=Gr(function(t,e){return t+e},0),rv=po("ceil"),iv=Gr(function(t,e){return t/e},1),ov=po("floor");function sv(t){return t&&t.length?Fr(t,oe,Zi):n}function av(t,e){return t&&t.length?Fr(t,it(e,2),Zi):n}function uv(t){return zs(t,oe)}function cv(t,e){return zs(t,it(e,2))}function fv(t){return t&&t.length?Fr(t,oe,no):n}function hv(t,e){return t&&t.length?Fr(t,it(e,2),no):n}var lv=Gr(function(t,e){return t*e},1),pv=po("round"),dv=Gr(function(t,e){return t-e},0);function gv(t){return t&&t.length?qi(t,oe):0}function yv(t,e){return t&&t.length?qi(t,it(e,2)):0}return y.after=Fd,y.ary=gu,y.assign=Ag,y.assignIn=Ru,y.assignInWith=ii,y.assignWith=xg,y.at=Eg,y.before=yu,y.bind=xo,y.bindAll=Ny,y.bindKey=vu,y.castArray=Yd,y.chain=lu,y.chunk=op,y.compact=sp,y.concat=ap,y.cond=By,y.conforms=Ly,y.constant=Bo,y.countBy=gd,y.create=Tg,y.curry=mu,y.curryRight=_u,y.debounce=wu,y.defaults=Rg,y.defaultsDeep=Og,y.defer=Md,y.delay=qd,y.difference=up,y.differenceBy=cp,y.differenceWith=fp,y.drop=hp,y.dropRight=lp,y.dropRightWhile=pp,y.dropWhile=dp,y.fill=gp,y.filter=vd,y.flatMap=wd,y.flatMapDeep=bd,y.flatMapDepth=Cd,y.flatten=uu,y.flattenDeep=yp,y.flattenDepth=vp,y.flip=Wd,y.flow=Dy,y.flowRight=Py,y.fromPairs=mp,y.functions=Pg,y.functionsIn=Fg,y.groupBy=Sd,y.initial=wp,y.intersection=bp,y.intersectionBy=Cp,y.intersectionWith=Sp,y.invert=qg,y.invertBy=Wg,y.invokeMap=Ad,y.iteratee=Lo,y.keyBy=xd,y.keys=Wt,y.keysIn=ie,y.map=Zr,y.mapKeys=Kg,y.mapValues=zg,y.matches=Fy,y.matchesProperty=My,y.memoize=ti,y.merge=Gg,y.mergeWith=Ou,y.method=qy,y.methodOf=Wy,y.mixin=Uo,y.negate=ei,y.nthArg=Ky,y.omit=Xg,y.omitBy=$g,y.once=Hd,y.orderBy=Ed,y.over=zy,y.overArgs=Kd,y.overEvery=Gy,y.overSome=Xy,y.partial=Eo,y.partialRight=bu,y.partition=Td,y.pick=Jg,y.pickBy=Iu,y.property=Fu,y.propertyOf=$y,y.pull=Ep,y.pullAll=fu,y.pullAllBy=Tp,y.pullAllWith=Rp,y.pullAt=Op,y.range=Jy,y.rangeRight=jy,y.rearg=zd,y.reject=Id,y.remove=Ip,y.rest=Gd,y.reverse=ko,y.sampleSize=Bd,y.set=Yg,y.setWith=Vg,y.shuffle=Ld,y.slice=Np,y.sortBy=Pd,y.sortedUniq=Mp,y.sortedUniqBy=qp,y.split=wy,y.spread=Xd,y.tail=Wp,y.take=Hp,y.takeRight=Kp,y.takeRightWhile=zp,y.takeWhile=Gp,y.tap=sd,y.throttle=$d,y.thru=Vr,y.toArray=xu,y.toPairs=Nu,y.toPairsIn=Bu,y.toPath=tv,y.toPlainObject=Tu,y.transform=Zg,y.unary=Jd,y.union=Xp,y.unionBy=$p,y.unionWith=Jp,y.uniq=jp,y.uniqBy=Yp,y.uniqWith=Vp,y.unset=Qg,y.unzip=Ao,y.unzipWith=hu,y.update=ty,y.updateWith=ey,y.values=Dn,y.valuesIn=ny,y.without=Zp,y.words=Du,y.wrap=jd,y.xor=Qp,y.xorBy=td,y.xorWith=ed,y.zip=nd,y.zipObject=rd,y.zipObjectDeep=id,y.zipWith=od,y.entries=Nu,y.entriesIn=Bu,y.extend=Ru,y.extendWith=ii,Uo(y,y),y.add=nv,y.attempt=Pu,y.camelCase=sy,y.capitalize=Lu,y.ceil=rv,y.clamp=ry,y.clone=Vd,y.cloneDeep=Qd,y.cloneDeepWith=tg,y.cloneWith=Zd,y.conformsTo=eg,y.deburr=Uu,y.defaultTo=Uy,y.divide=iv,y.endsWith=ay,y.eq=Ee,y.escape=uy,y.escapeRegExp=cy,y.every=yd,y.find=md,y.findIndex=su,y.findKey=Ig,y.findLast=_d,y.findLastIndex=au,y.findLastKey=Ng,y.floor=ov,y.forEach=pu,y.forEachRight=du,y.forIn=Bg,y.forInRight=Lg,y.forOwn=Ug,y.forOwnRight=Dg,y.get=Oo,y.gt=ng,y.gte=rg,y.has=Mg,y.hasIn=Io,y.head=cu,y.identity=oe,y.includes=kd,y.indexOf=_p,y.inRange=iy,y.invoke=Hg,y.isArguments=mn,y.isArray=ht,y.isArrayBuffer=ig,y.isArrayLike=re,y.isArrayLikeObject=Ut,y.isBoolean=og,y.isBuffer=on,y.isDate=sg,y.isElement=ag,y.isEmpty=ug,y.isEqual=cg,y.isEqualWith=fg,y.isError=To,y.isFinite=hg,y.isFunction=ze,y.isInteger=Cu,y.isLength=ni,y.isMap=Su,y.isMatch=lg,y.isMatchWith=pg,y.isNaN=dg,y.isNative=gg,y.isNil=vg,y.isNull=yg,y.isNumber=ku,y.isObject=Bt,y.isObjectLike=Lt,y.isPlainObject=cr,y.isRegExp=Ro,y.isSafeInteger=mg,y.isSet=Au,y.isString=ri,y.isSymbol=le,y.isTypedArray=Un,y.isUndefined=_g,y.isWeakMap=wg,y.isWeakSet=bg,y.join=kp,y.kebabCase=fy,y.last=be,y.lastIndexOf=Ap,y.lowerCase=hy,y.lowerFirst=ly,y.lt=Cg,y.lte=Sg,y.max=sv,y.maxBy=av,y.mean=uv,y.meanBy=cv,y.min=fv,y.minBy=hv,y.stubArray=Po,y.stubFalse=Fo,y.stubObject=Yy,y.stubString=Vy,y.stubTrue=Zy,y.multiply=lv,y.nth=xp,y.noConflict=Hy,y.noop=Do,y.now=Qr,y.pad=py,y.padEnd=dy,y.padStart=gy,y.parseInt=yy,y.random=oy,y.reduce=Rd,y.reduceRight=Od,y.repeat=vy,y.replace=my,y.result=jg,y.round=pv,y.runInContext=x,y.sample=Nd,y.size=Ud,y.snakeCase=_y,y.some=Dd,y.sortedIndex=Bp,y.sortedIndexBy=Lp,y.sortedIndexOf=Up,y.sortedLastIndex=Dp,y.sortedLastIndexBy=Pp,y.sortedLastIndexOf=Fp,y.startCase=by,y.startsWith=Cy,y.subtract=dv,y.sum=gv,y.sumBy=yv,y.template=Sy,y.times=Qy,y.toFinite=Ge,y.toInteger=pt,y.toLength=Eu,y.toLower=ky,y.toNumber=Ce,y.toSafeInteger=kg,y.toString=At,y.toUpper=Ay,y.trim=xy,y.trimEnd=Ey,y.trimStart=Ty,y.truncate=Ry,y.unescape=Oy,y.uniqueId=ev,y.upperCase=Iy,y.upperFirst=No,y.each=pu,y.eachRight=du,y.first=cu,Uo(y,function(){var t={};return Be(y,function(e,i){Et.call(y.prototype,i)||(t[i]=e)}),t}(),{chain:!1}),y.VERSION=a,ye(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){y[t].placeholder=y}),ye(["drop","take"],function(t,e){mt.prototype[t]=function(i){i=i===n?1:Mt(pt(i),0);var s=this.__filtered__&&!e?new mt(this):this.clone();return s.__filtered__?s.__takeCount__=$t(i,s.__takeCount__):s.__views__.push({size:$t(i,ae),type:t+(s.__dir__<0?"Right":"")}),s},mt.prototype[t+"Right"]=function(i){return this.reverse()[t](i).reverse()}}),ye(["filter","map","takeWhile"],function(t,e){var i=e+1,s=i==F||i==ut;mt.prototype[t]=function(h){var m=this.clone();return m.__iteratees__.push({iteratee:it(h,3),type:i}),m.__filtered__=m.__filtered__||s,m}}),ye(["head","last"],function(t,e){var i="take"+(e?"Right":"");mt.prototype[t]=function(){return this[i](1).value()[0]}}),ye(["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(oe)},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 rr(i,t,e)})}),mt.prototype.reject=function(t){return this.filter(ei(it(t)))},mt.prototype.slice=function(t,e){t=pt(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=pt(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(ae)},Be(mt.prototype,function(t,e){var i=/^(?:filter|find|map|reject)|While$/.test(e),s=/^(?:head|last)$/.test(e),h=y[s?"take"+(e=="last"?"Right":""):e],m=s||/^find/.test(e);h&&(y.prototype[e]=function(){var C=this.__wrapped__,S=s?[1]:arguments,E=C instanceof mt,M=S[0],q=E||ht(C),W=function(vt){var _t=h.apply(y,Ve([vt],S));return s&&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,dt=E&&!tt;if(!m&&q){C=dt?C:new mt(this);var st=t.apply(C,S);return st.__actions__.push({func:Vr,args:[W],thisArg:n}),new me(st,j)}return ot&&dt?t.apply(this,S):(st=this.thru(W),ot?s?st.value()[0]:st.value():st)})}),ye(["pop","push","shift","sort","splice","unshift"],function(t){var e=Sr[t],i=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",s=/^(?:pop|shift)$/.test(t);y.prototype[t]=function(){var h=arguments;if(s&&!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)})}}),Be(mt.prototype,function(t,e){var i=y[e];if(i){var s=i.name+"";Et.call(On,s)||(On[s]=[]),On[s].push({name:e,func:i})}}),On[zr(n,L).name]=[{name:"wrapper",func:n}],mt.prototype.clone=Oh,mt.prototype.reverse=Ih,mt.prototype.value=Nh,y.prototype.at=ad,y.prototype.chain=ud,y.prototype.commit=cd,y.prototype.next=fd,y.prototype.plant=ld,y.prototype.reverse=pd,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=dd,y.prototype.first=y.prototype.head,Yn&&(y.prototype[Yn]=hd),y},En=ch();fn?((fn.exports=En)._=En,Bi._=En):Kt._=En}).call(fr)})(ui,ui.exports);var xv=ui.exports;const Ev={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 Tv(){return function r(o,n,a){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,a)}return n[d].exports}for(var f=typeof require=="function"&&require,v=0;v<a.length;v++)c(a[v]);return c}({1:[function(r,o){o.exports=r("./lib/")},{"./lib/":2}],2:[function(r,o,n){function a(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=a;var b=n.managers={};n.protocol=f.protocol,n.connect=a,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 a=(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=a(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(a,c,f){return a.on(c,f),{destroy:function(){a.removeListener(c,f)}}}o.exports=n},{}],5:[function(r,o,n){function a(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=a;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(a.prototype),a.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"))]}},a.prototype.open=a.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),this.io.readyState=="open"&&this.onopen(),this)},a.prototype.send=function(){var u=v(arguments);return u.unshift("message"),this.emit.apply(this,u),this},a.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},a.prototype.packet=function(u){u.nsp=this.nsp,this.io.packet(u)},a.prototype.onopen=function(){p("transport is open - connecting"),this.nsp!="/"&&this.packet({type:c.CONNECT})},a.prototype.onclose=function(u){p("close (%s)",u),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",u)},a.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)}},a.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)},a.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})}}},a.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]},a.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},a.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=[]},a.prototype.ondisconnect=function(){p("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},a.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)},a.prototype.close=a.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 a(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=a}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{debug:10,parseuri:42}],7:[function(r,o){function n(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}o.exports=n,n.prototype.duration=function(){var a=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var c=Math.random(),f=Math.floor(c*this.jitter*a);a=1&Math.floor(10*c)?a+f:a-f}return 0|Math.min(a,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(a){this.ms=a},n.prototype.setMax=function(a){this.max=a},n.prototype.setJitter=function(a){this.jitter=a}},{}],8:[function(r,o){var n=[].slice;o.exports=function(a,c){if(typeof c=="string"&&(c=a[c]),typeof c!="function")throw new Error("bind() requires a function");var f=n.call(arguments,2);return function(){return c.apply(a,f.concat(n.call(arguments)))}}},{}],9:[function(r,o){function n(c){return c?a(c):void 0}function a(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=a(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 a(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 a(u,w){if(!(this instanceof a))return new a(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=a,a.priorWebsocketSuccess=!1,v(a.prototype),a.protocol=p.protocol,a.Socket=a,a.Transport=r("./transport"),a.transports=r("./transports"),a.parser=r("engine.io-parser"),a.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},a.prototype.open=function(){var w;if(this.rememberUpgrade&&a.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)},a.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")})},a.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;a.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;a.priorWebsocketSuccess=!1,U.once("open",w),U.once("error",k),U.once("close",L),this.once("close",Y),this.once("upgrading",J),U.open()},a.prototype.onOpen=function(){if(d("socket open"),this.readyState="open",a.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])}},a.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)},a.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))},a.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)},a.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)},a.prototype.ping=function(){this.sendPacket("ping")},a.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()},a.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"))},a.prototype.write=a.prototype.send=function(u,w){return this.sendPacket("message",u,w),this},a.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()}},a.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},a.prototype.onError=function(u){d("socket error %j",u),a.priorWebsocketSuccess=!1,this.emit("error",u),this.onClose("transport error",u)},a.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)}},a.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 a=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=a.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(a){function c(p){var _,g=!1,l=!1,u=p.jsonp!==!1;if(a.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 a(){}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=a)},!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 a(){}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=a:this.xhr.onreadystatechange=a,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),a.call(this,p)}var a=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,a),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+"-"+a.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),a.call(this,p)}var a=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,a),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(){a.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(){a.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(a){var c=a.xdomain,f=a.xscheme,v=a.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,a){var c=function(){};c.prototype=a.prototype,n.prototype=new c,n.prototype.constructor=n}},{}],22:[function(r,o,n){function a(){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=a,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 a(){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=a());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 a(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):a(g)}},{}],25:[function(r,o,n){(function(a){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(X,F,lt){I(F,function(ut,xt){R[X]=xt,lt(ut,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(a.ArrayBuffer&&B instanceof ArrayBuffer)return f(T,I,R);if(U&&B instanceof a.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),X=0;X<H.length;X++)z[X]=H[X];B=String.fromCharCode.apply(null,z)}return P+=a.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(!a.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,X){n.encodePacket(z,H?I:!1,!0,function(F){X(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,X){return P(X.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="",X=0,F=T.length;F>X;X++){var lt=T.charAt(X);if(lt!=":")z+=lt;else{if(z==""||z!=(B=Number(z))||(H=T.substr(X+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 ut=P(R,X+B,F);if(ut===!1)return}X+=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,lt){var ut;return ut=typeof lt=="string"?lt.length:lt.byteLength,F+ut.toString().length+ut+2},0),z=new Uint8Array(H),X=0;return B.forEach(function(F){var lt=typeof F=="string",ut=F;if(lt){for(var xt=new Uint8Array(F.length),ct=0;ct<F.length;ct++)xt[ct]=F.charCodeAt(ct);ut=xt.buffer}z[X++]=lt?0:1;for(var Gt=ut.byteLength.toString(),ct=0;ct<Gt.length;ct++)z[X++]=parseInt(Gt[ct]);z[X++]=255;for(var xt=new Uint8Array(ut),ct=0;ct<xt.length;ct++)z[X++]=xt[ct]}),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 X=new Uint8Array(H.length),F=0;F<H.length;F++)X[F]=H.charCodeAt(F);H=X.buffer,z[0]=0}for(var lt=H instanceof ArrayBuffer?H.byteLength:H.size,ut=lt.toString(),xt=new Uint8Array(ut.length+1),F=0;F<ut.length;F++)xt[F]=parseInt(ut[F]);if(xt[ut.length]=255,U){var ct=new U([z.buffer,xt.buffer,H]);B(null,ct)}})}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),X=z[0]===0,F="",lt=1;z[lt]!=255;lt++){if(F.length>310){H=!0;break}F+=z[lt]}if(H)return P(N,0,1);R=g(R,2+F.length),F=parseInt(F);var ut=g(R,0,F);if(X)try{ut=String.fromCharCode.apply(null,new Uint8Array(ut))}catch{var xt=new Uint8Array(ut);ut="";for(var lt=0;lt<xt.length;lt++)ut+=String.fromCharCode(xt[lt])}B.push(ut),R=g(R,F)}var ct=B.length;B.forEach(function(Gt,Oe){P(n.decodePacket(Gt,I,!0),Oe,ct)})}}).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 a=[],c=Object.prototype.hasOwnProperty;for(var f in n)c.call(n,f)&&a.push(f);return a}},{}],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||a,d.count=c,c===0?f():d}function a(){}o.exports=n},{}],28:[function(r,o){o.exports=function(n,a,c){var f=n.byteLength;if(a=a||0,c=c||f,n.slice)return n.slice(a,c);if(0>a&&(a+=f),0>c&&(c+=f),c>f&&(c=f),a>=f||a>=c||f===0)return new ArrayBuffer(0);for(var v=new Uint8Array(n),d=new Uint8Array(c-a),b=a,p=0;c>b;b++,p++)d[p]=v[b];return d.buffer}},{}],29:[function(r,o,n){(function(a){n.encode=function(c){var f,v=new Uint8Array(c),d=v.length,b="";for(f=0;d>f;f+=3)b+=a[v[f]>>2],b+=a[(3&v[f])<<4|v[f+1]>>4],b+=a[(15&v[f+1])<<2|v[f+2]>>6],b+=a[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=a.indexOf(c[f]),d=a.indexOf(c[f+1]),b=a.indexOf(c[f+2]),p=a.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 a(_){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;a(_);for(var u=0;u<_.length;u++)l.append(_[u]);return g.type?l.getBlob(g.type):l.getBlob()}function f(_,g){return a(_),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(a){(function(c){function f(R){for(var B,H,z=[],X=0,F=R.length;F>X;)B=R.charCodeAt(X++),B>=55296&&56319>=B&&F>X?(H=R.charCodeAt(X++),(64512&H)==56320?z.push(((1023&B)<<10)+(1023&H)+65536):(z.push(B),X--)):z.push(B);return z}function v(R){for(var B,H=R.length,z=-1,X="";++z<H;)B=R[z],B>65535&&(B-=65536,X+=N(B>>>10&1023|55296),B=56320|1023&B),X+=N(B);return X}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,X=-1,F="";++X<z;)B=H[X],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,X;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(X=(31&R)<<6|B,X>=128)return X;throw Error("Invalid continuation byte")}if((240&R)==224){if(B=g(),H=g(),X=(15&R)<<12|B<<6|H,X>=2048)return d(X),X;throw Error("Invalid continuation byte")}if((248&R)==240&&(B=g(),H=g(),z=g(),X=(15&R)<<18|B<<12|H<<6|z,X>=65536&&1114111>=X))return X;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 a=="object"&&a;(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 a=/^[\],:{}\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):a.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(a){var c="";for(var f in a)a.hasOwnProperty(f)&&(c.length&&(c+="&"),c+=encodeURIComponent(f)+"="+encodeURIComponent(a[f]));return c},n.decode=function(a){for(var c={},f=a.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*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,a=["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[a[_]]=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 a=function(){return self}(),c=a.WebSocket||a.MozWebSocket;o.exports=c?n:null,c&&(n.prototype=c.prototype)},{}],36:[function(r,o){(function(n){function a(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=a}).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(a,c){if(n)return a.indexOf(c);for(var f=0;f<a.length;++f)if(a[f]===c)return f;return-1}},{}],41:[function(r,o,n){var a=Object.prototype.hasOwnProperty;n.keys=Object.keys||function(c){var f=[];for(var v in c)a.call(c,v)&&f.push(v);return f},n.values=function(c){var f=[];for(var v in c)a.call(c,v)&&f.push(c[v]);return f},n.merge=function(c,f){for(var v in f)a.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*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,a=["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[a[d]]=f[d]||"";return v}},{}],43:[function(r,o,n){(function(a){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(a.Blob&&g instanceof Blob||a.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 a(){}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=a,n.Decoder=v,a.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 a(c){return n.Buffer&&n.Buffer.isBuffer(c)||n.ArrayBuffer&&c instanceof ArrayBuffer}o.exports=a}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],46:[function(r,o){o.exports=r(37)},{}],47:[function(r,o,n){(function(a){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 G,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){(G=function(){return 1}).toJSON=G;try{et=K(0)==="0"&&K(new Number)==="0"&&K(new String)=='""'&&K(b)===d&&K(d)===d&&K()===d&&K(G)==="1"&&K([G])=="[1]"&&K([d])=="[null]"&&K(null)=="null"&&K([d,b,null])=="[null,null,null]"&&K({a:[G,!0,!1,null,`\0\b
34
+ \f\r `]})==rt&&K(null,G)==="1"&&K([1,2],null,1)==`[
35
35
  1,
36
36
  2
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{Q=!1}}J=Q}if(W=="json-parse"){var ee=_.parse;if(typeof ee=="function")try{if(ee("0")===0&&!ee(!1)){F=ee(te);var $=F.a.length==5&&F.a[0]===1;if($){try{$=!ee('" "')}catch{}if($)try{$=ee("01")!==1}catch{}if($)try{$=ee("1.")!==1}catch{}}}}catch{$=!1}J=$}}return c[W]=!!J}var g,w,d,A={}.toString,h=typeof JSON=="object"&&JSON,_=typeof r=="object"&&r&&!r.nodeType&&r;_&&h?(_.stringify=h.stringify,_.parse=h.parse):_=l.JSON=h||{};var p=new Date(-0xc782b5b800cec);try{p=p.getUTCFullYear()==-109252&&p.getUTCMonth()===0&&p.getUTCDate()===1&&p.getUTCHours()==10&&p.getUTCMinutes()==37&&p.getUTCSeconds()==6&&p.getUTCMilliseconds()==708}catch{}if(!c("json")){var a="[object Function]",s="[object Date]",S="[object Number]",k="[object String]",T="[object Array]",q="[object Boolean]",oe=c("bug-string-char-index");if(!p)var Y=Math.floor,se=[0,31,59,90,120,151,181,212,243,273,304,334],z=function(W,J){return se[J]+365*(W-1970)+Y((W-1969+(J=+(J>1)))/4)-Y((W-1901+J)/100)+Y((W-1601+J)/400)};(g={}.hasOwnProperty)||(g=function(W){var J,F={};return(F.__proto__=null,F.__proto__={toString:1},F).toString!=A?g=function(te){var P=this.__proto__,Q=te in(this.__proto__=null,this);return this.__proto__=P,Q}:(J=F.constructor,g=function(te){var P=(this.constructor||J).prototype;return te in this&&!(te in P&&this[te]===P[te])}),F=null,g.call(this,W)});var D={boolean:1,number:1,string:1,undefined:1},M=function(W,J){var F=typeof W[J];return F=="object"?!!W[J]:!D[F]};if(w=function(W,J){var F,te,P,Q=0;(F=function(){this.valueOf=0}).prototype.valueOf=0,te=new F;for(P in te)g.call(te,P)&&Q++;return F=te=null,Q?w=Q==2?function(ee,$){var ae,we={},qe=A.call(ee)==a;for(ae in ee)qe&&ae=="prototype"||g.call(we,ae)||!(we[ae]=1)||!g.call(ee,ae)||$(ae)}:function(ee,$){var ae,we,qe=A.call(ee)==a;for(ae in ee)qe&&ae=="prototype"||!g.call(ee,ae)||(we=ae==="constructor")||$(ae);(we||g.call(ee,ae="constructor"))&&$(ae)}:(te=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],w=function(ee,$){var ae,we,qe=A.call(ee)==a,Re=!qe&&typeof ee.constructor!="function"&&M(ee,"hasOwnProperty")?ee.hasOwnProperty:g;for(ae in ee)qe&&ae=="prototype"||!Re.call(ee,ae)||$(ae);for(we=te.length;ae=te[--we];Re.call(ee,ae)&&$(ae));}),w(W,J)},!c("json-stringify")){var H={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},I="000000",U=function(W,J){return(I+(J||0)).slice(-W)},X="\\u00",j=function(W){var J,F='"',te=0,P=W.length,Q=P>10&&oe;for(Q&&(J=W.split(""));P>te;te++){var ee=W.charCodeAt(te);switch(ee){case 8:case 9:case 10:case 12:case 13:case 34:case 92:F+=H[ee];break;default:if(32>ee){F+=X+U(2,ee.toString(16));break}F+=Q?J[te]:oe?W.charAt(te):W[te]}}return F+'"'},V=function(W,J,F,te,P,Q,ee){var $,ae,we,qe,Re,vt,Sn,tt,on,Cn,Ge,$e,Ct,bt,bn,Et;try{$=J[W]}catch{}if(typeof $=="object"&&$)if(ae=A.call($),ae!=s||g.call($,"toJSON"))typeof $.toJSON=="function"&&(ae!=S&&ae!=k&&ae!=T||g.call($,"toJSON"))&&($=$.toJSON(W));else if($>-1/0&&1/0>$){if(z){for(Re=Y($/864e5),we=Y(Re/365.2425)+1970-1;z(we+1,0)<=Re;we++);for(qe=Y((Re-z(we,0))/30.42);z(we,qe+1)<=Re;qe++);Re=1+Re-z(we,qe),vt=($%864e5+864e5)%864e5,Sn=Y(vt/36e5)%24,tt=Y(vt/6e4)%60,on=Y(vt/1e3)%60,Cn=vt%1e3}else we=$.getUTCFullYear(),qe=$.getUTCMonth(),Re=$.getUTCDate(),Sn=$.getUTCHours(),tt=$.getUTCMinutes(),on=$.getUTCSeconds(),Cn=$.getUTCMilliseconds();$=(0>=we||we>=1e4?(0>we?"-":"+")+U(6,0>we?-we:we):U(4,we))+"-"+U(2,qe+1)+"-"+U(2,Re)+"T"+U(2,Sn)+":"+U(2,tt)+":"+U(2,on)+"."+U(3,Cn)+"Z"}else $=null;if(F&&($=F.call(J,W,$)),$===null)return"null";if(ae=A.call($),ae==q)return""+$;if(ae==S)return $>-1/0&&1/0>$?""+$:"null";if(ae==k)return j(""+$);if(typeof $=="object"){for(bt=ee.length;bt--;)if(ee[bt]===$)throw TypeError();if(ee.push($),Ge=[],bn=Q,Q+=P,ae==T){for(Ct=0,bt=$.length;bt>Ct;Ct++)$e=V(Ct,$,F,te,P,Q,ee),Ge.push($e===d?"null":$e);Et=Ge.length?P?`[
38
- `+Q+Ge.join(`,
39
- `+Q)+`
40
- `+bn+"]":"["+Ge.join(",")+"]":"[]"}else w(te||$,function(An){var Ft=V(An,$,F,te,P,Q,ee);Ft!==d&&Ge.push(j(An)+":"+(P?" ":"")+Ft)}),Et=Ge.length?P?`{
41
- `+Q+Ge.join(`,
42
- `+Q)+`
43
- `+bn+"}":"{"+Ge.join(",")+"}":"{}";return ee.pop(),Et}};_.stringify=function(W,J,F){var te,P,Q,ee;if(typeof J=="function"||typeof J=="object"&&J){if((ee=A.call(J))==a)P=J;else if(ee==T){Q={};for(var $,ae=0,we=J.length;we>ae;$=J[ae++],ee=A.call($),(ee==k||ee==S)&&(Q[$]=1));}}if(F)if((ee=A.call(F))==S){if((F-=F%1)>0)for(te="",F>10&&(F=10);te.length<F;te+=" ");}else ee==k&&(te=F.length<=10?F:F.slice(0,10));return V("",($={},$[""]=W,$),P,Q,te,"",[])}}if(!c("json-parse")){var B,be,Ae=String.fromCharCode,Te={92:"\\",34:'"',47:"/",98:"\b",116:" ",110:`
44
- `,102:"\f",114:"\r"},ue=function(){throw B=be=null,SyntaxError()},We=function(){for(var W,J,F,te,P,Q=be,ee=Q.length;ee>B;)switch(P=Q.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 W=oe?Q.charAt(B):Q[B],B++,W;case 34:for(W="@",B++;ee>B;)if(P=Q.charCodeAt(B),32>P)ue();else if(P==92)switch(P=Q.charCodeAt(++B)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:W+=Te[P],B++;break;case 117:for(J=++B,F=B+4;F>B;B++)P=Q.charCodeAt(B),P>=48&&57>=P||P>=97&&102>=P||P>=65&&70>=P||ue();W+=Ae("0x"+Q.slice(J,B));break;default:ue()}else{if(P==34)break;for(P=Q.charCodeAt(B),J=B;P>=32&&P!=92&&P!=34;)P=Q.charCodeAt(++B);W+=Q.slice(J,B)}if(Q.charCodeAt(B)==34)return B++,W;ue();default:if(J=B,P==45&&(te=!0,P=Q.charCodeAt(++B)),P>=48&&57>=P){for(P==48&&(P=Q.charCodeAt(B+1),P>=48&&57>=P)&&ue(),te=!1;ee>B&&(P=Q.charCodeAt(B),P>=48&&57>=P);B++);if(Q.charCodeAt(B)==46){for(F=++B;ee>F&&(P=Q.charCodeAt(F),P>=48&&57>=P);F++);F==B&&ue(),B=F}if(P=Q.charCodeAt(B),P==101||P==69){for(P=Q.charCodeAt(++B),(P==43||P==45)&&B++,F=B;ee>F&&(P=Q.charCodeAt(F),P>=48&&57>=P);F++);F==B&&ue(),B=F}return+Q.slice(J,B)}if(te&&ue(),Q.slice(B,B+4)=="true")return B+=4,!0;if(Q.slice(B,B+5)=="false")return B+=5,!1;if(Q.slice(B,B+4)=="null")return B+=4,null;ue()}return"$"},St=function(W){var J,F;if(W=="$"&&ue(),typeof W=="string"){if((oe?W.charAt(0):W[0])=="@")return W.slice(1);if(W=="["){for(J=[];W=We(),W!="]";F||(F=!0))F&&(W==","?(W=We(),W=="]"&&ue()):ue()),W==","&&ue(),J.push(St(W));return J}if(W=="{"){for(J={};W=We(),W!="}";F||(F=!0))F&&(W==","?(W=We(),W=="}"&&ue()):ue()),(W==","||typeof W!="string"||(oe?W.charAt(0):W[0])!="@"||We()!=":")&&ue(),J[W.slice(1)]=St(We());return J}ue()}return W},et=function(W,J,F){var te=Kn(W,J,F);te===d?delete W[J]:W[J]=te},Kn=function(W,J,F){var te,P=W[J];if(typeof P=="object"&&P)if(A.call(P)==T)for(te=P.length;te--;)et(P,te,F);else w(P,function(Q){et(P,Q,F)});return F.call(W,J,P)};_.parse=function(W,J){var F,te;return B=0,be=""+W,F=St(We()),We()!="$"&&ue(),B=be=null,J&&A.call(J)==a?Kn((te={},te[""]=F,te),"",J):F}}}})(this)},{}],48:[function(m,v){function r(l,c){var g=[];c=c||0;for(var w=c||0;w<l.length;w++)g[w-c]=l[w];return g}v.exports=r},{}]},{},[1])(1)}const Tg=Object.freeze(Object.defineProperty({__proto__:null,default:Eg},Symbol.toStringTag,{value:"Module"})),Rg=Object.assign({"./v1_3_7.js":Tg}),Og=/v\d+_\d+_\d+/;function Lg(m){return typeof m=="function"}const eo=Object.entries(Rg).reduce((m,v)=>{var c;const r=v[1].default,l=(c=v[0].match(Og))==null?void 0:c[0];return Lg(r)&&l&&(m[l]=r()),m},{}),Ua=m=>{if(m in eo)return eo[m];throw new Error(`Socket version ${m} not found`)},Ig=(m,...v)=>Ua(m)(...v),Ng={...eo,getSocketVersion:Ua,makeSocketVersion:Ig};var pe=(m=>(m.ALL_DIALER_STATUS="AllDialersStatus",m.ALL_EXTENSION_STATUS="AllExtensionsStatus",m.ALL_USERS_STATUS="AllUsersStatus",m.CONNECT="connect",m.DISCONNECT="disconnect",m.CONNECT_ERROR_EVENT="connect_error",m.EXTENSION_EVENT="ExtensionEvent",m.KEEP_ALIVE="keepalive",m.KEEP_ALIVE_RESPONSE="keepaliveResponse",m.LOGIN_STATUS="loginStatus",m.LOGIN_SUCCESS="loginSuccess",m.QUEUE_EVENT="QueueEvent",m.ONLINE_STATUS_EVENT="onlineStatusEvent",m.DIALER_EVENT="DialerEvent",m))(pe||{});class Bg{constructor(v){me(this,"io");me(this,"ioFunction");me(this,"lastEventTimestamp",new Date().getTime());me(this,"doReconnect",!0);me(this,"keepAliveInterval");me(this,"keepReconnectInterval");me(this,"connected",!1);this.eventsSdkClass=v,this.eventsSdkClass=v}getSocketIoFunction(v){const r=v.split("v="),l="v".concat(r[r.length-1]).replaceAll(".","_");this.ioFunction=Ng.getSocketVersion(l)}initSocketConnection(){const v=this.eventsSdkClass.authClass.token,r=this.eventsSdkClass.options.protocol,l=this.eventsSdkClass.server;try{const c=l?l.Domain:this.eventsSdkClass.URL,g=l?`${r}://${c}`:this.eventsSdkClass.URL;this.eventsSdkClass.loggerClass.log(ze.INFO,"Connecting to..",g),this.eventsSdkClass.eventEmitterClass.emit(pe.ONLINE_STATUS_EVENT,{isSocketConnected:!1,attemptToConnect:g});const w={reconnection:!1,upgrade:!1,transports:["websocket"],forceNew:!0,query:{token:v},timeout:this.eventsSdkClass.options.timeout};if(v&&(w.query={token:v}),this.ioFunction&&g)this.io=this.ioFunction(g,w);else throw new Error("Socket server url no defined")}catch(c){this.eventsSdkClass.loggerClass.log(ze.ERROR,"init socket connection error",c)}}initSocketEvents(){this.io&&this.io.on(pe.LOGIN_SUCCESS,v=>this.eventsSdkClass.eventEmitterClass.emit(pe.LOGIN_SUCCESS,v)).on(pe.QUEUE_EVENT,v=>this.eventsSdkClass.eventEmitterClass.emit(pe.QUEUE_EVENT,v)).on(pe.EXTENSION_EVENT,v=>this.eventsSdkClass.eventEmitterClass.emit(pe.EXTENSION_EVENT,v)).on(pe.DIALER_EVENT,v=>this.eventsSdkClass.eventEmitterClass.emit(pe.DIALER_EVENT,v)).on(pe.LOGIN_STATUS,v=>this.eventsSdkClass.eventEmitterClass.emit(pe.LOGIN_STATUS,v)).on(pe.ALL_EXTENSION_STATUS,v=>this.eventsSdkClass.eventEmitterClass.emit(pe.ALL_EXTENSION_STATUS,v)).on(pe.ALL_DIALER_STATUS,v=>this.eventsSdkClass.eventEmitterClass.emit(pe.ALL_DIALER_STATUS,v)).on(pe.KEEP_ALIVE_RESPONSE,v=>this.onKeepAliveResponse(v)).on(pe.CONNECT,()=>this.onConnect()).on(pe.DISCONNECT,v=>this.onDisconnect(v)).on(pe.CONNECT_ERROR_EVENT,v=>this.onConnectError(v))}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(pe.KEEP_ALIVE,this.eventsSdkClass.authClass.token),this.eventsSdkClass.loggerClass.log(ze.INFO,`EMIT -> ${pe.KEEP_ALIVE}`,this.eventsSdkClass.authClass.token);return}},this.eventsSdkClass.options.keepAliveTimeout)}closeAllConnections(){var v;this.io&&(this.io.close(),(v=this.io)==null||v.disconnect(),this.io=void 0),qn.clearSessionStorage()}onKeepAliveResponse(v){if(this.eventsSdkClass.loggerClass.log(ze.INFO,pe.KEEP_ALIVE_RESPONSE),v.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(ze.INFO,pe.CONNECT,this.eventsSdkClass.reconnectOptions),this.eventsSdkClass.eventEmitterClass.emit(pe.ONLINE_STATUS_EVENT,{isSocketConnected:!0})}onDisconnect(v){this.connected=!1,this.eventsSdkClass.loggerClass.log(ze.INFO,pe.DISCONNECT,v),this.closeAllConnections(),this.eventsSdkClass.eventEmitterClass.emit(pe.ONLINE_STATUS_EVENT,{isSocketConnected:!1}),this.doReconnect&&(console.log("attempt to connect..."),this.eventsSdkClass.connect(rn.NEXT))}onConnectError(v){this.eventsSdkClass.eventEmitterClass.emit(pe.ONLINE_STATUS_EVENT,{isSocketConnected:!1}),this.eventsSdkClass.loggerClass.log(ze.ERROR,pe.CONNECT_ERROR_EVENT,v),setTimeout(()=>{this.eventsSdkClass.connect(rn.NEXT)},this.eventsSdkClass.options.reconnectionDelay)}}class Ug{constructor(v){me(this,"io");me(this,"storageLogger");this.eventsSdkClass=v,this.eventsSdkClass=v}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)}log(v,r,...l){const c=[r,...l];this.storageLogger?v===ze.INFO?this.storageLogger.log(c):v===ze.ERROR&&this.storageLogger.error(c):v===ze.INFO?console.log(c):v===ze.ERROR&&console.error(c)}}class Dg{constructor(v){me(this,"listeners",{[pe.ALL_EXTENSION_STATUS]:[],[pe.ALL_DIALER_STATUS]:[],[pe.ALL_USERS_STATUS]:[],[pe.QUEUE_EVENT]:[],[pe.EXTENSION_EVENT]:[],[pe.DIALER_EVENT]:[],[pe.LOGIN_SUCCESS]:[],[pe.LOGIN_STATUS]:[],[pe.KEEP_ALIVE_RESPONSE]:[],[pe.ONLINE_STATUS_EVENT]:[]});me(this,"allListeners",[]);this.eventsSdkClass=v,this.eventsSdkClass=v}on(v,r){v==="*"?this.allListeners.push(r):this.listeners[v].push(r)}off(v,r){if(v==="*")this.allListeners=this.allListeners.filter(l=>l!==r);else{const c=this.listeners[v].filter(g=>g!==r);this.listeners={...this.listeners,[v]:c}}}emit(v,r){this.eventsSdkClass.socketIoClass.lastEventTimestamp=new Date().getTime(),this.listeners[v].forEach(c=>c({name:v,data:r}));const l={name:v,data:r};this.allListeners.forEach(c=>c(l))}}class Pg{constructor(v){me(this,"argumentOptions");me(this,"options");me(this,"servers",[]);me(this,"URLList",[]);me(this,"server");me(this,"URL");me(this,"socket");me(this,"mainServer");me(this,"alreadyAttemptedOtherServers",[]);me(this,"authClass",new Ag(this));me(this,"socketIoClass",new Bg(this));me(this,"loggerClass",new Ug(this));me(this,"eventEmitterClass",new Dg(this));me(this,"reconnectOptions");me(this,"retryConnection");this.options={...kg,...v},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=xg.debounce(this.connect.bind(this),this.reconnectOptions.reconnectionDelay,{leading:!0,trailing:!1}),this.argumentOptions={...v}}on(v,r){this.eventEmitterClass.on(v,r)}emit(v,r){this.socketIoClass.io&&this.socketIoClass.io.emit(v,r)}connect(v){v===rn.MAIN&&this.findMainServer(),v===rn.NEXT&&this.findNextServer(),this.socketIoClass.doReconnect=!0,this.socketIoClass.initSocketConnection(),this.socketIoClass.initSocketEvents(),this.socketIoClass.initKeepAlive()}disconnect(){this.socketIoClass.doReconnect=!1,this.socketIoClass.closeAllConnections()}clearKeepAliveInterval(){this.socketIoClass.clearKeepAliveInterval()}findMainServer(){this.servers.length?(this.mainServer=this.servers.reduce((v,r)=>r.Priority>v.Priority?r:v),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 v=this.servers.filter(r=>r.Priority!==this.mainServer.Priority&&this.alreadyAttemptedOtherServers.indexOf(r.Priority)+1===0);v.length||(this.alreadyAttemptedOtherServers=[],v=this.servers.filter(r=>r.Priority!==this.mainServer.Priority&&this.alreadyAttemptedOtherServers.indexOf(r.Priority)+1===0)),v.length&&(this.server=v.reduce((r,l)=>l.Priority>r.Priority?l:r),this.alreadyAttemptedOtherServers.push(this.server.Priority))}else this.server=this.mainServer;else if(this.URLList.length)if(this.URL===this.URLList[0]){let v=this.URLList.filter(r=>r!==this.URLList[0]&&this.alreadyAttemptedOtherServers.indexOf(r)+1===0);v.length||(this.alreadyAttemptedOtherServers=[],v=this.URLList.filter(r=>r!==this.URLList[0]&&this.alreadyAttemptedOtherServers.indexOf(r)+1===0)),v.length&&(this.URL=v[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.EventsEnum=pe;exports.default=Pg;
37
+ ]`&&K(new Date(-864e13))=='"-271821-04-20T00:00:00.000Z"'&&K(new Date(864e13))=='"+275760-09-13T00:00:00.000Z"'&&K(new Date(-621987552e5))=='"-000001-01-01T00:00:00.000Z"'&&K(new Date(-1))=='"1969-12-31T23:59:59.999Z"'}catch{et=!1}}Q=et}if($=="json-parse"){var nt=_.parse;if(typeof nt=="function")try{if(nt("0")===0&&!nt(!1)){G=nt(rt);var Z=G.a.length==5&&G.a[0]===1;if(Z){try{Z=!nt('" "')}catch{}if(Z)try{Z=nt("01")!==1}catch{}if(Z)try{Z=nt("1.")!==1}catch{}}}}catch{Z=!1}Q=Z}}return c[$]=!!Q}var f,v,d,b={}.toString,p=typeof JSON=="object"&&JSON,_=typeof n=="object"&&n&&!n.nodeType&&n;_&&p?(_.stringify=p.stringify,_.parse=p.parse):_=a.JSON=p||{};var g=new Date(-0xc782b5b800cec);try{g=g.getUTCFullYear()==-109252&&g.getUTCMonth()===0&&g.getUTCDate()===1&&g.getUTCHours()==10&&g.getUTCMinutes()==37&&g.getUTCSeconds()==6&&g.getUTCMilliseconds()==708}catch{}if(!c("json")){var l="[object Function]",u="[object Date]",w="[object Number]",A="[object String]",k="[object Array]",L="[object Boolean]",Y=c("bug-string-char-index");if(!g)var J=Math.floor,N=[0,31,59,90,120,151,181,212,243,273,304,334],U=function($,Q){return N[Q]+365*($-1970)+J(($-1969+(Q=+(Q>1)))/4)-J(($-1901+Q)/100)+J(($-1601+Q)/400)};(f={}.hasOwnProperty)||(f=function($){var Q,G={};return(G.__proto__=null,G.__proto__={toString:1},G).toString!=b?f=function(rt){var K=this.__proto__,et=rt in(this.__proto__=null,this);return this.__proto__=K,et}:(Q=G.constructor,f=function(rt){var K=(this.constructor||Q).prototype;return rt in this&&!(rt in K&&this[rt]===K[rt])}),G=null,f.call(this,$)});var T={boolean:1,number:1,string:1,undefined:1},I=function($,Q){var G=typeof $[Q];return G=="object"?!!$[Q]:!T[G]};if(v=function($,Q){var G,rt,K,et=0;(G=function(){this.valueOf=0}).prototype.valueOf=0,rt=new G;for(K in rt)f.call(rt,K)&&et++;return G=rt=null,et?v=et==2?function(nt,Z){var at,kt={},Xt=b.call(nt)==l;for(at in nt)Xt&&at=="prototype"||f.call(kt,at)||!(kt[at]=1)||!f.call(nt,at)||Z(at)}:function(nt,Z){var at,kt,Xt=b.call(nt)==l;for(at in nt)Xt&&at=="prototype"||!f.call(nt,at)||(kt=at==="constructor")||Z(at);(kt||f.call(nt,at="constructor"))&&Z(at)}:(rt=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],v=function(nt,Z){var at,kt,Xt=b.call(nt)==l,It=!Xt&&typeof nt.constructor!="function"&&I(nt,"hasOwnProperty")?nt.hasOwnProperty:f;for(at in nt)Xt&&at=="prototype"||!It.call(nt,at)||Z(at);for(kt=rt.length;at=rt[--kt];It.call(nt,at)&&Z(at));}),v($,Q)},!c("json-stringify")){var P={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},R="000000",B=function($,Q){return(R+(Q||0)).slice(-$)},H="\\u00",z=function($){var Q,G='"',rt=0,K=$.length,et=K>10&&Y;for(et&&(Q=$.split(""));K>rt;rt++){var nt=$.charCodeAt(rt);switch(nt){case 8:case 9:case 10:case 12:case 13:case 34:case 92:G+=P[nt];break;default:if(32>nt){G+=H+B(2,nt.toString(16));break}G+=et?Q[rt]:Y?$.charAt(rt):$[rt]}}return G+'"'},X=function($,Q,G,rt,K,et,nt){var Z,at,kt,Xt,It,ke,Gn,ue,bn,Xn,Vt,Zt,Ie,Ne,$n,Pe;try{Z=Q[$]}catch{}if(typeof Z=="object"&&Z)if(at=b.call(Z),at!=u||f.call(Z,"toJSON"))typeof Z.toJSON=="function"&&(at!=w&&at!=A&&at!=k||f.call(Z,"toJSON"))&&(Z=Z.toJSON($));else if(Z>-1/0&&1/0>Z){if(U){for(It=J(Z/864e5),kt=J(It/365.2425)+1970-1;U(kt+1,0)<=It;kt++);for(Xt=J((It-U(kt,0))/30.42);U(kt,Xt+1)<=It;Xt++);It=1+It-U(kt,Xt),ke=(Z%864e5+864e5)%864e5,Gn=J(ke/36e5)%24,ue=J(ke/6e4)%60,bn=J(ke/1e3)%60,Xn=ke%1e3}else kt=Z.getUTCFullYear(),Xt=Z.getUTCMonth(),It=Z.getUTCDate(),Gn=Z.getUTCHours(),ue=Z.getUTCMinutes(),bn=Z.getUTCSeconds(),Xn=Z.getUTCMilliseconds();Z=(0>=kt||kt>=1e4?(0>kt?"-":"+")+B(6,0>kt?-kt:kt):B(4,kt))+"-"+B(2,Xt+1)+"-"+B(2,It)+"T"+B(2,Gn)+":"+B(2,ue)+":"+B(2,bn)+"."+B(3,Xn)+"Z"}else Z=null;if(G&&(Z=G.call(Q,$,Z)),Z===null)return"null";if(at=b.call(Z),at==L)return""+Z;if(at==w)return Z>-1/0&&1/0>Z?""+Z:"null";if(at==A)return z(""+Z);if(typeof Z=="object"){for(Ne=nt.length;Ne--;)if(nt[Ne]===Z)throw TypeError();if(nt.push(Z),Vt=[],$n=et,et+=K,at==k){for(Ie=0,Ne=Z.length;Ne>Ie;Ie++)Zt=X(Ie,Z,G,rt,K,et,nt),Vt.push(Zt===d?"null":Zt);Pe=Vt.length?K?`[
38
+ `+et+Vt.join(`,
39
+ `+et)+`
40
+ `+$n+"]":"["+Vt.join(",")+"]":"[]"}else v(rt||Z,function(Jn){var je=X(Jn,Z,G,rt,K,et,nt);je!==d&&Vt.push(z(Jn)+":"+(K?" ":"")+je)}),Pe=Vt.length?K?`{
41
+ `+et+Vt.join(`,
42
+ `+et)+`
43
+ `+$n+"}":"{"+Vt.join(",")+"}":"{}";return nt.pop(),Pe}};_.stringify=function($,Q,G){var rt,K,et,nt;if(typeof Q=="function"||typeof Q=="object"&&Q){if((nt=b.call(Q))==l)K=Q;else if(nt==k){et={};for(var Z,at=0,kt=Q.length;kt>at;Z=Q[at++],nt=b.call(Z),(nt==A||nt==w)&&(et[Z]=1));}}if(G)if((nt=b.call(G))==w){if((G-=G%1)>0)for(rt="",G>10&&(G=10);rt.length<G;rt+=" ");}else nt==A&&(rt=G.length<=10?G:G.slice(0,10));return X("",(Z={},Z[""]=$,Z),K,et,rt,"",[])}}if(!c("json-parse")){var F,lt,ut=String.fromCharCode,xt={92:"\\",34:'"',47:"/",98:"\b",116:" ",110:`
44
+ `,102:"\f",114:"\r"},ct=function(){throw F=lt=null,SyntaxError()},Gt=function(){for(var $,Q,G,rt,K,et=lt,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)ct();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,G=F+4;G>F;F++)K=et.charCodeAt(F),K>=48&&57>=K||K>=97&&102>=K||K>=65&&70>=K||ct();$+=ut("0x"+et.slice(Q,F));break;default:ct()}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++,$;ct();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)&&ct(),rt=!1;nt>F&&(K=et.charCodeAt(F),K>=48&&57>=K);F++);if(et.charCodeAt(F)==46){for(G=++F;nt>G&&(K=et.charCodeAt(G),K>=48&&57>=K);G++);G==F&&ct(),F=G}if(K=et.charCodeAt(F),K==101||K==69){for(K=et.charCodeAt(++F),(K==43||K==45)&&F++,G=F;nt>G&&(K=et.charCodeAt(G),K>=48&&57>=K);G++);G==F&&ct(),F=G}return+et.slice(Q,F)}if(rt&&ct(),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;ct()}return"$"},Oe=function($){var Q,G;if($=="$"&&ct(),typeof $=="string"){if((Y?$.charAt(0):$[0])=="@")return $.slice(1);if($=="["){for(Q=[];$=Gt(),$!="]";G||(G=!0))G&&($==","?($=Gt(),$=="]"&&ct()):ct()),$==","&&ct(),Q.push(Oe($));return Q}if($=="{"){for(Q={};$=Gt(),$!="}";G||(G=!0))G&&($==","?($=Gt(),$=="}"&&ct()):ct()),($==","||typeof $!="string"||(Y?$.charAt(0):$[0])!="@"||Gt()!=":")&&ct(),Q[$.slice(1)]=Oe(Gt());return Q}ct()}return $},ae=function($,Q,G){var rt=yr($,Q,G);rt===d?delete $[Q]:$[Q]=rt},yr=function($,Q,G){var rt,K=$[Q];if(typeof K=="object"&&K)if(b.call(K)==k)for(rt=K.length;rt--;)ae(K,rt,G);else v(K,function(et){ae(K,et,G)});return G.call($,Q,K)};_.parse=function($,Q){var G,rt;return F=0,lt=""+$,G=Oe(Gt()),Gt()!="$"&&ct(),F=lt=null,Q&&b.call(Q)==l?yr((rt={},rt[""]=G,rt),"",Q):G}}}})(this)},{}],48:[function(r,o){function n(a,c){var f=[];c=c||0;for(var v=c||0;v<a.length;v++)f[v-c]=a[v];return f}o.exports=n},{}]},{},[1])(1)}const Rv=Object.freeze(Object.defineProperty({__proto__:null,default:Tv},Symbol.toStringTag,{value:"Module"})),Ov=Object.assign({"./v1_3_7.js":Rv}),Iv=/v\d+_\d+_\d+/;function Nv(r){return typeof r=="function"}const Go=Object.entries(Ov).reduce((r,o)=>{var c;const n=o[1].default,a=(c=o[0].match(Iv))==null?void 0:c[0];return Nv(n)&&a&&(r[a]=n()),r},{}),rc=r=>{if(r in Go)return Go[r];throw new Error(`Socket version ${r} not found`)},Bv=(r,...o)=>rc(r)(...o),Lv={...Go,getSocketVersion:rc,makeSocketVersion:Bv};var gt=(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))(gt||{}),ic=(r=>(r.NEW_CALL="NEWCALL",r.ANSWER="ANSWER",r.HOLD="HOLD",r.UNHOLD="UNHOLD",r.HANGUP="HANGUP",r.USER_STATUS_UPDATE="userStatusUpdate",r))(ic||{}),oc=(r=>(r.ANSWER="ANSWER",r.ABANDONED="ABANDONED",r.EXIT="EXIT",r.JOIN="JOIN",r))(oc||{}),sc=(r=>(r.AUTOMATIC="Automatic",r.IVR="IVR",r))(sc||{}),ac=(r=>(r.EXTENSION="extension",r.QUEUE="queue",r.DIALER="dialer",r))(ac||{}),uc=(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))(uc||{}),cc=(r=>(r.RINGING="Ringing",r.TALKING="Talking",r.DIALING="Dialing",r.HOLD="Hold",r))(cc||{}),fc=(r=>(r.INCOMING="Incoming",r.OUTGOING="Outgoing",r))(fc||{}),hc=(r=>(r.RESPONSE_FROM_API_VALID="RESPONSE_FROM_API_VALID",r.RESPONSE_FROM_API_INVALID="RESPONSE_FROM_API_INVALID",r))(hc||{}),lc=(r=>(r.INCOMING="Incoming",r.OUTGOING="Outgoing",r.SPY="Spy",r.CLICK2CALL="Click2call",r))(lc||{});class Uv{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="),a="v".concat(n[n.length-1]).replaceAll(".","_");this.ioFunction=Lv.getSocketVersion(a)}initSocketConnection(){const o=this.eventsSdkClass.authClass.token,n=this.eventsSdkClass.options.protocol,a=this.eventsSdkClass.server;try{const c=a?a.Domain:this.eventsSdkClass.URL,f=a?`${n}://${c}`:this.eventsSdkClass.URL;this.eventsSdkClass.loggerClass.log(jt.INFO,"Connecting to..",f),this.eventsSdkClass.eventEmitterClass.emit(gt.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(jt.ERROR,"init socket connection error",c)}}initSocketEvents(){this.io&&this.io.on(gt.LOGIN_SUCCESS,o=>this.eventsSdkClass.eventEmitterClass.emit(gt.LOGIN_SUCCESS,o)).on(gt.QUEUE_EVENT,o=>this.eventsSdkClass.eventEmitterClass.emit(gt.QUEUE_EVENT,o)).on(gt.EXTENSION_EVENT,o=>this.eventsSdkClass.eventEmitterClass.emit(gt.EXTENSION_EVENT,o)).on(gt.DIALER_EVENT,o=>this.eventsSdkClass.eventEmitterClass.emit(gt.DIALER_EVENT,o)).on(gt.LOGIN_STATUS,o=>this.eventsSdkClass.eventEmitterClass.emit(gt.LOGIN_STATUS,o)).on(gt.ALL_EXTENSION_STATUS,o=>this.eventsSdkClass.eventEmitterClass.emit(gt.ALL_EXTENSION_STATUS,o)).on(gt.ALL_DIALER_STATUS,o=>this.eventsSdkClass.eventEmitterClass.emit(gt.ALL_DIALER_STATUS,o)).on(gt.KEEP_ALIVE_RESPONSE,o=>this.onKeepAliveResponse(o)).on(gt.CONNECT,()=>this.onConnect()).on(gt.DISCONNECT,o=>this.onDisconnect(o)).on(gt.CONNECT_ERROR_EVENT,o=>this.onConnectError(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(gt.KEEP_ALIVE,this.eventsSdkClass.authClass.token),this.eventsSdkClass.loggerClass.log(jt.INFO,`EMIT -> ${gt.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),hr.clearSessionStorage()}onKeepAliveResponse(o){if(this.eventsSdkClass.loggerClass.log(jt.INFO,gt.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(jt.INFO,gt.CONNECT,this.eventsSdkClass.reconnectOptions),this.eventsSdkClass.eventEmitterClass.emit(gt.ONLINE_STATUS_EVENT,{isSocketConnected:!0})}onDisconnect(o){this.connected=!1,this.eventsSdkClass.loggerClass.log(jt.INFO,gt.DISCONNECT,o),this.closeAllConnections(),this.eventsSdkClass.eventEmitterClass.emit(gt.ONLINE_STATUS_EVENT,{isSocketConnected:!1}),this.doReconnect&&(console.log("attempt to connect..."),this.eventsSdkClass.connect(_n.NEXT))}onConnectError(o){this.eventsSdkClass.eventEmitterClass.emit(gt.ONLINE_STATUS_EVENT,{isSocketConnected:!1}),this.eventsSdkClass.loggerClass.log(jt.ERROR,gt.CONNECT_ERROR_EVENT,o),setTimeout(()=>{this.eventsSdkClass.connect(_n.NEXT)},this.eventsSdkClass.options.reconnectionDelay)}}var Dv=Object.defineProperty,Pv=(r,o,n)=>o in r?Dv(r,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[o]=n,Ht=(r,o,n)=>(Pv(r,typeof o!="symbol"?o+"":o,n),n);function Fv(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Mv(r){if(r.__esModule)return r;var o=r.default;if(typeof o=="function"){var n=function a(){return this instanceof a?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(a){var c=Object.getOwnPropertyDescriptor(r,a);Object.defineProperty(n,a,c.get?c:{enumerable:!0,get:function(){return r[a]}})}),n}var Xo={exports:{}},qv=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Wv=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],pc=function(r){var o=r,n=r.indexOf("["),a=r.indexOf("]");n!=-1&&a!=-1&&(r=r.substring(0,n)+r.substring(n,a).replace(/:/g,";")+r.substring(a,r.length));for(var c=qv.exec(r||""),f={},v=14;v--;)f[Wv[v]]=c[v]||"";return n!=-1&&a!=-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=Hv(f,f.path),f.queryKey=Kv(f,f.query),f};function Hv(r,o){var n=/\/{2,9}/g,a=o.replace(n,"/").split("/");return(o.substr(0,1)=="/"||o.length===0)&&a.splice(0,1),o.substr(o.length-1,1)=="/"&&a.splice(a.length-1,1),a}function Kv(r,o){var n={};return o.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(a,c,f){c&&(n[c]=f)}),n}var $o={exports:{}},Jo={exports:{}},lr=1e3,pr=lr*60,dr=pr*60,gr=dr*24,zv=gr*365.25,Gv=function(r,o){o=o||{};var n=typeof r;if(n==="string"&&r.length>0)return Xv(r);if(n==="number"&&isNaN(r)===!1)return o.long?Jv(r):$v(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function Xv(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]),a=(o[2]||"ms").toLowerCase();switch(a){case"years":case"year":case"yrs":case"yr":case"y":return n*zv;case"days":case"day":case"d":return n*gr;case"hours":case"hour":case"hrs":case"hr":case"h":return n*dr;case"minutes":case"minute":case"mins":case"min":case"m":return n*pr;case"seconds":case"second":case"secs":case"sec":case"s":return n*lr;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function $v(r){return r>=gr?Math.round(r/gr)+"d":r>=dr?Math.round(r/dr)+"h":r>=pr?Math.round(r/pr)+"m":r>=lr?Math.round(r/lr)+"s":r+"ms"}function Jv(r){return oi(r,gr,"day")||oi(r,dr,"hour")||oi(r,pr,"minute")||oi(r,lr,"second")||r+" ms"}function oi(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=a.debug=a.default=a,o.coerce=b,o.disable=v,o.enable=f,o.enabled=d,o.humanize=Gv,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 a(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}})(Jo,Jo.exports);var jv=Jo.exports;(function(r,o){o=r.exports=jv,o.log=c,o.formatArgs=a,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 a(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{}}})($o,$o.exports);var Je=$o.exports,Yv=pc,Wu=Je("socket.io-client:url"),Vv=Zv;function Zv(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)||(Wu("protocol-less url %s",r),typeof o<"u"?r=o.protocol+"//"+r:r="https://"+r),Wu("parse %s",r),n=Yv(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 a=n.host.indexOf(":")!==-1,c=a?"["+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 pi={},dc={exports:{}};(function(r){r.exports=o;function o(a){if(a)return n(a)}function n(a){for(var c in o.prototype)a[c]=o.prototype[c];return a}o.prototype.on=o.prototype.addEventListener=function(a,c){return this._callbacks=this._callbacks||{},(this._callbacks["$"+a]=this._callbacks["$"+a]||[]).push(c),this},o.prototype.once=function(a,c){function f(){this.off(a,f),c.apply(this,arguments)}return f.fn=c,this.on(a,f),this},o.prototype.off=o.prototype.removeListener=o.prototype.removeAllListeners=o.prototype.removeEventListener=function(a,c){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var f=this._callbacks["$"+a];if(!f)return this;if(arguments.length==1)return delete this._callbacks["$"+a],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["$"+a],this},o.prototype.emit=function(a){this._callbacks=this._callbacks||{};for(var c=new Array(arguments.length-1),f=this._callbacks["$"+a],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(a){return this._callbacks=this._callbacks||{},this._callbacks["$"+a]||[]},o.prototype.hasListeners=function(a){return!!this.listeners(a).length}})(dc);var qn=dc.exports,di={},Qv={}.toString,ts=Array.isArray||function(r){return Qv.call(r)=="[object Array]"},gc=r0,t0=typeof Buffer=="function"&&typeof Buffer.isBuffer=="function",e0=typeof ArrayBuffer=="function",n0=function(r){return typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r.buffer instanceof ArrayBuffer};function r0(r){return t0&&Buffer.isBuffer(r)||e0&&(r instanceof ArrayBuffer||n0(r))}var es=ts,yc=gc,vc=Object.prototype.toString,i0=typeof Blob=="function"||typeof Blob<"u"&&vc.call(Blob)==="[object BlobConstructor]",o0=typeof File=="function"||typeof File<"u"&&vc.call(File)==="[object FileConstructor]";di.deconstructPacket=function(r){var o=[],n=r.data,a=r;return a.data=jo(n,o),a.attachments=o.length,{packet:a,buffers:o}};function jo(r,o){if(!r)return r;if(yc(r)){var n={_placeholder:!0,num:o.length};return o.push(r),n}else if(es(r)){for(var a=new Array(r.length),c=0;c<r.length;c++)a[c]=jo(r[c],o);return a}else if(typeof r=="object"&&!(r instanceof Date)){var a={};for(var f in r)a[f]=jo(r[f],o);return a}return r}di.reconstructPacket=function(r,o){return r.data=Yo(r.data,o),r.attachments=void 0,r};function Yo(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(es(r))for(var a=0;a<r.length;a++)r[a]=Yo(r[a],o);else if(typeof r=="object")for(var c in r)r[c]=Yo(r[c],o);return r}di.removeBlobs=function(r,o){function n(f,v,d){if(!f)return f;if(i0&&f instanceof Blob||o0&&f instanceof File){a++;var b=new FileReader;b.onload=function(){d?d[v]=this.result:c=this.result,--a||o(c)},b.readAsArrayBuffer(f)}else if(es(f))for(var p=0;p<f.length;p++)n(f[p],p,f);else if(typeof f=="object"&&!yc(f))for(var _ in f)n(f[_],_,f)}var a=0,c=r;n(c),a||o(c)};(function(r){var o=Je("socket.io-parser"),n=qn,a=di,c=ts,f=gc;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=a.deconstructPacket(J),U=b(N.packet),T=N.buffers;T.unshift(U),L(T)}a.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=a.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}}})(pi);var ns={exports:{}},gi={},Vo={exports:{}};try{Vo.exports=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{Vo.exports=!1}var s0=Vo.exports,rs=function(){return typeof self<"u"?self:typeof window<"u"?window:Function("return this")()}(),a0=s0,u0=rs,is=function(r){var o=r.xdomain,n=r.xscheme,a=r.enablesXDR;try{if(typeof XMLHttpRequest<"u"&&(!o||a0))return new XMLHttpRequest}catch{}try{if(typeof XDomainRequest<"u"&&!n&&a)return new XDomainRequest}catch{}if(!o)try{return new u0[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}},os={exports:{}},wn={},c0=Object.keys||function(r){var o=[],n=Object.prototype.hasOwnProperty;for(var a in r)n.call(r,a)&&o.push(a);return o},f0=ts,mc=Object.prototype.toString,h0=typeof Blob=="function"||typeof Blob<"u"&&mc.call(Blob)==="[object BlobConstructor]",l0=typeof File=="function"||typeof File<"u"&&mc.call(File)==="[object FileConstructor]",_c=ai;function ai(r){if(!r||typeof r!="object")return!1;if(f0(r)){for(var o=0,n=r.length;o<n;o++)if(ai(r[o]))return!0;return!1}if(typeof Buffer=="function"&&Buffer.isBuffer&&Buffer.isBuffer(r)||typeof ArrayBuffer=="function"&&r instanceof ArrayBuffer||h0&&r instanceof Blob||l0&&r instanceof File)return!0;if(r.toJSON&&typeof r.toJSON=="function"&&arguments.length===1)return ai(r.toJSON(),!0);for(var a in r)if(Object.prototype.hasOwnProperty.call(r,a)&&ai(r[a]))return!0;return!1}var p0=function(r,o,n){var a=r.byteLength;if(o=o||0,n=n||a,r.slice)return r.slice(o,n);if(o<0&&(o+=a),n<0&&(n+=a),n>a&&(n=a),o>=a||o>=n||a===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},d0=g0;function g0(r,o,n){var a=!1;return n=n||y0,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?(a=!0,o(f),o=n):c.count===0&&!a&&o(null,v)}}function y0(){}/*! https://mths.be/utf8js v2.1.2 by @mathias */var an=String.fromCharCode;function wc(r){for(var o=[],n=0,a=r.length,c,f;n<a;)c=r.charCodeAt(n++),c>=55296&&c<=56319&&n<a?(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 v0(r){for(var o=r.length,n=-1,a,c="";++n<o;)a=r[n],a>65535&&(a-=65536,c+=an(a>>>10&1023|55296),a=56320|a&1023),c+=an(a);return c}function bc(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 Mo(r,o){return an(r>>o&63|128)}function m0(r,o){if(!(r&4294967168))return an(r);var n="";return r&4294965248?r&4294901760?r&4292870144||(n=an(r>>18&7|240),n+=Mo(r,12),n+=Mo(r,6)):(bc(r,o)||(r=65533),n=an(r>>12&15|224),n+=Mo(r,6)):n=an(r>>6&31|192),n+=an(r&63|128),n}function _0(r,o){o=o||{};for(var n=o.strict!==!1,a=wc(r),c=a.length,f=-1,v,d="";++f<c;)v=a[f],d+=m0(v,n);return d}function Pn(){if(un>=fi)throw Error("Invalid byte index");var r=ci[un]&255;if(un++,(r&192)==128)return r&63;throw Error("Invalid continuation byte")}function w0(r){var o,n,a,c,f;if(un>fi)throw Error("Invalid byte index");if(un==fi)return!1;if(o=ci[un]&255,un++,!(o&128))return o;if((o&224)==192){if(n=Pn(),f=(o&31)<<6|n,f>=128)return f;throw Error("Invalid continuation byte")}if((o&240)==224){if(n=Pn(),a=Pn(),f=(o&15)<<12|n<<6|a,f>=2048)return bc(f,r)?f:65533;throw Error("Invalid continuation byte")}if((o&248)==240&&(n=Pn(),a=Pn(),c=Pn(),f=(o&7)<<18|n<<12|a<<6|c,f>=65536&&f<=1114111))return f;throw Error("Invalid UTF-8 detected")}var ci,fi,un;function b0(r,o){o=o||{};var n=o.strict!==!1;ci=wc(r),fi=ci.length,un=0;for(var a=[],c;(c=w0(n))!==!1;)a.push(c);return v0(a)}var C0={version:"2.1.2",encode:_0,decode:b0},qo={},Hu;function S0(){return Hu||(Hu=1,function(r){qo.encode=function(o){var n=new Uint8Array(o),a,c=n.length,f="";for(a=0;a<c;a+=3)f+=r[n[a]>>2],f+=r[(n[a]&3)<<4|n[a+1]>>4],f+=r[(n[a+1]&15)<<2|n[a+2]>>6],f+=r[n[a+2]&63];return c%3===2?f=f.substring(0,f.length-1)+"=":c%3===1&&(f=f.substring(0,f.length-2)+"=="),f},qo.decode=function(o){var n=o.length*.75,a=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<a;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+/")),qo}var Wo,Ku;function k0(){if(Ku)return Wo;Ku=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}}(),a=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),Wo=function(){return o?n?Blob:v:a?f:void 0}(),Wo}(function(r){var o=c0,n=_c,a=p0,c=d0,f=C0,v;typeof ArrayBuffer<"u"&&(v=S0());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=k0();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=a(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,X){U(z,function(F,lt){I[H]=lt,X(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 X=N.charAt(H);if(X!==":"){P+=X;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,X){var F;return typeof X=="string"?F=X.length:F=X.byteLength,z+F.toString().length+F+2},0),B=new Uint8Array(R),H=0;return P.forEach(function(z){var X=typeof z=="string",F=z;if(X){for(var lt=new Uint8Array(z.length),ut=0;ut<z.length;ut++)lt[ut]=z.charCodeAt(ut);F=lt.buffer}X?B[H++]=0:B[H++]=1;for(var xt=F.byteLength.toString(),ut=0;ut<xt.length;ut++)B[H++]=parseInt(xt[ut]);B[H++]=255;for(var lt=new Uint8Array(F),ut=0;ut<lt.length;ut++)B[H++]=lt[ut]}),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 X=R instanceof ArrayBuffer?R.byteLength:R.size,F=X.toString(),lt=new Uint8Array(F.length+1),z=0;z<F.length;z++)lt[z]=parseInt(F[z]);if(lt[F.length]=255,u){var ut=new u([B.buffer,lt.buffer,R]);P(null,ut)}})}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=a(I,2+H.length),H=parseInt(H);var X=a(I,0,H);if(B)try{X=String.fromCharCode.apply(null,new Uint8Array(X))}catch{var F=new Uint8Array(X);X="";for(var z=0;z<F.length;z++)X+=String.fromCharCode(F[z])}P.push(X),I=a(I,H)}var lt=P.length;P.forEach(function(ut,xt){T(r.decodePacket(ut,U,!0),xt,lt)})}})(wn);var Ho,zu;function ss(){if(zu)return Ho;zu=1;var r=wn,o=qn;Ho=n;function n(a){this.path=a.path,this.hostname=a.hostname,this.port=a.port,this.secure=a.secure,this.query=a.query,this.timestampParam=a.timestampParam,this.timestampRequests=a.timestampRequests,this.readyState="",this.agent=a.agent||!1,this.socket=a.socket,this.enablesXDR=a.enablesXDR,this.withCredentials=a.withCredentials,this.pfx=a.pfx,this.key=a.key,this.passphrase=a.passphrase,this.cert=a.cert,this.ca=a.ca,this.ciphers=a.ciphers,this.rejectUnauthorized=a.rejectUnauthorized,this.forceNode=a.forceNode,this.isReactNative=a.isReactNative,this.extraHeaders=a.extraHeaders,this.localAddress=a.localAddress}return o(n.prototype),n.prototype.onError=function(a,c){var f=new Error(a);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(a){if(this.readyState==="open")this.write(a);else throw new Error("Transport not open")},n.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},n.prototype.onData=function(a){var c=r.decodePacket(a,this.socket.binaryType);this.onPacket(c)},n.prototype.onPacket=function(a){this.emit("packet",a)},n.prototype.onClose=function(){this.readyState="closed",this.emit("close")},Ho}var Wn={};Wn.encode=function(r){var o="";for(var n in r)r.hasOwnProperty(n)&&(o.length&&(o+="&"),o+=encodeURIComponent(n)+"="+encodeURIComponent(r[n]));return o};Wn.decode=function(r){for(var o={},n=r.split("&"),a=0,c=n.length;a<c;a++){var f=n[a].split("=");o[decodeURIComponent(f[0])]=decodeURIComponent(f[1])}return o};var yi=function(r,o){var n=function(){};n.prototype=o.prototype,r.prototype=new n,r.prototype.constructor=r},Cc="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),hi=64,Sc={},Gu=0,cn=0,Xu;function Zo(r){var o="";do o=Cc[r%hi]+o,r=Math.floor(r/hi);while(r>0);return o}function A0(r){var o=0;for(cn=0;cn<r.length;cn++)o=o*hi+Sc[r.charAt(cn)];return o}function as(){var r=Zo(+new Date);return r!==Xu?(Gu=0,Xu=r):r+"."+Zo(Gu++)}for(;cn<hi;cn++)Sc[Cc[cn]]=cn;as.encode=Zo;as.decode=A0;var kc=as,Ac=ss(),x0=Wn,xc=wn,E0=yi,T0=kc,Re=Je("engine.io-client:polling"),Ec=De,R0=function(){var r=is,o=new r({xdomain:!1});return o.responseType!=null}();function De(r){var o=r&&r.forceBase64;(!R0||o)&&(this.supportsBinary=!1),Ac.call(this,r)}E0(De,Ac);De.prototype.name="polling";De.prototype.doOpen=function(){this.poll()};De.prototype.pause=function(r){var o=this;this.readyState="pausing";function n(){Re("paused"),o.readyState="paused",r()}if(this.polling||!this.writable){var a=0;this.polling&&(Re("we are currently polling - waiting to pause"),a++,this.once("pollComplete",function(){Re("pre-pause polling complete"),--a||n()})),this.writable||(Re("we are currently writing - waiting to pause"),a++,this.once("drain",function(){Re("pre-pause writing complete"),--a||n()}))}else n()};De.prototype.poll=function(){Re("polling"),this.polling=!0,this.doPoll(),this.emit("poll")};De.prototype.onData=function(r){var o=this;Re("polling got data %s",r);var n=function(a,c,f){if(o.readyState==="opening"&&a.type==="open"&&o.onOpen(),a.type==="close")return o.onClose(),!1;o.onPacket(a)};xc.decodePayload(r,this.socket.binaryType,n),this.readyState!=="closed"&&(this.polling=!1,this.emit("pollComplete"),this.readyState==="open"?this.poll():Re('ignoring poll - transport state "%s"',this.readyState))};De.prototype.doClose=function(){var r=this;function o(){Re("writing close packet"),r.write([{type:"close"}])}this.readyState==="open"?(Re("transport open - closing"),o()):(Re("transport not open - deferring close"),this.once("open",o))};De.prototype.write=function(r){var o=this;this.writable=!1;var n=function(){o.writable=!0,o.emit("drain")};xc.encodePayload(r,this.supportsBinary,function(a){o.doWrite(a,n)})};De.prototype.uri=function(){var r=this.query||{},o=this.secure?"https":"http",n="";this.timestampRequests!==!1&&(r[this.timestampParam]=T0()),!this.supportsBinary&&!r.sid&&(r.b64=1),r=x0.encode(r),this.port&&(o==="https"&&Number(this.port)!==443||o==="http"&&Number(this.port)!==80)&&(n=":"+this.port),r.length&&(r="?"+r);var a=this.hostname.indexOf(":")!==-1;return o+"://"+(a?"["+this.hostname+"]":this.hostname)+n+this.path+r};var O0=is,Tc=Ec,I0=qn,N0=yi,Qo=Je("engine.io-client:polling-xhr"),B0=rs;os.exports=Hn;os.exports.Request=qt;function $u(){}function Hn(r){if(Tc.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}}N0(Hn,Tc);Hn.prototype.supportsBinary=!0;Hn.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)};Hn.prototype.doWrite=function(r,o){var n=typeof r!="string"&&r!==void 0,a=this.request({method:"POST",data:r,isBinary:n}),c=this;a.on("success",o),a.on("error",function(f){c.onError("xhr post error",f)}),this.sendXhr=a};Hn.prototype.doPoll=function(){Qo("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()}I0(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 O0(r),n=this;try{Qo("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 a in this.extraHeaders)this.extraHeaders.hasOwnProperty(a)&&o.setRequestHeader(a,this.extraHeaders[a])}}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))},Qo("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=$u:this.xhr.onreadystatechange=$u,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",Ju);else if(typeof addEventListener=="function"){var L0="onpagehide"in B0?"pagehide":"unload";addEventListener(L0,Ju,!1)}}function Ju(){for(var r in qt.requests)qt.requests.hasOwnProperty(r)&&qt.requests[r].abort()}var U0=os.exports,us=Ec,D0=yi,ju=rs,P0=Kn,F0=/\n/g,M0=/\\n/g,si;function q0(){}function Kn(r){us.call(this,r),this.query=this.query||{},si||(si=ju.___eio=ju.___eio||[]),this.index=si.length;var o=this;si.push(function(n){o.onData(n)}),this.query.j=this.index,typeof addEventListener=="function"&&addEventListener("beforeunload",function(){o.script&&(o.script.onerror=q0)},!1)}D0(Kn,us);Kn.prototype.supportsBinary=!1;Kn.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),us.prototype.doClose.call(this)};Kn.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 a=typeof navigator<"u"&&/gecko/i.test(navigator.userAgent);a&&setTimeout(function(){var c=document.createElement("iframe");document.body.appendChild(c),document.body.removeChild(c)},100)};Kn.prototype.doWrite=function(r,o){var n=this;if(!this.form){var a=document.createElement("form"),c=document.createElement("textarea"),f=this.iframeId="eio_iframe_"+this.index,v;a.className="socketio",a.style.position="absolute",a.style.top="-1000px",a.style.left="-1000px",a.target=f,a.method="POST",a.setAttribute("accept-charset","utf-8"),c.name="d",a.appendChild(c),document.body.appendChild(a),this.form=a,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(M0,`\\
45
+ `),this.area.value=r.replace(F0,"\\n");try{this.form.submit()}catch{}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){n.iframe.readyState==="complete"&&d()}:this.iframe.onload=d};const W0={},H0=Object.freeze(Object.defineProperty({__proto__:null,default:W0},Symbol.toStringTag,{value:"Module"})),K0=Mv(H0);var cs=ss(),z0=wn,G0=Wn,X0=yi,$0=kc,J0=Je("engine.io-client:websocket"),li,fs;typeof WebSocket<"u"?li=WebSocket:typeof self<"u"&&(li=self.WebSocket||self.MozWebSocket);if(typeof window>"u")try{fs=K0}catch{}var Mn=li||fs,j0=Se;function Se(r){var o=r&&r.forceBase64;o&&(this.supportsBinary=!1),this.perMessageDeflate=r.perMessageDeflate,this.usingBrowserWebSocket=li&&!r.forceNode,this.protocols=r.protocols,this.usingBrowserWebSocket||(Mn=fs),cs.call(this,r)}X0(Se,cs);Se.prototype.name="websocket";Se.prototype.supportsBinary=!0;Se.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 Mn(r,o):new Mn(r):new Mn(r,o,n)}catch(a){return this.emit("error",a)}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()}};Se.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)}};Se.prototype.write=function(r){var o=this;this.writable=!1;for(var n=r.length,a=0,c=n;a<c;a++)(function(v){z0.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{J0("websocket closed before onclose event")}--n||f()})})(r[a]);function f(){o.emit("flush"),setTimeout(function(){o.writable=!0,o.emit("drain")},0)}};Se.prototype.onClose=function(){cs.prototype.onClose.call(this)};Se.prototype.doClose=function(){typeof this.ws<"u"&&this.ws.close()};Se.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]=$0()),this.supportsBinary||(r.b64=1),r=G0.encode(r),r.length&&(r="?"+r);var a=this.hostname.indexOf(":")!==-1;return o+"://"+(a?"["+this.hostname+"]":this.hostname)+n+this.path+r};Se.prototype.check=function(){return!!Mn&&!("__initialize"in Mn&&this.name===Se.prototype.name)};var Y0=is,V0=U0,Z0=P0,Q0=j0;gi.polling=tm;gi.websocket=Q0;function tm(r){var o,n=!1,a=!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,a=r.secure!==f}if(r.xdomain=n,r.xscheme=a,o=new Y0(r),"open"in o&&!r.forceJSONP)return new V0(r);if(!c)throw new Error("JSONP disabled");return new Z0(r)}var em=[].indexOf,Rc=function(r,o){if(em)return r.indexOf(o);for(var n=0;n<r.length;++n)if(r[n]===o)return n;return-1},nm=gi,rm=qn,Pt=Je("engine.io-client:socket"),im=Rc,Oc=wn,Yu=pc,om=Wn,sm=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=Yu(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=Yu(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=om.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;rm(wt.prototype);wt.protocol=Oc.protocol;wt.Socket=wt;wt.Transport=ss();wt.transports=gi;wt.parser=wn;wt.prototype.createTransport=function(r){Pt('creating transport "%s"',r);var o=am(this.query);o.EIO=Oc.protocol,o.transport=r;var n=this.transportOptions[r]||{};this.id&&(o.sid=this.id);var a=new nm[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 a};function am(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,a=this;wt.priorWebsocketSuccess=!1;function c(){if(a.onlyBinaryUpgrades){var g=!this.supportsBinary&&a.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),a.upgrading=!0,a.emit("upgrading",o),!o)return;wt.priorWebsocketSuccess=o.name==="websocket",Pt('pausing current transport "%s"',a.transport.name),a.transport.pause(function(){n||a.readyState!=="closed"&&(Pt("changing transport and sending upgrade packet"),_(),a.setTransport(o),o.send([{type:"upgrade"}]),a.emit("upgrade",o),o=null,a.upgrading=!1,a.flush())})}else{Pt('probe transport "%s" failed',r);var u=new Error("probe error");u.transport=o.name,a.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),a.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),a.removeListener("close",b),a.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,a){if(typeof o=="function"&&(a=o,o=void 0),typeof n=="function"&&(a=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),a&&this.once("flush",a),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?a():o()}):this.upgrading?a():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 a(){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,a=r.length;n<a;n++)~im(this.transports,r[n])&&o.push(r[n]);return o};ns.exports=sm;ns.exports.parser=wn;var um=ns.exports,Ic={exports:{}},cm=fm;function fm(r,o){var n=[];o=o||0;for(var a=o||0;a<r.length;a++)n[a-o]=r[a];return n}var Nc=hm;function hm(r,o,n){return r.on(o,n),{destroy:function(){r.removeListener(o,n)}}}var Vu=[].slice,Bc=function(r,o){if(typeof o=="string"&&(o=r[o]),typeof o!="function")throw new Error("bind() requires a function");var n=Vu.call(arguments,2);return function(){return o.apply(r,n.concat(Vu.call(arguments)))}};(function(r,o){var n=pi,a=qn,c=cm,f=Nc,v=Bc,d=Je("socket.io-client:socket"),b=Wn,p=_c;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=a.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()}a(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}})(Ic);var Lc=Ic.exports,lm=zn;function zn(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}zn.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};zn.prototype.reset=function(){this.attempts=0};zn.prototype.setMin=function(r){this.ms=r};zn.prototype.setMax=function(r){this.max=r};zn.prototype.setJitter=function(r){this.jitter=r};var pm=um,dm=Lc,gm=qn,ym=pi,sn=Nc,Fn=Bc,Yt=Je("socket.io-client:manager"),Uc=Rc,vm=lm,Dc=Object.prototype.hasOwnProperty,Zu=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 vm({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||ym;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)Dc.call(this.nsps,r)&&this.nsps[r].emit.apply(this.nsps[r],arguments)};bt.prototype.updateSocketIds=function(){for(var r in this.nsps)Dc.call(this.nsps,r)&&(this.nsps[r].id=this.generateId(r))};bt.prototype.generateId=function(r){return(r==="/"?"":r+"#")+this.engine.id};gm(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(Yt("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;Yt("opening %s",this.uri),this.engine=pm(this.uri,this.opts);var n=this.engine,a=this;this.readyState="opening",this.skipReconnect=!1;var c=sn(n,"open",function(){a.onopen(),r&&r()}),f=sn(n,"error",function(b){if(Yt("connect_error"),a.cleanup(),a.readyState="closed",a.emitAll("connect_error",b),r){var p=new Error("Connection error");p.data=b,r(p)}else a.maybeReconnectOnOpen()});if(this._timeout!==!1){var v=this._timeout;Yt("connect attempt will timeout after %d",v),v===0&&c.destroy();var d=setTimeout(function(){Yt("connect attempt timed out after %d",v),c.destroy(),n.close(),n.emit("error","timeout"),a.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(){Yt("open"),this.cleanup(),this.readyState="open",this.emit("open");var r=this.engine;this.subs.push(sn(r,"data",Fn(this,"ondata"))),this.subs.push(sn(r,"ping",Fn(this,"onping"))),this.subs.push(sn(r,"pong",Fn(this,"onpong"))),this.subs.push(sn(r,"error",Fn(this,"onerror"))),this.subs.push(sn(r,"close",Fn(this,"onclose"))),this.subs.push(sn(this.decoder,"decoded",Fn(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){Yt("error",r),this.emitAll("error",r)};bt.prototype.socket=function(r,o){var n=this.nsps[r];if(!n){n=new dm(this,r,o),this.nsps[r]=n;var a=this;n.on("connecting",c),n.on("connect",function(){n.id=a.generateId(r)}),this.autoConnect&&c()}function c(){~Uc(a.connecting,n)||a.connecting.push(n)}return n};bt.prototype.destroy=function(r){var o=Uc(this.connecting,r);~o&&this.connecting.splice(o,1),!this.connecting.length&&this.close()};bt.prototype.packet=function(r){Yt("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 a=0;a<n.length;a++)o.engine.write(n[a],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(){Yt("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(){Yt("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){Yt("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)Yt("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var o=this.backoff.duration();Yt("will wait %dms before reconnect attempt",o),this.reconnecting=!0;var n=setTimeout(function(){r.skipReconnect||(Yt("attempting reconnect"),r.emitAll("reconnect_attempt",r.backoff.attempts),r.emitAll("reconnecting",r.backoff.attempts),!r.skipReconnect&&r.open(function(a){a?(Yt("reconnect attempt error"),r.reconnecting=!1,r.reconnect(),r.emitAll("reconnect_error",a.data)):(Yt("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=Vv,a=pi,c=Zu,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=a.protocol,o.connect=d,o.Manager=Zu,o.Socket=Lc})(Xo,Xo.exports);var mm=Xo.exports;const _m=Fv(mm);function wm(r){return!!r&&(typeof r=="object"||typeof r=="function")&&typeof r.then=="function"}function bm(r,o){const n=o.map(c=>JSON.stringify(c)).join(" "),a=new Date().toISOString();return JSON.stringify({level:r,time:a,message:n})}function Cm(r){const o=r[0],n=r.slice(1);return{level:o,logs:n}}function Sm(r,o){const n=JSON.parse(r);return o.forEach(a=>delete n[a]),n}const km={reconnection:!0,reconnectionDelay:5e3,reconnectionAttempts:10,upgrade:!1,transports:["websocket"],debug:!1},Ko={logToConsole:!0,overloadGlobalConsole:!1,socketEmitInterval:6e4};let se=console;class Qu{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||Ko.socketEmitInterval,this.logToConsole=n.logToConsole??Ko.logToConsole,this.overloadGlobalConsole=n.overloadGlobalConsole??Ko.overloadGlobalConsole,this.storageId=this.getStorageName(n.namespace),this.queue=[],this.processing=!1,this.emitInProgress=!1,this.logIndex=0,this.init(o)}setupStorageFunctions(o,n,a){this.getItem=o&&typeof o=="function"?this.promisifyStorageFunction(o):this.defaultGetItemFunction,this.setItem=n&&typeof n=="function"?this.promisifyStorageFunction(n):this.defaultSetItemFunction,this.parseLog=a&&typeof a=="function"?a:bm}promisifyStorageFunction(o){const n=o("");return wm(n)?o:async(...a)=>new Promise((c,f)=>{try{const v=o(...a);c(v)}catch(v){f(v)}})}init(o){const{socket:n,url:a,socketOptions:c={}}=o;this._logMethod=se.log.bind(se),this._warnMethod=se.warn.bind(se),this._errorMethod=se.error.bind(se),this._debugMethod=se.debug.bind(se),this.initStorage().then(()=>{if(n)this.socket=n;else if(a)this.socket=this.createConnection(a,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 a={...km,...n};return _m(o,a)}async emitLogs(){if(!this.emitInProgress)try{const o=await this.getItem(this.storageId);if(!o)return;let n=[];this.emitInProgress=!0;const a=JSON.parse(o);let c=Object.keys(a);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",a[d]),n.push(d);const f=await this.getItem(this.storageId);if(!f)return;const v=Sm(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;se=Object.assign(se,{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(o="_LOGGER_"){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:a,logs:c}=Cm(o),f=JSON.parse(n),v=this.formItemKey(a);f[v]=this.parseLog(a,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(se,o),this.processQueue()}warn(...o){const n=["WARN",...o];this.queue.push(n),this.logToConsole&&this._warnMethod.apply(se,o),this.processQueue()}error(...o){const n=["ERROR",...o];this.queue.push(n),this.logToConsole&&this._errorMethod.apply(se,o),this.processQueue()}debug(...o){const n=["DEBUG",...o];this.queue.push(n),this.logToConsole&&this._debugMethod.apply(se,o),this.processQueue()}async defaultGetItemFunction(o){return localStorage.getItem(o)}async defaultSetItemFunction(o,n){try{localStorage.setItem(o,n)}catch(a){this._errorMethod(a)}}formItemKey(o){const n=new Date().toISOString();return this.logIndex++,`${o}-${this.namespace}-${n}-${this.logIndex}`}}class Am{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 Qu({socket:this.io,loggerOptions:this.eventsSdkClass.options.loggerConfig}):this.storageLogger=new Qu({url:this.eventsSdkClass.options.loggerServer,socketOptions:this.eventsSdkClass.options.loggerConnectOptions,loggerOptions:this.eventsSdkClass.options.loggerConfig}))}log(o,n,...a){const c=[n,...a];this.storageLogger?o===jt.INFO?this.storageLogger.log(c):o===jt.ERROR&&this.storageLogger.error(c):o===jt.INFO?console.log(c):o===jt.ERROR&&console.error(c)}}class xm{constructor(o){St(this,"listeners",{[gt.ALL_EXTENSION_STATUS]:[],[gt.ALL_DIALER_STATUS]:[],[gt.ALL_USERS_STATUS]:[],[gt.QUEUE_EVENT]:[],[gt.EXTENSION_EVENT]:[],[gt.DIALER_EVENT]:[],[gt.LOGIN_SUCCESS]:[],[gt.LOGIN_STATUS]:[],[gt.KEEP_ALIVE_RESPONSE]:[],[gt.ONLINE_STATUS_EVENT]:[]});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(a=>a!==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 a={name:o,data:n};this.allListeners.forEach(c=>c(a))}}class Em{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 Av(this));St(this,"socketIoClass",new Uv(this));St(this,"loggerClass",new Am(this));St(this,"eventEmitterClass",new xm(this));St(this,"reconnectOptions");St(this,"retryConnection");this.options={...Ev,...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=xv.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===_n.MAIN&&this.findMainServer(),o===_n.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,a)=>a.Priority>n.Priority?a: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=cc;exports.CallTypeEnum=fc;exports.DialerType=sc;exports.DirectionEnum=lc;exports.DoNotCallMeStatusCodeEnum=hc;exports.EventNameEnum=ac;exports.EventsEnum=gt;exports.ExtensionEventReasonEnum=ic;exports.ExtensionHangupCauseEnum=uc;exports.QueueEventReasonEnum=oc;exports.default=Em;
45
46
  //# sourceMappingURL=voicenter-events-sdk.cjs.js.map