!function(e,t){"object"==typeofexports&&"object"==typeofmodule?module.exports=t():"function"==typeofdefine&&define.amd?define([],t):"object"==typeofexports?exports.Peer=t():e.Peer=t()}(globalThis,(function(){returnfunction(e){vart={};functionn(r){if(t[r])returnt[r].exports;vari=t[r]={i:r,l:!1,exports:{}};returne[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}returnn.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeofSymbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)returne;if(4&t&&"object"==typeofe&&e&&e.__esModule)returne;varr=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeofe)for(variine)n.d(r,i,function(t){returne[t]}.bind(null,i));returnr},n.n=function(e){vart=e&&e.__esModule?function(){returne.default}:function(){returne};returnn.d(t,"a",t),t},n.o=function(e,t){returnObject.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=75)}([function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){returna}));varr=n(7),i=n(3),o=n(18);consts=(()=>{conste=newArrayBuffer(2);returnnewDataView(e).setInt16(0,256,!0),256===newInt16Array(e)[0]?"LE":"BE"})();classa{constructor(e,t){if(this.size=4,this.indirection=1,t&&Object(i.c)(t)&&(t={name:t}),this._options=t||{},this._options.separator=this._options.separator||" | ",this._options.endianness=this._options.endianness||s,this._options.ignoreCase=this._options.ignoreCase||!1,this._options.freez=this._options.freez||!1,this._options.freeze=this._options.freeze||this._options.freez||!1,this.enums=[],e.length){this._enumLastIndex=e.length;varn=e;e={};for(varo=0;o<n.length;o++)e[n[o]]=Math.pow(2,o)}for(varaine)u(this._options.name,a),this[a]=newr.a(a,e[a],{ignoreCase:this._options.ignoreCase}),this.enums.push(this[a]);this._enumMap=e,this._options.ignoreCase&&(this.getLowerCaseEnums=function(){for(vare={},t=0,n=this.enums.length;t<n;t++)e[this.enums[t].key.toLowerCase()]=this.enums[t];returne}),this._options.name&&(this.name=this._options.name);this.isFlaggable=(()=>{for(vare=0,t=this.enums.length;e<t;e++){varn=this.enums[e];if(0===n.value||n.value&n.value-1)return!1}return!0})(),this._options.freeze&&this.freezeEnums()}getKey(e){vart=this.get(e);if(t)returnt.key}getValue(e){vart=this.get(e);if(t)returnt.value}get(e,t){if(null!=e){varn;if(null!=(n=e)&&null!=n.constructor&&"function"==typeofn.constructor.isBuffer&&n.constructor.isBuffer(n)&&(e=e["readUInt32"+this._options.endianness](t||0)),r.a.isEnumItem(e)){if(o.a.call(this.enums,e)>=0)returne;if(!this.isFlaggable||this.isFlaggable&&e.key.indexOf(this._options.separator)<0)return;returnthis.get(e.key)}if(Object(i.c)(e)){vars=this;if(this._options.ignoreCase&&(s=this.getLowerCaseEnums(),e=e.toLowerCase()),e.indexOf(this._options.separator)>0){for(vara=e.split(this._options.separator),c=0,u=0;u<a.length;u++){c|=s[a[u]].value}returnnewr.a(e,c)}returns[e]}for(varhinthis)if(this.hasOwnProperty(h)&&this[h].value===e)returnthis[h];varp=null;if(this.isFlaggable)for(vardinthis)this.hasOwnProperty(d)&&0!=(e&this[d].value)&&(p?p+=this._options.separator:p="",p+=d);returnthis.get(p||null)}}set(e,t,n){varr=this.get(n);if(r)returne["writeUInt32"+this._options.endianness](r.value,t||0)}freezeEnums(){functione(e){returne}returnObject.isFrozen&&Object.isSealed&&Object.getOwnPropertyNames&&Object.getOwnPropertyDescriptor&&Object.defineProperties&&Object.__defineGetter__&&Object.__defineSetter__&&functiont(n){if("object"==typeofn&&null!==n&&!Object.isFrozen(n)&&!Object.isSealed(n)){for(varrinn)n.hasOwnProperty(r)&&(n.__defineGetter__(r,e.bind(null,n[r])),n.__defineSetter__(r,(function(e){throwTypeError("Cannot redefine property; Enum Type is not extensible.")})),t(n[r]));Object.freeze?Object.freeze(n):function(e){Object.getOwnPropertyNames(e).forEach((function(t){Object.getOwnPropertyDescriptor(e,t).configurable&&O
varr=n(44),i=n(45),o=n(46);functions(){returnc.TYPED_ARRAY_SUPPORT?2147483647:1073741823}functiona(e,t){if(s()<t)thrownewRangeError("Invalid typed array length");returnc.TYPED_ARRAY_SUPPORT?(e=newUint8Array(t)).__proto__=c.prototype:(null===e&&(e=newc(t)),e.length=t),e}functionc(e,t,n){if(!(c.TYPED_ARRAY_SUPPORT||thisinstanceofc))returnnewc(e,t,n);if("number"==typeofe){if("string"==typeoft)thrownewError("If encoding is specified then the first argument must be a string");returnp(this,e)}returnu(this,e,t,n)}functionu(e,t,n,r){if("number"==typeoft)thrownewTypeError('"value" argument must not be a number');return"undefined"!=typeofArrayBuffer&&tinstanceofArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)thrownewRangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))thrownewRangeError("'length' is out of bounds");t=void0===n&&void0===r?newUint8Array(t):void0===r?newUint8Array(t,n):newUint8Array(t,n,r);c.TYPED_ARRAY_SUPPORT?(e=t).__proto__=c.prototype:e=d(e,t);returne}(e,t,n,r):"string"==typeoft?function(e,t,n){"string"==typeofn&&""!==n||(n="utf8");if(!c.isEncoding(n))thrownewTypeError('"encoding" must be a valid string encoding');varr=0|l(t,n),i=(e=a(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));returne}(e,t,n):function(e,t){if(c.isBuffer(t)){varn=0|f(t.length);return0===(e=a(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeofArrayBuffer&&t.bufferinstanceofArrayBuffer||"length"int)return"number"!=typeoft.length||(r=t.length)!=r?a(e,0):d(e,t);if("Buffer"===t.type&&o(t.data))returnd(e,t.data)}varr;thrownewTypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}functionh(e){if("number"!=typeofe)thrownewTypeError('"size" argument must be a number');if(e<0)thrownewRangeError('"size" argument must not be negative')}functionp(e,t){if(h(t),e=a(e,t<0?0:0|f(t)),!c.TYPED_ARRAY_SUPPORT)for(varn=0;n<t;++n)e[n]=0;returne}functiond(e,t){varn=t.length<0?0:0|f(t.length);e=a(e,n);for(varr=0;r<n;r+=1)e[r]=255&t[r];returne}functionf(e){if(e>=s())thrownewRangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return0|e}functionl(e,t){if(c.isBuffer(e))returne.length;if("undefined"!=typeofArrayBuffer&&"function"==typeofArrayBuffer.isView&&(ArrayBuffer.isView(e)||einstanceofArrayBuffer))returne.byteLength;"string"!=typeofe&&(e=""+e);varn=e.length;if(0===n)return0;for(varr=!1;;)switch(t){case"ascii":case"latin1":case"binary":returnn;case"utf8":case"utf-8":casevoid0:returnj(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return2*n;case"hex":returnn>>>1;case"base64":returnV(e).length;default:if(r)returnj(e).length;t=(""+t).toLowerCase(),r=!0}}functionm(e,t,n){varr=!1;if((void0===t||t<0)&&(t=0),t>this.length)return"";if((void0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":returnO(this,t,n);case"utf8":case"utf-8":returnA(this,t,n);case"ascii":returnT(this,t,n);case"latin1":case"binary":returnR(this,t,n);case"base64":returnC(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":returnN(this,t,n);default:if(r)thrownewTypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}functiony(e,t,n){varr=e[t];e[t]=e[n],e[n]=r}functiong(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeofn?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}elseif(n<0){if(!i)return-1;n=0}if("string"==typeoft&&(t=c.from(t,r)),c.isBuffer(t))return0===t.length?-1:v(e,t,n,r,i);if("number"==typeoft)returnt&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeofUint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,i);thrownewTypeError("val must be string, number or Buffer")}functionv(e,t,n,r,i){varo,s=1,a=e.length,c=t.length;if(void0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs
t.read=function(e,t,n,r,i){varo,s,a=8*i-r-1,c=(1<<a)-1,u=c>>1,h=-7,p=n?i-1:0,d=n?-1:1,f=e[t+p];for(p+=d,o=f&(1<<-h)-1,f>>=-h,h+=a;h>0;o=256*o+e[t+p],p+=d,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=r;h>0;s=256*s+e[t+p],p+=d,h-=8);if(0===o)o=1-u;else{if(o===c)returns?NaN:1/0*(f?-1:1);s+=Math.pow(2,r),o-=u}return(f?-1:1)*s*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){vars,a,c,u=8*o-i-1,h=(1<<u)-1,p=h>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,l=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=h):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+p>=1?d/c:d*Math.pow(2,1-p))*c>=2&&(s++,c/=2),s+p>=h?(a=0,s=h):s+p>=1?(a=(t*c-1)*Math.pow(2,i),s+=p):(a=t*Math.pow(2,p-1)*Math.pow(2,i),s=0));i>=8;e[n+f]=255&a,f+=l,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;e[n+f]=255&s,f+=l,s/=256,u-=8);e[n+f-l]|=128*m}},function(e,t){varn={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){e.exports=n(48),e.exports.parser=n(6)},function(e,t,n){varr=n(26),i=n(5),o=n(2)("engine.io-client:socket"),s=n(29),a=n(6),c=n(22),u=n(11);functionh(e,t){if(!(thisinstanceofh))returnnewh(e,t);t=t||{},e&&"object"==typeofe&&(t=e,e=null),e?(e=c(e),t.hostname=e.host,t.secure="https"===e.protocol||"wss"===e.protocol,t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=c(t.host).host),this.secure=null!=t.secure?t.secure:"undefined"!=typeoflocation&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.agent=t.agent||!1,this.hostname=t.hostname||("undefined"!=typeoflocation?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeoflocation&&location.port?location.port:this.secure?443:80),this.query=t.query||{},"string"==typeofthis.query&&(this.query=u.decode(this.query)),this.upgrade=!1!==t.upgrade,this.path=(t.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!t.forceJSONP,this.jsonp=!1!==t.jsonp,this.forceBase64=!!t.forceBase64,this.enablesXDR=!!t.enablesXDR,this.withCredentials=!1!==t.withCredentials,this.timestampParam=t.timestampParam||"t",this.timestampRequests=t.timestampRequests,this.transports=t.transports||["polling","websocket"],this.transportOptions=t.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=t.policyPort||843,this.rememberUpgrade=t.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=t.onlyBinaryUpgrades,this.perMessageDeflate=!1!==t.perMessageDeflate&&(t.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=t.pfx||void0,this.key=t.key||void0,this.passphrase=t.passphrase||void0,this.cert=t.cert||void0,this.ca=t.ca||void0,this.ciphers=t.ciphers||void0,this.rejectUnauthorized=void0===t.rejectUnauthorized||t.rejectUnauthorized,this.forceNode=!!t.forceNode,this.isReactNative="undefined"!=typeofnavigator&&"string"==typeofnavigator.product&&"reactnative"===navigator.product.toLowerCase(),("undefined"==typeofself||this.isReactNative)&&(t.extraHeaders&&Object.keys(t.extraHeaders).length>0&&(this.extraHeaders=t.extraHeaders),t.localAddress&&(this.localAddress=t.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}e.exports=h,h.priorWebsocketSuccess=!1,i(h.prototype),h.protocol=a.protocol,h.Socket=h,h.Transport=n(17),h.transports=n(26),h.parser=n(6),h.prototype.createTransport=function(e){o('creating transport "%s"',e);vart=function(e){vart={};for(varnine)e.hasOwnProperty(n)&&(t[n]=e[n]);returnt}(this.query);t.EIO=a.protocol,t.transport=e;varn=this.transportOptions[e]||{};returnthis.id&&(t.sid=this.id),newr[e]({query:t,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||th