@cloudflare/realtimekit 0.5.0-staging.78 → 0.5.0-staging.79
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/browser.js +15 -15
- package/dist/index.cjs.js +15 -15
- package/dist/index.es.js +2922 -2905
- package/dist/mock.cjs.js +5 -64
- package/dist/mock.es.js +362 -421
- package/dist/react.cjs.js +15 -15
- package/dist/react.es.js +2922 -2905
- package/package.json +1 -1
package/dist/mock.cjs.js
CHANGED
|
@@ -1,66 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function it(e){let t=typeof e;if(t=="object"){if(Array.isArray(e))return"array";if(e===null)return"null"}return t}function Un(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}let X="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),Pe=[];for(let e=0;e<X.length;e++)Pe[X[e].charCodeAt(0)]=e;Pe["-".charCodeAt(0)]=X.indexOf("+");Pe["_".charCodeAt(0)]=X.indexOf("/");function qn(e){let t=e.length*3/4;e[e.length-2]=="="?t-=2:e[e.length-1]=="="&&(t-=1);let n=new Uint8Array(t),s=0,r=0,o,
|
|
2
|
-
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(r){case 0:l=o,r=1;break;case 1:n[s++]=l<<2|(o&48)>>4,l=o,r=2;break;case 2:n[s++]=(l&15)<<4|(o&60)>>2,l=o,r=3;break;case 3:n[s++]=(l&3)<<6|o,r=0;break}}if(r==1)throw Error("invalid base64 string.");return n.subarray(0,s)}function Vn(e){let t="",n=0,s,r=0;for(let o=0;o<e.length;o++)switch(s=e[o],n){case 0:t+=X[s>>2],r=(s&3)<<4,n=1;break;case 1:t+=X[r|s>>4],r=(s&15)<<2,n=2;break;case 2:t+=X[r|s>>6],t+=X[s&63],n=0;break}return n&&(t+=X[r],t+="=",n==1&&(t+="=")),t}var Ee;(function(e){e.symbol=Symbol.for("protobuf-ts/unknown"),e.onRead=(n,s,r,o,l)=>{(t(s)?s[e.symbol]:s[e.symbol]=[]).push({no:r,wireType:o,data:l})},e.onWrite=(n,s,r)=>{for(let{no:o,wireType:l,data:p}of e.list(s))r.tag(o,l).raw(p)},e.list=(n,s)=>{if(t(n)){let r=n[e.symbol];return s?r.filter(o=>o.no==s):r}return[]},e.last=(n,s)=>e.list(n,s).slice(-1)[0];const t=n=>n&&Array.isArray(n[e.symbol])})(Ee||(Ee={}));var P;(function(e){e[e.Varint=0]="Varint",e[e.Bit64=1]="Bit64",e[e.LengthDelimited=2]="LengthDelimited",e[e.StartGroup=3]="StartGroup",e[e.EndGroup=4]="EndGroup",e[e.Bit32=5]="Bit32"})(P||(P={}));function Gn(){let e=0,t=0;for(let s=0;s<28;s+=7){let r=this.buf[this.pos++];if(e|=(r&127)<<s,(r&128)==0)return this.assertBounds(),[e,t]}let n=this.buf[this.pos++];if(e|=(n&15)<<28,t=(n&112)>>4,(n&128)==0)return this.assertBounds(),[e,t];for(let s=3;s<=31;s+=7){let r=this.buf[this.pos++];if(t|=(r&127)<<s,(r&128)==0)return this.assertBounds(),[e,t]}throw new Error("invalid varint")}function Ke(e,t,n){for(let o=0;o<28;o=o+7){const l=e>>>o,p=!(l>>>7==0&&t==0),h=(p?l|128:l)&255;if(n.push(h),!p)return}const s=e>>>28&15|(t&7)<<4,r=t>>3!=0;if(n.push((r?s|128:s)&255),!!r){for(let o=3;o<31;o=o+7){const l=t>>>o,p=l>>>7!=0,h=(p?l|128:l)&255;if(n.push(h),!p)return}n.push(t>>>31&1)}}const be=(1<<16)*(1<<16);function Gt(e){let t=e[0]=="-";t&&(e=e.slice(1));const n=1e6;let s=0,r=0;function o(l,p){const h=Number(e.slice(l,p));r*=n,s=s*n+h,s>=be&&(r=r+(s/be|0),s=s%be)}return o(-24,-18),o(-18,-12),o(-12,-6),o(-6),[t,s,r]}function $e(e,t){if(t>>>0<=2097151)return""+(be*t+(e>>>0));let n=e&16777215,s=(e>>>24|t<<8)>>>0&16777215,r=t>>16&65535,o=n+s*6777216+r*6710656,l=s+r*8147497,p=r*2,h=1e7;o>=h&&(l+=Math.floor(o/h),o%=h),l>=h&&(p+=Math.floor(l/h),l%=h);function T(_,I){let v=_?String(_):"";return I?"0000000".slice(v.length)+v:v}return T(p,0)+T(l,p)+T(o,1)}function yt(e,t){if(e>=0){for(;e>127;)t.push(e&127|128),e=e>>>7;t.push(e)}else{for(let n=0;n<9;n++)t.push(e&127|128),e=e>>7;t.push(1)}}function jn(){let e=this.buf[this.pos++],t=e&127;if((e&128)==0)return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<7,(e&128)==0)return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<14,(e&128)==0)return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<21,(e&128)==0)return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let n=5;(e&128)!==0&&n<10;n++)e=this.buf[this.pos++];if((e&128)!=0)throw new Error("invalid varint");return this.assertBounds(),t>>>0}let S;function Wn(){const e=new DataView(new ArrayBuffer(8));S=globalThis.BigInt!==void 0&&typeof e.getBigInt64=="function"&&typeof e.getBigUint64=="function"&&typeof e.setBigInt64=="function"&&typeof e.setBigUint64=="function"?{MIN:BigInt("-9223372036854775808"),MAX:BigInt("9223372036854775807"),UMIN:BigInt("0"),UMAX:BigInt("18446744073709551615"),C:BigInt,V:e}:void 0}Wn();function jt(e){if(!e)throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support")}const Wt=/^-?[0-9]+$/,Re=4294967296,ge=2147483648;class Kt{constructor(t,n){this.lo=t|0,this.hi=n|0}isZero(){return this.lo==0&&this.hi==0}toNumber(){let t=this.hi*Re+(this.lo>>>0);if(!Number.isSafeInteger(t))throw new Error("cannot convert to safe number");return t}}class D extends Kt{static from(t){if(S)switch(typeof t){case"string":if(t=="0")return this.ZERO;if(t=="")throw new Error("string is no integer");t=S.C(t);case"number":if(t===0)return this.ZERO;t=S.C(t);case"bigint":if(!t)return this.ZERO;if(t<S.UMIN)throw new Error("signed value for ulong");if(t>S.UMAX)throw new Error("ulong too large");return S.V.setBigUint64(0,t,!0),new D(S.V.getInt32(0,!0),S.V.getInt32(4,!0))}else switch(typeof t){case"string":if(t=="0")return this.ZERO;if(t=t.trim(),!Wt.test(t))throw new Error("string is no integer");let[n,s,r]=Gt(t);if(n)throw new Error("signed value for ulong");return new D(s,r);case"number":if(t==0)return this.ZERO;if(!Number.isSafeInteger(t))throw new Error("number is no integer");if(t<0)throw new Error("signed value for ulong");return new D(t,t/Re)}throw new Error("unknown value "+typeof t)}toString(){return S?this.toBigInt().toString():$e(this.lo,this.hi)}toBigInt(){return jt(S),S.V.setInt32(0,this.lo,!0),S.V.setInt32(4,this.hi,!0),S.V.getBigUint64(0,!0)}}D.ZERO=new D(0,0);class N extends Kt{static from(t){if(S)switch(typeof t){case"string":if(t=="0")return this.ZERO;if(t=="")throw new Error("string is no integer");t=S.C(t);case"number":if(t===0)return this.ZERO;t=S.C(t);case"bigint":if(!t)return this.ZERO;if(t<S.MIN)throw new Error("signed long too small");if(t>S.MAX)throw new Error("signed long too large");return S.V.setBigInt64(0,t,!0),new N(S.V.getInt32(0,!0),S.V.getInt32(4,!0))}else switch(typeof t){case"string":if(t=="0")return this.ZERO;if(t=t.trim(),!Wt.test(t))throw new Error("string is no integer");let[n,s,r]=Gt(t);if(n){if(r>ge||r==ge&&s!=0)throw new Error("signed long too small")}else if(r>=ge)throw new Error("signed long too large");let o=new N(s,r);return n?o.negate():o;case"number":if(t==0)return this.ZERO;if(!Number.isSafeInteger(t))throw new Error("number is no integer");return t>0?new N(t,t/Re):new N(-t,-t/Re).negate()}throw new Error("unknown value "+typeof t)}isNegative(){return(this.hi&ge)!==0}negate(){let t=~this.hi,n=this.lo;return n?n=~n+1:t+=1,new N(n,t)}toString(){if(S)return this.toBigInt().toString();if(this.isNegative()){let t=this.negate();return"-"+$e(t.lo,t.hi)}return $e(this.lo,this.hi)}toBigInt(){return jt(S),S.V.setInt32(0,this.lo,!0),S.V.setInt32(4,this.hi,!0),S.V.getBigInt64(0,!0)}}N.ZERO=new N(0,0);const bt={readUnknownField:!0,readerFactory:e=>new Jn(e)};function Kn(e){return e?Object.assign(Object.assign({},bt),e):bt}class Jn{constructor(t,n){this.varint64=Gn,this.uint32=jn,this.buf=t,this.len=t.length,this.pos=0,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength),this.textDecoder=n!=null?n:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0})}tag(){let t=this.uint32(),n=t>>>3,s=t&7;if(n<=0||s<0||s>5)throw new Error("illegal tag: field no "+n+" wire type "+s);return[n,s]}skip(t){let n=this.pos;switch(t){case P.Varint:for(;this.buf[this.pos++]&128;);break;case P.Bit64:this.pos+=4;case P.Bit32:this.pos+=4;break;case P.LengthDelimited:let s=this.uint32();this.pos+=s;break;case P.StartGroup:let r;for(;(r=this.tag()[1])!==P.EndGroup;)this.skip(r);break;default:throw new Error("cant skip wire type "+t)}return this.assertBounds(),this.buf.subarray(n,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let t=this.uint32();return t>>>1^-(t&1)}int64(){return new N(...this.varint64())}uint64(){return new D(...this.varint64())}sint64(){let[t,n]=this.varint64(),s=-(t&1);return t=(t>>>1|(n&1)<<31)^s,n=n>>>1^s,new N(t,n)}bool(){let[t,n]=this.varint64();return t!==0||n!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return new D(this.sfixed32(),this.sfixed32())}sfixed64(){return new N(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let t=this.uint32(),n=this.pos;return this.pos+=t,this.assertBounds(),this.buf.subarray(n,n+t)}string(){return this.textDecoder.decode(this.bytes())}}function E(e,t){if(!e)throw new Error(t)}const Zn=34028234663852886e22,Xn=-34028234663852886e22,$n=4294967295,Yn=2147483647,zn=-2147483648;function de(e){if(typeof e!="number")throw new Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>Yn||e<zn)throw new Error("invalid int 32: "+e)}function xe(e){if(typeof e!="number")throw new Error("invalid uint 32: "+typeof e);if(!Number.isInteger(e)||e>$n||e<0)throw new Error("invalid uint 32: "+e)}function ct(e){if(typeof e!="number")throw new Error("invalid float 32: "+typeof e);if(!!Number.isFinite(e)&&(e>Zn||e<Xn))throw new Error("invalid float 32: "+e)}const _t={writeUnknownFields:!0,writerFactory:()=>new Qn};function Hn(e){return e?Object.assign(Object.assign({},_t),e):_t}class Qn{constructor(t){this.stack=[],this.textEncoder=t!=null?t:new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let t=0;for(let r=0;r<this.chunks.length;r++)t+=this.chunks[r].length;let n=new Uint8Array(t),s=0;for(let r=0;r<this.chunks.length;r++)n.set(this.chunks[r],s),s+=this.chunks[r].length;return this.chunks=[],n}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let t=this.finish(),n=this.stack.pop();if(!n)throw new Error("invalid state, fork stack empty");return this.chunks=n.chunks,this.buf=n.buf,this.uint32(t.byteLength),this.raw(t)}tag(t,n){return this.uint32((t<<3|n)>>>0)}raw(t){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(t),this}uint32(t){for(xe(t);t>127;)this.buf.push(t&127|128),t=t>>>7;return this.buf.push(t),this}int32(t){return de(t),yt(t,this.buf),this}bool(t){return this.buf.push(t?1:0),this}bytes(t){return this.uint32(t.byteLength),this.raw(t)}string(t){let n=this.textEncoder.encode(t);return this.uint32(n.byteLength),this.raw(n)}float(t){ct(t);let n=new Uint8Array(4);return new DataView(n.buffer).setFloat32(0,t,!0),this.raw(n)}double(t){let n=new Uint8Array(8);return new DataView(n.buffer).setFloat64(0,t,!0),this.raw(n)}fixed32(t){xe(t);let n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,t,!0),this.raw(n)}sfixed32(t){de(t);let n=new Uint8Array(4);return new DataView(n.buffer).setInt32(0,t,!0),this.raw(n)}sint32(t){return de(t),t=(t<<1^t>>31)>>>0,yt(t,this.buf),this}sfixed64(t){let n=new Uint8Array(8),s=new DataView(n.buffer),r=N.from(t);return s.setInt32(0,r.lo,!0),s.setInt32(4,r.hi,!0),this.raw(n)}fixed64(t){let n=new Uint8Array(8),s=new DataView(n.buffer),r=D.from(t);return s.setInt32(0,r.lo,!0),s.setInt32(4,r.hi,!0),this.raw(n)}int64(t){let n=N.from(t);return Ke(n.lo,n.hi,this.buf),this}sint64(t){let n=N.from(t),s=n.hi>>31,r=n.lo<<1^s,o=(n.hi<<1|n.lo>>>31)^s;return Ke(r,o,this.buf),this}uint64(t){let n=D.from(t);return Ke(n.lo,n.hi,this.buf),this}}const vt={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0},Et={ignoreUnknownFields:!1};function es(e){return e?Object.assign(Object.assign({},Et),e):Et}function ts(e){return e?Object.assign(Object.assign({},vt),e):vt}const Jt=Symbol.for("protobuf-ts/message-type");function Rt(e){let t=!1;const n=[];for(let s=0;s<e.length;s++){let r=e.charAt(s);r=="_"?t=!0:/\d/.test(r)?(n.push(r),t=!0):t?(n.push(r.toUpperCase()),t=!1):s==0?n.push(r.toLowerCase()):n.push(r)}return n.join("")}var k;(function(e){e[e.DOUBLE=1]="DOUBLE",e[e.FLOAT=2]="FLOAT",e[e.INT64=3]="INT64",e[e.UINT64=4]="UINT64",e[e.INT32=5]="INT32",e[e.FIXED64=6]="FIXED64",e[e.FIXED32=7]="FIXED32",e[e.BOOL=8]="BOOL",e[e.STRING=9]="STRING",e[e.BYTES=12]="BYTES",e[e.UINT32=13]="UINT32",e[e.SFIXED32=15]="SFIXED32",e[e.SFIXED64=16]="SFIXED64",e[e.SINT32=17]="SINT32",e[e.SINT64=18]="SINT64"})(k||(k={}));var J;(function(e){e[e.BIGINT=0]="BIGINT",e[e.STRING=1]="STRING",e[e.NUMBER=2]="NUMBER"})(J||(J={}));var Oe;(function(e){e[e.NO=0]="NO",e[e.PACKED=1]="PACKED",e[e.UNPACKED=2]="UNPACKED"})(Oe||(Oe={}));function ns(e){var t,n,s,r;return e.localName=(t=e.localName)!==null&&t!==void 0?t:Rt(e.name),e.jsonName=(n=e.jsonName)!==null&&n!==void 0?n:Rt(e.name),e.repeat=(s=e.repeat)!==null&&s!==void 0?s:Oe.NO,e.opt=(r=e.opt)!==null&&r!==void 0?r:e.repeat||e.oneof?!1:e.kind=="message",e}function ss(e){if(typeof e!="object"||e===null||!e.hasOwnProperty("oneofKind"))return!1;switch(typeof e.oneofKind){case"string":return e[e.oneofKind]===void 0?!1:Object.keys(e).length==2;case"undefined":return Object.keys(e).length==1;default:return!1}}class rs{constructor(t){var n;this.fields=(n=t.fields)!==null&&n!==void 0?n:[]}prepare(){if(this.data)return;const t=[],n=[],s=[];for(let r of this.fields)if(r.oneof)s.includes(r.oneof)||(s.push(r.oneof),t.push(r.oneof),n.push(r.oneof));else switch(n.push(r.localName),r.kind){case"scalar":case"enum":(!r.opt||r.repeat)&&t.push(r.localName);break;case"message":r.repeat&&t.push(r.localName);break;case"map":t.push(r.localName);break}this.data={req:t,known:n,oneofs:Object.values(s)}}is(t,n,s=!1){if(n<0)return!0;if(t==null||typeof t!="object")return!1;this.prepare();let r=Object.keys(t),o=this.data;if(r.length<o.req.length||o.req.some(l=>!r.includes(l))||!s&&r.some(l=>!o.known.includes(l)))return!1;if(n<1)return!0;for(const l of o.oneofs){const p=t[l];if(!ss(p))return!1;if(p.oneofKind===void 0)continue;const h=this.fields.find(T=>T.localName===p.oneofKind);if(!h||!this.field(p[p.oneofKind],h,s,n))return!1}for(const l of this.fields)if(l.oneof===void 0&&!this.field(t[l.localName],l,s,n))return!1;return!0}field(t,n,s,r){let o=n.repeat;switch(n.kind){case"scalar":return t===void 0?n.opt:o?this.scalars(t,n.T,r,n.L):this.scalar(t,n.T,n.L);case"enum":return t===void 0?n.opt:o?this.scalars(t,k.INT32,r):this.scalar(t,k.INT32);case"message":return t===void 0?!0:o?this.messages(t,n.T(),s,r):this.message(t,n.T(),s,r);case"map":if(typeof t!="object"||t===null)return!1;if(r<2)return!0;if(!this.mapKeys(t,n.K,r))return!1;switch(n.V.kind){case"scalar":return this.scalars(Object.values(t),n.V.T,r,n.V.L);case"enum":return this.scalars(Object.values(t),k.INT32,r);case"message":return this.messages(Object.values(t),n.V.T(),s,r)}break}return!0}message(t,n,s,r){return s?n.isAssignable(t,r):n.is(t,r)}messages(t,n,s,r){if(!Array.isArray(t))return!1;if(r<2)return!0;if(s){for(let o=0;o<t.length&&o<r;o++)if(!n.isAssignable(t[o],r-1))return!1}else for(let o=0;o<t.length&&o<r;o++)if(!n.is(t[o],r-1))return!1;return!0}scalar(t,n,s){let r=typeof t;switch(n){case k.UINT64:case k.FIXED64:case k.INT64:case k.SFIXED64:case k.SINT64:switch(s){case J.BIGINT:return r=="bigint";case J.NUMBER:return r=="number"&&!isNaN(t);default:return r=="string"}case k.BOOL:return r=="boolean";case k.STRING:return r=="string";case k.BYTES:return t instanceof Uint8Array;case k.DOUBLE:case k.FLOAT:return r=="number"&&!isNaN(t);default:return r=="number"&&Number.isInteger(t)}}scalars(t,n,s,r){if(!Array.isArray(t))return!1;if(s<2)return!0;if(Array.isArray(t)){for(let o=0;o<t.length&&o<s;o++)if(!this.scalar(t[o],n,r))return!1}return!0}mapKeys(t,n,s){let r=Object.keys(t);switch(n){case k.INT32:case k.FIXED32:case k.SFIXED32:case k.SINT32:case k.UINT32:return this.scalars(r.slice(0,s).map(o=>parseInt(o)),n,s);case k.BOOL:return this.scalars(r.slice(0,s).map(o=>o=="true"?!0:o=="false"?!1:o),n,s);default:return this.scalars(r,n,s,J.STRING)}}}function G(e,t){switch(t){case J.BIGINT:return e.toBigInt();case J.NUMBER:return e.toNumber();default:return e.toString()}}class os{constructor(t){this.info=t}prepare(){var t;if(this.fMap===void 0){this.fMap={};const n=(t=this.info.fields)!==null&&t!==void 0?t:[];for(const s of n)this.fMap[s.name]=s,this.fMap[s.jsonName]=s,this.fMap[s.localName]=s}}assert(t,n,s){if(!t){let r=it(s);throw(r=="number"||r=="boolean")&&(r=s.toString()),new Error(`Cannot parse JSON ${r} for ${this.info.typeName}#${n}`)}}read(t,n,s){this.prepare();const r=[];for(const[o,l]of Object.entries(t)){const p=this.fMap[o];if(!p){if(!s.ignoreUnknownFields)throw new Error(`Found unknown field while reading ${this.info.typeName} from JSON format. JSON key: ${o}`);continue}const h=p.localName;let T;if(p.oneof){if(l===null&&(p.kind!=="enum"||p.T()[0]!=="google.protobuf.NullValue"))continue;if(r.includes(p.oneof))throw new Error(`Multiple members of the oneof group "${p.oneof}" of ${this.info.typeName} are present in JSON.`);r.push(p.oneof),T=n[p.oneof]={oneofKind:h}}else T=n;if(p.kind=="map"){if(l===null)continue;this.assert(Un(l),p.name,l);const _=T[h];for(const[I,v]of Object.entries(l)){this.assert(v!==null,p.name+" map value",null);let B;switch(p.V.kind){case"message":B=p.V.T().internalJsonRead(v,s);break;case"enum":if(B=this.enum(p.V.T(),v,p.name,s.ignoreUnknownFields),B===!1)continue;break;case"scalar":B=this.scalar(v,p.V.T,p.V.L,p.name);break}this.assert(B!==void 0,p.name+" map value",v);let F=I;p.K==k.BOOL&&(F=F=="true"?!0:F=="false"?!1:F),F=this.scalar(F,p.K,J.STRING,p.name).toString(),_[F]=B}}else if(p.repeat){if(l===null)continue;this.assert(Array.isArray(l),p.name,l);const _=T[h];for(const I of l){this.assert(I!==null,p.name,null);let v;switch(p.kind){case"message":v=p.T().internalJsonRead(I,s);break;case"enum":if(v=this.enum(p.T(),I,p.name,s.ignoreUnknownFields),v===!1)continue;break;case"scalar":v=this.scalar(I,p.T,p.L,p.name);break}this.assert(v!==void 0,p.name,l),_.push(v)}}else switch(p.kind){case"message":if(l===null&&p.T().typeName!="google.protobuf.Value"){this.assert(p.oneof===void 0,p.name+" (oneof member)",null);continue}T[h]=p.T().internalJsonRead(l,s,T[h]);break;case"enum":let _=this.enum(p.T(),l,p.name,s.ignoreUnknownFields);if(_===!1)continue;T[h]=_;break;case"scalar":T[h]=this.scalar(l,p.T,p.L,p.name);break}}}enum(t,n,s,r){if(t[0]=="google.protobuf.NullValue"&&E(n===null||n==="NULL_VALUE",`Unable to parse field ${this.info.typeName}#${s}, enum ${t[0]} only accepts null.`),n===null)return 0;switch(typeof n){case"number":return E(Number.isInteger(n),`Unable to parse field ${this.info.typeName}#${s}, enum can only be integral number, got ${n}.`),n;case"string":let o=n;t[2]&&n.substring(0,t[2].length)===t[2]&&(o=n.substring(t[2].length));let l=t[1][o];return typeof l=="undefined"&&r?!1:(E(typeof l=="number",`Unable to parse field ${this.info.typeName}#${s}, enum ${t[0]} has no value for "${n}".`),l)}E(!1,`Unable to parse field ${this.info.typeName}#${s}, cannot parse enum value from ${typeof n}".`)}scalar(t,n,s,r){let o;try{switch(n){case k.DOUBLE:case k.FLOAT:if(t===null)return 0;if(t==="NaN")return Number.NaN;if(t==="Infinity")return Number.POSITIVE_INFINITY;if(t==="-Infinity")return Number.NEGATIVE_INFINITY;if(t===""){o="empty string";break}if(typeof t=="string"&&t.trim().length!==t.length){o="extra whitespace";break}if(typeof t!="string"&&typeof t!="number")break;let l=Number(t);if(Number.isNaN(l)){o="not a number";break}if(!Number.isFinite(l)){o="too large or small";break}return n==k.FLOAT&&ct(l),l;case k.INT32:case k.FIXED32:case k.SFIXED32:case k.SINT32:case k.UINT32:if(t===null)return 0;let p;if(typeof t=="number"?p=t:t===""?o="empty string":typeof t=="string"&&(t.trim().length!==t.length?o="extra whitespace":p=Number(t)),p===void 0)break;return n==k.UINT32?xe(p):de(p),p;case k.INT64:case k.SFIXED64:case k.SINT64:if(t===null)return G(N.ZERO,s);if(typeof t!="number"&&typeof t!="string")break;return G(N.from(t),s);case k.FIXED64:case k.UINT64:if(t===null)return G(D.ZERO,s);if(typeof t!="number"&&typeof t!="string")break;return G(D.from(t),s);case k.BOOL:if(t===null)return!1;if(typeof t!="boolean")break;return t;case k.STRING:if(t===null)return"";if(typeof t!="string"){o="extra whitespace";break}try{encodeURIComponent(t)}catch(h){h="invalid UTF8";break}return t;case k.BYTES:if(t===null||t==="")return new Uint8Array(0);if(typeof t!="string")break;return qn(t)}}catch(l){o=l.message}this.assert(!1,r+(o?" - "+o:""),t)}}class as{constructor(t){var n;this.fields=(n=t.fields)!==null&&n!==void 0?n:[]}write(t,n){const s={},r=t;for(const o of this.fields){if(!o.oneof){let T=this.field(o,r[o.localName],n);T!==void 0&&(s[n.useProtoFieldName?o.name:o.jsonName]=T);continue}const l=r[o.oneof];if(l.oneofKind!==o.localName)continue;const p=o.kind=="scalar"||o.kind=="enum"?Object.assign(Object.assign({},n),{emitDefaultValues:!0}):n;let h=this.field(o,l[o.localName],p);E(h!==void 0),s[n.useProtoFieldName?o.name:o.jsonName]=h}return s}field(t,n,s){let r;if(t.kind=="map"){E(typeof n=="object"&&n!==null);const o={};switch(t.V.kind){case"scalar":for(const[h,T]of Object.entries(n)){const _=this.scalar(t.V.T,T,t.name,!1,!0);E(_!==void 0),o[h.toString()]=_}break;case"message":const l=t.V.T();for(const[h,T]of Object.entries(n)){const _=this.message(l,T,t.name,s);E(_!==void 0),o[h.toString()]=_}break;case"enum":const p=t.V.T();for(const[h,T]of Object.entries(n)){E(T===void 0||typeof T=="number");const _=this.enum(p,T,t.name,!1,!0,s.enumAsInteger);E(_!==void 0),o[h.toString()]=_}break}(s.emitDefaultValues||Object.keys(o).length>0)&&(r=o)}else if(t.repeat){E(Array.isArray(n));const o=[];switch(t.kind){case"scalar":for(let h=0;h<n.length;h++){const T=this.scalar(t.T,n[h],t.name,t.opt,!0);E(T!==void 0),o.push(T)}break;case"enum":const l=t.T();for(let h=0;h<n.length;h++){E(n[h]===void 0||typeof n[h]=="number");const T=this.enum(l,n[h],t.name,t.opt,!0,s.enumAsInteger);E(T!==void 0),o.push(T)}break;case"message":const p=t.T();for(let h=0;h<n.length;h++){const T=this.message(p,n[h],t.name,s);E(T!==void 0),o.push(T)}break}(s.emitDefaultValues||o.length>0||s.emitDefaultValues)&&(r=o)}else switch(t.kind){case"scalar":r=this.scalar(t.T,n,t.name,t.opt,s.emitDefaultValues);break;case"enum":r=this.enum(t.T(),n,t.name,t.opt,s.emitDefaultValues,s.enumAsInteger);break;case"message":r=this.message(t.T(),n,t.name,s);break}return r}enum(t,n,s,r,o,l){if(t[0]=="google.protobuf.NullValue")return!o&&!r?void 0:null;if(n===void 0){E(r);return}if(!(n===0&&!o&&!r))return E(typeof n=="number"),E(Number.isInteger(n)),l||!t[1].hasOwnProperty(n)?n:t[2]?t[2]+t[1][n]:t[1][n]}message(t,n,s,r){return n===void 0?r.emitDefaultValues?null:void 0:t.internalJsonWrite(n,r)}scalar(t,n,s,r,o){if(n===void 0){E(r);return}const l=o||r;switch(t){case k.INT32:case k.SFIXED32:case k.SINT32:return n===0?l?0:void 0:(de(n),n);case k.FIXED32:case k.UINT32:return n===0?l?0:void 0:(xe(n),n);case k.FLOAT:ct(n);case k.DOUBLE:return n===0?l?0:void 0:(E(typeof n=="number"),Number.isNaN(n)?"NaN":n===Number.POSITIVE_INFINITY?"Infinity":n===Number.NEGATIVE_INFINITY?"-Infinity":n);case k.STRING:return n===""?l?"":void 0:(E(typeof n=="string"),n);case k.BOOL:return n===!1?l?!1:void 0:(E(typeof n=="boolean"),n);case k.UINT64:case k.FIXED64:E(typeof n=="number"||typeof n=="string"||typeof n=="bigint");let p=D.from(n);return p.isZero()&&!l?void 0:p.toString();case k.INT64:case k.SFIXED64:case k.SINT64:E(typeof n=="number"||typeof n=="string"||typeof n=="bigint");let h=N.from(n);return h.isZero()&&!l?void 0:h.toString();case k.BYTES:return E(n instanceof Uint8Array),n.byteLength?Vn(n):l?"":void 0}}}function Ye(e,t=J.STRING){switch(e){case k.BOOL:return!1;case k.UINT64:case k.FIXED64:return G(D.ZERO,t);case k.INT64:case k.SFIXED64:case k.SINT64:return G(N.ZERO,t);case k.DOUBLE:case k.FLOAT:return 0;case k.BYTES:return new Uint8Array(0);case k.STRING:return"";default:return 0}}class is{constructor(t){this.info=t}prepare(){var t;if(!this.fieldNoToField){const n=(t=this.info.fields)!==null&&t!==void 0?t:[];this.fieldNoToField=new Map(n.map(s=>[s.no,s]))}}read(t,n,s,r){this.prepare();const o=r===void 0?t.len:t.pos+r;for(;t.pos<o;){const[l,p]=t.tag(),h=this.fieldNoToField.get(l);if(!h){let v=s.readUnknownField;if(v=="throw")throw new Error(`Unknown field ${l} (wire type ${p}) for ${this.info.typeName}`);let B=t.skip(p);v!==!1&&(v===!0?Ee.onRead:v)(this.info.typeName,n,l,p,B);continue}let T=n,_=h.repeat,I=h.localName;switch(h.oneof&&(T=T[h.oneof],T.oneofKind!==I&&(T=n[h.oneof]={oneofKind:I})),h.kind){case"scalar":case"enum":let v=h.kind=="enum"?k.INT32:h.T,B=h.kind=="scalar"?h.L:void 0;if(_){let z=T[I];if(p==P.LengthDelimited&&v!=k.STRING&&v!=k.BYTES){let oe=t.uint32()+t.pos;for(;t.pos<oe;)z.push(this.scalar(t,v,B))}else z.push(this.scalar(t,v,B))}else T[I]=this.scalar(t,v,B);break;case"message":if(_){let z=T[I],oe=h.T().internalBinaryRead(t,t.uint32(),s);z.push(oe)}else T[I]=h.T().internalBinaryRead(t,t.uint32(),s,T[I]);break;case"map":let[F,De]=this.mapEntry(h,t,s);T[I][F]=De;break}}}mapEntry(t,n,s){let r=n.uint32(),o=n.pos+r,l,p;for(;n.pos<o;){let[h,T]=n.tag();switch(h){case 1:t.K==k.BOOL?l=n.bool().toString():l=this.scalar(n,t.K,J.STRING);break;case 2:switch(t.V.kind){case"scalar":p=this.scalar(n,t.V.T,t.V.L);break;case"enum":p=n.int32();break;case"message":p=t.V.T().internalBinaryRead(n,n.uint32(),s);break}break;default:throw new Error(`Unknown field ${h} (wire type ${T}) in map entry for ${this.info.typeName}#${t.name}`)}}if(l===void 0){let h=Ye(t.K);l=t.K==k.BOOL?h.toString():h}if(p===void 0)switch(t.V.kind){case"scalar":p=Ye(t.V.T,t.V.L);break;case"enum":p=0;break;case"message":p=t.V.T().create();break}return[l,p]}scalar(t,n,s){switch(n){case k.INT32:return t.int32();case k.STRING:return t.string();case k.BOOL:return t.bool();case k.DOUBLE:return t.double();case k.FLOAT:return t.float();case k.INT64:return G(t.int64(),s);case k.UINT64:return G(t.uint64(),s);case k.FIXED64:return G(t.fixed64(),s);case k.FIXED32:return t.fixed32();case k.BYTES:return t.bytes();case k.UINT32:return t.uint32();case k.SFIXED32:return t.sfixed32();case k.SFIXED64:return G(t.sfixed64(),s);case k.SINT32:return t.sint32();case k.SINT64:return G(t.sint64(),s)}}}class cs{constructor(t){this.info=t}prepare(){if(!this.fields){const t=this.info.fields?this.info.fields.concat():[];this.fields=t.sort((n,s)=>n.no-s.no)}}write(t,n,s){this.prepare();for(const o of this.fields){let l,p,h=o.repeat,T=o.localName;if(o.oneof){const _=t[o.oneof];if(_.oneofKind!==T)continue;l=_[T],p=!0}else l=t[T],p=!1;switch(o.kind){case"scalar":case"enum":let _=o.kind=="enum"?k.INT32:o.T;if(h)if(E(Array.isArray(l)),h==Oe.PACKED)this.packed(n,_,o.no,l);else for(const I of l)this.scalar(n,_,o.no,I,!0);else l===void 0?E(o.opt):this.scalar(n,_,o.no,l,p||o.opt);break;case"message":if(h){E(Array.isArray(l));for(const I of l)this.message(n,s,o.T(),o.no,I)}else this.message(n,s,o.T(),o.no,l);break;case"map":E(typeof l=="object"&&l!==null);for(const[I,v]of Object.entries(l))this.mapEntry(n,s,o,I,v);break}}let r=s.writeUnknownFields;r!==!1&&(r===!0?Ee.onWrite:r)(this.info.typeName,t,n)}mapEntry(t,n,s,r,o){t.tag(s.no,P.LengthDelimited),t.fork();let l=r;switch(s.K){case k.INT32:case k.FIXED32:case k.UINT32:case k.SFIXED32:case k.SINT32:l=Number.parseInt(r);break;case k.BOOL:E(r=="true"||r=="false"),l=r=="true";break}switch(this.scalar(t,s.K,1,l,!0),s.V.kind){case"scalar":this.scalar(t,s.V.T,2,o,!0);break;case"enum":this.scalar(t,k.INT32,2,o,!0);break;case"message":this.message(t,n,s.V.T(),2,o);break}t.join()}message(t,n,s,r,o){o!==void 0&&(s.internalBinaryWrite(o,t.tag(r,P.LengthDelimited).fork(),n),t.join())}scalar(t,n,s,r,o){let[l,p,h]=this.scalarInfo(n,r);(!h||o)&&(t.tag(s,l),t[p](r))}packed(t,n,s,r){if(!r.length)return;E(n!==k.BYTES&&n!==k.STRING),t.tag(s,P.LengthDelimited),t.fork();let[,o]=this.scalarInfo(n);for(let l=0;l<r.length;l++)t[o](r[l]);t.join()}scalarInfo(t,n){let s=P.Varint,r,o=n===void 0,l=n===0;switch(t){case k.INT32:r="int32";break;case k.STRING:l=o||!n.length,s=P.LengthDelimited,r="string";break;case k.BOOL:l=n===!1,r="bool";break;case k.UINT32:r="uint32";break;case k.DOUBLE:s=P.Bit64,r="double";break;case k.FLOAT:s=P.Bit32,r="float";break;case k.INT64:l=o||N.from(n).isZero(),r="int64";break;case k.UINT64:l=o||D.from(n).isZero(),r="uint64";break;case k.FIXED64:l=o||D.from(n).isZero(),s=P.Bit64,r="fixed64";break;case k.BYTES:l=o||!n.byteLength,s=P.LengthDelimited,r="bytes";break;case k.FIXED32:s=P.Bit32,r="fixed32";break;case k.SFIXED32:s=P.Bit32,r="sfixed32";break;case k.SFIXED64:l=o||N.from(n).isZero(),s=P.Bit64,r="sfixed64";break;case k.SINT32:r="sint32";break;case k.SINT64:l=o||N.from(n).isZero(),r="sint64";break}return[s,r,o||l]}}function us(e){const t=e.messagePrototype?Object.create(e.messagePrototype):Object.defineProperty({},Jt,{value:e});for(let n of e.fields){let s=n.localName;if(!n.opt)if(n.oneof)t[n.oneof]={oneofKind:void 0};else if(n.repeat)t[s]=[];else switch(n.kind){case"scalar":t[s]=Ye(n.T,n.L);break;case"enum":t[s]=0;break;case"map":t[s]={};break}}return t}function Je(e,t,n){let s,r=n,o;for(let l of e.fields){let p=l.localName;if(l.oneof){const h=r[l.oneof];if((h==null?void 0:h.oneofKind)==null)continue;if(s=h[p],o=t[l.oneof],o.oneofKind=h.oneofKind,s==null){delete o[p];continue}}else if(s=r[p],o=t,s==null)continue;switch(l.repeat&&(o[p].length=s.length),l.kind){case"scalar":case"enum":if(l.repeat)for(let T=0;T<s.length;T++)o[p][T]=s[T];else o[p]=s;break;case"message":let h=l.T();if(l.repeat)for(let T=0;T<s.length;T++)o[p][T]=h.create(s[T]);else o[p]===void 0?o[p]=h.create(s):h.mergePartial(o[p],s);break;case"map":switch(l.V.kind){case"scalar":case"enum":Object.assign(o[p],s);break;case"message":let T=l.V.T();for(let _ of Object.keys(s))o[p][_]=T.create(s[_]);break}break}}}function ls(e,t,n){if(t===n)return!0;if(!t||!n)return!1;for(let s of e.fields){let r=s.localName,o=s.oneof?t[s.oneof][r]:t[r],l=s.oneof?n[s.oneof][r]:n[r];switch(s.kind){case"enum":case"scalar":let p=s.kind=="enum"?k.INT32:s.T;if(!(s.repeat?xt(p,o,l):Zt(p,o,l)))return!1;break;case"map":if(!(s.V.kind=="message"?Ot(s.V.T(),Te(o),Te(l)):xt(s.V.kind=="enum"?k.INT32:s.V.T,Te(o),Te(l))))return!1;break;case"message":let h=s.T();if(!(s.repeat?Ot(h,o,l):h.equals(o,l)))return!1;break}}return!0}const Te=Object.values;function Zt(e,t,n){if(t===n)return!0;if(e!==k.BYTES)return!1;let s=t,r=n;if(s.length!==r.length)return!1;for(let o=0;o<s.length;o++)if(s[o]!=r[o])return!1;return!0}function xt(e,t,n){if(t.length!==n.length)return!1;for(let s=0;s<t.length;s++)if(!Zt(e,t[s],n[s]))return!1;return!0}function Ot(e,t,n){if(t.length!==n.length)return!1;for(let s=0;s<t.length;s++)if(!e.equals(t[s],n[s]))return!1;return!0}const ds=Object.getOwnPropertyDescriptors(Object.getPrototypeOf({}));class u{constructor(t,n,s){this.defaultCheckDepth=16,this.typeName=t,this.fields=n.map(ns),this.options=s!=null?s:{},this.messagePrototype=Object.create(null,Object.assign(Object.assign({},ds),{[Jt]:{value:this}})),this.refTypeCheck=new rs(this),this.refJsonReader=new os(this),this.refJsonWriter=new as(this),this.refBinReader=new is(this),this.refBinWriter=new cs(this)}create(t){let n=us(this);return t!==void 0&&Je(this,n,t),n}clone(t){let n=this.create();return Je(this,n,t),n}equals(t,n){return ls(this,t,n)}is(t,n=this.defaultCheckDepth){return this.refTypeCheck.is(t,n,!1)}isAssignable(t,n=this.defaultCheckDepth){return this.refTypeCheck.is(t,n,!0)}mergePartial(t,n){Je(this,t,n)}fromBinary(t,n){let s=Kn(n);return this.internalBinaryRead(s.readerFactory(t),t.byteLength,s)}fromJson(t,n){return this.internalJsonRead(t,es(n))}fromJsonString(t,n){let s=JSON.parse(t);return this.fromJson(s,n)}toJson(t,n){return this.internalJsonWrite(t,ts(n))}toJsonString(t,n){var s;let r=this.toJson(t,n);return JSON.stringify(r,null,(s=n==null?void 0:n.prettySpaces)!==null&&s!==void 0?s:0)}toBinary(t,n){let s=Hn(n);return this.internalBinaryWrite(t,s.writerFactory(),s).finish()}internalJsonRead(t,n,s){if(t!==null&&typeof t=="object"&&!Array.isArray(t)){let r=s!=null?s:this.create();return this.refJsonReader.read(t,r,n),r}throw new Error(`Unable to parse message ${this.typeName} from JSON ${it(t)}.`)}internalJsonWrite(t,n){return this.refJsonWriter.write(t,n)}internalBinaryWrite(t,n,s){return this.refBinWriter.write(t,n,s),n}internalBinaryRead(t,n,s,r){let o=r!=null?r:this.create();return this.refBinReader.read(t,o,s,n),o}}var ps=Object.defineProperty,ms=Object.defineProperties,fs=Object.getOwnPropertyDescriptors,St=Object.getOwnPropertySymbols,hs=Object.prototype.hasOwnProperty,ks=Object.prototype.propertyIsEnumerable,ze=(e,t,n)=>t in e?ps(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nt=(e,t)=>{for(var n in t||(t={}))hs.call(t,n)&&ze(e,n,t[n]);if(St)for(var n of St(t))ks.call(t,n)&&ze(e,n,t[n]);return e},gs=(e,t)=>ms(e,fs(t)),R=(e,t,n)=>(ze(e,typeof t!="symbol"?t+"":t,n),n),Xt=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},te=(e,t,n)=>(Xt(e,t,"read from private field"),n?n.call(e):t.get(e)),we=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},It=(e,t,n,s)=>(Xt(e,t,"write to private field"),s?s.call(e,n):t.set(e,n),n),Ts=(e,t,n)=>new Promise((s,r)=>{var o=h=>{try{p(n.next(h))}catch(T){r(T)}},l=h=>{try{p(n.throw(h))}catch(T){r(T)}},p=h=>h.done?s(h.value):Promise.resolve(h.value).then(o,l);p((n=n.apply(e,t)).next())}),ce=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Se={},ws={get exports(){return Se},set exports(e){Se=e}},ne=typeof Reflect=="object"?Reflect:null,Ct=ne&&typeof ne.apply=="function"?ne.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},_e;ne&&typeof ne.ownKeys=="function"?_e=ne.ownKeys:Object.getOwnPropertySymbols?_e=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:_e=function(e){return Object.getOwnPropertyNames(e)};function ys(e){console&&console.warn&&console.warn(e)}var $t=Number.isNaN||function(e){return e!==e};function x(){x.init.call(this)}ws.exports=x;Se.once=Es;x.EventEmitter=x;x.prototype._events=void 0;x.prototype._eventsCount=0;x.prototype._maxListeners=void 0;var Pt=10;function Le(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(x,"defaultMaxListeners",{enumerable:!0,get:function(){return Pt},set:function(e){if(typeof e!="number"||e<0||$t(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");Pt=e}});x.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};x.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||$t(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function Yt(e){return e._maxListeners===void 0?x.defaultMaxListeners:e._maxListeners}x.prototype.getMaxListeners=function(){return Yt(this)};x.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var s=e==="error",r=this._events;if(r!==void 0)s=s&&r.error===void 0;else if(!s)return!1;if(s){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var l=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw l.context=o,l}var p=r[e];if(p===void 0)return!1;if(typeof p=="function")Ct(p,this,t);else for(var h=p.length,T=tn(p,h),n=0;n<h;++n)Ct(T[n],this,t);return!0};function zt(e,t,n,s){var r,o,l;if(Le(n),o=e._events,o===void 0?(o=e._events=Object.create(null),e._eventsCount=0):(o.newListener!==void 0&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),l=o[t]),l===void 0)l=o[t]=n,++e._eventsCount;else if(typeof l=="function"?l=o[t]=s?[n,l]:[l,n]:s?l.unshift(n):l.push(n),r=Yt(e),r>0&&l.length>r&&!l.warned){l.warned=!0;var p=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");p.name="MaxListenersExceededWarning",p.emitter=e,p.type=t,p.count=l.length,ys(p)}return e}x.prototype.addListener=function(e,t){return zt(this,e,t,!1)};x.prototype.on=x.prototype.addListener;x.prototype.prependListener=function(e,t){return zt(this,e,t,!0)};function bs(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Ht(e,t,n){var s={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},r=bs.bind(s);return r.listener=n,s.wrapFn=r,r}x.prototype.once=function(e,t){return Le(t),this.on(e,Ht(this,e,t)),this};x.prototype.prependOnceListener=function(e,t){return Le(t),this.prependListener(e,Ht(this,e,t)),this};x.prototype.removeListener=function(e,t){var n,s,r,o,l;if(Le(t),s=this._events,s===void 0)return this;if(n=s[e],n===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete s[e],s.removeListener&&this.emit("removeListener",e,n.listener||t));else if(typeof n!="function"){for(r=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){l=n[o].listener,r=o;break}if(r<0)return this;r===0?n.shift():_s(n,r),n.length===1&&(s[e]=n[0]),s.removeListener!==void 0&&this.emit("removeListener",e,l||t)}return this};x.prototype.off=x.prototype.removeListener;x.prototype.removeAllListeners=function(e){var t,n,s;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var r=Object.keys(n),o;for(s=0;s<r.length;++s)o=r[s],o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(t=n[e],typeof t=="function")this.removeListener(e,t);else if(t!==void 0)for(s=t.length-1;s>=0;s--)this.removeListener(e,t[s]);return this};function Qt(e,t,n){var s=e._events;if(s===void 0)return[];var r=s[t];return r===void 0?[]:typeof r=="function"?n?[r.listener||r]:[r]:n?vs(r):tn(r,r.length)}x.prototype.listeners=function(e){return Qt(this,e,!0)};x.prototype.rawListeners=function(e){return Qt(this,e,!1)};x.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):en.call(e,t)};x.prototype.listenerCount=en;function en(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}x.prototype.eventNames=function(){return this._eventsCount>0?_e(this._events):[]};function tn(e,t){for(var n=new Array(t),s=0;s<t;++s)n[s]=e[s];return n}function _s(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function vs(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function Es(e,t){return new Promise(function(n,s){function r(l){e.removeListener(t,o),s(l)}function o(){typeof e.removeListener=="function"&&e.removeListener("error",r),n([].slice.call(arguments))}nn(e,t,o,{once:!0}),t!=="error"&&Rs(e,r,{once:!0})})}function Rs(e,t,n){typeof e.on=="function"&&nn(e,"error",t,n)}function nn(e,t,n,s){if(typeof e.on=="function")s.once?e.once(t,n):e.on(t,n);else if(typeof e.addEventListener=="function")e.addEventListener(t,function r(o){s.once&&e.removeEventListener(t,r),n(o)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}const xs=`
|
|
3
|
-
v=0
|
|
4
|
-
o=- 0000000000000000000 0 IN IP4 127.0.0.1
|
|
5
|
-
s=-
|
|
6
|
-
t=0 0
|
|
7
|
-
a=group:BUNDLE 0 1
|
|
8
|
-
a=extmap-allow-mixed
|
|
9
|
-
a=msid-semantic: WMS stream-id
|
|
10
|
-
m=application 99999 UDP/DTLS/SCTP webrtc-datachannel
|
|
11
|
-
c=IN IP4 0.0.0.0
|
|
12
|
-
a=candidate:1 1 udp 2122194687 192.168.1.2 9999 typ host generation 0 network-id 1 network-cost 10
|
|
13
|
-
a=candidate:2 1 udp 2122063615 10.0.0.1 9999 typ host generation 0 network-id 2 network-cost 50
|
|
14
|
-
a=candidate:3 1 udp 2122262783 2001:db8::1 9999 typ host generation 0 network-id 3 network-cost 10
|
|
15
|
-
a=candidate:4 1 udp 2122131711 2001:db8::2 9999 typ host generation 0 network-id 4 network-cost 50
|
|
16
|
-
a=candidate:5 1 udp 1685855999 198.51.100.1 9999 typ srflx raddr 10.0.0.1 rport 9999 generation 0 network-id 2 network-cost 50
|
|
17
|
-
a=candidate:6 1 udp 1685924095 2001:db8::3 9999 typ srflx raddr 2001:db8::2 rport 9999 generation 0 network-id 4 network-cost 50
|
|
18
|
-
a=candidate:7 1 udp 41755903 203.0.113.1 9999 typ relay raddr 2001:db8::3 rport 9999 generation 0 network-id 4 network-cost 50
|
|
19
|
-
a=candidate:8 1 tcp 1518214911 192.168.1.2 9 typ host tcptype active generation 0 network-id 1 network-cost 10
|
|
20
|
-
a=candidate:9 1 tcp 1518083839 10.0.0.1 9 typ host tcptype active generation 0 network-id 2 network-cost 50
|
|
21
|
-
a=candidate:10 1 tcp 1518283007 2001:db8::1 9 typ host tcptype active generation 0 network-id 3 network-cost 10
|
|
22
|
-
a=candidate:11 1 tcp 1518151935 2001:db8::2 9 typ host tcptype active generation 0 network-id 4 network-cost 50
|
|
23
|
-
a=ice-ufrag:ICEUF
|
|
24
|
-
a=ice-pwd:ICEPWD
|
|
25
|
-
a=ice-options:trickle
|
|
26
|
-
a=fingerprint:sha-256 AA:BB:CC:DD:EE:FF:00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:00:11:22:33:44:55:66:77:88:99
|
|
27
|
-
a=setup:actpass
|
|
28
|
-
a=mid:0
|
|
29
|
-
a=sctp-port:5000
|
|
30
|
-
a=max-message-size:262144
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function it(e){let t=typeof e;if(t=="object"){if(Array.isArray(e))return"array";if(e===null)return"null"}return t}function Un(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}let X="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),Pe=[];for(let e=0;e<X.length;e++)Pe[X[e].charCodeAt(0)]=e;Pe["-".charCodeAt(0)]=X.indexOf("+");Pe["_".charCodeAt(0)]=X.indexOf("/");function qn(e){let t=e.length*3/4;e[e.length-2]=="="?t-=2:e[e.length-1]=="="&&(t-=1);let n=new Uint8Array(t),s=0,r=0,o,u=0;for(let p=0;p<e.length;p++){if(o=Pe[e.charCodeAt(p)],o===void 0)switch(e[p]){case"=":r=0;case`
|
|
2
|
+
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(r){case 0:u=o,r=1;break;case 1:n[s++]=u<<2|(o&48)>>4,u=o,r=2;break;case 2:n[s++]=(u&15)<<4|(o&60)>>2,u=o,r=3;break;case 3:n[s++]=(u&3)<<6|o,r=0;break}}if(r==1)throw Error("invalid base64 string.");return n.subarray(0,s)}function Vn(e){let t="",n=0,s,r=0;for(let o=0;o<e.length;o++)switch(s=e[o],n){case 0:t+=X[s>>2],r=(s&3)<<4,n=1;break;case 1:t+=X[r|s>>4],r=(s&15)<<2,n=2;break;case 2:t+=X[r|s>>6],t+=X[s&63],n=0;break}return n&&(t+=X[r],t+="=",n==1&&(t+="=")),t}var Re;(function(e){e.symbol=Symbol.for("protobuf-ts/unknown"),e.onRead=(n,s,r,o,u)=>{(t(s)?s[e.symbol]:s[e.symbol]=[]).push({no:r,wireType:o,data:u})},e.onWrite=(n,s,r)=>{for(let{no:o,wireType:u,data:p}of e.list(s))r.tag(o,u).raw(p)},e.list=(n,s)=>{if(t(n)){let r=n[e.symbol];return s?r.filter(o=>o.no==s):r}return[]},e.last=(n,s)=>e.list(n,s).slice(-1)[0];const t=n=>n&&Array.isArray(n[e.symbol])})(Re||(Re={}));var P;(function(e){e[e.Varint=0]="Varint",e[e.Bit64=1]="Bit64",e[e.LengthDelimited=2]="LengthDelimited",e[e.StartGroup=3]="StartGroup",e[e.EndGroup=4]="EndGroup",e[e.Bit32=5]="Bit32"})(P||(P={}));function Gn(){let e=0,t=0;for(let s=0;s<28;s+=7){let r=this.buf[this.pos++];if(e|=(r&127)<<s,(r&128)==0)return this.assertBounds(),[e,t]}let n=this.buf[this.pos++];if(e|=(n&15)<<28,t=(n&112)>>4,(n&128)==0)return this.assertBounds(),[e,t];for(let s=3;s<=31;s+=7){let r=this.buf[this.pos++];if(t|=(r&127)<<s,(r&128)==0)return this.assertBounds(),[e,t]}throw new Error("invalid varint")}function Ke(e,t,n){for(let o=0;o<28;o=o+7){const u=e>>>o,p=!(u>>>7==0&&t==0),h=(p?u|128:u)&255;if(n.push(h),!p)return}const s=e>>>28&15|(t&7)<<4,r=t>>3!=0;if(n.push((r?s|128:s)&255),!!r){for(let o=3;o<31;o=o+7){const u=t>>>o,p=u>>>7!=0,h=(p?u|128:u)&255;if(n.push(h),!p)return}n.push(t>>>31&1)}}const _e=(1<<16)*(1<<16);function Gt(e){let t=e[0]=="-";t&&(e=e.slice(1));const n=1e6;let s=0,r=0;function o(u,p){const h=Number(e.slice(u,p));r*=n,s=s*n+h,s>=_e&&(r=r+(s/_e|0),s=s%_e)}return o(-24,-18),o(-18,-12),o(-12,-6),o(-6),[t,s,r]}function $e(e,t){if(t>>>0<=2097151)return""+(_e*t+(e>>>0));let n=e&16777215,s=(e>>>24|t<<8)>>>0&16777215,r=t>>16&65535,o=n+s*6777216+r*6710656,u=s+r*8147497,p=r*2,h=1e7;o>=h&&(u+=Math.floor(o/h),o%=h),u>=h&&(p+=Math.floor(u/h),u%=h);function T(b,I){let v=b?String(b):"";return I?"0000000".slice(v.length)+v:v}return T(p,0)+T(u,p)+T(o,1)}function yt(e,t){if(e>=0){for(;e>127;)t.push(e&127|128),e=e>>>7;t.push(e)}else{for(let n=0;n<9;n++)t.push(e&127|128),e=e>>7;t.push(1)}}function jn(){let e=this.buf[this.pos++],t=e&127;if((e&128)==0)return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<7,(e&128)==0)return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<14,(e&128)==0)return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<21,(e&128)==0)return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let n=5;(e&128)!==0&&n<10;n++)e=this.buf[this.pos++];if((e&128)!=0)throw new Error("invalid varint");return this.assertBounds(),t>>>0}let N;function Wn(){const e=new DataView(new ArrayBuffer(8));N=globalThis.BigInt!==void 0&&typeof e.getBigInt64=="function"&&typeof e.getBigUint64=="function"&&typeof e.setBigInt64=="function"&&typeof e.setBigUint64=="function"?{MIN:BigInt("-9223372036854775808"),MAX:BigInt("9223372036854775807"),UMIN:BigInt("0"),UMAX:BigInt("18446744073709551615"),C:BigInt,V:e}:void 0}Wn();function jt(e){if(!e)throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support")}const Wt=/^-?[0-9]+$/,Ee=4294967296,ge=2147483648;class Kt{constructor(t,n){this.lo=t|0,this.hi=n|0}isZero(){return this.lo==0&&this.hi==0}toNumber(){let t=this.hi*Ee+(this.lo>>>0);if(!Number.isSafeInteger(t))throw new Error("cannot convert to safe number");return t}}class D extends Kt{static from(t){if(N)switch(typeof t){case"string":if(t=="0")return this.ZERO;if(t=="")throw new Error("string is no integer");t=N.C(t);case"number":if(t===0)return this.ZERO;t=N.C(t);case"bigint":if(!t)return this.ZERO;if(t<N.UMIN)throw new Error("signed value for ulong");if(t>N.UMAX)throw new Error("ulong too large");return N.V.setBigUint64(0,t,!0),new D(N.V.getInt32(0,!0),N.V.getInt32(4,!0))}else switch(typeof t){case"string":if(t=="0")return this.ZERO;if(t=t.trim(),!Wt.test(t))throw new Error("string is no integer");let[n,s,r]=Gt(t);if(n)throw new Error("signed value for ulong");return new D(s,r);case"number":if(t==0)return this.ZERO;if(!Number.isSafeInteger(t))throw new Error("number is no integer");if(t<0)throw new Error("signed value for ulong");return new D(t,t/Ee)}throw new Error("unknown value "+typeof t)}toString(){return N?this.toBigInt().toString():$e(this.lo,this.hi)}toBigInt(){return jt(N),N.V.setInt32(0,this.lo,!0),N.V.setInt32(4,this.hi,!0),N.V.getBigUint64(0,!0)}}D.ZERO=new D(0,0);class x extends Kt{static from(t){if(N)switch(typeof t){case"string":if(t=="0")return this.ZERO;if(t=="")throw new Error("string is no integer");t=N.C(t);case"number":if(t===0)return this.ZERO;t=N.C(t);case"bigint":if(!t)return this.ZERO;if(t<N.MIN)throw new Error("signed long too small");if(t>N.MAX)throw new Error("signed long too large");return N.V.setBigInt64(0,t,!0),new x(N.V.getInt32(0,!0),N.V.getInt32(4,!0))}else switch(typeof t){case"string":if(t=="0")return this.ZERO;if(t=t.trim(),!Wt.test(t))throw new Error("string is no integer");let[n,s,r]=Gt(t);if(n){if(r>ge||r==ge&&s!=0)throw new Error("signed long too small")}else if(r>=ge)throw new Error("signed long too large");let o=new x(s,r);return n?o.negate():o;case"number":if(t==0)return this.ZERO;if(!Number.isSafeInteger(t))throw new Error("number is no integer");return t>0?new x(t,t/Ee):new x(-t,-t/Ee).negate()}throw new Error("unknown value "+typeof t)}isNegative(){return(this.hi&ge)!==0}negate(){let t=~this.hi,n=this.lo;return n?n=~n+1:t+=1,new x(n,t)}toString(){if(N)return this.toBigInt().toString();if(this.isNegative()){let t=this.negate();return"-"+$e(t.lo,t.hi)}return $e(this.lo,this.hi)}toBigInt(){return jt(N),N.V.setInt32(0,this.lo,!0),N.V.setInt32(4,this.hi,!0),N.V.getBigInt64(0,!0)}}x.ZERO=new x(0,0);const _t={readUnknownField:!0,readerFactory:e=>new Jn(e)};function Kn(e){return e?Object.assign(Object.assign({},_t),e):_t}class Jn{constructor(t,n){this.varint64=Gn,this.uint32=jn,this.buf=t,this.len=t.length,this.pos=0,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength),this.textDecoder=n!=null?n:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0})}tag(){let t=this.uint32(),n=t>>>3,s=t&7;if(n<=0||s<0||s>5)throw new Error("illegal tag: field no "+n+" wire type "+s);return[n,s]}skip(t){let n=this.pos;switch(t){case P.Varint:for(;this.buf[this.pos++]&128;);break;case P.Bit64:this.pos+=4;case P.Bit32:this.pos+=4;break;case P.LengthDelimited:let s=this.uint32();this.pos+=s;break;case P.StartGroup:let r;for(;(r=this.tag()[1])!==P.EndGroup;)this.skip(r);break;default:throw new Error("cant skip wire type "+t)}return this.assertBounds(),this.buf.subarray(n,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let t=this.uint32();return t>>>1^-(t&1)}int64(){return new x(...this.varint64())}uint64(){return new D(...this.varint64())}sint64(){let[t,n]=this.varint64(),s=-(t&1);return t=(t>>>1|(n&1)<<31)^s,n=n>>>1^s,new x(t,n)}bool(){let[t,n]=this.varint64();return t!==0||n!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return new D(this.sfixed32(),this.sfixed32())}sfixed64(){return new x(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let t=this.uint32(),n=this.pos;return this.pos+=t,this.assertBounds(),this.buf.subarray(n,n+t)}string(){return this.textDecoder.decode(this.bytes())}}function R(e,t){if(!e)throw new Error(t)}const Zn=34028234663852886e22,Xn=-34028234663852886e22,$n=4294967295,Yn=2147483647,zn=-2147483648;function de(e){if(typeof e!="number")throw new Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>Yn||e<zn)throw new Error("invalid int 32: "+e)}function Oe(e){if(typeof e!="number")throw new Error("invalid uint 32: "+typeof e);if(!Number.isInteger(e)||e>$n||e<0)throw new Error("invalid uint 32: "+e)}function ct(e){if(typeof e!="number")throw new Error("invalid float 32: "+typeof e);if(!!Number.isFinite(e)&&(e>Zn||e<Xn))throw new Error("invalid float 32: "+e)}const bt={writeUnknownFields:!0,writerFactory:()=>new Qn};function Hn(e){return e?Object.assign(Object.assign({},bt),e):bt}class Qn{constructor(t){this.stack=[],this.textEncoder=t!=null?t:new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let t=0;for(let r=0;r<this.chunks.length;r++)t+=this.chunks[r].length;let n=new Uint8Array(t),s=0;for(let r=0;r<this.chunks.length;r++)n.set(this.chunks[r],s),s+=this.chunks[r].length;return this.chunks=[],n}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let t=this.finish(),n=this.stack.pop();if(!n)throw new Error("invalid state, fork stack empty");return this.chunks=n.chunks,this.buf=n.buf,this.uint32(t.byteLength),this.raw(t)}tag(t,n){return this.uint32((t<<3|n)>>>0)}raw(t){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(t),this}uint32(t){for(Oe(t);t>127;)this.buf.push(t&127|128),t=t>>>7;return this.buf.push(t),this}int32(t){return de(t),yt(t,this.buf),this}bool(t){return this.buf.push(t?1:0),this}bytes(t){return this.uint32(t.byteLength),this.raw(t)}string(t){let n=this.textEncoder.encode(t);return this.uint32(n.byteLength),this.raw(n)}float(t){ct(t);let n=new Uint8Array(4);return new DataView(n.buffer).setFloat32(0,t,!0),this.raw(n)}double(t){let n=new Uint8Array(8);return new DataView(n.buffer).setFloat64(0,t,!0),this.raw(n)}fixed32(t){Oe(t);let n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,t,!0),this.raw(n)}sfixed32(t){de(t);let n=new Uint8Array(4);return new DataView(n.buffer).setInt32(0,t,!0),this.raw(n)}sint32(t){return de(t),t=(t<<1^t>>31)>>>0,yt(t,this.buf),this}sfixed64(t){let n=new Uint8Array(8),s=new DataView(n.buffer),r=x.from(t);return s.setInt32(0,r.lo,!0),s.setInt32(4,r.hi,!0),this.raw(n)}fixed64(t){let n=new Uint8Array(8),s=new DataView(n.buffer),r=D.from(t);return s.setInt32(0,r.lo,!0),s.setInt32(4,r.hi,!0),this.raw(n)}int64(t){let n=x.from(t);return Ke(n.lo,n.hi,this.buf),this}sint64(t){let n=x.from(t),s=n.hi>>31,r=n.lo<<1^s,o=(n.hi<<1|n.lo>>>31)^s;return Ke(r,o,this.buf),this}uint64(t){let n=D.from(t);return Ke(n.lo,n.hi,this.buf),this}}const vt={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0},Rt={ignoreUnknownFields:!1};function es(e){return e?Object.assign(Object.assign({},Rt),e):Rt}function ts(e){return e?Object.assign(Object.assign({},vt),e):vt}const Jt=Symbol.for("protobuf-ts/message-type");function Et(e){let t=!1;const n=[];for(let s=0;s<e.length;s++){let r=e.charAt(s);r=="_"?t=!0:/\d/.test(r)?(n.push(r),t=!0):t?(n.push(r.toUpperCase()),t=!1):s==0?n.push(r.toLowerCase()):n.push(r)}return n.join("")}var k;(function(e){e[e.DOUBLE=1]="DOUBLE",e[e.FLOAT=2]="FLOAT",e[e.INT64=3]="INT64",e[e.UINT64=4]="UINT64",e[e.INT32=5]="INT32",e[e.FIXED64=6]="FIXED64",e[e.FIXED32=7]="FIXED32",e[e.BOOL=8]="BOOL",e[e.STRING=9]="STRING",e[e.BYTES=12]="BYTES",e[e.UINT32=13]="UINT32",e[e.SFIXED32=15]="SFIXED32",e[e.SFIXED64=16]="SFIXED64",e[e.SINT32=17]="SINT32",e[e.SINT64=18]="SINT64"})(k||(k={}));var J;(function(e){e[e.BIGINT=0]="BIGINT",e[e.STRING=1]="STRING",e[e.NUMBER=2]="NUMBER"})(J||(J={}));var Se;(function(e){e[e.NO=0]="NO",e[e.PACKED=1]="PACKED",e[e.UNPACKED=2]="UNPACKED"})(Se||(Se={}));function ns(e){var t,n,s,r;return e.localName=(t=e.localName)!==null&&t!==void 0?t:Et(e.name),e.jsonName=(n=e.jsonName)!==null&&n!==void 0?n:Et(e.name),e.repeat=(s=e.repeat)!==null&&s!==void 0?s:Se.NO,e.opt=(r=e.opt)!==null&&r!==void 0?r:e.repeat||e.oneof?!1:e.kind=="message",e}function ss(e){if(typeof e!="object"||e===null||!e.hasOwnProperty("oneofKind"))return!1;switch(typeof e.oneofKind){case"string":return e[e.oneofKind]===void 0?!1:Object.keys(e).length==2;case"undefined":return Object.keys(e).length==1;default:return!1}}class rs{constructor(t){var n;this.fields=(n=t.fields)!==null&&n!==void 0?n:[]}prepare(){if(this.data)return;const t=[],n=[],s=[];for(let r of this.fields)if(r.oneof)s.includes(r.oneof)||(s.push(r.oneof),t.push(r.oneof),n.push(r.oneof));else switch(n.push(r.localName),r.kind){case"scalar":case"enum":(!r.opt||r.repeat)&&t.push(r.localName);break;case"message":r.repeat&&t.push(r.localName);break;case"map":t.push(r.localName);break}this.data={req:t,known:n,oneofs:Object.values(s)}}is(t,n,s=!1){if(n<0)return!0;if(t==null||typeof t!="object")return!1;this.prepare();let r=Object.keys(t),o=this.data;if(r.length<o.req.length||o.req.some(u=>!r.includes(u))||!s&&r.some(u=>!o.known.includes(u)))return!1;if(n<1)return!0;for(const u of o.oneofs){const p=t[u];if(!ss(p))return!1;if(p.oneofKind===void 0)continue;const h=this.fields.find(T=>T.localName===p.oneofKind);if(!h||!this.field(p[p.oneofKind],h,s,n))return!1}for(const u of this.fields)if(u.oneof===void 0&&!this.field(t[u.localName],u,s,n))return!1;return!0}field(t,n,s,r){let o=n.repeat;switch(n.kind){case"scalar":return t===void 0?n.opt:o?this.scalars(t,n.T,r,n.L):this.scalar(t,n.T,n.L);case"enum":return t===void 0?n.opt:o?this.scalars(t,k.INT32,r):this.scalar(t,k.INT32);case"message":return t===void 0?!0:o?this.messages(t,n.T(),s,r):this.message(t,n.T(),s,r);case"map":if(typeof t!="object"||t===null)return!1;if(r<2)return!0;if(!this.mapKeys(t,n.K,r))return!1;switch(n.V.kind){case"scalar":return this.scalars(Object.values(t),n.V.T,r,n.V.L);case"enum":return this.scalars(Object.values(t),k.INT32,r);case"message":return this.messages(Object.values(t),n.V.T(),s,r)}break}return!0}message(t,n,s,r){return s?n.isAssignable(t,r):n.is(t,r)}messages(t,n,s,r){if(!Array.isArray(t))return!1;if(r<2)return!0;if(s){for(let o=0;o<t.length&&o<r;o++)if(!n.isAssignable(t[o],r-1))return!1}else for(let o=0;o<t.length&&o<r;o++)if(!n.is(t[o],r-1))return!1;return!0}scalar(t,n,s){let r=typeof t;switch(n){case k.UINT64:case k.FIXED64:case k.INT64:case k.SFIXED64:case k.SINT64:switch(s){case J.BIGINT:return r=="bigint";case J.NUMBER:return r=="number"&&!isNaN(t);default:return r=="string"}case k.BOOL:return r=="boolean";case k.STRING:return r=="string";case k.BYTES:return t instanceof Uint8Array;case k.DOUBLE:case k.FLOAT:return r=="number"&&!isNaN(t);default:return r=="number"&&Number.isInteger(t)}}scalars(t,n,s,r){if(!Array.isArray(t))return!1;if(s<2)return!0;if(Array.isArray(t)){for(let o=0;o<t.length&&o<s;o++)if(!this.scalar(t[o],n,r))return!1}return!0}mapKeys(t,n,s){let r=Object.keys(t);switch(n){case k.INT32:case k.FIXED32:case k.SFIXED32:case k.SINT32:case k.UINT32:return this.scalars(r.slice(0,s).map(o=>parseInt(o)),n,s);case k.BOOL:return this.scalars(r.slice(0,s).map(o=>o=="true"?!0:o=="false"?!1:o),n,s);default:return this.scalars(r,n,s,J.STRING)}}}function G(e,t){switch(t){case J.BIGINT:return e.toBigInt();case J.NUMBER:return e.toNumber();default:return e.toString()}}class os{constructor(t){this.info=t}prepare(){var t;if(this.fMap===void 0){this.fMap={};const n=(t=this.info.fields)!==null&&t!==void 0?t:[];for(const s of n)this.fMap[s.name]=s,this.fMap[s.jsonName]=s,this.fMap[s.localName]=s}}assert(t,n,s){if(!t){let r=it(s);throw(r=="number"||r=="boolean")&&(r=s.toString()),new Error(`Cannot parse JSON ${r} for ${this.info.typeName}#${n}`)}}read(t,n,s){this.prepare();const r=[];for(const[o,u]of Object.entries(t)){const p=this.fMap[o];if(!p){if(!s.ignoreUnknownFields)throw new Error(`Found unknown field while reading ${this.info.typeName} from JSON format. JSON key: ${o}`);continue}const h=p.localName;let T;if(p.oneof){if(u===null&&(p.kind!=="enum"||p.T()[0]!=="google.protobuf.NullValue"))continue;if(r.includes(p.oneof))throw new Error(`Multiple members of the oneof group "${p.oneof}" of ${this.info.typeName} are present in JSON.`);r.push(p.oneof),T=n[p.oneof]={oneofKind:h}}else T=n;if(p.kind=="map"){if(u===null)continue;this.assert(Un(u),p.name,u);const b=T[h];for(const[I,v]of Object.entries(u)){this.assert(v!==null,p.name+" map value",null);let B;switch(p.V.kind){case"message":B=p.V.T().internalJsonRead(v,s);break;case"enum":if(B=this.enum(p.V.T(),v,p.name,s.ignoreUnknownFields),B===!1)continue;break;case"scalar":B=this.scalar(v,p.V.T,p.V.L,p.name);break}this.assert(B!==void 0,p.name+" map value",v);let F=I;p.K==k.BOOL&&(F=F=="true"?!0:F=="false"?!1:F),F=this.scalar(F,p.K,J.STRING,p.name).toString(),b[F]=B}}else if(p.repeat){if(u===null)continue;this.assert(Array.isArray(u),p.name,u);const b=T[h];for(const I of u){this.assert(I!==null,p.name,null);let v;switch(p.kind){case"message":v=p.T().internalJsonRead(I,s);break;case"enum":if(v=this.enum(p.T(),I,p.name,s.ignoreUnknownFields),v===!1)continue;break;case"scalar":v=this.scalar(I,p.T,p.L,p.name);break}this.assert(v!==void 0,p.name,u),b.push(v)}}else switch(p.kind){case"message":if(u===null&&p.T().typeName!="google.protobuf.Value"){this.assert(p.oneof===void 0,p.name+" (oneof member)",null);continue}T[h]=p.T().internalJsonRead(u,s,T[h]);break;case"enum":let b=this.enum(p.T(),u,p.name,s.ignoreUnknownFields);if(b===!1)continue;T[h]=b;break;case"scalar":T[h]=this.scalar(u,p.T,p.L,p.name);break}}}enum(t,n,s,r){if(t[0]=="google.protobuf.NullValue"&&R(n===null||n==="NULL_VALUE",`Unable to parse field ${this.info.typeName}#${s}, enum ${t[0]} only accepts null.`),n===null)return 0;switch(typeof n){case"number":return R(Number.isInteger(n),`Unable to parse field ${this.info.typeName}#${s}, enum can only be integral number, got ${n}.`),n;case"string":let o=n;t[2]&&n.substring(0,t[2].length)===t[2]&&(o=n.substring(t[2].length));let u=t[1][o];return typeof u=="undefined"&&r?!1:(R(typeof u=="number",`Unable to parse field ${this.info.typeName}#${s}, enum ${t[0]} has no value for "${n}".`),u)}R(!1,`Unable to parse field ${this.info.typeName}#${s}, cannot parse enum value from ${typeof n}".`)}scalar(t,n,s,r){let o;try{switch(n){case k.DOUBLE:case k.FLOAT:if(t===null)return 0;if(t==="NaN")return Number.NaN;if(t==="Infinity")return Number.POSITIVE_INFINITY;if(t==="-Infinity")return Number.NEGATIVE_INFINITY;if(t===""){o="empty string";break}if(typeof t=="string"&&t.trim().length!==t.length){o="extra whitespace";break}if(typeof t!="string"&&typeof t!="number")break;let u=Number(t);if(Number.isNaN(u)){o="not a number";break}if(!Number.isFinite(u)){o="too large or small";break}return n==k.FLOAT&&ct(u),u;case k.INT32:case k.FIXED32:case k.SFIXED32:case k.SINT32:case k.UINT32:if(t===null)return 0;let p;if(typeof t=="number"?p=t:t===""?o="empty string":typeof t=="string"&&(t.trim().length!==t.length?o="extra whitespace":p=Number(t)),p===void 0)break;return n==k.UINT32?Oe(p):de(p),p;case k.INT64:case k.SFIXED64:case k.SINT64:if(t===null)return G(x.ZERO,s);if(typeof t!="number"&&typeof t!="string")break;return G(x.from(t),s);case k.FIXED64:case k.UINT64:if(t===null)return G(D.ZERO,s);if(typeof t!="number"&&typeof t!="string")break;return G(D.from(t),s);case k.BOOL:if(t===null)return!1;if(typeof t!="boolean")break;return t;case k.STRING:if(t===null)return"";if(typeof t!="string"){o="extra whitespace";break}try{encodeURIComponent(t)}catch(h){h="invalid UTF8";break}return t;case k.BYTES:if(t===null||t==="")return new Uint8Array(0);if(typeof t!="string")break;return qn(t)}}catch(u){o=u.message}this.assert(!1,r+(o?" - "+o:""),t)}}class as{constructor(t){var n;this.fields=(n=t.fields)!==null&&n!==void 0?n:[]}write(t,n){const s={},r=t;for(const o of this.fields){if(!o.oneof){let T=this.field(o,r[o.localName],n);T!==void 0&&(s[n.useProtoFieldName?o.name:o.jsonName]=T);continue}const u=r[o.oneof];if(u.oneofKind!==o.localName)continue;const p=o.kind=="scalar"||o.kind=="enum"?Object.assign(Object.assign({},n),{emitDefaultValues:!0}):n;let h=this.field(o,u[o.localName],p);R(h!==void 0),s[n.useProtoFieldName?o.name:o.jsonName]=h}return s}field(t,n,s){let r;if(t.kind=="map"){R(typeof n=="object"&&n!==null);const o={};switch(t.V.kind){case"scalar":for(const[h,T]of Object.entries(n)){const b=this.scalar(t.V.T,T,t.name,!1,!0);R(b!==void 0),o[h.toString()]=b}break;case"message":const u=t.V.T();for(const[h,T]of Object.entries(n)){const b=this.message(u,T,t.name,s);R(b!==void 0),o[h.toString()]=b}break;case"enum":const p=t.V.T();for(const[h,T]of Object.entries(n)){R(T===void 0||typeof T=="number");const b=this.enum(p,T,t.name,!1,!0,s.enumAsInteger);R(b!==void 0),o[h.toString()]=b}break}(s.emitDefaultValues||Object.keys(o).length>0)&&(r=o)}else if(t.repeat){R(Array.isArray(n));const o=[];switch(t.kind){case"scalar":for(let h=0;h<n.length;h++){const T=this.scalar(t.T,n[h],t.name,t.opt,!0);R(T!==void 0),o.push(T)}break;case"enum":const u=t.T();for(let h=0;h<n.length;h++){R(n[h]===void 0||typeof n[h]=="number");const T=this.enum(u,n[h],t.name,t.opt,!0,s.enumAsInteger);R(T!==void 0),o.push(T)}break;case"message":const p=t.T();for(let h=0;h<n.length;h++){const T=this.message(p,n[h],t.name,s);R(T!==void 0),o.push(T)}break}(s.emitDefaultValues||o.length>0||s.emitDefaultValues)&&(r=o)}else switch(t.kind){case"scalar":r=this.scalar(t.T,n,t.name,t.opt,s.emitDefaultValues);break;case"enum":r=this.enum(t.T(),n,t.name,t.opt,s.emitDefaultValues,s.enumAsInteger);break;case"message":r=this.message(t.T(),n,t.name,s);break}return r}enum(t,n,s,r,o,u){if(t[0]=="google.protobuf.NullValue")return!o&&!r?void 0:null;if(n===void 0){R(r);return}if(!(n===0&&!o&&!r))return R(typeof n=="number"),R(Number.isInteger(n)),u||!t[1].hasOwnProperty(n)?n:t[2]?t[2]+t[1][n]:t[1][n]}message(t,n,s,r){return n===void 0?r.emitDefaultValues?null:void 0:t.internalJsonWrite(n,r)}scalar(t,n,s,r,o){if(n===void 0){R(r);return}const u=o||r;switch(t){case k.INT32:case k.SFIXED32:case k.SINT32:return n===0?u?0:void 0:(de(n),n);case k.FIXED32:case k.UINT32:return n===0?u?0:void 0:(Oe(n),n);case k.FLOAT:ct(n);case k.DOUBLE:return n===0?u?0:void 0:(R(typeof n=="number"),Number.isNaN(n)?"NaN":n===Number.POSITIVE_INFINITY?"Infinity":n===Number.NEGATIVE_INFINITY?"-Infinity":n);case k.STRING:return n===""?u?"":void 0:(R(typeof n=="string"),n);case k.BOOL:return n===!1?u?!1:void 0:(R(typeof n=="boolean"),n);case k.UINT64:case k.FIXED64:R(typeof n=="number"||typeof n=="string"||typeof n=="bigint");let p=D.from(n);return p.isZero()&&!u?void 0:p.toString();case k.INT64:case k.SFIXED64:case k.SINT64:R(typeof n=="number"||typeof n=="string"||typeof n=="bigint");let h=x.from(n);return h.isZero()&&!u?void 0:h.toString();case k.BYTES:return R(n instanceof Uint8Array),n.byteLength?Vn(n):u?"":void 0}}}function Ye(e,t=J.STRING){switch(e){case k.BOOL:return!1;case k.UINT64:case k.FIXED64:return G(D.ZERO,t);case k.INT64:case k.SFIXED64:case k.SINT64:return G(x.ZERO,t);case k.DOUBLE:case k.FLOAT:return 0;case k.BYTES:return new Uint8Array(0);case k.STRING:return"";default:return 0}}class is{constructor(t){this.info=t}prepare(){var t;if(!this.fieldNoToField){const n=(t=this.info.fields)!==null&&t!==void 0?t:[];this.fieldNoToField=new Map(n.map(s=>[s.no,s]))}}read(t,n,s,r){this.prepare();const o=r===void 0?t.len:t.pos+r;for(;t.pos<o;){const[u,p]=t.tag(),h=this.fieldNoToField.get(u);if(!h){let v=s.readUnknownField;if(v=="throw")throw new Error(`Unknown field ${u} (wire type ${p}) for ${this.info.typeName}`);let B=t.skip(p);v!==!1&&(v===!0?Re.onRead:v)(this.info.typeName,n,u,p,B);continue}let T=n,b=h.repeat,I=h.localName;switch(h.oneof&&(T=T[h.oneof],T.oneofKind!==I&&(T=n[h.oneof]={oneofKind:I})),h.kind){case"scalar":case"enum":let v=h.kind=="enum"?k.INT32:h.T,B=h.kind=="scalar"?h.L:void 0;if(b){let z=T[I];if(p==P.LengthDelimited&&v!=k.STRING&&v!=k.BYTES){let oe=t.uint32()+t.pos;for(;t.pos<oe;)z.push(this.scalar(t,v,B))}else z.push(this.scalar(t,v,B))}else T[I]=this.scalar(t,v,B);break;case"message":if(b){let z=T[I],oe=h.T().internalBinaryRead(t,t.uint32(),s);z.push(oe)}else T[I]=h.T().internalBinaryRead(t,t.uint32(),s,T[I]);break;case"map":let[F,De]=this.mapEntry(h,t,s);T[I][F]=De;break}}}mapEntry(t,n,s){let r=n.uint32(),o=n.pos+r,u,p;for(;n.pos<o;){let[h,T]=n.tag();switch(h){case 1:t.K==k.BOOL?u=n.bool().toString():u=this.scalar(n,t.K,J.STRING);break;case 2:switch(t.V.kind){case"scalar":p=this.scalar(n,t.V.T,t.V.L);break;case"enum":p=n.int32();break;case"message":p=t.V.T().internalBinaryRead(n,n.uint32(),s);break}break;default:throw new Error(`Unknown field ${h} (wire type ${T}) in map entry for ${this.info.typeName}#${t.name}`)}}if(u===void 0){let h=Ye(t.K);u=t.K==k.BOOL?h.toString():h}if(p===void 0)switch(t.V.kind){case"scalar":p=Ye(t.V.T,t.V.L);break;case"enum":p=0;break;case"message":p=t.V.T().create();break}return[u,p]}scalar(t,n,s){switch(n){case k.INT32:return t.int32();case k.STRING:return t.string();case k.BOOL:return t.bool();case k.DOUBLE:return t.double();case k.FLOAT:return t.float();case k.INT64:return G(t.int64(),s);case k.UINT64:return G(t.uint64(),s);case k.FIXED64:return G(t.fixed64(),s);case k.FIXED32:return t.fixed32();case k.BYTES:return t.bytes();case k.UINT32:return t.uint32();case k.SFIXED32:return t.sfixed32();case k.SFIXED64:return G(t.sfixed64(),s);case k.SINT32:return t.sint32();case k.SINT64:return G(t.sint64(),s)}}}class cs{constructor(t){this.info=t}prepare(){if(!this.fields){const t=this.info.fields?this.info.fields.concat():[];this.fields=t.sort((n,s)=>n.no-s.no)}}write(t,n,s){this.prepare();for(const o of this.fields){let u,p,h=o.repeat,T=o.localName;if(o.oneof){const b=t[o.oneof];if(b.oneofKind!==T)continue;u=b[T],p=!0}else u=t[T],p=!1;switch(o.kind){case"scalar":case"enum":let b=o.kind=="enum"?k.INT32:o.T;if(h)if(R(Array.isArray(u)),h==Se.PACKED)this.packed(n,b,o.no,u);else for(const I of u)this.scalar(n,b,o.no,I,!0);else u===void 0?R(o.opt):this.scalar(n,b,o.no,u,p||o.opt);break;case"message":if(h){R(Array.isArray(u));for(const I of u)this.message(n,s,o.T(),o.no,I)}else this.message(n,s,o.T(),o.no,u);break;case"map":R(typeof u=="object"&&u!==null);for(const[I,v]of Object.entries(u))this.mapEntry(n,s,o,I,v);break}}let r=s.writeUnknownFields;r!==!1&&(r===!0?Re.onWrite:r)(this.info.typeName,t,n)}mapEntry(t,n,s,r,o){t.tag(s.no,P.LengthDelimited),t.fork();let u=r;switch(s.K){case k.INT32:case k.FIXED32:case k.UINT32:case k.SFIXED32:case k.SINT32:u=Number.parseInt(r);break;case k.BOOL:R(r=="true"||r=="false"),u=r=="true";break}switch(this.scalar(t,s.K,1,u,!0),s.V.kind){case"scalar":this.scalar(t,s.V.T,2,o,!0);break;case"enum":this.scalar(t,k.INT32,2,o,!0);break;case"message":this.message(t,n,s.V.T(),2,o);break}t.join()}message(t,n,s,r,o){o!==void 0&&(s.internalBinaryWrite(o,t.tag(r,P.LengthDelimited).fork(),n),t.join())}scalar(t,n,s,r,o){let[u,p,h]=this.scalarInfo(n,r);(!h||o)&&(t.tag(s,u),t[p](r))}packed(t,n,s,r){if(!r.length)return;R(n!==k.BYTES&&n!==k.STRING),t.tag(s,P.LengthDelimited),t.fork();let[,o]=this.scalarInfo(n);for(let u=0;u<r.length;u++)t[o](r[u]);t.join()}scalarInfo(t,n){let s=P.Varint,r,o=n===void 0,u=n===0;switch(t){case k.INT32:r="int32";break;case k.STRING:u=o||!n.length,s=P.LengthDelimited,r="string";break;case k.BOOL:u=n===!1,r="bool";break;case k.UINT32:r="uint32";break;case k.DOUBLE:s=P.Bit64,r="double";break;case k.FLOAT:s=P.Bit32,r="float";break;case k.INT64:u=o||x.from(n).isZero(),r="int64";break;case k.UINT64:u=o||D.from(n).isZero(),r="uint64";break;case k.FIXED64:u=o||D.from(n).isZero(),s=P.Bit64,r="fixed64";break;case k.BYTES:u=o||!n.byteLength,s=P.LengthDelimited,r="bytes";break;case k.FIXED32:s=P.Bit32,r="fixed32";break;case k.SFIXED32:s=P.Bit32,r="sfixed32";break;case k.SFIXED64:u=o||x.from(n).isZero(),s=P.Bit64,r="sfixed64";break;case k.SINT32:r="sint32";break;case k.SINT64:u=o||x.from(n).isZero(),r="sint64";break}return[s,r,o||u]}}function ls(e){const t=e.messagePrototype?Object.create(e.messagePrototype):Object.defineProperty({},Jt,{value:e});for(let n of e.fields){let s=n.localName;if(!n.opt)if(n.oneof)t[n.oneof]={oneofKind:void 0};else if(n.repeat)t[s]=[];else switch(n.kind){case"scalar":t[s]=Ye(n.T,n.L);break;case"enum":t[s]=0;break;case"map":t[s]={};break}}return t}function Je(e,t,n){let s,r=n,o;for(let u of e.fields){let p=u.localName;if(u.oneof){const h=r[u.oneof];if((h==null?void 0:h.oneofKind)==null)continue;if(s=h[p],o=t[u.oneof],o.oneofKind=h.oneofKind,s==null){delete o[p];continue}}else if(s=r[p],o=t,s==null)continue;switch(u.repeat&&(o[p].length=s.length),u.kind){case"scalar":case"enum":if(u.repeat)for(let T=0;T<s.length;T++)o[p][T]=s[T];else o[p]=s;break;case"message":let h=u.T();if(u.repeat)for(let T=0;T<s.length;T++)o[p][T]=h.create(s[T]);else o[p]===void 0?o[p]=h.create(s):h.mergePartial(o[p],s);break;case"map":switch(u.V.kind){case"scalar":case"enum":Object.assign(o[p],s);break;case"message":let T=u.V.T();for(let b of Object.keys(s))o[p][b]=T.create(s[b]);break}break}}}function us(e,t,n){if(t===n)return!0;if(!t||!n)return!1;for(let s of e.fields){let r=s.localName,o=s.oneof?t[s.oneof][r]:t[r],u=s.oneof?n[s.oneof][r]:n[r];switch(s.kind){case"enum":case"scalar":let p=s.kind=="enum"?k.INT32:s.T;if(!(s.repeat?Ot(p,o,u):Zt(p,o,u)))return!1;break;case"map":if(!(s.V.kind=="message"?St(s.V.T(),Te(o),Te(u)):Ot(s.V.kind=="enum"?k.INT32:s.V.T,Te(o),Te(u))))return!1;break;case"message":let h=s.T();if(!(s.repeat?St(h,o,u):h.equals(o,u)))return!1;break}}return!0}const Te=Object.values;function Zt(e,t,n){if(t===n)return!0;if(e!==k.BYTES)return!1;let s=t,r=n;if(s.length!==r.length)return!1;for(let o=0;o<s.length;o++)if(s[o]!=r[o])return!1;return!0}function Ot(e,t,n){if(t.length!==n.length)return!1;for(let s=0;s<t.length;s++)if(!Zt(e,t[s],n[s]))return!1;return!0}function St(e,t,n){if(t.length!==n.length)return!1;for(let s=0;s<t.length;s++)if(!e.equals(t[s],n[s]))return!1;return!0}const ds=Object.getOwnPropertyDescriptors(Object.getPrototypeOf({}));class l{constructor(t,n,s){this.defaultCheckDepth=16,this.typeName=t,this.fields=n.map(ns),this.options=s!=null?s:{},this.messagePrototype=Object.create(null,Object.assign(Object.assign({},ds),{[Jt]:{value:this}})),this.refTypeCheck=new rs(this),this.refJsonReader=new os(this),this.refJsonWriter=new as(this),this.refBinReader=new is(this),this.refBinWriter=new cs(this)}create(t){let n=ls(this);return t!==void 0&&Je(this,n,t),n}clone(t){let n=this.create();return Je(this,n,t),n}equals(t,n){return us(this,t,n)}is(t,n=this.defaultCheckDepth){return this.refTypeCheck.is(t,n,!1)}isAssignable(t,n=this.defaultCheckDepth){return this.refTypeCheck.is(t,n,!0)}mergePartial(t,n){Je(this,t,n)}fromBinary(t,n){let s=Kn(n);return this.internalBinaryRead(s.readerFactory(t),t.byteLength,s)}fromJson(t,n){return this.internalJsonRead(t,es(n))}fromJsonString(t,n){let s=JSON.parse(t);return this.fromJson(s,n)}toJson(t,n){return this.internalJsonWrite(t,ts(n))}toJsonString(t,n){var s;let r=this.toJson(t,n);return JSON.stringify(r,null,(s=n==null?void 0:n.prettySpaces)!==null&&s!==void 0?s:0)}toBinary(t,n){let s=Hn(n);return this.internalBinaryWrite(t,s.writerFactory(),s).finish()}internalJsonRead(t,n,s){if(t!==null&&typeof t=="object"&&!Array.isArray(t)){let r=s!=null?s:this.create();return this.refJsonReader.read(t,r,n),r}throw new Error(`Unable to parse message ${this.typeName} from JSON ${it(t)}.`)}internalJsonWrite(t,n){return this.refJsonWriter.write(t,n)}internalBinaryWrite(t,n,s){return this.refBinWriter.write(t,n,s),n}internalBinaryRead(t,n,s,r){let o=r!=null?r:this.create();return this.refBinReader.read(t,o,s,n),o}}var ps=Object.defineProperty,ms=Object.defineProperties,fs=Object.getOwnPropertyDescriptors,Nt=Object.getOwnPropertySymbols,hs=Object.prototype.hasOwnProperty,ks=Object.prototype.propertyIsEnumerable,ze=(e,t,n)=>t in e?ps(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xt=(e,t)=>{for(var n in t||(t={}))hs.call(t,n)&&ze(e,n,t[n]);if(Nt)for(var n of Nt(t))ks.call(t,n)&&ze(e,n,t[n]);return e},gs=(e,t)=>ms(e,fs(t)),E=(e,t,n)=>(ze(e,typeof t!="symbol"?t+"":t,n),n),Xt=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},te=(e,t,n)=>(Xt(e,t,"read from private field"),n?n.call(e):t.get(e)),we=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},It=(e,t,n,s)=>(Xt(e,t,"write to private field"),s?s.call(e,n):t.set(e,n),n),Ts=(e,t,n)=>new Promise((s,r)=>{var o=h=>{try{p(n.next(h))}catch(T){r(T)}},u=h=>{try{p(n.throw(h))}catch(T){r(T)}},p=h=>h.done?s(h.value):Promise.resolve(h.value).then(o,u);p((n=n.apply(e,t)).next())}),ce=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Ne={},ws={get exports(){return Ne},set exports(e){Ne=e}},ne=typeof Reflect=="object"?Reflect:null,Ct=ne&&typeof ne.apply=="function"?ne.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},be;ne&&typeof ne.ownKeys=="function"?be=ne.ownKeys:Object.getOwnPropertySymbols?be=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:be=function(e){return Object.getOwnPropertyNames(e)};function ys(e){console&&console.warn&&console.warn(e)}var $t=Number.isNaN||function(e){return e!==e};function O(){O.init.call(this)}ws.exports=O;Ne.once=Rs;O.EventEmitter=O;O.prototype._events=void 0;O.prototype._eventsCount=0;O.prototype._maxListeners=void 0;var Pt=10;function Le(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(O,"defaultMaxListeners",{enumerable:!0,get:function(){return Pt},set:function(e){if(typeof e!="number"||e<0||$t(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");Pt=e}});O.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};O.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||$t(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function Yt(e){return e._maxListeners===void 0?O.defaultMaxListeners:e._maxListeners}O.prototype.getMaxListeners=function(){return Yt(this)};O.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var s=e==="error",r=this._events;if(r!==void 0)s=s&&r.error===void 0;else if(!s)return!1;if(s){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var u=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw u.context=o,u}var p=r[e];if(p===void 0)return!1;if(typeof p=="function")Ct(p,this,t);else for(var h=p.length,T=tn(p,h),n=0;n<h;++n)Ct(T[n],this,t);return!0};function zt(e,t,n,s){var r,o,u;if(Le(n),o=e._events,o===void 0?(o=e._events=Object.create(null),e._eventsCount=0):(o.newListener!==void 0&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),u=o[t]),u===void 0)u=o[t]=n,++e._eventsCount;else if(typeof u=="function"?u=o[t]=s?[n,u]:[u,n]:s?u.unshift(n):u.push(n),r=Yt(e),r>0&&u.length>r&&!u.warned){u.warned=!0;var p=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");p.name="MaxListenersExceededWarning",p.emitter=e,p.type=t,p.count=u.length,ys(p)}return e}O.prototype.addListener=function(e,t){return zt(this,e,t,!1)};O.prototype.on=O.prototype.addListener;O.prototype.prependListener=function(e,t){return zt(this,e,t,!0)};function _s(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Ht(e,t,n){var s={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},r=_s.bind(s);return r.listener=n,s.wrapFn=r,r}O.prototype.once=function(e,t){return Le(t),this.on(e,Ht(this,e,t)),this};O.prototype.prependOnceListener=function(e,t){return Le(t),this.prependListener(e,Ht(this,e,t)),this};O.prototype.removeListener=function(e,t){var n,s,r,o,u;if(Le(t),s=this._events,s===void 0)return this;if(n=s[e],n===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete s[e],s.removeListener&&this.emit("removeListener",e,n.listener||t));else if(typeof n!="function"){for(r=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){u=n[o].listener,r=o;break}if(r<0)return this;r===0?n.shift():bs(n,r),n.length===1&&(s[e]=n[0]),s.removeListener!==void 0&&this.emit("removeListener",e,u||t)}return this};O.prototype.off=O.prototype.removeListener;O.prototype.removeAllListeners=function(e){var t,n,s;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var r=Object.keys(n),o;for(s=0;s<r.length;++s)o=r[s],o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(t=n[e],typeof t=="function")this.removeListener(e,t);else if(t!==void 0)for(s=t.length-1;s>=0;s--)this.removeListener(e,t[s]);return this};function Qt(e,t,n){var s=e._events;if(s===void 0)return[];var r=s[t];return r===void 0?[]:typeof r=="function"?n?[r.listener||r]:[r]:n?vs(r):tn(r,r.length)}O.prototype.listeners=function(e){return Qt(this,e,!0)};O.prototype.rawListeners=function(e){return Qt(this,e,!1)};O.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):en.call(e,t)};O.prototype.listenerCount=en;function en(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}O.prototype.eventNames=function(){return this._eventsCount>0?be(this._events):[]};function tn(e,t){for(var n=new Array(t),s=0;s<t;++s)n[s]=e[s];return n}function bs(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function vs(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function Rs(e,t){return new Promise(function(n,s){function r(u){e.removeListener(t,o),s(u)}function o(){typeof e.removeListener=="function"&&e.removeListener("error",r),n([].slice.call(arguments))}nn(e,t,o,{once:!0}),t!=="error"&&Es(e,r,{once:!0})})}function Es(e,t,n){typeof e.on=="function"&&nn(e,"error",t,n)}function nn(e,t,n,s){if(typeof e.on=="function")s.once?e.once(t,n):e.on(t,n);else if(typeof e.addEventListener=="function")e.addEventListener(t,function r(o){s.once&&e.removeEventListener(t,r),n(o)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}const Os=`
|
|
31
3
|
m=video 9 UDP/TLS/RTP/SAVPF 96
|
|
32
|
-
c=IN IP4 0.0.0.0
|
|
33
|
-
a=rtcp:9 IN IP4 0.0.0.0
|
|
34
|
-
a=ice-ufrag:ICEUF
|
|
35
|
-
a=ice-pwd:ICEPWD
|
|
36
|
-
a=ice-options:trickle
|
|
37
|
-
a=fingerprint:sha-256 AA:BB:CC:DD:EE:FF:00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:00:11:22:33:44:55:66:77:88:99
|
|
38
|
-
a=setup:actpass
|
|
39
|
-
a=mid:1
|
|
40
|
-
a=extmap:1 urn:ietf:params:rtp-hdrext:toffset
|
|
41
|
-
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
|
|
42
|
-
a=extmap:3 urn:3gpp:video-orientation
|
|
43
|
-
a=extmap:4 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
|
|
44
|
-
a=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
|
|
45
|
-
a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type
|
|
46
|
-
a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing
|
|
47
|
-
a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space
|
|
48
|
-
a=extmap:9 urn:ietf:params:rtp-hdrext:sdes:mid
|
|
49
|
-
a=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
|
|
50
|
-
a=extmap:11 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id
|
|
51
|
-
a=extmap:13 https://aomediacodec.github.io/av1-rtp-spec/#dependency-descriptor-rtp-header-extension
|
|
52
|
-
a=extmap:14 http://www.webrtc.org/experiments/rtp-hdrext/video-layers-allocation00
|
|
53
|
-
a=sendonly
|
|
54
4
|
a=msid:stream-id track-id
|
|
55
|
-
|
|
56
|
-
a=
|
|
57
|
-
a=rtpmap:96 VP8/90000
|
|
58
|
-
a=rtcp-fb:96 goog-remb
|
|
59
|
-
a=rtcp-fb:96 transport-cc
|
|
60
|
-
a=rtcp-fb:96 ccm fir
|
|
61
|
-
a=rtcp-fb:96 nack
|
|
62
|
-
a=rtcp-fb:96 nack pli
|
|
63
|
-
a=rid:q send
|
|
64
|
-
a=rid:h send
|
|
65
|
-
a=simulcast:send q;h
|
|
66
|
-
`,Lt={track:null,transport:null,rtcpTransport:null,dtmf:{insertDTMF:()=>{},ontonechange:null,canInsertDTMF:!1,toneBuffer:"",addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!0},transform:null,mid:null,getParameters:()=>({}),setParameters:()=>Promise.resolve({}),replaceTrack:()=>Promise.resolve({}),getStats:()=>Promise.resolve(new Map),setStreams:()=>{},setTransform:()=>Promise.resolve()};class Os extends Se{constructor(){super(),R(this,"localDescription",null),R(this,"remoteDescription",null),R(this,"currentLocalDescription",null),R(this,"currentRemoteDescription",null),R(this,"pendingLocalDescription",null),R(this,"pendingRemoteDescription",null),R(this,"signalingState","stable"),R(this,"iceConnectionState","new"),R(this,"iceGatheringState","new"),R(this,"connectionState","new"),R(this,"canTrickleIceCandidates",null),R(this,"sctp",null),R(this,"senders",[]),R(this,"receivers",[]),R(this,"transceivers",[]),R(this,"onicecandidate",null),R(this,"onicecandidateerror",null),R(this,"onconnectionstatechange",null),R(this,"oniceconnectionstatechange",null),R(this,"onicegatheringstatechange",null),R(this,"onsignalingstatechange",null),R(this,"onnegotiationneeded",null),R(this,"ontrack",null),R(this,"ondatachannel",null),R(this,"addEventListener"),R(this,"removeEventListener"),this.addEventListener=this.addListener,this.removeEventListener=this.removeListener}createOffer(){return Promise.resolve({sdp:xs,type:"offer"})}createAnswer(){return Promise.resolve({})}setLocalDescription(){return this.iceConnectionState="connected",this.iceGatheringState="complete",this.connectionState="connected",this.signalingState="stable",this.emit("iceconnectionstatechange"),Promise.resolve()}setRemoteDescription(){return Promise.resolve()}addIceCandidate(){return Promise.resolve()}getStats(){return Promise.resolve(new Map)}getConfiguration(){return{}}setConfiguration(){}close(){}createDataChannel(){return{close:()=>{},send:()=>{}}}addTrack(){return Lt}removeTrack(){}addTransceiver(){return{stop:()=>{},setDirection:()=>{},setCodecPreferences:()=>{},sender:Lt}}getTransceivers(){return[]}getSenders(){return[]}getReceivers(){return[]}restartIce(){}static generateCertificate(){return Promise.resolve({expires:Date.now(),getFingerprints:()=>[]})}}function Ss(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var pe={},Ns={get exports(){return pe},set exports(e){pe=e}};(function(e,t){(function(n,s){s(t)})(ce,function(n){var s=typeof window!="undefined"?window:typeof ce!="undefined"?ce:typeof self!="undefined"?self:{},r=function(i,c){if(c=c.split(":")[0],i=+i,!i)return!1;switch(c){case"http":case"ws":return i!==80;case"https":case"wss":return i!==443;case"ftp":return i!==21;case"gopher":return i!==70;case"file":return!1}return i!==0},o=Object.prototype.hasOwnProperty,l;function p(i){try{return decodeURIComponent(i.replace(/\+/g," "))}catch(c){return null}}function h(i){try{return encodeURIComponent(i)}catch(c){return null}}function T(i){for(var c=/([^=?#&]+)=?([^&]*)/g,d={},a;a=c.exec(i);){var m=p(a[1]),f=p(a[2]);m===null||f===null||m in d||(d[m]=f)}return d}function _(i,c){c=c||"";var d=[],a,m;typeof c!="string"&&(c="?");for(m in i)if(o.call(i,m)){if(a=i[m],!a&&(a===null||a===l||isNaN(a))&&(a=""),m=h(m),a=h(a),m===null||a===null)continue;d.push(m+"="+a)}return d.length?c+d.join("&"):""}var I=_,v=T,B={stringify:I,parse:v},F=/[\n\r\t]/g,De=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,z=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,oe=/^[a-zA-Z]:/,vn=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/;function Me(i){return(i||"").toString().replace(vn,"")}var Fe=[["#","hash"],["?","query"],function(i,c){return W(c.protocol)?i.replace(/\\/g,"/"):i},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],pt={hash:1,query:1};function mt(i){var c;typeof window!="undefined"?c=window:typeof s!="undefined"?c=s:typeof self!="undefined"?c=self:c={};var d=c.location||{};i=i||d;var a={},m=typeof i,f;if(i.protocol==="blob:")a=new K(unescape(i.pathname),{});else if(m==="string"){a=new K(i,{});for(f in pt)delete a[f]}else if(m==="object"){for(f in i)f in pt||(a[f]=i[f]);a.slashes===void 0&&(a.slashes=De.test(i.href))}return a}function W(i){return i==="file:"||i==="ftp:"||i==="http:"||i==="https:"||i==="ws:"||i==="wss:"}function ft(i,c){i=Me(i),i=i.replace(F,""),c=c||{};var d=z.exec(i),a=d[1]?d[1].toLowerCase():"",m=!!d[2],f=!!d[3],g=0,w;return m?f?(w=d[2]+d[3]+d[4],g=d[2].length+d[3].length):(w=d[2]+d[4],g=d[2].length):f?(w=d[3]+d[4],g=d[3].length):w=d[4],a==="file:"?g>=2&&(w=w.slice(2)):W(a)?w=d[4]:a?m&&(w=w.slice(2)):g>=2&&W(c.protocol)&&(w=d[4]),{protocol:a,slashes:m||W(a),slashesCount:g,rest:w}}function En(i,c){if(i==="")return c;for(var d=(c||"/").split("/").slice(0,-1).concat(i.split("/")),a=d.length,m=d[a-1],f=!1,g=0;a--;)d[a]==="."?d.splice(a,1):d[a]===".."?(d.splice(a,1),g++):g&&(a===0&&(f=!0),d.splice(a,1),g--);return f&&d.unshift(""),(m==="."||m==="..")&&d.push(""),d.join("/")}function K(i,c,d){if(i=Me(i),i=i.replace(F,""),!(this instanceof K))return new K(i,c,d);var a,m,f,g,w,b,A=Fe.slice(),wt=typeof c,y=this,We=0;for(wt!=="object"&&wt!=="string"&&(d=c,c=null),d&&typeof d!="function"&&(d=B.parse),c=mt(c),m=ft(i||"",c),a=!m.protocol&&!m.slashes,y.slashes=m.slashes||a&&c.slashes,y.protocol=m.protocol||c.protocol||"",i=m.rest,(m.protocol==="file:"&&(m.slashesCount!==2||oe.test(i))||!m.slashes&&(m.protocol||m.slashesCount<2||!W(y.protocol)))&&(A[3]=[/(.*)/,"pathname"]);We<A.length;We++){if(g=A[We],typeof g=="function"){i=g(i,y);continue}f=g[0],b=g[1],f!==f?y[b]=i:typeof f=="string"?(w=f==="@"?i.lastIndexOf(f):i.indexOf(f),~w&&(typeof g[2]=="number"?(y[b]=i.slice(0,w),i=i.slice(w+g[2])):(y[b]=i.slice(w),i=i.slice(0,w)))):(w=f.exec(i))&&(y[b]=w[1],i=i.slice(0,w.index)),y[b]=y[b]||a&&g[3]&&c[b]||"",g[4]&&(y[b]=y[b].toLowerCase())}d&&(y.query=d(y.query)),a&&c.slashes&&y.pathname.charAt(0)!=="/"&&(y.pathname!==""||c.pathname!=="")&&(y.pathname=En(y.pathname,c.pathname)),y.pathname.charAt(0)!=="/"&&W(y.protocol)&&(y.pathname="/"+y.pathname),r(y.port,y.protocol)||(y.host=y.hostname,y.port=""),y.username=y.password="",y.auth&&(w=y.auth.indexOf(":"),~w?(y.username=y.auth.slice(0,w),y.username=encodeURIComponent(decodeURIComponent(y.username)),y.password=y.auth.slice(w+1),y.password=encodeURIComponent(decodeURIComponent(y.password))):y.username=encodeURIComponent(decodeURIComponent(y.auth)),y.auth=y.password?y.username+":"+y.password:y.username),y.origin=y.protocol!=="file:"&&W(y.protocol)&&y.host?y.protocol+"//"+y.host:"null",y.href=y.toString()}function Rn(i,c,d){var a=this;switch(i){case"query":typeof c=="string"&&c.length&&(c=(d||B.parse)(c)),a[i]=c;break;case"port":a[i]=c,r(c,a.protocol)?c&&(a.host=a.hostname+":"+c):(a.host=a.hostname,a[i]="");break;case"hostname":a[i]=c,a.port&&(c+=":"+a.port),a.host=c;break;case"host":a[i]=c,/:\d+$/.test(c)?(c=c.split(":"),a.port=c.pop(),a.hostname=c.join(":")):(a.hostname=c,a.port="");break;case"protocol":a.protocol=c.toLowerCase(),a.slashes=!d;break;case"pathname":case"hash":if(c){var m=i==="pathname"?"/":"#";a[i]=c.charAt(0)!==m?m+c:c}else a[i]=c;break;case"username":case"password":a[i]=encodeURIComponent(c);break;case"auth":var f=c.indexOf(":");~f?(a.username=c.slice(0,f),a.username=encodeURIComponent(decodeURIComponent(a.username)),a.password=c.slice(f+1),a.password=encodeURIComponent(decodeURIComponent(a.password))):a.username=encodeURIComponent(decodeURIComponent(c))}for(var g=0;g<Fe.length;g++){var w=Fe[g];w[4]&&(a[w[1]]=a[w[1]].toLowerCase())}return a.auth=a.password?a.username+":"+a.password:a.username,a.origin=a.protocol!=="file:"&&W(a.protocol)&&a.host?a.protocol+"//"+a.host:"null",a.href=a.toString(),a}function xn(i){(!i||typeof i!="function")&&(i=B.stringify);var c,d=this,a=d.host,m=d.protocol;m&&m.charAt(m.length-1)!==":"&&(m+=":");var f=m+(d.protocol&&d.slashes||W(d.protocol)?"//":"");return d.username?(f+=d.username,d.password&&(f+=":"+d.password),f+="@"):d.password?(f+=":"+d.password,f+="@"):d.protocol!=="file:"&&W(d.protocol)&&!a&&d.pathname!=="/"&&(f+="@"),a[a.length-1]===":"&&(a+=":"),f+=a+d.pathname,c=typeof d.query=="object"?i(d.query):d.query,c&&(f+=c.charAt(0)!=="?"?"?"+c:c),d.hash&&(f+=d.hash),f}K.prototype={set:Rn,toString:xn},K.extractProtocol=ft,K.location=mt,K.trimLeft=Me,K.qs=B;var Ue=K;function ae(i,c){setTimeout(function(d){return i.call(d)},4,c)}function he(i,c){typeof process!="undefined"&&console[i].call(null,c)}function qe(i,c){i===void 0&&(i=[]);var d=[];return i.forEach(function(a){c(a)||d.push(a)}),d}function On(i,c){i===void 0&&(i=[]);var d=[];return i.forEach(function(a){c(a)&&d.push(a)}),d}var H=function(){this.listeners={}};H.prototype.addEventListener=function(i,c){typeof c=="function"&&(Array.isArray(this.listeners[i])||(this.listeners[i]=[]),On(this.listeners[i],function(d){return d===c}).length===0&&this.listeners[i].push(c))},H.prototype.removeEventListener=function(i,c){var d=this.listeners[i];this.listeners[i]=qe(d,function(a){return a===c})},H.prototype.dispatchEvent=function(i){for(var c=this,d=[],a=arguments.length-1;a-- >0;)d[a]=arguments[a+1];var m=i.type,f=this.listeners[m];return Array.isArray(f)?(f.forEach(function(g){d.length>0?g.apply(c,d):g.call(c,i)}),!0):!1};function $(i){var c=i.indexOf("?");return c>=0?i.slice(0,c):i}var Z=function(){this.urlMap={}};Z.prototype.attachWebSocket=function(i,c){var d=$(c),a=this.urlMap[d];if(a&&a.server&&a.websockets.indexOf(i)===-1)return a.websockets.push(i),a.server},Z.prototype.addMembershipToRoom=function(i,c){var d=this.urlMap[$(i.url)];d&&d.server&&d.websockets.indexOf(i)!==-1&&(d.roomMemberships[c]||(d.roomMemberships[c]=[]),d.roomMemberships[c].push(i))},Z.prototype.attachServer=function(i,c){var d=$(c),a=this.urlMap[d];if(!a)return this.urlMap[d]={server:i,websockets:[],roomMemberships:{}},i},Z.prototype.serverLookup=function(i){var c=$(i),d=this.urlMap[c];if(d)return d.server},Z.prototype.websocketsLookup=function(i,c,d){var a=$(i),m,f=this.urlMap[a];if(m=f?f.websockets:[],c){var g=f.roomMemberships[c];m=g||[]}return d?m.filter(function(w){return w!==d}):m},Z.prototype.removeServer=function(i){delete this.urlMap[$(i)]},Z.prototype.removeWebSocket=function(i,c){var d=$(c),a=this.urlMap[d];a&&(a.websockets=qe(a.websockets,function(m){return m===i}))},Z.prototype.removeMembershipFromRoom=function(i,c){var d=this.urlMap[$(i.url)],a=d.roomMemberships[c];d&&a!==null&&(d.roomMemberships[c]=qe(a,function(m){return m===i}))};var C=new Z,U={CLOSE_NORMAL:1e3,CLOSE_GOING_AWAY:1001,CLOSE_PROTOCOL_ERROR:1002,CLOSE_UNSUPPORTED:1003,CLOSE_NO_STATUS:1005,CLOSE_ABNORMAL:1006,UNSUPPORTED_DATA:1007,POLICY_VIOLATION:1008,CLOSE_TOO_LARGE:1009,MISSING_EXTENSION:1010,INTERNAL_ERROR:1011,SERVICE_RESTART:1012,TRY_AGAIN_LATER:1013,TLS_HANDSHAKE:1015},M={CONSTRUCTOR_ERROR:"Failed to construct 'WebSocket':",CLOSE_ERROR:"Failed to execute 'close' on 'WebSocket':",EVENT:{CONSTRUCT:"Failed to construct 'Event':",MESSAGE:"Failed to construct 'MessageEvent':",CLOSE:"Failed to construct 'CloseEvent':"}},Q=function(){};Q.prototype.stopPropagation=function(){},Q.prototype.stopImmediatePropagation=function(){},Q.prototype.initEvent=function(i,c,d){i===void 0&&(i="undefined"),c===void 0&&(c=!1),d===void 0&&(d=!1),this.type=""+i,this.bubbles=Boolean(c),this.cancelable=Boolean(d)};var Sn=function(i){function c(d,a){if(a===void 0&&(a={}),i.call(this),!d)throw new TypeError(M.EVENT_ERROR+" 1 argument required, but only 0 present.");if(typeof a!="object")throw new TypeError(M.EVENT_ERROR+" parameter 2 ('eventInitDict') is not an object.");var m=a.bubbles,f=a.cancelable;this.type=""+d,this.timeStamp=Date.now(),this.target=null,this.srcElement=null,this.returnValue=!0,this.isTrusted=!1,this.eventPhase=0,this.defaultPrevented=!1,this.currentTarget=null,this.cancelable=f?Boolean(f):!1,this.cancelBubble=!1,this.bubbles=m?Boolean(m):!1}return i&&(c.__proto__=i),c.prototype=Object.create(i&&i.prototype),c.prototype.constructor=c,c}(Q),Nn=function(i){function c(d,a){if(a===void 0&&(a={}),i.call(this),!d)throw new TypeError(M.EVENT.MESSAGE+" 1 argument required, but only 0 present.");if(typeof a!="object")throw new TypeError(M.EVENT.MESSAGE+" parameter 2 ('eventInitDict') is not an object");var m=a.bubbles,f=a.cancelable,g=a.data,w=a.origin,b=a.lastEventId,A=a.ports;this.type=""+d,this.timeStamp=Date.now(),this.target=null,this.srcElement=null,this.returnValue=!0,this.isTrusted=!1,this.eventPhase=0,this.defaultPrevented=!1,this.currentTarget=null,this.cancelable=f?Boolean(f):!1,this.canncelBubble=!1,this.bubbles=m?Boolean(m):!1,this.origin=""+w,this.ports=typeof A=="undefined"?null:A,this.data=typeof g=="undefined"?null:g,this.lastEventId=""+(b||"")}return i&&(c.__proto__=i),c.prototype=Object.create(i&&i.prototype),c.prototype.constructor=c,c}(Q),In=function(i){function c(d,a){if(a===void 0&&(a={}),i.call(this),!d)throw new TypeError(M.EVENT.CLOSE+" 1 argument required, but only 0 present.");if(typeof a!="object")throw new TypeError(M.EVENT.CLOSE+" parameter 2 ('eventInitDict') is not an object");var m=a.bubbles,f=a.cancelable,g=a.code,w=a.reason,b=a.wasClean;this.type=""+d,this.timeStamp=Date.now(),this.target=null,this.srcElement=null,this.returnValue=!0,this.isTrusted=!1,this.eventPhase=0,this.defaultPrevented=!1,this.currentTarget=null,this.cancelable=f?Boolean(f):!1,this.cancelBubble=!1,this.bubbles=m?Boolean(m):!1,this.code=typeof g=="number"?parseInt(g,10):0,this.reason=""+(w||""),this.wasClean=b?Boolean(b):!1}return i&&(c.__proto__=i),c.prototype=Object.create(i&&i.prototype),c.prototype.constructor=c,c}(Q);function q(i){var c=i.type,d=i.target,a=new Sn(c);return d&&(a.target=d,a.srcElement=d,a.currentTarget=d),a}function ie(i){var c=i.type,d=i.origin,a=i.data,m=i.target,f=new Nn(c,{data:a,origin:d});return m&&(f.target=m,f.srcElement=m,f.currentTarget=m),f}function V(i){var c=i.code,d=i.reason,a=i.type,m=i.target,f=i.wasClean;f||(f=c===U.CLOSE_NORMAL||c===U.CLOSE_NO_STATUS);var g=new In(a,{code:c,reason:d,wasClean:f});return m&&(g.target=m,g.srcElement=m,g.currentTarget=m),g}function ht(i,c,d){i.readyState=L.CLOSING;var a=C.serverLookup(i.url),m=V({type:"close",target:i.target,code:c,reason:d});ae(function(){C.removeWebSocket(i,i.url),i.readyState=L.CLOSED,i.dispatchEvent(m),a&&a.dispatchEvent(m,a)},i)}function Cn(i,c,d){i.readyState=L.CLOSING;var a=C.serverLookup(i.url),m=V({type:"close",target:i.target,code:c,reason:d,wasClean:!1}),f=q({type:"error",target:i.target});ae(function(){C.removeWebSocket(i,i.url),i.readyState=L.CLOSED,i.dispatchEvent(f),i.dispatchEvent(m),a&&a.dispatchEvent(m,a)},i)}function ke(i){return Object.prototype.toString.call(i)!=="[object Blob]"&&!(i instanceof ArrayBuffer)&&(i=String(i)),i}var Ve=new WeakMap;function kt(i){if(Ve.has(i))return Ve.get(i);var c=new Proxy(i,{get:function(d,a){if(a==="close")return function(f){f===void 0&&(f={});var g=f.code||U.CLOSE_NORMAL,w=f.reason||"";ht(c,g,w)};if(a==="send")return function(f){f=ke(f),i.dispatchEvent(ie({type:"message",data:f,origin:this.url,target:i}))};var m=function(f){return f==="message"?"server::"+f:f};return a==="on"?function(f,g){i.addEventListener(m(f),g)}:a==="off"?function(f,g){i.removeEventListener(m(f),g)}:a==="target"?i:d[a]}});return Ve.set(i,c),c}function Pn(i){var c=encodeURIComponent(i).match(/%[89ABab]/g);return i.length+(c?c.length:0)}function Ln(i){var c=new Ue(i),d=c.pathname,a=c.protocol,m=c.hash;if(!i)throw new TypeError(M.CONSTRUCTOR_ERROR+" 1 argument required, but only 0 present.");if(d||(c.pathname="/"),a==="")throw new SyntaxError(M.CONSTRUCTOR_ERROR+" The URL '"+c.toString()+"' is invalid.");if(a!=="ws:"&&a!=="wss:")throw new SyntaxError(M.CONSTRUCTOR_ERROR+" The URL's scheme must be either 'ws' or 'wss'. '"+a+"' is not allowed.");if(m!=="")throw new SyntaxError(M.CONSTRUCTOR_ERROR+" The URL contains a fragment identifier ('"+m+"'). Fragment identifiers are not allowed in WebSocket URLs.");return c.toString()}function An(i){if(i===void 0&&(i=[]),!Array.isArray(i)&&typeof i!="string")throw new SyntaxError(M.CONSTRUCTOR_ERROR+" The subprotocol '"+i.toString()+"' is invalid.");typeof i=="string"&&(i=[i]);var c=i.map(function(a){return{count:1,protocol:a}}).reduce(function(a,m){return a[m.protocol]=(a[m.protocol]||0)+m.count,a},{}),d=Object.keys(c).filter(function(a){return c[a]>1});if(d.length>0)throw new SyntaxError(M.CONSTRUCTOR_ERROR+" The subprotocol '"+d[0]+"' is duplicated.");return i}var L=function(i){function c(a,m){i.call(this),this._onopen=null,this._onmessage=null,this._onerror=null,this._onclose=null,this.url=Ln(a),m=An(m),this.protocol=m[0]||"",this.binaryType="blob",this.readyState=c.CONNECTING;var f=kt(this),g=C.attachWebSocket(f,this.url);ae(function(){if(this.readyState===c.CONNECTING)if(g)if(g.options.verifyClient&&typeof g.options.verifyClient=="function"&&!g.options.verifyClient())this.readyState=c.CLOSED,he("error","WebSocket connection to '"+this.url+"' failed: HTTP Authentication failed; no valid credentials available"),C.removeWebSocket(f,this.url),this.dispatchEvent(q({type:"error",target:this})),this.dispatchEvent(V({type:"close",target:this,code:U.CLOSE_NORMAL}));else{if(g.options.selectProtocol&&typeof g.options.selectProtocol=="function"){var w=g.options.selectProtocol(m),b=w!=="",A=m.indexOf(w)!==-1;if(b&&!A){this.readyState=c.CLOSED,he("error","WebSocket connection to '"+this.url+"' failed: Invalid Sub-Protocol"),C.removeWebSocket(f,this.url),this.dispatchEvent(q({type:"error",target:this})),this.dispatchEvent(V({type:"close",target:this,code:U.CLOSE_NORMAL}));return}this.protocol=w}this.readyState=c.OPEN,this.dispatchEvent(q({type:"open",target:this})),g.dispatchEvent(q({type:"connection"}),f)}else this.readyState=c.CLOSED,this.dispatchEvent(q({type:"error",target:this})),this.dispatchEvent(V({type:"close",target:this,code:U.CLOSE_NORMAL})),he("error","WebSocket connection to '"+this.url+"' failed")},this)}i&&(c.__proto__=i),c.prototype=Object.create(i&&i.prototype),c.prototype.constructor=c;var d={onopen:{},onmessage:{},onclose:{},onerror:{}};return d.onopen.get=function(){return this._onopen},d.onmessage.get=function(){return this._onmessage},d.onclose.get=function(){return this._onclose},d.onerror.get=function(){return this._onerror},d.onopen.set=function(a){this.removeEventListener("open",this._onopen),this._onopen=a,this.addEventListener("open",a)},d.onmessage.set=function(a){this.removeEventListener("message",this._onmessage),this._onmessage=a,this.addEventListener("message",a)},d.onclose.set=function(a){this.removeEventListener("close",this._onclose),this._onclose=a,this.addEventListener("close",a)},d.onerror.set=function(a){this.removeEventListener("error",this._onerror),this._onerror=a,this.addEventListener("error",a)},c.prototype.send=function(a){var m=this;if(this.readyState===c.CONNECTING)throw new Error("Failed to execute 'send' on 'WebSocket': Still in CONNECTING state");var f=ie({type:"server::message",origin:this.url,data:ke(a)}),g=C.serverLookup(this.url);g&&ae(function(){m.dispatchEvent(f,a)},g)},c.prototype.close=function(a,m){if(a!==void 0&&(typeof a!="number"||a!==1e3&&(a<3e3||a>4999)))throw new TypeError(M.CLOSE_ERROR+" The code must be either 1000, or between 3000 and 4999. "+a+" is neither.");if(m!==void 0){var f=Pn(m);if(f>123)throw new SyntaxError(M.CLOSE_ERROR+" The message must not be greater than 123 bytes.")}if(!(this.readyState===c.CLOSING||this.readyState===c.CLOSED)){var g=kt(this);this.readyState===c.CONNECTING?Cn(g,a||U.CLOSE_ABNORMAL,m):ht(g,a||U.CLOSE_NO_STATUS,m)}},Object.defineProperties(c.prototype,d),c}(H);L.CONNECTING=0,L.prototype.CONNECTING=L.CONNECTING,L.OPEN=1,L.prototype.OPEN=L.OPEN,L.CLOSING=2,L.prototype.CLOSING=L.CLOSING,L.CLOSED=3,L.prototype.CLOSED=L.CLOSED;var ee=function(i){function c(a,m){var f=this;a===void 0&&(a="socket.io"),m===void 0&&(m=""),i.call(this),this.binaryType="blob";var g=new Ue(a);g.pathname||(g.pathname="/"),this.url=g.toString(),this.readyState=c.CONNECTING,this.protocol="",this.target=this,typeof m=="string"||typeof m=="object"&&m!==null?this.protocol=m:Array.isArray(m)&&m.length>0&&(this.protocol=m[0]);var w=C.attachWebSocket(this,this.url);ae(function(){w?(this.readyState=c.OPEN,w.dispatchEvent(q({type:"connection"}),w,this),w.dispatchEvent(q({type:"connect"}),w,this),this.dispatchEvent(q({type:"connect",target:this}))):(this.readyState=c.CLOSED,this.dispatchEvent(q({type:"error",target:this})),this.dispatchEvent(V({type:"close",target:this,code:U.CLOSE_NORMAL})),he("error","Socket.io connection to '"+this.url+"' failed"))},this),this.addEventListener("close",function(b){f.dispatchEvent(V({type:"disconnect",target:b.target,code:b.code}))})}i&&(c.__proto__=i),c.prototype=Object.create(i&&i.prototype),c.prototype.constructor=c;var d={broadcast:{}};return c.prototype.close=function(){if(this.readyState===c.OPEN){var a=C.serverLookup(this.url);return C.removeWebSocket(this,this.url),this.readyState=c.CLOSED,this.dispatchEvent(V({type:"close",target:this,code:U.CLOSE_NORMAL})),a&&a.dispatchEvent(V({type:"disconnect",target:this,code:U.CLOSE_NORMAL}),a),this}},c.prototype.disconnect=function(){return this.close()},c.prototype.emit=function(a){for(var m=[],f=arguments.length-1;f-- >0;)m[f]=arguments[f+1];if(this.readyState!==c.OPEN)throw new Error("SocketIO is already in CLOSING or CLOSED state");var g=ie({type:a,origin:this.url,data:m}),w=C.serverLookup(this.url);return w&&w.dispatchEvent.apply(w,[g].concat(m)),this},c.prototype.send=function(a){return this.emit("message",a),this},d.broadcast.get=function(){if(this.readyState!==c.OPEN)throw new Error("SocketIO is already in CLOSING or CLOSED state");var a=this,m=C.serverLookup(this.url);if(!m)throw new Error("SocketIO can not find a server at the specified URL ("+this.url+")");return{emit:function(f,g){return m.emit(f,g,{websockets:C.websocketsLookup(a.url,null,a)}),a},to:function(f){return m.to(f,a)},in:function(f){return m.in(f,a)}}},c.prototype.on=function(a,m){return this.addEventListener(a,m),this},c.prototype.off=function(a,m){this.removeEventListener(a,m)},c.prototype.hasListeners=function(a){var m=this.listeners[a];return Array.isArray(m)?!!m.length:!1},c.prototype.join=function(a){C.addMembershipToRoom(this,a)},c.prototype.leave=function(a){C.removeMembershipFromRoom(this,a)},c.prototype.to=function(a){return this.broadcast.to(a)},c.prototype.in=function(){return this.to.apply(null,arguments)},c.prototype.dispatchEvent=function(a){for(var m=this,f=[],g=arguments.length-1;g-- >0;)f[g]=arguments[g+1];var w=a.type,b=this.listeners[w];if(!Array.isArray(b))return!1;b.forEach(function(A){f.length>0?A.apply(m,f):A.call(m,a.data?a.data:a)})},Object.defineProperties(c.prototype,d),c}(H);ee.CONNECTING=0,ee.OPEN=1,ee.CLOSING=2,ee.CLOSED=3;var Ge=function(i,c){return new ee(i,c)};Ge.connect=function(i,c){return Ge(i,c)};var Bn=function(i){return i.reduce(function(c,d){return c.indexOf(d)>-1?c:c.concat(d)},[])};function gt(){return typeof window!="undefined"?window:typeof process=="object"&&typeof Ss=="function"&&typeof ce=="object"?ce:this}var Tt={mock:!0,verifyClient:null,selectProtocol:null},je=function(i){function c(d,a){a===void 0&&(a=Tt),i.call(this);var m=new Ue(d);m.pathname||(m.pathname="/"),this.url=m.toString(),this.originalWebSocket=null;var f=C.attachServer(this,this.url);if(!f)throw this.dispatchEvent(q({type:"error"})),new Error("A mock server is already listening on this url");this.options=Object.assign({},Tt,a),this.options.mock&&this.mockWebsocket()}return i&&(c.__proto__=i),c.prototype=Object.create(i&&i.prototype),c.prototype.constructor=c,c.prototype.mockWebsocket=function(){var d=gt();this.originalWebSocket=d.WebSocket,d.WebSocket=L},c.prototype.restoreWebsocket=function(){var d=gt();this.originalWebSocket!==null&&(d.WebSocket=this.originalWebSocket),this.originalWebSocket=null},c.prototype.stop=function(d){d===void 0&&(d=function(){}),this.options.mock&&this.restoreWebsocket(),C.removeServer(this.url),typeof d=="function"&&d()},c.prototype.on=function(d,a){this.addEventListener(d,a)},c.prototype.off=function(d,a){this.removeEventListener(d,a)},c.prototype.close=function(d){d===void 0&&(d={});var a=d.code,m=d.reason,f=d.wasClean,g=C.websocketsLookup(this.url);C.removeServer(this.url),g.forEach(function(w){w.readyState=L.CLOSED,w.dispatchEvent(V({type:"close",target:w.target,code:a||U.CLOSE_NORMAL,reason:m||"",wasClean:f}))}),this.dispatchEvent(V({type:"close"}),this)},c.prototype.emit=function(d,a,m){var f=this;m===void 0&&(m={});var g=m.websockets;g||(g=C.websocketsLookup(this.url));var w;typeof m!="object"||arguments.length>3?(a=Array.prototype.slice.call(arguments,1,arguments.length),w=a.map(function(b){return ke(b)})):w=ke(a),g.forEach(function(b){var A=b instanceof ee?a:w;Array.isArray(A)?b.dispatchEvent.apply(b,[ie({type:d,data:A,origin:f.url,target:b.target})].concat(A)):b.dispatchEvent(ie({type:d,data:A,origin:f.url,target:b.target}))})},c.prototype.clients=function(){return C.websocketsLookup(this.url)},c.prototype.to=function(d,a,m){var f=this;m===void 0&&(m=[]);var g=this,w=Bn(m.concat(C.websocketsLookup(this.url,d,a)));return{to:function(b,A){return f.to.call(f,b,A,w)},emit:function(b,A){g.emit(b,A,{websockets:w})}}},c.prototype.in=function(){for(var d=[],a=arguments.length;a--;)d[a]=arguments[a];return this.to.apply(null,d)},c.prototype.simulate=function(d){var a=C.websocketsLookup(this.url);d==="error"&&a.forEach(function(m){m.readyState=L.CLOSED,m.dispatchEvent(q({type:"error",target:m.target}))})},c}(H);je.of=function(i){return new je(i)};var Dn=je,Mn=L,Fn=Ge;n.Server=Dn,n.WebSocket=Mn,n.SocketIO=Fn,Object.defineProperty(n,"__esModule",{value:!0})})})(Ns,pe);var He={},Is={get exports(){return He},set exports(e){He=e}},se=typeof Reflect=="object"?Reflect:null,At=se&&typeof se.apply=="function"?se.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},ve;se&&typeof se.ownKeys=="function"?ve=se.ownKeys:Object.getOwnPropertySymbols?ve=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:ve=function(e){return Object.getOwnPropertyNames(e)};function Cs(e){console&&console.warn&&console.warn(e)}var sn=Number.isNaN||function(e){return e!==e};function O(){O.init.call(this)}Is.exports=O;He.once=Bs;O.EventEmitter=O;O.prototype._events=void 0;O.prototype._eventsCount=0;O.prototype._maxListeners=void 0;var Bt=10;function Ae(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(O,"defaultMaxListeners",{enumerable:!0,get:function(){return Bt},set:function(e){if(typeof e!="number"||e<0||sn(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");Bt=e}});O.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};O.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||sn(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function rn(e){return e._maxListeners===void 0?O.defaultMaxListeners:e._maxListeners}O.prototype.getMaxListeners=function(){return rn(this)};O.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var s=e==="error",r=this._events;if(r!==void 0)s=s&&r.error===void 0;else if(!s)return!1;if(s){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var l=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw l.context=o,l}var p=r[e];if(p===void 0)return!1;if(typeof p=="function")At(p,this,t);else for(var h=p.length,T=ln(p,h),n=0;n<h;++n)At(T[n],this,t);return!0};function on(e,t,n,s){var r,o,l;if(Ae(n),o=e._events,o===void 0?(o=e._events=Object.create(null),e._eventsCount=0):(o.newListener!==void 0&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),l=o[t]),l===void 0)l=o[t]=n,++e._eventsCount;else if(typeof l=="function"?l=o[t]=s?[n,l]:[l,n]:s?l.unshift(n):l.push(n),r=rn(e),r>0&&l.length>r&&!l.warned){l.warned=!0;var p=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");p.name="MaxListenersExceededWarning",p.emitter=e,p.type=t,p.count=l.length,Cs(p)}return e}O.prototype.addListener=function(e,t){return on(this,e,t,!1)};O.prototype.on=O.prototype.addListener;O.prototype.prependListener=function(e,t){return on(this,e,t,!0)};function Ps(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function an(e,t,n){var s={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},r=Ps.bind(s);return r.listener=n,s.wrapFn=r,r}O.prototype.once=function(e,t){return Ae(t),this.on(e,an(this,e,t)),this};O.prototype.prependOnceListener=function(e,t){return Ae(t),this.prependListener(e,an(this,e,t)),this};O.prototype.removeListener=function(e,t){var n,s,r,o,l;if(Ae(t),s=this._events,s===void 0)return this;if(n=s[e],n===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete s[e],s.removeListener&&this.emit("removeListener",e,n.listener||t));else if(typeof n!="function"){for(r=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){l=n[o].listener,r=o;break}if(r<0)return this;r===0?n.shift():Ls(n,r),n.length===1&&(s[e]=n[0]),s.removeListener!==void 0&&this.emit("removeListener",e,l||t)}return this};O.prototype.off=O.prototype.removeListener;O.prototype.removeAllListeners=function(e){var t,n,s;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var r=Object.keys(n),o;for(s=0;s<r.length;++s)o=r[s],o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(t=n[e],typeof t=="function")this.removeListener(e,t);else if(t!==void 0)for(s=t.length-1;s>=0;s--)this.removeListener(e,t[s]);return this};function cn(e,t,n){var s=e._events;if(s===void 0)return[];var r=s[t];return r===void 0?[]:typeof r=="function"?n?[r.listener||r]:[r]:n?As(r):ln(r,r.length)}O.prototype.listeners=function(e){return cn(this,e,!0)};O.prototype.rawListeners=function(e){return cn(this,e,!1)};O.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):un.call(e,t)};O.prototype.listenerCount=un;function un(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}O.prototype.eventNames=function(){return this._eventsCount>0?ve(this._events):[]};function ln(e,t){for(var n=new Array(t),s=0;s<t;++s)n[s]=e[s];return n}function Ls(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function As(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function Bs(e,t){return new Promise(function(n,s){function r(l){e.removeListener(t,o),s(l)}function o(){typeof e.removeListener=="function"&&e.removeListener("error",r),n([].slice.call(arguments))}dn(e,t,o,{once:!0}),t!=="error"&&Ds(e,r,{once:!0})})}function Ds(e,t,n){typeof e.on=="function"&&dn(e,"error",t,n)}function dn(e,t,n,s){if(typeof e.on=="function")s.once?e.once(t,n):e.on(t,n);else if(typeof e.addEventListener=="function")e.addEventListener(t,function r(o){s.once&&e.removeEventListener(t,r),n(o)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}class Ms extends u{constructor(){super("message.v1.SocketMessage",[{no:1,name:"event",kind:"scalar",T:13},{no:2,name:"id",kind:"scalar",opt:!0,T:9},{no:3,name:"payload",kind:"scalar",opt:!0,T:12},{no:4,name:"metadata",kind:"scalar",opt:!0,T:12}])}}const Dt=new Ms;var Ne;(function(e){e[e.PUBLISHER=0]="PUBLISHER",e[e.SUBSCRIBER=1]="SUBSCRIBER"})(Ne||(Ne={}));var Qe;(function(e){e[e.AUDIO=0]="AUDIO",e[e.VIDEO=1]="VIDEO"})(Qe||(Qe={}));class Fs extends u{constructor(){super("media.Codec",[{no:1,name:"channels",kind:"scalar",opt:!0,T:5},{no:2,name:"clock_rate",kind:"scalar",T:5},{no:3,name:"mime_type",kind:"scalar",T:9},{no:4,name:"sdp_fmtp_line",kind:"scalar",opt:!0,T:9},{no:5,name:"payload_type",kind:"scalar",opt:!0,T:13}])}}const pn=new Fs;class Us extends u{constructor(){super("media.HeaderExtension",[{no:1,name:"direction",kind:"scalar",opt:!0,T:9},{no:2,name:"uri",kind:"scalar",T:9}])}}const qs=new Us;class Vs extends u{constructor(){super("media.Fingerprint",[{no:1,name:"algorithm",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9}])}}new Vs;class Gs extends u{constructor(){super("media.SessionDescription",[{no:1,name:"target",kind:"enum",T:()=>["media.Target",Ne]},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"sdp",kind:"scalar",T:9}])}}const j=new Gs;class js extends u{constructor(){super("media.ProducerPayload",[{no:1,name:"kind",kind:"scalar",T:9},{no:2,name:"paused",kind:"scalar",T:8},{no:3,name:"screen_share",kind:"scalar",T:8},{no:4,name:"msid",kind:"scalar",T:9},{no:5,name:"app_data",kind:"scalar",opt:!0,T:9},{no:6,name:"mime_type",kind:"scalar",opt:!0,T:9}])}}const Ws=new js;class Ks extends u{constructor(){super("media.CreateTransportRequest",[{no:1,name:"consuming",kind:"scalar",T:8},{no:2,name:"force_tcp",kind:"scalar",opt:!0,T:8},{no:3,name:"description",kind:"message",T:()=>j},{no:4,name:"private_ice",kind:"scalar",opt:!0,T:8},{no:5,name:"producers",kind:"message",repeat:1,T:()=>Ws}])}}new Ks;class Js extends u{constructor(){super("media.AudioActivityRequest",[{no:1,name:"producer_id",kind:"scalar",T:9},{no:2,name:"energy",kind:"scalar",T:5},{no:3,name:"silent",kind:"scalar",T:8}])}}new Js;class Zs extends u{constructor(){super("media.CreateTransportResponse",[{no:1,name:"transport_id",kind:"scalar",T:9},{no:2,name:"description",kind:"message",T:()=>j},{no:3,name:"transcription_enabled",kind:"scalar",opt:!0,T:8},{no:4,name:"producer_ids",kind:"scalar",repeat:2,T:9}])}}const mn=new Zs;class Xs extends u{constructor(){super("media.RenegotiateRequest",[{no:1,name:"transport_id",kind:"scalar",T:9},{no:2,name:"description",kind:"message",T:()=>j}])}}new Xs;class $s extends u{constructor(){super("media.RenegotiateResponse",[{no:1,name:"transport_id",kind:"scalar",T:9},{no:2,name:"description",kind:"message",T:()=>j}])}}new $s;class Ys extends u{constructor(){super("media.NestedScore",[{no:1,name:"encoding_idx",kind:"scalar",T:5},{no:2,name:"rid",kind:"scalar",T:9},{no:3,name:"score",kind:"scalar",T:5},{no:4,name:"ssrc",kind:"scalar",T:3,L:0}])}}const zs=new Ys;class Hs extends u{constructor(){super("media.ProducerTrack",[{no:1,name:"track_id",kind:"scalar",T:9},{no:2,name:"producer_id",kind:"scalar",T:9},{no:3,name:"stream_id",kind:"scalar",T:9}])}}const Qs=new Hs;class er extends u{constructor(){super("media.ProducerEntry",[{no:1,name:"producing_transport_id",kind:"scalar",T:9},{no:2,name:"producer_id",kind:"scalar",T:9}])}}new er;class tr extends u{constructor(){super("media.ConsumerEntry",[{no:1,name:"consuming_transport_id",kind:"scalar",T:9},{no:2,name:"consumer_id",kind:"scalar",T:9}])}}new tr;class nr extends u{constructor(){super("media.ProducerState",[{no:1,name:"producer_id",kind:"scalar",T:9},{no:2,name:"kind",kind:"enum",T:()=>["media.ProducerKind",Qe]},{no:3,name:"pause",kind:"scalar",T:8},{no:4,name:"screen_share",kind:"scalar",T:8},{no:5,name:"app_data",kind:"scalar",opt:!0,T:9},{no:6,name:"producing_transport_id",kind:"scalar",opt:!0,T:9},{no:7,name:"mime_type",kind:"scalar",opt:!0,T:9},{no:8,name:"codec",kind:"message",T:()=>pn}])}}const fe=new nr;class sr extends u{constructor(){super("media.ConsumerState",[{no:1,name:"consumer_id",kind:"scalar",T:9},{no:2,name:"producer_state",kind:"message",T:()=>fe},{no:3,name:"producer_track",kind:"message",T:()=>Qs},{no:4,name:"error_code",kind:"scalar",opt:!0,T:9}])}}const rr=new sr;class or extends u{constructor(){super("media.ProducerIdToConsumerMap",[{no:1,name:"map",kind:"map",K:9,V:{kind:"message",T:()=>rr}}])}}const fn=new or;class ar extends u{constructor(){super("media.PeerRtpCapabilitites",[{no:1,name:"sender",kind:"message",T:()=>Ft},{no:2,name:"receiver",kind:"message",T:()=>Ft}])}}const hn=new ar;class ir extends u{constructor(){super("media.RtpCapability",[{no:1,name:"codecs",kind:"message",repeat:1,T:()=>pn},{no:2,name:"header_extensions",kind:"message",repeat:1,T:()=>qs}])}}const Mt=new ir;class cr extends u{constructor(){super("media.RtpCapabilitites",[{no:1,name:"audio",kind:"message",T:()=>Mt},{no:2,name:"video",kind:"message",T:()=>Mt}])}}const Ft=new cr;class ur extends u{constructor(){super("media.PreferredCodec",[{no:1,name:"audio",kind:"scalar",opt:!0,T:9},{no:2,name:"video",kind:"scalar",opt:!0,T:9}])}}const lr=new ur;class dr extends u{constructor(){super("media.edge.GeoLocation",[{no:1,name:"latitude",kind:"scalar",T:2},{no:2,name:"longitude",kind:"scalar",T:2},{no:3,name:"region",kind:"scalar",opt:!0,T:9}])}}const pr=new dr;class mr extends u{constructor(){super("media.edge.PeerJoinRequest",[{no:1,name:"display_name",kind:"scalar",opt:!0,T:9},{no:2,name:"prejoined",kind:"scalar",T:8},{no:3,name:"room_uuid",kind:"scalar",T:9},{no:4,name:"meeting_id",kind:"scalar",opt:!0,T:9},{no:5,name:"preset",kind:"scalar",opt:!0,T:12},{no:6,name:"user_id",kind:"scalar",opt:!0,T:9},{no:7,name:"organization_id",kind:"scalar",opt:!0,T:9},{no:8,name:"location",kind:"message",T:()=>pr},{no:9,name:"capabilities",kind:"message",T:()=>hn}])}}new mr;class fr extends u{constructor(){super("media.edge.PeerJoinCompleteRequest",[])}}new fr;class hr extends u{constructor(){super("media.edge.PeerLeaveRequest",[{no:1,name:"close_room",kind:"scalar",T:8}])}}new hr;class kr extends u{constructor(){super("media.edge.ConsumeMultipleProducerRequest",[{no:1,name:"producer_ids",kind:"scalar",repeat:2,T:9},{no:2,name:"paused",kind:"scalar",opt:!0,T:8}])}}new kr;class gr extends u{constructor(){super("media.edge.ConsumePeerRequest",[{no:1,name:"producing_peer_id",kind:"scalar",T:9},{no:2,name:"paused",kind:"scalar",opt:!0,T:8},{no:3,name:"producer_id",kind:"scalar",opt:!0,T:9},{no:4,name:"preferred_codec",kind:"message",T:()=>lr},{no:5,name:"producing_transport_id",kind:"scalar",opt:!0,T:9}])}}const Tr=new gr;class wr extends u{constructor(){super("media.edge.ConsumePeersRequest",[{no:1,name:"requests",kind:"message",repeat:1,T:()=>Tr},{no:2,name:"consuming_transport_id",kind:"scalar",opt:!0,T:9}])}}new wr;class yr extends u{constructor(){super("media.edge.ProducerCreateRequest",[{no:1,name:"kind",kind:"scalar",T:9},{no:2,name:"paused",kind:"scalar",T:8},{no:3,name:"screen_share",kind:"scalar",T:8},{no:4,name:"description",kind:"message",T:()=>j},{no:5,name:"msid",kind:"scalar",T:9},{no:6,name:"app_data",kind:"scalar",opt:!0,T:9},{no:7,name:"mime_type",kind:"scalar",opt:!0,T:9},{no:8,name:"producing_transport_id",kind:"scalar",opt:!0,T:9}])}}new yr;class br extends u{constructor(){super("media.edge.SelectedPeersRequest",[])}}new br;class _r extends u{constructor(){super("media.edge.GlobalPeerPinningRequest",[{no:1,name:"participant_id",kind:"scalar",T:9}])}}new _r;class vr extends u{constructor(){super("media.edge.ProducerToggleRequest",[{no:1,name:"producer_id",kind:"scalar",T:9},{no:2,name:"pause",kind:"scalar",T:8}])}}new vr;class Er extends u{constructor(){super("media.edge.ConsumerToggleRequest",[{no:1,name:"consumer_id",kind:"scalar",T:9},{no:2,name:"pause",kind:"scalar",T:8}])}}new Er;class Rr extends u{constructor(){super("media.edge.ProducerCloseRequest",[{no:1,name:"producer_id",kind:"scalar",T:9},{no:2,name:"description",kind:"message",T:()=>j},{no:3,name:"producing_transport_id",kind:"scalar",opt:!0,T:9}])}}new Rr;class xr extends u{constructor(){super("media.edge.ConsumerCloseRequest",[{no:1,name:"consumer_ids",kind:"scalar",repeat:2,T:9},{no:2,name:"description",kind:"message",T:()=>j},{no:3,name:"consuming_transport_id",kind:"scalar",opt:!0,T:9}])}}new xr;class Or extends u{constructor(){super("media.edge.KickPeerRequest",[{no:1,name:"participant_id",kind:"scalar",T:9}])}}new Or;class Sr extends u{constructor(){super("media.edge.KickAllPeersRequest",[{no:1,name:"propagate_kick_across_rooms",kind:"scalar",T:8}])}}new Sr;class Nr extends u{constructor(){super("media.edge.PeerDisplayNameEditRequest",[{no:1,name:"participant_id",kind:"scalar",T:9},{no:2,name:"display_name",kind:"scalar",T:9}])}}new Nr;class Ir extends u{constructor(){super("media.edge.HostMediaControlForPeerRequest",[{no:1,name:"participant_id",kind:"scalar",T:9},{no:2,name:"audio",kind:"scalar",T:8},{no:3,name:"video",kind:"scalar",T:8},{no:4,name:"scree_share",kind:"scalar",T:8}])}}new Ir;class Cr extends u{constructor(){super("media.edge.HostMediaControlForAllPeerRequest",[{no:1,name:"audio",kind:"scalar",T:8},{no:2,name:"video",kind:"scalar",T:8},{no:3,name:"screen_share",kind:"scalar",T:8}])}}new Cr;class Pr extends u{constructor(){super("media.edge.GetRoomStateResponse",[{no:1,name:"display_title",kind:"scalar",T:9},{no:2,name:"locked_mode",kind:"scalar",T:8},{no:3,name:"room_uuid",kind:"scalar",T:9},{no:4,name:"room_name",kind:"scalar",T:9},{no:5,name:"current_peer_id",kind:"scalar",T:9},{no:6,name:"is_recording",kind:"scalar",opt:!0,T:8},{no:7,name:"recorder_participant_id",kind:"scalar",opt:!0,T:9},{no:8,name:"pinned_peer_ids",kind:"scalar",repeat:2,T:9}])}}const Lr=new Pr;class Ar extends u{constructor(){super("media.edge.ErrorResponse",[{no:1,name:"error_message",kind:"scalar",T:9},{no:2,name:"event_id",kind:"scalar",T:5}])}}new Ar;class Br extends u{constructor(){super("media.edge.EmptyResponse",[])}}new Br;class Dr extends u{constructor(){super("media.edge.RoomParticipants",[{no:1,name:"peer_id",kind:"scalar",T:9},{no:2,name:"producer_states",kind:"message",repeat:1,T:()=>fe},{no:3,name:"display_name",kind:"scalar",T:9},{no:4,name:"user_id",kind:"scalar",opt:!0,T:9},{no:5,name:"capabilities",kind:"message",T:()=>hn}])}}const kn=new Dr;class Mr extends u{constructor(){super("media.edge.SelectedPeersResponse",[{no:1,name:"audio_peers",kind:"scalar",repeat:2,T:9},{no:2,name:"compulsory_peers",kind:"scalar",repeat:2,T:9}])}}const Fr=new Mr;class Ur extends u{constructor(){super("media.edge.SelectedPeersDiffEntry",[{no:1,name:"peer_id",kind:"scalar",T:9},{no:2,name:"priority",kind:"scalar",T:5}])}}const qr=new Ur;class Vr extends u{constructor(){super("media.edge.SelectedPeersDiffResponse",[{no:1,name:"entries",kind:"message",repeat:1,T:()=>qr}])}}new Vr;class Gr extends u{constructor(){super("media.edge.PeerJoinResponse",[])}}new Gr;class jr extends u{constructor(){super("media.edge.PeerJoinCompleteResponse",[{no:1,name:"room_state",kind:"message",T:()=>Lr},{no:2,name:"participants",kind:"message",repeat:1,T:()=>kn},{no:3,name:"selected_peers",kind:"message",T:()=>Fr},{no:4,name:"max_preferred_streams",kind:"scalar",T:5}])}}const Wr=new jr;class Kr extends u{constructor(){super("media.edge.PeerLeaveResponse",[{no:1,name:"closed",kind:"scalar",T:8}])}}new Kr;class Jr extends u{constructor(){super("media.edge.ConsumeMultipleProducerResponse",[{no:1,name:"status",kind:"scalar",T:8},{no:2,name:"consumer_ids_map",kind:"message",T:()=>fn}])}}new Jr;class Zr extends u{constructor(){super("media.edge.ConsumePeerResponse",[{no:1,name:"status",kind:"scalar",T:8},{no:2,name:"consumer_ids_map",kind:"message",T:()=>fn},{no:3,name:"description",kind:"message",T:()=>j}])}}new Zr;class Xr extends u{constructor(){super("media.edge.ProducerCreateResponse",[{no:1,name:"status",kind:"scalar",T:8},{no:2,name:"producer_id",kind:"scalar",T:9},{no:4,name:"description",kind:"message",T:()=>j}])}}const $r=new Xr;class Yr extends u{constructor(){super("media.edge.ProducerScoreResponse",[{no:1,name:"responseid",kind:"scalar",T:9},{no:2,name:"score",kind:"message",T:()=>zs}])}}new Yr;class zr extends u{constructor(){super("media.edge.ActiveSpeakerResponse",[{no:1,name:"responsepeer_id",kind:"scalar",T:9},{no:2,name:"volume",kind:"scalar",T:5}])}}new zr;class Hr extends u{constructor(){super("media.edge.NoActiveSpeakerResponse",[])}}new Hr;class Qr extends u{constructor(){super("media.edge.ProducerToggleResponse",[])}}new Qr;class eo extends u{constructor(){super("media.edge.ConsumerToggleResponse",[])}}new eo;class to extends u{constructor(){super("media.edge.ProducerClosingResponse",[{no:1,name:"description",kind:"message",T:()=>j}])}}new to;class no extends u{constructor(){super("media.edge.ConsumerClosingResponse",[{no:1,name:"description",kind:"message",T:()=>j}])}}new no;class so extends u{constructor(){super("media.edge.GlobalPeerPinningResponse",[])}}new so;class ro extends u{constructor(){super("media.edge.KickPeerResponse",[{no:1,name:"status",kind:"scalar",T:9}])}}new ro;class oo extends u{constructor(){super("media.edge.KickAllPeersResponse",[{no:1,name:"status",kind:"scalar",T:9}])}}new oo;class ao extends u{constructor(){super("media.edge.HostMediaControlForPeerResponse",[{no:1,name:"status",kind:"scalar",T:9}])}}new ao;class io extends u{constructor(){super("media.edge.HostMediaControlForAllPeerResponse",[{no:1,name:"status",kind:"scalar",T:9}])}}new io;class co extends u{constructor(){super("media.edge.PeerDisplayNameEditResponse",[{no:1,name:"status",kind:"scalar",T:9}])}}new co;class uo extends u{constructor(){super("media.edge.PeerJoinBroadcastResponse",[{no:1,name:"participant",kind:"message",T:()=>kn}])}}new uo;class lo extends u{constructor(){super("media.edge.TrackSubscriptionKind",[{no:1,name:"audio",kind:"scalar",T:8},{no:2,name:"video",kind:"scalar",T:8}])}}const Ut=new lo;class po extends u{constructor(){super("media.edge.TrackSubscription",[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"webcam",kind:"message",T:()=>Ut},{no:3,name:"screenshare",kind:"message",T:()=>Ut}])}}const mo=new po;class fo extends u{constructor(){super("media.edge.PeerProducingTransportCreateBroadcastResponse",[{no:1,name:"participant_id",kind:"scalar",T:9},{no:2,name:"transport_details",kind:"message",T:()=>mn},{no:3,name:"track_subscriptions",kind:"message",repeat:1,T:()=>mo}])}}new fo;class ho extends u{constructor(){super("media.edge.PeerProducerCreateBroadcastResponse",[{no:1,name:"participant_id",kind:"scalar",T:9},{no:2,name:"producer_state",kind:"message",T:()=>fe}])}}new ho;class ko extends u{constructor(){super("media.edge.PeerProducerToggleBroadcastResponse",[{no:1,name:"participant_id",kind:"scalar",T:9},{no:2,name:"producer_state",kind:"message",T:()=>fe},{no:3,name:"initiator_participant_id",kind:"scalar",opt:!0,T:9}])}}new ko;class go extends u{constructor(){super("media.edge.PeerProducerCloseBroadcastResponse",[{no:1,name:"participant_id",kind:"scalar",T:9},{no:2,name:"producer_state",kind:"message",T:()=>fe}])}}new go;class To extends u{constructor(){super("media.edge.PeerLeaveBroadcastResponse",[{no:1,name:"participant_id",kind:"scalar",T:9}])}}new To;class wo extends u{constructor(){super("media.edge.GlobalPeerPinningBroadcastResponse",[{no:1,name:"participant_id",kind:"scalar",T:9}])}}new wo;class yo extends u{constructor(){super("media.edge.GlobalPeerUnPinningBroadcastResponse",[{no:1,name:"participant_id",kind:"scalar",T:9}])}}new yo;class bo extends u{constructor(){super("media.edge.RecordingStartedBroadcastResponse",[{no:1,name:"participant_id",kind:"scalar",T:9}])}}new bo;class _o extends u{constructor(){super("media.edge.RecordingStoppedBroadcastResponse",[{no:1,name:"participant_id",kind:"scalar",T:9}])}}new _o;class vo extends u{constructor(){super("media.edge.PeerDisplayNameEditBroadcastResponse",[{no:1,name:"participant_id",kind:"scalar",T:9},{no:2,name:"display_name",kind:"scalar",T:9}])}}new vo;class Eo extends u{constructor(){super("media.edge.PeerPingRequestBroadcastResponse",[{no:1,name:"password",kind:"scalar",T:9}])}}new Eo;class Ro extends u{constructor(){super("media.edge.MediaRoomTerminationBroadcastResponse",[{no:1,name:"reason",kind:"scalar",T:9}])}}new Ro;class xo extends u{constructor(){super("socket.ai.MeetingTranscript",[{no:1,name:"meeting_id",kind:"scalar",T:9},{no:2,name:"transcript",kind:"scalar",T:9},{no:3,name:"is_partial",kind:"scalar",T:8}])}}new xo;class Oo extends u{constructor(){super("socket.api.BaseSocketHubMessage",[{no:1,name:"event",kind:"scalar",T:5},{no:2,name:"id",kind:"scalar",T:9},{no:3,name:"peer_id",kind:"scalar",T:9},{no:4,name:"room_id",kind:"scalar",T:9},{no:5,name:"user_id",kind:"scalar",T:9},{no:6,name:"payload",kind:"scalar",T:12},{no:7,name:"error",kind:"scalar",opt:!0,T:8},{no:8,name:"sid",kind:"scalar",opt:!0,T:9}])}}new Oo;class So extends u{constructor(){super("socket.api.ErrorMessage",[{no:1,name:"code",kind:"scalar",opt:!0,T:5},{no:2,name:"message",kind:"scalar",T:9}])}}new So;var Ie;(function(e){e[e.BROWSER=0]="BROWSER",e[e.TRACK=1]="TRACK",e[e.COMPOSITE=2]="COMPOSITE"})(Ie||(Ie={}));var me;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.ON_STAGE=1]="ON_STAGE",e[e.APPROVED_STAGE=2]="APPROVED_STAGE",e[e.REQUESTED_STAGE=3]="REQUESTED_STAGE",e[e.OFF_STAGE=4]="OFF_STAGE"})(me||(me={}));var et;(function(e){e[e.NONE=0]="NONE",e[e.RECORDER=1]="RECORDER",e[e.LIVESTREAMER=2]="LIVESTREAMER"})(et||(et={}));var tt;(function(e){e[e.PEERS=0]="PEERS",e[e.ROOMS=1]="ROOMS"})(tt||(tt={}));var nt;(function(e){e[e.HIVE=0]="HIVE",e[e.CHAT=1]="CHAT",e[e.PING=2]="PING"})(nt||(nt={}));class No extends u{constructor(){super("socket.room.PeerFlags",[{no:1,name:"preset_name",kind:"scalar",T:9},{no:2,name:"recorder_type",kind:"scalar",T:9},{no:3,name:"hidden_participant",kind:"scalar",T:8}])}}const Io=new No;class Co extends u{constructor(){super("socket.room.Peer",[{no:1,name:"peer_id",kind:"scalar",T:9},{no:2,name:"user_id",kind:"scalar",T:9},{no:3,name:"display_name",kind:"scalar",T:9},{no:4,name:"stage_type",kind:"enum",opt:!0,T:()=>["socket.room.StageType",me,"STAGE_TYPE_"]},{no:5,name:"custom_participant_id",kind:"scalar",opt:!0,T:9},{no:6,name:"preset_id",kind:"scalar",opt:!0,T:9},{no:7,name:"display_picture_url",kind:"scalar",opt:!0,T:9},{no:8,name:"waitlisted",kind:"scalar",T:8},{no:9,name:"flags",kind:"message",T:()=>Io}])}}const Be=new Co;class Po extends u{constructor(){super("socket.room.PeerInfoResponse",[{no:1,name:"peer",kind:"message",T:()=>Be}])}}const qt=new Po;class Lo extends u{constructor(){super("socket.room.PeerStatusUpdate",[{no:1,name:"peer_id",kind:"scalar",T:9},{no:2,name:"user_id",kind:"scalar",T:9},{no:3,name:"stage_type",kind:"enum",opt:!0,T:()=>["socket.room.StageType",me,"STAGE_TYPE_"]}])}}new Lo;class Ao extends u{constructor(){super("socket.room.RoomPeersInfoRequest",[{no:1,name:"seach_query",kind:"scalar",T:9},{no:2,name:"limit",kind:"scalar",T:5},{no:3,name:"offset",kind:"scalar",T:5}])}}new Ao;class Bo extends u{constructor(){super("socket.room.RoomPeersInfoResponse",[{no:1,name:"peers",kind:"message",repeat:1,T:()=>Be}])}}const Do=new Bo;class Mo extends u{constructor(){super("socket.room.RoomPeerCountResponse",[{no:1,name:"count",kind:"scalar",T:4,L:2}])}}new Mo;class Fo extends u{constructor(){super("socket.room.Room",[{no:1,name:"room_id",kind:"scalar",T:9},{no:2,name:"title",kind:"scalar",T:9},{no:4,name:"created_at",kind:"scalar",T:4,L:2},{no:5,name:"active_recordings",kind:"message",repeat:1,T:()=>qo},{no:6,name:"room_uuid",kind:"scalar",opt:!0,T:9}])}}const gn=new Fo;class Uo extends u{constructor(){super("socket.room.ActiveRecording",[{no:1,name:"recording_id",kind:"scalar",T:9},{no:2,name:"recording_type",kind:"enum",T:()=>["common.RecordingType",Ie]},{no:3,name:"recording_status",kind:"scalar",T:9}])}}const qo=new Uo;class Vo extends u{constructor(){super("socket.room.RoomInfoResponse",[{no:1,name:"room",kind:"message",T:()=>gn}])}}const Go=new Vo;class jo extends u{constructor(){super("socket.room.GetPeerInfoRequest",[{no:1,name:"peer_id",kind:"scalar",T:9}])}}new jo;class Wo extends u{constructor(){super("socket.room.UpdatePeerInfoRequest",[{no:1,name:"peer_id",kind:"scalar",T:9},{no:2,name:"display_name",kind:"scalar",opt:!0,T:9}])}}new Wo;class Ko extends u{constructor(){super("socket.room.JoinRoomRequest",[{no:1,name:"peer",kind:"message",T:()=>Be},{no:3,name:"room_uuid",kind:"scalar",T:9},{no:4,name:"organization_id",kind:"scalar",opt:!0,T:9},{no:5,name:"use_hive",kind:"scalar",opt:!0,T:8},{no:6,name:"preset",kind:"scalar",opt:!0,T:12},{no:7,name:"capabilities",kind:"enum",repeat:1,T:()=>["socket.room.Capabilities",nt,"CAPABILITIES_"]},{no:8,name:"timestamp",kind:"scalar",opt:!0,T:4,L:2}])}}new Ko;class Jo extends u{constructor(){super("socket.room.LeaveRoomRequest",[{no:1,name:"peer",kind:"message",T:()=>Be},{no:2,name:"timestamp",kind:"scalar",opt:!0,T:4,L:2}])}}new Jo;class Zo extends u{constructor(){super("socket.room.UpdateRoomInfoRequest",[{no:1,name:"room",kind:"message",T:()=>gn}])}}new Zo;class Xo extends u{constructor(){super("socket.room.GetConnectedRoomsDumpRequest",[])}}new Xo;class $o extends u{constructor(){super("socket.room.ServiceError",[{no:1,name:"message",kind:"scalar",opt:!0,T:9},{no:2,name:"code",kind:"scalar",opt:!0,T:9}])}}const ut=new $o;class Yo extends u{constructor(){super("socket.room.ConnectedMeetingPeer",[{no:1,name:"id",kind:"scalar",opt:!0,T:9},{no:2,name:"display_name",kind:"scalar",opt:!0,T:9},{no:3,name:"custom_participant_id",kind:"scalar",opt:!0,T:9},{no:4,name:"preset_id",kind:"scalar",opt:!0,T:9},{no:5,name:"display_picture_url",kind:"scalar",opt:!0,T:9}])}}const zo=new Yo;class Ho extends u{constructor(){super("socket.room.ConnectedMeetingDump",[{no:1,name:"id",kind:"scalar",opt:!0,T:9},{no:2,name:"title",kind:"scalar",opt:!0,T:9},{no:3,name:"participants",kind:"message",repeat:1,T:()=>zo}])}}const Vt=new Ho;class Qo extends u{constructor(){super("socket.room.GetConnectedRoomsDumpResponse",[{no:1,name:"parent_meeting",kind:"message",T:()=>Vt},{no:2,name:"meetings",kind:"message",repeat:1,T:()=>Vt}])}}const ea=new Qo;class ta extends u{constructor(){super("socket.room.CreateRoomRequestPayload",[{no:1,name:"title",kind:"scalar",opt:!0,T:9}])}}const na=new ta;class sa extends u{constructor(){super("socket.room.CreateConnectedRoomsRequest",[{no:1,name:"payloads",kind:"message",repeat:1,T:()=>na}])}}new sa;class ra extends u{constructor(){super("socket.room.CreateRoomResponsePayload",[{no:1,name:"id",kind:"scalar",opt:!0,T:9},{no:2,name:"title",kind:"scalar",opt:!0,T:9},{no:3,name:"error",kind:"message",T:()=>ut}])}}const oa=new ra;class aa extends u{constructor(){super("socket.room.CreateConnectedRoomsResponse",[{no:1,name:"payloads",kind:"message",repeat:1,T:()=>oa}])}}new aa;class ia extends u{constructor(){super("socket.room.UpdateRoomRequestPayload",[{no:1,name:"meeting_id",kind:"scalar",opt:!0,T:9},{no:2,name:"title",kind:"scalar",opt:!0,T:9}])}}const ca=new ia;class ua extends u{constructor(){super("socket.room.UpdateConnectedRoomsRequest",[{no:1,name:"payloads",kind:"message",repeat:1,T:()=>ca}])}}new ua;class la extends u{constructor(){super("socket.room.DisableRoomPayload",[{no:1,name:"id",kind:"scalar",opt:!0,T:9}])}}const da=new la;class pa extends u{constructor(){super("socket.room.DisableConnectedRoomsRequest",[{no:1,name:"payloads",kind:"message",repeat:1,T:()=>da}])}}new pa;class ma extends u{constructor(){super("socket.room.DisableConnectedRoomsResponse",[{no:1,name:"payloads",kind:"message",repeat:1,T:()=>ha}])}}new ma;class fa extends u{constructor(){super("socket.room.DisableConnectedRoomPayload",[{no:1,name:"id",kind:"scalar",opt:!0,T:9},{no:2,name:"status",kind:"scalar",opt:!0,T:9},{no:3,name:"title",kind:"scalar",opt:!0,T:9},{no:4,name:"error",kind:"message",T:()=>ut}])}}const ha=new fa;class ka extends u{constructor(){super("socket.room.MovePeerPayload",[{no:1,name:"id",kind:"scalar",opt:!0,T:9},{no:2,name:"preset_id",kind:"scalar",opt:!0,T:9}])}}const ga=new ka;class Ta extends u{constructor(){super("socket.room.MovePeersBetweenRoomsRequest",[{no:1,name:"source_meeting_id",kind:"scalar",opt:!0,T:9},{no:2,name:"destination_meeting_id",kind:"scalar",opt:!0,T:9},{no:3,name:"participants",kind:"message",repeat:1,T:()=>ga}])}}new Ta;class wa extends u{constructor(){super("socket.room.MovedPeer",[{no:1,name:"meeting_id",kind:"scalar",opt:!0,T:9},{no:2,name:"custom_participant_id",kind:"scalar",opt:!0,T:9},{no:3,name:"error",kind:"message",T:()=>ut}])}}const ya=new wa;class ba extends u{constructor(){super("socket.room.MovePeersBetweenRoomsResponse",[{no:1,name:"payloads",kind:"message",repeat:1,T:()=>ya}])}}new ba;class _a extends u{constructor(){super("socket.room.TransferPeer",[{no:1,name:"meeting_id",kind:"scalar",opt:!0,T:9},{no:2,name:"auth_token",kind:"scalar",opt:!0,T:9}])}}new _a;class va extends u{constructor(){super("socket.room.GetAllAddedParticipantsResponse",[{no:1,name:"participants",kind:"message",repeat:1,T:()=>Ra}])}}new va;class Ea extends u{constructor(){super("socket.room.AddedParticipant",[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",opt:!0,T:9},{no:3,name:"picture",kind:"scalar",opt:!0,T:9},{no:4,name:"custom_participant_id",kind:"scalar",T:9}])}}const Ra=new Ea;class xa extends u{constructor(){super("socket.room.RemoveParticipantsRequest",[{no:1,name:"peer_ids",kind:"scalar",repeat:2,T:9}])}}new xa;class Oa extends u{constructor(){super("socket.room.BroadcastMessage",[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"payload",kind:"scalar",T:12},{no:3,name:"timestamp",kind:"scalar",T:4,L:2},{no:4,name:"ids",kind:"scalar",repeat:2,T:9},{no:5,name:"broadcast_type",kind:"enum",opt:!0,T:()=>["socket.room.BroadcastType",tt,"BROADCAST_TYPE_"]}])}}new Oa;class Sa extends u{constructor(){super("socket.room.AcceptWaitingRoomRequests",[{no:1,name:"user_ids",kind:"scalar",repeat:2,T:9}])}}new Sa;class Na extends u{constructor(){super("socket.room.DenyWaitingRoomRequests",[{no:1,name:"user_ids",kind:"scalar",repeat:2,T:9}])}}new Na;class Ia extends u{constructor(){super("socket.room.WaitingRoomRequest",[{no:1,name:"peer_id",kind:"scalar",T:9},{no:2,name:"user_id",kind:"scalar",T:9},{no:3,name:"display_name",kind:"scalar",T:9},{no:4,name:"picture",kind:"scalar",opt:!0,T:9},{no:5,name:"custom_participant_id",kind:"scalar",opt:!0,T:9},{no:6,name:"preset_name",kind:"scalar",opt:!0,T:9}])}}const Ca=new Ia;class Pa extends u{constructor(){super("socket.room.GetWaitingRoomRequests",[{no:1,name:"requests",kind:"message",repeat:1,T:()=>Ca}])}}new Pa;class La extends u{constructor(){super("socket.room.GetRoomStageStateResponse",[{no:1,name:"on_stage_peers",kind:"scalar",repeat:2,T:9},{no:2,name:"approved_stage_peers",kind:"scalar",repeat:2,T:9},{no:3,name:"requested_stage_peers",kind:"scalar",repeat:2,T:9}])}}new La;var st;(function(e){e[e.NONE=0]="NONE",e[e.SKIP=1]="SKIP",e[e.ON_PRIVILEGED_USER_ENTRY=2]="ON_PRIVILEGED_USER_ENTRY",e[e.SKIP_ON_ACCEPT=3]="SKIP_ON_ACCEPT"})(st||(st={}));var Ce;(function(e){e[e.NONE=0]="NONE",e[e.ALLOWED=1]="ALLOWED",e[e.NOT_ALLOWED=2]="NOT_ALLOWED",e[e.CAN_REQUEST=3]="CAN_REQUEST"})(Ce||(Ce={}));class Aa extends u{constructor(){super("socket.preset.PollsPermissionUpdate",[{no:1,name:"can_create",kind:"scalar",opt:!0,T:8},{no:2,name:"can_vote",kind:"scalar",opt:!0,T:8},{no:3,name:"can_view",kind:"scalar",opt:!0,T:8}])}}const Ba=new Aa;class Da extends u{constructor(){super("socket.preset.PluginsPermissionsUpdate",[{no:1,name:"can_close",kind:"scalar",opt:!0,T:8},{no:2,name:"can_start",kind:"scalar",opt:!0,T:8}])}}const Ma=new Da;class Fa extends u{constructor(){super("socket.preset.PublicChatPermission",[{no:1,name:"can_send",kind:"scalar",opt:!0,T:8},{no:2,name:"text",kind:"scalar",opt:!0,T:8},{no:3,name:"files",kind:"scalar",opt:!0,T:8}])}}const Ua=new Fa;class qa extends u{constructor(){super("socket.preset.PrivateChatPermission",[{no:1,name:"can_send",kind:"scalar",opt:!0,T:8},{no:2,name:"can_receive",kind:"scalar",opt:!0,T:8},{no:3,name:"text",kind:"scalar",opt:!0,T:8},{no:4,name:"files",kind:"scalar",opt:!0,T:8}])}}const Va=new qa;class Ga extends u{constructor(){super("socket.preset.ChatPermissionUpdate",[{no:1,name:"public",kind:"message",T:()=>Ua},{no:2,name:"private",kind:"message",T:()=>Va}])}}const ja=new Ga;class Wa extends u{constructor(){super("socket.preset.ConnectedMeetingPermissionUpdate",[{no:1,name:"can_alter_connected_meetings",kind:"scalar",opt:!0,T:8},{no:2,name:"can_switch_to_parent_meeting",kind:"scalar",opt:!0,T:8},{no:3,name:"can_switch_connected_meetings",kind:"scalar",opt:!0,T:8}])}}const Ka=new Wa;class Ja extends u{constructor(){super("socket.preset.StreamPermission",[{no:1,name:"can_produce",kind:"enum",opt:!0,T:()=>["socket.preset.StreamPermissionType",Ce,"STREAM_PERMISSION_TYPE_"]},{no:2,name:"can_consume",kind:"enum",opt:!0,T:()=>["socket.preset.StreamPermissionType",Ce,"STREAM_PERMISSION_TYPE_"]}])}}const Ze=new Ja;class Za extends u{constructor(){super("socket.preset.MediaPermissionUpdate",[{no:1,name:"video",kind:"message",T:()=>Ze},{no:2,name:"audio",kind:"message",T:()=>Ze},{no:3,name:"screenshare",kind:"message",T:()=>Ze}])}}const Xa=new Za;class $a extends u{constructor(){super("socket.preset.PresetUpdates",[{no:1,name:"polls",kind:"message",T:()=>Ba},{no:2,name:"plugins",kind:"message",T:()=>Ma},{no:3,name:"chat",kind:"message",T:()=>ja},{no:4,name:"accept_waiting_requests",kind:"scalar",opt:!0,T:8},{no:5,name:"can_accept_production_requests",kind:"scalar",opt:!0,T:8},{no:6,name:"can_edit_display_name",kind:"scalar",opt:!0,T:8},{no:7,name:"can_record",kind:"scalar",opt:!0,T:8},{no:8,name:"can_livestream",kind:"scalar",opt:!0,T:8},{no:9,name:"can_spotlight",kind:"scalar",opt:!0,T:8},{no:10,name:"disable_participant_audio",kind:"scalar",opt:!0,T:8},{no:11,name:"disable_participant_screensharing",kind:"scalar",opt:!0,T:8},{no:12,name:"disable_participant_video",kind:"scalar",opt:!0,T:8},{no:13,name:"kick_participant",kind:"scalar",opt:!0,T:8},{no:14,name:"pin_participant",kind:"scalar",opt:!0,T:8},{no:15,name:"transcription_enabled",kind:"scalar",opt:!0,T:8},{no:16,name:"waiting_room_type",kind:"enum",opt:!0,T:()=>["socket.preset.WaitingRoomType",st,"WAITING_ROOM_TYPE_"]},{no:17,name:"is_recorder",kind:"scalar",opt:!0,T:8},{no:18,name:"recorder_type",kind:"enum",opt:!0,T:()=>["socket.room.RecorderType",et,"RECORDER_TYPE_"]},{no:19,name:"hidden_participant",kind:"scalar",opt:!0,T:8},{no:20,name:"show_participant_list",kind:"scalar",opt:!0,T:8},{no:21,name:"can_change_participant_permissions",kind:"scalar",opt:!0,T:8},{no:22,name:"connected_meetings",kind:"message",T:()=>Ka},{no:23,name:"media",kind:"message",T:()=>Xa}])}}const lt=new $a;class Ya extends u{constructor(){super("socket.preset.ReadPeersPresetRequest",[{no:1,name:"user_ids",kind:"scalar",repeat:2,T:9}])}}new Ya;class za extends u{constructor(){super("socket.preset.PeerPreset",[{no:1,name:"user_id",kind:"scalar",T:9},{no:2,name:"peer_id",kind:"scalar",T:9},{no:3,name:"preset",kind:"scalar",T:12}])}}const Ha=new za;class Qa extends u{constructor(){super("socket.preset.ReadPeersPresetResponse",[{no:1,name:"peer_presets",kind:"message",repeat:1,T:()=>Ha}])}}new Qa;class ei extends u{constructor(){super("socket.preset.UpdatePeerPreset",[{no:1,name:"user_ids",kind:"scalar",T:9},{no:2,name:"patch",kind:"message",T:()=>lt}])}}const Tn=new ei;class ti extends u{constructor(){super("socket.preset.UpdatePeersPresetRequest",[{no:1,name:"update_peers_presets",kind:"message",repeat:1,T:()=>Tn}])}}new ti;class ni extends u{constructor(){super("socket.preset.UpdatePeersPresetResponse",[{no:1,name:"update_peers_presets",kind:"message",repeat:1,T:()=>Tn}])}}new ni;class si extends u{constructor(){super("socket.preset.PeerUserIDMap",[{no:1,name:"peer_id",kind:"scalar",T:9},{no:2,name:"user_id",kind:"scalar",T:9}])}}const ri=new si;class oi extends u{constructor(){super("socket.preset.BulkUpdatePeerPresetRequest",[{no:1,name:"peers",kind:"message",repeat:1,T:()=>ri},{no:2,name:"patch",kind:"message",T:()=>lt}])}}new oi;class ai extends u{constructor(){super("socket.preset.BulkUpdatePeerPresetResponse",[{no:2,name:"patch",kind:"message",T:()=>lt}])}}new ai;class ii extends u{constructor(){super("socket.chat.ChatMessage",[{no:1,name:"chat_id",kind:"scalar",T:9},{no:2,name:"peer_id",kind:"scalar",T:9},{no:3,name:"user_id",kind:"scalar",T:9},{no:4,name:"display_name",kind:"scalar",T:9},{no:5,name:"pinned",kind:"scalar",T:8},{no:6,name:"is_edited",kind:"scalar",T:8},{no:7,name:"payload_type",kind:"scalar",T:5},{no:8,name:"payload",kind:"scalar",T:9},{no:10,name:"target_user_ids",kind:"scalar",repeat:2,T:9},{no:11,name:"created_at",kind:"scalar",T:4,L:2},{no:12,name:"created_at_ms",kind:"scalar",opt:!0,T:4,L:2},{no:13,name:"channel_id",kind:"scalar",opt:!0,T:9},{no:14,name:"channel_index",kind:"scalar",opt:!0,T:9}])}}const Y=new ii;class ci extends u{constructor(){super("socket.chat.GetPaginatedChatMessageRoomRequest",[{no:1,name:"time_stamp",kind:"scalar",T:4,L:2},{no:2,name:"size",kind:"scalar",T:5},{no:3,name:"from",kind:"scalar",T:5},{no:4,name:"reversed",kind:"scalar",T:8},{no:5,name:"channel_id",kind:"scalar",opt:!0,T:9}])}}new ci;class ui extends u{constructor(){super("socket.chat.GetPaginatedChatMessageRoomResponse",[{no:1,name:"messages",kind:"message",repeat:1,T:()=>Y},{no:2,name:"next",kind:"scalar",T:8}])}}new ui;class li extends u{constructor(){super("socket.chat.GetChatMessagesResponse",[{no:1,name:"messages",kind:"message",repeat:1,T:()=>Y}])}}new li;class di extends u{constructor(){super("socket.chat.SendChatMessageToRoomRequest",[{no:1,name:"payload_type",kind:"scalar",T:5},{no:2,name:"payload",kind:"scalar",T:9}])}}new di;class pi extends u{constructor(){super("socket.chat.SendChatMessageToRoomResponse",[{no:1,name:"message",kind:"message",T:()=>Y}])}}new pi;class mi extends u{constructor(){super("socket.chat.SendChatMessageToPeersRequest",[{no:1,name:"peer_ids",kind:"scalar",repeat:2,T:9},{no:2,name:"payload_type",kind:"scalar",T:5},{no:3,name:"payload",kind:"scalar",T:9}])}}new mi;class fi extends u{constructor(){super("socket.chat.SendChatMessageToPeersResponse",[{no:1,name:"message",kind:"message",T:()=>Y}])}}new fi;class hi extends u{constructor(){super("socket.chat.SendChatMessageToChannelRequest",[{no:1,name:"channel_id",kind:"scalar",T:9},{no:2,name:"payload_type",kind:"scalar",T:5},{no:3,name:"payload",kind:"scalar",T:9}])}}new hi;class ki extends u{constructor(){super("socket.chat.SendChatMessageToChannelResponse",[{no:1,name:"message",kind:"message",T:()=>Y}])}}new ki;class gi extends u{constructor(){super("socket.chat.EditChatMessageRequest",[{no:1,name:"chat_id",kind:"scalar",T:9},{no:2,name:"payload_type",kind:"scalar",opt:!0,T:5},{no:3,name:"payload",kind:"scalar",opt:!0,T:9},{no:4,name:"pinned",kind:"scalar",opt:!0,T:8},{no:5,name:"channel_id",kind:"scalar",opt:!0,T:9}])}}new gi;class Ti extends u{constructor(){super("socket.chat.PinChatMessageRequest",[{no:1,name:"chat_id",kind:"scalar",T:9},{no:2,name:"pinned",kind:"scalar",T:8},{no:3,name:"channel_id",kind:"scalar",opt:!0,T:9}])}}new Ti;class wi extends u{constructor(){super("socket.chat.PinChatMessageResponse",[{no:1,name:"chat_id",kind:"scalar",T:9},{no:2,name:"pinned",kind:"scalar",T:8},{no:3,name:"channel_id",kind:"scalar",opt:!0,T:9}])}}new wi;class yi extends u{constructor(){super("socket.chat.EditChatMessageResponse",[{no:1,name:"message",kind:"message",T:()=>Y}])}}new yi;class bi extends u{constructor(){super("socket.chat.DeleteChatMessageRequest",[{no:1,name:"chat_id",kind:"scalar",T:9},{no:2,name:"channel_id",kind:"scalar",opt:!0,T:9}])}}new bi;class _i extends u{constructor(){super("socket.chat.DeleteChatMessageResponse",[{no:1,name:"chat_id",kind:"scalar",T:9},{no:2,name:"channel_id",kind:"scalar",opt:!0,T:9}])}}new _i;class vi extends u{constructor(){super("socket.chat.SearchChatMessagesRequest",[{no:1,name:"time_stamp",kind:"scalar",T:4,L:2},{no:2,name:"size",kind:"scalar",T:5},{no:3,name:"from",kind:"scalar",T:5},{no:4,name:"reversed",kind:"scalar",T:8},{no:5,name:"channel_id",kind:"scalar",opt:!0,T:9},{no:6,name:"search_term",kind:"scalar",T:9}])}}new vi;class Ei extends u{constructor(){super("socket.chat.MarkChannelIndexAsReadRequest",[{no:1,name:"channel_id",kind:"scalar",T:9},{no:2,name:"user_id",kind:"scalar",T:9},{no:3,name:"channel_index",kind:"scalar",T:9}])}}new Ei;class Ri extends u{constructor(){super("socket.chat.MarkChannelIndexAsReadResponse",[{no:1,name:"channel_index",kind:"scalar",T:9}])}}new Ri;class xi extends u{constructor(){super("socket.chat.CreateChatChannelRequest",[{no:1,name:"display_name",kind:"scalar",T:9},{no:2,name:"target_user_ids",kind:"scalar",repeat:2,T:9},{no:3,name:"display_picture_url",kind:"scalar",opt:!0,T:9},{no:4,name:"visibility",kind:"scalar",T:9},{no:5,name:"is_direct_message",kind:"scalar",T:8}])}}new xi;class Oi extends u{constructor(){super("socket.chat.UpdateChatChannelRequest",[{no:1,name:"chat_channel_id",kind:"scalar",T:9},{no:2,name:"display_name",kind:"scalar",opt:!0,T:9},{no:3,name:"target_user_ids",kind:"scalar",repeat:2,T:9},{no:4,name:"display_picture_url",kind:"scalar",opt:!0,T:9},{no:5,name:"visibility",kind:"scalar",opt:!0,T:9},{no:6,name:"is_direct_message",kind:"scalar",opt:!0,T:8}])}}new Oi;class Si extends u{constructor(){super("socket.chat.CreateChatChannelResponse",[{no:1,name:"chat_channel_id",kind:"scalar",T:9}])}}new Si;class Ni extends u{constructor(){super("socket.chat.GetChatChannelRequest",[{no:1,name:"chat_channel_id",kind:"scalar",T:9}])}}new Ni;class Ii extends u{constructor(){super("socket.chat.LatestMessageAndUnreadCount",[{no:1,name:"message",kind:"message",T:()=>Y},{no:2,name:"unread_count",kind:"scalar",T:4,L:2}])}}const Ci=new Ii;class Pi extends u{constructor(){super("socket.chat.ChatChannel",[{no:1,name:"chat_channel_id",kind:"scalar",T:9},{no:2,name:"display_name",kind:"scalar",T:9},{no:3,name:"display_picture_url",kind:"scalar",opt:!0,T:9},{no:4,name:"visibility",kind:"scalar",T:9},{no:5,name:"is_direct_message",kind:"scalar",T:8},{no:6,name:"latest_message_and_unread_count",kind:"message",T:()=>Ci},{no:7,name:"target_user_ids",kind:"scalar",repeat:2,T:9}])}}const Li=new Pi;class Ai extends u{constructor(){super("socket.chat.GetChatChannelResponse",[{no:1,name:"chat_channels",kind:"message",repeat:1,T:()=>Li}])}}new Ai;class Bi extends u{constructor(){super("socket.chat.ChannelMember",[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",opt:!0,T:9},{no:3,name:"picture",kind:"scalar",opt:!0,T:9},{no:4,name:"custom_participant_id",kind:"scalar",T:9}])}}const Di=new Bi;class Mi extends u{constructor(){super("socket.chat.GetChatChannelMembersResponse",[{no:1,name:"channel_members",kind:"message",repeat:1,T:()=>Di}])}}new Mi;class Fi extends u{constructor(){super("socket.plugin.AddPluginRequest",[{no:1,name:"plugin_id",kind:"scalar",T:9},{no:2,name:"staggered",kind:"scalar",T:8}])}}new Fi;class Ui extends u{constructor(){super("socket.plugin.RemovePluginRequest",[{no:1,name:"plugin_id",kind:"scalar",T:9},{no:2,name:"staggered",kind:"scalar",T:8}])}}new Ui;class qi extends u{constructor(){super("socket.plugin.EnablePluginForRoomRequest",[{no:1,name:"plugin_id",kind:"scalar",T:9}])}}new qi;class Vi extends u{constructor(){super("socket.plugin.DisablePluginForRoomRequest",[{no:1,name:"plugin_id",kind:"scalar",T:9}])}}new Vi;class Gi extends u{constructor(){super("socket.plugin.EnablePluginForPeersRequest",[{no:1,name:"plugin_id",kind:"scalar",T:9},{no:2,name:"peer_ids",kind:"scalar",repeat:2,T:9}])}}new Gi;class ji extends u{constructor(){super("socket.plugin.DisablePluginForPeersRequest",[{no:1,name:"plugin_id",kind:"scalar",T:9},{no:2,name:"peer_ids",kind:"scalar",repeat:2,T:9}])}}new ji;class Wi extends u{constructor(){super("socket.plugin.PluginEventToRoomRequest",[{no:1,name:"plugin_id",kind:"scalar",T:9},{no:2,name:"plugin_data",kind:"scalar",T:12}])}}new Wi;class Ki extends u{constructor(){super("socket.plugin.PluginEventToPeersRequest",[{no:1,name:"plugin_id",kind:"scalar",T:9},{no:2,name:"peer_ids",kind:"scalar",repeat:2,T:9},{no:3,name:"plugin_data",kind:"scalar",T:12}])}}new Ki;class Ji extends u{constructor(){super("socket.plugin.StoreKeys",[{no:1,name:"store_key",kind:"scalar",T:9},{no:2,name:"payload",kind:"scalar",opt:!0,T:12}])}}const dt=new Ji;class Zi extends u{constructor(){super("socket.plugin.PluginStoreInsertKeysRequest",[{no:1,name:"plugin_id",kind:"scalar",T:9},{no:2,name:"store_name",kind:"scalar",T:9},{no:3,name:"insert_keys",kind:"message",repeat:1,T:()=>dt}])}}new Zi;class Xi extends u{constructor(){super("socket.plugin.PluginStoreGetKeysRequest",[{no:1,name:"plugin_id",kind:"scalar",T:9},{no:2,name:"store_name",kind:"scalar",T:9},{no:3,name:"get_keys",kind:"message",repeat:1,T:()=>dt}])}}new Xi;class $i extends u{constructor(){super("socket.plugin.PluginStoreDeleteKeysRequest",[{no:1,name:"plugin_id",kind:"scalar",T:9},{no:2,name:"store_name",kind:"scalar",T:9},{no:3,name:"delete_keys",kind:"message",repeat:1,T:()=>dt}])}}new $i;class Yi extends u{constructor(){super("socket.plugin.PluginStoreDeleteRequest",[{no:1,name:"plugin_id",kind:"scalar",T:9},{no:2,name:"store_name",kind:"scalar",T:9}])}}new Yi;class zi extends u{constructor(){super("socket.plugin.EnablePluginResponse",[{no:1,name:"plugin_id",kind:"scalar",T:9},{no:2,name:"enabled_by",kind:"scalar",T:9}])}}const Hi=new zi;class Qi extends u{constructor(){super("socket.plugin.EnablePluginsResponse",[{no:1,name:"plugins",kind:"message",repeat:1,T:()=>Hi}])}}new Qi;class ec extends u{constructor(){super("socket.plugin.DisablePluginResponse",[{no:1,name:"plugin_id",kind:"scalar",T:9},{no:2,name:"disabled_by",kind:"scalar",T:9}])}}new ec;class tc extends u{constructor(){super("socket.plugin.PluginStoreItem",[{no:1,name:"timestamp",kind:"scalar",T:9},{no:2,name:"peer_id",kind:"scalar",T:9},{no:3,name:"store_key",kind:"scalar",T:9},{no:4,name:"payload",kind:"scalar",T:12}])}}const nc=new tc;class sc extends u{constructor(){super("socket.plugin.PluginStoreResponse",[{no:1,name:"plugin_id",kind:"scalar",T:9},{no:2,name:"store_name",kind:"scalar",T:9},{no:3,name:"store_items",kind:"message",repeat:1,T:()=>nc}])}}new sc;class rc extends u{constructor(){super("socket.plugin.PluginEventResponse",[{no:1,name:"plugin_id",kind:"scalar",T:9},{no:2,name:"plugin_data",kind:"scalar",T:12}])}}new rc;class oc extends u{constructor(){super("socket.livestreaming.LiveStreamingEvent",[{no:1,name:"livestream_id",kind:"scalar",T:9},{no:2,name:"err_message",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"meeting_id",kind:"scalar",T:9},{no:5,name:"playback_url",kind:"scalar",T:9},{no:6,name:"org_id",kind:"scalar",T:9},{no:7,name:"room_name",kind:"scalar",T:9},{no:8,name:"room_uuid",kind:"scalar",T:9},{no:9,name:"status",kind:"scalar",T:9},{no:10,name:"manual_ingest",kind:"scalar",opt:!0,T:8}])}}new oc;class ac extends u{constructor(){super("socket.livestreaming.GetStagePeersResponse",[{no:1,name:"stage_peers",kind:"scalar",repeat:2,T:9}])}}new ac;class ic extends u{constructor(){super("socket.livestreaming.StageRequest",[{no:1,name:"display_name",kind:"scalar",T:9},{no:2,name:"user_id",kind:"scalar",T:9},{no:3,name:"peer_id",kind:"scalar",T:9}])}}const cc=new ic;class uc extends u{constructor(){super("socket.livestreaming.GetStageRequestsResponse",[{no:1,name:"stage_requests",kind:"message",repeat:1,T:()=>cc}])}}new uc;class lc extends u{constructor(){super("socket.livestreaming.GrantStageAccessRequest",[{no:1,name:"user_ids",kind:"scalar",repeat:2,T:9}])}}new lc;class dc extends u{constructor(){super("socket.livestreaming.DenyStageAccessRequest",[{no:1,name:"user_ids",kind:"scalar",repeat:2,T:9}])}}new dc;class pc extends u{constructor(){super("socket.livestreaming.LeaveStageRequest",[{no:1,name:"user_ids",kind:"scalar",repeat:2,T:9}])}}new pc;class mc extends u{constructor(){super("socket.polls.Poll",[{no:1,name:"poll_id",kind:"scalar",T:9},{no:2,name:"created_by",kind:"scalar",T:9},{no:3,name:"created_by_user_id",kind:"scalar",T:9},{no:4,name:"question",kind:"scalar",T:9},{no:5,name:"options",kind:"message",repeat:1,T:()=>hc},{no:6,name:"hide_votes",kind:"scalar",T:8},{no:7,name:"anonymous",kind:"scalar",T:8},{no:8,name:"votes",kind:"scalar",repeat:2,T:9}])}}const wn=new mc;class fc extends u{constructor(){super("socket.polls.PollOption",[{no:1,name:"text",kind:"scalar",T:9},{no:2,name:"count",kind:"scalar",opt:!0,T:4,L:2},{no:3,name:"votes",kind:"message",repeat:1,T:()=>gc}])}}const hc=new fc;class kc extends u{constructor(){super("socket.polls.PollVote",[{no:1,name:"user_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}])}}const gc=new kc;class Tc extends u{constructor(){super("socket.polls.NewPollRequest",[{no:1,name:"question",kind:"scalar",T:9},{no:2,name:"options",kind:"scalar",repeat:2,T:9},{no:3,name:"anonymous",kind:"scalar",T:8},{no:4,name:"hide_votes",kind:"scalar",T:8},{no:5,name:"created_by",kind:"scalar",opt:!0,T:9},{no:6,name:"created_by_user_id",kind:"scalar",opt:!0,T:9}])}}new Tc;class wc extends u{constructor(){super("socket.polls.VotePollRequest",[{no:1,name:"poll_id",kind:"scalar",T:9},{no:2,name:"index",kind:"scalar",T:4,L:2}])}}new wc;class yc extends u{constructor(){super("socket.polls.UpdatePollResponse",[{no:1,name:"poll",kind:"message",T:()=>wn}])}}new yc;class bc extends u{constructor(){super("socket.polls.GetPollsResponse",[{no:1,name:"polls",kind:"message",repeat:1,T:()=>wn}])}}new bc;class _c extends u{constructor(){super("socket.recording.RecordingEvent",[{no:1,name:"recording_id",kind:"scalar",T:9},{no:2,name:"err_message",kind:"scalar",T:9},{no:3,name:"recording_type",kind:"enum",T:()=>["common.RecordingType",Ie]}])}}new _c;class vc extends u{constructor(){super("google.protobuf.Timestamp",[{no:1,name:"seconds",kind:"scalar",T:3,L:0},{no:2,name:"nanos",kind:"scalar",T:5}])}now(){const t=this.create(),n=Date.now();return t.seconds=N.from(Math.floor(n/1e3)).toBigInt(),t.nanos=n%1e3*1e6,t}toDate(t){return new Date(N.from(t.seconds).toNumber()*1e3+Math.ceil(t.nanos/1e6))}fromDate(t){const n=this.create(),s=t.getTime();return n.seconds=N.from(Math.floor(s/1e3)).toBigInt(),n.nanos=s%1e3*1e6,n}internalJsonWrite(t,n){let s=N.from(t.seconds).toNumber()*1e3;if(s<Date.parse("0001-01-01T00:00:00Z")||s>Date.parse("9999-12-31T23:59:59Z"))throw new Error("Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");if(t.nanos<0)throw new Error("Unable to encode invalid Timestamp to JSON. Nanos must not be negative.");let r="Z";if(t.nanos>0){let o=(t.nanos+1e9).toString().substring(1);o.substring(3)==="000000"?r="."+o.substring(0,3)+"Z":o.substring(6)==="000"?r="."+o.substring(0,6)+"Z":r="."+o+"Z"}return new Date(s).toISOString().replace(".000Z",r)}internalJsonRead(t,n,s){if(typeof t!="string")throw new Error("Unable to parse Timestamp from JSON "+it(t)+".");let r=t.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);if(!r)throw new Error("Unable to parse Timestamp from JSON. Invalid format.");let o=Date.parse(r[1]+"-"+r[2]+"-"+r[3]+"T"+r[4]+":"+r[5]+":"+r[6]+(r[8]?r[8]:"Z"));if(Number.isNaN(o))throw new Error("Unable to parse Timestamp from JSON. Invalid value.");if(o<Date.parse("0001-01-01T00:00:00Z")||o>Date.parse("9999-12-31T23:59:59Z"))throw new globalThis.Error("Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");return s||(s=this.create()),s.seconds=N.from(o/1e3).toBigInt(),s.nanos=0,r[7]&&(s.nanos=parseInt("1"+r[7]+"0".repeat(9-r[7].length))-1e9),s}}new vc;class Ec extends u{constructor(){super("common.BaseHubMessage",[{no:1,name:"event",kind:"scalar",T:5},{no:2,name:"id",kind:"scalar",T:9},{no:3,name:"peer_id",kind:"scalar",T:9},{no:4,name:"room_id",kind:"scalar",T:9},{no:5,name:"user_id",kind:"scalar",T:9},{no:6,name:"payload",kind:"scalar",T:12},{no:7,name:"error",kind:"scalar",opt:!0,T:8},{no:8,name:"sid",kind:"scalar",opt:!0,T:9},{no:9,name:"room_object_id",kind:"scalar",opt:!0,T:9},{no:10,name:"preset",kind:"scalar",opt:!0,T:9}])}}const rt=new Ec;class Rc extends u{constructor(){super("common.BulkedHubMessage",[{no:1,name:"messages",kind:"message",repeat:1,T:()=>rt}])}}new Rc;class xc extends u{constructor(){super("common.CFWorkersResponse",[{no:1,name:"response",kind:"message",T:()=>rt},{no:2,name:"broadcast_responses",kind:"message",repeat:1,T:()=>rt}])}}new xc;const Oc=0,Sc=1,Nc=2,Ic=3,Cc=4,Pc=5,Lc={getPeerInfo:0,updatePeerInfo:1,getRoomPeersInfo:2,joinRoom:3,leaveRoom:4,getRoomInfo:5,updateRoomInfo:6,closeRoom:7,startedLivestream:8,stoppedLivestream:9,erroredLivestream:10,getStagePeers:11,getStageRequests:12,requestStageAccess:13,cancelStageRequest:14,grantStageAccess:15,denyStageAccess:16,roomPeerCount:17,joinStage:18,leaveStage:19,getConnectedRoomsDump:20,createConnectedRooms:21,deleteConnectedRooms:22,movePeers:23,transferPeer:24,movedPeer:25,connectedRoomsUpdated:26,connectedRoomsDeleted:27,getAllAddedParticipants:28,broadcastMessage:29,kick:30,kickAll:31,transcript:32,getWaitingRoomRequests:33,acceptWaitingRoomRequests:34,waitingRoomRequestAccepted:35,denyWaitingRoomRequests:36,waitingRoomRequestDenied:37,peerStageStatusUpdate:38,broadcastToEntity:39,recordingStarted:40,recordingStopped:41,recordingPaused:42,getRoomStageState:43,livestreamingInvoked:44},Ac={getMessages:0,sendMessageToRoom:1,sendMessageToPeers:2,editMessage:3,deleteMessage:4,getPaginatedMessages:5,sendMessageToChannel:6,searchChannelMessages:7,getAllChatChannels:8,markChannelIndexAsRead:9,pinMessage:10},Bc={getPlugins:0,addPlugin:1,enablePluginForRoom:2,disablePluginForPeers:3,enablePluginForPeers:4,disablePluginForRoom:5,removePlugin:6,customPluginEventToRoom:7,customPluginEventToPeers:8,storeInsertKeys:9,storeGetKeys:10,storeDeleteKeys:11,storeDelete:12},Dc={createPoll:0,getPolls:1,votePoll:2,updatePoll:3},yn={unknown:0,createWebRTCTransport:1,produce:2,consume:3,toggleProducer:4,toggleConsumer:5,closeProducer:6,closeConsumer:7,joinRoom:16,leaveRoom:17,selectedPeer:18,globalPinPeer:19,selfJoinComplete:20,peerJoinedBroadcast:25,peerLeaveBroadcast:26,peerProducerCreateBroadcast:27,peerProducerToggleBroadcast:28,peerProducerCloseBroadcast:29,globalPeerPinBroadcast:30,recordingStartedBroadcast:31,recordingStoppedBroadcast:32,peerDisplayNameEditBroadcast:33,mediaRoomTerminationBroadcastResponse:36,selectedPeerDiff:40,renegotiateSessionDescription:50,errorResponse:60,kickPeer:90,kickAll:91,changeDisplayName:92,hostControlPeer:93,hostControlAllPeers:94,audioActivity:100},Mc={createChatChannel:0,getChatChannel:1,deprecatedGetAllChatChannels:2,getChannelMembers:3,updateChatChannel:4},Fc={getUserPresets:0,updateUserPreset:1};function re(e,t){return Object.keys(t).reduce((n,s)=>(n[s]=(e<<16)+t[s],n),{})}function bn(e,t){return Object.keys(e).reduce((n,s)=>(n[s]=t|e[s],n),{})}const ye=re(Oc,Lc);re(Sc,Ac);re(Nc,Bc);re(Ic,Dc);re(Cc,Mc);const Xe=bn(yn,16777216);bn(yn,50331648);re(Pc,Fc);const _n="ws://localhost:8080/ws";class Uc extends pe.WebSocket{constructor(t,n){super(_n,n)}}var ue,ot,le,at;class qc{constructor(){we(this,ue,void 0),we(this,ot,[]),we(this,le,void 0),we(this,at,15e3),R(this,"roomId","roomId"),R(this,"roomUuid","roomUuid"),R(this,"cleanBuffer",t=>t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength))}init({peerId:t,mockParticipants:n}){It(this,le,t),window.WebSocket=Uc,It(this,ue,n);const{RTK_MOCK_SERVER:s}=window;if(s)try{s.close()}catch(o){}const r=new pe.Server(_n,{mock:!1});window.RTK_MOCK_SERVER=r,r.on("connection",o=>{te(this,ot).push(o),this.addConnectionListeners(o)})}addConnectionListeners(t){t.on("message",n=>{if(n==="3")return;const s=Dt.fromBinary(n);let r;switch(s.event){case ye.joinRoom:{r=qt.toBinary(qt.fromJson({peer:{peerId:te(this,le),userId:"self-userId",displayName:"name",waitlisted:!1,stageType:me.ON_STAGE}}));break}case ye.getRoomPeersInfo:{r=Do.toBinary({peers:te(this,ue).map(h=>gs(Nt({},h),{userId:h.peerId,waitlisted:!1,stageType:1}))});break}case ye.getRoomInfo:{r=Go.toBinary({room:{roomId:this.roomId,title:"title",createdAt:Date.now(),activeRecordings:[],roomUuid:this.roomUuid}});break}case Xe.createWebRTCTransport:{r=mn.toBinary({transportId:"transportId",description:{type:"answer",sdp:"sdp",target:Ne.PUBLISHER},producerIds:[]});break}case Xe.selfJoinComplete:{const h=te(this,ue).map(T=>Nt({producerStates:[]},T));r=Wr.toBinary({maxPreferredStreams:6,participants:h,selectedPeers:{audioPeers:[],compulsoryPeers:[]},roomState:{displayTitle:"title",lockedMode:!1,roomUuid:this.roomUuid,roomName:this.roomUuid,currentPeerId:te(this,le),pinnedPeerIds:[]}});break}case ye.getConnectedRoomsDump:{r=ea.toBinary({parentMeeting:{participants:[]},meetings:[]});break}case Xe.produce:{r=$r.toBinary({status:!0,producerId:"producer-id"});break}}const o={event:s.event,id:s.id,payload:r},l=Dt.toBinary(o),p=this.cleanBuffer(l);t.send(p)}),setInterval(()=>{t.send("2")},te(this,at))}}ue=new WeakMap,ot=new WeakMap,le=new WeakMap,at=new WeakMap;function Vc(e){new qc().init(e),window.RTCPeerConnection=Os,window.fetch=()=>Ts(this,null,function*(){const t=new window.Response(JSON.stringify({}),{status:200,headers:{"Content-type":"application/json"}});return Promise.resolve(t)})}exports.setupStubs=Vc;
|
|
5
|
+
m=audio 9 UDP/TLS/RTP/SAVPF 96
|
|
6
|
+
a=msid:stream-id track-id
|
|
7
|
+
`,Lt={track:null,transport:null,rtcpTransport:null,dtmf:{insertDTMF:()=>{},ontonechange:null,canInsertDTMF:!1,toneBuffer:"",addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!0},transform:null,mid:null,getParameters:()=>({}),setParameters:()=>Promise.resolve({}),replaceTrack:()=>Promise.resolve({}),getStats:()=>Promise.resolve(new Map),setStreams:()=>{},setTransform:()=>Promise.resolve()};class Ss extends Ne{constructor(){super(),E(this,"localDescription",null),E(this,"remoteDescription",null),E(this,"currentLocalDescription",null),E(this,"currentRemoteDescription",null),E(this,"pendingLocalDescription",null),E(this,"pendingRemoteDescription",null),E(this,"signalingState","stable"),E(this,"iceConnectionState","new"),E(this,"iceGatheringState","new"),E(this,"connectionState","new"),E(this,"canTrickleIceCandidates",null),E(this,"sctp",null),E(this,"senders",[]),E(this,"receivers",[]),E(this,"transceivers",[]),E(this,"onicecandidate",null),E(this,"onicecandidateerror",null),E(this,"onconnectionstatechange",null),E(this,"oniceconnectionstatechange",null),E(this,"onicegatheringstatechange",null),E(this,"onsignalingstatechange",null),E(this,"onnegotiationneeded",null),E(this,"ontrack",null),E(this,"ondatachannel",null),E(this,"addEventListener"),E(this,"removeEventListener"),this.addEventListener=this.addListener,this.removeEventListener=this.removeListener}createOffer(){return Promise.resolve({sdp:Os,type:"offer"})}createAnswer(){return Promise.resolve({})}setLocalDescription(){return this.iceConnectionState="connected",this.iceGatheringState="complete",this.connectionState="connected",this.signalingState="stable",this.emit("iceconnectionstatechange"),Promise.resolve()}setRemoteDescription(){return Promise.resolve()}addIceCandidate(){return Promise.resolve()}getStats(){return Promise.resolve(new Map)}getConfiguration(){return{}}setConfiguration(){}close(){}createDataChannel(){return{close:()=>{},send:()=>{}}}addTrack(){return Lt}removeTrack(){}addTransceiver(){return{stop:()=>{},setDirection:()=>{},setCodecPreferences:()=>{},sender:Lt}}getTransceivers(){return[]}getSenders(){return[]}getReceivers(){return[]}restartIce(){}static generateCertificate(){return Promise.resolve({expires:Date.now(),getFingerprints:()=>[]})}}function Ns(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var pe={},xs={get exports(){return pe},set exports(e){pe=e}};(function(e,t){(function(n,s){s(t)})(ce,function(n){var s=typeof window!="undefined"?window:typeof ce!="undefined"?ce:typeof self!="undefined"?self:{},r=function(i,c){if(c=c.split(":")[0],i=+i,!i)return!1;switch(c){case"http":case"ws":return i!==80;case"https":case"wss":return i!==443;case"ftp":return i!==21;case"gopher":return i!==70;case"file":return!1}return i!==0},o=Object.prototype.hasOwnProperty,u;function p(i){try{return decodeURIComponent(i.replace(/\+/g," "))}catch(c){return null}}function h(i){try{return encodeURIComponent(i)}catch(c){return null}}function T(i){for(var c=/([^=?#&]+)=?([^&]*)/g,d={},a;a=c.exec(i);){var m=p(a[1]),f=p(a[2]);m===null||f===null||m in d||(d[m]=f)}return d}function b(i,c){c=c||"";var d=[],a,m;typeof c!="string"&&(c="?");for(m in i)if(o.call(i,m)){if(a=i[m],!a&&(a===null||a===u||isNaN(a))&&(a=""),m=h(m),a=h(a),m===null||a===null)continue;d.push(m+"="+a)}return d.length?c+d.join("&"):""}var I=b,v=T,B={stringify:I,parse:v},F=/[\n\r\t]/g,De=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,z=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,oe=/^[a-zA-Z]:/,vn=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/;function Me(i){return(i||"").toString().replace(vn,"")}var Fe=[["#","hash"],["?","query"],function(i,c){return W(c.protocol)?i.replace(/\\/g,"/"):i},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],pt={hash:1,query:1};function mt(i){var c;typeof window!="undefined"?c=window:typeof s!="undefined"?c=s:typeof self!="undefined"?c=self:c={};var d=c.location||{};i=i||d;var a={},m=typeof i,f;if(i.protocol==="blob:")a=new K(unescape(i.pathname),{});else if(m==="string"){a=new K(i,{});for(f in pt)delete a[f]}else if(m==="object"){for(f in i)f in pt||(a[f]=i[f]);a.slashes===void 0&&(a.slashes=De.test(i.href))}return a}function W(i){return i==="file:"||i==="ftp:"||i==="http:"||i==="https:"||i==="ws:"||i==="wss:"}function ft(i,c){i=Me(i),i=i.replace(F,""),c=c||{};var d=z.exec(i),a=d[1]?d[1].toLowerCase():"",m=!!d[2],f=!!d[3],g=0,w;return m?f?(w=d[2]+d[3]+d[4],g=d[2].length+d[3].length):(w=d[2]+d[4],g=d[2].length):f?(w=d[3]+d[4],g=d[3].length):w=d[4],a==="file:"?g>=2&&(w=w.slice(2)):W(a)?w=d[4]:a?m&&(w=w.slice(2)):g>=2&&W(c.protocol)&&(w=d[4]),{protocol:a,slashes:m||W(a),slashesCount:g,rest:w}}function Rn(i,c){if(i==="")return c;for(var d=(c||"/").split("/").slice(0,-1).concat(i.split("/")),a=d.length,m=d[a-1],f=!1,g=0;a--;)d[a]==="."?d.splice(a,1):d[a]===".."?(d.splice(a,1),g++):g&&(a===0&&(f=!0),d.splice(a,1),g--);return f&&d.unshift(""),(m==="."||m==="..")&&d.push(""),d.join("/")}function K(i,c,d){if(i=Me(i),i=i.replace(F,""),!(this instanceof K))return new K(i,c,d);var a,m,f,g,w,_,A=Fe.slice(),wt=typeof c,y=this,We=0;for(wt!=="object"&&wt!=="string"&&(d=c,c=null),d&&typeof d!="function"&&(d=B.parse),c=mt(c),m=ft(i||"",c),a=!m.protocol&&!m.slashes,y.slashes=m.slashes||a&&c.slashes,y.protocol=m.protocol||c.protocol||"",i=m.rest,(m.protocol==="file:"&&(m.slashesCount!==2||oe.test(i))||!m.slashes&&(m.protocol||m.slashesCount<2||!W(y.protocol)))&&(A[3]=[/(.*)/,"pathname"]);We<A.length;We++){if(g=A[We],typeof g=="function"){i=g(i,y);continue}f=g[0],_=g[1],f!==f?y[_]=i:typeof f=="string"?(w=f==="@"?i.lastIndexOf(f):i.indexOf(f),~w&&(typeof g[2]=="number"?(y[_]=i.slice(0,w),i=i.slice(w+g[2])):(y[_]=i.slice(w),i=i.slice(0,w)))):(w=f.exec(i))&&(y[_]=w[1],i=i.slice(0,w.index)),y[_]=y[_]||a&&g[3]&&c[_]||"",g[4]&&(y[_]=y[_].toLowerCase())}d&&(y.query=d(y.query)),a&&c.slashes&&y.pathname.charAt(0)!=="/"&&(y.pathname!==""||c.pathname!=="")&&(y.pathname=Rn(y.pathname,c.pathname)),y.pathname.charAt(0)!=="/"&&W(y.protocol)&&(y.pathname="/"+y.pathname),r(y.port,y.protocol)||(y.host=y.hostname,y.port=""),y.username=y.password="",y.auth&&(w=y.auth.indexOf(":"),~w?(y.username=y.auth.slice(0,w),y.username=encodeURIComponent(decodeURIComponent(y.username)),y.password=y.auth.slice(w+1),y.password=encodeURIComponent(decodeURIComponent(y.password))):y.username=encodeURIComponent(decodeURIComponent(y.auth)),y.auth=y.password?y.username+":"+y.password:y.username),y.origin=y.protocol!=="file:"&&W(y.protocol)&&y.host?y.protocol+"//"+y.host:"null",y.href=y.toString()}function En(i,c,d){var a=this;switch(i){case"query":typeof c=="string"&&c.length&&(c=(d||B.parse)(c)),a[i]=c;break;case"port":a[i]=c,r(c,a.protocol)?c&&(a.host=a.hostname+":"+c):(a.host=a.hostname,a[i]="");break;case"hostname":a[i]=c,a.port&&(c+=":"+a.port),a.host=c;break;case"host":a[i]=c,/:\d+$/.test(c)?(c=c.split(":"),a.port=c.pop(),a.hostname=c.join(":")):(a.hostname=c,a.port="");break;case"protocol":a.protocol=c.toLowerCase(),a.slashes=!d;break;case"pathname":case"hash":if(c){var m=i==="pathname"?"/":"#";a[i]=c.charAt(0)!==m?m+c:c}else a[i]=c;break;case"username":case"password":a[i]=encodeURIComponent(c);break;case"auth":var f=c.indexOf(":");~f?(a.username=c.slice(0,f),a.username=encodeURIComponent(decodeURIComponent(a.username)),a.password=c.slice(f+1),a.password=encodeURIComponent(decodeURIComponent(a.password))):a.username=encodeURIComponent(decodeURIComponent(c))}for(var g=0;g<Fe.length;g++){var w=Fe[g];w[4]&&(a[w[1]]=a[w[1]].toLowerCase())}return a.auth=a.password?a.username+":"+a.password:a.username,a.origin=a.protocol!=="file:"&&W(a.protocol)&&a.host?a.protocol+"//"+a.host:"null",a.href=a.toString(),a}function On(i){(!i||typeof i!="function")&&(i=B.stringify);var c,d=this,a=d.host,m=d.protocol;m&&m.charAt(m.length-1)!==":"&&(m+=":");var f=m+(d.protocol&&d.slashes||W(d.protocol)?"//":"");return d.username?(f+=d.username,d.password&&(f+=":"+d.password),f+="@"):d.password?(f+=":"+d.password,f+="@"):d.protocol!=="file:"&&W(d.protocol)&&!a&&d.pathname!=="/"&&(f+="@"),a[a.length-1]===":"&&(a+=":"),f+=a+d.pathname,c=typeof d.query=="object"?i(d.query):d.query,c&&(f+=c.charAt(0)!=="?"?"?"+c:c),d.hash&&(f+=d.hash),f}K.prototype={set:En,toString:On},K.extractProtocol=ft,K.location=mt,K.trimLeft=Me,K.qs=B;var Ue=K;function ae(i,c){setTimeout(function(d){return i.call(d)},4,c)}function he(i,c){typeof process!="undefined"&&console[i].call(null,c)}function qe(i,c){i===void 0&&(i=[]);var d=[];return i.forEach(function(a){c(a)||d.push(a)}),d}function Sn(i,c){i===void 0&&(i=[]);var d=[];return i.forEach(function(a){c(a)&&d.push(a)}),d}var H=function(){this.listeners={}};H.prototype.addEventListener=function(i,c){typeof c=="function"&&(Array.isArray(this.listeners[i])||(this.listeners[i]=[]),Sn(this.listeners[i],function(d){return d===c}).length===0&&this.listeners[i].push(c))},H.prototype.removeEventListener=function(i,c){var d=this.listeners[i];this.listeners[i]=qe(d,function(a){return a===c})},H.prototype.dispatchEvent=function(i){for(var c=this,d=[],a=arguments.length-1;a-- >0;)d[a]=arguments[a+1];var m=i.type,f=this.listeners[m];return Array.isArray(f)?(f.forEach(function(g){d.length>0?g.apply(c,d):g.call(c,i)}),!0):!1};function $(i){var c=i.indexOf("?");return c>=0?i.slice(0,c):i}var Z=function(){this.urlMap={}};Z.prototype.attachWebSocket=function(i,c){var d=$(c),a=this.urlMap[d];if(a&&a.server&&a.websockets.indexOf(i)===-1)return a.websockets.push(i),a.server},Z.prototype.addMembershipToRoom=function(i,c){var d=this.urlMap[$(i.url)];d&&d.server&&d.websockets.indexOf(i)!==-1&&(d.roomMemberships[c]||(d.roomMemberships[c]=[]),d.roomMemberships[c].push(i))},Z.prototype.attachServer=function(i,c){var d=$(c),a=this.urlMap[d];if(!a)return this.urlMap[d]={server:i,websockets:[],roomMemberships:{}},i},Z.prototype.serverLookup=function(i){var c=$(i),d=this.urlMap[c];if(d)return d.server},Z.prototype.websocketsLookup=function(i,c,d){var a=$(i),m,f=this.urlMap[a];if(m=f?f.websockets:[],c){var g=f.roomMemberships[c];m=g||[]}return d?m.filter(function(w){return w!==d}):m},Z.prototype.removeServer=function(i){delete this.urlMap[$(i)]},Z.prototype.removeWebSocket=function(i,c){var d=$(c),a=this.urlMap[d];a&&(a.websockets=qe(a.websockets,function(m){return m===i}))},Z.prototype.removeMembershipFromRoom=function(i,c){var d=this.urlMap[$(i.url)],a=d.roomMemberships[c];d&&a!==null&&(d.roomMemberships[c]=qe(a,function(m){return m===i}))};var C=new Z,U={CLOSE_NORMAL:1e3,CLOSE_GOING_AWAY:1001,CLOSE_PROTOCOL_ERROR:1002,CLOSE_UNSUPPORTED:1003,CLOSE_NO_STATUS:1005,CLOSE_ABNORMAL:1006,UNSUPPORTED_DATA:1007,POLICY_VIOLATION:1008,CLOSE_TOO_LARGE:1009,MISSING_EXTENSION:1010,INTERNAL_ERROR:1011,SERVICE_RESTART:1012,TRY_AGAIN_LATER:1013,TLS_HANDSHAKE:1015},M={CONSTRUCTOR_ERROR:"Failed to construct 'WebSocket':",CLOSE_ERROR:"Failed to execute 'close' on 'WebSocket':",EVENT:{CONSTRUCT:"Failed to construct 'Event':",MESSAGE:"Failed to construct 'MessageEvent':",CLOSE:"Failed to construct 'CloseEvent':"}},Q=function(){};Q.prototype.stopPropagation=function(){},Q.prototype.stopImmediatePropagation=function(){},Q.prototype.initEvent=function(i,c,d){i===void 0&&(i="undefined"),c===void 0&&(c=!1),d===void 0&&(d=!1),this.type=""+i,this.bubbles=Boolean(c),this.cancelable=Boolean(d)};var Nn=function(i){function c(d,a){if(a===void 0&&(a={}),i.call(this),!d)throw new TypeError(M.EVENT_ERROR+" 1 argument required, but only 0 present.");if(typeof a!="object")throw new TypeError(M.EVENT_ERROR+" parameter 2 ('eventInitDict') is not an object.");var m=a.bubbles,f=a.cancelable;this.type=""+d,this.timeStamp=Date.now(),this.target=null,this.srcElement=null,this.returnValue=!0,this.isTrusted=!1,this.eventPhase=0,this.defaultPrevented=!1,this.currentTarget=null,this.cancelable=f?Boolean(f):!1,this.cancelBubble=!1,this.bubbles=m?Boolean(m):!1}return i&&(c.__proto__=i),c.prototype=Object.create(i&&i.prototype),c.prototype.constructor=c,c}(Q),xn=function(i){function c(d,a){if(a===void 0&&(a={}),i.call(this),!d)throw new TypeError(M.EVENT.MESSAGE+" 1 argument required, but only 0 present.");if(typeof a!="object")throw new TypeError(M.EVENT.MESSAGE+" parameter 2 ('eventInitDict') is not an object");var m=a.bubbles,f=a.cancelable,g=a.data,w=a.origin,_=a.lastEventId,A=a.ports;this.type=""+d,this.timeStamp=Date.now(),this.target=null,this.srcElement=null,this.returnValue=!0,this.isTrusted=!1,this.eventPhase=0,this.defaultPrevented=!1,this.currentTarget=null,this.cancelable=f?Boolean(f):!1,this.canncelBubble=!1,this.bubbles=m?Boolean(m):!1,this.origin=""+w,this.ports=typeof A=="undefined"?null:A,this.data=typeof g=="undefined"?null:g,this.lastEventId=""+(_||"")}return i&&(c.__proto__=i),c.prototype=Object.create(i&&i.prototype),c.prototype.constructor=c,c}(Q),In=function(i){function c(d,a){if(a===void 0&&(a={}),i.call(this),!d)throw new TypeError(M.EVENT.CLOSE+" 1 argument required, but only 0 present.");if(typeof a!="object")throw new TypeError(M.EVENT.CLOSE+" parameter 2 ('eventInitDict') is not an object");var m=a.bubbles,f=a.cancelable,g=a.code,w=a.reason,_=a.wasClean;this.type=""+d,this.timeStamp=Date.now(),this.target=null,this.srcElement=null,this.returnValue=!0,this.isTrusted=!1,this.eventPhase=0,this.defaultPrevented=!1,this.currentTarget=null,this.cancelable=f?Boolean(f):!1,this.cancelBubble=!1,this.bubbles=m?Boolean(m):!1,this.code=typeof g=="number"?parseInt(g,10):0,this.reason=""+(w||""),this.wasClean=_?Boolean(_):!1}return i&&(c.__proto__=i),c.prototype=Object.create(i&&i.prototype),c.prototype.constructor=c,c}(Q);function q(i){var c=i.type,d=i.target,a=new Nn(c);return d&&(a.target=d,a.srcElement=d,a.currentTarget=d),a}function ie(i){var c=i.type,d=i.origin,a=i.data,m=i.target,f=new xn(c,{data:a,origin:d});return m&&(f.target=m,f.srcElement=m,f.currentTarget=m),f}function V(i){var c=i.code,d=i.reason,a=i.type,m=i.target,f=i.wasClean;f||(f=c===U.CLOSE_NORMAL||c===U.CLOSE_NO_STATUS);var g=new In(a,{code:c,reason:d,wasClean:f});return m&&(g.target=m,g.srcElement=m,g.currentTarget=m),g}function ht(i,c,d){i.readyState=L.CLOSING;var a=C.serverLookup(i.url),m=V({type:"close",target:i.target,code:c,reason:d});ae(function(){C.removeWebSocket(i,i.url),i.readyState=L.CLOSED,i.dispatchEvent(m),a&&a.dispatchEvent(m,a)},i)}function Cn(i,c,d){i.readyState=L.CLOSING;var a=C.serverLookup(i.url),m=V({type:"close",target:i.target,code:c,reason:d,wasClean:!1}),f=q({type:"error",target:i.target});ae(function(){C.removeWebSocket(i,i.url),i.readyState=L.CLOSED,i.dispatchEvent(f),i.dispatchEvent(m),a&&a.dispatchEvent(m,a)},i)}function ke(i){return Object.prototype.toString.call(i)!=="[object Blob]"&&!(i instanceof ArrayBuffer)&&(i=String(i)),i}var Ve=new WeakMap;function kt(i){if(Ve.has(i))return Ve.get(i);var c=new Proxy(i,{get:function(d,a){if(a==="close")return function(f){f===void 0&&(f={});var g=f.code||U.CLOSE_NORMAL,w=f.reason||"";ht(c,g,w)};if(a==="send")return function(f){f=ke(f),i.dispatchEvent(ie({type:"message",data:f,origin:this.url,target:i}))};var m=function(f){return f==="message"?"server::"+f:f};return a==="on"?function(f,g){i.addEventListener(m(f),g)}:a==="off"?function(f,g){i.removeEventListener(m(f),g)}:a==="target"?i:d[a]}});return Ve.set(i,c),c}function Pn(i){var c=encodeURIComponent(i).match(/%[89ABab]/g);return i.length+(c?c.length:0)}function Ln(i){var c=new Ue(i),d=c.pathname,a=c.protocol,m=c.hash;if(!i)throw new TypeError(M.CONSTRUCTOR_ERROR+" 1 argument required, but only 0 present.");if(d||(c.pathname="/"),a==="")throw new SyntaxError(M.CONSTRUCTOR_ERROR+" The URL '"+c.toString()+"' is invalid.");if(a!=="ws:"&&a!=="wss:")throw new SyntaxError(M.CONSTRUCTOR_ERROR+" The URL's scheme must be either 'ws' or 'wss'. '"+a+"' is not allowed.");if(m!=="")throw new SyntaxError(M.CONSTRUCTOR_ERROR+" The URL contains a fragment identifier ('"+m+"'). Fragment identifiers are not allowed in WebSocket URLs.");return c.toString()}function An(i){if(i===void 0&&(i=[]),!Array.isArray(i)&&typeof i!="string")throw new SyntaxError(M.CONSTRUCTOR_ERROR+" The subprotocol '"+i.toString()+"' is invalid.");typeof i=="string"&&(i=[i]);var c=i.map(function(a){return{count:1,protocol:a}}).reduce(function(a,m){return a[m.protocol]=(a[m.protocol]||0)+m.count,a},{}),d=Object.keys(c).filter(function(a){return c[a]>1});if(d.length>0)throw new SyntaxError(M.CONSTRUCTOR_ERROR+" The subprotocol '"+d[0]+"' is duplicated.");return i}var L=function(i){function c(a,m){i.call(this),this._onopen=null,this._onmessage=null,this._onerror=null,this._onclose=null,this.url=Ln(a),m=An(m),this.protocol=m[0]||"",this.binaryType="blob",this.readyState=c.CONNECTING;var f=kt(this),g=C.attachWebSocket(f,this.url);ae(function(){if(this.readyState===c.CONNECTING)if(g)if(g.options.verifyClient&&typeof g.options.verifyClient=="function"&&!g.options.verifyClient())this.readyState=c.CLOSED,he("error","WebSocket connection to '"+this.url+"' failed: HTTP Authentication failed; no valid credentials available"),C.removeWebSocket(f,this.url),this.dispatchEvent(q({type:"error",target:this})),this.dispatchEvent(V({type:"close",target:this,code:U.CLOSE_NORMAL}));else{if(g.options.selectProtocol&&typeof g.options.selectProtocol=="function"){var w=g.options.selectProtocol(m),_=w!=="",A=m.indexOf(w)!==-1;if(_&&!A){this.readyState=c.CLOSED,he("error","WebSocket connection to '"+this.url+"' failed: Invalid Sub-Protocol"),C.removeWebSocket(f,this.url),this.dispatchEvent(q({type:"error",target:this})),this.dispatchEvent(V({type:"close",target:this,code:U.CLOSE_NORMAL}));return}this.protocol=w}this.readyState=c.OPEN,this.dispatchEvent(q({type:"open",target:this})),g.dispatchEvent(q({type:"connection"}),f)}else this.readyState=c.CLOSED,this.dispatchEvent(q({type:"error",target:this})),this.dispatchEvent(V({type:"close",target:this,code:U.CLOSE_NORMAL})),he("error","WebSocket connection to '"+this.url+"' failed")},this)}i&&(c.__proto__=i),c.prototype=Object.create(i&&i.prototype),c.prototype.constructor=c;var d={onopen:{},onmessage:{},onclose:{},onerror:{}};return d.onopen.get=function(){return this._onopen},d.onmessage.get=function(){return this._onmessage},d.onclose.get=function(){return this._onclose},d.onerror.get=function(){return this._onerror},d.onopen.set=function(a){this.removeEventListener("open",this._onopen),this._onopen=a,this.addEventListener("open",a)},d.onmessage.set=function(a){this.removeEventListener("message",this._onmessage),this._onmessage=a,this.addEventListener("message",a)},d.onclose.set=function(a){this.removeEventListener("close",this._onclose),this._onclose=a,this.addEventListener("close",a)},d.onerror.set=function(a){this.removeEventListener("error",this._onerror),this._onerror=a,this.addEventListener("error",a)},c.prototype.send=function(a){var m=this;if(this.readyState===c.CONNECTING)throw new Error("Failed to execute 'send' on 'WebSocket': Still in CONNECTING state");var f=ie({type:"server::message",origin:this.url,data:ke(a)}),g=C.serverLookup(this.url);g&&ae(function(){m.dispatchEvent(f,a)},g)},c.prototype.close=function(a,m){if(a!==void 0&&(typeof a!="number"||a!==1e3&&(a<3e3||a>4999)))throw new TypeError(M.CLOSE_ERROR+" The code must be either 1000, or between 3000 and 4999. "+a+" is neither.");if(m!==void 0){var f=Pn(m);if(f>123)throw new SyntaxError(M.CLOSE_ERROR+" The message must not be greater than 123 bytes.")}if(!(this.readyState===c.CLOSING||this.readyState===c.CLOSED)){var g=kt(this);this.readyState===c.CONNECTING?Cn(g,a||U.CLOSE_ABNORMAL,m):ht(g,a||U.CLOSE_NO_STATUS,m)}},Object.defineProperties(c.prototype,d),c}(H);L.CONNECTING=0,L.prototype.CONNECTING=L.CONNECTING,L.OPEN=1,L.prototype.OPEN=L.OPEN,L.CLOSING=2,L.prototype.CLOSING=L.CLOSING,L.CLOSED=3,L.prototype.CLOSED=L.CLOSED;var ee=function(i){function c(a,m){var f=this;a===void 0&&(a="socket.io"),m===void 0&&(m=""),i.call(this),this.binaryType="blob";var g=new Ue(a);g.pathname||(g.pathname="/"),this.url=g.toString(),this.readyState=c.CONNECTING,this.protocol="",this.target=this,typeof m=="string"||typeof m=="object"&&m!==null?this.protocol=m:Array.isArray(m)&&m.length>0&&(this.protocol=m[0]);var w=C.attachWebSocket(this,this.url);ae(function(){w?(this.readyState=c.OPEN,w.dispatchEvent(q({type:"connection"}),w,this),w.dispatchEvent(q({type:"connect"}),w,this),this.dispatchEvent(q({type:"connect",target:this}))):(this.readyState=c.CLOSED,this.dispatchEvent(q({type:"error",target:this})),this.dispatchEvent(V({type:"close",target:this,code:U.CLOSE_NORMAL})),he("error","Socket.io connection to '"+this.url+"' failed"))},this),this.addEventListener("close",function(_){f.dispatchEvent(V({type:"disconnect",target:_.target,code:_.code}))})}i&&(c.__proto__=i),c.prototype=Object.create(i&&i.prototype),c.prototype.constructor=c;var d={broadcast:{}};return c.prototype.close=function(){if(this.readyState===c.OPEN){var a=C.serverLookup(this.url);return C.removeWebSocket(this,this.url),this.readyState=c.CLOSED,this.dispatchEvent(V({type:"close",target:this,code:U.CLOSE_NORMAL})),a&&a.dispatchEvent(V({type:"disconnect",target:this,code:U.CLOSE_NORMAL}),a),this}},c.prototype.disconnect=function(){return this.close()},c.prototype.emit=function(a){for(var m=[],f=arguments.length-1;f-- >0;)m[f]=arguments[f+1];if(this.readyState!==c.OPEN)throw new Error("SocketIO is already in CLOSING or CLOSED state");var g=ie({type:a,origin:this.url,data:m}),w=C.serverLookup(this.url);return w&&w.dispatchEvent.apply(w,[g].concat(m)),this},c.prototype.send=function(a){return this.emit("message",a),this},d.broadcast.get=function(){if(this.readyState!==c.OPEN)throw new Error("SocketIO is already in CLOSING or CLOSED state");var a=this,m=C.serverLookup(this.url);if(!m)throw new Error("SocketIO can not find a server at the specified URL ("+this.url+")");return{emit:function(f,g){return m.emit(f,g,{websockets:C.websocketsLookup(a.url,null,a)}),a},to:function(f){return m.to(f,a)},in:function(f){return m.in(f,a)}}},c.prototype.on=function(a,m){return this.addEventListener(a,m),this},c.prototype.off=function(a,m){this.removeEventListener(a,m)},c.prototype.hasListeners=function(a){var m=this.listeners[a];return Array.isArray(m)?!!m.length:!1},c.prototype.join=function(a){C.addMembershipToRoom(this,a)},c.prototype.leave=function(a){C.removeMembershipFromRoom(this,a)},c.prototype.to=function(a){return this.broadcast.to(a)},c.prototype.in=function(){return this.to.apply(null,arguments)},c.prototype.dispatchEvent=function(a){for(var m=this,f=[],g=arguments.length-1;g-- >0;)f[g]=arguments[g+1];var w=a.type,_=this.listeners[w];if(!Array.isArray(_))return!1;_.forEach(function(A){f.length>0?A.apply(m,f):A.call(m,a.data?a.data:a)})},Object.defineProperties(c.prototype,d),c}(H);ee.CONNECTING=0,ee.OPEN=1,ee.CLOSING=2,ee.CLOSED=3;var Ge=function(i,c){return new ee(i,c)};Ge.connect=function(i,c){return Ge(i,c)};var Bn=function(i){return i.reduce(function(c,d){return c.indexOf(d)>-1?c:c.concat(d)},[])};function gt(){return typeof window!="undefined"?window:typeof process=="object"&&typeof Ns=="function"&&typeof ce=="object"?ce:this}var Tt={mock:!0,verifyClient:null,selectProtocol:null},je=function(i){function c(d,a){a===void 0&&(a=Tt),i.call(this);var m=new Ue(d);m.pathname||(m.pathname="/"),this.url=m.toString(),this.originalWebSocket=null;var f=C.attachServer(this,this.url);if(!f)throw this.dispatchEvent(q({type:"error"})),new Error("A mock server is already listening on this url");this.options=Object.assign({},Tt,a),this.options.mock&&this.mockWebsocket()}return i&&(c.__proto__=i),c.prototype=Object.create(i&&i.prototype),c.prototype.constructor=c,c.prototype.mockWebsocket=function(){var d=gt();this.originalWebSocket=d.WebSocket,d.WebSocket=L},c.prototype.restoreWebsocket=function(){var d=gt();this.originalWebSocket!==null&&(d.WebSocket=this.originalWebSocket),this.originalWebSocket=null},c.prototype.stop=function(d){d===void 0&&(d=function(){}),this.options.mock&&this.restoreWebsocket(),C.removeServer(this.url),typeof d=="function"&&d()},c.prototype.on=function(d,a){this.addEventListener(d,a)},c.prototype.off=function(d,a){this.removeEventListener(d,a)},c.prototype.close=function(d){d===void 0&&(d={});var a=d.code,m=d.reason,f=d.wasClean,g=C.websocketsLookup(this.url);C.removeServer(this.url),g.forEach(function(w){w.readyState=L.CLOSED,w.dispatchEvent(V({type:"close",target:w.target,code:a||U.CLOSE_NORMAL,reason:m||"",wasClean:f}))}),this.dispatchEvent(V({type:"close"}),this)},c.prototype.emit=function(d,a,m){var f=this;m===void 0&&(m={});var g=m.websockets;g||(g=C.websocketsLookup(this.url));var w;typeof m!="object"||arguments.length>3?(a=Array.prototype.slice.call(arguments,1,arguments.length),w=a.map(function(_){return ke(_)})):w=ke(a),g.forEach(function(_){var A=_ instanceof ee?a:w;Array.isArray(A)?_.dispatchEvent.apply(_,[ie({type:d,data:A,origin:f.url,target:_.target})].concat(A)):_.dispatchEvent(ie({type:d,data:A,origin:f.url,target:_.target}))})},c.prototype.clients=function(){return C.websocketsLookup(this.url)},c.prototype.to=function(d,a,m){var f=this;m===void 0&&(m=[]);var g=this,w=Bn(m.concat(C.websocketsLookup(this.url,d,a)));return{to:function(_,A){return f.to.call(f,_,A,w)},emit:function(_,A){g.emit(_,A,{websockets:w})}}},c.prototype.in=function(){for(var d=[],a=arguments.length;a--;)d[a]=arguments[a];return this.to.apply(null,d)},c.prototype.simulate=function(d){var a=C.websocketsLookup(this.url);d==="error"&&a.forEach(function(m){m.readyState=L.CLOSED,m.dispatchEvent(q({type:"error",target:m.target}))})},c}(H);je.of=function(i){return new je(i)};var Dn=je,Mn=L,Fn=Ge;n.Server=Dn,n.WebSocket=Mn,n.SocketIO=Fn,Object.defineProperty(n,"__esModule",{value:!0})})})(xs,pe);var He={},Is={get exports(){return He},set exports(e){He=e}},se=typeof Reflect=="object"?Reflect:null,At=se&&typeof se.apply=="function"?se.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},ve;se&&typeof se.ownKeys=="function"?ve=se.ownKeys:Object.getOwnPropertySymbols?ve=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:ve=function(e){return Object.getOwnPropertyNames(e)};function Cs(e){console&&console.warn&&console.warn(e)}var sn=Number.isNaN||function(e){return e!==e};function S(){S.init.call(this)}Is.exports=S;He.once=Bs;S.EventEmitter=S;S.prototype._events=void 0;S.prototype._eventsCount=0;S.prototype._maxListeners=void 0;var Bt=10;function Ae(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(S,"defaultMaxListeners",{enumerable:!0,get:function(){return Bt},set:function(e){if(typeof e!="number"||e<0||sn(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");Bt=e}});S.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};S.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||sn(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function rn(e){return e._maxListeners===void 0?S.defaultMaxListeners:e._maxListeners}S.prototype.getMaxListeners=function(){return rn(this)};S.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var s=e==="error",r=this._events;if(r!==void 0)s=s&&r.error===void 0;else if(!s)return!1;if(s){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var u=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw u.context=o,u}var p=r[e];if(p===void 0)return!1;if(typeof p=="function")At(p,this,t);else for(var h=p.length,T=un(p,h),n=0;n<h;++n)At(T[n],this,t);return!0};function on(e,t,n,s){var r,o,u;if(Ae(n),o=e._events,o===void 0?(o=e._events=Object.create(null),e._eventsCount=0):(o.newListener!==void 0&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),u=o[t]),u===void 0)u=o[t]=n,++e._eventsCount;else if(typeof u=="function"?u=o[t]=s?[n,u]:[u,n]:s?u.unshift(n):u.push(n),r=rn(e),r>0&&u.length>r&&!u.warned){u.warned=!0;var p=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");p.name="MaxListenersExceededWarning",p.emitter=e,p.type=t,p.count=u.length,Cs(p)}return e}S.prototype.addListener=function(e,t){return on(this,e,t,!1)};S.prototype.on=S.prototype.addListener;S.prototype.prependListener=function(e,t){return on(this,e,t,!0)};function Ps(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function an(e,t,n){var s={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},r=Ps.bind(s);return r.listener=n,s.wrapFn=r,r}S.prototype.once=function(e,t){return Ae(t),this.on(e,an(this,e,t)),this};S.prototype.prependOnceListener=function(e,t){return Ae(t),this.prependListener(e,an(this,e,t)),this};S.prototype.removeListener=function(e,t){var n,s,r,o,u;if(Ae(t),s=this._events,s===void 0)return this;if(n=s[e],n===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete s[e],s.removeListener&&this.emit("removeListener",e,n.listener||t));else if(typeof n!="function"){for(r=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){u=n[o].listener,r=o;break}if(r<0)return this;r===0?n.shift():Ls(n,r),n.length===1&&(s[e]=n[0]),s.removeListener!==void 0&&this.emit("removeListener",e,u||t)}return this};S.prototype.off=S.prototype.removeListener;S.prototype.removeAllListeners=function(e){var t,n,s;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var r=Object.keys(n),o;for(s=0;s<r.length;++s)o=r[s],o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(t=n[e],typeof t=="function")this.removeListener(e,t);else if(t!==void 0)for(s=t.length-1;s>=0;s--)this.removeListener(e,t[s]);return this};function cn(e,t,n){var s=e._events;if(s===void 0)return[];var r=s[t];return r===void 0?[]:typeof r=="function"?n?[r.listener||r]:[r]:n?As(r):un(r,r.length)}S.prototype.listeners=function(e){return cn(this,e,!0)};S.prototype.rawListeners=function(e){return cn(this,e,!1)};S.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):ln.call(e,t)};S.prototype.listenerCount=ln;function ln(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}S.prototype.eventNames=function(){return this._eventsCount>0?ve(this._events):[]};function un(e,t){for(var n=new Array(t),s=0;s<t;++s)n[s]=e[s];return n}function Ls(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function As(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function Bs(e,t){return new Promise(function(n,s){function r(u){e.removeListener(t,o),s(u)}function o(){typeof e.removeListener=="function"&&e.removeListener("error",r),n([].slice.call(arguments))}dn(e,t,o,{once:!0}),t!=="error"&&Ds(e,r,{once:!0})})}function Ds(e,t,n){typeof e.on=="function"&&dn(e,"error",t,n)}function dn(e,t,n,s){if(typeof e.on=="function")s.once?e.once(t,n):e.on(t,n);else if(typeof e.addEventListener=="function")e.addEventListener(t,function r(o){s.once&&e.removeEventListener(t,r),n(o)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}class Ms extends l{constructor(){super("message.v1.SocketMessage",[{no:1,name:"event",kind:"scalar",T:13},{no:2,name:"id",kind:"scalar",opt:!0,T:9},{no:3,name:"payload",kind:"scalar",opt:!0,T:12},{no:4,name:"metadata",kind:"scalar",opt:!0,T:12}])}}const Dt=new Ms;var xe;(function(e){e[e.PUBLISHER=0]="PUBLISHER",e[e.SUBSCRIBER=1]="SUBSCRIBER"})(xe||(xe={}));var Qe;(function(e){e[e.AUDIO=0]="AUDIO",e[e.VIDEO=1]="VIDEO"})(Qe||(Qe={}));class Fs extends l{constructor(){super("media.Codec",[{no:1,name:"channels",kind:"scalar",opt:!0,T:5},{no:2,name:"clock_rate",kind:"scalar",T:5},{no:3,name:"mime_type",kind:"scalar",T:9},{no:4,name:"sdp_fmtp_line",kind:"scalar",opt:!0,T:9},{no:5,name:"payload_type",kind:"scalar",opt:!0,T:13}])}}const pn=new Fs;class Us extends l{constructor(){super("media.HeaderExtension",[{no:1,name:"direction",kind:"scalar",opt:!0,T:9},{no:2,name:"uri",kind:"scalar",T:9}])}}const qs=new Us;class Vs extends l{constructor(){super("media.Fingerprint",[{no:1,name:"algorithm",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9}])}}new Vs;class Gs extends l{constructor(){super("media.SessionDescription",[{no:1,name:"target",kind:"enum",T:()=>["media.Target",xe]},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"sdp",kind:"scalar",T:9}])}}const j=new Gs;class js extends l{constructor(){super("media.ProducerPayload",[{no:1,name:"kind",kind:"scalar",T:9},{no:2,name:"paused",kind:"scalar",T:8},{no:3,name:"screen_share",kind:"scalar",T:8},{no:4,name:"msid",kind:"scalar",T:9},{no:5,name:"app_data",kind:"scalar",opt:!0,T:9},{no:6,name:"mime_type",kind:"scalar",opt:!0,T:9}])}}const Ws=new js;class Ks extends l{constructor(){super("media.CreateTransportRequest",[{no:1,name:"consuming",kind:"scalar",T:8},{no:2,name:"force_tcp",kind:"scalar",opt:!0,T:8},{no:3,name:"description",kind:"message",T:()=>j},{no:4,name:"private_ice",kind:"scalar",opt:!0,T:8},{no:5,name:"producers",kind:"message",repeat:1,T:()=>Ws}])}}new Ks;class Js extends l{constructor(){super("media.AudioActivityRequest",[{no:1,name:"producer_id",kind:"scalar",T:9},{no:2,name:"energy",kind:"scalar",T:5},{no:3,name:"silent",kind:"scalar",T:8}])}}new Js;class Zs extends l{constructor(){super("media.CreateTransportResponse",[{no:1,name:"transport_id",kind:"scalar",T:9},{no:2,name:"description",kind:"message",T:()=>j},{no:3,name:"transcription_enabled",kind:"scalar",opt:!0,T:8},{no:4,name:"producer_ids",kind:"scalar",repeat:2,T:9}])}}const mn=new Zs;class Xs extends l{constructor(){super("media.RenegotiateRequest",[{no:1,name:"transport_id",kind:"scalar",T:9},{no:2,name:"description",kind:"message",T:()=>j}])}}new Xs;class $s extends l{constructor(){super("media.RenegotiateResponse",[{no:1,name:"transport_id",kind:"scalar",T:9},{no:2,name:"description",kind:"message",T:()=>j}])}}new $s;class Ys extends l{constructor(){super("media.NestedScore",[{no:1,name:"encoding_idx",kind:"scalar",T:5},{no:2,name:"rid",kind:"scalar",T:9},{no:3,name:"score",kind:"scalar",T:5},{no:4,name:"ssrc",kind:"scalar",T:3,L:0}])}}const zs=new Ys;class Hs extends l{constructor(){super("media.ProducerTrack",[{no:1,name:"track_id",kind:"scalar",T:9},{no:2,name:"producer_id",kind:"scalar",T:9},{no:3,name:"stream_id",kind:"scalar",T:9}])}}const Qs=new Hs;class er extends l{constructor(){super("media.ProducerEntry",[{no:1,name:"producing_transport_id",kind:"scalar",T:9},{no:2,name:"producer_id",kind:"scalar",T:9}])}}new er;class tr extends l{constructor(){super("media.ConsumerEntry",[{no:1,name:"consuming_transport_id",kind:"scalar",T:9},{no:2,name:"consumer_id",kind:"scalar",T:9}])}}new tr;class nr extends l{constructor(){super("media.ProducerState",[{no:1,name:"producer_id",kind:"scalar",T:9},{no:2,name:"kind",kind:"enum",T:()=>["media.ProducerKind",Qe]},{no:3,name:"pause",kind:"scalar",T:8},{no:4,name:"screen_share",kind:"scalar",T:8},{no:5,name:"app_data",kind:"scalar",opt:!0,T:9},{no:6,name:"producing_transport_id",kind:"scalar",opt:!0,T:9},{no:7,name:"mime_type",kind:"scalar",opt:!0,T:9},{no:8,name:"codec",kind:"message",T:()=>pn}])}}const fe=new nr;class sr extends l{constructor(){super("media.ConsumerState",[{no:1,name:"consumer_id",kind:"scalar",T:9},{no:2,name:"producer_state",kind:"message",T:()=>fe},{no:3,name:"producer_track",kind:"message",T:()=>Qs},{no:4,name:"error_code",kind:"scalar",opt:!0,T:9}])}}const rr=new sr;class or extends l{constructor(){super("media.ProducerIdToConsumerMap",[{no:1,name:"map",kind:"map",K:9,V:{kind:"message",T:()=>rr}}])}}const fn=new or;class ar extends l{constructor(){super("media.PeerRtpCapabilitites",[{no:1,name:"sender",kind:"message",T:()=>Ft},{no:2,name:"receiver",kind:"message",T:()=>Ft}])}}const hn=new ar;class ir extends l{constructor(){super("media.RtpCapability",[{no:1,name:"codecs",kind:"message",repeat:1,T:()=>pn},{no:2,name:"header_extensions",kind:"message",repeat:1,T:()=>qs}])}}const Mt=new ir;class cr extends l{constructor(){super("media.RtpCapabilitites",[{no:1,name:"audio",kind:"message",T:()=>Mt},{no:2,name:"video",kind:"message",T:()=>Mt}])}}const Ft=new cr;class lr extends l{constructor(){super("media.PreferredCodec",[{no:1,name:"audio",kind:"scalar",opt:!0,T:9},{no:2,name:"video",kind:"scalar",opt:!0,T:9}])}}const ur=new lr;class dr extends l{constructor(){super("media.edge.GeoLocation",[{no:1,name:"latitude",kind:"scalar",T:2},{no:2,name:"longitude",kind:"scalar",T:2},{no:3,name:"region",kind:"scalar",opt:!0,T:9}])}}const pr=new dr;class mr extends l{constructor(){super("media.edge.PeerJoinRequest",[{no:1,name:"display_name",kind:"scalar",opt:!0,T:9},{no:2,name:"prejoined",kind:"scalar",T:8},{no:3,name:"room_uuid",kind:"scalar",T:9},{no:4,name:"meeting_id",kind:"scalar",opt:!0,T:9},{no:5,name:"preset",kind:"scalar",opt:!0,T:12},{no:6,name:"user_id",kind:"scalar",opt:!0,T:9},{no:7,name:"organization_id",kind:"scalar",opt:!0,T:9},{no:8,name:"location",kind:"message",T:()=>pr},{no:9,name:"capabilities",kind:"message",T:()=>hn}])}}new mr;class fr extends l{constructor(){super("media.edge.PeerJoinCompleteRequest",[])}}new fr;class hr extends l{constructor(){super("media.edge.PeerLeaveRequest",[{no:1,name:"close_room",kind:"scalar",T:8}])}}new hr;class kr extends l{constructor(){super("media.edge.ConsumeMultipleProducerRequest",[{no:1,name:"producer_ids",kind:"scalar",repeat:2,T:9},{no:2,name:"paused",kind:"scalar",opt:!0,T:8}])}}new kr;class gr extends l{constructor(){super("media.edge.ConsumePeerRequest",[{no:1,name:"producing_peer_id",kind:"scalar",T:9},{no:2,name:"paused",kind:"scalar",opt:!0,T:8},{no:3,name:"producer_id",kind:"scalar",opt:!0,T:9},{no:4,name:"preferred_codec",kind:"message",T:()=>ur},{no:5,name:"producing_transport_id",kind:"scalar",opt:!0,T:9}])}}const Tr=new gr;class wr extends l{constructor(){super("media.edge.ConsumePeersRequest",[{no:1,name:"requests",kind:"message",repeat:1,T:()=>Tr},{no:2,name:"consuming_transport_id",kind:"scalar",opt:!0,T:9}])}}new wr;class yr extends l{constructor(){super("media.edge.ProducerCreateRequest",[{no:1,name:"kind",kind:"scalar",T:9},{no:2,name:"paused",kind:"scalar",T:8},{no:3,name:"screen_share",kind:"scalar",T:8},{no:4,name:"description",kind:"message",T:()=>j},{no:5,name:"msid",kind:"scalar",T:9},{no:6,name:"app_data",kind:"scalar",opt:!0,T:9},{no:7,name:"mime_type",kind:"scalar",opt:!0,T:9},{no:8,name:"producing_transport_id",kind:"scalar",opt:!0,T:9}])}}new yr;class _r extends l{constructor(){super("media.edge.SelectedPeersRequest",[])}}new _r;class br extends l{constructor(){super("media.edge.GlobalPeerPinningRequest",[{no:1,name:"participant_id",kind:"scalar",T:9}])}}new br;class vr extends l{constructor(){super("media.edge.ProducerToggleRequest",[{no:1,name:"producer_id",kind:"scalar",T:9},{no:2,name:"pause",kind:"scalar",T:8}])}}new vr;class Rr extends l{constructor(){super("media.edge.ConsumerToggleRequest",[{no:1,name:"consumer_id",kind:"scalar",T:9},{no:2,name:"pause",kind:"scalar",T:8}])}}new Rr;class Er extends l{constructor(){super("media.edge.ProducerCloseRequest",[{no:1,name:"producer_id",kind:"scalar",T:9},{no:2,name:"description",kind:"message",T:()=>j},{no:3,name:"producing_transport_id",kind:"scalar",opt:!0,T:9}])}}new Er;class Or extends l{constructor(){super("media.edge.ConsumerCloseRequest",[{no:1,name:"consumer_ids",kind:"scalar",repeat:2,T:9},{no:2,name:"description",kind:"message",T:()=>j},{no:3,name:"consuming_transport_id",kind:"scalar",opt:!0,T:9}])}}new Or;class Sr extends l{constructor(){super("media.edge.KickPeerRequest",[{no:1,name:"participant_id",kind:"scalar",T:9}])}}new Sr;class Nr extends l{constructor(){super("media.edge.KickAllPeersRequest",[{no:1,name:"propagate_kick_across_rooms",kind:"scalar",T:8}])}}new Nr;class xr extends l{constructor(){super("media.edge.PeerDisplayNameEditRequest",[{no:1,name:"participant_id",kind:"scalar",T:9},{no:2,name:"display_name",kind:"scalar",T:9}])}}new xr;class Ir extends l{constructor(){super("media.edge.HostMediaControlForPeerRequest",[{no:1,name:"participant_id",kind:"scalar",T:9},{no:2,name:"audio",kind:"scalar",T:8},{no:3,name:"video",kind:"scalar",T:8},{no:4,name:"scree_share",kind:"scalar",T:8}])}}new Ir;class Cr extends l{constructor(){super("media.edge.HostMediaControlForAllPeerRequest",[{no:1,name:"audio",kind:"scalar",T:8},{no:2,name:"video",kind:"scalar",T:8},{no:3,name:"screen_share",kind:"scalar",T:8}])}}new Cr;class Pr extends l{constructor(){super("media.edge.GetRoomStateResponse",[{no:1,name:"display_title",kind:"scalar",T:9},{no:2,name:"locked_mode",kind:"scalar",T:8},{no:3,name:"room_uuid",kind:"scalar",T:9},{no:4,name:"room_name",kind:"scalar",T:9},{no:5,name:"current_peer_id",kind:"scalar",T:9},{no:6,name:"is_recording",kind:"scalar",opt:!0,T:8},{no:7,name:"recorder_participant_id",kind:"scalar",opt:!0,T:9},{no:8,name:"pinned_peer_ids",kind:"scalar",repeat:2,T:9}])}}const Lr=new Pr;class Ar extends l{constructor(){super("media.edge.ErrorResponse",[{no:1,name:"error_message",kind:"scalar",T:9},{no:2,name:"event_id",kind:"scalar",T:5}])}}new Ar;class Br extends l{constructor(){super("media.edge.EmptyResponse",[])}}new Br;class Dr extends l{constructor(){super("media.edge.RoomParticipants",[{no:1,name:"peer_id",kind:"scalar",T:9},{no:2,name:"producer_states",kind:"message",repeat:1,T:()=>fe},{no:3,name:"display_name",kind:"scalar",T:9},{no:4,name:"user_id",kind:"scalar",opt:!0,T:9},{no:5,name:"capabilities",kind:"message",T:()=>hn}])}}const kn=new Dr;class Mr extends l{constructor(){super("media.edge.SelectedPeersResponse",[{no:1,name:"audio_peers",kind:"scalar",repeat:2,T:9},{no:2,name:"compulsory_peers",kind:"scalar",repeat:2,T:9}])}}const Fr=new Mr;class Ur extends l{constructor(){super("media.edge.SelectedPeersDiffEntry",[{no:1,name:"peer_id",kind:"scalar",T:9},{no:2,name:"priority",kind:"scalar",T:5}])}}const qr=new Ur;class Vr extends l{constructor(){super("media.edge.SelectedPeersDiffResponse",[{no:1,name:"entries",kind:"message",repeat:1,T:()=>qr}])}}new Vr;class Gr extends l{constructor(){super("media.edge.PeerJoinResponse",[])}}new Gr;class jr extends l{constructor(){super("media.edge.PeerJoinCompleteResponse",[{no:1,name:"room_state",kind:"message",T:()=>Lr},{no:2,name:"participants",kind:"message",repeat:1,T:()=>kn},{no:3,name:"selected_peers",kind:"message",T:()=>Fr},{no:4,name:"max_preferred_streams",kind:"scalar",T:5}])}}const Wr=new jr;class Kr extends l{constructor(){super("media.edge.PeerLeaveResponse",[{no:1,name:"closed",kind:"scalar",T:8}])}}new Kr;class Jr extends l{constructor(){super("media.edge.ConsumeMultipleProducerResponse",[{no:1,name:"status",kind:"scalar",T:8},{no:2,name:"consumer_ids_map",kind:"message",T:()=>fn}])}}new Jr;class Zr extends l{constructor(){super("media.edge.ConsumePeerResponse",[{no:1,name:"status",kind:"scalar",T:8},{no:2,name:"consumer_ids_map",kind:"message",T:()=>fn},{no:3,name:"description",kind:"message",T:()=>j}])}}new Zr;class Xr extends l{constructor(){super("media.edge.ProducerCreateResponse",[{no:1,name:"status",kind:"scalar",T:8},{no:2,name:"producer_id",kind:"scalar",T:9},{no:4,name:"description",kind:"message",T:()=>j}])}}const $r=new Xr;class Yr extends l{constructor(){super("media.edge.ProducerScoreResponse",[{no:1,name:"responseid",kind:"scalar",T:9},{no:2,name:"score",kind:"message",T:()=>zs}])}}new Yr;class zr extends l{constructor(){super("media.edge.ActiveSpeakerResponse",[{no:1,name:"responsepeer_id",kind:"scalar",T:9},{no:2,name:"volume",kind:"scalar",T:5}])}}new zr;class Hr extends l{constructor(){super("media.edge.NoActiveSpeakerResponse",[])}}new Hr;class Qr extends l{constructor(){super("media.edge.ProducerToggleResponse",[])}}new Qr;class eo extends l{constructor(){super("media.edge.ConsumerToggleResponse",[])}}new eo;class to extends l{constructor(){super("media.edge.ProducerClosingResponse",[{no:1,name:"description",kind:"message",T:()=>j}])}}new to;class no extends l{constructor(){super("media.edge.ConsumerClosingResponse",[{no:1,name:"description",kind:"message",T:()=>j}])}}new no;class so extends l{constructor(){super("media.edge.GlobalPeerPinningResponse",[])}}new so;class ro extends l{constructor(){super("media.edge.KickPeerResponse",[{no:1,name:"status",kind:"scalar",T:9}])}}new ro;class oo extends l{constructor(){super("media.edge.KickAllPeersResponse",[{no:1,name:"status",kind:"scalar",T:9}])}}new oo;class ao extends l{constructor(){super("media.edge.HostMediaControlForPeerResponse",[{no:1,name:"status",kind:"scalar",T:9}])}}new ao;class io extends l{constructor(){super("media.edge.HostMediaControlForAllPeerResponse",[{no:1,name:"status",kind:"scalar",T:9}])}}new io;class co extends l{constructor(){super("media.edge.PeerDisplayNameEditResponse",[{no:1,name:"status",kind:"scalar",T:9}])}}new co;class lo extends l{constructor(){super("media.edge.PeerJoinBroadcastResponse",[{no:1,name:"participant",kind:"message",T:()=>kn}])}}new lo;class uo extends l{constructor(){super("media.edge.TrackSubscriptionKind",[{no:1,name:"audio",kind:"scalar",T:8},{no:2,name:"video",kind:"scalar",T:8}])}}const Ut=new uo;class po extends l{constructor(){super("media.edge.TrackSubscription",[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"webcam",kind:"message",T:()=>Ut},{no:3,name:"screenshare",kind:"message",T:()=>Ut}])}}const mo=new po;class fo extends l{constructor(){super("media.edge.PeerProducingTransportCreateBroadcastResponse",[{no:1,name:"participant_id",kind:"scalar",T:9},{no:2,name:"transport_details",kind:"message",T:()=>mn},{no:3,name:"track_subscriptions",kind:"message",repeat:1,T:()=>mo}])}}new fo;class ho extends l{constructor(){super("media.edge.PeerProducerCreateBroadcastResponse",[{no:1,name:"participant_id",kind:"scalar",T:9},{no:2,name:"producer_state",kind:"message",T:()=>fe}])}}new ho;class ko extends l{constructor(){super("media.edge.PeerProducerToggleBroadcastResponse",[{no:1,name:"participant_id",kind:"scalar",T:9},{no:2,name:"producer_state",kind:"message",T:()=>fe},{no:3,name:"initiator_participant_id",kind:"scalar",opt:!0,T:9}])}}new ko;class go extends l{constructor(){super("media.edge.PeerProducerCloseBroadcastResponse",[{no:1,name:"participant_id",kind:"scalar",T:9},{no:2,name:"producer_state",kind:"message",T:()=>fe}])}}new go;class To extends l{constructor(){super("media.edge.PeerLeaveBroadcastResponse",[{no:1,name:"participant_id",kind:"scalar",T:9}])}}new To;class wo extends l{constructor(){super("media.edge.GlobalPeerPinningBroadcastResponse",[{no:1,name:"participant_id",kind:"scalar",T:9}])}}new wo;class yo extends l{constructor(){super("media.edge.GlobalPeerUnPinningBroadcastResponse",[{no:1,name:"participant_id",kind:"scalar",T:9}])}}new yo;class _o extends l{constructor(){super("media.edge.RecordingStartedBroadcastResponse",[{no:1,name:"participant_id",kind:"scalar",T:9}])}}new _o;class bo extends l{constructor(){super("media.edge.RecordingStoppedBroadcastResponse",[{no:1,name:"participant_id",kind:"scalar",T:9}])}}new bo;class vo extends l{constructor(){super("media.edge.PeerDisplayNameEditBroadcastResponse",[{no:1,name:"participant_id",kind:"scalar",T:9},{no:2,name:"display_name",kind:"scalar",T:9}])}}new vo;class Ro extends l{constructor(){super("media.edge.PeerPingRequestBroadcastResponse",[{no:1,name:"password",kind:"scalar",T:9}])}}new Ro;class Eo extends l{constructor(){super("media.edge.MediaRoomTerminationBroadcastResponse",[{no:1,name:"reason",kind:"scalar",T:9}])}}new Eo;class Oo extends l{constructor(){super("socket.ai.MeetingTranscript",[{no:1,name:"meeting_id",kind:"scalar",T:9},{no:2,name:"transcript",kind:"scalar",T:9},{no:3,name:"is_partial",kind:"scalar",T:8}])}}new Oo;class So extends l{constructor(){super("socket.api.BaseSocketHubMessage",[{no:1,name:"event",kind:"scalar",T:5},{no:2,name:"id",kind:"scalar",T:9},{no:3,name:"peer_id",kind:"scalar",T:9},{no:4,name:"room_id",kind:"scalar",T:9},{no:5,name:"user_id",kind:"scalar",T:9},{no:6,name:"payload",kind:"scalar",T:12},{no:7,name:"error",kind:"scalar",opt:!0,T:8},{no:8,name:"sid",kind:"scalar",opt:!0,T:9}])}}new So;class No extends l{constructor(){super("socket.api.ErrorMessage",[{no:1,name:"code",kind:"scalar",opt:!0,T:5},{no:2,name:"message",kind:"scalar",T:9}])}}new No;var Ie;(function(e){e[e.BROWSER=0]="BROWSER",e[e.TRACK=1]="TRACK",e[e.COMPOSITE=2]="COMPOSITE"})(Ie||(Ie={}));var me;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.ON_STAGE=1]="ON_STAGE",e[e.APPROVED_STAGE=2]="APPROVED_STAGE",e[e.REQUESTED_STAGE=3]="REQUESTED_STAGE",e[e.OFF_STAGE=4]="OFF_STAGE"})(me||(me={}));var et;(function(e){e[e.NONE=0]="NONE",e[e.RECORDER=1]="RECORDER",e[e.LIVESTREAMER=2]="LIVESTREAMER"})(et||(et={}));var tt;(function(e){e[e.PEERS=0]="PEERS",e[e.ROOMS=1]="ROOMS"})(tt||(tt={}));var nt;(function(e){e[e.HIVE=0]="HIVE",e[e.CHAT=1]="CHAT",e[e.PING=2]="PING"})(nt||(nt={}));class xo extends l{constructor(){super("socket.room.PeerFlags",[{no:1,name:"preset_name",kind:"scalar",T:9},{no:2,name:"recorder_type",kind:"scalar",T:9},{no:3,name:"hidden_participant",kind:"scalar",T:8}])}}const Io=new xo;class Co extends l{constructor(){super("socket.room.Peer",[{no:1,name:"peer_id",kind:"scalar",T:9},{no:2,name:"user_id",kind:"scalar",T:9},{no:3,name:"display_name",kind:"scalar",T:9},{no:4,name:"stage_type",kind:"enum",opt:!0,T:()=>["socket.room.StageType",me,"STAGE_TYPE_"]},{no:5,name:"custom_participant_id",kind:"scalar",opt:!0,T:9},{no:6,name:"preset_id",kind:"scalar",opt:!0,T:9},{no:7,name:"display_picture_url",kind:"scalar",opt:!0,T:9},{no:8,name:"waitlisted",kind:"scalar",T:8},{no:9,name:"flags",kind:"message",T:()=>Io}])}}const Be=new Co;class Po extends l{constructor(){super("socket.room.PeerInfoResponse",[{no:1,name:"peer",kind:"message",T:()=>Be}])}}const qt=new Po;class Lo extends l{constructor(){super("socket.room.PeerStatusUpdate",[{no:1,name:"peer_id",kind:"scalar",T:9},{no:2,name:"user_id",kind:"scalar",T:9},{no:3,name:"stage_type",kind:"enum",opt:!0,T:()=>["socket.room.StageType",me,"STAGE_TYPE_"]}])}}new Lo;class Ao extends l{constructor(){super("socket.room.RoomPeersInfoRequest",[{no:1,name:"seach_query",kind:"scalar",T:9},{no:2,name:"limit",kind:"scalar",T:5},{no:3,name:"offset",kind:"scalar",T:5}])}}new Ao;class Bo extends l{constructor(){super("socket.room.RoomPeersInfoResponse",[{no:1,name:"peers",kind:"message",repeat:1,T:()=>Be}])}}const Do=new Bo;class Mo extends l{constructor(){super("socket.room.RoomPeerCountResponse",[{no:1,name:"count",kind:"scalar",T:4,L:2}])}}new Mo;class Fo extends l{constructor(){super("socket.room.Room",[{no:1,name:"room_id",kind:"scalar",T:9},{no:2,name:"title",kind:"scalar",T:9},{no:4,name:"created_at",kind:"scalar",T:4,L:2},{no:5,name:"active_recordings",kind:"message",repeat:1,T:()=>qo},{no:6,name:"room_uuid",kind:"scalar",opt:!0,T:9}])}}const gn=new Fo;class Uo extends l{constructor(){super("socket.room.ActiveRecording",[{no:1,name:"recording_id",kind:"scalar",T:9},{no:2,name:"recording_type",kind:"enum",T:()=>["common.RecordingType",Ie]},{no:3,name:"recording_status",kind:"scalar",T:9}])}}const qo=new Uo;class Vo extends l{constructor(){super("socket.room.RoomInfoResponse",[{no:1,name:"room",kind:"message",T:()=>gn}])}}const Go=new Vo;class jo extends l{constructor(){super("socket.room.GetPeerInfoRequest",[{no:1,name:"peer_id",kind:"scalar",T:9}])}}new jo;class Wo extends l{constructor(){super("socket.room.UpdatePeerInfoRequest",[{no:1,name:"peer_id",kind:"scalar",T:9},{no:2,name:"display_name",kind:"scalar",opt:!0,T:9}])}}new Wo;class Ko extends l{constructor(){super("socket.room.JoinRoomRequest",[{no:1,name:"peer",kind:"message",T:()=>Be},{no:3,name:"room_uuid",kind:"scalar",T:9},{no:4,name:"organization_id",kind:"scalar",opt:!0,T:9},{no:5,name:"use_hive",kind:"scalar",opt:!0,T:8},{no:6,name:"preset",kind:"scalar",opt:!0,T:12},{no:7,name:"capabilities",kind:"enum",repeat:1,T:()=>["socket.room.Capabilities",nt,"CAPABILITIES_"]},{no:8,name:"timestamp",kind:"scalar",opt:!0,T:4,L:2}])}}new Ko;class Jo extends l{constructor(){super("socket.room.LeaveRoomRequest",[{no:1,name:"peer",kind:"message",T:()=>Be},{no:2,name:"timestamp",kind:"scalar",opt:!0,T:4,L:2}])}}new Jo;class Zo extends l{constructor(){super("socket.room.UpdateRoomInfoRequest",[{no:1,name:"room",kind:"message",T:()=>gn}])}}new Zo;class Xo extends l{constructor(){super("socket.room.GetConnectedRoomsDumpRequest",[])}}new Xo;class $o extends l{constructor(){super("socket.room.ServiceError",[{no:1,name:"message",kind:"scalar",opt:!0,T:9},{no:2,name:"code",kind:"scalar",opt:!0,T:9}])}}const lt=new $o;class Yo extends l{constructor(){super("socket.room.ConnectedMeetingPeer",[{no:1,name:"id",kind:"scalar",opt:!0,T:9},{no:2,name:"display_name",kind:"scalar",opt:!0,T:9},{no:3,name:"custom_participant_id",kind:"scalar",opt:!0,T:9},{no:4,name:"preset_id",kind:"scalar",opt:!0,T:9},{no:5,name:"display_picture_url",kind:"scalar",opt:!0,T:9}])}}const zo=new Yo;class Ho extends l{constructor(){super("socket.room.ConnectedMeetingDump",[{no:1,name:"id",kind:"scalar",opt:!0,T:9},{no:2,name:"title",kind:"scalar",opt:!0,T:9},{no:3,name:"participants",kind:"message",repeat:1,T:()=>zo}])}}const Vt=new Ho;class Qo extends l{constructor(){super("socket.room.GetConnectedRoomsDumpResponse",[{no:1,name:"parent_meeting",kind:"message",T:()=>Vt},{no:2,name:"meetings",kind:"message",repeat:1,T:()=>Vt}])}}const ea=new Qo;class ta extends l{constructor(){super("socket.room.CreateRoomRequestPayload",[{no:1,name:"title",kind:"scalar",opt:!0,T:9}])}}const na=new ta;class sa extends l{constructor(){super("socket.room.CreateConnectedRoomsRequest",[{no:1,name:"payloads",kind:"message",repeat:1,T:()=>na}])}}new sa;class ra extends l{constructor(){super("socket.room.CreateRoomResponsePayload",[{no:1,name:"id",kind:"scalar",opt:!0,T:9},{no:2,name:"title",kind:"scalar",opt:!0,T:9},{no:3,name:"error",kind:"message",T:()=>lt}])}}const oa=new ra;class aa extends l{constructor(){super("socket.room.CreateConnectedRoomsResponse",[{no:1,name:"payloads",kind:"message",repeat:1,T:()=>oa}])}}new aa;class ia extends l{constructor(){super("socket.room.UpdateRoomRequestPayload",[{no:1,name:"meeting_id",kind:"scalar",opt:!0,T:9},{no:2,name:"title",kind:"scalar",opt:!0,T:9}])}}const ca=new ia;class la extends l{constructor(){super("socket.room.UpdateConnectedRoomsRequest",[{no:1,name:"payloads",kind:"message",repeat:1,T:()=>ca}])}}new la;class ua extends l{constructor(){super("socket.room.DisableRoomPayload",[{no:1,name:"id",kind:"scalar",opt:!0,T:9}])}}const da=new ua;class pa extends l{constructor(){super("socket.room.DisableConnectedRoomsRequest",[{no:1,name:"payloads",kind:"message",repeat:1,T:()=>da}])}}new pa;class ma extends l{constructor(){super("socket.room.DisableConnectedRoomsResponse",[{no:1,name:"payloads",kind:"message",repeat:1,T:()=>ha}])}}new ma;class fa extends l{constructor(){super("socket.room.DisableConnectedRoomPayload",[{no:1,name:"id",kind:"scalar",opt:!0,T:9},{no:2,name:"status",kind:"scalar",opt:!0,T:9},{no:3,name:"title",kind:"scalar",opt:!0,T:9},{no:4,name:"error",kind:"message",T:()=>lt}])}}const ha=new fa;class ka extends l{constructor(){super("socket.room.MovePeerPayload",[{no:1,name:"id",kind:"scalar",opt:!0,T:9},{no:2,name:"preset_id",kind:"scalar",opt:!0,T:9}])}}const ga=new ka;class Ta extends l{constructor(){super("socket.room.MovePeersBetweenRoomsRequest",[{no:1,name:"source_meeting_id",kind:"scalar",opt:!0,T:9},{no:2,name:"destination_meeting_id",kind:"scalar",opt:!0,T:9},{no:3,name:"participants",kind:"message",repeat:1,T:()=>ga}])}}new Ta;class wa extends l{constructor(){super("socket.room.MovedPeer",[{no:1,name:"meeting_id",kind:"scalar",opt:!0,T:9},{no:2,name:"custom_participant_id",kind:"scalar",opt:!0,T:9},{no:3,name:"error",kind:"message",T:()=>lt}])}}const ya=new wa;class _a extends l{constructor(){super("socket.room.MovePeersBetweenRoomsResponse",[{no:1,name:"payloads",kind:"message",repeat:1,T:()=>ya}])}}new _a;class ba extends l{constructor(){super("socket.room.TransferPeer",[{no:1,name:"meeting_id",kind:"scalar",opt:!0,T:9},{no:2,name:"auth_token",kind:"scalar",opt:!0,T:9}])}}new ba;class va extends l{constructor(){super("socket.room.GetAllAddedParticipantsResponse",[{no:1,name:"participants",kind:"message",repeat:1,T:()=>Ea}])}}new va;class Ra extends l{constructor(){super("socket.room.AddedParticipant",[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",opt:!0,T:9},{no:3,name:"picture",kind:"scalar",opt:!0,T:9},{no:4,name:"custom_participant_id",kind:"scalar",T:9}])}}const Ea=new Ra;class Oa extends l{constructor(){super("socket.room.RemoveParticipantsRequest",[{no:1,name:"peer_ids",kind:"scalar",repeat:2,T:9}])}}new Oa;class Sa extends l{constructor(){super("socket.room.BroadcastMessage",[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"payload",kind:"scalar",T:12},{no:3,name:"timestamp",kind:"scalar",T:4,L:2},{no:4,name:"ids",kind:"scalar",repeat:2,T:9},{no:5,name:"broadcast_type",kind:"enum",opt:!0,T:()=>["socket.room.BroadcastType",tt,"BROADCAST_TYPE_"]}])}}new Sa;class Na extends l{constructor(){super("socket.room.AcceptWaitingRoomRequests",[{no:1,name:"user_ids",kind:"scalar",repeat:2,T:9}])}}new Na;class xa extends l{constructor(){super("socket.room.DenyWaitingRoomRequests",[{no:1,name:"user_ids",kind:"scalar",repeat:2,T:9}])}}new xa;class Ia extends l{constructor(){super("socket.room.WaitingRoomRequest",[{no:1,name:"peer_id",kind:"scalar",T:9},{no:2,name:"user_id",kind:"scalar",T:9},{no:3,name:"display_name",kind:"scalar",T:9},{no:4,name:"picture",kind:"scalar",opt:!0,T:9},{no:5,name:"custom_participant_id",kind:"scalar",opt:!0,T:9},{no:6,name:"preset_name",kind:"scalar",opt:!0,T:9}])}}const Ca=new Ia;class Pa extends l{constructor(){super("socket.room.GetWaitingRoomRequests",[{no:1,name:"requests",kind:"message",repeat:1,T:()=>Ca}])}}new Pa;class La extends l{constructor(){super("socket.room.GetRoomStageStateResponse",[{no:1,name:"on_stage_peers",kind:"scalar",repeat:2,T:9},{no:2,name:"approved_stage_peers",kind:"scalar",repeat:2,T:9},{no:3,name:"requested_stage_peers",kind:"scalar",repeat:2,T:9}])}}new La;var st;(function(e){e[e.NONE=0]="NONE",e[e.SKIP=1]="SKIP",e[e.ON_PRIVILEGED_USER_ENTRY=2]="ON_PRIVILEGED_USER_ENTRY",e[e.SKIP_ON_ACCEPT=3]="SKIP_ON_ACCEPT"})(st||(st={}));var Ce;(function(e){e[e.NONE=0]="NONE",e[e.ALLOWED=1]="ALLOWED",e[e.NOT_ALLOWED=2]="NOT_ALLOWED",e[e.CAN_REQUEST=3]="CAN_REQUEST"})(Ce||(Ce={}));class Aa extends l{constructor(){super("socket.preset.PollsPermissionUpdate",[{no:1,name:"can_create",kind:"scalar",opt:!0,T:8},{no:2,name:"can_vote",kind:"scalar",opt:!0,T:8},{no:3,name:"can_view",kind:"scalar",opt:!0,T:8}])}}const Ba=new Aa;class Da extends l{constructor(){super("socket.preset.PluginsPermissionsUpdate",[{no:1,name:"can_close",kind:"scalar",opt:!0,T:8},{no:2,name:"can_start",kind:"scalar",opt:!0,T:8}])}}const Ma=new Da;class Fa extends l{constructor(){super("socket.preset.PublicChatPermission",[{no:1,name:"can_send",kind:"scalar",opt:!0,T:8},{no:2,name:"text",kind:"scalar",opt:!0,T:8},{no:3,name:"files",kind:"scalar",opt:!0,T:8}])}}const Ua=new Fa;class qa extends l{constructor(){super("socket.preset.PrivateChatPermission",[{no:1,name:"can_send",kind:"scalar",opt:!0,T:8},{no:2,name:"can_receive",kind:"scalar",opt:!0,T:8},{no:3,name:"text",kind:"scalar",opt:!0,T:8},{no:4,name:"files",kind:"scalar",opt:!0,T:8}])}}const Va=new qa;class Ga extends l{constructor(){super("socket.preset.ChatPermissionUpdate",[{no:1,name:"public",kind:"message",T:()=>Ua},{no:2,name:"private",kind:"message",T:()=>Va}])}}const ja=new Ga;class Wa extends l{constructor(){super("socket.preset.ConnectedMeetingPermissionUpdate",[{no:1,name:"can_alter_connected_meetings",kind:"scalar",opt:!0,T:8},{no:2,name:"can_switch_to_parent_meeting",kind:"scalar",opt:!0,T:8},{no:3,name:"can_switch_connected_meetings",kind:"scalar",opt:!0,T:8}])}}const Ka=new Wa;class Ja extends l{constructor(){super("socket.preset.StreamPermission",[{no:1,name:"can_produce",kind:"enum",opt:!0,T:()=>["socket.preset.StreamPermissionType",Ce,"STREAM_PERMISSION_TYPE_"]},{no:2,name:"can_consume",kind:"enum",opt:!0,T:()=>["socket.preset.StreamPermissionType",Ce,"STREAM_PERMISSION_TYPE_"]}])}}const Ze=new Ja;class Za extends l{constructor(){super("socket.preset.MediaPermissionUpdate",[{no:1,name:"video",kind:"message",T:()=>Ze},{no:2,name:"audio",kind:"message",T:()=>Ze},{no:3,name:"screenshare",kind:"message",T:()=>Ze}])}}const Xa=new Za;class $a extends l{constructor(){super("socket.preset.PresetUpdates",[{no:1,name:"polls",kind:"message",T:()=>Ba},{no:2,name:"plugins",kind:"message",T:()=>Ma},{no:3,name:"chat",kind:"message",T:()=>ja},{no:4,name:"accept_waiting_requests",kind:"scalar",opt:!0,T:8},{no:5,name:"can_accept_production_requests",kind:"scalar",opt:!0,T:8},{no:6,name:"can_edit_display_name",kind:"scalar",opt:!0,T:8},{no:7,name:"can_record",kind:"scalar",opt:!0,T:8},{no:8,name:"can_livestream",kind:"scalar",opt:!0,T:8},{no:9,name:"can_spotlight",kind:"scalar",opt:!0,T:8},{no:10,name:"disable_participant_audio",kind:"scalar",opt:!0,T:8},{no:11,name:"disable_participant_screensharing",kind:"scalar",opt:!0,T:8},{no:12,name:"disable_participant_video",kind:"scalar",opt:!0,T:8},{no:13,name:"kick_participant",kind:"scalar",opt:!0,T:8},{no:14,name:"pin_participant",kind:"scalar",opt:!0,T:8},{no:15,name:"transcription_enabled",kind:"scalar",opt:!0,T:8},{no:16,name:"waiting_room_type",kind:"enum",opt:!0,T:()=>["socket.preset.WaitingRoomType",st,"WAITING_ROOM_TYPE_"]},{no:17,name:"is_recorder",kind:"scalar",opt:!0,T:8},{no:18,name:"recorder_type",kind:"enum",opt:!0,T:()=>["socket.room.RecorderType",et,"RECORDER_TYPE_"]},{no:19,name:"hidden_participant",kind:"scalar",opt:!0,T:8},{no:20,name:"show_participant_list",kind:"scalar",opt:!0,T:8},{no:21,name:"can_change_participant_permissions",kind:"scalar",opt:!0,T:8},{no:22,name:"connected_meetings",kind:"message",T:()=>Ka},{no:23,name:"media",kind:"message",T:()=>Xa}])}}const ut=new $a;class Ya extends l{constructor(){super("socket.preset.ReadPeersPresetRequest",[{no:1,name:"user_ids",kind:"scalar",repeat:2,T:9}])}}new Ya;class za extends l{constructor(){super("socket.preset.PeerPreset",[{no:1,name:"user_id",kind:"scalar",T:9},{no:2,name:"peer_id",kind:"scalar",T:9},{no:3,name:"preset",kind:"scalar",T:12}])}}const Ha=new za;class Qa extends l{constructor(){super("socket.preset.ReadPeersPresetResponse",[{no:1,name:"peer_presets",kind:"message",repeat:1,T:()=>Ha}])}}new Qa;class ei extends l{constructor(){super("socket.preset.UpdatePeerPreset",[{no:1,name:"user_ids",kind:"scalar",T:9},{no:2,name:"patch",kind:"message",T:()=>ut}])}}const Tn=new ei;class ti extends l{constructor(){super("socket.preset.UpdatePeersPresetRequest",[{no:1,name:"update_peers_presets",kind:"message",repeat:1,T:()=>Tn}])}}new ti;class ni extends l{constructor(){super("socket.preset.UpdatePeersPresetResponse",[{no:1,name:"update_peers_presets",kind:"message",repeat:1,T:()=>Tn}])}}new ni;class si extends l{constructor(){super("socket.preset.PeerUserIDMap",[{no:1,name:"peer_id",kind:"scalar",T:9},{no:2,name:"user_id",kind:"scalar",T:9}])}}const ri=new si;class oi extends l{constructor(){super("socket.preset.BulkUpdatePeerPresetRequest",[{no:1,name:"peers",kind:"message",repeat:1,T:()=>ri},{no:2,name:"patch",kind:"message",T:()=>ut}])}}new oi;class ai extends l{constructor(){super("socket.preset.BulkUpdatePeerPresetResponse",[{no:2,name:"patch",kind:"message",T:()=>ut}])}}new ai;class ii extends l{constructor(){super("socket.chat.ChatMessage",[{no:1,name:"chat_id",kind:"scalar",T:9},{no:2,name:"peer_id",kind:"scalar",T:9},{no:3,name:"user_id",kind:"scalar",T:9},{no:4,name:"display_name",kind:"scalar",T:9},{no:5,name:"pinned",kind:"scalar",T:8},{no:6,name:"is_edited",kind:"scalar",T:8},{no:7,name:"payload_type",kind:"scalar",T:5},{no:8,name:"payload",kind:"scalar",T:9},{no:10,name:"target_user_ids",kind:"scalar",repeat:2,T:9},{no:11,name:"created_at",kind:"scalar",T:4,L:2},{no:12,name:"created_at_ms",kind:"scalar",opt:!0,T:4,L:2},{no:13,name:"channel_id",kind:"scalar",opt:!0,T:9},{no:14,name:"channel_index",kind:"scalar",opt:!0,T:9}])}}const Y=new ii;class ci extends l{constructor(){super("socket.chat.GetPaginatedChatMessageRoomRequest",[{no:1,name:"time_stamp",kind:"scalar",T:4,L:2},{no:2,name:"size",kind:"scalar",T:5},{no:3,name:"from",kind:"scalar",T:5},{no:4,name:"reversed",kind:"scalar",T:8},{no:5,name:"channel_id",kind:"scalar",opt:!0,T:9}])}}new ci;class li extends l{constructor(){super("socket.chat.GetPaginatedChatMessageRoomResponse",[{no:1,name:"messages",kind:"message",repeat:1,T:()=>Y},{no:2,name:"next",kind:"scalar",T:8}])}}new li;class ui extends l{constructor(){super("socket.chat.GetChatMessagesResponse",[{no:1,name:"messages",kind:"message",repeat:1,T:()=>Y}])}}new ui;class di extends l{constructor(){super("socket.chat.SendChatMessageToRoomRequest",[{no:1,name:"payload_type",kind:"scalar",T:5},{no:2,name:"payload",kind:"scalar",T:9}])}}new di;class pi extends l{constructor(){super("socket.chat.SendChatMessageToRoomResponse",[{no:1,name:"message",kind:"message",T:()=>Y}])}}new pi;class mi extends l{constructor(){super("socket.chat.SendChatMessageToPeersRequest",[{no:1,name:"peer_ids",kind:"scalar",repeat:2,T:9},{no:2,name:"payload_type",kind:"scalar",T:5},{no:3,name:"payload",kind:"scalar",T:9}])}}new mi;class fi extends l{constructor(){super("socket.chat.SendChatMessageToPeersResponse",[{no:1,name:"message",kind:"message",T:()=>Y}])}}new fi;class hi extends l{constructor(){super("socket.chat.SendChatMessageToChannelRequest",[{no:1,name:"channel_id",kind:"scalar",T:9},{no:2,name:"payload_type",kind:"scalar",T:5},{no:3,name:"payload",kind:"scalar",T:9}])}}new hi;class ki extends l{constructor(){super("socket.chat.SendChatMessageToChannelResponse",[{no:1,name:"message",kind:"message",T:()=>Y}])}}new ki;class gi extends l{constructor(){super("socket.chat.EditChatMessageRequest",[{no:1,name:"chat_id",kind:"scalar",T:9},{no:2,name:"payload_type",kind:"scalar",opt:!0,T:5},{no:3,name:"payload",kind:"scalar",opt:!0,T:9},{no:4,name:"pinned",kind:"scalar",opt:!0,T:8},{no:5,name:"channel_id",kind:"scalar",opt:!0,T:9}])}}new gi;class Ti extends l{constructor(){super("socket.chat.PinChatMessageRequest",[{no:1,name:"chat_id",kind:"scalar",T:9},{no:2,name:"pinned",kind:"scalar",T:8},{no:3,name:"channel_id",kind:"scalar",opt:!0,T:9}])}}new Ti;class wi extends l{constructor(){super("socket.chat.PinChatMessageResponse",[{no:1,name:"chat_id",kind:"scalar",T:9},{no:2,name:"pinned",kind:"scalar",T:8},{no:3,name:"channel_id",kind:"scalar",opt:!0,T:9}])}}new wi;class yi extends l{constructor(){super("socket.chat.EditChatMessageResponse",[{no:1,name:"message",kind:"message",T:()=>Y}])}}new yi;class _i extends l{constructor(){super("socket.chat.DeleteChatMessageRequest",[{no:1,name:"chat_id",kind:"scalar",T:9},{no:2,name:"channel_id",kind:"scalar",opt:!0,T:9}])}}new _i;class bi extends l{constructor(){super("socket.chat.DeleteChatMessageResponse",[{no:1,name:"chat_id",kind:"scalar",T:9},{no:2,name:"channel_id",kind:"scalar",opt:!0,T:9}])}}new bi;class vi extends l{constructor(){super("socket.chat.SearchChatMessagesRequest",[{no:1,name:"time_stamp",kind:"scalar",T:4,L:2},{no:2,name:"size",kind:"scalar",T:5},{no:3,name:"from",kind:"scalar",T:5},{no:4,name:"reversed",kind:"scalar",T:8},{no:5,name:"channel_id",kind:"scalar",opt:!0,T:9},{no:6,name:"search_term",kind:"scalar",T:9}])}}new vi;class Ri extends l{constructor(){super("socket.chat.MarkChannelIndexAsReadRequest",[{no:1,name:"channel_id",kind:"scalar",T:9},{no:2,name:"user_id",kind:"scalar",T:9},{no:3,name:"channel_index",kind:"scalar",T:9}])}}new Ri;class Ei extends l{constructor(){super("socket.chat.MarkChannelIndexAsReadResponse",[{no:1,name:"channel_index",kind:"scalar",T:9}])}}new Ei;class Oi extends l{constructor(){super("socket.chat.CreateChatChannelRequest",[{no:1,name:"display_name",kind:"scalar",T:9},{no:2,name:"target_user_ids",kind:"scalar",repeat:2,T:9},{no:3,name:"display_picture_url",kind:"scalar",opt:!0,T:9},{no:4,name:"visibility",kind:"scalar",T:9},{no:5,name:"is_direct_message",kind:"scalar",T:8}])}}new Oi;class Si extends l{constructor(){super("socket.chat.UpdateChatChannelRequest",[{no:1,name:"chat_channel_id",kind:"scalar",T:9},{no:2,name:"display_name",kind:"scalar",opt:!0,T:9},{no:3,name:"target_user_ids",kind:"scalar",repeat:2,T:9},{no:4,name:"display_picture_url",kind:"scalar",opt:!0,T:9},{no:5,name:"visibility",kind:"scalar",opt:!0,T:9},{no:6,name:"is_direct_message",kind:"scalar",opt:!0,T:8}])}}new Si;class Ni extends l{constructor(){super("socket.chat.CreateChatChannelResponse",[{no:1,name:"chat_channel_id",kind:"scalar",T:9}])}}new Ni;class xi extends l{constructor(){super("socket.chat.GetChatChannelRequest",[{no:1,name:"chat_channel_id",kind:"scalar",T:9}])}}new xi;class Ii extends l{constructor(){super("socket.chat.LatestMessageAndUnreadCount",[{no:1,name:"message",kind:"message",T:()=>Y},{no:2,name:"unread_count",kind:"scalar",T:4,L:2}])}}const Ci=new Ii;class Pi extends l{constructor(){super("socket.chat.ChatChannel",[{no:1,name:"chat_channel_id",kind:"scalar",T:9},{no:2,name:"display_name",kind:"scalar",T:9},{no:3,name:"display_picture_url",kind:"scalar",opt:!0,T:9},{no:4,name:"visibility",kind:"scalar",T:9},{no:5,name:"is_direct_message",kind:"scalar",T:8},{no:6,name:"latest_message_and_unread_count",kind:"message",T:()=>Ci},{no:7,name:"target_user_ids",kind:"scalar",repeat:2,T:9}])}}const Li=new Pi;class Ai extends l{constructor(){super("socket.chat.GetChatChannelResponse",[{no:1,name:"chat_channels",kind:"message",repeat:1,T:()=>Li}])}}new Ai;class Bi extends l{constructor(){super("socket.chat.ChannelMember",[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",opt:!0,T:9},{no:3,name:"picture",kind:"scalar",opt:!0,T:9},{no:4,name:"custom_participant_id",kind:"scalar",T:9}])}}const Di=new Bi;class Mi extends l{constructor(){super("socket.chat.GetChatChannelMembersResponse",[{no:1,name:"channel_members",kind:"message",repeat:1,T:()=>Di}])}}new Mi;class Fi extends l{constructor(){super("socket.plugin.AddPluginRequest",[{no:1,name:"plugin_id",kind:"scalar",T:9},{no:2,name:"staggered",kind:"scalar",T:8}])}}new Fi;class Ui extends l{constructor(){super("socket.plugin.RemovePluginRequest",[{no:1,name:"plugin_id",kind:"scalar",T:9},{no:2,name:"staggered",kind:"scalar",T:8}])}}new Ui;class qi extends l{constructor(){super("socket.plugin.EnablePluginForRoomRequest",[{no:1,name:"plugin_id",kind:"scalar",T:9}])}}new qi;class Vi extends l{constructor(){super("socket.plugin.DisablePluginForRoomRequest",[{no:1,name:"plugin_id",kind:"scalar",T:9}])}}new Vi;class Gi extends l{constructor(){super("socket.plugin.EnablePluginForPeersRequest",[{no:1,name:"plugin_id",kind:"scalar",T:9},{no:2,name:"peer_ids",kind:"scalar",repeat:2,T:9}])}}new Gi;class ji extends l{constructor(){super("socket.plugin.DisablePluginForPeersRequest",[{no:1,name:"plugin_id",kind:"scalar",T:9},{no:2,name:"peer_ids",kind:"scalar",repeat:2,T:9}])}}new ji;class Wi extends l{constructor(){super("socket.plugin.PluginEventToRoomRequest",[{no:1,name:"plugin_id",kind:"scalar",T:9},{no:2,name:"plugin_data",kind:"scalar",T:12}])}}new Wi;class Ki extends l{constructor(){super("socket.plugin.PluginEventToPeersRequest",[{no:1,name:"plugin_id",kind:"scalar",T:9},{no:2,name:"peer_ids",kind:"scalar",repeat:2,T:9},{no:3,name:"plugin_data",kind:"scalar",T:12}])}}new Ki;class Ji extends l{constructor(){super("socket.plugin.StoreKeys",[{no:1,name:"store_key",kind:"scalar",T:9},{no:2,name:"payload",kind:"scalar",opt:!0,T:12}])}}const dt=new Ji;class Zi extends l{constructor(){super("socket.plugin.PluginStoreInsertKeysRequest",[{no:1,name:"plugin_id",kind:"scalar",T:9},{no:2,name:"store_name",kind:"scalar",T:9},{no:3,name:"insert_keys",kind:"message",repeat:1,T:()=>dt}])}}new Zi;class Xi extends l{constructor(){super("socket.plugin.PluginStoreGetKeysRequest",[{no:1,name:"plugin_id",kind:"scalar",T:9},{no:2,name:"store_name",kind:"scalar",T:9},{no:3,name:"get_keys",kind:"message",repeat:1,T:()=>dt}])}}new Xi;class $i extends l{constructor(){super("socket.plugin.PluginStoreDeleteKeysRequest",[{no:1,name:"plugin_id",kind:"scalar",T:9},{no:2,name:"store_name",kind:"scalar",T:9},{no:3,name:"delete_keys",kind:"message",repeat:1,T:()=>dt}])}}new $i;class Yi extends l{constructor(){super("socket.plugin.PluginStoreDeleteRequest",[{no:1,name:"plugin_id",kind:"scalar",T:9},{no:2,name:"store_name",kind:"scalar",T:9}])}}new Yi;class zi extends l{constructor(){super("socket.plugin.EnablePluginResponse",[{no:1,name:"plugin_id",kind:"scalar",T:9},{no:2,name:"enabled_by",kind:"scalar",T:9}])}}const Hi=new zi;class Qi extends l{constructor(){super("socket.plugin.EnablePluginsResponse",[{no:1,name:"plugins",kind:"message",repeat:1,T:()=>Hi}])}}new Qi;class ec extends l{constructor(){super("socket.plugin.DisablePluginResponse",[{no:1,name:"plugin_id",kind:"scalar",T:9},{no:2,name:"disabled_by",kind:"scalar",T:9}])}}new ec;class tc extends l{constructor(){super("socket.plugin.PluginStoreItem",[{no:1,name:"timestamp",kind:"scalar",T:9},{no:2,name:"peer_id",kind:"scalar",T:9},{no:3,name:"store_key",kind:"scalar",T:9},{no:4,name:"payload",kind:"scalar",T:12}])}}const nc=new tc;class sc extends l{constructor(){super("socket.plugin.PluginStoreResponse",[{no:1,name:"plugin_id",kind:"scalar",T:9},{no:2,name:"store_name",kind:"scalar",T:9},{no:3,name:"store_items",kind:"message",repeat:1,T:()=>nc}])}}new sc;class rc extends l{constructor(){super("socket.plugin.PluginEventResponse",[{no:1,name:"plugin_id",kind:"scalar",T:9},{no:2,name:"plugin_data",kind:"scalar",T:12}])}}new rc;class oc extends l{constructor(){super("socket.livestreaming.LiveStreamingEvent",[{no:1,name:"livestream_id",kind:"scalar",T:9},{no:2,name:"err_message",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"meeting_id",kind:"scalar",T:9},{no:5,name:"playback_url",kind:"scalar",T:9},{no:6,name:"org_id",kind:"scalar",T:9},{no:7,name:"room_name",kind:"scalar",T:9},{no:8,name:"room_uuid",kind:"scalar",T:9},{no:9,name:"status",kind:"scalar",T:9},{no:10,name:"manual_ingest",kind:"scalar",opt:!0,T:8}])}}new oc;class ac extends l{constructor(){super("socket.livestreaming.GetStagePeersResponse",[{no:1,name:"stage_peers",kind:"scalar",repeat:2,T:9}])}}new ac;class ic extends l{constructor(){super("socket.livestreaming.StageRequest",[{no:1,name:"display_name",kind:"scalar",T:9},{no:2,name:"user_id",kind:"scalar",T:9},{no:3,name:"peer_id",kind:"scalar",T:9}])}}const cc=new ic;class lc extends l{constructor(){super("socket.livestreaming.GetStageRequestsResponse",[{no:1,name:"stage_requests",kind:"message",repeat:1,T:()=>cc}])}}new lc;class uc extends l{constructor(){super("socket.livestreaming.GrantStageAccessRequest",[{no:1,name:"user_ids",kind:"scalar",repeat:2,T:9}])}}new uc;class dc extends l{constructor(){super("socket.livestreaming.DenyStageAccessRequest",[{no:1,name:"user_ids",kind:"scalar",repeat:2,T:9}])}}new dc;class pc extends l{constructor(){super("socket.livestreaming.LeaveStageRequest",[{no:1,name:"user_ids",kind:"scalar",repeat:2,T:9}])}}new pc;class mc extends l{constructor(){super("socket.polls.Poll",[{no:1,name:"poll_id",kind:"scalar",T:9},{no:2,name:"created_by",kind:"scalar",T:9},{no:3,name:"created_by_user_id",kind:"scalar",T:9},{no:4,name:"question",kind:"scalar",T:9},{no:5,name:"options",kind:"message",repeat:1,T:()=>hc},{no:6,name:"hide_votes",kind:"scalar",T:8},{no:7,name:"anonymous",kind:"scalar",T:8},{no:8,name:"votes",kind:"scalar",repeat:2,T:9}])}}const wn=new mc;class fc extends l{constructor(){super("socket.polls.PollOption",[{no:1,name:"text",kind:"scalar",T:9},{no:2,name:"count",kind:"scalar",opt:!0,T:4,L:2},{no:3,name:"votes",kind:"message",repeat:1,T:()=>gc}])}}const hc=new fc;class kc extends l{constructor(){super("socket.polls.PollVote",[{no:1,name:"user_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}])}}const gc=new kc;class Tc extends l{constructor(){super("socket.polls.NewPollRequest",[{no:1,name:"question",kind:"scalar",T:9},{no:2,name:"options",kind:"scalar",repeat:2,T:9},{no:3,name:"anonymous",kind:"scalar",T:8},{no:4,name:"hide_votes",kind:"scalar",T:8},{no:5,name:"created_by",kind:"scalar",opt:!0,T:9},{no:6,name:"created_by_user_id",kind:"scalar",opt:!0,T:9}])}}new Tc;class wc extends l{constructor(){super("socket.polls.VotePollRequest",[{no:1,name:"poll_id",kind:"scalar",T:9},{no:2,name:"index",kind:"scalar",T:4,L:2}])}}new wc;class yc extends l{constructor(){super("socket.polls.UpdatePollResponse",[{no:1,name:"poll",kind:"message",T:()=>wn}])}}new yc;class _c extends l{constructor(){super("socket.polls.GetPollsResponse",[{no:1,name:"polls",kind:"message",repeat:1,T:()=>wn}])}}new _c;class bc extends l{constructor(){super("socket.recording.RecordingEvent",[{no:1,name:"recording_id",kind:"scalar",T:9},{no:2,name:"err_message",kind:"scalar",T:9},{no:3,name:"recording_type",kind:"enum",T:()=>["common.RecordingType",Ie]}])}}new bc;class vc extends l{constructor(){super("google.protobuf.Timestamp",[{no:1,name:"seconds",kind:"scalar",T:3,L:0},{no:2,name:"nanos",kind:"scalar",T:5}])}now(){const t=this.create(),n=Date.now();return t.seconds=x.from(Math.floor(n/1e3)).toBigInt(),t.nanos=n%1e3*1e6,t}toDate(t){return new Date(x.from(t.seconds).toNumber()*1e3+Math.ceil(t.nanos/1e6))}fromDate(t){const n=this.create(),s=t.getTime();return n.seconds=x.from(Math.floor(s/1e3)).toBigInt(),n.nanos=s%1e3*1e6,n}internalJsonWrite(t,n){let s=x.from(t.seconds).toNumber()*1e3;if(s<Date.parse("0001-01-01T00:00:00Z")||s>Date.parse("9999-12-31T23:59:59Z"))throw new Error("Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");if(t.nanos<0)throw new Error("Unable to encode invalid Timestamp to JSON. Nanos must not be negative.");let r="Z";if(t.nanos>0){let o=(t.nanos+1e9).toString().substring(1);o.substring(3)==="000000"?r="."+o.substring(0,3)+"Z":o.substring(6)==="000"?r="."+o.substring(0,6)+"Z":r="."+o+"Z"}return new Date(s).toISOString().replace(".000Z",r)}internalJsonRead(t,n,s){if(typeof t!="string")throw new Error("Unable to parse Timestamp from JSON "+it(t)+".");let r=t.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);if(!r)throw new Error("Unable to parse Timestamp from JSON. Invalid format.");let o=Date.parse(r[1]+"-"+r[2]+"-"+r[3]+"T"+r[4]+":"+r[5]+":"+r[6]+(r[8]?r[8]:"Z"));if(Number.isNaN(o))throw new Error("Unable to parse Timestamp from JSON. Invalid value.");if(o<Date.parse("0001-01-01T00:00:00Z")||o>Date.parse("9999-12-31T23:59:59Z"))throw new globalThis.Error("Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");return s||(s=this.create()),s.seconds=x.from(o/1e3).toBigInt(),s.nanos=0,r[7]&&(s.nanos=parseInt("1"+r[7]+"0".repeat(9-r[7].length))-1e9),s}}new vc;class Rc extends l{constructor(){super("common.BaseHubMessage",[{no:1,name:"event",kind:"scalar",T:5},{no:2,name:"id",kind:"scalar",T:9},{no:3,name:"peer_id",kind:"scalar",T:9},{no:4,name:"room_id",kind:"scalar",T:9},{no:5,name:"user_id",kind:"scalar",T:9},{no:6,name:"payload",kind:"scalar",T:12},{no:7,name:"error",kind:"scalar",opt:!0,T:8},{no:8,name:"sid",kind:"scalar",opt:!0,T:9},{no:9,name:"room_object_id",kind:"scalar",opt:!0,T:9},{no:10,name:"preset",kind:"scalar",opt:!0,T:9}])}}const rt=new Rc;class Ec extends l{constructor(){super("common.BulkedHubMessage",[{no:1,name:"messages",kind:"message",repeat:1,T:()=>rt}])}}new Ec;class Oc extends l{constructor(){super("common.CFWorkersResponse",[{no:1,name:"response",kind:"message",T:()=>rt},{no:2,name:"broadcast_responses",kind:"message",repeat:1,T:()=>rt}])}}new Oc;const Sc=0,Nc=1,xc=2,Ic=3,Cc=4,Pc=5,Lc={getPeerInfo:0,updatePeerInfo:1,getRoomPeersInfo:2,joinRoom:3,leaveRoom:4,getRoomInfo:5,updateRoomInfo:6,closeRoom:7,startedLivestream:8,stoppedLivestream:9,erroredLivestream:10,getStagePeers:11,getStageRequests:12,requestStageAccess:13,cancelStageRequest:14,grantStageAccess:15,denyStageAccess:16,roomPeerCount:17,joinStage:18,leaveStage:19,getConnectedRoomsDump:20,createConnectedRooms:21,deleteConnectedRooms:22,movePeers:23,transferPeer:24,movedPeer:25,connectedRoomsUpdated:26,connectedRoomsDeleted:27,getAllAddedParticipants:28,broadcastMessage:29,kick:30,kickAll:31,transcript:32,getWaitingRoomRequests:33,acceptWaitingRoomRequests:34,waitingRoomRequestAccepted:35,denyWaitingRoomRequests:36,waitingRoomRequestDenied:37,peerStageStatusUpdate:38,broadcastToEntity:39,recordingStarted:40,recordingStopped:41,recordingPaused:42,getRoomStageState:43,livestreamingInvoked:44},Ac={getMessages:0,sendMessageToRoom:1,sendMessageToPeers:2,editMessage:3,deleteMessage:4,getPaginatedMessages:5,sendMessageToChannel:6,searchChannelMessages:7,getAllChatChannels:8,markChannelIndexAsRead:9,pinMessage:10},Bc={getPlugins:0,addPlugin:1,enablePluginForRoom:2,disablePluginForPeers:3,enablePluginForPeers:4,disablePluginForRoom:5,removePlugin:6,customPluginEventToRoom:7,customPluginEventToPeers:8,storeInsertKeys:9,storeGetKeys:10,storeDeleteKeys:11,storeDelete:12},Dc={createPoll:0,getPolls:1,votePoll:2,updatePoll:3},yn={unknown:0,createWebRTCTransport:1,produce:2,consume:3,toggleProducer:4,toggleConsumer:5,closeProducer:6,closeConsumer:7,joinRoom:16,leaveRoom:17,selectedPeer:18,globalPinPeer:19,selfJoinComplete:20,peerJoinedBroadcast:25,peerLeaveBroadcast:26,peerProducerCreateBroadcast:27,peerProducerToggleBroadcast:28,peerProducerCloseBroadcast:29,globalPeerPinBroadcast:30,recordingStartedBroadcast:31,recordingStoppedBroadcast:32,peerDisplayNameEditBroadcast:33,mediaRoomTerminationBroadcastResponse:36,selectedPeerDiff:40,renegotiateSessionDescription:50,errorResponse:60,kickPeer:90,kickAll:91,changeDisplayName:92,hostControlPeer:93,hostControlAllPeers:94,audioActivity:100},Mc={createChatChannel:0,getChatChannel:1,deprecatedGetAllChatChannels:2,getChannelMembers:3,updateChatChannel:4},Fc={getUserPresets:0,updateUserPreset:1};function re(e,t){return Object.keys(t).reduce((n,s)=>(n[s]=(e<<16)+t[s],n),{})}function _n(e,t){return Object.keys(e).reduce((n,s)=>(n[s]=t|e[s],n),{})}const ye=re(Sc,Lc);re(Nc,Ac);re(xc,Bc);re(Ic,Dc);re(Cc,Mc);const Xe=_n(yn,16777216);_n(yn,50331648);re(Pc,Fc);const bn="ws://localhost:8080/ws";class Uc extends pe.WebSocket{constructor(t,n){super(bn,n)}}var le,ot,ue,at;class qc{constructor(){we(this,le,void 0),we(this,ot,[]),we(this,ue,void 0),we(this,at,15e3),E(this,"roomId","roomId"),E(this,"roomUuid","roomUuid"),E(this,"cleanBuffer",t=>t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength))}init({peerId:t,mockParticipants:n}){It(this,ue,t),window.WebSocket=Uc,It(this,le,n);const{RTK_MOCK_SERVER:s}=window;if(s)try{s.close()}catch(o){}const r=new pe.Server(bn,{mock:!1});window.RTK_MOCK_SERVER=r,r.on("connection",o=>{te(this,ot).push(o),this.addConnectionListeners(o)})}addConnectionListeners(t){t.on("message",n=>{if(n==="3")return;const s=Dt.fromBinary(n);let r;switch(s.event){case ye.joinRoom:{r=qt.toBinary(qt.fromJson({peer:{peerId:te(this,ue),userId:"self-userId",displayName:"name",waitlisted:!1,stageType:me.ON_STAGE}}));break}case ye.getRoomPeersInfo:{r=Do.toBinary({peers:te(this,le).map(h=>gs(xt({},h),{userId:h.peerId,waitlisted:!1,stageType:1}))});break}case ye.getRoomInfo:{r=Go.toBinary({room:{roomId:this.roomId,title:"title",createdAt:Date.now(),activeRecordings:[],roomUuid:this.roomUuid}});break}case Xe.createWebRTCTransport:{r=mn.toBinary({transportId:"transportId",description:{type:"answer",sdp:"sdp",target:xe.PUBLISHER},producerIds:[]});break}case Xe.selfJoinComplete:{const h=te(this,le).map(T=>xt({producerStates:[]},T));r=Wr.toBinary({maxPreferredStreams:6,participants:h,selectedPeers:{audioPeers:[],compulsoryPeers:[]},roomState:{displayTitle:"title",lockedMode:!1,roomUuid:this.roomUuid,roomName:this.roomUuid,currentPeerId:te(this,ue),pinnedPeerIds:[]}});break}case ye.getConnectedRoomsDump:{r=ea.toBinary({parentMeeting:{participants:[]},meetings:[]});break}case Xe.produce:{r=$r.toBinary({status:!0,producerId:"producer-id"});break}}const o={event:s.event,id:s.id,payload:r},u=Dt.toBinary(o),p=this.cleanBuffer(u);t.send(p)}),setInterval(()=>{t.send("2")},te(this,at))}}le=new WeakMap,ot=new WeakMap,ue=new WeakMap,at=new WeakMap;function Vc(e){new qc().init(e),window.RTCPeerConnection=Ss,window.fetch=()=>Ts(this,null,function*(){const t=new window.Response(JSON.stringify({}),{status:200,headers:{"Content-type":"application/json"}});return Promise.resolve(t)})}exports.setupStubs=Vc;
|