@voicenter-team/events-sdk 0.0.27 → 0.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/voicenter-events-sdk.cjs.js +16 -16
- package/dist/voicenter-events-sdk.cjs.js.map +1 -1
- package/dist/voicenter-events-sdk.d.ts +4 -5
- package/dist/voicenter-events-sdk.es.js +2764 -2755
- package/dist/voicenter-events-sdk.es.js.map +1 -1
- package/dist/voicenter-events-sdk.iife.js +21 -21
- package/dist/voicenter-events-sdk.iife.js.map +1 -1
- package/dist/voicenter-events-sdk.umd.js +21 -21
- package/dist/voicenter-events-sdk.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +2 -0
- package/src/types/events.d.ts +2 -6
- package/vite.config.ts.timestamp-1709657877833-8e67641281433.mjs +0 -49
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var yv=Object.defineProperty;var vv=(r,o,n)=>o in r?yv(r,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[o]=n;var St=(r,o,n)=>(vv(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 mv(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 _v=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 lv=function(i){return i!=null&&(nc(i)||pv(i)||!!i._isBuffer)};function nc(i){return!!i.constructor&&typeof i.constructor.isBuffer=="function"&&i.constructor.isBuffer(i)}function pv(i){return typeof i.readFloatLE=="function"&&typeof i.slice=="function"&&nc(i.slice(0,0))}(function(){var i=hv,o=qu.utf8,n=lv,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=i.bytesToWords(f),b=f.length*8,p=1732584193,w=-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 _=c._ff,A=c._gg,k=c._hh,L=c._ii,u=0;u<d.length;u+=16){var Y=p,J=w,B=g,U=l;p=_(p,w,g,l,d[u+0],7,-680876936),l=_(l,p,w,g,d[u+1],12,-389564586),g=_(g,l,p,w,d[u+2],17,606105819),w=_(w,g,l,p,d[u+3],22,-1044525330),p=_(p,w,g,l,d[u+4],7,-176418897),l=_(l,p,w,g,d[u+5],12,1200080426),g=_(g,l,p,w,d[u+6],17,-1473231341),w=_(w,g,l,p,d[u+7],22,-45705983),p=_(p,w,g,l,d[u+8],7,1770035416),l=_(l,p,w,g,d[u+9],12,-1958414417),g=_(g,l,p,w,d[u+10],17,-42063),w=_(w,g,l,p,d[u+11],22,-1990404162),p=_(p,w,g,l,d[u+12],7,1804603682),l=_(l,p,w,g,d[u+13],12,-40341101),g=_(g,l,p,w,d[u+14],17,-1502002290),w=_(w,g,l,p,d[u+15],22,1236535329),p=A(p,w,g,l,d[u+1],5,-165796510),l=A(l,p,w,g,d[u+6],9,-1069501632),g=A(g,l,p,w,d[u+11],14,643717713),w=A(w,g,l,p,d[u+0],20,-373897302),p=A(p,w,g,l,d[u+5],5,-701558691),l=A(l,p,w,g,d[u+10],9,38016083),g=A(g,l,p,w,d[u+15],14,-660478335),w=A(w,g,l,p,d[u+4],20,-405537848),p=A(p,w,g,l,d[u+9],5,568446438),l=A(l,p,w,g,d[u+14],9,-1019803690),g=A(g,l,p,w,d[u+3],14,-187363961),w=A(w,g,l,p,d[u+8],20,1163531501),p=A(p,w,g,l,d[u+13],5,-1444681467),l=A(l,p,w,g,d[u+2],9,-51403784),g=A(g,l,p,w,d[u+7],14,1735328473),w=A(w,g,l,p,d[u+12],20,-1926607734),p=k(p,w,g,l,d[u+5],4,-378558),l=k(l,p,w,g,d[u+8],11,-2022574463),g=k(g,l,p,w,d[u+11],16,1839030562),w=k(w,g,l,p,d[u+14],23,-35309556),p=k(p,w,g,l,d[u+1],4,-1530992060),l=k(l,p,w,g,d[u+4],11,1272893353),g=k(g,l,p,w,d[u+7],16,-155497632),w=k(w,g,l,p,d[u+10],23,-1094730640),p=k(p,w,g,l,d[u+13],4,681279174),l=k(l,p,w,g,d[u+0],11,-358537222),g=k(g,l,p,w,d[u+3],16,-722521979),w=k(w,g,l,p,d[u+6],23,76029189),p=k(p,w,g,l,d[u+9],4,-640364487),l=k(l,p,w,g,d[u+12],11,-421815835),g=k(g,l,p,w,d[u+15],16,530742520),w=k(w,g,l,p,d[u+2],23,-995338651),p=L(p,w,g,l,d[u+0],6,-198630844),l=L(l,p,w,g,d[u+7],10,1126891415),g=L(g,l,p,w,d[u+14],15,-1416354905),w=L(w,g,l,p,d[u+5],21,-57434055),p=L(p,w,g,l,d[u+12],6,1700485571),l=L(l,p,w,g,d[u+3],10,-1894986606),g=L(g,l,p,w,d[u+10],15,-1051523),w=L(w,g,l,p,d[u+1],21,-2054922799),p=L(p,w,g,l,d[u+8],6,1873313359),l=L(l,p,w,g,d[u+15],10,-30611744),g=L(g,l,p,w,d[u+6],15,-1560198380),w=L(w,g,l,p,d[u+13],21,1309151649),p=L(p,w,g,l,d[u+4],6,-145523070),l=L(l,p,w,g,d[u+11],10,-1120210379),g=L(g,l,p,w,d[u+2],15,718787259),w=L(w,g,l,p,d[u+9],21,-343485551),p=p+Y>>>0,w=w+J>>>0,g=g+B>>>0,l=l+U>>>0}return i.endian([p,w,g,l])};c._ff=function(f,v,d,b,p,w,g){var l=f+(v&d|~v&b)+(p>>>0)+g;return(l<<w|l>>>32-w)+v},c._gg=function(f,v,d,b,p,w,g){var l=f+(v&b|d&~b)+(p>>>0)+g;return(l<<w|l>>>32-w)+v},c._hh=function(f,v,d,b,p,w,g){var l=f+(v^d^b)+(p>>>0)+g;return(l<<w|l>>>32-w)+v},c._ii=function(f,v,d,b,p,w,g){var l=f+(d^(v|~b))+(p>>>0)+g;return(l<<w|l>>>32-w)+v},c._blocksize=16,c._digestsize=16,tc.exports=function(f,v){if(f==null)throw new Error("Illegal argument "+f);var d=i.wordsToBytes(c(f,v));return v&&v.asBytes?d:v&&v.asString?a.bytesToString(d):i.bytesToHex(d)}})();var dv=tc.exports;const gv=fv(dv);var wn=(i=>(i.MAIN="main",i.NEXT="next",i))(wn||{}),Ge=(i=>(i.USER="User",i.TOKEN="Token",i))(Ge||{});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=(i=>(i.INFO="INFO",i.WARN="WARN",i.ERROR="ERROR",i))(jt||{});class yv{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=gv(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(wn.MAIN)),o.Token&&(this.token=o.Token,this.eventsSdkClass.connect(wn.MAIN)),o.RefreshToken&&o.IdentityCodeExpiry&&this.eventsSdkClass.options.loginType===Ge.USER&&(this.eventsSdkClass.options.refreshToken=o.RefreshToken,this.eventsSdkClass.options.tokenExpiry=o.IdentityCodeExpiry,this.handleTokenExpiry()),o.RefreshToken&&o.TokenExpiry&&this.eventsSdkClass.options.loginType===Ge.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===Ge.TOKEN?v=JSON.stringify({identityType:Ge.TOKEN,token:a}):v=JSON.stringify({identityType:Ge.USER,username:c,password:n}):this.eventsSdkClass.options.loginType===Ge.TOKEN?(v=JSON.stringify({token:a}),o=`${o}/${Ge.TOKEN}`):(v=JSON.stringify({email:c,pin:n}),o=`${o}/${Ge.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:{}};/**
|
|
6
|
+
*/var wv=function(r){return r!=null&&(nc(r)||bv(r)||!!r._isBuffer)};function nc(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function bv(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&nc(r.slice(0,0))}(function(){var r=_v,o=qu.utf8,n=wv,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 Cv=tc.exports;const Sv=mv(Cv);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 kv{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=Sv(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
|
-
*/ui.exports;(function(i,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,w="__lodash_placeholder__",g=1,l=2,u=4,_=1,A=2,k=1,L=2,Y=4,J=8,B=16,U=32,T=64,I=128,P=256,R=512,N=30,H="...",K=800,$=16,F=1,lt=2,ut=3,xt=1/0,ct=9007199254740991,Xt=17976931348623157e292,Oe=NaN,ae=4294967295,yr=ae-1,G=ae>>>1,Q=[["ary",I],["bind",k],["bindKey",L],["curry",J],["curryRight",B],["flip",R],["partial",U],["partialRight",T],["rearg",P]],X="[object Arguments]",rt="[object Array]",z="[object AsyncFunction]",et="[object Boolean]",nt="[object Date]",Z="[object DOMException]",at="[object Error]",kt="[object Function]",$t="[object GeneratorFunction]",It="[object Map]",ke="[object Number]",Xn="[object Null]",ue="[object Object]",bn="[object Promise]",$n="[object Proxy]",Vt="[object RegExp]",Zt="[object Set]",Ie="[object String]",Be="[object Symbol]",Gn="[object Undefined]",Pe="[object WeakMap]",Jn="[object WeakSet]",je="[object ArrayBuffer]",Cn="[object DataView]",vi="[object Float32Array]",mi="[object Float64Array]",wi="[object Int8Array]",_i="[object Int16Array]",bi="[object Int32Array]",Ci="[object Uint8Array]",Si="[object Uint8ClampedArray]",ki="[object Uint16Array]",Ai="[object Uint32Array]",Tc=/\b__p \+= '';/g,Rc=/\b(__p \+=) '' \+/g,Oc=/(__e\(.*?\)|\b__t\)) \+\n'';/g,hs=/&(?:amp|lt|gt|quot|#39);/g,ls=/[&<>"']/g,Ic=RegExp(hs.source),Bc=RegExp(ls.source),Nc=/<%-([\s\S]+?)%>/g,Lc=/<%([\s\S]+?)%>/g,ps=/<%=([\s\S]+?)%>/g,Uc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Dc=/^\w*$/,Pc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xi=/[\\^$.*+?()[\]{}|]/g,Fc=RegExp(xi.source),Ei=/^\s+/,Mc=/\s/,qc=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Wc=/\{\n\/\* \[wrapped with (.+)\] \*/,Hc=/,? & /,zc=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Kc=/[()=,{}\[\]\/\s]/,Xc=/\\(\\)?/g,$c=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ds=/\w*$/,Gc=/^[-+]0x[0-9a-f]+$/i,Jc=/^0b[01]+$/i,jc=/^\[object .+?Constructor\]$/,Yc=/^0o[0-7]+$/i,Vc=/^(?:0|[1-9]\d*)$/,Zc=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,vr=/($^)/,Qc=/['\n\r\u2028\u2029\\]/g,mr="\\ud800-\\udfff",tf="\\u0300-\\u036f",ef="\\ufe20-\\ufe2f",nf="\\u20d0-\\u20ff",gs=tf+ef+nf,ys="\\u2700-\\u27bf",vs="a-z\\xdf-\\xf6\\xf8-\\xff",rf="\\xac\\xb1\\xd7\\xf7",of="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",sf="\\u2000-\\u206f",af=" \\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",ws="\\ufe0e\\ufe0f",_s=rf+of+sf+af,Ti="['’]",uf="["+mr+"]",bs="["+_s+"]",wr="["+gs+"]",Cs="\\d+",cf="["+ys+"]",Ss="["+vs+"]",ks="[^"+mr+_s+Cs+ys+vs+ms+"]",Ri="\\ud83c[\\udffb-\\udfff]",ff="(?:"+wr+"|"+Ri+")",As="[^"+mr+"]",Oi="(?:\\ud83c[\\udde6-\\uddff]){2}",Ii="[\\ud800-\\udbff][\\udc00-\\udfff]",Sn="["+ms+"]",xs="\\u200d",Es="(?:"+Ss+"|"+ks+")",hf="(?:"+Sn+"|"+ks+")",Ts="(?:"+Ti+"(?:d|ll|m|re|s|t|ve))?",Rs="(?:"+Ti+"(?:D|LL|M|RE|S|T|VE))?",Os=ff+"?",Is="["+ws+"]?",lf="(?:"+xs+"(?:"+[As,Oi,Ii].join("|")+")"+Is+Os+")*",pf="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",df="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Bs=Is+Os+lf,gf="(?:"+[cf,Oi,Ii].join("|")+")"+Bs,yf="(?:"+[As+wr+"?",wr,Oi,Ii,uf].join("|")+")",vf=RegExp(Ti,"g"),mf=RegExp(wr,"g"),Bi=RegExp(Ri+"(?="+Ri+")|"+yf+Bs,"g"),wf=RegExp([Sn+"?"+Ss+"+"+Ts+"(?="+[bs,Sn,"$"].join("|")+")",hf+"+"+Rs+"(?="+[bs,Sn+Es,"$"].join("|")+")",Sn+"?"+Es+"+"+Ts,Sn+"+"+Rs,df,pf,Cs,gf].join("|"),"g"),_f=RegExp("["+xs+mr+gs+ws+"]"),bf=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Cf=["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"],Sf=-1,Ot={};Ot[vi]=Ot[mi]=Ot[wi]=Ot[_i]=Ot[bi]=Ot[Ci]=Ot[Si]=Ot[ki]=Ot[Ai]=!0,Ot[X]=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[X]=Rt[rt]=Rt[je]=Rt[Cn]=Rt[et]=Rt[nt]=Rt[vi]=Rt[mi]=Rt[wi]=Rt[_i]=Rt[bi]=Rt[It]=Rt[ke]=Rt[ue]=Rt[Vt]=Rt[Zt]=Rt[Ie]=Rt[Be]=Rt[Ci]=Rt[Si]=Rt[ki]=Rt[Ai]=!0,Rt[at]=Rt[kt]=Rt[Pe]=!1;var kf={À:"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"},Af={"&":"&","<":"<",">":">",'"':""","'":"'"},xf={"&":"&","<":"<",">":">",""":'"',"'":"'"},Ef={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Tf=parseFloat,Rf=parseInt,Ns=typeof fr=="object"&&fr&&fr.Object===Object&&fr,Of=typeof self=="object"&&self&&self.Object===Object&&self,zt=Ns||Of||Function("return this")(),Ni=o&&!o.nodeType&&o,fn=Ni&&!0&&i&&!i.nodeType&&i,Ls=fn&&fn.exports===Ni,Li=Ls&&Ns.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 If(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 Bf(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 _r(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 Bt(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 Nf(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 Lf=Fi("length");function Uf(x){return x.split("")}function Df(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?Jf(x,D,O):br(x,zs,O)}function Pf(x,D,O,V){for(var ft=O-1,Ct=x.length;++ft<Ct;)if(V(x[ft],D))return ft;return-1}function zs(x){return x!==x}function Ks(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 Xs(x,D,O,V,ft){return ft(x,function(Ct,Ft,Tt){O=V?(V=!1,Ct):D(O,Ct,Ft,Tt)}),O}function Ff(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 Mf(x,D){return Bt(D,function(O){return[O,x[O]]})}function $s(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 Bt(D,function(O){return x[O]})}function jn(x,D){return x.has(D)}function Gs(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 qf(x,D){for(var O=x.length,V=0;O--;)x[O]===D&&++V;return V}var Wf=Mi(kf),Hf=Mi(Af);function zf(x){return"\\"+Ef[x]}function Kf(x,D){return x==null?n:x[D]}function An(x){return _f.test(x)}function Xf(x){return bf.test(x)}function $f(x){for(var D,O=[];!(D=x.next()).done;)O.push(D.value);return O}function zi(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===w)&&(x[O]=w,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 Gf(x){var D=-1,O=Array(x.size);return x.forEach(function(V){O[++D]=[V,V]}),O}function Jf(x,D,O){for(var V=O-1,ft=x.length;++V<ft;)if(x[V]===D)return V;return-1}function jf(x,D,O){for(var V=O+1;V--;)if(x[V]===D)return V;return V}function xn(x){return An(x)?Vf(x):Lf(x)}function Ae(x){return An(x)?Zf(x):Uf(x)}function Ys(x){for(var D=x.length;D--&&Mc.test(x.charAt(D)););return D}var Yf=Mi(xf);function Vf(x){for(var D=Bi.lastIndex=0;Bi.test(x);)++D;return D}function Zf(x){return x.match(Bi)||[]}function Qf(x){return x.match(wf)||[]}var th=function x(D){D=D==null?zt:En.defaults(zt.Object(),D,En.pick(zt,Cf));var O=D.Array,V=D.Date,ft=D.Error,Ct=D.Function,Ft=D.Math,Tt=D.Object,Ki=D.RegExp,eh=D.String,ve=D.TypeError,Sr=O.prototype,nh=Ct.prototype,Tn=Tt.prototype,kr=D["__core-js_shared__"],Ar=nh.toString,Et=Tn.hasOwnProperty,rh=0,Vs=function(){var t=/[^.]+$/.exec(kr&&kr.keys&&kr.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),xr=Tn.toString,ih=Ar.call(Tt),oh=zt._,sh=Ki("^"+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{}}(),ah=D.clearTimeout!==zt.clearTimeout&&D.clearTimeout,uh=V&&V.now!==zt.Date.now&&V.now,ch=D.setTimeout!==zt.setTimeout&&D.setTimeout,Br=Ft.ceil,Nr=Ft.floor,Xi=Tt.getOwnPropertySymbols,fh=Er?Er.isBuffer:n,na=D.isFinite,hh=Sr.join,lh=js(Tt.keys,Tt),Mt=Ft.max,Gt=Ft.min,ph=V.now,dh=D.parseInt,ra=Ft.random,gh=Sr.reverse,$i=yn(D,"DataView"),Vn=yn(D,"Map"),Gi=yn(D,"Promise"),Rn=yn(D,"Set"),Zn=yn(D,"WeakMap"),Qn=yn(Tt,"create"),Lr=Zn&&new Zn,On={},yh=vn($i),vh=vn(Vn),mh=vn(Gi),wh=vn(Rn),_h=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(!Nt(e))return{};if(Qs)return Qs(e);t.prototype=e;var r=new t;return t.prototype=n,r}}();function Dr(){}function me(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=n}y.templateSettings={escape:Nc,evaluate:Lc,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 bh(){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 Ch(){if(this.__filtered__){var t=new mt(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function Sh(){var t=this.__wrapped__.value(),e=this.__dir__,r=ht(t),s=e<0,h=r?t.length:0,m=Ul(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=Gt(E,this.__takeCount__);if(!r||!s&&h==E&&tt==E)return Ta(t,this.__actions__);var ot=[];t:for(;E--&&j<tt;){M+=e;for(var gt=-1,st=t[M];++gt<W;){var vt=q[gt],wt=vt.iteratee,pe=vt.type,ee=wt(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,r=t==null?0:t.length;for(this.clear();++e<r;){var s=t[e];this.set(s[0],s[1])}}function kh(){this.__data__=Qn?Qn(null):{},this.size=0}function Ah(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function xh(t){var e=this.__data__;if(Qn){var r=e[t];return r===b?n:r}return Et.call(e,t)?e[t]:n}function Eh(t){var e=this.__data__;return Qn?e[t]!==n:Et.call(e,t)}function Th(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Qn&&e===n?b:e,this}ln.prototype.clear=kh,ln.prototype.delete=Ah,ln.prototype.get=xh,ln.prototype.has=Eh,ln.prototype.set=Th;function Fe(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var s=t[e];this.set(s[0],s[1])}}function Rh(){this.__data__=[],this.size=0}function Oh(t){var e=this.__data__,r=Pr(e,t);if(r<0)return!1;var s=e.length-1;return r==s?e.pop():Or.call(e,r,1),--this.size,!0}function Ih(t){var e=this.__data__,r=Pr(e,t);return r<0?n:e[r][1]}function Bh(t){return Pr(this.__data__,t)>-1}function Nh(t,e){var r=this.__data__,s=Pr(r,t);return s<0?(++this.size,r.push([t,e])):r[s][1]=e,this}Fe.prototype.clear=Rh,Fe.prototype.delete=Oh,Fe.prototype.get=Ih,Fe.prototype.has=Bh,Fe.prototype.set=Nh;function Me(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var s=t[e];this.set(s[0],s[1])}}function Lh(){this.size=0,this.__data__={hash:new ln,map:new(Vn||Fe),string:new ln}}function Uh(t){var e=jr(this,t).delete(t);return this.size-=e?1:0,e}function Dh(t){return jr(this,t).get(t)}function Ph(t){return jr(this,t).has(t)}function Fh(t,e){var r=jr(this,t),s=r.size;return r.set(t,e),this.size+=r.size==s?0:1,this}Me.prototype.clear=Lh,Me.prototype.delete=Uh,Me.prototype.get=Dh,Me.prototype.has=Ph,Me.prototype.set=Fh;function pn(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new Me;++e<r;)this.add(t[e])}function Mh(t){return this.__data__.set(t,b),this}function qh(t){return this.__data__.has(t)}pn.prototype.add=pn.prototype.push=Mh,pn.prototype.has=qh;function xe(t){var e=this.__data__=new Fe(t);this.size=e.size}function Wh(){this.__data__=new Fe,this.size=0}function Hh(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function zh(t){return this.__data__.get(t)}function Kh(t){return this.__data__.has(t)}function Xh(t,e){var r=this.__data__;if(r instanceof Fe){var s=r.__data__;if(!Vn||s.length<c-1)return s.push([t,e]),this.size=++r.size,this;r=this.__data__=new Me(s)}return r.set(t,e),this.size=r.size,this}xe.prototype.clear=Wh,xe.prototype.delete=Hh,xe.prototype.get=zh,xe.prototype.has=Kh,xe.prototype.set=Xh;function oa(t,e){var r=ht(t),s=!r&&mn(t),h=!r&&!s&&on(t),m=!r&&!s&&!h&&Un(t),C=r||s||h||m,S=C?Wi(t.length,eh):[],E=S.length;for(var M in t)(e||Et.call(t,M))&&!(C&&(M=="length"||h&&(M=="offset"||M=="parent")||m&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||ze(M,E)))&&S.push(M);return S}function sa(t){var e=t.length;return e?t[io(0,e-1)]:n}function $h(t,e){return Yr(ne(t),dn(e,0,t.length))}function Gh(t){return Yr(ne(t))}function Ji(t,e,r){(r!==n&&!Ee(t[e],r)||r===n&&!(e in t))&&qe(t,e,r)}function er(t,e,r){var s=t[e];(!(Et.call(t,e)&&Ee(s,r))||r===n&&!(e in t))&&qe(t,e,r)}function Pr(t,e){for(var r=t.length;r--;)if(Ee(t[r][0],e))return r;return-1}function Jh(t,e,r,s){return tn(t,function(h,m,C){e(s,h,r(h),C)}),s}function aa(t,e){return t&&Le(e,Wt(e),t)}function jh(t,e){return t&&Le(e,ie(e),t)}function qe(t,e,r){e=="__proto__"&&Ir?Ir(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function ji(t,e){for(var r=-1,s=e.length,h=O(s),m=t==null;++r<s;)h[r]=m?n:Oo(t,e[r]);return h}function dn(t,e,r){return t===t&&(r!==n&&(t=t<=r?t:r),e!==n&&(t=t>=e?t:e)),t}function we(t,e,r,s,h,m){var C,S=e&g,E=e&l,M=e&u;if(r&&(C=h?r(t,s,h,m):r(t)),C!==n)return C;if(!Nt(t))return t;var q=ht(t);if(q){if(C=Pl(t),!S)return ne(t,C)}else{var W=Jt(t),j=W==kt||W==$t;if(on(t))return Ia(t,S);if(W==ue||W==X||j&&!h){if(C=E||j?{}:Ya(t),!S)return E?xl(t,jh(C,t)):Al(t,aa(C,t))}else{if(!Rt[W])return h?t:{};C=Fl(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(we(st,e,r,st,t,m))}):Su(t)&&t.forEach(function(st,vt){C.set(vt,we(st,e,r,vt,t,m))});var ot=M?E?yo:go:E?ie:Wt,gt=q?n:ot(t);return ye(gt||t,function(st,vt){gt&&(vt=st,st=t[vt]),er(C,vt,we(st,e,r,vt,t,m))}),C}function Yh(t){var e=Wt(t);return function(r){return ua(r,t,e)}}function ua(t,e,r){var s=r.length;if(t==null)return!s;for(t=Tt(t);s--;){var h=r[s],m=e[h],C=t[h];if(C===n&&!(h in t)||!m(C))return!1}return!0}function ca(t,e,r){if(typeof t!="function")throw new ve(v);return ur(function(){t.apply(n,r)},e)}function nr(t,e,r,s){var h=-1,m=_r,C=!0,S=t.length,E=[],M=e.length;if(!S)return E;r&&(e=Bt(e,fe(r))),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=r==null?q:r(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(Ne),fa=Da(Vi,!0);function Vh(t,e){var r=!0;return tn(t,function(s,h,m){return r=!!e(s,h,m),r}),r}function Fr(t,e,r){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):r(C,S)))var S=C,E=m}return E}function Zh(t,e,r,s){var h=t.length;for(r=dt(r),r<0&&(r=-r>h?0:h+r),s=s===n||s>h?h:dt(s),s<0&&(s+=h),s=r>s?0:Eu(s);r<s;)t[r++]=e;return t}function ha(t,e){var r=[];return tn(t,function(s,h,m){e(s,h,m)&&r.push(s)}),r}function Kt(t,e,r,s,h){var m=-1,C=t.length;for(r||(r=ql),h||(h=[]);++m<C;){var S=t[m];e>0&&r(S)?e>1?Kt(S,e-1,r,s,h):Ve(h,S):s||(h[h.length]=S)}return h}var Yi=Pa(),la=Pa(!0);function Ne(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(r){return Ke(t[r])})}function gn(t,e){e=nn(e,t);for(var r=0,s=e.length;t!=null&&r<s;)t=t[Ue(e[r++])];return r&&r==s?t:n}function pa(t,e,r){var s=e(t);return ht(t)?s:Ve(s,r(t))}function Qt(t){return t==null?t===n?Gn:Xn:hn&&hn in Tt(t)?Ll(t):Gl(t)}function Zi(t,e){return t>e}function Qh(t,e){return t!=null&&Et.call(t,e)}function tl(t,e){return t!=null&&e in Tt(t)}function el(t,e,r){return t>=Gt(e,r)&&t<Mt(e,r)}function Qi(t,e,r){for(var s=r?Ui:_r,h=t[0].length,m=t.length,C=m,S=O(m),E=1/0,M=[];C--;){var q=t[C];C&&e&&(q=Bt(q,fe(e))),E=Gt(q.length,E),S[C]=!r&&(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=r||tt!==0?tt:0,!(j?jn(j,ot):s(M,ot,r))){for(C=m;--C;){var gt=S[C];if(!(gt?jn(gt,ot):s(t[C],ot,r)))continue t}j&&j.push(ot),M.push(tt)}}return M}function nl(t,e,r,s){return Ne(t,function(h,m,C){e(s,r(h),m,C)}),s}function rr(t,e,r){e=nn(e,t),t=tu(t,e);var s=t==null?t:t[Ue(be(e))];return s==null?n:ce(s,t,r)}function da(t){return Lt(t)&&Qt(t)==X}function rl(t){return Lt(t)&&Qt(t)==je}function il(t){return Lt(t)&&Qt(t)==nt}function ir(t,e,r,s,h){return t===e?!0:t==null||e==null||!Lt(t)&&!Lt(e)?t!==t&&e!==e:ol(t,e,r,s,ir,h)}function ol(t,e,r,s,h,m){var C=ht(t),S=ht(e),E=C?rt:Jt(t),M=S?rt:Jt(e);E=E==X?ue:E,M=M==X?ue:M;var q=E==ue,W=M==ue,j=E==M;if(j&&on(t)){if(!on(e))return!1;C=!0,q=!1}if(j&&!q)return m||(m=new xe),C||Un(t)?Ga(t,e,r,s,h,m):Bl(t,e,E,r,s,h,m);if(!(r&_)){var tt=q&&Et.call(t,"__wrapped__"),ot=W&&Et.call(e,"__wrapped__");if(tt||ot){var gt=tt?t.value():t,st=ot?e.value():e;return m||(m=new xe),h(gt,st,r,s,m)}}return j?(m||(m=new xe),Nl(t,e,r,s,h,m)):!1}function sl(t){return Lt(t)&&Jt(t)==It}function to(t,e,r,s){var h=r.length,m=h,C=!s;if(t==null)return!m;for(t=Tt(t);h--;){var S=r[h];if(C&&S[2]?S[1]!==t[S[0]]:!(S[0]in t))return!1}for(;++h<m;){S=r[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,_|A,s,W):j))return!1}}return!0}function ga(t){if(!Nt(t)||Hl(t))return!1;var e=Ke(t)?sh:jc;return e.test(vn(t))}function al(t){return Lt(t)&&Qt(t)==Vt}function ul(t){return Lt(t)&&Jt(t)==Zt}function cl(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)?wa(t[0],t[1]):ma(t):Fu(t)}function eo(t){if(!ar(t))return lh(t);var e=[];for(var r in Tt(t))Et.call(t,r)&&r!="constructor"&&e.push(r);return e}function fl(t){if(!Nt(t))return $l(t);var e=ar(t),r=[];for(var s in t)s=="constructor"&&(e||!Et.call(t,s))||r.push(s);return r}function no(t,e){return t<e}function va(t,e){var r=-1,s=re(t)?O(t.length):[];return tn(t,function(h,m,C){s[++r]=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(r){return r===t||to(r,t,e)}}function wa(t,e){return _o(t)&&Va(e)?Za(Ue(t),e):function(r){var s=Oo(r,t);return s===n&&s===e?Io(r,t):ir(e,s,_|A)}}function qr(t,e,r,s,h){t!==e&&Yi(e,function(m,C){if(h||(h=new xe),Nt(m))hl(t,e,C,r,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 hl(t,e,r,s,h,m,C){var S=Co(t,r),E=Co(e,r),M=C.get(E);if(M){Ji(t,r,M);return}var q=m?m(S,E,r+"",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=Ba(E,!0)):q=[]:cr(E)||mn(E)?(q=S,mn(S)?q=Tu(S):(!Nt(S)||Ke(S))&&(q=Ya(E))):W=!1}W&&(C.set(E,q),h(q,E,s,m,C),C.delete(E)),Ji(t,r,q)}function _a(t,e){var r=t.length;if(r)return e+=e<0?r:0,ze(e,r)?t[e]:n}function ba(t,e,r){e.length?e=Bt(e,function(m){return ht(m)?function(C){return gn(C,m.length===1?m[0]:m)}:m}):e=[oe];var s=-1;e=Bt(e,fe(it()));var h=va(t,function(m,C,S){var E=Bt(e,function(M){return M(m)});return{criteria:E,index:++s,value:m}});return Ff(h,function(m,C){return kl(m,C,r)})}function ll(t,e){return Ca(t,e,function(r,s){return Io(t,s)})}function Ca(t,e,r){for(var s=-1,h=e.length,m={};++s<h;){var C=e[s],S=gn(t,C);r(S,C)&&or(m,nn(C,t),S)}return m}function pl(t){return function(e){return gn(e,t)}}function ro(t,e,r,s){var h=s?Pf:kn,m=-1,C=e.length,S=t;for(t===e&&(e=ne(e)),r&&(S=Bt(t,fe(r)));++m<C;)for(var E=0,M=e[m],q=r?r(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 r=t?e.length:0,s=r-1;r--;){var h=e[r];if(r==s||h!==m){var m=h;ze(h)?Or.call(t,h,1):ao(t,h)}}return t}function io(t,e){return t+Nr(ra()*(e-t+1))}function dl(t,e,r,s){for(var h=-1,m=Mt(Br((e-t)/(r||1)),0),C=O(m);m--;)C[s?m:++h]=t,t+=r;return C}function oo(t,e){var r="";if(!t||e<1||e>ct)return r;do e%2&&(r+=t),e=Nr(e/2),e&&(t+=t);while(e);return r}function yt(t,e){return So(Qa(t,e,oe),t+"")}function gl(t){return sa(Dn(t))}function yl(t,e){var r=Dn(t);return Yr(r,dn(e,0,r.length))}function or(t,e,r,s){if(!Nt(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=r;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=Nt(q)?q:ze(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,vl=Ir?function(t,e){return Ir(t,"toString",{configurable:!0,enumerable:!1,value:No(e),writable:!0})}:oe;function ml(t){return Yr(Dn(t))}function _e(t,e,r){var s=-1,h=t.length;e<0&&(e=-e>h?0:h+e),r=r>h?h:r,r<0&&(r+=h),h=e>r?0:r-e>>>0,e>>>=0;for(var m=O(h);++s<h;)m[s]=t[s+e];return m}function wl(t,e){var r;return tn(t,function(s,h,m){return r=e(s,h,m),!r}),!!r}function Wr(t,e,r){var s=0,h=t==null?s:t.length;if(typeof e=="number"&&e===e&&h<=G){for(;s<h;){var m=s+h>>>1,C=t[m];C!==null&&!le(C)&&(r?C<=e:C<e)?s=m+1:h=m}return h}return so(t,e,oe,r)}function so(t,e,r,s){var h=0,m=t==null?0:t.length;if(m===0)return 0;e=r(e);for(var C=e!==e,S=e===null,E=le(e),M=e===n;h<m;){var q=Nr((h+m)/2),W=r(t[q]),j=W!==n,tt=W===null,ot=W===W,gt=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||!gt):tt||gt?st=!1:st=s?W<=e:W<e;st?h=q+1:m=q}return Gt(m,yr)}function Aa(t,e){for(var r=-1,s=t.length,h=0,m=[];++r<s;){var C=t[r],S=e?e(C):C;if(!r||!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 Bt(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,r){var s=-1,h=_r,m=t.length,C=!0,S=[],E=S;if(r)C=!1,h=Ui;else if(m>=c){var M=e?null:Ol(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=r||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,r)||(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,r,s){return or(t,e,r(gn(t,e)),s)}function Hr(t,e,r,s){for(var h=t.length,m=s?h:-1;(s?m--:++m<h)&&e(t[m],m,t););return r?_e(t,s?0:m,s?m+1:h):_e(t,s?m+1:0,s?h:m)}function Ta(t,e){var r=t;return r instanceof mt&&(r=r.value()),Di(e,function(s,h){return h.func.apply(h.thisArg,Ve([s],h.args))},r)}function uo(t,e,r){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,r));return en(Kt(m,1),e,r)}function Ra(t,e,r){for(var s=-1,h=t.length,m=e.length,C={};++s<h;){var S=s<m?e[s]:n;r(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:_o(t,e)?[t]:iu(At(t))}var _l=yt;function rn(t,e,r){var s=t.length;return r=r===n?s:r,!e&&r>=s?t:_e(t,e,r)}var Oa=ah||function(t){return zt.clearTimeout(t)};function Ia(t,e){if(e)return t.slice();var r=t.length,s=Zs?Zs(r):new t.constructor(r);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 bl(t,e){var r=e?ho(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}function Cl(t){var e=new t.constructor(t.source,ds.exec(t));return e.lastIndex=t.lastIndex,e}function Sl(t){return tr?Tt(tr.call(t)):{}}function Ba(t,e){var r=e?ho(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function Na(t,e){if(t!==e){var r=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||!r&&E||!h)return 1;if(!s&&!m&&!M&&t<e||M&&r&&h&&!s&&!m||S&&r&&h||!C&&h||!E)return-1}return 0}function kl(t,e,r){for(var s=-1,h=t.criteria,m=e.criteria,C=h.length,S=r.length;++s<C;){var E=Na(h[s],m[s]);if(E){if(s>=S)return E;var M=r[s];return E*(M=="desc"?-1:1)}}return t.index-e.index}function La(t,e,r,s){for(var h=-1,m=t.length,C=r.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[r[h]]=t[h]);for(;M--;)q[S++]=t[h++];return q}function Ua(t,e,r,s){for(var h=-1,m=t.length,C=-1,S=r.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+r[C]]=t[h++]);return W}function ne(t,e){var r=-1,s=t.length;for(e||(e=O(s));++r<s;)e[r]=t[r];return e}function Le(t,e,r,s){var h=!r;r||(r={});for(var m=-1,C=e.length;++m<C;){var S=e[m],E=s?s(r[S],t[S],S,r,t):n;E===n&&(E=t[S]),h?qe(r,S,E):er(r,S,E)}return r}function Al(t,e){return Le(t,wo(t),e)}function xl(t,e){return Le(t,Ja(t),e)}function zr(t,e){return function(r,s){var h=ht(r)?If:Jh,m=e?e():{};return h(r,t,it(s,2),m)}}function Bn(t){return yt(function(e,r){var s=-1,h=r.length,m=h>1?r[h-1]:n,C=h>2?r[2]:n;for(m=t.length>3&&typeof m=="function"?(h--,m):n,C&&te(r[0],r[1],C)&&(m=h<3?n:m,h=1),e=Tt(e);++s<h;){var S=r[s];S&&t(e,S,s,m)}return e})}function Da(t,e){return function(r,s){if(r==null)return r;if(!re(r))return t(r,s);for(var h=r.length,m=e?h:-1,C=Tt(r);(e?m--:++m<h)&&s(C[m],m,C)!==!1;);return r}}function Pa(t){return function(e,r,s){for(var h=-1,m=Tt(e),C=s(e),S=C.length;S--;){var E=C[t?S:++h];if(r(m[E],E,m)===!1)break}return e}}function El(t,e,r){var s=e&k,h=sr(t);function m(){var C=this&&this!==zt&&this instanceof m?h:t;return C.apply(s?r:this,arguments)}return m}function Fa(t){return function(e){e=At(e);var r=An(e)?Ae(e):n,s=r?r[0]:e.charAt(0),h=r?rn(r,1).join(""):e.slice(1);return s[t]()+h}}function Nn(t){return function(e){return Di(Du(Uu(e).replace(vf,"")),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 r=In(t.prototype),s=t.apply(r,e);return Nt(s)?s:r}}function Tl(t,e,r){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<r)return za(t,e,Kr,h.placeholder,n,C,M,n,n,r-m);var q=this&&this!==zt&&this instanceof h?s:t;return ce(q,this,C)}return h}function Ma(t){return function(e,r,s){var h=Tt(e);if(!re(e)){var m=it(r,3);e=Wt(e),r=function(S){return m(h[S],S,h)}}var C=t(e,r,s);return C>-1?h[m?e[C]:C]:n}}function qa(t){return He(function(e){var r=e.length,s=r,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:r;++s<r;){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=r?e[W].apply(this,M):q;++W<r;)j=e[W].call(this,j);return j}})}function Kr(t,e,r,s,h,m,C,S,E,M){var q=e&I,W=e&k,j=e&L,tt=e&(J|B),ot=e&R,gt=j?n:sr(t);function st(){for(var vt=arguments.length,wt=O(vt),pe=vt;pe--;)wt[pe]=arguments[pe];if(tt)var ee=Ln(st),de=qf(wt,ee);if(s&&(wt=La(wt,s,h,tt)),m&&(wt=Ua(wt,m,C,tt)),vt-=de,tt&&vt<M){var Dt=Ze(wt,ee);return za(t,e,Kr,st.placeholder,r,wt,Dt,S,E,M-vt)}var Te=W?r:this,$e=j?Te[t]:t;return vt=wt.length,S?wt=Jl(wt,S):ot&&vt>1&&wt.reverse(),q&&E<vt&&(wt.length=E),this&&this!==zt&&this instanceof st&&($e=gt||sr($e)),$e.apply(Te,wt)}return st}function Wa(t,e){return function(r,s){return nl(r,t,e(s),{})}}function Xr(t,e){return function(r,s){var h;if(r===n&&s===n)return e;if(r!==n&&(h=r),s!==n){if(h===n)return s;typeof r=="string"||typeof s=="string"?(r=he(r),s=he(s)):(r=xa(r),s=xa(s)),h=t(r,s)}return h}}function lo(t){return He(function(e){return e=Bt(e,fe(it())),yt(function(r){var s=this;return t(e,function(h){return ce(h,s,r)})})})}function $r(t,e){e=e===n?" ":he(e);var r=e.length;if(r<2)return r?oo(e,t):e;var s=oo(e,Br(t/xn(e)));return An(e)?rn(Ae(s),0,t).join(""):s.slice(0,t)}function Rl(t,e,r,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!==zt&&this instanceof C?m:t;++M<q;)W[M]=s[M];for(;E--;)W[M++]=arguments[++S];return ce(j,h?r:this,W)}return C}function Ha(t){return function(e,r,s){return s&&typeof s!="number"&&te(e,r,s)&&(r=s=n),e=Xe(e),r===n?(r=e,e=0):r=Xe(r),s=s===n?e<r?1:-1:Xe(s),dl(e,r,s,t)}}function Gr(t){return function(e,r){return typeof e=="string"&&typeof r=="string"||(e=Ce(e),r=Ce(r)),t(e,r)}}function za(t,e,r,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 gt=[t,e,h,tt,W,ot,j,S,E,M],st=r.apply(n,gt);return bo(t)&&eu(st,gt),st.placeholder=s,nu(st,t,e)}function po(t){var e=Ft[t];return function(r,s){if(r=Ce(r),s=s==null?0:Gt(dt(s),292),s&&na(r)){var h=(At(r)+"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(r)}}var Ol=Rn&&1/Cr(new Rn([,-0]))[1]==xt?function(t){return new Rn(t)}:Do;function Ka(t){return function(e){var r=Jt(e);return r==It?zi(e):r==Zt?Gf(e):Mf(e,t(e))}}function We(t,e,r,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(dt(C),0),S=S===n?S:dt(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,r,s,h,q,W,m,C,S];if(j&&Xl(tt,j),t=tt[0],e=tt[1],r=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|B)&&(e&=~(J|B)),!e||e==k)var ot=El(t,e,r);else e==J||e==B?ot=Tl(t,e,S):(e==U||e==(k|U))&&!h.length?ot=Rl(t,e,r,s):ot=Kr.apply(n,tt);var gt=j?ka:eu;return nu(gt(ot,tt),t,e)}function Xa(t,e,r,s){return t===n||Ee(t,Tn[r])&&!Et.call(s,r)?e:t}function $a(t,e,r,s,h,m){return Nt(t)&&Nt(e)&&(m.set(e,t),qr(t,e,n,$a,m),m.delete(e)),t}function Il(t){return cr(t)?n:t}function Ga(t,e,r,s,h,m){var C=r&_,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=r&A?new pn:n;for(m.set(t,e),m.set(e,t);++W<S;){var ot=t[W],gt=e[W];if(s)var st=C?s(gt,ot,W,e,t,m):s(ot,gt,W,t,e,m);if(st!==n){if(st)continue;j=!1;break}if(tt){if(!Pi(e,function(vt,wt){if(!jn(tt,wt)&&(ot===vt||h(ot,vt,r,s,m)))return tt.push(wt)})){j=!1;break}}else if(!(ot===gt||h(ot,gt,r,s,m))){j=!1;break}}return m.delete(t),m.delete(e),j}function Bl(t,e,r,s,h,m,C){switch(r){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=zi;case Zt:var E=s&_;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=Ga(S(t),S(e),s,h,m,C);return C.delete(t),q;case Be:if(tr)return tr.call(t)==tr.call(e)}return!1}function Nl(t,e,r,s,h,m){var C=r&_,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 gt=!0;m.set(t,e),m.set(e,t);for(var st=C;++W<E;){j=S[W];var vt=t[j],wt=e[j];if(s)var pe=C?s(wt,vt,j,e,t,m):s(vt,wt,j,t,e,m);if(!(pe===n?vt===wt||h(vt,wt,r,s,m):pe)){gt=!1;break}st||(st=j=="constructor")}if(gt&&!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)&&(gt=!1)}return m.delete(t),m.delete(e),gt}function He(t){return So(Qa(t,n,uu),t+"")}function go(t){return pa(t,Wt,wo)}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+"",r=On[e],s=Et.call(On,e)?r.length:0;s--;){var h=r[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 r=t.__data__;return Wl(e)?r[typeof e=="string"?"string":"hash"]:r.map}function mo(t){for(var e=Wt(t),r=e.length;r--;){var s=e[r],h=t[s];e[r]=[s,h,Va(h)]}return e}function yn(t,e){var r=Kf(t,e);return ga(r)?r:n}function Ll(t){var e=Et.call(t,hn),r=t[hn];try{t[hn]=n;var s=!0}catch{}var h=xr.call(t);return s&&(e?t[hn]=r:delete t[hn]),h}var wo=Xi?function(t){return t==null?[]:(t=Tt(t),Ye(Xi(t),function(e){return ta.call(t,e)}))}:Po,Ja=Xi?function(t){for(var e=[];t;)Ve(e,wo(t)),t=Rr(t);return e}:Po,Jt=Qt;($i&&Jt(new $i(new ArrayBuffer(1)))!=Cn||Vn&&Jt(new Vn)!=It||Gi&&Jt(Gi.resolve())!=bn||Rn&&Jt(new Rn)!=Zt||Zn&&Jt(new Zn)!=Pe)&&(Jt=function(t){var e=Qt(t),r=e==ue?t.constructor:n,s=r?vn(r):"";if(s)switch(s){case yh:return Cn;case vh:return It;case mh:return bn;case wh:return Zt;case _h:return Pe}return e});function Ul(t,e,r){for(var s=-1,h=r.length;++s<h;){var m=r[s],C=m.size;switch(m.type){case"drop":t+=C;break;case"dropRight":e-=C;break;case"take":e=Gt(e,t+C);break;case"takeRight":t=Mt(t,e-C);break}}return{start:t,end:e}}function Dl(t){var e=t.match(Wc);return e?e[1].split(Hc):[]}function ja(t,e,r){e=nn(e,t);for(var s=-1,h=e.length,m=!1;++s<h;){var C=Ue(e[s]);if(!(m=t!=null&&r(t,C)))break;t=t[C]}return m||++s!=h?m:(h=t==null?0:t.length,!!h&&ni(h)&&ze(C,h)&&(ht(t)||mn(t)))}function Pl(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&Et.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function Ya(t){return typeof t.constructor=="function"&&!ar(t)?In(Rr(t)):{}}function Fl(t,e,r){var s=t.constructor;switch(e){case je:return ho(t);case et:case nt:return new s(+t);case Cn:return bl(t,r);case vi:case mi:case wi:case _i:case bi:case Ci:case Si:case ki:case Ai:return Ba(t,r);case It:return new s;case ke:case Ie:return new s(t);case Vt:return Cl(t);case Zt:return new s;case Be:return Sl(t)}}function Ml(t,e){var r=e.length;if(!r)return t;var s=r-1;return e[s]=(r>1?"& ":"")+e[s],e=e.join(r>2?", ":" "),t.replace(qc,`{
|
|
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,G=16,F=1,pt=2,ut=3,xt=1/0,ct=9007199254740991,Xt=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]],X="[object Arguments]",rt="[object Array]",K="[object AsyncFunction]",et="[object Boolean]",nt="[object Date]",Z="[object DOMException]",at="[object Error]",kt="[object Function]",Gt="[object GeneratorFunction]",It="[object Map]",ke="[object Number]",Xn="[object Null]",ue="[object Object]",bn="[object Promise]",Gn="[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]",Dc=/\b__p \+= '';/g,Pc=/\b(__p \+=) '' \+/g,Fc=/(__e\(.*?\)|\b__t\)) \+\n'';/g,hs=/&(?:amp|lt|gt|quot|#39);/g,ls=/[&<>"']/g,Mc=RegExp(hs.source),qc=RegExp(ls.source),Wc=/<%-([\s\S]+?)%>/g,Hc=/<%([\s\S]+?)%>/g,ps=/<%=([\s\S]+?)%>/g,Kc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,zc=/^\w*$/,Xc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xi=/[\\^$.*+?()[\]{}|]/g,Gc=RegExp(xi.source),Ei=/^\s+/,$c=/\s/,Jc=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,jc=/\{\n\/\* \[wrapped with (.+)\] \*/,Yc=/,? & /,Vc=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Zc=/[()=,{}\[\]\/\s]/,Qc=/\\(\\)?/g,tf=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ds=/\w*$/,ef=/^[-+]0x[0-9a-f]+$/i,nf=/^0b[01]+$/i,rf=/^\[object .+?Constructor\]$/,of=/^0o[0-7]+$/i,sf=/^(?:0|[1-9]\d*)$/,af=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,vr=/($^)/,uf=/['\n\r\u2028\u2029\\]/g,mr="\\ud800-\\udfff",cf="\\u0300-\\u036f",ff="\\ufe20-\\ufe2f",hf="\\u20d0-\\u20ff",gs=cf+ff+hf,ys="\\u2700-\\u27bf",vs="a-z\\xdf-\\xf6\\xf8-\\xff",lf="\\xac\\xb1\\xd7\\xf7",pf="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",df="\\u2000-\\u206f",gf=" \\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=lf+pf+df+gf,Ti="['’]",yf="["+mr+"]",bs="["+ws+"]",_r="["+gs+"]",Cs="\\d+",vf="["+ys+"]",Ss="["+vs+"]",ks="[^"+mr+ws+Cs+ys+vs+ms+"]",Ri="\\ud83c[\\udffb-\\udfff]",mf="(?:"+_r+"|"+Ri+")",As="[^"+mr+"]",Oi="(?:\\ud83c[\\udde6-\\uddff]){2}",Ii="[\\ud800-\\udbff][\\udc00-\\udfff]",Sn="["+ms+"]",xs="\\u200d",Es="(?:"+Ss+"|"+ks+")",_f="(?:"+Sn+"|"+ks+")",Ts="(?:"+Ti+"(?:d|ll|m|re|s|t|ve))?",Rs="(?:"+Ti+"(?:D|LL|M|RE|S|T|VE))?",Os=mf+"?",Is="["+_s+"]?",wf="(?:"+xs+"(?:"+[As,Oi,Ii].join("|")+")"+Is+Os+")*",bf="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Cf="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ns=Is+Os+wf,Sf="(?:"+[vf,Oi,Ii].join("|")+")"+Ns,kf="(?:"+[As+_r+"?",_r,Oi,Ii,yf].join("|")+")",Af=RegExp(Ti,"g"),xf=RegExp(_r,"g"),Ni=RegExp(Ri+"(?="+Ri+")|"+kf+Ns,"g"),Ef=RegExp([Sn+"?"+Ss+"+"+Ts+"(?="+[bs,Sn,"$"].join("|")+")",_f+"+"+Rs+"(?="+[bs,Sn+Es,"$"].join("|")+")",Sn+"?"+Es+"+"+Ts,Sn+"+"+Rs,Cf,bf,Cs,Sf].join("|"),"g"),Tf=RegExp("["+xs+mr+gs+_s+"]"),Rf=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Of=["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"],If=-1,Ot={};Ot[vi]=Ot[mi]=Ot[_i]=Ot[wi]=Ot[bi]=Ot[Ci]=Ot[Si]=Ot[ki]=Ot[Ai]=!0,Ot[X]=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[X]=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 Nf={À:"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"},Bf={"&":"&","<":"<",">":">",'"':""","'":"'"},Lf={"&":"&","<":"<",">":">",""":'"',"'":"'"},Uf={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Df=parseFloat,Pf=parseInt,Bs=typeof fr=="object"&&fr&&fr.Object===Object&&fr,Ff=typeof self=="object"&&self&&self.Object===Object&&self,Kt=Bs||Ff||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 Mf(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 qf(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 Wf(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 Hf=Fi("length");function Kf(x){return x.split("")}function zf(x){return x.match(Vc)||[]}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?nh(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 Xs(x,D,O,V,ft){return ft(x,function(Ct,Ft,Tt){O=V?(V=!1,Ct):D(O,Ct,Ft,Tt)}),O}function Gf(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 $f(x,D){return Nt(D,function(O){return[O,x[O]]})}function Gs(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 jf=Mi(Nf),Yf=Mi(Bf);function Vf(x){return"\\"+Uf[x]}function Zf(x,D){return x==null?n:x[D]}function An(x){return Tf.test(x)}function Qf(x){return Rf.test(x)}function th(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 eh(x){var D=-1,O=Array(x.size);return x.forEach(function(V){O[++D]=[V,V]}),O}function nh(x,D,O){for(var V=O-1,ft=x.length;++V<ft;)if(x[V]===D)return V;return-1}function rh(x,D,O){for(var V=O+1;V--;)if(x[V]===D)return V;return V}function xn(x){return An(x)?oh(x):Hf(x)}function Ae(x){return An(x)?sh(x):Kf(x)}function Ys(x){for(var D=x.length;D--&&$c.test(x.charAt(D)););return D}var ih=Mi(Lf);function oh(x){for(var D=Ni.lastIndex=0;Ni.test(x);)++D;return D}function sh(x){return x.match(Ni)||[]}function ah(x){return x.match(Ef)||[]}var uh=function x(D){D=D==null?Kt:En.defaults(Kt.Object(),D,En.pick(Kt,Of));var O=D.Array,V=D.Date,ft=D.Error,Ct=D.Function,Ft=D.Math,Tt=D.Object,zi=D.RegExp,ch=D.String,ve=D.TypeError,Sr=O.prototype,fh=Ct.prototype,Tn=Tt.prototype,kr=D["__core-js_shared__"],Ar=fh.toString,Et=Tn.hasOwnProperty,hh=0,Vs=function(){var t=/[^.]+$/.exec(kr&&kr.keys&&kr.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),xr=Tn.toString,lh=Ar.call(Tt),ph=Kt._,dh=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{}}(),gh=D.clearTimeout!==Kt.clearTimeout&&D.clearTimeout,yh=V&&V.now!==Kt.Date.now&&V.now,vh=D.setTimeout!==Kt.setTimeout&&D.setTimeout,Nr=Ft.ceil,Br=Ft.floor,Xi=Tt.getOwnPropertySymbols,mh=Er?Er.isBuffer:n,na=D.isFinite,_h=Sr.join,wh=js(Tt.keys,Tt),Mt=Ft.max,$t=Ft.min,bh=V.now,Ch=D.parseInt,ra=Ft.random,Sh=Sr.reverse,Gi=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={},kh=vn(Gi),Ah=vn(Vn),xh=vn($i),Eh=vn(Rn),Th=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:Wc,evaluate:Hc,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 Rh(){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 Oh(){if(this.__filtered__){var t=new mt(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function Ih(){var t=this.__wrapped__.value(),e=this.__dir__,i=ht(t),s=e<0,h=i?t.length:0,m=Kl(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 gt=-1,st=t[M];++gt<W;){var vt=q[gt],_t=vt.iteratee,pe=vt.type,ee=_t(st);if(pe==pt)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 Nh(){this.__data__=Qn?Qn(null):{},this.size=0}function Bh(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Lh(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 Uh(t){var e=this.__data__;return Qn?e[t]!==n:Et.call(e,t)}function Dh(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=Nh,ln.prototype.delete=Bh,ln.prototype.get=Lh,ln.prototype.has=Uh,ln.prototype.set=Dh;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 Ph(){this.__data__=[],this.size=0}function Fh(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 Mh(t){var e=this.__data__,i=Pr(e,t);return i<0?n:e[i][1]}function qh(t){return Pr(this.__data__,t)>-1}function Wh(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=Ph,Fe.prototype.delete=Fh,Fe.prototype.get=Mh,Fe.prototype.has=qh,Fe.prototype.set=Wh;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 Hh(){this.size=0,this.__data__={hash:new ln,map:new(Vn||Fe),string:new ln}}function Kh(t){var e=jr(this,t).delete(t);return this.size-=e?1:0,e}function zh(t){return jr(this,t).get(t)}function Xh(t){return jr(this,t).has(t)}function Gh(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=Hh,Me.prototype.delete=Kh,Me.prototype.get=zh,Me.prototype.has=Xh,Me.prototype.set=Gh;function pn(t){var e=-1,i=t==null?0:t.length;for(this.__data__=new Me;++e<i;)this.add(t[e])}function $h(t){return this.__data__.set(t,b),this}function Jh(t){return this.__data__.has(t)}pn.prototype.add=pn.prototype.push=$h,pn.prototype.has=Jh;function xe(t){var e=this.__data__=new Fe(t);this.size=e.size}function jh(){this.__data__=new Fe,this.size=0}function Yh(t){var e=this.__data__,i=e.delete(t);return this.size=e.size,i}function Vh(t){return this.__data__.get(t)}function Zh(t){return this.__data__.has(t)}function Qh(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=jh,xe.prototype.delete=Yh,xe.prototype.get=Vh,xe.prototype.has=Zh,xe.prototype.set=Qh;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,ch):[],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 tl(t,e){return Yr(ne(t),dn(e,0,t.length))}function el(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 nl(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 rl(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==Gt;if(on(t))return Ia(t,S);if(W==ue||W==X||j&&!h){if(C=E||j?{}:Ya(t),!S)return E?Ll(t,rl(C,t)):Bl(t,aa(C,t))}else{if(!Rt[W])return h?t:{};C=Gl(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,gt=q?n:ot(t);return ye(gt||t,function(st,vt){gt&&(vt=st,st=t[vt]),er(C,vt,_e(st,e,i,vt,t,m))}),C}function il(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 ol(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 sl(t,e,i,s){var h=t.length;for(i=dt(i),i<0&&(i=-i>h?0:h+i),s=s===n||s>h?h:dt(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:Xn:hn&&hn in Tt(t)?Hl(t):ep(t)}function Zi(t,e){return t>e}function al(t,e){return t!=null&&Et.call(t,e)}function ul(t,e){return t!=null&&e in Tt(t)}function cl(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 gt=S[C];if(!(gt?jn(gt,ot):s(t[C],ot,i)))continue t}j&&j.push(ot),M.push(tt)}}return M}function fl(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)==X}function hl(t){return Lt(t)&&Qt(t)==je}function ll(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:pl(t,e,i,s,ir,h)}function pl(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==X?ue:E,M=M==X?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):ql(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 gt=tt?t.value():t,st=ot?e.value():e;return m||(m=new xe),h(gt,st,i,s,m)}}return j?(m||(m=new xe),Wl(t,e,i,s,h,m)):!1}function dl(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)||Yl(t))return!1;var e=ze(t)?dh:rf;return e.test(vn(t))}function gl(t){return Lt(t)&&Qt(t)==Vt}function yl(t){return Lt(t)&&Jt(t)==Zt}function vl(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 wh(t);var e=[];for(var i in Tt(t))Et.call(t,i)&&i!="constructor"&&e.push(i);return e}function ml(t){if(!Bt(t))return tp(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))_l(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 _l(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 Gf(h,function(m,C){return Nl(m,C,i)})}function wl(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 bl(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 Cl(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 Sl(t){return sa(Dn(t))}function kl(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,Al=Ir?function(t,e){return Ir(t,"toString",{configurable:!0,enumerable:!1,value:Bo(e),writable:!0})}:oe;function xl(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 El(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,gt=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||!gt):tt||gt?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:Fl(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 Tl=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=gh||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 Rl(t,e){var i=e?ho(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.byteLength)}function Ol(t){var e=new t.constructor(t.source,ds.exec(t));return e.lastIndex=t.lastIndex,e}function Il(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 Nl(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 Bl(t,e){return Le(t,_o(t),e)}function Ll(t,e){return Le(t,Ja(t),e)}function Kr(t,e){return function(i,s){var h=ht(i)?Mf:nl,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 Ul(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(Af,"")),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 Dl(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,gt=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,Ge=j?Te[t]:t;return vt=_t.length,S?_t=np(_t,S):ot&&vt>1&&_t.reverse(),q&&E<vt&&(_t.length=E),this&&this!==Kt&&this instanceof st&&(Ge=gt||sr(Ge)),Ge.apply(Te,_t)}return st}function Wa(t,e){return function(i,s){return fl(i,t,e(s),{})}}function Xr(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 Gr(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 Pl(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=Xe(e),i===n?(i=e,e=0):i=Xe(i),s=s===n?e<i?1:-1:Xe(s),Cl(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 gt=[t,e,h,tt,W,ot,j,S,E,M],st=i.apply(n,gt);return bo(t)&&eu(st,gt),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(dt(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 Fl=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?eh(e):$f(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(dt(C),0),S=S===n?S:dt(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&&Ql(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=Ul(t,e,i);else e==J||e==N?ot=Dl(t,e,S):(e==U||e==(k|U))&&!h.length?ot=Pl(t,e,i,s):ot=zr.apply(n,tt);var gt=j?ka:eu;return nu(gt(ot,tt),t,e)}function Xa(t,e,i,s){return t===n||Ee(t,Tn[i])&&!Et.call(s,i)?e:t}function Ga(t,e,i,s,h,m){return Bt(t)&&Bt(e)&&(m.set(e,t),qr(t,e,n,Ga,m),m.delete(e)),t}function Ml(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],gt=e[W];if(s)var st=C?s(gt,ot,W,e,t,m):s(ot,gt,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===gt||h(ot,gt,i,s,m))){j=!1;break}}return m.delete(t),m.delete(e),j}function ql(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 Wl(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 gt=!0;m.set(t,e),m.set(e,t);for(var st=C;++W<E;){j=S[W];var vt=t[j],_t=e[j];if(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)){gt=!1;break}st||(st=j=="constructor")}if(gt&&!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)&&(gt=!1)}return m.delete(t),m.delete(e),gt}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 jl(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=Zf(t,e);return ga(i)?i:n}function Hl(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=Xi?function(t){return t==null?[]:(t=Tt(t),Ye(Xi(t),function(e){return ta.call(t,e)}))}:Po,Ja=Xi?function(t){for(var e=[];t;)Ve(e,_o(t)),t=Rr(t);return e}:Po,Jt=Qt;(Gi&&Jt(new Gi(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 kh:return Cn;case Ah:return It;case xh:return bn;case Eh:return Zt;case Th:return Pe}return e});function Kl(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 zl(t){var e=t.match(jc);return e?e[1].split(Yc):[]}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 Gl(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 Rl(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 Ol(t);case Zt:return new s;case Ne:return Il(t)}}function $l(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
14
|
/* [wrapped with `+e+`] */
|
|
15
|
-
`)}function ql(t){return ht(t)||mn(t)||!!(ea&&t&&t[ea])}function ze(t,e){var r=typeof t;return e=e??ct,!!e&&(r=="number"||r!="symbol"&&Vc.test(t))&&t>-1&&t%1==0&&t<e}function te(t,e,r){if(!Nt(r))return!1;var s=typeof e;return(s=="number"?re(r)&&ze(e,r.length):s=="string"&&e in r)?Ee(r[e],t):!1}function _o(t,e){if(ht(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||le(t)?!0:Dc.test(t)||!Uc.test(t)||e!=null&&t in Tt(e)}function Wl(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),r=y[e];if(typeof r!="function"||!(e in mt.prototype))return!1;if(t===r)return!0;var s=vo(r);return!!s&&t===s[0]}function Hl(t){return!!Vs&&Vs in t}var zl=kr?Ke:Fo;function ar(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Tn;return t===r}function Va(t){return t===t&&!Nt(t)}function Za(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==n||t in Tt(r))}}function Kl(t){var e=ti(t,function(s){return r.size===p&&r.clear(),s}),r=e.cache;return e}function Xl(t,e){var r=t[1],s=e[1],h=r|s,m=h<(k|L|I),C=s==I&&r==J||s==I&&r==P&&t[7].length<=e[8]||s==(I|P)&&e[7].length<=e[8]&&r==J;if(!(m||C))return t;s&k&&(t[2]=e[2],h|=r&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],w):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],w):e[6]),S=e[7],S&&(t[7]=S),s&I&&(t[8]=t[8]==null?e[8]:Gt(t[8],e[8])),t[9]==null&&(t[9]=e[9]),t[0]=e[0],t[1]=h,t}function $l(t){var e=[];if(t!=null)for(var r in Tt(t))e.push(r);return e}function Gl(t){return xr.call(t)}function Qa(t,e,r){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]=r(C),ce(t,this,S)}}function tu(t,e){return e.length<2?t:gn(t,_e(e,0,-1))}function Jl(t,e){for(var r=t.length,s=Gt(e.length,r),h=ne(t);s--;){var m=e[s];t[s]=ze(m,r)?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=ch||function(t,e){return zt.setTimeout(t,e)},So=ru(vl);function nu(t,e,r){var s=e+"";return So(t,Ml(s,jl(Dl(s),r)))}function ru(t){var e=0,r=0;return function(){var s=ph(),h=$-(s-r);if(r=s,h>0){if(++e>=K)return arguments[0]}else e=0;return t.apply(n,arguments)}}function Yr(t,e){var r=-1,s=t.length,h=s-1;for(e=e===n?s:e;++r<e;){var m=io(r,h),C=t[m];t[m]=t[r],t[r]=C}return t.length=e,t}var iu=Kl(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Pc,function(r,s,h,m){e.push(h?m.replace(Xc,"$1"):s||r)}),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 jl(t,e){return ye(Q,function(r){var s="_."+r[0];e&r[1]&&!_r(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 Yl(t,e,r){(r?te(t,e,r):e===n)?e=1:e=Mt(dt(e),0);var s=t==null?0:t.length;if(!s||e<1)return[];for(var h=0,m=0,C=O(Br(s/e));h<s;)C[m++]=_e(t,h,h+=e);return C}function Vl(t){for(var e=-1,r=t==null?0:t.length,s=0,h=[];++e<r;){var m=t[e];m&&(h[s++]=m)}return h}function Zl(){var t=arguments.length;if(!t)return[];for(var e=O(t-1),r=arguments[0],s=t;s--;)e[s-1]=arguments[s];return Ve(ht(r)?ne(r):[r],Kt(e,1))}var Ql=yt(function(t,e){return Ut(t)?nr(t,Kt(e,1,Ut,!0)):[]}),tp=yt(function(t,e){var r=be(e);return Ut(r)&&(r=n),Ut(t)?nr(t,Kt(e,1,Ut,!0),it(r,2)):[]}),ep=yt(function(t,e){var r=be(e);return Ut(r)&&(r=n),Ut(t)?nr(t,Kt(e,1,Ut,!0),n,r):[]});function np(t,e,r){var s=t==null?0:t.length;return s?(e=r||e===n?1:dt(e),_e(t,e<0?0:e,s)):[]}function rp(t,e,r){var s=t==null?0:t.length;return s?(e=r||e===n?1:dt(e),e=s-e,_e(t,0,e<0?0:e)):[]}function ip(t,e){return t&&t.length?Hr(t,it(e,3),!0,!0):[]}function op(t,e){return t&&t.length?Hr(t,it(e,3),!0):[]}function sp(t,e,r,s){var h=t==null?0:t.length;return h?(r&&typeof r!="number"&&te(t,e,r)&&(r=0,s=h),Zh(t,e,r,s)):[]}function su(t,e,r){var s=t==null?0:t.length;if(!s)return-1;var h=r==null?0:dt(r);return h<0&&(h=Mt(s+h,0)),br(t,it(e,3),h)}function au(t,e,r){var s=t==null?0:t.length;if(!s)return-1;var h=s-1;return r!==n&&(h=dt(r),h=r<0?Mt(s+h,0):Gt(h,s-1)),br(t,it(e,3),h,!0)}function uu(t){var e=t==null?0:t.length;return e?Kt(t,1):[]}function ap(t){var e=t==null?0:t.length;return e?Kt(t,xt):[]}function up(t,e){var r=t==null?0:t.length;return r?(e=e===n?1:dt(e),Kt(t,e)):[]}function cp(t){for(var e=-1,r=t==null?0:t.length,s={};++e<r;){var h=t[e];s[h[0]]=h[1]}return s}function cu(t){return t&&t.length?t[0]:n}function fp(t,e,r){var s=t==null?0:t.length;if(!s)return-1;var h=r==null?0:dt(r);return h<0&&(h=Mt(s+h,0)),kn(t,e,h)}function hp(t){var e=t==null?0:t.length;return e?_e(t,0,-1):[]}var lp=yt(function(t){var e=Bt(t,co);return e.length&&e[0]===t[0]?Qi(e):[]}),pp=yt(function(t){var e=be(t),r=Bt(t,co);return e===be(r)?e=n:r.pop(),r.length&&r[0]===t[0]?Qi(r,it(e,2)):[]}),dp=yt(function(t){var e=be(t),r=Bt(t,co);return e=typeof e=="function"?e:n,e&&r.pop(),r.length&&r[0]===t[0]?Qi(r,n,e):[]});function gp(t,e){return t==null?"":hh.call(t,e)}function be(t){var e=t==null?0:t.length;return e?t[e-1]:n}function yp(t,e,r){var s=t==null?0:t.length;if(!s)return-1;var h=s;return r!==n&&(h=dt(r),h=h<0?Mt(s+h,0):Gt(h,s-1)),e===e?jf(t,e,h):br(t,zs,h,!0)}function vp(t,e){return t&&t.length?_a(t,dt(e)):n}var mp=yt(fu);function fu(t,e){return t&&t.length&&e&&e.length?ro(t,e):t}function wp(t,e,r){return t&&t.length&&e&&e.length?ro(t,e,it(r,2)):t}function _p(t,e,r){return t&&t.length&&e&&e.length?ro(t,e,n,r):t}var bp=He(function(t,e){var r=t==null?0:t.length,s=ji(t,e);return Sa(t,Bt(e,function(h){return ze(h,r)?+h:h}).sort(Na)),s});function Cp(t,e){var r=[];if(!(t&&t.length))return r;var s=-1,h=[],m=t.length;for(e=it(e,3);++s<m;){var C=t[s];e(C,s,t)&&(r.push(C),h.push(s))}return Sa(t,h),r}function ko(t){return t==null?t:gh.call(t)}function Sp(t,e,r){var s=t==null?0:t.length;return s?(r&&typeof r!="number"&&te(t,e,r)?(e=0,r=s):(e=e==null?0:dt(e),r=r===n?s:dt(r)),_e(t,e,r)):[]}function kp(t,e){return Wr(t,e)}function Ap(t,e,r){return so(t,e,it(r,2))}function xp(t,e){var r=t==null?0:t.length;if(r){var s=Wr(t,e);if(s<r&&Ee(t[s],e))return s}return-1}function Ep(t,e){return Wr(t,e,!0)}function Tp(t,e,r){return so(t,e,it(r,2),!0)}function Rp(t,e){var r=t==null?0:t.length;if(r){var s=Wr(t,e,!0)-1;if(Ee(t[s],e))return s}return-1}function Op(t){return t&&t.length?Aa(t):[]}function Ip(t,e){return t&&t.length?Aa(t,it(e,2)):[]}function Bp(t){var e=t==null?0:t.length;return e?_e(t,1,e):[]}function Np(t,e,r){return t&&t.length?(e=r||e===n?1:dt(e),_e(t,0,e<0?0:e)):[]}function Lp(t,e,r){var s=t==null?0:t.length;return s?(e=r||e===n?1:dt(e),e=s-e,_e(t,e<0?0:e,s)):[]}function Up(t,e){return t&&t.length?Hr(t,it(e,3),!1,!0):[]}function Dp(t,e){return t&&t.length?Hr(t,it(e,3)):[]}var Pp=yt(function(t){return en(Kt(t,1,Ut,!0))}),Fp=yt(function(t){var e=be(t);return Ut(e)&&(e=n),en(Kt(t,1,Ut,!0),it(e,2))}),Mp=yt(function(t){var e=be(t);return e=typeof e=="function"?e:n,en(Kt(t,1,Ut,!0),n,e)});function qp(t){return t&&t.length?en(t):[]}function Wp(t,e){return t&&t.length?en(t,it(e,2)):[]}function Hp(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(r){if(Ut(r))return e=Mt(r.length,e),!0}),Wi(e,function(r){return Bt(t,Fi(r))})}function hu(t,e){if(!(t&&t.length))return[];var r=Ao(t);return e==null?r:Bt(r,function(s){return ce(e,n,s)})}var zp=yt(function(t,e){return Ut(t)?nr(t,e):[]}),Kp=yt(function(t){return uo(Ye(t,Ut))}),Xp=yt(function(t){var e=be(t);return Ut(e)&&(e=n),uo(Ye(t,Ut),it(e,2))}),$p=yt(function(t){var e=be(t);return e=typeof e=="function"?e:n,uo(Ye(t,Ut),n,e)}),Gp=yt(Ao);function Jp(t,e){return Ra(t||[],e||[],er)}function jp(t,e){return Ra(t||[],e||[],or)}var Yp=yt(function(t){var e=t.length,r=e>1?t[e-1]:n;return r=typeof r=="function"?(t.pop(),r):n,hu(t,r)});function lu(t){var e=y(t);return e.__chain__=!0,e}function Vp(t,e){return e(t),t}function Vr(t,e){return e(t)}var Zp=He(function(t){var e=t.length,r=e?t[0]:0,s=this.__wrapped__,h=function(m){return ji(m,t)};return e>1||this.__actions__.length||!(s instanceof mt)||!ze(r)?this.thru(h):(s=s.slice(r,+r+(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 Qp(){return lu(this)}function td(){return new me(this.value(),this.__chain__)}function ed(){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 nd(){return this}function rd(t){for(var e,r=this;r instanceof Dr;){var s=ou(r);s.__index__=0,s.__values__=n,e?h.__wrapped__=s:e=s;var h=s;r=r.__wrapped__}return h.__wrapped__=t,e}function id(){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 od(){return Ta(this.__wrapped__,this.__actions__)}var sd=zr(function(t,e,r){Et.call(t,r)?++t[r]:qe(t,r,1)});function ad(t,e,r){var s=ht(t)?Ws:Vh;return r&&te(t,e,r)&&(e=n),s(t,it(e,3))}function ud(t,e){var r=ht(t)?Ye:ha;return r(t,it(e,3))}var cd=Ma(su),fd=Ma(au);function hd(t,e){return Kt(Zr(t,e),1)}function ld(t,e){return Kt(Zr(t,e),xt)}function pd(t,e,r){return r=r===n?1:dt(r),Kt(Zr(t,e),r)}function pu(t,e){var r=ht(t)?ye:tn;return r(t,it(e,3))}function du(t,e){var r=ht(t)?Bf:fa;return r(t,it(e,3))}var dd=zr(function(t,e,r){Et.call(t,r)?t[r].push(e):qe(t,r,[e])});function gd(t,e,r,s){t=re(t)?t:Dn(t),r=r&&!s?dt(r):0;var h=t.length;return r<0&&(r=Mt(h+r,0)),ri(t)?r<=h&&t.indexOf(e,r)>-1:!!h&&kn(t,e,r)>-1}var yd=yt(function(t,e,r){var s=-1,h=typeof e=="function",m=re(t)?O(t.length):[];return tn(t,function(C){m[++s]=h?ce(e,C,r):rr(C,e,r)}),m}),vd=zr(function(t,e,r){qe(t,r,e)});function Zr(t,e){var r=ht(t)?Bt:va;return r(t,it(e,3))}function md(t,e,r,s){return t==null?[]:(ht(e)||(e=e==null?[]:[e]),r=s?n:r,ht(r)||(r=r==null?[]:[r]),ba(t,e,r))}var wd=zr(function(t,e,r){t[r?0:1].push(e)},function(){return[[],[]]});function _d(t,e,r){var s=ht(t)?Di:Xs,h=arguments.length<3;return s(t,it(e,4),r,h,tn)}function bd(t,e,r){var s=ht(t)?Nf:Xs,h=arguments.length<3;return s(t,it(e,4),r,h,fa)}function Cd(t,e){var r=ht(t)?Ye:ha;return r(t,ei(it(e,3)))}function Sd(t){var e=ht(t)?sa:gl;return e(t)}function kd(t,e,r){(r?te(t,e,r):e===n)?e=1:e=dt(e);var s=ht(t)?$h:yl;return s(t,e)}function Ad(t){var e=ht(t)?Gh:ml;return e(t)}function xd(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 Ed(t,e,r){var s=ht(t)?Pi:wl;return r&&te(t,e,r)&&(e=n),s(t,it(e,3))}var Td=yt(function(t,e){if(t==null)return[];var r=e.length;return r>1&&te(t,e[0],e[1])?e=[]:r>2&&te(e[0],e[1],e[2])&&(e=[e[0]]),ba(t,Kt(e,1),[])}),Qr=uh||function(){return zt.Date.now()};function Rd(t,e){if(typeof e!="function")throw new ve(v);return t=dt(t),function(){if(--t<1)return e.apply(this,arguments)}}function gu(t,e,r){return e=r?n:e,e=t&&e==null?t.length:e,We(t,I,n,n,n,n,e)}function yu(t,e){var r;if(typeof e!="function")throw new ve(v);return t=dt(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=n),r}}var xo=yt(function(t,e,r){var s=k;if(r.length){var h=Ze(r,Ln(xo));s|=U}return We(t,s,e,r,h)}),vu=yt(function(t,e,r){var s=k|L;if(r.length){var h=Ze(r,Ln(vu));s|=U}return We(e,s,t,r,h)});function mu(t,e,r){e=r?n:e;var s=We(t,J,n,n,n,n,n,e);return s.placeholder=mu.placeholder,s}function wu(t,e,r){e=r?n:e;var s=We(t,B,n,n,n,n,n,e);return s.placeholder=wu.placeholder,s}function _u(t,e,r){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,Nt(r)&&(q=!!r.leading,W="maxWait"in r,m=W?Mt(Ce(r.maxWait)||0,e):m,j="trailing"in r?!!r.trailing:j);function tt(Dt){var Te=s,$e=h;return s=h=n,M=Dt,C=t.apply($e,Te),C}function ot(Dt){return M=Dt,S=ur(vt,e),q?tt(Dt):C}function gt(Dt){var Te=Dt-E,$e=Dt-M,Mu=e-Te;return W?Gt(Mu,m-$e):Mu}function st(Dt){var Te=Dt-E,$e=Dt-M;return E===n||Te>=e||Te<0||W&&$e>=m}function vt(){var Dt=Qr();if(st(Dt))return wt(Dt);S=ur(vt,gt(Dt))}function wt(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:wt(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 Od=yt(function(t,e){return ca(t,1,e)}),Id=yt(function(t,e,r){return ca(t,Ce(e)||0,r)});function Bd(t){return We(t,R)}function ti(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new ve(v);var r=function(){var s=arguments,h=e?e.apply(this,s):s[0],m=r.cache;if(m.has(h))return m.get(h);var C=t.apply(this,s);return r.cache=m.set(h,C)||m,C};return r.cache=new(ti.Cache||Me),r}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 Nd(t){return yu(2,t)}var Ld=_l(function(t,e){e=e.length==1&&ht(e[0])?Bt(e[0],fe(it())):Bt(Kt(e,1),fe(it()));var r=e.length;return yt(function(s){for(var h=-1,m=Gt(s.length,r);++h<m;)s[h]=e[h].call(this,s[h]);return ce(t,this,s)})}),Eo=yt(function(t,e){var r=Ze(e,Ln(Eo));return We(t,U,n,e,r)}),bu=yt(function(t,e){var r=Ze(e,Ln(bu));return We(t,T,n,e,r)}),Ud=He(function(t,e){return We(t,P,n,n,n,e)});function Dd(t,e){if(typeof t!="function")throw new ve(v);return e=e===n?e:dt(e),yt(t,e)}function Pd(t,e){if(typeof t!="function")throw new ve(v);return e=e==null?0:Mt(dt(e),0),yt(function(r){var s=r[e],h=rn(r,0,e);return s&&Ve(h,s),ce(t,this,h)})}function Fd(t,e,r){var s=!0,h=!0;if(typeof t!="function")throw new ve(v);return Nt(r)&&(s="leading"in r?!!r.leading:s,h="trailing"in r?!!r.trailing:h),_u(t,e,{leading:s,maxWait:e,trailing:h})}function Md(t){return gu(t,1)}function qd(t,e){return Eo(fo(e),t)}function Wd(){if(!arguments.length)return[];var t=arguments[0];return ht(t)?t:[t]}function Hd(t){return we(t,u)}function zd(t,e){return e=typeof e=="function"?e:n,we(t,u,e)}function Kd(t){return we(t,g|u)}function Xd(t,e){return e=typeof e=="function"?e:n,we(t,g|u,e)}function $d(t,e){return e==null||ua(t,e,Wt(e))}function Ee(t,e){return t===e||t!==t&&e!==e}var Gd=Gr(Zi),Jd=Gr(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,jd=Us?fe(Us):rl;function re(t){return t!=null&&ni(t.length)&&!Ke(t)}function Ut(t){return Lt(t)&&re(t)}function Yd(t){return t===!0||t===!1||Lt(t)&&Qt(t)==et}var on=fh||Fo,Vd=Ds?fe(Ds):il;function Zd(t){return Lt(t)&&t.nodeType===1&&!cr(t)}function Qd(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 r in t)if(Et.call(t,r))return!1;return!0}function tg(t,e){return ir(t,e)}function eg(t,e,r){r=typeof r=="function"?r:n;var s=r?r(t,e):n;return s===n?ir(t,e,n,r):!!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 ng(t){return typeof t=="number"&&na(t)}function Ke(t){if(!Nt(t))return!1;var e=Qt(t);return e==kt||e==$t||e==z||e==$n}function Cu(t){return typeof t=="number"&&t==dt(t)}function ni(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ct}function Nt(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):sl;function rg(t,e){return t===e||to(t,e,mo(e))}function ig(t,e,r){return r=typeof r=="function"?r:n,to(t,e,mo(e),r)}function og(t){return ku(t)&&t!=+t}function sg(t){if(zl(t))throw new ft(f);return ga(t)}function ag(t){return t===null}function ug(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 r=Et.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Ar.call(r)==ih}var Ro=Fs?fe(Fs):al;function cg(t){return Cu(t)&&t>=-ct&&t<=ct}var Au=Ms?fe(Ms):ul;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)==Be}var Un=qs?fe(qs):cl;function fg(t){return t===n}function hg(t){return Lt(t)&&Jt(t)==Pe}function lg(t){return Lt(t)&&Qt(t)==Jn}var pg=Gr(no),dg=Gr(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 $f(t[Yn]());var e=Jt(t),r=e==It?zi:e==Zt?Cr:Dn;return r(t)}function Xe(t){if(!t)return t===0?t:0;if(t=Ce(t),t===xt||t===-xt){var e=t<0?-1:1;return e*Xt}return t===t?t:0}function dt(t){var e=Xe(t),r=e%1;return e===e?r?e-r:e:0}function Eu(t){return t?dn(dt(t),0,ae):0}function Ce(t){if(typeof t=="number")return t;if(le(t))return Oe;if(Nt(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Nt(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=$s(t);var r=Jc.test(t);return r||Yc.test(t)?Rf(t.slice(2),r?2:8):Gc.test(t)?Oe:+t}function Tu(t){return Le(t,ie(t))}function gg(t){return t?dn(dt(t),-ct,ct):t===0?t:0}function At(t){return t==null?"":he(t)}var yg=Bn(function(t,e){if(ar(e)||re(e)){Le(e,Wt(e),t);return}for(var r in e)Et.call(e,r)&&er(t,r,e[r])}),Ru=Bn(function(t,e){Le(e,ie(e),t)}),ii=Bn(function(t,e,r,s){Le(e,ie(e),t,s)}),vg=Bn(function(t,e,r,s){Le(e,Wt(e),t,s)}),mg=He(ji);function wg(t,e){var r=In(t);return e==null?r:aa(r,e)}var _g=yt(function(t,e){t=Tt(t);var r=-1,s=e.length,h=s>2?e[2]:n;for(h&&te(e[0],e[1],h)&&(s=1);++r<s;)for(var m=e[r],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}),bg=yt(function(t){return t.push(n,$a),ce(Ou,n,t)});function Cg(t,e){return Hs(t,it(e,3),Ne)}function Sg(t,e){return Hs(t,it(e,3),Vi)}function kg(t,e){return t==null?t:Yi(t,it(e,3),ie)}function Ag(t,e){return t==null?t:la(t,it(e,3),ie)}function xg(t,e){return t&&Ne(t,it(e,3))}function Eg(t,e){return t&&Vi(t,it(e,3))}function Tg(t){return t==null?[]:Mr(t,Wt(t))}function Rg(t){return t==null?[]:Mr(t,ie(t))}function Oo(t,e,r){var s=t==null?n:gn(t,e);return s===n?r:s}function Og(t,e){return t!=null&&ja(t,e,Qh)}function Io(t,e){return t!=null&&ja(t,e,tl)}var Ig=Wa(function(t,e,r){e!=null&&typeof e.toString!="function"&&(e=xr.call(e)),t[e]=r},No(oe)),Bg=Wa(function(t,e,r){e!=null&&typeof e.toString!="function"&&(e=xr.call(e)),Et.call(t,e)?t[e].push(r):t[e]=[r]},it),Ng=yt(rr);function Wt(t){return re(t)?oa(t):eo(t)}function ie(t){return re(t)?oa(t,!0):fl(t)}function Lg(t,e){var r={};return e=it(e,3),Ne(t,function(s,h,m){qe(r,e(s,h,m),s)}),r}function Ug(t,e){var r={};return e=it(e,3),Ne(t,function(s,h,m){qe(r,h,e(s,h,m))}),r}var Dg=Bn(function(t,e,r){qr(t,e,r)}),Ou=Bn(function(t,e,r,s){qr(t,e,r,s)}),Pg=He(function(t,e){var r={};if(t==null)return r;var s=!1;e=Bt(e,function(m){return m=nn(m,t),s||(s=m.length>1),m}),Le(t,yo(t),r),s&&(r=we(r,g|l|u,Il));for(var h=e.length;h--;)ao(r,e[h]);return r});function Fg(t,e){return Iu(t,ei(it(e)))}var Mg=He(function(t,e){return t==null?{}:ll(t,e)});function Iu(t,e){if(t==null)return{};var r=Bt(yo(t),function(s){return[s]});return e=it(e),Ca(t,r,function(s,h){return e(s,h[0])})}function qg(t,e,r){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=r),t=Ke(m)?m.call(t):m}return t}function Wg(t,e,r){return t==null?t:or(t,e,r)}function Hg(t,e,r,s){return s=typeof s=="function"?s:n,t==null?t:or(t,e,r,s)}var Bu=Ka(Wt),Nu=Ka(ie);function zg(t,e,r){var s=ht(t),h=s||on(t)||Un(t);if(e=it(e,4),r==null){var m=t&&t.constructor;h?r=s?new m:[]:Nt(t)?r=Ke(m)?In(Rr(t)):{}:r={}}return(h?ye:Ne)(t,function(C,S,E){return e(r,C,S,E)}),r}function Kg(t,e){return t==null?!0:ao(t,e)}function Xg(t,e,r){return t==null?t:Ea(t,e,fo(r))}function $g(t,e,r,s){return s=typeof s=="function"?s:n,t==null?t:Ea(t,e,fo(r),s)}function Dn(t){return t==null?[]:Hi(t,Wt(t))}function Gg(t){return t==null?[]:Hi(t,ie(t))}function Jg(t,e,r){return r===n&&(r=e,e=n),r!==n&&(r=Ce(r),r=r===r?r:0),e!==n&&(e=Ce(e),e=e===e?e:0),dn(Ce(t),e,r)}function jg(t,e,r){return e=Xe(e),r===n?(r=e,e=0):r=Xe(r),t=Ce(t),el(t,e,r)}function Yg(t,e,r){if(r&&typeof r!="boolean"&&te(t,e,r)&&(e=r=n),r===n&&(typeof e=="boolean"?(r=e,e=n):typeof t=="boolean"&&(r=t,t=n)),t===n&&e===n?(t=0,e=1):(t=Xe(t),e===n?(e=t,t=0):e=Xe(e)),t>e){var s=t;t=e,e=s}if(r||t%1||e%1){var h=ra();return Gt(t+h*(e-t+Tf("1e-"+((h+"").length-1))),e)}return io(t,e)}var Vg=Nn(function(t,e,r){return e=e.toLowerCase(),t+(r?Lu(e):e)});function Lu(t){return Bo(At(t).toLowerCase())}function Uu(t){return t=At(t),t&&t.replace(Zc,Wf).replace(mf,"")}function Zg(t,e,r){t=At(t),e=he(e);var s=t.length;r=r===n?s:dn(dt(r),0,s);var h=r;return r-=e.length,r>=0&&t.slice(r,h)==e}function Qg(t){return t=At(t),t&&Bc.test(t)?t.replace(ls,Hf):t}function ty(t){return t=At(t),t&&Fc.test(t)?t.replace(xi,"\\$&"):t}var ey=Nn(function(t,e,r){return t+(r?"-":"")+e.toLowerCase()}),ny=Nn(function(t,e,r){return t+(r?" ":"")+e.toLowerCase()}),ry=Fa("toLowerCase");function iy(t,e,r){t=At(t),e=dt(e);var s=e?xn(t):0;if(!e||s>=e)return t;var h=(e-s)/2;return $r(Nr(h),r)+t+$r(Br(h),r)}function oy(t,e,r){t=At(t),e=dt(e);var s=e?xn(t):0;return e&&s<e?t+$r(e-s,r):t}function sy(t,e,r){t=At(t),e=dt(e);var s=e?xn(t):0;return e&&s<e?$r(e-s,r)+t:t}function ay(t,e,r){return r||e==null?e=0:e&&(e=+e),dh(At(t).replace(Ei,""),e||0)}function uy(t,e,r){return(r?te(t,e,r):e===n)?e=1:e=dt(e),oo(At(t),e)}function cy(){var t=arguments,e=At(t[0]);return t.length<3?e:e.replace(t[1],t[2])}var fy=Nn(function(t,e,r){return t+(r?"_":"")+e.toLowerCase()});function hy(t,e,r){return r&&typeof r!="number"&&te(t,e,r)&&(e=r=n),r=r===n?ae:r>>>0,r?(t=At(t),t&&(typeof e=="string"||e!=null&&!Ro(e))&&(e=he(e),!e&&An(t))?rn(Ae(t),0,r):t.split(e,r)):[]}var ly=Nn(function(t,e,r){return t+(r?" ":"")+Bo(e)});function py(t,e,r){return t=At(t),r=r==null?0:dn(dt(r),0,t.length),e=he(e),t.slice(r,r+e.length)==e}function dy(t,e,r){var s=y.templateSettings;r&&te(t,e,r)&&(e=n),t=At(t),e=ii({},e,s,Xa);var h=ii({},e.imports,s.imports,Xa),m=Wt(h),C=Hi(h,m),S,E,M=0,q=e.interpolate||vr,W="__p += '",j=Ki((e.escape||vr).source+"|"+q.source+"|"+(q===ps?$c:vr).source+"|"+(e.evaluate||vr).source+"|$","g"),tt="//# sourceURL="+(Et.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Sf+"]")+`
|
|
16
|
-
`;t.replace(j,function(st,vt,
|
|
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"&&sf.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:zc.test(t)||!Kc.test(t)||e!=null&&t in Tt(e)}function jl(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 Yl(t){return!!Vs&&Vs in t}var Vl=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 Zl(t){var e=ti(t,function(s){return i.size===p&&i.clear(),s}),i=e.cache;return e}function Ql(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 tp(t){var e=[];if(t!=null)for(var i in Tt(t))e.push(i);return e}function ep(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 np(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=vh||function(t,e){return Kt.setTimeout(t,e)},So=ru(Al);function nu(t,e,i){var s=e+"";return So(t,$l(s,rp(zl(s),i)))}function ru(t){var e=0,i=0;return function(){var s=bh(),h=G-(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=Zl(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Xc,function(i,s,h,m){e.push(h?m.replace(Qc,"$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 rp(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 ip(t,e,i){(i?te(t,e,i):e===n)?e=1:e=Mt(dt(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 op(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 sp(){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 ap=yt(function(t,e){return Ut(t)?nr(t,zt(e,1,Ut,!0)):[]}),up=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)):[]}),cp=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 fp(t,e,i){var s=t==null?0:t.length;return s?(e=i||e===n?1:dt(e),we(t,e<0?0:e,s)):[]}function hp(t,e,i){var s=t==null?0:t.length;return s?(e=i||e===n?1:dt(e),e=s-e,we(t,0,e<0?0:e)):[]}function lp(t,e){return t&&t.length?Hr(t,it(e,3),!0,!0):[]}function pp(t,e){return t&&t.length?Hr(t,it(e,3),!0):[]}function dp(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),sl(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:dt(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=dt(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 gp(t){var e=t==null?0:t.length;return e?zt(t,xt):[]}function yp(t,e){var i=t==null?0:t.length;return i?(e=e===n?1:dt(e),zt(t,e)):[]}function vp(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 mp(t,e,i){var s=t==null?0:t.length;if(!s)return-1;var h=i==null?0:dt(i);return h<0&&(h=Mt(s+h,0)),kn(t,e,h)}function _p(t){var e=t==null?0:t.length;return e?we(t,0,-1):[]}var wp=yt(function(t){var e=Nt(t,co);return e.length&&e[0]===t[0]?Qi(e):[]}),bp=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)):[]}),Cp=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 Sp(t,e){return t==null?"":_h.call(t,e)}function be(t){var e=t==null?0:t.length;return e?t[e-1]:n}function kp(t,e,i){var s=t==null?0:t.length;if(!s)return-1;var h=s;return i!==n&&(h=dt(i),h=h<0?Mt(s+h,0):$t(h,s-1)),e===e?rh(t,e,h):br(t,Ks,h,!0)}function Ap(t,e){return t&&t.length?wa(t,dt(e)):n}var xp=yt(fu);function fu(t,e){return t&&t.length&&e&&e.length?ro(t,e):t}function Ep(t,e,i){return t&&t.length&&e&&e.length?ro(t,e,it(i,2)):t}function Tp(t,e,i){return t&&t.length&&e&&e.length?ro(t,e,n,i):t}var Rp=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 Op(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:Sh.call(t)}function Ip(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:dt(e),i=i===n?s:dt(i)),we(t,e,i)):[]}function Np(t,e){return Wr(t,e)}function Bp(t,e,i){return so(t,e,it(i,2))}function Lp(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 Up(t,e){return Wr(t,e,!0)}function Dp(t,e,i){return so(t,e,it(i,2),!0)}function Pp(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 Fp(t){return t&&t.length?Aa(t):[]}function Mp(t,e){return t&&t.length?Aa(t,it(e,2)):[]}function qp(t){var e=t==null?0:t.length;return e?we(t,1,e):[]}function Wp(t,e,i){return t&&t.length?(e=i||e===n?1:dt(e),we(t,0,e<0?0:e)):[]}function Hp(t,e,i){var s=t==null?0:t.length;return s?(e=i||e===n?1:dt(e),e=s-e,we(t,e<0?0:e,s)):[]}function Kp(t,e){return t&&t.length?Hr(t,it(e,3),!1,!0):[]}function zp(t,e){return t&&t.length?Hr(t,it(e,3)):[]}var Xp=yt(function(t){return en(zt(t,1,Ut,!0))}),Gp=yt(function(t){var e=be(t);return Ut(e)&&(e=n),en(zt(t,1,Ut,!0),it(e,2))}),$p=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 jp(t,e){return t&&t.length?en(t,it(e,2)):[]}function Yp(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 Vp=yt(function(t,e){return Ut(t)?nr(t,e):[]}),Zp=yt(function(t){return uo(Ye(t,Ut))}),Qp=yt(function(t){var e=be(t);return Ut(e)&&(e=n),uo(Ye(t,Ut),it(e,2))}),td=yt(function(t){var e=be(t);return e=typeof e=="function"?e:n,uo(Ye(t,Ut),n,e)}),ed=yt(Ao);function nd(t,e){return Ra(t||[],e||[],er)}function rd(t,e){return Ra(t||[],e||[],or)}var id=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 od(t,e){return e(t),t}function Vr(t,e){return e(t)}var sd=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 ad(){return lu(this)}function ud(){return new me(this.value(),this.__chain__)}function cd(){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 fd(){return this}function hd(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 ld(){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 pd(){return Ta(this.__wrapped__,this.__actions__)}var dd=Kr(function(t,e,i){Et.call(t,i)?++t[i]:qe(t,i,1)});function gd(t,e,i){var s=ht(t)?Ws:ol;return i&&te(t,e,i)&&(e=n),s(t,it(e,3))}function yd(t,e){var i=ht(t)?Ye:ha;return i(t,it(e,3))}var vd=Ma(su),md=Ma(au);function _d(t,e){return zt(Zr(t,e),1)}function wd(t,e){return zt(Zr(t,e),xt)}function bd(t,e,i){return i=i===n?1:dt(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)?qf:fa;return i(t,it(e,3))}var Cd=Kr(function(t,e,i){Et.call(t,i)?t[i].push(e):qe(t,i,[e])});function Sd(t,e,i,s){t=re(t)?t:Dn(t),i=i&&!s?dt(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 kd=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}),Ad=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 xd(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 Ed=Kr(function(t,e,i){t[i?0:1].push(e)},function(){return[[],[]]});function Td(t,e,i){var s=ht(t)?Di:Xs,h=arguments.length<3;return s(t,it(e,4),i,h,tn)}function Rd(t,e,i){var s=ht(t)?Wf:Xs,h=arguments.length<3;return s(t,it(e,4),i,h,fa)}function Od(t,e){var i=ht(t)?Ye:ha;return i(t,ei(it(e,3)))}function Id(t){var e=ht(t)?sa:Sl;return e(t)}function Nd(t,e,i){(i?te(t,e,i):e===n)?e=1:e=dt(e);var s=ht(t)?tl:kl;return s(t,e)}function Bd(t){var e=ht(t)?el:xl;return e(t)}function Ld(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 Ud(t,e,i){var s=ht(t)?Pi:El;return i&&te(t,e,i)&&(e=n),s(t,it(e,3))}var Dd=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=yh||function(){return Kt.Date.now()};function Pd(t,e){if(typeof e!="function")throw new ve(v);return t=dt(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=dt(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,Ge=h;return s=h=n,M=Dt,C=t.apply(Ge,Te),C}function ot(Dt){return M=Dt,S=ur(vt,e),q?tt(Dt):C}function gt(Dt){var Te=Dt-E,Ge=Dt-M,Mu=e-Te;return W?$t(Mu,m-Ge):Mu}function st(Dt){var Te=Dt-E,Ge=Dt-M;return E===n||Te>=e||Te<0||W&&Ge>=m}function vt(){var Dt=Qr();if(st(Dt))return _t(Dt);S=ur(vt,gt(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 Fd=yt(function(t,e){return ca(t,1,e)}),Md=yt(function(t,e,i){return ca(t,Ce(e)||0,i)});function qd(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 Wd(t){return yu(2,t)}var Hd=Tl(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)}),Kd=He(function(t,e){return We(t,P,n,n,n,e)});function zd(t,e){if(typeof t!="function")throw new ve(v);return e=e===n?e:dt(e),yt(t,e)}function Xd(t,e){if(typeof t!="function")throw new ve(v);return e=e==null?0:Mt(dt(e),0),yt(function(i){var s=i[e],h=rn(i,0,e);return s&&Ve(h,s),ce(t,this,h)})}function Gd(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 $d(t){return gu(t,1)}function Jd(t,e){return Eo(fo(e),t)}function jd(){if(!arguments.length)return[];var t=arguments[0];return ht(t)?t:[t]}function Yd(t){return _e(t,u)}function Vd(t,e){return e=typeof e=="function"?e:n,_e(t,u,e)}function Zd(t){return _e(t,g|u)}function Qd(t,e){return e=typeof e=="function"?e:n,_e(t,g|u,e)}function tg(t,e){return e==null||ua(t,e,Wt(e))}function Ee(t,e){return t===e||t!==t&&e!==e}var eg=$r(Zi),ng=$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,rg=Us?fe(Us):hl;function re(t){return t!=null&&ni(t.length)&&!ze(t)}function Ut(t){return Lt(t)&&re(t)}function ig(t){return t===!0||t===!1||Lt(t)&&Qt(t)==et}var on=mh||Fo,og=Ds?fe(Ds):ll;function sg(t){return Lt(t)&&t.nodeType===1&&!cr(t)}function ag(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 ug(t,e){return ir(t,e)}function cg(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 fg(t){return typeof t=="number"&&na(t)}function ze(t){if(!Bt(t))return!1;var e=Qt(t);return e==kt||e==Gt||e==K||e==Gn}function Cu(t){return typeof t=="number"&&t==dt(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):dl;function hg(t,e){return t===e||to(t,e,mo(e))}function lg(t,e,i){return i=typeof i=="function"?i:n,to(t,e,mo(e),i)}function pg(t){return ku(t)&&t!=+t}function dg(t){if(Vl(t))throw new ft(f);return ga(t)}function gg(t){return t===null}function yg(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)==lh}var Ro=Fs?fe(Fs):gl;function vg(t){return Cu(t)&&t>=-ct&&t<=ct}var Au=Ms?fe(Ms):yl;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):vl;function mg(t){return t===n}function _g(t){return Lt(t)&&Jt(t)==Pe}function wg(t){return Lt(t)&&Qt(t)==Jn}var bg=$r(no),Cg=$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 th(t[Yn]());var e=Jt(t),i=e==It?Ki:e==Zt?Cr:Dn;return i(t)}function Xe(t){if(!t)return t===0?t:0;if(t=Ce(t),t===xt||t===-xt){var e=t<0?-1:1;return e*Xt}return t===t?t:0}function dt(t){var e=Xe(t),i=e%1;return e===e?i?e-i:e:0}function Eu(t){return t?dn(dt(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=Gs(t);var i=nf.test(t);return i||of.test(t)?Pf(t.slice(2),i?2:8):ef.test(t)?Oe:+t}function Tu(t){return Le(t,ie(t))}function Sg(t){return t?dn(dt(t),-ct,ct):t===0?t:0}function At(t){return t==null?"":he(t)}var kg=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)}),Ag=Nn(function(t,e,i,s){Le(e,Wt(e),t,s)}),xg=He(ji);function Eg(t,e){var i=In(t);return e==null?i:aa(i,e)}var Tg=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}),Rg=yt(function(t){return t.push(n,Ga),ce(Ou,n,t)});function Og(t,e){return Hs(t,it(e,3),Be)}function Ig(t,e){return Hs(t,it(e,3),Vi)}function Ng(t,e){return t==null?t:Yi(t,it(e,3),ie)}function Bg(t,e){return t==null?t:la(t,it(e,3),ie)}function Lg(t,e){return t&&Be(t,it(e,3))}function Ug(t,e){return t&&Vi(t,it(e,3))}function Dg(t){return t==null?[]:Mr(t,Wt(t))}function Pg(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 Fg(t,e){return t!=null&&ja(t,e,al)}function Io(t,e){return t!=null&&ja(t,e,ul)}var Mg=Wa(function(t,e,i){e!=null&&typeof e.toString!="function"&&(e=xr.call(e)),t[e]=i},Bo(oe)),qg=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),Wg=yt(rr);function Wt(t){return re(t)?oa(t):eo(t)}function ie(t){return re(t)?oa(t,!0):ml(t)}function Hg(t,e){var i={};return e=it(e,3),Be(t,function(s,h,m){qe(i,e(s,h,m),s)}),i}function Kg(t,e){var i={};return e=it(e,3),Be(t,function(s,h,m){qe(i,h,e(s,h,m))}),i}var zg=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,Ml));for(var h=e.length;h--;)ao(i,e[h]);return i});function Gg(t,e){return Iu(t,ei(it(e)))}var $g=He(function(t,e){return t==null?{}:wl(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 jg(t,e,i){return t==null?t:or(t,e,i)}function Yg(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 Vg(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 Zg(t,e){return t==null?!0:ao(t,e)}function Qg(t,e,i){return t==null?t:Ea(t,e,fo(i))}function ty(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 ey(t){return t==null?[]:Hi(t,ie(t))}function ny(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 ry(t,e,i){return e=Xe(e),i===n?(i=e,e=0):i=Xe(i),t=Ce(t),cl(t,e,i)}function iy(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=Xe(t),e===n?(e=t,t=0):e=Xe(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+Df("1e-"+((h+"").length-1))),e)}return io(t,e)}var oy=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(af,jf).replace(xf,"")}function sy(t,e,i){t=At(t),e=he(e);var s=t.length;i=i===n?s:dn(dt(i),0,s);var h=i;return i-=e.length,i>=0&&t.slice(i,h)==e}function ay(t){return t=At(t),t&&qc.test(t)?t.replace(ls,Yf):t}function uy(t){return t=At(t),t&&Gc.test(t)?t.replace(xi,"\\$&"):t}var cy=Bn(function(t,e,i){return t+(i?"-":"")+e.toLowerCase()}),fy=Bn(function(t,e,i){return t+(i?" ":"")+e.toLowerCase()}),hy=Fa("toLowerCase");function ly(t,e,i){t=At(t),e=dt(e);var s=e?xn(t):0;if(!e||s>=e)return t;var h=(e-s)/2;return Gr(Br(h),i)+t+Gr(Nr(h),i)}function py(t,e,i){t=At(t),e=dt(e);var s=e?xn(t):0;return e&&s<e?t+Gr(e-s,i):t}function dy(t,e,i){t=At(t),e=dt(e);var s=e?xn(t):0;return e&&s<e?Gr(e-s,i)+t:t}function gy(t,e,i){return i||e==null?e=0:e&&(e=+e),Ch(At(t).replace(Ei,""),e||0)}function yy(t,e,i){return(i?te(t,e,i):e===n)?e=1:e=dt(e),oo(At(t),e)}function vy(){var t=arguments,e=At(t[0]);return t.length<3?e:e.replace(t[1],t[2])}var my=Bn(function(t,e,i){return t+(i?"_":"")+e.toLowerCase()});function _y(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 wy=Bn(function(t,e,i){return t+(i?" ":"")+No(e)});function by(t,e,i){return t=At(t),i=i==null?0:dn(dt(i),0,t.length),e=he(e),t.slice(i,i+e.length)==e}function Cy(t,e,i){var s=y.templateSettings;i&&te(t,e,i)&&(e=n),t=At(t),e=ii({},e,s,Xa);var h=ii({},e.imports,s.imports,Xa),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?tf:vr).source+"|"+(e.evaluate||vr).source+"|$","g"),tt="//# sourceURL="+(Et.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++If+"]")+`
|
|
16
|
+
`;t.replace(j,function(st,vt,_t,pe,ee,de){return _t||(_t=pe),W+=t.slice(M,de).replace(uf,Vf),vt&&(S=!0,W+=`' +
|
|
17
17
|
__e(`+vt+`) +
|
|
18
18
|
'`),ee&&(E=!0,W+=`';
|
|
19
19
|
`+ee+`;
|
|
20
|
-
__p += '`),
|
|
21
|
-
((__t = (`+
|
|
20
|
+
__p += '`),_t&&(W+=`' +
|
|
21
|
+
((__t = (`+_t+`)) == null ? '' : __t) +
|
|
22
22
|
'`),M=de+st.length,st}),W+=`';
|
|
23
23
|
`;var ot=Et.call(e,"variable")&&e.variable;if(!ot)W=`with (obj) {
|
|
24
24
|
`+W+`
|
|
25
25
|
}
|
|
26
|
-
`;else if(
|
|
26
|
+
`;else if(Zc.test(ot))throw new ft(d);W=(E?W.replace(Dc,""):W).replace(Pc,"$1").replace(Fc,"$1;"),W="function("+(ot||"obj")+`) {
|
|
27
27
|
`+(ot?"":`obj || (obj = {});
|
|
28
28
|
`)+"var __t, __p = ''"+(S?", __e = _.escape":"")+(E?`, __j = Array.prototype.join;
|
|
29
29
|
function print() { __p += __j.call(arguments, '') }
|
|
30
30
|
`:`;
|
|
31
31
|
`)+W+`return __p
|
|
32
|
-
}`;var gt=Pu(function(){return Ct(m,tt+"return "+W).apply(n,C)});if(gt.source=W,To(gt))throw gt;return gt}function gy(t){return At(t).toLowerCase()}function yy(t){return At(t).toUpperCase()}function vy(t,e,r){if(t=At(t),t&&(r||e===n))return $s(t);if(!t||!(e=he(e)))return t;var s=Ae(t),h=Ae(e),m=Gs(s,h),C=Js(s,h)+1;return rn(s,m,C).join("")}function my(t,e,r){if(t=At(t),t&&(r||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 wy(t,e,r){if(t=At(t),t&&(r||e===n))return t.replace(Ei,"");if(!t||!(e=he(e)))return t;var s=Ae(t),h=Gs(s,Ae(e));return rn(s,h).join("")}function _y(t,e){var r=N,s=H;if(Nt(e)){var h="separator"in e?e.separator:h;r="length"in e?dt(e.length):r,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(r>=m)return t;var S=r-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=Ki(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 by(t){return t=At(t),t&&Ic.test(t)?t.replace(hs,Yf):t}var Cy=Nn(function(t,e,r){return t+(r?" ":"")+e.toUpperCase()}),Bo=Fa("toUpperCase");function Du(t,e,r){return t=At(t),e=r?n:e,e===n?Xf(t)?Qf(t):Df(t):t.match(e)||[]}var Pu=yt(function(t,e){try{return ce(t,n,e)}catch(r){return To(r)?r:new ft(r)}}),Sy=He(function(t,e){return ye(e,function(r){r=Ue(r),qe(t,r,xo(t[r],t))}),t});function ky(t){var e=t==null?0:t.length,r=it();return t=e?Bt(t,function(s){if(typeof s[1]!="function")throw new ve(v);return[r(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 Ay(t){return Yh(we(t,g))}function No(t){return function(){return t}}function xy(t,e){return t==null||t!==t?e:t}var Ey=qa(),Ty=qa(!0);function oe(t){return t}function Lo(t){return ya(typeof t=="function"?t:we(t,g))}function Ry(t){return ma(we(t,g))}function Oy(t,e){return wa(t,we(e,g))}var Iy=yt(function(t,e){return function(r){return rr(r,t,e)}}),By=yt(function(t,e){return function(r){return rr(t,r,e)}});function Uo(t,e,r){var s=Wt(e),h=Mr(e,s);r==null&&!(Nt(e)&&(h.length||!s.length))&&(r=e,e=t,t=this,h=Mr(e,Wt(e)));var m=!(Nt(r)&&"chain"in r)||!!r.chain,C=Ke(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 Ny(){return zt._===this&&(zt._=oh),this}function Do(){}function Ly(t){return t=dt(t),yt(function(e){return _a(e,t)})}var Uy=lo(Bt),Dy=lo(Ws),Py=lo(Pi);function Fu(t){return _o(t)?Fi(Ue(t)):pl(t)}function Fy(t){return function(e){return t==null?n:gn(t,e)}}var My=Ha(),qy=Ha(!0);function Po(){return[]}function Fo(){return!1}function Wy(){return{}}function Hy(){return""}function zy(){return!0}function Ky(t,e){if(t=dt(t),t<1||t>ct)return[];var r=ae,s=Gt(t,ae);e=it(e),t-=ae;for(var h=Wi(s,e);++r<t;)e(r);return h}function Xy(t){return ht(t)?Bt(t,Ue):le(t)?[t]:ne(iu(At(t)))}function $y(t){var e=++rh;return At(t)+e}var Gy=Xr(function(t,e){return t+e},0),Jy=po("ceil"),jy=Xr(function(t,e){return t/e},1),Yy=po("floor");function Vy(t){return t&&t.length?Fr(t,oe,Zi):n}function Zy(t,e){return t&&t.length?Fr(t,it(e,2),Zi):n}function Qy(t){return Ks(t,oe)}function tv(t,e){return Ks(t,it(e,2))}function ev(t){return t&&t.length?Fr(t,oe,no):n}function nv(t,e){return t&&t.length?Fr(t,it(e,2),no):n}var rv=Xr(function(t,e){return t*e},1),iv=po("round"),ov=Xr(function(t,e){return t-e},0);function sv(t){return t&&t.length?qi(t,oe):0}function av(t,e){return t&&t.length?qi(t,it(e,2)):0}return y.after=Rd,y.ary=gu,y.assign=yg,y.assignIn=Ru,y.assignInWith=ii,y.assignWith=vg,y.at=mg,y.before=yu,y.bind=xo,y.bindAll=Sy,y.bindKey=vu,y.castArray=Wd,y.chain=lu,y.chunk=Yl,y.compact=Vl,y.concat=Zl,y.cond=ky,y.conforms=Ay,y.constant=No,y.countBy=sd,y.create=wg,y.curry=mu,y.curryRight=wu,y.debounce=_u,y.defaults=_g,y.defaultsDeep=bg,y.defer=Od,y.delay=Id,y.difference=Ql,y.differenceBy=tp,y.differenceWith=ep,y.drop=np,y.dropRight=rp,y.dropRightWhile=ip,y.dropWhile=op,y.fill=sp,y.filter=ud,y.flatMap=hd,y.flatMapDeep=ld,y.flatMapDepth=pd,y.flatten=uu,y.flattenDeep=ap,y.flattenDepth=up,y.flip=Bd,y.flow=Ey,y.flowRight=Ty,y.fromPairs=cp,y.functions=Tg,y.functionsIn=Rg,y.groupBy=dd,y.initial=hp,y.intersection=lp,y.intersectionBy=pp,y.intersectionWith=dp,y.invert=Ig,y.invertBy=Bg,y.invokeMap=yd,y.iteratee=Lo,y.keyBy=vd,y.keys=Wt,y.keysIn=ie,y.map=Zr,y.mapKeys=Lg,y.mapValues=Ug,y.matches=Ry,y.matchesProperty=Oy,y.memoize=ti,y.merge=Dg,y.mergeWith=Ou,y.method=Iy,y.methodOf=By,y.mixin=Uo,y.negate=ei,y.nthArg=Ly,y.omit=Pg,y.omitBy=Fg,y.once=Nd,y.orderBy=md,y.over=Uy,y.overArgs=Ld,y.overEvery=Dy,y.overSome=Py,y.partial=Eo,y.partialRight=bu,y.partition=wd,y.pick=Mg,y.pickBy=Iu,y.property=Fu,y.propertyOf=Fy,y.pull=mp,y.pullAll=fu,y.pullAllBy=wp,y.pullAllWith=_p,y.pullAt=bp,y.range=My,y.rangeRight=qy,y.rearg=Ud,y.reject=Cd,y.remove=Cp,y.rest=Dd,y.reverse=ko,y.sampleSize=kd,y.set=Wg,y.setWith=Hg,y.shuffle=Ad,y.slice=Sp,y.sortBy=Td,y.sortedUniq=Op,y.sortedUniqBy=Ip,y.split=hy,y.spread=Pd,y.tail=Bp,y.take=Np,y.takeRight=Lp,y.takeRightWhile=Up,y.takeWhile=Dp,y.tap=Vp,y.throttle=Fd,y.thru=Vr,y.toArray=xu,y.toPairs=Bu,y.toPairsIn=Nu,y.toPath=Xy,y.toPlainObject=Tu,y.transform=zg,y.unary=Md,y.union=Pp,y.unionBy=Fp,y.unionWith=Mp,y.uniq=qp,y.uniqBy=Wp,y.uniqWith=Hp,y.unset=Kg,y.unzip=Ao,y.unzipWith=hu,y.update=Xg,y.updateWith=$g,y.values=Dn,y.valuesIn=Gg,y.without=zp,y.words=Du,y.wrap=qd,y.xor=Kp,y.xorBy=Xp,y.xorWith=$p,y.zip=Gp,y.zipObject=Jp,y.zipObjectDeep=jp,y.zipWith=Yp,y.entries=Bu,y.entriesIn=Nu,y.extend=Ru,y.extendWith=ii,Uo(y,y),y.add=Gy,y.attempt=Pu,y.camelCase=Vg,y.capitalize=Lu,y.ceil=Jy,y.clamp=Jg,y.clone=Hd,y.cloneDeep=Kd,y.cloneDeepWith=Xd,y.cloneWith=zd,y.conformsTo=$d,y.deburr=Uu,y.defaultTo=xy,y.divide=jy,y.endsWith=Zg,y.eq=Ee,y.escape=Qg,y.escapeRegExp=ty,y.every=ad,y.find=cd,y.findIndex=su,y.findKey=Cg,y.findLast=fd,y.findLastIndex=au,y.findLastKey=Sg,y.floor=Yy,y.forEach=pu,y.forEachRight=du,y.forIn=kg,y.forInRight=Ag,y.forOwn=xg,y.forOwnRight=Eg,y.get=Oo,y.gt=Gd,y.gte=Jd,y.has=Og,y.hasIn=Io,y.head=cu,y.identity=oe,y.includes=gd,y.indexOf=fp,y.inRange=jg,y.invoke=Ng,y.isArguments=mn,y.isArray=ht,y.isArrayBuffer=jd,y.isArrayLike=re,y.isArrayLikeObject=Ut,y.isBoolean=Yd,y.isBuffer=on,y.isDate=Vd,y.isElement=Zd,y.isEmpty=Qd,y.isEqual=tg,y.isEqualWith=eg,y.isError=To,y.isFinite=ng,y.isFunction=Ke,y.isInteger=Cu,y.isLength=ni,y.isMap=Su,y.isMatch=rg,y.isMatchWith=ig,y.isNaN=og,y.isNative=sg,y.isNil=ug,y.isNull=ag,y.isNumber=ku,y.isObject=Nt,y.isObjectLike=Lt,y.isPlainObject=cr,y.isRegExp=Ro,y.isSafeInteger=cg,y.isSet=Au,y.isString=ri,y.isSymbol=le,y.isTypedArray=Un,y.isUndefined=fg,y.isWeakMap=hg,y.isWeakSet=lg,y.join=gp,y.kebabCase=ey,y.last=be,y.lastIndexOf=yp,y.lowerCase=ny,y.lowerFirst=ry,y.lt=pg,y.lte=dg,y.max=Vy,y.maxBy=Zy,y.mean=Qy,y.meanBy=tv,y.min=ev,y.minBy=nv,y.stubArray=Po,y.stubFalse=Fo,y.stubObject=Wy,y.stubString=Hy,y.stubTrue=zy,y.multiply=rv,y.nth=vp,y.noConflict=Ny,y.noop=Do,y.now=Qr,y.pad=iy,y.padEnd=oy,y.padStart=sy,y.parseInt=ay,y.random=Yg,y.reduce=_d,y.reduceRight=bd,y.repeat=uy,y.replace=cy,y.result=qg,y.round=iv,y.runInContext=x,y.sample=Sd,y.size=xd,y.snakeCase=fy,y.some=Ed,y.sortedIndex=kp,y.sortedIndexBy=Ap,y.sortedIndexOf=xp,y.sortedLastIndex=Ep,y.sortedLastIndexBy=Tp,y.sortedLastIndexOf=Rp,y.startCase=ly,y.startsWith=py,y.subtract=ov,y.sum=sv,y.sumBy=av,y.template=dy,y.times=Ky,y.toFinite=Xe,y.toInteger=dt,y.toLength=Eu,y.toLower=gy,y.toNumber=Ce,y.toSafeInteger=gg,y.toString=At,y.toUpper=yy,y.trim=vy,y.trimEnd=my,y.trimStart=wy,y.truncate=_y,y.unescape=by,y.uniqueId=$y,y.upperCase=Cy,y.upperFirst=Bo,y.each=pu,y.eachRight=du,y.first=cu,Uo(y,function(){var t={};return Ne(y,function(e,r){Et.call(y.prototype,r)||(t[r]=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(r){r=r===n?1:Mt(dt(r),0);var s=this.__filtered__&&!e?new mt(this):this.clone();return s.__filtered__?s.__takeCount__=Gt(r,s.__takeCount__):s.__views__.push({size:Gt(r,ae),type:t+(s.__dir__<0?"Right":"")}),s},mt.prototype[t+"Right"]=function(r){return this.reverse()[t](r).reverse()}}),ye(["filter","map","takeWhile"],function(t,e){var r=e+1,s=r==F||r==ut;mt.prototype[t]=function(h){var m=this.clone();return m.__iteratees__.push({iteratee:it(h,3),type:r}),m.__filtered__=m.__filtered__||s,m}}),ye(["head","last"],function(t,e){var r="take"+(e?"Right":"");mt.prototype[t]=function(){return this[r](1).value()[0]}}),ye(["initial","tail"],function(t,e){var r="drop"+(e?"":"Right");mt.prototype[t]=function(){return this.__filtered__?new mt(this):this[r](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(r){return rr(r,t,e)})}),mt.prototype.reject=function(t){return this.filter(ei(it(t)))},mt.prototype.slice=function(t,e){t=dt(t);var r=this;return r.__filtered__&&(t>0||e<0)?new mt(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==n&&(e=dt(e),r=e<0?r.dropRight(-e):r.take(e-t)),r)},mt.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},mt.prototype.toArray=function(){return this.take(ae)},Ne(mt.prototype,function(t,e){var r=/^(?: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 wt=h.apply(y,Ve([vt],S));return s&&j?wt[0]:wt};q&&r&&typeof M=="function"&&M.length!=1&&(E=q=!1);var j=this.__chain__,tt=!!this.__actions__.length,ot=m&&!j,gt=E&&!tt;if(!m&&q){C=gt?C:new mt(this);var st=t.apply(C,S);return st.__actions__.push({func:Vr,args:[W],thisArg:n}),new me(st,j)}return ot&>?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],r=/^(?: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[r](function(C){return e.apply(ht(C)?C:[],h)})}}),Ne(mt.prototype,function(t,e){var r=y[e];if(r){var s=r.name+"";Et.call(On,s)||(On[s]=[]),On[s].push({name:e,func:r})}}),On[Kr(n,L).name]=[{name:"wrapper",func:n}],mt.prototype.clone=bh,mt.prototype.reverse=Ch,mt.prototype.value=Sh,y.prototype.at=Zp,y.prototype.chain=Qp,y.prototype.commit=td,y.prototype.next=ed,y.prototype.plant=rd,y.prototype.reverse=id,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=od,y.prototype.first=y.prototype.head,Yn&&(y.prototype[Yn]=nd),y},En=th();fn?((fn.exports=En)._=En,Ni._=En):zt._=En}).call(fr)})(ui,ui.exports);var vv=ui.exports;const mv={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 wv(){return function i(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 w=n[d]={exports:{}};o[d][0].call(w.exports,function(g){var l=o[d][1][g];return c(l||g)},w,w.exports,i,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(i,o){o.exports=i("./lib/")},{"./lib/":2}],2:[function(i,o,n){function a(p,w){typeof p=="object"&&(w=p,p=void 0),w=w||{};var g,l=c(p),u=l.source,_=l.id;return w.forceNew||w["force new connection"]||w.multiplex===!1?(d("ignoring socket cache for %s",u),g=v(u,w)):(b[_]||(d("new io instance for %s",u),b[_]=v(u,w)),g=b[_]),g.socket(l.path)}var c=i("./url"),f=i("socket.io-parser"),v=i("./manager"),d=i("debug")("socket.io-client");o.exports=n=a;var b=n.managers={};n.protocol=f.protocol,n.connect=a,n.Manager=i("./manager"),n.Socket=i("./socket")},{"./manager":3,"./socket":5,"./url":6,debug:10,"socket.io-parser":44}],3:[function(i,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=(i("./url"),i("engine.io-client")),c=i("./socket"),f=i("component-emitter"),v=i("socket.io-parser"),d=i("./on"),b=i("component-bind"),p=(i("object-component"),i("debug")("socket.io-client:manager")),w=i("indexof"),g=i("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,_=this;this.readyState="opening",this.skipReconnect=!1;var A=d(u,"open",function(){_.onopen(),l&&l()}),k=d(u,"error",function(J){if(p("connect_error"),_.cleanup(),_.readyState="closed",_.emitAll("connect_error",J),l){var B=new Error("Connection error");B.data=J,l(B)}else _.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"),_.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 _=this;u.on("connect",function(){u.id=_.engine.id,~w(_.connected,u)||_.connected.push(u)})}return u},n.prototype.destroy=function(l){var u=w(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(_){for(var A=0;A<_.length;A++)u.engine.write(_[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 _=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(_)}})}},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(i,o){function n(a,c,f){return a.on(c,f),{destroy:function(){a.removeListener(c,f)}}}o.exports=n},{}],5:[function(i,o,n){function a(u,_){this.io=u,this.nsp=_,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=i("socket.io-parser"),f=i("component-emitter"),v=i("to-array"),d=i("./on"),b=i("component-bind"),p=i("debug")("socket.io-client:socket"),w=i("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 _=v(arguments),A=c.EVENT;w(_)&&(A=c.BINARY_EVENT);var k={type:A,data:_};return typeof _[_.length-1]=="function"&&(p("emitting packet with ack id %d",this.ids),this.acks[this.ids]=_.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 _=u.data||[];p("emitting event %j",_),u.id!=null&&(p("attaching ack callback to event"),_.push(this.ack(u.id))),this.connected?l.apply(this,_):this.receiveBuffer.push(_)},a.prototype.ack=function(u){var _=this,A=!1;return function(){if(!A){A=!0;var k=v(arguments);p("sending ack %j",k);var L=w(k)?c.BINARY_ACK:c.ACK;_.packet({type:L,id:u,data:k})}}},a.prototype.onack=function(u){p("calling ack %s with %j",u.id,u.data);var _=this.acks[u.id];_.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(i,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=i("parseuri"),f=i("debug")("socket.io-client:url");o.exports=a}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{debug:10,parseuri:42}],7:[function(i,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(i,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(i,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(i,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(i,o){o.exports=i("./lib/")},{"./lib/":12}],12:[function(i,o){o.exports=i("./socket"),o.exports.parser=i("engine.io-parser")},{"./socket":13,"engine.io-parser":25}],13:[function(i,o){(function(n){function a(u,_){if(!(this instanceof a))return new a(u,_);if(_=_||{},u&&typeof u=="object"&&(_=u,u=null),u&&(u=w(u),_.host=u.host,_.secure=u.protocol=="https"||u.protocol=="wss",_.port=u.port,u.query&&(_.query=u.query)),this.secure=_.secure!=null?_.secure:n.location&&location.protocol=="https:",_.host){var A=_.host.split(":");_.hostname=A.shift(),A.length?_.port=A.pop():_.port||(_.port=this.secure?"443":"80")}this.agent=_.agent||!1,this.hostname=_.hostname||(n.location?location.hostname:"localhost"),this.port=_.port||(n.location&&location.port?location.port:this.secure?443:80),this.query=_.query||{},typeof this.query=="string"&&(this.query=l.decode(this.query)),this.upgrade=_.upgrade!==!1,this.path=(_.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!_.forceJSONP,this.jsonp=_.jsonp!==!1,this.forceBase64=!!_.forceBase64,this.enablesXDR=!!_.enablesXDR,this.timestampParam=_.timestampParam||"t",this.timestampRequests=_.timestampRequests,this.transports=_.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.callbackBuffer=[],this.policyPort=_.policyPort||843,this.rememberUpgrade=_.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=_.onlyBinaryUpgrades,this.pfx=_.pfx||null,this.key=_.key||null,this.passphrase=_.passphrase||null,this.cert=_.cert||null,this.ca=_.ca||null,this.ciphers=_.ciphers||null,this.rejectUnauthorized=_.rejectUnauthorized||null,this.open()}function c(u){var _={};for(var A in u)u.hasOwnProperty(A)&&(_[A]=u[A]);return _}var f=i("./transports"),v=i("component-emitter"),d=i("debug")("engine.io-client:socket"),b=i("indexof"),p=i("engine.io-parser"),w=i("parseuri"),g=i("parsejson"),l=i("parseqs");o.exports=a,a.priorWebsocketSuccess=!1,v(a.prototype),a.protocol=p.protocol,a.Socket=a,a.Transport=i("./transport"),a.transports=i("./transports"),a.parser=i("engine.io-parser"),a.prototype.createTransport=function(u){d('creating transport "%s"',u);var _=c(this.query);_.EIO=p.protocol,_.transport=u,this.id&&(_.sid=this.id);var A=new f[u]({agent:this.agent,hostname:this.hostname,port:this.port,secure:this.secure,path:this.path,query:_,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 _;if(this.rememberUpgrade&&a.priorWebsocketSuccess&&this.transports.indexOf("websocket")!=-1)_="websocket";else{if(this.transports.length==0){var u=this;return void setTimeout(function(){u.emit("error","No transports available")},0)}_=this.transports[0]}this.readyState="opening";var _;try{_=this.createTransport(_)}catch{return this.transports.shift(),void this.open()}_.open(),this.setTransport(_)},a.prototype.setTransport=function(u){d("setting transport %s",u.name);var _=this;this.transport&&(d("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=u,u.on("drain",function(){_.onDrain()}).on("packet",function(A){_.onPacket(A)}).on("error",function(A){_.onError(A)}).on("close",function(){_.onClose("transport close")})},a.prototype.probe=function(u){function _(){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"),B(),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 N=new Error("probe error");N.transport=U.name,I.emit("upgradeError",N)}}))}function A(){T||(T=!0,B(),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 B(){U.removeListener("open",_),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",_),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,_=this.upgrades.length;_>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 _=new Error("server error");_.code=u.data,this.emit("error",_);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 _=this;_.pingTimeoutTimer=setTimeout(function(){_.readyState!="closed"&&_.onClose("ping timeout")},u||_.pingInterval+_.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,_){return this.sendPacket("message",u,_),this},a.prototype.sendPacket=function(u,_,A){if(this.readyState!="closing"&&this.readyState!="closed"){var k={type:u,data:_};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 _(){k.removeListener("upgrade",_),k.removeListener("upgradeError",_),u()}function A(){k.once("upgrade",_),k.once("upgradeError",_)}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,_){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,_)}},a.prototype.filterUpgrades=function(u){for(var _=[],A=0,k=u.length;k>A;A++)~b(this.transports,u[A])&&_.push(u[A]);return _}}).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(i,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=i("engine.io-parser"),c=i("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(i,o,n){(function(a){function c(p){var w,g=!1,l=!1,u=p.jsonp!==!1;if(a.location){var _=location.protocol=="https:",A=location.port;A||(A=_?443:80),g=p.hostname!=location.hostname||A!=p.port,l=p.secure!=_}if(p.xdomain=g,p.xscheme=l,w=new f(p),"open"in w&&!p.forceJSONP)return new v(p);if(!u)throw new Error("JSONP disabled");return new d(p)}var f=i("xmlhttprequest"),v=i("./polling-xhr"),d=i("./polling-jsonp"),b=i("./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(i,o){(function(n){function a(){}function c(w){f.call(this,w),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=i("./polling"),v=i("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 w=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",_)};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 _=document.createElement("iframe");document.body.appendChild(_),document.body.removeChild(_)},100)},c.prototype.doWrite=function(w,g){function l(){u(),g()}function u(){if(_.iframe)try{_.form.removeChild(_.iframe)}catch(B){_.onError("jsonp polling iframe removal error",B)}try{var J='<iframe src="javascript:0" name="'+_.iframeId+'">';A=document.createElement(J)}catch{A=document.createElement("iframe"),A.name=_.iframeId,A.src="javascript:0"}A.id=_.iframeId,_.form.appendChild(A),_.iframe=A}var _=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(),w=w.replace(p,`\\
|
|
33
|
-
`),this.area.value=w.replace(b,"\\n");try{this.form.submit()}catch{}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){_.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(i,o){(function(n){function a(){}function c(l){if(b.call(this,l),n.location){var u=location.protocol=="https:",_=location.port;_||(_=u?443:80),this.xd=l.hostname!=n.location.hostname||_!=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=i("xmlhttprequest"),b=i("./polling"),p=i("component-emitter"),w=i("component-inherit"),g=i("debug")("engine.io-client:polling-xhr");o.exports=c,o.exports.Request=f,w(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 _=typeof l!="string"&&l!==void 0,A=this.request({method:"POST",data:l,isBinary:_}),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(_){u.onData(_)}),l.on("error",function(_){u.onError("xhr poll error",_)}),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),_=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(){_.onLoad()},u.onerror=function(){_.onError(u.responseText)}):u.onreadystatechange=function(){u.readyState==4&&(u.status==200||u.status==1223?_.onLoad():setTimeout(function(){_.onError(u.status)},0))},g("xhr data %s",this.data),u.send(this.data)}catch(A){return void setTimeout(function(){_.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(_){this.onError(_)}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(i,o){function n(p){var w=p&&p.forceBase64;(!b||w)&&(this.supportsBinary=!1),a.call(this,p)}var a=i("../transport"),c=i("parseqs"),f=i("engine.io-parser"),v=i("component-inherit"),d=i("debug")("engine.io-client:polling");o.exports=n;var b=function(){var p=i("xmlhttprequest"),w=new p({xdomain:!1});return w.responseType!=null}();v(n,a),n.prototype.name="polling",n.prototype.doOpen=function(){this.poll()},n.prototype.pause=function(p){function w(){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||w()})),this.writable||(d("we are currently writing - waiting to pause"),l++,this.once("drain",function(){d("pre-pause writing complete"),--l||w()}))}else w()},n.prototype.poll=function(){d("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},n.prototype.onData=function(p){var w=this;d("polling got data %s",p);var g=function(l){return w.readyState=="opening"&&w.onOpen(),l.type=="close"?(w.onClose(),!1):void w.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"),w.write([{type:"close"}])}var w=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 w=function(){g.writable=!0,g.emit("drain")},g=this;f.encodePayload(p,this.supportsBinary,function(l){g.doWrite(l,w)})},n.prototype.uri=function(){var p=this.query||{},w=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&&(w=="https"&&this.port!=443||w=="http"&&this.port!=80)&&(g=":"+this.port),p.length&&(p="?"+p),w+"://"+this.hostname+g+this.path+p}},{"../transport":14,"component-inherit":21,debug:22,"engine.io-parser":25,parseqs:33,xmlhttprequest:20}],19:[function(i,o){function n(p){var w=p&&p.forceBase64;w&&(this.supportsBinary=!1),a.call(this,p)}var a=i("../transport"),c=i("engine.io-parser"),f=i("parseqs"),v=i("component-inherit"),d=i("debug")("engine.io-client:websocket"),b=i("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(),w=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,w,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(w){p.onData(w.data)},this.ws.onerror=function(w){p.onError("websocket error",w)}},typeof navigator<"u"&&/iPad|iPhone|iPod/i.test(navigator.userAgent)&&(n.prototype.onData=function(p){var w=this;setTimeout(function(){a.prototype.onData.call(w,p)},0)}),n.prototype.write=function(p){function w(){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(_){try{g.ws.send(_)}catch{d("websocket closed before onclose event")}});setTimeout(w,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||{},w=this.secure?"wss":"ws",g="";return this.port&&(w=="wss"&&this.port!=443||w=="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),w+"://"+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(i,o){var n=i("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(i,o){o.exports=function(n,a){var c=function(){};c.prototype=a.prototype,n.prototype=new c,n.prototype.constructor=n}},{}],22:[function(i,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 w="color: "+this.color;b=[b[0],w,"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,w),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=i("./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(i,o,n){function a(){return n.colors[w++%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 B=u.log||n.log||console.log.bind(console);B.apply(A,Y)}l.enabled=!1,u.enabled=!0;var _=n.enabled(g)?u:l;return _.namespace=g,_}function f(g){n.save(g);for(var l=(g||"").split(/[\s,]+/),u=l.length,_=0;u>_;_++)l[_]&&(g=l[_].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=i("ms"),n.names=[],n.skips=[],n.formatters={};var p,w=0},{ms:24}],24:[function(i,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]),_=(l[2]||"ms").toLowerCase();switch(_){case"years":case"year":case"y":return u*w;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,w=365.25*p;o.exports=function(g,l){return l=l||{},typeof g=="string"?n(g):l.long?c(g):a(g)}},{}],25:[function(i,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,N=new Uint8Array(R),H=new Uint8Array(1+R.byteLength);H[0]=Y[T.type];for(var K=0;K<N.length;K++)H[K+1]=N[K];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 N=new U([R.buffer,T.data]);return P(N)}function b(T,I,P){for(var R=new Array(T.length),N=u(T.length,P),H=function($,F,lt){I(F,function(ut,xt){R[$]=xt,lt(ut,R)})},K=0;K<T.length;K++)H(K,T[K],N)}var p=i("./keys"),w=i("has-binary"),g=i("arraybuffer.slice"),l=i("base64-arraybuffer"),u=i("after"),_=i("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),B={type:"error",data:"parser error"},U=i("blob");n.encodePacket=function(T,I,P,R){typeof I=="function"&&(R=I,I=!1),typeof P=="function"&&(R=P,P=null);var N=T.data===void 0?void 0:T.data.buffer||T.data;if(a.ArrayBuffer&&N instanceof ArrayBuffer)return f(T,I,R);if(U&&N instanceof a.Blob)return d(T,I,R);if(N&&N.base64)return c(T,R);var H=Y[T.type];return T.data!==void 0&&(H+=P?_.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 N;try{N=String.fromCharCode.apply(null,new Uint8Array(T.data))}catch{for(var H=new Uint8Array(T.data),K=new Array(H.length),$=0;$<H.length;$++)K[$]=H[$];N=String.fromCharCode.apply(null,K)}return P+=a.btoa(N),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=_.decode(T)}catch{return B}var N=T.charAt(0);return Number(N)==N&&J[N]?T.length>1?{type:J[N],data:T.substring(1)}:{type:J[N]}:B}var R=new Uint8Array(T),N=R[0],H=g(T,1);return U&&I==="blob"&&(H=new U([H])),{type:J[N],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(K){return K.length+":"+K}function N(K,$){n.encodePacket(K,H?I:!1,!0,function(F){$(null,R(F))})}typeof I=="function"&&(P=I,I=null);var H=w(T);return I&&H?U&&!L?n.encodePayloadAsBlob(T,P):n.encodePayloadAsArrayBuffer(T,P):T.length?void b(T,N,function(K,$){return P($.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(B,0,1);for(var N,H,K="",$=0,F=T.length;F>$;$++){var lt=T.charAt($);if(lt!=":")K+=lt;else{if(K==""||K!=(N=Number(K))||(H=T.substr($+1,N),K!=H.length))return P(B,0,1);if(H.length){if(R=n.decodePacket(H,I,!0),B.type==R.type&&B.data==R.data)return P(B,0,1);var ut=P(R,$+N,F);if(ut===!1)return}$+=N,K=""}}return K!=""?P(B,0,1):void 0},n.encodePayloadAsArrayBuffer=function(T,I){function P(R,N){n.encodePacket(R,!0,!0,function(H){return N(null,H)})}return T.length?void b(T,P,function(R,N){var H=N.reduce(function(F,lt){var ut;return ut=typeof lt=="string"?lt.length:lt.byteLength,F+ut.toString().length+ut+2},0),K=new Uint8Array(H),$=0;return N.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}K[$++]=lt?0:1;for(var Xt=ut.byteLength.toString(),ct=0;ct<Xt.length;ct++)K[$++]=parseInt(Xt[ct]);K[$++]=255;for(var xt=new Uint8Array(ut),ct=0;ct<xt.length;ct++)K[$++]=xt[ct]}),I(K.buffer)}):I(new ArrayBuffer(0))},n.encodePayloadAsBlob=function(T,I){function P(R,N){n.encodePacket(R,!0,!0,function(H){var K=new Uint8Array(1);if(K[0]=1,typeof H=="string"){for(var $=new Uint8Array(H.length),F=0;F<H.length;F++)$[F]=H.charCodeAt(F);H=$.buffer,K[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([K.buffer,xt.buffer,H]);N(null,ct)}})}b(T,P,function(R,N){return I(new U(N))})},n.decodePayloadAsBinary=function(T,I,P){typeof I=="function"&&(P=I,I=null);for(var R=T,N=[],H=!1;R.byteLength>0;){for(var K=new Uint8Array(R),$=K[0]===0,F="",lt=1;K[lt]!=255;lt++){if(F.length>310){H=!0;break}F+=K[lt]}if(H)return P(B,0,1);R=g(R,2+F.length),F=parseInt(F);var ut=g(R,0,F);if($)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])}N.push(ut),R=g(R,F)}var ct=N.length;N.forEach(function(Xt,Oe){P(n.decodePacket(Xt,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(i,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(i,o){function n(c,f,v){function d(p,w){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,w)}var b=!1;return v=v||a,d.count=c,c===0?f():d}function a(){}o.exports=n},{}],28:[function(i,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(i,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,w=.75*c.length,g=c.length,l=0;c[c.length-1]==="="&&(w--,c[c.length-2]==="="&&w--);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]),_[l++]=v<<2|d>>4,_[l++]=(15&d)<<4|b>>2,_[l++]=(3&b)<<6|63&p;return u}})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},{}],30:[function(i,o){(function(n){function a(w){for(var g=0;g<w.length;g++){var l=w[g];if(l.buffer instanceof ArrayBuffer){var u=l.buffer;if(l.byteLength!==u.byteLength){var _=new Uint8Array(l.byteLength);_.set(new Uint8Array(u,l.byteOffset,l.byteLength)),u=_.buffer}w[g]=u}}}function c(w,g){g=g||{};var l=new v;a(w);for(var u=0;u<w.length;u++)l.append(w[u]);return g.type?l.getBlob(g.type):l.getBlob()}function f(w,g){return a(w),new Blob(w,g||{})}var v=n.BlobBuilder||n.WebKitBlobBuilder||n.MSBlobBuilder||n.MozBlobBuilder,d=function(){try{var w=new Blob(["hi"]);return w.size===2}catch{return!1}}(),b=d&&function(){try{var w=new Blob([new Uint8Array([1,2])]);return w.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(i,o,n){(function(a){(function(c){function f(R){for(var N,H,K=[],$=0,F=R.length;F>$;)N=R.charCodeAt($++),N>=55296&&56319>=N&&F>$?(H=R.charCodeAt($++),(64512&H)==56320?K.push(((1023&N)<<10)+(1023&H)+65536):(K.push(N),$--)):K.push(N);return K}function v(R){for(var N,H=R.length,K=-1,$="";++K<H;)N=R[K],N>65535&&(N-=65536,$+=B(N>>>10&1023|55296),N=56320|1023&N),$+=B(N);return $}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,N){return B(R>>N&63|128)}function p(R){if(!(4294967168&R))return B(R);var N="";return 4294965248&R?4294901760&R?!(4292870144&R)&&(N=B(R>>18&7|240),N+=b(R,12),N+=b(R,6)):(d(R),N=B(R>>12&15|224),N+=b(R,6)):N=B(R>>6&31|192),N+=B(63&R|128)}function w(R){for(var N,H=f(R),K=H.length,$=-1,F="";++$<K;)N=H[$],F+=p(N);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,N,H,K,$;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 N=g();if($=(31&R)<<6|N,$>=128)return $;throw Error("Invalid continuation byte")}if((240&R)==224){if(N=g(),H=g(),$=(15&R)<<12|N<<6|H,$>=2048)return d($),$;throw Error("Invalid continuation byte")}if((248&R)==240&&(N=g(),H=g(),K=g(),$=(15&R)<<18|N<<12|H<<6|K,$>=65536&&1114111>=$))return $;throw Error("Invalid UTF-8 detected")}function u(R){L=f(R),Y=L.length,J=0;for(var N,H=[];(N=l())!==!1;)H.push(N);return v(H)}var _=typeof n=="object"&&n,A=typeof o=="object"&&o&&o.exports==_&&o,k=typeof a=="object"&&a;(k.global===k||k.window===k)&&(c=k);var L,Y,J,B=String.fromCharCode,U={version:"2.0.0",encode:w,decode:u};if(_&&!_.nodeType)if(A)A.exports=U;else{var T={},I=T.hasOwnProperty;for(var P in U)I.call(U,P)&&(_[P]=U[P])}else c.utf8=U})(this)}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],32:[function(i,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(i,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(i,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={},w=14;w--;)p[a[w]]=b[w]||"";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(i,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(i,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=i("isarray");o.exports=a}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{isarray:37}],37:[function(i,o){o.exports=Array.isArray||function(n){return Object.prototype.toString.call(n)=="[object Array]"}},{}],38:[function(i,o){var n=i("global");try{o.exports="XMLHttpRequest"in n&&"withCredentials"in new n.XMLHttpRequest}catch{o.exports=!1}},{global:39}],39:[function(i,o){o.exports=function(){return this}()},{}],40:[function(i,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(i,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(i,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(i,o,n){(function(a){var c=i("isarray"),f=i("./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),_=0;_<g.length;_++)u[_]=d(g[_]);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,w=v;return w.data=d(p),w.attachments=b.length,{packet:w,buffers:b}},n.reconstructPacket=function(v,d){function b(p){if(p&&p._placeholder){var w=d[p.num];return w}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 _=new FileReader;_.onload=function(){u?u[l]=this.result:w=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,w=v;b(w),p||d(w)}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./is-buffer":45,isarray:46}],44:[function(i,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)),w("encoded %j as %s",A,k),k}function f(A,k){function L(Y){var J=u.deconstructPacket(Y),B=c(J.packet),U=J.buffers;U.unshift(B),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 B=A.charAt(L+1);if(B!==""&&Number(B)==B){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 w("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 w=i("debug")("socket.io-parser"),g=i("json3"),l=(i("isarray"),i("component-emitter")),u=i("./binary"),_=i("./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(w("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(!_(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(i,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(i,o){o.exports=i(37)},{}],47:[function(i,o,n){(function(a){function c(G){if(c[G]!==d)return c[G];var Q;if(G=="bug-string-char-index")Q=!1;else if(G=="json")Q=c("json-stringify")&&c("json-parse");else{var X,rt='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if(G=="json-stringify"){var z=w.stringify,et=typeof z=="function"&&g;if(et){(X=function(){return 1}).toJSON=X;try{et=z(0)==="0"&&z(new Number)==="0"&&z(new String)=='""'&&z(b)===d&&z(d)===d&&z()===d&&z(X)==="1"&&z([X])=="[1]"&&z([d])=="[null]"&&z(null)=="null"&&z([d,b,null])=="[null,null,null]"&&z({a:[X,!0,!1,null,`\0\b
|
|
34
|
-
\f\r `]})==rt&&
|
|
32
|
+
}`;var gt=Pu(function(){return Ct(m,tt+"return "+W).apply(n,C)});if(gt.source=W,To(gt))throw gt;return gt}function Sy(t){return At(t).toLowerCase()}function ky(t){return At(t).toUpperCase()}function Ay(t,e,i){if(t=At(t),t&&(i||e===n))return Gs(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 xy(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 Ey(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 Ty(t,e){var i=B,s=H;if(Bt(e)){var h="separator"in e?e.separator:h;i="length"in e?dt(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 Ry(t){return t=At(t),t&&Mc.test(t)?t.replace(hs,ih):t}var Oy=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?Qf(t)?ah(t):zf(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)}}),Iy=He(function(t,e){return ye(e,function(i){i=Ue(i),qe(t,i,xo(t[i],t))}),t});function Ny(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 By(t){return il(_e(t,g))}function Bo(t){return function(){return t}}function Ly(t,e){return t==null||t!==t?e:t}var Uy=qa(),Dy=qa(!0);function oe(t){return t}function Lo(t){return ya(typeof t=="function"?t:_e(t,g))}function Py(t){return ma(_e(t,g))}function Fy(t,e){return _a(t,_e(e,g))}var My=yt(function(t,e){return function(i){return rr(i,t,e)}}),qy=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 Wy(){return Kt._===this&&(Kt._=ph),this}function Do(){}function Hy(t){return t=dt(t),yt(function(e){return wa(e,t)})}var Ky=lo(Nt),zy=lo(Ws),Xy=lo(Pi);function Fu(t){return wo(t)?Fi(Ue(t)):bl(t)}function Gy(t){return function(e){return t==null?n:gn(t,e)}}var $y=Ha(),Jy=Ha(!0);function Po(){return[]}function Fo(){return!1}function jy(){return{}}function Yy(){return""}function Vy(){return!0}function Zy(t,e){if(t=dt(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 Qy(t){return ht(t)?Nt(t,Ue):le(t)?[t]:ne(iu(At(t)))}function tv(t){var e=++hh;return At(t)+e}var ev=Xr(function(t,e){return t+e},0),nv=po("ceil"),rv=Xr(function(t,e){return t/e},1),iv=po("floor");function ov(t){return t&&t.length?Fr(t,oe,Zi):n}function sv(t,e){return t&&t.length?Fr(t,it(e,2),Zi):n}function av(t){return zs(t,oe)}function uv(t,e){return zs(t,it(e,2))}function cv(t){return t&&t.length?Fr(t,oe,no):n}function fv(t,e){return t&&t.length?Fr(t,it(e,2),no):n}var hv=Xr(function(t,e){return t*e},1),lv=po("round"),pv=Xr(function(t,e){return t-e},0);function dv(t){return t&&t.length?qi(t,oe):0}function gv(t,e){return t&&t.length?qi(t,it(e,2)):0}return y.after=Pd,y.ary=gu,y.assign=kg,y.assignIn=Ru,y.assignInWith=ii,y.assignWith=Ag,y.at=xg,y.before=yu,y.bind=xo,y.bindAll=Iy,y.bindKey=vu,y.castArray=jd,y.chain=lu,y.chunk=ip,y.compact=op,y.concat=sp,y.cond=Ny,y.conforms=By,y.constant=Bo,y.countBy=dd,y.create=Eg,y.curry=mu,y.curryRight=_u,y.debounce=wu,y.defaults=Tg,y.defaultsDeep=Rg,y.defer=Fd,y.delay=Md,y.difference=ap,y.differenceBy=up,y.differenceWith=cp,y.drop=fp,y.dropRight=hp,y.dropRightWhile=lp,y.dropWhile=pp,y.fill=dp,y.filter=yd,y.flatMap=_d,y.flatMapDeep=wd,y.flatMapDepth=bd,y.flatten=uu,y.flattenDeep=gp,y.flattenDepth=yp,y.flip=qd,y.flow=Uy,y.flowRight=Dy,y.fromPairs=vp,y.functions=Dg,y.functionsIn=Pg,y.groupBy=Cd,y.initial=_p,y.intersection=wp,y.intersectionBy=bp,y.intersectionWith=Cp,y.invert=Mg,y.invertBy=qg,y.invokeMap=kd,y.iteratee=Lo,y.keyBy=Ad,y.keys=Wt,y.keysIn=ie,y.map=Zr,y.mapKeys=Hg,y.mapValues=Kg,y.matches=Py,y.matchesProperty=Fy,y.memoize=ti,y.merge=zg,y.mergeWith=Ou,y.method=My,y.methodOf=qy,y.mixin=Uo,y.negate=ei,y.nthArg=Hy,y.omit=Xg,y.omitBy=Gg,y.once=Wd,y.orderBy=xd,y.over=Ky,y.overArgs=Hd,y.overEvery=zy,y.overSome=Xy,y.partial=Eo,y.partialRight=bu,y.partition=Ed,y.pick=$g,y.pickBy=Iu,y.property=Fu,y.propertyOf=Gy,y.pull=xp,y.pullAll=fu,y.pullAllBy=Ep,y.pullAllWith=Tp,y.pullAt=Rp,y.range=$y,y.rangeRight=Jy,y.rearg=Kd,y.reject=Od,y.remove=Op,y.rest=zd,y.reverse=ko,y.sampleSize=Nd,y.set=jg,y.setWith=Yg,y.shuffle=Bd,y.slice=Ip,y.sortBy=Dd,y.sortedUniq=Fp,y.sortedUniqBy=Mp,y.split=_y,y.spread=Xd,y.tail=qp,y.take=Wp,y.takeRight=Hp,y.takeRightWhile=Kp,y.takeWhile=zp,y.tap=od,y.throttle=Gd,y.thru=Vr,y.toArray=xu,y.toPairs=Nu,y.toPairsIn=Bu,y.toPath=Qy,y.toPlainObject=Tu,y.transform=Vg,y.unary=$d,y.union=Xp,y.unionBy=Gp,y.unionWith=$p,y.uniq=Jp,y.uniqBy=jp,y.uniqWith=Yp,y.unset=Zg,y.unzip=Ao,y.unzipWith=hu,y.update=Qg,y.updateWith=ty,y.values=Dn,y.valuesIn=ey,y.without=Vp,y.words=Du,y.wrap=Jd,y.xor=Zp,y.xorBy=Qp,y.xorWith=td,y.zip=ed,y.zipObject=nd,y.zipObjectDeep=rd,y.zipWith=id,y.entries=Nu,y.entriesIn=Bu,y.extend=Ru,y.extendWith=ii,Uo(y,y),y.add=ev,y.attempt=Pu,y.camelCase=oy,y.capitalize=Lu,y.ceil=nv,y.clamp=ny,y.clone=Yd,y.cloneDeep=Zd,y.cloneDeepWith=Qd,y.cloneWith=Vd,y.conformsTo=tg,y.deburr=Uu,y.defaultTo=Ly,y.divide=rv,y.endsWith=sy,y.eq=Ee,y.escape=ay,y.escapeRegExp=uy,y.every=gd,y.find=vd,y.findIndex=su,y.findKey=Og,y.findLast=md,y.findLastIndex=au,y.findLastKey=Ig,y.floor=iv,y.forEach=pu,y.forEachRight=du,y.forIn=Ng,y.forInRight=Bg,y.forOwn=Lg,y.forOwnRight=Ug,y.get=Oo,y.gt=eg,y.gte=ng,y.has=Fg,y.hasIn=Io,y.head=cu,y.identity=oe,y.includes=Sd,y.indexOf=mp,y.inRange=ry,y.invoke=Wg,y.isArguments=mn,y.isArray=ht,y.isArrayBuffer=rg,y.isArrayLike=re,y.isArrayLikeObject=Ut,y.isBoolean=ig,y.isBuffer=on,y.isDate=og,y.isElement=sg,y.isEmpty=ag,y.isEqual=ug,y.isEqualWith=cg,y.isError=To,y.isFinite=fg,y.isFunction=ze,y.isInteger=Cu,y.isLength=ni,y.isMap=Su,y.isMatch=hg,y.isMatchWith=lg,y.isNaN=pg,y.isNative=dg,y.isNil=yg,y.isNull=gg,y.isNumber=ku,y.isObject=Bt,y.isObjectLike=Lt,y.isPlainObject=cr,y.isRegExp=Ro,y.isSafeInteger=vg,y.isSet=Au,y.isString=ri,y.isSymbol=le,y.isTypedArray=Un,y.isUndefined=mg,y.isWeakMap=_g,y.isWeakSet=wg,y.join=Sp,y.kebabCase=cy,y.last=be,y.lastIndexOf=kp,y.lowerCase=fy,y.lowerFirst=hy,y.lt=bg,y.lte=Cg,y.max=ov,y.maxBy=sv,y.mean=av,y.meanBy=uv,y.min=cv,y.minBy=fv,y.stubArray=Po,y.stubFalse=Fo,y.stubObject=jy,y.stubString=Yy,y.stubTrue=Vy,y.multiply=hv,y.nth=Ap,y.noConflict=Wy,y.noop=Do,y.now=Qr,y.pad=ly,y.padEnd=py,y.padStart=dy,y.parseInt=gy,y.random=iy,y.reduce=Td,y.reduceRight=Rd,y.repeat=yy,y.replace=vy,y.result=Jg,y.round=lv,y.runInContext=x,y.sample=Id,y.size=Ld,y.snakeCase=my,y.some=Ud,y.sortedIndex=Np,y.sortedIndexBy=Bp,y.sortedIndexOf=Lp,y.sortedLastIndex=Up,y.sortedLastIndexBy=Dp,y.sortedLastIndexOf=Pp,y.startCase=wy,y.startsWith=by,y.subtract=pv,y.sum=dv,y.sumBy=gv,y.template=Cy,y.times=Zy,y.toFinite=Xe,y.toInteger=dt,y.toLength=Eu,y.toLower=Sy,y.toNumber=Ce,y.toSafeInteger=Sg,y.toString=At,y.toUpper=ky,y.trim=Ay,y.trimEnd=xy,y.trimStart=Ey,y.truncate=Ty,y.unescape=Ry,y.uniqueId=tv,y.upperCase=Oy,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(dt(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=dt(t);var i=this;return i.__filtered__&&(t>0||e<0)?new mt(i):(t<0?i=i.takeRight(-t):t&&(i=i.drop(t)),e!==n&&(e=dt(e),i=e<0?i.dropRight(-e):i.take(e-t)),i)},mt.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},mt.prototype.toArray=function(){return this.take(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,gt=E&&!tt;if(!m&&q){C=gt?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&>?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=Rh,mt.prototype.reverse=Oh,mt.prototype.value=Ih,y.prototype.at=sd,y.prototype.chain=ad,y.prototype.commit=ud,y.prototype.next=cd,y.prototype.plant=hd,y.prototype.reverse=ld,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=pd,y.prototype.first=y.prototype.head,Yn&&(y.prototype[Yn]=fd),y},En=uh();fn?((fn.exports=En)._=En,Bi._=En):Kt._=En}).call(fr)})(ui,ui.exports);var Av=ui.exports;const xv={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 Ev(){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(G,F,pt){I(F,function(ut,xt){R[G]=xt,pt(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),G=0;G<H.length;G++)z[G]=H[G];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,G){n.encodePacket(z,H?I:!1,!0,function(F){G(null,R(F))})}typeof I=="function"&&(P=I,I=null);var H=_(T);return I&&H?U&&!L?n.encodePayloadAsBlob(T,P):n.encodePayloadAsArrayBuffer(T,P):T.length?void b(T,B,function(z,G){return P(G.join(""))}):P("0:")},n.decodePayload=function(T,I,P){if(typeof T!="string")return n.decodePayloadAsBinary(T,I,P);typeof I=="function"&&(P=I,I=null);var R;if(T=="")return P(N,0,1);for(var B,H,z="",G=0,F=T.length;F>G;G++){var pt=T.charAt(G);if(pt!=":")z+=pt;else{if(z==""||z!=(B=Number(z))||(H=T.substr(G+1,B),z!=H.length))return P(N,0,1);if(H.length){if(R=n.decodePacket(H,I,!0),N.type==R.type&&N.data==R.data)return P(N,0,1);var ut=P(R,G+B,F);if(ut===!1)return}G+=B,z=""}}return z!=""?P(N,0,1):void 0},n.encodePayloadAsArrayBuffer=function(T,I){function P(R,B){n.encodePacket(R,!0,!0,function(H){return B(null,H)})}return T.length?void b(T,P,function(R,B){var H=B.reduce(function(F,pt){var ut;return ut=typeof pt=="string"?pt.length:pt.byteLength,F+ut.toString().length+ut+2},0),z=new Uint8Array(H),G=0;return B.forEach(function(F){var pt=typeof F=="string",ut=F;if(pt){for(var xt=new Uint8Array(F.length),ct=0;ct<F.length;ct++)xt[ct]=F.charCodeAt(ct);ut=xt.buffer}z[G++]=pt?0:1;for(var Xt=ut.byteLength.toString(),ct=0;ct<Xt.length;ct++)z[G++]=parseInt(Xt[ct]);z[G++]=255;for(var xt=new Uint8Array(ut),ct=0;ct<xt.length;ct++)z[G++]=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 G=new Uint8Array(H.length),F=0;F<H.length;F++)G[F]=H.charCodeAt(F);H=G.buffer,z[0]=0}for(var pt=H instanceof ArrayBuffer?H.byteLength:H.size,ut=pt.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),G=z[0]===0,F="",pt=1;z[pt]!=255;pt++){if(F.length>310){H=!0;break}F+=z[pt]}if(H)return P(N,0,1);R=g(R,2+F.length),F=parseInt(F);var ut=g(R,0,F);if(G)try{ut=String.fromCharCode.apply(null,new Uint8Array(ut))}catch{var xt=new Uint8Array(ut);ut="";for(var pt=0;pt<xt.length;pt++)ut+=String.fromCharCode(xt[pt])}B.push(ut),R=g(R,F)}var ct=B.length;B.forEach(function(Xt,Oe){P(n.decodePacket(Xt,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=[],G=0,F=R.length;F>G;)B=R.charCodeAt(G++),B>=55296&&56319>=B&&F>G?(H=R.charCodeAt(G++),(64512&H)==56320?z.push(((1023&B)<<10)+(1023&H)+65536):(z.push(B),G--)):z.push(B);return z}function v(R){for(var B,H=R.length,z=-1,G="";++z<H;)B=R[z],B>65535&&(B-=65536,G+=N(B>>>10&1023|55296),B=56320|1023&B),G+=N(B);return G}function d(R){if(R>=55296&&57343>=R)throw Error("Lone surrogate U+"+R.toString(16).toUpperCase()+" is not a scalar value")}function b(R,B){return N(R>>B&63|128)}function p(R){if(!(4294967168&R))return N(R);var B="";return 4294965248&R?4294901760&R?!(4292870144&R)&&(B=N(R>>18&7|240),B+=b(R,12),B+=b(R,6)):(d(R),B=N(R>>12&15|224),B+=b(R,6)):B=N(R>>6&31|192),B+=N(63&R|128)}function _(R){for(var B,H=f(R),z=H.length,G=-1,F="";++G<z;)B=H[G],F+=p(B);return F}function g(){if(J>=Y)throw Error("Invalid byte index");var R=255&L[J];if(J++,(192&R)==128)return 63&R;throw Error("Invalid continuation byte")}function l(){var R,B,H,z,G;if(J>Y)throw Error("Invalid byte index");if(J==Y)return!1;if(R=255&L[J],J++,(128&R)==0)return R;if((224&R)==192){var B=g();if(G=(31&R)<<6|B,G>=128)return G;throw Error("Invalid continuation byte")}if((240&R)==224){if(B=g(),H=g(),G=(15&R)<<12|B<<6|H,G>=2048)return d(G),G;throw Error("Invalid continuation byte")}if((248&R)==240&&(B=g(),H=g(),z=g(),G=(15&R)<<18|B<<12|H<<6|z,G>=65536&&1114111>=G))return G;throw Error("Invalid UTF-8 detected")}function u(R){L=f(R),Y=L.length,J=0;for(var B,H=[];(B=l())!==!1;)H.push(B);return v(H)}var w=typeof n=="object"&&n,A=typeof o=="object"&&o&&o.exports==w&&o,k=typeof 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 X,rt='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if($=="json-stringify"){var K=_.stringify,et=typeof K=="function"&&g;if(et){(X=function(){return 1}).toJSON=X;try{et=K(0)==="0"&&K(new Number)==="0"&&K(new String)=='""'&&K(b)===d&&K(d)===d&&K()===d&&K(X)==="1"&&K([X])=="[1]"&&K([d])=="[null]"&&K(null)=="null"&&K([d,b,null])=="[null,null,null]"&&K({a:[X,!0,!1,null,`\0\b
|
|
34
|
+
\f\r `]})==rt&&K(null,X)==="1"&&K([1,2],null,1)==`[
|
|
35
35
|
1,
|
|
36
36
|
2
|
|
37
|
-
]`&&
|
|
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)){X=nt(rt);var Z=X.a.length==5&&X.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,X={};return(X.__proto__=null,X.__proto__={toString:1},X).toString!=b?f=function(rt){var K=this.__proto__,et=rt in(this.__proto__=null,this);return this.__proto__=K,et}:(Q=X.constructor,f=function(rt){var K=(this.constructor||Q).prototype;return rt in this&&!(rt in K&&this[rt]===K[rt])}),X=null,f.call(this,$)});var T={boolean:1,number:1,string:1,undefined:1},I=function($,Q){var X=typeof $[Q];return X=="object"?!!$[Q]:!T[X]};if(v=function($,Q){var X,rt,K,et=0;(X=function(){this.valueOf=0}).prototype.valueOf=0,rt=new X;for(K in rt)f.call(rt,K)&&et++;return X=rt=null,et?v=et==2?function(nt,Z){var at,kt={},Gt=b.call(nt)==l;for(at in nt)Gt&&at=="prototype"||f.call(kt,at)||!(kt[at]=1)||!f.call(nt,at)||Z(at)}:function(nt,Z){var at,kt,Gt=b.call(nt)==l;for(at in nt)Gt&&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,Gt=b.call(nt)==l,It=!Gt&&typeof nt.constructor!="function"&&I(nt,"hasOwnProperty")?nt.hasOwnProperty:f;for(at in nt)Gt&&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,X='"',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:X+=P[nt];break;default:if(32>nt){X+=H+B(2,nt.toString(16));break}X+=et?Q[rt]:Y?$.charAt(rt):$[rt]}}return X+'"'},G=function($,Q,X,rt,K,et,nt){var Z,at,kt,Gt,It,ke,Xn,ue,bn,Gn,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(Gt=J((It-U(kt,0))/30.42);U(kt,Gt+1)<=It;Gt++);It=1+It-U(kt,Gt),ke=(Z%864e5+864e5)%864e5,Xn=J(ke/36e5)%24,ue=J(ke/6e4)%60,bn=J(ke/1e3)%60,Gn=ke%1e3}else kt=Z.getUTCFullYear(),Gt=Z.getUTCMonth(),It=Z.getUTCDate(),Xn=Z.getUTCHours(),ue=Z.getUTCMinutes(),bn=Z.getUTCSeconds(),Gn=Z.getUTCMilliseconds();Z=(0>=kt||kt>=1e4?(0>kt?"-":"+")+B(6,0>kt?-kt:kt):B(4,kt))+"-"+B(2,Gt+1)+"-"+B(2,It)+"T"+B(2,Xn)+":"+B(2,ue)+":"+B(2,bn)+"."+B(3,Gn)+"Z"}else Z=null;if(X&&(Z=X.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=G(Ie,Z,X,rt,K,et,nt),Vt.push(Zt===d?"null":Zt);Pe=Vt.length?K?`[
|
|
38
38
|
`+et+Vt.join(`,
|
|
39
39
|
`+et)+`
|
|
40
|
-
|
|
40
|
+
`+$n+"]":"["+Vt.join(",")+"]":"[]"}else v(rt||Z,function(Jn){var je=G(Jn,Z,X,rt,K,et,nt);je!==d&&Vt.push(z(Jn)+":"+(K?" ":"")+je)}),Pe=Vt.length?K?`{
|
|
41
41
|
`+et+Vt.join(`,
|
|
42
42
|
`+et)+`
|
|
43
|
-
|
|
44
|
-
`,102:"\f",114:"\r"},ct=function(){throw F=lt=null,SyntaxError()},Xt=function(){for(var G,Q,X,rt,z,et=lt,nt=et.length;nt>F;)switch(z=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 G=Y?et.charAt(F):et[F],F++,G;case 34:for(G="@",F++;nt>F;)if(z=et.charCodeAt(F),32>z)ct();else if(z==92)switch(z=et.charCodeAt(++F)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:G+=xt[z],F++;break;case 117:for(Q=++F,X=F+4;X>F;F++)z=et.charCodeAt(F),z>=48&&57>=z||z>=97&&102>=z||z>=65&&70>=z||ct();G+=ut("0x"+et.slice(Q,F));break;default:ct()}else{if(z==34)break;for(z=et.charCodeAt(F),Q=F;z>=32&&z!=92&&z!=34;)z=et.charCodeAt(++F);G+=et.slice(Q,F)}if(et.charCodeAt(F)==34)return F++,G;ct();default:if(Q=F,z==45&&(rt=!0,z=et.charCodeAt(++F)),z>=48&&57>=z){for(z==48&&(z=et.charCodeAt(F+1),z>=48&&57>=z)&&ct(),rt=!1;nt>F&&(z=et.charCodeAt(F),z>=48&&57>=z);F++);if(et.charCodeAt(F)==46){for(X=++F;nt>X&&(z=et.charCodeAt(X),z>=48&&57>=z);X++);X==F&&ct(),F=X}if(z=et.charCodeAt(F),z==101||z==69){for(z=et.charCodeAt(++F),(z==43||z==45)&&F++,X=F;nt>X&&(z=et.charCodeAt(X),z>=48&&57>=z);X++);X==F&&ct(),F=X}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(G){var Q,X;if(G=="$"&&ct(),typeof G=="string"){if((Y?G.charAt(0):G[0])=="@")return G.slice(1);if(G=="["){for(Q=[];G=Xt(),G!="]";X||(X=!0))X&&(G==","?(G=Xt(),G=="]"&&ct()):ct()),G==","&&ct(),Q.push(Oe(G));return Q}if(G=="{"){for(Q={};G=Xt(),G!="}";X||(X=!0))X&&(G==","?(G=Xt(),G=="}"&&ct()):ct()),(G==","||typeof G!="string"||(Y?G.charAt(0):G[0])!="@"||Xt()!=":")&&ct(),Q[G.slice(1)]=Oe(Xt());return Q}ct()}return G},ae=function(G,Q,X){var rt=yr(G,Q,X);rt===d?delete G[Q]:G[Q]=rt},yr=function(G,Q,X){var rt,z=G[Q];if(typeof z=="object"&&z)if(b.call(z)==k)for(rt=z.length;rt--;)ae(z,rt,X);else v(z,function(et){ae(z,et,X)});return X.call(G,Q,z)};w.parse=function(G,Q){var X,rt;return F=0,lt=""+G,X=Oe(Xt()),Xt()!="$"&&ct(),F=lt=null,Q&&b.call(Q)==l?yr((rt={},rt[""]=X,rt),"",Q):X}}}})(this)},{}],48:[function(i,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 _v=Object.freeze(Object.defineProperty({__proto__:null,default:wv},Symbol.toStringTag,{value:"Module"})),bv=Object.assign({"./v1_3_7.js":_v}),Cv=/v\d+_\d+_\d+/;function Sv(i){return typeof i=="function"}const Xo=Object.entries(bv).reduce((i,o)=>{var c;const n=o[1].default,a=(c=o[0].match(Cv))==null?void 0:c[0];return Sv(n)&&a&&(i[a]=n()),i},{}),rc=i=>{if(i in Xo)return Xo[i];throw new Error(`Socket version ${i} not found`)},kv=(i,...o)=>rc(i)(...o),Av={...Xo,getSocketVersion:rc,makeSocketVersion:kv};var pt=(i=>(i.ALL_DIALER_STATUS="AllDialersStatus",i.ALL_EXTENSION_STATUS="AllExtensionsStatus",i.ALL_USERS_STATUS="AllUsersStatus",i.CONNECT="connect",i.DISCONNECT="disconnect",i.CONNECT_ERROR_EVENT="connect_error",i.EXTENSION_EVENT="ExtensionEvent",i.KEEP_ALIVE="keepalive",i.KEEP_ALIVE_RESPONSE="keepaliveResponse",i.LOGIN_STATUS="loginStatus",i.LOGIN_SUCCESS="loginSuccess",i.QUEUE_EVENT="QueueEvent",i.ONLINE_STATUS_EVENT="onlineStatusEvent",i.DIALER_EVENT="DialerEvent",i.EXTENSIONS_UPDATED="ExtensionsUpdated",i))(pt||{});class xv{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=Av.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(pt.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(pt.LOGIN_SUCCESS,o=>this.eventsSdkClass.eventEmitterClass.emit(pt.LOGIN_SUCCESS,o)).on(pt.QUEUE_EVENT,o=>this.eventsSdkClass.eventEmitterClass.emit(pt.QUEUE_EVENT,o)).on(pt.EXTENSION_EVENT,o=>this.eventsSdkClass.eventEmitterClass.emit(pt.EXTENSION_EVENT,o)).on(pt.DIALER_EVENT,o=>this.eventsSdkClass.eventEmitterClass.emit(pt.DIALER_EVENT,o)).on(pt.LOGIN_STATUS,o=>this.eventsSdkClass.eventEmitterClass.emit(pt.LOGIN_STATUS,o)).on(pt.ALL_EXTENSION_STATUS,o=>this.eventsSdkClass.eventEmitterClass.emit(pt.ALL_EXTENSION_STATUS,o)).on(pt.ALL_DIALER_STATUS,o=>this.eventsSdkClass.eventEmitterClass.emit(pt.ALL_DIALER_STATUS,o)).on(pt.KEEP_ALIVE_RESPONSE,o=>this.onKeepAliveResponse(o)).on(pt.CONNECT,()=>this.onConnect()).on(pt.DISCONNECT,o=>this.onDisconnect(o)).on(pt.CONNECT_ERROR_EVENT,o=>this.onConnectError(o)).on(pt.EXTENSIONS_UPDATED,o=>{this.eventsSdkClass.eventEmitterClass.emit(pt.EXTENSIONS_UPDATED,o)})}clearKeepAliveInterval(){this.keepAliveInterval&&clearInterval(this.keepAliveInterval)}initKeepAlive(){this.clearKeepAliveInterval(),this.keepAliveInterval=setInterval(async()=>{if(new Date().getTime()>this.lastEventTimestamp+this.eventsSdkClass.options.keepAliveTimeout&&this.io){this.eventsSdkClass.emit(pt.KEEP_ALIVE,this.eventsSdkClass.authClass.token),this.eventsSdkClass.loggerClass.log(jt.INFO,`EMIT -> ${pt.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,pt.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,pt.CONNECT,this.eventsSdkClass.reconnectOptions),this.eventsSdkClass.eventEmitterClass.emit(pt.ONLINE_STATUS_EVENT,{isSocketConnected:!0})}onDisconnect(o){this.connected=!1,this.eventsSdkClass.loggerClass.log(jt.INFO,pt.DISCONNECT,o),this.closeAllConnections(),this.eventsSdkClass.eventEmitterClass.emit(pt.ONLINE_STATUS_EVENT,{isSocketConnected:!1}),this.doReconnect&&(console.log("attempt to connect..."),this.eventsSdkClass.connect(wn.NEXT))}onConnectError(o){this.eventsSdkClass.eventEmitterClass.emit(pt.ONLINE_STATUS_EVENT,{isSocketConnected:!1}),this.eventsSdkClass.loggerClass.log(jt.ERROR,pt.CONNECT_ERROR_EVENT,o),setTimeout(()=>{this.eventsSdkClass.connect(wn.NEXT)},this.eventsSdkClass.options.reconnectionDelay)}}var Ev=Object.defineProperty,Tv=(i,o,n)=>o in i?Ev(i,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):i[o]=n,Ht=(i,o,n)=>(Tv(i,typeof o!="symbol"?o+"":o,n),n);function Rv(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function Ov(i){if(i.__esModule)return i;var o=i.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(i).forEach(function(a){var c=Object.getOwnPropertyDescriptor(i,a);Object.defineProperty(n,a,c.get?c:{enumerable:!0,get:function(){return i[a]}})}),n}var $o={exports:{}},Iv=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Bv=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],ic=function(i){var o=i,n=i.indexOf("["),a=i.indexOf("]");n!=-1&&a!=-1&&(i=i.substring(0,n)+i.substring(n,a).replace(/:/g,";")+i.substring(a,i.length));for(var c=Iv.exec(i||""),f={},v=14;v--;)f[Bv[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=Nv(f,f.path),f.queryKey=Lv(f,f.query),f};function Nv(i,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 Lv(i,o){var n={};return o.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(a,c,f){c&&(n[c]=f)}),n}var Go={exports:{}},Jo={exports:{}},lr=1e3,pr=lr*60,dr=pr*60,gr=dr*24,Uv=gr*365.25,Dv=function(i,o){o=o||{};var n=typeof i;if(n==="string"&&i.length>0)return Pv(i);if(n==="number"&&isNaN(i)===!1)return o.long?Mv(i):Fv(i);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(i))};function Pv(i){if(i=String(i),!(i.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(i);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*Uv;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 Fv(i){return i>=gr?Math.round(i/gr)+"d":i>=dr?Math.round(i/dr)+"h":i>=pr?Math.round(i/pr)+"m":i>=lr?Math.round(i/lr)+"s":i+"ms"}function Mv(i){return oi(i,gr,"day")||oi(i,dr,"hour")||oi(i,pr,"minute")||oi(i,lr,"second")||i+" ms"}function oi(i,o,n){if(!(i<o))return i<o*1.5?Math.floor(i/o)+" "+n:Math.ceil(i/o)+" "+n+"s"}(function(i,o){o=i.exports=a.debug=a.default=a,o.coerce=b,o.disable=v,o.enable=f,o.enabled=d,o.humanize=Dv,o.instances=[],o.names=[],o.skips=[],o.formatters={};function n(p){var w=0,g;for(g in p)w=(w<<5)-w+p.charCodeAt(g),w|=0;return o.colors[Math.abs(w)%o.colors.length]}function a(p){var w;function g(){if(g.enabled){var l=g,u=+new Date,_=u-(w||u);l.diff=_,l.prev=w,l.curr=u,w=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,B){if(J==="%%")return J;L++;var U=o.formatters[B];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 w,g=(typeof p=="string"?p:"").split(/[\s,]+/),l=g.length;for(w=0;w<l;w++)g[w]&&(p=g[w].replace(/\*/g,".*?"),p[0]==="-"?o.skips.push(new RegExp("^"+p.substr(1)+"$")):o.names.push(new RegExp("^"+p+"$")));for(w=0;w<o.instances.length;w++){var u=o.instances[w];u.enabled=o.enabled(u.namespace)}}function v(){o.enable("")}function d(p){if(p[p.length-1]==="*")return!0;var w,g;for(w=0,g=o.skips.length;w<g;w++)if(o.skips[w].test(p))return!1;for(w=0,g=o.names.length;w<g;w++)if(o.names[w].test(p))return!0;return!1}function b(p){return p instanceof Error?p.stack||p.message:p}})(Jo,Jo.exports);var qv=Jo.exports;(function(i,o){o=i.exports=qv,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 w="color: "+this.color;b.splice(1,0,w,"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,w)}}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{}}})(Go,Go.exports);var Je=Go.exports,Wv=ic,Wu=Je("socket.io-client:url"),Hv=zv;function zv(i,o){var n=i;o=o||typeof location<"u"&&location,i==null&&(i=o.protocol+"//"+o.host),typeof i=="string"&&(i.charAt(0)==="/"&&(i.charAt(1)==="/"?i=o.protocol+i:i=o.host+i),/^(https?|wss?):\/\//.test(i)||(Wu("protocol-less url %s",i),typeof o<"u"?i=o.protocol+"//"+i:i="https://"+i),Wu("parse %s",i),n=Wv(i)),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={},oc={exports:{}};(function(i){i.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}})(oc);var qn=oc.exports,di={},Kv={}.toString,ts=Array.isArray||function(i){return Kv.call(i)=="[object Array]"},sc=Jv,Xv=typeof Buffer=="function"&&typeof Buffer.isBuffer=="function",$v=typeof ArrayBuffer=="function",Gv=function(i){return typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i.buffer instanceof ArrayBuffer};function Jv(i){return Xv&&Buffer.isBuffer(i)||$v&&(i instanceof ArrayBuffer||Gv(i))}var es=ts,ac=sc,uc=Object.prototype.toString,jv=typeof Blob=="function"||typeof Blob<"u"&&uc.call(Blob)==="[object BlobConstructor]",Yv=typeof File=="function"||typeof File<"u"&&uc.call(File)==="[object FileConstructor]";di.deconstructPacket=function(i){var o=[],n=i.data,a=i;return a.data=jo(n,o),a.attachments=o.length,{packet:a,buffers:o}};function jo(i,o){if(!i)return i;if(ac(i)){var n={_placeholder:!0,num:o.length};return o.push(i),n}else if(es(i)){for(var a=new Array(i.length),c=0;c<i.length;c++)a[c]=jo(i[c],o);return a}else if(typeof i=="object"&&!(i instanceof Date)){var a={};for(var f in i)a[f]=jo(i[f],o);return a}return i}di.reconstructPacket=function(i,o){return i.data=Yo(i.data,o),i.attachments=void 0,i};function Yo(i,o){if(!i)return i;if(i&&i._placeholder===!0){var n=typeof i.num=="number"&&i.num>=0&&i.num<o.length;if(n)return o[i.num];throw new Error("illegal attachments")}else if(es(i))for(var a=0;a<i.length;a++)i[a]=Yo(i[a],o);else if(typeof i=="object")for(var c in i)i[c]=Yo(i[c],o);return i}di.removeBlobs=function(i,o){function n(f,v,d){if(!f)return f;if(jv&&f instanceof Blob||Yv&&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"&&!ac(f))for(var w in f)n(f[w],w,f)}var a=0,c=i;n(c),a||o(c)};(function(i){var o=Je("socket.io-parser"),n=qn,a=di,c=ts,f=sc;i.protocol=4,i.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],i.CONNECT=0,i.DISCONNECT=1,i.EVENT=2,i.ACK=3,i.ERROR=4,i.BINARY_EVENT=5,i.BINARY_ACK=6,i.Encoder=v,i.Decoder=g;function v(){}var d=i.ERROR+'"encode error"';v.prototype.encode=function(k,L){if(o("encoding packet %j",k),i.BINARY_EVENT===k.type||i.BINARY_ACK===k.type)w(k,L);else{var Y=b(k);L([Y])}};function b(k){var L=""+k.type;if((i.BINARY_EVENT===k.type||i.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 w(k,L){function Y(J){var B=a.deconstructPacket(J),U=b(B.packet),T=B.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),i.BINARY_EVENT===L.type||i.BINARY_ACK===L.type?(this.reconstructor=new _(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(i.types[Y.type]==null)return A("unknown packet type "+Y.type);if(i.BINARY_EVENT===Y.type||i.BINARY_ACK===Y.type){for(var J=L+1;k.charAt(++L)!=="-"&&L!=k.length;);var B=k.substring(J,L);if(B!=Number(B)||k.charAt(L)!=="-")throw new Error("Illegal attachments");Y.attachments=Number(B)}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===i.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 _(k){this.reconPack=k,this.buffers=[]}_.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},_.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]};function A(k){return{type:i.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 Vv=Vo.exports,rs=function(){return typeof self<"u"?self:typeof window<"u"?window:Function("return this")()}(),Zv=Vv,Qv=rs,is=function(i){var o=i.xdomain,n=i.xscheme,a=i.enablesXDR;try{if(typeof XMLHttpRequest<"u"&&(!o||Zv))return new XMLHttpRequest}catch{}try{if(typeof XDomainRequest<"u"&&!n&&a)return new XDomainRequest}catch{}if(!o)try{return new Qv[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}},os={exports:{}},_n={},t0=Object.keys||function(i){var o=[],n=Object.prototype.hasOwnProperty;for(var a in i)n.call(i,a)&&o.push(a);return o},e0=ts,cc=Object.prototype.toString,n0=typeof Blob=="function"||typeof Blob<"u"&&cc.call(Blob)==="[object BlobConstructor]",r0=typeof File=="function"||typeof File<"u"&&cc.call(File)==="[object FileConstructor]",fc=ai;function ai(i){if(!i||typeof i!="object")return!1;if(e0(i)){for(var o=0,n=i.length;o<n;o++)if(ai(i[o]))return!0;return!1}if(typeof Buffer=="function"&&Buffer.isBuffer&&Buffer.isBuffer(i)||typeof ArrayBuffer=="function"&&i instanceof ArrayBuffer||n0&&i instanceof Blob||r0&&i instanceof File)return!0;if(i.toJSON&&typeof i.toJSON=="function"&&arguments.length===1)return ai(i.toJSON(),!0);for(var a in i)if(Object.prototype.hasOwnProperty.call(i,a)&&ai(i[a]))return!0;return!1}var i0=function(i,o,n){var a=i.byteLength;if(o=o||0,n=n||a,i.slice)return i.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(i),f=new Uint8Array(n-o),v=o,d=0;v<n;v++,d++)f[d]=c[v];return f.buffer},o0=s0;function s0(i,o,n){var a=!1;return n=n||a0,c.count=i,i===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 a0(){}/*! https://mths.be/utf8js v2.1.2 by @mathias */var an=String.fromCharCode;function hc(i){for(var o=[],n=0,a=i.length,c,f;n<a;)c=i.charCodeAt(n++),c>=55296&&c<=56319&&n<a?(f=i.charCodeAt(n++),(f&64512)==56320?o.push(((c&1023)<<10)+(f&1023)+65536):(o.push(c),n--)):o.push(c);return o}function u0(i){for(var o=i.length,n=-1,a,c="";++n<o;)a=i[n],a>65535&&(a-=65536,c+=an(a>>>10&1023|55296),a=56320|a&1023),c+=an(a);return c}function lc(i,o){if(i>=55296&&i<=57343){if(o)throw Error("Lone surrogate U+"+i.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function Mo(i,o){return an(i>>o&63|128)}function c0(i,o){if(!(i&4294967168))return an(i);var n="";return i&4294965248?i&4294901760?i&4292870144||(n=an(i>>18&7|240),n+=Mo(i,12),n+=Mo(i,6)):(lc(i,o)||(i=65533),n=an(i>>12&15|224),n+=Mo(i,6)):n=an(i>>6&31|192),n+=an(i&63|128),n}function f0(i,o){o=o||{};for(var n=o.strict!==!1,a=hc(i),c=a.length,f=-1,v,d="";++f<c;)v=a[f],d+=c0(v,n);return d}function Pn(){if(un>=fi)throw Error("Invalid byte index");var i=ci[un]&255;if(un++,(i&192)==128)return i&63;throw Error("Invalid continuation byte")}function h0(i){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 lc(f,i)?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 l0(i,o){o=o||{};var n=o.strict!==!1;ci=hc(i),fi=ci.length,un=0;for(var a=[],c;(c=h0(n))!==!1;)a.push(c);return u0(a)}var p0={version:"2.1.2",encode:f0,decode:l0},qo={},Hu;function d0(){return Hu||(Hu=1,function(i){qo.encode=function(o){var n=new Uint8Array(o),a,c=n.length,f="";for(a=0;a<c;a+=3)f+=i[n[a]>>2],f+=i[(n[a]&3)<<4|n[a+1]>>4],f+=i[(n[a+1]&15)<<2|n[a+2]>>6],f+=i[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 w=new ArrayBuffer(n),g=new Uint8Array(w);for(c=0;c<a;c+=4)v=i.indexOf(o[c]),d=i.indexOf(o[c+1]),b=i.indexOf(o[c+2]),p=i.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 w}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")),qo}var Wo,zu;function g0(){if(zu)return Wo;zu=1;var i=typeof i<"u"?i: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=i&&i.prototype.append&&i.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 w=new Uint8Array(b.byteLength);w.set(new Uint8Array(p,b.byteOffset,b.byteLength)),p=w.buffer}return p}return b})}function f(d,b){b=b||{};var p=new i;return c(d).forEach(function(w){p.append(w)}),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(i){var o=t0,n=fc,a=i0,c=o0,f=p0,v;typeof ArrayBuffer<"u"&&(v=d0());var d=typeof navigator<"u"&&/Android/i.test(navigator.userAgent),b=typeof navigator<"u"&&/PhantomJS/i.test(navigator.userAgent),p=d||b;i.protocol=3;var w=i.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},g=o(w),l={type:"error",data:"parser error"},u=g0();i.encodePacket=function(B,U,T,I){typeof U=="function"&&(I=U,U=!1),typeof T=="function"&&(I=T,T=null);var P=B.data===void 0?void 0:B.data.buffer||B.data;if(typeof ArrayBuffer<"u"&&P instanceof ArrayBuffer)return A(B,U,I);if(typeof u<"u"&&P instanceof u)return L(B,U,I);if(P&&P.base64)return _(B,I);var R=w[B.type];return B.data!==void 0&&(R+=T?f.encode(String(B.data),{strict:!1}):String(B.data)),I(""+R)};function _(B,U){var T="b"+i.packets[B.type]+B.data.data;return U(T)}function A(B,U,T){if(!U)return i.encodeBase64Packet(B,T);var I=B.data,P=new Uint8Array(I),R=new Uint8Array(1+I.byteLength);R[0]=w[B.type];for(var N=0;N<P.length;N++)R[N+1]=P[N];return T(R.buffer)}function k(B,U,T){if(!U)return i.encodeBase64Packet(B,T);var I=new FileReader;return I.onload=function(){i.encodePacket({type:B.type,data:I.result},U,!0,T)},I.readAsArrayBuffer(B.data)}function L(B,U,T){if(!U)return i.encodeBase64Packet(B,T);if(p)return k(B,U,T);var I=new Uint8Array(1);I[0]=w[B.type];var P=new u([I.buffer,B.data]);return T(P)}i.encodeBase64Packet=function(B,U){var T="b"+i.packets[B.type];if(typeof u<"u"&&B.data instanceof u){var I=new FileReader;return I.onload=function(){var K=I.result.split(",")[1];U(T+K)},I.readAsDataURL(B.data)}var P;try{P=String.fromCharCode.apply(null,new Uint8Array(B.data))}catch{for(var R=new Uint8Array(B.data),N=new Array(R.length),H=0;H<R.length;H++)N[H]=R[H];P=String.fromCharCode.apply(null,N)}return T+=btoa(P),U(T)},i.decodePacket=function(B,U,T){if(B===void 0)return l;if(typeof B=="string"){if(B.charAt(0)==="b")return i.decodeBase64Packet(B.substr(1),U);if(T&&(B=Y(B),B===!1))return l;var P=B.charAt(0);return Number(P)!=P||!g[P]?l:B.length>1?{type:g[P],data:B.substring(1)}:{type:g[P]}}var I=new Uint8Array(B),P=I[0],R=a(B,1);return u&&U==="blob"&&(R=new u([R])),{type:g[P],data:R}};function Y(B){try{B=f.decode(B,{strict:!1})}catch{return!1}return B}i.decodeBase64Packet=function(B,U){var T=g[B.charAt(0)];if(!v)return{type:T,data:{base64:!0,data:B.substr(1)}};var I=v.decode(B.substr(1));return U==="blob"&&u&&(I=new u([I])),{type:T,data:I}},i.encodePayload=function(B,U,T){typeof U=="function"&&(T=U,U=null);var I=n(B);if(U&&I)return u&&!p?i.encodePayloadAsBlob(B,T):i.encodePayloadAsArrayBuffer(B,T);if(!B.length)return T("0:");function P(N){return N.length+":"+N}function R(N,H){i.encodePacket(N,I?U:!1,!1,function(K){H(null,P(K))})}J(B,R,function(N,H){return T(H.join(""))})};function J(B,U,T){for(var I=new Array(B.length),P=c(B.length,T),R=function(H,K,$){U(K,function(F,lt){I[H]=lt,$(F,I)})},N=0;N<B.length;N++)R(N,B[N],P)}i.decodePayload=function(B,U,T){if(typeof B!="string")return i.decodePayloadAsBinary(B,U,T);typeof U=="function"&&(T=U,U=null);var I;if(B==="")return T(l,0,1);for(var P="",R,N,H=0,K=B.length;H<K;H++){var $=B.charAt(H);if($!==":"){P+=$;continue}if(P===""||P!=(R=Number(P))||(N=B.substr(H+1,R),P!=N.length))return T(l,0,1);if(N.length){if(I=i.decodePacket(N,U,!1),l.type===I.type&&l.data===I.data)return T(l,0,1);var F=T(I,H+R,K);if(F===!1)return}H+=R,P=""}if(P!=="")return T(l,0,1)},i.encodePayloadAsArrayBuffer=function(B,U){if(!B.length)return U(new ArrayBuffer(0));function T(I,P){i.encodePacket(I,!0,!0,function(R){return P(null,R)})}J(B,T,function(I,P){var R=P.reduce(function(K,$){var F;return typeof $=="string"?F=$.length:F=$.byteLength,K+F.toString().length+F+2},0),N=new Uint8Array(R),H=0;return P.forEach(function(K){var $=typeof K=="string",F=K;if($){for(var lt=new Uint8Array(K.length),ut=0;ut<K.length;ut++)lt[ut]=K.charCodeAt(ut);F=lt.buffer}$?N[H++]=0:N[H++]=1;for(var xt=F.byteLength.toString(),ut=0;ut<xt.length;ut++)N[H++]=parseInt(xt[ut]);N[H++]=255;for(var lt=new Uint8Array(F),ut=0;ut<lt.length;ut++)N[H++]=lt[ut]}),U(N.buffer)})},i.encodePayloadAsBlob=function(B,U){function T(I,P){i.encodePacket(I,!0,!0,function(R){var N=new Uint8Array(1);if(N[0]=1,typeof R=="string"){for(var H=new Uint8Array(R.length),K=0;K<R.length;K++)H[K]=R.charCodeAt(K);R=H.buffer,N[0]=0}for(var $=R instanceof ArrayBuffer?R.byteLength:R.size,F=$.toString(),lt=new Uint8Array(F.length+1),K=0;K<F.length;K++)lt[K]=parseInt(F[K]);if(lt[F.length]=255,u){var ut=new u([N.buffer,lt.buffer,R]);P(null,ut)}})}J(B,T,function(I,P){return U(new u(P))})},i.decodePayloadAsBinary=function(B,U,T){typeof U=="function"&&(T=U,U=null);for(var I=B,P=[];I.byteLength>0;){for(var R=new Uint8Array(I),N=R[0]===0,H="",K=1;R[K]!==255;K++){if(H.length>310)return T(l,0,1);H+=R[K]}I=a(I,2+H.length),H=parseInt(H);var $=a(I,0,H);if(N)try{$=String.fromCharCode.apply(null,new Uint8Array($))}catch{var F=new Uint8Array($);$="";for(var K=0;K<F.length;K++)$+=String.fromCharCode(F[K])}P.push($),I=a(I,H)}var lt=P.length;P.forEach(function(ut,xt){T(i.decodePacket(ut,U,!0),xt,lt)})}})(_n);var Ho,Ku;function ss(){if(Ku)return Ho;Ku=1;var i=_n,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=i.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(i){var o="";for(var n in i)i.hasOwnProperty(n)&&(o.length&&(o+="&"),o+=encodeURIComponent(n)+"="+encodeURIComponent(i[n]));return o};Wn.decode=function(i){for(var o={},n=i.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(i,o){var n=function(){};n.prototype=o.prototype,i.prototype=new n,i.prototype.constructor=i},pc="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),hi=64,dc={},Xu=0,cn=0,$u;function Zo(i){var o="";do o=pc[i%hi]+o,i=Math.floor(i/hi);while(i>0);return o}function y0(i){var o=0;for(cn=0;cn<i.length;cn++)o=o*hi+dc[i.charAt(cn)];return o}function as(){var i=Zo(+new Date);return i!==$u?(Xu=0,$u=i):i+"."+Zo(Xu++)}for(;cn<hi;cn++)dc[pc[cn]]=cn;as.encode=Zo;as.decode=y0;var gc=as,yc=ss(),v0=Wn,vc=_n,m0=yi,w0=gc,Re=Je("engine.io-client:polling"),mc=De,_0=function(){var i=is,o=new i({xdomain:!1});return o.responseType!=null}();function De(i){var o=i&&i.forceBase64;(!_0||o)&&(this.supportsBinary=!1),yc.call(this,i)}m0(De,yc);De.prototype.name="polling";De.prototype.doOpen=function(){this.poll()};De.prototype.pause=function(i){var o=this;this.readyState="pausing";function n(){Re("paused"),o.readyState="paused",i()}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(i){var o=this;Re("polling got data %s",i);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)};vc.decodePayload(i,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 i=this;function o(){Re("writing close packet"),i.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(i){var o=this;this.writable=!1;var n=function(){o.writable=!0,o.emit("drain")};vc.encodePayload(i,this.supportsBinary,function(a){o.doWrite(a,n)})};De.prototype.uri=function(){var i=this.query||{},o=this.secure?"https":"http",n="";this.timestampRequests!==!1&&(i[this.timestampParam]=w0()),!this.supportsBinary&&!i.sid&&(i.b64=1),i=v0.encode(i),this.port&&(o==="https"&&Number(this.port)!==443||o==="http"&&Number(this.port)!==80)&&(n=":"+this.port),i.length&&(i="?"+i);var a=this.hostname.indexOf(":")!==-1;return o+"://"+(a?"["+this.hostname+"]":this.hostname)+n+this.path+i};var b0=is,wc=mc,C0=qn,S0=yi,Qo=Je("engine.io-client:polling-xhr"),k0=rs;os.exports=Hn;os.exports.Request=qt;function Gu(){}function Hn(i){if(wc.call(this,i),this.requestTimeout=i.requestTimeout,this.extraHeaders=i.extraHeaders,typeof location<"u"){var o=location.protocol==="https:",n=location.port;n||(n=o?443:80),this.xd=typeof location<"u"&&i.hostname!==location.hostname||n!==i.port,this.xs=i.secure!==o}}S0(Hn,wc);Hn.prototype.supportsBinary=!0;Hn.prototype.request=function(i){return i=i||{},i.uri=this.uri(),i.xd=this.xd,i.xs=this.xs,i.agent=this.agent||!1,i.supportsBinary=this.supportsBinary,i.enablesXDR=this.enablesXDR,i.withCredentials=this.withCredentials,i.pfx=this.pfx,i.key=this.key,i.passphrase=this.passphrase,i.cert=this.cert,i.ca=this.ca,i.ciphers=this.ciphers,i.rejectUnauthorized=this.rejectUnauthorized,i.requestTimeout=this.requestTimeout,i.extraHeaders=this.extraHeaders,new qt(i)};Hn.prototype.doWrite=function(i,o){var n=typeof i!="string"&&i!==void 0,a=this.request({method:"POST",data:i,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 i=this.request(),o=this;i.on("data",function(n){o.onData(n)}),i.on("error",function(n){o.onError("xhr poll error",n)}),this.pollXhr=i};function qt(i){this.method=i.method||"GET",this.uri=i.uri,this.xd=!!i.xd,this.xs=!!i.xs,this.async=i.async!==!1,this.data=i.data!==void 0?i.data:null,this.agent=i.agent,this.isBinary=i.isBinary,this.supportsBinary=i.supportsBinary,this.enablesXDR=i.enablesXDR,this.withCredentials=i.withCredentials,this.requestTimeout=i.requestTimeout,this.pfx=i.pfx,this.key=i.key,this.passphrase=i.passphrase,this.cert=i.cert,this.ca=i.ca,this.ciphers=i.ciphers,this.rejectUnauthorized=i.rejectUnauthorized,this.extraHeaders=i.extraHeaders,this.create()}C0(qt.prototype);qt.prototype.create=function(){var i={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};i.pfx=this.pfx,i.key=this.key,i.passphrase=this.passphrase,i.cert=this.cert,i.ca=this.ca,i.ciphers=this.ciphers,i.rejectUnauthorized=this.rejectUnauthorized;var o=this.xhr=new b0(i),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(i){this.emit("data",i),this.onSuccess()};qt.prototype.onError=function(i){this.emit("error",i),this.cleanup(!0)};qt.prototype.cleanup=function(i){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=Gu:this.xhr.onreadystatechange=Gu,i)try{this.xhr.abort()}catch{}typeof document<"u"&&delete qt.requests[this.index],this.xhr=null}};qt.prototype.onLoad=function(){var i;try{var o;try{o=this.xhr.getResponseHeader("Content-Type")}catch{}o==="application/octet-stream"||o==="application/octet-stream; charset=UTF-8"?i=this.xhr.response||this.xhr.responseText:i=this.xhr.responseText}catch(n){this.onError(n)}i!=null&&this.onData(i)};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 A0="onpagehide"in k0?"pagehide":"unload";addEventListener(A0,Ju,!1)}}function Ju(){for(var i in qt.requests)qt.requests.hasOwnProperty(i)&&qt.requests[i].abort()}var x0=os.exports,us=mc,E0=yi,ju=rs,T0=zn,R0=/\n/g,O0=/\\n/g,si;function I0(){}function zn(i){us.call(this,i),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=I0)},!1)}E0(zn,us);zn.prototype.supportsBinary=!1;zn.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),us.prototype.doClose.call(this)};zn.prototype.doPoll=function(){var i=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){i.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)};zn.prototype.doWrite=function(i,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(w){n.onError("jsonp polling iframe removal error",w)}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(),i=i.replace(O0,`\\
|
|
45
|
-
`),this.area.value=i.replace(R0,"\\n");try{this.form.submit()}catch{}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){n.iframe.readyState==="complete"&&d()}:this.iframe.onload=d};const B0={},N0=Object.freeze(Object.defineProperty({__proto__:null,default:B0},Symbol.toStringTag,{value:"Module"})),L0=Ov(N0);var cs=ss(),U0=_n,D0=Wn,P0=yi,F0=gc,M0=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=L0}catch{}var Mn=li||fs,q0=Se;function Se(i){var o=i&&i.forceBase64;o&&(this.supportsBinary=!1),this.perMessageDeflate=i.perMessageDeflate,this.usingBrowserWebSocket=li&&!i.forceNode,this.protocols=i.protocols,this.usingBrowserWebSocket||(Mn=fs),cs.call(this,i)}P0(Se,cs);Se.prototype.name="websocket";Se.prototype.supportsBinary=!0;Se.prototype.doOpen=function(){if(this.check()){var i=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(i,o):new Mn(i):new Mn(i,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 i=this;this.ws.onopen=function(){i.onOpen()},this.ws.onclose=function(){i.onClose()},this.ws.onmessage=function(o){i.onData(o.data)},this.ws.onerror=function(o){i.onError("websocket error",o)}};Se.prototype.write=function(i){var o=this;this.writable=!1;for(var n=i.length,a=0,c=n;a<c;a++)(function(v){U0.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{M0("websocket closed before onclose event")}--n||f()})})(i[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 i=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&&(i[this.timestampParam]=F0()),this.supportsBinary||(i.b64=1),i=D0.encode(i),i.length&&(i="?"+i);var a=this.hostname.indexOf(":")!==-1;return o+"://"+(a?"["+this.hostname+"]":this.hostname)+n+this.path+i};Se.prototype.check=function(){return!!Mn&&!("__initialize"in Mn&&this.name===Se.prototype.name)};var W0=is,H0=x0,z0=T0,K0=q0;gi.polling=X0;gi.websocket=K0;function X0(i){var o,n=!1,a=!1,c=i.jsonp!==!1;if(typeof location<"u"){var f=location.protocol==="https:",v=location.port;v||(v=f?443:80),n=i.hostname!==location.hostname||v!==i.port,a=i.secure!==f}if(i.xdomain=n,i.xscheme=a,o=new W0(i),"open"in o&&!i.forceJSONP)return new H0(i);if(!c)throw new Error("JSONP disabled");return new z0(i)}var $0=[].indexOf,_c=function(i,o){if($0)return i.indexOf(o);for(var n=0;n<i.length;++n)if(i[n]===o)return n;return-1},G0=gi,J0=qn,Pt=Je("engine.io-client:socket"),j0=_c,bc=_n,Yu=ic,Y0=Wn,V0=_t;function _t(i,o){if(!(this instanceof _t))return new _t(i,o);o=o||{},i&&typeof i=="object"&&(o=i,i=null),i?(i=Yu(i),o.hostname=i.host,o.secure=i.protocol==="https"||i.protocol==="wss",o.port=i.port,i.query&&(o.query=i.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=Y0.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()}_t.priorWebsocketSuccess=!1;J0(_t.prototype);_t.protocol=bc.protocol;_t.Socket=_t;_t.Transport=ss();_t.transports=gi;_t.parser=_n;_t.prototype.createTransport=function(i){Pt('creating transport "%s"',i);var o=Z0(this.query);o.EIO=bc.protocol,o.transport=i;var n=this.transportOptions[i]||{};this.id&&(o.sid=this.id);var a=new G0[i]({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 Z0(i){var o={};for(var n in i)i.hasOwnProperty(n)&&(o[n]=i[n]);return o}_t.prototype.open=function(){var i;if(this.rememberUpgrade&&_t.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)i="websocket";else if(this.transports.length===0){var o=this;setTimeout(function(){o.emit("error","No transports available")},0);return}else i=this.transports[0];this.readyState="opening";try{i=this.createTransport(i)}catch{this.transports.shift(),this.open();return}i.open(),this.setTransport(i)};_t.prototype.setTransport=function(i){Pt("setting transport %s",i.name);var o=this;this.transport&&(Pt("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=i,i.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")})};_t.prototype.probe=function(i){Pt('probing transport "%s"',i);var o=this.createTransport(i,{probe:1}),n=!1,a=this;_t.priorWebsocketSuccess=!1;function c(){if(a.onlyBinaryUpgrades){var g=!this.supportsBinary&&a.transport.supportsBinary;n=n||g}n||(Pt('probe transport "%s" opened',i),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',i),a.upgrading=!0,a.emit("upgrading",o),!o)return;_t.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"),w(),a.setTransport(o),o.send([{type:"upgrade"}]),a.emit("upgrade",o),o=null,a.upgrading=!1,a.flush())})}else{Pt('probe transport "%s" failed',i);var u=new Error("probe error");u.transport=o.name,a.emit("upgradeError",u)}}))}function f(){n||(n=!0,w(),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',i,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 w(){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()};_t.prototype.onOpen=function(){if(Pt("socket open"),this.readyState="open",_t.priorWebsocketSuccess=this.transport.name==="websocket",this.emit("open"),this.flush(),this.readyState==="open"&&this.upgrade&&this.transport.pause){Pt("starting upgrade probes");for(var i=0,o=this.upgrades.length;i<o;i++)this.probe(this.upgrades[i])}};_t.prototype.onPacket=function(i){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(Pt('socket receive: type "%s", data "%s"',i.type,i.data),this.emit("packet",i),this.emit("heartbeat"),i.type){case"open":this.onHandshake(JSON.parse(i.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var o=new Error("server error");o.code=i.data,this.onError(o);break;case"message":this.emit("data",i.data),this.emit("message",i.data);break}else Pt('packet received with socket readyState "%s"',this.readyState)};_t.prototype.onHandshake=function(i){this.emit("handshake",i),this.id=i.sid,this.transport.query.sid=i.sid,this.upgrades=this.filterUpgrades(i.upgrades),this.pingInterval=i.pingInterval,this.pingTimeout=i.pingTimeout,this.onOpen(),this.readyState!=="closed"&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))};_t.prototype.onHeartbeat=function(i){clearTimeout(this.pingTimeoutTimer);var o=this;o.pingTimeoutTimer=setTimeout(function(){o.readyState!=="closed"&&o.onClose("ping timeout")},i||o.pingInterval+o.pingTimeout)};_t.prototype.setPing=function(){var i=this;clearTimeout(i.pingIntervalTimer),i.pingIntervalTimer=setTimeout(function(){Pt("writing ping packet - expecting pong within %sms",i.pingTimeout),i.ping(),i.onHeartbeat(i.pingTimeout)},i.pingInterval)};_t.prototype.ping=function(){var i=this;this.sendPacket("ping",function(){i.emit("ping")})};_t.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emit("drain"):this.flush()};_t.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"))};_t.prototype.write=_t.prototype.send=function(i,o,n){return this.sendPacket("message",i,o,n),this};_t.prototype.sendPacket=function(i,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:i,data:o,options:n};this.emit("packetCreate",c),this.writeBuffer.push(c),a&&this.once("flush",a),this.flush()}};_t.prototype.close=function(){if(this.readyState==="opening"||this.readyState==="open"){this.readyState="closing";var i=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?a():o()}):this.upgrading?a():o()}function o(){i.onClose("forced close"),Pt("socket closing - telling transport to close"),i.transport.close()}function n(){i.removeListener("upgrade",n),i.removeListener("upgradeError",n),o()}function a(){i.once("upgrade",n),i.once("upgradeError",n)}return this};_t.prototype.onError=function(i){Pt("socket error %j",i),_t.priorWebsocketSuccess=!1,this.emit("error",i),this.onClose("transport error",i)};_t.prototype.onClose=function(i,o){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){Pt('socket close with reason: "%s"',i);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",i,o),n.writeBuffer=[],n.prevBufferLen=0}};_t.prototype.filterUpgrades=function(i){for(var o=[],n=0,a=i.length;n<a;n++)~j0(this.transports,i[n])&&o.push(i[n]);return o};ns.exports=V0;ns.exports.parser=_n;var Q0=ns.exports,Cc={exports:{}},tm=em;function em(i,o){var n=[];o=o||0;for(var a=o||0;a<i.length;a++)n[a-o]=i[a];return n}var Sc=nm;function nm(i,o,n){return i.on(o,n),{destroy:function(){i.removeListener(o,n)}}}var Vu=[].slice,kc=function(i,o){if(typeof o=="string"&&(o=i[o]),typeof o!="function")throw new Error("bind() requires a function");var n=Vu.call(arguments,2);return function(){return o.apply(i,n.concat(Vu.call(arguments)))}};(function(i,o){var n=pi,a=qn,c=tm,f=Sc,v=kc,d=Je("socket.io-client:socket"),b=Wn,p=fc;i.exports=l;var w={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,_,A){this.io=u,this.nsp=_,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(w.hasOwnProperty(u))return g.apply(this,arguments),this;var _=c(arguments),A={type:(this.flags.binary!==void 0?this.flags.binary:p(_))?n.BINARY_EVENT:n.EVENT,data:_};return A.options={},A.options.compress=!this.flags||this.flags.compress!==!1,typeof _[_.length-1]=="function"&&(d("emitting packet with ack id %d",this.ids),this.acks[this.ids]=_.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 _=u.nsp===this.nsp,A=u.type===n.ERROR&&u.nsp==="/";if(!(!_&&!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 _=u.data||[];d("emitting event %j",_),u.id!=null&&(d("attaching ack callback to event"),_.push(this.ack(u.id))),this.connected?g.apply(this,_):this.receiveBuffer.push(_)},l.prototype.ack=function(u){var _=this,A=!1;return function(){if(!A){A=!0;var k=c(arguments);d("sending ack %j",k),_.packet({type:p(k)?n.BINARY_ACK:n.ACK,id:u,data:k})}}},l.prototype.onack=function(u){var _=this.acks[u.id];typeof _=="function"?(d("calling ack %s with %j",u.id,u.data),_.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}})(Cc);var Ac=Cc.exports,rm=Kn;function Kn(i){i=i||{},this.ms=i.min||100,this.max=i.max||1e4,this.factor=i.factor||2,this.jitter=i.jitter>0&&i.jitter<=1?i.jitter:0,this.attempts=0}Kn.prototype.duration=function(){var i=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var o=Math.random(),n=Math.floor(o*this.jitter*i);i=Math.floor(o*10)&1?i+n:i-n}return Math.min(i,this.max)|0};Kn.prototype.reset=function(){this.attempts=0};Kn.prototype.setMin=function(i){this.ms=i};Kn.prototype.setMax=function(i){this.max=i};Kn.prototype.setJitter=function(i){this.jitter=i};var im=Q0,om=Ac,sm=qn,am=pi,sn=Sc,Fn=kc,Yt=Je("socket.io-client:manager"),xc=_c,um=rm,Ec=Object.prototype.hasOwnProperty,Zu=bt;function bt(i,o){if(!(this instanceof bt))return new bt(i,o);i&&typeof i=="object"&&(o=i,i=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 um({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(o.timeout==null?2e4:o.timeout),this.readyState="closed",this.uri=i,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var n=o.parser||am;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 i in this.nsps)Ec.call(this.nsps,i)&&this.nsps[i].emit.apply(this.nsps[i],arguments)};bt.prototype.updateSocketIds=function(){for(var i in this.nsps)Ec.call(this.nsps,i)&&(this.nsps[i].id=this.generateId(i))};bt.prototype.generateId=function(i){return(i==="/"?"":i+"#")+this.engine.id};sm(bt.prototype);bt.prototype.reconnection=function(i){return arguments.length?(this._reconnection=!!i,this):this._reconnection};bt.prototype.reconnectionAttempts=function(i){return arguments.length?(this._reconnectionAttempts=i,this):this._reconnectionAttempts};bt.prototype.reconnectionDelay=function(i){return arguments.length?(this._reconnectionDelay=i,this.backoff&&this.backoff.setMin(i),this):this._reconnectionDelay};bt.prototype.randomizationFactor=function(i){return arguments.length?(this._randomizationFactor=i,this.backoff&&this.backoff.setJitter(i),this):this._randomizationFactor};bt.prototype.reconnectionDelayMax=function(i){return arguments.length?(this._reconnectionDelayMax=i,this.backoff&&this.backoff.setMax(i),this):this._reconnectionDelayMax};bt.prototype.timeout=function(i){return arguments.length?(this._timeout=i,this):this._timeout};bt.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()};bt.prototype.open=bt.prototype.connect=function(i,o){if(Yt("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;Yt("opening %s",this.uri),this.engine=im(this.uri,this.opts);var n=this.engine,a=this;this.readyState="opening",this.skipReconnect=!1;var c=sn(n,"open",function(){a.onopen(),i&&i()}),f=sn(n,"error",function(b){if(Yt("connect_error"),a.cleanup(),a.readyState="closed",a.emitAll("connect_error",b),i){var p=new Error("Connection error");p.data=b,i(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 i=this.engine;this.subs.push(sn(i,"data",Fn(this,"ondata"))),this.subs.push(sn(i,"ping",Fn(this,"onping"))),this.subs.push(sn(i,"pong",Fn(this,"onpong"))),this.subs.push(sn(i,"error",Fn(this,"onerror"))),this.subs.push(sn(i,"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(i){this.decoder.add(i)};bt.prototype.ondecoded=function(i){this.emit("packet",i)};bt.prototype.onerror=function(i){Yt("error",i),this.emitAll("error",i)};bt.prototype.socket=function(i,o){var n=this.nsps[i];if(!n){n=new om(this,i,o),this.nsps[i]=n;var a=this;n.on("connecting",c),n.on("connect",function(){n.id=a.generateId(i)}),this.autoConnect&&c()}function c(){~xc(a.connecting,n)||a.connecting.push(n)}return n};bt.prototype.destroy=function(i){var o=xc(this.connecting,i);~o&&this.connecting.splice(o,1),!this.connecting.length&&this.close()};bt.prototype.packet=function(i){Yt("writing packet %j",i);var o=this;i.query&&i.type===0&&(i.nsp+="?"+i.query),o.encoding?o.packetBuffer.push(i):(o.encoding=!0,this.encoder.encode(i,function(n){for(var a=0;a<n.length;a++)o.engine.write(n[a],i.options);o.encoding=!1,o.processPacketQueue()}))};bt.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var i=this.packetBuffer.shift();this.packet(i)}};bt.prototype.cleanup=function(){Yt("cleanup");for(var i=this.subs.length,o=0;o<i;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(i){Yt("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",i),this._reconnection&&!this.skipReconnect&&this.reconnect()};bt.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var i=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(){i.skipReconnect||(Yt("attempting reconnect"),i.emitAll("reconnect_attempt",i.backoff.attempts),i.emitAll("reconnecting",i.backoff.attempts),!i.skipReconnect&&i.open(function(a){a?(Yt("reconnect attempt error"),i.reconnecting=!1,i.reconnect(),i.emitAll("reconnect_error",a.data)):(Yt("reconnect success"),i.onreconnect())}))},o);this.subs.push({destroy:function(){clearTimeout(n)}})}};bt.prototype.onreconnect=function(){var i=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",i)};(function(i,o){var n=Hv,a=pi,c=Zu,f=Je("socket.io-client");i.exports=o=d;var v=o.managers={};function d(b,p){typeof b=="object"&&(p=b,b=void 0),p=p||{};var w=n(b),g=w.source,l=w.id,u=w.path,_=v[l]&&u in v[l].nsps,A=p.forceNew||p["force new connection"]||p.multiplex===!1||_,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]),w.query&&!p.query&&(p.query=w.query),k.socket(w.path,p)}o.protocol=a.protocol,o.connect=d,o.Manager=Zu,o.Socket=Ac})($o,$o.exports);var cm=$o.exports;const fm=Rv(cm);function hm(i){return!!i&&(typeof i=="object"||typeof i=="function")&&typeof i.then=="function"}function lm(i,o){const n=o.map(c=>JSON.stringify(c)).join(" "),a=new Date().toISOString();return JSON.stringify({level:i,time:a,message:n})}function pm(i){const o=i[0],n=i.slice(1);return{level:o,logs:n}}function dm(i,o){const n=JSON.parse(i);return o.forEach(a=>delete n[a]),n}const gm={reconnection:!0,reconnectionDelay:5e3,reconnectionAttempts:10,upgrade:!1,transports:["websocket"],debug:!1},zo={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||zo.socketEmitInterval,this.logToConsole=n.logToConsole??zo.logToConsole,this.overloadGlobalConsole=n.overloadGlobalConsole??zo.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:lm}promisifyStorageFunction(o){const n=o("");return hm(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={...gm,...n};return fm(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=dm(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}=pm(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 ym{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 vm{constructor(o){St(this,"listeners",{[pt.ALL_EXTENSION_STATUS]:[],[pt.ALL_DIALER_STATUS]:[],[pt.ALL_USERS_STATUS]:[],[pt.QUEUE_EVENT]:[],[pt.EXTENSION_EVENT]:[],[pt.DIALER_EVENT]:[],[pt.LOGIN_SUCCESS]:[],[pt.LOGIN_STATUS]:[],[pt.KEEP_ALIVE_RESPONSE]:[],[pt.ONLINE_STATUS_EVENT]:[],[pt.EXTENSIONS_UPDATED]:[]});St(this,"allListeners",[]);this.eventsSdkClass=o,this.eventsSdkClass=o}on(o,n){o==="*"?this.allListeners.push(n):this.listeners[o].push(n)}off(o,n){if(o==="*")this.allListeners=this.allListeners.filter(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 mm{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 yv(this));St(this,"socketIoClass",new xv(this));St(this,"loggerClass",new ym(this));St(this,"eventEmitterClass",new vm(this));St(this,"reconnectOptions");St(this,"retryConnection");this.options={...mv,...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=vv.debounce(this.connect.bind(this),this.reconnectOptions.reconnectionDelay,{leading:!0,trailing:!1}),this.argumentOptions={...o}}on(o,n){this.eventEmitterClass.on(o,n)}emit(o,n){this.socketIoClass.io&&this.socketIoClass.io.emit(o,n)}connect(o){o===wn.MAIN&&this.findMainServer(),o===wn.NEXT&&this.findNextServer(),this.socketIoClass.doReconnect=!0,this.socketIoClass.initSocketConnection(),this.socketIoClass.initSocketEvents(),this.socketIoClass.initKeepAlive(),this.loggerClass.init()}disconnect(){this.socketIoClass.doReconnect=!1,this.socketIoClass.closeAllConnections()}clearKeepAliveInterval(){this.socketIoClass.clearKeepAliveInterval()}findMainServer(){this.servers.length?(this.mainServer=this.servers.reduce((o,n)=>n.Priority>o.Priority?n:o),this.server=this.mainServer):this.URLList.length&&(this.URL=this.URLList[0])}findNextServer(){if(this.servers.length)if(this.server.Priority===this.mainServer.Priority){let o=this.servers.filter(n=>n.Priority!==this.mainServer.Priority&&this.alreadyAttemptedOtherServers.indexOf(n.Priority)+1===0);o.length||(this.alreadyAttemptedOtherServers=[],o=this.servers.filter(n=>n.Priority!==this.mainServer.Priority&&this.alreadyAttemptedOtherServers.indexOf(n.Priority)+1===0)),o.length&&(this.server=o.reduce((n,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.default=mm;
|
|
43
|
+
`+$n+"}":"{"+Vt.join(",")+"}":"{}";return nt.pop(),Pe}};_.stringify=function($,Q,X){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(X)if((nt=b.call(X))==w){if((X-=X%1)>0)for(rt="",X>10&&(X=10);rt.length<X;rt+=" ");}else nt==A&&(rt=X.length<=10?X:X.slice(0,10));return G("",(Z={},Z[""]=$,Z),K,et,rt,"",[])}}if(!c("json-parse")){var F,pt,ut=String.fromCharCode,xt={92:"\\",34:'"',47:"/",98:"\b",116:" ",110:`
|
|
44
|
+
`,102:"\f",114:"\r"},ct=function(){throw F=pt=null,SyntaxError()},Xt=function(){for(var $,Q,X,rt,K,et=pt,nt=et.length;nt>F;)switch(K=et.charCodeAt(F)){case 9:case 10:case 13:case 32:F++;break;case 123:case 125:case 91:case 93:case 58:case 44:return $=Y?et.charAt(F):et[F],F++,$;case 34:for($="@",F++;nt>F;)if(K=et.charCodeAt(F),32>K)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,X=F+4;X>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(X=++F;nt>X&&(K=et.charCodeAt(X),K>=48&&57>=K);X++);X==F&&ct(),F=X}if(K=et.charCodeAt(F),K==101||K==69){for(K=et.charCodeAt(++F),(K==43||K==45)&&F++,X=F;nt>X&&(K=et.charCodeAt(X),K>=48&&57>=K);X++);X==F&&ct(),F=X}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,X;if($=="$"&&ct(),typeof $=="string"){if((Y?$.charAt(0):$[0])=="@")return $.slice(1);if($=="["){for(Q=[];$=Xt(),$!="]";X||(X=!0))X&&($==","?($=Xt(),$=="]"&&ct()):ct()),$==","&&ct(),Q.push(Oe($));return Q}if($=="{"){for(Q={};$=Xt(),$!="}";X||(X=!0))X&&($==","?($=Xt(),$=="}"&&ct()):ct()),($==","||typeof $!="string"||(Y?$.charAt(0):$[0])!="@"||Xt()!=":")&&ct(),Q[$.slice(1)]=Oe(Xt());return Q}ct()}return $},ae=function($,Q,X){var rt=yr($,Q,X);rt===d?delete $[Q]:$[Q]=rt},yr=function($,Q,X){var rt,K=$[Q];if(typeof K=="object"&&K)if(b.call(K)==k)for(rt=K.length;rt--;)ae(K,rt,X);else v(K,function(et){ae(K,et,X)});return X.call($,Q,K)};_.parse=function($,Q){var X,rt;return F=0,pt=""+$,X=Oe(Xt()),Xt()!="$"&&ct(),F=pt=null,Q&&b.call(Q)==l?yr((rt={},rt[""]=X,rt),"",Q):X}}}})(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 Tv=Object.freeze(Object.defineProperty({__proto__:null,default:Ev},Symbol.toStringTag,{value:"Module"})),Rv=Object.assign({"./v1_3_7.js":Tv}),Ov=/v\d+_\d+_\d+/;function Iv(r){return typeof r=="function"}const Xo=Object.entries(Rv).reduce((r,o)=>{var c;const n=o[1].default,a=(c=o[0].match(Ov))==null?void 0:c[0];return Iv(n)&&a&&(r[a]=n()),r},{}),rc=r=>{if(r in Xo)return Xo[r];throw new Error(`Socket version ${r} not found`)},Nv=(r,...o)=>rc(r)(...o),Bv={...Xo,getSocketVersion:rc,makeSocketVersion:Nv};var ic=(r=>(r.RINGING="Ringing",r.TALKING="Talking",r.DIALING="Dialing",r.HOLD="Hold",r))(ic||{}),oc=(r=>(r.INCOMING="Incoming",r.OUTGOING="Outgoing",r))(oc||{}),sc=(r=>(r.AUTOMATIC="Automatic",r.IVR="IVR",r))(sc||{}),ac=(r=>(r.INCOMINC="Incoming",r.OUTGOING="Outgoing",r.SPY="Spy",r.CLICK2CALL="Click2call",r))(ac||{}),uc=(r=>(r.RESPONSE_FROM_API_VALID="RESPONSE_FROM_API_VALID",r.RESPONSE_FROM_API_INVALID="RESPONSE_FROM_API_INVALID",r))(uc||{}),lt=(r=>(r.ALL_DIALER_STATUS="AllDialersStatus",r.ALL_EXTENSION_STATUS="AllExtensionsStatus",r.ALL_USERS_STATUS="AllUsersStatus",r.CONNECT="connect",r.DISCONNECT="disconnect",r.CONNECT_ERROR_EVENT="connect_error",r.EXTENSION_EVENT="ExtensionEvent",r.KEEP_ALIVE="keepalive",r.KEEP_ALIVE_RESPONSE="keepaliveResponse",r.LOGIN_STATUS="loginStatus",r.LOGIN_SUCCESS="loginSuccess",r.QUEUE_EVENT="QueueEvent",r.ONLINE_STATUS_EVENT="onlineStatusEvent",r.DIALER_EVENT="DialerEvent",r.EXTENSIONS_UPDATED="ExtensionsUpdated",r))(lt||{}),cc=(r=>(r.NEWCALL="NEWCALL",r.ANSWER="ANSWER",r.HOLD="HOLD",r.UNHOLD="UNHOLD",r.HANGUP="HANGUP",r.USER_STATUS_UPDATE="userStatusUpdate",r))(cc||{}),fc=(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))(fc||{}),hc=(r=>(r.ANSWER="ANSWER",r.ABANDONED="ABANDONED",r.EXIT="EXIT",r.JOIN="JOIN",r))(hc||{});class Lv{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=Bv.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(lt.ONLINE_STATUS_EVENT,{isSocketConnected:!1,attemptToConnect:f});const v={reconnection:!1,upgrade:!1,transports:["websocket"],forceNew:!0,query:{token:o},timeout:this.eventsSdkClass.options.timeout};if(o&&(v.query={token:o}),this.ioFunction&&f)this.io=this.ioFunction(f,v);else throw new Error("Socket server url no defined")}catch(c){this.eventsSdkClass.loggerClass.log(jt.ERROR,"init socket connection error",c)}}initSocketEvents(){this.io&&this.io.on(lt.LOGIN_SUCCESS,o=>this.eventsSdkClass.eventEmitterClass.emit(lt.LOGIN_SUCCESS,o)).on(lt.QUEUE_EVENT,o=>this.eventsSdkClass.eventEmitterClass.emit(lt.QUEUE_EVENT,o)).on(lt.EXTENSION_EVENT,o=>this.eventsSdkClass.eventEmitterClass.emit(lt.EXTENSION_EVENT,o)).on(lt.DIALER_EVENT,o=>this.eventsSdkClass.eventEmitterClass.emit(lt.DIALER_EVENT,o)).on(lt.LOGIN_STATUS,o=>this.eventsSdkClass.eventEmitterClass.emit(lt.LOGIN_STATUS,o)).on(lt.ALL_EXTENSION_STATUS,o=>this.eventsSdkClass.eventEmitterClass.emit(lt.ALL_EXTENSION_STATUS,o)).on(lt.ALL_DIALER_STATUS,o=>this.eventsSdkClass.eventEmitterClass.emit(lt.ALL_DIALER_STATUS,o)).on(lt.KEEP_ALIVE_RESPONSE,o=>this.onKeepAliveResponse(o)).on(lt.CONNECT,()=>this.onConnect()).on(lt.DISCONNECT,o=>this.onDisconnect(o)).on(lt.CONNECT_ERROR_EVENT,o=>this.onConnectError(o)).on(lt.EXTENSIONS_UPDATED,o=>{this.eventsSdkClass.eventEmitterClass.emit(lt.EXTENSIONS_UPDATED,o)})}clearKeepAliveInterval(){this.keepAliveInterval&&clearInterval(this.keepAliveInterval)}initKeepAlive(){this.clearKeepAliveInterval(),this.keepAliveInterval=setInterval(async()=>{if(new Date().getTime()>this.lastEventTimestamp+this.eventsSdkClass.options.keepAliveTimeout&&this.io){this.eventsSdkClass.emit(lt.KEEP_ALIVE,this.eventsSdkClass.authClass.token),this.eventsSdkClass.loggerClass.log(jt.INFO,`EMIT -> ${lt.KEEP_ALIVE}`,this.eventsSdkClass.authClass.token);return}},this.eventsSdkClass.options.keepAliveTimeout)}closeAllConnections(){var o;this.io&&(this.io.close(),(o=this.io)==null||o.disconnect(),this.io=void 0),hr.clearSessionStorage()}onKeepAliveResponse(o){if(this.eventsSdkClass.loggerClass.log(jt.INFO,lt.KEEP_ALIVE_RESPONSE),o.errorCode){this.initSocketConnection();return}this.connected?this.lastEventTimestamp=new Date().getTime():this.initSocketConnection()}onConnect(){this.keepReconnectInterval&&clearInterval(this.keepReconnectInterval),this.connected=!0,this.eventsSdkClass.loggerClass.log(jt.INFO,lt.CONNECT,this.eventsSdkClass.reconnectOptions),this.eventsSdkClass.eventEmitterClass.emit(lt.ONLINE_STATUS_EVENT,{isSocketConnected:!0})}onDisconnect(o){this.connected=!1,this.eventsSdkClass.loggerClass.log(jt.INFO,lt.DISCONNECT,o),this.closeAllConnections(),this.eventsSdkClass.eventEmitterClass.emit(lt.ONLINE_STATUS_EVENT,{isSocketConnected:!1}),this.doReconnect&&(console.log("attempt to connect..."),this.eventsSdkClass.connect(_n.NEXT))}onConnectError(o){this.eventsSdkClass.eventEmitterClass.emit(lt.ONLINE_STATUS_EVENT,{isSocketConnected:!1}),this.eventsSdkClass.loggerClass.log(jt.ERROR,lt.CONNECT_ERROR_EVENT,o),setTimeout(()=>{this.eventsSdkClass.connect(_n.NEXT)},this.eventsSdkClass.options.reconnectionDelay)}}var Uv=Object.defineProperty,Dv=(r,o,n)=>o in r?Uv(r,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[o]=n,Ht=(r,o,n)=>(Dv(r,typeof o!="symbol"?o+"":o,n),n);function Pv(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Fv(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 Go={exports:{}},Mv=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,qv=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],lc=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=Mv.exec(r||""),f={},v=14;v--;)f[qv[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=Wv(f,f.path),f.queryKey=Hv(f,f.query),f};function Wv(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 Hv(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,Kv=gr*365.25,zv=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?$v(r):Gv(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*Kv;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 Gv(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 $v(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=zv,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,jv=lc,Wu=Je("socket.io-client:url"),Yv=Vv;function Vv(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=jv(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={},pc={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}})(pc);var qn=pc.exports,di={},Zv={}.toString,ts=Array.isArray||function(r){return Zv.call(r)=="[object Array]"},dc=n0,Qv=typeof Buffer=="function"&&typeof Buffer.isBuffer=="function",t0=typeof ArrayBuffer=="function",e0=function(r){return typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r.buffer instanceof ArrayBuffer};function n0(r){return Qv&&Buffer.isBuffer(r)||t0&&(r instanceof ArrayBuffer||e0(r))}var es=ts,gc=dc,yc=Object.prototype.toString,r0=typeof Blob=="function"||typeof Blob<"u"&&yc.call(Blob)==="[object BlobConstructor]",i0=typeof File=="function"||typeof File<"u"&&yc.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(gc(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(r0&&f instanceof Blob||i0&&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"&&!gc(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=dc;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 o0=Vo.exports,rs=function(){return typeof self<"u"?self:typeof window<"u"?window:Function("return this")()}(),s0=o0,a0=rs,is=function(r){var o=r.xdomain,n=r.xscheme,a=r.enablesXDR;try{if(typeof XMLHttpRequest<"u"&&(!o||s0))return new XMLHttpRequest}catch{}try{if(typeof XDomainRequest<"u"&&!n&&a)return new XDomainRequest}catch{}if(!o)try{return new a0[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}},os={exports:{}},wn={},u0=Object.keys||function(r){var o=[],n=Object.prototype.hasOwnProperty;for(var a in r)n.call(r,a)&&o.push(a);return o},c0=ts,vc=Object.prototype.toString,f0=typeof Blob=="function"||typeof Blob<"u"&&vc.call(Blob)==="[object BlobConstructor]",h0=typeof File=="function"||typeof File<"u"&&vc.call(File)==="[object FileConstructor]",mc=ai;function ai(r){if(!r||typeof r!="object")return!1;if(c0(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||f0&&r instanceof Blob||h0&&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 l0=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},p0=d0;function d0(r,o,n){var a=!1;return n=n||g0,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 g0(){}/*! https://mths.be/utf8js v2.1.2 by @mathias */var an=String.fromCharCode;function _c(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 y0(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 wc(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 v0(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)):(wc(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 m0(r,o){o=o||{};for(var n=o.strict!==!1,a=_c(r),c=a.length,f=-1,v,d="";++f<c;)v=a[f],d+=v0(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 _0(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 wc(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 w0(r,o){o=o||{};var n=o.strict!==!1;ci=_c(r),fi=ci.length,un=0;for(var a=[],c;(c=_0(n))!==!1;)a.push(c);return y0(a)}var b0={version:"2.1.2",encode:m0,decode:w0},qo={},Hu;function C0(){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 S0(){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=u0,n=mc,a=l0,c=p0,f=b0,v;typeof ArrayBuffer<"u"&&(v=C0());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=S0();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,G){U(z,function(F,pt){I[H]=pt,G(F,I)})},B=0;B<N.length;B++)R(B,N[B],P)}r.decodePayload=function(N,U,T){if(typeof N!="string")return r.decodePayloadAsBinary(N,U,T);typeof U=="function"&&(T=U,U=null);var I;if(N==="")return T(l,0,1);for(var P="",R,B,H=0,z=N.length;H<z;H++){var G=N.charAt(H);if(G!==":"){P+=G;continue}if(P===""||P!=(R=Number(P))||(B=N.substr(H+1,R),P!=B.length))return T(l,0,1);if(B.length){if(I=r.decodePacket(B,U,!1),l.type===I.type&&l.data===I.data)return T(l,0,1);var F=T(I,H+R,z);if(F===!1)return}H+=R,P=""}if(P!=="")return T(l,0,1)},r.encodePayloadAsArrayBuffer=function(N,U){if(!N.length)return U(new ArrayBuffer(0));function T(I,P){r.encodePacket(I,!0,!0,function(R){return P(null,R)})}J(N,T,function(I,P){var R=P.reduce(function(z,G){var F;return typeof G=="string"?F=G.length:F=G.byteLength,z+F.toString().length+F+2},0),B=new Uint8Array(R),H=0;return P.forEach(function(z){var G=typeof z=="string",F=z;if(G){for(var pt=new Uint8Array(z.length),ut=0;ut<z.length;ut++)pt[ut]=z.charCodeAt(ut);F=pt.buffer}G?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 pt=new Uint8Array(F),ut=0;ut<pt.length;ut++)B[H++]=pt[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 G=R instanceof ArrayBuffer?R.byteLength:R.size,F=G.toString(),pt=new Uint8Array(F.length+1),z=0;z<F.length;z++)pt[z]=parseInt(F[z]);if(pt[F.length]=255,u){var ut=new u([B.buffer,pt.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 G=a(I,0,H);if(B)try{G=String.fromCharCode.apply(null,new Uint8Array(G))}catch{var F=new Uint8Array(G);G="";for(var z=0;z<F.length;z++)G+=String.fromCharCode(F[z])}P.push(G),I=a(I,H)}var pt=P.length;P.forEach(function(ut,xt){T(r.decodePacket(ut,U,!0),xt,pt)})}})(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},bc="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),hi=64,Cc={},Xu=0,cn=0,Gu;function Zo(r){var o="";do o=bc[r%hi]+o,r=Math.floor(r/hi);while(r>0);return o}function k0(r){var o=0;for(cn=0;cn<r.length;cn++)o=o*hi+Cc[r.charAt(cn)];return o}function as(){var r=Zo(+new Date);return r!==Gu?(Xu=0,Gu=r):r+"."+Zo(Xu++)}for(;cn<hi;cn++)Cc[bc[cn]]=cn;as.encode=Zo;as.decode=k0;var Sc=as,kc=ss(),A0=Wn,Ac=wn,x0=yi,E0=Sc,Re=Je("engine.io-client:polling"),xc=De,T0=function(){var r=is,o=new r({xdomain:!1});return o.responseType!=null}();function De(r){var o=r&&r.forceBase64;(!T0||o)&&(this.supportsBinary=!1),kc.call(this,r)}x0(De,kc);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)};Ac.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")};Ac.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]=E0()),!this.supportsBinary&&!r.sid&&(r.b64=1),r=A0.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 R0=is,Ec=xc,O0=qn,I0=yi,Qo=Je("engine.io-client:polling-xhr"),N0=rs;os.exports=Hn;os.exports.Request=qt;function $u(){}function Hn(r){if(Ec.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}}I0(Hn,Ec);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()}O0(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 R0(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 B0="onpagehide"in N0?"pagehide":"unload";addEventListener(B0,Ju,!1)}}function Ju(){for(var r in qt.requests)qt.requests.hasOwnProperty(r)&&qt.requests[r].abort()}var L0=os.exports,us=xc,U0=yi,ju=rs,D0=Kn,P0=/\n/g,F0=/\\n/g,si;function M0(){}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=M0)},!1)}U0(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(F0,`\\
|
|
45
|
+
`),this.area.value=r.replace(P0,"\\n");try{this.form.submit()}catch{}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){n.iframe.readyState==="complete"&&d()}:this.iframe.onload=d};const q0={},W0=Object.freeze(Object.defineProperty({__proto__:null,default:q0},Symbol.toStringTag,{value:"Module"})),H0=Fv(W0);var cs=ss(),K0=wn,z0=Wn,X0=yi,G0=Sc,$0=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=H0}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){K0.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{$0("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]=G0()),this.supportsBinary||(r.b64=1),r=z0.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 j0=is,Y0=L0,V0=D0,Z0=J0;gi.polling=Q0;gi.websocket=Z0;function Q0(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 j0(r),"open"in o&&!r.forceJSONP)return new Y0(r);if(!c)throw new Error("JSONP disabled");return new V0(r)}var tm=[].indexOf,Tc=function(r,o){if(tm)return r.indexOf(o);for(var n=0;n<r.length;++n)if(r[n]===o)return n;return-1},em=gi,nm=qn,Pt=Je("engine.io-client:socket"),rm=Tc,Rc=wn,Yu=lc,im=Wn,om=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=im.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;nm(wt.prototype);wt.protocol=Rc.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=sm(this.query);o.EIO=Rc.protocol,o.transport=r;var n=this.transportOptions[r]||{};this.id&&(o.sid=this.id);var a=new em[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 sm(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++)~rm(this.transports,r[n])&&o.push(r[n]);return o};ns.exports=om;ns.exports.parser=wn;var am=ns.exports,Oc={exports:{}},um=cm;function cm(r,o){var n=[];o=o||0;for(var a=o||0;a<r.length;a++)n[a-o]=r[a];return n}var Ic=fm;function fm(r,o,n){return r.on(o,n),{destroy:function(){r.removeListener(o,n)}}}var Vu=[].slice,Nc=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=um,f=Ic,v=Nc,d=Je("socket.io-client:socket"),b=Wn,p=mc;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}})(Oc);var Bc=Oc.exports,hm=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 lm=am,pm=Bc,dm=qn,gm=pi,sn=Ic,Fn=Nc,Yt=Je("socket.io-client:manager"),Lc=Tc,ym=hm,Uc=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 ym({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||gm;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)Uc.call(this.nsps,r)&&this.nsps[r].emit.apply(this.nsps[r],arguments)};bt.prototype.updateSocketIds=function(){for(var r in this.nsps)Uc.call(this.nsps,r)&&(this.nsps[r].id=this.generateId(r))};bt.prototype.generateId=function(r){return(r==="/"?"":r+"#")+this.engine.id};dm(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=lm(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 pm(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(){~Lc(a.connecting,n)||a.connecting.push(n)}return n};bt.prototype.destroy=function(r){var o=Lc(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=Yv,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=Bc})(Go,Go.exports);var vm=Go.exports;const mm=Pv(vm);function _m(r){return!!r&&(typeof r=="object"||typeof r=="function")&&typeof r.then=="function"}function wm(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 bm(r){const o=r[0],n=r.slice(1);return{level:o,logs:n}}function Cm(r,o){const n=JSON.parse(r);return o.forEach(a=>delete n[a]),n}const Sm={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:wm}promisifyStorageFunction(o){const n=o("");return _m(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={...Sm,...n};return mm(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=Cm(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}=bm(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 km{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 Am{constructor(o){St(this,"listeners",{[lt.ALL_EXTENSION_STATUS]:[],[lt.ALL_DIALER_STATUS]:[],[lt.ALL_USERS_STATUS]:[],[lt.QUEUE_EVENT]:[],[lt.EXTENSION_EVENT]:[],[lt.DIALER_EVENT]:[],[lt.LOGIN_SUCCESS]:[],[lt.LOGIN_STATUS]:[],[lt.KEEP_ALIVE_RESPONSE]:[],[lt.ONLINE_STATUS_EVENT]:[],[lt.EXTENSIONS_UPDATED]:[]});St(this,"allListeners",[]);this.eventsSdkClass=o,this.eventsSdkClass=o}on(o,n){o==="*"?this.allListeners.push(n):this.listeners[o].push(n)}off(o,n){if(o==="*")this.allListeners=this.allListeners.filter(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 xm{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 kv(this));St(this,"socketIoClass",new Lv(this));St(this,"loggerClass",new km(this));St(this,"eventEmitterClass",new Am(this));St(this,"reconnectOptions");St(this,"retryConnection");this.options={...xv,...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=Av.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=ic;exports.CallTypeEnum=oc;exports.DialerTypeEnum=sc;exports.DirectionEnum=ac;exports.DoNotCallMeStatusCodeEnum=uc;exports.EventsEnum=lt;exports.ExtensionEventReasonEnum=cc;exports.ExtensionHangupCauseEnum=fc;exports.QueueEventReasonEnum=hc;exports.default=xm;
|
|
46
46
|
//# sourceMappingURL=voicenter-events-sdk.cjs.js.map
|