quickvo-sdk-js 1.0.5 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,18 +1,18 @@
1
- (function(bt,mt){typeof exports=="object"&&typeof module<"u"?mt(exports):typeof define=="function"&&define.amd?define(["exports"],mt):(bt=typeof globalThis<"u"?globalThis:bt||self,mt(bt["snqu-calls-sdk-js"]={}))})(this,function(exports){"use strict";var nr=Object.defineProperty;var er=bt=>{throw TypeError(bt)};var rr=(bt,mt,qt)=>mt in bt?nr(bt,mt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):bt[mt]=qt;var Ee=(bt,mt,qt)=>rr(bt,typeof mt!="symbol"?mt+"":mt,qt),tr=(bt,mt,qt)=>mt.has(bt)||er("Cannot "+qt);var De=(bt,mt,qt)=>(tr(bt,mt,"read from private field"),qt?qt.call(bt):mt.get(bt)),at=(bt,mt,qt)=>mt.has(bt)?er("Cannot add the same private member more than once"):mt instanceof WeakSet?mt.add(bt):mt.set(bt,qt),Ct=(bt,mt,qt,Jt)=>(tr(bt,mt,"write to private field"),Jt?Jt.call(bt,qt):mt.set(bt,qt),qt);var bt,mt,qt,Jt,Yt,Dn,Bn,Nn,En,Mn,qn,Pn,Xt,mn,hn,In,xn,sn,ln,yn,vn,Rn,wn,en,Ht,cn,un,pn,kn,Un,Ln,Sn,Fn,Hn,jn,zn,Tn,Jn,On,Cn,An,bn,Wn,Vn,Zn,Kn;const lt=(N,Z={})=>{const q={unit:"B",splitStr:" ",...Z};let{unit:J,splitStr:I}=q;const D=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],a=D.findIndex(z=>z===J),O=D.slice(a+1,D.length);let F=N;for(const z of O)if(J=z,F=F/1024,F<1024)break;return`${F.toFixed(2)}${I}${J}`},P=(N,Z=[])=>{const q={...N},J=Object.keys(q);for(const I of J)Z.findIndex(D=>String(D)===I)===-1&&delete q[I];return q},pt=(N,Z=[],q=!0)=>{const J=new Map;for(const D of N){const a=[];for(const F of Z)a.push(D[F]);const O=`map-${a.join("-")}`;if(!J.has(O)){J.set(O,D);continue}q&&J.set(O,D)}const I=J.entries();return Array.from(I,([D,a])=>a)},dt=(N,Z=[])=>{const q=[];for(const J of N){const I=P(J,Z);q.push(I)}return q},ht=(N,Z="value",q="label")=>{const J=[],I=Object.entries(N);for(const[D,a]of I){const O={[q]:a,[Z]:D};J.push(O)}return J},v$1=(N=0,Z=1)=>{const q=Math.max(0,N),J=Math.max(1,Z),I=Math.random()*(J-q+1)+q;return parseInt(`${I}`,10)},xt=(N=16,Z=16)=>{const q="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),J=Math.min(q.length,Z),I=Date.now().toString(J),D=I.split(""),a=Math.max(4,N-I.length);for(let O=0;O<a;O++){const F=v$1(0,J-1),z=q[F];D.push(z)}return D.join("").toUpperCase()},W=(N,Z)=>{try{let q=Number(N);if(isNaN(q)){const J=new Date(`${N}`);if(`${J}`=="Invalid Date")return 0;q=J.getTime()}if(Z!==void 0){const J=new Date().getTimezoneOffset();q+=(J+Z)*60*1e3}return q}catch(q){return console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;","------->timeStamp:err",{_val:N,_offset:Z,error:q}),0}},H=1e3,R$1=6e4,U=36e5,A=864e5,_={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7","01":"一","02":"二","03":"三","04":"四","05":"五","06":"六","07":"日"},L=N=>W(N),E$1=(N,Z="YYYY-MM-DD hh:mm:ss",q={})=>{const J={empty_str:"-",...q},{empty_str:I,offset:D}=J,a=W(N,D);if(Number(N)!==0&&a===0)return I;const O=new Date(a),F=`${O.getFullYear()}`,z=`${O.getMonth()+1}`,K=`${O.getDate()}`,te=`${O.getDay()===0?7:O.getDay()}`,ne=`${O.getHours()}`,ee=`${O.getMinutes()}`,re=`${O.getSeconds()}`,ce=`${Math.ceil((a-L(`${F}/01/01 00:00:00`)+1)/864e5)}`,oe=`${Math.ceil(((a-L(`${F}/01/01 00:00:00`))/864e5-Number(te))/7)+1}`,se=[{k:"Y+",v:F},{k:"M+",v:z},{k:"D+",v:K},{k:"W+",v:te},{k:"h+",v:ne},{k:"m+",v:ee},{k:"s+",v:re},{k:"d+",v:ce},{k:"w+",v:oe}];let fe;for(let{k:ge,v:ue}of se)if(fe=new RegExp(`(${ge})`).exec(Z),fe){const _e=fe[1];let pe=ue.padStart(_e.length,"0");_e.includes("W")&&(pe=_[pe.slice(0,2)]),Z=Z.replace(_e,pe)}return Z},V=new Map,$t=(N,Z,q)=>{const J=new Date().getTime(),I=V.get(N)||0;J-q>I&&(Z(),V.set(N,J))},enum_mediaType={microphoneCamera_audio:"麦克风-默认轨道",microphoneCamera_video:"摄像头-默认轨道",screenSharing_video:"屏幕共享-视频轨道",screenSharing_audio:"屏幕共享-音频轨道"};ht(enum_mediaType);const mediaType_keys=Object.keys(enum_mediaType);var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(N){return N&&N.__esModule&&Object.prototype.hasOwnProperty.call(N,"default")?N.default:N}var lib$1={},parser={},grammar={exports:{}},hasRequiredGrammar;function requireGrammar(){if(hasRequiredGrammar)return grammar.exports;hasRequiredGrammar=1;var N=grammar.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(Z){return Z.encoding?"rtpmap:%d %s/%s/%s":Z.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(Z){return Z.address!=null?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%s trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(Z){return Z.subtype!=null?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:(\d+)(?:\/(\w+))?(?: (urn:ietf:params:rtp-hdrext:encrypt))? (\S*)(?: (\S*))?/,names:["value","direction","encrypt-uri","uri","config"],format:function(Z){return"extmap:%d"+(Z.direction?"/%s":"%v")+(Z["encrypt-uri"]?" %s":"%v")+" %s"+(Z.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(Z){return Z.sessionConfig!=null?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"connectionType",reg:/^connection:(new|existing)/,format:"connection:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*(?:\.\d*)*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*(?:\.\d*)*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation","network-id","network-cost"],format:function(Z){var q="candidate:%s %d %s %d %s %d typ %s";return q+=Z.raddr!=null?" raddr %s rport %d":"%v%v",q+=Z.tcptype!=null?" tcptype %s":"%v",Z.generation!=null&&(q+=" generation %d"),q+=Z["network-id"]!=null?" network-id %d":"%v",q+=Z["network-cost"]!=null?" network-cost %d":"%v",q}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_-]*)(?::(.*))?/,names:["id","attribute","value"],format:function(Z){var q="ssrc:%d";return Z.attribute!=null&&(q+=" %s",Z.value!=null&&(q+=":%s")),q}},{push:"ssrcGroups",reg:/^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{name:"sctpmap",reg:/^sctpmap:([\w_/]*) (\S*)(?: (\S*))?/,names:["sctpmapNumber","app","maxMessageSize"],format:function(Z){return Z.maxMessageSize!=null?"sctpmap:%s %s %s":"sctpmap:%s %s"}},{name:"xGoogleFlag",reg:/^x-google-flag:([^\s]*)/,format:"x-google-flag:%s"},{push:"rids",reg:/^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,names:["id","direction","params"],format:function(Z){return Z.params?"rid:%s %s %s":"rid:%s %s"}},{push:"imageattrs",reg:new RegExp("^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"),names:["pt","dir1","attrs1","dir2","attrs2"],format:function(Z){return"imageattr:%s %s %s"+(Z.dir2?" %s %s":"")}},{name:"simulcast",reg:new RegExp("^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"),names:["dir1","list1","dir2","list2"],format:function(Z){return"simulcast:%s %s"+(Z.dir2?" %s %s":"")}},{name:"simulcast_03",reg:/^simulcast:[\s\t]+([\S+\s\t]+)$/,names:["value"],format:"simulcast: %s"},{name:"framerate",reg:/^framerate:(\d+(?:$|\.\d+))/,format:"framerate:%s"},{name:"sourceFilter",reg:/^source-filter: *(excl|incl) (\S*) (IP4|IP6|\*) (\S*) (.*)/,names:["filterMode","netType","addressTypes","destAddress","srcList"],format:"source-filter: %s %s %s %s %s"},{name:"bundleOnly",reg:/^(bundle-only)/},{name:"label",reg:/^label:(.+)/,format:"label:%s"},{name:"sctpPort",reg:/^sctp-port:(\d+)$/,format:"sctp-port:%s"},{name:"maxMessageSize",reg:/^max-message-size:(\d+)$/,format:"max-message-size:%s"},{push:"tsRefClocks",reg:/^ts-refclk:([^\s=]*)(?:=(\S*))?/,names:["clksrc","clksrcExt"],format:function(Z){return"ts-refclk:%s"+(Z.clksrcExt!=null?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(Z){var q="mediaclk:";return q+=Z.id!=null?"id=%s %s":"%v%s",q+=Z.mediaClockValue!=null?"=%s":"",q+=Z.rateNumerator!=null?" rate=%s":"",q+=Z.rateDenominator!=null?"/%s":"",q}},{name:"keywords",reg:/^keywds:(.+)$/,format:"keywds:%s"},{name:"content",reg:/^content:(.+)/,format:"content:%s"},{name:"bfcpFloorCtrl",reg:/^floorctrl:(c-only|s-only|c-s)/,format:"floorctrl:%s"},{name:"bfcpConfId",reg:/^confid:(\d+)/,format:"confid:%s"},{name:"bfcpUserId",reg:/^userid:(\d+)/,format:"userid:%s"},{name:"bfcpFloorId",reg:/^floorid:(.+) (?:m-stream|mstrm):(.+)/,names:["id","mStream"],format:"floorid:%s mstrm:%s"},{push:"invalid",names:["value"]}]};return Object.keys(N).forEach(function(Z){var q=N[Z];q.forEach(function(J){J.reg||(J.reg=/(.*)/),J.format||(J.format="%s")})}),grammar.exports}var hasRequiredParser;function requireParser(){return hasRequiredParser||(hasRequiredParser=1,function(N){var Z=function(O){return String(Number(O))===O?Number(O):O},q=function(O,F,z,K){if(K&&!z)F[K]=Z(O[1]);else for(var te=0;te<z.length;te+=1)O[te+1]!=null&&(F[z[te]]=Z(O[te+1]))},J=function(O,F,z){var K=O.name&&O.names;O.push&&!F[O.push]?F[O.push]=[]:K&&!F[O.name]&&(F[O.name]={});var te=O.push?{}:K?F[O.name]:F;q(z.match(O.reg),te,O.names,O.name),O.push&&F[O.push].push(te)},I=requireGrammar(),D=RegExp.prototype.test.bind(/^([a-z])=(.*)/);N.parse=function(O){var F={},z=[],K=F;return O.split(/(\r\n|\r|\n)/).filter(D).forEach(function(te){var ne=te[0],ee=te.slice(2);ne==="m"&&(z.push({rtp:[],fmtp:[]}),K=z[z.length-1]);for(var re=0;re<(I[ne]||[]).length;re+=1){var ce=I[ne][re];if(ce.reg.test(ee))return J(ce,K,ee)}}),F.media=z,F};var a=function(O,F){var z=F.split(/=(.+)/,2);return z.length===2?O[z[0]]=Z(z[1]):z.length===1&&F.length>1&&(O[z[0]]=void 0),O};N.parseParams=function(O){return O.split(/;\s?/).reduce(a,{})},N.parseFmtpConfig=N.parseParams,N.parsePayloads=function(O){return O.toString().split(" ").map(Number)},N.parseRemoteCandidates=function(O){for(var F=[],z=O.split(" ").map(Z),K=0;K<z.length;K+=3)F.push({component:z[K],ip:z[K+1],port:z[K+2]});return F},N.parseImageAttributes=function(O){return O.split(" ").map(function(F){return F.substring(1,F.length-1).split(",").reduce(a,{})})},N.parseSimulcastStreamList=function(O){return O.split(";").map(function(F){return F.split(",").map(function(z){var K,te=!1;return z[0]!=="~"?K=Z(z):(K=Z(z.substring(1,z.length)),te=!0),{scid:K,paused:te}})})}}(parser)),parser}var writer$1,hasRequiredWriter$1;function requireWriter$1(){if(hasRequiredWriter$1)return writer$1;hasRequiredWriter$1=1;var N=requireGrammar(),Z=/%[sdv%]/g,q=function(a){var O=1,F=arguments,z=F.length;return a.replace(Z,function(K){if(O>=z)return K;var te=F[O];switch(O+=1,K){case"%%":return"%";case"%s":return String(te);case"%d":return Number(te);case"%v":return""}})},J=function(a,O,F){var z=O.format instanceof Function?O.format(O.push?F:F[O.name]):O.format,K=[a+"="+z];if(O.names)for(var te=0;te<O.names.length;te+=1){var ne=O.names[te];O.name?K.push(F[O.name][ne]):K.push(F[O.names[te]])}else K.push(F[O.name]);return q.apply(null,K)},I=["v","o","s","i","u","e","p","c","b","t","r","z","a"],D=["i","c","b","a"];return writer$1=function(a,O){O=O||{},a.version==null&&(a.version=0),a.name==null&&(a.name=" "),a.media.forEach(function(te){te.payloads==null&&(te.payloads="")});var F=O.outerOrder||I,z=O.innerOrder||D,K=[];return F.forEach(function(te){N[te].forEach(function(ne){ne.name in a&&a[ne.name]!=null?K.push(J(te,ne,a)):ne.push in a&&a[ne.push]!=null&&a[ne.push].forEach(function(ee){K.push(J(te,ne,ee))})})}),a.media.forEach(function(te){K.push(J("m",N.m[0],te)),z.forEach(function(ne){N[ne].forEach(function(ee){ee.name in te&&te[ee.name]!=null?K.push(J(ne,ee,te)):ee.push in te&&te[ee.push]!=null&&te[ee.push].forEach(function(re){K.push(J(ne,ee,re))})})})}),K.join(`\r
1
+ (function(st,it){typeof exports=="object"&&typeof module<"u"?it(exports):typeof define=="function"&&define.amd?define(["exports"],it):(st=typeof globalThis<"u"?globalThis:st||self,it(st["snqu-calls-sdk-js"]={}))})(this,function(exports){"use strict";var Xn=Object.defineProperty;var Qn=st=>{throw TypeError(st)};var er=(st,it,Rt)=>it in st?Xn(st,it,{enumerable:!0,configurable:!0,writable:!0,value:Rt}):st[it]=Rt;var _e=(st,it,Rt)=>er(st,typeof it!="symbol"?it+"":it,Rt),Yn=(st,it,Rt)=>it.has(st)||Qn("Cannot "+Rt);var Oe=(st,it,Rt)=>(Yn(st,it,"read from private field"),Rt?Rt.call(st):it.get(st)),Ge=(st,it,Rt)=>it.has(st)?Qn("Cannot add the same private member more than once"):it instanceof WeakSet?it.add(st):it.set(st,Rt),kt=(st,it,Rt,Pt)=>(Yn(st,it,"write to private field"),Pt?Pt.call(st,Rt):it.set(st,Rt),Rt);var st,it,Rt,Pt,Jt,Rn,$n,An,wn,Cn,Dn,Bn,Wt,cn,an,gn,kn,Xt,tn,ln,un,Sn,pn,Vt,Nt,en,nn,sn,mn,Nn,Mn,yn,qn,Tn,vn,Pn,Un,Ln,bn,On,Hn,_n,En,In,Fn,fn,jn,zn,Jn,Wn;const lt=(O,N={})=>{const I={unit:"B",splitStr:" ",...N};let{unit:D,splitStr:f}=I;const k=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],i=k.findIndex(C=>C===D),c=k.slice(i+1,k.length);let $=O;for(const C of c)if(D=C,$=$/1024,$<1024)break;return`${$.toFixed(2)}${f}${D}`},P$1=(O,N=[])=>{const I={...O},D=Object.keys(I);for(const f of D)N.findIndex(k=>String(k)===f)===-1&&delete I[f];return I},pt=(O,N=[],I=!0)=>{const D=new Map;for(const k of O){const i=[];for(const $ of N)i.push(k[$]);const c=`map-${i.join("-")}`;if(!D.has(c)){D.set(c,k);continue}I&&D.set(c,k)}const f=D.entries();return Array.from(f,([k,i])=>i)},dt=(O,N=[])=>{const I=[];for(const D of O){const f=P$1(D,N);I.push(f)}return I},ht=(O,N="value",I="label")=>{const D=[],f=Object.entries(O);for(const[k,i]of f){const c={[I]:i,[N]:k};D.push(c)}return D},v$1=(O=0,N=1)=>{const I=Math.max(0,O),D=Math.max(1,N),f=Math.random()*(D-I+1)+I;return parseInt(`${f}`,10)},xt=(O=16,N=16)=>{const I="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),D=Math.min(I.length,N),f=Date.now().toString(D),k=f.split(""),i=Math.max(4,O-f.length);for(let c=0;c<i;c++){const $=v$1(0,D-1),C=I[$];k.push(C)}return k.join("").toUpperCase()},W=(O,N)=>{try{let I=Number(O);if(isNaN(I)){const D=new Date(`${O}`);if(`${D}`=="Invalid Date")return 0;I=D.getTime()}if(N!==void 0){const D=new Date().getTimezoneOffset();I+=(D+N)*60*1e3}return I}catch(I){return console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;","------->timeStamp:err",{_val:O,_offset:N,error:I}),0}},H=1e3,R=6e4,U=36e5,A=864e5,_={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7","01":"一","02":"二","03":"三","04":"四","05":"五","06":"六","07":"日"},L=O=>W(O),E=(O,N="YYYY-MM-DD hh:mm:ss",I={})=>{const D={empty_str:"-",...I},{empty_str:f,offset:k}=D,i=W(O,k);if(Number(O)!==0&&i===0)return f;const c=new Date(i),$=`${c.getFullYear()}`,C=`${c.getMonth()+1}`,M=`${c.getDate()}`,Z=`${c.getDay()===0?7:c.getDay()}`,J=`${c.getHours()}`,z=`${c.getMinutes()}`,Q=`${c.getSeconds()}`,ee=`${Math.ceil((i-L(`${$}/01/01 00:00:00`)+1)/864e5)}`,Y=`${Math.ceil(((i-L(`${$}/01/01 00:00:00`))/864e5-Number(Z))/7)+1}`,te=[{k:"Y+",v:$},{k:"M+",v:C},{k:"D+",v:M},{k:"W+",v:Z},{k:"h+",v:J},{k:"m+",v:z},{k:"s+",v:Q},{k:"d+",v:ee},{k:"w+",v:Y}];let ie;for(let{k:ye,v:re}of te)if(ie=new RegExp(`(${ye})`).exec(N),ie){const de=ie[1];let se=re.padStart(de.length,"0");de.includes("W")&&(se=_[se.slice(0,2)]),N=N.replace(de,se)}return N},V=new Map,$t=(O,N,I)=>{const D=new Date().getTime(),f=V.get(O)||0;D-I>f&&(N(),V.set(O,D))},enum_mediaType={microphoneCamera_audio:"麦克风-默认轨道",microphoneCamera_video:"摄像头-默认轨道",screenSharing_video:"屏幕共享-视频轨道",screenSharing_audio:"屏幕共享-音频轨道"};ht(enum_mediaType);const mediaType_keys=Object.keys(enum_mediaType);var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(O){return O&&O.__esModule&&Object.prototype.hasOwnProperty.call(O,"default")?O.default:O}var lib$1={},parser={},grammar={exports:{}},hasRequiredGrammar;function requireGrammar(){if(hasRequiredGrammar)return grammar.exports;hasRequiredGrammar=1;var O=grammar.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(N){return N.encoding?"rtpmap:%d %s/%s/%s":N.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(N){return N.address!=null?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%s trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(N){return N.subtype!=null?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:(\d+)(?:\/(\w+))?(?: (urn:ietf:params:rtp-hdrext:encrypt))? (\S*)(?: (\S*))?/,names:["value","direction","encrypt-uri","uri","config"],format:function(N){return"extmap:%d"+(N.direction?"/%s":"%v")+(N["encrypt-uri"]?" %s":"%v")+" %s"+(N.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(N){return N.sessionConfig!=null?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"connectionType",reg:/^connection:(new|existing)/,format:"connection:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*(?:\.\d*)*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*(?:\.\d*)*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation","network-id","network-cost"],format:function(N){var I="candidate:%s %d %s %d %s %d typ %s";return I+=N.raddr!=null?" raddr %s rport %d":"%v%v",I+=N.tcptype!=null?" tcptype %s":"%v",N.generation!=null&&(I+=" generation %d"),I+=N["network-id"]!=null?" network-id %d":"%v",I+=N["network-cost"]!=null?" network-cost %d":"%v",I}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_-]*)(?::(.*))?/,names:["id","attribute","value"],format:function(N){var I="ssrc:%d";return N.attribute!=null&&(I+=" %s",N.value!=null&&(I+=":%s")),I}},{push:"ssrcGroups",reg:/^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{name:"sctpmap",reg:/^sctpmap:([\w_/]*) (\S*)(?: (\S*))?/,names:["sctpmapNumber","app","maxMessageSize"],format:function(N){return N.maxMessageSize!=null?"sctpmap:%s %s %s":"sctpmap:%s %s"}},{name:"xGoogleFlag",reg:/^x-google-flag:([^\s]*)/,format:"x-google-flag:%s"},{push:"rids",reg:/^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,names:["id","direction","params"],format:function(N){return N.params?"rid:%s %s %s":"rid:%s %s"}},{push:"imageattrs",reg:new RegExp("^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"),names:["pt","dir1","attrs1","dir2","attrs2"],format:function(N){return"imageattr:%s %s %s"+(N.dir2?" %s %s":"")}},{name:"simulcast",reg:new RegExp("^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"),names:["dir1","list1","dir2","list2"],format:function(N){return"simulcast:%s %s"+(N.dir2?" %s %s":"")}},{name:"simulcast_03",reg:/^simulcast:[\s\t]+([\S+\s\t]+)$/,names:["value"],format:"simulcast: %s"},{name:"framerate",reg:/^framerate:(\d+(?:$|\.\d+))/,format:"framerate:%s"},{name:"sourceFilter",reg:/^source-filter: *(excl|incl) (\S*) (IP4|IP6|\*) (\S*) (.*)/,names:["filterMode","netType","addressTypes","destAddress","srcList"],format:"source-filter: %s %s %s %s %s"},{name:"bundleOnly",reg:/^(bundle-only)/},{name:"label",reg:/^label:(.+)/,format:"label:%s"},{name:"sctpPort",reg:/^sctp-port:(\d+)$/,format:"sctp-port:%s"},{name:"maxMessageSize",reg:/^max-message-size:(\d+)$/,format:"max-message-size:%s"},{push:"tsRefClocks",reg:/^ts-refclk:([^\s=]*)(?:=(\S*))?/,names:["clksrc","clksrcExt"],format:function(N){return"ts-refclk:%s"+(N.clksrcExt!=null?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(N){var I="mediaclk:";return I+=N.id!=null?"id=%s %s":"%v%s",I+=N.mediaClockValue!=null?"=%s":"",I+=N.rateNumerator!=null?" rate=%s":"",I+=N.rateDenominator!=null?"/%s":"",I}},{name:"keywords",reg:/^keywds:(.+)$/,format:"keywds:%s"},{name:"content",reg:/^content:(.+)/,format:"content:%s"},{name:"bfcpFloorCtrl",reg:/^floorctrl:(c-only|s-only|c-s)/,format:"floorctrl:%s"},{name:"bfcpConfId",reg:/^confid:(\d+)/,format:"confid:%s"},{name:"bfcpUserId",reg:/^userid:(\d+)/,format:"userid:%s"},{name:"bfcpFloorId",reg:/^floorid:(.+) (?:m-stream|mstrm):(.+)/,names:["id","mStream"],format:"floorid:%s mstrm:%s"},{push:"invalid",names:["value"]}]};return Object.keys(O).forEach(function(N){var I=O[N];I.forEach(function(D){D.reg||(D.reg=/(.*)/),D.format||(D.format="%s")})}),grammar.exports}var hasRequiredParser;function requireParser(){return hasRequiredParser||(hasRequiredParser=1,function(O){var N=function(c){return String(Number(c))===c?Number(c):c},I=function(c,$,C,M){if(M&&!C)$[M]=N(c[1]);else for(var Z=0;Z<C.length;Z+=1)c[Z+1]!=null&&($[C[Z]]=N(c[Z+1]))},D=function(c,$,C){var M=c.name&&c.names;c.push&&!$[c.push]?$[c.push]=[]:M&&!$[c.name]&&($[c.name]={});var Z=c.push?{}:M?$[c.name]:$;I(C.match(c.reg),Z,c.names,c.name),c.push&&$[c.push].push(Z)},f=requireGrammar(),k=RegExp.prototype.test.bind(/^([a-z])=(.*)/);O.parse=function(c){var $={},C=[],M=$;return c.split(/(\r\n|\r|\n)/).filter(k).forEach(function(Z){var J=Z[0],z=Z.slice(2);J==="m"&&(C.push({rtp:[],fmtp:[]}),M=C[C.length-1]);for(var Q=0;Q<(f[J]||[]).length;Q+=1){var ee=f[J][Q];if(ee.reg.test(z))return D(ee,M,z)}}),$.media=C,$};var i=function(c,$){var C=$.split(/=(.+)/,2);return C.length===2?c[C[0]]=N(C[1]):C.length===1&&$.length>1&&(c[C[0]]=void 0),c};O.parseParams=function(c){return c.split(/;\s?/).reduce(i,{})},O.parseFmtpConfig=O.parseParams,O.parsePayloads=function(c){return c.toString().split(" ").map(Number)},O.parseRemoteCandidates=function(c){for(var $=[],C=c.split(" ").map(N),M=0;M<C.length;M+=3)$.push({component:C[M],ip:C[M+1],port:C[M+2]});return $},O.parseImageAttributes=function(c){return c.split(" ").map(function($){return $.substring(1,$.length-1).split(",").reduce(i,{})})},O.parseSimulcastStreamList=function(c){return c.split(";").map(function($){return $.split(",").map(function(C){var M,Z=!1;return C[0]!=="~"?M=N(C):(M=N(C.substring(1,C.length)),Z=!0),{scid:M,paused:Z}})})}}(parser)),parser}var writer$1,hasRequiredWriter$1;function requireWriter$1(){if(hasRequiredWriter$1)return writer$1;hasRequiredWriter$1=1;var O=requireGrammar(),N=/%[sdv%]/g,I=function(i){var c=1,$=arguments,C=$.length;return i.replace(N,function(M){if(c>=C)return M;var Z=$[c];switch(c+=1,M){case"%%":return"%";case"%s":return String(Z);case"%d":return Number(Z);case"%v":return""}})},D=function(i,c,$){var C=c.format instanceof Function?c.format(c.push?$:$[c.name]):c.format,M=[i+"="+C];if(c.names)for(var Z=0;Z<c.names.length;Z+=1){var J=c.names[Z];c.name?M.push($[c.name][J]):M.push($[c.names[Z]])}else M.push($[c.name]);return I.apply(null,M)},f=["v","o","s","i","u","e","p","c","b","t","r","z","a"],k=["i","c","b","a"];return writer$1=function(i,c){c=c||{},i.version==null&&(i.version=0),i.name==null&&(i.name=" "),i.media.forEach(function(Z){Z.payloads==null&&(Z.payloads="")});var $=c.outerOrder||f,C=c.innerOrder||k,M=[];return $.forEach(function(Z){O[Z].forEach(function(J){J.name in i&&i[J.name]!=null?M.push(D(Z,J,i)):J.push in i&&i[J.push]!=null&&i[J.push].forEach(function(z){M.push(D(Z,J,z))})})}),i.media.forEach(function(Z){M.push(D("m",O.m[0],Z)),C.forEach(function(J){O[J].forEach(function(z){z.name in Z&&Z[z.name]!=null?M.push(D(J,z,Z)):z.push in Z&&Z[z.push]!=null&&Z[z.push].forEach(function(Q){M.push(D(J,z,Q))})})})}),M.join(`\r
2
2
  `)+`\r
3
- `},writer$1}var hasRequiredLib$1;function requireLib$1(){if(hasRequiredLib$1)return lib$1;hasRequiredLib$1=1;var N=requireParser(),Z=requireWriter$1(),q=requireGrammar();return lib$1.grammar=q,lib$1.write=Z,lib$1.parse=N.parse,lib$1.parseParams=N.parseParams,lib$1.parseFmtpConfig=N.parseFmtpConfig,lib$1.parsePayloads=N.parsePayloads,lib$1.parseRemoteCandidates=N.parseRemoteCandidates,lib$1.parseImageAttributes=N.parseImageAttributes,lib$1.parseSimulcastStreamList=N.parseSimulcastStreamList,lib$1}var libExports$1=requireLib$1();class VideoMediaContext{constructor(Z){Ee(this,"kind","video");Ee(this,"stream",new MediaStream);Ee(this,"stop",()=>{const Z=this.stream.getTracks();for(const q of Z)q.stop(),this.stream.removeTrack(q)});Ee(this,"replaceStream",Z=>{const q=this.stream,J=q.getTracks();for(const D of J)q.removeTrack(D);const[I]=Z.getVideoTracks();I&&q.addTrack(I)});Ee(this,"getStream",()=>this.stream);Ee(this,"getTrack",()=>this.stream.getTracks()[0]);this.stream.addTrack(Z)}}const enum_roomState={ready:"已就绪",checkAuth:"正在鉴权",connecting:"连接中",connected:"已连接",reconnect:"正在重新连接",disconnected:"已断开",failed:"连接错误",closed:"已关闭"};ht(enum_roomState);var C$1=Object.defineProperty,R=N=>{throw TypeError(N)},S=(N,Z,q)=>Z in N?C$1(N,Z,{enumerable:!0,configurable:!0,writable:!0,value:q}):N[Z]=q,l=(N,Z,q)=>S(N,typeof Z!="symbol"?Z+"":Z,q),v=(N,Z,q)=>Z.has(N)||R("Cannot "+q),t$2=(N,Z,q)=>(v(N,Z,"read from private field"),q?q.call(N):Z.get(N)),c$1=(N,Z,q)=>Z.has(N)?R("Cannot add the same private member more than once"):Z instanceof WeakSet?Z.add(N):Z.set(N,q),i=(N,Z,q,J)=>(v(N,Z,"write to private field"),Z.set(N,q),q),s,r$2,h,p,m$2,f,w,x,g$2,b,B$1,y,T,d$1;class M{constructor(Z){c$1(this,s,{url:"",binaryType:"blob",timeout:6*1e3,debug:!1,sendBeforAutoConnect:!1,reconnectCount:-1,reconnectTime:60*1e3,reconnectIntervalTime:5e3,heartbeatIntervalTime:1e4,checkReconnect:q=>!0,onReconnectSuccess:async q=>{},onReconnectStop:async q=>{},getHeartbeatMsg:()=>JSON.stringify({event:"heartbeat"}),onMessage:q=>{}}),l(this,"ws"),c$1(this,r$2,-1),c$1(this,h,-1),c$1(this,p,0),c$1(this,m$2,0),c$1(this,f,!1),c$1(this,w,q=>{}),l(this,"close",async(q=1e3,J="correctly close.")=>{var I;this.ws&&(i(this,f,!0),t$2(this,d$1).call(this),(I=this.ws)==null||I.close(q,J))}),l(this,"connect",()=>new Promise(async q=>{i(this,w,q),this.ws=new WebSocket(t$2(this,s).url),this.ws.binaryType=t$2(this,s).binaryType,this.ws.onopen=t$2(this,b),this.ws.onmessage=t$2(this,g$2),this.ws.onerror=t$2(this,B$1),this.ws.onclose=t$2(this,y)})),l(this,"reconnect",async q=>new Promise(J=>{t$2(this,s).debug&&console.info("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;","------->pr-ws: await reconnect.");const I=D=>{t$2(this,s).debug&&console.info("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;",`------->pr-ws: ${D}`),t$2(this,s).onReconnectStop({msg:D}),J(D)};if(t$2(this,x).call(this)===!1)return I("stop reconnect. exceed maxReconnectionTime.");if(t$2(this,r$2)!==-1&&t$2(this,r$2)===0)return I("stop reconnect. surplusReconnectCount is 0.");if(!t$2(this,s).checkReconnect(q))return I("stop reconnect. checkReconnect is false.");t$2(this,s).debug&&console.info("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;",`------->pr-ws: await ${t$2(this,s).reconnectIntervalTime}ms run reconnect. surplusReconnectCount is ${t$2(this,r$2)}`,q),i(this,p,setTimeout(async()=>{i(this,r$2,Math.max(-1,t$2(this,r$2)-1)),await this.connect();try{await t$2(this,s).onReconnectSuccess(this.ws)}catch(D){console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->pr-ws: onReconnectSuccess is error",D)}J(!0)},t$2(this,s).reconnectIntervalTime))})),l(this,"sendMessage",async q=>{var J;(!this.ws||this.ws.readyState!==1)&&(t$2(this,s).debug&&console.warn("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;","------->pr-ws: ws is not ready."),t$2(this,s).sendBeforAutoConnect&&(t$2(this,s).debug&&console.warn("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;","------->pr-ws: await ws connect."),await this.connect())),(J=this.ws)==null||J.send(q)}),c$1(this,x,()=>{const q=Date.now();return t$2(this,h)===-1&&i(this,h,q+t$2(this,s).reconnectTime),!(q>t$2(this,h))}),c$1(this,g$2,q=>{const{data:J}=q;t$2(this,s).onMessage(J)}),c$1(this,b,()=>{t$2(this,s).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;","------->pr-ws: connect is success.",this.ws),i(this,r$2,t$2(this,s).reconnectCount),i(this,h,-1),t$2(this,T).call(this),t$2(this,w).call(this,this.ws)}),c$1(this,B$1,q=>{t$2(this,s).debug&&console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;","------->pr-ws: connect is error.",q)}),c$1(this,y,q=>{if(t$2(this,s).debug&&console.info("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;",`------->pr-ws: connect is close. code: ${q.code}, permanentClosed is ${t$2(this,f)}.`,q),t$2(this,d$1).call(this),!t$2(this,f))return this.reconnect(q);this.ws=void 0}),c$1(this,T,()=>{i(this,m$2,setInterval(()=>{const q=t$2(this,s).getHeartbeatMsg();q&&this.sendMessage(q)},t$2(this,s).heartbeatIntervalTime))}),c$1(this,d$1,()=>{clearInterval(t$2(this,p)),clearInterval(t$2(this,m$2))}),i(this,s,{...t$2(this,s),...Z}),i(this,r$2,t$2(this,s).reconnectCount)}}s=new WeakMap,r$2=new WeakMap,h=new WeakMap,p=new WeakMap,m$2=new WeakMap,f=new WeakMap,w=new WeakMap,x=new WeakMap,g$2=new WeakMap,b=new WeakMap,B$1=new WeakMap,y=new WeakMap,T=new WeakMap,d$1=new WeakMap;var indexMinimal={},minimal$1={},aspromise,hasRequiredAspromise;function requireAspromise(){if(hasRequiredAspromise)return aspromise;hasRequiredAspromise=1,aspromise=N;function N(Z,q){for(var J=new Array(arguments.length-1),I=0,D=2,a=!0;D<arguments.length;)J[I++]=arguments[D++];return new Promise(function(F,z){J[I]=function(te){if(a)if(a=!1,te)z(te);else{for(var ne=new Array(arguments.length-1),ee=0;ee<ne.length;)ne[ee++]=arguments[ee];F.apply(null,ne)}};try{Z.apply(q||null,J)}catch(K){a&&(a=!1,z(K))}})}return aspromise}var base64={},hasRequiredBase64;function requireBase64(){return hasRequiredBase64||(hasRequiredBase64=1,function(N){var Z=N;Z.length=function(O){var F=O.length;if(!F)return 0;for(var z=0;--F%4>1&&O.charAt(F)==="=";)++z;return Math.ceil(O.length*3)/4-z};for(var q=new Array(64),J=new Array(123),I=0;I<64;)J[q[I]=I<26?I+65:I<52?I+71:I<62?I-4:I-59|43]=I++;Z.encode=function(O,F,z){for(var K=null,te=[],ne=0,ee=0,re;F<z;){var ce=O[F++];switch(ee){case 0:te[ne++]=q[ce>>2],re=(ce&3)<<4,ee=1;break;case 1:te[ne++]=q[re|ce>>4],re=(ce&15)<<2,ee=2;break;case 2:te[ne++]=q[re|ce>>6],te[ne++]=q[ce&63],ee=0;break}ne>8191&&((K||(K=[])).push(String.fromCharCode.apply(String,te)),ne=0)}return ee&&(te[ne++]=q[re],te[ne++]=61,ee===1&&(te[ne++]=61)),K?(ne&&K.push(String.fromCharCode.apply(String,te.slice(0,ne))),K.join("")):String.fromCharCode.apply(String,te.slice(0,ne))};var D="invalid encoding";Z.decode=function(O,F,z){for(var K=z,te=0,ne,ee=0;ee<O.length;){var re=O.charCodeAt(ee++);if(re===61&&te>1)break;if((re=J[re])===void 0)throw Error(D);switch(te){case 0:ne=re,te=1;break;case 1:F[z++]=ne<<2|(re&48)>>4,ne=re,te=2;break;case 2:F[z++]=(ne&15)<<4|(re&60)>>2,ne=re,te=3;break;case 3:F[z++]=(ne&3)<<6|re,te=0;break}}if(te===1)throw Error(D);return z-K},Z.test=function(O){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(O)}}(base64)),base64}var eventemitter,hasRequiredEventemitter;function requireEventemitter(){if(hasRequiredEventemitter)return eventemitter;hasRequiredEventemitter=1,eventemitter=N;function N(){this._listeners={}}return N.prototype.on=function(q,J,I){return(this._listeners[q]||(this._listeners[q]=[])).push({fn:J,ctx:I||this}),this},N.prototype.off=function(q,J){if(q===void 0)this._listeners={};else if(J===void 0)this._listeners[q]=[];else for(var I=this._listeners[q],D=0;D<I.length;)I[D].fn===J?I.splice(D,1):++D;return this},N.prototype.emit=function(q){var J=this._listeners[q];if(J){for(var I=[],D=1;D<arguments.length;)I.push(arguments[D++]);for(D=0;D<J.length;)J[D].fn.apply(J[D++].ctx,I)}return this},eventemitter}var float,hasRequiredFloat;function requireFloat(){if(hasRequiredFloat)return float;hasRequiredFloat=1,float=N(N);function N(D){return typeof Float32Array<"u"?function(){var a=new Float32Array([-0]),O=new Uint8Array(a.buffer),F=O[3]===128;function z(ee,re,ce){a[0]=ee,re[ce]=O[0],re[ce+1]=O[1],re[ce+2]=O[2],re[ce+3]=O[3]}function K(ee,re,ce){a[0]=ee,re[ce]=O[3],re[ce+1]=O[2],re[ce+2]=O[1],re[ce+3]=O[0]}D.writeFloatLE=F?z:K,D.writeFloatBE=F?K:z;function te(ee,re){return O[0]=ee[re],O[1]=ee[re+1],O[2]=ee[re+2],O[3]=ee[re+3],a[0]}function ne(ee,re){return O[3]=ee[re],O[2]=ee[re+1],O[1]=ee[re+2],O[0]=ee[re+3],a[0]}D.readFloatLE=F?te:ne,D.readFloatBE=F?ne:te}():function(){function a(F,z,K,te){var ne=z<0?1:0;if(ne&&(z=-z),z===0)F(1/z>0?0:2147483648,K,te);else if(isNaN(z))F(2143289344,K,te);else if(z>34028234663852886e22)F((ne<<31|2139095040)>>>0,K,te);else if(z<11754943508222875e-54)F((ne<<31|Math.round(z/1401298464324817e-60))>>>0,K,te);else{var ee=Math.floor(Math.log(z)/Math.LN2),re=Math.round(z*Math.pow(2,-ee)*8388608)&8388607;F((ne<<31|ee+127<<23|re)>>>0,K,te)}}D.writeFloatLE=a.bind(null,Z),D.writeFloatBE=a.bind(null,q);function O(F,z,K){var te=F(z,K),ne=(te>>31)*2+1,ee=te>>>23&255,re=te&8388607;return ee===255?re?NaN:ne*(1/0):ee===0?ne*1401298464324817e-60*re:ne*Math.pow(2,ee-150)*(re+8388608)}D.readFloatLE=O.bind(null,J),D.readFloatBE=O.bind(null,I)}(),typeof Float64Array<"u"?function(){var a=new Float64Array([-0]),O=new Uint8Array(a.buffer),F=O[7]===128;function z(ee,re,ce){a[0]=ee,re[ce]=O[0],re[ce+1]=O[1],re[ce+2]=O[2],re[ce+3]=O[3],re[ce+4]=O[4],re[ce+5]=O[5],re[ce+6]=O[6],re[ce+7]=O[7]}function K(ee,re,ce){a[0]=ee,re[ce]=O[7],re[ce+1]=O[6],re[ce+2]=O[5],re[ce+3]=O[4],re[ce+4]=O[3],re[ce+5]=O[2],re[ce+6]=O[1],re[ce+7]=O[0]}D.writeDoubleLE=F?z:K,D.writeDoubleBE=F?K:z;function te(ee,re){return O[0]=ee[re],O[1]=ee[re+1],O[2]=ee[re+2],O[3]=ee[re+3],O[4]=ee[re+4],O[5]=ee[re+5],O[6]=ee[re+6],O[7]=ee[re+7],a[0]}function ne(ee,re){return O[7]=ee[re],O[6]=ee[re+1],O[5]=ee[re+2],O[4]=ee[re+3],O[3]=ee[re+4],O[2]=ee[re+5],O[1]=ee[re+6],O[0]=ee[re+7],a[0]}D.readDoubleLE=F?te:ne,D.readDoubleBE=F?ne:te}():function(){function a(F,z,K,te,ne,ee){var re=te<0?1:0;if(re&&(te=-te),te===0)F(0,ne,ee+z),F(1/te>0?0:2147483648,ne,ee+K);else if(isNaN(te))F(0,ne,ee+z),F(2146959360,ne,ee+K);else if(te>17976931348623157e292)F(0,ne,ee+z),F((re<<31|2146435072)>>>0,ne,ee+K);else{var ce;if(te<22250738585072014e-324)ce=te/5e-324,F(ce>>>0,ne,ee+z),F((re<<31|ce/4294967296)>>>0,ne,ee+K);else{var oe=Math.floor(Math.log(te)/Math.LN2);oe===1024&&(oe=1023),ce=te*Math.pow(2,-oe),F(ce*4503599627370496>>>0,ne,ee+z),F((re<<31|oe+1023<<20|ce*1048576&1048575)>>>0,ne,ee+K)}}}D.writeDoubleLE=a.bind(null,Z,0,4),D.writeDoubleBE=a.bind(null,q,4,0);function O(F,z,K,te,ne){var ee=F(te,ne+z),re=F(te,ne+K),ce=(re>>31)*2+1,oe=re>>>20&2047,se=4294967296*(re&1048575)+ee;return oe===2047?se?NaN:ce*(1/0):oe===0?ce*5e-324*se:ce*Math.pow(2,oe-1075)*(se+4503599627370496)}D.readDoubleLE=O.bind(null,J,0,4),D.readDoubleBE=O.bind(null,I,4,0)}(),D}function Z(D,a,O){a[O]=D&255,a[O+1]=D>>>8&255,a[O+2]=D>>>16&255,a[O+3]=D>>>24}function q(D,a,O){a[O]=D>>>24,a[O+1]=D>>>16&255,a[O+2]=D>>>8&255,a[O+3]=D&255}function J(D,a){return(D[a]|D[a+1]<<8|D[a+2]<<16|D[a+3]<<24)>>>0}function I(D,a){return(D[a]<<24|D[a+1]<<16|D[a+2]<<8|D[a+3])>>>0}return float}var inquire_1,hasRequiredInquire;function requireInquire(){if(hasRequiredInquire)return inquire_1;hasRequiredInquire=1,inquire_1=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(N){}return null}return inquire_1}var utf8={},hasRequiredUtf8;function requireUtf8(){return hasRequiredUtf8||(hasRequiredUtf8=1,function(N){var Z=N;Z.length=function(J){for(var I=0,D=0,a=0;a<J.length;++a)D=J.charCodeAt(a),D<128?I+=1:D<2048?I+=2:(D&64512)===55296&&(J.charCodeAt(a+1)&64512)===56320?(++a,I+=4):I+=3;return I},Z.read=function(J,I,D){var a=D-I;if(a<1)return"";for(var O=null,F=[],z=0,K;I<D;)K=J[I++],K<128?F[z++]=K:K>191&&K<224?F[z++]=(K&31)<<6|J[I++]&63:K>239&&K<365?(K=((K&7)<<18|(J[I++]&63)<<12|(J[I++]&63)<<6|J[I++]&63)-65536,F[z++]=55296+(K>>10),F[z++]=56320+(K&1023)):F[z++]=(K&15)<<12|(J[I++]&63)<<6|J[I++]&63,z>8191&&((O||(O=[])).push(String.fromCharCode.apply(String,F)),z=0);return O?(z&&O.push(String.fromCharCode.apply(String,F.slice(0,z))),O.join("")):String.fromCharCode.apply(String,F.slice(0,z))},Z.write=function(J,I,D){for(var a=D,O,F,z=0;z<J.length;++z)O=J.charCodeAt(z),O<128?I[D++]=O:O<2048?(I[D++]=O>>6|192,I[D++]=O&63|128):(O&64512)===55296&&((F=J.charCodeAt(z+1))&64512)===56320?(O=65536+((O&1023)<<10)+(F&1023),++z,I[D++]=O>>18|240,I[D++]=O>>12&63|128,I[D++]=O>>6&63|128,I[D++]=O&63|128):(I[D++]=O>>12|224,I[D++]=O>>6&63|128,I[D++]=O&63|128);return D-a}}(utf8)),utf8}var pool_1,hasRequiredPool;function requirePool(){if(hasRequiredPool)return pool_1;hasRequiredPool=1,pool_1=N;function N(Z,q,J){var I=J||8192,D=I>>>1,a=null,O=I;return function(z){if(z<1||z>D)return Z(z);O+z>I&&(a=Z(I),O=0);var K=q.call(a,O,O+=z);return O&7&&(O=(O|7)+1),K}}return pool_1}var longbits,hasRequiredLongbits;function requireLongbits(){if(hasRequiredLongbits)return longbits;hasRequiredLongbits=1,longbits=Z;var N=requireMinimal$1();function Z(D,a){this.lo=D>>>0,this.hi=a>>>0}var q=Z.zero=new Z(0,0);q.toNumber=function(){return 0},q.zzEncode=q.zzDecode=function(){return this},q.length=function(){return 1};var J=Z.zeroHash="\0\0\0\0\0\0\0\0";Z.fromNumber=function(a){if(a===0)return q;var O=a<0;O&&(a=-a);var F=a>>>0,z=(a-F)/4294967296>>>0;return O&&(z=~z>>>0,F=~F>>>0,++F>4294967295&&(F=0,++z>4294967295&&(z=0))),new Z(F,z)},Z.from=function(a){if(typeof a=="number")return Z.fromNumber(a);if(N.isString(a))if(N.Long)a=N.Long.fromString(a);else return Z.fromNumber(parseInt(a,10));return a.low||a.high?new Z(a.low>>>0,a.high>>>0):q},Z.prototype.toNumber=function(a){if(!a&&this.hi>>>31){var O=~this.lo+1>>>0,F=~this.hi>>>0;return O||(F=F+1>>>0),-(O+F*4294967296)}return this.lo+this.hi*4294967296},Z.prototype.toLong=function(a){return N.Long?new N.Long(this.lo|0,this.hi|0,!!a):{low:this.lo|0,high:this.hi|0,unsigned:!!a}};var I=String.prototype.charCodeAt;return Z.fromHash=function(a){return a===J?q:new Z((I.call(a,0)|I.call(a,1)<<8|I.call(a,2)<<16|I.call(a,3)<<24)>>>0,(I.call(a,4)|I.call(a,5)<<8|I.call(a,6)<<16|I.call(a,7)<<24)>>>0)},Z.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},Z.prototype.zzEncode=function(){var a=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^a)>>>0,this.lo=(this.lo<<1^a)>>>0,this},Z.prototype.zzDecode=function(){var a=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^a)>>>0,this.hi=(this.hi>>>1^a)>>>0,this},Z.prototype.length=function(){var a=this.lo,O=(this.lo>>>28|this.hi<<4)>>>0,F=this.hi>>>24;return F===0?O===0?a<16384?a<128?1:2:a<2097152?3:4:O<16384?O<128?5:6:O<2097152?7:8:F<128?9:10},longbits}var hasRequiredMinimal$1;function requireMinimal$1(){return hasRequiredMinimal$1||(hasRequiredMinimal$1=1,function(N){var Z=N;Z.asPromise=requireAspromise(),Z.base64=requireBase64(),Z.EventEmitter=requireEventemitter(),Z.float=requireFloat(),Z.inquire=requireInquire(),Z.utf8=requireUtf8(),Z.pool=requirePool(),Z.LongBits=requireLongbits(),Z.isNode=!!(typeof commonjsGlobal<"u"&&commonjsGlobal&&commonjsGlobal.process&&commonjsGlobal.process.versions&&commonjsGlobal.process.versions.node),Z.global=Z.isNode&&commonjsGlobal||typeof window<"u"&&window||typeof self<"u"&&self||minimal$1,Z.emptyArray=Object.freeze?Object.freeze([]):[],Z.emptyObject=Object.freeze?Object.freeze({}):{},Z.isInteger=Number.isInteger||function(D){return typeof D=="number"&&isFinite(D)&&Math.floor(D)===D},Z.isString=function(D){return typeof D=="string"||D instanceof String},Z.isObject=function(D){return D&&typeof D=="object"},Z.isset=Z.isSet=function(D,a){var O=D[a];return O!=null&&D.hasOwnProperty(a)?typeof O!="object"||(Array.isArray(O)?O.length:Object.keys(O).length)>0:!1},Z.Buffer=function(){try{var I=Z.inquire("buffer").Buffer;return I.prototype.utf8Write?I:null}catch{return null}}(),Z._Buffer_from=null,Z._Buffer_allocUnsafe=null,Z.newBuffer=function(D){return typeof D=="number"?Z.Buffer?Z._Buffer_allocUnsafe(D):new Z.Array(D):Z.Buffer?Z._Buffer_from(D):typeof Uint8Array>"u"?D:new Uint8Array(D)},Z.Array=typeof Uint8Array<"u"?Uint8Array:Array,Z.Long=Z.global.dcodeIO&&Z.global.dcodeIO.Long||Z.global.Long||Z.inquire("long"),Z.key2Re=/^true|false|0|1$/,Z.key32Re=/^-?(?:0|[1-9][0-9]*)$/,Z.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,Z.longToHash=function(D){return D?Z.LongBits.from(D).toHash():Z.LongBits.zeroHash},Z.longFromHash=function(D,a){var O=Z.LongBits.fromHash(D);return Z.Long?Z.Long.fromBits(O.lo,O.hi,a):O.toNumber(!!a)};function q(I,D,a){for(var O=Object.keys(D),F=0;F<O.length;++F)(I[O[F]]===void 0||!a)&&(I[O[F]]=D[O[F]]);return I}Z.merge=q,Z.lcFirst=function(D){return D.charAt(0).toLowerCase()+D.substring(1)};function J(I){function D(a,O){if(!(this instanceof D))return new D(a,O);Object.defineProperty(this,"message",{get:function(){return a}}),Error.captureStackTrace?Error.captureStackTrace(this,D):Object.defineProperty(this,"stack",{value:new Error().stack||""}),O&&q(this,O)}return D.prototype=Object.create(Error.prototype,{constructor:{value:D,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return I},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),D}Z.newError=J,Z.ProtocolError=J("ProtocolError"),Z.oneOfGetter=function(D){for(var a={},O=0;O<D.length;++O)a[D[O]]=1;return function(){for(var F=Object.keys(this),z=F.length-1;z>-1;--z)if(a[F[z]]===1&&this[F[z]]!==void 0&&this[F[z]]!==null)return F[z]}},Z.oneOfSetter=function(D){return function(a){for(var O=0;O<D.length;++O)D[O]!==a&&delete this[D[O]]}},Z.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},Z._configure=function(){var I=Z.Buffer;if(!I){Z._Buffer_from=Z._Buffer_allocUnsafe=null;return}Z._Buffer_from=I.from!==Uint8Array.from&&I.from||function(a,O){return new I(a,O)},Z._Buffer_allocUnsafe=I.allocUnsafe||function(a){return new I(a)}}}(minimal$1)),minimal$1}var writer,hasRequiredWriter;function requireWriter(){if(hasRequiredWriter)return writer;hasRequiredWriter=1,writer=F;var N=requireMinimal$1(),Z,q=N.LongBits,J=N.base64,I=N.utf8;function D(oe,se,fe){this.fn=oe,this.len=se,this.next=void 0,this.val=fe}function a(){}function O(oe){this.head=oe.head,this.tail=oe.tail,this.len=oe.len,this.next=oe.states}function F(){this.len=0,this.head=new D(a,0,0),this.tail=this.head,this.states=null}var z=function(){return N.Buffer?function(){return(F.create=function(){return new Z})()}:function(){return new F}};F.create=z(),F.alloc=function(se){return new N.Array(se)},N.Array!==Array&&(F.alloc=N.pool(F.alloc,N.Array.prototype.subarray)),F.prototype._push=function(se,fe,ge){return this.tail=this.tail.next=new D(se,fe,ge),this.len+=fe,this};function K(oe,se,fe){se[fe]=oe&255}function te(oe,se,fe){for(;oe>127;)se[fe++]=oe&127|128,oe>>>=7;se[fe]=oe}function ne(oe,se){this.len=oe,this.next=void 0,this.val=se}ne.prototype=Object.create(D.prototype),ne.prototype.fn=te,F.prototype.uint32=function(se){return this.len+=(this.tail=this.tail.next=new ne((se=se>>>0)<128?1:se<16384?2:se<2097152?3:se<268435456?4:5,se)).len,this},F.prototype.int32=function(se){return se<0?this._push(ee,10,q.fromNumber(se)):this.uint32(se)},F.prototype.sint32=function(se){return this.uint32((se<<1^se>>31)>>>0)};function ee(oe,se,fe){for(;oe.hi;)se[fe++]=oe.lo&127|128,oe.lo=(oe.lo>>>7|oe.hi<<25)>>>0,oe.hi>>>=7;for(;oe.lo>127;)se[fe++]=oe.lo&127|128,oe.lo=oe.lo>>>7;se[fe++]=oe.lo}F.prototype.uint64=function(se){var fe=q.from(se);return this._push(ee,fe.length(),fe)},F.prototype.int64=F.prototype.uint64,F.prototype.sint64=function(se){var fe=q.from(se).zzEncode();return this._push(ee,fe.length(),fe)},F.prototype.bool=function(se){return this._push(K,1,se?1:0)};function re(oe,se,fe){se[fe]=oe&255,se[fe+1]=oe>>>8&255,se[fe+2]=oe>>>16&255,se[fe+3]=oe>>>24}F.prototype.fixed32=function(se){return this._push(re,4,se>>>0)},F.prototype.sfixed32=F.prototype.fixed32,F.prototype.fixed64=function(se){var fe=q.from(se);return this._push(re,4,fe.lo)._push(re,4,fe.hi)},F.prototype.sfixed64=F.prototype.fixed64,F.prototype.float=function(se){return this._push(N.float.writeFloatLE,4,se)},F.prototype.double=function(se){return this._push(N.float.writeDoubleLE,8,se)};var ce=N.Array.prototype.set?function(se,fe,ge){fe.set(se,ge)}:function(se,fe,ge){for(var ue=0;ue<se.length;++ue)fe[ge+ue]=se[ue]};return F.prototype.bytes=function(se){var fe=se.length>>>0;if(!fe)return this._push(K,1,0);if(N.isString(se)){var ge=F.alloc(fe=J.length(se));J.decode(se,ge,0),se=ge}return this.uint32(fe)._push(ce,fe,se)},F.prototype.string=function(se){var fe=I.length(se);return fe?this.uint32(fe)._push(I.write,fe,se):this._push(K,1,0)},F.prototype.fork=function(){return this.states=new O(this),this.head=this.tail=new D(a,0,0),this.len=0,this},F.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new D(a,0,0),this.len=0),this},F.prototype.ldelim=function(){var se=this.head,fe=this.tail,ge=this.len;return this.reset().uint32(ge),ge&&(this.tail.next=se.next,this.tail=fe,this.len+=ge),this},F.prototype.finish=function(){for(var se=this.head.next,fe=this.constructor.alloc(this.len),ge=0;se;)se.fn(se.val,fe,ge),ge+=se.len,se=se.next;return fe},F._configure=function(oe){Z=oe,F.create=z(),Z._configure()},writer}var writer_buffer,hasRequiredWriter_buffer;function requireWriter_buffer(){if(hasRequiredWriter_buffer)return writer_buffer;hasRequiredWriter_buffer=1,writer_buffer=q;var N=requireWriter();(q.prototype=Object.create(N.prototype)).constructor=q;var Z=requireMinimal$1();function q(){N.call(this)}q._configure=function(){q.alloc=Z._Buffer_allocUnsafe,q.writeBytesBuffer=Z.Buffer&&Z.Buffer.prototype instanceof Uint8Array&&Z.Buffer.prototype.set.name==="set"?function(D,a,O){a.set(D,O)}:function(D,a,O){if(D.copy)D.copy(a,O,0,D.length);else for(var F=0;F<D.length;)a[O++]=D[F++]}},q.prototype.bytes=function(D){Z.isString(D)&&(D=Z._Buffer_from(D,"base64"));var a=D.length>>>0;return this.uint32(a),a&&this._push(q.writeBytesBuffer,a,D),this};function J(I,D,a){I.length<40?Z.utf8.write(I,D,a):D.utf8Write?D.utf8Write(I,a):D.write(I,a)}return q.prototype.string=function(D){var a=Z.Buffer.byteLength(D);return this.uint32(a),a&&this._push(J,a,D),this},q._configure(),writer_buffer}var reader,hasRequiredReader;function requireReader(){if(hasRequiredReader)return reader;hasRequiredReader=1,reader=D;var N=requireMinimal$1(),Z,q=N.LongBits,J=N.utf8;function I(te,ne){return RangeError("index out of range: "+te.pos+" + "+(ne||1)+" > "+te.len)}function D(te){this.buf=te,this.pos=0,this.len=te.length}var a=typeof Uint8Array<"u"?function(ne){if(ne instanceof Uint8Array||Array.isArray(ne))return new D(ne);throw Error("illegal buffer")}:function(ne){if(Array.isArray(ne))return new D(ne);throw Error("illegal buffer")},O=function(){return N.Buffer?function(ee){return(D.create=function(ce){return N.Buffer.isBuffer(ce)?new Z(ce):a(ce)})(ee)}:a};D.create=O(),D.prototype._slice=N.Array.prototype.subarray||N.Array.prototype.slice,D.prototype.uint32=function(){var ne=4294967295;return function(){if(ne=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(ne=(ne|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(ne=(ne|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(ne=(ne|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(ne=(ne|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return ne;if((this.pos+=5)>this.len)throw this.pos=this.len,I(this,10);return ne}}(),D.prototype.int32=function(){return this.uint32()|0},D.prototype.sint32=function(){var ne=this.uint32();return ne>>>1^-(ne&1)|0};function F(){var te=new q(0,0),ne=0;if(this.len-this.pos>4){for(;ne<4;++ne)if(te.lo=(te.lo|(this.buf[this.pos]&127)<<ne*7)>>>0,this.buf[this.pos++]<128)return te;if(te.lo=(te.lo|(this.buf[this.pos]&127)<<28)>>>0,te.hi=(te.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return te;ne=0}else{for(;ne<3;++ne){if(this.pos>=this.len)throw I(this);if(te.lo=(te.lo|(this.buf[this.pos]&127)<<ne*7)>>>0,this.buf[this.pos++]<128)return te}return te.lo=(te.lo|(this.buf[this.pos++]&127)<<ne*7)>>>0,te}if(this.len-this.pos>4){for(;ne<5;++ne)if(te.hi=(te.hi|(this.buf[this.pos]&127)<<ne*7+3)>>>0,this.buf[this.pos++]<128)return te}else for(;ne<5;++ne){if(this.pos>=this.len)throw I(this);if(te.hi=(te.hi|(this.buf[this.pos]&127)<<ne*7+3)>>>0,this.buf[this.pos++]<128)return te}throw Error("invalid varint encoding")}D.prototype.bool=function(){return this.uint32()!==0};function z(te,ne){return(te[ne-4]|te[ne-3]<<8|te[ne-2]<<16|te[ne-1]<<24)>>>0}D.prototype.fixed32=function(){if(this.pos+4>this.len)throw I(this,4);return z(this.buf,this.pos+=4)},D.prototype.sfixed32=function(){if(this.pos+4>this.len)throw I(this,4);return z(this.buf,this.pos+=4)|0};function K(){if(this.pos+8>this.len)throw I(this,8);return new q(z(this.buf,this.pos+=4),z(this.buf,this.pos+=4))}return D.prototype.float=function(){if(this.pos+4>this.len)throw I(this,4);var ne=N.float.readFloatLE(this.buf,this.pos);return this.pos+=4,ne},D.prototype.double=function(){if(this.pos+8>this.len)throw I(this,4);var ne=N.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,ne},D.prototype.bytes=function(){var ne=this.uint32(),ee=this.pos,re=this.pos+ne;if(re>this.len)throw I(this,ne);if(this.pos+=ne,Array.isArray(this.buf))return this.buf.slice(ee,re);if(ee===re){var ce=N.Buffer;return ce?ce.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,ee,re)},D.prototype.string=function(){var ne=this.bytes();return J.read(ne,0,ne.length)},D.prototype.skip=function(ne){if(typeof ne=="number"){if(this.pos+ne>this.len)throw I(this,ne);this.pos+=ne}else do if(this.pos>=this.len)throw I(this);while(this.buf[this.pos++]&128);return this},D.prototype.skipType=function(te){switch(te){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(te=this.uint32()&7)!==4;)this.skipType(te);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+te+" at offset "+this.pos)}return this},D._configure=function(te){Z=te,D.create=O(),Z._configure();var ne=N.Long?"toLong":"toNumber";N.merge(D.prototype,{int64:function(){return F.call(this)[ne](!1)},uint64:function(){return F.call(this)[ne](!0)},sint64:function(){return F.call(this).zzDecode()[ne](!1)},fixed64:function(){return K.call(this)[ne](!0)},sfixed64:function(){return K.call(this)[ne](!1)}})},reader}var reader_buffer,hasRequiredReader_buffer;function requireReader_buffer(){if(hasRequiredReader_buffer)return reader_buffer;hasRequiredReader_buffer=1,reader_buffer=q;var N=requireReader();(q.prototype=Object.create(N.prototype)).constructor=q;var Z=requireMinimal$1();function q(J){N.call(this,J)}return q._configure=function(){Z.Buffer&&(q.prototype._slice=Z.Buffer.prototype.slice)},q.prototype.string=function(){var I=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+I,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+I,this.len))},q._configure(),reader_buffer}var rpc={},service,hasRequiredService;function requireService(){if(hasRequiredService)return service;hasRequiredService=1,service=Z;var N=requireMinimal$1();(Z.prototype=Object.create(N.EventEmitter.prototype)).constructor=Z;function Z(q,J,I){if(typeof q!="function")throw TypeError("rpcImpl must be a function");N.EventEmitter.call(this),this.rpcImpl=q,this.requestDelimited=!!J,this.responseDelimited=!!I}return Z.prototype.rpcCall=function q(J,I,D,a,O){if(!a)throw TypeError("request must be specified");var F=this;if(!O)return N.asPromise(q,F,J,I,D,a);if(!F.rpcImpl){setTimeout(function(){O(Error("already ended"))},0);return}try{return F.rpcImpl(J,I[F.requestDelimited?"encodeDelimited":"encode"](a).finish(),function(K,te){if(K)return F.emit("error",K,J),O(K);if(te===null){F.end(!0);return}if(!(te instanceof D))try{te=D[F.responseDelimited?"decodeDelimited":"decode"](te)}catch(ne){return F.emit("error",ne,J),O(ne)}return F.emit("data",te,J),O(null,te)})}catch(z){F.emit("error",z,J),setTimeout(function(){O(z)},0);return}},Z.prototype.end=function(J){return this.rpcImpl&&(J||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this},service}var hasRequiredRpc;function requireRpc(){return hasRequiredRpc||(hasRequiredRpc=1,function(N){var Z=N;Z.Service=requireService()}(rpc)),rpc}var roots,hasRequiredRoots;function requireRoots(){return hasRequiredRoots||(hasRequiredRoots=1,roots={}),roots}var hasRequiredIndexMinimal;function requireIndexMinimal(){return hasRequiredIndexMinimal||(hasRequiredIndexMinimal=1,function(N){var Z=N;Z.build="minimal",Z.Writer=requireWriter(),Z.BufferWriter=requireWriter_buffer(),Z.Reader=requireReader(),Z.BufferReader=requireReader_buffer(),Z.util=requireMinimal$1(),Z.rpc=requireRpc(),Z.roots=requireRoots(),Z.configure=q;function q(){Z.util._configure(),Z.Writer._configure(Z.BufferWriter),Z.Reader._configure(Z.BufferReader)}q()}(indexMinimal)),indexMinimal}var minimal,hasRequiredMinimal;function requireMinimal(){return hasRequiredMinimal||(hasRequiredMinimal=1,minimal=requireIndexMinimal()),minimal}var minimalExports=requireMinimal();const $Reader=minimalExports.Reader,$Writer=minimalExports.Writer,$util=minimalExports.util,$root=minimalExports.roots.default||(minimalExports.roots.default={}),com=$root.com=(()=>{const N={};return N.quick=function(){const Z={};return Z.voice=function(){const q={};return q.proto=function(){const J={};return J.CommonReq=function(){function I(D){if(D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.event="",I.prototype.data=$util.newBuffer([]),I.prototype.sn=$util.Long?$util.Long.fromBits(0,0,!1):0,I.prototype.time=$util.Long?$util.Long.fromBits(0,0,!1):0,I.prototype.valid=$util.Long?$util.Long.fromBits(0,0,!1):0,I.prototype.version=0,I.prototype.compress=!1,I.create=function(a){return new I(a)},I.encode=function(a,O){return O||(O=$Writer.create()),a.event!=null&&Object.hasOwnProperty.call(a,"event")&&O.uint32(10).string(a.event),a.data!=null&&Object.hasOwnProperty.call(a,"data")&&O.uint32(18).bytes(a.data),a.sn!=null&&Object.hasOwnProperty.call(a,"sn")&&O.uint32(24).int64(a.sn),a.time!=null&&Object.hasOwnProperty.call(a,"time")&&O.uint32(32).int64(a.time),a.valid!=null&&Object.hasOwnProperty.call(a,"valid")&&O.uint32(40).int64(a.valid),a.version!=null&&Object.hasOwnProperty.call(a,"version")&&O.uint32(48).int32(a.version),a.compress!=null&&Object.hasOwnProperty.call(a,"compress")&&O.uint32(56).bool(a.compress),O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.CommonReq;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.event=a.string();break}case 2:{z.data=a.bytes();break}case 3:{z.sn=a.int64();break}case 4:{z.time=a.int64();break}case 5:{z.valid=a.int64();break}case 6:{z.version=a.int32();break}case 7:{z.compress=a.bool();break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){return typeof a!="object"||a===null?"object expected":a.event!=null&&a.hasOwnProperty("event")&&!$util.isString(a.event)?"event: string expected":a.data!=null&&a.hasOwnProperty("data")&&!(a.data&&typeof a.data.length=="number"||$util.isString(a.data))?"data: buffer expected":a.sn!=null&&a.hasOwnProperty("sn")&&!$util.isInteger(a.sn)&&!(a.sn&&$util.isInteger(a.sn.low)&&$util.isInteger(a.sn.high))?"sn: integer|Long expected":a.time!=null&&a.hasOwnProperty("time")&&!$util.isInteger(a.time)&&!(a.time&&$util.isInteger(a.time.low)&&$util.isInteger(a.time.high))?"time: integer|Long expected":a.valid!=null&&a.hasOwnProperty("valid")&&!$util.isInteger(a.valid)&&!(a.valid&&$util.isInteger(a.valid.low)&&$util.isInteger(a.valid.high))?"valid: integer|Long expected":a.version!=null&&a.hasOwnProperty("version")&&!$util.isInteger(a.version)?"version: integer expected":a.compress!=null&&a.hasOwnProperty("compress")&&typeof a.compress!="boolean"?"compress: boolean expected":null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.CommonReq)return a;let O=new $root.com.quick.voice.proto.CommonReq;return a.event!=null&&(O.event=String(a.event)),a.data!=null&&(typeof a.data=="string"?$util.base64.decode(a.data,O.data=$util.newBuffer($util.base64.length(a.data)),0):a.data.length>=0&&(O.data=a.data)),a.sn!=null&&($util.Long?(O.sn=$util.Long.fromValue(a.sn)).unsigned=!1:typeof a.sn=="string"?O.sn=parseInt(a.sn,10):typeof a.sn=="number"?O.sn=a.sn:typeof a.sn=="object"&&(O.sn=new $util.LongBits(a.sn.low>>>0,a.sn.high>>>0).toNumber())),a.time!=null&&($util.Long?(O.time=$util.Long.fromValue(a.time)).unsigned=!1:typeof a.time=="string"?O.time=parseInt(a.time,10):typeof a.time=="number"?O.time=a.time:typeof a.time=="object"&&(O.time=new $util.LongBits(a.time.low>>>0,a.time.high>>>0).toNumber())),a.valid!=null&&($util.Long?(O.valid=$util.Long.fromValue(a.valid)).unsigned=!1:typeof a.valid=="string"?O.valid=parseInt(a.valid,10):typeof a.valid=="number"?O.valid=a.valid:typeof a.valid=="object"&&(O.valid=new $util.LongBits(a.valid.low>>>0,a.valid.high>>>0).toNumber())),a.version!=null&&(O.version=a.version|0),a.compress!=null&&(O.compress=!!a.compress),O},I.toObject=function(a,O){O||(O={});let F={};if(O.defaults){if(F.event="",O.bytes===String?F.data="":(F.data=[],O.bytes!==Array&&(F.data=$util.newBuffer(F.data))),$util.Long){let z=new $util.Long(0,0,!1);F.sn=O.longs===String?z.toString():O.longs===Number?z.toNumber():z}else F.sn=O.longs===String?"0":0;if($util.Long){let z=new $util.Long(0,0,!1);F.time=O.longs===String?z.toString():O.longs===Number?z.toNumber():z}else F.time=O.longs===String?"0":0;if($util.Long){let z=new $util.Long(0,0,!1);F.valid=O.longs===String?z.toString():O.longs===Number?z.toNumber():z}else F.valid=O.longs===String?"0":0;F.version=0,F.compress=!1}return a.event!=null&&a.hasOwnProperty("event")&&(F.event=a.event),a.data!=null&&a.hasOwnProperty("data")&&(F.data=O.bytes===String?$util.base64.encode(a.data,0,a.data.length):O.bytes===Array?Array.prototype.slice.call(a.data):a.data),a.sn!=null&&a.hasOwnProperty("sn")&&(typeof a.sn=="number"?F.sn=O.longs===String?String(a.sn):a.sn:F.sn=O.longs===String?$util.Long.prototype.toString.call(a.sn):O.longs===Number?new $util.LongBits(a.sn.low>>>0,a.sn.high>>>0).toNumber():a.sn),a.time!=null&&a.hasOwnProperty("time")&&(typeof a.time=="number"?F.time=O.longs===String?String(a.time):a.time:F.time=O.longs===String?$util.Long.prototype.toString.call(a.time):O.longs===Number?new $util.LongBits(a.time.low>>>0,a.time.high>>>0).toNumber():a.time),a.valid!=null&&a.hasOwnProperty("valid")&&(typeof a.valid=="number"?F.valid=O.longs===String?String(a.valid):a.valid:F.valid=O.longs===String?$util.Long.prototype.toString.call(a.valid):O.longs===Number?new $util.LongBits(a.valid.low>>>0,a.valid.high>>>0).toNumber():a.valid),a.version!=null&&a.hasOwnProperty("version")&&(F.version=a.version),a.compress!=null&&a.hasOwnProperty("compress")&&(F.compress=a.compress),F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.CommonReq"},I}(),J.CommonRsp=function(){function I(D){if(D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.event="",I.prototype.data=$util.newBuffer([]),I.prototype.sn=$util.Long?$util.Long.fromBits(0,0,!1):0,I.prototype.time=$util.Long?$util.Long.fromBits(0,0,!1):0,I.prototype.valid=$util.Long?$util.Long.fromBits(0,0,!1):0,I.prototype.code=0,I.prototype.desc="",I.prototype.version=0,I.prototype.compress=!1,I.create=function(a){return new I(a)},I.encode=function(a,O){return O||(O=$Writer.create()),a.event!=null&&Object.hasOwnProperty.call(a,"event")&&O.uint32(10).string(a.event),a.data!=null&&Object.hasOwnProperty.call(a,"data")&&O.uint32(18).bytes(a.data),a.sn!=null&&Object.hasOwnProperty.call(a,"sn")&&O.uint32(24).int64(a.sn),a.time!=null&&Object.hasOwnProperty.call(a,"time")&&O.uint32(32).int64(a.time),a.valid!=null&&Object.hasOwnProperty.call(a,"valid")&&O.uint32(40).int64(a.valid),a.code!=null&&Object.hasOwnProperty.call(a,"code")&&O.uint32(48).int32(a.code),a.desc!=null&&Object.hasOwnProperty.call(a,"desc")&&O.uint32(58).string(a.desc),a.version!=null&&Object.hasOwnProperty.call(a,"version")&&O.uint32(64).int32(a.version),a.compress!=null&&Object.hasOwnProperty.call(a,"compress")&&O.uint32(72).bool(a.compress),O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.CommonRsp;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.event=a.string();break}case 2:{z.data=a.bytes();break}case 3:{z.sn=a.int64();break}case 4:{z.time=a.int64();break}case 5:{z.valid=a.int64();break}case 6:{z.code=a.int32();break}case 7:{z.desc=a.string();break}case 8:{z.version=a.int32();break}case 9:{z.compress=a.bool();break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){return typeof a!="object"||a===null?"object expected":a.event!=null&&a.hasOwnProperty("event")&&!$util.isString(a.event)?"event: string expected":a.data!=null&&a.hasOwnProperty("data")&&!(a.data&&typeof a.data.length=="number"||$util.isString(a.data))?"data: buffer expected":a.sn!=null&&a.hasOwnProperty("sn")&&!$util.isInteger(a.sn)&&!(a.sn&&$util.isInteger(a.sn.low)&&$util.isInteger(a.sn.high))?"sn: integer|Long expected":a.time!=null&&a.hasOwnProperty("time")&&!$util.isInteger(a.time)&&!(a.time&&$util.isInteger(a.time.low)&&$util.isInteger(a.time.high))?"time: integer|Long expected":a.valid!=null&&a.hasOwnProperty("valid")&&!$util.isInteger(a.valid)&&!(a.valid&&$util.isInteger(a.valid.low)&&$util.isInteger(a.valid.high))?"valid: integer|Long expected":a.code!=null&&a.hasOwnProperty("code")&&!$util.isInteger(a.code)?"code: integer expected":a.desc!=null&&a.hasOwnProperty("desc")&&!$util.isString(a.desc)?"desc: string expected":a.version!=null&&a.hasOwnProperty("version")&&!$util.isInteger(a.version)?"version: integer expected":a.compress!=null&&a.hasOwnProperty("compress")&&typeof a.compress!="boolean"?"compress: boolean expected":null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.CommonRsp)return a;let O=new $root.com.quick.voice.proto.CommonRsp;return a.event!=null&&(O.event=String(a.event)),a.data!=null&&(typeof a.data=="string"?$util.base64.decode(a.data,O.data=$util.newBuffer($util.base64.length(a.data)),0):a.data.length>=0&&(O.data=a.data)),a.sn!=null&&($util.Long?(O.sn=$util.Long.fromValue(a.sn)).unsigned=!1:typeof a.sn=="string"?O.sn=parseInt(a.sn,10):typeof a.sn=="number"?O.sn=a.sn:typeof a.sn=="object"&&(O.sn=new $util.LongBits(a.sn.low>>>0,a.sn.high>>>0).toNumber())),a.time!=null&&($util.Long?(O.time=$util.Long.fromValue(a.time)).unsigned=!1:typeof a.time=="string"?O.time=parseInt(a.time,10):typeof a.time=="number"?O.time=a.time:typeof a.time=="object"&&(O.time=new $util.LongBits(a.time.low>>>0,a.time.high>>>0).toNumber())),a.valid!=null&&($util.Long?(O.valid=$util.Long.fromValue(a.valid)).unsigned=!1:typeof a.valid=="string"?O.valid=parseInt(a.valid,10):typeof a.valid=="number"?O.valid=a.valid:typeof a.valid=="object"&&(O.valid=new $util.LongBits(a.valid.low>>>0,a.valid.high>>>0).toNumber())),a.code!=null&&(O.code=a.code|0),a.desc!=null&&(O.desc=String(a.desc)),a.version!=null&&(O.version=a.version|0),a.compress!=null&&(O.compress=!!a.compress),O},I.toObject=function(a,O){O||(O={});let F={};if(O.defaults){if(F.event="",O.bytes===String?F.data="":(F.data=[],O.bytes!==Array&&(F.data=$util.newBuffer(F.data))),$util.Long){let z=new $util.Long(0,0,!1);F.sn=O.longs===String?z.toString():O.longs===Number?z.toNumber():z}else F.sn=O.longs===String?"0":0;if($util.Long){let z=new $util.Long(0,0,!1);F.time=O.longs===String?z.toString():O.longs===Number?z.toNumber():z}else F.time=O.longs===String?"0":0;if($util.Long){let z=new $util.Long(0,0,!1);F.valid=O.longs===String?z.toString():O.longs===Number?z.toNumber():z}else F.valid=O.longs===String?"0":0;F.code=0,F.desc="",F.version=0,F.compress=!1}return a.event!=null&&a.hasOwnProperty("event")&&(F.event=a.event),a.data!=null&&a.hasOwnProperty("data")&&(F.data=O.bytes===String?$util.base64.encode(a.data,0,a.data.length):O.bytes===Array?Array.prototype.slice.call(a.data):a.data),a.sn!=null&&a.hasOwnProperty("sn")&&(typeof a.sn=="number"?F.sn=O.longs===String?String(a.sn):a.sn:F.sn=O.longs===String?$util.Long.prototype.toString.call(a.sn):O.longs===Number?new $util.LongBits(a.sn.low>>>0,a.sn.high>>>0).toNumber():a.sn),a.time!=null&&a.hasOwnProperty("time")&&(typeof a.time=="number"?F.time=O.longs===String?String(a.time):a.time:F.time=O.longs===String?$util.Long.prototype.toString.call(a.time):O.longs===Number?new $util.LongBits(a.time.low>>>0,a.time.high>>>0).toNumber():a.time),a.valid!=null&&a.hasOwnProperty("valid")&&(typeof a.valid=="number"?F.valid=O.longs===String?String(a.valid):a.valid:F.valid=O.longs===String?$util.Long.prototype.toString.call(a.valid):O.longs===Number?new $util.LongBits(a.valid.low>>>0,a.valid.high>>>0).toNumber():a.valid),a.code!=null&&a.hasOwnProperty("code")&&(F.code=a.code),a.desc!=null&&a.hasOwnProperty("desc")&&(F.desc=a.desc),a.version!=null&&a.hasOwnProperty("version")&&(F.version=a.version),a.compress!=null&&a.hasOwnProperty("compress")&&(F.compress=a.compress),F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.CommonRsp"},I}(),J.User=function(){function I(a){if(this.tracks=[],a)for(let O=Object.keys(a),F=0;F<O.length;++F)a[O[F]]!=null&&(this[O[F]]=a[O[F]])}I.prototype.id="",I.prototype.callAction=null,I.prototype.callState=null,I.prototype.joinTime=null,I.prototype.tracks=$util.emptyArray,I.prototype.permissions=null,I.prototype.isPublished=null,I.prototype.behavior=null,I.prototype.channelCache=null;let D;return Object.defineProperty(I.prototype,"_callAction",{get:$util.oneOfGetter(D=["callAction"]),set:$util.oneOfSetter(D)}),Object.defineProperty(I.prototype,"_callState",{get:$util.oneOfGetter(D=["callState"]),set:$util.oneOfSetter(D)}),Object.defineProperty(I.prototype,"_joinTime",{get:$util.oneOfGetter(D=["joinTime"]),set:$util.oneOfSetter(D)}),Object.defineProperty(I.prototype,"_permissions",{get:$util.oneOfGetter(D=["permissions"]),set:$util.oneOfSetter(D)}),Object.defineProperty(I.prototype,"_isPublished",{get:$util.oneOfGetter(D=["isPublished"]),set:$util.oneOfSetter(D)}),Object.defineProperty(I.prototype,"_behavior",{get:$util.oneOfGetter(D=["behavior"]),set:$util.oneOfSetter(D)}),Object.defineProperty(I.prototype,"_channelCache",{get:$util.oneOfGetter(D=["channelCache"]),set:$util.oneOfSetter(D)}),I.create=function(O){return new I(O)},I.encode=function(O,F){if(F||(F=$Writer.create()),O.id!=null&&Object.hasOwnProperty.call(O,"id")&&F.uint32(10).string(O.id),O.callAction!=null&&Object.hasOwnProperty.call(O,"callAction")&&F.uint32(16).int32(O.callAction),O.callState!=null&&Object.hasOwnProperty.call(O,"callState")&&F.uint32(24).int32(O.callState),O.joinTime!=null&&Object.hasOwnProperty.call(O,"joinTime")&&F.uint32(32).int64(O.joinTime),O.tracks!=null&&O.tracks.length)for(let z=0;z<O.tracks.length;++z)$root.com.quick.voice.proto.Track.encode(O.tracks[z],F.uint32(42).fork()).ldelim();return O.permissions!=null&&Object.hasOwnProperty.call(O,"permissions")&&F.uint32(48).int32(O.permissions),O.isPublished!=null&&Object.hasOwnProperty.call(O,"isPublished")&&F.uint32(56).bool(O.isPublished),O.behavior!=null&&Object.hasOwnProperty.call(O,"behavior")&&F.uint32(64).int32(O.behavior),O.channelCache!=null&&Object.hasOwnProperty.call(O,"channelCache")&&$root.com.quick.voice.proto.DataChannelCacheInfo.encode(O.channelCache,F.uint32(74).fork()).ldelim(),F},I.encodeDelimited=function(O,F){return this.encode(O,F).ldelim()},I.decode=function(O,F){O instanceof $Reader||(O=$Reader.create(O));let z=F===void 0?O.len:O.pos+F,K=new $root.com.quick.voice.proto.User;for(;O.pos<z;){let te=O.uint32();switch(te>>>3){case 1:{K.id=O.string();break}case 2:{K.callAction=O.int32();break}case 3:{K.callState=O.int32();break}case 4:{K.joinTime=O.int64();break}case 5:{K.tracks&&K.tracks.length||(K.tracks=[]),K.tracks.push($root.com.quick.voice.proto.Track.decode(O,O.uint32()));break}case 6:{K.permissions=O.int32();break}case 7:{K.isPublished=O.bool();break}case 8:{K.behavior=O.int32();break}case 9:{K.channelCache=$root.com.quick.voice.proto.DataChannelCacheInfo.decode(O,O.uint32());break}default:O.skipType(te&7);break}}return K},I.decodeDelimited=function(O){return O instanceof $Reader||(O=new $Reader(O)),this.decode(O,O.uint32())},I.verify=function(O){if(typeof O!="object"||O===null)return"object expected";if(O.id!=null&&O.hasOwnProperty("id")&&!$util.isString(O.id))return"id: string expected";if(O.callAction!=null&&O.hasOwnProperty("callAction")&&!$util.isInteger(O.callAction))return"callAction: integer expected";if(O.callState!=null&&O.hasOwnProperty("callState")&&!$util.isInteger(O.callState))return"callState: integer expected";if(O.joinTime!=null&&O.hasOwnProperty("joinTime")&&!$util.isInteger(O.joinTime)&&!(O.joinTime&&$util.isInteger(O.joinTime.low)&&$util.isInteger(O.joinTime.high)))return"joinTime: integer|Long expected";if(O.tracks!=null&&O.hasOwnProperty("tracks")){if(!Array.isArray(O.tracks))return"tracks: array expected";for(let F=0;F<O.tracks.length;++F){let z=$root.com.quick.voice.proto.Track.verify(O.tracks[F]);if(z)return"tracks."+z}}if(O.permissions!=null&&O.hasOwnProperty("permissions")&&!$util.isInteger(O.permissions))return"permissions: integer expected";if(O.isPublished!=null&&O.hasOwnProperty("isPublished")&&typeof O.isPublished!="boolean")return"isPublished: boolean expected";if(O.behavior!=null&&O.hasOwnProperty("behavior")&&!$util.isInteger(O.behavior))return"behavior: integer expected";if(O.channelCache!=null&&O.hasOwnProperty("channelCache")){let F=$root.com.quick.voice.proto.DataChannelCacheInfo.verify(O.channelCache);if(F)return"channelCache."+F}return null},I.fromObject=function(O){if(O instanceof $root.com.quick.voice.proto.User)return O;let F=new $root.com.quick.voice.proto.User;if(O.id!=null&&(F.id=String(O.id)),O.callAction!=null&&(F.callAction=O.callAction|0),O.callState!=null&&(F.callState=O.callState|0),O.joinTime!=null&&($util.Long?(F.joinTime=$util.Long.fromValue(O.joinTime)).unsigned=!1:typeof O.joinTime=="string"?F.joinTime=parseInt(O.joinTime,10):typeof O.joinTime=="number"?F.joinTime=O.joinTime:typeof O.joinTime=="object"&&(F.joinTime=new $util.LongBits(O.joinTime.low>>>0,O.joinTime.high>>>0).toNumber())),O.tracks){if(!Array.isArray(O.tracks))throw TypeError(".com.quick.voice.proto.User.tracks: array expected");F.tracks=[];for(let z=0;z<O.tracks.length;++z){if(typeof O.tracks[z]!="object")throw TypeError(".com.quick.voice.proto.User.tracks: object expected");F.tracks[z]=$root.com.quick.voice.proto.Track.fromObject(O.tracks[z])}}if(O.permissions!=null&&(F.permissions=O.permissions|0),O.isPublished!=null&&(F.isPublished=!!O.isPublished),O.behavior!=null&&(F.behavior=O.behavior|0),O.channelCache!=null){if(typeof O.channelCache!="object")throw TypeError(".com.quick.voice.proto.User.channelCache: object expected");F.channelCache=$root.com.quick.voice.proto.DataChannelCacheInfo.fromObject(O.channelCache)}return F},I.toObject=function(O,F){F||(F={});let z={};if((F.arrays||F.defaults)&&(z.tracks=[]),F.defaults&&(z.id=""),O.id!=null&&O.hasOwnProperty("id")&&(z.id=O.id),O.callAction!=null&&O.hasOwnProperty("callAction")&&(z.callAction=O.callAction,F.oneofs&&(z._callAction="callAction")),O.callState!=null&&O.hasOwnProperty("callState")&&(z.callState=O.callState,F.oneofs&&(z._callState="callState")),O.joinTime!=null&&O.hasOwnProperty("joinTime")&&(typeof O.joinTime=="number"?z.joinTime=F.longs===String?String(O.joinTime):O.joinTime:z.joinTime=F.longs===String?$util.Long.prototype.toString.call(O.joinTime):F.longs===Number?new $util.LongBits(O.joinTime.low>>>0,O.joinTime.high>>>0).toNumber():O.joinTime,F.oneofs&&(z._joinTime="joinTime")),O.tracks&&O.tracks.length){z.tracks=[];for(let K=0;K<O.tracks.length;++K)z.tracks[K]=$root.com.quick.voice.proto.Track.toObject(O.tracks[K],F)}return O.permissions!=null&&O.hasOwnProperty("permissions")&&(z.permissions=O.permissions,F.oneofs&&(z._permissions="permissions")),O.isPublished!=null&&O.hasOwnProperty("isPublished")&&(z.isPublished=O.isPublished,F.oneofs&&(z._isPublished="isPublished")),O.behavior!=null&&O.hasOwnProperty("behavior")&&(z.behavior=O.behavior,F.oneofs&&(z._behavior="behavior")),O.channelCache!=null&&O.hasOwnProperty("channelCache")&&(z.channelCache=$root.com.quick.voice.proto.DataChannelCacheInfo.toObject(O.channelCache,F),F.oneofs&&(z._channelCache="channelCache")),z},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(O){return O===void 0&&(O="type.googleapis.com"),O+"/com.quick.voice.proto.User"},I}(),J.DataChannelCacheInfo=function(){function I(D){if(this.channels=[],D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.channels=$util.emptyArray,I.create=function(a){return new I(a)},I.encode=function(a,O){if(O||(O=$Writer.create()),a.channels!=null&&a.channels.length)for(let F=0;F<a.channels.length;++F)$root.com.quick.voice.proto.DataChannel.encode(a.channels[F],O.uint32(10).fork()).ldelim();return O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.DataChannelCacheInfo;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.channels&&z.channels.length||(z.channels=[]),z.channels.push($root.com.quick.voice.proto.DataChannel.decode(a,a.uint32()));break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.channels!=null&&a.hasOwnProperty("channels")){if(!Array.isArray(a.channels))return"channels: array expected";for(let O=0;O<a.channels.length;++O){let F=$root.com.quick.voice.proto.DataChannel.verify(a.channels[O]);if(F)return"channels."+F}}return null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.DataChannelCacheInfo)return a;let O=new $root.com.quick.voice.proto.DataChannelCacheInfo;if(a.channels){if(!Array.isArray(a.channels))throw TypeError(".com.quick.voice.proto.DataChannelCacheInfo.channels: array expected");O.channels=[];for(let F=0;F<a.channels.length;++F){if(typeof a.channels[F]!="object")throw TypeError(".com.quick.voice.proto.DataChannelCacheInfo.channels: object expected");O.channels[F]=$root.com.quick.voice.proto.DataChannel.fromObject(a.channels[F])}}return O},I.toObject=function(a,O){O||(O={});let F={};if((O.arrays||O.defaults)&&(F.channels=[]),a.channels&&a.channels.length){F.channels=[];for(let z=0;z<a.channels.length;++z)F.channels[z]=$root.com.quick.voice.proto.DataChannel.toObject(a.channels[z],O)}return F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.DataChannelCacheInfo"},I}(),J.DataChannel=function(){function I(a){if(a)for(let O=Object.keys(a),F=0;F<O.length;++F)a[O[F]]!=null&&(this[O[F]]=a[O[F]])}I.prototype.dataChannelName="",I.prototype.id=null;let D;return Object.defineProperty(I.prototype,"_id",{get:$util.oneOfGetter(D=["id"]),set:$util.oneOfSetter(D)}),I.create=function(O){return new I(O)},I.encode=function(O,F){return F||(F=$Writer.create()),O.dataChannelName!=null&&Object.hasOwnProperty.call(O,"dataChannelName")&&F.uint32(10).string(O.dataChannelName),O.id!=null&&Object.hasOwnProperty.call(O,"id")&&F.uint32(16).int32(O.id),F},I.encodeDelimited=function(O,F){return this.encode(O,F).ldelim()},I.decode=function(O,F){O instanceof $Reader||(O=$Reader.create(O));let z=F===void 0?O.len:O.pos+F,K=new $root.com.quick.voice.proto.DataChannel;for(;O.pos<z;){let te=O.uint32();switch(te>>>3){case 1:{K.dataChannelName=O.string();break}case 2:{K.id=O.int32();break}default:O.skipType(te&7);break}}return K},I.decodeDelimited=function(O){return O instanceof $Reader||(O=new $Reader(O)),this.decode(O,O.uint32())},I.verify=function(O){return typeof O!="object"||O===null?"object expected":O.dataChannelName!=null&&O.hasOwnProperty("dataChannelName")&&!$util.isString(O.dataChannelName)?"dataChannelName: string expected":O.id!=null&&O.hasOwnProperty("id")&&!$util.isInteger(O.id)?"id: integer expected":null},I.fromObject=function(O){if(O instanceof $root.com.quick.voice.proto.DataChannel)return O;let F=new $root.com.quick.voice.proto.DataChannel;return O.dataChannelName!=null&&(F.dataChannelName=String(O.dataChannelName)),O.id!=null&&(F.id=O.id|0),F},I.toObject=function(O,F){F||(F={});let z={};return F.defaults&&(z.dataChannelName=""),O.dataChannelName!=null&&O.hasOwnProperty("dataChannelName")&&(z.dataChannelName=O.dataChannelName),O.id!=null&&O.hasOwnProperty("id")&&(z.id=O.id,F.oneofs&&(z._id="id")),z},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(O){return O===void 0&&(O="type.googleapis.com"),O+"/com.quick.voice.proto.DataChannel"},I}(),J.Login=function(){function I(D){if(D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.appid="",I.prototype.userId="",I.prototype.sdkToken="",I.create=function(a){return new I(a)},I.encode=function(a,O){return O||(O=$Writer.create()),a.appid!=null&&Object.hasOwnProperty.call(a,"appid")&&O.uint32(10).string(a.appid),a.userId!=null&&Object.hasOwnProperty.call(a,"userId")&&O.uint32(18).string(a.userId),a.sdkToken!=null&&Object.hasOwnProperty.call(a,"sdkToken")&&O.uint32(26).string(a.sdkToken),O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.Login;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.appid=a.string();break}case 2:{z.userId=a.string();break}case 3:{z.sdkToken=a.string();break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){return typeof a!="object"||a===null?"object expected":a.appid!=null&&a.hasOwnProperty("appid")&&!$util.isString(a.appid)?"appid: string expected":a.userId!=null&&a.hasOwnProperty("userId")&&!$util.isString(a.userId)?"userId: string expected":a.sdkToken!=null&&a.hasOwnProperty("sdkToken")&&!$util.isString(a.sdkToken)?"sdkToken: string expected":null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.Login)return a;let O=new $root.com.quick.voice.proto.Login;return a.appid!=null&&(O.appid=String(a.appid)),a.userId!=null&&(O.userId=String(a.userId)),a.sdkToken!=null&&(O.sdkToken=String(a.sdkToken)),O},I.toObject=function(a,O){O||(O={});let F={};return O.defaults&&(F.appid="",F.userId="",F.sdkToken=""),a.appid!=null&&a.hasOwnProperty("appid")&&(F.appid=a.appid),a.userId!=null&&a.hasOwnProperty("userId")&&(F.userId=a.userId),a.sdkToken!=null&&a.hasOwnProperty("sdkToken")&&(F.sdkToken=a.sdkToken),F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.Login"},I}(),J.Track=function(){function I(a){if(a)for(let O=Object.keys(a),F=0;F<O.length;++F)a[O[F]]!=null&&(this[O[F]]=a[O[F]])}I.prototype.mid="",I.prototype.trackName=null,I.prototype.location=null,I.prototype.userId=null,I.prototype.code=null,I.prototype.desc=null,I.prototype.type=null,I.prototype.isValid=null,I.prototype.simulcast=null;let D;return Object.defineProperty(I.prototype,"_trackName",{get:$util.oneOfGetter(D=["trackName"]),set:$util.oneOfSetter(D)}),Object.defineProperty(I.prototype,"_location",{get:$util.oneOfGetter(D=["location"]),set:$util.oneOfSetter(D)}),Object.defineProperty(I.prototype,"_userId",{get:$util.oneOfGetter(D=["userId"]),set:$util.oneOfSetter(D)}),Object.defineProperty(I.prototype,"_code",{get:$util.oneOfGetter(D=["code"]),set:$util.oneOfSetter(D)}),Object.defineProperty(I.prototype,"_desc",{get:$util.oneOfGetter(D=["desc"]),set:$util.oneOfSetter(D)}),Object.defineProperty(I.prototype,"_type",{get:$util.oneOfGetter(D=["type"]),set:$util.oneOfSetter(D)}),Object.defineProperty(I.prototype,"_isValid",{get:$util.oneOfGetter(D=["isValid"]),set:$util.oneOfSetter(D)}),Object.defineProperty(I.prototype,"_simulcast",{get:$util.oneOfGetter(D=["simulcast"]),set:$util.oneOfSetter(D)}),I.create=function(O){return new I(O)},I.encode=function(O,F){return F||(F=$Writer.create()),O.mid!=null&&Object.hasOwnProperty.call(O,"mid")&&F.uint32(10).string(O.mid),O.trackName!=null&&Object.hasOwnProperty.call(O,"trackName")&&F.uint32(18).string(O.trackName),O.location!=null&&Object.hasOwnProperty.call(O,"location")&&F.uint32(26).string(O.location),O.userId!=null&&Object.hasOwnProperty.call(O,"userId")&&F.uint32(34).string(O.userId),O.code!=null&&Object.hasOwnProperty.call(O,"code")&&F.uint32(40).int32(O.code),O.desc!=null&&Object.hasOwnProperty.call(O,"desc")&&F.uint32(50).string(O.desc),O.type!=null&&Object.hasOwnProperty.call(O,"type")&&F.uint32(56).int32(O.type),O.isValid!=null&&Object.hasOwnProperty.call(O,"isValid")&&F.uint32(64).bool(O.isValid),O.simulcast!=null&&Object.hasOwnProperty.call(O,"simulcast")&&F.uint32(74).string(O.simulcast),F},I.encodeDelimited=function(O,F){return this.encode(O,F).ldelim()},I.decode=function(O,F){O instanceof $Reader||(O=$Reader.create(O));let z=F===void 0?O.len:O.pos+F,K=new $root.com.quick.voice.proto.Track;for(;O.pos<z;){let te=O.uint32();switch(te>>>3){case 1:{K.mid=O.string();break}case 2:{K.trackName=O.string();break}case 3:{K.location=O.string();break}case 4:{K.userId=O.string();break}case 5:{K.code=O.int32();break}case 6:{K.desc=O.string();break}case 7:{K.type=O.int32();break}case 8:{K.isValid=O.bool();break}case 9:{K.simulcast=O.string();break}default:O.skipType(te&7);break}}return K},I.decodeDelimited=function(O){return O instanceof $Reader||(O=new $Reader(O)),this.decode(O,O.uint32())},I.verify=function(O){if(typeof O!="object"||O===null)return"object expected";if(O.mid!=null&&O.hasOwnProperty("mid")&&!$util.isString(O.mid))return"mid: string expected";if(O.trackName!=null&&O.hasOwnProperty("trackName")&&!$util.isString(O.trackName))return"trackName: string expected";if(O.location!=null&&O.hasOwnProperty("location")&&!$util.isString(O.location))return"location: string expected";if(O.userId!=null&&O.hasOwnProperty("userId")&&!$util.isString(O.userId))return"userId: string expected";if(O.code!=null&&O.hasOwnProperty("code")&&!$util.isInteger(O.code))return"code: integer expected";if(O.desc!=null&&O.hasOwnProperty("desc")&&!$util.isString(O.desc))return"desc: string expected";if(O.type!=null&&O.hasOwnProperty("type"))switch(O.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:break}return O.isValid!=null&&O.hasOwnProperty("isValid")&&typeof O.isValid!="boolean"?"isValid: boolean expected":O.simulcast!=null&&O.hasOwnProperty("simulcast")&&!$util.isString(O.simulcast)?"simulcast: string expected":null},I.fromObject=function(O){if(O instanceof $root.com.quick.voice.proto.Track)return O;let F=new $root.com.quick.voice.proto.Track;switch(O.mid!=null&&(F.mid=String(O.mid)),O.trackName!=null&&(F.trackName=String(O.trackName)),O.location!=null&&(F.location=String(O.location)),O.userId!=null&&(F.userId=String(O.userId)),O.code!=null&&(F.code=O.code|0),O.desc!=null&&(F.desc=String(O.desc)),O.type){default:if(typeof O.type=="number"){F.type=O.type;break}break;case"Microphone":case 0:F.type=0;break;case"Camera":case 1:F.type=1;break;case"Screen":case 2:F.type=2;break;case"SystemVoice":case 3:F.type=3;break}return O.isValid!=null&&(F.isValid=!!O.isValid),O.simulcast!=null&&(F.simulcast=String(O.simulcast)),F},I.toObject=function(O,F){F||(F={});let z={};return F.defaults&&(z.mid=""),O.mid!=null&&O.hasOwnProperty("mid")&&(z.mid=O.mid),O.trackName!=null&&O.hasOwnProperty("trackName")&&(z.trackName=O.trackName,F.oneofs&&(z._trackName="trackName")),O.location!=null&&O.hasOwnProperty("location")&&(z.location=O.location,F.oneofs&&(z._location="location")),O.userId!=null&&O.hasOwnProperty("userId")&&(z.userId=O.userId,F.oneofs&&(z._userId="userId")),O.code!=null&&O.hasOwnProperty("code")&&(z.code=O.code,F.oneofs&&(z._code="code")),O.desc!=null&&O.hasOwnProperty("desc")&&(z.desc=O.desc,F.oneofs&&(z._desc="desc")),O.type!=null&&O.hasOwnProperty("type")&&(z.type=F.enums===String?$root.com.quick.voice.proto.TrackType[O.type]===void 0?O.type:$root.com.quick.voice.proto.TrackType[O.type]:O.type,F.oneofs&&(z._type="type")),O.isValid!=null&&O.hasOwnProperty("isValid")&&(z.isValid=O.isValid,F.oneofs&&(z._isValid="isValid")),O.simulcast!=null&&O.hasOwnProperty("simulcast")&&(z.simulcast=O.simulcast,F.oneofs&&(z._simulcast="simulcast")),z},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(O){return O===void 0&&(O="type.googleapis.com"),O+"/com.quick.voice.proto.Track"},I}(),J.JoinReq=function(){function I(a){if(a)for(let O=Object.keys(a),F=0;F<O.length;++F)a[O[F]]!=null&&(this[O[F]]=a[O[F]])}I.prototype.roomId="",I.prototype.user=null,I.prototype.callType=0,I.prototype.token=null;let D;return Object.defineProperty(I.prototype,"_token",{get:$util.oneOfGetter(D=["token"]),set:$util.oneOfSetter(D)}),I.create=function(O){return new I(O)},I.encode=function(O,F){return F||(F=$Writer.create()),O.roomId!=null&&Object.hasOwnProperty.call(O,"roomId")&&F.uint32(10).string(O.roomId),O.user!=null&&Object.hasOwnProperty.call(O,"user")&&$root.com.quick.voice.proto.User.encode(O.user,F.uint32(18).fork()).ldelim(),O.callType!=null&&Object.hasOwnProperty.call(O,"callType")&&F.uint32(24).int32(O.callType),O.token!=null&&Object.hasOwnProperty.call(O,"token")&&F.uint32(34).string(O.token),F},I.encodeDelimited=function(O,F){return this.encode(O,F).ldelim()},I.decode=function(O,F){O instanceof $Reader||(O=$Reader.create(O));let z=F===void 0?O.len:O.pos+F,K=new $root.com.quick.voice.proto.JoinReq;for(;O.pos<z;){let te=O.uint32();switch(te>>>3){case 1:{K.roomId=O.string();break}case 2:{K.user=$root.com.quick.voice.proto.User.decode(O,O.uint32());break}case 3:{K.callType=O.int32();break}case 4:{K.token=O.string();break}default:O.skipType(te&7);break}}return K},I.decodeDelimited=function(O){return O instanceof $Reader||(O=new $Reader(O)),this.decode(O,O.uint32())},I.verify=function(O){if(typeof O!="object"||O===null)return"object expected";if(O.roomId!=null&&O.hasOwnProperty("roomId")&&!$util.isString(O.roomId))return"roomId: string expected";if(O.user!=null&&O.hasOwnProperty("user")){let F=$root.com.quick.voice.proto.User.verify(O.user);if(F)return"user."+F}if(O.callType!=null&&O.hasOwnProperty("callType"))switch(O.callType){default:return"callType: enum value expected";case 0:case 1:case 2:break}return O.token!=null&&O.hasOwnProperty("token")&&!$util.isString(O.token)?"token: string expected":null},I.fromObject=function(O){if(O instanceof $root.com.quick.voice.proto.JoinReq)return O;let F=new $root.com.quick.voice.proto.JoinReq;if(O.roomId!=null&&(F.roomId=String(O.roomId)),O.user!=null){if(typeof O.user!="object")throw TypeError(".com.quick.voice.proto.JoinReq.user: object expected");F.user=$root.com.quick.voice.proto.User.fromObject(O.user)}switch(O.callType){default:if(typeof O.callType=="number"){F.callType=O.callType;break}break;case"Normal":case 0:F.callType=0;break;case"Meeting":case 1:F.callType=1;break;case"Live":case 2:F.callType=2;break}return O.token!=null&&(F.token=String(O.token)),F},I.toObject=function(O,F){F||(F={});let z={};return F.defaults&&(z.roomId="",z.user=null,z.callType=F.enums===String?"Normal":0),O.roomId!=null&&O.hasOwnProperty("roomId")&&(z.roomId=O.roomId),O.user!=null&&O.hasOwnProperty("user")&&(z.user=$root.com.quick.voice.proto.User.toObject(O.user,F)),O.callType!=null&&O.hasOwnProperty("callType")&&(z.callType=F.enums===String?$root.com.quick.voice.proto.CallType[O.callType]===void 0?O.callType:$root.com.quick.voice.proto.CallType[O.callType]:O.callType),O.token!=null&&O.hasOwnProperty("token")&&(z.token=O.token,F.oneofs&&(z._token="token")),z},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(O){return O===void 0&&(O="type.googleapis.com"),O+"/com.quick.voice.proto.JoinReq"},I}(),J.JoinRsp=function(){function I(D){if(this.roomUsers=[],D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.roomId="",I.prototype.roomUsers=$util.emptyArray,I.prototype.callType=0,I.create=function(a){return new I(a)},I.encode=function(a,O){if(O||(O=$Writer.create()),a.roomId!=null&&Object.hasOwnProperty.call(a,"roomId")&&O.uint32(10).string(a.roomId),a.roomUsers!=null&&a.roomUsers.length)for(let F=0;F<a.roomUsers.length;++F)$root.com.quick.voice.proto.User.encode(a.roomUsers[F],O.uint32(18).fork()).ldelim();return a.callType!=null&&Object.hasOwnProperty.call(a,"callType")&&O.uint32(24).int32(a.callType),O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.JoinRsp;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.roomId=a.string();break}case 2:{z.roomUsers&&z.roomUsers.length||(z.roomUsers=[]),z.roomUsers.push($root.com.quick.voice.proto.User.decode(a,a.uint32()));break}case 3:{z.callType=a.int32();break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.roomId!=null&&a.hasOwnProperty("roomId")&&!$util.isString(a.roomId))return"roomId: string expected";if(a.roomUsers!=null&&a.hasOwnProperty("roomUsers")){if(!Array.isArray(a.roomUsers))return"roomUsers: array expected";for(let O=0;O<a.roomUsers.length;++O){let F=$root.com.quick.voice.proto.User.verify(a.roomUsers[O]);if(F)return"roomUsers."+F}}if(a.callType!=null&&a.hasOwnProperty("callType"))switch(a.callType){default:return"callType: enum value expected";case 0:case 1:case 2:break}return null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.JoinRsp)return a;let O=new $root.com.quick.voice.proto.JoinRsp;if(a.roomId!=null&&(O.roomId=String(a.roomId)),a.roomUsers){if(!Array.isArray(a.roomUsers))throw TypeError(".com.quick.voice.proto.JoinRsp.roomUsers: array expected");O.roomUsers=[];for(let F=0;F<a.roomUsers.length;++F){if(typeof a.roomUsers[F]!="object")throw TypeError(".com.quick.voice.proto.JoinRsp.roomUsers: object expected");O.roomUsers[F]=$root.com.quick.voice.proto.User.fromObject(a.roomUsers[F])}}switch(a.callType){default:if(typeof a.callType=="number"){O.callType=a.callType;break}break;case"Normal":case 0:O.callType=0;break;case"Meeting":case 1:O.callType=1;break;case"Live":case 2:O.callType=2;break}return O},I.toObject=function(a,O){O||(O={});let F={};if((O.arrays||O.defaults)&&(F.roomUsers=[]),O.defaults&&(F.roomId="",F.callType=O.enums===String?"Normal":0),a.roomId!=null&&a.hasOwnProperty("roomId")&&(F.roomId=a.roomId),a.roomUsers&&a.roomUsers.length){F.roomUsers=[];for(let z=0;z<a.roomUsers.length;++z)F.roomUsers[z]=$root.com.quick.voice.proto.User.toObject(a.roomUsers[z],O)}return a.callType!=null&&a.hasOwnProperty("callType")&&(F.callType=O.enums===String?$root.com.quick.voice.proto.CallType[a.callType]===void 0?a.callType:$root.com.quick.voice.proto.CallType[a.callType]:a.callType),F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.JoinRsp"},I}(),J.JoinNotify=function(){function I(D){if(D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.roomId="",I.prototype.user=null,I.create=function(a){return new I(a)},I.encode=function(a,O){return O||(O=$Writer.create()),a.roomId!=null&&Object.hasOwnProperty.call(a,"roomId")&&O.uint32(10).string(a.roomId),a.user!=null&&Object.hasOwnProperty.call(a,"user")&&$root.com.quick.voice.proto.User.encode(a.user,O.uint32(18).fork()).ldelim(),O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.JoinNotify;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.roomId=a.string();break}case 2:{z.user=$root.com.quick.voice.proto.User.decode(a,a.uint32());break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.roomId!=null&&a.hasOwnProperty("roomId")&&!$util.isString(a.roomId))return"roomId: string expected";if(a.user!=null&&a.hasOwnProperty("user")){let O=$root.com.quick.voice.proto.User.verify(a.user);if(O)return"user."+O}return null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.JoinNotify)return a;let O=new $root.com.quick.voice.proto.JoinNotify;if(a.roomId!=null&&(O.roomId=String(a.roomId)),a.user!=null){if(typeof a.user!="object")throw TypeError(".com.quick.voice.proto.JoinNotify.user: object expected");O.user=$root.com.quick.voice.proto.User.fromObject(a.user)}return O},I.toObject=function(a,O){O||(O={});let F={};return O.defaults&&(F.roomId="",F.user=null),a.roomId!=null&&a.hasOwnProperty("roomId")&&(F.roomId=a.roomId),a.user!=null&&a.hasOwnProperty("user")&&(F.user=$root.com.quick.voice.proto.User.toObject(a.user,O)),F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.JoinNotify"},I}(),J.ConnectCFReq=function(){function I(D){if(D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.sdp="",I.create=function(a){return new I(a)},I.encode=function(a,O){return O||(O=$Writer.create()),a.sdp!=null&&Object.hasOwnProperty.call(a,"sdp")&&O.uint32(10).string(a.sdp),O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.ConnectCFReq;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.sdp=a.string();break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){return typeof a!="object"||a===null?"object expected":a.sdp!=null&&a.hasOwnProperty("sdp")&&!$util.isString(a.sdp)?"sdp: string expected":null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.ConnectCFReq)return a;let O=new $root.com.quick.voice.proto.ConnectCFReq;return a.sdp!=null&&(O.sdp=String(a.sdp)),O},I.toObject=function(a,O){O||(O={});let F={};return O.defaults&&(F.sdp=""),a.sdp!=null&&a.hasOwnProperty("sdp")&&(F.sdp=a.sdp),F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.ConnectCFReq"},I}(),J.ConnectCFRsp=function(){function I(D){if(this.subscribeUsers=[],D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.remoteSdp="",I.prototype.subscribeUsers=$util.emptyArray,I.create=function(a){return new I(a)},I.encode=function(a,O){if(O||(O=$Writer.create()),a.remoteSdp!=null&&Object.hasOwnProperty.call(a,"remoteSdp")&&O.uint32(10).string(a.remoteSdp),a.subscribeUsers!=null&&a.subscribeUsers.length)for(let F=0;F<a.subscribeUsers.length;++F)$root.com.quick.voice.proto.User.encode(a.subscribeUsers[F],O.uint32(18).fork()).ldelim();return O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.ConnectCFRsp;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.remoteSdp=a.string();break}case 2:{z.subscribeUsers&&z.subscribeUsers.length||(z.subscribeUsers=[]),z.subscribeUsers.push($root.com.quick.voice.proto.User.decode(a,a.uint32()));break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.remoteSdp!=null&&a.hasOwnProperty("remoteSdp")&&!$util.isString(a.remoteSdp))return"remoteSdp: string expected";if(a.subscribeUsers!=null&&a.hasOwnProperty("subscribeUsers")){if(!Array.isArray(a.subscribeUsers))return"subscribeUsers: array expected";for(let O=0;O<a.subscribeUsers.length;++O){let F=$root.com.quick.voice.proto.User.verify(a.subscribeUsers[O]);if(F)return"subscribeUsers."+F}}return null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.ConnectCFRsp)return a;let O=new $root.com.quick.voice.proto.ConnectCFRsp;if(a.remoteSdp!=null&&(O.remoteSdp=String(a.remoteSdp)),a.subscribeUsers){if(!Array.isArray(a.subscribeUsers))throw TypeError(".com.quick.voice.proto.ConnectCFRsp.subscribeUsers: array expected");O.subscribeUsers=[];for(let F=0;F<a.subscribeUsers.length;++F){if(typeof a.subscribeUsers[F]!="object")throw TypeError(".com.quick.voice.proto.ConnectCFRsp.subscribeUsers: object expected");O.subscribeUsers[F]=$root.com.quick.voice.proto.User.fromObject(a.subscribeUsers[F])}}return O},I.toObject=function(a,O){O||(O={});let F={};if((O.arrays||O.defaults)&&(F.subscribeUsers=[]),O.defaults&&(F.remoteSdp=""),a.remoteSdp!=null&&a.hasOwnProperty("remoteSdp")&&(F.remoteSdp=a.remoteSdp),a.subscribeUsers&&a.subscribeUsers.length){F.subscribeUsers=[];for(let z=0;z<a.subscribeUsers.length;++z)F.subscribeUsers[z]=$root.com.quick.voice.proto.User.toObject(a.subscribeUsers[z],O)}return F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.ConnectCFRsp"},I}(),J.PublishReq=function(){function I(a){if(this.tracks=[],a)for(let O=Object.keys(a),F=0;F<O.length;++F)a[O[F]]!=null&&(this[O[F]]=a[O[F]])}I.prototype.sdp="",I.prototype.tracks=$util.emptyArray,I.prototype.callAction=0,I.prototype.recreate=null;let D;return Object.defineProperty(I.prototype,"_recreate",{get:$util.oneOfGetter(D=["recreate"]),set:$util.oneOfSetter(D)}),I.create=function(O){return new I(O)},I.encode=function(O,F){if(F||(F=$Writer.create()),O.sdp!=null&&Object.hasOwnProperty.call(O,"sdp")&&F.uint32(10).string(O.sdp),O.tracks!=null&&O.tracks.length)for(let z=0;z<O.tracks.length;++z)$root.com.quick.voice.proto.Track.encode(O.tracks[z],F.uint32(18).fork()).ldelim();return O.callAction!=null&&Object.hasOwnProperty.call(O,"callAction")&&F.uint32(24).int32(O.callAction),O.recreate!=null&&Object.hasOwnProperty.call(O,"recreate")&&F.uint32(32).bool(O.recreate),F},I.encodeDelimited=function(O,F){return this.encode(O,F).ldelim()},I.decode=function(O,F){O instanceof $Reader||(O=$Reader.create(O));let z=F===void 0?O.len:O.pos+F,K=new $root.com.quick.voice.proto.PublishReq;for(;O.pos<z;){let te=O.uint32();switch(te>>>3){case 1:{K.sdp=O.string();break}case 2:{K.tracks&&K.tracks.length||(K.tracks=[]),K.tracks.push($root.com.quick.voice.proto.Track.decode(O,O.uint32()));break}case 3:{K.callAction=O.int32();break}case 4:{K.recreate=O.bool();break}default:O.skipType(te&7);break}}return K},I.decodeDelimited=function(O){return O instanceof $Reader||(O=new $Reader(O)),this.decode(O,O.uint32())},I.verify=function(O){if(typeof O!="object"||O===null)return"object expected";if(O.sdp!=null&&O.hasOwnProperty("sdp")&&!$util.isString(O.sdp))return"sdp: string expected";if(O.tracks!=null&&O.hasOwnProperty("tracks")){if(!Array.isArray(O.tracks))return"tracks: array expected";for(let F=0;F<O.tracks.length;++F){let z=$root.com.quick.voice.proto.Track.verify(O.tracks[F]);if(z)return"tracks."+z}}return O.callAction!=null&&O.hasOwnProperty("callAction")&&!$util.isInteger(O.callAction)?"callAction: integer expected":O.recreate!=null&&O.hasOwnProperty("recreate")&&typeof O.recreate!="boolean"?"recreate: boolean expected":null},I.fromObject=function(O){if(O instanceof $root.com.quick.voice.proto.PublishReq)return O;let F=new $root.com.quick.voice.proto.PublishReq;if(O.sdp!=null&&(F.sdp=String(O.sdp)),O.tracks){if(!Array.isArray(O.tracks))throw TypeError(".com.quick.voice.proto.PublishReq.tracks: array expected");F.tracks=[];for(let z=0;z<O.tracks.length;++z){if(typeof O.tracks[z]!="object")throw TypeError(".com.quick.voice.proto.PublishReq.tracks: object expected");F.tracks[z]=$root.com.quick.voice.proto.Track.fromObject(O.tracks[z])}}return O.callAction!=null&&(F.callAction=O.callAction|0),O.recreate!=null&&(F.recreate=!!O.recreate),F},I.toObject=function(O,F){F||(F={});let z={};if((F.arrays||F.defaults)&&(z.tracks=[]),F.defaults&&(z.sdp="",z.callAction=0),O.sdp!=null&&O.hasOwnProperty("sdp")&&(z.sdp=O.sdp),O.tracks&&O.tracks.length){z.tracks=[];for(let K=0;K<O.tracks.length;++K)z.tracks[K]=$root.com.quick.voice.proto.Track.toObject(O.tracks[K],F)}return O.callAction!=null&&O.hasOwnProperty("callAction")&&(z.callAction=O.callAction),O.recreate!=null&&O.hasOwnProperty("recreate")&&(z.recreate=O.recreate,F.oneofs&&(z._recreate="recreate")),z},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(O){return O===void 0&&(O="type.googleapis.com"),O+"/com.quick.voice.proto.PublishReq"},I}(),J.PublishRsp=function(){function I(D){if(D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.remoteSdp="",I.create=function(a){return new I(a)},I.encode=function(a,O){return O||(O=$Writer.create()),a.remoteSdp!=null&&Object.hasOwnProperty.call(a,"remoteSdp")&&O.uint32(10).string(a.remoteSdp),O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.PublishRsp;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.remoteSdp=a.string();break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){return typeof a!="object"||a===null?"object expected":a.remoteSdp!=null&&a.hasOwnProperty("remoteSdp")&&!$util.isString(a.remoteSdp)?"remoteSdp: string expected":null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.PublishRsp)return a;let O=new $root.com.quick.voice.proto.PublishRsp;return a.remoteSdp!=null&&(O.remoteSdp=String(a.remoteSdp)),O},I.toObject=function(a,O){O||(O={});let F={};return O.defaults&&(F.remoteSdp=""),a.remoteSdp!=null&&a.hasOwnProperty("remoteSdp")&&(F.remoteSdp=a.remoteSdp),F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.PublishRsp"},I}(),J.PublishNotify=function(){function I(D){if(D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.roomId="",I.prototype.user=null,I.create=function(a){return new I(a)},I.encode=function(a,O){return O||(O=$Writer.create()),a.roomId!=null&&Object.hasOwnProperty.call(a,"roomId")&&O.uint32(10).string(a.roomId),a.user!=null&&Object.hasOwnProperty.call(a,"user")&&$root.com.quick.voice.proto.User.encode(a.user,O.uint32(18).fork()).ldelim(),O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.PublishNotify;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.roomId=a.string();break}case 2:{z.user=$root.com.quick.voice.proto.User.decode(a,a.uint32());break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.roomId!=null&&a.hasOwnProperty("roomId")&&!$util.isString(a.roomId))return"roomId: string expected";if(a.user!=null&&a.hasOwnProperty("user")){let O=$root.com.quick.voice.proto.User.verify(a.user);if(O)return"user."+O}return null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.PublishNotify)return a;let O=new $root.com.quick.voice.proto.PublishNotify;if(a.roomId!=null&&(O.roomId=String(a.roomId)),a.user!=null){if(typeof a.user!="object")throw TypeError(".com.quick.voice.proto.PublishNotify.user: object expected");O.user=$root.com.quick.voice.proto.User.fromObject(a.user)}return O},I.toObject=function(a,O){O||(O={});let F={};return O.defaults&&(F.roomId="",F.user=null),a.roomId!=null&&a.hasOwnProperty("roomId")&&(F.roomId=a.roomId),a.user!=null&&a.hasOwnProperty("user")&&(F.user=$root.com.quick.voice.proto.User.toObject(a.user,O)),F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.PublishNotify"},I}(),J.SubscribeReq=function(){function I(D){if(this.users=[],D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.users=$util.emptyArray,I.create=function(a){return new I(a)},I.encode=function(a,O){if(O||(O=$Writer.create()),a.users!=null&&a.users.length)for(let F=0;F<a.users.length;++F)$root.com.quick.voice.proto.User.encode(a.users[F],O.uint32(10).fork()).ldelim();return O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.SubscribeReq;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.users&&z.users.length||(z.users=[]),z.users.push($root.com.quick.voice.proto.User.decode(a,a.uint32()));break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.users!=null&&a.hasOwnProperty("users")){if(!Array.isArray(a.users))return"users: array expected";for(let O=0;O<a.users.length;++O){let F=$root.com.quick.voice.proto.User.verify(a.users[O]);if(F)return"users."+F}}return null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.SubscribeReq)return a;let O=new $root.com.quick.voice.proto.SubscribeReq;if(a.users){if(!Array.isArray(a.users))throw TypeError(".com.quick.voice.proto.SubscribeReq.users: array expected");O.users=[];for(let F=0;F<a.users.length;++F){if(typeof a.users[F]!="object")throw TypeError(".com.quick.voice.proto.SubscribeReq.users: object expected");O.users[F]=$root.com.quick.voice.proto.User.fromObject(a.users[F])}}return O},I.toObject=function(a,O){O||(O={});let F={};if((O.arrays||O.defaults)&&(F.users=[]),a.users&&a.users.length){F.users=[];for(let z=0;z<a.users.length;++z)F.users[z]=$root.com.quick.voice.proto.User.toObject(a.users[z],O)}return F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.SubscribeReq"},I}(),J.SubscribeRsp=function(){function I(D){if(this.users=[],D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.remoteSdp="",I.prototype.users=$util.emptyArray,I.create=function(a){return new I(a)},I.encode=function(a,O){if(O||(O=$Writer.create()),a.remoteSdp!=null&&Object.hasOwnProperty.call(a,"remoteSdp")&&O.uint32(10).string(a.remoteSdp),a.users!=null&&a.users.length)for(let F=0;F<a.users.length;++F)$root.com.quick.voice.proto.User.encode(a.users[F],O.uint32(18).fork()).ldelim();return O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.SubscribeRsp;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.remoteSdp=a.string();break}case 2:{z.users&&z.users.length||(z.users=[]),z.users.push($root.com.quick.voice.proto.User.decode(a,a.uint32()));break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.remoteSdp!=null&&a.hasOwnProperty("remoteSdp")&&!$util.isString(a.remoteSdp))return"remoteSdp: string expected";if(a.users!=null&&a.hasOwnProperty("users")){if(!Array.isArray(a.users))return"users: array expected";for(let O=0;O<a.users.length;++O){let F=$root.com.quick.voice.proto.User.verify(a.users[O]);if(F)return"users."+F}}return null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.SubscribeRsp)return a;let O=new $root.com.quick.voice.proto.SubscribeRsp;if(a.remoteSdp!=null&&(O.remoteSdp=String(a.remoteSdp)),a.users){if(!Array.isArray(a.users))throw TypeError(".com.quick.voice.proto.SubscribeRsp.users: array expected");O.users=[];for(let F=0;F<a.users.length;++F){if(typeof a.users[F]!="object")throw TypeError(".com.quick.voice.proto.SubscribeRsp.users: object expected");O.users[F]=$root.com.quick.voice.proto.User.fromObject(a.users[F])}}return O},I.toObject=function(a,O){O||(O={});let F={};if((O.arrays||O.defaults)&&(F.users=[]),O.defaults&&(F.remoteSdp=""),a.remoteSdp!=null&&a.hasOwnProperty("remoteSdp")&&(F.remoteSdp=a.remoteSdp),a.users&&a.users.length){F.users=[];for(let z=0;z<a.users.length;++z)F.users[z]=$root.com.quick.voice.proto.User.toObject(a.users[z],O)}return F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.SubscribeRsp"},I}(),J.RenegotiateReq=function(){function I(D){if(D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.userId="",I.prototype.sdp="",I.create=function(a){return new I(a)},I.encode=function(a,O){return O||(O=$Writer.create()),a.userId!=null&&Object.hasOwnProperty.call(a,"userId")&&O.uint32(10).string(a.userId),a.sdp!=null&&Object.hasOwnProperty.call(a,"sdp")&&O.uint32(18).string(a.sdp),O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.RenegotiateReq;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.userId=a.string();break}case 2:{z.sdp=a.string();break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){return typeof a!="object"||a===null?"object expected":a.userId!=null&&a.hasOwnProperty("userId")&&!$util.isString(a.userId)?"userId: string expected":a.sdp!=null&&a.hasOwnProperty("sdp")&&!$util.isString(a.sdp)?"sdp: string expected":null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.RenegotiateReq)return a;let O=new $root.com.quick.voice.proto.RenegotiateReq;return a.userId!=null&&(O.userId=String(a.userId)),a.sdp!=null&&(O.sdp=String(a.sdp)),O},I.toObject=function(a,O){O||(O={});let F={};return O.defaults&&(F.userId="",F.sdp=""),a.userId!=null&&a.hasOwnProperty("userId")&&(F.userId=a.userId),a.sdp!=null&&a.hasOwnProperty("sdp")&&(F.sdp=a.sdp),F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.RenegotiateReq"},I}(),J.QuitReq=function(){function I(D){if(D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.userId="",I.prototype.roomId="",I.create=function(a){return new I(a)},I.encode=function(a,O){return O||(O=$Writer.create()),a.userId!=null&&Object.hasOwnProperty.call(a,"userId")&&O.uint32(10).string(a.userId),a.roomId!=null&&Object.hasOwnProperty.call(a,"roomId")&&O.uint32(18).string(a.roomId),O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.QuitReq;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.userId=a.string();break}case 2:{z.roomId=a.string();break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){return typeof a!="object"||a===null?"object expected":a.userId!=null&&a.hasOwnProperty("userId")&&!$util.isString(a.userId)?"userId: string expected":a.roomId!=null&&a.hasOwnProperty("roomId")&&!$util.isString(a.roomId)?"roomId: string expected":null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.QuitReq)return a;let O=new $root.com.quick.voice.proto.QuitReq;return a.userId!=null&&(O.userId=String(a.userId)),a.roomId!=null&&(O.roomId=String(a.roomId)),O},I.toObject=function(a,O){O||(O={});let F={};return O.defaults&&(F.userId="",F.roomId=""),a.userId!=null&&a.hasOwnProperty("userId")&&(F.userId=a.userId),a.roomId!=null&&a.hasOwnProperty("roomId")&&(F.roomId=a.roomId),F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.QuitReq"},I}(),J.QuitNotify=function(){function I(a){if(a)for(let O=Object.keys(a),F=0;F<O.length;++F)a[O[F]]!=null&&(this[O[F]]=a[O[F]])}I.prototype.roomId="",I.prototype.user=null,I.prototype.code=null,I.prototype.desc=null;let D;return Object.defineProperty(I.prototype,"_code",{get:$util.oneOfGetter(D=["code"]),set:$util.oneOfSetter(D)}),Object.defineProperty(I.prototype,"_desc",{get:$util.oneOfGetter(D=["desc"]),set:$util.oneOfSetter(D)}),I.create=function(O){return new I(O)},I.encode=function(O,F){return F||(F=$Writer.create()),O.roomId!=null&&Object.hasOwnProperty.call(O,"roomId")&&F.uint32(10).string(O.roomId),O.user!=null&&Object.hasOwnProperty.call(O,"user")&&$root.com.quick.voice.proto.User.encode(O.user,F.uint32(18).fork()).ldelim(),O.code!=null&&Object.hasOwnProperty.call(O,"code")&&F.uint32(24).int32(O.code),O.desc!=null&&Object.hasOwnProperty.call(O,"desc")&&F.uint32(34).string(O.desc),F},I.encodeDelimited=function(O,F){return this.encode(O,F).ldelim()},I.decode=function(O,F){O instanceof $Reader||(O=$Reader.create(O));let z=F===void 0?O.len:O.pos+F,K=new $root.com.quick.voice.proto.QuitNotify;for(;O.pos<z;){let te=O.uint32();switch(te>>>3){case 1:{K.roomId=O.string();break}case 2:{K.user=$root.com.quick.voice.proto.User.decode(O,O.uint32());break}case 3:{K.code=O.int32();break}case 4:{K.desc=O.string();break}default:O.skipType(te&7);break}}return K},I.decodeDelimited=function(O){return O instanceof $Reader||(O=new $Reader(O)),this.decode(O,O.uint32())},I.verify=function(O){if(typeof O!="object"||O===null)return"object expected";if(O.roomId!=null&&O.hasOwnProperty("roomId")&&!$util.isString(O.roomId))return"roomId: string expected";if(O.user!=null&&O.hasOwnProperty("user")){let F=$root.com.quick.voice.proto.User.verify(O.user);if(F)return"user."+F}return O.code!=null&&O.hasOwnProperty("code")&&!$util.isInteger(O.code)?"code: integer expected":O.desc!=null&&O.hasOwnProperty("desc")&&!$util.isString(O.desc)?"desc: string expected":null},I.fromObject=function(O){if(O instanceof $root.com.quick.voice.proto.QuitNotify)return O;let F=new $root.com.quick.voice.proto.QuitNotify;if(O.roomId!=null&&(F.roomId=String(O.roomId)),O.user!=null){if(typeof O.user!="object")throw TypeError(".com.quick.voice.proto.QuitNotify.user: object expected");F.user=$root.com.quick.voice.proto.User.fromObject(O.user)}return O.code!=null&&(F.code=O.code|0),O.desc!=null&&(F.desc=String(O.desc)),F},I.toObject=function(O,F){F||(F={});let z={};return F.defaults&&(z.roomId="",z.user=null),O.roomId!=null&&O.hasOwnProperty("roomId")&&(z.roomId=O.roomId),O.user!=null&&O.hasOwnProperty("user")&&(z.user=$root.com.quick.voice.proto.User.toObject(O.user,F)),O.code!=null&&O.hasOwnProperty("code")&&(z.code=O.code,F.oneofs&&(z._code="code")),O.desc!=null&&O.hasOwnProperty("desc")&&(z.desc=O.desc,F.oneofs&&(z._desc="desc")),z},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(O){return O===void 0&&(O="type.googleapis.com"),O+"/com.quick.voice.proto.QuitNotify"},I}(),J.TokenExpireNotify=function(){function I(D){if(D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.roomId="",I.create=function(a){return new I(a)},I.encode=function(a,O){return O||(O=$Writer.create()),a.roomId!=null&&Object.hasOwnProperty.call(a,"roomId")&&O.uint32(10).string(a.roomId),O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.TokenExpireNotify;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.roomId=a.string();break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){return typeof a!="object"||a===null?"object expected":a.roomId!=null&&a.hasOwnProperty("roomId")&&!$util.isString(a.roomId)?"roomId: string expected":null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.TokenExpireNotify)return a;let O=new $root.com.quick.voice.proto.TokenExpireNotify;return a.roomId!=null&&(O.roomId=String(a.roomId)),O},I.toObject=function(a,O){O||(O={});let F={};return O.defaults&&(F.roomId=""),a.roomId!=null&&a.hasOwnProperty("roomId")&&(F.roomId=a.roomId),F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.TokenExpireNotify"},I}(),J.UpdateTokenReq=function(){function I(D){if(D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.roomId="",I.prototype.sdkToken="",I.create=function(a){return new I(a)},I.encode=function(a,O){return O||(O=$Writer.create()),a.roomId!=null&&Object.hasOwnProperty.call(a,"roomId")&&O.uint32(10).string(a.roomId),a.sdkToken!=null&&Object.hasOwnProperty.call(a,"sdkToken")&&O.uint32(18).string(a.sdkToken),O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.UpdateTokenReq;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.roomId=a.string();break}case 2:{z.sdkToken=a.string();break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){return typeof a!="object"||a===null?"object expected":a.roomId!=null&&a.hasOwnProperty("roomId")&&!$util.isString(a.roomId)?"roomId: string expected":a.sdkToken!=null&&a.hasOwnProperty("sdkToken")&&!$util.isString(a.sdkToken)?"sdkToken: string expected":null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.UpdateTokenReq)return a;let O=new $root.com.quick.voice.proto.UpdateTokenReq;return a.roomId!=null&&(O.roomId=String(a.roomId)),a.sdkToken!=null&&(O.sdkToken=String(a.sdkToken)),O},I.toObject=function(a,O){O||(O={});let F={};return O.defaults&&(F.roomId="",F.sdkToken=""),a.roomId!=null&&a.hasOwnProperty("roomId")&&(F.roomId=a.roomId),a.sdkToken!=null&&a.hasOwnProperty("sdkToken")&&(F.sdkToken=a.sdkToken),F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.UpdateTokenReq"},I}(),J.NetQualityChange=function(){function I(D){if(D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.userId="",I.prototype.roomId="",I.prototype.egress=0,I.prototype.ingress=0,I.create=function(a){return new I(a)},I.encode=function(a,O){return O||(O=$Writer.create()),a.userId!=null&&Object.hasOwnProperty.call(a,"userId")&&O.uint32(10).string(a.userId),a.roomId!=null&&Object.hasOwnProperty.call(a,"roomId")&&O.uint32(18).string(a.roomId),a.egress!=null&&Object.hasOwnProperty.call(a,"egress")&&O.uint32(24).int32(a.egress),a.ingress!=null&&Object.hasOwnProperty.call(a,"ingress")&&O.uint32(32).int32(a.ingress),O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.NetQualityChange;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.userId=a.string();break}case 2:{z.roomId=a.string();break}case 3:{z.egress=a.int32();break}case 4:{z.ingress=a.int32();break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){return typeof a!="object"||a===null?"object expected":a.userId!=null&&a.hasOwnProperty("userId")&&!$util.isString(a.userId)?"userId: string expected":a.roomId!=null&&a.hasOwnProperty("roomId")&&!$util.isString(a.roomId)?"roomId: string expected":a.egress!=null&&a.hasOwnProperty("egress")&&!$util.isInteger(a.egress)?"egress: integer expected":a.ingress!=null&&a.hasOwnProperty("ingress")&&!$util.isInteger(a.ingress)?"ingress: integer expected":null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.NetQualityChange)return a;let O=new $root.com.quick.voice.proto.NetQualityChange;return a.userId!=null&&(O.userId=String(a.userId)),a.roomId!=null&&(O.roomId=String(a.roomId)),a.egress!=null&&(O.egress=a.egress|0),a.ingress!=null&&(O.ingress=a.ingress|0),O},I.toObject=function(a,O){O||(O={});let F={};return O.defaults&&(F.userId="",F.roomId="",F.egress=0,F.ingress=0),a.userId!=null&&a.hasOwnProperty("userId")&&(F.userId=a.userId),a.roomId!=null&&a.hasOwnProperty("roomId")&&(F.roomId=a.roomId),a.egress!=null&&a.hasOwnProperty("egress")&&(F.egress=a.egress),a.ingress!=null&&a.hasOwnProperty("ingress")&&(F.ingress=a.ingress),F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.NetQualityChange"},I}(),J.NetQualityNotify=function(){function I(D){if(this.qualities=[],D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.qualities=$util.emptyArray,I.create=function(a){return new I(a)},I.encode=function(a,O){if(O||(O=$Writer.create()),a.qualities!=null&&a.qualities.length)for(let F=0;F<a.qualities.length;++F)$root.com.quick.voice.proto.NetQualityChange.encode(a.qualities[F],O.uint32(10).fork()).ldelim();return O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.NetQualityNotify;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.qualities&&z.qualities.length||(z.qualities=[]),z.qualities.push($root.com.quick.voice.proto.NetQualityChange.decode(a,a.uint32()));break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.qualities!=null&&a.hasOwnProperty("qualities")){if(!Array.isArray(a.qualities))return"qualities: array expected";for(let O=0;O<a.qualities.length;++O){let F=$root.com.quick.voice.proto.NetQualityChange.verify(a.qualities[O]);if(F)return"qualities."+F}}return null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.NetQualityNotify)return a;let O=new $root.com.quick.voice.proto.NetQualityNotify;if(a.qualities){if(!Array.isArray(a.qualities))throw TypeError(".com.quick.voice.proto.NetQualityNotify.qualities: array expected");O.qualities=[];for(let F=0;F<a.qualities.length;++F){if(typeof a.qualities[F]!="object")throw TypeError(".com.quick.voice.proto.NetQualityNotify.qualities: object expected");O.qualities[F]=$root.com.quick.voice.proto.NetQualityChange.fromObject(a.qualities[F])}}return O},I.toObject=function(a,O){O||(O={});let F={};if((O.arrays||O.defaults)&&(F.qualities=[]),a.qualities&&a.qualities.length){F.qualities=[];for(let z=0;z<a.qualities.length;++z)F.qualities[z]=$root.com.quick.voice.proto.NetQualityChange.toObject(a.qualities[z],O)}return F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.NetQualityNotify"},I}(),J.UpdateCall=function(){function I(D){if(D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.roomId="",I.prototype.user=null,I.create=function(a){return new I(a)},I.encode=function(a,O){return O||(O=$Writer.create()),a.roomId!=null&&Object.hasOwnProperty.call(a,"roomId")&&O.uint32(10).string(a.roomId),a.user!=null&&Object.hasOwnProperty.call(a,"user")&&$root.com.quick.voice.proto.User.encode(a.user,O.uint32(18).fork()).ldelim(),O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.UpdateCall;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.roomId=a.string();break}case 2:{z.user=$root.com.quick.voice.proto.User.decode(a,a.uint32());break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.roomId!=null&&a.hasOwnProperty("roomId")&&!$util.isString(a.roomId))return"roomId: string expected";if(a.user!=null&&a.hasOwnProperty("user")){let O=$root.com.quick.voice.proto.User.verify(a.user);if(O)return"user."+O}return null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.UpdateCall)return a;let O=new $root.com.quick.voice.proto.UpdateCall;if(a.roomId!=null&&(O.roomId=String(a.roomId)),a.user!=null){if(typeof a.user!="object")throw TypeError(".com.quick.voice.proto.UpdateCall.user: object expected");O.user=$root.com.quick.voice.proto.User.fromObject(a.user)}return O},I.toObject=function(a,O){O||(O={});let F={};return O.defaults&&(F.roomId="",F.user=null),a.roomId!=null&&a.hasOwnProperty("roomId")&&(F.roomId=a.roomId),a.user!=null&&a.hasOwnProperty("user")&&(F.user=$root.com.quick.voice.proto.User.toObject(a.user,O)),F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.UpdateCall"},I}(),J.SyncRoomInfoReq=function(){function I(D){if(D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.roomId="",I.prototype.user=null,I.create=function(a){return new I(a)},I.encode=function(a,O){return O||(O=$Writer.create()),a.roomId!=null&&Object.hasOwnProperty.call(a,"roomId")&&O.uint32(10).string(a.roomId),a.user!=null&&Object.hasOwnProperty.call(a,"user")&&$root.com.quick.voice.proto.User.encode(a.user,O.uint32(18).fork()).ldelim(),O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.SyncRoomInfoReq;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.roomId=a.string();break}case 2:{z.user=$root.com.quick.voice.proto.User.decode(a,a.uint32());break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.roomId!=null&&a.hasOwnProperty("roomId")&&!$util.isString(a.roomId))return"roomId: string expected";if(a.user!=null&&a.hasOwnProperty("user")){let O=$root.com.quick.voice.proto.User.verify(a.user);if(O)return"user."+O}return null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.SyncRoomInfoReq)return a;let O=new $root.com.quick.voice.proto.SyncRoomInfoReq;if(a.roomId!=null&&(O.roomId=String(a.roomId)),a.user!=null){if(typeof a.user!="object")throw TypeError(".com.quick.voice.proto.SyncRoomInfoReq.user: object expected");O.user=$root.com.quick.voice.proto.User.fromObject(a.user)}return O},I.toObject=function(a,O){O||(O={});let F={};return O.defaults&&(F.roomId="",F.user=null),a.roomId!=null&&a.hasOwnProperty("roomId")&&(F.roomId=a.roomId),a.user!=null&&a.hasOwnProperty("user")&&(F.user=$root.com.quick.voice.proto.User.toObject(a.user,O)),F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.SyncRoomInfoReq"},I}(),J.SyncRoomInfoRsp=function(){function I(D){if(this.users=[],D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.roomId="",I.prototype.isValid=!1,I.prototype.users=$util.emptyArray,I.prototype.isActive=!1,I.create=function(a){return new I(a)},I.encode=function(a,O){if(O||(O=$Writer.create()),a.roomId!=null&&Object.hasOwnProperty.call(a,"roomId")&&O.uint32(10).string(a.roomId),a.isValid!=null&&Object.hasOwnProperty.call(a,"isValid")&&O.uint32(16).bool(a.isValid),a.users!=null&&a.users.length)for(let F=0;F<a.users.length;++F)$root.com.quick.voice.proto.User.encode(a.users[F],O.uint32(26).fork()).ldelim();return a.isActive!=null&&Object.hasOwnProperty.call(a,"isActive")&&O.uint32(32).bool(a.isActive),O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.SyncRoomInfoRsp;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.roomId=a.string();break}case 2:{z.isValid=a.bool();break}case 3:{z.users&&z.users.length||(z.users=[]),z.users.push($root.com.quick.voice.proto.User.decode(a,a.uint32()));break}case 4:{z.isActive=a.bool();break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.roomId!=null&&a.hasOwnProperty("roomId")&&!$util.isString(a.roomId))return"roomId: string expected";if(a.isValid!=null&&a.hasOwnProperty("isValid")&&typeof a.isValid!="boolean")return"isValid: boolean expected";if(a.users!=null&&a.hasOwnProperty("users")){if(!Array.isArray(a.users))return"users: array expected";for(let O=0;O<a.users.length;++O){let F=$root.com.quick.voice.proto.User.verify(a.users[O]);if(F)return"users."+F}}return a.isActive!=null&&a.hasOwnProperty("isActive")&&typeof a.isActive!="boolean"?"isActive: boolean expected":null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.SyncRoomInfoRsp)return a;let O=new $root.com.quick.voice.proto.SyncRoomInfoRsp;if(a.roomId!=null&&(O.roomId=String(a.roomId)),a.isValid!=null&&(O.isValid=!!a.isValid),a.users){if(!Array.isArray(a.users))throw TypeError(".com.quick.voice.proto.SyncRoomInfoRsp.users: array expected");O.users=[];for(let F=0;F<a.users.length;++F){if(typeof a.users[F]!="object")throw TypeError(".com.quick.voice.proto.SyncRoomInfoRsp.users: object expected");O.users[F]=$root.com.quick.voice.proto.User.fromObject(a.users[F])}}return a.isActive!=null&&(O.isActive=!!a.isActive),O},I.toObject=function(a,O){O||(O={});let F={};if((O.arrays||O.defaults)&&(F.users=[]),O.defaults&&(F.roomId="",F.isValid=!1,F.isActive=!1),a.roomId!=null&&a.hasOwnProperty("roomId")&&(F.roomId=a.roomId),a.isValid!=null&&a.hasOwnProperty("isValid")&&(F.isValid=a.isValid),a.users&&a.users.length){F.users=[];for(let z=0;z<a.users.length;++z)F.users[z]=$root.com.quick.voice.proto.User.toObject(a.users[z],O)}return a.isActive!=null&&a.hasOwnProperty("isActive")&&(F.isActive=a.isActive),F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.SyncRoomInfoRsp"},I}(),J.UpdateTime=function(){function I(D){if(D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.time=$util.Long?$util.Long.fromBits(0,0,!1):0,I.create=function(a){return new I(a)},I.encode=function(a,O){return O||(O=$Writer.create()),a.time!=null&&Object.hasOwnProperty.call(a,"time")&&O.uint32(8).int64(a.time),O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.UpdateTime;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.time=a.int64();break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){return typeof a!="object"||a===null?"object expected":a.time!=null&&a.hasOwnProperty("time")&&!$util.isInteger(a.time)&&!(a.time&&$util.isInteger(a.time.low)&&$util.isInteger(a.time.high))?"time: integer|Long expected":null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.UpdateTime)return a;let O=new $root.com.quick.voice.proto.UpdateTime;return a.time!=null&&($util.Long?(O.time=$util.Long.fromValue(a.time)).unsigned=!1:typeof a.time=="string"?O.time=parseInt(a.time,10):typeof a.time=="number"?O.time=a.time:typeof a.time=="object"&&(O.time=new $util.LongBits(a.time.low>>>0,a.time.high>>>0).toNumber())),O},I.toObject=function(a,O){O||(O={});let F={};if(O.defaults)if($util.Long){let z=new $util.Long(0,0,!1);F.time=O.longs===String?z.toString():O.longs===Number?z.toNumber():z}else F.time=O.longs===String?"0":0;return a.time!=null&&a.hasOwnProperty("time")&&(typeof a.time=="number"?F.time=O.longs===String?String(a.time):a.time:F.time=O.longs===String?$util.Long.prototype.toString.call(a.time):O.longs===Number?new $util.LongBits(a.time.low>>>0,a.time.high>>>0).toNumber():a.time),F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.UpdateTime"},I}(),J.CloseTrackReq=function(){function I(D){if(this.tracks=[],D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.sdp="",I.prototype.tracks=$util.emptyArray,I.prototype.roomId="",I.create=function(a){return new I(a)},I.encode=function(a,O){if(O||(O=$Writer.create()),a.sdp!=null&&Object.hasOwnProperty.call(a,"sdp")&&O.uint32(10).string(a.sdp),a.tracks!=null&&a.tracks.length)for(let F=0;F<a.tracks.length;++F)$root.com.quick.voice.proto.Track.encode(a.tracks[F],O.uint32(18).fork()).ldelim();return a.roomId!=null&&Object.hasOwnProperty.call(a,"roomId")&&O.uint32(26).string(a.roomId),O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.CloseTrackReq;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.sdp=a.string();break}case 2:{z.tracks&&z.tracks.length||(z.tracks=[]),z.tracks.push($root.com.quick.voice.proto.Track.decode(a,a.uint32()));break}case 3:{z.roomId=a.string();break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.sdp!=null&&a.hasOwnProperty("sdp")&&!$util.isString(a.sdp))return"sdp: string expected";if(a.tracks!=null&&a.hasOwnProperty("tracks")){if(!Array.isArray(a.tracks))return"tracks: array expected";for(let O=0;O<a.tracks.length;++O){let F=$root.com.quick.voice.proto.Track.verify(a.tracks[O]);if(F)return"tracks."+F}}return a.roomId!=null&&a.hasOwnProperty("roomId")&&!$util.isString(a.roomId)?"roomId: string expected":null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.CloseTrackReq)return a;let O=new $root.com.quick.voice.proto.CloseTrackReq;if(a.sdp!=null&&(O.sdp=String(a.sdp)),a.tracks){if(!Array.isArray(a.tracks))throw TypeError(".com.quick.voice.proto.CloseTrackReq.tracks: array expected");O.tracks=[];for(let F=0;F<a.tracks.length;++F){if(typeof a.tracks[F]!="object")throw TypeError(".com.quick.voice.proto.CloseTrackReq.tracks: object expected");O.tracks[F]=$root.com.quick.voice.proto.Track.fromObject(a.tracks[F])}}return a.roomId!=null&&(O.roomId=String(a.roomId)),O},I.toObject=function(a,O){O||(O={});let F={};if((O.arrays||O.defaults)&&(F.tracks=[]),O.defaults&&(F.sdp="",F.roomId=""),a.sdp!=null&&a.hasOwnProperty("sdp")&&(F.sdp=a.sdp),a.tracks&&a.tracks.length){F.tracks=[];for(let z=0;z<a.tracks.length;++z)F.tracks[z]=$root.com.quick.voice.proto.Track.toObject(a.tracks[z],O)}return a.roomId!=null&&a.hasOwnProperty("roomId")&&(F.roomId=a.roomId),F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.CloseTrackReq"},I}(),J.CloseTrackRsp=function(){function I(D){if(this.tracks=[],D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.remoteSdp="",I.prototype.tracks=$util.emptyArray,I.create=function(a){return new I(a)},I.encode=function(a,O){if(O||(O=$Writer.create()),a.remoteSdp!=null&&Object.hasOwnProperty.call(a,"remoteSdp")&&O.uint32(10).string(a.remoteSdp),a.tracks!=null&&a.tracks.length)for(let F=0;F<a.tracks.length;++F)$root.com.quick.voice.proto.Track.encode(a.tracks[F],O.uint32(18).fork()).ldelim();return O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.CloseTrackRsp;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.remoteSdp=a.string();break}case 2:{z.tracks&&z.tracks.length||(z.tracks=[]),z.tracks.push($root.com.quick.voice.proto.Track.decode(a,a.uint32()));break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.remoteSdp!=null&&a.hasOwnProperty("remoteSdp")&&!$util.isString(a.remoteSdp))return"remoteSdp: string expected";if(a.tracks!=null&&a.hasOwnProperty("tracks")){if(!Array.isArray(a.tracks))return"tracks: array expected";for(let O=0;O<a.tracks.length;++O){let F=$root.com.quick.voice.proto.Track.verify(a.tracks[O]);if(F)return"tracks."+F}}return null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.CloseTrackRsp)return a;let O=new $root.com.quick.voice.proto.CloseTrackRsp;if(a.remoteSdp!=null&&(O.remoteSdp=String(a.remoteSdp)),a.tracks){if(!Array.isArray(a.tracks))throw TypeError(".com.quick.voice.proto.CloseTrackRsp.tracks: array expected");O.tracks=[];for(let F=0;F<a.tracks.length;++F){if(typeof a.tracks[F]!="object")throw TypeError(".com.quick.voice.proto.CloseTrackRsp.tracks: object expected");O.tracks[F]=$root.com.quick.voice.proto.Track.fromObject(a.tracks[F])}}return O},I.toObject=function(a,O){O||(O={});let F={};if((O.arrays||O.defaults)&&(F.tracks=[]),O.defaults&&(F.remoteSdp=""),a.remoteSdp!=null&&a.hasOwnProperty("remoteSdp")&&(F.remoteSdp=a.remoteSdp),a.tracks&&a.tracks.length){F.tracks=[];for(let z=0;z<a.tracks.length;++z)F.tracks[z]=$root.com.quick.voice.proto.Track.toObject(a.tracks[z],O)}return F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.CloseTrackRsp"},I}(),J.CloseTrackNotify=function(){function I(D){if(D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.user=null,I.create=function(a){return new I(a)},I.encode=function(a,O){return O||(O=$Writer.create()),a.user!=null&&Object.hasOwnProperty.call(a,"user")&&$root.com.quick.voice.proto.User.encode(a.user,O.uint32(10).fork()).ldelim(),O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.CloseTrackNotify;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.user=$root.com.quick.voice.proto.User.decode(a,a.uint32());break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.user!=null&&a.hasOwnProperty("user")){let O=$root.com.quick.voice.proto.User.verify(a.user);if(O)return"user."+O}return null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.CloseTrackNotify)return a;let O=new $root.com.quick.voice.proto.CloseTrackNotify;if(a.user!=null){if(typeof a.user!="object")throw TypeError(".com.quick.voice.proto.CloseTrackNotify.user: object expected");O.user=$root.com.quick.voice.proto.User.fromObject(a.user)}return O},I.toObject=function(a,O){O||(O={});let F={};return O.defaults&&(F.user=null),a.user!=null&&a.hasOwnProperty("user")&&(F.user=$root.com.quick.voice.proto.User.toObject(a.user,O)),F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.CloseTrackNotify"},I}(),J.ToggleLiveRoomReq=function(){function I(D){if(D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.roomId="",I.create=function(a){return new I(a)},I.encode=function(a,O){return O||(O=$Writer.create()),a.roomId!=null&&Object.hasOwnProperty.call(a,"roomId")&&O.uint32(10).string(a.roomId),O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.ToggleLiveRoomReq;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.roomId=a.string();break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){return typeof a!="object"||a===null?"object expected":a.roomId!=null&&a.hasOwnProperty("roomId")&&!$util.isString(a.roomId)?"roomId: string expected":null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.ToggleLiveRoomReq)return a;let O=new $root.com.quick.voice.proto.ToggleLiveRoomReq;return a.roomId!=null&&(O.roomId=String(a.roomId)),O},I.toObject=function(a,O){O||(O={});let F={};return O.defaults&&(F.roomId=""),a.roomId!=null&&a.hasOwnProperty("roomId")&&(F.roomId=a.roomId),F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.ToggleLiveRoomReq"},I}(),J.ToggleLiveRoomRsq=function(){function I(D){if(this.roomUsers=[],D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.roomId="",I.prototype.hash="",I.prototype.roomUsers=$util.emptyArray,I.create=function(a){return new I(a)},I.encode=function(a,O){if(O||(O=$Writer.create()),a.roomId!=null&&Object.hasOwnProperty.call(a,"roomId")&&O.uint32(10).string(a.roomId),a.hash!=null&&Object.hasOwnProperty.call(a,"hash")&&O.uint32(18).string(a.hash),a.roomUsers!=null&&a.roomUsers.length)for(let F=0;F<a.roomUsers.length;++F)$root.com.quick.voice.proto.User.encode(a.roomUsers[F],O.uint32(26).fork()).ldelim();return O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.ToggleLiveRoomRsq;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.roomId=a.string();break}case 2:{z.hash=a.string();break}case 3:{z.roomUsers&&z.roomUsers.length||(z.roomUsers=[]),z.roomUsers.push($root.com.quick.voice.proto.User.decode(a,a.uint32()));break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.roomId!=null&&a.hasOwnProperty("roomId")&&!$util.isString(a.roomId))return"roomId: string expected";if(a.hash!=null&&a.hasOwnProperty("hash")&&!$util.isString(a.hash))return"hash: string expected";if(a.roomUsers!=null&&a.hasOwnProperty("roomUsers")){if(!Array.isArray(a.roomUsers))return"roomUsers: array expected";for(let O=0;O<a.roomUsers.length;++O){let F=$root.com.quick.voice.proto.User.verify(a.roomUsers[O]);if(F)return"roomUsers."+F}}return null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.ToggleLiveRoomRsq)return a;let O=new $root.com.quick.voice.proto.ToggleLiveRoomRsq;if(a.roomId!=null&&(O.roomId=String(a.roomId)),a.hash!=null&&(O.hash=String(a.hash)),a.roomUsers){if(!Array.isArray(a.roomUsers))throw TypeError(".com.quick.voice.proto.ToggleLiveRoomRsq.roomUsers: array expected");O.roomUsers=[];for(let F=0;F<a.roomUsers.length;++F){if(typeof a.roomUsers[F]!="object")throw TypeError(".com.quick.voice.proto.ToggleLiveRoomRsq.roomUsers: object expected");O.roomUsers[F]=$root.com.quick.voice.proto.User.fromObject(a.roomUsers[F])}}return O},I.toObject=function(a,O){O||(O={});let F={};if((O.arrays||O.defaults)&&(F.roomUsers=[]),O.defaults&&(F.roomId="",F.hash=""),a.roomId!=null&&a.hasOwnProperty("roomId")&&(F.roomId=a.roomId),a.hash!=null&&a.hasOwnProperty("hash")&&(F.hash=a.hash),a.roomUsers&&a.roomUsers.length){F.roomUsers=[];for(let z=0;z<a.roomUsers.length;++z)F.roomUsers[z]=$root.com.quick.voice.proto.User.toObject(a.roomUsers[z],O)}return F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.ToggleLiveRoomRsq"},I}(),J.TrackType=function(){const I={},D=Object.create(I);return D[I[0]="Microphone"]=0,D[I[1]="Camera"]=1,D[I[2]="Screen"]=2,D[I[3]="SystemVoice"]=3,D}(),J.ReportInfoReq=function(){function I(D){if(D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.actionEvent="",I.prototype.userId="",I.prototype.platform="",I.prototype.time=$util.Long?$util.Long.fromBits(0,0,!1):0,I.prototype.actionData="",I.create=function(a){return new I(a)},I.encode=function(a,O){return O||(O=$Writer.create()),a.actionEvent!=null&&Object.hasOwnProperty.call(a,"actionEvent")&&O.uint32(10).string(a.actionEvent),a.userId!=null&&Object.hasOwnProperty.call(a,"userId")&&O.uint32(18).string(a.userId),a.platform!=null&&Object.hasOwnProperty.call(a,"platform")&&O.uint32(26).string(a.platform),a.time!=null&&Object.hasOwnProperty.call(a,"time")&&O.uint32(32).int64(a.time),a.actionData!=null&&Object.hasOwnProperty.call(a,"actionData")&&O.uint32(42).string(a.actionData),O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.ReportInfoReq;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.actionEvent=a.string();break}case 2:{z.userId=a.string();break}case 3:{z.platform=a.string();break}case 4:{z.time=a.int64();break}case 5:{z.actionData=a.string();break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){return typeof a!="object"||a===null?"object expected":a.actionEvent!=null&&a.hasOwnProperty("actionEvent")&&!$util.isString(a.actionEvent)?"actionEvent: string expected":a.userId!=null&&a.hasOwnProperty("userId")&&!$util.isString(a.userId)?"userId: string expected":a.platform!=null&&a.hasOwnProperty("platform")&&!$util.isString(a.platform)?"platform: string expected":a.time!=null&&a.hasOwnProperty("time")&&!$util.isInteger(a.time)&&!(a.time&&$util.isInteger(a.time.low)&&$util.isInteger(a.time.high))?"time: integer|Long expected":a.actionData!=null&&a.hasOwnProperty("actionData")&&!$util.isString(a.actionData)?"actionData: string expected":null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.ReportInfoReq)return a;let O=new $root.com.quick.voice.proto.ReportInfoReq;return a.actionEvent!=null&&(O.actionEvent=String(a.actionEvent)),a.userId!=null&&(O.userId=String(a.userId)),a.platform!=null&&(O.platform=String(a.platform)),a.time!=null&&($util.Long?(O.time=$util.Long.fromValue(a.time)).unsigned=!1:typeof a.time=="string"?O.time=parseInt(a.time,10):typeof a.time=="number"?O.time=a.time:typeof a.time=="object"&&(O.time=new $util.LongBits(a.time.low>>>0,a.time.high>>>0).toNumber())),a.actionData!=null&&(O.actionData=String(a.actionData)),O},I.toObject=function(a,O){O||(O={});let F={};if(O.defaults){if(F.actionEvent="",F.userId="",F.platform="",$util.Long){let z=new $util.Long(0,0,!1);F.time=O.longs===String?z.toString():O.longs===Number?z.toNumber():z}else F.time=O.longs===String?"0":0;F.actionData=""}return a.actionEvent!=null&&a.hasOwnProperty("actionEvent")&&(F.actionEvent=a.actionEvent),a.userId!=null&&a.hasOwnProperty("userId")&&(F.userId=a.userId),a.platform!=null&&a.hasOwnProperty("platform")&&(F.platform=a.platform),a.time!=null&&a.hasOwnProperty("time")&&(typeof a.time=="number"?F.time=O.longs===String?String(a.time):a.time:F.time=O.longs===String?$util.Long.prototype.toString.call(a.time):O.longs===Number?new $util.LongBits(a.time.low>>>0,a.time.high>>>0).toNumber():a.time),a.actionData!=null&&a.hasOwnProperty("actionData")&&(F.actionData=a.actionData),F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.ReportInfoReq"},I}(),J.UpdatePermissions=function(){function I(D){if(D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.roomId="",I.prototype.user=null,I.create=function(a){return new I(a)},I.encode=function(a,O){return O||(O=$Writer.create()),a.roomId!=null&&Object.hasOwnProperty.call(a,"roomId")&&O.uint32(10).string(a.roomId),a.user!=null&&Object.hasOwnProperty.call(a,"user")&&$root.com.quick.voice.proto.User.encode(a.user,O.uint32(18).fork()).ldelim(),O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.UpdatePermissions;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.roomId=a.string();break}case 2:{z.user=$root.com.quick.voice.proto.User.decode(a,a.uint32());break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.roomId!=null&&a.hasOwnProperty("roomId")&&!$util.isString(a.roomId))return"roomId: string expected";if(a.user!=null&&a.hasOwnProperty("user")){let O=$root.com.quick.voice.proto.User.verify(a.user);if(O)return"user."+O}return null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.UpdatePermissions)return a;let O=new $root.com.quick.voice.proto.UpdatePermissions;if(a.roomId!=null&&(O.roomId=String(a.roomId)),a.user!=null){if(typeof a.user!="object")throw TypeError(".com.quick.voice.proto.UpdatePermissions.user: object expected");O.user=$root.com.quick.voice.proto.User.fromObject(a.user)}return O},I.toObject=function(a,O){O||(O={});let F={};return O.defaults&&(F.roomId="",F.user=null),a.roomId!=null&&a.hasOwnProperty("roomId")&&(F.roomId=a.roomId),a.user!=null&&a.hasOwnProperty("user")&&(F.user=$root.com.quick.voice.proto.User.toObject(a.user,O)),F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.UpdatePermissions"},I}(),J.CallType=function(){const I={},D=Object.create(I);return D[I[0]="Normal"]=0,D[I[1]="Meeting"]=1,D[I[2]="Live"]=2,D}(),J.QuitNotifyCode=function(){const I={},D=Object.create(I);return D[I[0]="NormalQuit"]=0,D[I[2021]="Timeout"]=2021,D[I[2011]="TokenExpired"]=2011,D[I[2022]="KickOut"]=2022,D[I[2023]="EndPk"]=2023,D[I[2024]="EndLive"]=2024,D}(),J.UserBehavior=function(){function I(D){if(D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.type=0,I.prototype.behavior=!1,I.create=function(a){return new I(a)},I.encode=function(a,O){return O||(O=$Writer.create()),a.type!=null&&Object.hasOwnProperty.call(a,"type")&&O.uint32(8).int32(a.type),a.behavior!=null&&Object.hasOwnProperty.call(a,"behavior")&&O.uint32(16).bool(a.behavior),O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.UserBehavior;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.type=a.int32();break}case 2:{z.behavior=a.bool();break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.type!=null&&a.hasOwnProperty("type"))switch(a.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:break}return a.behavior!=null&&a.hasOwnProperty("behavior")&&typeof a.behavior!="boolean"?"behavior: boolean expected":null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.UserBehavior)return a;let O=new $root.com.quick.voice.proto.UserBehavior;switch(a.type){default:if(typeof a.type=="number"){O.type=a.type;break}break;case"Microphone":case 0:O.type=0;break;case"Camera":case 1:O.type=1;break;case"Screen":case 2:O.type=2;break;case"SystemVoice":case 3:O.type=3;break}return a.behavior!=null&&(O.behavior=!!a.behavior),O},I.toObject=function(a,O){O||(O={});let F={};return O.defaults&&(F.type=O.enums===String?"Microphone":0,F.behavior=!1),a.type!=null&&a.hasOwnProperty("type")&&(F.type=O.enums===String?$root.com.quick.voice.proto.TrackType[a.type]===void 0?a.type:$root.com.quick.voice.proto.TrackType[a.type]:a.type),a.behavior!=null&&a.hasOwnProperty("behavior")&&(F.behavior=a.behavior),F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.UserBehavior"},I}(),J.PreventUser=function(){function I(D){if(this.behaviors=[],D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.id="",I.prototype.behaviors=$util.emptyArray,I.create=function(a){return new I(a)},I.encode=function(a,O){if(O||(O=$Writer.create()),a.id!=null&&Object.hasOwnProperty.call(a,"id")&&O.uint32(10).string(a.id),a.behaviors!=null&&a.behaviors.length)for(let F=0;F<a.behaviors.length;++F)$root.com.quick.voice.proto.UserBehavior.encode(a.behaviors[F],O.uint32(18).fork()).ldelim();return O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.PreventUser;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.id=a.string();break}case 2:{z.behaviors&&z.behaviors.length||(z.behaviors=[]),z.behaviors.push($root.com.quick.voice.proto.UserBehavior.decode(a,a.uint32()));break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.id!=null&&a.hasOwnProperty("id")&&!$util.isString(a.id))return"id: string expected";if(a.behaviors!=null&&a.hasOwnProperty("behaviors")){if(!Array.isArray(a.behaviors))return"behaviors: array expected";for(let O=0;O<a.behaviors.length;++O){let F=$root.com.quick.voice.proto.UserBehavior.verify(a.behaviors[O]);if(F)return"behaviors."+F}}return null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.PreventUser)return a;let O=new $root.com.quick.voice.proto.PreventUser;if(a.id!=null&&(O.id=String(a.id)),a.behaviors){if(!Array.isArray(a.behaviors))throw TypeError(".com.quick.voice.proto.PreventUser.behaviors: array expected");O.behaviors=[];for(let F=0;F<a.behaviors.length;++F){if(typeof a.behaviors[F]!="object")throw TypeError(".com.quick.voice.proto.PreventUser.behaviors: object expected");O.behaviors[F]=$root.com.quick.voice.proto.UserBehavior.fromObject(a.behaviors[F])}}return O},I.toObject=function(a,O){O||(O={});let F={};if((O.arrays||O.defaults)&&(F.behaviors=[]),O.defaults&&(F.id=""),a.id!=null&&a.hasOwnProperty("id")&&(F.id=a.id),a.behaviors&&a.behaviors.length){F.behaviors=[];for(let z=0;z<a.behaviors.length;++z)F.behaviors[z]=$root.com.quick.voice.proto.UserBehavior.toObject(a.behaviors[z],O)}return F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.PreventUser"},I}(),J.PreventUsersBehaviorReq=function(){function I(D){if(this.users=[],D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.roomId="",I.prototype.users=$util.emptyArray,I.create=function(a){return new I(a)},I.encode=function(a,O){if(O||(O=$Writer.create()),a.roomId!=null&&Object.hasOwnProperty.call(a,"roomId")&&O.uint32(10).string(a.roomId),a.users!=null&&a.users.length)for(let F=0;F<a.users.length;++F)$root.com.quick.voice.proto.PreventUser.encode(a.users[F],O.uint32(18).fork()).ldelim();return O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.PreventUsersBehaviorReq;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.roomId=a.string();break}case 2:{z.users&&z.users.length||(z.users=[]),z.users.push($root.com.quick.voice.proto.PreventUser.decode(a,a.uint32()));break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.roomId!=null&&a.hasOwnProperty("roomId")&&!$util.isString(a.roomId))return"roomId: string expected";if(a.users!=null&&a.hasOwnProperty("users")){if(!Array.isArray(a.users))return"users: array expected";for(let O=0;O<a.users.length;++O){let F=$root.com.quick.voice.proto.PreventUser.verify(a.users[O]);if(F)return"users."+F}}return null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.PreventUsersBehaviorReq)return a;let O=new $root.com.quick.voice.proto.PreventUsersBehaviorReq;if(a.roomId!=null&&(O.roomId=String(a.roomId)),a.users){if(!Array.isArray(a.users))throw TypeError(".com.quick.voice.proto.PreventUsersBehaviorReq.users: array expected");O.users=[];for(let F=0;F<a.users.length;++F){if(typeof a.users[F]!="object")throw TypeError(".com.quick.voice.proto.PreventUsersBehaviorReq.users: object expected");O.users[F]=$root.com.quick.voice.proto.PreventUser.fromObject(a.users[F])}}return O},I.toObject=function(a,O){O||(O={});let F={};if((O.arrays||O.defaults)&&(F.users=[]),O.defaults&&(F.roomId=""),a.roomId!=null&&a.hasOwnProperty("roomId")&&(F.roomId=a.roomId),a.users&&a.users.length){F.users=[];for(let z=0;z<a.users.length;++z)F.users[z]=$root.com.quick.voice.proto.PreventUser.toObject(a.users[z],O)}return F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.PreventUsersBehaviorReq"},I}(),J.PreventUsersBehaviorNotify=function(){function I(D){if(this.users=[],D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.roomId="",I.prototype.users=$util.emptyArray,I.create=function(a){return new I(a)},I.encode=function(a,O){if(O||(O=$Writer.create()),a.roomId!=null&&Object.hasOwnProperty.call(a,"roomId")&&O.uint32(10).string(a.roomId),a.users!=null&&a.users.length)for(let F=0;F<a.users.length;++F)$root.com.quick.voice.proto.User.encode(a.users[F],O.uint32(18).fork()).ldelim();return O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.PreventUsersBehaviorNotify;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.roomId=a.string();break}case 2:{z.users&&z.users.length||(z.users=[]),z.users.push($root.com.quick.voice.proto.User.decode(a,a.uint32()));break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.roomId!=null&&a.hasOwnProperty("roomId")&&!$util.isString(a.roomId))return"roomId: string expected";if(a.users!=null&&a.hasOwnProperty("users")){if(!Array.isArray(a.users))return"users: array expected";for(let O=0;O<a.users.length;++O){let F=$root.com.quick.voice.proto.User.verify(a.users[O]);if(F)return"users."+F}}return null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.PreventUsersBehaviorNotify)return a;let O=new $root.com.quick.voice.proto.PreventUsersBehaviorNotify;if(a.roomId!=null&&(O.roomId=String(a.roomId)),a.users){if(!Array.isArray(a.users))throw TypeError(".com.quick.voice.proto.PreventUsersBehaviorNotify.users: array expected");O.users=[];for(let F=0;F<a.users.length;++F){if(typeof a.users[F]!="object")throw TypeError(".com.quick.voice.proto.PreventUsersBehaviorNotify.users: object expected");O.users[F]=$root.com.quick.voice.proto.User.fromObject(a.users[F])}}return O},I.toObject=function(a,O){O||(O={});let F={};if((O.arrays||O.defaults)&&(F.users=[]),O.defaults&&(F.roomId=""),a.roomId!=null&&a.hasOwnProperty("roomId")&&(F.roomId=a.roomId),a.users&&a.users.length){F.users=[];for(let z=0;z<a.users.length;++z)F.users[z]=$root.com.quick.voice.proto.User.toObject(a.users[z],O)}return F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.PreventUsersBehaviorNotify"},I}(),J.AccelerationAreas=function(){const I={},D=Object.create(I);return D[I[0]="chinaMainland"]=0,D[I[1]="global"]=1,D[I[2]="overseas"]=2,D}(),J.CountMethods=function(){const I={},D=Object.create(I);return D[I[0]="flow"]=0,D[I[1]="minutes"]=1,D}(),J.BaseCDNAddress=function(){function I(D){if(this.urlMap={},D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.area=0,I.prototype.countType=0,I.prototype.urlMap=$util.emptyObject,I.create=function(a){return new I(a)},I.encode=function(a,O){if(O||(O=$Writer.create()),a.area!=null&&Object.hasOwnProperty.call(a,"area")&&O.uint32(8).int32(a.area),a.countType!=null&&Object.hasOwnProperty.call(a,"countType")&&O.uint32(16).int32(a.countType),a.urlMap!=null&&Object.hasOwnProperty.call(a,"urlMap"))for(let F=Object.keys(a.urlMap),z=0;z<F.length;++z)O.uint32(26).fork().uint32(10).string(F[z]).uint32(18).string(a.urlMap[F[z]]).ldelim();return O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.BaseCDNAddress,K,te;for(;a.pos<F;){let ne=a.uint32();switch(ne>>>3){case 1:{z.area=a.int32();break}case 2:{z.countType=a.int32();break}case 3:{z.urlMap===$util.emptyObject&&(z.urlMap={});let ee=a.uint32()+a.pos;for(K="",te="";a.pos<ee;){let re=a.uint32();switch(re>>>3){case 1:K=a.string();break;case 2:te=a.string();break;default:a.skipType(re&7);break}}z.urlMap[K]=te;break}default:a.skipType(ne&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.area!=null&&a.hasOwnProperty("area"))switch(a.area){default:return"area: enum value expected";case 0:case 1:case 2:break}if(a.countType!=null&&a.hasOwnProperty("countType"))switch(a.countType){default:return"countType: enum value expected";case 0:case 1:break}if(a.urlMap!=null&&a.hasOwnProperty("urlMap")){if(!$util.isObject(a.urlMap))return"urlMap: object expected";let O=Object.keys(a.urlMap);for(let F=0;F<O.length;++F)if(!$util.isString(a.urlMap[O[F]]))return"urlMap: string{k:string} expected"}return null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.BaseCDNAddress)return a;let O=new $root.com.quick.voice.proto.BaseCDNAddress;switch(a.area){default:if(typeof a.area=="number"){O.area=a.area;break}break;case"chinaMainland":case 0:O.area=0;break;case"global":case 1:O.area=1;break;case"overseas":case 2:O.area=2;break}switch(a.countType){default:if(typeof a.countType=="number"){O.countType=a.countType;break}break;case"flow":case 0:O.countType=0;break;case"minutes":case 1:O.countType=1;break}if(a.urlMap){if(typeof a.urlMap!="object")throw TypeError(".com.quick.voice.proto.BaseCDNAddress.urlMap: object expected");O.urlMap={};for(let F=Object.keys(a.urlMap),z=0;z<F.length;++z)O.urlMap[F[z]]=String(a.urlMap[F[z]])}return O},I.toObject=function(a,O){O||(O={});let F={};(O.objects||O.defaults)&&(F.urlMap={}),O.defaults&&(F.area=O.enums===String?"chinaMainland":0,F.countType=O.enums===String?"flow":0),a.area!=null&&a.hasOwnProperty("area")&&(F.area=O.enums===String?$root.com.quick.voice.proto.AccelerationAreas[a.area]===void 0?a.area:$root.com.quick.voice.proto.AccelerationAreas[a.area]:a.area),a.countType!=null&&a.hasOwnProperty("countType")&&(F.countType=O.enums===String?$root.com.quick.voice.proto.CountMethods[a.countType]===void 0?a.countType:$root.com.quick.voice.proto.CountMethods[a.countType]:a.countType);let z;if(a.urlMap&&(z=Object.keys(a.urlMap)).length){F.urlMap={};for(let K=0;K<z.length;++K)F.urlMap[z[K]]=a.urlMap[z[K]]}return F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.BaseCDNAddress"},I}(),J.CDNPlayAddressNotify=function(){function I(a){if(this.standLines=[],a)for(let O=Object.keys(a),F=0;F<O.length;++F)a[O[F]]!=null&&(this[O[F]]=a[O[F]])}I.prototype.roomId="",I.prototype.m3u8=null,I.prototype.rtmp=null,I.prototype.flv=null,I.prototype.rtmps=null,I.prototype.mainLine=null,I.prototype.standLines=$util.emptyArray;let D;return Object.defineProperty(I.prototype,"_m3u8",{get:$util.oneOfGetter(D=["m3u8"]),set:$util.oneOfSetter(D)}),Object.defineProperty(I.prototype,"_rtmp",{get:$util.oneOfGetter(D=["rtmp"]),set:$util.oneOfSetter(D)}),Object.defineProperty(I.prototype,"_flv",{get:$util.oneOfGetter(D=["flv"]),set:$util.oneOfSetter(D)}),Object.defineProperty(I.prototype,"_rtmps",{get:$util.oneOfGetter(D=["rtmps"]),set:$util.oneOfSetter(D)}),Object.defineProperty(I.prototype,"_mainLine",{get:$util.oneOfGetter(D=["mainLine"]),set:$util.oneOfSetter(D)}),I.create=function(O){return new I(O)},I.encode=function(O,F){if(F||(F=$Writer.create()),O.roomId!=null&&Object.hasOwnProperty.call(O,"roomId")&&F.uint32(10).string(O.roomId),O.m3u8!=null&&Object.hasOwnProperty.call(O,"m3u8")&&F.uint32(18).string(O.m3u8),O.rtmp!=null&&Object.hasOwnProperty.call(O,"rtmp")&&F.uint32(26).string(O.rtmp),O.flv!=null&&Object.hasOwnProperty.call(O,"flv")&&F.uint32(34).string(O.flv),O.rtmps!=null&&Object.hasOwnProperty.call(O,"rtmps")&&F.uint32(42).string(O.rtmps),O.mainLine!=null&&Object.hasOwnProperty.call(O,"mainLine")&&$root.com.quick.voice.proto.BaseCDNAddress.encode(O.mainLine,F.uint32(50).fork()).ldelim(),O.standLines!=null&&O.standLines.length)for(let z=0;z<O.standLines.length;++z)$root.com.quick.voice.proto.BaseCDNAddress.encode(O.standLines[z],F.uint32(58).fork()).ldelim();return F},I.encodeDelimited=function(O,F){return this.encode(O,F).ldelim()},I.decode=function(O,F){O instanceof $Reader||(O=$Reader.create(O));let z=F===void 0?O.len:O.pos+F,K=new $root.com.quick.voice.proto.CDNPlayAddressNotify;for(;O.pos<z;){let te=O.uint32();switch(te>>>3){case 1:{K.roomId=O.string();break}case 2:{K.m3u8=O.string();break}case 3:{K.rtmp=O.string();break}case 4:{K.flv=O.string();break}case 5:{K.rtmps=O.string();break}case 6:{K.mainLine=$root.com.quick.voice.proto.BaseCDNAddress.decode(O,O.uint32());break}case 7:{K.standLines&&K.standLines.length||(K.standLines=[]),K.standLines.push($root.com.quick.voice.proto.BaseCDNAddress.decode(O,O.uint32()));break}default:O.skipType(te&7);break}}return K},I.decodeDelimited=function(O){return O instanceof $Reader||(O=new $Reader(O)),this.decode(O,O.uint32())},I.verify=function(O){if(typeof O!="object"||O===null)return"object expected";if(O.roomId!=null&&O.hasOwnProperty("roomId")&&!$util.isString(O.roomId))return"roomId: string expected";if(O.m3u8!=null&&O.hasOwnProperty("m3u8")&&!$util.isString(O.m3u8))return"m3u8: string expected";if(O.rtmp!=null&&O.hasOwnProperty("rtmp")&&!$util.isString(O.rtmp))return"rtmp: string expected";if(O.flv!=null&&O.hasOwnProperty("flv")&&!$util.isString(O.flv))return"flv: string expected";if(O.rtmps!=null&&O.hasOwnProperty("rtmps")&&!$util.isString(O.rtmps))return"rtmps: string expected";if(O.mainLine!=null&&O.hasOwnProperty("mainLine")){let F=$root.com.quick.voice.proto.BaseCDNAddress.verify(O.mainLine);if(F)return"mainLine."+F}if(O.standLines!=null&&O.hasOwnProperty("standLines")){if(!Array.isArray(O.standLines))return"standLines: array expected";for(let F=0;F<O.standLines.length;++F){let z=$root.com.quick.voice.proto.BaseCDNAddress.verify(O.standLines[F]);if(z)return"standLines."+z}}return null},I.fromObject=function(O){if(O instanceof $root.com.quick.voice.proto.CDNPlayAddressNotify)return O;let F=new $root.com.quick.voice.proto.CDNPlayAddressNotify;if(O.roomId!=null&&(F.roomId=String(O.roomId)),O.m3u8!=null&&(F.m3u8=String(O.m3u8)),O.rtmp!=null&&(F.rtmp=String(O.rtmp)),O.flv!=null&&(F.flv=String(O.flv)),O.rtmps!=null&&(F.rtmps=String(O.rtmps)),O.mainLine!=null){if(typeof O.mainLine!="object")throw TypeError(".com.quick.voice.proto.CDNPlayAddressNotify.mainLine: object expected");F.mainLine=$root.com.quick.voice.proto.BaseCDNAddress.fromObject(O.mainLine)}if(O.standLines){if(!Array.isArray(O.standLines))throw TypeError(".com.quick.voice.proto.CDNPlayAddressNotify.standLines: array expected");F.standLines=[];for(let z=0;z<O.standLines.length;++z){if(typeof O.standLines[z]!="object")throw TypeError(".com.quick.voice.proto.CDNPlayAddressNotify.standLines: object expected");F.standLines[z]=$root.com.quick.voice.proto.BaseCDNAddress.fromObject(O.standLines[z])}}return F},I.toObject=function(O,F){F||(F={});let z={};if((F.arrays||F.defaults)&&(z.standLines=[]),F.defaults&&(z.roomId=""),O.roomId!=null&&O.hasOwnProperty("roomId")&&(z.roomId=O.roomId),O.m3u8!=null&&O.hasOwnProperty("m3u8")&&(z.m3u8=O.m3u8,F.oneofs&&(z._m3u8="m3u8")),O.rtmp!=null&&O.hasOwnProperty("rtmp")&&(z.rtmp=O.rtmp,F.oneofs&&(z._rtmp="rtmp")),O.flv!=null&&O.hasOwnProperty("flv")&&(z.flv=O.flv,F.oneofs&&(z._flv="flv")),O.rtmps!=null&&O.hasOwnProperty("rtmps")&&(z.rtmps=O.rtmps,F.oneofs&&(z._rtmps="rtmps")),O.mainLine!=null&&O.hasOwnProperty("mainLine")&&(z.mainLine=$root.com.quick.voice.proto.BaseCDNAddress.toObject(O.mainLine,F),F.oneofs&&(z._mainLine="mainLine")),O.standLines&&O.standLines.length){z.standLines=[];for(let K=0;K<O.standLines.length;++K)z.standLines[K]=$root.com.quick.voice.proto.BaseCDNAddress.toObject(O.standLines[K],F)}return z},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(O){return O===void 0&&(O="type.googleapis.com"),O+"/com.quick.voice.proto.CDNPlayAddressNotify"},I}(),J.UserChannel=function(){function I(D){if(this.channels=[],D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.userId="",I.prototype.channels=$util.emptyArray,I.create=function(a){return new I(a)},I.encode=function(a,O){if(O||(O=$Writer.create()),a.userId!=null&&Object.hasOwnProperty.call(a,"userId")&&O.uint32(10).string(a.userId),a.channels!=null&&a.channels.length)for(let F=0;F<a.channels.length;++F)$root.com.quick.voice.proto.DataChannel.encode(a.channels[F],O.uint32(18).fork()).ldelim();return O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.UserChannel;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.userId=a.string();break}case 2:{z.channels&&z.channels.length||(z.channels=[]),z.channels.push($root.com.quick.voice.proto.DataChannel.decode(a,a.uint32()));break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.userId!=null&&a.hasOwnProperty("userId")&&!$util.isString(a.userId))return"userId: string expected";if(a.channels!=null&&a.hasOwnProperty("channels")){if(!Array.isArray(a.channels))return"channels: array expected";for(let O=0;O<a.channels.length;++O){let F=$root.com.quick.voice.proto.DataChannel.verify(a.channels[O]);if(F)return"channels."+F}}return null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.UserChannel)return a;let O=new $root.com.quick.voice.proto.UserChannel;if(a.userId!=null&&(O.userId=String(a.userId)),a.channels){if(!Array.isArray(a.channels))throw TypeError(".com.quick.voice.proto.UserChannel.channels: array expected");O.channels=[];for(let F=0;F<a.channels.length;++F){if(typeof a.channels[F]!="object")throw TypeError(".com.quick.voice.proto.UserChannel.channels: object expected");O.channels[F]=$root.com.quick.voice.proto.DataChannel.fromObject(a.channels[F])}}return O},I.toObject=function(a,O){O||(O={});let F={};if((O.arrays||O.defaults)&&(F.channels=[]),O.defaults&&(F.userId=""),a.userId!=null&&a.hasOwnProperty("userId")&&(F.userId=a.userId),a.channels&&a.channels.length){F.channels=[];for(let z=0;z<a.channels.length;++z)F.channels[z]=$root.com.quick.voice.proto.DataChannel.toObject(a.channels[z],O)}return F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.UserChannel"},I}(),J.ChannelPublishReq=function(){function I(D){if(this.channels=[],D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.channels=$util.emptyArray,I.create=function(a){return new I(a)},I.encode=function(a,O){if(O||(O=$Writer.create()),a.channels!=null&&a.channels.length)for(let F=0;F<a.channels.length;++F)$root.com.quick.voice.proto.DataChannel.encode(a.channels[F],O.uint32(10).fork()).ldelim();return O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.ChannelPublishReq;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.channels&&z.channels.length||(z.channels=[]),z.channels.push($root.com.quick.voice.proto.DataChannel.decode(a,a.uint32()));break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.channels!=null&&a.hasOwnProperty("channels")){if(!Array.isArray(a.channels))return"channels: array expected";for(let O=0;O<a.channels.length;++O){let F=$root.com.quick.voice.proto.DataChannel.verify(a.channels[O]);if(F)return"channels."+F}}return null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.ChannelPublishReq)return a;let O=new $root.com.quick.voice.proto.ChannelPublishReq;if(a.channels){if(!Array.isArray(a.channels))throw TypeError(".com.quick.voice.proto.ChannelPublishReq.channels: array expected");O.channels=[];for(let F=0;F<a.channels.length;++F){if(typeof a.channels[F]!="object")throw TypeError(".com.quick.voice.proto.ChannelPublishReq.channels: object expected");O.channels[F]=$root.com.quick.voice.proto.DataChannel.fromObject(a.channels[F])}}return O},I.toObject=function(a,O){O||(O={});let F={};if((O.arrays||O.defaults)&&(F.channels=[]),a.channels&&a.channels.length){F.channels=[];for(let z=0;z<a.channels.length;++z)F.channels[z]=$root.com.quick.voice.proto.DataChannel.toObject(a.channels[z],O)}return F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.ChannelPublishReq"},I}(),J.ChannelPublishRsq=function(){function I(D){if(this.channels=[],D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.channels=$util.emptyArray,I.create=function(a){return new I(a)},I.encode=function(a,O){if(O||(O=$Writer.create()),a.channels!=null&&a.channels.length)for(let F=0;F<a.channels.length;++F)$root.com.quick.voice.proto.UserChannel.encode(a.channels[F],O.uint32(10).fork()).ldelim();return O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.ChannelPublishRsq;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.channels&&z.channels.length||(z.channels=[]),z.channels.push($root.com.quick.voice.proto.UserChannel.decode(a,a.uint32()));break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.channels!=null&&a.hasOwnProperty("channels")){if(!Array.isArray(a.channels))return"channels: array expected";for(let O=0;O<a.channels.length;++O){let F=$root.com.quick.voice.proto.UserChannel.verify(a.channels[O]);if(F)return"channels."+F}}return null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.ChannelPublishRsq)return a;let O=new $root.com.quick.voice.proto.ChannelPublishRsq;if(a.channels){if(!Array.isArray(a.channels))throw TypeError(".com.quick.voice.proto.ChannelPublishRsq.channels: array expected");O.channels=[];for(let F=0;F<a.channels.length;++F){if(typeof a.channels[F]!="object")throw TypeError(".com.quick.voice.proto.ChannelPublishRsq.channels: object expected");O.channels[F]=$root.com.quick.voice.proto.UserChannel.fromObject(a.channels[F])}}return O},I.toObject=function(a,O){O||(O={});let F={};if((O.arrays||O.defaults)&&(F.channels=[]),a.channels&&a.channels.length){F.channels=[];for(let z=0;z<a.channels.length;++z)F.channels[z]=$root.com.quick.voice.proto.UserChannel.toObject(a.channels[z],O)}return F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.ChannelPublishRsq"},I}(),J.ChannelSubscribeReq=function(){function I(D){if(this.users=[],D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.users=$util.emptyArray,I.create=function(a){return new I(a)},I.encode=function(a,O){if(O||(O=$Writer.create()),a.users!=null&&a.users.length)for(let F=0;F<a.users.length;++F)$root.com.quick.voice.proto.UserChannel.encode(a.users[F],O.uint32(10).fork()).ldelim();return O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.ChannelSubscribeReq;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.users&&z.users.length||(z.users=[]),z.users.push($root.com.quick.voice.proto.UserChannel.decode(a,a.uint32()));break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.users!=null&&a.hasOwnProperty("users")){if(!Array.isArray(a.users))return"users: array expected";for(let O=0;O<a.users.length;++O){let F=$root.com.quick.voice.proto.UserChannel.verify(a.users[O]);if(F)return"users."+F}}return null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.ChannelSubscribeReq)return a;let O=new $root.com.quick.voice.proto.ChannelSubscribeReq;if(a.users){if(!Array.isArray(a.users))throw TypeError(".com.quick.voice.proto.ChannelSubscribeReq.users: array expected");O.users=[];for(let F=0;F<a.users.length;++F){if(typeof a.users[F]!="object")throw TypeError(".com.quick.voice.proto.ChannelSubscribeReq.users: object expected");O.users[F]=$root.com.quick.voice.proto.UserChannel.fromObject(a.users[F])}}return O},I.toObject=function(a,O){O||(O={});let F={};if((O.arrays||O.defaults)&&(F.users=[]),a.users&&a.users.length){F.users=[];for(let z=0;z<a.users.length;++z)F.users[z]=$root.com.quick.voice.proto.UserChannel.toObject(a.users[z],O)}return F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.ChannelSubscribeReq"},I}(),J.ChannelSubscribeRsq=function(){function I(D){if(this.channels=[],D)for(let a=Object.keys(D),O=0;O<a.length;++O)D[a[O]]!=null&&(this[a[O]]=D[a[O]])}return I.prototype.channels=$util.emptyArray,I.create=function(a){return new I(a)},I.encode=function(a,O){if(O||(O=$Writer.create()),a.channels!=null&&a.channels.length)for(let F=0;F<a.channels.length;++F)$root.com.quick.voice.proto.UserChannel.encode(a.channels[F],O.uint32(10).fork()).ldelim();return O},I.encodeDelimited=function(a,O){return this.encode(a,O).ldelim()},I.decode=function(a,O){a instanceof $Reader||(a=$Reader.create(a));let F=O===void 0?a.len:a.pos+O,z=new $root.com.quick.voice.proto.ChannelSubscribeRsq;for(;a.pos<F;){let K=a.uint32();switch(K>>>3){case 1:{z.channels&&z.channels.length||(z.channels=[]),z.channels.push($root.com.quick.voice.proto.UserChannel.decode(a,a.uint32()));break}default:a.skipType(K&7);break}}return z},I.decodeDelimited=function(a){return a instanceof $Reader||(a=new $Reader(a)),this.decode(a,a.uint32())},I.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.channels!=null&&a.hasOwnProperty("channels")){if(!Array.isArray(a.channels))return"channels: array expected";for(let O=0;O<a.channels.length;++O){let F=$root.com.quick.voice.proto.UserChannel.verify(a.channels[O]);if(F)return"channels."+F}}return null},I.fromObject=function(a){if(a instanceof $root.com.quick.voice.proto.ChannelSubscribeRsq)return a;let O=new $root.com.quick.voice.proto.ChannelSubscribeRsq;if(a.channels){if(!Array.isArray(a.channels))throw TypeError(".com.quick.voice.proto.ChannelSubscribeRsq.channels: array expected");O.channels=[];for(let F=0;F<a.channels.length;++F){if(typeof a.channels[F]!="object")throw TypeError(".com.quick.voice.proto.ChannelSubscribeRsq.channels: object expected");O.channels[F]=$root.com.quick.voice.proto.UserChannel.fromObject(a.channels[F])}}return O},I.toObject=function(a,O){O||(O={});let F={};if((O.arrays||O.defaults)&&(F.channels=[]),a.channels&&a.channels.length){F.channels=[];for(let z=0;z<a.channels.length;++z)F.channels[z]=$root.com.quick.voice.proto.UserChannel.toObject(a.channels[z],O)}return F},I.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},I.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/com.quick.voice.proto.ChannelSubscribeRsq"},I}(),J}(),q}(),Z}(),N})(),ignoreEvent=["networkQualityChange","onNetQuality"],enum_notifyName={onChangeNetwork:"网络情况变更",healthCheck:"心跳检测",onNetQuality:"网络质量回调",onLogin:"登录回调",onLocalStream:"本地媒体流发生变化",onDevicechange:"媒体设备发生变化",onRoomUser:"房间用户变化",onRoomUsers:"房间所有用户所有变化",onRoomUsersStreams:"房间某些用户媒体流变化",onRoomState:"房间状态变化",onJoinRoom:"加入房间回调",onQuitRoom:"退出房间回调",onPublish:"监听到流发布",onDataChannelPublish:"监听数据通道发布",onCloseTrack:"关闭轨道",onUpdateCall:"更新通讯状态",onUpdateStreams:"更新媒体流",onUpdatePermissions:"更新推流权限通知",onTokenExpired:"Token已过期",onDestroyRoom:"直播模式房间销毁",onUpdateBehavior:"行为允许权限变更",destroyRoom:"服务器要求销毁房间",onCDNPlayUrlAdd:"cdn播放地址变化",onDestroy:"SDK销毁"};ht(enum_notifyName);const notifyName_keys=Object.keys(enum_notifyName);/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const Z_FIXED$1=4,Z_BINARY=0,Z_TEXT=1,Z_UNKNOWN$1=2;function zero$1(N){let Z=N.length;for(;--Z>=0;)N[Z]=0}const STORED_BLOCK=0,STATIC_TREES=1,DYN_TREES=2,MIN_MATCH$1=3,MAX_MATCH$1=258,LENGTH_CODES$1=29,LITERALS$1=256,L_CODES$1=LITERALS$1+1+LENGTH_CODES$1,D_CODES$1=30,BL_CODES$1=19,HEAP_SIZE$1=2*L_CODES$1+1,MAX_BITS$1=15,Buf_size=16,MAX_BL_BITS=7,END_BLOCK=256,REP_3_6=16,REPZ_3_10=17,REPZ_11_138=18,extra_lbits=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),extra_dbits=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),extra_blbits=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),bl_order=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),DIST_CODE_LEN=512,static_ltree=new Array((L_CODES$1+2)*2);zero$1(static_ltree);const static_dtree=new Array(D_CODES$1*2);zero$1(static_dtree);const _dist_code=new Array(DIST_CODE_LEN);zero$1(_dist_code);const _length_code=new Array(MAX_MATCH$1-MIN_MATCH$1+1);zero$1(_length_code);const base_length=new Array(LENGTH_CODES$1);zero$1(base_length);const base_dist=new Array(D_CODES$1);zero$1(base_dist);function StaticTreeDesc(N,Z,q,J,I){this.static_tree=N,this.extra_bits=Z,this.extra_base=q,this.elems=J,this.max_length=I,this.has_stree=N&&N.length}let static_l_desc,static_d_desc,static_bl_desc;function TreeDesc(N,Z){this.dyn_tree=N,this.max_code=0,this.stat_desc=Z}const d_code=N=>N<256?_dist_code[N]:_dist_code[256+(N>>>7)],put_short=(N,Z)=>{N.pending_buf[N.pending++]=Z&255,N.pending_buf[N.pending++]=Z>>>8&255},send_bits=(N,Z,q)=>{N.bi_valid>Buf_size-q?(N.bi_buf|=Z<<N.bi_valid&65535,put_short(N,N.bi_buf),N.bi_buf=Z>>Buf_size-N.bi_valid,N.bi_valid+=q-Buf_size):(N.bi_buf|=Z<<N.bi_valid&65535,N.bi_valid+=q)},send_code=(N,Z,q)=>{send_bits(N,q[Z*2],q[Z*2+1])},bi_reverse=(N,Z)=>{let q=0;do q|=N&1,N>>>=1,q<<=1;while(--Z>0);return q>>>1},bi_flush=N=>{N.bi_valid===16?(put_short(N,N.bi_buf),N.bi_buf=0,N.bi_valid=0):N.bi_valid>=8&&(N.pending_buf[N.pending++]=N.bi_buf&255,N.bi_buf>>=8,N.bi_valid-=8)},gen_bitlen=(N,Z)=>{const q=Z.dyn_tree,J=Z.max_code,I=Z.stat_desc.static_tree,D=Z.stat_desc.has_stree,a=Z.stat_desc.extra_bits,O=Z.stat_desc.extra_base,F=Z.stat_desc.max_length;let z,K,te,ne,ee,re,ce=0;for(ne=0;ne<=MAX_BITS$1;ne++)N.bl_count[ne]=0;for(q[N.heap[N.heap_max]*2+1]=0,z=N.heap_max+1;z<HEAP_SIZE$1;z++)K=N.heap[z],ne=q[q[K*2+1]*2+1]+1,ne>F&&(ne=F,ce++),q[K*2+1]=ne,!(K>J)&&(N.bl_count[ne]++,ee=0,K>=O&&(ee=a[K-O]),re=q[K*2],N.opt_len+=re*(ne+ee),D&&(N.static_len+=re*(I[K*2+1]+ee)));if(ce!==0){do{for(ne=F-1;N.bl_count[ne]===0;)ne--;N.bl_count[ne]--,N.bl_count[ne+1]+=2,N.bl_count[F]--,ce-=2}while(ce>0);for(ne=F;ne!==0;ne--)for(K=N.bl_count[ne];K!==0;)te=N.heap[--z],!(te>J)&&(q[te*2+1]!==ne&&(N.opt_len+=(ne-q[te*2+1])*q[te*2],q[te*2+1]=ne),K--)}},gen_codes=(N,Z,q)=>{const J=new Array(MAX_BITS$1+1);let I=0,D,a;for(D=1;D<=MAX_BITS$1;D++)I=I+q[D-1]<<1,J[D]=I;for(a=0;a<=Z;a++){let O=N[a*2+1];O!==0&&(N[a*2]=bi_reverse(J[O]++,O))}},tr_static_init=()=>{let N,Z,q,J,I;const D=new Array(MAX_BITS$1+1);for(q=0,J=0;J<LENGTH_CODES$1-1;J++)for(base_length[J]=q,N=0;N<1<<extra_lbits[J];N++)_length_code[q++]=J;for(_length_code[q-1]=J,I=0,J=0;J<16;J++)for(base_dist[J]=I,N=0;N<1<<extra_dbits[J];N++)_dist_code[I++]=J;for(I>>=7;J<D_CODES$1;J++)for(base_dist[J]=I<<7,N=0;N<1<<extra_dbits[J]-7;N++)_dist_code[256+I++]=J;for(Z=0;Z<=MAX_BITS$1;Z++)D[Z]=0;for(N=0;N<=143;)static_ltree[N*2+1]=8,N++,D[8]++;for(;N<=255;)static_ltree[N*2+1]=9,N++,D[9]++;for(;N<=279;)static_ltree[N*2+1]=7,N++,D[7]++;for(;N<=287;)static_ltree[N*2+1]=8,N++,D[8]++;for(gen_codes(static_ltree,L_CODES$1+1,D),N=0;N<D_CODES$1;N++)static_dtree[N*2+1]=5,static_dtree[N*2]=bi_reverse(N,5);static_l_desc=new StaticTreeDesc(static_ltree,extra_lbits,LITERALS$1+1,L_CODES$1,MAX_BITS$1),static_d_desc=new StaticTreeDesc(static_dtree,extra_dbits,0,D_CODES$1,MAX_BITS$1),static_bl_desc=new StaticTreeDesc(new Array(0),extra_blbits,0,BL_CODES$1,MAX_BL_BITS)},init_block=N=>{let Z;for(Z=0;Z<L_CODES$1;Z++)N.dyn_ltree[Z*2]=0;for(Z=0;Z<D_CODES$1;Z++)N.dyn_dtree[Z*2]=0;for(Z=0;Z<BL_CODES$1;Z++)N.bl_tree[Z*2]=0;N.dyn_ltree[END_BLOCK*2]=1,N.opt_len=N.static_len=0,N.sym_next=N.matches=0},bi_windup=N=>{N.bi_valid>8?put_short(N,N.bi_buf):N.bi_valid>0&&(N.pending_buf[N.pending++]=N.bi_buf),N.bi_buf=0,N.bi_valid=0},smaller=(N,Z,q,J)=>{const I=Z*2,D=q*2;return N[I]<N[D]||N[I]===N[D]&&J[Z]<=J[q]},pqdownheap=(N,Z,q)=>{const J=N.heap[q];let I=q<<1;for(;I<=N.heap_len&&(I<N.heap_len&&smaller(Z,N.heap[I+1],N.heap[I],N.depth)&&I++,!smaller(Z,J,N.heap[I],N.depth));)N.heap[q]=N.heap[I],q=I,I<<=1;N.heap[q]=J},compress_block=(N,Z,q)=>{let J,I,D=0,a,O;if(N.sym_next!==0)do J=N.pending_buf[N.sym_buf+D++]&255,J+=(N.pending_buf[N.sym_buf+D++]&255)<<8,I=N.pending_buf[N.sym_buf+D++],J===0?send_code(N,I,Z):(a=_length_code[I],send_code(N,a+LITERALS$1+1,Z),O=extra_lbits[a],O!==0&&(I-=base_length[a],send_bits(N,I,O)),J--,a=d_code(J),send_code(N,a,q),O=extra_dbits[a],O!==0&&(J-=base_dist[a],send_bits(N,J,O)));while(D<N.sym_next);send_code(N,END_BLOCK,Z)},build_tree=(N,Z)=>{const q=Z.dyn_tree,J=Z.stat_desc.static_tree,I=Z.stat_desc.has_stree,D=Z.stat_desc.elems;let a,O,F=-1,z;for(N.heap_len=0,N.heap_max=HEAP_SIZE$1,a=0;a<D;a++)q[a*2]!==0?(N.heap[++N.heap_len]=F=a,N.depth[a]=0):q[a*2+1]=0;for(;N.heap_len<2;)z=N.heap[++N.heap_len]=F<2?++F:0,q[z*2]=1,N.depth[z]=0,N.opt_len--,I&&(N.static_len-=J[z*2+1]);for(Z.max_code=F,a=N.heap_len>>1;a>=1;a--)pqdownheap(N,q,a);z=D;do a=N.heap[1],N.heap[1]=N.heap[N.heap_len--],pqdownheap(N,q,1),O=N.heap[1],N.heap[--N.heap_max]=a,N.heap[--N.heap_max]=O,q[z*2]=q[a*2]+q[O*2],N.depth[z]=(N.depth[a]>=N.depth[O]?N.depth[a]:N.depth[O])+1,q[a*2+1]=q[O*2+1]=z,N.heap[1]=z++,pqdownheap(N,q,1);while(N.heap_len>=2);N.heap[--N.heap_max]=N.heap[1],gen_bitlen(N,Z),gen_codes(q,F,N.bl_count)},scan_tree=(N,Z,q)=>{let J,I=-1,D,a=Z[0*2+1],O=0,F=7,z=4;for(a===0&&(F=138,z=3),Z[(q+1)*2+1]=65535,J=0;J<=q;J++)D=a,a=Z[(J+1)*2+1],!(++O<F&&D===a)&&(O<z?N.bl_tree[D*2]+=O:D!==0?(D!==I&&N.bl_tree[D*2]++,N.bl_tree[REP_3_6*2]++):O<=10?N.bl_tree[REPZ_3_10*2]++:N.bl_tree[REPZ_11_138*2]++,O=0,I=D,a===0?(F=138,z=3):D===a?(F=6,z=3):(F=7,z=4))},send_tree=(N,Z,q)=>{let J,I=-1,D,a=Z[0*2+1],O=0,F=7,z=4;for(a===0&&(F=138,z=3),J=0;J<=q;J++)if(D=a,a=Z[(J+1)*2+1],!(++O<F&&D===a)){if(O<z)do send_code(N,D,N.bl_tree);while(--O!==0);else D!==0?(D!==I&&(send_code(N,D,N.bl_tree),O--),send_code(N,REP_3_6,N.bl_tree),send_bits(N,O-3,2)):O<=10?(send_code(N,REPZ_3_10,N.bl_tree),send_bits(N,O-3,3)):(send_code(N,REPZ_11_138,N.bl_tree),send_bits(N,O-11,7));O=0,I=D,a===0?(F=138,z=3):D===a?(F=6,z=3):(F=7,z=4)}},build_bl_tree=N=>{let Z;for(scan_tree(N,N.dyn_ltree,N.l_desc.max_code),scan_tree(N,N.dyn_dtree,N.d_desc.max_code),build_tree(N,N.bl_desc),Z=BL_CODES$1-1;Z>=3&&N.bl_tree[bl_order[Z]*2+1]===0;Z--);return N.opt_len+=3*(Z+1)+5+5+4,Z},send_all_trees=(N,Z,q,J)=>{let I;for(send_bits(N,Z-257,5),send_bits(N,q-1,5),send_bits(N,J-4,4),I=0;I<J;I++)send_bits(N,N.bl_tree[bl_order[I]*2+1],3);send_tree(N,N.dyn_ltree,Z-1),send_tree(N,N.dyn_dtree,q-1)},detect_data_type=N=>{let Z=4093624447,q;for(q=0;q<=31;q++,Z>>>=1)if(Z&1&&N.dyn_ltree[q*2]!==0)return Z_BINARY;if(N.dyn_ltree[9*2]!==0||N.dyn_ltree[10*2]!==0||N.dyn_ltree[13*2]!==0)return Z_TEXT;for(q=32;q<LITERALS$1;q++)if(N.dyn_ltree[q*2]!==0)return Z_TEXT;return Z_BINARY};let static_init_done=!1;const _tr_init$1=N=>{static_init_done||(tr_static_init(),static_init_done=!0),N.l_desc=new TreeDesc(N.dyn_ltree,static_l_desc),N.d_desc=new TreeDesc(N.dyn_dtree,static_d_desc),N.bl_desc=new TreeDesc(N.bl_tree,static_bl_desc),N.bi_buf=0,N.bi_valid=0,init_block(N)},_tr_stored_block$1=(N,Z,q,J)=>{send_bits(N,(STORED_BLOCK<<1)+(J?1:0),3),bi_windup(N),put_short(N,q),put_short(N,~q),q&&N.pending_buf.set(N.window.subarray(Z,Z+q),N.pending),N.pending+=q},_tr_align$1=N=>{send_bits(N,STATIC_TREES<<1,3),send_code(N,END_BLOCK,static_ltree),bi_flush(N)},_tr_flush_block$1=(N,Z,q,J)=>{let I,D,a=0;N.level>0?(N.strm.data_type===Z_UNKNOWN$1&&(N.strm.data_type=detect_data_type(N)),build_tree(N,N.l_desc),build_tree(N,N.d_desc),a=build_bl_tree(N),I=N.opt_len+3+7>>>3,D=N.static_len+3+7>>>3,D<=I&&(I=D)):I=D=q+5,q+4<=I&&Z!==-1?_tr_stored_block$1(N,Z,q,J):N.strategy===Z_FIXED$1||D===I?(send_bits(N,(STATIC_TREES<<1)+(J?1:0),3),compress_block(N,static_ltree,static_dtree)):(send_bits(N,(DYN_TREES<<1)+(J?1:0),3),send_all_trees(N,N.l_desc.max_code+1,N.d_desc.max_code+1,a+1),compress_block(N,N.dyn_ltree,N.dyn_dtree)),init_block(N),J&&bi_windup(N)},_tr_tally$1=(N,Z,q)=>(N.pending_buf[N.sym_buf+N.sym_next++]=Z,N.pending_buf[N.sym_buf+N.sym_next++]=Z>>8,N.pending_buf[N.sym_buf+N.sym_next++]=q,Z===0?N.dyn_ltree[q*2]++:(N.matches++,Z--,N.dyn_ltree[(_length_code[q]+LITERALS$1+1)*2]++,N.dyn_dtree[d_code(Z)*2]++),N.sym_next===N.sym_end);var _tr_init_1=_tr_init$1,_tr_stored_block_1=_tr_stored_block$1,_tr_flush_block_1=_tr_flush_block$1,_tr_tally_1=_tr_tally$1,_tr_align_1=_tr_align$1,trees={_tr_init:_tr_init_1,_tr_stored_block:_tr_stored_block_1,_tr_flush_block:_tr_flush_block_1,_tr_tally:_tr_tally_1,_tr_align:_tr_align_1};const adler32=(N,Z,q,J)=>{let I=N&65535|0,D=N>>>16&65535|0,a=0;for(;q!==0;){a=q>2e3?2e3:q,q-=a;do I=I+Z[J++]|0,D=D+I|0;while(--a);I%=65521,D%=65521}return I|D<<16|0};var adler32_1=adler32;const makeTable=()=>{let N,Z=[];for(var q=0;q<256;q++){N=q;for(var J=0;J<8;J++)N=N&1?3988292384^N>>>1:N>>>1;Z[q]=N}return Z},crcTable=new Uint32Array(makeTable()),crc32=(N,Z,q,J)=>{const I=crcTable,D=J+q;N^=-1;for(let a=J;a<D;a++)N=N>>>8^I[(N^Z[a])&255];return N^-1};var crc32_1=crc32,messages={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},constants$2={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init,_tr_stored_block,_tr_flush_block,_tr_tally,_tr_align}=trees,{Z_NO_FLUSH:Z_NO_FLUSH$2,Z_PARTIAL_FLUSH,Z_FULL_FLUSH:Z_FULL_FLUSH$1,Z_FINISH:Z_FINISH$3,Z_BLOCK:Z_BLOCK$1,Z_OK:Z_OK$3,Z_STREAM_END:Z_STREAM_END$3,Z_STREAM_ERROR:Z_STREAM_ERROR$2,Z_DATA_ERROR:Z_DATA_ERROR$2,Z_BUF_ERROR:Z_BUF_ERROR$1,Z_DEFAULT_COMPRESSION:Z_DEFAULT_COMPRESSION$1,Z_FILTERED,Z_HUFFMAN_ONLY,Z_RLE,Z_FIXED,Z_DEFAULT_STRATEGY:Z_DEFAULT_STRATEGY$1,Z_UNKNOWN,Z_DEFLATED:Z_DEFLATED$2}=constants$2,MAX_MEM_LEVEL=9,MAX_WBITS$1=15,DEF_MEM_LEVEL=8,LENGTH_CODES=29,LITERALS=256,L_CODES=LITERALS+1+LENGTH_CODES,D_CODES=30,BL_CODES=19,HEAP_SIZE=2*L_CODES+1,MAX_BITS=15,MIN_MATCH=3,MAX_MATCH=258,MIN_LOOKAHEAD=MAX_MATCH+MIN_MATCH+1,PRESET_DICT=32,INIT_STATE=42,GZIP_STATE=57,EXTRA_STATE=69,NAME_STATE=73,COMMENT_STATE=91,HCRC_STATE=103,BUSY_STATE=113,FINISH_STATE=666,BS_NEED_MORE=1,BS_BLOCK_DONE=2,BS_FINISH_STARTED=3,BS_FINISH_DONE=4,OS_CODE=3,err=(N,Z)=>(N.msg=messages[Z],Z),rank=N=>N*2-(N>4?9:0),zero=N=>{let Z=N.length;for(;--Z>=0;)N[Z]=0},slide_hash=N=>{let Z,q,J,I=N.w_size;Z=N.hash_size,J=Z;do q=N.head[--J],N.head[J]=q>=I?q-I:0;while(--Z);Z=I,J=Z;do q=N.prev[--J],N.prev[J]=q>=I?q-I:0;while(--Z)};let HASH_ZLIB=(N,Z,q)=>(Z<<N.hash_shift^q)&N.hash_mask,HASH=HASH_ZLIB;const flush_pending=N=>{const Z=N.state;let q=Z.pending;q>N.avail_out&&(q=N.avail_out),q!==0&&(N.output.set(Z.pending_buf.subarray(Z.pending_out,Z.pending_out+q),N.next_out),N.next_out+=q,Z.pending_out+=q,N.total_out+=q,N.avail_out-=q,Z.pending-=q,Z.pending===0&&(Z.pending_out=0))},flush_block_only=(N,Z)=>{_tr_flush_block(N,N.block_start>=0?N.block_start:-1,N.strstart-N.block_start,Z),N.block_start=N.strstart,flush_pending(N.strm)},put_byte=(N,Z)=>{N.pending_buf[N.pending++]=Z},putShortMSB=(N,Z)=>{N.pending_buf[N.pending++]=Z>>>8&255,N.pending_buf[N.pending++]=Z&255},read_buf=(N,Z,q,J)=>{let I=N.avail_in;return I>J&&(I=J),I===0?0:(N.avail_in-=I,Z.set(N.input.subarray(N.next_in,N.next_in+I),q),N.state.wrap===1?N.adler=adler32_1(N.adler,Z,I,q):N.state.wrap===2&&(N.adler=crc32_1(N.adler,Z,I,q)),N.next_in+=I,N.total_in+=I,I)},longest_match=(N,Z)=>{let q=N.max_chain_length,J=N.strstart,I,D,a=N.prev_length,O=N.nice_match;const F=N.strstart>N.w_size-MIN_LOOKAHEAD?N.strstart-(N.w_size-MIN_LOOKAHEAD):0,z=N.window,K=N.w_mask,te=N.prev,ne=N.strstart+MAX_MATCH;let ee=z[J+a-1],re=z[J+a];N.prev_length>=N.good_match&&(q>>=2),O>N.lookahead&&(O=N.lookahead);do if(I=Z,!(z[I+a]!==re||z[I+a-1]!==ee||z[I]!==z[J]||z[++I]!==z[J+1])){J+=2,I++;do;while(z[++J]===z[++I]&&z[++J]===z[++I]&&z[++J]===z[++I]&&z[++J]===z[++I]&&z[++J]===z[++I]&&z[++J]===z[++I]&&z[++J]===z[++I]&&z[++J]===z[++I]&&J<ne);if(D=MAX_MATCH-(ne-J),J=ne-MAX_MATCH,D>a){if(N.match_start=Z,a=D,D>=O)break;ee=z[J+a-1],re=z[J+a]}}while((Z=te[Z&K])>F&&--q!==0);return a<=N.lookahead?a:N.lookahead},fill_window=N=>{const Z=N.w_size;let q,J,I;do{if(J=N.window_size-N.lookahead-N.strstart,N.strstart>=Z+(Z-MIN_LOOKAHEAD)&&(N.window.set(N.window.subarray(Z,Z+Z-J),0),N.match_start-=Z,N.strstart-=Z,N.block_start-=Z,N.insert>N.strstart&&(N.insert=N.strstart),slide_hash(N),J+=Z),N.strm.avail_in===0)break;if(q=read_buf(N.strm,N.window,N.strstart+N.lookahead,J),N.lookahead+=q,N.lookahead+N.insert>=MIN_MATCH)for(I=N.strstart-N.insert,N.ins_h=N.window[I],N.ins_h=HASH(N,N.ins_h,N.window[I+1]);N.insert&&(N.ins_h=HASH(N,N.ins_h,N.window[I+MIN_MATCH-1]),N.prev[I&N.w_mask]=N.head[N.ins_h],N.head[N.ins_h]=I,I++,N.insert--,!(N.lookahead+N.insert<MIN_MATCH)););}while(N.lookahead<MIN_LOOKAHEAD&&N.strm.avail_in!==0)},deflate_stored=(N,Z)=>{let q=N.pending_buf_size-5>N.w_size?N.w_size:N.pending_buf_size-5,J,I,D,a=0,O=N.strm.avail_in;do{if(J=65535,D=N.bi_valid+42>>3,N.strm.avail_out<D||(D=N.strm.avail_out-D,I=N.strstart-N.block_start,J>I+N.strm.avail_in&&(J=I+N.strm.avail_in),J>D&&(J=D),J<q&&(J===0&&Z!==Z_FINISH$3||Z===Z_NO_FLUSH$2||J!==I+N.strm.avail_in)))break;a=Z===Z_FINISH$3&&J===I+N.strm.avail_in?1:0,_tr_stored_block(N,0,0,a),N.pending_buf[N.pending-4]=J,N.pending_buf[N.pending-3]=J>>8,N.pending_buf[N.pending-2]=~J,N.pending_buf[N.pending-1]=~J>>8,flush_pending(N.strm),I&&(I>J&&(I=J),N.strm.output.set(N.window.subarray(N.block_start,N.block_start+I),N.strm.next_out),N.strm.next_out+=I,N.strm.avail_out-=I,N.strm.total_out+=I,N.block_start+=I,J-=I),J&&(read_buf(N.strm,N.strm.output,N.strm.next_out,J),N.strm.next_out+=J,N.strm.avail_out-=J,N.strm.total_out+=J)}while(a===0);return O-=N.strm.avail_in,O&&(O>=N.w_size?(N.matches=2,N.window.set(N.strm.input.subarray(N.strm.next_in-N.w_size,N.strm.next_in),0),N.strstart=N.w_size,N.insert=N.strstart):(N.window_size-N.strstart<=O&&(N.strstart-=N.w_size,N.window.set(N.window.subarray(N.w_size,N.w_size+N.strstart),0),N.matches<2&&N.matches++,N.insert>N.strstart&&(N.insert=N.strstart)),N.window.set(N.strm.input.subarray(N.strm.next_in-O,N.strm.next_in),N.strstart),N.strstart+=O,N.insert+=O>N.w_size-N.insert?N.w_size-N.insert:O),N.block_start=N.strstart),N.high_water<N.strstart&&(N.high_water=N.strstart),a?BS_FINISH_DONE:Z!==Z_NO_FLUSH$2&&Z!==Z_FINISH$3&&N.strm.avail_in===0&&N.strstart===N.block_start?BS_BLOCK_DONE:(D=N.window_size-N.strstart,N.strm.avail_in>D&&N.block_start>=N.w_size&&(N.block_start-=N.w_size,N.strstart-=N.w_size,N.window.set(N.window.subarray(N.w_size,N.w_size+N.strstart),0),N.matches<2&&N.matches++,D+=N.w_size,N.insert>N.strstart&&(N.insert=N.strstart)),D>N.strm.avail_in&&(D=N.strm.avail_in),D&&(read_buf(N.strm,N.window,N.strstart,D),N.strstart+=D,N.insert+=D>N.w_size-N.insert?N.w_size-N.insert:D),N.high_water<N.strstart&&(N.high_water=N.strstart),D=N.bi_valid+42>>3,D=N.pending_buf_size-D>65535?65535:N.pending_buf_size-D,q=D>N.w_size?N.w_size:D,I=N.strstart-N.block_start,(I>=q||(I||Z===Z_FINISH$3)&&Z!==Z_NO_FLUSH$2&&N.strm.avail_in===0&&I<=D)&&(J=I>D?D:I,a=Z===Z_FINISH$3&&N.strm.avail_in===0&&J===I?1:0,_tr_stored_block(N,N.block_start,J,a),N.block_start+=J,flush_pending(N.strm)),a?BS_FINISH_STARTED:BS_NEED_MORE)},deflate_fast=(N,Z)=>{let q,J;for(;;){if(N.lookahead<MIN_LOOKAHEAD){if(fill_window(N),N.lookahead<MIN_LOOKAHEAD&&Z===Z_NO_FLUSH$2)return BS_NEED_MORE;if(N.lookahead===0)break}if(q=0,N.lookahead>=MIN_MATCH&&(N.ins_h=HASH(N,N.ins_h,N.window[N.strstart+MIN_MATCH-1]),q=N.prev[N.strstart&N.w_mask]=N.head[N.ins_h],N.head[N.ins_h]=N.strstart),q!==0&&N.strstart-q<=N.w_size-MIN_LOOKAHEAD&&(N.match_length=longest_match(N,q)),N.match_length>=MIN_MATCH)if(J=_tr_tally(N,N.strstart-N.match_start,N.match_length-MIN_MATCH),N.lookahead-=N.match_length,N.match_length<=N.max_lazy_match&&N.lookahead>=MIN_MATCH){N.match_length--;do N.strstart++,N.ins_h=HASH(N,N.ins_h,N.window[N.strstart+MIN_MATCH-1]),q=N.prev[N.strstart&N.w_mask]=N.head[N.ins_h],N.head[N.ins_h]=N.strstart;while(--N.match_length!==0);N.strstart++}else N.strstart+=N.match_length,N.match_length=0,N.ins_h=N.window[N.strstart],N.ins_h=HASH(N,N.ins_h,N.window[N.strstart+1]);else J=_tr_tally(N,0,N.window[N.strstart]),N.lookahead--,N.strstart++;if(J&&(flush_block_only(N,!1),N.strm.avail_out===0))return BS_NEED_MORE}return N.insert=N.strstart<MIN_MATCH-1?N.strstart:MIN_MATCH-1,Z===Z_FINISH$3?(flush_block_only(N,!0),N.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):N.sym_next&&(flush_block_only(N,!1),N.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_slow=(N,Z)=>{let q,J,I;for(;;){if(N.lookahead<MIN_LOOKAHEAD){if(fill_window(N),N.lookahead<MIN_LOOKAHEAD&&Z===Z_NO_FLUSH$2)return BS_NEED_MORE;if(N.lookahead===0)break}if(q=0,N.lookahead>=MIN_MATCH&&(N.ins_h=HASH(N,N.ins_h,N.window[N.strstart+MIN_MATCH-1]),q=N.prev[N.strstart&N.w_mask]=N.head[N.ins_h],N.head[N.ins_h]=N.strstart),N.prev_length=N.match_length,N.prev_match=N.match_start,N.match_length=MIN_MATCH-1,q!==0&&N.prev_length<N.max_lazy_match&&N.strstart-q<=N.w_size-MIN_LOOKAHEAD&&(N.match_length=longest_match(N,q),N.match_length<=5&&(N.strategy===Z_FILTERED||N.match_length===MIN_MATCH&&N.strstart-N.match_start>4096)&&(N.match_length=MIN_MATCH-1)),N.prev_length>=MIN_MATCH&&N.match_length<=N.prev_length){I=N.strstart+N.lookahead-MIN_MATCH,J=_tr_tally(N,N.strstart-1-N.prev_match,N.prev_length-MIN_MATCH),N.lookahead-=N.prev_length-1,N.prev_length-=2;do++N.strstart<=I&&(N.ins_h=HASH(N,N.ins_h,N.window[N.strstart+MIN_MATCH-1]),q=N.prev[N.strstart&N.w_mask]=N.head[N.ins_h],N.head[N.ins_h]=N.strstart);while(--N.prev_length!==0);if(N.match_available=0,N.match_length=MIN_MATCH-1,N.strstart++,J&&(flush_block_only(N,!1),N.strm.avail_out===0))return BS_NEED_MORE}else if(N.match_available){if(J=_tr_tally(N,0,N.window[N.strstart-1]),J&&flush_block_only(N,!1),N.strstart++,N.lookahead--,N.strm.avail_out===0)return BS_NEED_MORE}else N.match_available=1,N.strstart++,N.lookahead--}return N.match_available&&(J=_tr_tally(N,0,N.window[N.strstart-1]),N.match_available=0),N.insert=N.strstart<MIN_MATCH-1?N.strstart:MIN_MATCH-1,Z===Z_FINISH$3?(flush_block_only(N,!0),N.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):N.sym_next&&(flush_block_only(N,!1),N.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_rle=(N,Z)=>{let q,J,I,D;const a=N.window;for(;;){if(N.lookahead<=MAX_MATCH){if(fill_window(N),N.lookahead<=MAX_MATCH&&Z===Z_NO_FLUSH$2)return BS_NEED_MORE;if(N.lookahead===0)break}if(N.match_length=0,N.lookahead>=MIN_MATCH&&N.strstart>0&&(I=N.strstart-1,J=a[I],J===a[++I]&&J===a[++I]&&J===a[++I])){D=N.strstart+MAX_MATCH;do;while(J===a[++I]&&J===a[++I]&&J===a[++I]&&J===a[++I]&&J===a[++I]&&J===a[++I]&&J===a[++I]&&J===a[++I]&&I<D);N.match_length=MAX_MATCH-(D-I),N.match_length>N.lookahead&&(N.match_length=N.lookahead)}if(N.match_length>=MIN_MATCH?(q=_tr_tally(N,1,N.match_length-MIN_MATCH),N.lookahead-=N.match_length,N.strstart+=N.match_length,N.match_length=0):(q=_tr_tally(N,0,N.window[N.strstart]),N.lookahead--,N.strstart++),q&&(flush_block_only(N,!1),N.strm.avail_out===0))return BS_NEED_MORE}return N.insert=0,Z===Z_FINISH$3?(flush_block_only(N,!0),N.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):N.sym_next&&(flush_block_only(N,!1),N.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_huff=(N,Z)=>{let q;for(;;){if(N.lookahead===0&&(fill_window(N),N.lookahead===0)){if(Z===Z_NO_FLUSH$2)return BS_NEED_MORE;break}if(N.match_length=0,q=_tr_tally(N,0,N.window[N.strstart]),N.lookahead--,N.strstart++,q&&(flush_block_only(N,!1),N.strm.avail_out===0))return BS_NEED_MORE}return N.insert=0,Z===Z_FINISH$3?(flush_block_only(N,!0),N.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):N.sym_next&&(flush_block_only(N,!1),N.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE};function Config(N,Z,q,J,I){this.good_length=N,this.max_lazy=Z,this.nice_length=q,this.max_chain=J,this.func=I}const configuration_table=[new Config(0,0,0,0,deflate_stored),new Config(4,4,8,4,deflate_fast),new Config(4,5,16,8,deflate_fast),new Config(4,6,32,32,deflate_fast),new Config(4,4,16,16,deflate_slow),new Config(8,16,32,32,deflate_slow),new Config(8,16,128,128,deflate_slow),new Config(8,32,128,256,deflate_slow),new Config(32,128,258,1024,deflate_slow),new Config(32,258,258,4096,deflate_slow)],lm_init=N=>{N.window_size=2*N.w_size,zero(N.head),N.max_lazy_match=configuration_table[N.level].max_lazy,N.good_match=configuration_table[N.level].good_length,N.nice_match=configuration_table[N.level].nice_length,N.max_chain_length=configuration_table[N.level].max_chain,N.strstart=0,N.block_start=0,N.lookahead=0,N.insert=0,N.match_length=N.prev_length=MIN_MATCH-1,N.match_available=0,N.ins_h=0};function DeflateState(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Z_DEFLATED$2,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(HEAP_SIZE*2),this.dyn_dtree=new Uint16Array((2*D_CODES+1)*2),this.bl_tree=new Uint16Array((2*BL_CODES+1)*2),zero(this.dyn_ltree),zero(this.dyn_dtree),zero(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(MAX_BITS+1),this.heap=new Uint16Array(2*L_CODES+1),zero(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*L_CODES+1),zero(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const deflateStateCheck=N=>{if(!N)return 1;const Z=N.state;return!Z||Z.strm!==N||Z.status!==INIT_STATE&&Z.status!==GZIP_STATE&&Z.status!==EXTRA_STATE&&Z.status!==NAME_STATE&&Z.status!==COMMENT_STATE&&Z.status!==HCRC_STATE&&Z.status!==BUSY_STATE&&Z.status!==FINISH_STATE?1:0},deflateResetKeep=N=>{if(deflateStateCheck(N))return err(N,Z_STREAM_ERROR$2);N.total_in=N.total_out=0,N.data_type=Z_UNKNOWN;const Z=N.state;return Z.pending=0,Z.pending_out=0,Z.wrap<0&&(Z.wrap=-Z.wrap),Z.status=Z.wrap===2?GZIP_STATE:Z.wrap?INIT_STATE:BUSY_STATE,N.adler=Z.wrap===2?0:1,Z.last_flush=-2,_tr_init(Z),Z_OK$3},deflateReset=N=>{const Z=deflateResetKeep(N);return Z===Z_OK$3&&lm_init(N.state),Z},deflateSetHeader=(N,Z)=>deflateStateCheck(N)||N.state.wrap!==2?Z_STREAM_ERROR$2:(N.state.gzhead=Z,Z_OK$3),deflateInit2=(N,Z,q,J,I,D)=>{if(!N)return Z_STREAM_ERROR$2;let a=1;if(Z===Z_DEFAULT_COMPRESSION$1&&(Z=6),J<0?(a=0,J=-J):J>15&&(a=2,J-=16),I<1||I>MAX_MEM_LEVEL||q!==Z_DEFLATED$2||J<8||J>15||Z<0||Z>9||D<0||D>Z_FIXED||J===8&&a!==1)return err(N,Z_STREAM_ERROR$2);J===8&&(J=9);const O=new DeflateState;return N.state=O,O.strm=N,O.status=INIT_STATE,O.wrap=a,O.gzhead=null,O.w_bits=J,O.w_size=1<<O.w_bits,O.w_mask=O.w_size-1,O.hash_bits=I+7,O.hash_size=1<<O.hash_bits,O.hash_mask=O.hash_size-1,O.hash_shift=~~((O.hash_bits+MIN_MATCH-1)/MIN_MATCH),O.window=new Uint8Array(O.w_size*2),O.head=new Uint16Array(O.hash_size),O.prev=new Uint16Array(O.w_size),O.lit_bufsize=1<<I+6,O.pending_buf_size=O.lit_bufsize*4,O.pending_buf=new Uint8Array(O.pending_buf_size),O.sym_buf=O.lit_bufsize,O.sym_end=(O.lit_bufsize-1)*3,O.level=Z,O.strategy=D,O.method=q,deflateReset(N)},deflateInit=(N,Z)=>deflateInit2(N,Z,Z_DEFLATED$2,MAX_WBITS$1,DEF_MEM_LEVEL,Z_DEFAULT_STRATEGY$1),deflate$2=(N,Z)=>{if(deflateStateCheck(N)||Z>Z_BLOCK$1||Z<0)return N?err(N,Z_STREAM_ERROR$2):Z_STREAM_ERROR$2;const q=N.state;if(!N.output||N.avail_in!==0&&!N.input||q.status===FINISH_STATE&&Z!==Z_FINISH$3)return err(N,N.avail_out===0?Z_BUF_ERROR$1:Z_STREAM_ERROR$2);const J=q.last_flush;if(q.last_flush=Z,q.pending!==0){if(flush_pending(N),N.avail_out===0)return q.last_flush=-1,Z_OK$3}else if(N.avail_in===0&&rank(Z)<=rank(J)&&Z!==Z_FINISH$3)return err(N,Z_BUF_ERROR$1);if(q.status===FINISH_STATE&&N.avail_in!==0)return err(N,Z_BUF_ERROR$1);if(q.status===INIT_STATE&&q.wrap===0&&(q.status=BUSY_STATE),q.status===INIT_STATE){let I=Z_DEFLATED$2+(q.w_bits-8<<4)<<8,D=-1;if(q.strategy>=Z_HUFFMAN_ONLY||q.level<2?D=0:q.level<6?D=1:q.level===6?D=2:D=3,I|=D<<6,q.strstart!==0&&(I|=PRESET_DICT),I+=31-I%31,putShortMSB(q,I),q.strstart!==0&&(putShortMSB(q,N.adler>>>16),putShortMSB(q,N.adler&65535)),N.adler=1,q.status=BUSY_STATE,flush_pending(N),q.pending!==0)return q.last_flush=-1,Z_OK$3}if(q.status===GZIP_STATE){if(N.adler=0,put_byte(q,31),put_byte(q,139),put_byte(q,8),q.gzhead)put_byte(q,(q.gzhead.text?1:0)+(q.gzhead.hcrc?2:0)+(q.gzhead.extra?4:0)+(q.gzhead.name?8:0)+(q.gzhead.comment?16:0)),put_byte(q,q.gzhead.time&255),put_byte(q,q.gzhead.time>>8&255),put_byte(q,q.gzhead.time>>16&255),put_byte(q,q.gzhead.time>>24&255),put_byte(q,q.level===9?2:q.strategy>=Z_HUFFMAN_ONLY||q.level<2?4:0),put_byte(q,q.gzhead.os&255),q.gzhead.extra&&q.gzhead.extra.length&&(put_byte(q,q.gzhead.extra.length&255),put_byte(q,q.gzhead.extra.length>>8&255)),q.gzhead.hcrc&&(N.adler=crc32_1(N.adler,q.pending_buf,q.pending,0)),q.gzindex=0,q.status=EXTRA_STATE;else if(put_byte(q,0),put_byte(q,0),put_byte(q,0),put_byte(q,0),put_byte(q,0),put_byte(q,q.level===9?2:q.strategy>=Z_HUFFMAN_ONLY||q.level<2?4:0),put_byte(q,OS_CODE),q.status=BUSY_STATE,flush_pending(N),q.pending!==0)return q.last_flush=-1,Z_OK$3}if(q.status===EXTRA_STATE){if(q.gzhead.extra){let I=q.pending,D=(q.gzhead.extra.length&65535)-q.gzindex;for(;q.pending+D>q.pending_buf_size;){let O=q.pending_buf_size-q.pending;if(q.pending_buf.set(q.gzhead.extra.subarray(q.gzindex,q.gzindex+O),q.pending),q.pending=q.pending_buf_size,q.gzhead.hcrc&&q.pending>I&&(N.adler=crc32_1(N.adler,q.pending_buf,q.pending-I,I)),q.gzindex+=O,flush_pending(N),q.pending!==0)return q.last_flush=-1,Z_OK$3;I=0,D-=O}let a=new Uint8Array(q.gzhead.extra);q.pending_buf.set(a.subarray(q.gzindex,q.gzindex+D),q.pending),q.pending+=D,q.gzhead.hcrc&&q.pending>I&&(N.adler=crc32_1(N.adler,q.pending_buf,q.pending-I,I)),q.gzindex=0}q.status=NAME_STATE}if(q.status===NAME_STATE){if(q.gzhead.name){let I=q.pending,D;do{if(q.pending===q.pending_buf_size){if(q.gzhead.hcrc&&q.pending>I&&(N.adler=crc32_1(N.adler,q.pending_buf,q.pending-I,I)),flush_pending(N),q.pending!==0)return q.last_flush=-1,Z_OK$3;I=0}q.gzindex<q.gzhead.name.length?D=q.gzhead.name.charCodeAt(q.gzindex++)&255:D=0,put_byte(q,D)}while(D!==0);q.gzhead.hcrc&&q.pending>I&&(N.adler=crc32_1(N.adler,q.pending_buf,q.pending-I,I)),q.gzindex=0}q.status=COMMENT_STATE}if(q.status===COMMENT_STATE){if(q.gzhead.comment){let I=q.pending,D;do{if(q.pending===q.pending_buf_size){if(q.gzhead.hcrc&&q.pending>I&&(N.adler=crc32_1(N.adler,q.pending_buf,q.pending-I,I)),flush_pending(N),q.pending!==0)return q.last_flush=-1,Z_OK$3;I=0}q.gzindex<q.gzhead.comment.length?D=q.gzhead.comment.charCodeAt(q.gzindex++)&255:D=0,put_byte(q,D)}while(D!==0);q.gzhead.hcrc&&q.pending>I&&(N.adler=crc32_1(N.adler,q.pending_buf,q.pending-I,I))}q.status=HCRC_STATE}if(q.status===HCRC_STATE){if(q.gzhead.hcrc){if(q.pending+2>q.pending_buf_size&&(flush_pending(N),q.pending!==0))return q.last_flush=-1,Z_OK$3;put_byte(q,N.adler&255),put_byte(q,N.adler>>8&255),N.adler=0}if(q.status=BUSY_STATE,flush_pending(N),q.pending!==0)return q.last_flush=-1,Z_OK$3}if(N.avail_in!==0||q.lookahead!==0||Z!==Z_NO_FLUSH$2&&q.status!==FINISH_STATE){let I=q.level===0?deflate_stored(q,Z):q.strategy===Z_HUFFMAN_ONLY?deflate_huff(q,Z):q.strategy===Z_RLE?deflate_rle(q,Z):configuration_table[q.level].func(q,Z);if((I===BS_FINISH_STARTED||I===BS_FINISH_DONE)&&(q.status=FINISH_STATE),I===BS_NEED_MORE||I===BS_FINISH_STARTED)return N.avail_out===0&&(q.last_flush=-1),Z_OK$3;if(I===BS_BLOCK_DONE&&(Z===Z_PARTIAL_FLUSH?_tr_align(q):Z!==Z_BLOCK$1&&(_tr_stored_block(q,0,0,!1),Z===Z_FULL_FLUSH$1&&(zero(q.head),q.lookahead===0&&(q.strstart=0,q.block_start=0,q.insert=0))),flush_pending(N),N.avail_out===0))return q.last_flush=-1,Z_OK$3}return Z!==Z_FINISH$3?Z_OK$3:q.wrap<=0?Z_STREAM_END$3:(q.wrap===2?(put_byte(q,N.adler&255),put_byte(q,N.adler>>8&255),put_byte(q,N.adler>>16&255),put_byte(q,N.adler>>24&255),put_byte(q,N.total_in&255),put_byte(q,N.total_in>>8&255),put_byte(q,N.total_in>>16&255),put_byte(q,N.total_in>>24&255)):(putShortMSB(q,N.adler>>>16),putShortMSB(q,N.adler&65535)),flush_pending(N),q.wrap>0&&(q.wrap=-q.wrap),q.pending!==0?Z_OK$3:Z_STREAM_END$3)},deflateEnd=N=>{if(deflateStateCheck(N))return Z_STREAM_ERROR$2;const Z=N.state.status;return N.state=null,Z===BUSY_STATE?err(N,Z_DATA_ERROR$2):Z_OK$3},deflateSetDictionary=(N,Z)=>{let q=Z.length;if(deflateStateCheck(N))return Z_STREAM_ERROR$2;const J=N.state,I=J.wrap;if(I===2||I===1&&J.status!==INIT_STATE||J.lookahead)return Z_STREAM_ERROR$2;if(I===1&&(N.adler=adler32_1(N.adler,Z,q,0)),J.wrap=0,q>=J.w_size){I===0&&(zero(J.head),J.strstart=0,J.block_start=0,J.insert=0);let F=new Uint8Array(J.w_size);F.set(Z.subarray(q-J.w_size,q),0),Z=F,q=J.w_size}const D=N.avail_in,a=N.next_in,O=N.input;for(N.avail_in=q,N.next_in=0,N.input=Z,fill_window(J);J.lookahead>=MIN_MATCH;){let F=J.strstart,z=J.lookahead-(MIN_MATCH-1);do J.ins_h=HASH(J,J.ins_h,J.window[F+MIN_MATCH-1]),J.prev[F&J.w_mask]=J.head[J.ins_h],J.head[J.ins_h]=F,F++;while(--z);J.strstart=F,J.lookahead=MIN_MATCH-1,fill_window(J)}return J.strstart+=J.lookahead,J.block_start=J.strstart,J.insert=J.lookahead,J.lookahead=0,J.match_length=J.prev_length=MIN_MATCH-1,J.match_available=0,N.next_in=a,N.input=O,N.avail_in=D,J.wrap=I,Z_OK$3};var deflateInit_1=deflateInit,deflateInit2_1=deflateInit2,deflateReset_1=deflateReset,deflateResetKeep_1=deflateResetKeep,deflateSetHeader_1=deflateSetHeader,deflate_2$1=deflate$2,deflateEnd_1=deflateEnd,deflateSetDictionary_1=deflateSetDictionary,deflateInfo="pako deflate (from Nodeca project)",deflate_1$2={deflateInit:deflateInit_1,deflateInit2:deflateInit2_1,deflateReset:deflateReset_1,deflateResetKeep:deflateResetKeep_1,deflateSetHeader:deflateSetHeader_1,deflate:deflate_2$1,deflateEnd:deflateEnd_1,deflateSetDictionary:deflateSetDictionary_1,deflateInfo};const _has=(N,Z)=>Object.prototype.hasOwnProperty.call(N,Z);var assign=function(N){const Z=Array.prototype.slice.call(arguments,1);for(;Z.length;){const q=Z.shift();if(q){if(typeof q!="object")throw new TypeError(q+"must be non-object");for(const J in q)_has(q,J)&&(N[J]=q[J])}}return N},flattenChunks=N=>{let Z=0;for(let J=0,I=N.length;J<I;J++)Z+=N[J].length;const q=new Uint8Array(Z);for(let J=0,I=0,D=N.length;J<D;J++){let a=N[J];q.set(a,I),I+=a.length}return q},common={assign,flattenChunks};let STR_APPLY_UIA_OK=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(N){STR_APPLY_UIA_OK=!1}const _utf8len=new Uint8Array(256);for(let N=0;N<256;N++)_utf8len[N]=N>=252?6:N>=248?5:N>=240?4:N>=224?3:N>=192?2:1;_utf8len[254]=_utf8len[254]=1;var string2buf=N=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(N);let Z,q,J,I,D,a=N.length,O=0;for(I=0;I<a;I++)q=N.charCodeAt(I),(q&64512)===55296&&I+1<a&&(J=N.charCodeAt(I+1),(J&64512)===56320&&(q=65536+(q-55296<<10)+(J-56320),I++)),O+=q<128?1:q<2048?2:q<65536?3:4;for(Z=new Uint8Array(O),D=0,I=0;D<O;I++)q=N.charCodeAt(I),(q&64512)===55296&&I+1<a&&(J=N.charCodeAt(I+1),(J&64512)===56320&&(q=65536+(q-55296<<10)+(J-56320),I++)),q<128?Z[D++]=q:q<2048?(Z[D++]=192|q>>>6,Z[D++]=128|q&63):q<65536?(Z[D++]=224|q>>>12,Z[D++]=128|q>>>6&63,Z[D++]=128|q&63):(Z[D++]=240|q>>>18,Z[D++]=128|q>>>12&63,Z[D++]=128|q>>>6&63,Z[D++]=128|q&63);return Z};const buf2binstring=(N,Z)=>{if(Z<65534&&N.subarray&&STR_APPLY_UIA_OK)return String.fromCharCode.apply(null,N.length===Z?N:N.subarray(0,Z));let q="";for(let J=0;J<Z;J++)q+=String.fromCharCode(N[J]);return q};var buf2string=(N,Z)=>{const q=Z||N.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(N.subarray(0,Z));let J,I;const D=new Array(q*2);for(I=0,J=0;J<q;){let a=N[J++];if(a<128){D[I++]=a;continue}let O=_utf8len[a];if(O>4){D[I++]=65533,J+=O-1;continue}for(a&=O===2?31:O===3?15:7;O>1&&J<q;)a=a<<6|N[J++]&63,O--;if(O>1){D[I++]=65533;continue}a<65536?D[I++]=a:(a-=65536,D[I++]=55296|a>>10&1023,D[I++]=56320|a&1023)}return buf2binstring(D,I)},utf8border=(N,Z)=>{Z=Z||N.length,Z>N.length&&(Z=N.length);let q=Z-1;for(;q>=0&&(N[q]&192)===128;)q--;return q<0||q===0?Z:q+_utf8len[N[q]]>Z?q:Z},strings={string2buf,buf2string,utf8border};function ZStream(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var zstream=ZStream;const toString$1=Object.prototype.toString,{Z_NO_FLUSH:Z_NO_FLUSH$1,Z_SYNC_FLUSH,Z_FULL_FLUSH,Z_FINISH:Z_FINISH$2,Z_OK:Z_OK$2,Z_STREAM_END:Z_STREAM_END$2,Z_DEFAULT_COMPRESSION,Z_DEFAULT_STRATEGY,Z_DEFLATED:Z_DEFLATED$1}=constants$2;function Deflate$1(N){this.options=common.assign({level:Z_DEFAULT_COMPRESSION,method:Z_DEFLATED$1,chunkSize:16384,windowBits:15,memLevel:8,strategy:Z_DEFAULT_STRATEGY},N||{});let Z=this.options;Z.raw&&Z.windowBits>0?Z.windowBits=-Z.windowBits:Z.gzip&&Z.windowBits>0&&Z.windowBits<16&&(Z.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zstream,this.strm.avail_out=0;let q=deflate_1$2.deflateInit2(this.strm,Z.level,Z.method,Z.windowBits,Z.memLevel,Z.strategy);if(q!==Z_OK$2)throw new Error(messages[q]);if(Z.header&&deflate_1$2.deflateSetHeader(this.strm,Z.header),Z.dictionary){let J;if(typeof Z.dictionary=="string"?J=strings.string2buf(Z.dictionary):toString$1.call(Z.dictionary)==="[object ArrayBuffer]"?J=new Uint8Array(Z.dictionary):J=Z.dictionary,q=deflate_1$2.deflateSetDictionary(this.strm,J),q!==Z_OK$2)throw new Error(messages[q]);this._dict_set=!0}}Deflate$1.prototype.push=function(N,Z){const q=this.strm,J=this.options.chunkSize;let I,D;if(this.ended)return!1;for(Z===~~Z?D=Z:D=Z===!0?Z_FINISH$2:Z_NO_FLUSH$1,typeof N=="string"?q.input=strings.string2buf(N):toString$1.call(N)==="[object ArrayBuffer]"?q.input=new Uint8Array(N):q.input=N,q.next_in=0,q.avail_in=q.input.length;;){if(q.avail_out===0&&(q.output=new Uint8Array(J),q.next_out=0,q.avail_out=J),(D===Z_SYNC_FLUSH||D===Z_FULL_FLUSH)&&q.avail_out<=6){this.onData(q.output.subarray(0,q.next_out)),q.avail_out=0;continue}if(I=deflate_1$2.deflate(q,D),I===Z_STREAM_END$2)return q.next_out>0&&this.onData(q.output.subarray(0,q.next_out)),I=deflate_1$2.deflateEnd(this.strm),this.onEnd(I),this.ended=!0,I===Z_OK$2;if(q.avail_out===0){this.onData(q.output);continue}if(D>0&&q.next_out>0){this.onData(q.output.subarray(0,q.next_out)),q.avail_out=0;continue}if(q.avail_in===0)break}return!0},Deflate$1.prototype.onData=function(N){this.chunks.push(N)},Deflate$1.prototype.onEnd=function(N){N===Z_OK$2&&(this.result=common.flattenChunks(this.chunks)),this.chunks=[],this.err=N,this.msg=this.strm.msg};function deflate$1(N,Z){const q=new Deflate$1(Z);if(q.push(N,!0),q.err)throw q.msg||messages[q.err];return q.result}function deflateRaw$1(N,Z){return Z=Z||{},Z.raw=!0,deflate$1(N,Z)}function gzip$1(N,Z){return Z=Z||{},Z.gzip=!0,deflate$1(N,Z)}var Deflate_1$1=Deflate$1,deflate_2=deflate$1,deflateRaw_1$1=deflateRaw$1,gzip_1$1=gzip$1,deflate_1$1={Deflate:Deflate_1$1,deflate:deflate_2,deflateRaw:deflateRaw_1$1,gzip:gzip_1$1};const BAD$1=16209,TYPE$1=16191;var inffast=function N(Z,q){let J,I,D,a,O,F,z,K,te,ne,ee,re,ce,oe,se,fe,ge,ue,_e,pe,ye,we,Ie,be;const Se=Z.state;J=Z.next_in,Ie=Z.input,I=J+(Z.avail_in-5),D=Z.next_out,be=Z.output,a=D-(q-Z.avail_out),O=D+(Z.avail_out-257),F=Se.dmax,z=Se.wsize,K=Se.whave,te=Se.wnext,ne=Se.window,ee=Se.hold,re=Se.bits,ce=Se.lencode,oe=Se.distcode,se=(1<<Se.lenbits)-1,fe=(1<<Se.distbits)-1;e:do{re<15&&(ee+=Ie[J++]<<re,re+=8,ee+=Ie[J++]<<re,re+=8),ge=ce[ee&se];t:for(;;){if(ue=ge>>>24,ee>>>=ue,re-=ue,ue=ge>>>16&255,ue===0)be[D++]=ge&65535;else if(ue&16){_e=ge&65535,ue&=15,ue&&(re<ue&&(ee+=Ie[J++]<<re,re+=8),_e+=ee&(1<<ue)-1,ee>>>=ue,re-=ue),re<15&&(ee+=Ie[J++]<<re,re+=8,ee+=Ie[J++]<<re,re+=8),ge=oe[ee&fe];n:for(;;){if(ue=ge>>>24,ee>>>=ue,re-=ue,ue=ge>>>16&255,ue&16){if(pe=ge&65535,ue&=15,re<ue&&(ee+=Ie[J++]<<re,re+=8,re<ue&&(ee+=Ie[J++]<<re,re+=8)),pe+=ee&(1<<ue)-1,pe>F){Z.msg="invalid distance too far back",Se.mode=BAD$1;break e}if(ee>>>=ue,re-=ue,ue=D-a,pe>ue){if(ue=pe-ue,ue>K&&Se.sane){Z.msg="invalid distance too far back",Se.mode=BAD$1;break e}if(ye=0,we=ne,te===0){if(ye+=z-ue,ue<_e){_e-=ue;do be[D++]=ne[ye++];while(--ue);ye=D-pe,we=be}}else if(te<ue){if(ye+=z+te-ue,ue-=te,ue<_e){_e-=ue;do be[D++]=ne[ye++];while(--ue);if(ye=0,te<_e){ue=te,_e-=ue;do be[D++]=ne[ye++];while(--ue);ye=D-pe,we=be}}}else if(ye+=te-ue,ue<_e){_e-=ue;do be[D++]=ne[ye++];while(--ue);ye=D-pe,we=be}for(;_e>2;)be[D++]=we[ye++],be[D++]=we[ye++],be[D++]=we[ye++],_e-=3;_e&&(be[D++]=we[ye++],_e>1&&(be[D++]=we[ye++]))}else{ye=D-pe;do be[D++]=be[ye++],be[D++]=be[ye++],be[D++]=be[ye++],_e-=3;while(_e>2);_e&&(be[D++]=be[ye++],_e>1&&(be[D++]=be[ye++]))}}else if((ue&64)===0){ge=oe[(ge&65535)+(ee&(1<<ue)-1)];continue n}else{Z.msg="invalid distance code",Se.mode=BAD$1;break e}break}}else if((ue&64)===0){ge=ce[(ge&65535)+(ee&(1<<ue)-1)];continue t}else if(ue&32){Se.mode=TYPE$1;break e}else{Z.msg="invalid literal/length code",Se.mode=BAD$1;break e}break}}while(J<I&&D<O);_e=re>>3,J-=_e,re-=_e<<3,ee&=(1<<re)-1,Z.next_in=J,Z.next_out=D,Z.avail_in=J<I?5+(I-J):5-(J-I),Z.avail_out=D<O?257+(O-D):257-(D-O),Se.hold=ee,Se.bits=re};const MAXBITS=15,ENOUGH_LENS$1=852,ENOUGH_DISTS$1=592,CODES$1=0,LENS$1=1,DISTS$1=2,lbase=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),lext=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),dbase=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),dext=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),inflate_table=(N,Z,q,J,I,D,a,O)=>{const F=O.bits;let z=0,K=0,te=0,ne=0,ee=0,re=0,ce=0,oe=0,se=0,fe=0,ge,ue,_e,pe,ye,we=null,Ie;const be=new Uint16Array(MAXBITS+1),Se=new Uint16Array(MAXBITS+1);let Me=null,We,Je,Le;for(z=0;z<=MAXBITS;z++)be[z]=0;for(K=0;K<J;K++)be[Z[q+K]]++;for(ee=F,ne=MAXBITS;ne>=1&&be[ne]===0;ne--);if(ee>ne&&(ee=ne),ne===0)return I[D++]=1<<24|64<<16|0,I[D++]=1<<24|64<<16|0,O.bits=1,0;for(te=1;te<ne&&be[te]===0;te++);for(ee<te&&(ee=te),oe=1,z=1;z<=MAXBITS;z++)if(oe<<=1,oe-=be[z],oe<0)return-1;if(oe>0&&(N===CODES$1||ne!==1))return-1;for(Se[1]=0,z=1;z<MAXBITS;z++)Se[z+1]=Se[z]+be[z];for(K=0;K<J;K++)Z[q+K]!==0&&(a[Se[Z[q+K]]++]=K);if(N===CODES$1?(we=Me=a,Ie=20):N===LENS$1?(we=lbase,Me=lext,Ie=257):(we=dbase,Me=dext,Ie=0),fe=0,K=0,z=te,ye=D,re=ee,ce=0,_e=-1,se=1<<ee,pe=se-1,N===LENS$1&&se>ENOUGH_LENS$1||N===DISTS$1&&se>ENOUGH_DISTS$1)return 1;for(;;){We=z-ce,a[K]+1<Ie?(Je=0,Le=a[K]):a[K]>=Ie?(Je=Me[a[K]-Ie],Le=we[a[K]-Ie]):(Je=96,Le=0),ge=1<<z-ce,ue=1<<re,te=ue;do ue-=ge,I[ye+(fe>>ce)+ue]=We<<24|Je<<16|Le|0;while(ue!==0);for(ge=1<<z-1;fe&ge;)ge>>=1;if(ge!==0?(fe&=ge-1,fe+=ge):fe=0,K++,--be[z]===0){if(z===ne)break;z=Z[q+a[K]]}if(z>ee&&(fe&pe)!==_e){for(ce===0&&(ce=ee),ye+=te,re=z-ce,oe=1<<re;re+ce<ne&&(oe-=be[re+ce],!(oe<=0));)re++,oe<<=1;if(se+=1<<re,N===LENS$1&&se>ENOUGH_LENS$1||N===DISTS$1&&se>ENOUGH_DISTS$1)return 1;_e=fe&pe,I[_e]=ee<<24|re<<16|ye-D|0}}return fe!==0&&(I[ye+fe]=z-ce<<24|64<<16|0),O.bits=ee,0};var inftrees=inflate_table;const CODES=0,LENS=1,DISTS=2,{Z_FINISH:Z_FINISH$1,Z_BLOCK,Z_TREES,Z_OK:Z_OK$1,Z_STREAM_END:Z_STREAM_END$1,Z_NEED_DICT:Z_NEED_DICT$1,Z_STREAM_ERROR:Z_STREAM_ERROR$1,Z_DATA_ERROR:Z_DATA_ERROR$1,Z_MEM_ERROR:Z_MEM_ERROR$1,Z_BUF_ERROR,Z_DEFLATED}=constants$2,HEAD=16180,FLAGS=16181,TIME=16182,OS=16183,EXLEN=16184,EXTRA=16185,NAME=16186,COMMENT=16187,HCRC=16188,DICTID=16189,DICT=16190,TYPE=16191,TYPEDO=16192,STORED=16193,COPY_=16194,COPY=16195,TABLE=16196,LENLENS=16197,CODELENS=16198,LEN_=16199,LEN=16200,LENEXT=16201,DIST=16202,DISTEXT=16203,MATCH=16204,LIT=16205,CHECK=16206,LENGTH=16207,DONE=16208,BAD=16209,MEM=16210,SYNC=16211,ENOUGH_LENS=852,ENOUGH_DISTS=592,MAX_WBITS=15,DEF_WBITS=MAX_WBITS,zswap32=N=>(N>>>24&255)+(N>>>8&65280)+((N&65280)<<8)+((N&255)<<24);function InflateState(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const inflateStateCheck=N=>{if(!N)return 1;const Z=N.state;return!Z||Z.strm!==N||Z.mode<HEAD||Z.mode>SYNC?1:0},inflateResetKeep=N=>{if(inflateStateCheck(N))return Z_STREAM_ERROR$1;const Z=N.state;return N.total_in=N.total_out=Z.total=0,N.msg="",Z.wrap&&(N.adler=Z.wrap&1),Z.mode=HEAD,Z.last=0,Z.havedict=0,Z.flags=-1,Z.dmax=32768,Z.head=null,Z.hold=0,Z.bits=0,Z.lencode=Z.lendyn=new Int32Array(ENOUGH_LENS),Z.distcode=Z.distdyn=new Int32Array(ENOUGH_DISTS),Z.sane=1,Z.back=-1,Z_OK$1},inflateReset=N=>{if(inflateStateCheck(N))return Z_STREAM_ERROR$1;const Z=N.state;return Z.wsize=0,Z.whave=0,Z.wnext=0,inflateResetKeep(N)},inflateReset2=(N,Z)=>{let q;if(inflateStateCheck(N))return Z_STREAM_ERROR$1;const J=N.state;return Z<0?(q=0,Z=-Z):(q=(Z>>4)+5,Z<48&&(Z&=15)),Z&&(Z<8||Z>15)?Z_STREAM_ERROR$1:(J.window!==null&&J.wbits!==Z&&(J.window=null),J.wrap=q,J.wbits=Z,inflateReset(N))},inflateInit2=(N,Z)=>{if(!N)return Z_STREAM_ERROR$1;const q=new InflateState;N.state=q,q.strm=N,q.window=null,q.mode=HEAD;const J=inflateReset2(N,Z);return J!==Z_OK$1&&(N.state=null),J},inflateInit=N=>inflateInit2(N,DEF_WBITS);let virgin=!0,lenfix,distfix;const fixedtables=N=>{if(virgin){lenfix=new Int32Array(512),distfix=new Int32Array(32);let Z=0;for(;Z<144;)N.lens[Z++]=8;for(;Z<256;)N.lens[Z++]=9;for(;Z<280;)N.lens[Z++]=7;for(;Z<288;)N.lens[Z++]=8;for(inftrees(LENS,N.lens,0,288,lenfix,0,N.work,{bits:9}),Z=0;Z<32;)N.lens[Z++]=5;inftrees(DISTS,N.lens,0,32,distfix,0,N.work,{bits:5}),virgin=!1}N.lencode=lenfix,N.lenbits=9,N.distcode=distfix,N.distbits=5},updatewindow=(N,Z,q,J)=>{let I;const D=N.state;return D.window===null&&(D.wsize=1<<D.wbits,D.wnext=0,D.whave=0,D.window=new Uint8Array(D.wsize)),J>=D.wsize?(D.window.set(Z.subarray(q-D.wsize,q),0),D.wnext=0,D.whave=D.wsize):(I=D.wsize-D.wnext,I>J&&(I=J),D.window.set(Z.subarray(q-J,q-J+I),D.wnext),J-=I,J?(D.window.set(Z.subarray(q-J,q),0),D.wnext=J,D.whave=D.wsize):(D.wnext+=I,D.wnext===D.wsize&&(D.wnext=0),D.whave<D.wsize&&(D.whave+=I))),0},inflate$2=(N,Z)=>{let q,J,I,D,a,O,F,z,K,te,ne,ee,re,ce,oe=0,se,fe,ge,ue,_e,pe,ye,we;const Ie=new Uint8Array(4);let be,Se;const Me=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(inflateStateCheck(N)||!N.output||!N.input&&N.avail_in!==0)return Z_STREAM_ERROR$1;q=N.state,q.mode===TYPE&&(q.mode=TYPEDO),a=N.next_out,I=N.output,F=N.avail_out,D=N.next_in,J=N.input,O=N.avail_in,z=q.hold,K=q.bits,te=O,ne=F,we=Z_OK$1;e:for(;;)switch(q.mode){case HEAD:if(q.wrap===0){q.mode=TYPEDO;break}for(;K<16;){if(O===0)break e;O--,z+=J[D++]<<K,K+=8}if(q.wrap&2&&z===35615){q.wbits===0&&(q.wbits=15),q.check=0,Ie[0]=z&255,Ie[1]=z>>>8&255,q.check=crc32_1(q.check,Ie,2,0),z=0,K=0,q.mode=FLAGS;break}if(q.head&&(q.head.done=!1),!(q.wrap&1)||(((z&255)<<8)+(z>>8))%31){N.msg="incorrect header check",q.mode=BAD;break}if((z&15)!==Z_DEFLATED){N.msg="unknown compression method",q.mode=BAD;break}if(z>>>=4,K-=4,ye=(z&15)+8,q.wbits===0&&(q.wbits=ye),ye>15||ye>q.wbits){N.msg="invalid window size",q.mode=BAD;break}q.dmax=1<<q.wbits,q.flags=0,N.adler=q.check=1,q.mode=z&512?DICTID:TYPE,z=0,K=0;break;case FLAGS:for(;K<16;){if(O===0)break e;O--,z+=J[D++]<<K,K+=8}if(q.flags=z,(q.flags&255)!==Z_DEFLATED){N.msg="unknown compression method",q.mode=BAD;break}if(q.flags&57344){N.msg="unknown header flags set",q.mode=BAD;break}q.head&&(q.head.text=z>>8&1),q.flags&512&&q.wrap&4&&(Ie[0]=z&255,Ie[1]=z>>>8&255,q.check=crc32_1(q.check,Ie,2,0)),z=0,K=0,q.mode=TIME;case TIME:for(;K<32;){if(O===0)break e;O--,z+=J[D++]<<K,K+=8}q.head&&(q.head.time=z),q.flags&512&&q.wrap&4&&(Ie[0]=z&255,Ie[1]=z>>>8&255,Ie[2]=z>>>16&255,Ie[3]=z>>>24&255,q.check=crc32_1(q.check,Ie,4,0)),z=0,K=0,q.mode=OS;case OS:for(;K<16;){if(O===0)break e;O--,z+=J[D++]<<K,K+=8}q.head&&(q.head.xflags=z&255,q.head.os=z>>8),q.flags&512&&q.wrap&4&&(Ie[0]=z&255,Ie[1]=z>>>8&255,q.check=crc32_1(q.check,Ie,2,0)),z=0,K=0,q.mode=EXLEN;case EXLEN:if(q.flags&1024){for(;K<16;){if(O===0)break e;O--,z+=J[D++]<<K,K+=8}q.length=z,q.head&&(q.head.extra_len=z),q.flags&512&&q.wrap&4&&(Ie[0]=z&255,Ie[1]=z>>>8&255,q.check=crc32_1(q.check,Ie,2,0)),z=0,K=0}else q.head&&(q.head.extra=null);q.mode=EXTRA;case EXTRA:if(q.flags&1024&&(ee=q.length,ee>O&&(ee=O),ee&&(q.head&&(ye=q.head.extra_len-q.length,q.head.extra||(q.head.extra=new Uint8Array(q.head.extra_len)),q.head.extra.set(J.subarray(D,D+ee),ye)),q.flags&512&&q.wrap&4&&(q.check=crc32_1(q.check,J,ee,D)),O-=ee,D+=ee,q.length-=ee),q.length))break e;q.length=0,q.mode=NAME;case NAME:if(q.flags&2048){if(O===0)break e;ee=0;do ye=J[D+ee++],q.head&&ye&&q.length<65536&&(q.head.name+=String.fromCharCode(ye));while(ye&&ee<O);if(q.flags&512&&q.wrap&4&&(q.check=crc32_1(q.check,J,ee,D)),O-=ee,D+=ee,ye)break e}else q.head&&(q.head.name=null);q.length=0,q.mode=COMMENT;case COMMENT:if(q.flags&4096){if(O===0)break e;ee=0;do ye=J[D+ee++],q.head&&ye&&q.length<65536&&(q.head.comment+=String.fromCharCode(ye));while(ye&&ee<O);if(q.flags&512&&q.wrap&4&&(q.check=crc32_1(q.check,J,ee,D)),O-=ee,D+=ee,ye)break e}else q.head&&(q.head.comment=null);q.mode=HCRC;case HCRC:if(q.flags&512){for(;K<16;){if(O===0)break e;O--,z+=J[D++]<<K,K+=8}if(q.wrap&4&&z!==(q.check&65535)){N.msg="header crc mismatch",q.mode=BAD;break}z=0,K=0}q.head&&(q.head.hcrc=q.flags>>9&1,q.head.done=!0),N.adler=q.check=0,q.mode=TYPE;break;case DICTID:for(;K<32;){if(O===0)break e;O--,z+=J[D++]<<K,K+=8}N.adler=q.check=zswap32(z),z=0,K=0,q.mode=DICT;case DICT:if(q.havedict===0)return N.next_out=a,N.avail_out=F,N.next_in=D,N.avail_in=O,q.hold=z,q.bits=K,Z_NEED_DICT$1;N.adler=q.check=1,q.mode=TYPE;case TYPE:if(Z===Z_BLOCK||Z===Z_TREES)break e;case TYPEDO:if(q.last){z>>>=K&7,K-=K&7,q.mode=CHECK;break}for(;K<3;){if(O===0)break e;O--,z+=J[D++]<<K,K+=8}switch(q.last=z&1,z>>>=1,K-=1,z&3){case 0:q.mode=STORED;break;case 1:if(fixedtables(q),q.mode=LEN_,Z===Z_TREES){z>>>=2,K-=2;break e}break;case 2:q.mode=TABLE;break;case 3:N.msg="invalid block type",q.mode=BAD}z>>>=2,K-=2;break;case STORED:for(z>>>=K&7,K-=K&7;K<32;){if(O===0)break e;O--,z+=J[D++]<<K,K+=8}if((z&65535)!==(z>>>16^65535)){N.msg="invalid stored block lengths",q.mode=BAD;break}if(q.length=z&65535,z=0,K=0,q.mode=COPY_,Z===Z_TREES)break e;case COPY_:q.mode=COPY;case COPY:if(ee=q.length,ee){if(ee>O&&(ee=O),ee>F&&(ee=F),ee===0)break e;I.set(J.subarray(D,D+ee),a),O-=ee,D+=ee,F-=ee,a+=ee,q.length-=ee;break}q.mode=TYPE;break;case TABLE:for(;K<14;){if(O===0)break e;O--,z+=J[D++]<<K,K+=8}if(q.nlen=(z&31)+257,z>>>=5,K-=5,q.ndist=(z&31)+1,z>>>=5,K-=5,q.ncode=(z&15)+4,z>>>=4,K-=4,q.nlen>286||q.ndist>30){N.msg="too many length or distance symbols",q.mode=BAD;break}q.have=0,q.mode=LENLENS;case LENLENS:for(;q.have<q.ncode;){for(;K<3;){if(O===0)break e;O--,z+=J[D++]<<K,K+=8}q.lens[Me[q.have++]]=z&7,z>>>=3,K-=3}for(;q.have<19;)q.lens[Me[q.have++]]=0;if(q.lencode=q.lendyn,q.lenbits=7,be={bits:q.lenbits},we=inftrees(CODES,q.lens,0,19,q.lencode,0,q.work,be),q.lenbits=be.bits,we){N.msg="invalid code lengths set",q.mode=BAD;break}q.have=0,q.mode=CODELENS;case CODELENS:for(;q.have<q.nlen+q.ndist;){for(;oe=q.lencode[z&(1<<q.lenbits)-1],se=oe>>>24,fe=oe>>>16&255,ge=oe&65535,!(se<=K);){if(O===0)break e;O--,z+=J[D++]<<K,K+=8}if(ge<16)z>>>=se,K-=se,q.lens[q.have++]=ge;else{if(ge===16){for(Se=se+2;K<Se;){if(O===0)break e;O--,z+=J[D++]<<K,K+=8}if(z>>>=se,K-=se,q.have===0){N.msg="invalid bit length repeat",q.mode=BAD;break}ye=q.lens[q.have-1],ee=3+(z&3),z>>>=2,K-=2}else if(ge===17){for(Se=se+3;K<Se;){if(O===0)break e;O--,z+=J[D++]<<K,K+=8}z>>>=se,K-=se,ye=0,ee=3+(z&7),z>>>=3,K-=3}else{for(Se=se+7;K<Se;){if(O===0)break e;O--,z+=J[D++]<<K,K+=8}z>>>=se,K-=se,ye=0,ee=11+(z&127),z>>>=7,K-=7}if(q.have+ee>q.nlen+q.ndist){N.msg="invalid bit length repeat",q.mode=BAD;break}for(;ee--;)q.lens[q.have++]=ye}}if(q.mode===BAD)break;if(q.lens[256]===0){N.msg="invalid code -- missing end-of-block",q.mode=BAD;break}if(q.lenbits=9,be={bits:q.lenbits},we=inftrees(LENS,q.lens,0,q.nlen,q.lencode,0,q.work,be),q.lenbits=be.bits,we){N.msg="invalid literal/lengths set",q.mode=BAD;break}if(q.distbits=6,q.distcode=q.distdyn,be={bits:q.distbits},we=inftrees(DISTS,q.lens,q.nlen,q.ndist,q.distcode,0,q.work,be),q.distbits=be.bits,we){N.msg="invalid distances set",q.mode=BAD;break}if(q.mode=LEN_,Z===Z_TREES)break e;case LEN_:q.mode=LEN;case LEN:if(O>=6&&F>=258){N.next_out=a,N.avail_out=F,N.next_in=D,N.avail_in=O,q.hold=z,q.bits=K,inffast(N,ne),a=N.next_out,I=N.output,F=N.avail_out,D=N.next_in,J=N.input,O=N.avail_in,z=q.hold,K=q.bits,q.mode===TYPE&&(q.back=-1);break}for(q.back=0;oe=q.lencode[z&(1<<q.lenbits)-1],se=oe>>>24,fe=oe>>>16&255,ge=oe&65535,!(se<=K);){if(O===0)break e;O--,z+=J[D++]<<K,K+=8}if(fe&&(fe&240)===0){for(ue=se,_e=fe,pe=ge;oe=q.lencode[pe+((z&(1<<ue+_e)-1)>>ue)],se=oe>>>24,fe=oe>>>16&255,ge=oe&65535,!(ue+se<=K);){if(O===0)break e;O--,z+=J[D++]<<K,K+=8}z>>>=ue,K-=ue,q.back+=ue}if(z>>>=se,K-=se,q.back+=se,q.length=ge,fe===0){q.mode=LIT;break}if(fe&32){q.back=-1,q.mode=TYPE;break}if(fe&64){N.msg="invalid literal/length code",q.mode=BAD;break}q.extra=fe&15,q.mode=LENEXT;case LENEXT:if(q.extra){for(Se=q.extra;K<Se;){if(O===0)break e;O--,z+=J[D++]<<K,K+=8}q.length+=z&(1<<q.extra)-1,z>>>=q.extra,K-=q.extra,q.back+=q.extra}q.was=q.length,q.mode=DIST;case DIST:for(;oe=q.distcode[z&(1<<q.distbits)-1],se=oe>>>24,fe=oe>>>16&255,ge=oe&65535,!(se<=K);){if(O===0)break e;O--,z+=J[D++]<<K,K+=8}if((fe&240)===0){for(ue=se,_e=fe,pe=ge;oe=q.distcode[pe+((z&(1<<ue+_e)-1)>>ue)],se=oe>>>24,fe=oe>>>16&255,ge=oe&65535,!(ue+se<=K);){if(O===0)break e;O--,z+=J[D++]<<K,K+=8}z>>>=ue,K-=ue,q.back+=ue}if(z>>>=se,K-=se,q.back+=se,fe&64){N.msg="invalid distance code",q.mode=BAD;break}q.offset=ge,q.extra=fe&15,q.mode=DISTEXT;case DISTEXT:if(q.extra){for(Se=q.extra;K<Se;){if(O===0)break e;O--,z+=J[D++]<<K,K+=8}q.offset+=z&(1<<q.extra)-1,z>>>=q.extra,K-=q.extra,q.back+=q.extra}if(q.offset>q.dmax){N.msg="invalid distance too far back",q.mode=BAD;break}q.mode=MATCH;case MATCH:if(F===0)break e;if(ee=ne-F,q.offset>ee){if(ee=q.offset-ee,ee>q.whave&&q.sane){N.msg="invalid distance too far back",q.mode=BAD;break}ee>q.wnext?(ee-=q.wnext,re=q.wsize-ee):re=q.wnext-ee,ee>q.length&&(ee=q.length),ce=q.window}else ce=I,re=a-q.offset,ee=q.length;ee>F&&(ee=F),F-=ee,q.length-=ee;do I[a++]=ce[re++];while(--ee);q.length===0&&(q.mode=LEN);break;case LIT:if(F===0)break e;I[a++]=q.length,F--,q.mode=LEN;break;case CHECK:if(q.wrap){for(;K<32;){if(O===0)break e;O--,z|=J[D++]<<K,K+=8}if(ne-=F,N.total_out+=ne,q.total+=ne,q.wrap&4&&ne&&(N.adler=q.check=q.flags?crc32_1(q.check,I,ne,a-ne):adler32_1(q.check,I,ne,a-ne)),ne=F,q.wrap&4&&(q.flags?z:zswap32(z))!==q.check){N.msg="incorrect data check",q.mode=BAD;break}z=0,K=0}q.mode=LENGTH;case LENGTH:if(q.wrap&&q.flags){for(;K<32;){if(O===0)break e;O--,z+=J[D++]<<K,K+=8}if(q.wrap&4&&z!==(q.total&4294967295)){N.msg="incorrect length check",q.mode=BAD;break}z=0,K=0}q.mode=DONE;case DONE:we=Z_STREAM_END$1;break e;case BAD:we=Z_DATA_ERROR$1;break e;case MEM:return Z_MEM_ERROR$1;case SYNC:default:return Z_STREAM_ERROR$1}return N.next_out=a,N.avail_out=F,N.next_in=D,N.avail_in=O,q.hold=z,q.bits=K,(q.wsize||ne!==N.avail_out&&q.mode<BAD&&(q.mode<CHECK||Z!==Z_FINISH$1))&&updatewindow(N,N.output,N.next_out,ne-N.avail_out),te-=N.avail_in,ne-=N.avail_out,N.total_in+=te,N.total_out+=ne,q.total+=ne,q.wrap&4&&ne&&(N.adler=q.check=q.flags?crc32_1(q.check,I,ne,N.next_out-ne):adler32_1(q.check,I,ne,N.next_out-ne)),N.data_type=q.bits+(q.last?64:0)+(q.mode===TYPE?128:0)+(q.mode===LEN_||q.mode===COPY_?256:0),(te===0&&ne===0||Z===Z_FINISH$1)&&we===Z_OK$1&&(we=Z_BUF_ERROR),we},inflateEnd=N=>{if(inflateStateCheck(N))return Z_STREAM_ERROR$1;let Z=N.state;return Z.window&&(Z.window=null),N.state=null,Z_OK$1},inflateGetHeader=(N,Z)=>{if(inflateStateCheck(N))return Z_STREAM_ERROR$1;const q=N.state;return(q.wrap&2)===0?Z_STREAM_ERROR$1:(q.head=Z,Z.done=!1,Z_OK$1)},inflateSetDictionary=(N,Z)=>{const q=Z.length;let J,I,D;return inflateStateCheck(N)||(J=N.state,J.wrap!==0&&J.mode!==DICT)?Z_STREAM_ERROR$1:J.mode===DICT&&(I=1,I=adler32_1(I,Z,q,0),I!==J.check)?Z_DATA_ERROR$1:(D=updatewindow(N,Z,q,q),D?(J.mode=MEM,Z_MEM_ERROR$1):(J.havedict=1,Z_OK$1))};var inflateReset_1=inflateReset,inflateReset2_1=inflateReset2,inflateResetKeep_1=inflateResetKeep,inflateInit_1=inflateInit,inflateInit2_1=inflateInit2,inflate_2$1=inflate$2,inflateEnd_1=inflateEnd,inflateGetHeader_1=inflateGetHeader,inflateSetDictionary_1=inflateSetDictionary,inflateInfo="pako inflate (from Nodeca project)",inflate_1$2={inflateReset:inflateReset_1,inflateReset2:inflateReset2_1,inflateResetKeep:inflateResetKeep_1,inflateInit:inflateInit_1,inflateInit2:inflateInit2_1,inflate:inflate_2$1,inflateEnd:inflateEnd_1,inflateGetHeader:inflateGetHeader_1,inflateSetDictionary:inflateSetDictionary_1,inflateInfo};function GZheader(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var gzheader=GZheader;const toString=Object.prototype.toString,{Z_NO_FLUSH,Z_FINISH,Z_OK,Z_STREAM_END,Z_NEED_DICT,Z_STREAM_ERROR,Z_DATA_ERROR,Z_MEM_ERROR}=constants$2;function Inflate$1(N){this.options=common.assign({chunkSize:1024*64,windowBits:15,to:""},N||{});const Z=this.options;Z.raw&&Z.windowBits>=0&&Z.windowBits<16&&(Z.windowBits=-Z.windowBits,Z.windowBits===0&&(Z.windowBits=-15)),Z.windowBits>=0&&Z.windowBits<16&&!(N&&N.windowBits)&&(Z.windowBits+=32),Z.windowBits>15&&Z.windowBits<48&&(Z.windowBits&15)===0&&(Z.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zstream,this.strm.avail_out=0;let q=inflate_1$2.inflateInit2(this.strm,Z.windowBits);if(q!==Z_OK)throw new Error(messages[q]);if(this.header=new gzheader,inflate_1$2.inflateGetHeader(this.strm,this.header),Z.dictionary&&(typeof Z.dictionary=="string"?Z.dictionary=strings.string2buf(Z.dictionary):toString.call(Z.dictionary)==="[object ArrayBuffer]"&&(Z.dictionary=new Uint8Array(Z.dictionary)),Z.raw&&(q=inflate_1$2.inflateSetDictionary(this.strm,Z.dictionary),q!==Z_OK)))throw new Error(messages[q])}Inflate$1.prototype.push=function(N,Z){const q=this.strm,J=this.options.chunkSize,I=this.options.dictionary;let D,a,O;if(this.ended)return!1;for(Z===~~Z?a=Z:a=Z===!0?Z_FINISH:Z_NO_FLUSH,toString.call(N)==="[object ArrayBuffer]"?q.input=new Uint8Array(N):q.input=N,q.next_in=0,q.avail_in=q.input.length;;){for(q.avail_out===0&&(q.output=new Uint8Array(J),q.next_out=0,q.avail_out=J),D=inflate_1$2.inflate(q,a),D===Z_NEED_DICT&&I&&(D=inflate_1$2.inflateSetDictionary(q,I),D===Z_OK?D=inflate_1$2.inflate(q,a):D===Z_DATA_ERROR&&(D=Z_NEED_DICT));q.avail_in>0&&D===Z_STREAM_END&&q.state.wrap>0&&N[q.next_in]!==0;)inflate_1$2.inflateReset(q),D=inflate_1$2.inflate(q,a);switch(D){case Z_STREAM_ERROR:case Z_DATA_ERROR:case Z_NEED_DICT:case Z_MEM_ERROR:return this.onEnd(D),this.ended=!0,!1}if(O=q.avail_out,q.next_out&&(q.avail_out===0||D===Z_STREAM_END))if(this.options.to==="string"){let F=strings.utf8border(q.output,q.next_out),z=q.next_out-F,K=strings.buf2string(q.output,F);q.next_out=z,q.avail_out=J-z,z&&q.output.set(q.output.subarray(F,F+z),0),this.onData(K)}else this.onData(q.output.length===q.next_out?q.output:q.output.subarray(0,q.next_out));if(!(D===Z_OK&&O===0)){if(D===Z_STREAM_END)return D=inflate_1$2.inflateEnd(this.strm),this.onEnd(D),this.ended=!0,!0;if(q.avail_in===0)break}}return!0},Inflate$1.prototype.onData=function(N){this.chunks.push(N)},Inflate$1.prototype.onEnd=function(N){N===Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=common.flattenChunks(this.chunks)),this.chunks=[],this.err=N,this.msg=this.strm.msg};function inflate$1(N,Z){const q=new Inflate$1(Z);if(q.push(N),q.err)throw q.msg||messages[q.err];return q.result}function inflateRaw$1(N,Z){return Z=Z||{},Z.raw=!0,inflate$1(N,Z)}var Inflate_1$1=Inflate$1,inflate_2=inflate$1,inflateRaw_1$1=inflateRaw$1,ungzip$1=inflate$1,inflate_1$1={Inflate:Inflate_1$1,inflate:inflate_2,inflateRaw:inflateRaw_1$1,ungzip:ungzip$1};const{Deflate,deflate,deflateRaw,gzip}=deflate_1$1,{Inflate,inflate,inflateRaw,ungzip}=inflate_1$1;var Deflate_1=Deflate,deflate_1=deflate,deflateRaw_1=deflateRaw,gzip_1=gzip,Inflate_1=Inflate,inflate_1=inflate,inflateRaw_1=inflateRaw,ungzip_1=ungzip,constants_1=constants$2,pako={Deflate:Deflate_1,deflate:deflate_1,deflateRaw:deflateRaw_1,gzip:gzip_1,Inflate:Inflate_1,inflate:inflate_1,inflateRaw:inflateRaw_1,ungzip:ungzip_1,constants:constants_1};const noLogEvents=["updateSeverTime"];noLogEvents.push("heartbeat"),noLogEvents.push("heartbeatEx"),noLogEvents.push("networkQualityChange"),noLogEvents.push("onNetQuality"),noLogEvents.push("updateCall"),noLogEvents.push("pubNotify");const compressArrayBuffer=N=>{const Z=new Uint8Array(N),q=pako.deflate(Z,{gzip:!0});return new Uint8Array(q==null?void 0:q.buffer)},decompressArrayBuffer=N=>{const Z=new Uint8Array(N),q=pako.inflate(Z,{gzip:!0});return new Uint8Array(q==null?void 0:q.buffer)},sendMessageFormat=N=>{const{event:Z}=N;switch(N.data_original=N.data,N.time&&(N.timeStr=E$1(N.time,"YYYY-MM-DD hh:mm:ss",{offset:480})),Z){case"login":N.data=com.quick.voice.proto.Login.encode(N.data).finish();break;case"joinRoom":case"joinRoomEx":N.data=com.quick.voice.proto.JoinReq.encode(N.data).finish();break;case"quitRoom":N.data=com.quick.voice.proto.QuitReq.encode(N.data).finish();break;case"connectCF":N.data=com.quick.voice.proto.ConnectCFReq.encode(N.data).finish(),N.data=compressArrayBuffer(N.data),N.compress=!0;break;case"publish":N.data=com.quick.voice.proto.PublishReq.encode(N.data).finish(),N.data=compressArrayBuffer(N.data),N.compress=!0;break;case"pubChannel":N.data=com.quick.voice.proto.ChannelPublishReq.encode(N.data).finish();break;case"subscribe":N.data=com.quick.voice.proto.SubscribeReq.encode(N.data).finish();break;case"subChannel":N.data=com.quick.voice.proto.ChannelSubscribeRsq.encode(N.data).finish();break;case"closeTrack":N.data=com.quick.voice.proto.CloseTrackReq.encode(N.data).finish(),N.data=compressArrayBuffer(N.data),N.compress=!0;break;case"renegotiate":N.data=com.quick.voice.proto.RenegotiateReq.encode(N.data).finish(),N.data=compressArrayBuffer(N.data),N.compress=!0;break;case"syncRoomInfo":N.data=com.quick.voice.proto.SyncRoomInfoReq.encode(N.data).finish();break;case"updateCall":N.data=com.quick.voice.proto.UpdateCall.encode(N.data).finish();break;case"networkQualityChange":N.data=com.quick.voice.proto.NetQualityChange.encode(N.data).finish();break;case"pubNotify":N.data=com.quick.voice.proto.PublishNotify.encode(N.data).finish();break;case"onDataChannelPublish":break;case"preventUsersBehavior":N.data=com.quick.voice.proto.PreventUsersBehaviorReq.encode(N.data).finish();break;default:N.data=new Uint8Array;break}return N},onMessageFormat=N=>{const{event:Z,compress:q=!1}=N;if(N.data_remote=N.data,N.time&&(N.timeStr=E$1(N.time,"YYYY-MM-DD hh:mm:ss",{offset:480})),q)try{N.data=decompressArrayBuffer(N.data)}catch(J){console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo:消息解压错误",J)}switch(Z){case"login":N.data=com.quick.voice.proto.Login.decode(N.data);break;case"joinRoom":case"joinRoomEx":N.data=com.quick.voice.proto.JoinRsp.decode(N.data);break;case"onJoinRoom":N.data=com.quick.voice.proto.JoinNotify.decode(N.data);break;case"onQuitRoom":N.data=com.quick.voice.proto.QuitNotify.decode(N.data);break;case"connectCF":N.data=com.quick.voice.proto.ConnectCFRsp.decode(N.data);break;case"publish":N.data=com.quick.voice.proto.PublishRsp.decode(N.data);break;case"pubChannel":N.data=com.quick.voice.proto.ChannelPublishRsq.decode(N.data);break;case"onPublish":N.data=com.quick.voice.proto.PublishNotify.decode(N.data);break;case"subscribe":N.data=com.quick.voice.proto.SubscribeRsp.decode(N.data);break;case"subChannel":N.data=com.quick.voice.proto.ChannelSubscribeRsq.decode(N.data);break;case"closeTrack":N.data=com.quick.voice.proto.CloseTrackRsp.decode(N.data);break;case"onCloseTrack":N.data=com.quick.voice.proto.CloseTrackNotify.decode(N.data);break;case"onUpdateCall":N.data=com.quick.voice.proto.UpdateCall.decode(N.data);break;case"onDataChannelPublish":N.data=com.quick.voice.proto.UserChannel.decode(N.data);break;case"onDestroyRoom":N.data=com.quick.voice.proto.QuitNotify.decode(N.data);break;case"onUpdatePermissions":N.data=com.quick.voice.proto.UpdatePermissions.decode(N.data);break;case"onNetQuality":N.data=com.quick.voice.proto.NetQualityNotify.decode(N.data);break;case"syncRoomInfo":N.data=com.quick.voice.proto.SyncRoomInfoRsp.decode(N.data);break;case"onCDNPlayUrlAdd":N.data=com.quick.voice.proto.CDNPlayAddressNotify.decode(N.data);break;case"onUpdateBehavior":N.data=com.quick.voice.proto.PreventUsersBehaviorNotify.decode(N.data);break;case"debugger":N.data=JSON.parse(new TextDecoder().decode(N.data));break}return N};class CallsWebSocket{constructor(Z){at(this,bt);at(this,mt,{url:"wss://demo.putplay.cc/websocket",debug:!1,reconnectCount:10,timeout:20*1e3});at(this,qt,"");at(this,Jt,{});at(this,Yt,{});Ee(this,"state","closed");Ee(this,"sendMessageBefore",async()=>{});Ee(this,"onReconnectSuccess",Z=>{});Ee(this,"onReconnectStop",Z=>{});at(this,Dn,Z=>{let q=!0;const{code:J=1e3}=Z;return(J===1e3||J===4e3)&&(q=!1),this.state="connecting",q});at(this,Bn,async Z=>{De(this,mt).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: 重连成功",Z),this.state="connected",this.onReconnectSuccess(Z)});at(this,Nn,async Z=>{De(this,mt).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: 重连停止",Z),this.close(),this.onReconnectStop(Z)});at(this,En,(Z,q={})=>{try{const{time:J,event:I,data:D={},data_original:a={},data_remote:O,...F}=q,z=E$1(J,"YYYY-MM-DD hh:mm:ss",{offset:480});let K={};const te=(ge={})=>{const ue=JSON.parse(JSON.stringify(ge)),_e=Object.keys(ue);for(const pe of _e)(pe.includes("sdp")||pe.includes("Sdp"))&&(ue[pe]="");return ue};let ne="res ↓";switch(Z){case"res":ne="res ↓",K=te(D);break;case"req":ne="req ↑",K=te(a);break}let ee="#quickvo.logs";ignoreEvent.includes(I)&&(ee="#quickvo.ignoreEvents");const re={"#action":ne,timeStr:z,event:I,data:K,time:J,...F},ce=localStorage.getItem(ee)||JSON.stringify([]),oe=JSON.parse(ce);let se=I==="heartbeat";const fe=[re];for(const ge of oe){const{event:ue}=ge;if(ue==="heartbeat"){if(se)continue;se=!0}if(fe.length===200)break;fe.push(ge)}localStorage.setItem(ee,JSON.stringify(fe))}catch(J){De(this,mt).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: updataLogs is error",J)}});at(this,Mn,(Z,{resolve:q,reject:J})=>{const{sn:I=""}=Z,D=()=>{const O=De(this,Jt)[I];clearTimeout(O.destructionTimer),delete De(this,Jt)[I]},a=window.setTimeout(()=>{const O=De(this,Jt)[I];console.warn("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo:event is timeout",O.message),D(),J("event is timeout")},De(this,mt).timeout);De(this,Jt)[I]={message:Z,resolve:q,reject:J,destruction:D,destructionTimer:a}});at(this,qn,Z=>De(this,Jt)[Z]);at(this,Pn,async Z=>{const q=new Uint8Array(Z),J=com.quick.voice.proto.CommonRsp.decode(q),{sn:I,event:D}=J,a=onMessageFormat(J);if(De(this,mt).debug&&(noLogEvents.includes(D)||console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ff0097;padding:16px 0;","------->quickvo: 响应消息↓",a),ignoreEvent.includes(D)||De(this,En).call(this,"res",a)),notifyName_keys.includes(D))return this.emitNotify(D,P(a,["code","data","desc"]));const F=De(this,qn).call(this,I);if(F){const{resolve:z=te=>{},destruction:K=()=>{}}=F;z(P(a,["code","data","desc"])),K()}});Ee(this,"clearEvents",(Z=[])=>{const q=Object.keys(De(this,Jt));Z.length===0&&(Z=q);for(const J of q){if(!Z.includes(J))continue;const I=De(this,Jt)[J];if(I){const{destruction:D}=I;D()}}});Ee(this,"connect",async(Z="")=>new Promise(async q=>{Z&&Ct(this,qt,Z),De(this,bt)&&(await De(this,bt).close(),this.state="closed");const J=`${De(this,mt).url}?s=${De(this,qt)}&t=${Date.now()}`,I=new Date().getTime();if(Ct(this,bt,new M({...De(this,mt),debug:!1,url:J,binaryType:"arraybuffer",onMessage:De(this,Pn),checkReconnect:De(this,Dn),getHeartbeatMsg:()=>"",onReconnectSuccess:De(this,Bn),onReconnectStop:De(this,Nn)})),this.state="connecting",await De(this,bt).connect(),this.state="connected",De(this,mt).debug){const a=new Date().getTime()-I;console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;",`------->quickvo: 连接耗时-${a}ms-广播事件`,De(this,Yt))}q(De(this,bt))}));Ee(this,"close",async()=>{var q;De(this,mt).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: cws is close.");const Z=Object.keys(De(this,Jt));for(const J of Z){const{destructionTimer:I}=De(this,Jt)[J];clearTimeout(I)}Ct(this,Jt,{}),await((q=De(this,bt))==null?void 0:q.close()),this.state="closed"});Ee(this,"sendMessage",(Z,q=!0)=>new Promise(async(J,I)=>{var K;await this.sendMessageBefore();const{event:D,...a}=Z,O=Date.now(),F=sendMessageFormat({event:D,sn:+`${O}${v$1(1e3,9999)}`,time:O,valid:De(this,mt).timeout,version:1,compress:!1,...a});De(this,mt).debug&&(noLogEvents.includes(D)||console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ff9700;padding:16px 0;","------->quickvo: 发送消息↑",F),ignoreEvent.includes(D)||De(this,En).call(this,"req",F)),q&&De(this,Mn).call(this,F,{resolve:J,reject:I});const z=com.quick.voice.proto.CommonReq.encode(F).finish();(K=De(this,bt))==null||K.sendMessage(z)}));Ee(this,"emitNotify",async(Z,q)=>{const J=De(this,Yt)[Z]||[];for(const I of J){const{callback:D=async()=>{}}=I;await D(q)}});Ee(this,"addNotify",(Z,q=!1)=>{const{event:J,sn:I=xt(32)}=Z;De(this,Yt)[J]||(De(this,Yt)[J]=[]);const D=De(this,Yt)[J],a=D.findIndex(O=>O.sn===I);return a!==-1&&D.splice(a,1),q?D.unshift(Z):D.push(Z),I});Ee(this,"removeNotify",(Z=[])=>{if(Z.length===0)Ct(this,Yt,{});else{const q=Object.keys(De(this,Yt));for(const J of q)De(this,Yt)[J]=De(this,Yt)[J].filter(I=>!Z.includes(I.sn||""))}De(this,mt).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: 移除广播事件",De(this,Yt))});Ct(this,mt,{...De(this,mt),...Z})}}bt=new WeakMap,mt=new WeakMap,qt=new WeakMap,Jt=new WeakMap,Yt=new WeakMap,Dn=new WeakMap,Bn=new WeakMap,Nn=new WeakMap,En=new WeakMap,Mn=new WeakMap,qn=new WeakMap,Pn=new WeakMap;/*! For license information please see pikazLocationModule.js.LICENSE.txt */var e$2={782:function(N){N.exports=(()=>{var Z={483:(I,D,a)=>{I.exports=function O(F,z,K){function te(re,ce){if(!z[re]){if(!F[re]){if(ne)return ne(re,!0);var oe=new Error("Cannot find module '"+re+"'");throw oe.code="MODULE_NOT_FOUND",oe}var se=z[re]={exports:{}};F[re][0].call(se.exports,function(fe){return te(F[re][1][fe]||fe)},se,se.exports,O,F,z,K)}return z[re].exports}for(var ne=void 0,ee=0;ee<K.length;ee++)te(K[ee]);return te}({1:[function(O,F,z){(function(K){var te,ne,ee=K.MutationObserver||K.WebKitMutationObserver;if(ee){var re=0,ce=new ee(ge),oe=K.document.createTextNode("");ce.observe(oe,{characterData:!0}),te=function(){oe.data=re=++re%2}}else if(K.setImmediate||K.MessageChannel===void 0)te="document"in K&&"onreadystatechange"in K.document.createElement("script")?function(){var ue=K.document.createElement("script");ue.onreadystatechange=function(){ge(),ue.onreadystatechange=null,ue.parentNode.removeChild(ue),ue=null},K.document.documentElement.appendChild(ue)}:function(){setTimeout(ge,0)};else{var se=new K.MessageChannel;se.port1.onmessage=ge,te=function(){se.port2.postMessage(0)}}var fe=[];function ge(){var ue,_e;ne=!0;for(var pe=fe.length;pe;){for(_e=fe,fe=[],ue=-1;++ue<pe;)_e[ue]();pe=fe.length}ne=!1}F.exports=function(ue){fe.push(ue)!==1||ne||te()}}).call(this,a.g!==void 0?a.g:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(O,F,z){var K=O(1);function te(){}var ne={},ee=["REJECTED"],re=["FULFILLED"],ce=["PENDING"];function oe(pe){if(typeof pe!="function")throw new TypeError("resolver must be a function");this.state=ce,this.queue=[],this.outcome=void 0,pe!==te&&ue(this,pe)}function se(pe,ye,we){this.promise=pe,typeof ye=="function"&&(this.onFulfilled=ye,this.callFulfilled=this.otherCallFulfilled),typeof we=="function"&&(this.onRejected=we,this.callRejected=this.otherCallRejected)}function fe(pe,ye,we){K(function(){var Ie;try{Ie=ye(we)}catch(be){return ne.reject(pe,be)}Ie===pe?ne.reject(pe,new TypeError("Cannot resolve promise with itself")):ne.resolve(pe,Ie)})}function ge(pe){var ye=pe&&pe.then;if(pe&&(typeof pe=="object"||typeof pe=="function")&&typeof ye=="function")return function(){ye.apply(pe,arguments)}}function ue(pe,ye){var we=!1;function Ie(Me){we||(we=!0,ne.reject(pe,Me))}function be(Me){we||(we=!0,ne.resolve(pe,Me))}var Se=_e(function(){ye(be,Ie)});Se.status==="error"&&Ie(Se.value)}function _e(pe,ye){var we={};try{we.value=pe(ye),we.status="success"}catch(Ie){we.status="error",we.value=Ie}return we}F.exports=oe,oe.prototype.catch=function(pe){return this.then(null,pe)},oe.prototype.then=function(pe,ye){if(typeof pe!="function"&&this.state===re||typeof ye!="function"&&this.state===ee)return this;var we=new this.constructor(te);return this.state!==ce?fe(we,this.state===re?pe:ye,this.outcome):this.queue.push(new se(we,pe,ye)),we},se.prototype.callFulfilled=function(pe){ne.resolve(this.promise,pe)},se.prototype.otherCallFulfilled=function(pe){fe(this.promise,this.onFulfilled,pe)},se.prototype.callRejected=function(pe){ne.reject(this.promise,pe)},se.prototype.otherCallRejected=function(pe){fe(this.promise,this.onRejected,pe)},ne.resolve=function(pe,ye){var we=_e(ge,ye);if(we.status==="error")return ne.reject(pe,we.value);var Ie=we.value;if(Ie)ue(pe,Ie);else{pe.state=re,pe.outcome=ye;for(var be=-1,Se=pe.queue.length;++be<Se;)pe.queue[be].callFulfilled(ye)}return pe},ne.reject=function(pe,ye){pe.state=ee,pe.outcome=ye;for(var we=-1,Ie=pe.queue.length;++we<Ie;)pe.queue[we].callRejected(ye);return pe},oe.resolve=function(pe){return pe instanceof this?pe:ne.resolve(new this(te),pe)},oe.reject=function(pe){var ye=new this(te);return ne.reject(ye,pe)},oe.all=function(pe){var ye=this;if(Object.prototype.toString.call(pe)!=="[object Array]")return this.reject(new TypeError("must be an array"));var we=pe.length,Ie=!1;if(!we)return this.resolve([]);for(var be=new Array(we),Se=0,Me=-1,We=new this(te);++Me<we;)Je(pe[Me],Me);return We;function Je(Le,Tt){ye.resolve(Le).then(function(Et){be[Tt]=Et,++Se!==we||Ie||(Ie=!0,ne.resolve(We,be))},function(Et){Ie||(Ie=!0,ne.reject(We,Et))})}},oe.race=function(pe){if(Object.prototype.toString.call(pe)!=="[object Array]")return this.reject(new TypeError("must be an array"));var ye,we=pe.length,Ie=!1;if(!we)return this.resolve([]);for(var be=-1,Se=new this(te);++be<we;)ye=pe[be],this.resolve(ye).then(function(Me){Ie||(Ie=!0,ne.resolve(Se,Me))},function(Me){Ie||(Ie=!0,ne.reject(Se,Me))});return Se}},{1:1}],3:[function(O,F,z){(function(K){typeof K.Promise!="function"&&(K.Promise=O(2))}).call(this,a.g!==void 0?a.g:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(O,F,z){var K=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(le){return typeof le}:function(le){return le&&typeof Symbol=="function"&&le.constructor===Symbol&&le!==Symbol.prototype?"symbol":typeof le},te=function(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}();function ne(le,me){le=le||[],me=me||{};try{return new Blob(le,me)}catch(xe){if(xe.name!=="TypeError")throw xe;for(var ve=new(typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder),Re=0;Re<le.length;Re+=1)ve.append(le[Re]);return ve.getBlob(me.type)}}typeof Promise>"u"&&O(3);var ee=Promise;function re(le,me){me&&le.then(function(ve){me(null,ve)},function(ve){me(ve)})}function ce(le,me,ve){typeof me=="function"&&le.then(me),typeof ve=="function"&&le.catch(ve)}function oe(le){return typeof le!="string"&&(console.warn(le+" used as a key, but it is not a string."),le=String(le)),le}function se(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var fe="local-forage-detect-blob-support",ge=void 0,ue={},_e=Object.prototype.toString,pe="readonly",ye="readwrite";function we(le){for(var me=le.length,ve=new ArrayBuffer(me),Re=new Uint8Array(ve),xe=0;xe<me;xe++)Re[xe]=le.charCodeAt(xe);return ve}function Ie(le){return typeof ge=="boolean"?ee.resolve(ge):function(me){return new ee(function(ve){var Re=me.transaction(fe,ye),xe=ne([""]);Re.objectStore(fe).put(xe,"key"),Re.onabort=function(Ce){Ce.preventDefault(),Ce.stopPropagation(),ve(!1)},Re.oncomplete=function(){var Ce=navigator.userAgent.match(/Chrome\/(\d+)/),qe=navigator.userAgent.match(/Edge\//);ve(qe||!Ce||parseInt(Ce[1],10)>=43)}}).catch(function(){return!1})}(le).then(function(me){return ge=me})}function be(le){var me=ue[le.name],ve={};ve.promise=new ee(function(Re,xe){ve.resolve=Re,ve.reject=xe}),me.deferredOperations.push(ve),me.dbReady?me.dbReady=me.dbReady.then(function(){return ve.promise}):me.dbReady=ve.promise}function Se(le){var me=ue[le.name].deferredOperations.pop();if(me)return me.resolve(),me.promise}function Me(le,me){var ve=ue[le.name].deferredOperations.pop();if(ve)return ve.reject(me),ve.promise}function We(le,me){return new ee(function(ve,Re){if(ue[le.name]=ue[le.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},le.db){if(!me)return ve(le.db);be(le),le.db.close()}var xe=[le.name];me&&xe.push(le.version);var Ce=te.open.apply(te,xe);me&&(Ce.onupgradeneeded=function(qe){var He=Ce.result;try{He.createObjectStore(le.storeName),qe.oldVersion<=1&&He.createObjectStore(fe)}catch(ze){if(ze.name!=="ConstraintError")throw ze;console.warn('The database "'+le.name+'" has been upgraded from version '+qe.oldVersion+" to version "+qe.newVersion+', but the storage "'+le.storeName+'" already exists.')}}),Ce.onerror=function(qe){qe.preventDefault(),Re(Ce.error)},Ce.onsuccess=function(){var qe=Ce.result;qe.onversionchange=function(He){He.target.close()},ve(qe),Se(le)}})}function Je(le){return We(le,!1)}function Le(le){return We(le,!0)}function Tt(le,me){if(!le.db)return!0;var ve=!le.db.objectStoreNames.contains(le.storeName),Re=le.version<le.db.version,xe=le.version>le.db.version;if(Re&&(le.version!==me&&console.warn('The database "'+le.name+`" can't be downgraded from version `+le.db.version+" to version "+le.version+"."),le.version=le.db.version),xe||ve){if(ve){var Ce=le.db.version+1;Ce>le.version&&(le.version=Ce)}return!0}return!1}function Et(le){return ne([we(atob(le.data))],{type:le.type})}function At(le){return le&&le.__local_forage_encoded_blob}function jt(le){var me=this,ve=me._initReady().then(function(){var Re=ue[me._dbInfo.name];if(Re&&Re.dbReady)return Re.dbReady});return ce(ve,le,le),ve}function Pt(le,me,ve,Re){Re===void 0&&(Re=1);try{var xe=le.db.transaction(le.storeName,me);ve(null,xe)}catch(Ce){if(Re>0&&(!le.db||Ce.name==="InvalidStateError"||Ce.name==="NotFoundError"))return ee.resolve().then(function(){if(!le.db||Ce.name==="NotFoundError"&&!le.db.objectStoreNames.contains(le.storeName)&&le.version<=le.db.version)return le.db&&(le.version=le.db.version+1),Le(le)}).then(function(){return function(qe){be(qe);for(var He=ue[qe.name],ze=He.forages,Fe=0;Fe<ze.length;Fe++){var Ve=ze[Fe];Ve._dbInfo.db&&(Ve._dbInfo.db.close(),Ve._dbInfo.db=null)}return qe.db=null,Je(qe).then(function(Ge){return qe.db=Ge,Tt(qe)?Le(qe):Ge}).then(function(Ge){qe.db=He.db=Ge;for(var tt=0;tt<ze.length;tt++)ze[tt]._dbInfo.db=Ge}).catch(function(Ge){throw Me(qe,Ge),Ge})}(le).then(function(){Pt(le,me,ve,Re-1)})}).catch(ve);ve(Ce)}}var _t={_driver:"asyncStorage",_initStorage:function(le){var me=this,ve={db:null};if(le)for(var Re in le)ve[Re]=le[Re];var xe=ue[ve.name];xe||(xe={forages:[],db:null,dbReady:null,deferredOperations:[]},ue[ve.name]=xe),xe.forages.push(me),me._initReady||(me._initReady=me.ready,me.ready=jt);var Ce=[];function qe(){return ee.resolve()}for(var He=0;He<xe.forages.length;He++){var ze=xe.forages[He];ze!==me&&Ce.push(ze._initReady().catch(qe))}var Fe=xe.forages.slice(0);return ee.all(Ce).then(function(){return ve.db=xe.db,Je(ve)}).then(function(Ve){return ve.db=Ve,Tt(ve,me._defaultConfig.version)?Le(ve):Ve}).then(function(Ve){ve.db=xe.db=Ve,me._dbInfo=ve;for(var Ge=0;Ge<Fe.length;Ge++){var tt=Fe[Ge];tt!==me&&(tt._dbInfo.db=ve.db,tt._dbInfo.version=ve.version)}})},_support:function(){try{if(!te||!te.open)return!1;var le=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),me=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!le||me)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}(),iterate:function(le,me){var ve=this,Re=new ee(function(xe,Ce){ve.ready().then(function(){Pt(ve._dbInfo,pe,function(qe,He){if(qe)return Ce(qe);try{var ze=He.objectStore(ve._dbInfo.storeName).openCursor(),Fe=1;ze.onsuccess=function(){var Ve=ze.result;if(Ve){var Ge=Ve.value;At(Ge)&&(Ge=Et(Ge));var tt=le(Ge,Ve.key,Fe++);tt!==void 0?xe(tt):Ve.continue()}else xe()},ze.onerror=function(){Ce(ze.error)}}catch(Ve){Ce(Ve)}})}).catch(Ce)});return re(Re,me),Re},getItem:function(le,me){var ve=this;le=oe(le);var Re=new ee(function(xe,Ce){ve.ready().then(function(){Pt(ve._dbInfo,pe,function(qe,He){if(qe)return Ce(qe);try{var ze=He.objectStore(ve._dbInfo.storeName).get(le);ze.onsuccess=function(){var Fe=ze.result;Fe===void 0&&(Fe=null),At(Fe)&&(Fe=Et(Fe)),xe(Fe)},ze.onerror=function(){Ce(ze.error)}}catch(Fe){Ce(Fe)}})}).catch(Ce)});return re(Re,me),Re},setItem:function(le,me,ve){var Re=this;le=oe(le);var xe=new ee(function(Ce,qe){var He;Re.ready().then(function(){return He=Re._dbInfo,_e.call(me)==="[object Blob]"?Ie(He.db).then(function(ze){return ze?me:(Fe=me,new ee(function(Ve,Ge){var tt=new FileReader;tt.onerror=Ge,tt.onloadend=function(ut){var vt=btoa(ut.target.result||"");Ve({__local_forage_encoded_blob:!0,data:vt,type:Fe.type})},tt.readAsBinaryString(Fe)}));var Fe}):me}).then(function(ze){Pt(Re._dbInfo,ye,function(Fe,Ve){if(Fe)return qe(Fe);try{var Ge=Ve.objectStore(Re._dbInfo.storeName);ze===null&&(ze=void 0);var tt=Ge.put(ze,le);Ve.oncomplete=function(){ze===void 0&&(ze=null),Ce(ze)},Ve.onabort=Ve.onerror=function(){var ut=tt.error?tt.error:tt.transaction.error;qe(ut)}}catch(ut){qe(ut)}})}).catch(qe)});return re(xe,ve),xe},removeItem:function(le,me){var ve=this;le=oe(le);var Re=new ee(function(xe,Ce){ve.ready().then(function(){Pt(ve._dbInfo,ye,function(qe,He){if(qe)return Ce(qe);try{var ze=He.objectStore(ve._dbInfo.storeName).delete(le);He.oncomplete=function(){xe()},He.onerror=function(){Ce(ze.error)},He.onabort=function(){var Fe=ze.error?ze.error:ze.transaction.error;Ce(Fe)}}catch(Fe){Ce(Fe)}})}).catch(Ce)});return re(Re,me),Re},clear:function(le){var me=this,ve=new ee(function(Re,xe){me.ready().then(function(){Pt(me._dbInfo,ye,function(Ce,qe){if(Ce)return xe(Ce);try{var He=qe.objectStore(me._dbInfo.storeName).clear();qe.oncomplete=function(){Re()},qe.onabort=qe.onerror=function(){var ze=He.error?He.error:He.transaction.error;xe(ze)}}catch(ze){xe(ze)}})}).catch(xe)});return re(ve,le),ve},length:function(le){var me=this,ve=new ee(function(Re,xe){me.ready().then(function(){Pt(me._dbInfo,pe,function(Ce,qe){if(Ce)return xe(Ce);try{var He=qe.objectStore(me._dbInfo.storeName).count();He.onsuccess=function(){Re(He.result)},He.onerror=function(){xe(He.error)}}catch(ze){xe(ze)}})}).catch(xe)});return re(ve,le),ve},key:function(le,me){var ve=this,Re=new ee(function(xe,Ce){le<0?xe(null):ve.ready().then(function(){Pt(ve._dbInfo,pe,function(qe,He){if(qe)return Ce(qe);try{var ze=He.objectStore(ve._dbInfo.storeName),Fe=!1,Ve=ze.openKeyCursor();Ve.onsuccess=function(){var Ge=Ve.result;Ge?le===0||Fe?xe(Ge.key):(Fe=!0,Ge.advance(le)):xe(null)},Ve.onerror=function(){Ce(Ve.error)}}catch(Ge){Ce(Ge)}})}).catch(Ce)});return re(Re,me),Re},keys:function(le){var me=this,ve=new ee(function(Re,xe){me.ready().then(function(){Pt(me._dbInfo,pe,function(Ce,qe){if(Ce)return xe(Ce);try{var He=qe.objectStore(me._dbInfo.storeName).openKeyCursor(),ze=[];He.onsuccess=function(){var Fe=He.result;Fe?(ze.push(Fe.key),Fe.continue()):Re(ze)},He.onerror=function(){xe(He.error)}}catch(Fe){xe(Fe)}})}).catch(xe)});return re(ve,le),ve},dropInstance:function(le,me){me=se.apply(this,arguments);var ve=this.config();(le=typeof le!="function"&&le||{}).name||(le.name=le.name||ve.name,le.storeName=le.storeName||ve.storeName);var Re,xe=this;if(le.name){var Ce=le.name===ve.name&&xe._dbInfo.db?ee.resolve(xe._dbInfo.db):Je(le).then(function(qe){var He=ue[le.name],ze=He.forages;He.db=qe;for(var Fe=0;Fe<ze.length;Fe++)ze[Fe]._dbInfo.db=qe;return qe});Re=le.storeName?Ce.then(function(qe){if(qe.objectStoreNames.contains(le.storeName)){var He=qe.version+1;be(le);var ze=ue[le.name],Fe=ze.forages;qe.close();for(var Ve=0;Ve<Fe.length;Ve++){var Ge=Fe[Ve];Ge._dbInfo.db=null,Ge._dbInfo.version=He}var tt=new ee(function(ut,vt){var Mt=te.open(le.name,He);Mt.onerror=function(on){Mt.result.close(),vt(on)},Mt.onupgradeneeded=function(){Mt.result.deleteObjectStore(le.storeName)},Mt.onsuccess=function(){var on=Mt.result;on.close(),ut(on)}});return tt.then(function(ut){ze.db=ut;for(var vt=0;vt<Fe.length;vt++){var Mt=Fe[vt];Mt._dbInfo.db=ut,Se(Mt._dbInfo)}}).catch(function(ut){throw(Me(le,ut)||ee.resolve()).catch(function(){}),ut})}}):Ce.then(function(qe){be(le);var He=ue[le.name],ze=He.forages;qe.close();for(var Fe=0;Fe<ze.length;Fe++)ze[Fe]._dbInfo.db=null;var Ve=new ee(function(Ge,tt){var ut=te.deleteDatabase(le.name);ut.onerror=function(){var vt=ut.result;vt&&vt.close(),tt(ut.error)},ut.onblocked=function(){console.warn('dropInstance blocked for database "'+le.name+'" until all open connections are closed')},ut.onsuccess=function(){var vt=ut.result;vt&&vt.close(),Ge(vt)}});return Ve.then(function(Ge){He.db=Ge;for(var tt=0;tt<ze.length;tt++)Se(ze[tt]._dbInfo)}).catch(function(Ge){throw(Me(le,Ge)||ee.resolve()).catch(function(){}),Ge})})}else Re=ee.reject("Invalid arguments");return re(Re,me),Re}},rt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Vt=/^~~local_forage_type~([^~]+)~/,Rt="__lfsc__:",Pe=Rt.length,it="arbf",zt="blob",Bt="si08",nt="ui08",et="uic8",ot="si16",st="si32",gt="ur16",Dt="ui32",Ut="fl32",Lt="fl64",Zt=Pe+it.length,Kt=Object.prototype.toString;function fn(le){var me,ve,Re,xe,Ce,qe=.75*le.length,He=le.length,ze=0;le[le.length-1]==="="&&(qe--,le[le.length-2]==="="&&qe--);var Fe=new ArrayBuffer(qe),Ve=new Uint8Array(Fe);for(me=0;me<He;me+=4)ve=rt.indexOf(le[me]),Re=rt.indexOf(le[me+1]),xe=rt.indexOf(le[me+2]),Ce=rt.indexOf(le[me+3]),Ve[ze++]=ve<<2|Re>>4,Ve[ze++]=(15&Re)<<4|xe>>2,Ve[ze++]=(3&xe)<<6|63&Ce;return Fe}function tn(le){var me,ve=new Uint8Array(le),Re="";for(me=0;me<ve.length;me+=3)Re+=rt[ve[me]>>2],Re+=rt[(3&ve[me])<<4|ve[me+1]>>4],Re+=rt[(15&ve[me+1])<<2|ve[me+2]>>6],Re+=rt[63&ve[me+2]];return ve.length%3==2?Re=Re.substring(0,Re.length-1)+"=":ve.length%3==1&&(Re=Re.substring(0,Re.length-2)+"=="),Re}var nn={serialize:function(le,me){var ve="";if(le&&(ve=Kt.call(le)),le&&(ve==="[object ArrayBuffer]"||le.buffer&&Kt.call(le.buffer)==="[object ArrayBuffer]")){var Re,xe=Rt;le instanceof ArrayBuffer?(Re=le,xe+=it):(Re=le.buffer,ve==="[object Int8Array]"?xe+=Bt:ve==="[object Uint8Array]"?xe+=nt:ve==="[object Uint8ClampedArray]"?xe+=et:ve==="[object Int16Array]"?xe+=ot:ve==="[object Uint16Array]"?xe+=gt:ve==="[object Int32Array]"?xe+=st:ve==="[object Uint32Array]"?xe+=Dt:ve==="[object Float32Array]"?xe+=Ut:ve==="[object Float64Array]"?xe+=Lt:me(new Error("Failed to get type for BinaryArray"))),me(xe+tn(Re))}else if(ve==="[object Blob]"){var Ce=new FileReader;Ce.onload=function(){var qe="~~local_forage_type~"+le.type+"~"+tn(this.result);me("__lfsc__:blob"+qe)},Ce.readAsArrayBuffer(le)}else try{me(JSON.stringify(le))}catch(qe){console.error("Couldn't convert value into a JSON string: ",le),me(null,qe)}},deserialize:function(le){if(le.substring(0,Pe)!==Rt)return JSON.parse(le);var me,ve=le.substring(Zt),Re=le.substring(Pe,Zt);if(Re===zt&&Vt.test(ve)){var xe=ve.match(Vt);me=xe[1],ve=ve.substring(xe[0].length)}var Ce=fn(ve);switch(Re){case it:return Ce;case zt:return ne([Ce],{type:me});case Bt:return new Int8Array(Ce);case nt:return new Uint8Array(Ce);case et:return new Uint8ClampedArray(Ce);case ot:return new Int16Array(Ce);case gt:return new Uint16Array(Ce);case st:return new Int32Array(Ce);case Dt:return new Uint32Array(Ce);case Ut:return new Float32Array(Ce);case Lt:return new Float64Array(Ce);default:throw new Error("Unkown type: "+Re)}},stringToBuffer:fn,bufferToString:tn};function Wt(le,me,ve,Re){le.executeSql("CREATE TABLE IF NOT EXISTS "+me.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],ve,Re)}function Gt(le,me,ve,Re,xe,Ce){le.executeSql(ve,Re,xe,function(qe,He){He.code===He.SYNTAX_ERR?qe.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[me.storeName],function(ze,Fe){Fe.rows.length?Ce(ze,He):Wt(ze,me,function(){ze.executeSql(ve,Re,xe,Ce)},Ce)},Ce):Ce(qe,He)},Ce)}function _n(le,me,ve,Re){var xe=this;le=oe(le);var Ce=new ee(function(qe,He){xe.ready().then(function(){me===void 0&&(me=null);var ze=me,Fe=xe._dbInfo;Fe.serializer.serialize(me,function(Ve,Ge){Ge?He(Ge):Fe.db.transaction(function(tt){Gt(tt,Fe,"INSERT OR REPLACE INTO "+Fe.storeName+" (key, value) VALUES (?, ?)",[le,Ve],function(){qe(ze)},function(ut,vt){He(vt)})},function(tt){if(tt.code===tt.QUOTA_ERR){if(Re>0)return void qe(_n.apply(xe,[le,ze,ve,Re-1]));He(tt)}})})}).catch(He)});return re(Ce,ve),Ce}function rn(le){return new ee(function(me,ve){le.transaction(function(Re){Re.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(xe,Ce){for(var qe=[],He=0;He<Ce.rows.length;He++)qe.push(Ce.rows.item(He).name);me({db:le,storeNames:qe})},function(xe,Ce){ve(Ce)})},function(Re){ve(Re)})})}var Qt={_driver:"webSQLStorage",_initStorage:function(le){var me=this,ve={db:null};if(le)for(var Re in le)ve[Re]=typeof le[Re]!="string"?le[Re].toString():le[Re];var xe=new ee(function(Ce,qe){try{ve.db=openDatabase(ve.name,String(ve.version),ve.description,ve.size)}catch(He){return qe(He)}ve.db.transaction(function(He){Wt(He,ve,function(){me._dbInfo=ve,Ce()},function(ze,Fe){qe(Fe)})},qe)});return ve.serializer=nn,xe},_support:typeof openDatabase=="function",iterate:function(le,me){var ve=this,Re=new ee(function(xe,Ce){ve.ready().then(function(){var qe=ve._dbInfo;qe.db.transaction(function(He){Gt(He,qe,"SELECT * FROM "+qe.storeName,[],function(ze,Fe){for(var Ve=Fe.rows,Ge=Ve.length,tt=0;tt<Ge;tt++){var ut=Ve.item(tt),vt=ut.value;if(vt&&(vt=qe.serializer.deserialize(vt)),(vt=le(vt,ut.key,tt+1))!==void 0)return void xe(vt)}xe()},function(ze,Fe){Ce(Fe)})})}).catch(Ce)});return re(Re,me),Re},getItem:function(le,me){var ve=this;le=oe(le);var Re=new ee(function(xe,Ce){ve.ready().then(function(){var qe=ve._dbInfo;qe.db.transaction(function(He){Gt(He,qe,"SELECT * FROM "+qe.storeName+" WHERE key = ? LIMIT 1",[le],function(ze,Fe){var Ve=Fe.rows.length?Fe.rows.item(0).value:null;Ve&&(Ve=qe.serializer.deserialize(Ve)),xe(Ve)},function(ze,Fe){Ce(Fe)})})}).catch(Ce)});return re(Re,me),Re},setItem:function(le,me,ve){return _n.apply(this,[le,me,ve,1])},removeItem:function(le,me){var ve=this;le=oe(le);var Re=new ee(function(xe,Ce){ve.ready().then(function(){var qe=ve._dbInfo;qe.db.transaction(function(He){Gt(He,qe,"DELETE FROM "+qe.storeName+" WHERE key = ?",[le],function(){xe()},function(ze,Fe){Ce(Fe)})})}).catch(Ce)});return re(Re,me),Re},clear:function(le){var me=this,ve=new ee(function(Re,xe){me.ready().then(function(){var Ce=me._dbInfo;Ce.db.transaction(function(qe){Gt(qe,Ce,"DELETE FROM "+Ce.storeName,[],function(){Re()},function(He,ze){xe(ze)})})}).catch(xe)});return re(ve,le),ve},length:function(le){var me=this,ve=new ee(function(Re,xe){me.ready().then(function(){var Ce=me._dbInfo;Ce.db.transaction(function(qe){Gt(qe,Ce,"SELECT COUNT(key) as c FROM "+Ce.storeName,[],function(He,ze){var Fe=ze.rows.item(0).c;Re(Fe)},function(He,ze){xe(ze)})})}).catch(xe)});return re(ve,le),ve},key:function(le,me){var ve=this,Re=new ee(function(xe,Ce){ve.ready().then(function(){var qe=ve._dbInfo;qe.db.transaction(function(He){Gt(He,qe,"SELECT key FROM "+qe.storeName+" WHERE id = ? LIMIT 1",[le+1],function(ze,Fe){var Ve=Fe.rows.length?Fe.rows.item(0).key:null;xe(Ve)},function(ze,Fe){Ce(Fe)})})}).catch(Ce)});return re(Re,me),Re},keys:function(le){var me=this,ve=new ee(function(Re,xe){me.ready().then(function(){var Ce=me._dbInfo;Ce.db.transaction(function(qe){Gt(qe,Ce,"SELECT key FROM "+Ce.storeName,[],function(He,ze){for(var Fe=[],Ve=0;Ve<ze.rows.length;Ve++)Fe.push(ze.rows.item(Ve).key);Re(Fe)},function(He,ze){xe(ze)})})}).catch(xe)});return re(ve,le),ve},dropInstance:function(le,me){me=se.apply(this,arguments);var ve=this.config();(le=typeof le!="function"&&le||{}).name||(le.name=le.name||ve.name,le.storeName=le.storeName||ve.storeName);var Re,xe=this;return re(Re=le.name?new ee(function(Ce){var qe;qe=le.name===ve.name?xe._dbInfo.db:openDatabase(le.name,"","",0),le.storeName?Ce({db:qe,storeNames:[le.storeName]}):Ce(rn(qe))}).then(function(Ce){return new ee(function(qe,He){Ce.db.transaction(function(ze){function Fe(ut){return new ee(function(vt,Mt){ze.executeSql("DROP TABLE IF EXISTS "+ut,[],function(){vt()},function(on,gn){Mt(gn)})})}for(var Ve=[],Ge=0,tt=Ce.storeNames.length;Ge<tt;Ge++)Ve.push(Fe(Ce.storeNames[Ge]));ee.all(Ve).then(function(){qe()}).catch(function(ut){He(ut)})},function(ze){He(ze)})})}):ee.reject("Invalid arguments"),me),Re}};function ae(le,me){var ve=le.name+"/";return le.storeName!==me.storeName&&(ve+=le.storeName+"/"),ve}var Q={_driver:"localStorageWrapper",_initStorage:function(le){var me={};if(le)for(var ve in le)me[ve]=le[ve];return me.keyPrefix=ae(le,this._defaultConfig),!function(){var Re="_localforage_support_test";try{return localStorage.setItem(Re,!0),localStorage.removeItem(Re),!1}catch{return!0}}()||localStorage.length>0?(this._dbInfo=me,me.serializer=nn,ee.resolve()):ee.reject()},_support:function(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}(),iterate:function(le,me){var ve=this,Re=ve.ready().then(function(){for(var xe=ve._dbInfo,Ce=xe.keyPrefix,qe=Ce.length,He=localStorage.length,ze=1,Fe=0;Fe<He;Fe++){var Ve=localStorage.key(Fe);if(Ve.indexOf(Ce)===0){var Ge=localStorage.getItem(Ve);if(Ge&&(Ge=xe.serializer.deserialize(Ge)),(Ge=le(Ge,Ve.substring(qe),ze++))!==void 0)return Ge}}});return re(Re,me),Re},getItem:function(le,me){var ve=this;le=oe(le);var Re=ve.ready().then(function(){var xe=ve._dbInfo,Ce=localStorage.getItem(xe.keyPrefix+le);return Ce&&(Ce=xe.serializer.deserialize(Ce)),Ce});return re(Re,me),Re},setItem:function(le,me,ve){var Re=this;le=oe(le);var xe=Re.ready().then(function(){me===void 0&&(me=null);var Ce=me;return new ee(function(qe,He){var ze=Re._dbInfo;ze.serializer.serialize(me,function(Fe,Ve){if(Ve)He(Ve);else try{localStorage.setItem(ze.keyPrefix+le,Fe),qe(Ce)}catch(Ge){Ge.name!=="QuotaExceededError"&&Ge.name!=="NS_ERROR_DOM_QUOTA_REACHED"||He(Ge),He(Ge)}})})});return re(xe,ve),xe},removeItem:function(le,me){var ve=this;le=oe(le);var Re=ve.ready().then(function(){var xe=ve._dbInfo;localStorage.removeItem(xe.keyPrefix+le)});return re(Re,me),Re},clear:function(le){var me=this,ve=me.ready().then(function(){for(var Re=me._dbInfo.keyPrefix,xe=localStorage.length-1;xe>=0;xe--){var Ce=localStorage.key(xe);Ce.indexOf(Re)===0&&localStorage.removeItem(Ce)}});return re(ve,le),ve},length:function(le){var me=this.keys().then(function(ve){return ve.length});return re(me,le),me},key:function(le,me){var ve=this,Re=ve.ready().then(function(){var xe,Ce=ve._dbInfo;try{xe=localStorage.key(le)}catch{xe=null}return xe&&(xe=xe.substring(Ce.keyPrefix.length)),xe});return re(Re,me),Re},keys:function(le){var me=this,ve=me.ready().then(function(){for(var Re=me._dbInfo,xe=localStorage.length,Ce=[],qe=0;qe<xe;qe++){var He=localStorage.key(qe);He.indexOf(Re.keyPrefix)===0&&Ce.push(He.substring(Re.keyPrefix.length))}return Ce});return re(ve,le),ve},dropInstance:function(le,me){if(me=se.apply(this,arguments),!(le=typeof le!="function"&&le||{}).name){var ve=this.config();le.name=le.name||ve.name,le.storeName=le.storeName||ve.storeName}var Re,xe=this;return Re=le.name?new ee(function(Ce){le.storeName?Ce(ae(le,xe._defaultConfig)):Ce(le.name+"/")}).then(function(Ce){for(var qe=localStorage.length-1;qe>=0;qe--){var He=localStorage.key(qe);He.indexOf(Ce)===0&&localStorage.removeItem(He)}}):ee.reject("Invalid arguments"),re(Re,me),Re}},X=function(le,me){for(var ve=le.length,Re=0;Re<ve;){if((xe=le[Re])===(Ce=me)||typeof xe=="number"&&typeof Ce=="number"&&isNaN(xe)&&isNaN(Ce))return!0;Re++}var xe,Ce;return!1},he=Array.isArray||function(le){return Object.prototype.toString.call(le)==="[object Array]"},Te={},$e={},Ue={INDEXEDDB:_t,WEBSQL:Qt,LOCALSTORAGE:Q},ct=[Ue.INDEXEDDB._driver,Ue.WEBSQL._driver,Ue.LOCALSTORAGE._driver],kt=["dropInstance"],yt=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(kt),It={description:"",driver:ct.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function St(le,me){le[me]=function(){var ve=arguments;return le.ready().then(function(){return le[me].apply(le,ve)})}}function dn(){for(var le=1;le<arguments.length;le++){var me=arguments[le];if(me)for(var ve in me)me.hasOwnProperty(ve)&&(he(me[ve])?arguments[0][ve]=me[ve].slice():arguments[0][ve]=me[ve])}return arguments[0]}var Qn=function(){function le(me){for(var ve in function(Ce,qe){if(!(Ce instanceof qe))throw new TypeError("Cannot call a class as a function")}(this,le),Ue)if(Ue.hasOwnProperty(ve)){var Re=Ue[ve],xe=Re._driver;this[ve]=xe,Te[xe]||this.defineDriver(Re)}this._defaultConfig=dn({},It),this._config=dn({},this._defaultConfig,me),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return le.prototype.config=function(me){if((me===void 0?"undefined":K(me))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var ve in me){if(ve==="storeName"&&(me[ve]=me[ve].replace(/\W/g,"_")),ve==="version"&&typeof me[ve]!="number")return new Error("Database version must be a number.");this._config[ve]=me[ve]}return!("driver"in me)||!me.driver||this.setDriver(this._config.driver)}return typeof me=="string"?this._config[me]:this._config},le.prototype.defineDriver=function(me,ve,Re){var xe=new ee(function(Ce,qe){try{var He=me._driver,ze=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!me._driver)return void qe(ze);for(var Fe=yt.concat("_initStorage"),Ve=0,Ge=Fe.length;Ve<Ge;Ve++){var tt=Fe[Ve];if((!X(kt,tt)||me[tt])&&typeof me[tt]!="function")return void qe(ze)}(function(){for(var vt=function($n){return function(){var Yn=new Error("Method "+$n+" is not implemented by the current driver"),Nt=ee.reject(Yn);return re(Nt,arguments[arguments.length-1]),Nt}},Mt=0,on=kt.length;Mt<on;Mt++){var gn=kt[Mt];me[gn]||(me[gn]=vt(gn))}})();var ut=function(vt){Te[He]&&console.info("Redefining LocalForage driver: "+He),Te[He]=me,$e[He]=vt,Ce()};"_support"in me?me._support&&typeof me._support=="function"?me._support().then(ut,qe):ut(!!me._support):ut(!0)}catch(vt){qe(vt)}});return ce(xe,ve,Re),xe},le.prototype.driver=function(){return this._driver||null},le.prototype.getDriver=function(me,ve,Re){var xe=Te[me]?ee.resolve(Te[me]):ee.reject(new Error("Driver not found."));return ce(xe,ve,Re),xe},le.prototype.getSerializer=function(me){var ve=ee.resolve(nn);return ce(ve,me),ve},le.prototype.ready=function(me){var ve=this,Re=ve._driverSet.then(function(){return ve._ready===null&&(ve._ready=ve._initDriver()),ve._ready});return ce(Re,me,me),Re},le.prototype.setDriver=function(me,ve,Re){var xe=this;he(me)||(me=[me]);var Ce=this._getSupportedDrivers(me);function qe(){xe._config.driver=xe.driver()}function He(Fe){return xe._extend(Fe),qe(),xe._ready=xe._initStorage(xe._config),xe._ready}var ze=this._driverSet!==null?this._driverSet.catch(function(){return ee.resolve()}):ee.resolve();return this._driverSet=ze.then(function(){var Fe=Ce[0];return xe._dbInfo=null,xe._ready=null,xe.getDriver(Fe).then(function(Ve){xe._driver=Ve._driver,qe(),xe._wrapLibraryMethodsWithReady(),xe._initDriver=function(Ge){return function(){var tt=0;return function ut(){for(;tt<Ge.length;){var vt=Ge[tt];return tt++,xe._dbInfo=null,xe._ready=null,xe.getDriver(vt).then(He).catch(ut)}qe();var Mt=new Error("No available storage method found.");return xe._driverSet=ee.reject(Mt),xe._driverSet}()}}(Ce)})}).catch(function(){qe();var Fe=new Error("No available storage method found.");return xe._driverSet=ee.reject(Fe),xe._driverSet}),ce(this._driverSet,ve,Re),this._driverSet},le.prototype.supports=function(me){return!!$e[me]},le.prototype._extend=function(me){dn(this,me)},le.prototype._getSupportedDrivers=function(me){for(var ve=[],Re=0,xe=me.length;Re<xe;Re++){var Ce=me[Re];this.supports(Ce)&&ve.push(Ce)}return ve},le.prototype._wrapLibraryMethodsWithReady=function(){for(var me=0,ve=yt.length;me<ve;me++)St(this,yt[me])},le.prototype.createInstance=function(me){return new le(me)},le}(),Gn=new Qn;F.exports=Gn},{3:3}]},{},[4])(4)},961:(I,D,a)=>{var O,F=function(){var z=String.fromCharCode,K="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",ne={};function ee(ce,oe){if(!ne[ce]){ne[ce]={};for(var se=0;se<ce.length;se++)ne[ce][ce.charAt(se)]=se}return ne[ce][oe]}var re={compressToBase64:function(ce){if(ce==null)return"";var oe=re._compress(ce,6,function(se){return K.charAt(se)});switch(oe.length%4){default:case 0:return oe;case 1:return oe+"===";case 2:return oe+"==";case 3:return oe+"="}},decompressFromBase64:function(ce){return ce==null?"":ce==""?null:re._decompress(ce.length,32,function(oe){return ee(K,ce.charAt(oe))})},compressToUTF16:function(ce){return ce==null?"":re._compress(ce,15,function(oe){return z(oe+32)})+" "},decompressFromUTF16:function(ce){return ce==null?"":ce==""?null:re._decompress(ce.length,16384,function(oe){return ce.charCodeAt(oe)-32})},compressToUint8Array:function(ce){for(var oe=re.compress(ce),se=new Uint8Array(2*oe.length),fe=0,ge=oe.length;fe<ge;fe++){var ue=oe.charCodeAt(fe);se[2*fe]=ue>>>8,se[2*fe+1]=ue%256}return se},decompressFromUint8Array:function(ce){if(ce==null)return re.decompress(ce);for(var oe=new Array(ce.length/2),se=0,fe=oe.length;se<fe;se++)oe[se]=256*ce[2*se]+ce[2*se+1];var ge=[];return oe.forEach(function(ue){ge.push(z(ue))}),re.decompress(ge.join(""))},compressToEncodedURIComponent:function(ce){return ce==null?"":re._compress(ce,6,function(oe){return te.charAt(oe)})},decompressFromEncodedURIComponent:function(ce){return ce==null?"":ce==""?null:(ce=ce.replace(/ /g,"+"),re._decompress(ce.length,32,function(oe){return ee(te,ce.charAt(oe))}))},compress:function(ce){return re._compress(ce,16,function(oe){return z(oe)})},_compress:function(ce,oe,se){if(ce==null)return"";var fe,ge,ue,_e={},pe={},ye="",we="",Ie="",be=2,Se=3,Me=2,We=[],Je=0,Le=0;for(ue=0;ue<ce.length;ue+=1)if(ye=ce.charAt(ue),Object.prototype.hasOwnProperty.call(_e,ye)||(_e[ye]=Se++,pe[ye]=!0),we=Ie+ye,Object.prototype.hasOwnProperty.call(_e,we))Ie=we;else{if(Object.prototype.hasOwnProperty.call(pe,Ie)){if(Ie.charCodeAt(0)<256){for(fe=0;fe<Me;fe++)Je<<=1,Le==oe-1?(Le=0,We.push(se(Je)),Je=0):Le++;for(ge=Ie.charCodeAt(0),fe=0;fe<8;fe++)Je=Je<<1|1&ge,Le==oe-1?(Le=0,We.push(se(Je)),Je=0):Le++,ge>>=1}else{for(ge=1,fe=0;fe<Me;fe++)Je=Je<<1|ge,Le==oe-1?(Le=0,We.push(se(Je)),Je=0):Le++,ge=0;for(ge=Ie.charCodeAt(0),fe=0;fe<16;fe++)Je=Je<<1|1&ge,Le==oe-1?(Le=0,We.push(se(Je)),Je=0):Le++,ge>>=1}--be==0&&(be=Math.pow(2,Me),Me++),delete pe[Ie]}else for(ge=_e[Ie],fe=0;fe<Me;fe++)Je=Je<<1|1&ge,Le==oe-1?(Le=0,We.push(se(Je)),Je=0):Le++,ge>>=1;--be==0&&(be=Math.pow(2,Me),Me++),_e[we]=Se++,Ie=String(ye)}if(Ie!==""){if(Object.prototype.hasOwnProperty.call(pe,Ie)){if(Ie.charCodeAt(0)<256){for(fe=0;fe<Me;fe++)Je<<=1,Le==oe-1?(Le=0,We.push(se(Je)),Je=0):Le++;for(ge=Ie.charCodeAt(0),fe=0;fe<8;fe++)Je=Je<<1|1&ge,Le==oe-1?(Le=0,We.push(se(Je)),Je=0):Le++,ge>>=1}else{for(ge=1,fe=0;fe<Me;fe++)Je=Je<<1|ge,Le==oe-1?(Le=0,We.push(se(Je)),Je=0):Le++,ge=0;for(ge=Ie.charCodeAt(0),fe=0;fe<16;fe++)Je=Je<<1|1&ge,Le==oe-1?(Le=0,We.push(se(Je)),Je=0):Le++,ge>>=1}--be==0&&(be=Math.pow(2,Me),Me++),delete pe[Ie]}else for(ge=_e[Ie],fe=0;fe<Me;fe++)Je=Je<<1|1&ge,Le==oe-1?(Le=0,We.push(se(Je)),Je=0):Le++,ge>>=1;--be==0&&(be=Math.pow(2,Me),Me++)}for(ge=2,fe=0;fe<Me;fe++)Je=Je<<1|1&ge,Le==oe-1?(Le=0,We.push(se(Je)),Je=0):Le++,ge>>=1;for(;;){if(Je<<=1,Le==oe-1){We.push(se(Je));break}Le++}return We.join("")},decompress:function(ce){return ce==null?"":ce==""?null:re._decompress(ce.length,32768,function(oe){return ce.charCodeAt(oe)})},_decompress:function(ce,oe,se){var fe,ge,ue,_e,pe,ye,we,Ie=[],be=4,Se=4,Me=3,We="",Je=[],Le={val:se(0),position:oe,index:1};for(fe=0;fe<3;fe+=1)Ie[fe]=fe;for(ue=0,pe=Math.pow(2,2),ye=1;ye!=pe;)_e=Le.val&Le.position,Le.position>>=1,Le.position==0&&(Le.position=oe,Le.val=se(Le.index++)),ue|=(_e>0?1:0)*ye,ye<<=1;switch(ue){case 0:for(ue=0,pe=Math.pow(2,8),ye=1;ye!=pe;)_e=Le.val&Le.position,Le.position>>=1,Le.position==0&&(Le.position=oe,Le.val=se(Le.index++)),ue|=(_e>0?1:0)*ye,ye<<=1;we=z(ue);break;case 1:for(ue=0,pe=Math.pow(2,16),ye=1;ye!=pe;)_e=Le.val&Le.position,Le.position>>=1,Le.position==0&&(Le.position=oe,Le.val=se(Le.index++)),ue|=(_e>0?1:0)*ye,ye<<=1;we=z(ue);break;case 2:return""}for(Ie[3]=we,ge=we,Je.push(we);;){if(Le.index>ce)return"";for(ue=0,pe=Math.pow(2,Me),ye=1;ye!=pe;)_e=Le.val&Le.position,Le.position>>=1,Le.position==0&&(Le.position=oe,Le.val=se(Le.index++)),ue|=(_e>0?1:0)*ye,ye<<=1;switch(we=ue){case 0:for(ue=0,pe=Math.pow(2,8),ye=1;ye!=pe;)_e=Le.val&Le.position,Le.position>>=1,Le.position==0&&(Le.position=oe,Le.val=se(Le.index++)),ue|=(_e>0?1:0)*ye,ye<<=1;Ie[Se++]=z(ue),we=Se-1,be--;break;case 1:for(ue=0,pe=Math.pow(2,16),ye=1;ye!=pe;)_e=Le.val&Le.position,Le.position>>=1,Le.position==0&&(Le.position=oe,Le.val=se(Le.index++)),ue|=(_e>0?1:0)*ye,ye<<=1;Ie[Se++]=z(ue),we=Se-1,be--;break;case 2:return Je.join("")}if(be==0&&(be=Math.pow(2,Me),Me++),Ie[we])We=Ie[we];else{if(we!==Se)return null;We=ge+ge.charAt(0)}Je.push(We),Ie[Se++]=ge+We.charAt(0),ge=We,--be==0&&(be=Math.pow(2,Me),Me++)}}};return re}();(O=(function(){return F}).call(D,a,D,I))===void 0||(I.exports=O)},895:I=>{I.exports=function(D,a,O,F){var z=D[0],K=D[1],te=!1;O===void 0&&(O=0),F===void 0&&(F=a.length);for(var ne=(F-O)/2,ee=0,re=ne-1;ee<ne;re=ee++){var ce=a[O+2*ee+0],oe=a[O+2*ee+1],se=a[O+2*re+0],fe=a[O+2*re+1];oe>K!=fe>K&&z<(se-ce)*(K-oe)/(fe-oe)+ce&&(te=!te)}return te}},946:(I,D,a)=>{const O=a(909),F=async()=>await O.get({dir:"areaList",file:"index"}),z=({name:re,list:ce})=>{let oe=re;const se=ce.find(ge=>oe.indexOf(ge.name)!==-1);if(se){const ge=se.name.length;return oe=oe.slice(ge,re.length),{id:se.id,name:oe,children:se.children}}const fe=ce.find(ge=>oe.indexOf(ge.shortName)!==-1);if(fe){const ge=fe.shortName.length;return oe=oe.slice(ge,re.length),{id:fe.id,name:oe,children:fe.children}}return null},K=async(re="",ce)=>{let oe=re;const se={province:"",city:"",district:""};let fe=ce;ce||(fe=await F());const ge=z({name:oe,list:fe});if(ge){oe=ge.name,se.province=ge.id;const pe=ge.children,ye=z({name:oe,list:pe});if(ye){oe=ye.name,se.city=ye.id;const be=z({name:oe,list:ye.children});return be&&(oe=be.name,se.district=be.id),se}const we=pe.reduce((be,Se)=>Se.children?be.concat(Se.children):be,[]),Ie=z({name:oe,list:we});return Ie&&(oe=Ie.name,se.district=Ie.id),se}const ue=fe.reduce((pe,ye)=>ye.children?pe.concat(ye.children):pe,[]),_e=z({name:oe,list:ue});if(_e){oe=_e.name,se.city=_e.id;const pe=z({name:oe,list:_e.children});pe&&(oe=pe.name,se.district=pe.id)}return se},te=async(re={})=>{let{code:ce}={...re};ce=typeof ce=="string"?ce:ce.toString();const oe={province:"",provinceCode:"",city:"",cityCode:"",district:"",districtCode:"",code:ce,address:""};if((await F()).every(se=>se.id===ce?(oe.province=se.name,oe.provinceCode=se.id,!1):!se.children||se.children.every(fe=>fe.id===ce?(oe.province=se.name,oe.provinceCode=se.id,oe.city=fe.name,oe.cityCode=fe.id,!1):!fe.children||fe.children.every(ge=>ge.id!==ce||(oe.province=se.name,oe.provinceCode=se.id,oe.city=fe.name,oe.cityCode=fe.id,oe.district=ge.name,oe.districtCode=ge.id,!1)))))throw new Error("未找到该地区");return oe.address=oe.province+oe.city+oe.district,oe},ne=async({provinceCode:re,cityCode:ce,districtCode:oe})=>{const se={province:{},city:{},district:{}};if(re){const fe=await O.get({dir:"province",file:re});se.province={code:fe.id,location:fe.location,name:fe.name,pinyin:fe.pinyin}}if(ce){const fe=(await O.get({dir:"city",file:re})).find(ge=>ge.id===ce);se.city={code:fe.id,location:fe.location,name:fe.name,pinyin:fe.pinyin}}if(oe){const fe=(await O.get({dir:"district",file:ce})).find(ge=>ge.id===oe);se.district={code:fe.id,location:fe.location,name:fe.name,pinyin:fe.pinyin}}return se},ee=async(re,ce)=>{let oe=ce;if(oe||(oe=await F()),!re)return oe.map(se=>({code:se.id,name:se.name}));for(let se=0;se<oe.length;se++){const fe=oe[se];if(fe.id===re&&fe.children)return fe.children.map(ge=>({code:ge.id,name:ge.name}));if(fe.children){const ge=await ee(re,fe.children);if(ge)return ge}}};I.exports={getList:ee,searchCodeInfo:async({code:re,detail:ce})=>{const{province:oe,city:se,district:fe,address:ge,provinceCode:ue,cityCode:_e,districtCode:pe}=await te({code:re}),ye={province:oe,city:se,district:fe,address:ge,code:re};if(ce){const we=await ne({provinceCode:ue,cityCode:_e,districtCode:pe});ye.detail=we}return ye},searchStrAddress:async re=>{const{province:ce,city:oe,district:se}=await K(re);return se||oe||ce||null},analysisAddress:K,searchCodeDetailInfo:async({code:re})=>{const{provinceCode:ce,cityCode:oe,districtCode:se}=await te({code:re}),fe=await ne({provinceCode:ce,cityCode:oe,districtCode:se});return Object.keys(fe.district).length?fe.district:Object.keys(fe.city).length?fe.city:Object.keys(fe.province).length?fe.province:void 0}}},182:I=>{I.exports=new class{constructor(){this.config={timeout:1e4,enableHighAccuracy:!1,detail:!1},this.cdn=["https://npm.onmicrosoft.cn/@pikaz/location/lib","https://unpkg.com/@pikaz/location/lib"],this.userCdn=""}set(D){this.config={...this.config,...D},this.config.url&&(this.userCdn=this.config.url)}}},955:(I,D,a)=>{const O=a(909),F=a(895),z=a(182),K=({latitude:te,longitude:ne,address:ee})=>ee.find(re=>re.polygon.find(ce=>{if(F([ne,te],ce))return ce}));I.exports={getGeo:(te={})=>{const{enableHighAccuracy:ne,timeout:ee}={...z.config,...te};return new Promise((re,ce)=>{if(navigator.geolocation){const oe=navigator.geolocation.watchPosition(se=>{const{latitude:fe,longitude:ge}=se.coords;navigator.geolocation.clearWatch(oe),re({latitude:fe,longitude:ge})},se=>{switch(navigator.geolocation.clearWatch(oe),se.code){case se.PERMISSION_DENIED:ce(new Error("html5已拒绝定位"));break;case se.POSITION_UNAVAILABLE:ce(new Error("html5位置信息不可用"));break;case se.TIMEOUT:ce(new Error("定位超时"));break;case se.UNKNOWN_ERROR:ce(new Error("html5定位未知错误"))}},{enableHighAccuracy:ne,timeout:ee,maximumAge:0})}else ce(new Error("浏览器不支持HTML5定位"))})},getGeoCode:async({latitude:te,longitude:ne})=>{try{let ee="";const re=(await O.get({dir:"province",file:"short"})).filter(oe=>K({latitude:te,longitude:ne,address:[oe]}));let ce="";for(let oe=0;oe<re.length;oe++){const{id:se}=re[oe],fe=await O.get({dir:"province",file:se}),ge=K({latitude:te,longitude:ne,address:[fe]});ge&&(ce=ge)}if(ce){ee=ce.id;const oe=await O.get({dir:"city",file:ce.id}),se=K({latitude:te,longitude:ne,address:oe});if(se){ee=se.id;const fe=await O.get({dir:"district",file:se.id}),ge=K({latitude:te,longitude:ne,address:fe});ge&&(ee=ge.id)}}if(!ee)throw new Error("非中国境内");return ee}catch(ee){throw ee}}}},909:(I,D,a)=>{const O=a(218),{decompressFromEncodedURIComponent:F}=a(961),z=a(483),K=a(182),{version:te,fileDate:ne}=a(147);I.exports=new class{constructor(){this.local=null,this.localConfig={name:"pikazLocation",storeName:"v"+te.split(".")[0]+"."+te.split(".")[1]}}async get({dir:ee,file:re}){if(!this.local){const se=z.createInstance(this.localConfig);await se.ready(),this.local=se}const ce=`${ee}-${re}-${ne[ee]}`,oe=await this.local.getItem(ce);if(oe)return oe;try{const se=await(async({file:fe})=>{const ge=O.CancelToken;let ue;const _e=async(pe,ye)=>{const we=await O({url:`${pe}/static/${ye}.json`,method:"get",dataType:"json",cancelToken:new ge(function(be){ue=be}),timeout:K.timeout});if(!we||!we.data||Object.prototype.toString.call(we.data.s)!="[object String]")throw new Error("未获取到文件");const Ie=F(we.data.s);return JSON.parse(Ie)};try{const pe=K.userCdn;if(pe)return await _e(pe,fe);throw new Error("未找到设置的url")}catch{const ye=K.cdn.map(we=>new Promise(Ie=>{_e(we,fe).then(be=>{Ie(be)}).catch(()=>{})}));try{return await Promise.race(ye)}catch{throw new Error("定位失败")}finally{ue()}}})({file:`${ee}/${re}`});return this.local.setItem(ce,se),se}catch{throw new Error("定位失败")}}async getVal({key:ee,gainVal:re,expiration:ce}){if(!this.local){const _e=z.createInstance(this.localConfig);await _e.ready(),this.local=_e}const oe=new Date().getTime(),se=ce||0,fe=`local-${ee}`,ge=await this.local.getItem(fe);if(ge&&ge.expiration>oe)return ge.val;const ue=await re();return await this.local.setItem(fe,{val:ue,expiration:oe+se}),ue}async clear(){await this.local.clear()}}},138:(I,D,a)=>{const O=a(182),{getGeo:F,getGeoCode:z}=a(955),{getList:K,searchCodeInfo:te,searchStrAddress:ne,searchCodeDetailInfo:ee}=a(946),{getIpCode:re}=a(454),ce=async(ue,_e={})=>{let{timeout:pe}={...O.config,..._e};return await Promise.race([ue(_e),new Promise((ye,we)=>{setTimeout(()=>{we(new Error("定位超时"))},pe)})])},oe=async(ue={})=>{let{timeout:_e,enableHighAccuracy:pe,detail:ye,latitude:we,longitude:Ie}={...O.config,...ue};if(!we||!Ie){const{latitude:be,longitude:Se}=await F({timeout:_e,enableHighAccuracy:pe});we=be,Ie=Se}return await ce(async()=>{const be=await z({latitude:we,longitude:Ie});if(!be)throw new Error("非中国境内");return{...await te({code:be,detail:ye}),latitude:we,longitude:Ie}},{timeout:_e})},se=async(ue={})=>{let{detail:_e,ip:pe}={...O.config,...ue};const{code:ye,ip:we}=await re({ip:pe});return pe||(pe=we),{...await te({code:ye,detail:_e}),ip:pe}},fe=async(ue={})=>{const{address:_e,detail:pe}={...O.config,...ue},ye=await ne(_e);if(!ye)throw new Error("解析地址失败,请确认地址包含省级或市级名称");return await te({code:ye,detail:pe})},ge=async(ue={})=>{const{code:_e,detail:pe}={...O.config,...ue};return await te({code:_e,detail:pe})};I.exports={setConfig:({timeout:ue,url:_e})=>{O.set({timeout:ue,url:_e})},getLocation:async(ue={})=>{try{return{...await oe(ue),type:"h5"}}catch{return{...await ce(se,ue),type:"ip"}}},getH5Location:oe,getIpLocation:ue=>ce(se,ue),searchList:async(ue={})=>{const{code:_e}={...ue};return await K(_e||"")||[]},searchCodeAddress:ue=>ce(ge,ue),searchAddress:ue=>ce(fe,ue),searchCodeDetail:ue=>ce(ee,ue)}},454:(I,D,a)=>{const{decompressFromEncodedURIComponent:O}=a(961),F=a(909),z=te=>{const ne=te.split(".").reduce((ee,re)=>`${ee}${(ce=>{const oe=ce.split("").reverse();return new Array(3).fill(0).map((se,fe)=>oe[fe]||0).reverse().join("")})(re)}`,"");return Number(ne)},K=()=>new Promise((te,ne)=>{const ee="ipCallback"+new Date().getTime(),re=document.createElement("script");re.onerror=()=>{ne(new Error("获取ip失败"))},window[ee]=ce=>{ce&&ce.ip?te(ce.ip):ne(new Error("ip定位失败"))},re.src=O("BYFxAcGcC4HpYIbgJYDpkoGYE9UHsAnAc1gH5NCBbBEAXgCtI8A7cAMjYGMEAbHgIwScA1rSA")+ee,document.body.appendChild(re)});I.exports={addZero:z,getIpCode:async(te={})=>{let{ip:ne}={...te};ne||(ne=await F.getVal({key:"ip",gainVal:K,expiration:864e5}));const ee=ne.split(".").map(re=>Number(re)||0);if(ee.length!==4)throw new Error("ip格式错误,只支持ipv4");return{code:(await F.get({dir:"ip",file:`${ee[0]}.${ee[1]}`})).reduce((re,ce)=>{const{district:oe,id:se}=ce,fe=z(ne);return fe>=oe[0]&&fe<=oe[1]?se:re},""),ip:ne}}}},218:(I,D,a)=>{function O(ie,de){return function(){return ie.apply(de,arguments)}}const{toString:F}=Object.prototype,{getPrototypeOf:z}=Object,K=(te=Object.create(null),ie=>{const de=F.call(ie);return te[de]||(te[de]=de.slice(8,-1).toLowerCase())});var te;const ne=ie=>(ie=ie.toLowerCase(),de=>K(de)===ie),ee=ie=>de=>typeof de===ie,{isArray:re}=Array,ce=ee("undefined"),oe=ne("ArrayBuffer"),se=ee("string"),fe=ee("function"),ge=ee("number"),ue=ie=>ie!==null&&typeof ie=="object",_e=ie=>{if(K(ie)!=="object")return!1;const de=z(ie);return!(de!==null&&de!==Object.prototype&&Object.getPrototypeOf(de)!==null||Symbol.toStringTag in ie||Symbol.iterator in ie)},pe=ne("Date"),ye=ne("File"),we=ne("Blob"),Ie=ne("FileList"),be=ne("URLSearchParams");function Se(ie,de,{allOwnKeys:ke=!1}={}){if(ie==null)return;let Oe,Ae;if(typeof ie!="object"&&(ie=[ie]),re(ie))for(Oe=0,Ae=ie.length;Oe<Ae;Oe++)de.call(null,ie[Oe],Oe,ie);else{const Ne=ke?Object.getOwnPropertyNames(ie):Object.keys(ie),Be=Ne.length;let Ke;for(Oe=0;Oe<Be;Oe++)Ke=Ne[Oe],de.call(null,ie[Ke],Ke,ie)}}function Me(ie,de){de=de.toLowerCase();const ke=Object.keys(ie);let Oe,Ae=ke.length;for(;Ae-- >0;)if(Oe=ke[Ae],de===Oe.toLowerCase())return Oe;return null}const We=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:a.g,Je=ie=>!ce(ie)&&ie!==We,Le=(Tt=typeof Uint8Array<"u"&&z(Uint8Array),ie=>Tt&&ie instanceof Tt);var Tt;const Et=ne("HTMLFormElement"),At=(({hasOwnProperty:ie})=>(de,ke)=>ie.call(de,ke))(Object.prototype),jt=ne("RegExp"),Pt=(ie,de)=>{const ke=Object.getOwnPropertyDescriptors(ie),Oe={};Se(ke,(Ae,Ne)=>{let Be;(Be=de(Ae,Ne,ie))!==!1&&(Oe[Ne]=Be||Ae)}),Object.defineProperties(ie,Oe)},_t="abcdefghijklmnopqrstuvwxyz",rt="0123456789",Vt={DIGIT:rt,ALPHA:_t,ALPHA_DIGIT:_t+_t.toUpperCase()+rt},Rt=ne("AsyncFunction");var Pe={isArray:re,isArrayBuffer:oe,isBuffer:function(ie){return ie!==null&&!ce(ie)&&ie.constructor!==null&&!ce(ie.constructor)&&fe(ie.constructor.isBuffer)&&ie.constructor.isBuffer(ie)},isFormData:ie=>{let de;return ie&&(typeof FormData=="function"&&ie instanceof FormData||fe(ie.append)&&((de=K(ie))==="formdata"||de==="object"&&fe(ie.toString)&&ie.toString()==="[object FormData]"))},isArrayBufferView:function(ie){let de;return de=typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(ie):ie&&ie.buffer&&oe(ie.buffer),de},isString:se,isNumber:ge,isBoolean:ie=>ie===!0||ie===!1,isObject:ue,isPlainObject:_e,isUndefined:ce,isDate:pe,isFile:ye,isBlob:we,isRegExp:jt,isFunction:fe,isStream:ie=>ue(ie)&&fe(ie.pipe),isURLSearchParams:be,isTypedArray:Le,isFileList:Ie,forEach:Se,merge:function ie(){const{caseless:de}=Je(this)&&this||{},ke={},Oe=(Ae,Ne)=>{const Be=de&&Me(ke,Ne)||Ne;_e(ke[Be])&&_e(Ae)?ke[Be]=ie(ke[Be],Ae):_e(Ae)?ke[Be]=ie({},Ae):re(Ae)?ke[Be]=Ae.slice():ke[Be]=Ae};for(let Ae=0,Ne=arguments.length;Ae<Ne;Ae++)arguments[Ae]&&Se(arguments[Ae],Oe);return ke},extend:(ie,de,ke,{allOwnKeys:Oe}={})=>(Se(de,(Ae,Ne)=>{ke&&fe(Ae)?ie[Ne]=O(Ae,ke):ie[Ne]=Ae},{allOwnKeys:Oe}),ie),trim:ie=>ie.trim?ie.trim():ie.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:ie=>(ie.charCodeAt(0)===65279&&(ie=ie.slice(1)),ie),inherits:(ie,de,ke,Oe)=>{ie.prototype=Object.create(de.prototype,Oe),ie.prototype.constructor=ie,Object.defineProperty(ie,"super",{value:de.prototype}),ke&&Object.assign(ie.prototype,ke)},toFlatObject:(ie,de,ke,Oe)=>{let Ae,Ne,Be;const Ke={};if(de=de||{},ie==null)return de;do{for(Ae=Object.getOwnPropertyNames(ie),Ne=Ae.length;Ne-- >0;)Be=Ae[Ne],Oe&&!Oe(Be,ie,de)||Ke[Be]||(de[Be]=ie[Be],Ke[Be]=!0);ie=ke!==!1&&z(ie)}while(ie&&(!ke||ke(ie,de))&&ie!==Object.prototype);return de},kindOf:K,kindOfTest:ne,endsWith:(ie,de,ke)=>{ie=String(ie),(ke===void 0||ke>ie.length)&&(ke=ie.length),ke-=de.length;const Oe=ie.indexOf(de,ke);return Oe!==-1&&Oe===ke},toArray:ie=>{if(!ie)return null;if(re(ie))return ie;let de=ie.length;if(!ge(de))return null;const ke=new Array(de);for(;de-- >0;)ke[de]=ie[de];return ke},forEachEntry:(ie,de)=>{const ke=(ie&&ie[Symbol.iterator]).call(ie);let Oe;for(;(Oe=ke.next())&&!Oe.done;){const Ae=Oe.value;de.call(ie,Ae[0],Ae[1])}},matchAll:(ie,de)=>{let ke;const Oe=[];for(;(ke=ie.exec(de))!==null;)Oe.push(ke);return Oe},isHTMLForm:Et,hasOwnProperty:At,hasOwnProp:At,reduceDescriptors:Pt,freezeMethods:ie=>{Pt(ie,(de,ke)=>{if(fe(ie)&&["arguments","caller","callee"].indexOf(ke)!==-1)return!1;const Oe=ie[ke];fe(Oe)&&(de.enumerable=!1,"writable"in de?de.writable=!1:de.set||(de.set=()=>{throw Error("Can not rewrite read-only method '"+ke+"'")}))})},toObjectSet:(ie,de)=>{const ke={},Oe=Ae=>{Ae.forEach(Ne=>{ke[Ne]=!0})};return re(ie)?Oe(ie):Oe(String(ie).split(de)),ke},toCamelCase:ie=>ie.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(de,ke,Oe){return ke.toUpperCase()+Oe}),noop:()=>{},toFiniteNumber:(ie,de)=>(ie=+ie,Number.isFinite(ie)?ie:de),findKey:Me,global:We,isContextDefined:Je,ALPHABET:Vt,generateString:(ie=16,de=Vt.ALPHA_DIGIT)=>{let ke="";const{length:Oe}=de;for(;ie--;)ke+=de[Math.random()*Oe|0];return ke},isSpecCompliantForm:function(ie){return!!(ie&&fe(ie.append)&&ie[Symbol.toStringTag]==="FormData"&&ie[Symbol.iterator])},toJSONObject:ie=>{const de=new Array(10),ke=(Oe,Ae)=>{if(ue(Oe)){if(de.indexOf(Oe)>=0)return;if(!("toJSON"in Oe)){de[Ae]=Oe;const Ne=re(Oe)?[]:{};return Se(Oe,(Be,Ke)=>{const Qe=ke(Be,Ae+1);!ce(Qe)&&(Ne[Ke]=Qe)}),de[Ae]=void 0,Ne}}return Oe};return ke(ie,0)},isAsyncFn:Rt,isThenable:ie=>ie&&(ue(ie)||fe(ie))&&fe(ie.then)&&fe(ie.catch)};function it(ie,de,ke,Oe,Ae){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=ie,this.name="AxiosError",de&&(this.code=de),ke&&(this.config=ke),Oe&&(this.request=Oe),Ae&&(this.response=Ae)}Pe.inherits(it,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Pe.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const zt=it.prototype,Bt={};function nt(ie){return Pe.isPlainObject(ie)||Pe.isArray(ie)}function et(ie){return Pe.endsWith(ie,"[]")?ie.slice(0,-2):ie}function ot(ie,de,ke){return ie?ie.concat(de).map(function(Oe,Ae){return Oe=et(Oe),!ke&&Ae?"["+Oe+"]":Oe}).join(ke?".":""):de}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(ie=>{Bt[ie]={value:ie}}),Object.defineProperties(it,Bt),Object.defineProperty(zt,"isAxiosError",{value:!0}),it.from=(ie,de,ke,Oe,Ae,Ne)=>{const Be=Object.create(zt);return Pe.toFlatObject(ie,Be,function(Ke){return Ke!==Error.prototype},Ke=>Ke!=="isAxiosError"),it.call(Be,ie.message,de,ke,Oe,Ae),Be.cause=ie,Be.name=ie.name,Ne&&Object.assign(Be,Ne),Be};const st=Pe.toFlatObject(Pe,{},null,function(ie){return/^is[A-Z]/.test(ie)});function gt(ie,de,ke){if(!Pe.isObject(ie))throw new TypeError("target must be an object");de=de||new FormData;const Oe=(ke=Pe.toFlatObject(ke,{metaTokens:!0,dots:!1,indexes:!1},!1,function(Xe,wt){return!Pe.isUndefined(wt[Xe])})).metaTokens,Ae=ke.visitor||Ze,Ne=ke.dots,Be=ke.indexes,Ke=(ke.Blob||typeof Blob<"u"&&Blob)&&Pe.isSpecCompliantForm(de);if(!Pe.isFunction(Ae))throw new TypeError("visitor must be a function");function Qe(Xe){if(Xe===null)return"";if(Pe.isDate(Xe))return Xe.toISOString();if(!Ke&&Pe.isBlob(Xe))throw new it("Blob is not supported. Use a Buffer instead.");return Pe.isArrayBuffer(Xe)||Pe.isTypedArray(Xe)?Ke&&typeof Blob=="function"?new Blob([Xe]):Buffer.from(Xe):Xe}function Ze(Xe,wt,Ye){let Ot=Xe;if(Xe&&!Ye&&typeof Xe=="object"){if(Pe.endsWith(wt,"{}"))wt=Oe?wt:wt.slice(0,-2),Xe=JSON.stringify(Xe);else if(Pe.isArray(Xe)&&function(Ft){return Pe.isArray(Ft)&&!Ft.some(nt)}(Xe)||(Pe.isFileList(Xe)||Pe.endsWith(wt,"[]"))&&(Ot=Pe.toArray(Xe)))return wt=et(wt),Ot.forEach(function(Ft,an){!Pe.isUndefined(Ft)&&Ft!==null&&de.append(Be===!0?ot([wt],an,Ne):Be===null?wt:wt+"[]",Qe(Ft))}),!1}return!!nt(Xe)||(de.append(ot(Ye,wt,Ne),Qe(Xe)),!1)}const je=[],ft=Object.assign(st,{defaultVisitor:Ze,convertValue:Qe,isVisitable:nt});if(!Pe.isObject(ie))throw new TypeError("data must be an object");return function Xe(wt,Ye){if(!Pe.isUndefined(wt)){if(je.indexOf(wt)!==-1)throw Error("Circular reference detected in "+Ye.join("."));je.push(wt),Pe.forEach(wt,function(Ot,Ft){(!(Pe.isUndefined(Ot)||Ot===null)&&Ae.call(de,Ot,Pe.isString(Ft)?Ft.trim():Ft,Ye,ft))===!0&&Xe(Ot,Ye?Ye.concat(Ft):[Ft])}),je.pop()}}(ie),de}function Dt(ie){const de={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(ie).replace(/[!'()~]|%20|%00/g,function(ke){return de[ke]})}function Ut(ie,de){this._pairs=[],ie&&gt(ie,this,de)}const Lt=Ut.prototype;function Zt(ie){return encodeURIComponent(ie).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Kt(ie,de,ke){if(!de)return ie;const Oe=ke&&ke.encode||Zt,Ae=ke&&ke.serialize;let Ne;if(Ne=Ae?Ae(de,ke):Pe.isURLSearchParams(de)?de.toString():new Ut(de,ke).toString(Oe),Ne){const Be=ie.indexOf("#");Be!==-1&&(ie=ie.slice(0,Be)),ie+=(ie.indexOf("?")===-1?"?":"&")+Ne}return ie}Lt.append=function(ie,de){this._pairs.push([ie,de])},Lt.toString=function(ie){const de=ie?function(ke){return ie.call(this,ke,Dt)}:Dt;return this._pairs.map(function(ke){return de(ke[0])+"="+de(ke[1])},"").join("&")};var fn=class{constructor(){this.handlers=[]}use(ie,de,ke){return this.handlers.push({fulfilled:ie,rejected:de,synchronous:!!ke&&ke.synchronous,runWhen:ke?ke.runWhen:null}),this.handlers.length-1}eject(ie){this.handlers[ie]&&(this.handlers[ie]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(ie){Pe.forEach(this.handlers,function(de){de!==null&&ie(de)})}},tn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},nn={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ut,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]};const Wt=typeof window<"u"&&typeof document<"u",Gt=(_n=typeof navigator<"u"&&navigator.product,Wt&&["ReactNative","NativeScript","NS"].indexOf(_n)<0);var _n;const rn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function";var Qt={...Object.freeze({__proto__:null,hasBrowserEnv:Wt,hasStandardBrowserWebWorkerEnv:rn,hasStandardBrowserEnv:Gt}),...nn};function ae(ie){function de(ke,Oe,Ae,Ne){let Be=ke[Ne++];const Ke=Number.isFinite(+Be),Qe=Ne>=ke.length;return Be=!Be&&Pe.isArray(Ae)?Ae.length:Be,Qe?(Pe.hasOwnProp(Ae,Be)?Ae[Be]=[Ae[Be],Oe]:Ae[Be]=Oe,!Ke):(Ae[Be]&&Pe.isObject(Ae[Be])||(Ae[Be]=[]),de(ke,Oe,Ae[Be],Ne)&&Pe.isArray(Ae[Be])&&(Ae[Be]=function(Ze){const je={},ft=Object.keys(Ze);let Xe;const wt=ft.length;let Ye;for(Xe=0;Xe<wt;Xe++)Ye=ft[Xe],je[Ye]=Ze[Ye];return je}(Ae[Be])),!Ke)}if(Pe.isFormData(ie)&&Pe.isFunction(ie.entries)){const ke={};return Pe.forEachEntry(ie,(Oe,Ae)=>{de(function(Ne){return Pe.matchAll(/\w+|\[(\w*)]/g,Ne).map(Be=>Be[0]==="[]"?"":Be[1]||Be[0])}(Oe),Ae,ke,0)}),ke}return null}const Q={transitional:tn,adapter:["xhr","http"],transformRequest:[function(ie,de){const ke=de.getContentType()||"",Oe=ke.indexOf("application/json")>-1,Ae=Pe.isObject(ie);if(Ae&&Pe.isHTMLForm(ie)&&(ie=new FormData(ie)),Pe.isFormData(ie))return Oe&&Oe?JSON.stringify(ae(ie)):ie;if(Pe.isArrayBuffer(ie)||Pe.isBuffer(ie)||Pe.isStream(ie)||Pe.isFile(ie)||Pe.isBlob(ie))return ie;if(Pe.isArrayBufferView(ie))return ie.buffer;if(Pe.isURLSearchParams(ie))return de.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),ie.toString();let Ne;if(Ae){if(ke.indexOf("application/x-www-form-urlencoded")>-1)return function(Be,Ke){return gt(Be,new Qt.classes.URLSearchParams,Object.assign({visitor:function(Qe,Ze,je,ft){return Qt.isNode&&Pe.isBuffer(Qe)?(this.append(Ze,Qe.toString("base64")),!1):ft.defaultVisitor.apply(this,arguments)}},Ke))}(ie,this.formSerializer).toString();if((Ne=Pe.isFileList(ie))||ke.indexOf("multipart/form-data")>-1){const Be=this.env&&this.env.FormData;return gt(Ne?{"files[]":ie}:ie,Be&&new Be,this.formSerializer)}}return Ae||Oe?(de.setContentType("application/json",!1),function(Be,Ke,Qe){if(Pe.isString(Be))try{return(0,JSON.parse)(Be),Pe.trim(Be)}catch(Ze){if(Ze.name!=="SyntaxError")throw Ze}return(0,JSON.stringify)(Be)}(ie)):ie}],transformResponse:[function(ie){const de=this.transitional||Q.transitional,ke=de&&de.forcedJSONParsing,Oe=this.responseType==="json";if(ie&&Pe.isString(ie)&&(ke&&!this.responseType||Oe)){const Ae=!(de&&de.silentJSONParsing)&&Oe;try{return JSON.parse(ie)}catch(Ne){if(Ae)throw Ne.name==="SyntaxError"?it.from(Ne,it.ERR_BAD_RESPONSE,this,null,this.response):Ne}}return ie}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Qt.classes.FormData,Blob:Qt.classes.Blob},validateStatus:function(ie){return ie>=200&&ie<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Pe.forEach(["delete","get","head","post","put","patch"],ie=>{Q.headers[ie]={}});var X=Q;const he=Pe.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Te=Symbol("internals");function $e(ie){return ie&&String(ie).trim().toLowerCase()}function Ue(ie){return ie===!1||ie==null?ie:Pe.isArray(ie)?ie.map(Ue):String(ie)}function ct(ie,de,ke,Oe,Ae){return Pe.isFunction(Oe)?Oe.call(this,de,ke):(Ae&&(de=ke),Pe.isString(de)?Pe.isString(Oe)?de.indexOf(Oe)!==-1:Pe.isRegExp(Oe)?Oe.test(de):void 0:void 0)}class kt{constructor(de){de&&this.set(de)}set(de,ke,Oe){const Ae=this;function Ne(Ke,Qe,Ze){const je=$e(Qe);if(!je)throw new Error("header name must be a non-empty string");const ft=Pe.findKey(Ae,je);(!ft||Ae[ft]===void 0||Ze===!0||Ze===void 0&&Ae[ft]!==!1)&&(Ae[ft||Qe]=Ue(Ke))}const Be=(Ke,Qe)=>Pe.forEach(Ke,(Ze,je)=>Ne(Ze,je,Qe));return Pe.isPlainObject(de)||de instanceof this.constructor?Be(de,ke):Pe.isString(de)&&(de=de.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(de.trim())?Be((Ke=>{const Qe={};let Ze,je,ft;return Ke&&Ke.split(`
4
- `).forEach(function(Xe){ft=Xe.indexOf(":"),Ze=Xe.substring(0,ft).trim().toLowerCase(),je=Xe.substring(ft+1).trim(),!Ze||Qe[Ze]&&he[Ze]||(Ze==="set-cookie"?Qe[Ze]?Qe[Ze].push(je):Qe[Ze]=[je]:Qe[Ze]=Qe[Ze]?Qe[Ze]+", "+je:je)}),Qe})(de),ke):de!=null&&Ne(ke,de,Oe),this}get(de,ke){if(de=$e(de)){const Oe=Pe.findKey(this,de);if(Oe){const Ae=this[Oe];if(!ke)return Ae;if(ke===!0)return function(Ne){const Be=Object.create(null),Ke=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let Qe;for(;Qe=Ke.exec(Ne);)Be[Qe[1]]=Qe[2];return Be}(Ae);if(Pe.isFunction(ke))return ke.call(this,Ae,Oe);if(Pe.isRegExp(ke))return ke.exec(Ae);throw new TypeError("parser must be boolean|regexp|function")}}}has(de,ke){if(de=$e(de)){const Oe=Pe.findKey(this,de);return!(!Oe||this[Oe]===void 0||ke&&!ct(0,this[Oe],Oe,ke))}return!1}delete(de,ke){const Oe=this;let Ae=!1;function Ne(Be){if(Be=$e(Be)){const Ke=Pe.findKey(Oe,Be);!Ke||ke&&!ct(0,Oe[Ke],Ke,ke)||(delete Oe[Ke],Ae=!0)}}return Pe.isArray(de)?de.forEach(Ne):Ne(de),Ae}clear(de){const ke=Object.keys(this);let Oe=ke.length,Ae=!1;for(;Oe--;){const Ne=ke[Oe];de&&!ct(0,this[Ne],Ne,de,!0)||(delete this[Ne],Ae=!0)}return Ae}normalize(de){const ke=this,Oe={};return Pe.forEach(this,(Ae,Ne)=>{const Be=Pe.findKey(Oe,Ne);if(Be)return ke[Be]=Ue(Ae),void delete ke[Ne];const Ke=de?function(Qe){return Qe.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(Ze,je,ft)=>je.toUpperCase()+ft)}(Ne):String(Ne).trim();Ke!==Ne&&delete ke[Ne],ke[Ke]=Ue(Ae),Oe[Ke]=!0}),this}concat(...de){return this.constructor.concat(this,...de)}toJSON(de){const ke=Object.create(null);return Pe.forEach(this,(Oe,Ae)=>{Oe!=null&&Oe!==!1&&(ke[Ae]=de&&Pe.isArray(Oe)?Oe.join(", "):Oe)}),ke}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([de,ke])=>de+": "+ke).join(`
5
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(de){return de instanceof this?de:new this(de)}static concat(de,...ke){const Oe=new this(de);return ke.forEach(Ae=>Oe.set(Ae)),Oe}static accessor(de){const ke=(this[Te]=this[Te]={accessors:{}}).accessors,Oe=this.prototype;function Ae(Ne){const Be=$e(Ne);ke[Be]||(function(Ke,Qe){const Ze=Pe.toCamelCase(" "+Qe);["get","set","has"].forEach(je=>{Object.defineProperty(Ke,je+Ze,{value:function(ft,Xe,wt){return this[je].call(this,Qe,ft,Xe,wt)},configurable:!0})})}(Oe,Ne),ke[Be]=!0)}return Pe.isArray(de)?de.forEach(Ae):Ae(de),this}}kt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Pe.reduceDescriptors(kt.prototype,({value:ie},de)=>{let ke=de[0].toUpperCase()+de.slice(1);return{get:()=>ie,set(Oe){this[ke]=Oe}}}),Pe.freezeMethods(kt);var yt=kt;function It(ie,de){const ke=this||X,Oe=de||ke,Ae=yt.from(Oe.headers);let Ne=Oe.data;return Pe.forEach(ie,function(Be){Ne=Be.call(ke,Ne,Ae.normalize(),de?de.status:void 0)}),Ae.normalize(),Ne}function St(ie){return!(!ie||!ie.__CANCEL__)}function dn(ie,de,ke){it.call(this,ie??"canceled",it.ERR_CANCELED,de,ke),this.name="CanceledError"}Pe.inherits(dn,it,{__CANCEL__:!0});var Qn=Qt.hasStandardBrowserEnv?{write(ie,de,ke,Oe,Ae,Ne){const Be=[ie+"="+encodeURIComponent(de)];Pe.isNumber(ke)&&Be.push("expires="+new Date(ke).toGMTString()),Pe.isString(Oe)&&Be.push("path="+Oe),Pe.isString(Ae)&&Be.push("domain="+Ae),Ne===!0&&Be.push("secure"),document.cookie=Be.join("; ")},read(ie){const de=document.cookie.match(new RegExp("(^|;\\s*)("+ie+")=([^;]*)"));return de?decodeURIComponent(de[3]):null},remove(ie){this.write(ie,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Gn(ie,de){return ie&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(de)?function(ke,Oe){return Oe?ke.replace(/\/+$/,"")+"/"+Oe.replace(/^\/+/,""):ke}(ie,de):de}var le=Qt.hasStandardBrowserEnv?function(){const ie=/(msie|trident)/i.test(navigator.userAgent),de=document.createElement("a");let ke;function Oe(Ae){let Ne=Ae;return ie&&(de.setAttribute("href",Ne),Ne=de.href),de.setAttribute("href",Ne),{href:de.href,protocol:de.protocol?de.protocol.replace(/:$/,""):"",host:de.host,search:de.search?de.search.replace(/^\?/,""):"",hash:de.hash?de.hash.replace(/^#/,""):"",hostname:de.hostname,port:de.port,pathname:de.pathname.charAt(0)==="/"?de.pathname:"/"+de.pathname}}return ke=Oe(window.location.href),function(Ae){const Ne=Pe.isString(Ae)?Oe(Ae):Ae;return Ne.protocol===ke.protocol&&Ne.host===ke.host}}():function(){return!0};function me(ie,de){let ke=0;const Oe=function(Ae,Ne){Ae=Ae||10;const Be=new Array(Ae),Ke=new Array(Ae);let Qe,Ze=0,je=0;return Ne=Ne!==void 0?Ne:1e3,function(ft){const Xe=Date.now(),wt=Ke[je];Qe||(Qe=Xe),Be[Ze]=ft,Ke[Ze]=Xe;let Ye=je,Ot=0;for(;Ye!==Ze;)Ot+=Be[Ye++],Ye%=Ae;if(Ze=(Ze+1)%Ae,Ze===je&&(je=(je+1)%Ae),Xe-Qe<Ne)return;const Ft=wt&&Xe-wt;return Ft?Math.round(1e3*Ot/Ft):void 0}}(50,250);return Ae=>{const Ne=Ae.loaded,Be=Ae.lengthComputable?Ae.total:void 0,Ke=Ne-ke,Qe=Oe(Ke);ke=Ne;const Ze={loaded:Ne,total:Be,progress:Be?Ne/Be:void 0,bytes:Ke,rate:Qe||void 0,estimated:Qe&&Be&&Ne<=Be?(Be-Ne)/Qe:void 0,event:Ae};Ze[de?"download":"upload"]=!0,ie(Ze)}}const ve={http:null,xhr:typeof XMLHttpRequest<"u"&&function(ie){return new Promise(function(de,ke){let Oe=ie.data;const Ae=yt.from(ie.headers).normalize();let Ne,Be,{responseType:Ke,withXSRFToken:Qe}=ie;function Ze(){ie.cancelToken&&ie.cancelToken.unsubscribe(Ne),ie.signal&&ie.signal.removeEventListener("abort",Ne)}if(Pe.isFormData(Oe)){if(Qt.hasStandardBrowserEnv||Qt.hasStandardBrowserWebWorkerEnv)Ae.setContentType(!1);else if((Be=Ae.getContentType())!==!1){const[Ye,...Ot]=Be?Be.split(";").map(Ft=>Ft.trim()).filter(Boolean):[];Ae.setContentType([Ye||"multipart/form-data",...Ot].join("; "))}}let je=new XMLHttpRequest;if(ie.auth){const Ye=ie.auth.username||"",Ot=ie.auth.password?unescape(encodeURIComponent(ie.auth.password)):"";Ae.set("Authorization","Basic "+btoa(Ye+":"+Ot))}const ft=Gn(ie.baseURL,ie.url);function Xe(){if(!je)return;const Ye=yt.from("getAllResponseHeaders"in je&&je.getAllResponseHeaders());(function(Ot,Ft,an){const Xn=an.config.validateStatus;an.status&&Xn&&!Xn(an.status)?Ft(new it("Request failed with status code "+an.status,[it.ERR_BAD_REQUEST,it.ERR_BAD_RESPONSE][Math.floor(an.status/100)-4],an.config,an.request,an)):Ot(an)})(function(Ot){de(Ot),Ze()},function(Ot){ke(Ot),Ze()},{data:Ke&&Ke!=="text"&&Ke!=="json"?je.response:je.responseText,status:je.status,statusText:je.statusText,headers:Ye,config:ie,request:je}),je=null}if(je.open(ie.method.toUpperCase(),Kt(ft,ie.params,ie.paramsSerializer),!0),je.timeout=ie.timeout,"onloadend"in je?je.onloadend=Xe:je.onreadystatechange=function(){je&&je.readyState===4&&(je.status!==0||je.responseURL&&je.responseURL.indexOf("file:")===0)&&setTimeout(Xe)},je.onabort=function(){je&&(ke(new it("Request aborted",it.ECONNABORTED,ie,je)),je=null)},je.onerror=function(){ke(new it("Network Error",it.ERR_NETWORK,ie,je)),je=null},je.ontimeout=function(){let Ye=ie.timeout?"timeout of "+ie.timeout+"ms exceeded":"timeout exceeded";const Ot=ie.transitional||tn;ie.timeoutErrorMessage&&(Ye=ie.timeoutErrorMessage),ke(new it(Ye,Ot.clarifyTimeoutError?it.ETIMEDOUT:it.ECONNABORTED,ie,je)),je=null},Qt.hasStandardBrowserEnv&&(Qe&&Pe.isFunction(Qe)&&(Qe=Qe(ie)),Qe||Qe!==!1&&le(ft))){const Ye=ie.xsrfHeaderName&&ie.xsrfCookieName&&Qn.read(ie.xsrfCookieName);Ye&&Ae.set(ie.xsrfHeaderName,Ye)}Oe===void 0&&Ae.setContentType(null),"setRequestHeader"in je&&Pe.forEach(Ae.toJSON(),function(Ye,Ot){je.setRequestHeader(Ot,Ye)}),Pe.isUndefined(ie.withCredentials)||(je.withCredentials=!!ie.withCredentials),Ke&&Ke!=="json"&&(je.responseType=ie.responseType),typeof ie.onDownloadProgress=="function"&&je.addEventListener("progress",me(ie.onDownloadProgress,!0)),typeof ie.onUploadProgress=="function"&&je.upload&&je.upload.addEventListener("progress",me(ie.onUploadProgress)),(ie.cancelToken||ie.signal)&&(Ne=Ye=>{je&&(ke(!Ye||Ye.type?new dn(null,ie,je):Ye),je.abort(),je=null)},ie.cancelToken&&ie.cancelToken.subscribe(Ne),ie.signal&&(ie.signal.aborted?Ne():ie.signal.addEventListener("abort",Ne)));const wt=function(Ye){const Ot=/^([-+\w]{1,25})(:?\/\/|:)/.exec(Ye);return Ot&&Ot[1]||""}(ft);wt&&Qt.protocols.indexOf(wt)===-1?ke(new it("Unsupported protocol "+wt+":",it.ERR_BAD_REQUEST,ie)):je.send(Oe||null)})}};Pe.forEach(ve,(ie,de)=>{if(ie){try{Object.defineProperty(ie,"name",{value:de})}catch{}Object.defineProperty(ie,"adapterName",{value:de})}});const Re=ie=>`- ${ie}`,xe=ie=>Pe.isFunction(ie)||ie===null||ie===!1;var Ce=ie=>{ie=Pe.isArray(ie)?ie:[ie];const{length:de}=ie;let ke,Oe;const Ae={};for(let Ne=0;Ne<de;Ne++){let Be;if(ke=ie[Ne],Oe=ke,!xe(ke)&&(Oe=ve[(Be=String(ke)).toLowerCase()],Oe===void 0))throw new it(`Unknown adapter '${Be}'`);if(Oe)break;Ae[Be||"#"+Ne]=Oe}if(!Oe){const Ne=Object.entries(Ae).map(([Be,Ke])=>`adapter ${Be} `+(Ke===!1?"is not supported by the environment":"is not available in the build"));throw new it("There is no suitable adapter to dispatch the request "+(de?Ne.length>1?`since :
6
- `+Ne.map(Re).join(`
7
- `):" "+Re(Ne[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return Oe};function qe(ie){if(ie.cancelToken&&ie.cancelToken.throwIfRequested(),ie.signal&&ie.signal.aborted)throw new dn(null,ie)}function He(ie){return qe(ie),ie.headers=yt.from(ie.headers),ie.data=It.call(ie,ie.transformRequest),["post","put","patch"].indexOf(ie.method)!==-1&&ie.headers.setContentType("application/x-www-form-urlencoded",!1),Ce(ie.adapter||X.adapter)(ie).then(function(de){return qe(ie),de.data=It.call(ie,ie.transformResponse,de),de.headers=yt.from(de.headers),de},function(de){return St(de)||(qe(ie),de&&de.response&&(de.response.data=It.call(ie,ie.transformResponse,de.response),de.response.headers=yt.from(de.response.headers))),Promise.reject(de)})}const ze=ie=>ie instanceof yt?ie.toJSON():ie;function Fe(ie,de){de=de||{};const ke={};function Oe(Ze,je,ft){return Pe.isPlainObject(Ze)&&Pe.isPlainObject(je)?Pe.merge.call({caseless:ft},Ze,je):Pe.isPlainObject(je)?Pe.merge({},je):Pe.isArray(je)?je.slice():je}function Ae(Ze,je,ft){return Pe.isUndefined(je)?Pe.isUndefined(Ze)?void 0:Oe(void 0,Ze,ft):Oe(Ze,je,ft)}function Ne(Ze,je){if(!Pe.isUndefined(je))return Oe(void 0,je)}function Be(Ze,je){return Pe.isUndefined(je)?Pe.isUndefined(Ze)?void 0:Oe(void 0,Ze):Oe(void 0,je)}function Ke(Ze,je,ft){return ft in de?Oe(Ze,je):ft in ie?Oe(void 0,Ze):void 0}const Qe={url:Ne,method:Ne,data:Ne,baseURL:Be,transformRequest:Be,transformResponse:Be,paramsSerializer:Be,timeout:Be,timeoutMessage:Be,withCredentials:Be,withXSRFToken:Be,adapter:Be,responseType:Be,xsrfCookieName:Be,xsrfHeaderName:Be,onUploadProgress:Be,onDownloadProgress:Be,decompress:Be,maxContentLength:Be,maxBodyLength:Be,beforeRedirect:Be,transport:Be,httpAgent:Be,httpsAgent:Be,cancelToken:Be,socketPath:Be,responseEncoding:Be,validateStatus:Ke,headers:(Ze,je)=>Ae(ze(Ze),ze(je),!0)};return Pe.forEach(Object.keys(Object.assign({},ie,de)),function(Ze){const je=Qe[Ze]||Ae,ft=je(ie[Ze],de[Ze],Ze);Pe.isUndefined(ft)&&je!==Ke||(ke[Ze]=ft)}),ke}const Ve={};["object","boolean","number","function","string","symbol"].forEach((ie,de)=>{Ve[ie]=function(ke){return typeof ke===ie||"a"+(de<1?"n ":" ")+ie}});const Ge={};Ve.transitional=function(ie,de,ke){function Oe(Ae,Ne){return"[Axios v1.6.2] Transitional option '"+Ae+"'"+Ne+(ke?". "+ke:"")}return(Ae,Ne,Be)=>{if(ie===!1)throw new it(Oe(Ne," has been removed"+(de?" in "+de:"")),it.ERR_DEPRECATED);return de&&!Ge[Ne]&&(Ge[Ne]=!0,console.warn(Oe(Ne," has been deprecated since v"+de+" and will be removed in the near future"))),!ie||ie(Ae,Ne,Be)}};var tt={assertOptions:function(ie,de,ke){if(typeof ie!="object")throw new it("options must be an object",it.ERR_BAD_OPTION_VALUE);const Oe=Object.keys(ie);let Ae=Oe.length;for(;Ae-- >0;){const Ne=Oe[Ae],Be=de[Ne];if(Be){const Ke=ie[Ne],Qe=Ke===void 0||Be(Ke,Ne,ie);if(Qe!==!0)throw new it("option "+Ne+" must be "+Qe,it.ERR_BAD_OPTION_VALUE)}else if(ke!==!0)throw new it("Unknown option "+Ne,it.ERR_BAD_OPTION)}},validators:Ve};const ut=tt.validators;class vt{constructor(de){this.defaults=de,this.interceptors={request:new fn,response:new fn}}request(de,ke){typeof de=="string"?(ke=ke||{}).url=de:ke=de||{},ke=Fe(this.defaults,ke);const{transitional:Oe,paramsSerializer:Ae,headers:Ne}=ke;Oe!==void 0&&tt.assertOptions(Oe,{silentJSONParsing:ut.transitional(ut.boolean),forcedJSONParsing:ut.transitional(ut.boolean),clarifyTimeoutError:ut.transitional(ut.boolean)},!1),Ae!=null&&(Pe.isFunction(Ae)?ke.paramsSerializer={serialize:Ae}:tt.assertOptions(Ae,{encode:ut.function,serialize:ut.function},!0)),ke.method=(ke.method||this.defaults.method||"get").toLowerCase();let Be=Ne&&Pe.merge(Ne.common,Ne[ke.method]);Ne&&Pe.forEach(["delete","get","head","post","put","patch","common"],Ye=>{delete Ne[Ye]}),ke.headers=yt.concat(Be,Ne);const Ke=[];let Qe=!0;this.interceptors.request.forEach(function(Ye){typeof Ye.runWhen=="function"&&Ye.runWhen(ke)===!1||(Qe=Qe&&Ye.synchronous,Ke.unshift(Ye.fulfilled,Ye.rejected))});const Ze=[];let je;this.interceptors.response.forEach(function(Ye){Ze.push(Ye.fulfilled,Ye.rejected)});let ft,Xe=0;if(!Qe){const Ye=[He.bind(this),void 0];for(Ye.unshift.apply(Ye,Ke),Ye.push.apply(Ye,Ze),ft=Ye.length,je=Promise.resolve(ke);Xe<ft;)je=je.then(Ye[Xe++],Ye[Xe++]);return je}ft=Ke.length;let wt=ke;for(Xe=0;Xe<ft;){const Ye=Ke[Xe++],Ot=Ke[Xe++];try{wt=Ye(wt)}catch(Ft){Ot.call(this,Ft);break}}try{je=He.call(this,wt)}catch(Ye){return Promise.reject(Ye)}for(Xe=0,ft=Ze.length;Xe<ft;)je=je.then(Ze[Xe++],Ze[Xe++]);return je}getUri(de){return Kt(Gn((de=Fe(this.defaults,de)).baseURL,de.url),de.params,de.paramsSerializer)}}Pe.forEach(["delete","get","head","options"],function(ie){vt.prototype[ie]=function(de,ke){return this.request(Fe(ke||{},{method:ie,url:de,data:(ke||{}).data}))}}),Pe.forEach(["post","put","patch"],function(ie){function de(ke){return function(Oe,Ae,Ne){return this.request(Fe(Ne||{},{method:ie,headers:ke?{"Content-Type":"multipart/form-data"}:{},url:Oe,data:Ae}))}}vt.prototype[ie]=de(),vt.prototype[ie+"Form"]=de(!0)});var Mt=vt;class on{constructor(de){if(typeof de!="function")throw new TypeError("executor must be a function.");let ke;this.promise=new Promise(function(Ae){ke=Ae});const Oe=this;this.promise.then(Ae=>{if(!Oe._listeners)return;let Ne=Oe._listeners.length;for(;Ne-- >0;)Oe._listeners[Ne](Ae);Oe._listeners=null}),this.promise.then=Ae=>{let Ne;const Be=new Promise(Ke=>{Oe.subscribe(Ke),Ne=Ke}).then(Ae);return Be.cancel=function(){Oe.unsubscribe(Ne)},Be},de(function(Ae,Ne,Be){Oe.reason||(Oe.reason=new dn(Ae,Ne,Be),ke(Oe.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(de){this.reason?de(this.reason):this._listeners?this._listeners.push(de):this._listeners=[de]}unsubscribe(de){if(!this._listeners)return;const ke=this._listeners.indexOf(de);ke!==-1&&this._listeners.splice(ke,1)}static source(){let de;return{token:new on(function(ke){de=ke}),cancel:de}}}var gn=on;const $n={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries($n).forEach(([ie,de])=>{$n[de]=ie});var Yn=$n;const Nt=function ie(de){const ke=new Mt(de),Oe=O(Mt.prototype.request,ke);return Pe.extend(Oe,Mt.prototype,ke,{allOwnKeys:!0}),Pe.extend(Oe,ke,null,{allOwnKeys:!0}),Oe.create=function(Ae){return ie(Fe(de,Ae))},Oe}(X);Nt.Axios=Mt,Nt.CanceledError=dn,Nt.CancelToken=gn,Nt.isCancel=St,Nt.VERSION="1.6.2",Nt.toFormData=gt,Nt.AxiosError=it,Nt.Cancel=Nt.CanceledError,Nt.all=function(ie){return Promise.all(ie)},Nt.spread=function(ie){return function(de){return ie.apply(null,de)}},Nt.isAxiosError=function(ie){return Pe.isObject(ie)&&ie.isAxiosError===!0},Nt.mergeConfig=Fe,Nt.AxiosHeaders=yt,Nt.formToJSON=ie=>ae(Pe.isHTMLForm(ie)?new FormData(ie):ie),Nt.getAdapter=Ce,Nt.HttpStatusCode=Yn,Nt.default=Nt,I.exports=Nt},147:I=>{I.exports=JSON.parse('{"name":"@pikaz/location","version":"1.0.9","description":"used to obtain location from the browser","private":false,"main":"lib/pikazLocation.js","module":"lib/pikazLocationModule.js","scripts":{"compress":"node utils/compress.js","analysisip":"node utils/analysisIp.js","build":"webpack && webpack --config module.config.js"},"keywords":["geolocation","location","longitude","latitude","province","city","district"],"files":["lib"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/pikaz-18/pikaz-location.git"},"author":"pikaz","license":"MIT","bugs":{"url":"https://github.com/pikaz-18/pikaz-location/issues"},"homepage":"https://github.com/pikaz-18/pikaz-location#readme","devDependencies":{"clean-webpack-plugin":"^4.0.0","copy-webpack-plugin":"^10.2.0","object-hash":"^3.0.0","webpack":"^5.65.0","webpack-cli":"^4.9.1"},"dependencies":{"axios":"^1.6.2","localforage":"^1.10.0","lz-string":"^1.4.4","point-in-polygon":"^1.1.0"},"fileDate":{"areaList":"202212301139","city":"202212301139","district":"202212301139","ip":"2024532110","province":"202317042"},"fileCode":{"areaList":"64b5a33f94b14ae208fca152fdc89dca1048360a","city":"7827eb2bc906b83df109ab24242ce68f98f9558b","district":"14d77ce6236e2025a4b1e3900cc70d0c32a62d0b","ip":"befa0a8a45fdc238a0fb4e4a3011dae43a06c1b4","province":"629a3c20a32e0de95e0633e0385234e2b7886c2d"}}')}},q={};function J(I){var D=q[I];if(D!==void 0)return D.exports;var a=q[I]={exports:{}};return Z[I](a,a.exports,J),a.exports}return J.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),J(138)})()}},t$1={};function n(N){var Z=t$1[N];if(Z!==void 0)return Z.exports;var q=t$1[N]={exports:{}};return e$2[N].call(q.exports,q,q.exports,n),q.exports}n.n=N=>{var Z=N&&N.__esModule?()=>N.default:()=>N;return n.d(Z,{a:Z}),Z},n.d=(N,Z)=>{for(var q in Z)n.o(Z,q)&&!n.o(N,q)&&Object.defineProperty(N,q,{enumerable:!0,get:Z[q]})},n.o=(N,Z)=>Object.prototype.hasOwnProperty.call(N,Z);var r$1={};(()=>{n.d(r$1,{v6:()=>N.setConfig,k$:()=>N.getLocation,SG:()=>N.getH5Location,Qf:()=>N.getIpLocation,Mc:()=>N.searchList,kr:()=>N.searchCodeAddress,Gp:()=>N.searchAddress,I5:()=>N.searchCodeDetail,ZP:()=>Z});var N=n(782);const Z={setConfig:N.setConfig,getLocation:N.getLocation,getH5Location:N.getH5Location,getIpLocation:N.getIpLocation,searchList:N.searchList,searchCodeAddress:N.searchCodeAddress,searchAddress:N.searchAddress,searchCodeDetail:N.searchCodeDetail}})(),r$1.ZP,r$1.SG,r$1.Qf,r$1.k$,r$1.Gp,r$1.kr,r$1.I5,r$1.Mc,r$1.v6;const createMutedAudioStream=N=>{const Z=N.createOscillator();Z.type="sine",Z.frequency.setValueAtTime(0,N.currentTime);const q=N.createGain();q.gain.value=0,Z.connect(q),q.connect(N.destination),Z.start();const J=N.createMediaStreamDestination();return q.disconnect(),Z.connect(J),J.stream},createFakeVideoStream=(N=10,Z=10,q=30)=>{const J=document.createElement("canvas"),I=J.getContext("2d");J.width=N,J.height=Z;let D=0;return setInterval(()=>{I.clearRect(0,0,J.width,J.height);const F=I.createLinearGradient(0,0,J.width,J.height);F.addColorStop(0,`hsla(${D}, 100%, 50%, 0)`),F.addColorStop(1,`hsla(${D+120}, 100%, 50%, 0)`),I.fillStyle=F,I.fillRect(0,0,J.width,J.height),D=(D+1)%360},100),J.captureStream(q)};var E=Object.defineProperty,$=N=>{throw TypeError(N)},j=(N,Z,q)=>Z in N?E(N,Z,{enumerable:!0,configurable:!0,writable:!0,value:q}):N[Z]=q,u=(N,Z,q)=>j(N,typeof Z!="symbol"?Z+"":Z,q),B=(N,Z,q)=>Z.has(N)||$("Cannot "+q),o=(N,Z,q)=>(B(N,Z,"read from private field"),q?q.call(N):Z.get(N)),k=(N,Z,q)=>Z.has(N)?$("Cannot add the same private member more than once"):Z instanceof WeakSet?Z.add(N):Z.set(N,q),g$1=(N,Z,q,J)=>(B(N,Z,"write to private field"),Z.set(N,q),q),C=(N,Z,q,J)=>({set _(I){g$1(N,Z,I)},get _(){return o(N,Z,J)}}),d,r,c,m$1;class Y{constructor(Z,q={}){k(this,d,{debug:!1}),k(this,r,new Map),k(this,c,new Map),k(this,m$1,0),u(this,"setCondition",async(J,I)=>{if(!o(this,r).has(J))throw new Error("You have set an incorrect condition. If this is necessary, you need to define it first during instantiation.");const D=o(this,r).get(J);o(this,r).set(J,I),D===!1&&I&&await this.executeTasks()}),u(this,"createTask",async J=>{const I={describe:"",strict:!1,timeout:0,success:async ue=>{},fail:async ue=>{},complete:async()=>{},...J},{describe:D,strict:a,timeout:O,conditionKeys:F,changeConditionKeys:z=[],func:K,success:te,fail:ne,complete:ee}=I,re=`${C(this,m$1)._++}`,ce=()=>{let ue=!0;for(const _e of F)if(!o(this,r).get(_e)){ue=!1;break}return ue};let oe=0;const se=()=>{o(this,d).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;",`------->pr-task-queue: task ${D} (${re}) end`),o(this,c).delete(re)},fe=async()=>{if(!o(this,c).get(re)||ge.runing)return;ge.runing=!0;for(const pe of z)this.setCondition(pe,!1);o(this,d).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;",`------->pr-task-queue: task ${D} (${re}) run`);const ue=ge.func(),_e=new Promise((pe,ye)=>{O&&(oe=setTimeout(()=>{ye(`task: ${re} (${D}) is timeout.`)},O))});return Promise.race([ue,_e]).finally(()=>{ge.strict===!1&&ge.clear(),clearTimeout(oe),ge.runing=!1,ee()}).then(pe=>{te(pe)}).catch(pe=>{ne(pe)})},ge={key:re,describe:D,strict:a,conditionKeys:F,runing:!1,func:K,checkAccord:ce,success:te,fail:ne,complete:ee,run:fe,retry:()=>(ge.runing=!1,fe()),clear:se};return o(this,c).set(re,ge),ge.checkAccord()&&setTimeout(()=>ge.run(),0),ge}),u(this,"executeTasks",async()=>{const J=[...o(this,c).values()];for(const I of J)I.checkAccord()&&I.run()}),u(this,"clear",(J=[])=>{if(J.length===0){g$1(this,c,new Map);return}for(const I of J)o(this,c).delete(I)}),u(this,"getConditions",()=>Object.fromEntries(o(this,r))),u(this,"getTasks",()=>o(this,c));for(const J of Z)o(this,r).set(J,!0);g$1(this,d,{debug:!1,...q})}}d=new WeakMap,r=new WeakMap,c=new WeakMap,m$1=new WeakMap;class NetworkQualityTester{constructor(Z=[]){Ee(this,"targetUrls",[]);Ee(this,"results",[]);Z.length===0&&Z.push("https://api.pryun.vip/favicon-32x32.png"),this.targetUrls=Z,this.results=[]}async testAll(){const Z=this.targetUrls.map(q=>this.testUrl(q));return await Promise.all(Z),this.analyzeResults()}async testUrl(Z){const q=performance.now();let J=0,I=!1;try{await fetch(Z,{method:"HEAD",cache:"no-store"});const D=performance.now()-q,a=performance.now(),F=await(await fetch(Z,{cache:"no-store"})).blob(),z=performance.now()-a;J=F.size,I=!0,this.results.push({url:Z,success:I,headTime:D,getTime:z,size:J,downloadSpeed:J>0?(J/1024/(z/1e3)).toFixed(2):0,totalTime:performance.now()-q})}catch(D){this.results.push({url:Z,success:!1,error:D.message,totalTime:performance.now()-q})}}analyzeResults(){const Z=this.results.filter(D=>D.success);if(Z.length===0)return{overallSuccess:!1,message:"所有测试均失败"};const q=Z.reduce((D,a)=>D+a.size,0),J=Z.reduce((D,a)=>D+a.totalTime,0),I=Z.reduce((D,a)=>D+parseFloat(a.downloadSpeed),0)/Z.length;return{overallSuccess:!0,totalTests:this.results.length,successfulTests:Z.length,averageDownloadSpeed:`${I.toFixed(2)} KB/s`,averageResponseTime:`${(J/Z.length).toFixed(2)}ms`,totalDataTransferred:`${(q/1024).toFixed(2)} KB`,detailedResults:this.results}}}var lib={},ebml={},EBML={},hasRequiredEBML;function requireEBML(){return hasRequiredEBML||(hasRequiredEBML=1,Object.defineProperty(EBML,"__esModule",{value:!0})),EBML}var EBMLDecoder={},int64Buffer={},hasRequiredInt64Buffer;function requireInt64Buffer(){return hasRequiredInt64Buffer||(hasRequiredInt64Buffer=1,function(N){(function(Z){var q="undefined",J=q!==typeof Buffer&&Buffer,I=q!==typeof Uint8Array&&Uint8Array,D=q!==typeof ArrayBuffer&&ArrayBuffer,a=[0,0,0,0,0,0,0,0],O=Array.isArray||pe,F=4294967296,z=16777216,K;te("Uint64BE",!0,!0),te("Int64BE",!0,!1),te("Uint64LE",!1,!0),te("Int64LE",!1,!1);function te(ye,we,Ie){var be=we?0:4,Se=we?4:0,Me=we?0:3,We=we?1:2,Je=we?2:1,Le=we?3:0,Tt=we?fe:ue,Et=we?ge:_e,At=_t.prototype,jt="is"+ye,Pt="_"+jt;return At.buffer=void 0,At.offset=0,At[Pt]=!0,At.toNumber=Pe,At.toString=it,At.toJSON=Pe,At.toArray=ne,J&&(At.toBuffer=ee),I&&(At.toArrayBuffer=re),_t[jt]=rt,Z[ye]=_t,_t;function _t(nt,et,ot,st){return this instanceof _t?Vt(this,nt,et,ot,st):new _t(nt,et,ot,st)}function rt(nt){return!!(nt&&nt[Pt])}function Vt(nt,et,ot,st,gt){if(I&&D&&(et instanceof D&&(et=new I(et)),st instanceof D&&(st=new I(st))),!et&&!ot&&!st&&!K){nt.buffer=se(a,0);return}if(!ce(et,ot)){var Dt=K||Array;gt=ot,st=et,ot=0,et=K===J?J.alloc(8):new Dt(8)}nt.buffer=et,nt.offset=ot|=0,q!==typeof st&&(typeof st=="string"?Rt(et,ot,st,gt||10):ce(st,gt)?oe(et,ot,st,gt):typeof gt=="number"?(zt(et,ot+be,st),zt(et,ot+Se,gt)):st>0?Tt(et,ot,st):st<0?Et(et,ot,st):oe(et,ot,a,0))}function Rt(nt,et,ot,st){var gt=0,Dt=ot.length,Ut=0,Lt=0;ot[0]==="-"&&gt++;for(var Zt=gt;gt<Dt;){var Kt=parseInt(ot[gt++],st);if(!(Kt>=0))break;Lt=Lt*st+Kt,Ut=Ut*st+Math.floor(Lt/F),Lt%=F}Zt&&(Ut=~Ut,Lt?Lt=F-Lt:Ut++),zt(nt,et+be,Ut),zt(nt,et+Se,Lt)}function Pe(){var nt=this.buffer,et=this.offset,ot=Bt(nt,et+be),st=Bt(nt,et+Se);return Ie||(ot|=0),ot?ot*F+st:st}function it(nt){var et=this.buffer,ot=this.offset,st=Bt(et,ot+be),gt=Bt(et,ot+Se),Dt="",Ut=!Ie&&st&2147483648;for(Ut&&(st=~st,gt=F-gt),nt=nt||10;;){var Lt=st%nt*F+gt;if(st=Math.floor(st/nt),gt=Math.floor(Lt/nt),Dt=(Lt%nt).toString(nt)+Dt,!st&&!gt)break}return Ut&&(Dt="-"+Dt),Dt}function zt(nt,et,ot){nt[et+Le]=ot&255,ot=ot>>8,nt[et+Je]=ot&255,ot=ot>>8,nt[et+We]=ot&255,ot=ot>>8,nt[et+Me]=ot&255}function Bt(nt,et){return nt[et+Me]*z+(nt[et+We]<<16)+(nt[et+Je]<<8)+nt[et+Le]}}function ne(ye){var we=this.buffer,Ie=this.offset;return K=null,ye!==!1&&O(we)?we.length===8?we:we.slice(Ie,Ie+8):se(we,Ie)}function ee(ye){var we=this.buffer,Ie=this.offset;return K=J,ye!==!1&&J.isBuffer(we)?we.length===8?we:we.slice(Ie,Ie+8):J.from(re.call(this,ye))}function re(ye){var we=this.buffer,Ie=this.offset,be=we.buffer;if(K=I,ye!==!1&&!we.offset&&be instanceof D)return be.byteLength===8?be:be.slice(Ie,Ie+8);var Se=new I(8);return oe(Se,0,we,Ie),Se.buffer}function ce(ye,we){var Ie=ye&&ye.length;return we|=0,Ie&&we+8<=Ie&&typeof ye[we]!="string"}function oe(ye,we,Ie,be){we|=0,be|=0;for(var Se=0;Se<8;Se++)ye[we++]=Ie[be++]&255}function se(ye,we){return Array.prototype.slice.call(ye,we,we+8)}function fe(ye,we,Ie){for(var be=we+8;be>we;)ye[--be]=Ie&255,Ie/=256}function ge(ye,we,Ie){var be=we+8;for(Ie++;be>we;)ye[--be]=-Ie&255^255,Ie/=256}function ue(ye,we,Ie){for(var be=we+8;we<be;)ye[we++]=Ie&255,Ie/=256}function _e(ye,we,Ie){var be=we+8;for(Ie++;we<be;)ye[we++]=-Ie&255^255,Ie/=256}function pe(ye){return!!ye&&Object.prototype.toString.call(ye)=="[object Array]"}})(typeof N.nodeName!="string"?N:int64Buffer||{})}(int64Buffer)),int64Buffer}var tools={},EBMLEncoder={},ebmlID={},hasRequiredEbmlID;function requireEbmlID(){return hasRequiredEbmlID||(hasRequiredEbmlID=1,Object.defineProperty(ebmlID,"__esModule",{value:!0}),ebmlID.byEbmlID=void 0,ebmlID.byEbmlID={128:{name:"ChapterDisplay",level:4,type:"m",multiple:!0,minver:1,webm:!0,description:"Contains all possible strings to use for the chapter display."},131:{name:"TrackType",level:3,type:"u",mandatory:!0,minver:1,range:"1-254",description:"A set of track types coded on 8 bits (1: video, 2: audio, 3: complex, 0x10: logo, 0x11: subtitle, 0x12: buttons, 0x20: control)."},133:{name:"ChapString",cppname:"ChapterString",level:5,type:"8",mandatory:!0,minver:1,webm:!0,description:"Contains the string to use as the chapter atom."},134:{name:"CodecID",level:3,type:"s",mandatory:!0,minver:1,description:"An ID corresponding to the codec, see the codec page for more info."},136:{name:"FlagDefault",cppname:"TrackFlagDefault",level:3,type:"u",mandatory:!0,minver:1,default:1,range:"0-1",description:"Set if that track (audio, video or subs) SHOULD be active if no language found matches the user preference. (1 bit)"},137:{name:"ChapterTrackNumber",level:5,type:"u",mandatory:!0,multiple:!0,minver:1,webm:!1,range:"not 0",description:"UID of the Track to apply this chapter too. In the absense of a control track, choosing this chapter will select the listed Tracks and deselect unlisted tracks. Absense of this element indicates that the Chapter should be applied to any currently used Tracks."},145:{name:"ChapterTimeStart",level:4,type:"u",mandatory:!0,minver:1,webm:!0,description:"Timestamp of the start of Chapter (not scaled)."},146:{name:"ChapterTimeEnd",level:4,type:"u",minver:1,webm:!1,description:"Timestamp of the end of Chapter (timestamp excluded, not scaled)."},150:{name:"CueRefTime",level:5,type:"u",mandatory:!0,minver:2,webm:!1,description:"Timestamp of the referenced Block."},151:{name:"CueRefCluster",level:5,type:"u",mandatory:!0,webm:!1,description:"The Position of the Cluster containing the referenced Block."},152:{name:"ChapterFlagHidden",level:4,type:"u",mandatory:!0,minver:1,webm:!1,default:0,range:"0-1",description:"If a chapter is hidden (1), it should not be available to the user interface (but still to Control Tracks; see flag notes). (1 bit)"},16980:{name:"ContentCompAlgo",level:6,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"The compression algorithm used. Algorithms that have been specified so far are: 0 - zlib, 3 - Header Stripping"},16981:{name:"ContentCompSettings",level:6,type:"b",minver:1,webm:!1,description:"Settings that might be needed by the decompressor. For Header Stripping (ContentCompAlgo=3), the bytes that were removed from the beggining of each frames of the track."},17026:{name:"DocType",level:1,type:"s",mandatory:!0,default:"matroska",minver:1,description:"A string that describes the type of document that follows this EBML header. 'matroska' in our case or 'webm' for webm files."},17029:{name:"DocTypeReadVersion",level:1,type:"u",mandatory:!0,default:1,minver:1,description:"The minimum DocType version an interpreter has to support to read this file."},17030:{name:"EBMLVersion",level:1,type:"u",mandatory:!0,default:1,minver:1,description:"The version of EBML parser used to create the file."},17031:{name:"DocTypeVersion",level:1,type:"u",mandatory:!0,default:1,minver:1,description:"The version of DocType interpreter used to create the file."},17476:{name:"SegmentFamily",level:2,type:"b",multiple:!0,minver:1,webm:!1,bytesize:16,description:"A randomly generated unique ID that all segments related to each other must use (128 bits)."},17505:{name:"DateUTC",level:2,type:"d",minver:1,description:"Date of the origin of timestamp (value 0), i.e. production date."},17540:{name:"TagDefault",level:4,type:"u",mandatory:!0,minver:1,webm:!1,default:1,range:"0-1",description:"Indication to know if this is the default/original language to use for the given tag. (1 bit)"},17541:{name:"TagBinary",level:4,type:"b",minver:1,webm:!1,description:"The values of the Tag if it is binary. Note that this cannot be used in the same SimpleTag as TagString."},17543:{name:"TagString",level:4,type:"8",minver:1,webm:!1,description:"The value of the Element."},17545:{name:"Duration",level:2,type:"f",minver:1,range:"> 0",description:"Duration of the segment (based on TimecodeScale)."},17816:{name:"ChapterFlagEnabled",level:4,type:"u",mandatory:!0,minver:1,webm:!1,default:1,range:"0-1",description:"Specify wether the chapter is enabled. It can be enabled/disabled by a Control Track. When disabled, the movie should skip all the content between the TimeStart and TimeEnd of this chapter (see flag notes). (1 bit)"},18016:{name:"FileMimeType",level:3,type:"s",mandatory:!0,minver:1,webm:!1,description:"MIME type of the file."},18017:{name:"FileUsedStartTime",level:3,type:"u",divx:!0,description:"DivX font extension"},18018:{name:"FileUsedEndTime",level:3,type:"u",divx:!0,description:"DivX font extension"},18037:{name:"FileReferral",level:3,type:"b",webm:!1,description:"A binary value that a track/codec can refer to when the attachment is needed."},20529:{name:"ContentEncodingOrder",level:5,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"Tells when this modification was used during encoding/muxing starting with 0 and counting upwards. The decoder/demuxer has to start with the highest order number it finds and work its way down. This value has to be unique over all ContentEncodingOrder elements in the segment."},20530:{name:"ContentEncodingScope",level:5,type:"u",mandatory:!0,minver:1,webm:!1,default:1,range:"not 0",description:"A bit field that describes which elements have been modified in this way. Values (big endian) can be OR'ed. Possible values: 1 - all frame contents, 2 - the track's private data, 4 - the next ContentEncoding (next ContentEncodingOrder. Either the data inside ContentCompression and/or ContentEncryption)"},20531:{name:"ContentEncodingType",level:5,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"A value describing what kind of transformation has been done. Possible values: 0 - compression, 1 - encryption"},20532:{name:"ContentCompression",level:5,type:"m",minver:1,webm:!1,description:"Settings describing the compression used. Must be present if the value of ContentEncodingType is 0 and absent otherwise. Each block must be decompressable even if no previous block is available in order not to prevent seeking."},20533:{name:"ContentEncryption",level:5,type:"m",minver:1,webm:!1,description:"Settings describing the encryption used. Must be present if the value of ContentEncodingType is 1 and absent otherwise."},21368:{name:"CueBlockNumber",level:4,type:"u",minver:1,default:1,range:"not 0",description:"Number of the Block in the specified Cluster."},22100:{name:"ChapterStringUID",level:4,type:"8",mandatory:!1,minver:3,webm:!0,description:"A unique string ID to identify the Chapter. Use for WebVTT cue identifier storage."},22337:{name:"WritingApp",level:2,type:"8",mandatory:!0,minver:1,description:'Writing application ("mkvmerge-0.3.3").'},22612:{name:"SilentTracks",cppname:"ClusterSilentTracks",level:2,type:"m",minver:1,webm:!1,description:"The list of tracks that are not used in that part of the stream. It is useful when using overlay tracks on seeking. Then you should decide what track to use."},25152:{name:"ContentEncoding",level:4,type:"m",mandatory:!0,multiple:!0,minver:1,webm:!1,description:"Settings for one content encoding like compression or encryption."},25188:{name:"BitDepth",cppname:"AudioBitDepth",level:4,type:"u",minver:1,range:"not 0",description:"Bits per sample, mostly used for PCM."},25906:{name:"SignedElement",level:3,type:"b",multiple:!0,webm:!1,description:"An element ID whose data will be used to compute the signature."},26148:{name:"TrackTranslate",level:3,type:"m",multiple:!0,minver:1,webm:!1,description:"The track identification for the given Chapter Codec."},26897:{name:"ChapProcessCommand",cppname:"ChapterProcessCommand",level:5,type:"m",multiple:!0,minver:1,webm:!1,description:"Contains all the commands associated to the Atom."},26914:{name:"ChapProcessTime",cppname:"ChapterProcessTime",level:6,type:"u",mandatory:!0,minver:1,webm:!1,description:"Defines when the process command should be handled (0: during the whole chapter, 1: before starting playback, 2: after playback of the chapter)."},26916:{name:"ChapterTranslate",level:2,type:"m",multiple:!0,minver:1,webm:!1,description:"A tuple of corresponding ID used by chapter codecs to represent this segment."},26931:{name:"ChapProcessData",cppname:"ChapterProcessData",level:6,type:"b",mandatory:!0,minver:1,webm:!1,description:"Contains the command information. The data should be interpreted depending on the ChapProcessCodecID value. For ChapProcessCodecID = 1, the data correspond to the binary DVD cell pre/post commands."},26948:{name:"ChapProcess",cppname:"ChapterProcess",level:4,type:"m",multiple:!0,minver:1,webm:!1,description:"Contains all the commands associated to the Atom."},26965:{name:"ChapProcessCodecID",cppname:"ChapterProcessCodecID",level:5,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"Contains the type of the codec used for the processing. A value of 0 means native Matroska processing (to be defined), a value of 1 means the DVD command set is used. More codec IDs can be added later."},29555:{name:"Tag",level:2,type:"m",mandatory:!0,multiple:!0,minver:1,webm:!1,description:"Element containing elements specific to Tracks/Chapters."},29572:{name:"SegmentFilename",level:2,type:"8",minver:1,webm:!1,description:"A filename corresponding to this segment."},29766:{name:"AttachmentLink",cppname:"TrackAttachmentLink",level:3,type:"u",minver:1,webm:!1,range:"not 0",description:"The UID of an attachment that is used by this codec."},2459272:{name:"CodecName",level:3,type:"8",minver:1,description:"A human-readable string specifying the codec."},408125543:{name:"Segment",level:"0",type:"m",mandatory:!0,multiple:!0,minver:1,description:"This element contains all other top-level (level 1) elements. Typically a Matroska file is composed of 1 segment."},17530:{name:"TagLanguage",level:4,type:"s",mandatory:!0,minver:1,webm:!1,default:"und",description:"Specifies the language of the tag specified, in the Matroska languages form."},17827:{name:"TagName",level:4,type:"8",mandatory:!0,minver:1,webm:!1,description:"The name of the Tag that is going to be stored."},26568:{name:"SimpleTag",cppname:"TagSimple",level:3,recursive:"1",type:"m",mandatory:!0,multiple:!0,minver:1,webm:!1,description:"Contains general information about the target."},25542:{name:"TagAttachmentUID",level:4,type:"u",multiple:!0,minver:1,webm:!1,default:0,description:"A unique ID to identify the Attachment(s) the tags belong to. If the value is 0 at this level, the tags apply to all the attachments in the Segment."},25540:{name:"TagChapterUID",level:4,type:"u",multiple:!0,minver:1,webm:!1,default:0,description:"A unique ID to identify the Chapter(s) the tags belong to. If the value is 0 at this level, the tags apply to all chapters in the Segment."},25545:{name:"TagEditionUID",level:4,type:"u",multiple:!0,minver:1,webm:!1,default:0,description:"A unique ID to identify the EditionEntry(s) the tags belong to. If the value is 0 at this level, the tags apply to all editions in the Segment."},25541:{name:"TagTrackUID",level:4,type:"u",multiple:!0,minver:1,webm:!1,default:0,description:"A unique ID to identify the Track(s) the tags belong to. If the value is 0 at this level, the tags apply to all tracks in the Segment."},25546:{name:"TargetType",cppname:"TagTargetType",level:4,type:"s",minver:1,webm:!1,strong:"informational",description:'An string that can be used to display the logical level of the target like "ALBUM", "TRACK", "MOVIE", "CHAPTER", etc (see TargetType).'},26826:{name:"TargetTypeValue",cppname:"TagTargetTypeValue",level:4,type:"u",minver:1,webm:!1,default:50,description:"A number to indicate the logical level of the target (see TargetType)."},25536:{name:"Targets",cppname:"TagTargets",level:3,type:"m",mandatory:!0,minver:1,webm:!1,description:"Contain all UIDs where the specified meta data apply. It is empty to describe everything in the segment."},307544935:{name:"Tags",level:1,type:"m",multiple:!0,minver:1,webm:!1,description:"Element containing elements specific to Tracks/Chapters. A list of valid tags can be found here."},17677:{name:"ChapProcessPrivate",cppname:"ChapterProcessPrivate",level:5,type:"b",minver:1,webm:!1,description:'Some optional data attached to the ChapProcessCodecID information. For ChapProcessCodecID = 1, it is the "DVD level" equivalent.'},17278:{name:"ChapCountry",cppname:"ChapterCountry",level:5,type:"s",multiple:!0,minver:1,webm:!1,description:"The countries corresponding to the string, same 2 octets as in Internet domains."},17276:{name:"ChapLanguage",cppname:"ChapterLanguage",level:5,type:"s",mandatory:!0,multiple:!0,minver:1,webm:!0,default:"eng",description:"The languages corresponding to the string, in the bibliographic ISO-639-2 form."},143:{name:"ChapterTrack",level:4,type:"m",minver:1,webm:!1,description:"List of tracks on which the chapter applies. If this element is not present, all tracks apply"},25539:{name:"ChapterPhysicalEquiv",level:4,type:"u",minver:1,webm:!1,description:'Specify the physical equivalent of this ChapterAtom like "DVD" (60) or "SIDE" (50), see complete list of values.'},28348:{name:"ChapterSegmentEditionUID",level:4,type:"u",minver:1,webm:!1,range:"not 0",description:"The EditionUID to play from the segment linked in ChapterSegmentUID."},28263:{name:"ChapterSegmentUID",level:4,type:"b",minver:1,webm:!1,range:">0",bytesize:16,description:"A segment to play in place of this chapter. Edition ChapterSegmentEditionUID should be used for this segment, otherwise no edition is used."},29636:{name:"ChapterUID",level:4,type:"u",mandatory:!0,minver:1,webm:!0,range:"not 0",description:"A unique ID to identify the Chapter."},182:{name:"ChapterAtom",level:3,recursive:"1",type:"m",mandatory:!0,multiple:!0,minver:1,webm:!0,description:"Contains the atom information to use as the chapter atom (apply to all tracks)."},17885:{name:"EditionFlagOrdered",level:3,type:"u",minver:1,webm:!1,default:0,range:"0-1",description:"Specify if the chapters can be defined multiple times and the order to play them is enforced. (1 bit)"},17883:{name:"EditionFlagDefault",level:3,type:"u",mandatory:!0,minver:1,webm:!1,default:0,range:"0-1",description:"If a flag is set (1) the edition should be used as the default one. (1 bit)"},17853:{name:"EditionFlagHidden",level:3,type:"u",mandatory:!0,minver:1,webm:!1,default:0,range:"0-1",description:"If an edition is hidden (1), it should not be available to the user interface (but still to Control Tracks; see flag notes). (1 bit)"},17852:{name:"EditionUID",level:3,type:"u",minver:1,webm:!1,range:"not 0",description:"A unique ID to identify the edition. It's useful for tagging an edition."},17849:{name:"EditionEntry",level:2,type:"m",mandatory:!0,multiple:!0,minver:1,webm:!0,description:"Contains all information about a segment edition."},272869232:{name:"Chapters",level:1,type:"m",minver:1,webm:!0,description:"A system to define basic menus and partition data. For more detailed information, look at the Chapters Explanation."},18094:{name:"FileUID",level:3,type:"u",mandatory:!0,minver:1,webm:!1,range:"not 0",description:"Unique ID representing the file, as random as possible."},18012:{name:"FileData",level:3,type:"b",mandatory:!0,minver:1,webm:!1,description:"The data of the file."},18030:{name:"FileName",level:3,type:"8",mandatory:!0,minver:1,webm:!1,description:"Filename of the attached file."},18046:{name:"FileDescription",level:3,type:"8",minver:1,webm:!1,description:"A human-friendly name for the attached file."},24999:{name:"AttachedFile",level:2,type:"m",mandatory:!0,multiple:!0,minver:1,webm:!1,description:"An attached file."},423732329:{name:"Attachments",level:1,type:"m",minver:1,webm:!1,description:"Contain attached files."},235:{name:"CueRefCodecState",level:5,type:"u",webm:!1,default:0,description:"The position of the Codec State corresponding to this referenced element. 0 means that the data is taken from the initial Track Entry."},21343:{name:"CueRefNumber",level:5,type:"u",webm:!1,default:1,range:"not 0",description:"Number of the referenced Block of Track X in the specified Cluster."},219:{name:"CueReference",level:4,type:"m",multiple:!0,minver:2,webm:!1,description:"The Clusters containing the required referenced Blocks."},234:{name:"CueCodecState",level:4,type:"u",minver:2,webm:!1,default:0,description:"The position of the Codec State corresponding to this Cue element. 0 means that the data is taken from the initial Track Entry."},178:{name:"CueDuration",level:4,type:"u",mandatory:!1,minver:4,webm:!1,description:"The duration of the block according to the segment time base. If missing the track's DefaultDuration does not apply and no duration information is available in terms of the cues."},240:{name:"CueRelativePosition",level:4,type:"u",mandatory:!1,minver:4,webm:!1,description:"The relative position of the referenced block inside the cluster with 0 being the first possible position for an element inside that cluster.",position:"clusterRelative"},241:{name:"CueClusterPosition",level:4,type:"u",mandatory:!0,minver:1,description:"The position of the Cluster containing the required Block.",position:"segment"},247:{name:"CueTrack",level:4,type:"u",mandatory:!0,minver:1,range:"not 0",description:"The track for which a position is given."},183:{name:"CueTrackPositions",level:3,type:"m",mandatory:!0,multiple:!0,minver:1,description:"Contain positions for different tracks corresponding to the timestamp."},179:{name:"CueTime",level:3,type:"u",mandatory:!0,minver:1,description:"Absolute timestamp according to the segment time base."},187:{name:"CuePoint",level:2,type:"m",mandatory:!0,multiple:!0,minver:1,description:"Contains all information relative to a seek point in the segment."},475249515:{name:"Cues",level:1,type:"m",minver:1,description:'A top-level element to speed seeking access. All entries are local to the segment. Should be mandatory for non "live" streams.'},18406:{name:"ContentSigHashAlgo",level:6,type:"u",minver:1,webm:!1,default:0,description:"The hash algorithm used for the signature. A value of '0' means that the contents have not been signed but only encrypted. Predefined values: 1 - SHA1-160 2 - MD5"},18405:{name:"ContentSigAlgo",level:6,type:"u",minver:1,webm:!1,default:0,description:"The algorithm used for the signature. A value of '0' means that the contents have not been signed but only encrypted. Predefined values: 1 - RSA"},18404:{name:"ContentSigKeyID",level:6,type:"b",minver:1,webm:!1,description:"This is the ID of the private key the data was signed with."},18403:{name:"ContentSignature",level:6,type:"b",minver:1,webm:!1,description:"A cryptographic signature of the contents."},18402:{name:"ContentEncKeyID",level:6,type:"b",minver:1,webm:!1,description:"For public key algorithms this is the ID of the public key the the data was encrypted with."},18401:{name:"ContentEncAlgo",level:6,type:"u",minver:1,webm:!1,default:0,description:"The encryption algorithm used. The value '0' means that the contents have not been encrypted but only signed. Predefined values: 1 - DES, 2 - 3DES, 3 - Twofish, 4 - Blowfish, 5 - AES"},28032:{name:"ContentEncodings",level:3,type:"m",minver:1,webm:!1,description:"Settings for several content encoding mechanisms like compression or encryption."},196:{name:"TrickMasterTrackSegmentUID",level:3,type:"b",divx:!0,bytesize:16,description:"DivX trick track extenstions"},199:{name:"TrickMasterTrackUID",level:3,type:"u",divx:!0,description:"DivX trick track extenstions"},198:{name:"TrickTrackFlag",level:3,type:"u",divx:!0,default:0,description:"DivX trick track extenstions"},193:{name:"TrickTrackSegmentUID",level:3,type:"b",divx:!0,bytesize:16,description:"DivX trick track extenstions"},192:{name:"TrickTrackUID",level:3,type:"u",divx:!0,description:"DivX trick track extenstions"},237:{name:"TrackJoinUID",level:5,type:"u",mandatory:!0,multiple:!0,minver:3,webm:!1,range:"not 0",description:"The trackUID number of a track whose blocks are used to create this virtual track."},233:{name:"TrackJoinBlocks",level:4,type:"m",minver:3,webm:!1,description:"Contains the list of all tracks whose Blocks need to be combined to create this virtual track"},230:{name:"TrackPlaneType",level:6,type:"u",mandatory:!0,minver:3,webm:!1,description:"The kind of plane this track corresponds to (0: left eye, 1: right eye, 2: background)."},229:{name:"TrackPlaneUID",level:6,type:"u",mandatory:!0,minver:3,webm:!1,range:"not 0",description:"The trackUID number of the track representing the plane."},228:{name:"TrackPlane",level:5,type:"m",mandatory:!0,multiple:!0,minver:3,webm:!1,description:"Contains a video plane track that need to be combined to create this 3D track"},227:{name:"TrackCombinePlanes",level:4,type:"m",minver:3,webm:!1,description:"Contains the list of all video plane tracks that need to be combined to create this 3D track"},226:{name:"TrackOperation",level:3,type:"m",minver:3,webm:!1,description:"Operation that needs to be applied on tracks to create this virtual track. For more details look at the Specification Notes on the subject."},32123:{name:"ChannelPositions",cppname:"AudioPosition",level:4,type:"b",webm:!1,description:"Table of horizontal angles for each successive channel, see appendix."},159:{name:"Channels",cppname:"AudioChannels",level:4,type:"u",mandatory:!0,minver:1,default:1,range:"not 0",description:"Numbers of channels in the track."},30901:{name:"OutputSamplingFrequency",cppname:"AudioOutputSamplingFreq",level:4,type:"f",minver:1,default:"Sampling Frequency",range:"> 0",description:"Real output sampling frequency in Hz (used for SBR techniques)."},181:{name:"SamplingFrequency",cppname:"AudioSamplingFreq",level:4,type:"f",mandatory:!0,minver:1,default:8e3,range:"> 0",description:"Sampling frequency in Hz."},225:{name:"Audio",cppname:"TrackAudio",level:3,type:"m",minver:1,description:"Audio settings."},2327523:{name:"FrameRate",cppname:"VideoFrameRate",level:4,type:"f",range:"> 0",strong:"Informational",description:"Number of frames per second. only."},3126563:{name:"GammaValue",cppname:"VideoGamma",level:4,type:"f",webm:!1,range:"> 0",description:"Gamma Value."},3061028:{name:"ColourSpace",cppname:"VideoColourSpace",level:4,type:"b",minver:1,webm:!1,bytesize:4,description:"Same value as in AVI (32 bits)."},21683:{name:"AspectRatioType",cppname:"VideoAspectRatio",level:4,type:"u",minver:1,default:0,description:"Specify the possible modifications to the aspect ratio (0: free resizing, 1: keep aspect ratio, 2: fixed)."},21682:{name:"DisplayUnit",cppname:"VideoDisplayUnit",level:4,type:"u",minver:1,default:0,description:"How DisplayWidth & DisplayHeight should be interpreted (0: pixels, 1: centimeters, 2: inches, 3: Display Aspect Ratio)."},21690:{name:"DisplayHeight",cppname:"VideoDisplayHeight",level:4,type:"u",minver:1,default:"PixelHeight",range:"not 0",description:"Height of the video frames to display. The default value is only valid when DisplayUnit is 0."},21680:{name:"DisplayWidth",cppname:"VideoDisplayWidth",level:4,type:"u",minver:1,default:"PixelWidth",range:"not 0",description:"Width of the video frames to display. The default value is only valid when DisplayUnit is 0."},21725:{name:"PixelCropRight",cppname:"VideoPixelCropRight",level:4,type:"u",minver:1,default:0,description:"The number of video pixels to remove on the right of the image."},21708:{name:"PixelCropLeft",cppname:"VideoPixelCropLeft",level:4,type:"u",minver:1,default:0,description:"The number of video pixels to remove on the left of the image."},21691:{name:"PixelCropTop",cppname:"VideoPixelCropTop",level:4,type:"u",minver:1,default:0,description:"The number of video pixels to remove at the top of the image."},21674:{name:"PixelCropBottom",cppname:"VideoPixelCropBottom",level:4,type:"u",minver:1,default:0,description:"The number of video pixels to remove at the bottom of the image (for HDTV content)."},186:{name:"PixelHeight",cppname:"VideoPixelHeight",level:4,type:"u",mandatory:!0,minver:1,range:"not 0",description:"Height of the encoded video frames in pixels."},176:{name:"PixelWidth",cppname:"VideoPixelWidth",level:4,type:"u",mandatory:!0,minver:1,range:"not 0",description:"Width of the encoded video frames in pixels."},21433:{name:"OldStereoMode",level:4,type:"u",maxver:"0",webm:!1,divx:!1,description:"DEPRECATED, DO NOT USE. Bogus StereoMode value used in old versions of libmatroska. (0: mono, 1: right eye, 2: left eye, 3: both eyes)."},21440:{name:"AlphaMode",cppname:"VideoAlphaMode",level:4,type:"u",minver:3,webm:!0,default:0,description:"Alpha Video Mode. Presence of this element indicates that the BlockAdditional element could contain Alpha data."},21432:{name:"StereoMode",cppname:"VideoStereoMode",level:4,type:"u",minver:3,webm:!0,default:0,description:"Stereo-3D video mode (0: mono, 1: side by side (left eye is first), 2: top-bottom (right eye is first), 3: top-bottom (left eye is first), 4: checkboard (right is first), 5: checkboard (left is first), 6: row interleaved (right is first), 7: row interleaved (left is first), 8: column interleaved (right is first), 9: column interleaved (left is first), 10: anaglyph (cyan/red), 11: side by side (right eye is first), 12: anaglyph (green/magenta), 13 both eyes laced in one Block (left eye is first), 14 both eyes laced in one Block (right eye is first)) . There are some more details on 3D support in the Specification Notes."},154:{name:"FlagInterlaced",cppname:"VideoFlagInterlaced",level:4,type:"u",mandatory:!0,minver:2,webm:!0,default:0,range:"0-1",description:"Set if the video is interlaced. (1 bit)"},224:{name:"Video",cppname:"TrackVideo",level:3,type:"m",minver:1,description:"Video settings."},26277:{name:"TrackTranslateTrackID",level:4,type:"b",mandatory:!0,minver:1,webm:!1,description:"The binary value used to represent this track in the chapter codec data. The format depends on the ChapProcessCodecID used."},26303:{name:"TrackTranslateCodec",level:4,type:"u",mandatory:!0,minver:1,webm:!1,description:"The chapter codec using this ID (0: Matroska Script, 1: DVD-menu)."},26364:{name:"TrackTranslateEditionUID",level:4,type:"u",multiple:!0,minver:1,webm:!1,description:"Specify an edition UID on which this translation applies. When not specified, it means for all editions found in the segment."},22203:{name:"SeekPreRoll",level:3,type:"u",mandatory:!0,multiple:!1,default:0,minver:4,webm:!0,description:"After a discontinuity, SeekPreRoll is the duration in nanoseconds of the data the decoder must decode before the decoded data is valid."},22186:{name:"CodecDelay",level:3,type:"u",multiple:!1,default:0,minver:4,webm:!0,description:"CodecDelay is The codec-built-in delay in nanoseconds. This value must be subtracted from each block timestamp in order to get the actual timestamp. The value should be small so the muxing of tracks with the same actual timestamp are in the same Cluster."},28587:{name:"TrackOverlay",level:3,type:"u",multiple:!0,minver:1,webm:!1,description:"Specify that this track is an overlay track for the Track specified (in the u-integer). That means when this track has a gap (see SilentTracks) the overlay track should be used instead. The order of multiple TrackOverlay matters, the first one is the one that should be used. If not found it should be the second, etc."},170:{name:"CodecDecodeAll",level:3,type:"u",mandatory:!0,minver:2,webm:!1,default:1,range:"0-1",description:"The codec can decode potentially damaged data (1 bit)."},2536e3:{name:"CodecDownloadURL",level:3,type:"s",multiple:!0,webm:!1,description:"A URL to download about the codec used."},3883072:{name:"CodecInfoURL",level:3,type:"s",multiple:!0,webm:!1,description:"A URL to find information about the codec used."},3839639:{name:"CodecSettings",level:3,type:"8",webm:!1,description:"A string describing the encoding setting used."},25506:{name:"CodecPrivate",level:3,type:"b",minver:1,description:"Private data only known to the codec."},2274716:{name:"Language",cppname:"TrackLanguage",level:3,type:"s",minver:1,default:"eng",description:"Specifies the language of the track in the Matroska languages form."},21358:{name:"Name",cppname:"TrackName",level:3,type:"8",minver:1,description:"A human-readable track name."},21998:{name:"MaxBlockAdditionID",level:3,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"The maximum value of BlockAdditions for this track."},21375:{name:"TrackOffset",level:3,type:"i",webm:!1,default:0,description:"A value to add to the Block's Timestamp. This can be used to adjust the playback offset of a track."},2306383:{name:"TrackTimecodeScale",level:3,type:"f",mandatory:!0,minver:1,maxver:"3",webm:!1,default:1,range:"> 0",description:"DEPRECATED, DO NOT USE. The scale to apply on this track to work at normal speed in relation with other tracks (mostly used to adjust video speed when the audio length differs)."},2313850:{name:"DefaultDecodedFieldDuration",cppname:"TrackDefaultDecodedFieldDuration",level:3,type:"u",minver:4,range:"not 0",description:`The period in nanoseconds (not scaled by TimcodeScale)
8
- between two successive fields at the output of the decoding process (see the notes)`},2352003:{name:"DefaultDuration",cppname:"TrackDefaultDuration",level:3,type:"u",minver:1,range:"not 0",description:"Number of nanoseconds (not scaled via TimecodeScale) per frame ('frame' in the Matroska sense -- one element put into a (Simple)Block)."},28152:{name:"MaxCache",cppname:"TrackMaxCache",level:3,type:"u",minver:1,webm:!1,description:"The maximum cache size required to store referenced frames in and the current frame. 0 means no cache is needed."},28135:{name:"MinCache",cppname:"TrackMinCache",level:3,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"The minimum number of frames a player should be able to cache during playback. If set to 0, the reference pseudo-cache system is not used."},156:{name:"FlagLacing",cppname:"TrackFlagLacing",level:3,type:"u",mandatory:!0,minver:1,default:1,range:"0-1",description:"Set if the track may contain blocks using lacing. (1 bit)"},21930:{name:"FlagForced",cppname:"TrackFlagForced",level:3,type:"u",mandatory:!0,minver:1,default:0,range:"0-1",description:"Set if that track MUST be active during playback. There can be many forced track for a kind (audio, video or subs), the player should select the one which language matches the user preference or the default + forced track. Overlay MAY happen between a forced and non-forced track of the same kind. (1 bit)"},185:{name:"FlagEnabled",cppname:"TrackFlagEnabled",level:3,type:"u",mandatory:!0,minver:2,webm:!0,default:1,range:"0-1",description:"Set if the track is usable. (1 bit)"},29637:{name:"TrackUID",level:3,type:"u",mandatory:!0,minver:1,range:"not 0",description:"A unique ID to identify the Track. This should be kept the same when making a direct stream copy of the Track to another file."},215:{name:"TrackNumber",level:3,type:"u",mandatory:!0,minver:1,range:"not 0",description:"The track number as used in the Block Header (using more than 127 tracks is not encouraged, though the design allows an unlimited number)."},174:{name:"TrackEntry",level:2,type:"m",mandatory:!0,multiple:!0,minver:1,description:"Describes a track with all elements."},374648427:{name:"Tracks",level:1,type:"m",multiple:!0,minver:1,description:"A top-level block of information with many tracks described."},175:{name:"EncryptedBlock",level:2,type:"b",multiple:!0,webm:!1,description:"Similar to EncryptedBlock Structure)"},202:{name:"ReferenceTimeCode",level:4,type:"u",multiple:!1,mandatory:!0,minver:0,webm:!1,divx:!0,description:"DivX trick track extenstions"},201:{name:"ReferenceOffset",level:4,type:"u",multiple:!1,mandatory:!0,minver:0,webm:!1,divx:!0,description:"DivX trick track extenstions"},200:{name:"ReferenceFrame",level:3,type:"m",multiple:!1,minver:0,webm:!1,divx:!0,description:"DivX trick track extenstions"},207:{name:"SliceDuration",level:5,type:"u",default:0,description:"The (scaled) duration to apply to the element."},206:{name:"Delay",cppname:"SliceDelay",level:5,type:"u",default:0,description:"The (scaled) delay to apply to the element."},203:{name:"BlockAdditionID",cppname:"SliceBlockAddID",level:5,type:"u",default:0,description:"The ID of the BlockAdditional element (0 is the main Block)."},205:{name:"FrameNumber",cppname:"SliceFrameNumber",level:5,type:"u",default:0,description:"The number of the frame to generate from this lace with this delay (allow you to generate many frames from the same Block/Frame)."},204:{name:"LaceNumber",cppname:"SliceLaceNumber",level:5,type:"u",minver:1,default:0,divx:!1,description:"The reverse number of the frame in the lace (0 is the last frame, 1 is the next to last, etc). While there are a few files in the wild with this element, it is no longer in use and has been deprecated. Being able to interpret this element is not required for playback."},232:{name:"TimeSlice",level:4,type:"m",multiple:!0,minver:1,divx:!1,description:"Contains extra time information about the data contained in the Block. While there are a few files in the wild with this element, it is no longer in use and has been deprecated. Being able to interpret this element is not required for playback."},142:{name:"Slices",level:3,type:"m",minver:1,divx:!1,description:"Contains slices description."},30114:{name:"DiscardPadding",level:3,type:"i",minver:4,webm:!0,description:"Duration in nanoseconds of the silent data added to the Block (padding at the end of the Block for positive value, at the beginning of the Block for negative value). The duration of DiscardPadding is not calculated in the duration of the TrackEntry and should be discarded during playback."},164:{name:"CodecState",level:3,type:"b",minver:2,webm:!1,description:"The new codec state to use. Data interpretation is private to the codec. This information should always be referenced by a seek entry."},253:{name:"ReferenceVirtual",level:3,type:"i",webm:!1,description:"Relative position of the data that should be in position of the virtual block."},251:{name:"ReferenceBlock",level:3,type:"i",multiple:!0,minver:1,description:"Timestamp of another frame used as a reference (ie: B or P frame). The timestamp is relative to the block it's attached to."},250:{name:"ReferencePriority",cppname:"FlagReferenced",level:3,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"This frame is referenced and has the specified cache priority. In cache only a frame of the same or higher priority can replace this frame. A value of 0 means the frame is not referenced."},155:{name:"BlockDuration",level:3,type:"u",minver:1,default:"TrackDuration",description:'The duration of the Block (based on TimecodeScale). This element is mandatory when DefaultDuration is set for the track (but can be omitted as other default values). When not written and with no DefaultDuration, the value is assumed to be the difference between the timestamp of this Block and the timestamp of the next Block in "display" order (not coding order). This element can be useful at the end of a Track (as there is not other Block available), or when there is a break in a track like for subtitle tracks. When set to 0 that means the frame is not a keyframe.'},165:{name:"BlockAdditional",level:5,type:"b",mandatory:!0,minver:1,webm:!1,description:"Interpreted by the codec as it wishes (using the BlockAddID)."},238:{name:"BlockAddID",level:5,type:"u",mandatory:!0,minver:1,webm:!1,default:1,range:"not 0",description:"An ID to identify the BlockAdditional level."},166:{name:"BlockMore",level:4,type:"m",mandatory:!0,multiple:!0,minver:1,webm:!1,description:"Contain the BlockAdditional and some parameters."},30113:{name:"BlockAdditions",level:3,type:"m",minver:1,webm:!1,description:"Contain additional blocks to complete the main one. An EBML parser that has no knowledge of the Block structure could still see and use/skip these data."},162:{name:"BlockVirtual",level:3,type:"b",webm:!1,description:"A Block with no data. It must be stored in the stream at the place the real Block should be in display order. (see Block Virtual)"},161:{name:"Block",level:3,type:"b",mandatory:!0,minver:1,description:"Block containing the actual data to be rendered and a timestamp relative to the Cluster Timecode. (see Block Structure)"},160:{name:"BlockGroup",level:2,type:"m",multiple:!0,minver:1,description:"Basic container of information containing a single Block or BlockVirtual, and information specific to that Block/VirtualBlock."},163:{name:"SimpleBlock",level:2,type:"b",multiple:!0,minver:2,webm:!0,divx:!0,description:"Similar to SimpleBlock Structure"},171:{name:"PrevSize",cppname:"ClusterPrevSize",level:2,type:"u",minver:1,description:"Size of the previous Cluster, in octets. Can be useful for backward playing.",position:"prevCluster"},167:{name:"Position",cppname:"ClusterPosition",level:2,type:"u",minver:1,webm:!1,description:"The Position of the Cluster in the segment (0 in live broadcast streams). It might help to resynchronise offset on damaged streams.",position:"segment"},22743:{name:"SilentTrackNumber",cppname:"ClusterSilentTrackNumber",level:3,type:"u",multiple:!0,minver:1,webm:!1,description:"One of the track number that are not used from now on in the stream. It could change later if not specified as silent in a further Cluster."},231:{name:"Timecode",cppname:"ClusterTimecode",level:2,type:"u",mandatory:!0,minver:1,description:"Absolute timestamp of the cluster (based on TimecodeScale)."},524531317:{name:"Cluster",level:1,type:"m",multiple:!0,minver:1,description:"The lower level element containing the (monolithic) Block structure."},19840:{name:"MuxingApp",level:2,type:"8",mandatory:!0,minver:1,description:'Muxing application or library ("libmatroska-0.4.3").'},31657:{name:"Title",level:2,type:"8",minver:1,webm:!1,description:"General name of the segment."},2807730:{name:"TimecodeScaleDenominator",level:2,type:"u",mandatory:!0,minver:4,default:"1000000000",description:"Timestamp scale numerator, see TimecodeScale."},2807729:{name:"TimecodeScale",level:2,type:"u",mandatory:!0,minver:1,default:"1000000",description:"Timestamp scale in nanoseconds (1.000.000 means all timestamps in the segment are expressed in milliseconds)."},27045:{name:"ChapterTranslateID",level:3,type:"b",mandatory:!0,minver:1,webm:!1,description:"The binary value used to represent this segment in the chapter codec data. The format depends on the ChapProcessCodecID used."},27071:{name:"ChapterTranslateCodec",level:3,type:"u",mandatory:!0,minver:1,webm:!1,description:"The chapter codec using this ID (0: Matroska Script, 1: DVD-menu)."},27132:{name:"ChapterTranslateEditionUID",level:3,type:"u",multiple:!0,minver:1,webm:!1,description:"Specify an edition UID on which this correspondance applies. When not specified, it means for all editions found in the segment."},4096955:{name:"NextFilename",level:2,type:"8",minver:1,webm:!1,description:"An escaped filename corresponding to the next segment."},4110627:{name:"NextUID",level:2,type:"b",minver:1,webm:!1,bytesize:16,description:"A unique ID to identify the next chained segment (128 bits)."},3965867:{name:"PrevFilename",level:2,type:"8",minver:1,webm:!1,description:"An escaped filename corresponding to the previous segment."},3979555:{name:"PrevUID",level:2,type:"b",minver:1,webm:!1,bytesize:16,description:"A unique ID to identify the previous chained segment (128 bits)."},29604:{name:"SegmentUID",level:2,type:"b",minver:1,webm:!1,range:"not 0",bytesize:16,description:"A randomly generated unique ID to identify the current segment between many others (128 bits)."},357149030:{name:"Info",level:1,type:"m",mandatory:!0,multiple:!0,minver:1,description:"Contains miscellaneous general information and statistics on the file."},21420:{name:"SeekPosition",level:3,type:"u",mandatory:!0,minver:1,description:"The position of the element in the segment in octets (0 = first level 1 element).",position:"segment"},21419:{name:"SeekID",level:3,type:"b",mandatory:!0,minver:1,description:"The binary ID corresponding to the element name.",type2:"ebmlID"},19899:{name:"Seek",cppname:"SeekPoint",level:2,type:"m",mandatory:!0,multiple:!0,minver:1,description:"Contains a single seek entry to an EBML element."},290298740:{name:"SeekHead",cppname:"SeekHeader",level:1,type:"m",multiple:!0,minver:1,description:"Contains the position of other level 1 elements."},32379:{name:"SignatureElementList",level:2,type:"m",multiple:!0,webm:!1,i:"Cluster|Block|BlockAdditional",description:"A list consists of a number of consecutive elements that represent one case where data is used in signature. Ex: means that the BlockAdditional of all Blocks in all Clusters is used for encryption."},32347:{name:"SignatureElements",level:1,type:"m",webm:!1,description:"Contains elements that will be used to compute the signature."},32437:{name:"Signature",level:1,type:"b",webm:!1,description:"The signature of the data (until a new."},32421:{name:"SignaturePublicKey",level:1,type:"b",webm:!1,description:"The public key to use with the algorithm (in the case of a PKI-based signature)."},32410:{name:"SignatureHash",level:1,type:"u",webm:!1,description:"Hash algorithm used (1=SHA1-160, 2=MD5)."},32394:{name:"SignatureAlgo",level:1,type:"u",webm:!1,description:"Signature algorithm used (1=RSA, 2=elliptic)."},458458727:{name:"SignatureSlot",level:-1,type:"m",multiple:!0,webm:!1,description:"Contain signature of some (coming) elements in the stream."},191:{name:"CRC-32",level:-1,type:"b",minver:1,webm:!1,description:"The CRC is computed on all the data of the Master element it's in. The CRC element should be the first in it's parent master for easier reading. All level 1 elements should include a CRC-32. The CRC in use is the IEEE CRC32 Little Endian",crc:!0},236:{name:"Void",level:-1,type:"b",minver:1,description:"Used to void damaged data, to avoid unexpected behaviors when using damaged data. The content is discarded. Also used to reserve space in a sub-element for later use."},17139:{name:"EBMLMaxSizeLength",level:1,type:"u",mandatory:!0,default:8,minver:1,description:"The maximum length of the sizes you'll find in this file (8 or less in Matroska). This does not override the element size indicated at the beginning of an element. Elements that have an indicated size which is larger than what is allowed by EBMLMaxSizeLength shall be considered invalid."},17138:{name:"EBMLMaxIDLength",level:1,type:"u",mandatory:!0,default:4,minver:1,description:"The maximum length of the IDs you'll find in this file (4 or less in Matroska)."},17143:{name:"EBMLReadVersion",level:1,type:"u",mandatory:!0,default:1,minver:1,description:"The minimum EBML version a parser has to support to read this file."},440786851:{name:"EBML",level:"0",type:"m",mandatory:!0,multiple:!0,minver:1,description:"Set the EBML characteristics of the data to follow. Each EBML document has to start with this."},21936:{name:"Colour",level:"4",type:"m",mandatory:!0,multiple:!0,description:"Settings describing the colour format."},21937:{name:"MatrixCoefficients",level:"5",type:"u",mandatory:!0,multiple:!0,description:"The Matrix Coefficients of the video used to derive luma and chroma values from red, green, and blue color primaries. For clarity, the value and meanings for MatrixCoefficients are adopted from Table 4 of ISO/IEC 23001-8:2016 or ITU-T H.273."},21945:{name:"Range",level:"5",type:"u",mandatory:!0,multiple:!0,description:"Clipping of the color ranges."},21946:{name:"TransferCharacteristics",level:"5",type:"u",mandatory:!0,multiple:!0,description:"The transfer characteristics of the video."},21947:{name:"Primaries",level:"5",type:"u",mandatory:!0,multiple:!0,description:"The colour primaries of the video. For clarity, the value and meanings for Primaries are adopted from Table 2 of ISO/IEC 23091-4 or ITU-T H.273."}}),ebmlID}var hasRequiredEBMLEncoder;function requireEBMLEncoder(){if(hasRequiredEBMLEncoder)return EBMLEncoder;hasRequiredEBMLEncoder=1,Object.defineProperty(EBMLEncoder,"__esModule",{value:!0});var N=requireTools(),Z=requireTools(),q=requireEbmlID(),J=function(){function I(){this._schema=q.byEbmlID,this._buffers=[],this._stack=[]}return I.prototype.encode=function(D){var a=this;return N.concat(D.reduce(function(O,F){return O.concat(a.encodeChunk(F))},[])).buffer},I.prototype.encodeChunk=function(D){return D.type==="m"?D.isEnd?this.endTag(D):this.startTag(D):(D.data=Z.Buffer.from(D.data),this.writeTag(D)),this.flush()},I.prototype.flush=function(){var D=this._buffers;return this._buffers=[],D},I.prototype.getSchemaInfo=function(D){for(var a=Object.keys(this._schema).map(Number),O=0;O<a.length;O++){var F=a[O];if(this._schema[F].name===D)return new Z.Buffer(F.toString(16),"hex")}return null},I.prototype.writeTag=function(D){var a=D.name,O=this.getSchemaInfo(a),F=D.data;if(O==null)throw new Error("No schema entry found for "+a);var z=N.encodeTag(O,F);if(this._stack.length>0){var K=this._stack[this._stack.length-1];K.children.push({tagId:O,elm:D,children:[],data:z});return}this._buffers=this._buffers.concat(z)},I.prototype.startTag=function(D){var a=D.name,O=this.getSchemaInfo(a);if(O==null)throw new Error("No schema entry found for "+a);if(D.unknownSize){var F=N.encodeTag(O,new Z.Buffer(0),D.unknownSize);this._buffers=this._buffers.concat(F);return}var z={tagId:O,elm:D,children:[],data:null};this._stack.length>0&&this._stack[this._stack.length-1].children.push(z),this._stack.push(z)},I.prototype.endTag=function(D){D.name;var a=this._stack.pop();if(a==null)throw new Error("EBML structure is broken");if(a.elm.name!==D.name)throw new Error("EBML structure is broken");var O=a.children.reduce(function(z,K){if(K.data===null)throw new Error("EBML structure is broken");return z.concat(K.data)},[]),F=N.concat(O);a.elm.type==="m"?a.data=N.encodeTag(a.tagId,F,a.elm.unknownSize):a.data=N.encodeTag(a.tagId,F),this._stack.length<1&&(this._buffers=this._buffers.concat(a.data))},I}();return EBMLEncoder.default=J,EBMLEncoder}var buffer={},base64Js={},hasRequiredBase64Js;function requireBase64Js(){if(hasRequiredBase64Js)return base64Js;hasRequiredBase64Js=1,base64Js.byteLength=O,base64Js.toByteArray=z,base64Js.fromByteArray=ne;for(var N=[],Z=[],q=typeof Uint8Array<"u"?Uint8Array:Array,J="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",I=0,D=J.length;I<D;++I)N[I]=J[I],Z[J.charCodeAt(I)]=I;Z[45]=62,Z[95]=63;function a(ee){var re=ee.length;if(re%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var ce=ee.indexOf("=");ce===-1&&(ce=re);var oe=ce===re?0:4-ce%4;return[ce,oe]}function O(ee){var re=a(ee),ce=re[0],oe=re[1];return(ce+oe)*3/4-oe}function F(ee,re,ce){return(re+ce)*3/4-ce}function z(ee){var re,ce=a(ee),oe=ce[0],se=ce[1],fe=new q(F(ee,oe,se)),ge=0,ue=se>0?oe-4:oe,_e;for(_e=0;_e<ue;_e+=4)re=Z[ee.charCodeAt(_e)]<<18|Z[ee.charCodeAt(_e+1)]<<12|Z[ee.charCodeAt(_e+2)]<<6|Z[ee.charCodeAt(_e+3)],fe[ge++]=re>>16&255,fe[ge++]=re>>8&255,fe[ge++]=re&255;return se===2&&(re=Z[ee.charCodeAt(_e)]<<2|Z[ee.charCodeAt(_e+1)]>>4,fe[ge++]=re&255),se===1&&(re=Z[ee.charCodeAt(_e)]<<10|Z[ee.charCodeAt(_e+1)]<<4|Z[ee.charCodeAt(_e+2)]>>2,fe[ge++]=re>>8&255,fe[ge++]=re&255),fe}function K(ee){return N[ee>>18&63]+N[ee>>12&63]+N[ee>>6&63]+N[ee&63]}function te(ee,re,ce){for(var oe,se=[],fe=re;fe<ce;fe+=3)oe=(ee[fe]<<16&16711680)+(ee[fe+1]<<8&65280)+(ee[fe+2]&255),se.push(K(oe));return se.join("")}function ne(ee){for(var re,ce=ee.length,oe=ce%3,se=[],fe=16383,ge=0,ue=ce-oe;ge<ue;ge+=fe)se.push(te(ee,ge,ge+fe>ue?ue:ge+fe));return oe===1?(re=ee[ce-1],se.push(N[re>>2]+N[re<<4&63]+"==")):oe===2&&(re=(ee[ce-2]<<8)+ee[ce-1],se.push(N[re>>10]+N[re>>4&63]+N[re<<2&63]+"=")),se.join("")}return base64Js}var ieee754={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var hasRequiredIeee754;function requireIeee754(){return hasRequiredIeee754||(hasRequiredIeee754=1,ieee754.read=function(N,Z,q,J,I){var D,a,O=I*8-J-1,F=(1<<O)-1,z=F>>1,K=-7,te=q?I-1:0,ne=q?-1:1,ee=N[Z+te];for(te+=ne,D=ee&(1<<-K)-1,ee>>=-K,K+=O;K>0;D=D*256+N[Z+te],te+=ne,K-=8);for(a=D&(1<<-K)-1,D>>=-K,K+=J;K>0;a=a*256+N[Z+te],te+=ne,K-=8);if(D===0)D=1-z;else{if(D===F)return a?NaN:(ee?-1:1)*(1/0);a=a+Math.pow(2,J),D=D-z}return(ee?-1:1)*a*Math.pow(2,D-J)},ieee754.write=function(N,Z,q,J,I,D){var a,O,F,z=D*8-I-1,K=(1<<z)-1,te=K>>1,ne=I===23?Math.pow(2,-24)-Math.pow(2,-77):0,ee=J?0:D-1,re=J?1:-1,ce=Z<0||Z===0&&1/Z<0?1:0;for(Z=Math.abs(Z),isNaN(Z)||Z===1/0?(O=isNaN(Z)?1:0,a=K):(a=Math.floor(Math.log(Z)/Math.LN2),Z*(F=Math.pow(2,-a))<1&&(a--,F*=2),a+te>=1?Z+=ne/F:Z+=ne*Math.pow(2,1-te),Z*F>=2&&(a++,F/=2),a+te>=K?(O=0,a=K):a+te>=1?(O=(Z*F-1)*Math.pow(2,I),a=a+te):(O=Z*Math.pow(2,te-1)*Math.pow(2,I),a=0));I>=8;N[q+ee]=O&255,ee+=re,O/=256,I-=8);for(a=a<<I|O,z+=I;z>0;N[q+ee]=a&255,ee+=re,a/=256,z-=8);N[q+ee-re]|=ce*128}),ieee754}/*!
3
+ `},writer$1}var hasRequiredLib$1;function requireLib$1(){if(hasRequiredLib$1)return lib$1;hasRequiredLib$1=1;var O=requireParser(),N=requireWriter$1(),I=requireGrammar();return lib$1.grammar=I,lib$1.write=N,lib$1.parse=O.parse,lib$1.parseParams=O.parseParams,lib$1.parseFmtpConfig=O.parseFmtpConfig,lib$1.parsePayloads=O.parsePayloads,lib$1.parseRemoteCandidates=O.parseRemoteCandidates,lib$1.parseImageAttributes=O.parseImageAttributes,lib$1.parseSimulcastStreamList=O.parseSimulcastStreamList,lib$1}var libExports$1=requireLib$1();class VideoMediaContext{constructor(N){_e(this,"kind","video");_e(this,"stream",new MediaStream);_e(this,"stop",()=>{const N=this.stream.getTracks();for(const I of N)I.stop(),this.stream.removeTrack(I)});_e(this,"replaceStream",N=>{const I=this.stream,D=I.getTracks();for(const k of D)I.removeTrack(k);const[f]=N.getVideoTracks();f&&I.addTrack(f)});_e(this,"getStream",()=>this.stream);_e(this,"getTrack",()=>this.stream.getTracks()[0]);this.stream.addTrack(N)}}const enum_roomState={ready:"已就绪",checkAuth:"正在鉴权",connecting:"连接中",connected:"已连接",reconnect:"正在重新连接",disconnected:"已断开",failed:"连接错误",closed:"已关闭"};ht(enum_roomState);var y$1=Object.defineProperty,B=O=>{throw TypeError(O)},v=(O,N,I)=>N in O?y$1(O,N,{enumerable:!0,configurable:!0,writable:!0,value:I}):O[N]=I,l$1=(O,N,I)=>v(O,typeof N!="symbol"?N+"":N,I),T=(O,N,I)=>N.has(O)||B("Cannot "+I),t$2=(O,N,I)=>(T(O,N,"read from private field"),I?I.call(O):N.get(O)),o=(O,N,I)=>N.has(O)?B("Cannot add the same private member more than once"):N instanceof WeakSet?N.add(O):N.set(O,I),r$1=(O,N,I,D)=>(T(O,N,"write to private field"),N.set(O,I),I),s$1,a$1,h,u$1,m$1,p$1,d$1,x$1,g$1,b,w;class S{constructor(N){o(this,s$1,{url:"",binaryType:"blob",timeout:6*1e3,debug:!1,autoConnect:!1,reconnectCount:-1,reconnectTime:60*1e3,reconnectIntervalTime:5e3,heartbeatIntervalTime:1e4,checkReconnect:I=>!0,onReconnectSuccess:async I=>{},onReconnectStop:async I=>{},getHeartbeatMsg:()=>JSON.stringify({event:"heartbeat"}),onMessage:I=>{}}),l$1(this,"ws"),o(this,a$1,-1),o(this,h,-1),o(this,u$1,0),o(this,m$1,0),o(this,p$1,0),o(this,d$1,!1),l$1(this,"connect",()=>new Promise(async(I,D)=>{this.ws=new WebSocket(t$2(this,s$1).url),this.ws.binaryType=t$2(this,s$1).binaryType,this.ws.addEventListener("message",t$2(this,g$1)),this.ws.addEventListener("open",f=>{clearTimeout(t$2(this,u$1)),r$1(this,a$1,t$2(this,s$1).reconnectCount),r$1(this,h,-1),t$2(this,b).call(this),t$2(this,s$1).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;","------->pr-ws: connect is success.",this.ws),I(f)}),this.ws.addEventListener("error",f=>{clearTimeout(t$2(this,u$1)),t$2(this,s$1).debug&&console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;","------->pr-ws: connect is error.",f),D(f)}),this.ws.addEventListener("close",f=>{if(t$2(this,s$1).debug&&console.info("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;",`------->pr-ws: connect is close. code: ${f.code}, permanentClosed is ${t$2(this,d$1)}.`,f),t$2(this,w).call(this),!t$2(this,d$1))return this.reconnect(f);this.ws=void 0}),r$1(this,u$1,window.setTimeout(()=>{t$2(this,s$1).debug&&console.info("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;","------->pr-ws: connect is timeout.",this),D("connect is timeout.")},t$2(this,s$1).timeout))})),l$1(this,"reconnect",async I=>new Promise(D=>{t$2(this,s$1).debug&&console.info("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;","------->pr-ws: await reconnect.");const f=k=>{t$2(this,s$1).debug&&console.info("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;",`------->pr-ws: ${k}`),t$2(this,s$1).onReconnectStop({msg:k}),D(k)};if(t$2(this,x$1).call(this)===!1)return f("stop reconnect. exceed maxReconnectionTime.");if(t$2(this,a$1)!==-1&&t$2(this,a$1)===0)return f("stop reconnect. surplusReconnectCount is 0.");if(!t$2(this,s$1).checkReconnect(I))return f("stop reconnect. checkReconnect is false.");t$2(this,s$1).debug&&console.info("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;",`------->pr-ws: await ${t$2(this,s$1).reconnectIntervalTime}ms run reconnect. surplusReconnectCount is ${t$2(this,a$1)}`,I),r$1(this,m$1,window.setTimeout(async()=>{r$1(this,a$1,Math.max(-1,t$2(this,a$1)-1)),await this.connect();try{await t$2(this,s$1).onReconnectSuccess(this.ws)}catch(k){console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->pr-ws: onReconnectSuccess is error",k)}D(!0)},t$2(this,s$1).reconnectIntervalTime))})),l$1(this,"sendMessage",async I=>{var D;(!this.ws||this.ws.readyState!==1)&&(t$2(this,s$1).debug&&console.warn("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;","------->pr-ws: ws is not ready."),t$2(this,s$1).autoConnect&&(t$2(this,s$1).debug&&console.warn("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;","------->pr-ws: await ws connect."),await this.connect())),(D=this.ws)==null||D.send(I)}),l$1(this,"close",async(I=1e3,D="correctly close.")=>{var f;this.ws&&(r$1(this,d$1,!0),t$2(this,w).call(this),(f=this.ws)==null||f.close(I,D))}),o(this,x$1,()=>{const I=Date.now();return t$2(this,h)===-1&&r$1(this,h,I+t$2(this,s$1).reconnectTime),!(I>t$2(this,h))}),o(this,g$1,I=>{const{data:D}=I;t$2(this,s$1).onMessage(D)}),o(this,b,()=>{r$1(this,p$1,window.setInterval(()=>{const I=t$2(this,s$1).getHeartbeatMsg();I&&this.sendMessage(I)},t$2(this,s$1).heartbeatIntervalTime))}),o(this,w,()=>{clearInterval(t$2(this,m$1)),clearInterval(t$2(this,p$1))}),r$1(this,s$1,{...t$2(this,s$1),...N}),r$1(this,a$1,t$2(this,s$1).reconnectCount)}}s$1=new WeakMap,a$1=new WeakMap,h=new WeakMap,u$1=new WeakMap,m$1=new WeakMap,p$1=new WeakMap,d$1=new WeakMap,x$1=new WeakMap,g$1=new WeakMap,b=new WeakMap,w=new WeakMap;var indexMinimal={},minimal$1={},aspromise,hasRequiredAspromise;function requireAspromise(){if(hasRequiredAspromise)return aspromise;hasRequiredAspromise=1,aspromise=O;function O(N,I){for(var D=new Array(arguments.length-1),f=0,k=2,i=!0;k<arguments.length;)D[f++]=arguments[k++];return new Promise(function($,C){D[f]=function(Z){if(i)if(i=!1,Z)C(Z);else{for(var J=new Array(arguments.length-1),z=0;z<J.length;)J[z++]=arguments[z];$.apply(null,J)}};try{N.apply(I||null,D)}catch(M){i&&(i=!1,C(M))}})}return aspromise}var base64={},hasRequiredBase64;function requireBase64(){return hasRequiredBase64||(hasRequiredBase64=1,function(O){var N=O;N.length=function(c){var $=c.length;if(!$)return 0;for(var C=0;--$%4>1&&c.charAt($)==="=";)++C;return Math.ceil(c.length*3)/4-C};for(var I=new Array(64),D=new Array(123),f=0;f<64;)D[I[f]=f<26?f+65:f<52?f+71:f<62?f-4:f-59|43]=f++;N.encode=function(c,$,C){for(var M=null,Z=[],J=0,z=0,Q;$<C;){var ee=c[$++];switch(z){case 0:Z[J++]=I[ee>>2],Q=(ee&3)<<4,z=1;break;case 1:Z[J++]=I[Q|ee>>4],Q=(ee&15)<<2,z=2;break;case 2:Z[J++]=I[Q|ee>>6],Z[J++]=I[ee&63],z=0;break}J>8191&&((M||(M=[])).push(String.fromCharCode.apply(String,Z)),J=0)}return z&&(Z[J++]=I[Q],Z[J++]=61,z===1&&(Z[J++]=61)),M?(J&&M.push(String.fromCharCode.apply(String,Z.slice(0,J))),M.join("")):String.fromCharCode.apply(String,Z.slice(0,J))};var k="invalid encoding";N.decode=function(c,$,C){for(var M=C,Z=0,J,z=0;z<c.length;){var Q=c.charCodeAt(z++);if(Q===61&&Z>1)break;if((Q=D[Q])===void 0)throw Error(k);switch(Z){case 0:J=Q,Z=1;break;case 1:$[C++]=J<<2|(Q&48)>>4,J=Q,Z=2;break;case 2:$[C++]=(J&15)<<4|(Q&60)>>2,J=Q,Z=3;break;case 3:$[C++]=(J&3)<<6|Q,Z=0;break}}if(Z===1)throw Error(k);return C-M},N.test=function(c){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(c)}}(base64)),base64}var eventemitter,hasRequiredEventemitter;function requireEventemitter(){if(hasRequiredEventemitter)return eventemitter;hasRequiredEventemitter=1,eventemitter=O;function O(){this._listeners={}}return O.prototype.on=function(I,D,f){return(this._listeners[I]||(this._listeners[I]=[])).push({fn:D,ctx:f||this}),this},O.prototype.off=function(I,D){if(I===void 0)this._listeners={};else if(D===void 0)this._listeners[I]=[];else for(var f=this._listeners[I],k=0;k<f.length;)f[k].fn===D?f.splice(k,1):++k;return this},O.prototype.emit=function(I){var D=this._listeners[I];if(D){for(var f=[],k=1;k<arguments.length;)f.push(arguments[k++]);for(k=0;k<D.length;)D[k].fn.apply(D[k++].ctx,f)}return this},eventemitter}var float,hasRequiredFloat;function requireFloat(){if(hasRequiredFloat)return float;hasRequiredFloat=1,float=O(O);function O(k){return typeof Float32Array<"u"?function(){var i=new Float32Array([-0]),c=new Uint8Array(i.buffer),$=c[3]===128;function C(z,Q,ee){i[0]=z,Q[ee]=c[0],Q[ee+1]=c[1],Q[ee+2]=c[2],Q[ee+3]=c[3]}function M(z,Q,ee){i[0]=z,Q[ee]=c[3],Q[ee+1]=c[2],Q[ee+2]=c[1],Q[ee+3]=c[0]}k.writeFloatLE=$?C:M,k.writeFloatBE=$?M:C;function Z(z,Q){return c[0]=z[Q],c[1]=z[Q+1],c[2]=z[Q+2],c[3]=z[Q+3],i[0]}function J(z,Q){return c[3]=z[Q],c[2]=z[Q+1],c[1]=z[Q+2],c[0]=z[Q+3],i[0]}k.readFloatLE=$?Z:J,k.readFloatBE=$?J:Z}():function(){function i($,C,M,Z){var J=C<0?1:0;if(J&&(C=-C),C===0)$(1/C>0?0:2147483648,M,Z);else if(isNaN(C))$(2143289344,M,Z);else if(C>34028234663852886e22)$((J<<31|2139095040)>>>0,M,Z);else if(C<11754943508222875e-54)$((J<<31|Math.round(C/1401298464324817e-60))>>>0,M,Z);else{var z=Math.floor(Math.log(C)/Math.LN2),Q=Math.round(C*Math.pow(2,-z)*8388608)&8388607;$((J<<31|z+127<<23|Q)>>>0,M,Z)}}k.writeFloatLE=i.bind(null,N),k.writeFloatBE=i.bind(null,I);function c($,C,M){var Z=$(C,M),J=(Z>>31)*2+1,z=Z>>>23&255,Q=Z&8388607;return z===255?Q?NaN:J*(1/0):z===0?J*1401298464324817e-60*Q:J*Math.pow(2,z-150)*(Q+8388608)}k.readFloatLE=c.bind(null,D),k.readFloatBE=c.bind(null,f)}(),typeof Float64Array<"u"?function(){var i=new Float64Array([-0]),c=new Uint8Array(i.buffer),$=c[7]===128;function C(z,Q,ee){i[0]=z,Q[ee]=c[0],Q[ee+1]=c[1],Q[ee+2]=c[2],Q[ee+3]=c[3],Q[ee+4]=c[4],Q[ee+5]=c[5],Q[ee+6]=c[6],Q[ee+7]=c[7]}function M(z,Q,ee){i[0]=z,Q[ee]=c[7],Q[ee+1]=c[6],Q[ee+2]=c[5],Q[ee+3]=c[4],Q[ee+4]=c[3],Q[ee+5]=c[2],Q[ee+6]=c[1],Q[ee+7]=c[0]}k.writeDoubleLE=$?C:M,k.writeDoubleBE=$?M:C;function Z(z,Q){return c[0]=z[Q],c[1]=z[Q+1],c[2]=z[Q+2],c[3]=z[Q+3],c[4]=z[Q+4],c[5]=z[Q+5],c[6]=z[Q+6],c[7]=z[Q+7],i[0]}function J(z,Q){return c[7]=z[Q],c[6]=z[Q+1],c[5]=z[Q+2],c[4]=z[Q+3],c[3]=z[Q+4],c[2]=z[Q+5],c[1]=z[Q+6],c[0]=z[Q+7],i[0]}k.readDoubleLE=$?Z:J,k.readDoubleBE=$?J:Z}():function(){function i($,C,M,Z,J,z){var Q=Z<0?1:0;if(Q&&(Z=-Z),Z===0)$(0,J,z+C),$(1/Z>0?0:2147483648,J,z+M);else if(isNaN(Z))$(0,J,z+C),$(2146959360,J,z+M);else if(Z>17976931348623157e292)$(0,J,z+C),$((Q<<31|2146435072)>>>0,J,z+M);else{var ee;if(Z<22250738585072014e-324)ee=Z/5e-324,$(ee>>>0,J,z+C),$((Q<<31|ee/4294967296)>>>0,J,z+M);else{var Y=Math.floor(Math.log(Z)/Math.LN2);Y===1024&&(Y=1023),ee=Z*Math.pow(2,-Y),$(ee*4503599627370496>>>0,J,z+C),$((Q<<31|Y+1023<<20|ee*1048576&1048575)>>>0,J,z+M)}}}k.writeDoubleLE=i.bind(null,N,0,4),k.writeDoubleBE=i.bind(null,I,4,0);function c($,C,M,Z,J){var z=$(Z,J+C),Q=$(Z,J+M),ee=(Q>>31)*2+1,Y=Q>>>20&2047,te=4294967296*(Q&1048575)+z;return Y===2047?te?NaN:ee*(1/0):Y===0?ee*5e-324*te:ee*Math.pow(2,Y-1075)*(te+4503599627370496)}k.readDoubleLE=c.bind(null,D,0,4),k.readDoubleBE=c.bind(null,f,4,0)}(),k}function N(k,i,c){i[c]=k&255,i[c+1]=k>>>8&255,i[c+2]=k>>>16&255,i[c+3]=k>>>24}function I(k,i,c){i[c]=k>>>24,i[c+1]=k>>>16&255,i[c+2]=k>>>8&255,i[c+3]=k&255}function D(k,i){return(k[i]|k[i+1]<<8|k[i+2]<<16|k[i+3]<<24)>>>0}function f(k,i){return(k[i]<<24|k[i+1]<<16|k[i+2]<<8|k[i+3])>>>0}return float}var inquire_1,hasRequiredInquire;function requireInquire(){if(hasRequiredInquire)return inquire_1;hasRequiredInquire=1,inquire_1=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(O){}return null}return inquire_1}var utf8={},hasRequiredUtf8;function requireUtf8(){return hasRequiredUtf8||(hasRequiredUtf8=1,function(O){var N=O;N.length=function(D){for(var f=0,k=0,i=0;i<D.length;++i)k=D.charCodeAt(i),k<128?f+=1:k<2048?f+=2:(k&64512)===55296&&(D.charCodeAt(i+1)&64512)===56320?(++i,f+=4):f+=3;return f},N.read=function(D,f,k){var i=k-f;if(i<1)return"";for(var c=null,$=[],C=0,M;f<k;)M=D[f++],M<128?$[C++]=M:M>191&&M<224?$[C++]=(M&31)<<6|D[f++]&63:M>239&&M<365?(M=((M&7)<<18|(D[f++]&63)<<12|(D[f++]&63)<<6|D[f++]&63)-65536,$[C++]=55296+(M>>10),$[C++]=56320+(M&1023)):$[C++]=(M&15)<<12|(D[f++]&63)<<6|D[f++]&63,C>8191&&((c||(c=[])).push(String.fromCharCode.apply(String,$)),C=0);return c?(C&&c.push(String.fromCharCode.apply(String,$.slice(0,C))),c.join("")):String.fromCharCode.apply(String,$.slice(0,C))},N.write=function(D,f,k){for(var i=k,c,$,C=0;C<D.length;++C)c=D.charCodeAt(C),c<128?f[k++]=c:c<2048?(f[k++]=c>>6|192,f[k++]=c&63|128):(c&64512)===55296&&(($=D.charCodeAt(C+1))&64512)===56320?(c=65536+((c&1023)<<10)+($&1023),++C,f[k++]=c>>18|240,f[k++]=c>>12&63|128,f[k++]=c>>6&63|128,f[k++]=c&63|128):(f[k++]=c>>12|224,f[k++]=c>>6&63|128,f[k++]=c&63|128);return k-i}}(utf8)),utf8}var pool_1,hasRequiredPool;function requirePool(){if(hasRequiredPool)return pool_1;hasRequiredPool=1,pool_1=O;function O(N,I,D){var f=D||8192,k=f>>>1,i=null,c=f;return function(C){if(C<1||C>k)return N(C);c+C>f&&(i=N(f),c=0);var M=I.call(i,c,c+=C);return c&7&&(c=(c|7)+1),M}}return pool_1}var longbits,hasRequiredLongbits;function requireLongbits(){if(hasRequiredLongbits)return longbits;hasRequiredLongbits=1,longbits=N;var O=requireMinimal$1();function N(k,i){this.lo=k>>>0,this.hi=i>>>0}var I=N.zero=new N(0,0);I.toNumber=function(){return 0},I.zzEncode=I.zzDecode=function(){return this},I.length=function(){return 1};var D=N.zeroHash="\0\0\0\0\0\0\0\0";N.fromNumber=function(i){if(i===0)return I;var c=i<0;c&&(i=-i);var $=i>>>0,C=(i-$)/4294967296>>>0;return c&&(C=~C>>>0,$=~$>>>0,++$>4294967295&&($=0,++C>4294967295&&(C=0))),new N($,C)},N.from=function(i){if(typeof i=="number")return N.fromNumber(i);if(O.isString(i))if(O.Long)i=O.Long.fromString(i);else return N.fromNumber(parseInt(i,10));return i.low||i.high?new N(i.low>>>0,i.high>>>0):I},N.prototype.toNumber=function(i){if(!i&&this.hi>>>31){var c=~this.lo+1>>>0,$=~this.hi>>>0;return c||($=$+1>>>0),-(c+$*4294967296)}return this.lo+this.hi*4294967296},N.prototype.toLong=function(i){return O.Long?new O.Long(this.lo|0,this.hi|0,!!i):{low:this.lo|0,high:this.hi|0,unsigned:!!i}};var f=String.prototype.charCodeAt;return N.fromHash=function(i){return i===D?I:new N((f.call(i,0)|f.call(i,1)<<8|f.call(i,2)<<16|f.call(i,3)<<24)>>>0,(f.call(i,4)|f.call(i,5)<<8|f.call(i,6)<<16|f.call(i,7)<<24)>>>0)},N.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},N.prototype.zzEncode=function(){var i=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^i)>>>0,this.lo=(this.lo<<1^i)>>>0,this},N.prototype.zzDecode=function(){var i=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^i)>>>0,this.hi=(this.hi>>>1^i)>>>0,this},N.prototype.length=function(){var i=this.lo,c=(this.lo>>>28|this.hi<<4)>>>0,$=this.hi>>>24;return $===0?c===0?i<16384?i<128?1:2:i<2097152?3:4:c<16384?c<128?5:6:c<2097152?7:8:$<128?9:10},longbits}var hasRequiredMinimal$1;function requireMinimal$1(){return hasRequiredMinimal$1||(hasRequiredMinimal$1=1,function(O){var N=O;N.asPromise=requireAspromise(),N.base64=requireBase64(),N.EventEmitter=requireEventemitter(),N.float=requireFloat(),N.inquire=requireInquire(),N.utf8=requireUtf8(),N.pool=requirePool(),N.LongBits=requireLongbits(),N.isNode=!!(typeof commonjsGlobal<"u"&&commonjsGlobal&&commonjsGlobal.process&&commonjsGlobal.process.versions&&commonjsGlobal.process.versions.node),N.global=N.isNode&&commonjsGlobal||typeof window<"u"&&window||typeof self<"u"&&self||minimal$1,N.emptyArray=Object.freeze?Object.freeze([]):[],N.emptyObject=Object.freeze?Object.freeze({}):{},N.isInteger=Number.isInteger||function(k){return typeof k=="number"&&isFinite(k)&&Math.floor(k)===k},N.isString=function(k){return typeof k=="string"||k instanceof String},N.isObject=function(k){return k&&typeof k=="object"},N.isset=N.isSet=function(k,i){var c=k[i];return c!=null&&k.hasOwnProperty(i)?typeof c!="object"||(Array.isArray(c)?c.length:Object.keys(c).length)>0:!1},N.Buffer=function(){try{var f=N.inquire("buffer").Buffer;return f.prototype.utf8Write?f:null}catch{return null}}(),N._Buffer_from=null,N._Buffer_allocUnsafe=null,N.newBuffer=function(k){return typeof k=="number"?N.Buffer?N._Buffer_allocUnsafe(k):new N.Array(k):N.Buffer?N._Buffer_from(k):typeof Uint8Array>"u"?k:new Uint8Array(k)},N.Array=typeof Uint8Array<"u"?Uint8Array:Array,N.Long=N.global.dcodeIO&&N.global.dcodeIO.Long||N.global.Long||N.inquire("long"),N.key2Re=/^true|false|0|1$/,N.key32Re=/^-?(?:0|[1-9][0-9]*)$/,N.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,N.longToHash=function(k){return k?N.LongBits.from(k).toHash():N.LongBits.zeroHash},N.longFromHash=function(k,i){var c=N.LongBits.fromHash(k);return N.Long?N.Long.fromBits(c.lo,c.hi,i):c.toNumber(!!i)};function I(f,k,i){for(var c=Object.keys(k),$=0;$<c.length;++$)(f[c[$]]===void 0||!i)&&(f[c[$]]=k[c[$]]);return f}N.merge=I,N.lcFirst=function(k){return k.charAt(0).toLowerCase()+k.substring(1)};function D(f){function k(i,c){if(!(this instanceof k))return new k(i,c);Object.defineProperty(this,"message",{get:function(){return i}}),Error.captureStackTrace?Error.captureStackTrace(this,k):Object.defineProperty(this,"stack",{value:new Error().stack||""}),c&&I(this,c)}return k.prototype=Object.create(Error.prototype,{constructor:{value:k,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return f},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),k}N.newError=D,N.ProtocolError=D("ProtocolError"),N.oneOfGetter=function(k){for(var i={},c=0;c<k.length;++c)i[k[c]]=1;return function(){for(var $=Object.keys(this),C=$.length-1;C>-1;--C)if(i[$[C]]===1&&this[$[C]]!==void 0&&this[$[C]]!==null)return $[C]}},N.oneOfSetter=function(k){return function(i){for(var c=0;c<k.length;++c)k[c]!==i&&delete this[k[c]]}},N.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},N._configure=function(){var f=N.Buffer;if(!f){N._Buffer_from=N._Buffer_allocUnsafe=null;return}N._Buffer_from=f.from!==Uint8Array.from&&f.from||function(i,c){return new f(i,c)},N._Buffer_allocUnsafe=f.allocUnsafe||function(i){return new f(i)}}}(minimal$1)),minimal$1}var writer,hasRequiredWriter;function requireWriter(){if(hasRequiredWriter)return writer;hasRequiredWriter=1,writer=$;var O=requireMinimal$1(),N,I=O.LongBits,D=O.base64,f=O.utf8;function k(Y,te,ie){this.fn=Y,this.len=te,this.next=void 0,this.val=ie}function i(){}function c(Y){this.head=Y.head,this.tail=Y.tail,this.len=Y.len,this.next=Y.states}function $(){this.len=0,this.head=new k(i,0,0),this.tail=this.head,this.states=null}var C=function(){return O.Buffer?function(){return($.create=function(){return new N})()}:function(){return new $}};$.create=C(),$.alloc=function(te){return new O.Array(te)},O.Array!==Array&&($.alloc=O.pool($.alloc,O.Array.prototype.subarray)),$.prototype._push=function(te,ie,ye){return this.tail=this.tail.next=new k(te,ie,ye),this.len+=ie,this};function M(Y,te,ie){te[ie]=Y&255}function Z(Y,te,ie){for(;Y>127;)te[ie++]=Y&127|128,Y>>>=7;te[ie]=Y}function J(Y,te){this.len=Y,this.next=void 0,this.val=te}J.prototype=Object.create(k.prototype),J.prototype.fn=Z,$.prototype.uint32=function(te){return this.len+=(this.tail=this.tail.next=new J((te=te>>>0)<128?1:te<16384?2:te<2097152?3:te<268435456?4:5,te)).len,this},$.prototype.int32=function(te){return te<0?this._push(z,10,I.fromNumber(te)):this.uint32(te)},$.prototype.sint32=function(te){return this.uint32((te<<1^te>>31)>>>0)};function z(Y,te,ie){for(;Y.hi;)te[ie++]=Y.lo&127|128,Y.lo=(Y.lo>>>7|Y.hi<<25)>>>0,Y.hi>>>=7;for(;Y.lo>127;)te[ie++]=Y.lo&127|128,Y.lo=Y.lo>>>7;te[ie++]=Y.lo}$.prototype.uint64=function(te){var ie=I.from(te);return this._push(z,ie.length(),ie)},$.prototype.int64=$.prototype.uint64,$.prototype.sint64=function(te){var ie=I.from(te).zzEncode();return this._push(z,ie.length(),ie)},$.prototype.bool=function(te){return this._push(M,1,te?1:0)};function Q(Y,te,ie){te[ie]=Y&255,te[ie+1]=Y>>>8&255,te[ie+2]=Y>>>16&255,te[ie+3]=Y>>>24}$.prototype.fixed32=function(te){return this._push(Q,4,te>>>0)},$.prototype.sfixed32=$.prototype.fixed32,$.prototype.fixed64=function(te){var ie=I.from(te);return this._push(Q,4,ie.lo)._push(Q,4,ie.hi)},$.prototype.sfixed64=$.prototype.fixed64,$.prototype.float=function(te){return this._push(O.float.writeFloatLE,4,te)},$.prototype.double=function(te){return this._push(O.float.writeDoubleLE,8,te)};var ee=O.Array.prototype.set?function(te,ie,ye){ie.set(te,ye)}:function(te,ie,ye){for(var re=0;re<te.length;++re)ie[ye+re]=te[re]};return $.prototype.bytes=function(te){var ie=te.length>>>0;if(!ie)return this._push(M,1,0);if(O.isString(te)){var ye=$.alloc(ie=D.length(te));D.decode(te,ye,0),te=ye}return this.uint32(ie)._push(ee,ie,te)},$.prototype.string=function(te){var ie=f.length(te);return ie?this.uint32(ie)._push(f.write,ie,te):this._push(M,1,0)},$.prototype.fork=function(){return this.states=new c(this),this.head=this.tail=new k(i,0,0),this.len=0,this},$.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new k(i,0,0),this.len=0),this},$.prototype.ldelim=function(){var te=this.head,ie=this.tail,ye=this.len;return this.reset().uint32(ye),ye&&(this.tail.next=te.next,this.tail=ie,this.len+=ye),this},$.prototype.finish=function(){for(var te=this.head.next,ie=this.constructor.alloc(this.len),ye=0;te;)te.fn(te.val,ie,ye),ye+=te.len,te=te.next;return ie},$._configure=function(Y){N=Y,$.create=C(),N._configure()},writer}var writer_buffer,hasRequiredWriter_buffer;function requireWriter_buffer(){if(hasRequiredWriter_buffer)return writer_buffer;hasRequiredWriter_buffer=1,writer_buffer=I;var O=requireWriter();(I.prototype=Object.create(O.prototype)).constructor=I;var N=requireMinimal$1();function I(){O.call(this)}I._configure=function(){I.alloc=N._Buffer_allocUnsafe,I.writeBytesBuffer=N.Buffer&&N.Buffer.prototype instanceof Uint8Array&&N.Buffer.prototype.set.name==="set"?function(k,i,c){i.set(k,c)}:function(k,i,c){if(k.copy)k.copy(i,c,0,k.length);else for(var $=0;$<k.length;)i[c++]=k[$++]}},I.prototype.bytes=function(k){N.isString(k)&&(k=N._Buffer_from(k,"base64"));var i=k.length>>>0;return this.uint32(i),i&&this._push(I.writeBytesBuffer,i,k),this};function D(f,k,i){f.length<40?N.utf8.write(f,k,i):k.utf8Write?k.utf8Write(f,i):k.write(f,i)}return I.prototype.string=function(k){var i=N.Buffer.byteLength(k);return this.uint32(i),i&&this._push(D,i,k),this},I._configure(),writer_buffer}var reader,hasRequiredReader;function requireReader(){if(hasRequiredReader)return reader;hasRequiredReader=1,reader=k;var O=requireMinimal$1(),N,I=O.LongBits,D=O.utf8;function f(Z,J){return RangeError("index out of range: "+Z.pos+" + "+(J||1)+" > "+Z.len)}function k(Z){this.buf=Z,this.pos=0,this.len=Z.length}var i=typeof Uint8Array<"u"?function(J){if(J instanceof Uint8Array||Array.isArray(J))return new k(J);throw Error("illegal buffer")}:function(J){if(Array.isArray(J))return new k(J);throw Error("illegal buffer")},c=function(){return O.Buffer?function(z){return(k.create=function(ee){return O.Buffer.isBuffer(ee)?new N(ee):i(ee)})(z)}:i};k.create=c(),k.prototype._slice=O.Array.prototype.subarray||O.Array.prototype.slice,k.prototype.uint32=function(){var J=4294967295;return function(){if(J=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(J=(J|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(J=(J|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(J=(J|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(J=(J|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return J;if((this.pos+=5)>this.len)throw this.pos=this.len,f(this,10);return J}}(),k.prototype.int32=function(){return this.uint32()|0},k.prototype.sint32=function(){var J=this.uint32();return J>>>1^-(J&1)|0};function $(){var Z=new I(0,0),J=0;if(this.len-this.pos>4){for(;J<4;++J)if(Z.lo=(Z.lo|(this.buf[this.pos]&127)<<J*7)>>>0,this.buf[this.pos++]<128)return Z;if(Z.lo=(Z.lo|(this.buf[this.pos]&127)<<28)>>>0,Z.hi=(Z.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return Z;J=0}else{for(;J<3;++J){if(this.pos>=this.len)throw f(this);if(Z.lo=(Z.lo|(this.buf[this.pos]&127)<<J*7)>>>0,this.buf[this.pos++]<128)return Z}return Z.lo=(Z.lo|(this.buf[this.pos++]&127)<<J*7)>>>0,Z}if(this.len-this.pos>4){for(;J<5;++J)if(Z.hi=(Z.hi|(this.buf[this.pos]&127)<<J*7+3)>>>0,this.buf[this.pos++]<128)return Z}else for(;J<5;++J){if(this.pos>=this.len)throw f(this);if(Z.hi=(Z.hi|(this.buf[this.pos]&127)<<J*7+3)>>>0,this.buf[this.pos++]<128)return Z}throw Error("invalid varint encoding")}k.prototype.bool=function(){return this.uint32()!==0};function C(Z,J){return(Z[J-4]|Z[J-3]<<8|Z[J-2]<<16|Z[J-1]<<24)>>>0}k.prototype.fixed32=function(){if(this.pos+4>this.len)throw f(this,4);return C(this.buf,this.pos+=4)},k.prototype.sfixed32=function(){if(this.pos+4>this.len)throw f(this,4);return C(this.buf,this.pos+=4)|0};function M(){if(this.pos+8>this.len)throw f(this,8);return new I(C(this.buf,this.pos+=4),C(this.buf,this.pos+=4))}return k.prototype.float=function(){if(this.pos+4>this.len)throw f(this,4);var J=O.float.readFloatLE(this.buf,this.pos);return this.pos+=4,J},k.prototype.double=function(){if(this.pos+8>this.len)throw f(this,4);var J=O.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,J},k.prototype.bytes=function(){var J=this.uint32(),z=this.pos,Q=this.pos+J;if(Q>this.len)throw f(this,J);if(this.pos+=J,Array.isArray(this.buf))return this.buf.slice(z,Q);if(z===Q){var ee=O.Buffer;return ee?ee.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,z,Q)},k.prototype.string=function(){var J=this.bytes();return D.read(J,0,J.length)},k.prototype.skip=function(J){if(typeof J=="number"){if(this.pos+J>this.len)throw f(this,J);this.pos+=J}else do if(this.pos>=this.len)throw f(this);while(this.buf[this.pos++]&128);return this},k.prototype.skipType=function(Z){switch(Z){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(Z=this.uint32()&7)!==4;)this.skipType(Z);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+Z+" at offset "+this.pos)}return this},k._configure=function(Z){N=Z,k.create=c(),N._configure();var J=O.Long?"toLong":"toNumber";O.merge(k.prototype,{int64:function(){return $.call(this)[J](!1)},uint64:function(){return $.call(this)[J](!0)},sint64:function(){return $.call(this).zzDecode()[J](!1)},fixed64:function(){return M.call(this)[J](!0)},sfixed64:function(){return M.call(this)[J](!1)}})},reader}var reader_buffer,hasRequiredReader_buffer;function requireReader_buffer(){if(hasRequiredReader_buffer)return reader_buffer;hasRequiredReader_buffer=1,reader_buffer=I;var O=requireReader();(I.prototype=Object.create(O.prototype)).constructor=I;var N=requireMinimal$1();function I(D){O.call(this,D)}return I._configure=function(){N.Buffer&&(I.prototype._slice=N.Buffer.prototype.slice)},I.prototype.string=function(){var f=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+f,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+f,this.len))},I._configure(),reader_buffer}var rpc={},service,hasRequiredService;function requireService(){if(hasRequiredService)return service;hasRequiredService=1,service=N;var O=requireMinimal$1();(N.prototype=Object.create(O.EventEmitter.prototype)).constructor=N;function N(I,D,f){if(typeof I!="function")throw TypeError("rpcImpl must be a function");O.EventEmitter.call(this),this.rpcImpl=I,this.requestDelimited=!!D,this.responseDelimited=!!f}return N.prototype.rpcCall=function I(D,f,k,i,c){if(!i)throw TypeError("request must be specified");var $=this;if(!c)return O.asPromise(I,$,D,f,k,i);if(!$.rpcImpl){setTimeout(function(){c(Error("already ended"))},0);return}try{return $.rpcImpl(D,f[$.requestDelimited?"encodeDelimited":"encode"](i).finish(),function(M,Z){if(M)return $.emit("error",M,D),c(M);if(Z===null){$.end(!0);return}if(!(Z instanceof k))try{Z=k[$.responseDelimited?"decodeDelimited":"decode"](Z)}catch(J){return $.emit("error",J,D),c(J)}return $.emit("data",Z,D),c(null,Z)})}catch(C){$.emit("error",C,D),setTimeout(function(){c(C)},0);return}},N.prototype.end=function(D){return this.rpcImpl&&(D||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this},service}var hasRequiredRpc;function requireRpc(){return hasRequiredRpc||(hasRequiredRpc=1,function(O){var N=O;N.Service=requireService()}(rpc)),rpc}var roots,hasRequiredRoots;function requireRoots(){return hasRequiredRoots||(hasRequiredRoots=1,roots={}),roots}var hasRequiredIndexMinimal;function requireIndexMinimal(){return hasRequiredIndexMinimal||(hasRequiredIndexMinimal=1,function(O){var N=O;N.build="minimal",N.Writer=requireWriter(),N.BufferWriter=requireWriter_buffer(),N.Reader=requireReader(),N.BufferReader=requireReader_buffer(),N.util=requireMinimal$1(),N.rpc=requireRpc(),N.roots=requireRoots(),N.configure=I;function I(){N.util._configure(),N.Writer._configure(N.BufferWriter),N.Reader._configure(N.BufferReader)}I()}(indexMinimal)),indexMinimal}var minimal,hasRequiredMinimal;function requireMinimal(){return hasRequiredMinimal||(hasRequiredMinimal=1,minimal=requireIndexMinimal()),minimal}var minimalExports=requireMinimal();const $Reader=minimalExports.Reader,$Writer=minimalExports.Writer,$util=minimalExports.util,$root=minimalExports.roots.default||(minimalExports.roots.default={}),com=$root.com=(()=>{const O={};return O.quick=function(){const N={};return N.voice=function(){const I={};return I.proto=function(){const D={};return D.CommonReq=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.event="",f.prototype.data=$util.newBuffer([]),f.prototype.sn=$util.Long?$util.Long.fromBits(0,0,!1):0,f.prototype.time=$util.Long?$util.Long.fromBits(0,0,!1):0,f.prototype.valid=$util.Long?$util.Long.fromBits(0,0,!1):0,f.prototype.version=0,f.prototype.compress=!1,f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.event!=null&&Object.hasOwnProperty.call(i,"event")&&c.uint32(10).string(i.event),i.data!=null&&Object.hasOwnProperty.call(i,"data")&&c.uint32(18).bytes(i.data),i.sn!=null&&Object.hasOwnProperty.call(i,"sn")&&c.uint32(24).int64(i.sn),i.time!=null&&Object.hasOwnProperty.call(i,"time")&&c.uint32(32).int64(i.time),i.valid!=null&&Object.hasOwnProperty.call(i,"valid")&&c.uint32(40).int64(i.valid),i.version!=null&&Object.hasOwnProperty.call(i,"version")&&c.uint32(48).int32(i.version),i.compress!=null&&Object.hasOwnProperty.call(i,"compress")&&c.uint32(56).bool(i.compress),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.CommonReq;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.event=i.string();break}case 2:{C.data=i.bytes();break}case 3:{C.sn=i.int64();break}case 4:{C.time=i.int64();break}case 5:{C.valid=i.int64();break}case 6:{C.version=i.int32();break}case 7:{C.compress=i.bool();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){return typeof i!="object"||i===null?"object expected":i.event!=null&&i.hasOwnProperty("event")&&!$util.isString(i.event)?"event: string expected":i.data!=null&&i.hasOwnProperty("data")&&!(i.data&&typeof i.data.length=="number"||$util.isString(i.data))?"data: buffer expected":i.sn!=null&&i.hasOwnProperty("sn")&&!$util.isInteger(i.sn)&&!(i.sn&&$util.isInteger(i.sn.low)&&$util.isInteger(i.sn.high))?"sn: integer|Long expected":i.time!=null&&i.hasOwnProperty("time")&&!$util.isInteger(i.time)&&!(i.time&&$util.isInteger(i.time.low)&&$util.isInteger(i.time.high))?"time: integer|Long expected":i.valid!=null&&i.hasOwnProperty("valid")&&!$util.isInteger(i.valid)&&!(i.valid&&$util.isInteger(i.valid.low)&&$util.isInteger(i.valid.high))?"valid: integer|Long expected":i.version!=null&&i.hasOwnProperty("version")&&!$util.isInteger(i.version)?"version: integer expected":i.compress!=null&&i.hasOwnProperty("compress")&&typeof i.compress!="boolean"?"compress: boolean expected":null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.CommonReq)return i;let c=new $root.com.quick.voice.proto.CommonReq;return i.event!=null&&(c.event=String(i.event)),i.data!=null&&(typeof i.data=="string"?$util.base64.decode(i.data,c.data=$util.newBuffer($util.base64.length(i.data)),0):i.data.length>=0&&(c.data=i.data)),i.sn!=null&&($util.Long?(c.sn=$util.Long.fromValue(i.sn)).unsigned=!1:typeof i.sn=="string"?c.sn=parseInt(i.sn,10):typeof i.sn=="number"?c.sn=i.sn:typeof i.sn=="object"&&(c.sn=new $util.LongBits(i.sn.low>>>0,i.sn.high>>>0).toNumber())),i.time!=null&&($util.Long?(c.time=$util.Long.fromValue(i.time)).unsigned=!1:typeof i.time=="string"?c.time=parseInt(i.time,10):typeof i.time=="number"?c.time=i.time:typeof i.time=="object"&&(c.time=new $util.LongBits(i.time.low>>>0,i.time.high>>>0).toNumber())),i.valid!=null&&($util.Long?(c.valid=$util.Long.fromValue(i.valid)).unsigned=!1:typeof i.valid=="string"?c.valid=parseInt(i.valid,10):typeof i.valid=="number"?c.valid=i.valid:typeof i.valid=="object"&&(c.valid=new $util.LongBits(i.valid.low>>>0,i.valid.high>>>0).toNumber())),i.version!=null&&(c.version=i.version|0),i.compress!=null&&(c.compress=!!i.compress),c},f.toObject=function(i,c){c||(c={});let $={};if(c.defaults){if($.event="",c.bytes===String?$.data="":($.data=[],c.bytes!==Array&&($.data=$util.newBuffer($.data))),$util.Long){let C=new $util.Long(0,0,!1);$.sn=c.longs===String?C.toString():c.longs===Number?C.toNumber():C}else $.sn=c.longs===String?"0":0;if($util.Long){let C=new $util.Long(0,0,!1);$.time=c.longs===String?C.toString():c.longs===Number?C.toNumber():C}else $.time=c.longs===String?"0":0;if($util.Long){let C=new $util.Long(0,0,!1);$.valid=c.longs===String?C.toString():c.longs===Number?C.toNumber():C}else $.valid=c.longs===String?"0":0;$.version=0,$.compress=!1}return i.event!=null&&i.hasOwnProperty("event")&&($.event=i.event),i.data!=null&&i.hasOwnProperty("data")&&($.data=c.bytes===String?$util.base64.encode(i.data,0,i.data.length):c.bytes===Array?Array.prototype.slice.call(i.data):i.data),i.sn!=null&&i.hasOwnProperty("sn")&&(typeof i.sn=="number"?$.sn=c.longs===String?String(i.sn):i.sn:$.sn=c.longs===String?$util.Long.prototype.toString.call(i.sn):c.longs===Number?new $util.LongBits(i.sn.low>>>0,i.sn.high>>>0).toNumber():i.sn),i.time!=null&&i.hasOwnProperty("time")&&(typeof i.time=="number"?$.time=c.longs===String?String(i.time):i.time:$.time=c.longs===String?$util.Long.prototype.toString.call(i.time):c.longs===Number?new $util.LongBits(i.time.low>>>0,i.time.high>>>0).toNumber():i.time),i.valid!=null&&i.hasOwnProperty("valid")&&(typeof i.valid=="number"?$.valid=c.longs===String?String(i.valid):i.valid:$.valid=c.longs===String?$util.Long.prototype.toString.call(i.valid):c.longs===Number?new $util.LongBits(i.valid.low>>>0,i.valid.high>>>0).toNumber():i.valid),i.version!=null&&i.hasOwnProperty("version")&&($.version=i.version),i.compress!=null&&i.hasOwnProperty("compress")&&($.compress=i.compress),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.CommonReq"},f}(),D.CommonRsp=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.event="",f.prototype.data=$util.newBuffer([]),f.prototype.sn=$util.Long?$util.Long.fromBits(0,0,!1):0,f.prototype.time=$util.Long?$util.Long.fromBits(0,0,!1):0,f.prototype.valid=$util.Long?$util.Long.fromBits(0,0,!1):0,f.prototype.code=0,f.prototype.desc="",f.prototype.version=0,f.prototype.compress=!1,f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.event!=null&&Object.hasOwnProperty.call(i,"event")&&c.uint32(10).string(i.event),i.data!=null&&Object.hasOwnProperty.call(i,"data")&&c.uint32(18).bytes(i.data),i.sn!=null&&Object.hasOwnProperty.call(i,"sn")&&c.uint32(24).int64(i.sn),i.time!=null&&Object.hasOwnProperty.call(i,"time")&&c.uint32(32).int64(i.time),i.valid!=null&&Object.hasOwnProperty.call(i,"valid")&&c.uint32(40).int64(i.valid),i.code!=null&&Object.hasOwnProperty.call(i,"code")&&c.uint32(48).int32(i.code),i.desc!=null&&Object.hasOwnProperty.call(i,"desc")&&c.uint32(58).string(i.desc),i.version!=null&&Object.hasOwnProperty.call(i,"version")&&c.uint32(64).int32(i.version),i.compress!=null&&Object.hasOwnProperty.call(i,"compress")&&c.uint32(72).bool(i.compress),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.CommonRsp;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.event=i.string();break}case 2:{C.data=i.bytes();break}case 3:{C.sn=i.int64();break}case 4:{C.time=i.int64();break}case 5:{C.valid=i.int64();break}case 6:{C.code=i.int32();break}case 7:{C.desc=i.string();break}case 8:{C.version=i.int32();break}case 9:{C.compress=i.bool();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){return typeof i!="object"||i===null?"object expected":i.event!=null&&i.hasOwnProperty("event")&&!$util.isString(i.event)?"event: string expected":i.data!=null&&i.hasOwnProperty("data")&&!(i.data&&typeof i.data.length=="number"||$util.isString(i.data))?"data: buffer expected":i.sn!=null&&i.hasOwnProperty("sn")&&!$util.isInteger(i.sn)&&!(i.sn&&$util.isInteger(i.sn.low)&&$util.isInteger(i.sn.high))?"sn: integer|Long expected":i.time!=null&&i.hasOwnProperty("time")&&!$util.isInteger(i.time)&&!(i.time&&$util.isInteger(i.time.low)&&$util.isInteger(i.time.high))?"time: integer|Long expected":i.valid!=null&&i.hasOwnProperty("valid")&&!$util.isInteger(i.valid)&&!(i.valid&&$util.isInteger(i.valid.low)&&$util.isInteger(i.valid.high))?"valid: integer|Long expected":i.code!=null&&i.hasOwnProperty("code")&&!$util.isInteger(i.code)?"code: integer expected":i.desc!=null&&i.hasOwnProperty("desc")&&!$util.isString(i.desc)?"desc: string expected":i.version!=null&&i.hasOwnProperty("version")&&!$util.isInteger(i.version)?"version: integer expected":i.compress!=null&&i.hasOwnProperty("compress")&&typeof i.compress!="boolean"?"compress: boolean expected":null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.CommonRsp)return i;let c=new $root.com.quick.voice.proto.CommonRsp;return i.event!=null&&(c.event=String(i.event)),i.data!=null&&(typeof i.data=="string"?$util.base64.decode(i.data,c.data=$util.newBuffer($util.base64.length(i.data)),0):i.data.length>=0&&(c.data=i.data)),i.sn!=null&&($util.Long?(c.sn=$util.Long.fromValue(i.sn)).unsigned=!1:typeof i.sn=="string"?c.sn=parseInt(i.sn,10):typeof i.sn=="number"?c.sn=i.sn:typeof i.sn=="object"&&(c.sn=new $util.LongBits(i.sn.low>>>0,i.sn.high>>>0).toNumber())),i.time!=null&&($util.Long?(c.time=$util.Long.fromValue(i.time)).unsigned=!1:typeof i.time=="string"?c.time=parseInt(i.time,10):typeof i.time=="number"?c.time=i.time:typeof i.time=="object"&&(c.time=new $util.LongBits(i.time.low>>>0,i.time.high>>>0).toNumber())),i.valid!=null&&($util.Long?(c.valid=$util.Long.fromValue(i.valid)).unsigned=!1:typeof i.valid=="string"?c.valid=parseInt(i.valid,10):typeof i.valid=="number"?c.valid=i.valid:typeof i.valid=="object"&&(c.valid=new $util.LongBits(i.valid.low>>>0,i.valid.high>>>0).toNumber())),i.code!=null&&(c.code=i.code|0),i.desc!=null&&(c.desc=String(i.desc)),i.version!=null&&(c.version=i.version|0),i.compress!=null&&(c.compress=!!i.compress),c},f.toObject=function(i,c){c||(c={});let $={};if(c.defaults){if($.event="",c.bytes===String?$.data="":($.data=[],c.bytes!==Array&&($.data=$util.newBuffer($.data))),$util.Long){let C=new $util.Long(0,0,!1);$.sn=c.longs===String?C.toString():c.longs===Number?C.toNumber():C}else $.sn=c.longs===String?"0":0;if($util.Long){let C=new $util.Long(0,0,!1);$.time=c.longs===String?C.toString():c.longs===Number?C.toNumber():C}else $.time=c.longs===String?"0":0;if($util.Long){let C=new $util.Long(0,0,!1);$.valid=c.longs===String?C.toString():c.longs===Number?C.toNumber():C}else $.valid=c.longs===String?"0":0;$.code=0,$.desc="",$.version=0,$.compress=!1}return i.event!=null&&i.hasOwnProperty("event")&&($.event=i.event),i.data!=null&&i.hasOwnProperty("data")&&($.data=c.bytes===String?$util.base64.encode(i.data,0,i.data.length):c.bytes===Array?Array.prototype.slice.call(i.data):i.data),i.sn!=null&&i.hasOwnProperty("sn")&&(typeof i.sn=="number"?$.sn=c.longs===String?String(i.sn):i.sn:$.sn=c.longs===String?$util.Long.prototype.toString.call(i.sn):c.longs===Number?new $util.LongBits(i.sn.low>>>0,i.sn.high>>>0).toNumber():i.sn),i.time!=null&&i.hasOwnProperty("time")&&(typeof i.time=="number"?$.time=c.longs===String?String(i.time):i.time:$.time=c.longs===String?$util.Long.prototype.toString.call(i.time):c.longs===Number?new $util.LongBits(i.time.low>>>0,i.time.high>>>0).toNumber():i.time),i.valid!=null&&i.hasOwnProperty("valid")&&(typeof i.valid=="number"?$.valid=c.longs===String?String(i.valid):i.valid:$.valid=c.longs===String?$util.Long.prototype.toString.call(i.valid):c.longs===Number?new $util.LongBits(i.valid.low>>>0,i.valid.high>>>0).toNumber():i.valid),i.code!=null&&i.hasOwnProperty("code")&&($.code=i.code),i.desc!=null&&i.hasOwnProperty("desc")&&($.desc=i.desc),i.version!=null&&i.hasOwnProperty("version")&&($.version=i.version),i.compress!=null&&i.hasOwnProperty("compress")&&($.compress=i.compress),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.CommonRsp"},f}(),D.User=function(){function f(i){if(this.tracks=[],i)for(let c=Object.keys(i),$=0;$<c.length;++$)i[c[$]]!=null&&(this[c[$]]=i[c[$]])}f.prototype.id="",f.prototype.callAction=null,f.prototype.callState=null,f.prototype.joinTime=null,f.prototype.tracks=$util.emptyArray,f.prototype.permissions=null,f.prototype.isPublished=null,f.prototype.behavior=null,f.prototype.channelCache=null;let k;return Object.defineProperty(f.prototype,"_callAction",{get:$util.oneOfGetter(k=["callAction"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_callState",{get:$util.oneOfGetter(k=["callState"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_joinTime",{get:$util.oneOfGetter(k=["joinTime"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_permissions",{get:$util.oneOfGetter(k=["permissions"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_isPublished",{get:$util.oneOfGetter(k=["isPublished"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_behavior",{get:$util.oneOfGetter(k=["behavior"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_channelCache",{get:$util.oneOfGetter(k=["channelCache"]),set:$util.oneOfSetter(k)}),f.create=function(c){return new f(c)},f.encode=function(c,$){if($||($=$Writer.create()),c.id!=null&&Object.hasOwnProperty.call(c,"id")&&$.uint32(10).string(c.id),c.callAction!=null&&Object.hasOwnProperty.call(c,"callAction")&&$.uint32(16).int32(c.callAction),c.callState!=null&&Object.hasOwnProperty.call(c,"callState")&&$.uint32(24).int32(c.callState),c.joinTime!=null&&Object.hasOwnProperty.call(c,"joinTime")&&$.uint32(32).int64(c.joinTime),c.tracks!=null&&c.tracks.length)for(let C=0;C<c.tracks.length;++C)$root.com.quick.voice.proto.Track.encode(c.tracks[C],$.uint32(42).fork()).ldelim();return c.permissions!=null&&Object.hasOwnProperty.call(c,"permissions")&&$.uint32(48).int32(c.permissions),c.isPublished!=null&&Object.hasOwnProperty.call(c,"isPublished")&&$.uint32(56).bool(c.isPublished),c.behavior!=null&&Object.hasOwnProperty.call(c,"behavior")&&$.uint32(64).int32(c.behavior),c.channelCache!=null&&Object.hasOwnProperty.call(c,"channelCache")&&$root.com.quick.voice.proto.DataChannelCacheInfo.encode(c.channelCache,$.uint32(74).fork()).ldelim(),$},f.encodeDelimited=function(c,$){return this.encode(c,$).ldelim()},f.decode=function(c,$){c instanceof $Reader||(c=$Reader.create(c));let C=$===void 0?c.len:c.pos+$,M=new $root.com.quick.voice.proto.User;for(;c.pos<C;){let Z=c.uint32();switch(Z>>>3){case 1:{M.id=c.string();break}case 2:{M.callAction=c.int32();break}case 3:{M.callState=c.int32();break}case 4:{M.joinTime=c.int64();break}case 5:{M.tracks&&M.tracks.length||(M.tracks=[]),M.tracks.push($root.com.quick.voice.proto.Track.decode(c,c.uint32()));break}case 6:{M.permissions=c.int32();break}case 7:{M.isPublished=c.bool();break}case 8:{M.behavior=c.int32();break}case 9:{M.channelCache=$root.com.quick.voice.proto.DataChannelCacheInfo.decode(c,c.uint32());break}default:c.skipType(Z&7);break}}return M},f.decodeDelimited=function(c){return c instanceof $Reader||(c=new $Reader(c)),this.decode(c,c.uint32())},f.verify=function(c){if(typeof c!="object"||c===null)return"object expected";if(c.id!=null&&c.hasOwnProperty("id")&&!$util.isString(c.id))return"id: string expected";if(c.callAction!=null&&c.hasOwnProperty("callAction")&&!$util.isInteger(c.callAction))return"callAction: integer expected";if(c.callState!=null&&c.hasOwnProperty("callState")&&!$util.isInteger(c.callState))return"callState: integer expected";if(c.joinTime!=null&&c.hasOwnProperty("joinTime")&&!$util.isInteger(c.joinTime)&&!(c.joinTime&&$util.isInteger(c.joinTime.low)&&$util.isInteger(c.joinTime.high)))return"joinTime: integer|Long expected";if(c.tracks!=null&&c.hasOwnProperty("tracks")){if(!Array.isArray(c.tracks))return"tracks: array expected";for(let $=0;$<c.tracks.length;++$){let C=$root.com.quick.voice.proto.Track.verify(c.tracks[$]);if(C)return"tracks."+C}}if(c.permissions!=null&&c.hasOwnProperty("permissions")&&!$util.isInteger(c.permissions))return"permissions: integer expected";if(c.isPublished!=null&&c.hasOwnProperty("isPublished")&&typeof c.isPublished!="boolean")return"isPublished: boolean expected";if(c.behavior!=null&&c.hasOwnProperty("behavior")&&!$util.isInteger(c.behavior))return"behavior: integer expected";if(c.channelCache!=null&&c.hasOwnProperty("channelCache")){let $=$root.com.quick.voice.proto.DataChannelCacheInfo.verify(c.channelCache);if($)return"channelCache."+$}return null},f.fromObject=function(c){if(c instanceof $root.com.quick.voice.proto.User)return c;let $=new $root.com.quick.voice.proto.User;if(c.id!=null&&($.id=String(c.id)),c.callAction!=null&&($.callAction=c.callAction|0),c.callState!=null&&($.callState=c.callState|0),c.joinTime!=null&&($util.Long?($.joinTime=$util.Long.fromValue(c.joinTime)).unsigned=!1:typeof c.joinTime=="string"?$.joinTime=parseInt(c.joinTime,10):typeof c.joinTime=="number"?$.joinTime=c.joinTime:typeof c.joinTime=="object"&&($.joinTime=new $util.LongBits(c.joinTime.low>>>0,c.joinTime.high>>>0).toNumber())),c.tracks){if(!Array.isArray(c.tracks))throw TypeError(".com.quick.voice.proto.User.tracks: array expected");$.tracks=[];for(let C=0;C<c.tracks.length;++C){if(typeof c.tracks[C]!="object")throw TypeError(".com.quick.voice.proto.User.tracks: object expected");$.tracks[C]=$root.com.quick.voice.proto.Track.fromObject(c.tracks[C])}}if(c.permissions!=null&&($.permissions=c.permissions|0),c.isPublished!=null&&($.isPublished=!!c.isPublished),c.behavior!=null&&($.behavior=c.behavior|0),c.channelCache!=null){if(typeof c.channelCache!="object")throw TypeError(".com.quick.voice.proto.User.channelCache: object expected");$.channelCache=$root.com.quick.voice.proto.DataChannelCacheInfo.fromObject(c.channelCache)}return $},f.toObject=function(c,$){$||($={});let C={};if(($.arrays||$.defaults)&&(C.tracks=[]),$.defaults&&(C.id=""),c.id!=null&&c.hasOwnProperty("id")&&(C.id=c.id),c.callAction!=null&&c.hasOwnProperty("callAction")&&(C.callAction=c.callAction,$.oneofs&&(C._callAction="callAction")),c.callState!=null&&c.hasOwnProperty("callState")&&(C.callState=c.callState,$.oneofs&&(C._callState="callState")),c.joinTime!=null&&c.hasOwnProperty("joinTime")&&(typeof c.joinTime=="number"?C.joinTime=$.longs===String?String(c.joinTime):c.joinTime:C.joinTime=$.longs===String?$util.Long.prototype.toString.call(c.joinTime):$.longs===Number?new $util.LongBits(c.joinTime.low>>>0,c.joinTime.high>>>0).toNumber():c.joinTime,$.oneofs&&(C._joinTime="joinTime")),c.tracks&&c.tracks.length){C.tracks=[];for(let M=0;M<c.tracks.length;++M)C.tracks[M]=$root.com.quick.voice.proto.Track.toObject(c.tracks[M],$)}return c.permissions!=null&&c.hasOwnProperty("permissions")&&(C.permissions=c.permissions,$.oneofs&&(C._permissions="permissions")),c.isPublished!=null&&c.hasOwnProperty("isPublished")&&(C.isPublished=c.isPublished,$.oneofs&&(C._isPublished="isPublished")),c.behavior!=null&&c.hasOwnProperty("behavior")&&(C.behavior=c.behavior,$.oneofs&&(C._behavior="behavior")),c.channelCache!=null&&c.hasOwnProperty("channelCache")&&(C.channelCache=$root.com.quick.voice.proto.DataChannelCacheInfo.toObject(c.channelCache,$),$.oneofs&&(C._channelCache="channelCache")),C},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(c){return c===void 0&&(c="type.googleapis.com"),c+"/com.quick.voice.proto.User"},f}(),D.DataChannelCacheInfo=function(){function f(k){if(this.channels=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.channels=$util.emptyArray,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.channels!=null&&i.channels.length)for(let $=0;$<i.channels.length;++$)$root.com.quick.voice.proto.DataChannel.encode(i.channels[$],c.uint32(10).fork()).ldelim();return c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.DataChannelCacheInfo;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.channels&&C.channels.length||(C.channels=[]),C.channels.push($root.com.quick.voice.proto.DataChannel.decode(i,i.uint32()));break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.channels!=null&&i.hasOwnProperty("channels")){if(!Array.isArray(i.channels))return"channels: array expected";for(let c=0;c<i.channels.length;++c){let $=$root.com.quick.voice.proto.DataChannel.verify(i.channels[c]);if($)return"channels."+$}}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.DataChannelCacheInfo)return i;let c=new $root.com.quick.voice.proto.DataChannelCacheInfo;if(i.channels){if(!Array.isArray(i.channels))throw TypeError(".com.quick.voice.proto.DataChannelCacheInfo.channels: array expected");c.channels=[];for(let $=0;$<i.channels.length;++$){if(typeof i.channels[$]!="object")throw TypeError(".com.quick.voice.proto.DataChannelCacheInfo.channels: object expected");c.channels[$]=$root.com.quick.voice.proto.DataChannel.fromObject(i.channels[$])}}return c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.channels=[]),i.channels&&i.channels.length){$.channels=[];for(let C=0;C<i.channels.length;++C)$.channels[C]=$root.com.quick.voice.proto.DataChannel.toObject(i.channels[C],c)}return $},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.DataChannelCacheInfo"},f}(),D.DataChannel=function(){function f(i){if(i)for(let c=Object.keys(i),$=0;$<c.length;++$)i[c[$]]!=null&&(this[c[$]]=i[c[$]])}f.prototype.dataChannelName="",f.prototype.id=null;let k;return Object.defineProperty(f.prototype,"_id",{get:$util.oneOfGetter(k=["id"]),set:$util.oneOfSetter(k)}),f.create=function(c){return new f(c)},f.encode=function(c,$){return $||($=$Writer.create()),c.dataChannelName!=null&&Object.hasOwnProperty.call(c,"dataChannelName")&&$.uint32(10).string(c.dataChannelName),c.id!=null&&Object.hasOwnProperty.call(c,"id")&&$.uint32(16).int32(c.id),$},f.encodeDelimited=function(c,$){return this.encode(c,$).ldelim()},f.decode=function(c,$){c instanceof $Reader||(c=$Reader.create(c));let C=$===void 0?c.len:c.pos+$,M=new $root.com.quick.voice.proto.DataChannel;for(;c.pos<C;){let Z=c.uint32();switch(Z>>>3){case 1:{M.dataChannelName=c.string();break}case 2:{M.id=c.int32();break}default:c.skipType(Z&7);break}}return M},f.decodeDelimited=function(c){return c instanceof $Reader||(c=new $Reader(c)),this.decode(c,c.uint32())},f.verify=function(c){return typeof c!="object"||c===null?"object expected":c.dataChannelName!=null&&c.hasOwnProperty("dataChannelName")&&!$util.isString(c.dataChannelName)?"dataChannelName: string expected":c.id!=null&&c.hasOwnProperty("id")&&!$util.isInteger(c.id)?"id: integer expected":null},f.fromObject=function(c){if(c instanceof $root.com.quick.voice.proto.DataChannel)return c;let $=new $root.com.quick.voice.proto.DataChannel;return c.dataChannelName!=null&&($.dataChannelName=String(c.dataChannelName)),c.id!=null&&($.id=c.id|0),$},f.toObject=function(c,$){$||($={});let C={};return $.defaults&&(C.dataChannelName=""),c.dataChannelName!=null&&c.hasOwnProperty("dataChannelName")&&(C.dataChannelName=c.dataChannelName),c.id!=null&&c.hasOwnProperty("id")&&(C.id=c.id,$.oneofs&&(C._id="id")),C},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(c){return c===void 0&&(c="type.googleapis.com"),c+"/com.quick.voice.proto.DataChannel"},f}(),D.Login=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.appid="",f.prototype.userId="",f.prototype.sdkToken="",f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.appid!=null&&Object.hasOwnProperty.call(i,"appid")&&c.uint32(10).string(i.appid),i.userId!=null&&Object.hasOwnProperty.call(i,"userId")&&c.uint32(18).string(i.userId),i.sdkToken!=null&&Object.hasOwnProperty.call(i,"sdkToken")&&c.uint32(26).string(i.sdkToken),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.Login;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.appid=i.string();break}case 2:{C.userId=i.string();break}case 3:{C.sdkToken=i.string();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){return typeof i!="object"||i===null?"object expected":i.appid!=null&&i.hasOwnProperty("appid")&&!$util.isString(i.appid)?"appid: string expected":i.userId!=null&&i.hasOwnProperty("userId")&&!$util.isString(i.userId)?"userId: string expected":i.sdkToken!=null&&i.hasOwnProperty("sdkToken")&&!$util.isString(i.sdkToken)?"sdkToken: string expected":null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.Login)return i;let c=new $root.com.quick.voice.proto.Login;return i.appid!=null&&(c.appid=String(i.appid)),i.userId!=null&&(c.userId=String(i.userId)),i.sdkToken!=null&&(c.sdkToken=String(i.sdkToken)),c},f.toObject=function(i,c){c||(c={});let $={};return c.defaults&&($.appid="",$.userId="",$.sdkToken=""),i.appid!=null&&i.hasOwnProperty("appid")&&($.appid=i.appid),i.userId!=null&&i.hasOwnProperty("userId")&&($.userId=i.userId),i.sdkToken!=null&&i.hasOwnProperty("sdkToken")&&($.sdkToken=i.sdkToken),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.Login"},f}(),D.Track=function(){function f(i){if(i)for(let c=Object.keys(i),$=0;$<c.length;++$)i[c[$]]!=null&&(this[c[$]]=i[c[$]])}f.prototype.mid="",f.prototype.trackName=null,f.prototype.location=null,f.prototype.userId=null,f.prototype.code=null,f.prototype.desc=null,f.prototype.type=null,f.prototype.isValid=null,f.prototype.simulcast=null;let k;return Object.defineProperty(f.prototype,"_trackName",{get:$util.oneOfGetter(k=["trackName"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_location",{get:$util.oneOfGetter(k=["location"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_userId",{get:$util.oneOfGetter(k=["userId"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_code",{get:$util.oneOfGetter(k=["code"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_desc",{get:$util.oneOfGetter(k=["desc"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_type",{get:$util.oneOfGetter(k=["type"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_isValid",{get:$util.oneOfGetter(k=["isValid"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_simulcast",{get:$util.oneOfGetter(k=["simulcast"]),set:$util.oneOfSetter(k)}),f.create=function(c){return new f(c)},f.encode=function(c,$){return $||($=$Writer.create()),c.mid!=null&&Object.hasOwnProperty.call(c,"mid")&&$.uint32(10).string(c.mid),c.trackName!=null&&Object.hasOwnProperty.call(c,"trackName")&&$.uint32(18).string(c.trackName),c.location!=null&&Object.hasOwnProperty.call(c,"location")&&$.uint32(26).string(c.location),c.userId!=null&&Object.hasOwnProperty.call(c,"userId")&&$.uint32(34).string(c.userId),c.code!=null&&Object.hasOwnProperty.call(c,"code")&&$.uint32(40).int32(c.code),c.desc!=null&&Object.hasOwnProperty.call(c,"desc")&&$.uint32(50).string(c.desc),c.type!=null&&Object.hasOwnProperty.call(c,"type")&&$.uint32(56).int32(c.type),c.isValid!=null&&Object.hasOwnProperty.call(c,"isValid")&&$.uint32(64).bool(c.isValid),c.simulcast!=null&&Object.hasOwnProperty.call(c,"simulcast")&&$.uint32(74).string(c.simulcast),$},f.encodeDelimited=function(c,$){return this.encode(c,$).ldelim()},f.decode=function(c,$){c instanceof $Reader||(c=$Reader.create(c));let C=$===void 0?c.len:c.pos+$,M=new $root.com.quick.voice.proto.Track;for(;c.pos<C;){let Z=c.uint32();switch(Z>>>3){case 1:{M.mid=c.string();break}case 2:{M.trackName=c.string();break}case 3:{M.location=c.string();break}case 4:{M.userId=c.string();break}case 5:{M.code=c.int32();break}case 6:{M.desc=c.string();break}case 7:{M.type=c.int32();break}case 8:{M.isValid=c.bool();break}case 9:{M.simulcast=c.string();break}default:c.skipType(Z&7);break}}return M},f.decodeDelimited=function(c){return c instanceof $Reader||(c=new $Reader(c)),this.decode(c,c.uint32())},f.verify=function(c){if(typeof c!="object"||c===null)return"object expected";if(c.mid!=null&&c.hasOwnProperty("mid")&&!$util.isString(c.mid))return"mid: string expected";if(c.trackName!=null&&c.hasOwnProperty("trackName")&&!$util.isString(c.trackName))return"trackName: string expected";if(c.location!=null&&c.hasOwnProperty("location")&&!$util.isString(c.location))return"location: string expected";if(c.userId!=null&&c.hasOwnProperty("userId")&&!$util.isString(c.userId))return"userId: string expected";if(c.code!=null&&c.hasOwnProperty("code")&&!$util.isInteger(c.code))return"code: integer expected";if(c.desc!=null&&c.hasOwnProperty("desc")&&!$util.isString(c.desc))return"desc: string expected";if(c.type!=null&&c.hasOwnProperty("type"))switch(c.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:break}return c.isValid!=null&&c.hasOwnProperty("isValid")&&typeof c.isValid!="boolean"?"isValid: boolean expected":c.simulcast!=null&&c.hasOwnProperty("simulcast")&&!$util.isString(c.simulcast)?"simulcast: string expected":null},f.fromObject=function(c){if(c instanceof $root.com.quick.voice.proto.Track)return c;let $=new $root.com.quick.voice.proto.Track;switch(c.mid!=null&&($.mid=String(c.mid)),c.trackName!=null&&($.trackName=String(c.trackName)),c.location!=null&&($.location=String(c.location)),c.userId!=null&&($.userId=String(c.userId)),c.code!=null&&($.code=c.code|0),c.desc!=null&&($.desc=String(c.desc)),c.type){default:if(typeof c.type=="number"){$.type=c.type;break}break;case"Microphone":case 0:$.type=0;break;case"Camera":case 1:$.type=1;break;case"Screen":case 2:$.type=2;break;case"SystemVoice":case 3:$.type=3;break}return c.isValid!=null&&($.isValid=!!c.isValid),c.simulcast!=null&&($.simulcast=String(c.simulcast)),$},f.toObject=function(c,$){$||($={});let C={};return $.defaults&&(C.mid=""),c.mid!=null&&c.hasOwnProperty("mid")&&(C.mid=c.mid),c.trackName!=null&&c.hasOwnProperty("trackName")&&(C.trackName=c.trackName,$.oneofs&&(C._trackName="trackName")),c.location!=null&&c.hasOwnProperty("location")&&(C.location=c.location,$.oneofs&&(C._location="location")),c.userId!=null&&c.hasOwnProperty("userId")&&(C.userId=c.userId,$.oneofs&&(C._userId="userId")),c.code!=null&&c.hasOwnProperty("code")&&(C.code=c.code,$.oneofs&&(C._code="code")),c.desc!=null&&c.hasOwnProperty("desc")&&(C.desc=c.desc,$.oneofs&&(C._desc="desc")),c.type!=null&&c.hasOwnProperty("type")&&(C.type=$.enums===String?$root.com.quick.voice.proto.TrackType[c.type]===void 0?c.type:$root.com.quick.voice.proto.TrackType[c.type]:c.type,$.oneofs&&(C._type="type")),c.isValid!=null&&c.hasOwnProperty("isValid")&&(C.isValid=c.isValid,$.oneofs&&(C._isValid="isValid")),c.simulcast!=null&&c.hasOwnProperty("simulcast")&&(C.simulcast=c.simulcast,$.oneofs&&(C._simulcast="simulcast")),C},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(c){return c===void 0&&(c="type.googleapis.com"),c+"/com.quick.voice.proto.Track"},f}(),D.JoinReq=function(){function f(i){if(i)for(let c=Object.keys(i),$=0;$<c.length;++$)i[c[$]]!=null&&(this[c[$]]=i[c[$]])}f.prototype.roomId="",f.prototype.user=null,f.prototype.callType=0,f.prototype.token=null;let k;return Object.defineProperty(f.prototype,"_token",{get:$util.oneOfGetter(k=["token"]),set:$util.oneOfSetter(k)}),f.create=function(c){return new f(c)},f.encode=function(c,$){return $||($=$Writer.create()),c.roomId!=null&&Object.hasOwnProperty.call(c,"roomId")&&$.uint32(10).string(c.roomId),c.user!=null&&Object.hasOwnProperty.call(c,"user")&&$root.com.quick.voice.proto.User.encode(c.user,$.uint32(18).fork()).ldelim(),c.callType!=null&&Object.hasOwnProperty.call(c,"callType")&&$.uint32(24).int32(c.callType),c.token!=null&&Object.hasOwnProperty.call(c,"token")&&$.uint32(34).string(c.token),$},f.encodeDelimited=function(c,$){return this.encode(c,$).ldelim()},f.decode=function(c,$){c instanceof $Reader||(c=$Reader.create(c));let C=$===void 0?c.len:c.pos+$,M=new $root.com.quick.voice.proto.JoinReq;for(;c.pos<C;){let Z=c.uint32();switch(Z>>>3){case 1:{M.roomId=c.string();break}case 2:{M.user=$root.com.quick.voice.proto.User.decode(c,c.uint32());break}case 3:{M.callType=c.int32();break}case 4:{M.token=c.string();break}default:c.skipType(Z&7);break}}return M},f.decodeDelimited=function(c){return c instanceof $Reader||(c=new $Reader(c)),this.decode(c,c.uint32())},f.verify=function(c){if(typeof c!="object"||c===null)return"object expected";if(c.roomId!=null&&c.hasOwnProperty("roomId")&&!$util.isString(c.roomId))return"roomId: string expected";if(c.user!=null&&c.hasOwnProperty("user")){let $=$root.com.quick.voice.proto.User.verify(c.user);if($)return"user."+$}if(c.callType!=null&&c.hasOwnProperty("callType"))switch(c.callType){default:return"callType: enum value expected";case 0:case 1:case 2:break}return c.token!=null&&c.hasOwnProperty("token")&&!$util.isString(c.token)?"token: string expected":null},f.fromObject=function(c){if(c instanceof $root.com.quick.voice.proto.JoinReq)return c;let $=new $root.com.quick.voice.proto.JoinReq;if(c.roomId!=null&&($.roomId=String(c.roomId)),c.user!=null){if(typeof c.user!="object")throw TypeError(".com.quick.voice.proto.JoinReq.user: object expected");$.user=$root.com.quick.voice.proto.User.fromObject(c.user)}switch(c.callType){default:if(typeof c.callType=="number"){$.callType=c.callType;break}break;case"Normal":case 0:$.callType=0;break;case"Meeting":case 1:$.callType=1;break;case"Live":case 2:$.callType=2;break}return c.token!=null&&($.token=String(c.token)),$},f.toObject=function(c,$){$||($={});let C={};return $.defaults&&(C.roomId="",C.user=null,C.callType=$.enums===String?"Normal":0),c.roomId!=null&&c.hasOwnProperty("roomId")&&(C.roomId=c.roomId),c.user!=null&&c.hasOwnProperty("user")&&(C.user=$root.com.quick.voice.proto.User.toObject(c.user,$)),c.callType!=null&&c.hasOwnProperty("callType")&&(C.callType=$.enums===String?$root.com.quick.voice.proto.CallType[c.callType]===void 0?c.callType:$root.com.quick.voice.proto.CallType[c.callType]:c.callType),c.token!=null&&c.hasOwnProperty("token")&&(C.token=c.token,$.oneofs&&(C._token="token")),C},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(c){return c===void 0&&(c="type.googleapis.com"),c+"/com.quick.voice.proto.JoinReq"},f}(),D.JoinRsp=function(){function f(k){if(this.roomUsers=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.roomId="",f.prototype.roomUsers=$util.emptyArray,f.prototype.callType=0,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.roomId!=null&&Object.hasOwnProperty.call(i,"roomId")&&c.uint32(10).string(i.roomId),i.roomUsers!=null&&i.roomUsers.length)for(let $=0;$<i.roomUsers.length;++$)$root.com.quick.voice.proto.User.encode(i.roomUsers[$],c.uint32(18).fork()).ldelim();return i.callType!=null&&Object.hasOwnProperty.call(i,"callType")&&c.uint32(24).int32(i.callType),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.JoinRsp;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.roomId=i.string();break}case 2:{C.roomUsers&&C.roomUsers.length||(C.roomUsers=[]),C.roomUsers.push($root.com.quick.voice.proto.User.decode(i,i.uint32()));break}case 3:{C.callType=i.int32();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.roomId!=null&&i.hasOwnProperty("roomId")&&!$util.isString(i.roomId))return"roomId: string expected";if(i.roomUsers!=null&&i.hasOwnProperty("roomUsers")){if(!Array.isArray(i.roomUsers))return"roomUsers: array expected";for(let c=0;c<i.roomUsers.length;++c){let $=$root.com.quick.voice.proto.User.verify(i.roomUsers[c]);if($)return"roomUsers."+$}}if(i.callType!=null&&i.hasOwnProperty("callType"))switch(i.callType){default:return"callType: enum value expected";case 0:case 1:case 2:break}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.JoinRsp)return i;let c=new $root.com.quick.voice.proto.JoinRsp;if(i.roomId!=null&&(c.roomId=String(i.roomId)),i.roomUsers){if(!Array.isArray(i.roomUsers))throw TypeError(".com.quick.voice.proto.JoinRsp.roomUsers: array expected");c.roomUsers=[];for(let $=0;$<i.roomUsers.length;++$){if(typeof i.roomUsers[$]!="object")throw TypeError(".com.quick.voice.proto.JoinRsp.roomUsers: object expected");c.roomUsers[$]=$root.com.quick.voice.proto.User.fromObject(i.roomUsers[$])}}switch(i.callType){default:if(typeof i.callType=="number"){c.callType=i.callType;break}break;case"Normal":case 0:c.callType=0;break;case"Meeting":case 1:c.callType=1;break;case"Live":case 2:c.callType=2;break}return c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.roomUsers=[]),c.defaults&&($.roomId="",$.callType=c.enums===String?"Normal":0),i.roomId!=null&&i.hasOwnProperty("roomId")&&($.roomId=i.roomId),i.roomUsers&&i.roomUsers.length){$.roomUsers=[];for(let C=0;C<i.roomUsers.length;++C)$.roomUsers[C]=$root.com.quick.voice.proto.User.toObject(i.roomUsers[C],c)}return i.callType!=null&&i.hasOwnProperty("callType")&&($.callType=c.enums===String?$root.com.quick.voice.proto.CallType[i.callType]===void 0?i.callType:$root.com.quick.voice.proto.CallType[i.callType]:i.callType),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.JoinRsp"},f}(),D.JoinNotify=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.roomId="",f.prototype.user=null,f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.roomId!=null&&Object.hasOwnProperty.call(i,"roomId")&&c.uint32(10).string(i.roomId),i.user!=null&&Object.hasOwnProperty.call(i,"user")&&$root.com.quick.voice.proto.User.encode(i.user,c.uint32(18).fork()).ldelim(),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.JoinNotify;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.roomId=i.string();break}case 2:{C.user=$root.com.quick.voice.proto.User.decode(i,i.uint32());break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.roomId!=null&&i.hasOwnProperty("roomId")&&!$util.isString(i.roomId))return"roomId: string expected";if(i.user!=null&&i.hasOwnProperty("user")){let c=$root.com.quick.voice.proto.User.verify(i.user);if(c)return"user."+c}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.JoinNotify)return i;let c=new $root.com.quick.voice.proto.JoinNotify;if(i.roomId!=null&&(c.roomId=String(i.roomId)),i.user!=null){if(typeof i.user!="object")throw TypeError(".com.quick.voice.proto.JoinNotify.user: object expected");c.user=$root.com.quick.voice.proto.User.fromObject(i.user)}return c},f.toObject=function(i,c){c||(c={});let $={};return c.defaults&&($.roomId="",$.user=null),i.roomId!=null&&i.hasOwnProperty("roomId")&&($.roomId=i.roomId),i.user!=null&&i.hasOwnProperty("user")&&($.user=$root.com.quick.voice.proto.User.toObject(i.user,c)),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.JoinNotify"},f}(),D.ConnectCFReq=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.sdp="",f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.sdp!=null&&Object.hasOwnProperty.call(i,"sdp")&&c.uint32(10).string(i.sdp),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.ConnectCFReq;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.sdp=i.string();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){return typeof i!="object"||i===null?"object expected":i.sdp!=null&&i.hasOwnProperty("sdp")&&!$util.isString(i.sdp)?"sdp: string expected":null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.ConnectCFReq)return i;let c=new $root.com.quick.voice.proto.ConnectCFReq;return i.sdp!=null&&(c.sdp=String(i.sdp)),c},f.toObject=function(i,c){c||(c={});let $={};return c.defaults&&($.sdp=""),i.sdp!=null&&i.hasOwnProperty("sdp")&&($.sdp=i.sdp),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.ConnectCFReq"},f}(),D.ConnectCFRsp=function(){function f(k){if(this.subscribeUsers=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.remoteSdp="",f.prototype.subscribeUsers=$util.emptyArray,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.remoteSdp!=null&&Object.hasOwnProperty.call(i,"remoteSdp")&&c.uint32(10).string(i.remoteSdp),i.subscribeUsers!=null&&i.subscribeUsers.length)for(let $=0;$<i.subscribeUsers.length;++$)$root.com.quick.voice.proto.User.encode(i.subscribeUsers[$],c.uint32(18).fork()).ldelim();return c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.ConnectCFRsp;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.remoteSdp=i.string();break}case 2:{C.subscribeUsers&&C.subscribeUsers.length||(C.subscribeUsers=[]),C.subscribeUsers.push($root.com.quick.voice.proto.User.decode(i,i.uint32()));break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.remoteSdp!=null&&i.hasOwnProperty("remoteSdp")&&!$util.isString(i.remoteSdp))return"remoteSdp: string expected";if(i.subscribeUsers!=null&&i.hasOwnProperty("subscribeUsers")){if(!Array.isArray(i.subscribeUsers))return"subscribeUsers: array expected";for(let c=0;c<i.subscribeUsers.length;++c){let $=$root.com.quick.voice.proto.User.verify(i.subscribeUsers[c]);if($)return"subscribeUsers."+$}}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.ConnectCFRsp)return i;let c=new $root.com.quick.voice.proto.ConnectCFRsp;if(i.remoteSdp!=null&&(c.remoteSdp=String(i.remoteSdp)),i.subscribeUsers){if(!Array.isArray(i.subscribeUsers))throw TypeError(".com.quick.voice.proto.ConnectCFRsp.subscribeUsers: array expected");c.subscribeUsers=[];for(let $=0;$<i.subscribeUsers.length;++$){if(typeof i.subscribeUsers[$]!="object")throw TypeError(".com.quick.voice.proto.ConnectCFRsp.subscribeUsers: object expected");c.subscribeUsers[$]=$root.com.quick.voice.proto.User.fromObject(i.subscribeUsers[$])}}return c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.subscribeUsers=[]),c.defaults&&($.remoteSdp=""),i.remoteSdp!=null&&i.hasOwnProperty("remoteSdp")&&($.remoteSdp=i.remoteSdp),i.subscribeUsers&&i.subscribeUsers.length){$.subscribeUsers=[];for(let C=0;C<i.subscribeUsers.length;++C)$.subscribeUsers[C]=$root.com.quick.voice.proto.User.toObject(i.subscribeUsers[C],c)}return $},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.ConnectCFRsp"},f}(),D.PublishReq=function(){function f(i){if(this.tracks=[],i)for(let c=Object.keys(i),$=0;$<c.length;++$)i[c[$]]!=null&&(this[c[$]]=i[c[$]])}f.prototype.sdp="",f.prototype.tracks=$util.emptyArray,f.prototype.callAction=0,f.prototype.recreate=null;let k;return Object.defineProperty(f.prototype,"_recreate",{get:$util.oneOfGetter(k=["recreate"]),set:$util.oneOfSetter(k)}),f.create=function(c){return new f(c)},f.encode=function(c,$){if($||($=$Writer.create()),c.sdp!=null&&Object.hasOwnProperty.call(c,"sdp")&&$.uint32(10).string(c.sdp),c.tracks!=null&&c.tracks.length)for(let C=0;C<c.tracks.length;++C)$root.com.quick.voice.proto.Track.encode(c.tracks[C],$.uint32(18).fork()).ldelim();return c.callAction!=null&&Object.hasOwnProperty.call(c,"callAction")&&$.uint32(24).int32(c.callAction),c.recreate!=null&&Object.hasOwnProperty.call(c,"recreate")&&$.uint32(32).bool(c.recreate),$},f.encodeDelimited=function(c,$){return this.encode(c,$).ldelim()},f.decode=function(c,$){c instanceof $Reader||(c=$Reader.create(c));let C=$===void 0?c.len:c.pos+$,M=new $root.com.quick.voice.proto.PublishReq;for(;c.pos<C;){let Z=c.uint32();switch(Z>>>3){case 1:{M.sdp=c.string();break}case 2:{M.tracks&&M.tracks.length||(M.tracks=[]),M.tracks.push($root.com.quick.voice.proto.Track.decode(c,c.uint32()));break}case 3:{M.callAction=c.int32();break}case 4:{M.recreate=c.bool();break}default:c.skipType(Z&7);break}}return M},f.decodeDelimited=function(c){return c instanceof $Reader||(c=new $Reader(c)),this.decode(c,c.uint32())},f.verify=function(c){if(typeof c!="object"||c===null)return"object expected";if(c.sdp!=null&&c.hasOwnProperty("sdp")&&!$util.isString(c.sdp))return"sdp: string expected";if(c.tracks!=null&&c.hasOwnProperty("tracks")){if(!Array.isArray(c.tracks))return"tracks: array expected";for(let $=0;$<c.tracks.length;++$){let C=$root.com.quick.voice.proto.Track.verify(c.tracks[$]);if(C)return"tracks."+C}}return c.callAction!=null&&c.hasOwnProperty("callAction")&&!$util.isInteger(c.callAction)?"callAction: integer expected":c.recreate!=null&&c.hasOwnProperty("recreate")&&typeof c.recreate!="boolean"?"recreate: boolean expected":null},f.fromObject=function(c){if(c instanceof $root.com.quick.voice.proto.PublishReq)return c;let $=new $root.com.quick.voice.proto.PublishReq;if(c.sdp!=null&&($.sdp=String(c.sdp)),c.tracks){if(!Array.isArray(c.tracks))throw TypeError(".com.quick.voice.proto.PublishReq.tracks: array expected");$.tracks=[];for(let C=0;C<c.tracks.length;++C){if(typeof c.tracks[C]!="object")throw TypeError(".com.quick.voice.proto.PublishReq.tracks: object expected");$.tracks[C]=$root.com.quick.voice.proto.Track.fromObject(c.tracks[C])}}return c.callAction!=null&&($.callAction=c.callAction|0),c.recreate!=null&&($.recreate=!!c.recreate),$},f.toObject=function(c,$){$||($={});let C={};if(($.arrays||$.defaults)&&(C.tracks=[]),$.defaults&&(C.sdp="",C.callAction=0),c.sdp!=null&&c.hasOwnProperty("sdp")&&(C.sdp=c.sdp),c.tracks&&c.tracks.length){C.tracks=[];for(let M=0;M<c.tracks.length;++M)C.tracks[M]=$root.com.quick.voice.proto.Track.toObject(c.tracks[M],$)}return c.callAction!=null&&c.hasOwnProperty("callAction")&&(C.callAction=c.callAction),c.recreate!=null&&c.hasOwnProperty("recreate")&&(C.recreate=c.recreate,$.oneofs&&(C._recreate="recreate")),C},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(c){return c===void 0&&(c="type.googleapis.com"),c+"/com.quick.voice.proto.PublishReq"},f}(),D.PublishRsp=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.remoteSdp="",f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.remoteSdp!=null&&Object.hasOwnProperty.call(i,"remoteSdp")&&c.uint32(10).string(i.remoteSdp),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.PublishRsp;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.remoteSdp=i.string();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){return typeof i!="object"||i===null?"object expected":i.remoteSdp!=null&&i.hasOwnProperty("remoteSdp")&&!$util.isString(i.remoteSdp)?"remoteSdp: string expected":null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.PublishRsp)return i;let c=new $root.com.quick.voice.proto.PublishRsp;return i.remoteSdp!=null&&(c.remoteSdp=String(i.remoteSdp)),c},f.toObject=function(i,c){c||(c={});let $={};return c.defaults&&($.remoteSdp=""),i.remoteSdp!=null&&i.hasOwnProperty("remoteSdp")&&($.remoteSdp=i.remoteSdp),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.PublishRsp"},f}(),D.PublishNotify=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.roomId="",f.prototype.user=null,f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.roomId!=null&&Object.hasOwnProperty.call(i,"roomId")&&c.uint32(10).string(i.roomId),i.user!=null&&Object.hasOwnProperty.call(i,"user")&&$root.com.quick.voice.proto.User.encode(i.user,c.uint32(18).fork()).ldelim(),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.PublishNotify;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.roomId=i.string();break}case 2:{C.user=$root.com.quick.voice.proto.User.decode(i,i.uint32());break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.roomId!=null&&i.hasOwnProperty("roomId")&&!$util.isString(i.roomId))return"roomId: string expected";if(i.user!=null&&i.hasOwnProperty("user")){let c=$root.com.quick.voice.proto.User.verify(i.user);if(c)return"user."+c}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.PublishNotify)return i;let c=new $root.com.quick.voice.proto.PublishNotify;if(i.roomId!=null&&(c.roomId=String(i.roomId)),i.user!=null){if(typeof i.user!="object")throw TypeError(".com.quick.voice.proto.PublishNotify.user: object expected");c.user=$root.com.quick.voice.proto.User.fromObject(i.user)}return c},f.toObject=function(i,c){c||(c={});let $={};return c.defaults&&($.roomId="",$.user=null),i.roomId!=null&&i.hasOwnProperty("roomId")&&($.roomId=i.roomId),i.user!=null&&i.hasOwnProperty("user")&&($.user=$root.com.quick.voice.proto.User.toObject(i.user,c)),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.PublishNotify"},f}(),D.SubscribeReq=function(){function f(k){if(this.users=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.users=$util.emptyArray,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.users!=null&&i.users.length)for(let $=0;$<i.users.length;++$)$root.com.quick.voice.proto.User.encode(i.users[$],c.uint32(10).fork()).ldelim();return c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.SubscribeReq;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.users&&C.users.length||(C.users=[]),C.users.push($root.com.quick.voice.proto.User.decode(i,i.uint32()));break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.users!=null&&i.hasOwnProperty("users")){if(!Array.isArray(i.users))return"users: array expected";for(let c=0;c<i.users.length;++c){let $=$root.com.quick.voice.proto.User.verify(i.users[c]);if($)return"users."+$}}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.SubscribeReq)return i;let c=new $root.com.quick.voice.proto.SubscribeReq;if(i.users){if(!Array.isArray(i.users))throw TypeError(".com.quick.voice.proto.SubscribeReq.users: array expected");c.users=[];for(let $=0;$<i.users.length;++$){if(typeof i.users[$]!="object")throw TypeError(".com.quick.voice.proto.SubscribeReq.users: object expected");c.users[$]=$root.com.quick.voice.proto.User.fromObject(i.users[$])}}return c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.users=[]),i.users&&i.users.length){$.users=[];for(let C=0;C<i.users.length;++C)$.users[C]=$root.com.quick.voice.proto.User.toObject(i.users[C],c)}return $},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.SubscribeReq"},f}(),D.SubscribeRsp=function(){function f(k){if(this.users=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.remoteSdp="",f.prototype.users=$util.emptyArray,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.remoteSdp!=null&&Object.hasOwnProperty.call(i,"remoteSdp")&&c.uint32(10).string(i.remoteSdp),i.users!=null&&i.users.length)for(let $=0;$<i.users.length;++$)$root.com.quick.voice.proto.User.encode(i.users[$],c.uint32(18).fork()).ldelim();return c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.SubscribeRsp;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.remoteSdp=i.string();break}case 2:{C.users&&C.users.length||(C.users=[]),C.users.push($root.com.quick.voice.proto.User.decode(i,i.uint32()));break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.remoteSdp!=null&&i.hasOwnProperty("remoteSdp")&&!$util.isString(i.remoteSdp))return"remoteSdp: string expected";if(i.users!=null&&i.hasOwnProperty("users")){if(!Array.isArray(i.users))return"users: array expected";for(let c=0;c<i.users.length;++c){let $=$root.com.quick.voice.proto.User.verify(i.users[c]);if($)return"users."+$}}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.SubscribeRsp)return i;let c=new $root.com.quick.voice.proto.SubscribeRsp;if(i.remoteSdp!=null&&(c.remoteSdp=String(i.remoteSdp)),i.users){if(!Array.isArray(i.users))throw TypeError(".com.quick.voice.proto.SubscribeRsp.users: array expected");c.users=[];for(let $=0;$<i.users.length;++$){if(typeof i.users[$]!="object")throw TypeError(".com.quick.voice.proto.SubscribeRsp.users: object expected");c.users[$]=$root.com.quick.voice.proto.User.fromObject(i.users[$])}}return c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.users=[]),c.defaults&&($.remoteSdp=""),i.remoteSdp!=null&&i.hasOwnProperty("remoteSdp")&&($.remoteSdp=i.remoteSdp),i.users&&i.users.length){$.users=[];for(let C=0;C<i.users.length;++C)$.users[C]=$root.com.quick.voice.proto.User.toObject(i.users[C],c)}return $},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.SubscribeRsp"},f}(),D.RenegotiateReq=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.userId="",f.prototype.sdp="",f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.userId!=null&&Object.hasOwnProperty.call(i,"userId")&&c.uint32(10).string(i.userId),i.sdp!=null&&Object.hasOwnProperty.call(i,"sdp")&&c.uint32(18).string(i.sdp),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.RenegotiateReq;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.userId=i.string();break}case 2:{C.sdp=i.string();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){return typeof i!="object"||i===null?"object expected":i.userId!=null&&i.hasOwnProperty("userId")&&!$util.isString(i.userId)?"userId: string expected":i.sdp!=null&&i.hasOwnProperty("sdp")&&!$util.isString(i.sdp)?"sdp: string expected":null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.RenegotiateReq)return i;let c=new $root.com.quick.voice.proto.RenegotiateReq;return i.userId!=null&&(c.userId=String(i.userId)),i.sdp!=null&&(c.sdp=String(i.sdp)),c},f.toObject=function(i,c){c||(c={});let $={};return c.defaults&&($.userId="",$.sdp=""),i.userId!=null&&i.hasOwnProperty("userId")&&($.userId=i.userId),i.sdp!=null&&i.hasOwnProperty("sdp")&&($.sdp=i.sdp),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.RenegotiateReq"},f}(),D.QuitReq=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.userId="",f.prototype.roomId="",f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.userId!=null&&Object.hasOwnProperty.call(i,"userId")&&c.uint32(10).string(i.userId),i.roomId!=null&&Object.hasOwnProperty.call(i,"roomId")&&c.uint32(18).string(i.roomId),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.QuitReq;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.userId=i.string();break}case 2:{C.roomId=i.string();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){return typeof i!="object"||i===null?"object expected":i.userId!=null&&i.hasOwnProperty("userId")&&!$util.isString(i.userId)?"userId: string expected":i.roomId!=null&&i.hasOwnProperty("roomId")&&!$util.isString(i.roomId)?"roomId: string expected":null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.QuitReq)return i;let c=new $root.com.quick.voice.proto.QuitReq;return i.userId!=null&&(c.userId=String(i.userId)),i.roomId!=null&&(c.roomId=String(i.roomId)),c},f.toObject=function(i,c){c||(c={});let $={};return c.defaults&&($.userId="",$.roomId=""),i.userId!=null&&i.hasOwnProperty("userId")&&($.userId=i.userId),i.roomId!=null&&i.hasOwnProperty("roomId")&&($.roomId=i.roomId),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.QuitReq"},f}(),D.QuitNotify=function(){function f(i){if(i)for(let c=Object.keys(i),$=0;$<c.length;++$)i[c[$]]!=null&&(this[c[$]]=i[c[$]])}f.prototype.roomId="",f.prototype.user=null,f.prototype.code=null,f.prototype.desc=null;let k;return Object.defineProperty(f.prototype,"_code",{get:$util.oneOfGetter(k=["code"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_desc",{get:$util.oneOfGetter(k=["desc"]),set:$util.oneOfSetter(k)}),f.create=function(c){return new f(c)},f.encode=function(c,$){return $||($=$Writer.create()),c.roomId!=null&&Object.hasOwnProperty.call(c,"roomId")&&$.uint32(10).string(c.roomId),c.user!=null&&Object.hasOwnProperty.call(c,"user")&&$root.com.quick.voice.proto.User.encode(c.user,$.uint32(18).fork()).ldelim(),c.code!=null&&Object.hasOwnProperty.call(c,"code")&&$.uint32(24).int32(c.code),c.desc!=null&&Object.hasOwnProperty.call(c,"desc")&&$.uint32(34).string(c.desc),$},f.encodeDelimited=function(c,$){return this.encode(c,$).ldelim()},f.decode=function(c,$){c instanceof $Reader||(c=$Reader.create(c));let C=$===void 0?c.len:c.pos+$,M=new $root.com.quick.voice.proto.QuitNotify;for(;c.pos<C;){let Z=c.uint32();switch(Z>>>3){case 1:{M.roomId=c.string();break}case 2:{M.user=$root.com.quick.voice.proto.User.decode(c,c.uint32());break}case 3:{M.code=c.int32();break}case 4:{M.desc=c.string();break}default:c.skipType(Z&7);break}}return M},f.decodeDelimited=function(c){return c instanceof $Reader||(c=new $Reader(c)),this.decode(c,c.uint32())},f.verify=function(c){if(typeof c!="object"||c===null)return"object expected";if(c.roomId!=null&&c.hasOwnProperty("roomId")&&!$util.isString(c.roomId))return"roomId: string expected";if(c.user!=null&&c.hasOwnProperty("user")){let $=$root.com.quick.voice.proto.User.verify(c.user);if($)return"user."+$}return c.code!=null&&c.hasOwnProperty("code")&&!$util.isInteger(c.code)?"code: integer expected":c.desc!=null&&c.hasOwnProperty("desc")&&!$util.isString(c.desc)?"desc: string expected":null},f.fromObject=function(c){if(c instanceof $root.com.quick.voice.proto.QuitNotify)return c;let $=new $root.com.quick.voice.proto.QuitNotify;if(c.roomId!=null&&($.roomId=String(c.roomId)),c.user!=null){if(typeof c.user!="object")throw TypeError(".com.quick.voice.proto.QuitNotify.user: object expected");$.user=$root.com.quick.voice.proto.User.fromObject(c.user)}return c.code!=null&&($.code=c.code|0),c.desc!=null&&($.desc=String(c.desc)),$},f.toObject=function(c,$){$||($={});let C={};return $.defaults&&(C.roomId="",C.user=null),c.roomId!=null&&c.hasOwnProperty("roomId")&&(C.roomId=c.roomId),c.user!=null&&c.hasOwnProperty("user")&&(C.user=$root.com.quick.voice.proto.User.toObject(c.user,$)),c.code!=null&&c.hasOwnProperty("code")&&(C.code=c.code,$.oneofs&&(C._code="code")),c.desc!=null&&c.hasOwnProperty("desc")&&(C.desc=c.desc,$.oneofs&&(C._desc="desc")),C},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(c){return c===void 0&&(c="type.googleapis.com"),c+"/com.quick.voice.proto.QuitNotify"},f}(),D.TokenExpireNotify=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.roomId="",f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.roomId!=null&&Object.hasOwnProperty.call(i,"roomId")&&c.uint32(10).string(i.roomId),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.TokenExpireNotify;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.roomId=i.string();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){return typeof i!="object"||i===null?"object expected":i.roomId!=null&&i.hasOwnProperty("roomId")&&!$util.isString(i.roomId)?"roomId: string expected":null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.TokenExpireNotify)return i;let c=new $root.com.quick.voice.proto.TokenExpireNotify;return i.roomId!=null&&(c.roomId=String(i.roomId)),c},f.toObject=function(i,c){c||(c={});let $={};return c.defaults&&($.roomId=""),i.roomId!=null&&i.hasOwnProperty("roomId")&&($.roomId=i.roomId),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.TokenExpireNotify"},f}(),D.UpdateTokenReq=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.roomId="",f.prototype.sdkToken="",f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.roomId!=null&&Object.hasOwnProperty.call(i,"roomId")&&c.uint32(10).string(i.roomId),i.sdkToken!=null&&Object.hasOwnProperty.call(i,"sdkToken")&&c.uint32(18).string(i.sdkToken),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.UpdateTokenReq;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.roomId=i.string();break}case 2:{C.sdkToken=i.string();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){return typeof i!="object"||i===null?"object expected":i.roomId!=null&&i.hasOwnProperty("roomId")&&!$util.isString(i.roomId)?"roomId: string expected":i.sdkToken!=null&&i.hasOwnProperty("sdkToken")&&!$util.isString(i.sdkToken)?"sdkToken: string expected":null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.UpdateTokenReq)return i;let c=new $root.com.quick.voice.proto.UpdateTokenReq;return i.roomId!=null&&(c.roomId=String(i.roomId)),i.sdkToken!=null&&(c.sdkToken=String(i.sdkToken)),c},f.toObject=function(i,c){c||(c={});let $={};return c.defaults&&($.roomId="",$.sdkToken=""),i.roomId!=null&&i.hasOwnProperty("roomId")&&($.roomId=i.roomId),i.sdkToken!=null&&i.hasOwnProperty("sdkToken")&&($.sdkToken=i.sdkToken),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.UpdateTokenReq"},f}(),D.NetQualityChange=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.userId="",f.prototype.roomId="",f.prototype.egress=0,f.prototype.ingress=0,f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.userId!=null&&Object.hasOwnProperty.call(i,"userId")&&c.uint32(10).string(i.userId),i.roomId!=null&&Object.hasOwnProperty.call(i,"roomId")&&c.uint32(18).string(i.roomId),i.egress!=null&&Object.hasOwnProperty.call(i,"egress")&&c.uint32(24).int32(i.egress),i.ingress!=null&&Object.hasOwnProperty.call(i,"ingress")&&c.uint32(32).int32(i.ingress),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.NetQualityChange;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.userId=i.string();break}case 2:{C.roomId=i.string();break}case 3:{C.egress=i.int32();break}case 4:{C.ingress=i.int32();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){return typeof i!="object"||i===null?"object expected":i.userId!=null&&i.hasOwnProperty("userId")&&!$util.isString(i.userId)?"userId: string expected":i.roomId!=null&&i.hasOwnProperty("roomId")&&!$util.isString(i.roomId)?"roomId: string expected":i.egress!=null&&i.hasOwnProperty("egress")&&!$util.isInteger(i.egress)?"egress: integer expected":i.ingress!=null&&i.hasOwnProperty("ingress")&&!$util.isInteger(i.ingress)?"ingress: integer expected":null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.NetQualityChange)return i;let c=new $root.com.quick.voice.proto.NetQualityChange;return i.userId!=null&&(c.userId=String(i.userId)),i.roomId!=null&&(c.roomId=String(i.roomId)),i.egress!=null&&(c.egress=i.egress|0),i.ingress!=null&&(c.ingress=i.ingress|0),c},f.toObject=function(i,c){c||(c={});let $={};return c.defaults&&($.userId="",$.roomId="",$.egress=0,$.ingress=0),i.userId!=null&&i.hasOwnProperty("userId")&&($.userId=i.userId),i.roomId!=null&&i.hasOwnProperty("roomId")&&($.roomId=i.roomId),i.egress!=null&&i.hasOwnProperty("egress")&&($.egress=i.egress),i.ingress!=null&&i.hasOwnProperty("ingress")&&($.ingress=i.ingress),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.NetQualityChange"},f}(),D.NetQualityNotify=function(){function f(k){if(this.qualities=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.qualities=$util.emptyArray,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.qualities!=null&&i.qualities.length)for(let $=0;$<i.qualities.length;++$)$root.com.quick.voice.proto.NetQualityChange.encode(i.qualities[$],c.uint32(10).fork()).ldelim();return c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.NetQualityNotify;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.qualities&&C.qualities.length||(C.qualities=[]),C.qualities.push($root.com.quick.voice.proto.NetQualityChange.decode(i,i.uint32()));break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.qualities!=null&&i.hasOwnProperty("qualities")){if(!Array.isArray(i.qualities))return"qualities: array expected";for(let c=0;c<i.qualities.length;++c){let $=$root.com.quick.voice.proto.NetQualityChange.verify(i.qualities[c]);if($)return"qualities."+$}}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.NetQualityNotify)return i;let c=new $root.com.quick.voice.proto.NetQualityNotify;if(i.qualities){if(!Array.isArray(i.qualities))throw TypeError(".com.quick.voice.proto.NetQualityNotify.qualities: array expected");c.qualities=[];for(let $=0;$<i.qualities.length;++$){if(typeof i.qualities[$]!="object")throw TypeError(".com.quick.voice.proto.NetQualityNotify.qualities: object expected");c.qualities[$]=$root.com.quick.voice.proto.NetQualityChange.fromObject(i.qualities[$])}}return c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.qualities=[]),i.qualities&&i.qualities.length){$.qualities=[];for(let C=0;C<i.qualities.length;++C)$.qualities[C]=$root.com.quick.voice.proto.NetQualityChange.toObject(i.qualities[C],c)}return $},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.NetQualityNotify"},f}(),D.UpdateCall=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.roomId="",f.prototype.user=null,f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.roomId!=null&&Object.hasOwnProperty.call(i,"roomId")&&c.uint32(10).string(i.roomId),i.user!=null&&Object.hasOwnProperty.call(i,"user")&&$root.com.quick.voice.proto.User.encode(i.user,c.uint32(18).fork()).ldelim(),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.UpdateCall;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.roomId=i.string();break}case 2:{C.user=$root.com.quick.voice.proto.User.decode(i,i.uint32());break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.roomId!=null&&i.hasOwnProperty("roomId")&&!$util.isString(i.roomId))return"roomId: string expected";if(i.user!=null&&i.hasOwnProperty("user")){let c=$root.com.quick.voice.proto.User.verify(i.user);if(c)return"user."+c}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.UpdateCall)return i;let c=new $root.com.quick.voice.proto.UpdateCall;if(i.roomId!=null&&(c.roomId=String(i.roomId)),i.user!=null){if(typeof i.user!="object")throw TypeError(".com.quick.voice.proto.UpdateCall.user: object expected");c.user=$root.com.quick.voice.proto.User.fromObject(i.user)}return c},f.toObject=function(i,c){c||(c={});let $={};return c.defaults&&($.roomId="",$.user=null),i.roomId!=null&&i.hasOwnProperty("roomId")&&($.roomId=i.roomId),i.user!=null&&i.hasOwnProperty("user")&&($.user=$root.com.quick.voice.proto.User.toObject(i.user,c)),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.UpdateCall"},f}(),D.SyncRoomInfoReq=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.roomId="",f.prototype.user=null,f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.roomId!=null&&Object.hasOwnProperty.call(i,"roomId")&&c.uint32(10).string(i.roomId),i.user!=null&&Object.hasOwnProperty.call(i,"user")&&$root.com.quick.voice.proto.User.encode(i.user,c.uint32(18).fork()).ldelim(),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.SyncRoomInfoReq;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.roomId=i.string();break}case 2:{C.user=$root.com.quick.voice.proto.User.decode(i,i.uint32());break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.roomId!=null&&i.hasOwnProperty("roomId")&&!$util.isString(i.roomId))return"roomId: string expected";if(i.user!=null&&i.hasOwnProperty("user")){let c=$root.com.quick.voice.proto.User.verify(i.user);if(c)return"user."+c}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.SyncRoomInfoReq)return i;let c=new $root.com.quick.voice.proto.SyncRoomInfoReq;if(i.roomId!=null&&(c.roomId=String(i.roomId)),i.user!=null){if(typeof i.user!="object")throw TypeError(".com.quick.voice.proto.SyncRoomInfoReq.user: object expected");c.user=$root.com.quick.voice.proto.User.fromObject(i.user)}return c},f.toObject=function(i,c){c||(c={});let $={};return c.defaults&&($.roomId="",$.user=null),i.roomId!=null&&i.hasOwnProperty("roomId")&&($.roomId=i.roomId),i.user!=null&&i.hasOwnProperty("user")&&($.user=$root.com.quick.voice.proto.User.toObject(i.user,c)),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.SyncRoomInfoReq"},f}(),D.SyncRoomInfoRsp=function(){function f(k){if(this.users=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.roomId="",f.prototype.isValid=!1,f.prototype.users=$util.emptyArray,f.prototype.isActive=!1,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.roomId!=null&&Object.hasOwnProperty.call(i,"roomId")&&c.uint32(10).string(i.roomId),i.isValid!=null&&Object.hasOwnProperty.call(i,"isValid")&&c.uint32(16).bool(i.isValid),i.users!=null&&i.users.length)for(let $=0;$<i.users.length;++$)$root.com.quick.voice.proto.User.encode(i.users[$],c.uint32(26).fork()).ldelim();return i.isActive!=null&&Object.hasOwnProperty.call(i,"isActive")&&c.uint32(32).bool(i.isActive),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.SyncRoomInfoRsp;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.roomId=i.string();break}case 2:{C.isValid=i.bool();break}case 3:{C.users&&C.users.length||(C.users=[]),C.users.push($root.com.quick.voice.proto.User.decode(i,i.uint32()));break}case 4:{C.isActive=i.bool();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.roomId!=null&&i.hasOwnProperty("roomId")&&!$util.isString(i.roomId))return"roomId: string expected";if(i.isValid!=null&&i.hasOwnProperty("isValid")&&typeof i.isValid!="boolean")return"isValid: boolean expected";if(i.users!=null&&i.hasOwnProperty("users")){if(!Array.isArray(i.users))return"users: array expected";for(let c=0;c<i.users.length;++c){let $=$root.com.quick.voice.proto.User.verify(i.users[c]);if($)return"users."+$}}return i.isActive!=null&&i.hasOwnProperty("isActive")&&typeof i.isActive!="boolean"?"isActive: boolean expected":null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.SyncRoomInfoRsp)return i;let c=new $root.com.quick.voice.proto.SyncRoomInfoRsp;if(i.roomId!=null&&(c.roomId=String(i.roomId)),i.isValid!=null&&(c.isValid=!!i.isValid),i.users){if(!Array.isArray(i.users))throw TypeError(".com.quick.voice.proto.SyncRoomInfoRsp.users: array expected");c.users=[];for(let $=0;$<i.users.length;++$){if(typeof i.users[$]!="object")throw TypeError(".com.quick.voice.proto.SyncRoomInfoRsp.users: object expected");c.users[$]=$root.com.quick.voice.proto.User.fromObject(i.users[$])}}return i.isActive!=null&&(c.isActive=!!i.isActive),c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.users=[]),c.defaults&&($.roomId="",$.isValid=!1,$.isActive=!1),i.roomId!=null&&i.hasOwnProperty("roomId")&&($.roomId=i.roomId),i.isValid!=null&&i.hasOwnProperty("isValid")&&($.isValid=i.isValid),i.users&&i.users.length){$.users=[];for(let C=0;C<i.users.length;++C)$.users[C]=$root.com.quick.voice.proto.User.toObject(i.users[C],c)}return i.isActive!=null&&i.hasOwnProperty("isActive")&&($.isActive=i.isActive),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.SyncRoomInfoRsp"},f}(),D.UpdateTime=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.time=$util.Long?$util.Long.fromBits(0,0,!1):0,f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.time!=null&&Object.hasOwnProperty.call(i,"time")&&c.uint32(8).int64(i.time),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.UpdateTime;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.time=i.int64();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){return typeof i!="object"||i===null?"object expected":i.time!=null&&i.hasOwnProperty("time")&&!$util.isInteger(i.time)&&!(i.time&&$util.isInteger(i.time.low)&&$util.isInteger(i.time.high))?"time: integer|Long expected":null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.UpdateTime)return i;let c=new $root.com.quick.voice.proto.UpdateTime;return i.time!=null&&($util.Long?(c.time=$util.Long.fromValue(i.time)).unsigned=!1:typeof i.time=="string"?c.time=parseInt(i.time,10):typeof i.time=="number"?c.time=i.time:typeof i.time=="object"&&(c.time=new $util.LongBits(i.time.low>>>0,i.time.high>>>0).toNumber())),c},f.toObject=function(i,c){c||(c={});let $={};if(c.defaults)if($util.Long){let C=new $util.Long(0,0,!1);$.time=c.longs===String?C.toString():c.longs===Number?C.toNumber():C}else $.time=c.longs===String?"0":0;return i.time!=null&&i.hasOwnProperty("time")&&(typeof i.time=="number"?$.time=c.longs===String?String(i.time):i.time:$.time=c.longs===String?$util.Long.prototype.toString.call(i.time):c.longs===Number?new $util.LongBits(i.time.low>>>0,i.time.high>>>0).toNumber():i.time),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.UpdateTime"},f}(),D.CloseTrackReq=function(){function f(k){if(this.tracks=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.sdp="",f.prototype.tracks=$util.emptyArray,f.prototype.roomId="",f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.sdp!=null&&Object.hasOwnProperty.call(i,"sdp")&&c.uint32(10).string(i.sdp),i.tracks!=null&&i.tracks.length)for(let $=0;$<i.tracks.length;++$)$root.com.quick.voice.proto.Track.encode(i.tracks[$],c.uint32(18).fork()).ldelim();return i.roomId!=null&&Object.hasOwnProperty.call(i,"roomId")&&c.uint32(26).string(i.roomId),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.CloseTrackReq;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.sdp=i.string();break}case 2:{C.tracks&&C.tracks.length||(C.tracks=[]),C.tracks.push($root.com.quick.voice.proto.Track.decode(i,i.uint32()));break}case 3:{C.roomId=i.string();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.sdp!=null&&i.hasOwnProperty("sdp")&&!$util.isString(i.sdp))return"sdp: string expected";if(i.tracks!=null&&i.hasOwnProperty("tracks")){if(!Array.isArray(i.tracks))return"tracks: array expected";for(let c=0;c<i.tracks.length;++c){let $=$root.com.quick.voice.proto.Track.verify(i.tracks[c]);if($)return"tracks."+$}}return i.roomId!=null&&i.hasOwnProperty("roomId")&&!$util.isString(i.roomId)?"roomId: string expected":null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.CloseTrackReq)return i;let c=new $root.com.quick.voice.proto.CloseTrackReq;if(i.sdp!=null&&(c.sdp=String(i.sdp)),i.tracks){if(!Array.isArray(i.tracks))throw TypeError(".com.quick.voice.proto.CloseTrackReq.tracks: array expected");c.tracks=[];for(let $=0;$<i.tracks.length;++$){if(typeof i.tracks[$]!="object")throw TypeError(".com.quick.voice.proto.CloseTrackReq.tracks: object expected");c.tracks[$]=$root.com.quick.voice.proto.Track.fromObject(i.tracks[$])}}return i.roomId!=null&&(c.roomId=String(i.roomId)),c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.tracks=[]),c.defaults&&($.sdp="",$.roomId=""),i.sdp!=null&&i.hasOwnProperty("sdp")&&($.sdp=i.sdp),i.tracks&&i.tracks.length){$.tracks=[];for(let C=0;C<i.tracks.length;++C)$.tracks[C]=$root.com.quick.voice.proto.Track.toObject(i.tracks[C],c)}return i.roomId!=null&&i.hasOwnProperty("roomId")&&($.roomId=i.roomId),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.CloseTrackReq"},f}(),D.CloseTrackRsp=function(){function f(k){if(this.tracks=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.remoteSdp="",f.prototype.tracks=$util.emptyArray,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.remoteSdp!=null&&Object.hasOwnProperty.call(i,"remoteSdp")&&c.uint32(10).string(i.remoteSdp),i.tracks!=null&&i.tracks.length)for(let $=0;$<i.tracks.length;++$)$root.com.quick.voice.proto.Track.encode(i.tracks[$],c.uint32(18).fork()).ldelim();return c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.CloseTrackRsp;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.remoteSdp=i.string();break}case 2:{C.tracks&&C.tracks.length||(C.tracks=[]),C.tracks.push($root.com.quick.voice.proto.Track.decode(i,i.uint32()));break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.remoteSdp!=null&&i.hasOwnProperty("remoteSdp")&&!$util.isString(i.remoteSdp))return"remoteSdp: string expected";if(i.tracks!=null&&i.hasOwnProperty("tracks")){if(!Array.isArray(i.tracks))return"tracks: array expected";for(let c=0;c<i.tracks.length;++c){let $=$root.com.quick.voice.proto.Track.verify(i.tracks[c]);if($)return"tracks."+$}}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.CloseTrackRsp)return i;let c=new $root.com.quick.voice.proto.CloseTrackRsp;if(i.remoteSdp!=null&&(c.remoteSdp=String(i.remoteSdp)),i.tracks){if(!Array.isArray(i.tracks))throw TypeError(".com.quick.voice.proto.CloseTrackRsp.tracks: array expected");c.tracks=[];for(let $=0;$<i.tracks.length;++$){if(typeof i.tracks[$]!="object")throw TypeError(".com.quick.voice.proto.CloseTrackRsp.tracks: object expected");c.tracks[$]=$root.com.quick.voice.proto.Track.fromObject(i.tracks[$])}}return c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.tracks=[]),c.defaults&&($.remoteSdp=""),i.remoteSdp!=null&&i.hasOwnProperty("remoteSdp")&&($.remoteSdp=i.remoteSdp),i.tracks&&i.tracks.length){$.tracks=[];for(let C=0;C<i.tracks.length;++C)$.tracks[C]=$root.com.quick.voice.proto.Track.toObject(i.tracks[C],c)}return $},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.CloseTrackRsp"},f}(),D.CloseTrackNotify=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.user=null,f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.user!=null&&Object.hasOwnProperty.call(i,"user")&&$root.com.quick.voice.proto.User.encode(i.user,c.uint32(10).fork()).ldelim(),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.CloseTrackNotify;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.user=$root.com.quick.voice.proto.User.decode(i,i.uint32());break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.user!=null&&i.hasOwnProperty("user")){let c=$root.com.quick.voice.proto.User.verify(i.user);if(c)return"user."+c}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.CloseTrackNotify)return i;let c=new $root.com.quick.voice.proto.CloseTrackNotify;if(i.user!=null){if(typeof i.user!="object")throw TypeError(".com.quick.voice.proto.CloseTrackNotify.user: object expected");c.user=$root.com.quick.voice.proto.User.fromObject(i.user)}return c},f.toObject=function(i,c){c||(c={});let $={};return c.defaults&&($.user=null),i.user!=null&&i.hasOwnProperty("user")&&($.user=$root.com.quick.voice.proto.User.toObject(i.user,c)),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.CloseTrackNotify"},f}(),D.ToggleLiveRoomReq=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.roomId="",f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.roomId!=null&&Object.hasOwnProperty.call(i,"roomId")&&c.uint32(10).string(i.roomId),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.ToggleLiveRoomReq;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.roomId=i.string();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){return typeof i!="object"||i===null?"object expected":i.roomId!=null&&i.hasOwnProperty("roomId")&&!$util.isString(i.roomId)?"roomId: string expected":null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.ToggleLiveRoomReq)return i;let c=new $root.com.quick.voice.proto.ToggleLiveRoomReq;return i.roomId!=null&&(c.roomId=String(i.roomId)),c},f.toObject=function(i,c){c||(c={});let $={};return c.defaults&&($.roomId=""),i.roomId!=null&&i.hasOwnProperty("roomId")&&($.roomId=i.roomId),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.ToggleLiveRoomReq"},f}(),D.ToggleLiveRoomRsq=function(){function f(k){if(this.roomUsers=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.roomId="",f.prototype.hash="",f.prototype.roomUsers=$util.emptyArray,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.roomId!=null&&Object.hasOwnProperty.call(i,"roomId")&&c.uint32(10).string(i.roomId),i.hash!=null&&Object.hasOwnProperty.call(i,"hash")&&c.uint32(18).string(i.hash),i.roomUsers!=null&&i.roomUsers.length)for(let $=0;$<i.roomUsers.length;++$)$root.com.quick.voice.proto.User.encode(i.roomUsers[$],c.uint32(26).fork()).ldelim();return c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.ToggleLiveRoomRsq;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.roomId=i.string();break}case 2:{C.hash=i.string();break}case 3:{C.roomUsers&&C.roomUsers.length||(C.roomUsers=[]),C.roomUsers.push($root.com.quick.voice.proto.User.decode(i,i.uint32()));break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.roomId!=null&&i.hasOwnProperty("roomId")&&!$util.isString(i.roomId))return"roomId: string expected";if(i.hash!=null&&i.hasOwnProperty("hash")&&!$util.isString(i.hash))return"hash: string expected";if(i.roomUsers!=null&&i.hasOwnProperty("roomUsers")){if(!Array.isArray(i.roomUsers))return"roomUsers: array expected";for(let c=0;c<i.roomUsers.length;++c){let $=$root.com.quick.voice.proto.User.verify(i.roomUsers[c]);if($)return"roomUsers."+$}}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.ToggleLiveRoomRsq)return i;let c=new $root.com.quick.voice.proto.ToggleLiveRoomRsq;if(i.roomId!=null&&(c.roomId=String(i.roomId)),i.hash!=null&&(c.hash=String(i.hash)),i.roomUsers){if(!Array.isArray(i.roomUsers))throw TypeError(".com.quick.voice.proto.ToggleLiveRoomRsq.roomUsers: array expected");c.roomUsers=[];for(let $=0;$<i.roomUsers.length;++$){if(typeof i.roomUsers[$]!="object")throw TypeError(".com.quick.voice.proto.ToggleLiveRoomRsq.roomUsers: object expected");c.roomUsers[$]=$root.com.quick.voice.proto.User.fromObject(i.roomUsers[$])}}return c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.roomUsers=[]),c.defaults&&($.roomId="",$.hash=""),i.roomId!=null&&i.hasOwnProperty("roomId")&&($.roomId=i.roomId),i.hash!=null&&i.hasOwnProperty("hash")&&($.hash=i.hash),i.roomUsers&&i.roomUsers.length){$.roomUsers=[];for(let C=0;C<i.roomUsers.length;++C)$.roomUsers[C]=$root.com.quick.voice.proto.User.toObject(i.roomUsers[C],c)}return $},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.ToggleLiveRoomRsq"},f}(),D.TrackType=function(){const f={},k=Object.create(f);return k[f[0]="Microphone"]=0,k[f[1]="Camera"]=1,k[f[2]="Screen"]=2,k[f[3]="SystemVoice"]=3,k}(),D.ReportInfoReq=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.actionEvent="",f.prototype.userId="",f.prototype.platform="",f.prototype.time=$util.Long?$util.Long.fromBits(0,0,!1):0,f.prototype.actionData="",f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.actionEvent!=null&&Object.hasOwnProperty.call(i,"actionEvent")&&c.uint32(10).string(i.actionEvent),i.userId!=null&&Object.hasOwnProperty.call(i,"userId")&&c.uint32(18).string(i.userId),i.platform!=null&&Object.hasOwnProperty.call(i,"platform")&&c.uint32(26).string(i.platform),i.time!=null&&Object.hasOwnProperty.call(i,"time")&&c.uint32(32).int64(i.time),i.actionData!=null&&Object.hasOwnProperty.call(i,"actionData")&&c.uint32(42).string(i.actionData),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.ReportInfoReq;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.actionEvent=i.string();break}case 2:{C.userId=i.string();break}case 3:{C.platform=i.string();break}case 4:{C.time=i.int64();break}case 5:{C.actionData=i.string();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){return typeof i!="object"||i===null?"object expected":i.actionEvent!=null&&i.hasOwnProperty("actionEvent")&&!$util.isString(i.actionEvent)?"actionEvent: string expected":i.userId!=null&&i.hasOwnProperty("userId")&&!$util.isString(i.userId)?"userId: string expected":i.platform!=null&&i.hasOwnProperty("platform")&&!$util.isString(i.platform)?"platform: string expected":i.time!=null&&i.hasOwnProperty("time")&&!$util.isInteger(i.time)&&!(i.time&&$util.isInteger(i.time.low)&&$util.isInteger(i.time.high))?"time: integer|Long expected":i.actionData!=null&&i.hasOwnProperty("actionData")&&!$util.isString(i.actionData)?"actionData: string expected":null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.ReportInfoReq)return i;let c=new $root.com.quick.voice.proto.ReportInfoReq;return i.actionEvent!=null&&(c.actionEvent=String(i.actionEvent)),i.userId!=null&&(c.userId=String(i.userId)),i.platform!=null&&(c.platform=String(i.platform)),i.time!=null&&($util.Long?(c.time=$util.Long.fromValue(i.time)).unsigned=!1:typeof i.time=="string"?c.time=parseInt(i.time,10):typeof i.time=="number"?c.time=i.time:typeof i.time=="object"&&(c.time=new $util.LongBits(i.time.low>>>0,i.time.high>>>0).toNumber())),i.actionData!=null&&(c.actionData=String(i.actionData)),c},f.toObject=function(i,c){c||(c={});let $={};if(c.defaults){if($.actionEvent="",$.userId="",$.platform="",$util.Long){let C=new $util.Long(0,0,!1);$.time=c.longs===String?C.toString():c.longs===Number?C.toNumber():C}else $.time=c.longs===String?"0":0;$.actionData=""}return i.actionEvent!=null&&i.hasOwnProperty("actionEvent")&&($.actionEvent=i.actionEvent),i.userId!=null&&i.hasOwnProperty("userId")&&($.userId=i.userId),i.platform!=null&&i.hasOwnProperty("platform")&&($.platform=i.platform),i.time!=null&&i.hasOwnProperty("time")&&(typeof i.time=="number"?$.time=c.longs===String?String(i.time):i.time:$.time=c.longs===String?$util.Long.prototype.toString.call(i.time):c.longs===Number?new $util.LongBits(i.time.low>>>0,i.time.high>>>0).toNumber():i.time),i.actionData!=null&&i.hasOwnProperty("actionData")&&($.actionData=i.actionData),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.ReportInfoReq"},f}(),D.UpdatePermissions=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.roomId="",f.prototype.user=null,f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.roomId!=null&&Object.hasOwnProperty.call(i,"roomId")&&c.uint32(10).string(i.roomId),i.user!=null&&Object.hasOwnProperty.call(i,"user")&&$root.com.quick.voice.proto.User.encode(i.user,c.uint32(18).fork()).ldelim(),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.UpdatePermissions;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.roomId=i.string();break}case 2:{C.user=$root.com.quick.voice.proto.User.decode(i,i.uint32());break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.roomId!=null&&i.hasOwnProperty("roomId")&&!$util.isString(i.roomId))return"roomId: string expected";if(i.user!=null&&i.hasOwnProperty("user")){let c=$root.com.quick.voice.proto.User.verify(i.user);if(c)return"user."+c}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.UpdatePermissions)return i;let c=new $root.com.quick.voice.proto.UpdatePermissions;if(i.roomId!=null&&(c.roomId=String(i.roomId)),i.user!=null){if(typeof i.user!="object")throw TypeError(".com.quick.voice.proto.UpdatePermissions.user: object expected");c.user=$root.com.quick.voice.proto.User.fromObject(i.user)}return c},f.toObject=function(i,c){c||(c={});let $={};return c.defaults&&($.roomId="",$.user=null),i.roomId!=null&&i.hasOwnProperty("roomId")&&($.roomId=i.roomId),i.user!=null&&i.hasOwnProperty("user")&&($.user=$root.com.quick.voice.proto.User.toObject(i.user,c)),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.UpdatePermissions"},f}(),D.CallType=function(){const f={},k=Object.create(f);return k[f[0]="Normal"]=0,k[f[1]="Meeting"]=1,k[f[2]="Live"]=2,k}(),D.QuitNotifyCode=function(){const f={},k=Object.create(f);return k[f[0]="NormalQuit"]=0,k[f[2021]="Timeout"]=2021,k[f[2011]="TokenExpired"]=2011,k[f[2022]="KickOut"]=2022,k[f[2023]="EndPk"]=2023,k[f[2024]="EndLive"]=2024,k}(),D.UserBehavior=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.type=0,f.prototype.behavior=!1,f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.type!=null&&Object.hasOwnProperty.call(i,"type")&&c.uint32(8).int32(i.type),i.behavior!=null&&Object.hasOwnProperty.call(i,"behavior")&&c.uint32(16).bool(i.behavior),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.UserBehavior;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.type=i.int32();break}case 2:{C.behavior=i.bool();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.type!=null&&i.hasOwnProperty("type"))switch(i.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:break}return i.behavior!=null&&i.hasOwnProperty("behavior")&&typeof i.behavior!="boolean"?"behavior: boolean expected":null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.UserBehavior)return i;let c=new $root.com.quick.voice.proto.UserBehavior;switch(i.type){default:if(typeof i.type=="number"){c.type=i.type;break}break;case"Microphone":case 0:c.type=0;break;case"Camera":case 1:c.type=1;break;case"Screen":case 2:c.type=2;break;case"SystemVoice":case 3:c.type=3;break}return i.behavior!=null&&(c.behavior=!!i.behavior),c},f.toObject=function(i,c){c||(c={});let $={};return c.defaults&&($.type=c.enums===String?"Microphone":0,$.behavior=!1),i.type!=null&&i.hasOwnProperty("type")&&($.type=c.enums===String?$root.com.quick.voice.proto.TrackType[i.type]===void 0?i.type:$root.com.quick.voice.proto.TrackType[i.type]:i.type),i.behavior!=null&&i.hasOwnProperty("behavior")&&($.behavior=i.behavior),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.UserBehavior"},f}(),D.PreventUser=function(){function f(k){if(this.behaviors=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.id="",f.prototype.behaviors=$util.emptyArray,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.id!=null&&Object.hasOwnProperty.call(i,"id")&&c.uint32(10).string(i.id),i.behaviors!=null&&i.behaviors.length)for(let $=0;$<i.behaviors.length;++$)$root.com.quick.voice.proto.UserBehavior.encode(i.behaviors[$],c.uint32(18).fork()).ldelim();return c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.PreventUser;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.id=i.string();break}case 2:{C.behaviors&&C.behaviors.length||(C.behaviors=[]),C.behaviors.push($root.com.quick.voice.proto.UserBehavior.decode(i,i.uint32()));break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.id!=null&&i.hasOwnProperty("id")&&!$util.isString(i.id))return"id: string expected";if(i.behaviors!=null&&i.hasOwnProperty("behaviors")){if(!Array.isArray(i.behaviors))return"behaviors: array expected";for(let c=0;c<i.behaviors.length;++c){let $=$root.com.quick.voice.proto.UserBehavior.verify(i.behaviors[c]);if($)return"behaviors."+$}}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.PreventUser)return i;let c=new $root.com.quick.voice.proto.PreventUser;if(i.id!=null&&(c.id=String(i.id)),i.behaviors){if(!Array.isArray(i.behaviors))throw TypeError(".com.quick.voice.proto.PreventUser.behaviors: array expected");c.behaviors=[];for(let $=0;$<i.behaviors.length;++$){if(typeof i.behaviors[$]!="object")throw TypeError(".com.quick.voice.proto.PreventUser.behaviors: object expected");c.behaviors[$]=$root.com.quick.voice.proto.UserBehavior.fromObject(i.behaviors[$])}}return c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.behaviors=[]),c.defaults&&($.id=""),i.id!=null&&i.hasOwnProperty("id")&&($.id=i.id),i.behaviors&&i.behaviors.length){$.behaviors=[];for(let C=0;C<i.behaviors.length;++C)$.behaviors[C]=$root.com.quick.voice.proto.UserBehavior.toObject(i.behaviors[C],c)}return $},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.PreventUser"},f}(),D.PreventUsersBehaviorReq=function(){function f(k){if(this.users=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.roomId="",f.prototype.users=$util.emptyArray,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.roomId!=null&&Object.hasOwnProperty.call(i,"roomId")&&c.uint32(10).string(i.roomId),i.users!=null&&i.users.length)for(let $=0;$<i.users.length;++$)$root.com.quick.voice.proto.PreventUser.encode(i.users[$],c.uint32(18).fork()).ldelim();return c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.PreventUsersBehaviorReq;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.roomId=i.string();break}case 2:{C.users&&C.users.length||(C.users=[]),C.users.push($root.com.quick.voice.proto.PreventUser.decode(i,i.uint32()));break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.roomId!=null&&i.hasOwnProperty("roomId")&&!$util.isString(i.roomId))return"roomId: string expected";if(i.users!=null&&i.hasOwnProperty("users")){if(!Array.isArray(i.users))return"users: array expected";for(let c=0;c<i.users.length;++c){let $=$root.com.quick.voice.proto.PreventUser.verify(i.users[c]);if($)return"users."+$}}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.PreventUsersBehaviorReq)return i;let c=new $root.com.quick.voice.proto.PreventUsersBehaviorReq;if(i.roomId!=null&&(c.roomId=String(i.roomId)),i.users){if(!Array.isArray(i.users))throw TypeError(".com.quick.voice.proto.PreventUsersBehaviorReq.users: array expected");c.users=[];for(let $=0;$<i.users.length;++$){if(typeof i.users[$]!="object")throw TypeError(".com.quick.voice.proto.PreventUsersBehaviorReq.users: object expected");c.users[$]=$root.com.quick.voice.proto.PreventUser.fromObject(i.users[$])}}return c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.users=[]),c.defaults&&($.roomId=""),i.roomId!=null&&i.hasOwnProperty("roomId")&&($.roomId=i.roomId),i.users&&i.users.length){$.users=[];for(let C=0;C<i.users.length;++C)$.users[C]=$root.com.quick.voice.proto.PreventUser.toObject(i.users[C],c)}return $},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.PreventUsersBehaviorReq"},f}(),D.PreventUsersBehaviorNotify=function(){function f(k){if(this.users=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.roomId="",f.prototype.users=$util.emptyArray,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.roomId!=null&&Object.hasOwnProperty.call(i,"roomId")&&c.uint32(10).string(i.roomId),i.users!=null&&i.users.length)for(let $=0;$<i.users.length;++$)$root.com.quick.voice.proto.User.encode(i.users[$],c.uint32(18).fork()).ldelim();return c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.PreventUsersBehaviorNotify;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.roomId=i.string();break}case 2:{C.users&&C.users.length||(C.users=[]),C.users.push($root.com.quick.voice.proto.User.decode(i,i.uint32()));break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.roomId!=null&&i.hasOwnProperty("roomId")&&!$util.isString(i.roomId))return"roomId: string expected";if(i.users!=null&&i.hasOwnProperty("users")){if(!Array.isArray(i.users))return"users: array expected";for(let c=0;c<i.users.length;++c){let $=$root.com.quick.voice.proto.User.verify(i.users[c]);if($)return"users."+$}}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.PreventUsersBehaviorNotify)return i;let c=new $root.com.quick.voice.proto.PreventUsersBehaviorNotify;if(i.roomId!=null&&(c.roomId=String(i.roomId)),i.users){if(!Array.isArray(i.users))throw TypeError(".com.quick.voice.proto.PreventUsersBehaviorNotify.users: array expected");c.users=[];for(let $=0;$<i.users.length;++$){if(typeof i.users[$]!="object")throw TypeError(".com.quick.voice.proto.PreventUsersBehaviorNotify.users: object expected");c.users[$]=$root.com.quick.voice.proto.User.fromObject(i.users[$])}}return c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.users=[]),c.defaults&&($.roomId=""),i.roomId!=null&&i.hasOwnProperty("roomId")&&($.roomId=i.roomId),i.users&&i.users.length){$.users=[];for(let C=0;C<i.users.length;++C)$.users[C]=$root.com.quick.voice.proto.User.toObject(i.users[C],c)}return $},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.PreventUsersBehaviorNotify"},f}(),D.AccelerationAreas=function(){const f={},k=Object.create(f);return k[f[0]="chinaMainland"]=0,k[f[1]="global"]=1,k[f[2]="overseas"]=2,k}(),D.CountMethods=function(){const f={},k=Object.create(f);return k[f[0]="flow"]=0,k[f[1]="minutes"]=1,k}(),D.BaseCDNAddress=function(){function f(k){if(this.urlMap={},k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.area=0,f.prototype.countType=0,f.prototype.urlMap=$util.emptyObject,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.area!=null&&Object.hasOwnProperty.call(i,"area")&&c.uint32(8).int32(i.area),i.countType!=null&&Object.hasOwnProperty.call(i,"countType")&&c.uint32(16).int32(i.countType),i.urlMap!=null&&Object.hasOwnProperty.call(i,"urlMap"))for(let $=Object.keys(i.urlMap),C=0;C<$.length;++C)c.uint32(26).fork().uint32(10).string($[C]).uint32(18).string(i.urlMap[$[C]]).ldelim();return c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.BaseCDNAddress,M,Z;for(;i.pos<$;){let J=i.uint32();switch(J>>>3){case 1:{C.area=i.int32();break}case 2:{C.countType=i.int32();break}case 3:{C.urlMap===$util.emptyObject&&(C.urlMap={});let z=i.uint32()+i.pos;for(M="",Z="";i.pos<z;){let Q=i.uint32();switch(Q>>>3){case 1:M=i.string();break;case 2:Z=i.string();break;default:i.skipType(Q&7);break}}C.urlMap[M]=Z;break}default:i.skipType(J&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.area!=null&&i.hasOwnProperty("area"))switch(i.area){default:return"area: enum value expected";case 0:case 1:case 2:break}if(i.countType!=null&&i.hasOwnProperty("countType"))switch(i.countType){default:return"countType: enum value expected";case 0:case 1:break}if(i.urlMap!=null&&i.hasOwnProperty("urlMap")){if(!$util.isObject(i.urlMap))return"urlMap: object expected";let c=Object.keys(i.urlMap);for(let $=0;$<c.length;++$)if(!$util.isString(i.urlMap[c[$]]))return"urlMap: string{k:string} expected"}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.BaseCDNAddress)return i;let c=new $root.com.quick.voice.proto.BaseCDNAddress;switch(i.area){default:if(typeof i.area=="number"){c.area=i.area;break}break;case"chinaMainland":case 0:c.area=0;break;case"global":case 1:c.area=1;break;case"overseas":case 2:c.area=2;break}switch(i.countType){default:if(typeof i.countType=="number"){c.countType=i.countType;break}break;case"flow":case 0:c.countType=0;break;case"minutes":case 1:c.countType=1;break}if(i.urlMap){if(typeof i.urlMap!="object")throw TypeError(".com.quick.voice.proto.BaseCDNAddress.urlMap: object expected");c.urlMap={};for(let $=Object.keys(i.urlMap),C=0;C<$.length;++C)c.urlMap[$[C]]=String(i.urlMap[$[C]])}return c},f.toObject=function(i,c){c||(c={});let $={};(c.objects||c.defaults)&&($.urlMap={}),c.defaults&&($.area=c.enums===String?"chinaMainland":0,$.countType=c.enums===String?"flow":0),i.area!=null&&i.hasOwnProperty("area")&&($.area=c.enums===String?$root.com.quick.voice.proto.AccelerationAreas[i.area]===void 0?i.area:$root.com.quick.voice.proto.AccelerationAreas[i.area]:i.area),i.countType!=null&&i.hasOwnProperty("countType")&&($.countType=c.enums===String?$root.com.quick.voice.proto.CountMethods[i.countType]===void 0?i.countType:$root.com.quick.voice.proto.CountMethods[i.countType]:i.countType);let C;if(i.urlMap&&(C=Object.keys(i.urlMap)).length){$.urlMap={};for(let M=0;M<C.length;++M)$.urlMap[C[M]]=i.urlMap[C[M]]}return $},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.BaseCDNAddress"},f}(),D.CDNPlayAddressNotify=function(){function f(i){if(this.standLines=[],i)for(let c=Object.keys(i),$=0;$<c.length;++$)i[c[$]]!=null&&(this[c[$]]=i[c[$]])}f.prototype.roomId="",f.prototype.m3u8=null,f.prototype.rtmp=null,f.prototype.flv=null,f.prototype.rtmps=null,f.prototype.mainLine=null,f.prototype.standLines=$util.emptyArray;let k;return Object.defineProperty(f.prototype,"_m3u8",{get:$util.oneOfGetter(k=["m3u8"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_rtmp",{get:$util.oneOfGetter(k=["rtmp"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_flv",{get:$util.oneOfGetter(k=["flv"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_rtmps",{get:$util.oneOfGetter(k=["rtmps"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_mainLine",{get:$util.oneOfGetter(k=["mainLine"]),set:$util.oneOfSetter(k)}),f.create=function(c){return new f(c)},f.encode=function(c,$){if($||($=$Writer.create()),c.roomId!=null&&Object.hasOwnProperty.call(c,"roomId")&&$.uint32(10).string(c.roomId),c.m3u8!=null&&Object.hasOwnProperty.call(c,"m3u8")&&$.uint32(18).string(c.m3u8),c.rtmp!=null&&Object.hasOwnProperty.call(c,"rtmp")&&$.uint32(26).string(c.rtmp),c.flv!=null&&Object.hasOwnProperty.call(c,"flv")&&$.uint32(34).string(c.flv),c.rtmps!=null&&Object.hasOwnProperty.call(c,"rtmps")&&$.uint32(42).string(c.rtmps),c.mainLine!=null&&Object.hasOwnProperty.call(c,"mainLine")&&$root.com.quick.voice.proto.BaseCDNAddress.encode(c.mainLine,$.uint32(50).fork()).ldelim(),c.standLines!=null&&c.standLines.length)for(let C=0;C<c.standLines.length;++C)$root.com.quick.voice.proto.BaseCDNAddress.encode(c.standLines[C],$.uint32(58).fork()).ldelim();return $},f.encodeDelimited=function(c,$){return this.encode(c,$).ldelim()},f.decode=function(c,$){c instanceof $Reader||(c=$Reader.create(c));let C=$===void 0?c.len:c.pos+$,M=new $root.com.quick.voice.proto.CDNPlayAddressNotify;for(;c.pos<C;){let Z=c.uint32();switch(Z>>>3){case 1:{M.roomId=c.string();break}case 2:{M.m3u8=c.string();break}case 3:{M.rtmp=c.string();break}case 4:{M.flv=c.string();break}case 5:{M.rtmps=c.string();break}case 6:{M.mainLine=$root.com.quick.voice.proto.BaseCDNAddress.decode(c,c.uint32());break}case 7:{M.standLines&&M.standLines.length||(M.standLines=[]),M.standLines.push($root.com.quick.voice.proto.BaseCDNAddress.decode(c,c.uint32()));break}default:c.skipType(Z&7);break}}return M},f.decodeDelimited=function(c){return c instanceof $Reader||(c=new $Reader(c)),this.decode(c,c.uint32())},f.verify=function(c){if(typeof c!="object"||c===null)return"object expected";if(c.roomId!=null&&c.hasOwnProperty("roomId")&&!$util.isString(c.roomId))return"roomId: string expected";if(c.m3u8!=null&&c.hasOwnProperty("m3u8")&&!$util.isString(c.m3u8))return"m3u8: string expected";if(c.rtmp!=null&&c.hasOwnProperty("rtmp")&&!$util.isString(c.rtmp))return"rtmp: string expected";if(c.flv!=null&&c.hasOwnProperty("flv")&&!$util.isString(c.flv))return"flv: string expected";if(c.rtmps!=null&&c.hasOwnProperty("rtmps")&&!$util.isString(c.rtmps))return"rtmps: string expected";if(c.mainLine!=null&&c.hasOwnProperty("mainLine")){let $=$root.com.quick.voice.proto.BaseCDNAddress.verify(c.mainLine);if($)return"mainLine."+$}if(c.standLines!=null&&c.hasOwnProperty("standLines")){if(!Array.isArray(c.standLines))return"standLines: array expected";for(let $=0;$<c.standLines.length;++$){let C=$root.com.quick.voice.proto.BaseCDNAddress.verify(c.standLines[$]);if(C)return"standLines."+C}}return null},f.fromObject=function(c){if(c instanceof $root.com.quick.voice.proto.CDNPlayAddressNotify)return c;let $=new $root.com.quick.voice.proto.CDNPlayAddressNotify;if(c.roomId!=null&&($.roomId=String(c.roomId)),c.m3u8!=null&&($.m3u8=String(c.m3u8)),c.rtmp!=null&&($.rtmp=String(c.rtmp)),c.flv!=null&&($.flv=String(c.flv)),c.rtmps!=null&&($.rtmps=String(c.rtmps)),c.mainLine!=null){if(typeof c.mainLine!="object")throw TypeError(".com.quick.voice.proto.CDNPlayAddressNotify.mainLine: object expected");$.mainLine=$root.com.quick.voice.proto.BaseCDNAddress.fromObject(c.mainLine)}if(c.standLines){if(!Array.isArray(c.standLines))throw TypeError(".com.quick.voice.proto.CDNPlayAddressNotify.standLines: array expected");$.standLines=[];for(let C=0;C<c.standLines.length;++C){if(typeof c.standLines[C]!="object")throw TypeError(".com.quick.voice.proto.CDNPlayAddressNotify.standLines: object expected");$.standLines[C]=$root.com.quick.voice.proto.BaseCDNAddress.fromObject(c.standLines[C])}}return $},f.toObject=function(c,$){$||($={});let C={};if(($.arrays||$.defaults)&&(C.standLines=[]),$.defaults&&(C.roomId=""),c.roomId!=null&&c.hasOwnProperty("roomId")&&(C.roomId=c.roomId),c.m3u8!=null&&c.hasOwnProperty("m3u8")&&(C.m3u8=c.m3u8,$.oneofs&&(C._m3u8="m3u8")),c.rtmp!=null&&c.hasOwnProperty("rtmp")&&(C.rtmp=c.rtmp,$.oneofs&&(C._rtmp="rtmp")),c.flv!=null&&c.hasOwnProperty("flv")&&(C.flv=c.flv,$.oneofs&&(C._flv="flv")),c.rtmps!=null&&c.hasOwnProperty("rtmps")&&(C.rtmps=c.rtmps,$.oneofs&&(C._rtmps="rtmps")),c.mainLine!=null&&c.hasOwnProperty("mainLine")&&(C.mainLine=$root.com.quick.voice.proto.BaseCDNAddress.toObject(c.mainLine,$),$.oneofs&&(C._mainLine="mainLine")),c.standLines&&c.standLines.length){C.standLines=[];for(let M=0;M<c.standLines.length;++M)C.standLines[M]=$root.com.quick.voice.proto.BaseCDNAddress.toObject(c.standLines[M],$)}return C},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(c){return c===void 0&&(c="type.googleapis.com"),c+"/com.quick.voice.proto.CDNPlayAddressNotify"},f}(),D.UserChannel=function(){function f(k){if(this.channels=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.userId="",f.prototype.channels=$util.emptyArray,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.userId!=null&&Object.hasOwnProperty.call(i,"userId")&&c.uint32(10).string(i.userId),i.channels!=null&&i.channels.length)for(let $=0;$<i.channels.length;++$)$root.com.quick.voice.proto.DataChannel.encode(i.channels[$],c.uint32(18).fork()).ldelim();return c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.UserChannel;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.userId=i.string();break}case 2:{C.channels&&C.channels.length||(C.channels=[]),C.channels.push($root.com.quick.voice.proto.DataChannel.decode(i,i.uint32()));break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.userId!=null&&i.hasOwnProperty("userId")&&!$util.isString(i.userId))return"userId: string expected";if(i.channels!=null&&i.hasOwnProperty("channels")){if(!Array.isArray(i.channels))return"channels: array expected";for(let c=0;c<i.channels.length;++c){let $=$root.com.quick.voice.proto.DataChannel.verify(i.channels[c]);if($)return"channels."+$}}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.UserChannel)return i;let c=new $root.com.quick.voice.proto.UserChannel;if(i.userId!=null&&(c.userId=String(i.userId)),i.channels){if(!Array.isArray(i.channels))throw TypeError(".com.quick.voice.proto.UserChannel.channels: array expected");c.channels=[];for(let $=0;$<i.channels.length;++$){if(typeof i.channels[$]!="object")throw TypeError(".com.quick.voice.proto.UserChannel.channels: object expected");c.channels[$]=$root.com.quick.voice.proto.DataChannel.fromObject(i.channels[$])}}return c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.channels=[]),c.defaults&&($.userId=""),i.userId!=null&&i.hasOwnProperty("userId")&&($.userId=i.userId),i.channels&&i.channels.length){$.channels=[];for(let C=0;C<i.channels.length;++C)$.channels[C]=$root.com.quick.voice.proto.DataChannel.toObject(i.channels[C],c)}return $},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.UserChannel"},f}(),D.ChannelPublishReq=function(){function f(k){if(this.channels=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.channels=$util.emptyArray,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.channels!=null&&i.channels.length)for(let $=0;$<i.channels.length;++$)$root.com.quick.voice.proto.DataChannel.encode(i.channels[$],c.uint32(10).fork()).ldelim();return c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.ChannelPublishReq;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.channels&&C.channels.length||(C.channels=[]),C.channels.push($root.com.quick.voice.proto.DataChannel.decode(i,i.uint32()));break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.channels!=null&&i.hasOwnProperty("channels")){if(!Array.isArray(i.channels))return"channels: array expected";for(let c=0;c<i.channels.length;++c){let $=$root.com.quick.voice.proto.DataChannel.verify(i.channels[c]);if($)return"channels."+$}}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.ChannelPublishReq)return i;let c=new $root.com.quick.voice.proto.ChannelPublishReq;if(i.channels){if(!Array.isArray(i.channels))throw TypeError(".com.quick.voice.proto.ChannelPublishReq.channels: array expected");c.channels=[];for(let $=0;$<i.channels.length;++$){if(typeof i.channels[$]!="object")throw TypeError(".com.quick.voice.proto.ChannelPublishReq.channels: object expected");c.channels[$]=$root.com.quick.voice.proto.DataChannel.fromObject(i.channels[$])}}return c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.channels=[]),i.channels&&i.channels.length){$.channels=[];for(let C=0;C<i.channels.length;++C)$.channels[C]=$root.com.quick.voice.proto.DataChannel.toObject(i.channels[C],c)}return $},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.ChannelPublishReq"},f}(),D.ChannelPublishRsq=function(){function f(k){if(this.channels=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.channels=$util.emptyArray,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.channels!=null&&i.channels.length)for(let $=0;$<i.channels.length;++$)$root.com.quick.voice.proto.UserChannel.encode(i.channels[$],c.uint32(10).fork()).ldelim();return c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.ChannelPublishRsq;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.channels&&C.channels.length||(C.channels=[]),C.channels.push($root.com.quick.voice.proto.UserChannel.decode(i,i.uint32()));break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.channels!=null&&i.hasOwnProperty("channels")){if(!Array.isArray(i.channels))return"channels: array expected";for(let c=0;c<i.channels.length;++c){let $=$root.com.quick.voice.proto.UserChannel.verify(i.channels[c]);if($)return"channels."+$}}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.ChannelPublishRsq)return i;let c=new $root.com.quick.voice.proto.ChannelPublishRsq;if(i.channels){if(!Array.isArray(i.channels))throw TypeError(".com.quick.voice.proto.ChannelPublishRsq.channels: array expected");c.channels=[];for(let $=0;$<i.channels.length;++$){if(typeof i.channels[$]!="object")throw TypeError(".com.quick.voice.proto.ChannelPublishRsq.channels: object expected");c.channels[$]=$root.com.quick.voice.proto.UserChannel.fromObject(i.channels[$])}}return c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.channels=[]),i.channels&&i.channels.length){$.channels=[];for(let C=0;C<i.channels.length;++C)$.channels[C]=$root.com.quick.voice.proto.UserChannel.toObject(i.channels[C],c)}return $},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.ChannelPublishRsq"},f}(),D.ChannelSubscribeReq=function(){function f(k){if(this.users=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.users=$util.emptyArray,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.users!=null&&i.users.length)for(let $=0;$<i.users.length;++$)$root.com.quick.voice.proto.UserChannel.encode(i.users[$],c.uint32(10).fork()).ldelim();return c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.ChannelSubscribeReq;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.users&&C.users.length||(C.users=[]),C.users.push($root.com.quick.voice.proto.UserChannel.decode(i,i.uint32()));break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.users!=null&&i.hasOwnProperty("users")){if(!Array.isArray(i.users))return"users: array expected";for(let c=0;c<i.users.length;++c){let $=$root.com.quick.voice.proto.UserChannel.verify(i.users[c]);if($)return"users."+$}}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.ChannelSubscribeReq)return i;let c=new $root.com.quick.voice.proto.ChannelSubscribeReq;if(i.users){if(!Array.isArray(i.users))throw TypeError(".com.quick.voice.proto.ChannelSubscribeReq.users: array expected");c.users=[];for(let $=0;$<i.users.length;++$){if(typeof i.users[$]!="object")throw TypeError(".com.quick.voice.proto.ChannelSubscribeReq.users: object expected");c.users[$]=$root.com.quick.voice.proto.UserChannel.fromObject(i.users[$])}}return c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.users=[]),i.users&&i.users.length){$.users=[];for(let C=0;C<i.users.length;++C)$.users[C]=$root.com.quick.voice.proto.UserChannel.toObject(i.users[C],c)}return $},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.ChannelSubscribeReq"},f}(),D.ChannelSubscribeRsq=function(){function f(k){if(this.channels=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.channels=$util.emptyArray,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.channels!=null&&i.channels.length)for(let $=0;$<i.channels.length;++$)$root.com.quick.voice.proto.UserChannel.encode(i.channels[$],c.uint32(10).fork()).ldelim();return c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.ChannelSubscribeRsq;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.channels&&C.channels.length||(C.channels=[]),C.channels.push($root.com.quick.voice.proto.UserChannel.decode(i,i.uint32()));break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.channels!=null&&i.hasOwnProperty("channels")){if(!Array.isArray(i.channels))return"channels: array expected";for(let c=0;c<i.channels.length;++c){let $=$root.com.quick.voice.proto.UserChannel.verify(i.channels[c]);if($)return"channels."+$}}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.ChannelSubscribeRsq)return i;let c=new $root.com.quick.voice.proto.ChannelSubscribeRsq;if(i.channels){if(!Array.isArray(i.channels))throw TypeError(".com.quick.voice.proto.ChannelSubscribeRsq.channels: array expected");c.channels=[];for(let $=0;$<i.channels.length;++$){if(typeof i.channels[$]!="object")throw TypeError(".com.quick.voice.proto.ChannelSubscribeRsq.channels: object expected");c.channels[$]=$root.com.quick.voice.proto.UserChannel.fromObject(i.channels[$])}}return c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.channels=[]),i.channels&&i.channels.length){$.channels=[];for(let C=0;C<i.channels.length;++C)$.channels[C]=$root.com.quick.voice.proto.UserChannel.toObject(i.channels[C],c)}return $},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.ChannelSubscribeRsq"},f}(),D}(),I}(),N}(),O})(),enum_notifyName={onChangeNetwork:"网络情况变更",healthCheck:"心跳检测",onNetQuality:"网络质量回调",onLogin:"登录回调",onLocalStream:"本地媒体流发生变化",onDevicechange:"媒体设备发生变化",onRoomUser:"房间用户变化",onRoomUsers:"房间所有用户所有变化",onRoomUsersStreams:"房间某些用户媒体流变化",onRoomState:"房间状态变化",onJoinRoom:"加入房间回调",onQuitRoom:"退出房间回调",onPublish:"监听到流发布",onDataChannelPublish:"监听数据通道发布",onCloseTrack:"关闭轨道",onUpdateCall:"更新通讯状态",onUpdateStreams:"更新媒体流",onUpdatePermissions:"更新推流权限通知",onTokenExpired:"Token已过期",onDestroyRoom:"直播模式房间销毁",onUpdateBehavior:"行为允许权限变更",destroyRoom:"服务器要求销毁房间",onCDNPlayUrlAdd:"cdn播放地址变化",onDestroy:"SDK销毁"};ht(enum_notifyName);const notifyName_keys=Object.keys(enum_notifyName);/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const Z_FIXED$1=4,Z_BINARY=0,Z_TEXT=1,Z_UNKNOWN$1=2;function zero$1(O){let N=O.length;for(;--N>=0;)O[N]=0}const STORED_BLOCK=0,STATIC_TREES=1,DYN_TREES=2,MIN_MATCH$1=3,MAX_MATCH$1=258,LENGTH_CODES$1=29,LITERALS$1=256,L_CODES$1=LITERALS$1+1+LENGTH_CODES$1,D_CODES$1=30,BL_CODES$1=19,HEAP_SIZE$1=2*L_CODES$1+1,MAX_BITS$1=15,Buf_size=16,MAX_BL_BITS=7,END_BLOCK=256,REP_3_6=16,REPZ_3_10=17,REPZ_11_138=18,extra_lbits=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),extra_dbits=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),extra_blbits=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),bl_order=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),DIST_CODE_LEN=512,static_ltree=new Array((L_CODES$1+2)*2);zero$1(static_ltree);const static_dtree=new Array(D_CODES$1*2);zero$1(static_dtree);const _dist_code=new Array(DIST_CODE_LEN);zero$1(_dist_code);const _length_code=new Array(MAX_MATCH$1-MIN_MATCH$1+1);zero$1(_length_code);const base_length=new Array(LENGTH_CODES$1);zero$1(base_length);const base_dist=new Array(D_CODES$1);zero$1(base_dist);function StaticTreeDesc(O,N,I,D,f){this.static_tree=O,this.extra_bits=N,this.extra_base=I,this.elems=D,this.max_length=f,this.has_stree=O&&O.length}let static_l_desc,static_d_desc,static_bl_desc;function TreeDesc(O,N){this.dyn_tree=O,this.max_code=0,this.stat_desc=N}const d_code=O=>O<256?_dist_code[O]:_dist_code[256+(O>>>7)],put_short=(O,N)=>{O.pending_buf[O.pending++]=N&255,O.pending_buf[O.pending++]=N>>>8&255},send_bits=(O,N,I)=>{O.bi_valid>Buf_size-I?(O.bi_buf|=N<<O.bi_valid&65535,put_short(O,O.bi_buf),O.bi_buf=N>>Buf_size-O.bi_valid,O.bi_valid+=I-Buf_size):(O.bi_buf|=N<<O.bi_valid&65535,O.bi_valid+=I)},send_code=(O,N,I)=>{send_bits(O,I[N*2],I[N*2+1])},bi_reverse=(O,N)=>{let I=0;do I|=O&1,O>>>=1,I<<=1;while(--N>0);return I>>>1},bi_flush=O=>{O.bi_valid===16?(put_short(O,O.bi_buf),O.bi_buf=0,O.bi_valid=0):O.bi_valid>=8&&(O.pending_buf[O.pending++]=O.bi_buf&255,O.bi_buf>>=8,O.bi_valid-=8)},gen_bitlen=(O,N)=>{const I=N.dyn_tree,D=N.max_code,f=N.stat_desc.static_tree,k=N.stat_desc.has_stree,i=N.stat_desc.extra_bits,c=N.stat_desc.extra_base,$=N.stat_desc.max_length;let C,M,Z,J,z,Q,ee=0;for(J=0;J<=MAX_BITS$1;J++)O.bl_count[J]=0;for(I[O.heap[O.heap_max]*2+1]=0,C=O.heap_max+1;C<HEAP_SIZE$1;C++)M=O.heap[C],J=I[I[M*2+1]*2+1]+1,J>$&&(J=$,ee++),I[M*2+1]=J,!(M>D)&&(O.bl_count[J]++,z=0,M>=c&&(z=i[M-c]),Q=I[M*2],O.opt_len+=Q*(J+z),k&&(O.static_len+=Q*(f[M*2+1]+z)));if(ee!==0){do{for(J=$-1;O.bl_count[J]===0;)J--;O.bl_count[J]--,O.bl_count[J+1]+=2,O.bl_count[$]--,ee-=2}while(ee>0);for(J=$;J!==0;J--)for(M=O.bl_count[J];M!==0;)Z=O.heap[--C],!(Z>D)&&(I[Z*2+1]!==J&&(O.opt_len+=(J-I[Z*2+1])*I[Z*2],I[Z*2+1]=J),M--)}},gen_codes=(O,N,I)=>{const D=new Array(MAX_BITS$1+1);let f=0,k,i;for(k=1;k<=MAX_BITS$1;k++)f=f+I[k-1]<<1,D[k]=f;for(i=0;i<=N;i++){let c=O[i*2+1];c!==0&&(O[i*2]=bi_reverse(D[c]++,c))}},tr_static_init=()=>{let O,N,I,D,f;const k=new Array(MAX_BITS$1+1);for(I=0,D=0;D<LENGTH_CODES$1-1;D++)for(base_length[D]=I,O=0;O<1<<extra_lbits[D];O++)_length_code[I++]=D;for(_length_code[I-1]=D,f=0,D=0;D<16;D++)for(base_dist[D]=f,O=0;O<1<<extra_dbits[D];O++)_dist_code[f++]=D;for(f>>=7;D<D_CODES$1;D++)for(base_dist[D]=f<<7,O=0;O<1<<extra_dbits[D]-7;O++)_dist_code[256+f++]=D;for(N=0;N<=MAX_BITS$1;N++)k[N]=0;for(O=0;O<=143;)static_ltree[O*2+1]=8,O++,k[8]++;for(;O<=255;)static_ltree[O*2+1]=9,O++,k[9]++;for(;O<=279;)static_ltree[O*2+1]=7,O++,k[7]++;for(;O<=287;)static_ltree[O*2+1]=8,O++,k[8]++;for(gen_codes(static_ltree,L_CODES$1+1,k),O=0;O<D_CODES$1;O++)static_dtree[O*2+1]=5,static_dtree[O*2]=bi_reverse(O,5);static_l_desc=new StaticTreeDesc(static_ltree,extra_lbits,LITERALS$1+1,L_CODES$1,MAX_BITS$1),static_d_desc=new StaticTreeDesc(static_dtree,extra_dbits,0,D_CODES$1,MAX_BITS$1),static_bl_desc=new StaticTreeDesc(new Array(0),extra_blbits,0,BL_CODES$1,MAX_BL_BITS)},init_block=O=>{let N;for(N=0;N<L_CODES$1;N++)O.dyn_ltree[N*2]=0;for(N=0;N<D_CODES$1;N++)O.dyn_dtree[N*2]=0;for(N=0;N<BL_CODES$1;N++)O.bl_tree[N*2]=0;O.dyn_ltree[END_BLOCK*2]=1,O.opt_len=O.static_len=0,O.sym_next=O.matches=0},bi_windup=O=>{O.bi_valid>8?put_short(O,O.bi_buf):O.bi_valid>0&&(O.pending_buf[O.pending++]=O.bi_buf),O.bi_buf=0,O.bi_valid=0},smaller=(O,N,I,D)=>{const f=N*2,k=I*2;return O[f]<O[k]||O[f]===O[k]&&D[N]<=D[I]},pqdownheap=(O,N,I)=>{const D=O.heap[I];let f=I<<1;for(;f<=O.heap_len&&(f<O.heap_len&&smaller(N,O.heap[f+1],O.heap[f],O.depth)&&f++,!smaller(N,D,O.heap[f],O.depth));)O.heap[I]=O.heap[f],I=f,f<<=1;O.heap[I]=D},compress_block=(O,N,I)=>{let D,f,k=0,i,c;if(O.sym_next!==0)do D=O.pending_buf[O.sym_buf+k++]&255,D+=(O.pending_buf[O.sym_buf+k++]&255)<<8,f=O.pending_buf[O.sym_buf+k++],D===0?send_code(O,f,N):(i=_length_code[f],send_code(O,i+LITERALS$1+1,N),c=extra_lbits[i],c!==0&&(f-=base_length[i],send_bits(O,f,c)),D--,i=d_code(D),send_code(O,i,I),c=extra_dbits[i],c!==0&&(D-=base_dist[i],send_bits(O,D,c)));while(k<O.sym_next);send_code(O,END_BLOCK,N)},build_tree=(O,N)=>{const I=N.dyn_tree,D=N.stat_desc.static_tree,f=N.stat_desc.has_stree,k=N.stat_desc.elems;let i,c,$=-1,C;for(O.heap_len=0,O.heap_max=HEAP_SIZE$1,i=0;i<k;i++)I[i*2]!==0?(O.heap[++O.heap_len]=$=i,O.depth[i]=0):I[i*2+1]=0;for(;O.heap_len<2;)C=O.heap[++O.heap_len]=$<2?++$:0,I[C*2]=1,O.depth[C]=0,O.opt_len--,f&&(O.static_len-=D[C*2+1]);for(N.max_code=$,i=O.heap_len>>1;i>=1;i--)pqdownheap(O,I,i);C=k;do i=O.heap[1],O.heap[1]=O.heap[O.heap_len--],pqdownheap(O,I,1),c=O.heap[1],O.heap[--O.heap_max]=i,O.heap[--O.heap_max]=c,I[C*2]=I[i*2]+I[c*2],O.depth[C]=(O.depth[i]>=O.depth[c]?O.depth[i]:O.depth[c])+1,I[i*2+1]=I[c*2+1]=C,O.heap[1]=C++,pqdownheap(O,I,1);while(O.heap_len>=2);O.heap[--O.heap_max]=O.heap[1],gen_bitlen(O,N),gen_codes(I,$,O.bl_count)},scan_tree=(O,N,I)=>{let D,f=-1,k,i=N[0*2+1],c=0,$=7,C=4;for(i===0&&($=138,C=3),N[(I+1)*2+1]=65535,D=0;D<=I;D++)k=i,i=N[(D+1)*2+1],!(++c<$&&k===i)&&(c<C?O.bl_tree[k*2]+=c:k!==0?(k!==f&&O.bl_tree[k*2]++,O.bl_tree[REP_3_6*2]++):c<=10?O.bl_tree[REPZ_3_10*2]++:O.bl_tree[REPZ_11_138*2]++,c=0,f=k,i===0?($=138,C=3):k===i?($=6,C=3):($=7,C=4))},send_tree=(O,N,I)=>{let D,f=-1,k,i=N[0*2+1],c=0,$=7,C=4;for(i===0&&($=138,C=3),D=0;D<=I;D++)if(k=i,i=N[(D+1)*2+1],!(++c<$&&k===i)){if(c<C)do send_code(O,k,O.bl_tree);while(--c!==0);else k!==0?(k!==f&&(send_code(O,k,O.bl_tree),c--),send_code(O,REP_3_6,O.bl_tree),send_bits(O,c-3,2)):c<=10?(send_code(O,REPZ_3_10,O.bl_tree),send_bits(O,c-3,3)):(send_code(O,REPZ_11_138,O.bl_tree),send_bits(O,c-11,7));c=0,f=k,i===0?($=138,C=3):k===i?($=6,C=3):($=7,C=4)}},build_bl_tree=O=>{let N;for(scan_tree(O,O.dyn_ltree,O.l_desc.max_code),scan_tree(O,O.dyn_dtree,O.d_desc.max_code),build_tree(O,O.bl_desc),N=BL_CODES$1-1;N>=3&&O.bl_tree[bl_order[N]*2+1]===0;N--);return O.opt_len+=3*(N+1)+5+5+4,N},send_all_trees=(O,N,I,D)=>{let f;for(send_bits(O,N-257,5),send_bits(O,I-1,5),send_bits(O,D-4,4),f=0;f<D;f++)send_bits(O,O.bl_tree[bl_order[f]*2+1],3);send_tree(O,O.dyn_ltree,N-1),send_tree(O,O.dyn_dtree,I-1)},detect_data_type=O=>{let N=4093624447,I;for(I=0;I<=31;I++,N>>>=1)if(N&1&&O.dyn_ltree[I*2]!==0)return Z_BINARY;if(O.dyn_ltree[9*2]!==0||O.dyn_ltree[10*2]!==0||O.dyn_ltree[13*2]!==0)return Z_TEXT;for(I=32;I<LITERALS$1;I++)if(O.dyn_ltree[I*2]!==0)return Z_TEXT;return Z_BINARY};let static_init_done=!1;const _tr_init$1=O=>{static_init_done||(tr_static_init(),static_init_done=!0),O.l_desc=new TreeDesc(O.dyn_ltree,static_l_desc),O.d_desc=new TreeDesc(O.dyn_dtree,static_d_desc),O.bl_desc=new TreeDesc(O.bl_tree,static_bl_desc),O.bi_buf=0,O.bi_valid=0,init_block(O)},_tr_stored_block$1=(O,N,I,D)=>{send_bits(O,(STORED_BLOCK<<1)+(D?1:0),3),bi_windup(O),put_short(O,I),put_short(O,~I),I&&O.pending_buf.set(O.window.subarray(N,N+I),O.pending),O.pending+=I},_tr_align$1=O=>{send_bits(O,STATIC_TREES<<1,3),send_code(O,END_BLOCK,static_ltree),bi_flush(O)},_tr_flush_block$1=(O,N,I,D)=>{let f,k,i=0;O.level>0?(O.strm.data_type===Z_UNKNOWN$1&&(O.strm.data_type=detect_data_type(O)),build_tree(O,O.l_desc),build_tree(O,O.d_desc),i=build_bl_tree(O),f=O.opt_len+3+7>>>3,k=O.static_len+3+7>>>3,k<=f&&(f=k)):f=k=I+5,I+4<=f&&N!==-1?_tr_stored_block$1(O,N,I,D):O.strategy===Z_FIXED$1||k===f?(send_bits(O,(STATIC_TREES<<1)+(D?1:0),3),compress_block(O,static_ltree,static_dtree)):(send_bits(O,(DYN_TREES<<1)+(D?1:0),3),send_all_trees(O,O.l_desc.max_code+1,O.d_desc.max_code+1,i+1),compress_block(O,O.dyn_ltree,O.dyn_dtree)),init_block(O),D&&bi_windup(O)},_tr_tally$1=(O,N,I)=>(O.pending_buf[O.sym_buf+O.sym_next++]=N,O.pending_buf[O.sym_buf+O.sym_next++]=N>>8,O.pending_buf[O.sym_buf+O.sym_next++]=I,N===0?O.dyn_ltree[I*2]++:(O.matches++,N--,O.dyn_ltree[(_length_code[I]+LITERALS$1+1)*2]++,O.dyn_dtree[d_code(N)*2]++),O.sym_next===O.sym_end);var _tr_init_1=_tr_init$1,_tr_stored_block_1=_tr_stored_block$1,_tr_flush_block_1=_tr_flush_block$1,_tr_tally_1=_tr_tally$1,_tr_align_1=_tr_align$1,trees={_tr_init:_tr_init_1,_tr_stored_block:_tr_stored_block_1,_tr_flush_block:_tr_flush_block_1,_tr_tally:_tr_tally_1,_tr_align:_tr_align_1};const adler32=(O,N,I,D)=>{let f=O&65535|0,k=O>>>16&65535|0,i=0;for(;I!==0;){i=I>2e3?2e3:I,I-=i;do f=f+N[D++]|0,k=k+f|0;while(--i);f%=65521,k%=65521}return f|k<<16|0};var adler32_1=adler32;const makeTable=()=>{let O,N=[];for(var I=0;I<256;I++){O=I;for(var D=0;D<8;D++)O=O&1?3988292384^O>>>1:O>>>1;N[I]=O}return N},crcTable=new Uint32Array(makeTable()),crc32=(O,N,I,D)=>{const f=crcTable,k=D+I;O^=-1;for(let i=D;i<k;i++)O=O>>>8^f[(O^N[i])&255];return O^-1};var crc32_1=crc32,messages={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},constants$2={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init,_tr_stored_block,_tr_flush_block,_tr_tally,_tr_align}=trees,{Z_NO_FLUSH:Z_NO_FLUSH$2,Z_PARTIAL_FLUSH,Z_FULL_FLUSH:Z_FULL_FLUSH$1,Z_FINISH:Z_FINISH$3,Z_BLOCK:Z_BLOCK$1,Z_OK:Z_OK$3,Z_STREAM_END:Z_STREAM_END$3,Z_STREAM_ERROR:Z_STREAM_ERROR$2,Z_DATA_ERROR:Z_DATA_ERROR$2,Z_BUF_ERROR:Z_BUF_ERROR$1,Z_DEFAULT_COMPRESSION:Z_DEFAULT_COMPRESSION$1,Z_FILTERED,Z_HUFFMAN_ONLY,Z_RLE,Z_FIXED,Z_DEFAULT_STRATEGY:Z_DEFAULT_STRATEGY$1,Z_UNKNOWN,Z_DEFLATED:Z_DEFLATED$2}=constants$2,MAX_MEM_LEVEL=9,MAX_WBITS$1=15,DEF_MEM_LEVEL=8,LENGTH_CODES=29,LITERALS=256,L_CODES=LITERALS+1+LENGTH_CODES,D_CODES=30,BL_CODES=19,HEAP_SIZE=2*L_CODES+1,MAX_BITS=15,MIN_MATCH=3,MAX_MATCH=258,MIN_LOOKAHEAD=MAX_MATCH+MIN_MATCH+1,PRESET_DICT=32,INIT_STATE=42,GZIP_STATE=57,EXTRA_STATE=69,NAME_STATE=73,COMMENT_STATE=91,HCRC_STATE=103,BUSY_STATE=113,FINISH_STATE=666,BS_NEED_MORE=1,BS_BLOCK_DONE=2,BS_FINISH_STARTED=3,BS_FINISH_DONE=4,OS_CODE=3,err=(O,N)=>(O.msg=messages[N],N),rank=O=>O*2-(O>4?9:0),zero=O=>{let N=O.length;for(;--N>=0;)O[N]=0},slide_hash=O=>{let N,I,D,f=O.w_size;N=O.hash_size,D=N;do I=O.head[--D],O.head[D]=I>=f?I-f:0;while(--N);N=f,D=N;do I=O.prev[--D],O.prev[D]=I>=f?I-f:0;while(--N)};let HASH_ZLIB=(O,N,I)=>(N<<O.hash_shift^I)&O.hash_mask,HASH=HASH_ZLIB;const flush_pending=O=>{const N=O.state;let I=N.pending;I>O.avail_out&&(I=O.avail_out),I!==0&&(O.output.set(N.pending_buf.subarray(N.pending_out,N.pending_out+I),O.next_out),O.next_out+=I,N.pending_out+=I,O.total_out+=I,O.avail_out-=I,N.pending-=I,N.pending===0&&(N.pending_out=0))},flush_block_only=(O,N)=>{_tr_flush_block(O,O.block_start>=0?O.block_start:-1,O.strstart-O.block_start,N),O.block_start=O.strstart,flush_pending(O.strm)},put_byte=(O,N)=>{O.pending_buf[O.pending++]=N},putShortMSB=(O,N)=>{O.pending_buf[O.pending++]=N>>>8&255,O.pending_buf[O.pending++]=N&255},read_buf=(O,N,I,D)=>{let f=O.avail_in;return f>D&&(f=D),f===0?0:(O.avail_in-=f,N.set(O.input.subarray(O.next_in,O.next_in+f),I),O.state.wrap===1?O.adler=adler32_1(O.adler,N,f,I):O.state.wrap===2&&(O.adler=crc32_1(O.adler,N,f,I)),O.next_in+=f,O.total_in+=f,f)},longest_match=(O,N)=>{let I=O.max_chain_length,D=O.strstart,f,k,i=O.prev_length,c=O.nice_match;const $=O.strstart>O.w_size-MIN_LOOKAHEAD?O.strstart-(O.w_size-MIN_LOOKAHEAD):0,C=O.window,M=O.w_mask,Z=O.prev,J=O.strstart+MAX_MATCH;let z=C[D+i-1],Q=C[D+i];O.prev_length>=O.good_match&&(I>>=2),c>O.lookahead&&(c=O.lookahead);do if(f=N,!(C[f+i]!==Q||C[f+i-1]!==z||C[f]!==C[D]||C[++f]!==C[D+1])){D+=2,f++;do;while(C[++D]===C[++f]&&C[++D]===C[++f]&&C[++D]===C[++f]&&C[++D]===C[++f]&&C[++D]===C[++f]&&C[++D]===C[++f]&&C[++D]===C[++f]&&C[++D]===C[++f]&&D<J);if(k=MAX_MATCH-(J-D),D=J-MAX_MATCH,k>i){if(O.match_start=N,i=k,k>=c)break;z=C[D+i-1],Q=C[D+i]}}while((N=Z[N&M])>$&&--I!==0);return i<=O.lookahead?i:O.lookahead},fill_window=O=>{const N=O.w_size;let I,D,f;do{if(D=O.window_size-O.lookahead-O.strstart,O.strstart>=N+(N-MIN_LOOKAHEAD)&&(O.window.set(O.window.subarray(N,N+N-D),0),O.match_start-=N,O.strstart-=N,O.block_start-=N,O.insert>O.strstart&&(O.insert=O.strstart),slide_hash(O),D+=N),O.strm.avail_in===0)break;if(I=read_buf(O.strm,O.window,O.strstart+O.lookahead,D),O.lookahead+=I,O.lookahead+O.insert>=MIN_MATCH)for(f=O.strstart-O.insert,O.ins_h=O.window[f],O.ins_h=HASH(O,O.ins_h,O.window[f+1]);O.insert&&(O.ins_h=HASH(O,O.ins_h,O.window[f+MIN_MATCH-1]),O.prev[f&O.w_mask]=O.head[O.ins_h],O.head[O.ins_h]=f,f++,O.insert--,!(O.lookahead+O.insert<MIN_MATCH)););}while(O.lookahead<MIN_LOOKAHEAD&&O.strm.avail_in!==0)},deflate_stored=(O,N)=>{let I=O.pending_buf_size-5>O.w_size?O.w_size:O.pending_buf_size-5,D,f,k,i=0,c=O.strm.avail_in;do{if(D=65535,k=O.bi_valid+42>>3,O.strm.avail_out<k||(k=O.strm.avail_out-k,f=O.strstart-O.block_start,D>f+O.strm.avail_in&&(D=f+O.strm.avail_in),D>k&&(D=k),D<I&&(D===0&&N!==Z_FINISH$3||N===Z_NO_FLUSH$2||D!==f+O.strm.avail_in)))break;i=N===Z_FINISH$3&&D===f+O.strm.avail_in?1:0,_tr_stored_block(O,0,0,i),O.pending_buf[O.pending-4]=D,O.pending_buf[O.pending-3]=D>>8,O.pending_buf[O.pending-2]=~D,O.pending_buf[O.pending-1]=~D>>8,flush_pending(O.strm),f&&(f>D&&(f=D),O.strm.output.set(O.window.subarray(O.block_start,O.block_start+f),O.strm.next_out),O.strm.next_out+=f,O.strm.avail_out-=f,O.strm.total_out+=f,O.block_start+=f,D-=f),D&&(read_buf(O.strm,O.strm.output,O.strm.next_out,D),O.strm.next_out+=D,O.strm.avail_out-=D,O.strm.total_out+=D)}while(i===0);return c-=O.strm.avail_in,c&&(c>=O.w_size?(O.matches=2,O.window.set(O.strm.input.subarray(O.strm.next_in-O.w_size,O.strm.next_in),0),O.strstart=O.w_size,O.insert=O.strstart):(O.window_size-O.strstart<=c&&(O.strstart-=O.w_size,O.window.set(O.window.subarray(O.w_size,O.w_size+O.strstart),0),O.matches<2&&O.matches++,O.insert>O.strstart&&(O.insert=O.strstart)),O.window.set(O.strm.input.subarray(O.strm.next_in-c,O.strm.next_in),O.strstart),O.strstart+=c,O.insert+=c>O.w_size-O.insert?O.w_size-O.insert:c),O.block_start=O.strstart),O.high_water<O.strstart&&(O.high_water=O.strstart),i?BS_FINISH_DONE:N!==Z_NO_FLUSH$2&&N!==Z_FINISH$3&&O.strm.avail_in===0&&O.strstart===O.block_start?BS_BLOCK_DONE:(k=O.window_size-O.strstart,O.strm.avail_in>k&&O.block_start>=O.w_size&&(O.block_start-=O.w_size,O.strstart-=O.w_size,O.window.set(O.window.subarray(O.w_size,O.w_size+O.strstart),0),O.matches<2&&O.matches++,k+=O.w_size,O.insert>O.strstart&&(O.insert=O.strstart)),k>O.strm.avail_in&&(k=O.strm.avail_in),k&&(read_buf(O.strm,O.window,O.strstart,k),O.strstart+=k,O.insert+=k>O.w_size-O.insert?O.w_size-O.insert:k),O.high_water<O.strstart&&(O.high_water=O.strstart),k=O.bi_valid+42>>3,k=O.pending_buf_size-k>65535?65535:O.pending_buf_size-k,I=k>O.w_size?O.w_size:k,f=O.strstart-O.block_start,(f>=I||(f||N===Z_FINISH$3)&&N!==Z_NO_FLUSH$2&&O.strm.avail_in===0&&f<=k)&&(D=f>k?k:f,i=N===Z_FINISH$3&&O.strm.avail_in===0&&D===f?1:0,_tr_stored_block(O,O.block_start,D,i),O.block_start+=D,flush_pending(O.strm)),i?BS_FINISH_STARTED:BS_NEED_MORE)},deflate_fast=(O,N)=>{let I,D;for(;;){if(O.lookahead<MIN_LOOKAHEAD){if(fill_window(O),O.lookahead<MIN_LOOKAHEAD&&N===Z_NO_FLUSH$2)return BS_NEED_MORE;if(O.lookahead===0)break}if(I=0,O.lookahead>=MIN_MATCH&&(O.ins_h=HASH(O,O.ins_h,O.window[O.strstart+MIN_MATCH-1]),I=O.prev[O.strstart&O.w_mask]=O.head[O.ins_h],O.head[O.ins_h]=O.strstart),I!==0&&O.strstart-I<=O.w_size-MIN_LOOKAHEAD&&(O.match_length=longest_match(O,I)),O.match_length>=MIN_MATCH)if(D=_tr_tally(O,O.strstart-O.match_start,O.match_length-MIN_MATCH),O.lookahead-=O.match_length,O.match_length<=O.max_lazy_match&&O.lookahead>=MIN_MATCH){O.match_length--;do O.strstart++,O.ins_h=HASH(O,O.ins_h,O.window[O.strstart+MIN_MATCH-1]),I=O.prev[O.strstart&O.w_mask]=O.head[O.ins_h],O.head[O.ins_h]=O.strstart;while(--O.match_length!==0);O.strstart++}else O.strstart+=O.match_length,O.match_length=0,O.ins_h=O.window[O.strstart],O.ins_h=HASH(O,O.ins_h,O.window[O.strstart+1]);else D=_tr_tally(O,0,O.window[O.strstart]),O.lookahead--,O.strstart++;if(D&&(flush_block_only(O,!1),O.strm.avail_out===0))return BS_NEED_MORE}return O.insert=O.strstart<MIN_MATCH-1?O.strstart:MIN_MATCH-1,N===Z_FINISH$3?(flush_block_only(O,!0),O.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):O.sym_next&&(flush_block_only(O,!1),O.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_slow=(O,N)=>{let I,D,f;for(;;){if(O.lookahead<MIN_LOOKAHEAD){if(fill_window(O),O.lookahead<MIN_LOOKAHEAD&&N===Z_NO_FLUSH$2)return BS_NEED_MORE;if(O.lookahead===0)break}if(I=0,O.lookahead>=MIN_MATCH&&(O.ins_h=HASH(O,O.ins_h,O.window[O.strstart+MIN_MATCH-1]),I=O.prev[O.strstart&O.w_mask]=O.head[O.ins_h],O.head[O.ins_h]=O.strstart),O.prev_length=O.match_length,O.prev_match=O.match_start,O.match_length=MIN_MATCH-1,I!==0&&O.prev_length<O.max_lazy_match&&O.strstart-I<=O.w_size-MIN_LOOKAHEAD&&(O.match_length=longest_match(O,I),O.match_length<=5&&(O.strategy===Z_FILTERED||O.match_length===MIN_MATCH&&O.strstart-O.match_start>4096)&&(O.match_length=MIN_MATCH-1)),O.prev_length>=MIN_MATCH&&O.match_length<=O.prev_length){f=O.strstart+O.lookahead-MIN_MATCH,D=_tr_tally(O,O.strstart-1-O.prev_match,O.prev_length-MIN_MATCH),O.lookahead-=O.prev_length-1,O.prev_length-=2;do++O.strstart<=f&&(O.ins_h=HASH(O,O.ins_h,O.window[O.strstart+MIN_MATCH-1]),I=O.prev[O.strstart&O.w_mask]=O.head[O.ins_h],O.head[O.ins_h]=O.strstart);while(--O.prev_length!==0);if(O.match_available=0,O.match_length=MIN_MATCH-1,O.strstart++,D&&(flush_block_only(O,!1),O.strm.avail_out===0))return BS_NEED_MORE}else if(O.match_available){if(D=_tr_tally(O,0,O.window[O.strstart-1]),D&&flush_block_only(O,!1),O.strstart++,O.lookahead--,O.strm.avail_out===0)return BS_NEED_MORE}else O.match_available=1,O.strstart++,O.lookahead--}return O.match_available&&(D=_tr_tally(O,0,O.window[O.strstart-1]),O.match_available=0),O.insert=O.strstart<MIN_MATCH-1?O.strstart:MIN_MATCH-1,N===Z_FINISH$3?(flush_block_only(O,!0),O.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):O.sym_next&&(flush_block_only(O,!1),O.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_rle=(O,N)=>{let I,D,f,k;const i=O.window;for(;;){if(O.lookahead<=MAX_MATCH){if(fill_window(O),O.lookahead<=MAX_MATCH&&N===Z_NO_FLUSH$2)return BS_NEED_MORE;if(O.lookahead===0)break}if(O.match_length=0,O.lookahead>=MIN_MATCH&&O.strstart>0&&(f=O.strstart-1,D=i[f],D===i[++f]&&D===i[++f]&&D===i[++f])){k=O.strstart+MAX_MATCH;do;while(D===i[++f]&&D===i[++f]&&D===i[++f]&&D===i[++f]&&D===i[++f]&&D===i[++f]&&D===i[++f]&&D===i[++f]&&f<k);O.match_length=MAX_MATCH-(k-f),O.match_length>O.lookahead&&(O.match_length=O.lookahead)}if(O.match_length>=MIN_MATCH?(I=_tr_tally(O,1,O.match_length-MIN_MATCH),O.lookahead-=O.match_length,O.strstart+=O.match_length,O.match_length=0):(I=_tr_tally(O,0,O.window[O.strstart]),O.lookahead--,O.strstart++),I&&(flush_block_only(O,!1),O.strm.avail_out===0))return BS_NEED_MORE}return O.insert=0,N===Z_FINISH$3?(flush_block_only(O,!0),O.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):O.sym_next&&(flush_block_only(O,!1),O.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_huff=(O,N)=>{let I;for(;;){if(O.lookahead===0&&(fill_window(O),O.lookahead===0)){if(N===Z_NO_FLUSH$2)return BS_NEED_MORE;break}if(O.match_length=0,I=_tr_tally(O,0,O.window[O.strstart]),O.lookahead--,O.strstart++,I&&(flush_block_only(O,!1),O.strm.avail_out===0))return BS_NEED_MORE}return O.insert=0,N===Z_FINISH$3?(flush_block_only(O,!0),O.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):O.sym_next&&(flush_block_only(O,!1),O.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE};function Config(O,N,I,D,f){this.good_length=O,this.max_lazy=N,this.nice_length=I,this.max_chain=D,this.func=f}const configuration_table=[new Config(0,0,0,0,deflate_stored),new Config(4,4,8,4,deflate_fast),new Config(4,5,16,8,deflate_fast),new Config(4,6,32,32,deflate_fast),new Config(4,4,16,16,deflate_slow),new Config(8,16,32,32,deflate_slow),new Config(8,16,128,128,deflate_slow),new Config(8,32,128,256,deflate_slow),new Config(32,128,258,1024,deflate_slow),new Config(32,258,258,4096,deflate_slow)],lm_init=O=>{O.window_size=2*O.w_size,zero(O.head),O.max_lazy_match=configuration_table[O.level].max_lazy,O.good_match=configuration_table[O.level].good_length,O.nice_match=configuration_table[O.level].nice_length,O.max_chain_length=configuration_table[O.level].max_chain,O.strstart=0,O.block_start=0,O.lookahead=0,O.insert=0,O.match_length=O.prev_length=MIN_MATCH-1,O.match_available=0,O.ins_h=0};function DeflateState(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Z_DEFLATED$2,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(HEAP_SIZE*2),this.dyn_dtree=new Uint16Array((2*D_CODES+1)*2),this.bl_tree=new Uint16Array((2*BL_CODES+1)*2),zero(this.dyn_ltree),zero(this.dyn_dtree),zero(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(MAX_BITS+1),this.heap=new Uint16Array(2*L_CODES+1),zero(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*L_CODES+1),zero(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const deflateStateCheck=O=>{if(!O)return 1;const N=O.state;return!N||N.strm!==O||N.status!==INIT_STATE&&N.status!==GZIP_STATE&&N.status!==EXTRA_STATE&&N.status!==NAME_STATE&&N.status!==COMMENT_STATE&&N.status!==HCRC_STATE&&N.status!==BUSY_STATE&&N.status!==FINISH_STATE?1:0},deflateResetKeep=O=>{if(deflateStateCheck(O))return err(O,Z_STREAM_ERROR$2);O.total_in=O.total_out=0,O.data_type=Z_UNKNOWN;const N=O.state;return N.pending=0,N.pending_out=0,N.wrap<0&&(N.wrap=-N.wrap),N.status=N.wrap===2?GZIP_STATE:N.wrap?INIT_STATE:BUSY_STATE,O.adler=N.wrap===2?0:1,N.last_flush=-2,_tr_init(N),Z_OK$3},deflateReset=O=>{const N=deflateResetKeep(O);return N===Z_OK$3&&lm_init(O.state),N},deflateSetHeader=(O,N)=>deflateStateCheck(O)||O.state.wrap!==2?Z_STREAM_ERROR$2:(O.state.gzhead=N,Z_OK$3),deflateInit2=(O,N,I,D,f,k)=>{if(!O)return Z_STREAM_ERROR$2;let i=1;if(N===Z_DEFAULT_COMPRESSION$1&&(N=6),D<0?(i=0,D=-D):D>15&&(i=2,D-=16),f<1||f>MAX_MEM_LEVEL||I!==Z_DEFLATED$2||D<8||D>15||N<0||N>9||k<0||k>Z_FIXED||D===8&&i!==1)return err(O,Z_STREAM_ERROR$2);D===8&&(D=9);const c=new DeflateState;return O.state=c,c.strm=O,c.status=INIT_STATE,c.wrap=i,c.gzhead=null,c.w_bits=D,c.w_size=1<<c.w_bits,c.w_mask=c.w_size-1,c.hash_bits=f+7,c.hash_size=1<<c.hash_bits,c.hash_mask=c.hash_size-1,c.hash_shift=~~((c.hash_bits+MIN_MATCH-1)/MIN_MATCH),c.window=new Uint8Array(c.w_size*2),c.head=new Uint16Array(c.hash_size),c.prev=new Uint16Array(c.w_size),c.lit_bufsize=1<<f+6,c.pending_buf_size=c.lit_bufsize*4,c.pending_buf=new Uint8Array(c.pending_buf_size),c.sym_buf=c.lit_bufsize,c.sym_end=(c.lit_bufsize-1)*3,c.level=N,c.strategy=k,c.method=I,deflateReset(O)},deflateInit=(O,N)=>deflateInit2(O,N,Z_DEFLATED$2,MAX_WBITS$1,DEF_MEM_LEVEL,Z_DEFAULT_STRATEGY$1),deflate$2=(O,N)=>{if(deflateStateCheck(O)||N>Z_BLOCK$1||N<0)return O?err(O,Z_STREAM_ERROR$2):Z_STREAM_ERROR$2;const I=O.state;if(!O.output||O.avail_in!==0&&!O.input||I.status===FINISH_STATE&&N!==Z_FINISH$3)return err(O,O.avail_out===0?Z_BUF_ERROR$1:Z_STREAM_ERROR$2);const D=I.last_flush;if(I.last_flush=N,I.pending!==0){if(flush_pending(O),O.avail_out===0)return I.last_flush=-1,Z_OK$3}else if(O.avail_in===0&&rank(N)<=rank(D)&&N!==Z_FINISH$3)return err(O,Z_BUF_ERROR$1);if(I.status===FINISH_STATE&&O.avail_in!==0)return err(O,Z_BUF_ERROR$1);if(I.status===INIT_STATE&&I.wrap===0&&(I.status=BUSY_STATE),I.status===INIT_STATE){let f=Z_DEFLATED$2+(I.w_bits-8<<4)<<8,k=-1;if(I.strategy>=Z_HUFFMAN_ONLY||I.level<2?k=0:I.level<6?k=1:I.level===6?k=2:k=3,f|=k<<6,I.strstart!==0&&(f|=PRESET_DICT),f+=31-f%31,putShortMSB(I,f),I.strstart!==0&&(putShortMSB(I,O.adler>>>16),putShortMSB(I,O.adler&65535)),O.adler=1,I.status=BUSY_STATE,flush_pending(O),I.pending!==0)return I.last_flush=-1,Z_OK$3}if(I.status===GZIP_STATE){if(O.adler=0,put_byte(I,31),put_byte(I,139),put_byte(I,8),I.gzhead)put_byte(I,(I.gzhead.text?1:0)+(I.gzhead.hcrc?2:0)+(I.gzhead.extra?4:0)+(I.gzhead.name?8:0)+(I.gzhead.comment?16:0)),put_byte(I,I.gzhead.time&255),put_byte(I,I.gzhead.time>>8&255),put_byte(I,I.gzhead.time>>16&255),put_byte(I,I.gzhead.time>>24&255),put_byte(I,I.level===9?2:I.strategy>=Z_HUFFMAN_ONLY||I.level<2?4:0),put_byte(I,I.gzhead.os&255),I.gzhead.extra&&I.gzhead.extra.length&&(put_byte(I,I.gzhead.extra.length&255),put_byte(I,I.gzhead.extra.length>>8&255)),I.gzhead.hcrc&&(O.adler=crc32_1(O.adler,I.pending_buf,I.pending,0)),I.gzindex=0,I.status=EXTRA_STATE;else if(put_byte(I,0),put_byte(I,0),put_byte(I,0),put_byte(I,0),put_byte(I,0),put_byte(I,I.level===9?2:I.strategy>=Z_HUFFMAN_ONLY||I.level<2?4:0),put_byte(I,OS_CODE),I.status=BUSY_STATE,flush_pending(O),I.pending!==0)return I.last_flush=-1,Z_OK$3}if(I.status===EXTRA_STATE){if(I.gzhead.extra){let f=I.pending,k=(I.gzhead.extra.length&65535)-I.gzindex;for(;I.pending+k>I.pending_buf_size;){let c=I.pending_buf_size-I.pending;if(I.pending_buf.set(I.gzhead.extra.subarray(I.gzindex,I.gzindex+c),I.pending),I.pending=I.pending_buf_size,I.gzhead.hcrc&&I.pending>f&&(O.adler=crc32_1(O.adler,I.pending_buf,I.pending-f,f)),I.gzindex+=c,flush_pending(O),I.pending!==0)return I.last_flush=-1,Z_OK$3;f=0,k-=c}let i=new Uint8Array(I.gzhead.extra);I.pending_buf.set(i.subarray(I.gzindex,I.gzindex+k),I.pending),I.pending+=k,I.gzhead.hcrc&&I.pending>f&&(O.adler=crc32_1(O.adler,I.pending_buf,I.pending-f,f)),I.gzindex=0}I.status=NAME_STATE}if(I.status===NAME_STATE){if(I.gzhead.name){let f=I.pending,k;do{if(I.pending===I.pending_buf_size){if(I.gzhead.hcrc&&I.pending>f&&(O.adler=crc32_1(O.adler,I.pending_buf,I.pending-f,f)),flush_pending(O),I.pending!==0)return I.last_flush=-1,Z_OK$3;f=0}I.gzindex<I.gzhead.name.length?k=I.gzhead.name.charCodeAt(I.gzindex++)&255:k=0,put_byte(I,k)}while(k!==0);I.gzhead.hcrc&&I.pending>f&&(O.adler=crc32_1(O.adler,I.pending_buf,I.pending-f,f)),I.gzindex=0}I.status=COMMENT_STATE}if(I.status===COMMENT_STATE){if(I.gzhead.comment){let f=I.pending,k;do{if(I.pending===I.pending_buf_size){if(I.gzhead.hcrc&&I.pending>f&&(O.adler=crc32_1(O.adler,I.pending_buf,I.pending-f,f)),flush_pending(O),I.pending!==0)return I.last_flush=-1,Z_OK$3;f=0}I.gzindex<I.gzhead.comment.length?k=I.gzhead.comment.charCodeAt(I.gzindex++)&255:k=0,put_byte(I,k)}while(k!==0);I.gzhead.hcrc&&I.pending>f&&(O.adler=crc32_1(O.adler,I.pending_buf,I.pending-f,f))}I.status=HCRC_STATE}if(I.status===HCRC_STATE){if(I.gzhead.hcrc){if(I.pending+2>I.pending_buf_size&&(flush_pending(O),I.pending!==0))return I.last_flush=-1,Z_OK$3;put_byte(I,O.adler&255),put_byte(I,O.adler>>8&255),O.adler=0}if(I.status=BUSY_STATE,flush_pending(O),I.pending!==0)return I.last_flush=-1,Z_OK$3}if(O.avail_in!==0||I.lookahead!==0||N!==Z_NO_FLUSH$2&&I.status!==FINISH_STATE){let f=I.level===0?deflate_stored(I,N):I.strategy===Z_HUFFMAN_ONLY?deflate_huff(I,N):I.strategy===Z_RLE?deflate_rle(I,N):configuration_table[I.level].func(I,N);if((f===BS_FINISH_STARTED||f===BS_FINISH_DONE)&&(I.status=FINISH_STATE),f===BS_NEED_MORE||f===BS_FINISH_STARTED)return O.avail_out===0&&(I.last_flush=-1),Z_OK$3;if(f===BS_BLOCK_DONE&&(N===Z_PARTIAL_FLUSH?_tr_align(I):N!==Z_BLOCK$1&&(_tr_stored_block(I,0,0,!1),N===Z_FULL_FLUSH$1&&(zero(I.head),I.lookahead===0&&(I.strstart=0,I.block_start=0,I.insert=0))),flush_pending(O),O.avail_out===0))return I.last_flush=-1,Z_OK$3}return N!==Z_FINISH$3?Z_OK$3:I.wrap<=0?Z_STREAM_END$3:(I.wrap===2?(put_byte(I,O.adler&255),put_byte(I,O.adler>>8&255),put_byte(I,O.adler>>16&255),put_byte(I,O.adler>>24&255),put_byte(I,O.total_in&255),put_byte(I,O.total_in>>8&255),put_byte(I,O.total_in>>16&255),put_byte(I,O.total_in>>24&255)):(putShortMSB(I,O.adler>>>16),putShortMSB(I,O.adler&65535)),flush_pending(O),I.wrap>0&&(I.wrap=-I.wrap),I.pending!==0?Z_OK$3:Z_STREAM_END$3)},deflateEnd=O=>{if(deflateStateCheck(O))return Z_STREAM_ERROR$2;const N=O.state.status;return O.state=null,N===BUSY_STATE?err(O,Z_DATA_ERROR$2):Z_OK$3},deflateSetDictionary=(O,N)=>{let I=N.length;if(deflateStateCheck(O))return Z_STREAM_ERROR$2;const D=O.state,f=D.wrap;if(f===2||f===1&&D.status!==INIT_STATE||D.lookahead)return Z_STREAM_ERROR$2;if(f===1&&(O.adler=adler32_1(O.adler,N,I,0)),D.wrap=0,I>=D.w_size){f===0&&(zero(D.head),D.strstart=0,D.block_start=0,D.insert=0);let $=new Uint8Array(D.w_size);$.set(N.subarray(I-D.w_size,I),0),N=$,I=D.w_size}const k=O.avail_in,i=O.next_in,c=O.input;for(O.avail_in=I,O.next_in=0,O.input=N,fill_window(D);D.lookahead>=MIN_MATCH;){let $=D.strstart,C=D.lookahead-(MIN_MATCH-1);do D.ins_h=HASH(D,D.ins_h,D.window[$+MIN_MATCH-1]),D.prev[$&D.w_mask]=D.head[D.ins_h],D.head[D.ins_h]=$,$++;while(--C);D.strstart=$,D.lookahead=MIN_MATCH-1,fill_window(D)}return D.strstart+=D.lookahead,D.block_start=D.strstart,D.insert=D.lookahead,D.lookahead=0,D.match_length=D.prev_length=MIN_MATCH-1,D.match_available=0,O.next_in=i,O.input=c,O.avail_in=k,D.wrap=f,Z_OK$3};var deflateInit_1=deflateInit,deflateInit2_1=deflateInit2,deflateReset_1=deflateReset,deflateResetKeep_1=deflateResetKeep,deflateSetHeader_1=deflateSetHeader,deflate_2$1=deflate$2,deflateEnd_1=deflateEnd,deflateSetDictionary_1=deflateSetDictionary,deflateInfo="pako deflate (from Nodeca project)",deflate_1$2={deflateInit:deflateInit_1,deflateInit2:deflateInit2_1,deflateReset:deflateReset_1,deflateResetKeep:deflateResetKeep_1,deflateSetHeader:deflateSetHeader_1,deflate:deflate_2$1,deflateEnd:deflateEnd_1,deflateSetDictionary:deflateSetDictionary_1,deflateInfo};const _has=(O,N)=>Object.prototype.hasOwnProperty.call(O,N);var assign=function(O){const N=Array.prototype.slice.call(arguments,1);for(;N.length;){const I=N.shift();if(I){if(typeof I!="object")throw new TypeError(I+"must be non-object");for(const D in I)_has(I,D)&&(O[D]=I[D])}}return O},flattenChunks=O=>{let N=0;for(let D=0,f=O.length;D<f;D++)N+=O[D].length;const I=new Uint8Array(N);for(let D=0,f=0,k=O.length;D<k;D++){let i=O[D];I.set(i,f),f+=i.length}return I},common={assign,flattenChunks};let STR_APPLY_UIA_OK=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(O){STR_APPLY_UIA_OK=!1}const _utf8len=new Uint8Array(256);for(let O=0;O<256;O++)_utf8len[O]=O>=252?6:O>=248?5:O>=240?4:O>=224?3:O>=192?2:1;_utf8len[254]=_utf8len[254]=1;var string2buf=O=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(O);let N,I,D,f,k,i=O.length,c=0;for(f=0;f<i;f++)I=O.charCodeAt(f),(I&64512)===55296&&f+1<i&&(D=O.charCodeAt(f+1),(D&64512)===56320&&(I=65536+(I-55296<<10)+(D-56320),f++)),c+=I<128?1:I<2048?2:I<65536?3:4;for(N=new Uint8Array(c),k=0,f=0;k<c;f++)I=O.charCodeAt(f),(I&64512)===55296&&f+1<i&&(D=O.charCodeAt(f+1),(D&64512)===56320&&(I=65536+(I-55296<<10)+(D-56320),f++)),I<128?N[k++]=I:I<2048?(N[k++]=192|I>>>6,N[k++]=128|I&63):I<65536?(N[k++]=224|I>>>12,N[k++]=128|I>>>6&63,N[k++]=128|I&63):(N[k++]=240|I>>>18,N[k++]=128|I>>>12&63,N[k++]=128|I>>>6&63,N[k++]=128|I&63);return N};const buf2binstring=(O,N)=>{if(N<65534&&O.subarray&&STR_APPLY_UIA_OK)return String.fromCharCode.apply(null,O.length===N?O:O.subarray(0,N));let I="";for(let D=0;D<N;D++)I+=String.fromCharCode(O[D]);return I};var buf2string=(O,N)=>{const I=N||O.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(O.subarray(0,N));let D,f;const k=new Array(I*2);for(f=0,D=0;D<I;){let i=O[D++];if(i<128){k[f++]=i;continue}let c=_utf8len[i];if(c>4){k[f++]=65533,D+=c-1;continue}for(i&=c===2?31:c===3?15:7;c>1&&D<I;)i=i<<6|O[D++]&63,c--;if(c>1){k[f++]=65533;continue}i<65536?k[f++]=i:(i-=65536,k[f++]=55296|i>>10&1023,k[f++]=56320|i&1023)}return buf2binstring(k,f)},utf8border=(O,N)=>{N=N||O.length,N>O.length&&(N=O.length);let I=N-1;for(;I>=0&&(O[I]&192)===128;)I--;return I<0||I===0?N:I+_utf8len[O[I]]>N?I:N},strings={string2buf,buf2string,utf8border};function ZStream(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var zstream=ZStream;const toString$1=Object.prototype.toString,{Z_NO_FLUSH:Z_NO_FLUSH$1,Z_SYNC_FLUSH,Z_FULL_FLUSH,Z_FINISH:Z_FINISH$2,Z_OK:Z_OK$2,Z_STREAM_END:Z_STREAM_END$2,Z_DEFAULT_COMPRESSION,Z_DEFAULT_STRATEGY,Z_DEFLATED:Z_DEFLATED$1}=constants$2;function Deflate$1(O){this.options=common.assign({level:Z_DEFAULT_COMPRESSION,method:Z_DEFLATED$1,chunkSize:16384,windowBits:15,memLevel:8,strategy:Z_DEFAULT_STRATEGY},O||{});let N=this.options;N.raw&&N.windowBits>0?N.windowBits=-N.windowBits:N.gzip&&N.windowBits>0&&N.windowBits<16&&(N.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zstream,this.strm.avail_out=0;let I=deflate_1$2.deflateInit2(this.strm,N.level,N.method,N.windowBits,N.memLevel,N.strategy);if(I!==Z_OK$2)throw new Error(messages[I]);if(N.header&&deflate_1$2.deflateSetHeader(this.strm,N.header),N.dictionary){let D;if(typeof N.dictionary=="string"?D=strings.string2buf(N.dictionary):toString$1.call(N.dictionary)==="[object ArrayBuffer]"?D=new Uint8Array(N.dictionary):D=N.dictionary,I=deflate_1$2.deflateSetDictionary(this.strm,D),I!==Z_OK$2)throw new Error(messages[I]);this._dict_set=!0}}Deflate$1.prototype.push=function(O,N){const I=this.strm,D=this.options.chunkSize;let f,k;if(this.ended)return!1;for(N===~~N?k=N:k=N===!0?Z_FINISH$2:Z_NO_FLUSH$1,typeof O=="string"?I.input=strings.string2buf(O):toString$1.call(O)==="[object ArrayBuffer]"?I.input=new Uint8Array(O):I.input=O,I.next_in=0,I.avail_in=I.input.length;;){if(I.avail_out===0&&(I.output=new Uint8Array(D),I.next_out=0,I.avail_out=D),(k===Z_SYNC_FLUSH||k===Z_FULL_FLUSH)&&I.avail_out<=6){this.onData(I.output.subarray(0,I.next_out)),I.avail_out=0;continue}if(f=deflate_1$2.deflate(I,k),f===Z_STREAM_END$2)return I.next_out>0&&this.onData(I.output.subarray(0,I.next_out)),f=deflate_1$2.deflateEnd(this.strm),this.onEnd(f),this.ended=!0,f===Z_OK$2;if(I.avail_out===0){this.onData(I.output);continue}if(k>0&&I.next_out>0){this.onData(I.output.subarray(0,I.next_out)),I.avail_out=0;continue}if(I.avail_in===0)break}return!0},Deflate$1.prototype.onData=function(O){this.chunks.push(O)},Deflate$1.prototype.onEnd=function(O){O===Z_OK$2&&(this.result=common.flattenChunks(this.chunks)),this.chunks=[],this.err=O,this.msg=this.strm.msg};function deflate$1(O,N){const I=new Deflate$1(N);if(I.push(O,!0),I.err)throw I.msg||messages[I.err];return I.result}function deflateRaw$1(O,N){return N=N||{},N.raw=!0,deflate$1(O,N)}function gzip$1(O,N){return N=N||{},N.gzip=!0,deflate$1(O,N)}var Deflate_1$1=Deflate$1,deflate_2=deflate$1,deflateRaw_1$1=deflateRaw$1,gzip_1$1=gzip$1,deflate_1$1={Deflate:Deflate_1$1,deflate:deflate_2,deflateRaw:deflateRaw_1$1,gzip:gzip_1$1};const BAD$1=16209,TYPE$1=16191;var inffast=function O(N,I){let D,f,k,i,c,$,C,M,Z,J,z,Q,ee,Y,te,ie,ye,re,de,se,ue,he,we,fe;const me=N.state;D=N.next_in,we=N.input,f=D+(N.avail_in-5),k=N.next_out,fe=N.output,i=k-(I-N.avail_out),c=k+(N.avail_out-257),$=me.dmax,C=me.wsize,M=me.whave,Z=me.wnext,J=me.window,z=me.hold,Q=me.bits,ee=me.lencode,Y=me.distcode,te=(1<<me.lenbits)-1,ie=(1<<me.distbits)-1;e:do{Q<15&&(z+=we[D++]<<Q,Q+=8,z+=we[D++]<<Q,Q+=8),ye=ee[z&te];t:for(;;){if(re=ye>>>24,z>>>=re,Q-=re,re=ye>>>16&255,re===0)fe[k++]=ye&65535;else if(re&16){de=ye&65535,re&=15,re&&(Q<re&&(z+=we[D++]<<Q,Q+=8),de+=z&(1<<re)-1,z>>>=re,Q-=re),Q<15&&(z+=we[D++]<<Q,Q+=8,z+=we[D++]<<Q,Q+=8),ye=Y[z&ie];n:for(;;){if(re=ye>>>24,z>>>=re,Q-=re,re=ye>>>16&255,re&16){if(se=ye&65535,re&=15,Q<re&&(z+=we[D++]<<Q,Q+=8,Q<re&&(z+=we[D++]<<Q,Q+=8)),se+=z&(1<<re)-1,se>$){N.msg="invalid distance too far back",me.mode=BAD$1;break e}if(z>>>=re,Q-=re,re=k-i,se>re){if(re=se-re,re>M&&me.sane){N.msg="invalid distance too far back",me.mode=BAD$1;break e}if(ue=0,he=J,Z===0){if(ue+=C-re,re<de){de-=re;do fe[k++]=J[ue++];while(--re);ue=k-se,he=fe}}else if(Z<re){if(ue+=C+Z-re,re-=Z,re<de){de-=re;do fe[k++]=J[ue++];while(--re);if(ue=0,Z<de){re=Z,de-=re;do fe[k++]=J[ue++];while(--re);ue=k-se,he=fe}}}else if(ue+=Z-re,re<de){de-=re;do fe[k++]=J[ue++];while(--re);ue=k-se,he=fe}for(;de>2;)fe[k++]=he[ue++],fe[k++]=he[ue++],fe[k++]=he[ue++],de-=3;de&&(fe[k++]=he[ue++],de>1&&(fe[k++]=he[ue++]))}else{ue=k-se;do fe[k++]=fe[ue++],fe[k++]=fe[ue++],fe[k++]=fe[ue++],de-=3;while(de>2);de&&(fe[k++]=fe[ue++],de>1&&(fe[k++]=fe[ue++]))}}else if((re&64)===0){ye=Y[(ye&65535)+(z&(1<<re)-1)];continue n}else{N.msg="invalid distance code",me.mode=BAD$1;break e}break}}else if((re&64)===0){ye=ee[(ye&65535)+(z&(1<<re)-1)];continue t}else if(re&32){me.mode=TYPE$1;break e}else{N.msg="invalid literal/length code",me.mode=BAD$1;break e}break}}while(D<f&&k<c);de=Q>>3,D-=de,Q-=de<<3,z&=(1<<Q)-1,N.next_in=D,N.next_out=k,N.avail_in=D<f?5+(f-D):5-(D-f),N.avail_out=k<c?257+(c-k):257-(k-c),me.hold=z,me.bits=Q};const MAXBITS=15,ENOUGH_LENS$1=852,ENOUGH_DISTS$1=592,CODES$1=0,LENS$1=1,DISTS$1=2,lbase=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),lext=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),dbase=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),dext=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),inflate_table=(O,N,I,D,f,k,i,c)=>{const $=c.bits;let C=0,M=0,Z=0,J=0,z=0,Q=0,ee=0,Y=0,te=0,ie=0,ye,re,de,se,ue,he=null,we;const fe=new Uint16Array(MAXBITS+1),me=new Uint16Array(MAXBITS+1);let Re=null,Ue,Pe,De;for(C=0;C<=MAXBITS;C++)fe[C]=0;for(M=0;M<D;M++)fe[N[I+M]]++;for(z=$,J=MAXBITS;J>=1&&fe[J]===0;J--);if(z>J&&(z=J),J===0)return f[k++]=1<<24|64<<16|0,f[k++]=1<<24|64<<16|0,c.bits=1,0;for(Z=1;Z<J&&fe[Z]===0;Z++);for(z<Z&&(z=Z),Y=1,C=1;C<=MAXBITS;C++)if(Y<<=1,Y-=fe[C],Y<0)return-1;if(Y>0&&(O===CODES$1||J!==1))return-1;for(me[1]=0,C=1;C<MAXBITS;C++)me[C+1]=me[C]+fe[C];for(M=0;M<D;M++)N[I+M]!==0&&(i[me[N[I+M]]++]=M);if(O===CODES$1?(he=Re=i,we=20):O===LENS$1?(he=lbase,Re=lext,we=257):(he=dbase,Re=dext,we=0),ie=0,M=0,C=Z,ue=k,Q=z,ee=0,de=-1,te=1<<z,se=te-1,O===LENS$1&&te>ENOUGH_LENS$1||O===DISTS$1&&te>ENOUGH_DISTS$1)return 1;for(;;){Ue=C-ee,i[M]+1<we?(Pe=0,De=i[M]):i[M]>=we?(Pe=Re[i[M]-we],De=he[i[M]-we]):(Pe=96,De=0),ye=1<<C-ee,re=1<<Q,Z=re;do re-=ye,f[ue+(ie>>ee)+re]=Ue<<24|Pe<<16|De|0;while(re!==0);for(ye=1<<C-1;ie&ye;)ye>>=1;if(ye!==0?(ie&=ye-1,ie+=ye):ie=0,M++,--fe[C]===0){if(C===J)break;C=N[I+i[M]]}if(C>z&&(ie&se)!==de){for(ee===0&&(ee=z),ue+=Z,Q=C-ee,Y=1<<Q;Q+ee<J&&(Y-=fe[Q+ee],!(Y<=0));)Q++,Y<<=1;if(te+=1<<Q,O===LENS$1&&te>ENOUGH_LENS$1||O===DISTS$1&&te>ENOUGH_DISTS$1)return 1;de=ie&se,f[de]=z<<24|Q<<16|ue-k|0}}return ie!==0&&(f[ue+ie]=C-ee<<24|64<<16|0),c.bits=z,0};var inftrees=inflate_table;const CODES=0,LENS=1,DISTS=2,{Z_FINISH:Z_FINISH$1,Z_BLOCK,Z_TREES,Z_OK:Z_OK$1,Z_STREAM_END:Z_STREAM_END$1,Z_NEED_DICT:Z_NEED_DICT$1,Z_STREAM_ERROR:Z_STREAM_ERROR$1,Z_DATA_ERROR:Z_DATA_ERROR$1,Z_MEM_ERROR:Z_MEM_ERROR$1,Z_BUF_ERROR,Z_DEFLATED}=constants$2,HEAD=16180,FLAGS=16181,TIME=16182,OS=16183,EXLEN=16184,EXTRA=16185,NAME=16186,COMMENT=16187,HCRC=16188,DICTID=16189,DICT=16190,TYPE=16191,TYPEDO=16192,STORED=16193,COPY_=16194,COPY=16195,TABLE=16196,LENLENS=16197,CODELENS=16198,LEN_=16199,LEN=16200,LENEXT=16201,DIST=16202,DISTEXT=16203,MATCH=16204,LIT=16205,CHECK=16206,LENGTH=16207,DONE=16208,BAD=16209,MEM=16210,SYNC=16211,ENOUGH_LENS=852,ENOUGH_DISTS=592,MAX_WBITS=15,DEF_WBITS=MAX_WBITS,zswap32=O=>(O>>>24&255)+(O>>>8&65280)+((O&65280)<<8)+((O&255)<<24);function InflateState(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const inflateStateCheck=O=>{if(!O)return 1;const N=O.state;return!N||N.strm!==O||N.mode<HEAD||N.mode>SYNC?1:0},inflateResetKeep=O=>{if(inflateStateCheck(O))return Z_STREAM_ERROR$1;const N=O.state;return O.total_in=O.total_out=N.total=0,O.msg="",N.wrap&&(O.adler=N.wrap&1),N.mode=HEAD,N.last=0,N.havedict=0,N.flags=-1,N.dmax=32768,N.head=null,N.hold=0,N.bits=0,N.lencode=N.lendyn=new Int32Array(ENOUGH_LENS),N.distcode=N.distdyn=new Int32Array(ENOUGH_DISTS),N.sane=1,N.back=-1,Z_OK$1},inflateReset=O=>{if(inflateStateCheck(O))return Z_STREAM_ERROR$1;const N=O.state;return N.wsize=0,N.whave=0,N.wnext=0,inflateResetKeep(O)},inflateReset2=(O,N)=>{let I;if(inflateStateCheck(O))return Z_STREAM_ERROR$1;const D=O.state;return N<0?(I=0,N=-N):(I=(N>>4)+5,N<48&&(N&=15)),N&&(N<8||N>15)?Z_STREAM_ERROR$1:(D.window!==null&&D.wbits!==N&&(D.window=null),D.wrap=I,D.wbits=N,inflateReset(O))},inflateInit2=(O,N)=>{if(!O)return Z_STREAM_ERROR$1;const I=new InflateState;O.state=I,I.strm=O,I.window=null,I.mode=HEAD;const D=inflateReset2(O,N);return D!==Z_OK$1&&(O.state=null),D},inflateInit=O=>inflateInit2(O,DEF_WBITS);let virgin=!0,lenfix,distfix;const fixedtables=O=>{if(virgin){lenfix=new Int32Array(512),distfix=new Int32Array(32);let N=0;for(;N<144;)O.lens[N++]=8;for(;N<256;)O.lens[N++]=9;for(;N<280;)O.lens[N++]=7;for(;N<288;)O.lens[N++]=8;for(inftrees(LENS,O.lens,0,288,lenfix,0,O.work,{bits:9}),N=0;N<32;)O.lens[N++]=5;inftrees(DISTS,O.lens,0,32,distfix,0,O.work,{bits:5}),virgin=!1}O.lencode=lenfix,O.lenbits=9,O.distcode=distfix,O.distbits=5},updatewindow=(O,N,I,D)=>{let f;const k=O.state;return k.window===null&&(k.wsize=1<<k.wbits,k.wnext=0,k.whave=0,k.window=new Uint8Array(k.wsize)),D>=k.wsize?(k.window.set(N.subarray(I-k.wsize,I),0),k.wnext=0,k.whave=k.wsize):(f=k.wsize-k.wnext,f>D&&(f=D),k.window.set(N.subarray(I-D,I-D+f),k.wnext),D-=f,D?(k.window.set(N.subarray(I-D,I),0),k.wnext=D,k.whave=k.wsize):(k.wnext+=f,k.wnext===k.wsize&&(k.wnext=0),k.whave<k.wsize&&(k.whave+=f))),0},inflate$2=(O,N)=>{let I,D,f,k,i,c,$,C,M,Z,J,z,Q,ee,Y=0,te,ie,ye,re,de,se,ue,he;const we=new Uint8Array(4);let fe,me;const Re=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(inflateStateCheck(O)||!O.output||!O.input&&O.avail_in!==0)return Z_STREAM_ERROR$1;I=O.state,I.mode===TYPE&&(I.mode=TYPEDO),i=O.next_out,f=O.output,$=O.avail_out,k=O.next_in,D=O.input,c=O.avail_in,C=I.hold,M=I.bits,Z=c,J=$,he=Z_OK$1;e:for(;;)switch(I.mode){case HEAD:if(I.wrap===0){I.mode=TYPEDO;break}for(;M<16;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}if(I.wrap&2&&C===35615){I.wbits===0&&(I.wbits=15),I.check=0,we[0]=C&255,we[1]=C>>>8&255,I.check=crc32_1(I.check,we,2,0),C=0,M=0,I.mode=FLAGS;break}if(I.head&&(I.head.done=!1),!(I.wrap&1)||(((C&255)<<8)+(C>>8))%31){O.msg="incorrect header check",I.mode=BAD;break}if((C&15)!==Z_DEFLATED){O.msg="unknown compression method",I.mode=BAD;break}if(C>>>=4,M-=4,ue=(C&15)+8,I.wbits===0&&(I.wbits=ue),ue>15||ue>I.wbits){O.msg="invalid window size",I.mode=BAD;break}I.dmax=1<<I.wbits,I.flags=0,O.adler=I.check=1,I.mode=C&512?DICTID:TYPE,C=0,M=0;break;case FLAGS:for(;M<16;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}if(I.flags=C,(I.flags&255)!==Z_DEFLATED){O.msg="unknown compression method",I.mode=BAD;break}if(I.flags&57344){O.msg="unknown header flags set",I.mode=BAD;break}I.head&&(I.head.text=C>>8&1),I.flags&512&&I.wrap&4&&(we[0]=C&255,we[1]=C>>>8&255,I.check=crc32_1(I.check,we,2,0)),C=0,M=0,I.mode=TIME;case TIME:for(;M<32;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}I.head&&(I.head.time=C),I.flags&512&&I.wrap&4&&(we[0]=C&255,we[1]=C>>>8&255,we[2]=C>>>16&255,we[3]=C>>>24&255,I.check=crc32_1(I.check,we,4,0)),C=0,M=0,I.mode=OS;case OS:for(;M<16;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}I.head&&(I.head.xflags=C&255,I.head.os=C>>8),I.flags&512&&I.wrap&4&&(we[0]=C&255,we[1]=C>>>8&255,I.check=crc32_1(I.check,we,2,0)),C=0,M=0,I.mode=EXLEN;case EXLEN:if(I.flags&1024){for(;M<16;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}I.length=C,I.head&&(I.head.extra_len=C),I.flags&512&&I.wrap&4&&(we[0]=C&255,we[1]=C>>>8&255,I.check=crc32_1(I.check,we,2,0)),C=0,M=0}else I.head&&(I.head.extra=null);I.mode=EXTRA;case EXTRA:if(I.flags&1024&&(z=I.length,z>c&&(z=c),z&&(I.head&&(ue=I.head.extra_len-I.length,I.head.extra||(I.head.extra=new Uint8Array(I.head.extra_len)),I.head.extra.set(D.subarray(k,k+z),ue)),I.flags&512&&I.wrap&4&&(I.check=crc32_1(I.check,D,z,k)),c-=z,k+=z,I.length-=z),I.length))break e;I.length=0,I.mode=NAME;case NAME:if(I.flags&2048){if(c===0)break e;z=0;do ue=D[k+z++],I.head&&ue&&I.length<65536&&(I.head.name+=String.fromCharCode(ue));while(ue&&z<c);if(I.flags&512&&I.wrap&4&&(I.check=crc32_1(I.check,D,z,k)),c-=z,k+=z,ue)break e}else I.head&&(I.head.name=null);I.length=0,I.mode=COMMENT;case COMMENT:if(I.flags&4096){if(c===0)break e;z=0;do ue=D[k+z++],I.head&&ue&&I.length<65536&&(I.head.comment+=String.fromCharCode(ue));while(ue&&z<c);if(I.flags&512&&I.wrap&4&&(I.check=crc32_1(I.check,D,z,k)),c-=z,k+=z,ue)break e}else I.head&&(I.head.comment=null);I.mode=HCRC;case HCRC:if(I.flags&512){for(;M<16;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}if(I.wrap&4&&C!==(I.check&65535)){O.msg="header crc mismatch",I.mode=BAD;break}C=0,M=0}I.head&&(I.head.hcrc=I.flags>>9&1,I.head.done=!0),O.adler=I.check=0,I.mode=TYPE;break;case DICTID:for(;M<32;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}O.adler=I.check=zswap32(C),C=0,M=0,I.mode=DICT;case DICT:if(I.havedict===0)return O.next_out=i,O.avail_out=$,O.next_in=k,O.avail_in=c,I.hold=C,I.bits=M,Z_NEED_DICT$1;O.adler=I.check=1,I.mode=TYPE;case TYPE:if(N===Z_BLOCK||N===Z_TREES)break e;case TYPEDO:if(I.last){C>>>=M&7,M-=M&7,I.mode=CHECK;break}for(;M<3;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}switch(I.last=C&1,C>>>=1,M-=1,C&3){case 0:I.mode=STORED;break;case 1:if(fixedtables(I),I.mode=LEN_,N===Z_TREES){C>>>=2,M-=2;break e}break;case 2:I.mode=TABLE;break;case 3:O.msg="invalid block type",I.mode=BAD}C>>>=2,M-=2;break;case STORED:for(C>>>=M&7,M-=M&7;M<32;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}if((C&65535)!==(C>>>16^65535)){O.msg="invalid stored block lengths",I.mode=BAD;break}if(I.length=C&65535,C=0,M=0,I.mode=COPY_,N===Z_TREES)break e;case COPY_:I.mode=COPY;case COPY:if(z=I.length,z){if(z>c&&(z=c),z>$&&(z=$),z===0)break e;f.set(D.subarray(k,k+z),i),c-=z,k+=z,$-=z,i+=z,I.length-=z;break}I.mode=TYPE;break;case TABLE:for(;M<14;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}if(I.nlen=(C&31)+257,C>>>=5,M-=5,I.ndist=(C&31)+1,C>>>=5,M-=5,I.ncode=(C&15)+4,C>>>=4,M-=4,I.nlen>286||I.ndist>30){O.msg="too many length or distance symbols",I.mode=BAD;break}I.have=0,I.mode=LENLENS;case LENLENS:for(;I.have<I.ncode;){for(;M<3;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}I.lens[Re[I.have++]]=C&7,C>>>=3,M-=3}for(;I.have<19;)I.lens[Re[I.have++]]=0;if(I.lencode=I.lendyn,I.lenbits=7,fe={bits:I.lenbits},he=inftrees(CODES,I.lens,0,19,I.lencode,0,I.work,fe),I.lenbits=fe.bits,he){O.msg="invalid code lengths set",I.mode=BAD;break}I.have=0,I.mode=CODELENS;case CODELENS:for(;I.have<I.nlen+I.ndist;){for(;Y=I.lencode[C&(1<<I.lenbits)-1],te=Y>>>24,ie=Y>>>16&255,ye=Y&65535,!(te<=M);){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}if(ye<16)C>>>=te,M-=te,I.lens[I.have++]=ye;else{if(ye===16){for(me=te+2;M<me;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}if(C>>>=te,M-=te,I.have===0){O.msg="invalid bit length repeat",I.mode=BAD;break}ue=I.lens[I.have-1],z=3+(C&3),C>>>=2,M-=2}else if(ye===17){for(me=te+3;M<me;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}C>>>=te,M-=te,ue=0,z=3+(C&7),C>>>=3,M-=3}else{for(me=te+7;M<me;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}C>>>=te,M-=te,ue=0,z=11+(C&127),C>>>=7,M-=7}if(I.have+z>I.nlen+I.ndist){O.msg="invalid bit length repeat",I.mode=BAD;break}for(;z--;)I.lens[I.have++]=ue}}if(I.mode===BAD)break;if(I.lens[256]===0){O.msg="invalid code -- missing end-of-block",I.mode=BAD;break}if(I.lenbits=9,fe={bits:I.lenbits},he=inftrees(LENS,I.lens,0,I.nlen,I.lencode,0,I.work,fe),I.lenbits=fe.bits,he){O.msg="invalid literal/lengths set",I.mode=BAD;break}if(I.distbits=6,I.distcode=I.distdyn,fe={bits:I.distbits},he=inftrees(DISTS,I.lens,I.nlen,I.ndist,I.distcode,0,I.work,fe),I.distbits=fe.bits,he){O.msg="invalid distances set",I.mode=BAD;break}if(I.mode=LEN_,N===Z_TREES)break e;case LEN_:I.mode=LEN;case LEN:if(c>=6&&$>=258){O.next_out=i,O.avail_out=$,O.next_in=k,O.avail_in=c,I.hold=C,I.bits=M,inffast(O,J),i=O.next_out,f=O.output,$=O.avail_out,k=O.next_in,D=O.input,c=O.avail_in,C=I.hold,M=I.bits,I.mode===TYPE&&(I.back=-1);break}for(I.back=0;Y=I.lencode[C&(1<<I.lenbits)-1],te=Y>>>24,ie=Y>>>16&255,ye=Y&65535,!(te<=M);){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}if(ie&&(ie&240)===0){for(re=te,de=ie,se=ye;Y=I.lencode[se+((C&(1<<re+de)-1)>>re)],te=Y>>>24,ie=Y>>>16&255,ye=Y&65535,!(re+te<=M);){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}C>>>=re,M-=re,I.back+=re}if(C>>>=te,M-=te,I.back+=te,I.length=ye,ie===0){I.mode=LIT;break}if(ie&32){I.back=-1,I.mode=TYPE;break}if(ie&64){O.msg="invalid literal/length code",I.mode=BAD;break}I.extra=ie&15,I.mode=LENEXT;case LENEXT:if(I.extra){for(me=I.extra;M<me;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}I.length+=C&(1<<I.extra)-1,C>>>=I.extra,M-=I.extra,I.back+=I.extra}I.was=I.length,I.mode=DIST;case DIST:for(;Y=I.distcode[C&(1<<I.distbits)-1],te=Y>>>24,ie=Y>>>16&255,ye=Y&65535,!(te<=M);){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}if((ie&240)===0){for(re=te,de=ie,se=ye;Y=I.distcode[se+((C&(1<<re+de)-1)>>re)],te=Y>>>24,ie=Y>>>16&255,ye=Y&65535,!(re+te<=M);){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}C>>>=re,M-=re,I.back+=re}if(C>>>=te,M-=te,I.back+=te,ie&64){O.msg="invalid distance code",I.mode=BAD;break}I.offset=ye,I.extra=ie&15,I.mode=DISTEXT;case DISTEXT:if(I.extra){for(me=I.extra;M<me;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}I.offset+=C&(1<<I.extra)-1,C>>>=I.extra,M-=I.extra,I.back+=I.extra}if(I.offset>I.dmax){O.msg="invalid distance too far back",I.mode=BAD;break}I.mode=MATCH;case MATCH:if($===0)break e;if(z=J-$,I.offset>z){if(z=I.offset-z,z>I.whave&&I.sane){O.msg="invalid distance too far back",I.mode=BAD;break}z>I.wnext?(z-=I.wnext,Q=I.wsize-z):Q=I.wnext-z,z>I.length&&(z=I.length),ee=I.window}else ee=f,Q=i-I.offset,z=I.length;z>$&&(z=$),$-=z,I.length-=z;do f[i++]=ee[Q++];while(--z);I.length===0&&(I.mode=LEN);break;case LIT:if($===0)break e;f[i++]=I.length,$--,I.mode=LEN;break;case CHECK:if(I.wrap){for(;M<32;){if(c===0)break e;c--,C|=D[k++]<<M,M+=8}if(J-=$,O.total_out+=J,I.total+=J,I.wrap&4&&J&&(O.adler=I.check=I.flags?crc32_1(I.check,f,J,i-J):adler32_1(I.check,f,J,i-J)),J=$,I.wrap&4&&(I.flags?C:zswap32(C))!==I.check){O.msg="incorrect data check",I.mode=BAD;break}C=0,M=0}I.mode=LENGTH;case LENGTH:if(I.wrap&&I.flags){for(;M<32;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}if(I.wrap&4&&C!==(I.total&4294967295)){O.msg="incorrect length check",I.mode=BAD;break}C=0,M=0}I.mode=DONE;case DONE:he=Z_STREAM_END$1;break e;case BAD:he=Z_DATA_ERROR$1;break e;case MEM:return Z_MEM_ERROR$1;case SYNC:default:return Z_STREAM_ERROR$1}return O.next_out=i,O.avail_out=$,O.next_in=k,O.avail_in=c,I.hold=C,I.bits=M,(I.wsize||J!==O.avail_out&&I.mode<BAD&&(I.mode<CHECK||N!==Z_FINISH$1))&&updatewindow(O,O.output,O.next_out,J-O.avail_out),Z-=O.avail_in,J-=O.avail_out,O.total_in+=Z,O.total_out+=J,I.total+=J,I.wrap&4&&J&&(O.adler=I.check=I.flags?crc32_1(I.check,f,J,O.next_out-J):adler32_1(I.check,f,J,O.next_out-J)),O.data_type=I.bits+(I.last?64:0)+(I.mode===TYPE?128:0)+(I.mode===LEN_||I.mode===COPY_?256:0),(Z===0&&J===0||N===Z_FINISH$1)&&he===Z_OK$1&&(he=Z_BUF_ERROR),he},inflateEnd=O=>{if(inflateStateCheck(O))return Z_STREAM_ERROR$1;let N=O.state;return N.window&&(N.window=null),O.state=null,Z_OK$1},inflateGetHeader=(O,N)=>{if(inflateStateCheck(O))return Z_STREAM_ERROR$1;const I=O.state;return(I.wrap&2)===0?Z_STREAM_ERROR$1:(I.head=N,N.done=!1,Z_OK$1)},inflateSetDictionary=(O,N)=>{const I=N.length;let D,f,k;return inflateStateCheck(O)||(D=O.state,D.wrap!==0&&D.mode!==DICT)?Z_STREAM_ERROR$1:D.mode===DICT&&(f=1,f=adler32_1(f,N,I,0),f!==D.check)?Z_DATA_ERROR$1:(k=updatewindow(O,N,I,I),k?(D.mode=MEM,Z_MEM_ERROR$1):(D.havedict=1,Z_OK$1))};var inflateReset_1=inflateReset,inflateReset2_1=inflateReset2,inflateResetKeep_1=inflateResetKeep,inflateInit_1=inflateInit,inflateInit2_1=inflateInit2,inflate_2$1=inflate$2,inflateEnd_1=inflateEnd,inflateGetHeader_1=inflateGetHeader,inflateSetDictionary_1=inflateSetDictionary,inflateInfo="pako inflate (from Nodeca project)",inflate_1$2={inflateReset:inflateReset_1,inflateReset2:inflateReset2_1,inflateResetKeep:inflateResetKeep_1,inflateInit:inflateInit_1,inflateInit2:inflateInit2_1,inflate:inflate_2$1,inflateEnd:inflateEnd_1,inflateGetHeader:inflateGetHeader_1,inflateSetDictionary:inflateSetDictionary_1,inflateInfo};function GZheader(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var gzheader=GZheader;const toString=Object.prototype.toString,{Z_NO_FLUSH,Z_FINISH,Z_OK,Z_STREAM_END,Z_NEED_DICT,Z_STREAM_ERROR,Z_DATA_ERROR,Z_MEM_ERROR}=constants$2;function Inflate$1(O){this.options=common.assign({chunkSize:1024*64,windowBits:15,to:""},O||{});const N=this.options;N.raw&&N.windowBits>=0&&N.windowBits<16&&(N.windowBits=-N.windowBits,N.windowBits===0&&(N.windowBits=-15)),N.windowBits>=0&&N.windowBits<16&&!(O&&O.windowBits)&&(N.windowBits+=32),N.windowBits>15&&N.windowBits<48&&(N.windowBits&15)===0&&(N.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zstream,this.strm.avail_out=0;let I=inflate_1$2.inflateInit2(this.strm,N.windowBits);if(I!==Z_OK)throw new Error(messages[I]);if(this.header=new gzheader,inflate_1$2.inflateGetHeader(this.strm,this.header),N.dictionary&&(typeof N.dictionary=="string"?N.dictionary=strings.string2buf(N.dictionary):toString.call(N.dictionary)==="[object ArrayBuffer]"&&(N.dictionary=new Uint8Array(N.dictionary)),N.raw&&(I=inflate_1$2.inflateSetDictionary(this.strm,N.dictionary),I!==Z_OK)))throw new Error(messages[I])}Inflate$1.prototype.push=function(O,N){const I=this.strm,D=this.options.chunkSize,f=this.options.dictionary;let k,i,c;if(this.ended)return!1;for(N===~~N?i=N:i=N===!0?Z_FINISH:Z_NO_FLUSH,toString.call(O)==="[object ArrayBuffer]"?I.input=new Uint8Array(O):I.input=O,I.next_in=0,I.avail_in=I.input.length;;){for(I.avail_out===0&&(I.output=new Uint8Array(D),I.next_out=0,I.avail_out=D),k=inflate_1$2.inflate(I,i),k===Z_NEED_DICT&&f&&(k=inflate_1$2.inflateSetDictionary(I,f),k===Z_OK?k=inflate_1$2.inflate(I,i):k===Z_DATA_ERROR&&(k=Z_NEED_DICT));I.avail_in>0&&k===Z_STREAM_END&&I.state.wrap>0&&O[I.next_in]!==0;)inflate_1$2.inflateReset(I),k=inflate_1$2.inflate(I,i);switch(k){case Z_STREAM_ERROR:case Z_DATA_ERROR:case Z_NEED_DICT:case Z_MEM_ERROR:return this.onEnd(k),this.ended=!0,!1}if(c=I.avail_out,I.next_out&&(I.avail_out===0||k===Z_STREAM_END))if(this.options.to==="string"){let $=strings.utf8border(I.output,I.next_out),C=I.next_out-$,M=strings.buf2string(I.output,$);I.next_out=C,I.avail_out=D-C,C&&I.output.set(I.output.subarray($,$+C),0),this.onData(M)}else this.onData(I.output.length===I.next_out?I.output:I.output.subarray(0,I.next_out));if(!(k===Z_OK&&c===0)){if(k===Z_STREAM_END)return k=inflate_1$2.inflateEnd(this.strm),this.onEnd(k),this.ended=!0,!0;if(I.avail_in===0)break}}return!0},Inflate$1.prototype.onData=function(O){this.chunks.push(O)},Inflate$1.prototype.onEnd=function(O){O===Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=common.flattenChunks(this.chunks)),this.chunks=[],this.err=O,this.msg=this.strm.msg};function inflate$1(O,N){const I=new Inflate$1(N);if(I.push(O),I.err)throw I.msg||messages[I.err];return I.result}function inflateRaw$1(O,N){return N=N||{},N.raw=!0,inflate$1(O,N)}var Inflate_1$1=Inflate$1,inflate_2=inflate$1,inflateRaw_1$1=inflateRaw$1,ungzip$1=inflate$1,inflate_1$1={Inflate:Inflate_1$1,inflate:inflate_2,inflateRaw:inflateRaw_1$1,ungzip:ungzip$1};const{Deflate,deflate,deflateRaw,gzip}=deflate_1$1,{Inflate,inflate,inflateRaw,ungzip}=inflate_1$1;var Deflate_1=Deflate,deflate_1=deflate,deflateRaw_1=deflateRaw,gzip_1=gzip,Inflate_1=Inflate,inflate_1=inflate,inflateRaw_1=inflateRaw,ungzip_1=ungzip,constants_1=constants$2,pako={Deflate:Deflate_1,deflate:deflate_1,deflateRaw:deflateRaw_1,gzip:gzip_1,Inflate:Inflate_1,inflate:inflate_1,inflateRaw:inflateRaw_1,ungzip:ungzip_1,constants:constants_1};const ignoreEvent=["updateSeverTime"];ignoreEvent.push("heartbeat"),ignoreEvent.push("heartbeatEx"),ignoreEvent.push("networkQualityChange"),ignoreEvent.push("onNetQuality"),ignoreEvent.push("updateCall"),ignoreEvent.push("pubNotify");const compressArrayBuffer=O=>{const N=new Uint8Array(O),I=pako.deflate(N,{gzip:!0});return new Uint8Array(I==null?void 0:I.buffer)},decompressArrayBuffer=O=>{const N=new Uint8Array(O),I=pako.inflate(N,{gzip:!0});return new Uint8Array(I==null?void 0:I.buffer)},sendMessageFormat=O=>{const{event:N}=O;switch(O.data_original=O.data,O.time&&(O.timeStr=E(O.time,"YYYY-MM-DD hh:mm:ss",{offset:480})),N){case"login":O.data=com.quick.voice.proto.Login.encode(O.data).finish();break;case"joinRoom":case"joinRoomEx":O.data=com.quick.voice.proto.JoinReq.encode(O.data).finish();break;case"quitRoom":O.data=com.quick.voice.proto.QuitReq.encode(O.data).finish();break;case"connectCF":O.data=com.quick.voice.proto.ConnectCFReq.encode(O.data).finish(),O.data=compressArrayBuffer(O.data),O.compress=!0;break;case"publish":O.data=com.quick.voice.proto.PublishReq.encode(O.data).finish(),O.data=compressArrayBuffer(O.data),O.compress=!0;break;case"pubChannel":O.data=com.quick.voice.proto.ChannelPublishReq.encode(O.data).finish();break;case"subscribe":O.data=com.quick.voice.proto.SubscribeReq.encode(O.data).finish();break;case"subChannel":O.data=com.quick.voice.proto.ChannelSubscribeRsq.encode(O.data).finish();break;case"closeTrack":O.data=com.quick.voice.proto.CloseTrackReq.encode(O.data).finish(),O.data=compressArrayBuffer(O.data),O.compress=!0;break;case"renegotiate":O.data=com.quick.voice.proto.RenegotiateReq.encode(O.data).finish(),O.data=compressArrayBuffer(O.data),O.compress=!0;break;case"syncRoomInfo":O.data=com.quick.voice.proto.SyncRoomInfoReq.encode(O.data).finish();break;case"updateCall":O.data=com.quick.voice.proto.UpdateCall.encode(O.data).finish();break;case"networkQualityChange":O.data=com.quick.voice.proto.NetQualityChange.encode(O.data).finish();break;case"pubNotify":O.data=com.quick.voice.proto.PublishNotify.encode(O.data).finish();break;case"onDataChannelPublish":break;case"preventUsersBehavior":O.data=com.quick.voice.proto.PreventUsersBehaviorReq.encode(O.data).finish();break;default:O.data=new Uint8Array;break}return O},onMessageFormat=O=>{const{event:N,compress:I=!1}=O;if(O.data_remote=O.data,O.time&&(O.timeStr=E(O.time,"YYYY-MM-DD hh:mm:ss",{offset:480})),I)try{O.data=decompressArrayBuffer(O.data)}catch(D){console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo:消息解压错误",D)}switch(N){case"login":O.data=com.quick.voice.proto.Login.decode(O.data);break;case"joinRoom":case"joinRoomEx":O.data=com.quick.voice.proto.JoinRsp.decode(O.data);break;case"onJoinRoom":O.data=com.quick.voice.proto.JoinNotify.decode(O.data);break;case"onQuitRoom":O.data=com.quick.voice.proto.QuitNotify.decode(O.data);break;case"connectCF":O.data=com.quick.voice.proto.ConnectCFRsp.decode(O.data);break;case"publish":O.data=com.quick.voice.proto.PublishRsp.decode(O.data);break;case"pubChannel":O.data=com.quick.voice.proto.ChannelPublishRsq.decode(O.data);break;case"onPublish":O.data=com.quick.voice.proto.PublishNotify.decode(O.data);break;case"subscribe":O.data=com.quick.voice.proto.SubscribeRsp.decode(O.data);break;case"subChannel":O.data=com.quick.voice.proto.ChannelSubscribeRsq.decode(O.data);break;case"closeTrack":O.data=com.quick.voice.proto.CloseTrackRsp.decode(O.data);break;case"onCloseTrack":O.data=com.quick.voice.proto.CloseTrackNotify.decode(O.data);break;case"onUpdateCall":O.data=com.quick.voice.proto.UpdateCall.decode(O.data);break;case"onDataChannelPublish":O.data=com.quick.voice.proto.UserChannel.decode(O.data);break;case"onDestroyRoom":O.data=com.quick.voice.proto.QuitNotify.decode(O.data);break;case"onUpdatePermissions":O.data=com.quick.voice.proto.UpdatePermissions.decode(O.data);break;case"onNetQuality":O.data=com.quick.voice.proto.NetQualityNotify.decode(O.data);break;case"syncRoomInfo":O.data=com.quick.voice.proto.SyncRoomInfoRsp.decode(O.data);break;case"onCDNPlayUrlAdd":O.data=com.quick.voice.proto.CDNPlayAddressNotify.decode(O.data);break;case"onUpdateBehavior":O.data=com.quick.voice.proto.PreventUsersBehaviorNotify.decode(O.data);break;case"debugger":O.data=JSON.parse(new TextDecoder().decode(O.data));break}return O};class CallsWebSocket{constructor(N){Ge(this,st);Ge(this,it,{url:"wss://demo.putplay.cc/websocket",debug:!1,reconnectCount:10,timeout:30*1e3});Ge(this,Rt,"");Ge(this,Pt,{});Ge(this,Jt,{});_e(this,"state","closed");_e(this,"sendMessageBefore",async()=>{});_e(this,"onReconnectSuccess",N=>{});_e(this,"onReconnectStop",N=>{});Ge(this,Rn,N=>{let I=!0;const{code:D=1e3}=N;return(D===1e3||D===4e3)&&(I=!1),this.state="connecting",I});Ge(this,$n,async N=>{Oe(this,it).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: 重连成功",N),this.state="connected",this.onReconnectSuccess(N)});Ge(this,An,async N=>{Oe(this,it).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: 重连停止",N),this.onReconnectStop(N)});Ge(this,wn,(N,I={})=>{try{const{time:D,event:f,data:k={},data_original:i={},data_remote:c,...$}=I,C=E(D,"YYYY-MM-DD hh:mm:ss",{offset:480});let M={};const Z=(ye={})=>{const re=JSON.parse(JSON.stringify(ye)),de=Object.keys(re);for(const se of de)(se.includes("sdp")||se.includes("Sdp"))&&(re[se]="");return re};let J="res ↓";switch(N){case"res":J="res ↓",M=Z(k);break;case"req":J="req ↑",M=Z(i);break}let z="#quickvo.logs";ignoreEvent.includes(f)&&(z="#quickvo.ignoreEvents");const Q={"#action":J,timeStr:C,event:f,data:M,time:D,...$},ee=localStorage.getItem(z)||JSON.stringify([]),Y=JSON.parse(ee);let te=f==="heartbeat"||f==="heartbeatEx";const ie=[Q];for(const ye of Y){const{event:re}=ye;if(re==="heartbeat"||re==="heartbeatEx"){if(te)continue;te=!0}if(ie.length===200)break;ie.push(ye)}localStorage.setItem(z,JSON.stringify(ie))}catch(D){Oe(this,it).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: updataLogs is error",D)}});Ge(this,Cn,(N,{resolve:I,reject:D})=>{const{sn:f=""}=N,k=()=>{const c=Oe(this,Pt)[f];clearTimeout(c.destructionTimer),delete Oe(this,Pt)[f]},i=window.setTimeout(()=>{const c=Oe(this,Pt)[f];console.warn("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo:event is timeout",c.message),k(),D("event is timeout")},Oe(this,it).timeout);Oe(this,Pt)[f]={message:N,resolve:I,reject:D,destruction:k,destructionTimer:i}});Ge(this,Dn,N=>Oe(this,Pt)[N]);Ge(this,Bn,async N=>{const I=new Uint8Array(N),D=com.quick.voice.proto.CommonRsp.decode(I),{sn:f,event:k}=D,i=onMessageFormat(D);if(Oe(this,it).debug&&!ignoreEvent.includes(k)&&(Oe(this,wn).call(this,"res",i),console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ff0097;padding:16px 0;","------->quickvo: 响应消息↓",i)),notifyName_keys.includes(k))return this.emitNotify(k,P$1(i,["code","data","desc"]));const $=Oe(this,Dn).call(this,f);if($){const{resolve:C=Z=>{},destruction:M=()=>{}}=$;C(P$1(i,["code","data","desc"])),M()}});_e(this,"clearEvents",(N=[])=>{const I=Object.keys(Oe(this,Pt));N.length===0&&(N=I);for(const D of I){if(!N.includes(D))continue;const f=Oe(this,Pt)[D];if(f){const{destruction:k}=f;k()}}});_e(this,"connect",async(N="")=>new Promise(async I=>{N&&kt(this,Rt,N),Oe(this,st)&&(await Oe(this,st).close(),this.state="closed");const D=`${Oe(this,it).url}?s=${Oe(this,Rt)}&t=${Date.now()}`,f=new Date().getTime();if(kt(this,st,new S({...Oe(this,it),debug:!0,url:D,binaryType:"arraybuffer",onMessage:Oe(this,Bn),checkReconnect:Oe(this,Rn),getHeartbeatMsg:()=>"",onReconnectSuccess:Oe(this,$n),onReconnectStop:Oe(this,An)})),this.state="connecting",await Oe(this,st).connect(),this.state="connected",Oe(this,it).debug){const i=new Date().getTime()-f;console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;",`------->quickvo: 连接耗时-${i}ms-广播事件`,Oe(this,Jt))}I(Oe(this,st))}));_e(this,"close",async()=>{var I;Oe(this,it).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: cws is close.");const N=Object.keys(Oe(this,Pt));for(const D of N){const{destructionTimer:f}=Oe(this,Pt)[D];clearTimeout(f)}kt(this,Pt,{}),await((I=Oe(this,st))==null?void 0:I.close()),this.state="closed"});_e(this,"sendMessage",(N,I=!0)=>new Promise(async(D,f)=>{var M;await this.sendMessageBefore();const{event:k,...i}=N,c=Date.now(),$=sendMessageFormat({event:k,sn:+`${c}${v$1(1e3,9999)}`,time:c,valid:Oe(this,it).timeout,version:1,compress:!1,...i});Oe(this,it).debug&&!ignoreEvent.includes(k)&&(Oe(this,wn).call(this,"req",$),console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ff9700;padding:16px 0;","------->quickvo: 发送消息↑",$)),I&&Oe(this,Cn).call(this,$,{resolve:D,reject:f});const C=com.quick.voice.proto.CommonReq.encode($).finish();(M=Oe(this,st))==null||M.sendMessage(C)}));_e(this,"emitNotify",async(N,I)=>{const D=Oe(this,Jt)[N]||[];for(const f of D){const{callback:k=async()=>{}}=f;await k(I)}});_e(this,"addNotify",(N,I=!1)=>{const{event:D,sn:f=xt(32)}=N;Oe(this,Jt)[D]||(Oe(this,Jt)[D]=[]);const k=Oe(this,Jt)[D],i=k.findIndex(c=>c.sn===f);return i!==-1&&k.splice(i,1),I?k.unshift(N):k.push(N),f});_e(this,"removeNotify",(N=[])=>{if(N.length===0)kt(this,Jt,{});else{const I=Object.keys(Oe(this,Jt));for(const D of I)Oe(this,Jt)[D]=Oe(this,Jt)[D].filter(f=>!N.includes(f.sn||""))}Oe(this,it).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: 移除广播事件",Oe(this,Jt))});kt(this,it,{...Oe(this,it),...N})}}st=new WeakMap,it=new WeakMap,Rt=new WeakMap,Pt=new WeakMap,Jt=new WeakMap,Rn=new WeakMap,$n=new WeakMap,An=new WeakMap,wn=new WeakMap,Cn=new WeakMap,Dn=new WeakMap,Bn=new WeakMap;/*! For license information please see pikazLocationModule.js.LICENSE.txt */var e$2={782:function(O){O.exports=(()=>{var N={483:(f,k,i)=>{f.exports=function c($,C,M){function Z(Q,ee){if(!C[Q]){if(!$[Q]){if(J)return J(Q,!0);var Y=new Error("Cannot find module '"+Q+"'");throw Y.code="MODULE_NOT_FOUND",Y}var te=C[Q]={exports:{}};$[Q][0].call(te.exports,function(ie){return Z($[Q][1][ie]||ie)},te,te.exports,c,$,C,M)}return C[Q].exports}for(var J=void 0,z=0;z<M.length;z++)Z(M[z]);return Z}({1:[function(c,$,C){(function(M){var Z,J,z=M.MutationObserver||M.WebKitMutationObserver;if(z){var Q=0,ee=new z(ye),Y=M.document.createTextNode("");ee.observe(Y,{characterData:!0}),Z=function(){Y.data=Q=++Q%2}}else if(M.setImmediate||M.MessageChannel===void 0)Z="document"in M&&"onreadystatechange"in M.document.createElement("script")?function(){var re=M.document.createElement("script");re.onreadystatechange=function(){ye(),re.onreadystatechange=null,re.parentNode.removeChild(re),re=null},M.document.documentElement.appendChild(re)}:function(){setTimeout(ye,0)};else{var te=new M.MessageChannel;te.port1.onmessage=ye,Z=function(){te.port2.postMessage(0)}}var ie=[];function ye(){var re,de;J=!0;for(var se=ie.length;se;){for(de=ie,ie=[],re=-1;++re<se;)de[re]();se=ie.length}J=!1}$.exports=function(re){ie.push(re)!==1||J||Z()}}).call(this,i.g!==void 0?i.g:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(c,$,C){var M=c(1);function Z(){}var J={},z=["REJECTED"],Q=["FULFILLED"],ee=["PENDING"];function Y(se){if(typeof se!="function")throw new TypeError("resolver must be a function");this.state=ee,this.queue=[],this.outcome=void 0,se!==Z&&re(this,se)}function te(se,ue,he){this.promise=se,typeof ue=="function"&&(this.onFulfilled=ue,this.callFulfilled=this.otherCallFulfilled),typeof he=="function"&&(this.onRejected=he,this.callRejected=this.otherCallRejected)}function ie(se,ue,he){M(function(){var we;try{we=ue(he)}catch(fe){return J.reject(se,fe)}we===se?J.reject(se,new TypeError("Cannot resolve promise with itself")):J.resolve(se,we)})}function ye(se){var ue=se&&se.then;if(se&&(typeof se=="object"||typeof se=="function")&&typeof ue=="function")return function(){ue.apply(se,arguments)}}function re(se,ue){var he=!1;function we(Re){he||(he=!0,J.reject(se,Re))}function fe(Re){he||(he=!0,J.resolve(se,Re))}var me=de(function(){ue(fe,we)});me.status==="error"&&we(me.value)}function de(se,ue){var he={};try{he.value=se(ue),he.status="success"}catch(we){he.status="error",he.value=we}return he}$.exports=Y,Y.prototype.catch=function(se){return this.then(null,se)},Y.prototype.then=function(se,ue){if(typeof se!="function"&&this.state===Q||typeof ue!="function"&&this.state===z)return this;var he=new this.constructor(Z);return this.state!==ee?ie(he,this.state===Q?se:ue,this.outcome):this.queue.push(new te(he,se,ue)),he},te.prototype.callFulfilled=function(se){J.resolve(this.promise,se)},te.prototype.otherCallFulfilled=function(se){ie(this.promise,this.onFulfilled,se)},te.prototype.callRejected=function(se){J.reject(this.promise,se)},te.prototype.otherCallRejected=function(se){ie(this.promise,this.onRejected,se)},J.resolve=function(se,ue){var he=de(ye,ue);if(he.status==="error")return J.reject(se,he.value);var we=he.value;if(we)re(se,we);else{se.state=Q,se.outcome=ue;for(var fe=-1,me=se.queue.length;++fe<me;)se.queue[fe].callFulfilled(ue)}return se},J.reject=function(se,ue){se.state=z,se.outcome=ue;for(var he=-1,we=se.queue.length;++he<we;)se.queue[he].callRejected(ue);return se},Y.resolve=function(se){return se instanceof this?se:J.resolve(new this(Z),se)},Y.reject=function(se){var ue=new this(Z);return J.reject(ue,se)},Y.all=function(se){var ue=this;if(Object.prototype.toString.call(se)!=="[object Array]")return this.reject(new TypeError("must be an array"));var he=se.length,we=!1;if(!he)return this.resolve([]);for(var fe=new Array(he),me=0,Re=-1,Ue=new this(Z);++Re<he;)Pe(se[Re],Re);return Ue;function Pe(De,vt){ue.resolve(De).then(function(_t){fe[vt]=_t,++me!==he||we||(we=!0,J.resolve(Ue,fe))},function(_t){we||(we=!0,J.reject(Ue,_t))})}},Y.race=function(se){if(Object.prototype.toString.call(se)!=="[object Array]")return this.reject(new TypeError("must be an array"));var ue,he=se.length,we=!1;if(!he)return this.resolve([]);for(var fe=-1,me=new this(Z);++fe<he;)ue=se[fe],this.resolve(ue).then(function(Re){we||(we=!0,J.resolve(me,Re))},function(Re){we||(we=!0,J.reject(me,Re))});return me}},{1:1}],3:[function(c,$,C){(function(M){typeof M.Promise!="function"&&(M.Promise=c(2))}).call(this,i.g!==void 0?i.g:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(c,$,C){var M=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ne){return typeof ne}:function(ne){return ne&&typeof Symbol=="function"&&ne.constructor===Symbol&&ne!==Symbol.prototype?"symbol":typeof ne},Z=function(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}();function J(ne,ce){ne=ne||[],ce=ce||{};try{return new Blob(ne,ce)}catch(ge){if(ge.name!=="TypeError")throw ge;for(var le=new(typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder),ke=0;ke<ne.length;ke+=1)le.append(ne[ke]);return le.getBlob(ce.type)}}typeof Promise>"u"&&c(3);var z=Promise;function Q(ne,ce){ce&&ne.then(function(le){ce(null,le)},function(le){ce(le)})}function ee(ne,ce,le){typeof ce=="function"&&ne.then(ce),typeof le=="function"&&ne.catch(le)}function Y(ne){return typeof ne!="string"&&(console.warn(ne+" used as a key, but it is not a string."),ne=String(ne)),ne}function te(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var ie="local-forage-detect-blob-support",ye=void 0,re={},de=Object.prototype.toString,se="readonly",ue="readwrite";function he(ne){for(var ce=ne.length,le=new ArrayBuffer(ce),ke=new Uint8Array(le),ge=0;ge<ce;ge++)ke[ge]=ne.charCodeAt(ge);return le}function we(ne){return typeof ye=="boolean"?z.resolve(ye):function(ce){return new z(function(le){var ke=ce.transaction(ie,ue),ge=J([""]);ke.objectStore(ie).put(ge,"key"),ke.onabort=function(Se){Se.preventDefault(),Se.stopPropagation(),le(!1)},ke.oncomplete=function(){var Se=navigator.userAgent.match(/Chrome\/(\d+)/),$e=navigator.userAgent.match(/Edge\//);le($e||!Se||parseInt(Se[1],10)>=43)}}).catch(function(){return!1})}(ne).then(function(ce){return ye=ce})}function fe(ne){var ce=re[ne.name],le={};le.promise=new z(function(ke,ge){le.resolve=ke,le.reject=ge}),ce.deferredOperations.push(le),ce.dbReady?ce.dbReady=ce.dbReady.then(function(){return le.promise}):ce.dbReady=le.promise}function me(ne){var ce=re[ne.name].deferredOperations.pop();if(ce)return ce.resolve(),ce.promise}function Re(ne,ce){var le=re[ne.name].deferredOperations.pop();if(le)return le.reject(ce),le.promise}function Ue(ne,ce){return new z(function(le,ke){if(re[ne.name]=re[ne.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},ne.db){if(!ce)return le(ne.db);fe(ne),ne.db.close()}var ge=[ne.name];ce&&ge.push(ne.version);var Se=Z.open.apply(Z,ge);ce&&(Se.onupgradeneeded=function($e){var Ne=Se.result;try{Ne.createObjectStore(ne.storeName),$e.oldVersion<=1&&Ne.createObjectStore(ie)}catch(qe){if(qe.name!=="ConstraintError")throw qe;console.warn('The database "'+ne.name+'" has been upgraded from version '+$e.oldVersion+" to version "+$e.newVersion+', but the storage "'+ne.storeName+'" already exists.')}}),Se.onerror=function($e){$e.preventDefault(),ke(Se.error)},Se.onsuccess=function(){var $e=Se.result;$e.onversionchange=function(Ne){Ne.target.close()},le($e),me(ne)}})}function Pe(ne){return Ue(ne,!1)}function De(ne){return Ue(ne,!0)}function vt(ne,ce){if(!ne.db)return!0;var le=!ne.db.objectStoreNames.contains(ne.storeName),ke=ne.version<ne.db.version,ge=ne.version>ne.db.version;if(ke&&(ne.version!==ce&&console.warn('The database "'+ne.name+`" can't be downgraded from version `+ne.db.version+" to version "+ne.version+"."),ne.version=ne.db.version),ge||le){if(le){var Se=ne.db.version+1;Se>ne.version&&(ne.version=Se)}return!0}return!1}function _t(ne){return J([he(atob(ne.data))],{type:ne.type})}function St(ne){return ne&&ne.__local_forage_encoded_blob}function Mt(ne){var ce=this,le=ce._initReady().then(function(){var ke=re[ce._dbInfo.name];if(ke&&ke.dbReady)return ke.dbReady});return ee(le,ne,ne),le}function At(ne,ce,le,ke){ke===void 0&&(ke=1);try{var ge=ne.db.transaction(ne.storeName,ce);le(null,ge)}catch(Se){if(ke>0&&(!ne.db||Se.name==="InvalidStateError"||Se.name==="NotFoundError"))return z.resolve().then(function(){if(!ne.db||Se.name==="NotFoundError"&&!ne.db.objectStoreNames.contains(ne.storeName)&&ne.version<=ne.db.version)return ne.db&&(ne.version=ne.db.version+1),De(ne)}).then(function(){return function($e){fe($e);for(var Ne=re[$e.name],qe=Ne.forages,Be=0;Be<qe.length;Be++){var Le=qe[Be];Le._dbInfo.db&&(Le._dbInfo.db.close(),Le._dbInfo.db=null)}return $e.db=null,Pe($e).then(function(je){return $e.db=je,vt($e)?De($e):je}).then(function(je){$e.db=Ne.db=je;for(var Ze=0;Ze<qe.length;Ze++)qe[Ze]._dbInfo.db=je}).catch(function(je){throw Re($e,je),je})}(ne).then(function(){At(ne,ce,le,ke-1)})}).catch(le);le(Se)}}var ct={_driver:"asyncStorage",_initStorage:function(ne){var ce=this,le={db:null};if(ne)for(var ke in ne)le[ke]=ne[ke];var ge=re[le.name];ge||(ge={forages:[],db:null,dbReady:null,deferredOperations:[]},re[le.name]=ge),ge.forages.push(ce),ce._initReady||(ce._initReady=ce.ready,ce.ready=Mt);var Se=[];function $e(){return z.resolve()}for(var Ne=0;Ne<ge.forages.length;Ne++){var qe=ge.forages[Ne];qe!==ce&&Se.push(qe._initReady().catch($e))}var Be=ge.forages.slice(0);return z.all(Se).then(function(){return le.db=ge.db,Pe(le)}).then(function(Le){return le.db=Le,vt(le,ce._defaultConfig.version)?De(le):Le}).then(function(Le){le.db=ge.db=Le,ce._dbInfo=le;for(var je=0;je<Be.length;je++){var Ze=Be[je];Ze!==ce&&(Ze._dbInfo.db=le.db,Ze._dbInfo.version=le.version)}})},_support:function(){try{if(!Z||!Z.open)return!1;var ne=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),ce=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!ne||ce)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}(),iterate:function(ne,ce){var le=this,ke=new z(function(ge,Se){le.ready().then(function(){At(le._dbInfo,se,function($e,Ne){if($e)return Se($e);try{var qe=Ne.objectStore(le._dbInfo.storeName).openCursor(),Be=1;qe.onsuccess=function(){var Le=qe.result;if(Le){var je=Le.value;St(je)&&(je=_t(je));var Ze=ne(je,Le.key,Be++);Ze!==void 0?ge(Ze):Le.continue()}else ge()},qe.onerror=function(){Se(qe.error)}}catch(Le){Se(Le)}})}).catch(Se)});return Q(ke,ce),ke},getItem:function(ne,ce){var le=this;ne=Y(ne);var ke=new z(function(ge,Se){le.ready().then(function(){At(le._dbInfo,se,function($e,Ne){if($e)return Se($e);try{var qe=Ne.objectStore(le._dbInfo.storeName).get(ne);qe.onsuccess=function(){var Be=qe.result;Be===void 0&&(Be=null),St(Be)&&(Be=_t(Be)),ge(Be)},qe.onerror=function(){Se(qe.error)}}catch(Be){Se(Be)}})}).catch(Se)});return Q(ke,ce),ke},setItem:function(ne,ce,le){var ke=this;ne=Y(ne);var ge=new z(function(Se,$e){var Ne;ke.ready().then(function(){return Ne=ke._dbInfo,de.call(ce)==="[object Blob]"?we(Ne.db).then(function(qe){return qe?ce:(Be=ce,new z(function(Le,je){var Ze=new FileReader;Ze.onerror=je,Ze.onloadend=function(nt){var at=btoa(nt.target.result||"");Le({__local_forage_encoded_blob:!0,data:at,type:Be.type})},Ze.readAsBinaryString(Be)}));var Be}):ce}).then(function(qe){At(ke._dbInfo,ue,function(Be,Le){if(Be)return $e(Be);try{var je=Le.objectStore(ke._dbInfo.storeName);qe===null&&(qe=void 0);var Ze=je.put(qe,ne);Le.oncomplete=function(){qe===void 0&&(qe=null),Se(qe)},Le.onabort=Le.onerror=function(){var nt=Ze.error?Ze.error:Ze.transaction.error;$e(nt)}}catch(nt){$e(nt)}})}).catch($e)});return Q(ge,le),ge},removeItem:function(ne,ce){var le=this;ne=Y(ne);var ke=new z(function(ge,Se){le.ready().then(function(){At(le._dbInfo,ue,function($e,Ne){if($e)return Se($e);try{var qe=Ne.objectStore(le._dbInfo.storeName).delete(ne);Ne.oncomplete=function(){ge()},Ne.onerror=function(){Se(qe.error)},Ne.onabort=function(){var Be=qe.error?qe.error:qe.transaction.error;Se(Be)}}catch(Be){Se(Be)}})}).catch(Se)});return Q(ke,ce),ke},clear:function(ne){var ce=this,le=new z(function(ke,ge){ce.ready().then(function(){At(ce._dbInfo,ue,function(Se,$e){if(Se)return ge(Se);try{var Ne=$e.objectStore(ce._dbInfo.storeName).clear();$e.oncomplete=function(){ke()},$e.onabort=$e.onerror=function(){var qe=Ne.error?Ne.error:Ne.transaction.error;ge(qe)}}catch(qe){ge(qe)}})}).catch(ge)});return Q(le,ne),le},length:function(ne){var ce=this,le=new z(function(ke,ge){ce.ready().then(function(){At(ce._dbInfo,se,function(Se,$e){if(Se)return ge(Se);try{var Ne=$e.objectStore(ce._dbInfo.storeName).count();Ne.onsuccess=function(){ke(Ne.result)},Ne.onerror=function(){ge(Ne.error)}}catch(qe){ge(qe)}})}).catch(ge)});return Q(le,ne),le},key:function(ne,ce){var le=this,ke=new z(function(ge,Se){ne<0?ge(null):le.ready().then(function(){At(le._dbInfo,se,function($e,Ne){if($e)return Se($e);try{var qe=Ne.objectStore(le._dbInfo.storeName),Be=!1,Le=qe.openKeyCursor();Le.onsuccess=function(){var je=Le.result;je?ne===0||Be?ge(je.key):(Be=!0,je.advance(ne)):ge(null)},Le.onerror=function(){Se(Le.error)}}catch(je){Se(je)}})}).catch(Se)});return Q(ke,ce),ke},keys:function(ne){var ce=this,le=new z(function(ke,ge){ce.ready().then(function(){At(ce._dbInfo,se,function(Se,$e){if(Se)return ge(Se);try{var Ne=$e.objectStore(ce._dbInfo.storeName).openKeyCursor(),qe=[];Ne.onsuccess=function(){var Be=Ne.result;Be?(qe.push(Be.key),Be.continue()):ke(qe)},Ne.onerror=function(){ge(Ne.error)}}catch(Be){ge(Be)}})}).catch(ge)});return Q(le,ne),le},dropInstance:function(ne,ce){ce=te.apply(this,arguments);var le=this.config();(ne=typeof ne!="function"&&ne||{}).name||(ne.name=ne.name||le.name,ne.storeName=ne.storeName||le.storeName);var ke,ge=this;if(ne.name){var Se=ne.name===le.name&&ge._dbInfo.db?z.resolve(ge._dbInfo.db):Pe(ne).then(function($e){var Ne=re[ne.name],qe=Ne.forages;Ne.db=$e;for(var Be=0;Be<qe.length;Be++)qe[Be]._dbInfo.db=$e;return $e});ke=ne.storeName?Se.then(function($e){if($e.objectStoreNames.contains(ne.storeName)){var Ne=$e.version+1;fe(ne);var qe=re[ne.name],Be=qe.forages;$e.close();for(var Le=0;Le<Be.length;Le++){var je=Be[Le];je._dbInfo.db=null,je._dbInfo.version=Ne}var Ze=new z(function(nt,at){var It=Z.open(ne.name,Ne);It.onerror=function(Qt){It.result.close(),at(Qt)},It.onupgradeneeded=function(){It.result.deleteObjectStore(ne.storeName)},It.onsuccess=function(){var Qt=It.result;Qt.close(),nt(Qt)}});return Ze.then(function(nt){qe.db=nt;for(var at=0;at<Be.length;at++){var It=Be[at];It._dbInfo.db=nt,me(It._dbInfo)}}).catch(function(nt){throw(Re(ne,nt)||z.resolve()).catch(function(){}),nt})}}):Se.then(function($e){fe(ne);var Ne=re[ne.name],qe=Ne.forages;$e.close();for(var Be=0;Be<qe.length;Be++)qe[Be]._dbInfo.db=null;var Le=new z(function(je,Ze){var nt=Z.deleteDatabase(ne.name);nt.onerror=function(){var at=nt.result;at&&at.close(),Ze(nt.error)},nt.onblocked=function(){console.warn('dropInstance blocked for database "'+ne.name+'" until all open connections are closed')},nt.onsuccess=function(){var at=nt.result;at&&at.close(),je(at)}});return Le.then(function(je){Ne.db=je;for(var Ze=0;Ze<qe.length;Ze++)me(qe[Ze]._dbInfo)}).catch(function(je){throw(Re(ne,je)||z.resolve()).catch(function(){}),je})})}else ke=z.reject("Invalid arguments");return Q(ke,ce),ke}},Qe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Lt=/^~~local_forage_type~([^~]+)~/,gt="__lfsc__:",Ae=gt.length,Ye="arbf",qt="blob",Ot="si08",Ke="ui08",Ve="uic8",Xe="si16",et="si32",ut="ur16",Tt="ui32",Ct="fl32",Dt="fl64",Ht=Ae+Ye.length,Ft=Object.prototype.toString;function rn(ne){var ce,le,ke,ge,Se,$e=.75*ne.length,Ne=ne.length,qe=0;ne[ne.length-1]==="="&&($e--,ne[ne.length-2]==="="&&$e--);var Be=new ArrayBuffer($e),Le=new Uint8Array(Be);for(ce=0;ce<Ne;ce+=4)le=Qe.indexOf(ne[ce]),ke=Qe.indexOf(ne[ce+1]),ge=Qe.indexOf(ne[ce+2]),Se=Qe.indexOf(ne[ce+3]),Le[qe++]=le<<2|ke>>4,Le[qe++]=(15&ke)<<4|ge>>2,Le[qe++]=(3&ge)<<6|63&Se;return Be}function Zt(ne){var ce,le=new Uint8Array(ne),ke="";for(ce=0;ce<le.length;ce+=3)ke+=Qe[le[ce]>>2],ke+=Qe[(3&le[ce])<<4|le[ce+1]>>4],ke+=Qe[(15&le[ce+1])<<2|le[ce+2]>>6],ke+=Qe[63&le[ce+2]];return le.length%3==2?ke=ke.substring(0,ke.length-1)+"=":le.length%3==1&&(ke=ke.substring(0,ke.length-2)+"=="),ke}var Gt={serialize:function(ne,ce){var le="";if(ne&&(le=Ft.call(ne)),ne&&(le==="[object ArrayBuffer]"||ne.buffer&&Ft.call(ne.buffer)==="[object ArrayBuffer]")){var ke,ge=gt;ne instanceof ArrayBuffer?(ke=ne,ge+=Ye):(ke=ne.buffer,le==="[object Int8Array]"?ge+=Ot:le==="[object Uint8Array]"?ge+=Ke:le==="[object Uint8ClampedArray]"?ge+=Ve:le==="[object Int16Array]"?ge+=Xe:le==="[object Uint16Array]"?ge+=ut:le==="[object Int32Array]"?ge+=et:le==="[object Uint32Array]"?ge+=Tt:le==="[object Float32Array]"?ge+=Ct:le==="[object Float64Array]"?ge+=Dt:ce(new Error("Failed to get type for BinaryArray"))),ce(ge+Zt(ke))}else if(le==="[object Blob]"){var Se=new FileReader;Se.onload=function(){var $e="~~local_forage_type~"+ne.type+"~"+Zt(this.result);ce("__lfsc__:blob"+$e)},Se.readAsArrayBuffer(ne)}else try{ce(JSON.stringify(ne))}catch($e){console.error("Couldn't convert value into a JSON string: ",ne),ce(null,$e)}},deserialize:function(ne){if(ne.substring(0,Ae)!==gt)return JSON.parse(ne);var ce,le=ne.substring(Ht),ke=ne.substring(Ae,Ht);if(ke===qt&&Lt.test(le)){var ge=le.match(Lt);ce=ge[1],le=le.substring(ge[0].length)}var Se=rn(le);switch(ke){case Ye:return Se;case qt:return J([Se],{type:ce});case Ot:return new Int8Array(Se);case Ke:return new Uint8Array(Se);case Ve:return new Uint8ClampedArray(Se);case Xe:return new Int16Array(Se);case ut:return new Uint16Array(Se);case et:return new Int32Array(Se);case Tt:return new Uint32Array(Se);case Ct:return new Float32Array(Se);case Dt:return new Float64Array(Se);default:throw new Error("Unkown type: "+ke)}},stringToBuffer:rn,bufferToString:Zt};function Ut(ne,ce,le,ke){ne.executeSql("CREATE TABLE IF NOT EXISTS "+ce.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],le,ke)}function jt(ne,ce,le,ke,ge,Se){ne.executeSql(le,ke,ge,function($e,Ne){Ne.code===Ne.SYNTAX_ERR?$e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[ce.storeName],function(qe,Be){Be.rows.length?Se(qe,Ne):Ut(qe,ce,function(){qe.executeSql(le,ke,ge,Se)},Se)},Se):Se($e,Ne)},Se)}function dn(ne,ce,le,ke){var ge=this;ne=Y(ne);var Se=new z(function($e,Ne){ge.ready().then(function(){ce===void 0&&(ce=null);var qe=ce,Be=ge._dbInfo;Be.serializer.serialize(ce,function(Le,je){je?Ne(je):Be.db.transaction(function(Ze){jt(Ze,Be,"INSERT OR REPLACE INTO "+Be.storeName+" (key, value) VALUES (?, ?)",[ne,Le],function(){$e(qe)},function(nt,at){Ne(at)})},function(Ze){if(Ze.code===Ze.QUOTA_ERR){if(ke>0)return void $e(dn.apply(ge,[ne,qe,le,ke-1]));Ne(Ze)}})})}).catch(Ne)});return Q(Se,le),Se}function Kt(ne){return new z(function(ce,le){ne.transaction(function(ke){ke.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(ge,Se){for(var $e=[],Ne=0;Ne<Se.rows.length;Ne++)$e.push(Se.rows.item(Ne).name);ce({db:ne,storeNames:$e})},function(ge,Se){le(Se)})},function(ke){le(ke)})})}var zt={_driver:"webSQLStorage",_initStorage:function(ne){var ce=this,le={db:null};if(ne)for(var ke in ne)le[ke]=typeof ne[ke]!="string"?ne[ke].toString():ne[ke];var ge=new z(function(Se,$e){try{le.db=openDatabase(le.name,String(le.version),le.description,le.size)}catch(Ne){return $e(Ne)}le.db.transaction(function(Ne){Ut(Ne,le,function(){ce._dbInfo=le,Se()},function(qe,Be){$e(Be)})},$e)});return le.serializer=Gt,ge},_support:typeof openDatabase=="function",iterate:function(ne,ce){var le=this,ke=new z(function(ge,Se){le.ready().then(function(){var $e=le._dbInfo;$e.db.transaction(function(Ne){jt(Ne,$e,"SELECT * FROM "+$e.storeName,[],function(qe,Be){for(var Le=Be.rows,je=Le.length,Ze=0;Ze<je;Ze++){var nt=Le.item(Ze),at=nt.value;if(at&&(at=$e.serializer.deserialize(at)),(at=ne(at,nt.key,Ze+1))!==void 0)return void ge(at)}ge()},function(qe,Be){Se(Be)})})}).catch(Se)});return Q(ke,ce),ke},getItem:function(ne,ce){var le=this;ne=Y(ne);var ke=new z(function(ge,Se){le.ready().then(function(){var $e=le._dbInfo;$e.db.transaction(function(Ne){jt(Ne,$e,"SELECT * FROM "+$e.storeName+" WHERE key = ? LIMIT 1",[ne],function(qe,Be){var Le=Be.rows.length?Be.rows.item(0).value:null;Le&&(Le=$e.serializer.deserialize(Le)),ge(Le)},function(qe,Be){Se(Be)})})}).catch(Se)});return Q(ke,ce),ke},setItem:function(ne,ce,le){return dn.apply(this,[ne,ce,le,1])},removeItem:function(ne,ce){var le=this;ne=Y(ne);var ke=new z(function(ge,Se){le.ready().then(function(){var $e=le._dbInfo;$e.db.transaction(function(Ne){jt(Ne,$e,"DELETE FROM "+$e.storeName+" WHERE key = ?",[ne],function(){ge()},function(qe,Be){Se(Be)})})}).catch(Se)});return Q(ke,ce),ke},clear:function(ne){var ce=this,le=new z(function(ke,ge){ce.ready().then(function(){var Se=ce._dbInfo;Se.db.transaction(function($e){jt($e,Se,"DELETE FROM "+Se.storeName,[],function(){ke()},function(Ne,qe){ge(qe)})})}).catch(ge)});return Q(le,ne),le},length:function(ne){var ce=this,le=new z(function(ke,ge){ce.ready().then(function(){var Se=ce._dbInfo;Se.db.transaction(function($e){jt($e,Se,"SELECT COUNT(key) as c FROM "+Se.storeName,[],function(Ne,qe){var Be=qe.rows.item(0).c;ke(Be)},function(Ne,qe){ge(qe)})})}).catch(ge)});return Q(le,ne),le},key:function(ne,ce){var le=this,ke=new z(function(ge,Se){le.ready().then(function(){var $e=le._dbInfo;$e.db.transaction(function(Ne){jt(Ne,$e,"SELECT key FROM "+$e.storeName+" WHERE id = ? LIMIT 1",[ne+1],function(qe,Be){var Le=Be.rows.length?Be.rows.item(0).key:null;ge(Le)},function(qe,Be){Se(Be)})})}).catch(Se)});return Q(ke,ce),ke},keys:function(ne){var ce=this,le=new z(function(ke,ge){ce.ready().then(function(){var Se=ce._dbInfo;Se.db.transaction(function($e){jt($e,Se,"SELECT key FROM "+Se.storeName,[],function(Ne,qe){for(var Be=[],Le=0;Le<qe.rows.length;Le++)Be.push(qe.rows.item(Le).key);ke(Be)},function(Ne,qe){ge(qe)})})}).catch(ge)});return Q(le,ne),le},dropInstance:function(ne,ce){ce=te.apply(this,arguments);var le=this.config();(ne=typeof ne!="function"&&ne||{}).name||(ne.name=ne.name||le.name,ne.storeName=ne.storeName||le.storeName);var ke,ge=this;return Q(ke=ne.name?new z(function(Se){var $e;$e=ne.name===le.name?ge._dbInfo.db:openDatabase(ne.name,"","",0),ne.storeName?Se({db:$e,storeNames:[ne.storeName]}):Se(Kt($e))}).then(function(Se){return new z(function($e,Ne){Se.db.transaction(function(qe){function Be(nt){return new z(function(at,It){qe.executeSql("DROP TABLE IF EXISTS "+nt,[],function(){at()},function(Qt,hn){It(hn)})})}for(var Le=[],je=0,Ze=Se.storeNames.length;je<Ze;je++)Le.push(Be(Se.storeNames[je]));z.all(Le).then(function(){$e()}).catch(function(nt){Ne(nt)})},function(qe){Ne(qe)})})}):z.reject("Invalid arguments"),ce),ke}};function X(ne,ce){var le=ne.name+"/";return ne.storeName!==ce.storeName&&(le+=ne.storeName+"/"),le}var F={_driver:"localStorageWrapper",_initStorage:function(ne){var ce={};if(ne)for(var le in ne)ce[le]=ne[le];return ce.keyPrefix=X(ne,this._defaultConfig),!function(){var ke="_localforage_support_test";try{return localStorage.setItem(ke,!0),localStorage.removeItem(ke),!1}catch{return!0}}()||localStorage.length>0?(this._dbInfo=ce,ce.serializer=Gt,z.resolve()):z.reject()},_support:function(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}(),iterate:function(ne,ce){var le=this,ke=le.ready().then(function(){for(var ge=le._dbInfo,Se=ge.keyPrefix,$e=Se.length,Ne=localStorage.length,qe=1,Be=0;Be<Ne;Be++){var Le=localStorage.key(Be);if(Le.indexOf(Se)===0){var je=localStorage.getItem(Le);if(je&&(je=ge.serializer.deserialize(je)),(je=ne(je,Le.substring($e),qe++))!==void 0)return je}}});return Q(ke,ce),ke},getItem:function(ne,ce){var le=this;ne=Y(ne);var ke=le.ready().then(function(){var ge=le._dbInfo,Se=localStorage.getItem(ge.keyPrefix+ne);return Se&&(Se=ge.serializer.deserialize(Se)),Se});return Q(ke,ce),ke},setItem:function(ne,ce,le){var ke=this;ne=Y(ne);var ge=ke.ready().then(function(){ce===void 0&&(ce=null);var Se=ce;return new z(function($e,Ne){var qe=ke._dbInfo;qe.serializer.serialize(ce,function(Be,Le){if(Le)Ne(Le);else try{localStorage.setItem(qe.keyPrefix+ne,Be),$e(Se)}catch(je){je.name!=="QuotaExceededError"&&je.name!=="NS_ERROR_DOM_QUOTA_REACHED"||Ne(je),Ne(je)}})})});return Q(ge,le),ge},removeItem:function(ne,ce){var le=this;ne=Y(ne);var ke=le.ready().then(function(){var ge=le._dbInfo;localStorage.removeItem(ge.keyPrefix+ne)});return Q(ke,ce),ke},clear:function(ne){var ce=this,le=ce.ready().then(function(){for(var ke=ce._dbInfo.keyPrefix,ge=localStorage.length-1;ge>=0;ge--){var Se=localStorage.key(ge);Se.indexOf(ke)===0&&localStorage.removeItem(Se)}});return Q(le,ne),le},length:function(ne){var ce=this.keys().then(function(le){return le.length});return Q(ce,ne),ce},key:function(ne,ce){var le=this,ke=le.ready().then(function(){var ge,Se=le._dbInfo;try{ge=localStorage.key(ne)}catch{ge=null}return ge&&(ge=ge.substring(Se.keyPrefix.length)),ge});return Q(ke,ce),ke},keys:function(ne){var ce=this,le=ce.ready().then(function(){for(var ke=ce._dbInfo,ge=localStorage.length,Se=[],$e=0;$e<ge;$e++){var Ne=localStorage.key($e);Ne.indexOf(ke.keyPrefix)===0&&Se.push(Ne.substring(ke.keyPrefix.length))}return Se});return Q(le,ne),le},dropInstance:function(ne,ce){if(ce=te.apply(this,arguments),!(ne=typeof ne!="function"&&ne||{}).name){var le=this.config();ne.name=ne.name||le.name,ne.storeName=ne.storeName||le.storeName}var ke,ge=this;return ke=ne.name?new z(function(Se){ne.storeName?Se(X(ne,ge._defaultConfig)):Se(ne.name+"/")}).then(function(Se){for(var $e=localStorage.length-1;$e>=0;$e--){var Ne=localStorage.key($e);Ne.indexOf(Se)===0&&localStorage.removeItem(Ne)}}):z.reject("Invalid arguments"),Q(ke,ce),ke}},j=function(ne,ce){for(var le=ne.length,ke=0;ke<le;){if((ge=ne[ke])===(Se=ce)||typeof ge=="number"&&typeof Se=="number"&&isNaN(ge)&&isNaN(Se))return!0;ke++}var ge,Se;return!1},ae=Array.isArray||function(ne){return Object.prototype.toString.call(ne)==="[object Array]"},ve={},Ee={},Ce={INDEXEDDB:ct,WEBSQL:zt,LOCALSTORAGE:F},tt=[Ce.INDEXEDDB._driver,Ce.WEBSQL._driver,Ce.LOCALSTORAGE._driver],mt=["dropInstance"],ot=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(mt),wt={description:"",driver:tt.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function yt(ne,ce){ne[ce]=function(){var le=arguments;return ne.ready().then(function(){return ne[ce].apply(ne,le)})}}function on(){for(var ne=1;ne<arguments.length;ne++){var ce=arguments[ne];if(ce)for(var le in ce)ce.hasOwnProperty(le)&&(ae(ce[le])?arguments[0][le]=ce[le].slice():arguments[0][le]=ce[le])}return arguments[0]}var Zn=function(){function ne(ce){for(var le in function(Se,$e){if(!(Se instanceof $e))throw new TypeError("Cannot call a class as a function")}(this,ne),Ce)if(Ce.hasOwnProperty(le)){var ke=Ce[le],ge=ke._driver;this[le]=ge,ve[ge]||this.defineDriver(ke)}this._defaultConfig=on({},wt),this._config=on({},this._defaultConfig,ce),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return ne.prototype.config=function(ce){if((ce===void 0?"undefined":M(ce))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var le in ce){if(le==="storeName"&&(ce[le]=ce[le].replace(/\W/g,"_")),le==="version"&&typeof ce[le]!="number")return new Error("Database version must be a number.");this._config[le]=ce[le]}return!("driver"in ce)||!ce.driver||this.setDriver(this._config.driver)}return typeof ce=="string"?this._config[ce]:this._config},ne.prototype.defineDriver=function(ce,le,ke){var ge=new z(function(Se,$e){try{var Ne=ce._driver,qe=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!ce._driver)return void $e(qe);for(var Be=ot.concat("_initStorage"),Le=0,je=Be.length;Le<je;Le++){var Ze=Be[Le];if((!j(mt,Ze)||ce[Ze])&&typeof ce[Ze]!="function")return void $e(qe)}(function(){for(var at=function(xn){return function(){var Gn=new Error("Method "+xn+" is not implemented by the current driver"),Et=z.reject(Gn);return Q(Et,arguments[arguments.length-1]),Et}},It=0,Qt=mt.length;It<Qt;It++){var hn=mt[It];ce[hn]||(ce[hn]=at(hn))}})();var nt=function(at){ve[Ne]&&console.info("Redefining LocalForage driver: "+Ne),ve[Ne]=ce,Ee[Ne]=at,Se()};"_support"in ce?ce._support&&typeof ce._support=="function"?ce._support().then(nt,$e):nt(!!ce._support):nt(!0)}catch(at){$e(at)}});return ee(ge,le,ke),ge},ne.prototype.driver=function(){return this._driver||null},ne.prototype.getDriver=function(ce,le,ke){var ge=ve[ce]?z.resolve(ve[ce]):z.reject(new Error("Driver not found."));return ee(ge,le,ke),ge},ne.prototype.getSerializer=function(ce){var le=z.resolve(Gt);return ee(le,ce),le},ne.prototype.ready=function(ce){var le=this,ke=le._driverSet.then(function(){return le._ready===null&&(le._ready=le._initDriver()),le._ready});return ee(ke,ce,ce),ke},ne.prototype.setDriver=function(ce,le,ke){var ge=this;ae(ce)||(ce=[ce]);var Se=this._getSupportedDrivers(ce);function $e(){ge._config.driver=ge.driver()}function Ne(Be){return ge._extend(Be),$e(),ge._ready=ge._initStorage(ge._config),ge._ready}var qe=this._driverSet!==null?this._driverSet.catch(function(){return z.resolve()}):z.resolve();return this._driverSet=qe.then(function(){var Be=Se[0];return ge._dbInfo=null,ge._ready=null,ge.getDriver(Be).then(function(Le){ge._driver=Le._driver,$e(),ge._wrapLibraryMethodsWithReady(),ge._initDriver=function(je){return function(){var Ze=0;return function nt(){for(;Ze<je.length;){var at=je[Ze];return Ze++,ge._dbInfo=null,ge._ready=null,ge.getDriver(at).then(Ne).catch(nt)}$e();var It=new Error("No available storage method found.");return ge._driverSet=z.reject(It),ge._driverSet}()}}(Se)})}).catch(function(){$e();var Be=new Error("No available storage method found.");return ge._driverSet=z.reject(Be),ge._driverSet}),ee(this._driverSet,le,ke),this._driverSet},ne.prototype.supports=function(ce){return!!Ee[ce]},ne.prototype._extend=function(ce){on(this,ce)},ne.prototype._getSupportedDrivers=function(ce){for(var le=[],ke=0,ge=ce.length;ke<ge;ke++){var Se=ce[ke];this.supports(Se)&&le.push(Se)}return le},ne.prototype._wrapLibraryMethodsWithReady=function(){for(var ce=0,le=ot.length;ce<le;ce++)yt(this,ot[ce])},ne.prototype.createInstance=function(ce){return new ne(ce)},ne}(),Vn=new Zn;$.exports=Vn},{3:3}]},{},[4])(4)},961:(f,k,i)=>{var c,$=function(){var C=String.fromCharCode,M="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Z="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",J={};function z(ee,Y){if(!J[ee]){J[ee]={};for(var te=0;te<ee.length;te++)J[ee][ee.charAt(te)]=te}return J[ee][Y]}var Q={compressToBase64:function(ee){if(ee==null)return"";var Y=Q._compress(ee,6,function(te){return M.charAt(te)});switch(Y.length%4){default:case 0:return Y;case 1:return Y+"===";case 2:return Y+"==";case 3:return Y+"="}},decompressFromBase64:function(ee){return ee==null?"":ee==""?null:Q._decompress(ee.length,32,function(Y){return z(M,ee.charAt(Y))})},compressToUTF16:function(ee){return ee==null?"":Q._compress(ee,15,function(Y){return C(Y+32)})+" "},decompressFromUTF16:function(ee){return ee==null?"":ee==""?null:Q._decompress(ee.length,16384,function(Y){return ee.charCodeAt(Y)-32})},compressToUint8Array:function(ee){for(var Y=Q.compress(ee),te=new Uint8Array(2*Y.length),ie=0,ye=Y.length;ie<ye;ie++){var re=Y.charCodeAt(ie);te[2*ie]=re>>>8,te[2*ie+1]=re%256}return te},decompressFromUint8Array:function(ee){if(ee==null)return Q.decompress(ee);for(var Y=new Array(ee.length/2),te=0,ie=Y.length;te<ie;te++)Y[te]=256*ee[2*te]+ee[2*te+1];var ye=[];return Y.forEach(function(re){ye.push(C(re))}),Q.decompress(ye.join(""))},compressToEncodedURIComponent:function(ee){return ee==null?"":Q._compress(ee,6,function(Y){return Z.charAt(Y)})},decompressFromEncodedURIComponent:function(ee){return ee==null?"":ee==""?null:(ee=ee.replace(/ /g,"+"),Q._decompress(ee.length,32,function(Y){return z(Z,ee.charAt(Y))}))},compress:function(ee){return Q._compress(ee,16,function(Y){return C(Y)})},_compress:function(ee,Y,te){if(ee==null)return"";var ie,ye,re,de={},se={},ue="",he="",we="",fe=2,me=3,Re=2,Ue=[],Pe=0,De=0;for(re=0;re<ee.length;re+=1)if(ue=ee.charAt(re),Object.prototype.hasOwnProperty.call(de,ue)||(de[ue]=me++,se[ue]=!0),he=we+ue,Object.prototype.hasOwnProperty.call(de,he))we=he;else{if(Object.prototype.hasOwnProperty.call(se,we)){if(we.charCodeAt(0)<256){for(ie=0;ie<Re;ie++)Pe<<=1,De==Y-1?(De=0,Ue.push(te(Pe)),Pe=0):De++;for(ye=we.charCodeAt(0),ie=0;ie<8;ie++)Pe=Pe<<1|1&ye,De==Y-1?(De=0,Ue.push(te(Pe)),Pe=0):De++,ye>>=1}else{for(ye=1,ie=0;ie<Re;ie++)Pe=Pe<<1|ye,De==Y-1?(De=0,Ue.push(te(Pe)),Pe=0):De++,ye=0;for(ye=we.charCodeAt(0),ie=0;ie<16;ie++)Pe=Pe<<1|1&ye,De==Y-1?(De=0,Ue.push(te(Pe)),Pe=0):De++,ye>>=1}--fe==0&&(fe=Math.pow(2,Re),Re++),delete se[we]}else for(ye=de[we],ie=0;ie<Re;ie++)Pe=Pe<<1|1&ye,De==Y-1?(De=0,Ue.push(te(Pe)),Pe=0):De++,ye>>=1;--fe==0&&(fe=Math.pow(2,Re),Re++),de[he]=me++,we=String(ue)}if(we!==""){if(Object.prototype.hasOwnProperty.call(se,we)){if(we.charCodeAt(0)<256){for(ie=0;ie<Re;ie++)Pe<<=1,De==Y-1?(De=0,Ue.push(te(Pe)),Pe=0):De++;for(ye=we.charCodeAt(0),ie=0;ie<8;ie++)Pe=Pe<<1|1&ye,De==Y-1?(De=0,Ue.push(te(Pe)),Pe=0):De++,ye>>=1}else{for(ye=1,ie=0;ie<Re;ie++)Pe=Pe<<1|ye,De==Y-1?(De=0,Ue.push(te(Pe)),Pe=0):De++,ye=0;for(ye=we.charCodeAt(0),ie=0;ie<16;ie++)Pe=Pe<<1|1&ye,De==Y-1?(De=0,Ue.push(te(Pe)),Pe=0):De++,ye>>=1}--fe==0&&(fe=Math.pow(2,Re),Re++),delete se[we]}else for(ye=de[we],ie=0;ie<Re;ie++)Pe=Pe<<1|1&ye,De==Y-1?(De=0,Ue.push(te(Pe)),Pe=0):De++,ye>>=1;--fe==0&&(fe=Math.pow(2,Re),Re++)}for(ye=2,ie=0;ie<Re;ie++)Pe=Pe<<1|1&ye,De==Y-1?(De=0,Ue.push(te(Pe)),Pe=0):De++,ye>>=1;for(;;){if(Pe<<=1,De==Y-1){Ue.push(te(Pe));break}De++}return Ue.join("")},decompress:function(ee){return ee==null?"":ee==""?null:Q._decompress(ee.length,32768,function(Y){return ee.charCodeAt(Y)})},_decompress:function(ee,Y,te){var ie,ye,re,de,se,ue,he,we=[],fe=4,me=4,Re=3,Ue="",Pe=[],De={val:te(0),position:Y,index:1};for(ie=0;ie<3;ie+=1)we[ie]=ie;for(re=0,se=Math.pow(2,2),ue=1;ue!=se;)de=De.val&De.position,De.position>>=1,De.position==0&&(De.position=Y,De.val=te(De.index++)),re|=(de>0?1:0)*ue,ue<<=1;switch(re){case 0:for(re=0,se=Math.pow(2,8),ue=1;ue!=se;)de=De.val&De.position,De.position>>=1,De.position==0&&(De.position=Y,De.val=te(De.index++)),re|=(de>0?1:0)*ue,ue<<=1;he=C(re);break;case 1:for(re=0,se=Math.pow(2,16),ue=1;ue!=se;)de=De.val&De.position,De.position>>=1,De.position==0&&(De.position=Y,De.val=te(De.index++)),re|=(de>0?1:0)*ue,ue<<=1;he=C(re);break;case 2:return""}for(we[3]=he,ye=he,Pe.push(he);;){if(De.index>ee)return"";for(re=0,se=Math.pow(2,Re),ue=1;ue!=se;)de=De.val&De.position,De.position>>=1,De.position==0&&(De.position=Y,De.val=te(De.index++)),re|=(de>0?1:0)*ue,ue<<=1;switch(he=re){case 0:for(re=0,se=Math.pow(2,8),ue=1;ue!=se;)de=De.val&De.position,De.position>>=1,De.position==0&&(De.position=Y,De.val=te(De.index++)),re|=(de>0?1:0)*ue,ue<<=1;we[me++]=C(re),he=me-1,fe--;break;case 1:for(re=0,se=Math.pow(2,16),ue=1;ue!=se;)de=De.val&De.position,De.position>>=1,De.position==0&&(De.position=Y,De.val=te(De.index++)),re|=(de>0?1:0)*ue,ue<<=1;we[me++]=C(re),he=me-1,fe--;break;case 2:return Pe.join("")}if(fe==0&&(fe=Math.pow(2,Re),Re++),we[he])Ue=we[he];else{if(he!==me)return null;Ue=ye+ye.charAt(0)}Pe.push(Ue),we[me++]=ye+Ue.charAt(0),ye=Ue,--fe==0&&(fe=Math.pow(2,Re),Re++)}}};return Q}();(c=(function(){return $}).call(k,i,k,f))===void 0||(f.exports=c)},895:f=>{f.exports=function(k,i,c,$){var C=k[0],M=k[1],Z=!1;c===void 0&&(c=0),$===void 0&&($=i.length);for(var J=($-c)/2,z=0,Q=J-1;z<J;Q=z++){var ee=i[c+2*z+0],Y=i[c+2*z+1],te=i[c+2*Q+0],ie=i[c+2*Q+1];Y>M!=ie>M&&C<(te-ee)*(M-Y)/(ie-Y)+ee&&(Z=!Z)}return Z}},946:(f,k,i)=>{const c=i(909),$=async()=>await c.get({dir:"areaList",file:"index"}),C=({name:Q,list:ee})=>{let Y=Q;const te=ee.find(ye=>Y.indexOf(ye.name)!==-1);if(te){const ye=te.name.length;return Y=Y.slice(ye,Q.length),{id:te.id,name:Y,children:te.children}}const ie=ee.find(ye=>Y.indexOf(ye.shortName)!==-1);if(ie){const ye=ie.shortName.length;return Y=Y.slice(ye,Q.length),{id:ie.id,name:Y,children:ie.children}}return null},M=async(Q="",ee)=>{let Y=Q;const te={province:"",city:"",district:""};let ie=ee;ee||(ie=await $());const ye=C({name:Y,list:ie});if(ye){Y=ye.name,te.province=ye.id;const se=ye.children,ue=C({name:Y,list:se});if(ue){Y=ue.name,te.city=ue.id;const fe=C({name:Y,list:ue.children});return fe&&(Y=fe.name,te.district=fe.id),te}const he=se.reduce((fe,me)=>me.children?fe.concat(me.children):fe,[]),we=C({name:Y,list:he});return we&&(Y=we.name,te.district=we.id),te}const re=ie.reduce((se,ue)=>ue.children?se.concat(ue.children):se,[]),de=C({name:Y,list:re});if(de){Y=de.name,te.city=de.id;const se=C({name:Y,list:de.children});se&&(Y=se.name,te.district=se.id)}return te},Z=async(Q={})=>{let{code:ee}={...Q};ee=typeof ee=="string"?ee:ee.toString();const Y={province:"",provinceCode:"",city:"",cityCode:"",district:"",districtCode:"",code:ee,address:""};if((await $()).every(te=>te.id===ee?(Y.province=te.name,Y.provinceCode=te.id,!1):!te.children||te.children.every(ie=>ie.id===ee?(Y.province=te.name,Y.provinceCode=te.id,Y.city=ie.name,Y.cityCode=ie.id,!1):!ie.children||ie.children.every(ye=>ye.id!==ee||(Y.province=te.name,Y.provinceCode=te.id,Y.city=ie.name,Y.cityCode=ie.id,Y.district=ye.name,Y.districtCode=ye.id,!1)))))throw new Error("未找到该地区");return Y.address=Y.province+Y.city+Y.district,Y},J=async({provinceCode:Q,cityCode:ee,districtCode:Y})=>{const te={province:{},city:{},district:{}};if(Q){const ie=await c.get({dir:"province",file:Q});te.province={code:ie.id,location:ie.location,name:ie.name,pinyin:ie.pinyin}}if(ee){const ie=(await c.get({dir:"city",file:Q})).find(ye=>ye.id===ee);te.city={code:ie.id,location:ie.location,name:ie.name,pinyin:ie.pinyin}}if(Y){const ie=(await c.get({dir:"district",file:ee})).find(ye=>ye.id===Y);te.district={code:ie.id,location:ie.location,name:ie.name,pinyin:ie.pinyin}}return te},z=async(Q,ee)=>{let Y=ee;if(Y||(Y=await $()),!Q)return Y.map(te=>({code:te.id,name:te.name}));for(let te=0;te<Y.length;te++){const ie=Y[te];if(ie.id===Q&&ie.children)return ie.children.map(ye=>({code:ye.id,name:ye.name}));if(ie.children){const ye=await z(Q,ie.children);if(ye)return ye}}};f.exports={getList:z,searchCodeInfo:async({code:Q,detail:ee})=>{const{province:Y,city:te,district:ie,address:ye,provinceCode:re,cityCode:de,districtCode:se}=await Z({code:Q}),ue={province:Y,city:te,district:ie,address:ye,code:Q};if(ee){const he=await J({provinceCode:re,cityCode:de,districtCode:se});ue.detail=he}return ue},searchStrAddress:async Q=>{const{province:ee,city:Y,district:te}=await M(Q);return te||Y||ee||null},analysisAddress:M,searchCodeDetailInfo:async({code:Q})=>{const{provinceCode:ee,cityCode:Y,districtCode:te}=await Z({code:Q}),ie=await J({provinceCode:ee,cityCode:Y,districtCode:te});return Object.keys(ie.district).length?ie.district:Object.keys(ie.city).length?ie.city:Object.keys(ie.province).length?ie.province:void 0}}},182:f=>{f.exports=new class{constructor(){this.config={timeout:1e4,enableHighAccuracy:!1,detail:!1},this.cdn=["https://npm.onmicrosoft.cn/@pikaz/location/lib","https://unpkg.com/@pikaz/location/lib"],this.userCdn=""}set(k){this.config={...this.config,...k},this.config.url&&(this.userCdn=this.config.url)}}},955:(f,k,i)=>{const c=i(909),$=i(895),C=i(182),M=({latitude:Z,longitude:J,address:z})=>z.find(Q=>Q.polygon.find(ee=>{if($([J,Z],ee))return ee}));f.exports={getGeo:(Z={})=>{const{enableHighAccuracy:J,timeout:z}={...C.config,...Z};return new Promise((Q,ee)=>{if(navigator.geolocation){const Y=navigator.geolocation.watchPosition(te=>{const{latitude:ie,longitude:ye}=te.coords;navigator.geolocation.clearWatch(Y),Q({latitude:ie,longitude:ye})},te=>{switch(navigator.geolocation.clearWatch(Y),te.code){case te.PERMISSION_DENIED:ee(new Error("html5已拒绝定位"));break;case te.POSITION_UNAVAILABLE:ee(new Error("html5位置信息不可用"));break;case te.TIMEOUT:ee(new Error("定位超时"));break;case te.UNKNOWN_ERROR:ee(new Error("html5定位未知错误"))}},{enableHighAccuracy:J,timeout:z,maximumAge:0})}else ee(new Error("浏览器不支持HTML5定位"))})},getGeoCode:async({latitude:Z,longitude:J})=>{try{let z="";const Q=(await c.get({dir:"province",file:"short"})).filter(Y=>M({latitude:Z,longitude:J,address:[Y]}));let ee="";for(let Y=0;Y<Q.length;Y++){const{id:te}=Q[Y],ie=await c.get({dir:"province",file:te}),ye=M({latitude:Z,longitude:J,address:[ie]});ye&&(ee=ye)}if(ee){z=ee.id;const Y=await c.get({dir:"city",file:ee.id}),te=M({latitude:Z,longitude:J,address:Y});if(te){z=te.id;const ie=await c.get({dir:"district",file:te.id}),ye=M({latitude:Z,longitude:J,address:ie});ye&&(z=ye.id)}}if(!z)throw new Error("非中国境内");return z}catch(z){throw z}}}},909:(f,k,i)=>{const c=i(218),{decompressFromEncodedURIComponent:$}=i(961),C=i(483),M=i(182),{version:Z,fileDate:J}=i(147);f.exports=new class{constructor(){this.local=null,this.localConfig={name:"pikazLocation",storeName:"v"+Z.split(".")[0]+"."+Z.split(".")[1]}}async get({dir:z,file:Q}){if(!this.local){const te=C.createInstance(this.localConfig);await te.ready(),this.local=te}const ee=`${z}-${Q}-${J[z]}`,Y=await this.local.getItem(ee);if(Y)return Y;try{const te=await(async({file:ie})=>{const ye=c.CancelToken;let re;const de=async(se,ue)=>{const he=await c({url:`${se}/static/${ue}.json`,method:"get",dataType:"json",cancelToken:new ye(function(fe){re=fe}),timeout:M.timeout});if(!he||!he.data||Object.prototype.toString.call(he.data.s)!="[object String]")throw new Error("未获取到文件");const we=$(he.data.s);return JSON.parse(we)};try{const se=M.userCdn;if(se)return await de(se,ie);throw new Error("未找到设置的url")}catch{const ue=M.cdn.map(he=>new Promise(we=>{de(he,ie).then(fe=>{we(fe)}).catch(()=>{})}));try{return await Promise.race(ue)}catch{throw new Error("定位失败")}finally{re()}}})({file:`${z}/${Q}`});return this.local.setItem(ee,te),te}catch{throw new Error("定位失败")}}async getVal({key:z,gainVal:Q,expiration:ee}){if(!this.local){const de=C.createInstance(this.localConfig);await de.ready(),this.local=de}const Y=new Date().getTime(),te=ee||0,ie=`local-${z}`,ye=await this.local.getItem(ie);if(ye&&ye.expiration>Y)return ye.val;const re=await Q();return await this.local.setItem(ie,{val:re,expiration:Y+te}),re}async clear(){await this.local.clear()}}},138:(f,k,i)=>{const c=i(182),{getGeo:$,getGeoCode:C}=i(955),{getList:M,searchCodeInfo:Z,searchStrAddress:J,searchCodeDetailInfo:z}=i(946),{getIpCode:Q}=i(454),ee=async(re,de={})=>{let{timeout:se}={...c.config,...de};return await Promise.race([re(de),new Promise((ue,he)=>{setTimeout(()=>{he(new Error("定位超时"))},se)})])},Y=async(re={})=>{let{timeout:de,enableHighAccuracy:se,detail:ue,latitude:he,longitude:we}={...c.config,...re};if(!he||!we){const{latitude:fe,longitude:me}=await $({timeout:de,enableHighAccuracy:se});he=fe,we=me}return await ee(async()=>{const fe=await C({latitude:he,longitude:we});if(!fe)throw new Error("非中国境内");return{...await Z({code:fe,detail:ue}),latitude:he,longitude:we}},{timeout:de})},te=async(re={})=>{let{detail:de,ip:se}={...c.config,...re};const{code:ue,ip:he}=await Q({ip:se});return se||(se=he),{...await Z({code:ue,detail:de}),ip:se}},ie=async(re={})=>{const{address:de,detail:se}={...c.config,...re},ue=await J(de);if(!ue)throw new Error("解析地址失败,请确认地址包含省级或市级名称");return await Z({code:ue,detail:se})},ye=async(re={})=>{const{code:de,detail:se}={...c.config,...re};return await Z({code:de,detail:se})};f.exports={setConfig:({timeout:re,url:de})=>{c.set({timeout:re,url:de})},getLocation:async(re={})=>{try{return{...await Y(re),type:"h5"}}catch{return{...await ee(te,re),type:"ip"}}},getH5Location:Y,getIpLocation:re=>ee(te,re),searchList:async(re={})=>{const{code:de}={...re};return await M(de||"")||[]},searchCodeAddress:re=>ee(ye,re),searchAddress:re=>ee(ie,re),searchCodeDetail:re=>ee(z,re)}},454:(f,k,i)=>{const{decompressFromEncodedURIComponent:c}=i(961),$=i(909),C=Z=>{const J=Z.split(".").reduce((z,Q)=>`${z}${(ee=>{const Y=ee.split("").reverse();return new Array(3).fill(0).map((te,ie)=>Y[ie]||0).reverse().join("")})(Q)}`,"");return Number(J)},M=()=>new Promise((Z,J)=>{const z="ipCallback"+new Date().getTime(),Q=document.createElement("script");Q.onerror=()=>{J(new Error("获取ip失败"))},window[z]=ee=>{ee&&ee.ip?Z(ee.ip):J(new Error("ip定位失败"))},Q.src=c("BYFxAcGcC4HpYIbgJYDpkoGYE9UHsAnAc1gH5NCBbBEAXgCtI8A7cAMjYGMEAbHgIwScA1rSA")+z,document.body.appendChild(Q)});f.exports={addZero:C,getIpCode:async(Z={})=>{let{ip:J}={...Z};J||(J=await $.getVal({key:"ip",gainVal:M,expiration:864e5}));const z=J.split(".").map(Q=>Number(Q)||0);if(z.length!==4)throw new Error("ip格式错误,只支持ipv4");return{code:(await $.get({dir:"ip",file:`${z[0]}.${z[1]}`})).reduce((Q,ee)=>{const{district:Y,id:te}=ee,ie=C(J);return ie>=Y[0]&&ie<=Y[1]?te:Q},""),ip:J}}}},218:(f,k,i)=>{function c(K,oe){return function(){return K.apply(oe,arguments)}}const{toString:$}=Object.prototype,{getPrototypeOf:C}=Object,M=(Z=Object.create(null),K=>{const oe=$.call(K);return Z[oe]||(Z[oe]=oe.slice(8,-1).toLowerCase())});var Z;const J=K=>(K=K.toLowerCase(),oe=>M(oe)===K),z=K=>oe=>typeof oe===K,{isArray:Q}=Array,ee=z("undefined"),Y=J("ArrayBuffer"),te=z("string"),ie=z("function"),ye=z("number"),re=K=>K!==null&&typeof K=="object",de=K=>{if(M(K)!=="object")return!1;const oe=C(K);return!(oe!==null&&oe!==Object.prototype&&Object.getPrototypeOf(oe)!==null||Symbol.toStringTag in K||Symbol.iterator in K)},se=J("Date"),ue=J("File"),he=J("Blob"),we=J("FileList"),fe=J("URLSearchParams");function me(K,oe,{allOwnKeys:pe=!1}={}){if(K==null)return;let be,Te;if(typeof K!="object"&&(K=[K]),Q(K))for(be=0,Te=K.length;be<Te;be++)oe.call(null,K[be],be,K);else{const xe=pe?Object.getOwnPropertyNames(K):Object.keys(K),Ie=xe.length;let Fe;for(be=0;be<Ie;be++)Fe=xe[be],oe.call(null,K[Fe],Fe,K)}}function Re(K,oe){oe=oe.toLowerCase();const pe=Object.keys(K);let be,Te=pe.length;for(;Te-- >0;)if(be=pe[Te],oe===be.toLowerCase())return be;return null}const Ue=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:i.g,Pe=K=>!ee(K)&&K!==Ue,De=(vt=typeof Uint8Array<"u"&&C(Uint8Array),K=>vt&&K instanceof vt);var vt;const _t=J("HTMLFormElement"),St=(({hasOwnProperty:K})=>(oe,pe)=>K.call(oe,pe))(Object.prototype),Mt=J("RegExp"),At=(K,oe)=>{const pe=Object.getOwnPropertyDescriptors(K),be={};me(pe,(Te,xe)=>{let Ie;(Ie=oe(Te,xe,K))!==!1&&(be[xe]=Ie||Te)}),Object.defineProperties(K,be)},ct="abcdefghijklmnopqrstuvwxyz",Qe="0123456789",Lt={DIGIT:Qe,ALPHA:ct,ALPHA_DIGIT:ct+ct.toUpperCase()+Qe},gt=J("AsyncFunction");var Ae={isArray:Q,isArrayBuffer:Y,isBuffer:function(K){return K!==null&&!ee(K)&&K.constructor!==null&&!ee(K.constructor)&&ie(K.constructor.isBuffer)&&K.constructor.isBuffer(K)},isFormData:K=>{let oe;return K&&(typeof FormData=="function"&&K instanceof FormData||ie(K.append)&&((oe=M(K))==="formdata"||oe==="object"&&ie(K.toString)&&K.toString()==="[object FormData]"))},isArrayBufferView:function(K){let oe;return oe=typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(K):K&&K.buffer&&Y(K.buffer),oe},isString:te,isNumber:ye,isBoolean:K=>K===!0||K===!1,isObject:re,isPlainObject:de,isUndefined:ee,isDate:se,isFile:ue,isBlob:he,isRegExp:Mt,isFunction:ie,isStream:K=>re(K)&&ie(K.pipe),isURLSearchParams:fe,isTypedArray:De,isFileList:we,forEach:me,merge:function K(){const{caseless:oe}=Pe(this)&&this||{},pe={},be=(Te,xe)=>{const Ie=oe&&Re(pe,xe)||xe;de(pe[Ie])&&de(Te)?pe[Ie]=K(pe[Ie],Te):de(Te)?pe[Ie]=K({},Te):Q(Te)?pe[Ie]=Te.slice():pe[Ie]=Te};for(let Te=0,xe=arguments.length;Te<xe;Te++)arguments[Te]&&me(arguments[Te],be);return pe},extend:(K,oe,pe,{allOwnKeys:be}={})=>(me(oe,(Te,xe)=>{pe&&ie(Te)?K[xe]=c(Te,pe):K[xe]=Te},{allOwnKeys:be}),K),trim:K=>K.trim?K.trim():K.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:K=>(K.charCodeAt(0)===65279&&(K=K.slice(1)),K),inherits:(K,oe,pe,be)=>{K.prototype=Object.create(oe.prototype,be),K.prototype.constructor=K,Object.defineProperty(K,"super",{value:oe.prototype}),pe&&Object.assign(K.prototype,pe)},toFlatObject:(K,oe,pe,be)=>{let Te,xe,Ie;const Fe={};if(oe=oe||{},K==null)return oe;do{for(Te=Object.getOwnPropertyNames(K),xe=Te.length;xe-- >0;)Ie=Te[xe],be&&!be(Ie,K,oe)||Fe[Ie]||(oe[Ie]=K[Ie],Fe[Ie]=!0);K=pe!==!1&&C(K)}while(K&&(!pe||pe(K,oe))&&K!==Object.prototype);return oe},kindOf:M,kindOfTest:J,endsWith:(K,oe,pe)=>{K=String(K),(pe===void 0||pe>K.length)&&(pe=K.length),pe-=oe.length;const be=K.indexOf(oe,pe);return be!==-1&&be===pe},toArray:K=>{if(!K)return null;if(Q(K))return K;let oe=K.length;if(!ye(oe))return null;const pe=new Array(oe);for(;oe-- >0;)pe[oe]=K[oe];return pe},forEachEntry:(K,oe)=>{const pe=(K&&K[Symbol.iterator]).call(K);let be;for(;(be=pe.next())&&!be.done;){const Te=be.value;oe.call(K,Te[0],Te[1])}},matchAll:(K,oe)=>{let pe;const be=[];for(;(pe=K.exec(oe))!==null;)be.push(pe);return be},isHTMLForm:_t,hasOwnProperty:St,hasOwnProp:St,reduceDescriptors:At,freezeMethods:K=>{At(K,(oe,pe)=>{if(ie(K)&&["arguments","caller","callee"].indexOf(pe)!==-1)return!1;const be=K[pe];ie(be)&&(oe.enumerable=!1,"writable"in oe?oe.writable=!1:oe.set||(oe.set=()=>{throw Error("Can not rewrite read-only method '"+pe+"'")}))})},toObjectSet:(K,oe)=>{const pe={},be=Te=>{Te.forEach(xe=>{pe[xe]=!0})};return Q(K)?be(K):be(String(K).split(oe)),pe},toCamelCase:K=>K.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(oe,pe,be){return pe.toUpperCase()+be}),noop:()=>{},toFiniteNumber:(K,oe)=>(K=+K,Number.isFinite(K)?K:oe),findKey:Re,global:Ue,isContextDefined:Pe,ALPHABET:Lt,generateString:(K=16,oe=Lt.ALPHA_DIGIT)=>{let pe="";const{length:be}=oe;for(;K--;)pe+=oe[Math.random()*be|0];return pe},isSpecCompliantForm:function(K){return!!(K&&ie(K.append)&&K[Symbol.toStringTag]==="FormData"&&K[Symbol.iterator])},toJSONObject:K=>{const oe=new Array(10),pe=(be,Te)=>{if(re(be)){if(oe.indexOf(be)>=0)return;if(!("toJSON"in be)){oe[Te]=be;const xe=Q(be)?[]:{};return me(be,(Ie,Fe)=>{const ze=pe(Ie,Te+1);!ee(ze)&&(xe[Fe]=ze)}),oe[Te]=void 0,xe}}return be};return pe(K,0)},isAsyncFn:gt,isThenable:K=>K&&(re(K)||ie(K))&&ie(K.then)&&ie(K.catch)};function Ye(K,oe,pe,be,Te){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=K,this.name="AxiosError",oe&&(this.code=oe),pe&&(this.config=pe),be&&(this.request=be),Te&&(this.response=Te)}Ae.inherits(Ye,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ae.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const qt=Ye.prototype,Ot={};function Ke(K){return Ae.isPlainObject(K)||Ae.isArray(K)}function Ve(K){return Ae.endsWith(K,"[]")?K.slice(0,-2):K}function Xe(K,oe,pe){return K?K.concat(oe).map(function(be,Te){return be=Ve(be),!pe&&Te?"["+be+"]":be}).join(pe?".":""):oe}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(K=>{Ot[K]={value:K}}),Object.defineProperties(Ye,Ot),Object.defineProperty(qt,"isAxiosError",{value:!0}),Ye.from=(K,oe,pe,be,Te,xe)=>{const Ie=Object.create(qt);return Ae.toFlatObject(K,Ie,function(Fe){return Fe!==Error.prototype},Fe=>Fe!=="isAxiosError"),Ye.call(Ie,K.message,oe,pe,be,Te),Ie.cause=K,Ie.name=K.name,xe&&Object.assign(Ie,xe),Ie};const et=Ae.toFlatObject(Ae,{},null,function(K){return/^is[A-Z]/.test(K)});function ut(K,oe,pe){if(!Ae.isObject(K))throw new TypeError("target must be an object");oe=oe||new FormData;const be=(pe=Ae.toFlatObject(pe,{metaTokens:!0,dots:!1,indexes:!1},!1,function(We,ft){return!Ae.isUndefined(ft[We])})).metaTokens,Te=pe.visitor||He,xe=pe.dots,Ie=pe.indexes,Fe=(pe.Blob||typeof Blob<"u"&&Blob)&&Ae.isSpecCompliantForm(oe);if(!Ae.isFunction(Te))throw new TypeError("visitor must be a function");function ze(We){if(We===null)return"";if(Ae.isDate(We))return We.toISOString();if(!Fe&&Ae.isBlob(We))throw new Ye("Blob is not supported. Use a Buffer instead.");return Ae.isArrayBuffer(We)||Ae.isTypedArray(We)?Fe&&typeof Blob=="function"?new Blob([We]):Buffer.from(We):We}function He(We,ft,Je){let bt=We;if(We&&!Je&&typeof We=="object"){if(Ae.endsWith(ft,"{}"))ft=be?ft:ft.slice(0,-2),We=JSON.stringify(We);else if(Ae.isArray(We)&&function(Bt){return Ae.isArray(Bt)&&!Bt.some(Ke)}(We)||(Ae.isFileList(We)||Ae.endsWith(ft,"[]"))&&(bt=Ae.toArray(We)))return ft=Ve(ft),bt.forEach(function(Bt,Yt){!Ae.isUndefined(Bt)&&Bt!==null&&oe.append(Ie===!0?Xe([ft],Yt,xe):Ie===null?ft:ft+"[]",ze(Bt))}),!1}return!!Ke(We)||(oe.append(Xe(Je,ft,xe),ze(We)),!1)}const Me=[],rt=Object.assign(et,{defaultVisitor:He,convertValue:ze,isVisitable:Ke});if(!Ae.isObject(K))throw new TypeError("data must be an object");return function We(ft,Je){if(!Ae.isUndefined(ft)){if(Me.indexOf(ft)!==-1)throw Error("Circular reference detected in "+Je.join("."));Me.push(ft),Ae.forEach(ft,function(bt,Bt){(!(Ae.isUndefined(bt)||bt===null)&&Te.call(oe,bt,Ae.isString(Bt)?Bt.trim():Bt,Je,rt))===!0&&We(bt,Je?Je.concat(Bt):[Bt])}),Me.pop()}}(K),oe}function Tt(K){const oe={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(K).replace(/[!'()~]|%20|%00/g,function(pe){return oe[pe]})}function Ct(K,oe){this._pairs=[],K&&ut(K,this,oe)}const Dt=Ct.prototype;function Ht(K){return encodeURIComponent(K).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ft(K,oe,pe){if(!oe)return K;const be=pe&&pe.encode||Ht,Te=pe&&pe.serialize;let xe;if(xe=Te?Te(oe,pe):Ae.isURLSearchParams(oe)?oe.toString():new Ct(oe,pe).toString(be),xe){const Ie=K.indexOf("#");Ie!==-1&&(K=K.slice(0,Ie)),K+=(K.indexOf("?")===-1?"?":"&")+xe}return K}Dt.append=function(K,oe){this._pairs.push([K,oe])},Dt.toString=function(K){const oe=K?function(pe){return K.call(this,pe,Tt)}:Tt;return this._pairs.map(function(pe){return oe(pe[0])+"="+oe(pe[1])},"").join("&")};var rn=class{constructor(){this.handlers=[]}use(K,oe,pe){return this.handlers.push({fulfilled:K,rejected:oe,synchronous:!!pe&&pe.synchronous,runWhen:pe?pe.runWhen:null}),this.handlers.length-1}eject(K){this.handlers[K]&&(this.handlers[K]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(K){Ae.forEach(this.handlers,function(oe){oe!==null&&K(oe)})}},Zt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Gt={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ct,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]};const Ut=typeof window<"u"&&typeof document<"u",jt=(dn=typeof navigator<"u"&&navigator.product,Ut&&["ReactNative","NativeScript","NS"].indexOf(dn)<0);var dn;const Kt=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function";var zt={...Object.freeze({__proto__:null,hasBrowserEnv:Ut,hasStandardBrowserWebWorkerEnv:Kt,hasStandardBrowserEnv:jt}),...Gt};function X(K){function oe(pe,be,Te,xe){let Ie=pe[xe++];const Fe=Number.isFinite(+Ie),ze=xe>=pe.length;return Ie=!Ie&&Ae.isArray(Te)?Te.length:Ie,ze?(Ae.hasOwnProp(Te,Ie)?Te[Ie]=[Te[Ie],be]:Te[Ie]=be,!Fe):(Te[Ie]&&Ae.isObject(Te[Ie])||(Te[Ie]=[]),oe(pe,be,Te[Ie],xe)&&Ae.isArray(Te[Ie])&&(Te[Ie]=function(He){const Me={},rt=Object.keys(He);let We;const ft=rt.length;let Je;for(We=0;We<ft;We++)Je=rt[We],Me[Je]=He[Je];return Me}(Te[Ie])),!Fe)}if(Ae.isFormData(K)&&Ae.isFunction(K.entries)){const pe={};return Ae.forEachEntry(K,(be,Te)=>{oe(function(xe){return Ae.matchAll(/\w+|\[(\w*)]/g,xe).map(Ie=>Ie[0]==="[]"?"":Ie[1]||Ie[0])}(be),Te,pe,0)}),pe}return null}const F={transitional:Zt,adapter:["xhr","http"],transformRequest:[function(K,oe){const pe=oe.getContentType()||"",be=pe.indexOf("application/json")>-1,Te=Ae.isObject(K);if(Te&&Ae.isHTMLForm(K)&&(K=new FormData(K)),Ae.isFormData(K))return be&&be?JSON.stringify(X(K)):K;if(Ae.isArrayBuffer(K)||Ae.isBuffer(K)||Ae.isStream(K)||Ae.isFile(K)||Ae.isBlob(K))return K;if(Ae.isArrayBufferView(K))return K.buffer;if(Ae.isURLSearchParams(K))return oe.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),K.toString();let xe;if(Te){if(pe.indexOf("application/x-www-form-urlencoded")>-1)return function(Ie,Fe){return ut(Ie,new zt.classes.URLSearchParams,Object.assign({visitor:function(ze,He,Me,rt){return zt.isNode&&Ae.isBuffer(ze)?(this.append(He,ze.toString("base64")),!1):rt.defaultVisitor.apply(this,arguments)}},Fe))}(K,this.formSerializer).toString();if((xe=Ae.isFileList(K))||pe.indexOf("multipart/form-data")>-1){const Ie=this.env&&this.env.FormData;return ut(xe?{"files[]":K}:K,Ie&&new Ie,this.formSerializer)}}return Te||be?(oe.setContentType("application/json",!1),function(Ie,Fe,ze){if(Ae.isString(Ie))try{return(0,JSON.parse)(Ie),Ae.trim(Ie)}catch(He){if(He.name!=="SyntaxError")throw He}return(0,JSON.stringify)(Ie)}(K)):K}],transformResponse:[function(K){const oe=this.transitional||F.transitional,pe=oe&&oe.forcedJSONParsing,be=this.responseType==="json";if(K&&Ae.isString(K)&&(pe&&!this.responseType||be)){const Te=!(oe&&oe.silentJSONParsing)&&be;try{return JSON.parse(K)}catch(xe){if(Te)throw xe.name==="SyntaxError"?Ye.from(xe,Ye.ERR_BAD_RESPONSE,this,null,this.response):xe}}return K}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:zt.classes.FormData,Blob:zt.classes.Blob},validateStatus:function(K){return K>=200&&K<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ae.forEach(["delete","get","head","post","put","patch"],K=>{F.headers[K]={}});var j=F;const ae=Ae.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ve=Symbol("internals");function Ee(K){return K&&String(K).trim().toLowerCase()}function Ce(K){return K===!1||K==null?K:Ae.isArray(K)?K.map(Ce):String(K)}function tt(K,oe,pe,be,Te){return Ae.isFunction(be)?be.call(this,oe,pe):(Te&&(oe=pe),Ae.isString(oe)?Ae.isString(be)?oe.indexOf(be)!==-1:Ae.isRegExp(be)?be.test(oe):void 0:void 0)}class mt{constructor(oe){oe&&this.set(oe)}set(oe,pe,be){const Te=this;function xe(Fe,ze,He){const Me=Ee(ze);if(!Me)throw new Error("header name must be a non-empty string");const rt=Ae.findKey(Te,Me);(!rt||Te[rt]===void 0||He===!0||He===void 0&&Te[rt]!==!1)&&(Te[rt||ze]=Ce(Fe))}const Ie=(Fe,ze)=>Ae.forEach(Fe,(He,Me)=>xe(He,Me,ze));return Ae.isPlainObject(oe)||oe instanceof this.constructor?Ie(oe,pe):Ae.isString(oe)&&(oe=oe.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(oe.trim())?Ie((Fe=>{const ze={};let He,Me,rt;return Fe&&Fe.split(`
4
+ `).forEach(function(We){rt=We.indexOf(":"),He=We.substring(0,rt).trim().toLowerCase(),Me=We.substring(rt+1).trim(),!He||ze[He]&&ae[He]||(He==="set-cookie"?ze[He]?ze[He].push(Me):ze[He]=[Me]:ze[He]=ze[He]?ze[He]+", "+Me:Me)}),ze})(oe),pe):oe!=null&&xe(pe,oe,be),this}get(oe,pe){if(oe=Ee(oe)){const be=Ae.findKey(this,oe);if(be){const Te=this[be];if(!pe)return Te;if(pe===!0)return function(xe){const Ie=Object.create(null),Fe=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let ze;for(;ze=Fe.exec(xe);)Ie[ze[1]]=ze[2];return Ie}(Te);if(Ae.isFunction(pe))return pe.call(this,Te,be);if(Ae.isRegExp(pe))return pe.exec(Te);throw new TypeError("parser must be boolean|regexp|function")}}}has(oe,pe){if(oe=Ee(oe)){const be=Ae.findKey(this,oe);return!(!be||this[be]===void 0||pe&&!tt(0,this[be],be,pe))}return!1}delete(oe,pe){const be=this;let Te=!1;function xe(Ie){if(Ie=Ee(Ie)){const Fe=Ae.findKey(be,Ie);!Fe||pe&&!tt(0,be[Fe],Fe,pe)||(delete be[Fe],Te=!0)}}return Ae.isArray(oe)?oe.forEach(xe):xe(oe),Te}clear(oe){const pe=Object.keys(this);let be=pe.length,Te=!1;for(;be--;){const xe=pe[be];oe&&!tt(0,this[xe],xe,oe,!0)||(delete this[xe],Te=!0)}return Te}normalize(oe){const pe=this,be={};return Ae.forEach(this,(Te,xe)=>{const Ie=Ae.findKey(be,xe);if(Ie)return pe[Ie]=Ce(Te),void delete pe[xe];const Fe=oe?function(ze){return ze.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(He,Me,rt)=>Me.toUpperCase()+rt)}(xe):String(xe).trim();Fe!==xe&&delete pe[xe],pe[Fe]=Ce(Te),be[Fe]=!0}),this}concat(...oe){return this.constructor.concat(this,...oe)}toJSON(oe){const pe=Object.create(null);return Ae.forEach(this,(be,Te)=>{be!=null&&be!==!1&&(pe[Te]=oe&&Ae.isArray(be)?be.join(", "):be)}),pe}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([oe,pe])=>oe+": "+pe).join(`
5
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(oe){return oe instanceof this?oe:new this(oe)}static concat(oe,...pe){const be=new this(oe);return pe.forEach(Te=>be.set(Te)),be}static accessor(oe){const pe=(this[ve]=this[ve]={accessors:{}}).accessors,be=this.prototype;function Te(xe){const Ie=Ee(xe);pe[Ie]||(function(Fe,ze){const He=Ae.toCamelCase(" "+ze);["get","set","has"].forEach(Me=>{Object.defineProperty(Fe,Me+He,{value:function(rt,We,ft){return this[Me].call(this,ze,rt,We,ft)},configurable:!0})})}(be,xe),pe[Ie]=!0)}return Ae.isArray(oe)?oe.forEach(Te):Te(oe),this}}mt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ae.reduceDescriptors(mt.prototype,({value:K},oe)=>{let pe=oe[0].toUpperCase()+oe.slice(1);return{get:()=>K,set(be){this[pe]=be}}}),Ae.freezeMethods(mt);var ot=mt;function wt(K,oe){const pe=this||j,be=oe||pe,Te=ot.from(be.headers);let xe=be.data;return Ae.forEach(K,function(Ie){xe=Ie.call(pe,xe,Te.normalize(),oe?oe.status:void 0)}),Te.normalize(),xe}function yt(K){return!(!K||!K.__CANCEL__)}function on(K,oe,pe){Ye.call(this,K??"canceled",Ye.ERR_CANCELED,oe,pe),this.name="CanceledError"}Ae.inherits(on,Ye,{__CANCEL__:!0});var Zn=zt.hasStandardBrowserEnv?{write(K,oe,pe,be,Te,xe){const Ie=[K+"="+encodeURIComponent(oe)];Ae.isNumber(pe)&&Ie.push("expires="+new Date(pe).toGMTString()),Ae.isString(be)&&Ie.push("path="+be),Ae.isString(Te)&&Ie.push("domain="+Te),xe===!0&&Ie.push("secure"),document.cookie=Ie.join("; ")},read(K){const oe=document.cookie.match(new RegExp("(^|;\\s*)("+K+")=([^;]*)"));return oe?decodeURIComponent(oe[3]):null},remove(K){this.write(K,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Vn(K,oe){return K&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(oe)?function(pe,be){return be?pe.replace(/\/+$/,"")+"/"+be.replace(/^\/+/,""):pe}(K,oe):oe}var ne=zt.hasStandardBrowserEnv?function(){const K=/(msie|trident)/i.test(navigator.userAgent),oe=document.createElement("a");let pe;function be(Te){let xe=Te;return K&&(oe.setAttribute("href",xe),xe=oe.href),oe.setAttribute("href",xe),{href:oe.href,protocol:oe.protocol?oe.protocol.replace(/:$/,""):"",host:oe.host,search:oe.search?oe.search.replace(/^\?/,""):"",hash:oe.hash?oe.hash.replace(/^#/,""):"",hostname:oe.hostname,port:oe.port,pathname:oe.pathname.charAt(0)==="/"?oe.pathname:"/"+oe.pathname}}return pe=be(window.location.href),function(Te){const xe=Ae.isString(Te)?be(Te):Te;return xe.protocol===pe.protocol&&xe.host===pe.host}}():function(){return!0};function ce(K,oe){let pe=0;const be=function(Te,xe){Te=Te||10;const Ie=new Array(Te),Fe=new Array(Te);let ze,He=0,Me=0;return xe=xe!==void 0?xe:1e3,function(rt){const We=Date.now(),ft=Fe[Me];ze||(ze=We),Ie[He]=rt,Fe[He]=We;let Je=Me,bt=0;for(;Je!==He;)bt+=Ie[Je++],Je%=Te;if(He=(He+1)%Te,He===Me&&(Me=(Me+1)%Te),We-ze<xe)return;const Bt=ft&&We-ft;return Bt?Math.round(1e3*bt/Bt):void 0}}(50,250);return Te=>{const xe=Te.loaded,Ie=Te.lengthComputable?Te.total:void 0,Fe=xe-pe,ze=be(Fe);pe=xe;const He={loaded:xe,total:Ie,progress:Ie?xe/Ie:void 0,bytes:Fe,rate:ze||void 0,estimated:ze&&Ie&&xe<=Ie?(Ie-xe)/ze:void 0,event:Te};He[oe?"download":"upload"]=!0,K(He)}}const le={http:null,xhr:typeof XMLHttpRequest<"u"&&function(K){return new Promise(function(oe,pe){let be=K.data;const Te=ot.from(K.headers).normalize();let xe,Ie,{responseType:Fe,withXSRFToken:ze}=K;function He(){K.cancelToken&&K.cancelToken.unsubscribe(xe),K.signal&&K.signal.removeEventListener("abort",xe)}if(Ae.isFormData(be)){if(zt.hasStandardBrowserEnv||zt.hasStandardBrowserWebWorkerEnv)Te.setContentType(!1);else if((Ie=Te.getContentType())!==!1){const[Je,...bt]=Ie?Ie.split(";").map(Bt=>Bt.trim()).filter(Boolean):[];Te.setContentType([Je||"multipart/form-data",...bt].join("; "))}}let Me=new XMLHttpRequest;if(K.auth){const Je=K.auth.username||"",bt=K.auth.password?unescape(encodeURIComponent(K.auth.password)):"";Te.set("Authorization","Basic "+btoa(Je+":"+bt))}const rt=Vn(K.baseURL,K.url);function We(){if(!Me)return;const Je=ot.from("getAllResponseHeaders"in Me&&Me.getAllResponseHeaders());(function(bt,Bt,Yt){const Kn=Yt.config.validateStatus;Yt.status&&Kn&&!Kn(Yt.status)?Bt(new Ye("Request failed with status code "+Yt.status,[Ye.ERR_BAD_REQUEST,Ye.ERR_BAD_RESPONSE][Math.floor(Yt.status/100)-4],Yt.config,Yt.request,Yt)):bt(Yt)})(function(bt){oe(bt),He()},function(bt){pe(bt),He()},{data:Fe&&Fe!=="text"&&Fe!=="json"?Me.response:Me.responseText,status:Me.status,statusText:Me.statusText,headers:Je,config:K,request:Me}),Me=null}if(Me.open(K.method.toUpperCase(),Ft(rt,K.params,K.paramsSerializer),!0),Me.timeout=K.timeout,"onloadend"in Me?Me.onloadend=We:Me.onreadystatechange=function(){Me&&Me.readyState===4&&(Me.status!==0||Me.responseURL&&Me.responseURL.indexOf("file:")===0)&&setTimeout(We)},Me.onabort=function(){Me&&(pe(new Ye("Request aborted",Ye.ECONNABORTED,K,Me)),Me=null)},Me.onerror=function(){pe(new Ye("Network Error",Ye.ERR_NETWORK,K,Me)),Me=null},Me.ontimeout=function(){let Je=K.timeout?"timeout of "+K.timeout+"ms exceeded":"timeout exceeded";const bt=K.transitional||Zt;K.timeoutErrorMessage&&(Je=K.timeoutErrorMessage),pe(new Ye(Je,bt.clarifyTimeoutError?Ye.ETIMEDOUT:Ye.ECONNABORTED,K,Me)),Me=null},zt.hasStandardBrowserEnv&&(ze&&Ae.isFunction(ze)&&(ze=ze(K)),ze||ze!==!1&&ne(rt))){const Je=K.xsrfHeaderName&&K.xsrfCookieName&&Zn.read(K.xsrfCookieName);Je&&Te.set(K.xsrfHeaderName,Je)}be===void 0&&Te.setContentType(null),"setRequestHeader"in Me&&Ae.forEach(Te.toJSON(),function(Je,bt){Me.setRequestHeader(bt,Je)}),Ae.isUndefined(K.withCredentials)||(Me.withCredentials=!!K.withCredentials),Fe&&Fe!=="json"&&(Me.responseType=K.responseType),typeof K.onDownloadProgress=="function"&&Me.addEventListener("progress",ce(K.onDownloadProgress,!0)),typeof K.onUploadProgress=="function"&&Me.upload&&Me.upload.addEventListener("progress",ce(K.onUploadProgress)),(K.cancelToken||K.signal)&&(xe=Je=>{Me&&(pe(!Je||Je.type?new on(null,K,Me):Je),Me.abort(),Me=null)},K.cancelToken&&K.cancelToken.subscribe(xe),K.signal&&(K.signal.aborted?xe():K.signal.addEventListener("abort",xe)));const ft=function(Je){const bt=/^([-+\w]{1,25})(:?\/\/|:)/.exec(Je);return bt&&bt[1]||""}(rt);ft&&zt.protocols.indexOf(ft)===-1?pe(new Ye("Unsupported protocol "+ft+":",Ye.ERR_BAD_REQUEST,K)):Me.send(be||null)})}};Ae.forEach(le,(K,oe)=>{if(K){try{Object.defineProperty(K,"name",{value:oe})}catch{}Object.defineProperty(K,"adapterName",{value:oe})}});const ke=K=>`- ${K}`,ge=K=>Ae.isFunction(K)||K===null||K===!1;var Se=K=>{K=Ae.isArray(K)?K:[K];const{length:oe}=K;let pe,be;const Te={};for(let xe=0;xe<oe;xe++){let Ie;if(pe=K[xe],be=pe,!ge(pe)&&(be=le[(Ie=String(pe)).toLowerCase()],be===void 0))throw new Ye(`Unknown adapter '${Ie}'`);if(be)break;Te[Ie||"#"+xe]=be}if(!be){const xe=Object.entries(Te).map(([Ie,Fe])=>`adapter ${Ie} `+(Fe===!1?"is not supported by the environment":"is not available in the build"));throw new Ye("There is no suitable adapter to dispatch the request "+(oe?xe.length>1?`since :
6
+ `+xe.map(ke).join(`
7
+ `):" "+ke(xe[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return be};function $e(K){if(K.cancelToken&&K.cancelToken.throwIfRequested(),K.signal&&K.signal.aborted)throw new on(null,K)}function Ne(K){return $e(K),K.headers=ot.from(K.headers),K.data=wt.call(K,K.transformRequest),["post","put","patch"].indexOf(K.method)!==-1&&K.headers.setContentType("application/x-www-form-urlencoded",!1),Se(K.adapter||j.adapter)(K).then(function(oe){return $e(K),oe.data=wt.call(K,K.transformResponse,oe),oe.headers=ot.from(oe.headers),oe},function(oe){return yt(oe)||($e(K),oe&&oe.response&&(oe.response.data=wt.call(K,K.transformResponse,oe.response),oe.response.headers=ot.from(oe.response.headers))),Promise.reject(oe)})}const qe=K=>K instanceof ot?K.toJSON():K;function Be(K,oe){oe=oe||{};const pe={};function be(He,Me,rt){return Ae.isPlainObject(He)&&Ae.isPlainObject(Me)?Ae.merge.call({caseless:rt},He,Me):Ae.isPlainObject(Me)?Ae.merge({},Me):Ae.isArray(Me)?Me.slice():Me}function Te(He,Me,rt){return Ae.isUndefined(Me)?Ae.isUndefined(He)?void 0:be(void 0,He,rt):be(He,Me,rt)}function xe(He,Me){if(!Ae.isUndefined(Me))return be(void 0,Me)}function Ie(He,Me){return Ae.isUndefined(Me)?Ae.isUndefined(He)?void 0:be(void 0,He):be(void 0,Me)}function Fe(He,Me,rt){return rt in oe?be(He,Me):rt in K?be(void 0,He):void 0}const ze={url:xe,method:xe,data:xe,baseURL:Ie,transformRequest:Ie,transformResponse:Ie,paramsSerializer:Ie,timeout:Ie,timeoutMessage:Ie,withCredentials:Ie,withXSRFToken:Ie,adapter:Ie,responseType:Ie,xsrfCookieName:Ie,xsrfHeaderName:Ie,onUploadProgress:Ie,onDownloadProgress:Ie,decompress:Ie,maxContentLength:Ie,maxBodyLength:Ie,beforeRedirect:Ie,transport:Ie,httpAgent:Ie,httpsAgent:Ie,cancelToken:Ie,socketPath:Ie,responseEncoding:Ie,validateStatus:Fe,headers:(He,Me)=>Te(qe(He),qe(Me),!0)};return Ae.forEach(Object.keys(Object.assign({},K,oe)),function(He){const Me=ze[He]||Te,rt=Me(K[He],oe[He],He);Ae.isUndefined(rt)&&Me!==Fe||(pe[He]=rt)}),pe}const Le={};["object","boolean","number","function","string","symbol"].forEach((K,oe)=>{Le[K]=function(pe){return typeof pe===K||"a"+(oe<1?"n ":" ")+K}});const je={};Le.transitional=function(K,oe,pe){function be(Te,xe){return"[Axios v1.6.2] Transitional option '"+Te+"'"+xe+(pe?". "+pe:"")}return(Te,xe,Ie)=>{if(K===!1)throw new Ye(be(xe," has been removed"+(oe?" in "+oe:"")),Ye.ERR_DEPRECATED);return oe&&!je[xe]&&(je[xe]=!0,console.warn(be(xe," has been deprecated since v"+oe+" and will be removed in the near future"))),!K||K(Te,xe,Ie)}};var Ze={assertOptions:function(K,oe,pe){if(typeof K!="object")throw new Ye("options must be an object",Ye.ERR_BAD_OPTION_VALUE);const be=Object.keys(K);let Te=be.length;for(;Te-- >0;){const xe=be[Te],Ie=oe[xe];if(Ie){const Fe=K[xe],ze=Fe===void 0||Ie(Fe,xe,K);if(ze!==!0)throw new Ye("option "+xe+" must be "+ze,Ye.ERR_BAD_OPTION_VALUE)}else if(pe!==!0)throw new Ye("Unknown option "+xe,Ye.ERR_BAD_OPTION)}},validators:Le};const nt=Ze.validators;class at{constructor(oe){this.defaults=oe,this.interceptors={request:new rn,response:new rn}}request(oe,pe){typeof oe=="string"?(pe=pe||{}).url=oe:pe=oe||{},pe=Be(this.defaults,pe);const{transitional:be,paramsSerializer:Te,headers:xe}=pe;be!==void 0&&Ze.assertOptions(be,{silentJSONParsing:nt.transitional(nt.boolean),forcedJSONParsing:nt.transitional(nt.boolean),clarifyTimeoutError:nt.transitional(nt.boolean)},!1),Te!=null&&(Ae.isFunction(Te)?pe.paramsSerializer={serialize:Te}:Ze.assertOptions(Te,{encode:nt.function,serialize:nt.function},!0)),pe.method=(pe.method||this.defaults.method||"get").toLowerCase();let Ie=xe&&Ae.merge(xe.common,xe[pe.method]);xe&&Ae.forEach(["delete","get","head","post","put","patch","common"],Je=>{delete xe[Je]}),pe.headers=ot.concat(Ie,xe);const Fe=[];let ze=!0;this.interceptors.request.forEach(function(Je){typeof Je.runWhen=="function"&&Je.runWhen(pe)===!1||(ze=ze&&Je.synchronous,Fe.unshift(Je.fulfilled,Je.rejected))});const He=[];let Me;this.interceptors.response.forEach(function(Je){He.push(Je.fulfilled,Je.rejected)});let rt,We=0;if(!ze){const Je=[Ne.bind(this),void 0];for(Je.unshift.apply(Je,Fe),Je.push.apply(Je,He),rt=Je.length,Me=Promise.resolve(pe);We<rt;)Me=Me.then(Je[We++],Je[We++]);return Me}rt=Fe.length;let ft=pe;for(We=0;We<rt;){const Je=Fe[We++],bt=Fe[We++];try{ft=Je(ft)}catch(Bt){bt.call(this,Bt);break}}try{Me=Ne.call(this,ft)}catch(Je){return Promise.reject(Je)}for(We=0,rt=He.length;We<rt;)Me=Me.then(He[We++],He[We++]);return Me}getUri(oe){return Ft(Vn((oe=Be(this.defaults,oe)).baseURL,oe.url),oe.params,oe.paramsSerializer)}}Ae.forEach(["delete","get","head","options"],function(K){at.prototype[K]=function(oe,pe){return this.request(Be(pe||{},{method:K,url:oe,data:(pe||{}).data}))}}),Ae.forEach(["post","put","patch"],function(K){function oe(pe){return function(be,Te,xe){return this.request(Be(xe||{},{method:K,headers:pe?{"Content-Type":"multipart/form-data"}:{},url:be,data:Te}))}}at.prototype[K]=oe(),at.prototype[K+"Form"]=oe(!0)});var It=at;class Qt{constructor(oe){if(typeof oe!="function")throw new TypeError("executor must be a function.");let pe;this.promise=new Promise(function(Te){pe=Te});const be=this;this.promise.then(Te=>{if(!be._listeners)return;let xe=be._listeners.length;for(;xe-- >0;)be._listeners[xe](Te);be._listeners=null}),this.promise.then=Te=>{let xe;const Ie=new Promise(Fe=>{be.subscribe(Fe),xe=Fe}).then(Te);return Ie.cancel=function(){be.unsubscribe(xe)},Ie},oe(function(Te,xe,Ie){be.reason||(be.reason=new on(Te,xe,Ie),pe(be.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(oe){this.reason?oe(this.reason):this._listeners?this._listeners.push(oe):this._listeners=[oe]}unsubscribe(oe){if(!this._listeners)return;const pe=this._listeners.indexOf(oe);pe!==-1&&this._listeners.splice(pe,1)}static source(){let oe;return{token:new Qt(function(pe){oe=pe}),cancel:oe}}}var hn=Qt;const xn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(xn).forEach(([K,oe])=>{xn[oe]=K});var Gn=xn;const Et=function K(oe){const pe=new It(oe),be=c(It.prototype.request,pe);return Ae.extend(be,It.prototype,pe,{allOwnKeys:!0}),Ae.extend(be,pe,null,{allOwnKeys:!0}),be.create=function(Te){return K(Be(oe,Te))},be}(j);Et.Axios=It,Et.CanceledError=on,Et.CancelToken=hn,Et.isCancel=yt,Et.VERSION="1.6.2",Et.toFormData=ut,Et.AxiosError=Ye,Et.Cancel=Et.CanceledError,Et.all=function(K){return Promise.all(K)},Et.spread=function(K){return function(oe){return K.apply(null,oe)}},Et.isAxiosError=function(K){return Ae.isObject(K)&&K.isAxiosError===!0},Et.mergeConfig=Be,Et.AxiosHeaders=ot,Et.formToJSON=K=>X(Ae.isHTMLForm(K)?new FormData(K):K),Et.getAdapter=Se,Et.HttpStatusCode=Gn,Et.default=Et,f.exports=Et},147:f=>{f.exports=JSON.parse('{"name":"@pikaz/location","version":"1.0.9","description":"used to obtain location from the browser","private":false,"main":"lib/pikazLocation.js","module":"lib/pikazLocationModule.js","scripts":{"compress":"node utils/compress.js","analysisip":"node utils/analysisIp.js","build":"webpack && webpack --config module.config.js"},"keywords":["geolocation","location","longitude","latitude","province","city","district"],"files":["lib"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/pikaz-18/pikaz-location.git"},"author":"pikaz","license":"MIT","bugs":{"url":"https://github.com/pikaz-18/pikaz-location/issues"},"homepage":"https://github.com/pikaz-18/pikaz-location#readme","devDependencies":{"clean-webpack-plugin":"^4.0.0","copy-webpack-plugin":"^10.2.0","object-hash":"^3.0.0","webpack":"^5.65.0","webpack-cli":"^4.9.1"},"dependencies":{"axios":"^1.6.2","localforage":"^1.10.0","lz-string":"^1.4.4","point-in-polygon":"^1.1.0"},"fileDate":{"areaList":"202212301139","city":"202212301139","district":"202212301139","ip":"2024532110","province":"202317042"},"fileCode":{"areaList":"64b5a33f94b14ae208fca152fdc89dca1048360a","city":"7827eb2bc906b83df109ab24242ce68f98f9558b","district":"14d77ce6236e2025a4b1e3900cc70d0c32a62d0b","ip":"befa0a8a45fdc238a0fb4e4a3011dae43a06c1b4","province":"629a3c20a32e0de95e0633e0385234e2b7886c2d"}}')}},I={};function D(f){var k=I[f];if(k!==void 0)return k.exports;var i=I[f]={exports:{}};return N[f](i,i.exports,D),i.exports}return D.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),D(138)})()}},t$1={};function n$1(O){var N=t$1[O];if(N!==void 0)return N.exports;var I=t$1[O]={exports:{}};return e$2[O].call(I.exports,I,I.exports,n$1),I.exports}n$1.n=O=>{var N=O&&O.__esModule?()=>O.default:()=>O;return n$1.d(N,{a:N}),N},n$1.d=(O,N)=>{for(var I in N)n$1.o(N,I)&&!n$1.o(O,I)&&Object.defineProperty(O,I,{enumerable:!0,get:N[I]})},n$1.o=(O,N)=>Object.prototype.hasOwnProperty.call(O,N);var r={};(()=>{n$1.d(r,{v6:()=>O.setConfig,k$:()=>O.getLocation,SG:()=>O.getH5Location,Qf:()=>O.getIpLocation,Mc:()=>O.searchList,kr:()=>O.searchCodeAddress,Gp:()=>O.searchAddress,I5:()=>O.searchCodeDetail,ZP:()=>N});var O=n$1(782);const N={setConfig:O.setConfig,getLocation:O.getLocation,getH5Location:O.getH5Location,getIpLocation:O.getIpLocation,searchList:O.searchList,searchCodeAddress:O.searchCodeAddress,searchAddress:O.searchAddress,searchCodeDetail:O.searchCodeDetail}})(),r.ZP,r.SG,r.Qf,r.k$,r.Gp,r.kr,r.I5,r.Mc,r.v6;const createMutedAudioStream=O=>{const N=O.createOscillator();N.type="sine",N.frequency.setValueAtTime(0,O.currentTime);const I=O.createGain();I.gain.value=0,N.connect(I),I.connect(O.destination),N.start();const D=O.createMediaStreamDestination();return I.disconnect(),N.connect(D),D.stream},createFakeVideoStream=(O=10,N=10,I=30)=>{const D=document.createElement("canvas"),f=D.getContext("2d");D.width=O,D.height=N;let k=0;return setInterval(()=>{f.clearRect(0,0,D.width,D.height);const $=f.createLinearGradient(0,0,D.width,D.height);$.addColorStop(0,`hsla(${k}, 100%, 50%, 0)`),$.addColorStop(1,`hsla(${k+120}, 100%, 50%, 0)`),f.fillStyle=$,f.fillRect(0,0,D.width,D.height),k=(k+1)%360},100),D.captureStream(I)};class NetworkQualityTester{constructor(N=[]){_e(this,"targetUrls",[]);_e(this,"results",[]);N.length===0&&N.push("https://api.pryun.vip/favicon-32x32.png"),this.targetUrls=N,this.results=[]}async testAll(){const N=this.targetUrls.map(I=>this.testUrl(I));return await Promise.all(N),this.analyzeResults()}async testUrl(N){const I=performance.now();let D=0,f=!1;try{await fetch(N,{method:"HEAD",cache:"no-store"});const k=performance.now()-I,i=performance.now(),$=await(await fetch(N,{cache:"no-store"})).blob(),C=performance.now()-i;D=$.size,f=!0,this.results.push({url:N,success:f,headTime:k,getTime:C,size:D,downloadSpeed:D>0?(D/1024/(C/1e3)).toFixed(2):0,totalTime:performance.now()-I})}catch(k){this.results.push({url:N,success:!1,error:k.message,totalTime:performance.now()-I})}}analyzeResults(){const N=this.results.filter(k=>k.success);if(N.length===0)return{overallSuccess:!1,message:"所有测试均失败"};const I=N.reduce((k,i)=>k+i.size,0),D=N.reduce((k,i)=>k+i.totalTime,0),f=N.reduce((k,i)=>k+parseFloat(i.downloadSpeed),0)/N.length;return{overallSuccess:!0,totalTests:this.results.length,successfulTests:N.length,averageDownloadSpeed:`${f.toFixed(2)} KB/s`,averageResponseTime:`${(D/N.length).toFixed(2)}ms`,totalDataTransferred:`${(I/1024).toFixed(2)} KB`,detailedResults:this.results}}}var lib={},ebml={},EBML={},hasRequiredEBML;function requireEBML(){return hasRequiredEBML||(hasRequiredEBML=1,Object.defineProperty(EBML,"__esModule",{value:!0})),EBML}var EBMLDecoder={},int64Buffer={},hasRequiredInt64Buffer;function requireInt64Buffer(){return hasRequiredInt64Buffer||(hasRequiredInt64Buffer=1,function(O){(function(N){var I="undefined",D=I!==typeof Buffer&&Buffer,f=I!==typeof Uint8Array&&Uint8Array,k=I!==typeof ArrayBuffer&&ArrayBuffer,i=[0,0,0,0,0,0,0,0],c=Array.isArray||se,$=4294967296,C=16777216,M;Z("Uint64BE",!0,!0),Z("Int64BE",!0,!1),Z("Uint64LE",!1,!0),Z("Int64LE",!1,!1);function Z(ue,he,we){var fe=he?0:4,me=he?4:0,Re=he?0:3,Ue=he?1:2,Pe=he?2:1,De=he?3:0,vt=he?ie:re,_t=he?ye:de,St=ct.prototype,Mt="is"+ue,At="_"+Mt;return St.buffer=void 0,St.offset=0,St[At]=!0,St.toNumber=Ae,St.toString=Ye,St.toJSON=Ae,St.toArray=J,D&&(St.toBuffer=z),f&&(St.toArrayBuffer=Q),ct[Mt]=Qe,N[ue]=ct,ct;function ct(Ke,Ve,Xe,et){return this instanceof ct?Lt(this,Ke,Ve,Xe,et):new ct(Ke,Ve,Xe,et)}function Qe(Ke){return!!(Ke&&Ke[At])}function Lt(Ke,Ve,Xe,et,ut){if(f&&k&&(Ve instanceof k&&(Ve=new f(Ve)),et instanceof k&&(et=new f(et))),!Ve&&!Xe&&!et&&!M){Ke.buffer=te(i,0);return}if(!ee(Ve,Xe)){var Tt=M||Array;ut=Xe,et=Ve,Xe=0,Ve=M===D?D.alloc(8):new Tt(8)}Ke.buffer=Ve,Ke.offset=Xe|=0,I!==typeof et&&(typeof et=="string"?gt(Ve,Xe,et,ut||10):ee(et,ut)?Y(Ve,Xe,et,ut):typeof ut=="number"?(qt(Ve,Xe+fe,et),qt(Ve,Xe+me,ut)):et>0?vt(Ve,Xe,et):et<0?_t(Ve,Xe,et):Y(Ve,Xe,i,0))}function gt(Ke,Ve,Xe,et){var ut=0,Tt=Xe.length,Ct=0,Dt=0;Xe[0]==="-"&&ut++;for(var Ht=ut;ut<Tt;){var Ft=parseInt(Xe[ut++],et);if(!(Ft>=0))break;Dt=Dt*et+Ft,Ct=Ct*et+Math.floor(Dt/$),Dt%=$}Ht&&(Ct=~Ct,Dt?Dt=$-Dt:Ct++),qt(Ke,Ve+fe,Ct),qt(Ke,Ve+me,Dt)}function Ae(){var Ke=this.buffer,Ve=this.offset,Xe=Ot(Ke,Ve+fe),et=Ot(Ke,Ve+me);return we||(Xe|=0),Xe?Xe*$+et:et}function Ye(Ke){var Ve=this.buffer,Xe=this.offset,et=Ot(Ve,Xe+fe),ut=Ot(Ve,Xe+me),Tt="",Ct=!we&&et&2147483648;for(Ct&&(et=~et,ut=$-ut),Ke=Ke||10;;){var Dt=et%Ke*$+ut;if(et=Math.floor(et/Ke),ut=Math.floor(Dt/Ke),Tt=(Dt%Ke).toString(Ke)+Tt,!et&&!ut)break}return Ct&&(Tt="-"+Tt),Tt}function qt(Ke,Ve,Xe){Ke[Ve+De]=Xe&255,Xe=Xe>>8,Ke[Ve+Pe]=Xe&255,Xe=Xe>>8,Ke[Ve+Ue]=Xe&255,Xe=Xe>>8,Ke[Ve+Re]=Xe&255}function Ot(Ke,Ve){return Ke[Ve+Re]*C+(Ke[Ve+Ue]<<16)+(Ke[Ve+Pe]<<8)+Ke[Ve+De]}}function J(ue){var he=this.buffer,we=this.offset;return M=null,ue!==!1&&c(he)?he.length===8?he:he.slice(we,we+8):te(he,we)}function z(ue){var he=this.buffer,we=this.offset;return M=D,ue!==!1&&D.isBuffer(he)?he.length===8?he:he.slice(we,we+8):D.from(Q.call(this,ue))}function Q(ue){var he=this.buffer,we=this.offset,fe=he.buffer;if(M=f,ue!==!1&&!he.offset&&fe instanceof k)return fe.byteLength===8?fe:fe.slice(we,we+8);var me=new f(8);return Y(me,0,he,we),me.buffer}function ee(ue,he){var we=ue&&ue.length;return he|=0,we&&he+8<=we&&typeof ue[he]!="string"}function Y(ue,he,we,fe){he|=0,fe|=0;for(var me=0;me<8;me++)ue[he++]=we[fe++]&255}function te(ue,he){return Array.prototype.slice.call(ue,he,he+8)}function ie(ue,he,we){for(var fe=he+8;fe>he;)ue[--fe]=we&255,we/=256}function ye(ue,he,we){var fe=he+8;for(we++;fe>he;)ue[--fe]=-we&255^255,we/=256}function re(ue,he,we){for(var fe=he+8;he<fe;)ue[he++]=we&255,we/=256}function de(ue,he,we){var fe=he+8;for(we++;he<fe;)ue[he++]=-we&255^255,we/=256}function se(ue){return!!ue&&Object.prototype.toString.call(ue)=="[object Array]"}})(typeof O.nodeName!="string"?O:int64Buffer||{})}(int64Buffer)),int64Buffer}var tools={},EBMLEncoder={},ebmlID={},hasRequiredEbmlID;function requireEbmlID(){return hasRequiredEbmlID||(hasRequiredEbmlID=1,Object.defineProperty(ebmlID,"__esModule",{value:!0}),ebmlID.byEbmlID=void 0,ebmlID.byEbmlID={128:{name:"ChapterDisplay",level:4,type:"m",multiple:!0,minver:1,webm:!0,description:"Contains all possible strings to use for the chapter display."},131:{name:"TrackType",level:3,type:"u",mandatory:!0,minver:1,range:"1-254",description:"A set of track types coded on 8 bits (1: video, 2: audio, 3: complex, 0x10: logo, 0x11: subtitle, 0x12: buttons, 0x20: control)."},133:{name:"ChapString",cppname:"ChapterString",level:5,type:"8",mandatory:!0,minver:1,webm:!0,description:"Contains the string to use as the chapter atom."},134:{name:"CodecID",level:3,type:"s",mandatory:!0,minver:1,description:"An ID corresponding to the codec, see the codec page for more info."},136:{name:"FlagDefault",cppname:"TrackFlagDefault",level:3,type:"u",mandatory:!0,minver:1,default:1,range:"0-1",description:"Set if that track (audio, video or subs) SHOULD be active if no language found matches the user preference. (1 bit)"},137:{name:"ChapterTrackNumber",level:5,type:"u",mandatory:!0,multiple:!0,minver:1,webm:!1,range:"not 0",description:"UID of the Track to apply this chapter too. In the absense of a control track, choosing this chapter will select the listed Tracks and deselect unlisted tracks. Absense of this element indicates that the Chapter should be applied to any currently used Tracks."},145:{name:"ChapterTimeStart",level:4,type:"u",mandatory:!0,minver:1,webm:!0,description:"Timestamp of the start of Chapter (not scaled)."},146:{name:"ChapterTimeEnd",level:4,type:"u",minver:1,webm:!1,description:"Timestamp of the end of Chapter (timestamp excluded, not scaled)."},150:{name:"CueRefTime",level:5,type:"u",mandatory:!0,minver:2,webm:!1,description:"Timestamp of the referenced Block."},151:{name:"CueRefCluster",level:5,type:"u",mandatory:!0,webm:!1,description:"The Position of the Cluster containing the referenced Block."},152:{name:"ChapterFlagHidden",level:4,type:"u",mandatory:!0,minver:1,webm:!1,default:0,range:"0-1",description:"If a chapter is hidden (1), it should not be available to the user interface (but still to Control Tracks; see flag notes). (1 bit)"},16980:{name:"ContentCompAlgo",level:6,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"The compression algorithm used. Algorithms that have been specified so far are: 0 - zlib, 3 - Header Stripping"},16981:{name:"ContentCompSettings",level:6,type:"b",minver:1,webm:!1,description:"Settings that might be needed by the decompressor. For Header Stripping (ContentCompAlgo=3), the bytes that were removed from the beggining of each frames of the track."},17026:{name:"DocType",level:1,type:"s",mandatory:!0,default:"matroska",minver:1,description:"A string that describes the type of document that follows this EBML header. 'matroska' in our case or 'webm' for webm files."},17029:{name:"DocTypeReadVersion",level:1,type:"u",mandatory:!0,default:1,minver:1,description:"The minimum DocType version an interpreter has to support to read this file."},17030:{name:"EBMLVersion",level:1,type:"u",mandatory:!0,default:1,minver:1,description:"The version of EBML parser used to create the file."},17031:{name:"DocTypeVersion",level:1,type:"u",mandatory:!0,default:1,minver:1,description:"The version of DocType interpreter used to create the file."},17476:{name:"SegmentFamily",level:2,type:"b",multiple:!0,minver:1,webm:!1,bytesize:16,description:"A randomly generated unique ID that all segments related to each other must use (128 bits)."},17505:{name:"DateUTC",level:2,type:"d",minver:1,description:"Date of the origin of timestamp (value 0), i.e. production date."},17540:{name:"TagDefault",level:4,type:"u",mandatory:!0,minver:1,webm:!1,default:1,range:"0-1",description:"Indication to know if this is the default/original language to use for the given tag. (1 bit)"},17541:{name:"TagBinary",level:4,type:"b",minver:1,webm:!1,description:"The values of the Tag if it is binary. Note that this cannot be used in the same SimpleTag as TagString."},17543:{name:"TagString",level:4,type:"8",minver:1,webm:!1,description:"The value of the Element."},17545:{name:"Duration",level:2,type:"f",minver:1,range:"> 0",description:"Duration of the segment (based on TimecodeScale)."},17816:{name:"ChapterFlagEnabled",level:4,type:"u",mandatory:!0,minver:1,webm:!1,default:1,range:"0-1",description:"Specify wether the chapter is enabled. It can be enabled/disabled by a Control Track. When disabled, the movie should skip all the content between the TimeStart and TimeEnd of this chapter (see flag notes). (1 bit)"},18016:{name:"FileMimeType",level:3,type:"s",mandatory:!0,minver:1,webm:!1,description:"MIME type of the file."},18017:{name:"FileUsedStartTime",level:3,type:"u",divx:!0,description:"DivX font extension"},18018:{name:"FileUsedEndTime",level:3,type:"u",divx:!0,description:"DivX font extension"},18037:{name:"FileReferral",level:3,type:"b",webm:!1,description:"A binary value that a track/codec can refer to when the attachment is needed."},20529:{name:"ContentEncodingOrder",level:5,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"Tells when this modification was used during encoding/muxing starting with 0 and counting upwards. The decoder/demuxer has to start with the highest order number it finds and work its way down. This value has to be unique over all ContentEncodingOrder elements in the segment."},20530:{name:"ContentEncodingScope",level:5,type:"u",mandatory:!0,minver:1,webm:!1,default:1,range:"not 0",description:"A bit field that describes which elements have been modified in this way. Values (big endian) can be OR'ed. Possible values: 1 - all frame contents, 2 - the track's private data, 4 - the next ContentEncoding (next ContentEncodingOrder. Either the data inside ContentCompression and/or ContentEncryption)"},20531:{name:"ContentEncodingType",level:5,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"A value describing what kind of transformation has been done. Possible values: 0 - compression, 1 - encryption"},20532:{name:"ContentCompression",level:5,type:"m",minver:1,webm:!1,description:"Settings describing the compression used. Must be present if the value of ContentEncodingType is 0 and absent otherwise. Each block must be decompressable even if no previous block is available in order not to prevent seeking."},20533:{name:"ContentEncryption",level:5,type:"m",minver:1,webm:!1,description:"Settings describing the encryption used. Must be present if the value of ContentEncodingType is 1 and absent otherwise."},21368:{name:"CueBlockNumber",level:4,type:"u",minver:1,default:1,range:"not 0",description:"Number of the Block in the specified Cluster."},22100:{name:"ChapterStringUID",level:4,type:"8",mandatory:!1,minver:3,webm:!0,description:"A unique string ID to identify the Chapter. Use for WebVTT cue identifier storage."},22337:{name:"WritingApp",level:2,type:"8",mandatory:!0,minver:1,description:'Writing application ("mkvmerge-0.3.3").'},22612:{name:"SilentTracks",cppname:"ClusterSilentTracks",level:2,type:"m",minver:1,webm:!1,description:"The list of tracks that are not used in that part of the stream. It is useful when using overlay tracks on seeking. Then you should decide what track to use."},25152:{name:"ContentEncoding",level:4,type:"m",mandatory:!0,multiple:!0,minver:1,webm:!1,description:"Settings for one content encoding like compression or encryption."},25188:{name:"BitDepth",cppname:"AudioBitDepth",level:4,type:"u",minver:1,range:"not 0",description:"Bits per sample, mostly used for PCM."},25906:{name:"SignedElement",level:3,type:"b",multiple:!0,webm:!1,description:"An element ID whose data will be used to compute the signature."},26148:{name:"TrackTranslate",level:3,type:"m",multiple:!0,minver:1,webm:!1,description:"The track identification for the given Chapter Codec."},26897:{name:"ChapProcessCommand",cppname:"ChapterProcessCommand",level:5,type:"m",multiple:!0,minver:1,webm:!1,description:"Contains all the commands associated to the Atom."},26914:{name:"ChapProcessTime",cppname:"ChapterProcessTime",level:6,type:"u",mandatory:!0,minver:1,webm:!1,description:"Defines when the process command should be handled (0: during the whole chapter, 1: before starting playback, 2: after playback of the chapter)."},26916:{name:"ChapterTranslate",level:2,type:"m",multiple:!0,minver:1,webm:!1,description:"A tuple of corresponding ID used by chapter codecs to represent this segment."},26931:{name:"ChapProcessData",cppname:"ChapterProcessData",level:6,type:"b",mandatory:!0,minver:1,webm:!1,description:"Contains the command information. The data should be interpreted depending on the ChapProcessCodecID value. For ChapProcessCodecID = 1, the data correspond to the binary DVD cell pre/post commands."},26948:{name:"ChapProcess",cppname:"ChapterProcess",level:4,type:"m",multiple:!0,minver:1,webm:!1,description:"Contains all the commands associated to the Atom."},26965:{name:"ChapProcessCodecID",cppname:"ChapterProcessCodecID",level:5,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"Contains the type of the codec used for the processing. A value of 0 means native Matroska processing (to be defined), a value of 1 means the DVD command set is used. More codec IDs can be added later."},29555:{name:"Tag",level:2,type:"m",mandatory:!0,multiple:!0,minver:1,webm:!1,description:"Element containing elements specific to Tracks/Chapters."},29572:{name:"SegmentFilename",level:2,type:"8",minver:1,webm:!1,description:"A filename corresponding to this segment."},29766:{name:"AttachmentLink",cppname:"TrackAttachmentLink",level:3,type:"u",minver:1,webm:!1,range:"not 0",description:"The UID of an attachment that is used by this codec."},2459272:{name:"CodecName",level:3,type:"8",minver:1,description:"A human-readable string specifying the codec."},408125543:{name:"Segment",level:"0",type:"m",mandatory:!0,multiple:!0,minver:1,description:"This element contains all other top-level (level 1) elements. Typically a Matroska file is composed of 1 segment."},17530:{name:"TagLanguage",level:4,type:"s",mandatory:!0,minver:1,webm:!1,default:"und",description:"Specifies the language of the tag specified, in the Matroska languages form."},17827:{name:"TagName",level:4,type:"8",mandatory:!0,minver:1,webm:!1,description:"The name of the Tag that is going to be stored."},26568:{name:"SimpleTag",cppname:"TagSimple",level:3,recursive:"1",type:"m",mandatory:!0,multiple:!0,minver:1,webm:!1,description:"Contains general information about the target."},25542:{name:"TagAttachmentUID",level:4,type:"u",multiple:!0,minver:1,webm:!1,default:0,description:"A unique ID to identify the Attachment(s) the tags belong to. If the value is 0 at this level, the tags apply to all the attachments in the Segment."},25540:{name:"TagChapterUID",level:4,type:"u",multiple:!0,minver:1,webm:!1,default:0,description:"A unique ID to identify the Chapter(s) the tags belong to. If the value is 0 at this level, the tags apply to all chapters in the Segment."},25545:{name:"TagEditionUID",level:4,type:"u",multiple:!0,minver:1,webm:!1,default:0,description:"A unique ID to identify the EditionEntry(s) the tags belong to. If the value is 0 at this level, the tags apply to all editions in the Segment."},25541:{name:"TagTrackUID",level:4,type:"u",multiple:!0,minver:1,webm:!1,default:0,description:"A unique ID to identify the Track(s) the tags belong to. If the value is 0 at this level, the tags apply to all tracks in the Segment."},25546:{name:"TargetType",cppname:"TagTargetType",level:4,type:"s",minver:1,webm:!1,strong:"informational",description:'An string that can be used to display the logical level of the target like "ALBUM", "TRACK", "MOVIE", "CHAPTER", etc (see TargetType).'},26826:{name:"TargetTypeValue",cppname:"TagTargetTypeValue",level:4,type:"u",minver:1,webm:!1,default:50,description:"A number to indicate the logical level of the target (see TargetType)."},25536:{name:"Targets",cppname:"TagTargets",level:3,type:"m",mandatory:!0,minver:1,webm:!1,description:"Contain all UIDs where the specified meta data apply. It is empty to describe everything in the segment."},307544935:{name:"Tags",level:1,type:"m",multiple:!0,minver:1,webm:!1,description:"Element containing elements specific to Tracks/Chapters. A list of valid tags can be found here."},17677:{name:"ChapProcessPrivate",cppname:"ChapterProcessPrivate",level:5,type:"b",minver:1,webm:!1,description:'Some optional data attached to the ChapProcessCodecID information. For ChapProcessCodecID = 1, it is the "DVD level" equivalent.'},17278:{name:"ChapCountry",cppname:"ChapterCountry",level:5,type:"s",multiple:!0,minver:1,webm:!1,description:"The countries corresponding to the string, same 2 octets as in Internet domains."},17276:{name:"ChapLanguage",cppname:"ChapterLanguage",level:5,type:"s",mandatory:!0,multiple:!0,minver:1,webm:!0,default:"eng",description:"The languages corresponding to the string, in the bibliographic ISO-639-2 form."},143:{name:"ChapterTrack",level:4,type:"m",minver:1,webm:!1,description:"List of tracks on which the chapter applies. If this element is not present, all tracks apply"},25539:{name:"ChapterPhysicalEquiv",level:4,type:"u",minver:1,webm:!1,description:'Specify the physical equivalent of this ChapterAtom like "DVD" (60) or "SIDE" (50), see complete list of values.'},28348:{name:"ChapterSegmentEditionUID",level:4,type:"u",minver:1,webm:!1,range:"not 0",description:"The EditionUID to play from the segment linked in ChapterSegmentUID."},28263:{name:"ChapterSegmentUID",level:4,type:"b",minver:1,webm:!1,range:">0",bytesize:16,description:"A segment to play in place of this chapter. Edition ChapterSegmentEditionUID should be used for this segment, otherwise no edition is used."},29636:{name:"ChapterUID",level:4,type:"u",mandatory:!0,minver:1,webm:!0,range:"not 0",description:"A unique ID to identify the Chapter."},182:{name:"ChapterAtom",level:3,recursive:"1",type:"m",mandatory:!0,multiple:!0,minver:1,webm:!0,description:"Contains the atom information to use as the chapter atom (apply to all tracks)."},17885:{name:"EditionFlagOrdered",level:3,type:"u",minver:1,webm:!1,default:0,range:"0-1",description:"Specify if the chapters can be defined multiple times and the order to play them is enforced. (1 bit)"},17883:{name:"EditionFlagDefault",level:3,type:"u",mandatory:!0,minver:1,webm:!1,default:0,range:"0-1",description:"If a flag is set (1) the edition should be used as the default one. (1 bit)"},17853:{name:"EditionFlagHidden",level:3,type:"u",mandatory:!0,minver:1,webm:!1,default:0,range:"0-1",description:"If an edition is hidden (1), it should not be available to the user interface (but still to Control Tracks; see flag notes). (1 bit)"},17852:{name:"EditionUID",level:3,type:"u",minver:1,webm:!1,range:"not 0",description:"A unique ID to identify the edition. It's useful for tagging an edition."},17849:{name:"EditionEntry",level:2,type:"m",mandatory:!0,multiple:!0,minver:1,webm:!0,description:"Contains all information about a segment edition."},272869232:{name:"Chapters",level:1,type:"m",minver:1,webm:!0,description:"A system to define basic menus and partition data. For more detailed information, look at the Chapters Explanation."},18094:{name:"FileUID",level:3,type:"u",mandatory:!0,minver:1,webm:!1,range:"not 0",description:"Unique ID representing the file, as random as possible."},18012:{name:"FileData",level:3,type:"b",mandatory:!0,minver:1,webm:!1,description:"The data of the file."},18030:{name:"FileName",level:3,type:"8",mandatory:!0,minver:1,webm:!1,description:"Filename of the attached file."},18046:{name:"FileDescription",level:3,type:"8",minver:1,webm:!1,description:"A human-friendly name for the attached file."},24999:{name:"AttachedFile",level:2,type:"m",mandatory:!0,multiple:!0,minver:1,webm:!1,description:"An attached file."},423732329:{name:"Attachments",level:1,type:"m",minver:1,webm:!1,description:"Contain attached files."},235:{name:"CueRefCodecState",level:5,type:"u",webm:!1,default:0,description:"The position of the Codec State corresponding to this referenced element. 0 means that the data is taken from the initial Track Entry."},21343:{name:"CueRefNumber",level:5,type:"u",webm:!1,default:1,range:"not 0",description:"Number of the referenced Block of Track X in the specified Cluster."},219:{name:"CueReference",level:4,type:"m",multiple:!0,minver:2,webm:!1,description:"The Clusters containing the required referenced Blocks."},234:{name:"CueCodecState",level:4,type:"u",minver:2,webm:!1,default:0,description:"The position of the Codec State corresponding to this Cue element. 0 means that the data is taken from the initial Track Entry."},178:{name:"CueDuration",level:4,type:"u",mandatory:!1,minver:4,webm:!1,description:"The duration of the block according to the segment time base. If missing the track's DefaultDuration does not apply and no duration information is available in terms of the cues."},240:{name:"CueRelativePosition",level:4,type:"u",mandatory:!1,minver:4,webm:!1,description:"The relative position of the referenced block inside the cluster with 0 being the first possible position for an element inside that cluster.",position:"clusterRelative"},241:{name:"CueClusterPosition",level:4,type:"u",mandatory:!0,minver:1,description:"The position of the Cluster containing the required Block.",position:"segment"},247:{name:"CueTrack",level:4,type:"u",mandatory:!0,minver:1,range:"not 0",description:"The track for which a position is given."},183:{name:"CueTrackPositions",level:3,type:"m",mandatory:!0,multiple:!0,minver:1,description:"Contain positions for different tracks corresponding to the timestamp."},179:{name:"CueTime",level:3,type:"u",mandatory:!0,minver:1,description:"Absolute timestamp according to the segment time base."},187:{name:"CuePoint",level:2,type:"m",mandatory:!0,multiple:!0,minver:1,description:"Contains all information relative to a seek point in the segment."},475249515:{name:"Cues",level:1,type:"m",minver:1,description:'A top-level element to speed seeking access. All entries are local to the segment. Should be mandatory for non "live" streams.'},18406:{name:"ContentSigHashAlgo",level:6,type:"u",minver:1,webm:!1,default:0,description:"The hash algorithm used for the signature. A value of '0' means that the contents have not been signed but only encrypted. Predefined values: 1 - SHA1-160 2 - MD5"},18405:{name:"ContentSigAlgo",level:6,type:"u",minver:1,webm:!1,default:0,description:"The algorithm used for the signature. A value of '0' means that the contents have not been signed but only encrypted. Predefined values: 1 - RSA"},18404:{name:"ContentSigKeyID",level:6,type:"b",minver:1,webm:!1,description:"This is the ID of the private key the data was signed with."},18403:{name:"ContentSignature",level:6,type:"b",minver:1,webm:!1,description:"A cryptographic signature of the contents."},18402:{name:"ContentEncKeyID",level:6,type:"b",minver:1,webm:!1,description:"For public key algorithms this is the ID of the public key the the data was encrypted with."},18401:{name:"ContentEncAlgo",level:6,type:"u",minver:1,webm:!1,default:0,description:"The encryption algorithm used. The value '0' means that the contents have not been encrypted but only signed. Predefined values: 1 - DES, 2 - 3DES, 3 - Twofish, 4 - Blowfish, 5 - AES"},28032:{name:"ContentEncodings",level:3,type:"m",minver:1,webm:!1,description:"Settings for several content encoding mechanisms like compression or encryption."},196:{name:"TrickMasterTrackSegmentUID",level:3,type:"b",divx:!0,bytesize:16,description:"DivX trick track extenstions"},199:{name:"TrickMasterTrackUID",level:3,type:"u",divx:!0,description:"DivX trick track extenstions"},198:{name:"TrickTrackFlag",level:3,type:"u",divx:!0,default:0,description:"DivX trick track extenstions"},193:{name:"TrickTrackSegmentUID",level:3,type:"b",divx:!0,bytesize:16,description:"DivX trick track extenstions"},192:{name:"TrickTrackUID",level:3,type:"u",divx:!0,description:"DivX trick track extenstions"},237:{name:"TrackJoinUID",level:5,type:"u",mandatory:!0,multiple:!0,minver:3,webm:!1,range:"not 0",description:"The trackUID number of a track whose blocks are used to create this virtual track."},233:{name:"TrackJoinBlocks",level:4,type:"m",minver:3,webm:!1,description:"Contains the list of all tracks whose Blocks need to be combined to create this virtual track"},230:{name:"TrackPlaneType",level:6,type:"u",mandatory:!0,minver:3,webm:!1,description:"The kind of plane this track corresponds to (0: left eye, 1: right eye, 2: background)."},229:{name:"TrackPlaneUID",level:6,type:"u",mandatory:!0,minver:3,webm:!1,range:"not 0",description:"The trackUID number of the track representing the plane."},228:{name:"TrackPlane",level:5,type:"m",mandatory:!0,multiple:!0,minver:3,webm:!1,description:"Contains a video plane track that need to be combined to create this 3D track"},227:{name:"TrackCombinePlanes",level:4,type:"m",minver:3,webm:!1,description:"Contains the list of all video plane tracks that need to be combined to create this 3D track"},226:{name:"TrackOperation",level:3,type:"m",minver:3,webm:!1,description:"Operation that needs to be applied on tracks to create this virtual track. For more details look at the Specification Notes on the subject."},32123:{name:"ChannelPositions",cppname:"AudioPosition",level:4,type:"b",webm:!1,description:"Table of horizontal angles for each successive channel, see appendix."},159:{name:"Channels",cppname:"AudioChannels",level:4,type:"u",mandatory:!0,minver:1,default:1,range:"not 0",description:"Numbers of channels in the track."},30901:{name:"OutputSamplingFrequency",cppname:"AudioOutputSamplingFreq",level:4,type:"f",minver:1,default:"Sampling Frequency",range:"> 0",description:"Real output sampling frequency in Hz (used for SBR techniques)."},181:{name:"SamplingFrequency",cppname:"AudioSamplingFreq",level:4,type:"f",mandatory:!0,minver:1,default:8e3,range:"> 0",description:"Sampling frequency in Hz."},225:{name:"Audio",cppname:"TrackAudio",level:3,type:"m",minver:1,description:"Audio settings."},2327523:{name:"FrameRate",cppname:"VideoFrameRate",level:4,type:"f",range:"> 0",strong:"Informational",description:"Number of frames per second. only."},3126563:{name:"GammaValue",cppname:"VideoGamma",level:4,type:"f",webm:!1,range:"> 0",description:"Gamma Value."},3061028:{name:"ColourSpace",cppname:"VideoColourSpace",level:4,type:"b",minver:1,webm:!1,bytesize:4,description:"Same value as in AVI (32 bits)."},21683:{name:"AspectRatioType",cppname:"VideoAspectRatio",level:4,type:"u",minver:1,default:0,description:"Specify the possible modifications to the aspect ratio (0: free resizing, 1: keep aspect ratio, 2: fixed)."},21682:{name:"DisplayUnit",cppname:"VideoDisplayUnit",level:4,type:"u",minver:1,default:0,description:"How DisplayWidth & DisplayHeight should be interpreted (0: pixels, 1: centimeters, 2: inches, 3: Display Aspect Ratio)."},21690:{name:"DisplayHeight",cppname:"VideoDisplayHeight",level:4,type:"u",minver:1,default:"PixelHeight",range:"not 0",description:"Height of the video frames to display. The default value is only valid when DisplayUnit is 0."},21680:{name:"DisplayWidth",cppname:"VideoDisplayWidth",level:4,type:"u",minver:1,default:"PixelWidth",range:"not 0",description:"Width of the video frames to display. The default value is only valid when DisplayUnit is 0."},21725:{name:"PixelCropRight",cppname:"VideoPixelCropRight",level:4,type:"u",minver:1,default:0,description:"The number of video pixels to remove on the right of the image."},21708:{name:"PixelCropLeft",cppname:"VideoPixelCropLeft",level:4,type:"u",minver:1,default:0,description:"The number of video pixels to remove on the left of the image."},21691:{name:"PixelCropTop",cppname:"VideoPixelCropTop",level:4,type:"u",minver:1,default:0,description:"The number of video pixels to remove at the top of the image."},21674:{name:"PixelCropBottom",cppname:"VideoPixelCropBottom",level:4,type:"u",minver:1,default:0,description:"The number of video pixels to remove at the bottom of the image (for HDTV content)."},186:{name:"PixelHeight",cppname:"VideoPixelHeight",level:4,type:"u",mandatory:!0,minver:1,range:"not 0",description:"Height of the encoded video frames in pixels."},176:{name:"PixelWidth",cppname:"VideoPixelWidth",level:4,type:"u",mandatory:!0,minver:1,range:"not 0",description:"Width of the encoded video frames in pixels."},21433:{name:"OldStereoMode",level:4,type:"u",maxver:"0",webm:!1,divx:!1,description:"DEPRECATED, DO NOT USE. Bogus StereoMode value used in old versions of libmatroska. (0: mono, 1: right eye, 2: left eye, 3: both eyes)."},21440:{name:"AlphaMode",cppname:"VideoAlphaMode",level:4,type:"u",minver:3,webm:!0,default:0,description:"Alpha Video Mode. Presence of this element indicates that the BlockAdditional element could contain Alpha data."},21432:{name:"StereoMode",cppname:"VideoStereoMode",level:4,type:"u",minver:3,webm:!0,default:0,description:"Stereo-3D video mode (0: mono, 1: side by side (left eye is first), 2: top-bottom (right eye is first), 3: top-bottom (left eye is first), 4: checkboard (right is first), 5: checkboard (left is first), 6: row interleaved (right is first), 7: row interleaved (left is first), 8: column interleaved (right is first), 9: column interleaved (left is first), 10: anaglyph (cyan/red), 11: side by side (right eye is first), 12: anaglyph (green/magenta), 13 both eyes laced in one Block (left eye is first), 14 both eyes laced in one Block (right eye is first)) . There are some more details on 3D support in the Specification Notes."},154:{name:"FlagInterlaced",cppname:"VideoFlagInterlaced",level:4,type:"u",mandatory:!0,minver:2,webm:!0,default:0,range:"0-1",description:"Set if the video is interlaced. (1 bit)"},224:{name:"Video",cppname:"TrackVideo",level:3,type:"m",minver:1,description:"Video settings."},26277:{name:"TrackTranslateTrackID",level:4,type:"b",mandatory:!0,minver:1,webm:!1,description:"The binary value used to represent this track in the chapter codec data. The format depends on the ChapProcessCodecID used."},26303:{name:"TrackTranslateCodec",level:4,type:"u",mandatory:!0,minver:1,webm:!1,description:"The chapter codec using this ID (0: Matroska Script, 1: DVD-menu)."},26364:{name:"TrackTranslateEditionUID",level:4,type:"u",multiple:!0,minver:1,webm:!1,description:"Specify an edition UID on which this translation applies. When not specified, it means for all editions found in the segment."},22203:{name:"SeekPreRoll",level:3,type:"u",mandatory:!0,multiple:!1,default:0,minver:4,webm:!0,description:"After a discontinuity, SeekPreRoll is the duration in nanoseconds of the data the decoder must decode before the decoded data is valid."},22186:{name:"CodecDelay",level:3,type:"u",multiple:!1,default:0,minver:4,webm:!0,description:"CodecDelay is The codec-built-in delay in nanoseconds. This value must be subtracted from each block timestamp in order to get the actual timestamp. The value should be small so the muxing of tracks with the same actual timestamp are in the same Cluster."},28587:{name:"TrackOverlay",level:3,type:"u",multiple:!0,minver:1,webm:!1,description:"Specify that this track is an overlay track for the Track specified (in the u-integer). That means when this track has a gap (see SilentTracks) the overlay track should be used instead. The order of multiple TrackOverlay matters, the first one is the one that should be used. If not found it should be the second, etc."},170:{name:"CodecDecodeAll",level:3,type:"u",mandatory:!0,minver:2,webm:!1,default:1,range:"0-1",description:"The codec can decode potentially damaged data (1 bit)."},2536e3:{name:"CodecDownloadURL",level:3,type:"s",multiple:!0,webm:!1,description:"A URL to download about the codec used."},3883072:{name:"CodecInfoURL",level:3,type:"s",multiple:!0,webm:!1,description:"A URL to find information about the codec used."},3839639:{name:"CodecSettings",level:3,type:"8",webm:!1,description:"A string describing the encoding setting used."},25506:{name:"CodecPrivate",level:3,type:"b",minver:1,description:"Private data only known to the codec."},2274716:{name:"Language",cppname:"TrackLanguage",level:3,type:"s",minver:1,default:"eng",description:"Specifies the language of the track in the Matroska languages form."},21358:{name:"Name",cppname:"TrackName",level:3,type:"8",minver:1,description:"A human-readable track name."},21998:{name:"MaxBlockAdditionID",level:3,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"The maximum value of BlockAdditions for this track."},21375:{name:"TrackOffset",level:3,type:"i",webm:!1,default:0,description:"A value to add to the Block's Timestamp. This can be used to adjust the playback offset of a track."},2306383:{name:"TrackTimecodeScale",level:3,type:"f",mandatory:!0,minver:1,maxver:"3",webm:!1,default:1,range:"> 0",description:"DEPRECATED, DO NOT USE. The scale to apply on this track to work at normal speed in relation with other tracks (mostly used to adjust video speed when the audio length differs)."},2313850:{name:"DefaultDecodedFieldDuration",cppname:"TrackDefaultDecodedFieldDuration",level:3,type:"u",minver:4,range:"not 0",description:`The period in nanoseconds (not scaled by TimcodeScale)
8
+ between two successive fields at the output of the decoding process (see the notes)`},2352003:{name:"DefaultDuration",cppname:"TrackDefaultDuration",level:3,type:"u",minver:1,range:"not 0",description:"Number of nanoseconds (not scaled via TimecodeScale) per frame ('frame' in the Matroska sense -- one element put into a (Simple)Block)."},28152:{name:"MaxCache",cppname:"TrackMaxCache",level:3,type:"u",minver:1,webm:!1,description:"The maximum cache size required to store referenced frames in and the current frame. 0 means no cache is needed."},28135:{name:"MinCache",cppname:"TrackMinCache",level:3,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"The minimum number of frames a player should be able to cache during playback. If set to 0, the reference pseudo-cache system is not used."},156:{name:"FlagLacing",cppname:"TrackFlagLacing",level:3,type:"u",mandatory:!0,minver:1,default:1,range:"0-1",description:"Set if the track may contain blocks using lacing. (1 bit)"},21930:{name:"FlagForced",cppname:"TrackFlagForced",level:3,type:"u",mandatory:!0,minver:1,default:0,range:"0-1",description:"Set if that track MUST be active during playback. There can be many forced track for a kind (audio, video or subs), the player should select the one which language matches the user preference or the default + forced track. Overlay MAY happen between a forced and non-forced track of the same kind. (1 bit)"},185:{name:"FlagEnabled",cppname:"TrackFlagEnabled",level:3,type:"u",mandatory:!0,minver:2,webm:!0,default:1,range:"0-1",description:"Set if the track is usable. (1 bit)"},29637:{name:"TrackUID",level:3,type:"u",mandatory:!0,minver:1,range:"not 0",description:"A unique ID to identify the Track. This should be kept the same when making a direct stream copy of the Track to another file."},215:{name:"TrackNumber",level:3,type:"u",mandatory:!0,minver:1,range:"not 0",description:"The track number as used in the Block Header (using more than 127 tracks is not encouraged, though the design allows an unlimited number)."},174:{name:"TrackEntry",level:2,type:"m",mandatory:!0,multiple:!0,minver:1,description:"Describes a track with all elements."},374648427:{name:"Tracks",level:1,type:"m",multiple:!0,minver:1,description:"A top-level block of information with many tracks described."},175:{name:"EncryptedBlock",level:2,type:"b",multiple:!0,webm:!1,description:"Similar to EncryptedBlock Structure)"},202:{name:"ReferenceTimeCode",level:4,type:"u",multiple:!1,mandatory:!0,minver:0,webm:!1,divx:!0,description:"DivX trick track extenstions"},201:{name:"ReferenceOffset",level:4,type:"u",multiple:!1,mandatory:!0,minver:0,webm:!1,divx:!0,description:"DivX trick track extenstions"},200:{name:"ReferenceFrame",level:3,type:"m",multiple:!1,minver:0,webm:!1,divx:!0,description:"DivX trick track extenstions"},207:{name:"SliceDuration",level:5,type:"u",default:0,description:"The (scaled) duration to apply to the element."},206:{name:"Delay",cppname:"SliceDelay",level:5,type:"u",default:0,description:"The (scaled) delay to apply to the element."},203:{name:"BlockAdditionID",cppname:"SliceBlockAddID",level:5,type:"u",default:0,description:"The ID of the BlockAdditional element (0 is the main Block)."},205:{name:"FrameNumber",cppname:"SliceFrameNumber",level:5,type:"u",default:0,description:"The number of the frame to generate from this lace with this delay (allow you to generate many frames from the same Block/Frame)."},204:{name:"LaceNumber",cppname:"SliceLaceNumber",level:5,type:"u",minver:1,default:0,divx:!1,description:"The reverse number of the frame in the lace (0 is the last frame, 1 is the next to last, etc). While there are a few files in the wild with this element, it is no longer in use and has been deprecated. Being able to interpret this element is not required for playback."},232:{name:"TimeSlice",level:4,type:"m",multiple:!0,minver:1,divx:!1,description:"Contains extra time information about the data contained in the Block. While there are a few files in the wild with this element, it is no longer in use and has been deprecated. Being able to interpret this element is not required for playback."},142:{name:"Slices",level:3,type:"m",minver:1,divx:!1,description:"Contains slices description."},30114:{name:"DiscardPadding",level:3,type:"i",minver:4,webm:!0,description:"Duration in nanoseconds of the silent data added to the Block (padding at the end of the Block for positive value, at the beginning of the Block for negative value). The duration of DiscardPadding is not calculated in the duration of the TrackEntry and should be discarded during playback."},164:{name:"CodecState",level:3,type:"b",minver:2,webm:!1,description:"The new codec state to use. Data interpretation is private to the codec. This information should always be referenced by a seek entry."},253:{name:"ReferenceVirtual",level:3,type:"i",webm:!1,description:"Relative position of the data that should be in position of the virtual block."},251:{name:"ReferenceBlock",level:3,type:"i",multiple:!0,minver:1,description:"Timestamp of another frame used as a reference (ie: B or P frame). The timestamp is relative to the block it's attached to."},250:{name:"ReferencePriority",cppname:"FlagReferenced",level:3,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"This frame is referenced and has the specified cache priority. In cache only a frame of the same or higher priority can replace this frame. A value of 0 means the frame is not referenced."},155:{name:"BlockDuration",level:3,type:"u",minver:1,default:"TrackDuration",description:'The duration of the Block (based on TimecodeScale). This element is mandatory when DefaultDuration is set for the track (but can be omitted as other default values). When not written and with no DefaultDuration, the value is assumed to be the difference between the timestamp of this Block and the timestamp of the next Block in "display" order (not coding order). This element can be useful at the end of a Track (as there is not other Block available), or when there is a break in a track like for subtitle tracks. When set to 0 that means the frame is not a keyframe.'},165:{name:"BlockAdditional",level:5,type:"b",mandatory:!0,minver:1,webm:!1,description:"Interpreted by the codec as it wishes (using the BlockAddID)."},238:{name:"BlockAddID",level:5,type:"u",mandatory:!0,minver:1,webm:!1,default:1,range:"not 0",description:"An ID to identify the BlockAdditional level."},166:{name:"BlockMore",level:4,type:"m",mandatory:!0,multiple:!0,minver:1,webm:!1,description:"Contain the BlockAdditional and some parameters."},30113:{name:"BlockAdditions",level:3,type:"m",minver:1,webm:!1,description:"Contain additional blocks to complete the main one. An EBML parser that has no knowledge of the Block structure could still see and use/skip these data."},162:{name:"BlockVirtual",level:3,type:"b",webm:!1,description:"A Block with no data. It must be stored in the stream at the place the real Block should be in display order. (see Block Virtual)"},161:{name:"Block",level:3,type:"b",mandatory:!0,minver:1,description:"Block containing the actual data to be rendered and a timestamp relative to the Cluster Timecode. (see Block Structure)"},160:{name:"BlockGroup",level:2,type:"m",multiple:!0,minver:1,description:"Basic container of information containing a single Block or BlockVirtual, and information specific to that Block/VirtualBlock."},163:{name:"SimpleBlock",level:2,type:"b",multiple:!0,minver:2,webm:!0,divx:!0,description:"Similar to SimpleBlock Structure"},171:{name:"PrevSize",cppname:"ClusterPrevSize",level:2,type:"u",minver:1,description:"Size of the previous Cluster, in octets. Can be useful for backward playing.",position:"prevCluster"},167:{name:"Position",cppname:"ClusterPosition",level:2,type:"u",minver:1,webm:!1,description:"The Position of the Cluster in the segment (0 in live broadcast streams). It might help to resynchronise offset on damaged streams.",position:"segment"},22743:{name:"SilentTrackNumber",cppname:"ClusterSilentTrackNumber",level:3,type:"u",multiple:!0,minver:1,webm:!1,description:"One of the track number that are not used from now on in the stream. It could change later if not specified as silent in a further Cluster."},231:{name:"Timecode",cppname:"ClusterTimecode",level:2,type:"u",mandatory:!0,minver:1,description:"Absolute timestamp of the cluster (based on TimecodeScale)."},524531317:{name:"Cluster",level:1,type:"m",multiple:!0,minver:1,description:"The lower level element containing the (monolithic) Block structure."},19840:{name:"MuxingApp",level:2,type:"8",mandatory:!0,minver:1,description:'Muxing application or library ("libmatroska-0.4.3").'},31657:{name:"Title",level:2,type:"8",minver:1,webm:!1,description:"General name of the segment."},2807730:{name:"TimecodeScaleDenominator",level:2,type:"u",mandatory:!0,minver:4,default:"1000000000",description:"Timestamp scale numerator, see TimecodeScale."},2807729:{name:"TimecodeScale",level:2,type:"u",mandatory:!0,minver:1,default:"1000000",description:"Timestamp scale in nanoseconds (1.000.000 means all timestamps in the segment are expressed in milliseconds)."},27045:{name:"ChapterTranslateID",level:3,type:"b",mandatory:!0,minver:1,webm:!1,description:"The binary value used to represent this segment in the chapter codec data. The format depends on the ChapProcessCodecID used."},27071:{name:"ChapterTranslateCodec",level:3,type:"u",mandatory:!0,minver:1,webm:!1,description:"The chapter codec using this ID (0: Matroska Script, 1: DVD-menu)."},27132:{name:"ChapterTranslateEditionUID",level:3,type:"u",multiple:!0,minver:1,webm:!1,description:"Specify an edition UID on which this correspondance applies. When not specified, it means for all editions found in the segment."},4096955:{name:"NextFilename",level:2,type:"8",minver:1,webm:!1,description:"An escaped filename corresponding to the next segment."},4110627:{name:"NextUID",level:2,type:"b",minver:1,webm:!1,bytesize:16,description:"A unique ID to identify the next chained segment (128 bits)."},3965867:{name:"PrevFilename",level:2,type:"8",minver:1,webm:!1,description:"An escaped filename corresponding to the previous segment."},3979555:{name:"PrevUID",level:2,type:"b",minver:1,webm:!1,bytesize:16,description:"A unique ID to identify the previous chained segment (128 bits)."},29604:{name:"SegmentUID",level:2,type:"b",minver:1,webm:!1,range:"not 0",bytesize:16,description:"A randomly generated unique ID to identify the current segment between many others (128 bits)."},357149030:{name:"Info",level:1,type:"m",mandatory:!0,multiple:!0,minver:1,description:"Contains miscellaneous general information and statistics on the file."},21420:{name:"SeekPosition",level:3,type:"u",mandatory:!0,minver:1,description:"The position of the element in the segment in octets (0 = first level 1 element).",position:"segment"},21419:{name:"SeekID",level:3,type:"b",mandatory:!0,minver:1,description:"The binary ID corresponding to the element name.",type2:"ebmlID"},19899:{name:"Seek",cppname:"SeekPoint",level:2,type:"m",mandatory:!0,multiple:!0,minver:1,description:"Contains a single seek entry to an EBML element."},290298740:{name:"SeekHead",cppname:"SeekHeader",level:1,type:"m",multiple:!0,minver:1,description:"Contains the position of other level 1 elements."},32379:{name:"SignatureElementList",level:2,type:"m",multiple:!0,webm:!1,i:"Cluster|Block|BlockAdditional",description:"A list consists of a number of consecutive elements that represent one case where data is used in signature. Ex: means that the BlockAdditional of all Blocks in all Clusters is used for encryption."},32347:{name:"SignatureElements",level:1,type:"m",webm:!1,description:"Contains elements that will be used to compute the signature."},32437:{name:"Signature",level:1,type:"b",webm:!1,description:"The signature of the data (until a new."},32421:{name:"SignaturePublicKey",level:1,type:"b",webm:!1,description:"The public key to use with the algorithm (in the case of a PKI-based signature)."},32410:{name:"SignatureHash",level:1,type:"u",webm:!1,description:"Hash algorithm used (1=SHA1-160, 2=MD5)."},32394:{name:"SignatureAlgo",level:1,type:"u",webm:!1,description:"Signature algorithm used (1=RSA, 2=elliptic)."},458458727:{name:"SignatureSlot",level:-1,type:"m",multiple:!0,webm:!1,description:"Contain signature of some (coming) elements in the stream."},191:{name:"CRC-32",level:-1,type:"b",minver:1,webm:!1,description:"The CRC is computed on all the data of the Master element it's in. The CRC element should be the first in it's parent master for easier reading. All level 1 elements should include a CRC-32. The CRC in use is the IEEE CRC32 Little Endian",crc:!0},236:{name:"Void",level:-1,type:"b",minver:1,description:"Used to void damaged data, to avoid unexpected behaviors when using damaged data. The content is discarded. Also used to reserve space in a sub-element for later use."},17139:{name:"EBMLMaxSizeLength",level:1,type:"u",mandatory:!0,default:8,minver:1,description:"The maximum length of the sizes you'll find in this file (8 or less in Matroska). This does not override the element size indicated at the beginning of an element. Elements that have an indicated size which is larger than what is allowed by EBMLMaxSizeLength shall be considered invalid."},17138:{name:"EBMLMaxIDLength",level:1,type:"u",mandatory:!0,default:4,minver:1,description:"The maximum length of the IDs you'll find in this file (4 or less in Matroska)."},17143:{name:"EBMLReadVersion",level:1,type:"u",mandatory:!0,default:1,minver:1,description:"The minimum EBML version a parser has to support to read this file."},440786851:{name:"EBML",level:"0",type:"m",mandatory:!0,multiple:!0,minver:1,description:"Set the EBML characteristics of the data to follow. Each EBML document has to start with this."},21936:{name:"Colour",level:"4",type:"m",mandatory:!0,multiple:!0,description:"Settings describing the colour format."},21937:{name:"MatrixCoefficients",level:"5",type:"u",mandatory:!0,multiple:!0,description:"The Matrix Coefficients of the video used to derive luma and chroma values from red, green, and blue color primaries. For clarity, the value and meanings for MatrixCoefficients are adopted from Table 4 of ISO/IEC 23001-8:2016 or ITU-T H.273."},21945:{name:"Range",level:"5",type:"u",mandatory:!0,multiple:!0,description:"Clipping of the color ranges."},21946:{name:"TransferCharacteristics",level:"5",type:"u",mandatory:!0,multiple:!0,description:"The transfer characteristics of the video."},21947:{name:"Primaries",level:"5",type:"u",mandatory:!0,multiple:!0,description:"The colour primaries of the video. For clarity, the value and meanings for Primaries are adopted from Table 2 of ISO/IEC 23091-4 or ITU-T H.273."}}),ebmlID}var hasRequiredEBMLEncoder;function requireEBMLEncoder(){if(hasRequiredEBMLEncoder)return EBMLEncoder;hasRequiredEBMLEncoder=1,Object.defineProperty(EBMLEncoder,"__esModule",{value:!0});var O=requireTools(),N=requireTools(),I=requireEbmlID(),D=function(){function f(){this._schema=I.byEbmlID,this._buffers=[],this._stack=[]}return f.prototype.encode=function(k){var i=this;return O.concat(k.reduce(function(c,$){return c.concat(i.encodeChunk($))},[])).buffer},f.prototype.encodeChunk=function(k){return k.type==="m"?k.isEnd?this.endTag(k):this.startTag(k):(k.data=N.Buffer.from(k.data),this.writeTag(k)),this.flush()},f.prototype.flush=function(){var k=this._buffers;return this._buffers=[],k},f.prototype.getSchemaInfo=function(k){for(var i=Object.keys(this._schema).map(Number),c=0;c<i.length;c++){var $=i[c];if(this._schema[$].name===k)return new N.Buffer($.toString(16),"hex")}return null},f.prototype.writeTag=function(k){var i=k.name,c=this.getSchemaInfo(i),$=k.data;if(c==null)throw new Error("No schema entry found for "+i);var C=O.encodeTag(c,$);if(this._stack.length>0){var M=this._stack[this._stack.length-1];M.children.push({tagId:c,elm:k,children:[],data:C});return}this._buffers=this._buffers.concat(C)},f.prototype.startTag=function(k){var i=k.name,c=this.getSchemaInfo(i);if(c==null)throw new Error("No schema entry found for "+i);if(k.unknownSize){var $=O.encodeTag(c,new N.Buffer(0),k.unknownSize);this._buffers=this._buffers.concat($);return}var C={tagId:c,elm:k,children:[],data:null};this._stack.length>0&&this._stack[this._stack.length-1].children.push(C),this._stack.push(C)},f.prototype.endTag=function(k){k.name;var i=this._stack.pop();if(i==null)throw new Error("EBML structure is broken");if(i.elm.name!==k.name)throw new Error("EBML structure is broken");var c=i.children.reduce(function(C,M){if(M.data===null)throw new Error("EBML structure is broken");return C.concat(M.data)},[]),$=O.concat(c);i.elm.type==="m"?i.data=O.encodeTag(i.tagId,$,i.elm.unknownSize):i.data=O.encodeTag(i.tagId,$),this._stack.length<1&&(this._buffers=this._buffers.concat(i.data))},f}();return EBMLEncoder.default=D,EBMLEncoder}var buffer={},base64Js={},hasRequiredBase64Js;function requireBase64Js(){if(hasRequiredBase64Js)return base64Js;hasRequiredBase64Js=1,base64Js.byteLength=c,base64Js.toByteArray=C,base64Js.fromByteArray=J;for(var O=[],N=[],I=typeof Uint8Array<"u"?Uint8Array:Array,D="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,k=D.length;f<k;++f)O[f]=D[f],N[D.charCodeAt(f)]=f;N[45]=62,N[95]=63;function i(z){var Q=z.length;if(Q%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var ee=z.indexOf("=");ee===-1&&(ee=Q);var Y=ee===Q?0:4-ee%4;return[ee,Y]}function c(z){var Q=i(z),ee=Q[0],Y=Q[1];return(ee+Y)*3/4-Y}function $(z,Q,ee){return(Q+ee)*3/4-ee}function C(z){var Q,ee=i(z),Y=ee[0],te=ee[1],ie=new I($(z,Y,te)),ye=0,re=te>0?Y-4:Y,de;for(de=0;de<re;de+=4)Q=N[z.charCodeAt(de)]<<18|N[z.charCodeAt(de+1)]<<12|N[z.charCodeAt(de+2)]<<6|N[z.charCodeAt(de+3)],ie[ye++]=Q>>16&255,ie[ye++]=Q>>8&255,ie[ye++]=Q&255;return te===2&&(Q=N[z.charCodeAt(de)]<<2|N[z.charCodeAt(de+1)]>>4,ie[ye++]=Q&255),te===1&&(Q=N[z.charCodeAt(de)]<<10|N[z.charCodeAt(de+1)]<<4|N[z.charCodeAt(de+2)]>>2,ie[ye++]=Q>>8&255,ie[ye++]=Q&255),ie}function M(z){return O[z>>18&63]+O[z>>12&63]+O[z>>6&63]+O[z&63]}function Z(z,Q,ee){for(var Y,te=[],ie=Q;ie<ee;ie+=3)Y=(z[ie]<<16&16711680)+(z[ie+1]<<8&65280)+(z[ie+2]&255),te.push(M(Y));return te.join("")}function J(z){for(var Q,ee=z.length,Y=ee%3,te=[],ie=16383,ye=0,re=ee-Y;ye<re;ye+=ie)te.push(Z(z,ye,ye+ie>re?re:ye+ie));return Y===1?(Q=z[ee-1],te.push(O[Q>>2]+O[Q<<4&63]+"==")):Y===2&&(Q=(z[ee-2]<<8)+z[ee-1],te.push(O[Q>>10]+O[Q>>4&63]+O[Q<<2&63]+"=")),te.join("")}return base64Js}var ieee754={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var hasRequiredIeee754;function requireIeee754(){return hasRequiredIeee754||(hasRequiredIeee754=1,ieee754.read=function(O,N,I,D,f){var k,i,c=f*8-D-1,$=(1<<c)-1,C=$>>1,M=-7,Z=I?f-1:0,J=I?-1:1,z=O[N+Z];for(Z+=J,k=z&(1<<-M)-1,z>>=-M,M+=c;M>0;k=k*256+O[N+Z],Z+=J,M-=8);for(i=k&(1<<-M)-1,k>>=-M,M+=D;M>0;i=i*256+O[N+Z],Z+=J,M-=8);if(k===0)k=1-C;else{if(k===$)return i?NaN:(z?-1:1)*(1/0);i=i+Math.pow(2,D),k=k-C}return(z?-1:1)*i*Math.pow(2,k-D)},ieee754.write=function(O,N,I,D,f,k){var i,c,$,C=k*8-f-1,M=(1<<C)-1,Z=M>>1,J=f===23?Math.pow(2,-24)-Math.pow(2,-77):0,z=D?0:k-1,Q=D?1:-1,ee=N<0||N===0&&1/N<0?1:0;for(N=Math.abs(N),isNaN(N)||N===1/0?(c=isNaN(N)?1:0,i=M):(i=Math.floor(Math.log(N)/Math.LN2),N*($=Math.pow(2,-i))<1&&(i--,$*=2),i+Z>=1?N+=J/$:N+=J*Math.pow(2,1-Z),N*$>=2&&(i++,$/=2),i+Z>=M?(c=0,i=M):i+Z>=1?(c=(N*$-1)*Math.pow(2,f),i=i+Z):(c=N*Math.pow(2,Z-1)*Math.pow(2,f),i=0));f>=8;O[I+z]=c&255,z+=Q,c/=256,f-=8);for(i=i<<f|c,C+=f;C>0;O[I+z]=i&255,z+=Q,i/=256,C-=8);O[I+z-Q]|=ee*128}),ieee754}/*!
9
9
  * The buffer module from node.js, for the browser.
10
10
  *
11
11
  * @author Feross Aboukhadijeh <https://feross.org>
12
12
  * @license MIT
13
- */var hasRequiredBuffer;function requireBuffer(){return hasRequiredBuffer||(hasRequiredBuffer=1,function(N){const Z=requireBase64Js(),q=requireIeee754(),J=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;N.Buffer=O,N.SlowBuffer=fe,N.INSPECT_MAX_BYTES=50;const I=2147483647;N.kMaxLength=I,O.TYPED_ARRAY_SUPPORT=D(),!O.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function D(){try{const ae=new Uint8Array(1),Q={foo:function(){return 42}};return Object.setPrototypeOf(Q,Uint8Array.prototype),Object.setPrototypeOf(ae,Q),ae.foo()===42}catch{return!1}}Object.defineProperty(O.prototype,"parent",{enumerable:!0,get:function(){if(O.isBuffer(this))return this.buffer}}),Object.defineProperty(O.prototype,"offset",{enumerable:!0,get:function(){if(O.isBuffer(this))return this.byteOffset}});function a(ae){if(ae>I)throw new RangeError('The value "'+ae+'" is invalid for option "size"');const Q=new Uint8Array(ae);return Object.setPrototypeOf(Q,O.prototype),Q}function O(ae,Q,X){if(typeof ae=="number"){if(typeof Q=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return te(ae)}return F(ae,Q,X)}O.poolSize=8192;function F(ae,Q,X){if(typeof ae=="string")return ne(ae,Q);if(ArrayBuffer.isView(ae))return re(ae);if(ae==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ae);if(Wt(ae,ArrayBuffer)||ae&&Wt(ae.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Wt(ae,SharedArrayBuffer)||ae&&Wt(ae.buffer,SharedArrayBuffer)))return ce(ae,Q,X);if(typeof ae=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const he=ae.valueOf&&ae.valueOf();if(he!=null&&he!==ae)return O.from(he,Q,X);const Te=oe(ae);if(Te)return Te;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ae[Symbol.toPrimitive]=="function")return O.from(ae[Symbol.toPrimitive]("string"),Q,X);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ae)}O.from=function(ae,Q,X){return F(ae,Q,X)},Object.setPrototypeOf(O.prototype,Uint8Array.prototype),Object.setPrototypeOf(O,Uint8Array);function z(ae){if(typeof ae!="number")throw new TypeError('"size" argument must be of type number');if(ae<0)throw new RangeError('The value "'+ae+'" is invalid for option "size"')}function K(ae,Q,X){return z(ae),ae<=0?a(ae):Q!==void 0?typeof X=="string"?a(ae).fill(Q,X):a(ae).fill(Q):a(ae)}O.alloc=function(ae,Q,X){return K(ae,Q,X)};function te(ae){return z(ae),a(ae<0?0:se(ae)|0)}O.allocUnsafe=function(ae){return te(ae)},O.allocUnsafeSlow=function(ae){return te(ae)};function ne(ae,Q){if((typeof Q!="string"||Q==="")&&(Q="utf8"),!O.isEncoding(Q))throw new TypeError("Unknown encoding: "+Q);const X=ge(ae,Q)|0;let he=a(X);const Te=he.write(ae,Q);return Te!==X&&(he=he.slice(0,Te)),he}function ee(ae){const Q=ae.length<0?0:se(ae.length)|0,X=a(Q);for(let he=0;he<Q;he+=1)X[he]=ae[he]&255;return X}function re(ae){if(Wt(ae,Uint8Array)){const Q=new Uint8Array(ae);return ce(Q.buffer,Q.byteOffset,Q.byteLength)}return ee(ae)}function ce(ae,Q,X){if(Q<0||ae.byteLength<Q)throw new RangeError('"offset" is outside of buffer bounds');if(ae.byteLength<Q+(X||0))throw new RangeError('"length" is outside of buffer bounds');let he;return Q===void 0&&X===void 0?he=new Uint8Array(ae):X===void 0?he=new Uint8Array(ae,Q):he=new Uint8Array(ae,Q,X),Object.setPrototypeOf(he,O.prototype),he}function oe(ae){if(O.isBuffer(ae)){const Q=se(ae.length)|0,X=a(Q);return X.length===0||ae.copy(X,0,0,Q),X}if(ae.length!==void 0)return typeof ae.length!="number"||Gt(ae.length)?a(0):ee(ae);if(ae.type==="Buffer"&&Array.isArray(ae.data))return ee(ae.data)}function se(ae){if(ae>=I)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+I.toString(16)+" bytes");return ae|0}function fe(ae){return+ae!=ae&&(ae=0),O.alloc(+ae)}O.isBuffer=function(Q){return Q!=null&&Q._isBuffer===!0&&Q!==O.prototype},O.compare=function(Q,X){if(Wt(Q,Uint8Array)&&(Q=O.from(Q,Q.offset,Q.byteLength)),Wt(X,Uint8Array)&&(X=O.from(X,X.offset,X.byteLength)),!O.isBuffer(Q)||!O.isBuffer(X))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Q===X)return 0;let he=Q.length,Te=X.length;for(let $e=0,Ue=Math.min(he,Te);$e<Ue;++$e)if(Q[$e]!==X[$e]){he=Q[$e],Te=X[$e];break}return he<Te?-1:Te<he?1:0},O.isEncoding=function(Q){switch(String(Q).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},O.concat=function(Q,X){if(!Array.isArray(Q))throw new TypeError('"list" argument must be an Array of Buffers');if(Q.length===0)return O.alloc(0);let he;if(X===void 0)for(X=0,he=0;he<Q.length;++he)X+=Q[he].length;const Te=O.allocUnsafe(X);let $e=0;for(he=0;he<Q.length;++he){let Ue=Q[he];if(Wt(Ue,Uint8Array))$e+Ue.length>Te.length?(O.isBuffer(Ue)||(Ue=O.from(Ue)),Ue.copy(Te,$e)):Uint8Array.prototype.set.call(Te,Ue,$e);else if(O.isBuffer(Ue))Ue.copy(Te,$e);else throw new TypeError('"list" argument must be an Array of Buffers');$e+=Ue.length}return Te};function ge(ae,Q){if(O.isBuffer(ae))return ae.length;if(ArrayBuffer.isView(ae)||Wt(ae,ArrayBuffer))return ae.byteLength;if(typeof ae!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof ae);const X=ae.length,he=arguments.length>2&&arguments[2]===!0;if(!he&&X===0)return 0;let Te=!1;for(;;)switch(Q){case"ascii":case"latin1":case"binary":return X;case"utf8":case"utf-8":return Zt(ae).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X*2;case"hex":return X>>>1;case"base64":return tn(ae).length;default:if(Te)return he?-1:Zt(ae).length;Q=(""+Q).toLowerCase(),Te=!0}}O.byteLength=ge;function ue(ae,Q,X){let he=!1;if((Q===void 0||Q<0)&&(Q=0),Q>this.length||((X===void 0||X>this.length)&&(X=this.length),X<=0)||(X>>>=0,Q>>>=0,X<=Q))return"";for(ae||(ae="utf8");;)switch(ae){case"hex":return jt(this,Q,X);case"utf8":case"utf-8":return Je(this,Q,X);case"ascii":return Et(this,Q,X);case"latin1":case"binary":return At(this,Q,X);case"base64":return We(this,Q,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Pt(this,Q,X);default:if(he)throw new TypeError("Unknown encoding: "+ae);ae=(ae+"").toLowerCase(),he=!0}}O.prototype._isBuffer=!0;function _e(ae,Q,X){const he=ae[Q];ae[Q]=ae[X],ae[X]=he}O.prototype.swap16=function(){const Q=this.length;if(Q%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let X=0;X<Q;X+=2)_e(this,X,X+1);return this},O.prototype.swap32=function(){const Q=this.length;if(Q%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let X=0;X<Q;X+=4)_e(this,X,X+3),_e(this,X+1,X+2);return this},O.prototype.swap64=function(){const Q=this.length;if(Q%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let X=0;X<Q;X+=8)_e(this,X,X+7),_e(this,X+1,X+6),_e(this,X+2,X+5),_e(this,X+3,X+4);return this},O.prototype.toString=function(){const Q=this.length;return Q===0?"":arguments.length===0?Je(this,0,Q):ue.apply(this,arguments)},O.prototype.toLocaleString=O.prototype.toString,O.prototype.equals=function(Q){if(!O.isBuffer(Q))throw new TypeError("Argument must be a Buffer");return this===Q?!0:O.compare(this,Q)===0},O.prototype.inspect=function(){let Q="";const X=N.INSPECT_MAX_BYTES;return Q=this.toString("hex",0,X).replace(/(.{2})/g,"$1 ").trim(),this.length>X&&(Q+=" ... "),"<Buffer "+Q+">"},J&&(O.prototype[J]=O.prototype.inspect),O.prototype.compare=function(Q,X,he,Te,$e){if(Wt(Q,Uint8Array)&&(Q=O.from(Q,Q.offset,Q.byteLength)),!O.isBuffer(Q))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Q);if(X===void 0&&(X=0),he===void 0&&(he=Q?Q.length:0),Te===void 0&&(Te=0),$e===void 0&&($e=this.length),X<0||he>Q.length||Te<0||$e>this.length)throw new RangeError("out of range index");if(Te>=$e&&X>=he)return 0;if(Te>=$e)return-1;if(X>=he)return 1;if(X>>>=0,he>>>=0,Te>>>=0,$e>>>=0,this===Q)return 0;let Ue=$e-Te,ct=he-X;const kt=Math.min(Ue,ct),yt=this.slice(Te,$e),It=Q.slice(X,he);for(let St=0;St<kt;++St)if(yt[St]!==It[St]){Ue=yt[St],ct=It[St];break}return Ue<ct?-1:ct<Ue?1:0};function pe(ae,Q,X,he,Te){if(ae.length===0)return-1;if(typeof X=="string"?(he=X,X=0):X>2147483647?X=2147483647:X<-2147483648&&(X=-2147483648),X=+X,Gt(X)&&(X=Te?0:ae.length-1),X<0&&(X=ae.length+X),X>=ae.length){if(Te)return-1;X=ae.length-1}else if(X<0)if(Te)X=0;else return-1;if(typeof Q=="string"&&(Q=O.from(Q,he)),O.isBuffer(Q))return Q.length===0?-1:ye(ae,Q,X,he,Te);if(typeof Q=="number")return Q=Q&255,typeof Uint8Array.prototype.indexOf=="function"?Te?Uint8Array.prototype.indexOf.call(ae,Q,X):Uint8Array.prototype.lastIndexOf.call(ae,Q,X):ye(ae,[Q],X,he,Te);throw new TypeError("val must be string, number or Buffer")}function ye(ae,Q,X,he,Te){let $e=1,Ue=ae.length,ct=Q.length;if(he!==void 0&&(he=String(he).toLowerCase(),he==="ucs2"||he==="ucs-2"||he==="utf16le"||he==="utf-16le")){if(ae.length<2||Q.length<2)return-1;$e=2,Ue/=2,ct/=2,X/=2}function kt(It,St){return $e===1?It[St]:It.readUInt16BE(St*$e)}let yt;if(Te){let It=-1;for(yt=X;yt<Ue;yt++)if(kt(ae,yt)===kt(Q,It===-1?0:yt-It)){if(It===-1&&(It=yt),yt-It+1===ct)return It*$e}else It!==-1&&(yt-=yt-It),It=-1}else for(X+ct>Ue&&(X=Ue-ct),yt=X;yt>=0;yt--){let It=!0;for(let St=0;St<ct;St++)if(kt(ae,yt+St)!==kt(Q,St)){It=!1;break}if(It)return yt}return-1}O.prototype.includes=function(Q,X,he){return this.indexOf(Q,X,he)!==-1},O.prototype.indexOf=function(Q,X,he){return pe(this,Q,X,he,!0)},O.prototype.lastIndexOf=function(Q,X,he){return pe(this,Q,X,he,!1)};function we(ae,Q,X,he){X=Number(X)||0;const Te=ae.length-X;he?(he=Number(he),he>Te&&(he=Te)):he=Te;const $e=Q.length;he>$e/2&&(he=$e/2);let Ue;for(Ue=0;Ue<he;++Ue){const ct=parseInt(Q.substr(Ue*2,2),16);if(Gt(ct))return Ue;ae[X+Ue]=ct}return Ue}function Ie(ae,Q,X,he){return nn(Zt(Q,ae.length-X),ae,X,he)}function be(ae,Q,X,he){return nn(Kt(Q),ae,X,he)}function Se(ae,Q,X,he){return nn(tn(Q),ae,X,he)}function Me(ae,Q,X,he){return nn(fn(Q,ae.length-X),ae,X,he)}O.prototype.write=function(Q,X,he,Te){if(X===void 0)Te="utf8",he=this.length,X=0;else if(he===void 0&&typeof X=="string")Te=X,he=this.length,X=0;else if(isFinite(X))X=X>>>0,isFinite(he)?(he=he>>>0,Te===void 0&&(Te="utf8")):(Te=he,he=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const $e=this.length-X;if((he===void 0||he>$e)&&(he=$e),Q.length>0&&(he<0||X<0)||X>this.length)throw new RangeError("Attempt to write outside buffer bounds");Te||(Te="utf8");let Ue=!1;for(;;)switch(Te){case"hex":return we(this,Q,X,he);case"utf8":case"utf-8":return Ie(this,Q,X,he);case"ascii":case"latin1":case"binary":return be(this,Q,X,he);case"base64":return Se(this,Q,X,he);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Me(this,Q,X,he);default:if(Ue)throw new TypeError("Unknown encoding: "+Te);Te=(""+Te).toLowerCase(),Ue=!0}},O.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function We(ae,Q,X){return Q===0&&X===ae.length?Z.fromByteArray(ae):Z.fromByteArray(ae.slice(Q,X))}function Je(ae,Q,X){X=Math.min(ae.length,X);const he=[];let Te=Q;for(;Te<X;){const $e=ae[Te];let Ue=null,ct=$e>239?4:$e>223?3:$e>191?2:1;if(Te+ct<=X){let kt,yt,It,St;switch(ct){case 1:$e<128&&(Ue=$e);break;case 2:kt=ae[Te+1],(kt&192)===128&&(St=($e&31)<<6|kt&63,St>127&&(Ue=St));break;case 3:kt=ae[Te+1],yt=ae[Te+2],(kt&192)===128&&(yt&192)===128&&(St=($e&15)<<12|(kt&63)<<6|yt&63,St>2047&&(St<55296||St>57343)&&(Ue=St));break;case 4:kt=ae[Te+1],yt=ae[Te+2],It=ae[Te+3],(kt&192)===128&&(yt&192)===128&&(It&192)===128&&(St=($e&15)<<18|(kt&63)<<12|(yt&63)<<6|It&63,St>65535&&St<1114112&&(Ue=St))}}Ue===null?(Ue=65533,ct=1):Ue>65535&&(Ue-=65536,he.push(Ue>>>10&1023|55296),Ue=56320|Ue&1023),he.push(Ue),Te+=ct}return Tt(he)}const Le=4096;function Tt(ae){const Q=ae.length;if(Q<=Le)return String.fromCharCode.apply(String,ae);let X="",he=0;for(;he<Q;)X+=String.fromCharCode.apply(String,ae.slice(he,he+=Le));return X}function Et(ae,Q,X){let he="";X=Math.min(ae.length,X);for(let Te=Q;Te<X;++Te)he+=String.fromCharCode(ae[Te]&127);return he}function At(ae,Q,X){let he="";X=Math.min(ae.length,X);for(let Te=Q;Te<X;++Te)he+=String.fromCharCode(ae[Te]);return he}function jt(ae,Q,X){const he=ae.length;(!Q||Q<0)&&(Q=0),(!X||X<0||X>he)&&(X=he);let Te="";for(let $e=Q;$e<X;++$e)Te+=_n[ae[$e]];return Te}function Pt(ae,Q,X){const he=ae.slice(Q,X);let Te="";for(let $e=0;$e<he.length-1;$e+=2)Te+=String.fromCharCode(he[$e]+he[$e+1]*256);return Te}O.prototype.slice=function(Q,X){const he=this.length;Q=~~Q,X=X===void 0?he:~~X,Q<0?(Q+=he,Q<0&&(Q=0)):Q>he&&(Q=he),X<0?(X+=he,X<0&&(X=0)):X>he&&(X=he),X<Q&&(X=Q);const Te=this.subarray(Q,X);return Object.setPrototypeOf(Te,O.prototype),Te};function _t(ae,Q,X){if(ae%1!==0||ae<0)throw new RangeError("offset is not uint");if(ae+Q>X)throw new RangeError("Trying to access beyond buffer length")}O.prototype.readUintLE=O.prototype.readUIntLE=function(Q,X,he){Q=Q>>>0,X=X>>>0,he||_t(Q,X,this.length);let Te=this[Q],$e=1,Ue=0;for(;++Ue<X&&($e*=256);)Te+=this[Q+Ue]*$e;return Te},O.prototype.readUintBE=O.prototype.readUIntBE=function(Q,X,he){Q=Q>>>0,X=X>>>0,he||_t(Q,X,this.length);let Te=this[Q+--X],$e=1;for(;X>0&&($e*=256);)Te+=this[Q+--X]*$e;return Te},O.prototype.readUint8=O.prototype.readUInt8=function(Q,X){return Q=Q>>>0,X||_t(Q,1,this.length),this[Q]},O.prototype.readUint16LE=O.prototype.readUInt16LE=function(Q,X){return Q=Q>>>0,X||_t(Q,2,this.length),this[Q]|this[Q+1]<<8},O.prototype.readUint16BE=O.prototype.readUInt16BE=function(Q,X){return Q=Q>>>0,X||_t(Q,2,this.length),this[Q]<<8|this[Q+1]},O.prototype.readUint32LE=O.prototype.readUInt32LE=function(Q,X){return Q=Q>>>0,X||_t(Q,4,this.length),(this[Q]|this[Q+1]<<8|this[Q+2]<<16)+this[Q+3]*16777216},O.prototype.readUint32BE=O.prototype.readUInt32BE=function(Q,X){return Q=Q>>>0,X||_t(Q,4,this.length),this[Q]*16777216+(this[Q+1]<<16|this[Q+2]<<8|this[Q+3])},O.prototype.readBigUInt64LE=rn(function(Q){Q=Q>>>0,gt(Q,"offset");const X=this[Q],he=this[Q+7];(X===void 0||he===void 0)&&Dt(Q,this.length-8);const Te=X+this[++Q]*2**8+this[++Q]*2**16+this[++Q]*2**24,$e=this[++Q]+this[++Q]*2**8+this[++Q]*2**16+he*2**24;return BigInt(Te)+(BigInt($e)<<BigInt(32))}),O.prototype.readBigUInt64BE=rn(function(Q){Q=Q>>>0,gt(Q,"offset");const X=this[Q],he=this[Q+7];(X===void 0||he===void 0)&&Dt(Q,this.length-8);const Te=X*2**24+this[++Q]*2**16+this[++Q]*2**8+this[++Q],$e=this[++Q]*2**24+this[++Q]*2**16+this[++Q]*2**8+he;return(BigInt(Te)<<BigInt(32))+BigInt($e)}),O.prototype.readIntLE=function(Q,X,he){Q=Q>>>0,X=X>>>0,he||_t(Q,X,this.length);let Te=this[Q],$e=1,Ue=0;for(;++Ue<X&&($e*=256);)Te+=this[Q+Ue]*$e;return $e*=128,Te>=$e&&(Te-=Math.pow(2,8*X)),Te},O.prototype.readIntBE=function(Q,X,he){Q=Q>>>0,X=X>>>0,he||_t(Q,X,this.length);let Te=X,$e=1,Ue=this[Q+--Te];for(;Te>0&&($e*=256);)Ue+=this[Q+--Te]*$e;return $e*=128,Ue>=$e&&(Ue-=Math.pow(2,8*X)),Ue},O.prototype.readInt8=function(Q,X){return Q=Q>>>0,X||_t(Q,1,this.length),this[Q]&128?(255-this[Q]+1)*-1:this[Q]},O.prototype.readInt16LE=function(Q,X){Q=Q>>>0,X||_t(Q,2,this.length);const he=this[Q]|this[Q+1]<<8;return he&32768?he|4294901760:he},O.prototype.readInt16BE=function(Q,X){Q=Q>>>0,X||_t(Q,2,this.length);const he=this[Q+1]|this[Q]<<8;return he&32768?he|4294901760:he},O.prototype.readInt32LE=function(Q,X){return Q=Q>>>0,X||_t(Q,4,this.length),this[Q]|this[Q+1]<<8|this[Q+2]<<16|this[Q+3]<<24},O.prototype.readInt32BE=function(Q,X){return Q=Q>>>0,X||_t(Q,4,this.length),this[Q]<<24|this[Q+1]<<16|this[Q+2]<<8|this[Q+3]},O.prototype.readBigInt64LE=rn(function(Q){Q=Q>>>0,gt(Q,"offset");const X=this[Q],he=this[Q+7];(X===void 0||he===void 0)&&Dt(Q,this.length-8);const Te=this[Q+4]+this[Q+5]*2**8+this[Q+6]*2**16+(he<<24);return(BigInt(Te)<<BigInt(32))+BigInt(X+this[++Q]*2**8+this[++Q]*2**16+this[++Q]*2**24)}),O.prototype.readBigInt64BE=rn(function(Q){Q=Q>>>0,gt(Q,"offset");const X=this[Q],he=this[Q+7];(X===void 0||he===void 0)&&Dt(Q,this.length-8);const Te=(X<<24)+this[++Q]*2**16+this[++Q]*2**8+this[++Q];return(BigInt(Te)<<BigInt(32))+BigInt(this[++Q]*2**24+this[++Q]*2**16+this[++Q]*2**8+he)}),O.prototype.readFloatLE=function(Q,X){return Q=Q>>>0,X||_t(Q,4,this.length),q.read(this,Q,!0,23,4)},O.prototype.readFloatBE=function(Q,X){return Q=Q>>>0,X||_t(Q,4,this.length),q.read(this,Q,!1,23,4)},O.prototype.readDoubleLE=function(Q,X){return Q=Q>>>0,X||_t(Q,8,this.length),q.read(this,Q,!0,52,8)},O.prototype.readDoubleBE=function(Q,X){return Q=Q>>>0,X||_t(Q,8,this.length),q.read(this,Q,!1,52,8)};function rt(ae,Q,X,he,Te,$e){if(!O.isBuffer(ae))throw new TypeError('"buffer" argument must be a Buffer instance');if(Q>Te||Q<$e)throw new RangeError('"value" argument is out of bounds');if(X+he>ae.length)throw new RangeError("Index out of range")}O.prototype.writeUintLE=O.prototype.writeUIntLE=function(Q,X,he,Te){if(Q=+Q,X=X>>>0,he=he>>>0,!Te){const ct=Math.pow(2,8*he)-1;rt(this,Q,X,he,ct,0)}let $e=1,Ue=0;for(this[X]=Q&255;++Ue<he&&($e*=256);)this[X+Ue]=Q/$e&255;return X+he},O.prototype.writeUintBE=O.prototype.writeUIntBE=function(Q,X,he,Te){if(Q=+Q,X=X>>>0,he=he>>>0,!Te){const ct=Math.pow(2,8*he)-1;rt(this,Q,X,he,ct,0)}let $e=he-1,Ue=1;for(this[X+$e]=Q&255;--$e>=0&&(Ue*=256);)this[X+$e]=Q/Ue&255;return X+he},O.prototype.writeUint8=O.prototype.writeUInt8=function(Q,X,he){return Q=+Q,X=X>>>0,he||rt(this,Q,X,1,255,0),this[X]=Q&255,X+1},O.prototype.writeUint16LE=O.prototype.writeUInt16LE=function(Q,X,he){return Q=+Q,X=X>>>0,he||rt(this,Q,X,2,65535,0),this[X]=Q&255,this[X+1]=Q>>>8,X+2},O.prototype.writeUint16BE=O.prototype.writeUInt16BE=function(Q,X,he){return Q=+Q,X=X>>>0,he||rt(this,Q,X,2,65535,0),this[X]=Q>>>8,this[X+1]=Q&255,X+2},O.prototype.writeUint32LE=O.prototype.writeUInt32LE=function(Q,X,he){return Q=+Q,X=X>>>0,he||rt(this,Q,X,4,4294967295,0),this[X+3]=Q>>>24,this[X+2]=Q>>>16,this[X+1]=Q>>>8,this[X]=Q&255,X+4},O.prototype.writeUint32BE=O.prototype.writeUInt32BE=function(Q,X,he){return Q=+Q,X=X>>>0,he||rt(this,Q,X,4,4294967295,0),this[X]=Q>>>24,this[X+1]=Q>>>16,this[X+2]=Q>>>8,this[X+3]=Q&255,X+4};function Vt(ae,Q,X,he,Te){st(Q,he,Te,ae,X,7);let $e=Number(Q&BigInt(4294967295));ae[X++]=$e,$e=$e>>8,ae[X++]=$e,$e=$e>>8,ae[X++]=$e,$e=$e>>8,ae[X++]=$e;let Ue=Number(Q>>BigInt(32)&BigInt(4294967295));return ae[X++]=Ue,Ue=Ue>>8,ae[X++]=Ue,Ue=Ue>>8,ae[X++]=Ue,Ue=Ue>>8,ae[X++]=Ue,X}function Rt(ae,Q,X,he,Te){st(Q,he,Te,ae,X,7);let $e=Number(Q&BigInt(4294967295));ae[X+7]=$e,$e=$e>>8,ae[X+6]=$e,$e=$e>>8,ae[X+5]=$e,$e=$e>>8,ae[X+4]=$e;let Ue=Number(Q>>BigInt(32)&BigInt(4294967295));return ae[X+3]=Ue,Ue=Ue>>8,ae[X+2]=Ue,Ue=Ue>>8,ae[X+1]=Ue,Ue=Ue>>8,ae[X]=Ue,X+8}O.prototype.writeBigUInt64LE=rn(function(Q,X=0){return Vt(this,Q,X,BigInt(0),BigInt("0xffffffffffffffff"))}),O.prototype.writeBigUInt64BE=rn(function(Q,X=0){return Rt(this,Q,X,BigInt(0),BigInt("0xffffffffffffffff"))}),O.prototype.writeIntLE=function(Q,X,he,Te){if(Q=+Q,X=X>>>0,!Te){const kt=Math.pow(2,8*he-1);rt(this,Q,X,he,kt-1,-kt)}let $e=0,Ue=1,ct=0;for(this[X]=Q&255;++$e<he&&(Ue*=256);)Q<0&&ct===0&&this[X+$e-1]!==0&&(ct=1),this[X+$e]=(Q/Ue>>0)-ct&255;return X+he},O.prototype.writeIntBE=function(Q,X,he,Te){if(Q=+Q,X=X>>>0,!Te){const kt=Math.pow(2,8*he-1);rt(this,Q,X,he,kt-1,-kt)}let $e=he-1,Ue=1,ct=0;for(this[X+$e]=Q&255;--$e>=0&&(Ue*=256);)Q<0&&ct===0&&this[X+$e+1]!==0&&(ct=1),this[X+$e]=(Q/Ue>>0)-ct&255;return X+he},O.prototype.writeInt8=function(Q,X,he){return Q=+Q,X=X>>>0,he||rt(this,Q,X,1,127,-128),Q<0&&(Q=255+Q+1),this[X]=Q&255,X+1},O.prototype.writeInt16LE=function(Q,X,he){return Q=+Q,X=X>>>0,he||rt(this,Q,X,2,32767,-32768),this[X]=Q&255,this[X+1]=Q>>>8,X+2},O.prototype.writeInt16BE=function(Q,X,he){return Q=+Q,X=X>>>0,he||rt(this,Q,X,2,32767,-32768),this[X]=Q>>>8,this[X+1]=Q&255,X+2},O.prototype.writeInt32LE=function(Q,X,he){return Q=+Q,X=X>>>0,he||rt(this,Q,X,4,2147483647,-2147483648),this[X]=Q&255,this[X+1]=Q>>>8,this[X+2]=Q>>>16,this[X+3]=Q>>>24,X+4},O.prototype.writeInt32BE=function(Q,X,he){return Q=+Q,X=X>>>0,he||rt(this,Q,X,4,2147483647,-2147483648),Q<0&&(Q=4294967295+Q+1),this[X]=Q>>>24,this[X+1]=Q>>>16,this[X+2]=Q>>>8,this[X+3]=Q&255,X+4},O.prototype.writeBigInt64LE=rn(function(Q,X=0){return Vt(this,Q,X,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),O.prototype.writeBigInt64BE=rn(function(Q,X=0){return Rt(this,Q,X,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Pe(ae,Q,X,he,Te,$e){if(X+he>ae.length)throw new RangeError("Index out of range");if(X<0)throw new RangeError("Index out of range")}function it(ae,Q,X,he,Te){return Q=+Q,X=X>>>0,Te||Pe(ae,Q,X,4),q.write(ae,Q,X,he,23,4),X+4}O.prototype.writeFloatLE=function(Q,X,he){return it(this,Q,X,!0,he)},O.prototype.writeFloatBE=function(Q,X,he){return it(this,Q,X,!1,he)};function zt(ae,Q,X,he,Te){return Q=+Q,X=X>>>0,Te||Pe(ae,Q,X,8),q.write(ae,Q,X,he,52,8),X+8}O.prototype.writeDoubleLE=function(Q,X,he){return zt(this,Q,X,!0,he)},O.prototype.writeDoubleBE=function(Q,X,he){return zt(this,Q,X,!1,he)},O.prototype.copy=function(Q,X,he,Te){if(!O.isBuffer(Q))throw new TypeError("argument should be a Buffer");if(he||(he=0),!Te&&Te!==0&&(Te=this.length),X>=Q.length&&(X=Q.length),X||(X=0),Te>0&&Te<he&&(Te=he),Te===he||Q.length===0||this.length===0)return 0;if(X<0)throw new RangeError("targetStart out of bounds");if(he<0||he>=this.length)throw new RangeError("Index out of range");if(Te<0)throw new RangeError("sourceEnd out of bounds");Te>this.length&&(Te=this.length),Q.length-X<Te-he&&(Te=Q.length-X+he);const $e=Te-he;return this===Q&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(X,he,Te):Uint8Array.prototype.set.call(Q,this.subarray(he,Te),X),$e},O.prototype.fill=function(Q,X,he,Te){if(typeof Q=="string"){if(typeof X=="string"?(Te=X,X=0,he=this.length):typeof he=="string"&&(Te=he,he=this.length),Te!==void 0&&typeof Te!="string")throw new TypeError("encoding must be a string");if(typeof Te=="string"&&!O.isEncoding(Te))throw new TypeError("Unknown encoding: "+Te);if(Q.length===1){const Ue=Q.charCodeAt(0);(Te==="utf8"&&Ue<128||Te==="latin1")&&(Q=Ue)}}else typeof Q=="number"?Q=Q&255:typeof Q=="boolean"&&(Q=Number(Q));if(X<0||this.length<X||this.length<he)throw new RangeError("Out of range index");if(he<=X)return this;X=X>>>0,he=he===void 0?this.length:he>>>0,Q||(Q=0);let $e;if(typeof Q=="number")for($e=X;$e<he;++$e)this[$e]=Q;else{const Ue=O.isBuffer(Q)?Q:O.from(Q,Te),ct=Ue.length;if(ct===0)throw new TypeError('The value "'+Q+'" is invalid for argument "value"');for($e=0;$e<he-X;++$e)this[$e+X]=Ue[$e%ct]}return this};const Bt={};function nt(ae,Q,X){Bt[ae]=class extends X{constructor(){super(),Object.defineProperty(this,"message",{value:Q.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${ae}]`,this.stack,delete this.name}get code(){return ae}set code(Te){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Te,writable:!0})}toString(){return`${this.name} [${ae}]: ${this.message}`}}}nt("ERR_BUFFER_OUT_OF_BOUNDS",function(ae){return ae?`${ae} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),nt("ERR_INVALID_ARG_TYPE",function(ae,Q){return`The "${ae}" argument must be of type number. Received type ${typeof Q}`},TypeError),nt("ERR_OUT_OF_RANGE",function(ae,Q,X){let he=`The value of "${ae}" is out of range.`,Te=X;return Number.isInteger(X)&&Math.abs(X)>2**32?Te=et(String(X)):typeof X=="bigint"&&(Te=String(X),(X>BigInt(2)**BigInt(32)||X<-(BigInt(2)**BigInt(32)))&&(Te=et(Te)),Te+="n"),he+=` It must be ${Q}. Received ${Te}`,he},RangeError);function et(ae){let Q="",X=ae.length;const he=ae[0]==="-"?1:0;for(;X>=he+4;X-=3)Q=`_${ae.slice(X-3,X)}${Q}`;return`${ae.slice(0,X)}${Q}`}function ot(ae,Q,X){gt(Q,"offset"),(ae[Q]===void 0||ae[Q+X]===void 0)&&Dt(Q,ae.length-(X+1))}function st(ae,Q,X,he,Te,$e){if(ae>X||ae<Q){const Ue=typeof Q=="bigint"?"n":"";let ct;throw Q===0||Q===BigInt(0)?ct=`>= 0${Ue} and < 2${Ue} ** ${($e+1)*8}${Ue}`:ct=`>= -(2${Ue} ** ${($e+1)*8-1}${Ue}) and < 2 ** ${($e+1)*8-1}${Ue}`,new Bt.ERR_OUT_OF_RANGE("value",ct,ae)}ot(he,Te,$e)}function gt(ae,Q){if(typeof ae!="number")throw new Bt.ERR_INVALID_ARG_TYPE(Q,"number",ae)}function Dt(ae,Q,X){throw Math.floor(ae)!==ae?(gt(ae,X),new Bt.ERR_OUT_OF_RANGE("offset","an integer",ae)):Q<0?new Bt.ERR_BUFFER_OUT_OF_BOUNDS:new Bt.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${Q}`,ae)}const Ut=/[^+/0-9A-Za-z-_]/g;function Lt(ae){if(ae=ae.split("=")[0],ae=ae.trim().replace(Ut,""),ae.length<2)return"";for(;ae.length%4!==0;)ae=ae+"=";return ae}function Zt(ae,Q){Q=Q||1/0;let X;const he=ae.length;let Te=null;const $e=[];for(let Ue=0;Ue<he;++Ue){if(X=ae.charCodeAt(Ue),X>55295&&X<57344){if(!Te){if(X>56319){(Q-=3)>-1&&$e.push(239,191,189);continue}else if(Ue+1===he){(Q-=3)>-1&&$e.push(239,191,189);continue}Te=X;continue}if(X<56320){(Q-=3)>-1&&$e.push(239,191,189),Te=X;continue}X=(Te-55296<<10|X-56320)+65536}else Te&&(Q-=3)>-1&&$e.push(239,191,189);if(Te=null,X<128){if((Q-=1)<0)break;$e.push(X)}else if(X<2048){if((Q-=2)<0)break;$e.push(X>>6|192,X&63|128)}else if(X<65536){if((Q-=3)<0)break;$e.push(X>>12|224,X>>6&63|128,X&63|128)}else if(X<1114112){if((Q-=4)<0)break;$e.push(X>>18|240,X>>12&63|128,X>>6&63|128,X&63|128)}else throw new Error("Invalid code point")}return $e}function Kt(ae){const Q=[];for(let X=0;X<ae.length;++X)Q.push(ae.charCodeAt(X)&255);return Q}function fn(ae,Q){let X,he,Te;const $e=[];for(let Ue=0;Ue<ae.length&&!((Q-=2)<0);++Ue)X=ae.charCodeAt(Ue),he=X>>8,Te=X%256,$e.push(Te),$e.push(he);return $e}function tn(ae){return Z.toByteArray(Lt(ae))}function nn(ae,Q,X,he){let Te;for(Te=0;Te<he&&!(Te+X>=Q.length||Te>=ae.length);++Te)Q[Te+X]=ae[Te];return Te}function Wt(ae,Q){return ae instanceof Q||ae!=null&&ae.constructor!=null&&ae.constructor.name!=null&&ae.constructor.name===Q.name}function Gt(ae){return ae!==ae}const _n=function(){const ae="0123456789abcdef",Q=new Array(256);for(let X=0;X<16;++X){const he=X*16;for(let Te=0;Te<16;++Te)Q[he+Te]=ae[X]+ae[Te]}return Q}();function rn(ae){return typeof BigInt>"u"?Qt:ae}function Qt(){throw new Error("BigInt not supported")}}(buffer)),buffer}var toolsEbml={},hasRequiredToolsEbml;function requireToolsEbml(){if(hasRequiredToolsEbml)return toolsEbml;hasRequiredToolsEbml=1;var N=toolsEbml&&toolsEbml.__assign||function(){return N=Object.assign||function(I){for(var D,a=1,O=arguments.length;a<O;a++){D=arguments[a];for(var F in D)Object.prototype.hasOwnProperty.call(D,F)&&(I[F]=D[F])}return I},N.apply(this,arguments)},Z=toolsEbml&&toolsEbml.__spreadArray||function(I,D,a){if(a||arguments.length===2)for(var O=0,F=D.length,z;O<F;O++)(z||!(O in D))&&(z||(z=Array.prototype.slice.call(D,0,O)),z[O]=D[O]);return I.concat(z||Array.prototype.slice.call(D))};Object.defineProperty(toolsEbml,"__esModule",{value:!0});var q=requireTools(),J=function(){function I(){}return I.readVint=function(D,a){a===void 0&&(a=0);var O=8-Math.floor(Math.log2(D[a]));if(O>8){var F=I.readHexString(D,a,a+O);throw new Error("Unrepresentable length: ".concat(O," ").concat(F))}if(a+O>D.length)return null;for(var z=D[a]&(1<<8-O)-1,K=1;K<O;K+=1){if(K===7&&z>=Math.pow(2,8)&&D[a+7]>0)return{length:O,value:-1};z*=Math.pow(2,8),z+=D[a+K]}return{length:O,value:z}},I.writeVint=function(D){if(D<0||D>Math.pow(2,53))throw new Error("Unrepresentable value: ".concat(D));var a=1;for(a=1;a<=8&&!(D<Math.pow(2,7*a)-1);a+=1);for(var O=q.Buffer.alloc(a),F=D,z=1;z<=a;z+=1){var K=F&255;O[a-z]=K,F-=K,F/=Math.pow(2,8)}return O[0]|=1<<8-a,O},I.concatenate=function(D,a){return!D&&!a?q.Buffer.from([]):!D||D.byteLength===0?a:!a||a.byteLength===0?D:q.Buffer.from(Z(Z([],D,!0),a,!0))},I.readHexString=function(D,a,O){return a===void 0&&(a=0),O===void 0&&(O=D.byteLength),Array.from(D.slice(a,O)).map(function(F){return Number(F).toString(16)}).reduce(function(F,z){return"".concat(F).concat(z.padStart(2,"0"))},"")},I.readUtf8=function(D){try{return q.Buffer.from(D).toString("utf8")}catch{return null}},I.readUnsigned=function(D){var a=new DataView(D.buffer,D.byteOffset,D.byteLength);switch(D.byteLength){case 1:return a.getUint8(0);case 2:return a.getUint16(0);case 4:return a.getUint32(0)}return D.byteLength<=6?D.reduce(function(O,F){return O*256+F},0):I.readHexString(D,0,D.byteLength)},I.readSigned=function(D){var a=new DataView(D.buffer,D.byteOffset,D.byteLength);switch(D.byteLength){case 1:return a.getInt8(0);case 2:return a.getInt16(0);case 4:return a.getInt32(0);default:return NaN}},I.readFloat=function(D){var a=new DataView(D.buffer,D.byteOffset,D.byteLength);switch(D.byteLength){case 4:return a.getFloat32(0);case 8:return a.getFloat64(0);default:return NaN}},I.readDate=function(D){var a=new DataView(D.buffer,D.byteOffset,D.byteLength);switch(D.byteLength){case 1:return new Date(a.getUint8(0));case 2:return new Date(a.getUint16(0));case 4:return new Date(a.getUint32(0));case 8:return new Date(Number.parseInt(I.readHexString(D),16));default:return new Date(0)}},I.readDataFromTag=function(D,a){var O=D.type,F=D.name,z=D.track,K=D.discardable||!1,te=D.keyframe||!1,ne=null,ee;switch(O){case"u":ee=I.readUnsigned(a);break;case"f":ee=I.readFloat(a);break;case"i":ee=I.readSigned(a);break;case"s":ee=String.fromCharCode.apply(String,a);break;case"8":ee=I.readUtf8(a);break;case"d":ee=I.readDate(a);break}if(F==="SimpleBlock"||F==="Block"){var re=0,ce=I.readVint(a,re),oe=ce.length,se=ce.value;re+=oe,z=se,ee=I.readSigned(a.subarray(re,re+2)),re+=2,F==="SimpleBlock"&&(te=!!(a[oe+2]&128),K=!!(a[oe+2]&1)),re+=1,ne=a.subarray(re)}return N(N({},D),{data:a,discardable:K,keyframe:te,payload:ne,track:z,value:ee})},I}();return toolsEbml.default=J,toolsEbml}var vint,hasRequiredVint;function requireVint(){return hasRequiredVint||(hasRequiredVint=1,vint=function(N,Z,q){Z=Z||0;for(var J=1;J<=8&&!(N[Z]>=Math.pow(2,8-J));J++);if(J>8)throw new Error("Unrepresentable length: "+J+" "+N.toString("hex",Z,Z+J));if(Z+J>N.length)return null;var I,D=N[Z]&(1<<8-J)-1;for(I=1;I<J;I++){if(I===7&&D>=Math.pow(2,45)&&N[Z+7]>0)return{length:J,value:-1};D*=Math.pow(2,8),D+=N[Z+I]}return q&&(D-=Math.pow(2,J*7-1)-1),{length:J,value:D}}),vint}var bufferReader,hasRequiredBufferReader;function requireBufferReader(){if(hasRequiredBufferReader)return bufferReader;hasRequiredBufferReader=1;var N=requireVint();function Z(q){this.buffer=q,this.offset=0}return Z.prototype.nextInt16BE=function(){var q=this.buffer.readInt16BE(this.offset);return this.offset+=2,q},Z.prototype.nextUInt8=function(){var q=this.buffer.readUInt8(this.offset);return this.offset+=1,q},Z.prototype.nextUIntV=function(){var q=N(this.buffer,this.offset);return this.offset+=q.length,q.value},Z.prototype.nextIntV=function(){var q=N(this.buffer,this.offset,!0);return this.offset+=q.length,q.value},Z.prototype.nextBuffer=function(q){var J=q?this.buffer.slice(this.offset,this.offset+q):this.buffer.slice(this.offset);return this.offset+=q||this.length,J},Object.defineProperty(Z.prototype,"length",{get:function(){return this.buffer.length-this.offset}}),bufferReader=Z,bufferReader}var ebmlBlock,hasRequiredEbmlBlock;function requireEbmlBlock(){if(hasRequiredEbmlBlock)return ebmlBlock;hasRequiredEbmlBlock=1;var N=requireBufferReader(),Z=1,q=3,J=2;ebmlBlock=function(D){var a={},O=new N(D);a.trackNumber=O.nextUIntV(),a.timecode=O.nextInt16BE();var F=O.nextUInt8();a.invisible=!!(F&8),a.keyframe=!!(F&128),a.discardable=!!(F&1);var z=(F&6)>>1;return a.frames=I(O,z),a};function I(D,a){if(!a)return[D.nextBuffer()];var O,F,z=[],K=D.nextUInt8()+1;if(a===J){if(D.length%K!==0)throw new Error("Fixed-Size Lacing Error");for(F=D.length/K,O=0;O<K;O++)z.push(D.nextBuffer(F));return z}var te=[];if(a===Z)for(O=0;O<K-1;O++){var ne;F=0;do ne=D.nextUInt8(),F+=ne;while(ne===255);te.push(F)}else if(a===q)for(F=D.nextUIntV(),te.push(F),O=1;O<K-1;O++)F+=D.nextIntV(),te.push(F);for(O=0;O<K-1;O++)z.push(D.nextBuffer(te[O]));return z.push(D.nextBuffer()),z}return ebmlBlock}var hasRequiredTools;function requireTools(){return hasRequiredTools||(hasRequiredTools=1,function(N){Object.defineProperty(N,"__esModule",{value:!0}),N.convertEBMLDateToJSDate=N.createFloatBuffer=N.createIntBuffer=N.createUIntBuffer=N.encodeValueToBuffer=N.concat=N.putRefinedMetaData=N.extractElement=N.removeElement=N.makeMetadataSeekable=N.createRIFFChunk=N.VP8BitStreamToRiffWebPBuffer=N.WebPBlockFilter=N.encodeTag=N.readBlock=N.ebmlBlock=N.writeVint=N.readVint=N.Buffer=void 0;var Z=requireInt64Buffer(),q=requireEBMLEncoder(),J=requireBuffer(),I=requireToolsEbml(),D=requireEbmlBlock();N.Buffer=J.Buffer,N.readVint=I.default.readVint,N.writeVint=I.default.writeVint,N.ebmlBlock=D;function a(be){return(0,N.ebmlBlock)(new N.Buffer(be))}N.readBlock=a;function O(be,Se,Me){return Me===void 0&&(Me=!1),ue([be,Me?new N.Buffer("01ffffffffffffff","hex"):(0,N.writeVint)(Se.length),Se])}N.encodeTag=O;function F(be){return be.reduce(function(Se,Me){if(Me.type!=="b"||Me.name!=="SimpleBlock")return Se;var We=(0,N.ebmlBlock)(Me.data),Je=We.frames.some(function(Le){var Tt=Le.slice(3,6).toString("hex");return Tt==="9d012a"});return Je?Se.concat(Me):Se},[])}N.WebPBlockFilter=F;function z(be){var Se=K("VP8 ",be),Me=ue([new N.Buffer("WEBP","ascii"),Se]);return K("RIFF",Me)}N.VP8BitStreamToRiffWebPBuffer=z;function K(be,Se){var Me=new N.Buffer(4);return Me.writeUInt32LE(Se.byteLength,0),ue([new N.Buffer(be.substr(0,4),"ascii"),Me,Se,new N.Buffer(Se.byteLength%2===0?0:1)])}N.createRIFFChunk=K;function te(be,Se,Me){var We=ee("EBML",be),Je=ce(We),Le=Je+12,Tt=be[be.length-1].dataEnd-Le,Et=ee("Info",be);ne("Duration",Et),Et.splice(1,0,{name:"Duration",type:"f",data:we(Se,8)});for(var At=ce(Et),jt=ee("Tracks",be),Pt=ce(jt),_t=47,rt=[],Vt=5+Me.length*15,Rt=[],Pe=-1,it=10,zt=function(st){var gt=_t,Dt=gt+At,Ut=Dt+Pt,Lt=Ut+Vt,Zt=Lt-Tt;if(rt=[],rt.push({name:"SeekHead",type:"m",isEnd:!1}),rt.push({name:"Seek",type:"m",isEnd:!1}),rt.push({name:"SeekID",type:"b",data:new N.Buffer([21,73,169,102])}),rt.push({name:"SeekPosition",type:"u",data:pe(gt)}),rt.push({name:"Seek",type:"m",isEnd:!0}),rt.push({name:"Seek",type:"m",isEnd:!1}),rt.push({name:"SeekID",type:"b",data:new N.Buffer([22,84,174,107])}),rt.push({name:"SeekPosition",type:"u",data:pe(Dt)}),rt.push({name:"Seek",type:"m",isEnd:!0}),rt.push({name:"Seek",type:"m",isEnd:!1}),rt.push({name:"SeekID",type:"b",data:new N.Buffer([28,83,187,107])}),rt.push({name:"SeekPosition",type:"u",data:pe(Ut)}),rt.push({name:"Seek",type:"m",isEnd:!0}),rt.push({name:"SeekHead",type:"m",isEnd:!0}),_t=ce(rt),Rt=[],Rt.push({name:"Cues",type:"m",isEnd:!1}),Me.forEach(function(Kt){var fn=Kt.CueTrack,tn=Kt.CueClusterPosition,nn=Kt.CueTime;Rt.push({name:"CuePoint",type:"m",isEnd:!1}),Rt.push({name:"CueTime",type:"u",data:pe(nn)}),Rt.push({name:"CueTrackPositions",type:"m",isEnd:!1}),Rt.push({name:"CueTrack",type:"u",data:pe(fn)}),tn-=Le,tn+=Zt,Rt.push({name:"CueClusterPosition",type:"u",data:pe(tn)}),Rt.push({name:"CueTrackPositions",type:"m",isEnd:!0}),Rt.push({name:"CuePoint",type:"m",isEnd:!0})}),Rt.push({name:"Cues",type:"m",isEnd:!0}),Vt=ce(Rt),Pe!==Zt){if(Pe=Zt,st===it-1)throw new Error("Failed to converge to a stable metadata size")}else return"break"},Bt=0;Bt<it;Bt++){var nt=zt(Bt);if(nt==="break")break}var et=[].concat.apply([],[We,{name:"Segment",type:"m",isEnd:!1,unknownSize:!0},rt,Et,jt,Rt]),ot=new q.default().encode(et);return ot}N.makeMetadataSeekable=te;function ne(be,Se){for(var Me=-1,We=0;We<Se.length;We++){var Je=Se[We];if(Je.name===be)if(Je.type==="m")if(!Je.isEnd)Me=We;else{if(Me==-1)throw new Error("Detected ".concat(be," closing element before finding the start"));Se.splice(Me,We-Me+1);return}else{Se.splice(We,1);return}}}N.removeElement=ne;function ee(be,Se){for(var Me=[],We=-1,Je=0;Je<Se.length;Je++){var Le=Se[Je];if(Le.name===be)if(Le.type==="m")if(!Le.isEnd)We=Je;else{if(We==-1)throw new Error("Detected ".concat(be," closing element before finding the start"));Me=Se.slice(We,Je+1);break}else{Me.push(Se[Je]);break}}return Me}N.extractElement=ee;function re(be,Se){Array.isArray(Se.cueInfos)&&!Array.isArray(Se.cues)&&(console.warn("putRefinedMetaData: info.cueInfos property is deprecated. please use info.cues"),Se.cues=Se.cueInfos);for(var Me=[],We=[],Je=0;Je<be.length;Je++){var Le=be[Je];if(Le.type==="m"&&Le.name==="Segment"){if(Me=be.slice(0,Je),We=be.slice(Je),Le.unknownSize){We.shift();break}throw new Error("this metadata is not streaming webm file")}}if(!(We[We.length-1].dataEnd>0))throw new Error("metadata dataEnd has wrong number");var Tt=We[We.length-1].dataEnd,Et=Me[Me.length-1].dataEnd,At=new q.default().encode(Me).byteLength,jt=At-Et,Pt=Tt-We[0].tagStart;We[0].tagStart-Et,We[0].tagStart;var _t=new N.Buffer([24,83,128,103]),rt=new N.Buffer("01ffffffffffffff","hex"),Vt=_t.byteLength+rt.byteLength,Rt=Pt,Pe;for(Pe=1;Pe<20;Pe++){var it=Et+Vt+Rt,zt=it-Tt,Bt=jt+zt,nt=oe(We,Bt,Se),et=new q.default().encode(nt).byteLength;if(et===Rt)return new q.default().encode([].concat(Me,[{type:"m",name:"Segment",isEnd:!1,unknownSize:!0}],nt));Rt=et}throw new Error("unable to refine metadata, stable size could not be found in "+Pe+" iterations!")}N.putRefinedMetaData=re;function ce(be){var Se=new q.default;return be.reduce(function(Me,We){return Me.concat(Se.encode([We]))},[]).reduce(function(Me,We){return Me+We.byteLength},0)}function oe(be,Se,Me){var We=Me.duration,Je=Me.clusterPtrs,Le=Me.cues,Tt=be.slice(0);if(typeof We=="number"){var Et=!1;Tt.forEach(function(jt){jt.type==="f"&&jt.name==="Duration"&&(Et=!0,jt.data=we(We,8))}),Et||ge(Tt,"Info",[{name:"Duration",type:"f",data:we(We,8)}])}Array.isArray(Le)&&ge(Tt,"Cues",fe(Le,Se));var At=[];return Array.isArray(Je)&&(console.warn("append cluster pointers to seekhead is deprecated. please use cues"),At=se(Je,Se)),ge(Tt,"SeekHead",At,!0),Tt}function se(be,Se){var Me=[];return be.forEach(function(We){Me.push({name:"Seek",type:"m",isEnd:!1}),Me.push({name:"SeekID",type:"b",data:new N.Buffer([31,67,182,117])}),Me.push({name:"SeekPosition",type:"u",data:pe(We+Se)}),Me.push({name:"Seek",type:"m",isEnd:!0})}),Me}function fe(be,Se){var Me=[];return be.forEach(function(We){var Je=We.CueTrack,Le=We.CueClusterPosition,Tt=We.CueTime;Me.push({name:"CuePoint",type:"m",isEnd:!1}),Me.push({name:"CueTime",type:"u",data:pe(Tt)}),Me.push({name:"CueTrackPositions",type:"m",isEnd:!1}),Me.push({name:"CueTrack",type:"u",data:pe(Je)}),Me.push({name:"CueClusterPosition",type:"u",data:pe(Le+Se)}),Me.push({name:"CueTrackPositions",type:"m",isEnd:!0}),Me.push({name:"CuePoint",type:"m",isEnd:!0})}),Me}function ge(be,Se,Me,We){We===void 0&&(We=!1);for(var Je=-1,Le=0;Le<be.length;Le++){var Tt=be[Le];if(Tt.type==="m"&&Tt.name===Se&&Tt.isEnd===!1){Je=Le;break}}Je>=0?Array.prototype.splice.apply(be,[Je+1,0].concat(Me)):We?[].concat([{name:Se,type:"m",isEnd:!1}],Me,[{name:Se,type:"m",isEnd:!0}]).reverse().forEach(function(Et){be.unshift(Et)}):(be.push({name:Se,type:"m",isEnd:!1}),Me.forEach(function(Et){be.push(Et)}),be.push({name:Se,type:"m",isEnd:!0}))}function ue(be){return N.Buffer.concat(be)}N.concat=ue;function _e(be){var Se=new N.Buffer(0);if(be.type==="m")return be;switch(be.type){case"u":Se=pe(be.value);break;case"i":Se=ye(be.value);break;case"f":Se=we(be.value);break;case"s":Se=new N.Buffer(be.value,"ascii");break;case"8":Se=new N.Buffer(be.value,"utf8");break;case"b":Se=be.value;break;case"d":Se=new Z.Int64BE(be.value.getTime().toString()).toBuffer();break}return Object.assign({},be,{data:Se})}N.encodeValueToBuffer=_e;function pe(be){for(var Se=1;be>=Math.pow(2,8*Se);Se++);if(Se>=7)return console.warn("7bit or more bigger uint not supported."),new Z.Uint64BE(be).toBuffer();var Me=new N.Buffer(Se);return Me.writeUIntBE(be,0,Se),Me}N.createUIntBuffer=pe;function ye(be){for(var Se=1;be>=Math.pow(2,8*Se);Se++);if(Se>=7)return console.warn("7bit or more bigger uint not supported."),new Z.Int64BE(be).toBuffer();var Me=new N.Buffer(Se);return Me.writeIntBE(be,0,Se),Me}N.createIntBuffer=ye;function we(be,Se){if(Se===void 0&&(Se=8),Se===8){var Me=new N.Buffer(8);return Me.writeDoubleBE(be,0),Me}else if(Se===4){var Me=new N.Buffer(4);return Me.writeFloatBE(be,0),Me}else throw new Error("float type bits must 4bytes or 8bytes")}N.createFloatBuffer=we;function Ie(be){return be instanceof Date?be:new Date(new Date("2001-01-01T00:00:00.000Z").getTime()+Number(be)/1e3/1e3)}N.convertEBMLDateToJSDate=Ie}(tools)),tools}var hasRequiredEBMLDecoder;function requireEBMLDecoder(){if(hasRequiredEBMLDecoder)return EBMLDecoder;hasRequiredEBMLDecoder=1,Object.defineProperty(EBMLDecoder,"__esModule",{value:!0});var N=requireInt64Buffer(),Z=requireTools(),q=requireTools(),J=requireEbmlID(),I;(function(a){a[a.STATE_TAG=1]="STATE_TAG",a[a.STATE_SIZE=2]="STATE_SIZE",a[a.STATE_CONTENT=3]="STATE_CONTENT"})(I||(I={}));var D=function(){function a(){this._buffer=new Z.Buffer(0),this._tag_stack=[],this._state=I.STATE_TAG,this._cursor=0,this._total=0,this._schema=J.byEbmlID,this._result=[]}return a.prototype.decode=function(O){this.readChunk(O);var F=this._result;return this._result=[],F},a.prototype.readChunk=function(O){for(this._buffer=q.concat([this._buffer,new Z.Buffer(O)]);this._cursor<this._buffer.length&&!(this._state===I.STATE_TAG&&!this.readTag()||this._state===I.STATE_SIZE&&!this.readSize()||this._state===I.STATE_CONTENT&&!this.readContent()););},a.prototype.getSchemaInfo=function(O){return this._schema[O]||{name:"unknown",level:-1,type:"unknown",description:"unknown"}},a.prototype.readTag=function(){if(this._cursor>=this._buffer.length)return!1;var O=(0,Z.readVint)(this._buffer,this._cursor);if(O==null)return!1;var F=this._buffer.slice(this._cursor,this._cursor+O.length),z=F.reduce(function(ne,ee,re,ce){return ne+ee*Math.pow(16,2*(ce.length-1-re))},0),K=this.getSchemaInfo(z),te={EBML_ID:z.toString(16),schema:K,type:K.type,name:K.name,level:K.level,tagStart:this._total,tagEnd:this._total+O.length,sizeStart:this._total+O.length,sizeEnd:null,dataStart:null,dataEnd:null,dataSize:null,data:null};return this._tag_stack.push(te),this._cursor+=O.length,this._total+=O.length,this._state=I.STATE_SIZE,!0},a.prototype.readSize=function(){if(this._cursor>=this._buffer.length)return!1;var O=(0,Z.readVint)(this._buffer,this._cursor);if(O==null)return!1;var F=this._tag_stack[this._tag_stack.length-1];return F.sizeEnd=F.sizeStart+O.length,F.dataStart=F.sizeEnd,F.dataSize=O.value,O.value===-1?(F.dataEnd=-1,F.type==="m"&&(F.unknownSize=!0)):F.dataEnd=F.sizeEnd+O.value,this._cursor+=O.length,this._total+=O.length,this._state=I.STATE_CONTENT,!0},a.prototype.readContent=function(){var O=this._tag_stack[this._tag_stack.length-1];if(O.type==="m"){if(O.isEnd=!1,this._result.push(O),this._state=I.STATE_TAG,O.dataSize===0){var F=Object.assign({},O,{isEnd:!0});this._result.push(F),this._tag_stack.pop()}return!0}if(this._buffer.length<this._cursor+O.dataSize)return!1;var z=this._buffer.slice(this._cursor,this._cursor+O.dataSize);switch(this._buffer=this._buffer.slice(this._cursor+O.dataSize),O.data=z,O.type){case"u":O.value=z.readUIntBE(0,z.length);break;case"i":O.value=z.readIntBE(0,z.length);break;case"f":O.value=O.dataSize===4?z.readFloatBE(0):O.dataSize===8?z.readDoubleBE(0):(console.warn("cannot read ".concat(O.dataSize," octets float. failback to 0")),0);break;case"s":O.value=z.toString("ascii");break;case"8":O.value=z.toString("utf8");break;case"b":O.value=z;break;case"d":O.value=(0,Z.convertEBMLDateToJSDate)(new N.Int64BE(z).toNumber());break}if(O.value===null)throw new Error("unknown tag type:"+O.type);for(this._result.push(O),this._total+=O.dataSize,this._state=I.STATE_TAG,this._cursor=0,this._tag_stack.pop();this._tag_stack.length>0;){var K=this._tag_stack[this._tag_stack.length-1];if(K.dataEnd<0)return this._tag_stack.pop(),!0;if(this._total<K.dataEnd)break;if(K.type!=="m")throw new Error("parent element is not master element");var F=Object.assign({},K,{isEnd:!0});this._result.push(F),this._tag_stack.pop()}return!0},a}();return EBMLDecoder.default=D,EBMLDecoder}var EBMLReader={},events={exports:{}},hasRequiredEvents;function requireEvents(){if(hasRequiredEvents)return events.exports;hasRequiredEvents=1;var N=typeof Reflect=="object"?Reflect:null,Z=N&&typeof N.apply=="function"?N.apply:function(_e,pe,ye){return Function.prototype.apply.call(_e,pe,ye)},q;N&&typeof N.ownKeys=="function"?q=N.ownKeys:Object.getOwnPropertySymbols?q=function(_e){return Object.getOwnPropertyNames(_e).concat(Object.getOwnPropertySymbols(_e))}:q=function(_e){return Object.getOwnPropertyNames(_e)};function J(ue){console&&console.warn&&console.warn(ue)}var I=Number.isNaN||function(_e){return _e!==_e};function D(){D.init.call(this)}events.exports=D,events.exports.once=se,D.EventEmitter=D,D.prototype._events=void 0,D.prototype._eventsCount=0,D.prototype._maxListeners=void 0;var a=10;function O(ue){if(typeof ue!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof ue)}Object.defineProperty(D,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(ue){if(typeof ue!="number"||ue<0||I(ue))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+ue+".");a=ue}}),D.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},D.prototype.setMaxListeners=function(_e){if(typeof _e!="number"||_e<0||I(_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 F(ue){return ue._maxListeners===void 0?D.defaultMaxListeners:ue._maxListeners}D.prototype.getMaxListeners=function(){return F(this)},D.prototype.emit=function(_e){for(var pe=[],ye=1;ye<arguments.length;ye++)pe.push(arguments[ye]);var we=_e==="error",Ie=this._events;if(Ie!==void 0)we=we&&Ie.error===void 0;else if(!we)return!1;if(we){var be;if(pe.length>0&&(be=pe[0]),be instanceof Error)throw be;var Se=new Error("Unhandled error."+(be?" ("+be.message+")":""));throw Se.context=be,Se}var Me=Ie[_e];if(Me===void 0)return!1;if(typeof Me=="function")Z(Me,this,pe);else for(var We=Me.length,Je=re(Me,We),ye=0;ye<We;++ye)Z(Je[ye],this,pe);return!0};function z(ue,_e,pe,ye){var we,Ie,be;if(O(pe),Ie=ue._events,Ie===void 0?(Ie=ue._events=Object.create(null),ue._eventsCount=0):(Ie.newListener!==void 0&&(ue.emit("newListener",_e,pe.listener?pe.listener:pe),Ie=ue._events),be=Ie[_e]),be===void 0)be=Ie[_e]=pe,++ue._eventsCount;else if(typeof be=="function"?be=Ie[_e]=ye?[pe,be]:[be,pe]:ye?be.unshift(pe):be.push(pe),we=F(ue),we>0&&be.length>we&&!be.warned){be.warned=!0;var Se=new Error("Possible EventEmitter memory leak detected. "+be.length+" "+String(_e)+" listeners added. Use emitter.setMaxListeners() to increase limit");Se.name="MaxListenersExceededWarning",Se.emitter=ue,Se.type=_e,Se.count=be.length,J(Se)}return ue}D.prototype.addListener=function(_e,pe){return z(this,_e,pe,!1)},D.prototype.on=D.prototype.addListener,D.prototype.prependListener=function(_e,pe){return z(this,_e,pe,!0)};function K(){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 te(ue,_e,pe){var ye={fired:!1,wrapFn:void 0,target:ue,type:_e,listener:pe},we=K.bind(ye);return we.listener=pe,ye.wrapFn=we,we}D.prototype.once=function(_e,pe){return O(pe),this.on(_e,te(this,_e,pe)),this},D.prototype.prependOnceListener=function(_e,pe){return O(pe),this.prependListener(_e,te(this,_e,pe)),this},D.prototype.removeListener=function(_e,pe){var ye,we,Ie,be,Se;if(O(pe),we=this._events,we===void 0)return this;if(ye=we[_e],ye===void 0)return this;if(ye===pe||ye.listener===pe)--this._eventsCount===0?this._events=Object.create(null):(delete we[_e],we.removeListener&&this.emit("removeListener",_e,ye.listener||pe));else if(typeof ye!="function"){for(Ie=-1,be=ye.length-1;be>=0;be--)if(ye[be]===pe||ye[be].listener===pe){Se=ye[be].listener,Ie=be;break}if(Ie<0)return this;Ie===0?ye.shift():ce(ye,Ie),ye.length===1&&(we[_e]=ye[0]),we.removeListener!==void 0&&this.emit("removeListener",_e,Se||pe)}return this},D.prototype.off=D.prototype.removeListener,D.prototype.removeAllListeners=function(_e){var pe,ye,we;if(ye=this._events,ye===void 0)return this;if(ye.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):ye[_e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete ye[_e]),this;if(arguments.length===0){var Ie=Object.keys(ye),be;for(we=0;we<Ie.length;++we)be=Ie[we],be!=="removeListener"&&this.removeAllListeners(be);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(pe=ye[_e],typeof pe=="function")this.removeListener(_e,pe);else if(pe!==void 0)for(we=pe.length-1;we>=0;we--)this.removeListener(_e,pe[we]);return this};function ne(ue,_e,pe){var ye=ue._events;if(ye===void 0)return[];var we=ye[_e];return we===void 0?[]:typeof we=="function"?pe?[we.listener||we]:[we]:pe?oe(we):re(we,we.length)}D.prototype.listeners=function(_e){return ne(this,_e,!0)},D.prototype.rawListeners=function(_e){return ne(this,_e,!1)},D.listenerCount=function(ue,_e){return typeof ue.listenerCount=="function"?ue.listenerCount(_e):ee.call(ue,_e)},D.prototype.listenerCount=ee;function ee(ue){var _e=this._events;if(_e!==void 0){var pe=_e[ue];if(typeof pe=="function")return 1;if(pe!==void 0)return pe.length}return 0}D.prototype.eventNames=function(){return this._eventsCount>0?q(this._events):[]};function re(ue,_e){for(var pe=new Array(_e),ye=0;ye<_e;++ye)pe[ye]=ue[ye];return pe}function ce(ue,_e){for(;_e+1<ue.length;_e++)ue[_e]=ue[_e+1];ue.pop()}function oe(ue){for(var _e=new Array(ue.length),pe=0;pe<_e.length;++pe)_e[pe]=ue[pe].listener||ue[pe];return _e}function se(ue,_e){return new Promise(function(pe,ye){function we(be){ue.removeListener(_e,Ie),ye(be)}function Ie(){typeof ue.removeListener=="function"&&ue.removeListener("error",we),pe([].slice.call(arguments))}ge(ue,_e,Ie,{once:!0}),_e!=="error"&&fe(ue,we,{once:!0})})}function fe(ue,_e,pe){typeof ue.on=="function"&&ge(ue,"error",_e,pe)}function ge(ue,_e,pe,ye){if(typeof ue.on=="function")ye.once?ue.once(_e,pe):ue.on(_e,pe);else if(typeof ue.addEventListener=="function")ue.addEventListener(_e,function we(Ie){ye.once&&ue.removeEventListener(_e,we),pe(Ie)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof ue)}return events.exports}var hasRequiredEBMLReader;function requireEBMLReader(){if(hasRequiredEBMLReader)return EBMLReader;hasRequiredEBMLReader=1;var N=EBMLReader&&EBMLReader.__extends||function(){var I=function(D,a){return I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,F){O.__proto__=F}||function(O,F){for(var z in F)Object.prototype.hasOwnProperty.call(F,z)&&(O[z]=F[z])},I(D,a)};return function(D,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");I(D,a);function O(){this.constructor=D}D.prototype=a===null?Object.create(a):(O.prototype=a.prototype,new O)}}();Object.defineProperty(EBMLReader,"__esModule",{value:!0});var Z=requireEvents(),q=requireTools(),J=function(I){N(D,I);function D(){var a=I.call(this)||this;return a.logGroup="",a.hasLoggingStarted=!1,a.metadataloaded=!1,a.chunks=[],a.stack=[],a.segmentOffset=0,a.last2SimpleBlockVideoTrackTimecode=[0,0],a.last2SimpleBlockAudioTrackTimecode=[0,0],a.lastClusterTimecode=0,a.lastClusterPosition=0,a.timecodeScale=1e6,a.metadataSize=0,a.metadatas=[],a.cues=[],a.firstVideoBlockRead=!1,a.firstAudioBlockRead=!1,a.currentTrack={TrackNumber:-1,TrackType:-1,DefaultDuration:null,CodecDelay:null},a.trackTypes=[],a.trackDefaultDuration=[],a.trackCodecDelay=[],a.trackInfo={type:"nothing"},a.ended=!1,a.logging=!1,a.use_duration_every_simpleblock=!1,a.use_webp=!1,a.use_segment_info=!0,a.drop_default_duration=!0,a}return D.prototype.stop=function(){for(this.ended=!0,this.emit_segment_info();this.stack.length;)this.stack.pop(),this.logging&&console.groupEnd();this.logging&&this.hasLoggingStarted&&this.logGroup&&console.groupEnd()},D.prototype.emit_segment_info=function(){var a=this.chunks;if(this.chunks=[],this.metadataloaded){if(!this.use_segment_info)return;var z=this.lastClusterTimecode,K=this.duration,te=this.timecodeScale;this.emit("cluster",{timecode:z,data:a}),this.emit("duration",{timecodeScale:te,duration:K})}else{this.metadataloaded=!0,this.metadatas=a;var O=this.trackTypes.indexOf(1),F=this.trackTypes.indexOf(2);if(this.trackInfo=O>=0&&F>=0?{type:"both",trackNumber:O}:O>=0?{type:"video",trackNumber:O}:F>=0?{type:"audio",trackNumber:F}:{type:"nothing"},!this.use_segment_info)return;this.emit("metadata",{data:a,metadataSize:this.metadataSize})}},D.prototype.read=function(a){var O=this,F=!1;if(!this.ended){if(a.type==="m")if(a.isEnd)this.stack.pop();else{var z=this.stack[this.stack.length-1];if(z!=null&&z.level>=a.level){this.stack.pop(),this.logging&&console.groupEnd(),z.dataEnd=a.dataEnd,z.dataSize=a.dataEnd-z.dataStart,z.unknownSize=!1;var K=Object.assign({},z,{name:z.name,type:z.type,isEnd:!0});this.chunks.push(K)}this.stack.push(a)}if(a.type==="m"&&a.name=="Segment")this.segmentOffset!=0&&console.warn("Multiple segments detected!"),this.segmentOffset=a.dataStart,this.emit("segment_offset",this.segmentOffset);else if(a.type==="b"&&a.name==="SimpleBlock"){var te=q.ebmlBlock(a.data),ne=te.timecode,ee=te.trackNumber,re=te.frames;if(this.trackTypes[ee]===1){if(!this.firstVideoBlockRead&&(this.firstVideoBlockRead=!0,this.trackInfo.type==="both"||this.trackInfo.type==="video")){var ce=this.lastClusterTimecode+ne;this.cues.push({CueTrack:ee,CueClusterPosition:this.lastClusterPosition,CueTime:ce}),this.emit("cue_info",{CueTrack:ee,CueClusterPosition:this.lastClusterPosition,CueTime:this.lastClusterTimecode}),this.emit("cue",{CueTrack:ee,CueClusterPosition:this.lastClusterPosition,CueTime:ce})}this.last2SimpleBlockVideoTrackTimecode=[this.last2SimpleBlockVideoTrackTimecode[1],ne]}else if(this.trackTypes[ee]===2){if(!this.firstAudioBlockRead&&(this.firstAudioBlockRead=!0,this.trackInfo.type==="audio")){var ce=this.lastClusterTimecode+ne;this.cues.push({CueTrack:ee,CueClusterPosition:this.lastClusterPosition,CueTime:ce}),this.emit("cue_info",{CueTrack:ee,CueClusterPosition:this.lastClusterPosition,CueTime:this.lastClusterTimecode}),this.emit("cue",{CueTrack:ee,CueClusterPosition:this.lastClusterPosition,CueTime:ce})}this.last2SimpleBlockAudioTrackTimecode=[this.last2SimpleBlockAudioTrackTimecode[1],ne]}this.use_duration_every_simpleblock&&this.emit("duration",{timecodeScale:this.timecodeScale,duration:this.duration}),this.use_webp&&re.forEach(function(oe){var se=oe.slice(3,6).toString("hex");if(se==="9d012a"){var fe=q.VP8BitStreamToRiffWebPBuffer(oe),ge=new Blob([fe],{type:"image/webp"}),ue=O.duration;O.emit("webp",{currentTime:ue,webp:ge})}})}else a.type==="m"&&a.name==="Cluster"&&a.isEnd===!1?(this.firstVideoBlockRead=!1,this.firstAudioBlockRead=!1,this.emit_segment_info(),this.emit("cluster_ptr",a.tagStart),this.lastClusterPosition=a.tagStart):a.type==="u"&&a.name==="Timecode"?this.lastClusterTimecode=a.value:a.type==="u"&&a.name==="TimecodeScale"?this.timecodeScale=a.value:a.type==="m"&&a.name==="TrackEntry"?a.isEnd?(this.trackTypes[this.currentTrack.TrackNumber]=this.currentTrack.TrackType,this.trackDefaultDuration[this.currentTrack.TrackNumber]=this.currentTrack.DefaultDuration,this.trackCodecDelay[this.currentTrack.TrackNumber]=this.currentTrack.CodecDelay):this.currentTrack={TrackNumber:-1,TrackType:-1,DefaultDuration:null,CodecDelay:null}:a.type==="u"&&a.name==="TrackType"?this.currentTrack.TrackType=a.value:a.type==="u"&&a.name==="TrackNumber"?this.currentTrack.TrackNumber=a.value:a.type==="u"&&a.name==="CodecDelay"?this.currentTrack.CodecDelay=a.value:a.type==="u"&&a.name==="DefaultDuration"?this.drop_default_duration?(console.warn("DefaultDuration detected!, remove it"),F=!0):this.currentTrack.DefaultDuration=a.value:a.name==="unknown"&&console.warn(a);!this.metadataloaded&&a.dataEnd>0&&(this.metadataSize=a.dataEnd),F||this.chunks.push(a),this.logging&&this.put(a)}},Object.defineProperty(D.prototype,"duration",{get:function(){if(this.trackInfo.type==="nothing")return console.warn("no video, no audio track"),0;var a=0,O=0,F=0,z=this.trackDefaultDuration[this.trackInfo.trackNumber];if(typeof z=="number")a=z;else if(this.trackInfo.type==="both")if(this.last2SimpleBlockAudioTrackTimecode[1]>this.last2SimpleBlockVideoTrackTimecode[1]){a=(this.last2SimpleBlockAudioTrackTimecode[1]-this.last2SimpleBlockAudioTrackTimecode[0])*this.timecodeScale;var K=this.trackCodecDelay[this.trackTypes.indexOf(2)];typeof K=="number"&&(O=K),F=this.last2SimpleBlockAudioTrackTimecode[1]}else{a=(this.last2SimpleBlockVideoTrackTimecode[1]-this.last2SimpleBlockVideoTrackTimecode[0])*this.timecodeScale;var K=this.trackCodecDelay[this.trackTypes.indexOf(1)];typeof K=="number"&&(O=K),F=this.last2SimpleBlockVideoTrackTimecode[1]}else if(this.trackInfo.type==="video"){a=(this.last2SimpleBlockVideoTrackTimecode[1]-this.last2SimpleBlockVideoTrackTimecode[0])*this.timecodeScale;var K=this.trackCodecDelay[this.trackInfo.trackNumber];typeof K=="number"&&(O=K),F=this.last2SimpleBlockVideoTrackTimecode[1]}else if(this.trackInfo.type==="audio"){a=(this.last2SimpleBlockAudioTrackTimecode[1]-this.last2SimpleBlockAudioTrackTimecode[0])*this.timecodeScale;var K=this.trackCodecDelay[this.trackInfo.trackNumber];typeof K=="number"&&(O=K),F=this.last2SimpleBlockAudioTrackTimecode[1]}var te=(this.lastClusterTimecode+F)*this.timecodeScale+a-O,ne=te/this.timecodeScale;return Math.floor(ne)},enumerable:!1,configurable:!0}),D.prototype.addListener=function(a,O){return I.prototype.addListener.call(this,a,O)},D.prototype.put=function(a){this.hasLoggingStarted||(this.hasLoggingStarted=!0,this.logging&&this.logGroup&&console.groupCollapsed(this.logGroup)),a.type==="m"?a.isEnd?console.groupEnd():console.group(a.name+":"+a.tagStart):a.type==="b"?console.log(a.name,a.type):console.log(a.name,a.tagStart,a.type,a.value)},D}(Z.EventEmitter);return EBMLReader.default=J,EBMLReader}var hasRequiredEbml;function requireEbml(){return hasRequiredEbml||(hasRequiredEbml=1,function(N){var Z=ebml&&ebml.__createBinding||(Object.create?function(O,F,z,K){K===void 0&&(K=z),Object.defineProperty(O,K,{enumerable:!0,get:function(){return F[z]}})}:function(O,F,z,K){K===void 0&&(K=z),O[K]=F[z]}),q=ebml&&ebml.__exportStar||function(O,F){for(var z in O)z!=="default"&&!Object.prototype.hasOwnProperty.call(F,z)&&Z(F,O,z)};Object.defineProperty(N,"__esModule",{value:!0}),N.tools=N.Reader=N.Encoder=N.Decoder=void 0,q(requireEBML(),N);var J=requireEBMLDecoder();N.Decoder=J.default;var I=requireEBMLEncoder();N.Encoder=I.default;var D=requireEBMLReader();N.Reader=D.default;var a=requireTools();N.tools=a}(ebml)),ebml}var hasRequiredLib;function requireLib(){if(hasRequiredLib)return lib;hasRequiredLib=1;var N=lib&&lib.__awaiter||function(I,D,a,O){function F(z){return z instanceof a?z:new a(function(K){K(z)})}return new(a||(a=Promise))(function(z,K){function te(re){try{ee(O.next(re))}catch(ce){K(ce)}}function ne(re){try{ee(O.throw(re))}catch(ce){K(ce)}}function ee(re){re.done?z(re.value):F(re.value).then(te,ne)}ee((O=O.apply(I,D||[])).next())})},Z=lib&&lib.__generator||function(I,D){var a={label:0,sent:function(){if(z[0]&1)throw z[1];return z[1]},trys:[],ops:[]},O,F,z,K;return K={next:te(0),throw:te(1),return:te(2)},typeof Symbol=="function"&&(K[Symbol.iterator]=function(){return this}),K;function te(ee){return function(re){return ne([ee,re])}}function ne(ee){if(O)throw new TypeError("Generator is already executing.");for(;a;)try{if(O=1,F&&(z=ee[0]&2?F.return:ee[0]?F.throw||((z=F.return)&&z.call(F),0):F.next)&&!(z=z.call(F,ee[1])).done)return z;switch(F=0,z&&(ee=[ee[0]&2,z.value]),ee[0]){case 0:case 1:z=ee;break;case 4:return a.label++,{value:ee[1],done:!1};case 5:a.label++,F=ee[1],ee=[0];continue;case 7:ee=a.ops.pop(),a.trys.pop();continue;default:if(z=a.trys,!(z=z.length>0&&z[z.length-1])&&(ee[0]===6||ee[0]===2)){a=0;continue}if(ee[0]===3&&(!z||ee[1]>z[0]&&ee[1]<z[3])){a.label=ee[1];break}if(ee[0]===6&&a.label<z[1]){a.label=z[1],z=ee;break}if(z&&a.label<z[2]){a.label=z[2],a.ops.push(ee);break}z[2]&&a.ops.pop(),a.trys.pop();continue}ee=D.call(I,a)}catch(re){ee=[6,re],F=0}finally{O=z=0}if(ee[0]&5)throw ee[1];return{value:ee[0]?ee[1]:void 0,done:!0}}};Object.defineProperty(lib,"__esModule",{value:!0});var q=requireEbml();function J(I){return N(this,void 0,void 0,function(){var D,a,O,F,z,K,te,ne,ee,re,ce,oe;return Z(this,function(se){switch(se.label){case 0:if(!I)throw Error("call to fixWebmDuration requires a blob");D=new q.Decoder,a=new q.Reader,O=I.stream(),F=O.getReader(),se.label=1;case 1:return[4,F.read()];case 2:return z=se.sent(),K=z.done,te=z.value,K?(a.stop(),[3,3]):(ne=D.decode(te),ne=ne==null?void 0:ne.filter(function(fe){return fe.type!=="unknown"}),ne.forEach(function(fe){a.read(fe)}),te=null,[3,1]);case 3:return ee=q.tools.makeMetadataSeekable(a.metadatas,a.duration,a.cues),re=new Blob([ee],{type:I.type}),ce=I.slice(a.metadataSize),oe=new Blob([re,ce],{type:I.type}),[2,oe]}})})}return lib.default=J,lib}var libExports=requireLib();const fixWebmDuration=getDefaultExportFromCjs(libExports);class StreamRecorder{constructor(){at(this,Xt);at(this,mn,!1);at(this,hn,!1);at(this,In,0);at(this,xn,0);at(this,sn,0);at(this,ln,0);at(this,yn,0);Ee(this,"onchange",Z=>{});Ee(this,"onDurationChange",Z=>{});Ee(this,"start",async(Z="")=>{Z||(Z=`video_Record_${E$1(Date.now())}`);let q=[];return navigator.mediaDevices.getDisplayMedia({audio:!0,video:!0}).then(J=>{const I=J.getTracks();for(const a of I)a.onended=()=>this.stop();Ct(this,mn,!0),Ct(this,hn,!1),Ct(this,Xt,new MediaRecorder(J)),De(this,Xt).start();const D=new Date().getTime();Ct(this,In,D),Ct(this,sn,D),De(this,vn).call(this),De(this,Rn).call(this),De(this,Xt).addEventListener("dataavailable",a=>{q.push(a.data)}),De(this,Xt).addEventListener("stop",async()=>{Ct(this,mn,!1);const a=new Date().getTime();Ct(this,xn,a),Ct(this,ln,De(this,ln)+(a-De(this,sn))),De(this,vn).call(this),clearInterval(De(this,yn));const O=J.getTracks();for(const ne of O)ne.stop();if(De(this,Xt)===null)return;const F=new Blob(q,{type:De(this,Xt).mimeType}),z=await fixWebmDuration(F),K=URL.createObjectURL(z),te=document.createElement("a");te.href=K,te.download=`${Z}.mp4`,te.click(),URL.revokeObjectURL(K),q=[],Ct(this,Xt,null)})})});Ee(this,"pause",async()=>{var q;await new Promise(J=>setTimeout(()=>J(!0),300)),(q=De(this,Xt))==null||q.pause(),Ct(this,hn,!0);const Z=new Date().getTime();Ct(this,ln,De(this,ln)+(Z-De(this,sn))),De(this,vn).call(this),clearInterval(De(this,yn))});Ee(this,"resume",async()=>{var q;(q=De(this,Xt))==null||q.resume(),Ct(this,hn,!1);const Z=new Date().getTime();Ct(this,sn,Z),De(this,vn).call(this),De(this,Rn).call(this)});Ee(this,"stop",async()=>{var Z;(Z=De(this,Xt))==null||Z.stop()});Ee(this,"getDuration",()=>{if(De(this,sn)===0)return 0;let Z=De(this,ln);const q=new Date().getTime();if(De(this,mn)&&De(this,hn)===!1){const J=q-De(this,sn);Ct(this,sn,q),Z=Z+J}return Z});Ee(this,"getInfo",()=>({active:De(this,mn),pause:De(this,hn),startTime:De(this,In),endTime:De(this,xn),duration:De(this,ln)}));at(this,vn,()=>{const Z=this.getInfo();this.onchange(Z)});at(this,Rn,()=>{clearInterval(De(this,yn)),Ct(this,yn,window.setInterval(()=>{Ct(this,ln,this.getDuration()),this.onDurationChange(De(this,ln))},500))})}}Xt=new WeakMap,mn=new WeakMap,hn=new WeakMap,In=new WeakMap,xn=new WeakMap,sn=new WeakMap,ln=new WeakMap,yn=new WeakMap,vn=new WeakMap,Rn=new WeakMap;class RoomBase{constructor(Z){Ee(this,"options",{appid:"",sdkToken:"",roomId:"",userId:"",earlyId:"",callType:0,debug:!1,reportErr:!0,logUrl:"https://logs1.quickvo.org",newPublishAutoSubscribe:!0});Ee(this,"sdk_service_version","1.0.6");Ee(this,"prohibitNotify",!1);Ee(this,"isEarly",!1);Ee(this,"isInRoom",!1);Ee(this,"taskQueue");Ee(this,"roomState","ready");Ee(this,"createAt",Date.now());Ee(this,"cwsIns");Ee(this,"peerIns");Ee(this,"transceiverMap",new Map);Ee(this,"sendChannel");Ee(this,"receiveChannel");Ee(this,"userMap",new Map);Ee(this,"setLocalStreamActiveMap",new Map);Ee(this,"phoneyStreams",new Map);Ee(this,"recorder",new StreamRecorder);Ee(this,"networkQualityTester",new NetworkQualityTester);Ee(this,"mediaDevicesErrInfo",{microphoneCamera_audio:"",microphoneCamera_video:"",screenSharing_video:"",screenSharing_audio:""});Ee(this,"reportLogs",(Z,q="未知错误")=>{const{appid:J,userId:I,earlyId:D="",logUrl:a,reportErr:O}=this.options;if(!O)return;const F="web",z=K=>({ws_c_timeout:0,webrtc_c_timeout:1,join_room_error:2,publish_error:3,subscribe_error:4,close_track_error:5,heartbeat_e_timeout:6,heartbeat_i_timeout:7,quit_room_error:8})[K].toString();{const K=z(Z),te={origin:F,type:K,app_id:J,user_id:I,ins_id:D,desc:q},ne=btoa(encodeURI(JSON.stringify(te))),ee=`${a}/upload/log?log_key=${ne}`;{const re=localStorage.getItem("#quickvo.logs")||JSON.stringify([]),oe=new TextEncoder().encode(re),se=pako.deflate(oe,{gzip:!0});this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: reportLogs",{obj:te,url:ee,size:lt(se.byteLength)}),fetch(ee,{headers:{"Content-Type":"multipart/form-data"},method:"POST",body:se})}}});Ee(this,"initPhoneyStreams",(Z,q=[])=>{q.length===0&&(q=mediaType_keys);for(const J of q){const I=this.phoneyStreams.get(J);if(I){const D=I.getTracks();for(const a of D)a.stop()}switch(J){case"microphoneCamera_audio":this.phoneyStreams.set("microphoneCamera_audio",createMutedAudioStream(Z));break;case"microphoneCamera_video":this.phoneyStreams.set("microphoneCamera_video",createFakeVideoStream());break;case"screenSharing_audio":this.phoneyStreams.set("screenSharing_audio",createMutedAudioStream(Z));break;case"screenSharing_video":this.phoneyStreams.set("screenSharing_video",createFakeVideoStream());break}}});Ee(this,"getPhoneyStreams",Z=>this.phoneyStreams.get(Z));Ee(this,"getRoomInfo",()=>{const{options:Z,roomState:q,createAt:J}=this;return{...Z,roomState:q,createAt:J}});Ee(this,"setRoomState",Z=>{this.roomState=Z;const q=enum_roomState[Z],J={state:Z,stateStr:q};this.cwsIns.emitNotify("onRoomState",{code:200,data:J,desc:"room state is change."})});Ee(this,"setOptions",async Z=>{const q={...this.options,...Z};this.options=q});Ee(this,"stopStream",async Z=>{const q=Z.getTracks();for(const J of q)J.stop()});Ee(this,"getMediaDevicesErrInfo",async()=>{try{const Z=await navigator.mediaDevices.enumerateDevices();Z.find(J=>J.kind==="audioinput")||(this.mediaDevicesErrInfo.microphoneCamera_audio="audioinput is not available."),Z.find(J=>J.kind==="videoinput")||(this.mediaDevicesErrInfo.microphoneCamera_video="videoinput is not available.")}catch(Z){this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: getMediaDevicesErrInfo is error.",Z)}return this.mediaDevicesErrInfo});Ee(this,"getUserMediaKey",(Z,q)=>`${Z}-${q}`);Ee(this,"getCallAction",async Z=>{let q="";const J=D=>Z.findIndex(({type:O,enabled:F=!0})=>O===D&&F)===-1?"0":"1";return q=`${J(0)}${q}`,q=`${J(1)}${q}`,q=`${J(2)}${q}`,q=`${J(3)}${q}`,parseInt(q,2)});Ee(this,"getCallActionMap",(Z=0)=>{const J=Number(Z).toString(2).padStart(4,"0").split(""),[I,D,a,O]=J;return{microphoneCamera_audio:!!Number(O),microphoneCamera_video:!!Number(a),screenSharing_video:!!Number(D),screenSharing_audio:!!Number(I)}});Ee(this,"getBanBehaviorMap",(Z=0)=>{const J=Number(Z).toString(2).padStart(4,"0").split(""),[I,D,a,O]=J;return{microphoneCamera_audio:!!Number(O),microphoneCamera_video:!!Number(a),screenSharing_video:!!Number(D),screenSharing_audio:!!Number(I)}});Ee(this,"getAverageVolume",(Z,q)=>{Z.getByteFrequencyData(q);let J=0;for(let D=0;D<q.length;D++)J+=q[D];return Math.ceil(J/q.length)});Ee(this,"getTrackNamesFormTracks",(Z,q=[],J="trackName")=>{const I=[];for(const D of Z){const{type:a}=D;if(q.length===0||q.includes(a)){const O=D[J];O&&I.push(`${O}`)}}return I});Ee(this,"usersFilter",Z=>dt(Z,["id","isSelf","isOwner","joinTime","tracks","network","permissions","isPublished","updateStreams","callAction","callActionStr","callActionMap","banBehavior","banBehaviorStr","banBehaviorMap"]).sort((I,D)=>I.id.localeCompare(D.id,"en")));this.setOptions(Z),this.cwsIns=new CallsWebSocket({...Z}),this.taskQueue=new Y(["createWs","createSession","ice","joinRoom","createTrack","publish","subscribe","renegotiate","closeTrack"],{debug:Z.debug}),this.taskQueue.setCondition("createSession",!1),this.taskQueue.setCondition("ice",!1),this.options.debug&&this.networkQualityTester.testAll().then(q=>{console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: networkQualityTester",q)})}}var m=Object.defineProperty,G=(N,Z,q)=>Z in N?m(N,Z,{enumerable:!0,configurable:!0,writable:!0,value:q}):N[Z]=q,e$1=(N,Z,q)=>G(N,typeof Z!="symbol"?Z+"":Z,q);class g{constructor(Z,q){e$1(this,"inputStream",new MediaStream),e$1(this,"outputStream",new MediaStream),e$1(this,"inputGain",1),e$1(this,"enhanceGain",1),e$1(this,"bgsGain",1),e$1(this,"bgmGain",1),e$1(this,"outputGain",1),e$1(this,"mixAudioMap",new Map),e$1(this,"audioContext",new AudioContext),e$1(this,"sourceNode"),e$1(this,"inputGainNode"),e$1(this,"enhanceGainNode"),e$1(this,"bgsGainNode"),e$1(this,"bgmGainNode"),e$1(this,"analyserNode"),e$1(this,"analyserArrayData"),e$1(this,"outputGainNode"),e$1(this,"destinationNode"),e$1(this,"filterStream",J=>J),e$1(this,"stop",()=>{{const J=this.inputStream.getTracks();for(const I of J)I.stop(),this.inputStream.removeTrack(I)}}),e$1(this,"getStream",()=>this.filterStream(this.outputStream)),e$1(this,"setMute",(J=!0)=>{J?this.analyserNode.disconnect(this.outputGainNode):this.analyserNode.connect(this.outputGainNode)}),e$1(this,"setInputGain",J=>{this.inputGain=J,this.inputGainNode.gain.setValueAtTime(J,this.audioContext.currentTime)}),e$1(this,"setEnhanceGain",async J=>{this.enhanceGain=J+1,this.enhanceGainNode.gain.setValueAtTime(this.enhanceGain,this.audioContext.currentTime)}),e$1(this,"setBgsGain",J=>{this.bgsGain=J,this.bgsGainNode.gain.setValueAtTime(J,this.audioContext.currentTime)}),e$1(this,"setBgmGain",J=>{this.bgmGain=J,this.bgmGainNode.gain.setValueAtTime(J,this.audioContext.currentTime)}),e$1(this,"setOutputGain",J=>{this.outputGain=J,this.outputGainNode.gain.setValueAtTime(this.outputGain,this.audioContext.currentTime)}),e$1(this,"getVolume",()=>{const{analyserNode:J,analyserArrayData:I}=this;J.getByteFrequencyData(I);let D=0;for(let a=0;a<I.length;a++)D+=I[a];return Math.ceil(D/I.length)}),e$1(this,"mixAudio",(J,I="bgm")=>new Promise(async(D,a)=>{try{{const z=this.mixAudioMap.get(I);z&&z.stop()}const O=I==="bgs"?this.bgsGainNode:this.bgmGainNode,F=this.audioContext.createBufferSource();this.mixAudioMap.set(I,F),F.buffer=J,F.connect(O),F.onended=()=>{F.disconnect(O),this.mixAudioMap.delete(I),D(!0)},F.start(0)}catch(O){a(O)}})),e$1(this,"mixAudioStop",J=>{const I=this.mixAudioMap.get(J);I==null||I.stop()}),e$1(this,"changeMix",(J,I)=>{const D=J==="bgs"?this.bgsGainNode:this.bgmGainNode;I?D.connect(this.destinationNode):D.disconnect(this.destinationNode)}),q&&(this.audioContext=q),this.inputStream=Z,this.sourceNode=this.audioContext.createMediaStreamSource(this.inputStream),this.inputGainNode=this.audioContext.createGain(),this.inputGainNode.gain.setValueAtTime(this.inputGain,this.audioContext.currentTime),this.enhanceGainNode=this.audioContext.createGain(),this.enhanceGainNode.gain.setValueAtTime(this.enhanceGain,this.audioContext.currentTime),this.bgsGainNode=this.audioContext.createGain(),this.bgsGainNode.gain.setValueAtTime(this.bgsGain,this.audioContext.currentTime),this.bgmGainNode=this.audioContext.createGain(),this.bgmGainNode.gain.setValueAtTime(this.bgmGain,this.audioContext.currentTime),this.analyserNode=this.audioContext.createAnalyser(),this.analyserNode.fftSize=512,this.analyserArrayData=new Uint8Array(this.analyserNode.frequencyBinCount),this.outputGainNode=this.audioContext.createGain(),this.outputGainNode.gain.setValueAtTime(this.outputGain,this.audioContext.currentTime),this.destinationNode=this.audioContext.createMediaStreamDestination(),this.outputStream=this.destinationNode.stream;{const{sourceNode:J,inputGainNode:I,enhanceGainNode:D,bgsGainNode:a,bgmGainNode:O,analyserNode:F,outputGainNode:z,destinationNode:K}=this;J.connect(I),I.connect(D),D.connect(F),a.connect(F),O.connect(F),D.connect(K),a.connect(K),O.connect(K),F.connect(z),z.connect(this.audioContext.destination)}this.setMute(!0),this.audioContext.resume()}}class RoomMedias extends RoomBase{constructor(q){super(q);at(this,wn,[]);at(this,en,new Map);at(this,Ht,new Map);at(this,cn,new Map);at(this,un,new Map);at(this,pn,new Map);Ee(this,"localStreamsActionMap",new Map);at(this,kn,new Map);Ee(this,"audioContext",new(window.AudioContext||window.webkitAudioContext));Ee(this,"initMediaPhoneyStreams",(q=[])=>this.initPhoneyStreams(this.audioContext,q));Ee(this,"initLocalStreamsFilter",()=>{for(const q of mediaType_keys){const J=async I=>I;De(this,kn).set(q,J)}});Ee(this,"setLocalFilterStream",(q,J)=>{De(this,kn).set(q,J)});at(this,Un,()=>{De(this,Ht).set("microphoneCamera_audio",{autoGainControl:!0,echoCancellation:!0,noiseSuppression:!0}),De(this,Ht).set("microphoneCamera_video",{frameRate:{min:10,ideal:30}}),De(this,Ht).set("screenSharing_video",{frameRate:{min:10,ideal:30}}),De(this,Ht).set("screenSharing_audio",{autoGainControl:!0,echoCancellation:!0,noiseSuppression:!0})});at(this,Ln,()=>{De(this,en).set("audioinput","default"),De(this,en).set("videoinput","default"),De(this,en).set("audiooutput","default")});Ee(this,"emitNotifyUpdateUsersStreams",async q=>{this.cwsIns.emitNotify("onRoomUsersStreams",{code:200,data:q,desc:"users streams is change."})});Ee(this,"initUserMediaStreamContext",async(q,J,I)=>{const[D]=I.getTracks();if(!D){console.warn("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: tracks.length is 0.",{userId:q,mediaType:J,stream:I});return}this.removeUserMediaStreamContext(q,J);const a=this.getUserMediaKey(q,J),{kind:O}=D;switch(O){case"audio":{const F=new MediaStream;F.addTrack(D);const z=new g(F,this.audioContext);De(this,cn).set(a,z)}break;case"video":{const F=new VideoMediaContext(D);De(this,un).set(a,F)}break}});Ee(this,"getUserMediaStreamContext",(q,J)=>{const I=this.getUserMediaKey(q,J);if(["microphoneCamera_audio","screenSharing_audio"].includes(J))return De(this,cn).get(I);if(["microphoneCamera_video","screenSharing_video"].includes(J))return De(this,un).get(I)});Ee(this,"getUserAudioMediaStreamContext",(q,J)=>{const I=this.getUserMediaKey(q,J);return De(this,cn).get(I)});Ee(this,"removeUserMediaStreamContext",(q,J)=>{const I=this.getUserMediaKey(q,J);if(["microphoneCamera_audio","screenSharing_audio"].includes(J)){const D=De(this,cn).get(I);return D==null||D.stop(),De(this,cn).delete(I)}if(["microphoneCamera_video","screenSharing_video"].includes(J)){const D=De(this,un).get(I);return D==null||D.stop(),De(this,un).get(I)}});Ee(this,"getUserStream",(q,J)=>{const I=this.getUserMediaStreamContext(q,J);return(I==null?void 0:I.getStream())||new MediaStream});Ee(this,"getUserStreams",(q,J=[])=>{J.length===0&&(J=mediaType_keys);const I={};for(const D of J){const a=this.getUserStream(q,D);I[D]=a}return I});Ee(this,"removeUserStreams",async(q,J=[])=>{J.length===0&&(J=mediaType_keys);for(const I of J)this.removeUserMediaStreamContext(q,I)});Ee(this,"clearUserStreams",()=>{{const q=De(this,cn).values();for(const J of q)J.stop();Ct(this,cn,new Map)}{const q=De(this,un).values();for(const J of q)J.stop();Ct(this,un,new Map)}});Ee(this,"setMediaTrackConstraints",async(q,J)=>{De(this,Ht).set(q,J);const I=await this.getLocalStream(q);if(!I)return;const D=I.getTracks();if(D.length!==0)for(const a of D){const O=a.getConstraints(),z={...De(this,Ht).get(q),...O,...J};await a.applyConstraints(z)}});Ee(this,"stopLocalStreams",async(q=[])=>{q.length===0&&(q=mediaType_keys);for(const J of q){const I=De(this,pn).get(J);I&&await this.stopStream(I),De(this,pn).delete(J)}});Ee(this,"addLocalStream",(q,J)=>{const I=De(this,pn).get(q);I&&this.stopStream(I),De(this,pn).set(q,J)});Ee(this,"initLocalStream",async q=>{switch(q){case"microphoneCamera_audio":{const J=De(this,en).get("audioinput"),I=De(this,Ht).get("microphoneCamera_audio"),D=await navigator.mediaDevices.getUserMedia({audio:{deviceId:J,...I},video:!1});this.addLocalStream("microphoneCamera_audio",D)}break;case"microphoneCamera_video":{const J=De(this,en).get("videoinput"),I=De(this,Ht).get("microphoneCamera_video"),D=await navigator.mediaDevices.getUserMedia({audio:!1,video:{deviceId:J,...I}});this.addLocalStream("microphoneCamera_video",D)}break;case"microphoneCamera":{const J=De(this,en).get("audioinput"),I=De(this,en).get("videoinput"),D=De(this,Ht).get("microphoneCamera_audio"),a=De(this,Ht).get("microphoneCamera_video"),F=(await navigator.mediaDevices.getUserMedia({audio:{deviceId:J,...D},video:{deviceId:I,...a}})).getTracks();for(const z of F){const{kind:K}=z;if(K==="audio"){const te=new MediaStream;te.addTrack(z),this.addLocalStream("microphoneCamera_audio",te)}if(K==="video"){const te=new MediaStream;te.addTrack(z),this.addLocalStream("microphoneCamera_video",te)}}}break;case"screenSharing_audio":{const J=De(this,Ht).get("screenSharing_audio"),D=(await navigator.mediaDevices.getDisplayMedia({audio:!0,video:!0,...J})).getTracks();for(const a of D){const{kind:O}=a;if(O==="audio"){const F=new MediaStream;F.addTrack(a),this.addLocalStream("screenSharing_audio",F)}}}break;case"screenSharing_video":{const J=De(this,Ht).get(q),D=(await navigator.mediaDevices.getDisplayMedia({audio:!1,video:!0,...J})).getTracks();for(const a of D){const{kind:O}=a;if(O==="video"){const F=new MediaStream;F.addTrack(a),this.addLocalStream("screenSharing_video",F)}}}break;case"screenSharing":{const J=De(this,Ht).get("screenSharing_audio"),I=De(this,Ht).get("screenSharing_video"),a=(await navigator.mediaDevices.getDisplayMedia({audio:!0,video:!0,...J,...I})).getTracks();for(const O of a){const{kind:F}=O;if(F==="audio"){const z=new MediaStream;z.addTrack(O),this.addLocalStream("screenSharing_audio",z)}if(F==="video"){const z=new MediaStream;z.addTrack(O),this.addLocalStream("screenSharing_video",z)}}}break}});Ee(this,"getLocalStream",async q=>{const J=De(this,pn).get(q),I=De(this,kn).get(q);let D=J;return J&&I&&(D=await I(J)),D});Ee(this,"getLocalStreams",async(q=[])=>{q.length===0&&(q=mediaType_keys);const J={};for(const I of q)J[I]=await this.getLocalStream(I);return J});at(this,Sn,async()=>!navigator.mediaDevices||!navigator.mediaDevices.enumerateDevices?(console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: 不支持 enumerateDevices"),[]):(await navigator.mediaDevices.enumerateDevices().then(q=>{const J=q.filter(I=>!["communications"].includes(I.deviceId));Ct(this,wn,J.sort((I,D)=>I.label.localeCompare(D.label,"zh-Hans-CN",{sensitivity:"accent"})))}).catch(function(q){console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: getEnumerateDevices is err",q)}),De(this,wn)));at(this,Fn,()=>{navigator.mediaDevices&&(navigator.mediaDevices.ondevicechange=async()=>{await De(this,Sn).call(this),this.cwsIns.emitNotify("onDevicechange",{code:200,data:{},desc:"device is change."})}),De(this,Sn).call(this)});Ee(this,"getMediaDeviceKind",q=>De(this,en).get(q));Ee(this,"changeAudiooutput",async()=>{try{const q=De(this,en).get("audiooutput");await this.audioContext.setSinkId(q)}catch(q){console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: setSinkId is error.",q)}});Ee(this,"setDeviceKind",(q,J)=>{De(this,en).set(q,J)});Ee(this,"setAudioOutputDevice",q=>this.setDeviceKind("audiooutput",q));Ee(this,"getEnumerateDevices",async q=>(await De(this,Sn).call(this),De(this,wn).filter(I=>I.kind===q)));Ee(this,"getEnumerateAudioinputDevices",()=>this.getEnumerateDevices("audioinput"));Ee(this,"getEnumerateAudioOutputDevices",()=>this.getEnumerateDevices("audiooutput"));Ee(this,"getEnumerateVideoinputDevices",()=>this.getEnumerateDevices("videoinput"));De(this,Fn).call(this),De(this,Ln).call(this),De(this,Un).call(this),this.initPhoneyStreams(this.audioContext),document.addEventListener("click",()=>{var J;((J=this.audioContext)==null?void 0:J.state)==="suspended"&&this.audioContext.resume()})}}wn=new WeakMap,en=new WeakMap,Ht=new WeakMap,cn=new WeakMap,un=new WeakMap,pn=new WeakMap,kn=new WeakMap,Un=new WeakMap,Ln=new WeakMap,Sn=new WeakMap,Fn=new WeakMap;class RoomUsers extends RoomMedias{constructor(q){super(q);Ee(this,"getMaxVolumeUser",()=>{const q=Array.from(this.userMap.values(),({id:I})=>I);if(q.length===0)return;let J=[];for(const I of q){const D=this.getUserAudioMediaStreamContext(I,"microphoneCamera_audio");if(!D)continue;const a=D.getVolume();J.push({id:I,volume:a})}return J=J.sort((I,D)=>I.volume-D.volume>0?-1:1),J[0]});Ee(this,"setVolume",(q,J,I)=>{const D=this.getUserAudioMediaStreamContext(q,J);D==null||D.setInputGain(I)});Ee(this,"setEnhanceGain",async(q,J,I)=>{const D=this.getUserAudioMediaStreamContext(q,J);D==null||D.setEnhanceGain(I)});Ee(this,"setSpeaker",(q,J,I)=>{const D=this.getUserAudioMediaStreamContext(q,J);D==null||D.setOutputGain(I);const a=I===0;D==null||D.setMute(a)});Ee(this,"playBgs",(q,J,I)=>{const D=this.getUserAudioMediaStreamContext(q,J);return D==null?void 0:D.mixAudio(I,"bgs")});Ee(this,"setBgsGain",(q,J,I)=>{const D=this.getUserAudioMediaStreamContext(q,J);D==null||D.setBgsGain(I)});Ee(this,"stopBgs",(q,J)=>{const I=this.getUserAudioMediaStreamContext(q,J);I==null||I.mixAudioStop("bgs")});Ee(this,"playBgm",(q,J,I)=>{const D=this.getUserAudioMediaStreamContext(q,J);return D==null?void 0:D.mixAudio(I,"bgm")});Ee(this,"setBgmGain",(q,J,I)=>{const D=this.getUserAudioMediaStreamContext(q,J);D==null||D.setBgmGain(I)});Ee(this,"stopBgm",(q,J)=>{const I=this.getUserAudioMediaStreamContext(q,J);I==null||I.mixAudioStop("bgm")});Ee(this,"changBgsMix",(q,J,I)=>{const D=this.getUserAudioMediaStreamContext(q,J);D==null||D.changeMix("bgs",I)});Ee(this,"changBgmMix",(q,J,I)=>{const D=this.getUserAudioMediaStreamContext(q,J);D==null||D.changeMix("bgm",I)});Ee(this,"getVolume",(q,J)=>{const I=this.getUserAudioMediaStreamContext(q,J);return I==null?void 0:I.getVolume()});Ee(this,"clearUsers",()=>{this.userMap=new Map});Ee(this,"removeUsers",async q=>{for(const J of q)this.userMap.delete(J),await this.removeUserStreams(J)});Ee(this,"createUser",async q=>{const J=Date.now(),I={id:q,permissions:0,callAction:0,callActionStr:"",callActionMap:{microphoneCamera_audio:!1,microphoneCamera_video:!1,screenSharing_video:!1,screenSharing_audio:!1},banBehavior:0,banBehaviorStr:"",banBehaviorMap:{microphoneCamera_audio:!1,microphoneCamera_video:!1,screenSharing_video:!1,screenSharing_audio:!1},callState:0,isOwner:this.userMap.size===0,isSelf:q===this.options.userId,isPublished:!1,joinTime:J,updateAt:J,network:{egress:0,ingress:0},tracks:[],channels:[],updateStreams:{microphoneCamera_audio:!1,microphoneCamera_video:!1,screenSharing_video:!1,screenSharing_audio:!1}};this.userMap.set(q,I)});Ee(this,"getUser",async q=>(this.userMap.has(q)||await this.createUser(q),this.userMap.get(q)));Ee(this,"getUsers",async(q=[])=>{q.length===0&&(q=[...this.userMap.keys()]);const J=[];for(const I of q){const D=await this.getUser(I);J.push(D)}return J});Ee(this,"getAllUserTrackMids",async()=>{const q=await this.getUsers(),J=[];for(const I of q){const{tracks:D=[]}=I;for(const a of D)J.push(a.mid)}return J});Ee(this,"getUserTrackByTrackName",async q=>{const J=await this.getUsers(),I=[];for(const D of J){const{tracks:a=[]}=D;for(const O of a){const{trackName:F}=O;q.includes(F)&&I.push(O)}}return I});Ee(this,"getUserTrackFromMid",async q=>{const J=await this.getUsers();let I;for(const D of J){const{tracks:a=[]}=D;for(const O of a)if(O.mid===q){I=O;break}}return I});Ee(this,"checkUserInRoom",q=>this.userMap.has(q));Ee(this,"getUsersId",async()=>[...this.userMap.keys()]);Ee(this,"getSelfInfo",async()=>await this.getUser(this.options.userId));Ee(this,"updateIsPublished",async(q,J=!1)=>{const I=await this.getUser(q);I.isPublished=J});Ee(this,"setUserUpdateStreams",async(q,J,I=!0)=>{const D=await this.getUser(q),a={microphoneCamera_audio:!1,microphoneCamera_video:!1,screenSharing_video:!1,screenSharing_audio:!1};a[J]=I,D.updateStreams=a});Ee(this,"updateUserChannels",async(q,J=[],I)=>{const D=await this.getUser(q);I&&(J=[...D.channels,...J]),D.channels=J});Ee(this,"updateUsertracks",async(q,J=[],I)=>{const D=await this.getUser(q);I&&(J=[...D.tracks,...J]),J=J.filter(({mid:F=""})=>F!==""),J=pt(J,["type"]),J=J.sort((F,z)=>F.type-z.type<0?-1:1);for(const F of J)F.userId=q,F.mediaType=mediaType_keys[F.type],F.enabled===void 0&&(F.enabled=!0);D.updateStreams={microphoneCamera_audio:!1,microphoneCamera_video:!1,screenSharing_video:!1,screenSharing_audio:!1};const a=dt(D.tracks,["mediaType","enabled","mid","msid","trackName"]),O=dt(J,["mediaType","enabled","mid","msid","trackName"]);{const F="microphoneCamera_audio",z=O.find(ne=>ne.mediaType===F),K=a.find(ne=>ne.mediaType===F),te=JSON.stringify(z)!==JSON.stringify(K);D.updateStreams[F]=te}{const F="microphoneCamera_video",z=O.find(ne=>ne.mediaType===F),K=a.find(ne=>ne.mediaType===F),te=JSON.stringify(z)!==JSON.stringify(K);D.updateStreams[F]=te}{const F="screenSharing_audio",z=O.find(ne=>ne.mediaType===F),K=a.find(ne=>ne.mediaType===F),te=JSON.stringify(z)!==JSON.stringify(K);D.updateStreams[F]=te}{const F="screenSharing_video",z=O.find(ne=>ne.mediaType===F),K=a.find(ne=>ne.mediaType===F),te=JSON.stringify(z)!==JSON.stringify(K);D.updateStreams[F]=te}D.tracks=J});Ee(this,"updateUserCallAction",async(q,J=0)=>{const I=await this.getUser(q);I.callAction=J,I.callActionStr=J.toString(2).padStart(4,"0"),I.callActionMap=this.getCallActionMap(J)});Ee(this,"updateUserBehaviors",async(q,J=0)=>{const I=await this.getUser(q);I.banBehavior=J,I.banBehaviorStr=J.toString(2).padStart(4,"0"),I.banBehaviorMap=this.getBanBehaviorMap(J)});Ee(this,"updateUserNetwork",async(q,J={egress:5,ingress:5})=>{const I=await this.getUser(q);I.network=J});Ee(this,"updateUserPermissions",async(q,J)=>{if(J){const I=await this.getUser(q);I.permissions=J}});Ee(this,"updateUserBase",async q=>{const J=await this.getUser(q);J.isSelf=q===this.options.userId,J.updateAt=Date.now()});Ee(this,"updateUsers",async q=>{for(const J of q){const{id:I,tracks:D,callAction:a,permissions:O,isPublished:F}=J;await this.updateUserBase(I),await this.updateIsPublished(I,F),await this.updateUserPermissions(I,O),await this.updateUsertracks(I,D,!0),await this.updateUserCallAction(I,a),await this.updateUserNetwork(I)}});Ee(this,"emitNotifyUpdateUser",async q=>{const J=await this.getUsers([q]),[I]=this.usersFilter(J);this.cwsIns.emitNotify("onRoomUser",{code:200,data:I,desc:"user info is change."})});Ee(this,"emitNotifyUpdateUsers",async()=>{const q=await this.getUsers(),J=this.usersFilter(q);this.cwsIns.emitNotify("onRoomUsers",{code:200,data:J,desc:"all users info is change."})})}}const t=(N,Z=4294967295,q=79764919)=>{const J=new Int32Array(256);let I,D,a,O=Z;for(I=0;I<256;I++){for(a=I<<24,D=8;D>0;--D)a=2147483648&a?a<<1^q:a<<1;J[I]=a}for(I=0;I<N.length;I++)O=O<<8^J[255&(O>>24^N[I])];return O},e=(N,Z=t)=>{const q=oe=>new Uint8Array(oe.length/2).map((se,fe)=>parseInt(oe.substring(2*fe,2*(fe+1)),16)),J=oe=>q(oe)[0],I=new Map;[,8364,,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,,381,,,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,,382,376].forEach((oe,se)=>I.set(oe,se));const D=new Uint8Array(N.length);let a,O,F,z=!1,K=0,te=42,ne=N.length>13&&N.substring(0,9)==="dynEncode",ee=0;ne&&(ee=11,O=J(N.substring(9,ee)),O<=1&&(ee+=2,te=J(N.substring(11,ee))),O===1&&(ee+=8,F=(oe=>new DataView(q(oe).buffer).getInt32(0,!0))(N.substring(13,ee))));const re=256-te;for(let oe=ee;oe<N.length;oe++)if(a=N.charCodeAt(oe),a!==61||z){if(a===92&&oe<N.length-5&&ne){const se=N.charCodeAt(oe+1);se!==117&&se!==85||(a=parseInt(N.substring(oe+2,oe+6),16),oe+=5)}if(a>255){const se=I.get(a);se&&(a=se+127)}z&&(z=!1,a-=64),D[K++]=a<te&&a>0?a+re:a-te}else z=!0;const ce=D.subarray(0,K);if(ne&&O===1){const oe=Z(ce);if(oe!==F){const se="Decode failed crc32 validation";throw console.error("`simple-yenc`\n",se+`
14
- `,"Expected: "+F+"; Got: "+oe+`
15
- `,"Visit https://github.com/eshaz/simple-yenc for more information"),Error(se)}}return ce};function WASMAudioDecoderCommon(){const N=Uint8Array,Z=Float32Array;WASMAudioDecoderCommon.modules||Object.defineProperties(WASMAudioDecoderCommon,{modules:{value:new WeakMap},setModule:{value(q,J){WASMAudioDecoderCommon.modules.set(q,Promise.resolve(J))}},getModule:{value(q,J){let I=WASMAudioDecoderCommon.modules.get(q);return I||(J?I=WebAssembly.compile(e(J)):(J=q.wasm,I=WASMAudioDecoderCommon.inflateDynEncodeString(J).then(D=>WebAssembly.compile(D))),WASMAudioDecoderCommon.modules.set(q,I)),I}},concatFloat32:{value(q,J){let I=new Z(J),D=0,a=0;for(;D<q.length;)I.set(q[D],a),a+=q[D++].length;return I}},getDecodedAudio:{value:(q,J,I,D,a)=>({errors:q,channelData:J,samplesDecoded:I,sampleRate:D,bitDepth:a})},getDecodedAudioMultiChannel:{value(q,J,I,D,a,O){let F=[],z,K;for(z=0;z<I;z++){const te=[];for(K=0;K<J.length;)te.push(J[K++][z]||[]);F.push(WASMAudioDecoderCommon.concatFloat32(te,D))}return WASMAudioDecoderCommon.getDecodedAudio(q,F,D,a,O)}},inflateDynEncodeString:{value(q){return q=e(q),new Promise(J=>{const I=String.raw`dynEncode012804c7886d(‰›•)((()>+ˆ*§§)§ˆ,§§§§)§ˆ+§§§)§+.-()(*)-+)(ˆ.7*§)i¸¸,3§(i¸¸,3/G+.••—š¡*(,˜ŽŽ(,3‡‡‰˜‡Š‰›+)2å:-œ),§H(P*DI*H(P*@I++hH)H*r,hH(H(P*<J,i)’^*<H,H(P*4’U((I-H(H*i0’J,^*DH+H-H*œšI+H,I*4)33H(H*H)“^*DH(H+H)^*@H+i§H)œi§›™3æ*).§K(iH“I/+§H,iHn,§H+i(H+i(rCJ0I,H*I-+hH,,hH(H-V)(i)œ’J.H.W)(i)’c)(H,i)“I,H-i*’I-4)33i(I.*hH(V)(H+n5(H(i*’I-i(I,i)I.+hH,i*’J+iHn,hi(I-i*I,+hH,H/’H-c)(H,iFn,hi(I,+hH,H0n5-H*V)(J(,hH/H(i)œ’J(H(V)(J(i)’c)(H)H(i)œ’H,c)(3H*i*’I*H,i)’I,4(3(-H(H,’W)(H-’I-H,i*’I,4)3(3(3H,H-’I1H+I,H.i)œH1V)(“J.i(v5(33H.-H(H,’i(c)(H,i*’I,4)333–)-§i*I*+§H*iHn,hiž73H,H(i)8(H+šJ+H)P*(H*’V)(J-“r,§H)P*,H.i)œ’H+H,“i)œ’V)(-H*i*’I*H+i)œI+H-H.’I.H,H-’i)œI,4)333Ã+)-§iø7i(^*(iü7I,*h+hH+iDn,h*hilI+i)I,+hH+,hH+iô7’H,c)(i)H+i´8’W)(œH,’I,H+i*’I+4)-+hH(H)8*J-i(p5.*h*h*hH-i')u,hH(P*(J+,hH(P*0J,H(P*,n50H+H,’H-b((3H(P*0i)’I.4)3H-i¨*n5*H-iÅ*s,hiž73H-i)œJ+V)&+I,H(H+V)æ,8(I.H(H*8*J-i(p51H-i)œJ+i¸7’V)(H(H+iø7’V)(8(’J/H(P*0J+s,hi73H+H,H.’J,’I.H(P*(m5(H.H(P*,s5.+hH,m5*H(P*(J.H+’H.H+H/“’U((b((H(H(P*0i)’J+^*0H,i)“I,4(3(3H(H.^*03H-i¨*o5)33i(73(3(3-H,H+i)žc)(H,i*’I,H+i)’I+4)33i)I-3H-3!2)0§K(i2“J,L(H,H(^*(H,H*^*4H,i(^*0H,i(^*DH,j(_*<H,H)P*(^*,H,H+P*(^*8*h*h+hH,i)8(I3i§I**h*h*h*h*h*h*hH,i*8(6+(),03H,j(_*@i*I-H,P*<J.i,’J(H,P*8J/s50H,H.i+’J0^*<i¦I*H.H,P*4J1’J.U(*H.U((J2›i')o5/H.U()I.H,H(^*<H0H1’U((H.i0œJ.i§›i0ži')™o5/H/H.H2šJ*H(’J.q50H,P*0J/H*’I-H,P*(J0,hH,P*,H-q,hi)I-423+hH*m5+H/H0’H(H1’U((b((H/i)’I/H(i)’I(H*i)“I*4(3(3H,H.^*<H,H-^*04*3iØ1U((5+i(I(i¨7i1^*(i$6iè1^*(i°7iè6^*(i¬7iÈ6^*(+hH(iÈ*n,hiÈ*I(+hH(i¨,n,hi¨,I(+hH(iØ,n,hiØ,I(+hH(iè,o,hH,i-’H(’i0c)(H(i*’I(4)33iè1i1H,i-’iÈ*8)Bi(I(+hH(ido,hH,i-’H(’i-c)(H(i*’I(4)33iÈ6iè6H,i-’iF8)BiØ1i)b((41-H,i-’H(’i/c)(H(i*’I(4)3(3(-H,i-’H(’i1c)(H(i*’I(4)3(3(-H,i-’H(’i0c)(H(i*’I(4)3(3(3H,H/^*0H,H(^*<3i(I*4*3H,H,i¸)’^*TH,H,iø-’^*PH,H,iX’^*LH,H,i(’^*HH,i-8(I(H,i-8(I-i¥I*H,i,8(I.H(iErH-iErš5)H(i©*’I1H-i)’I0i(i;H.i,’J(i(H(i(rCJ(“J*H*i;sCI*i¨1I-H(I/+hH/,hH,i-’H-V)(i)œ’H,i+8(c)(H/i)“I/H-i*’I-H*i)’I*4)-H(i)œi¨1’I/+hH(H*o,hH,i-’H/V)(i)œ’i(c)(H/i*’I/H(i)’I(4)33i¤I*H,iø-’H,i¸)’H,i-’i;8)5+H0H1’I2i(I-+hH-H2p,hH,H,iP’8*J*i(p5-H*i7u,hH,i-’H-i)œ’H*c)(H-i)’I-4*3i(I/i+I.i+I(*h*h*hH*i8“6*(*)3H-m,hi£I*403H-i)œH,’W)-I/i*I(4)3i3I.i/I(3H2H,H(8(H.’J(H-’J.p,hi¢I*4.3H,i-’H-i)œ’I*+hH(,hH*H/c)(H*i*’I*H(i)“I(4)-H.I-4+3(3(33H,W)1m,hiŸI*4,3H,iø-’H,i¸)’H,i-’H18)J(,hi¡I*H(i(p5,H1H,V)ú-H,V)ø-’o5,3H,i(’H,iX’H,i-’H1i)œ’H08)J(,hi I*H(i(p5,H0H,V)šH,V)˜’o5,3H,H,iP’H,iH’8+I*4+3(3(3H,i$6i¬78+I*3H*H3šm5(3i)I-H*i(r5)3H)H,P*0^*(H+H,P*<^*(H*I-3H,i2’L(H-33Á)+(i¨03b+(,(-(.(/(0(1(2(3(5(7(9(;(?(C(G(K(S([(c(k({(‹(›(«(Ë(ë( (*)(iø03O)()()()(*(*(*(*(+(+(+(+(,(,(,(,(-(-(-(-(i¨13M8(9(:(((0(/(1(.(2(-(3(,(4(+(5(*(6()(7(T7œ‰šœ‡Ž‰œš›*S7•œ‰Š”U”—Љ”›S0›‘–U œ`;WASMAudioDecoderCommon.getModule(WASMAudioDecoderCommon,I).then(D=>WebAssembly.instantiate(D,{})).then(({exports:D})=>{const a=new Map(Object.entries(D)),O=a.get("puff"),F=a.get("memory").buffer,z=new N(F),K=new DataView(F);let te=a.get("__heap_base");const ne=q.length,ee=te;te+=4,K.setInt32(ee,ne,!0);const re=te;te+=ne,z.set(q,re);const ce=te;te+=4,K.setInt32(ce,z.byteLength-te,!0),O(te,ce,re,ee),J(z.slice(te,te+K.getInt32(ce,!0)))})})}}}),Object.defineProperty(this,"wasm",{enumerable:!0,get:()=>this._wasm}),this.getOutputChannels=(q,J,I)=>{let D=[],a=0;for(;a<J;)D.push(q.slice(a*I,a++*I+I));return D},this.allocateTypedArray=(q,J,I=!0)=>{const D=this._wasm.malloc(J.BYTES_PER_ELEMENT*q);return I&&this._pointers.add(D),{ptr:D,len:q,buf:new J(this._wasm.HEAP,D,q)}},this.free=()=>{this._pointers.forEach(q=>{this._wasm.free(q)}),this._pointers.clear()},this.codeToString=q=>{const J=[],I=new Uint8Array(this._wasm.HEAP);for(let D=I[q];D!==0;D=I[++q])J.push(D);return String.fromCharCode.apply(null,J)},this.addError=(q,J,I,D,a,O)=>{q.push({message:J,frameLength:I,frameNumber:D,inputBytes:a,outputSamples:O})},this.instantiate=(q,J)=>(J&&WASMAudioDecoderCommon.setModule(q,J),this._wasm=new q(WASMAudioDecoderCommon).instantiate(),this._pointers=new Set,this._wasm.ready.then(()=>this))}var browser,hasRequiredBrowser;function requireBrowser(){return hasRequiredBrowser||(hasRequiredBrowser=1,browser=Worker),browser}var browserExports=requireBrowser();const NodeWorker=getDefaultExportFromCjs(browserExports),getWorker=()=>globalThis.Worker||NodeWorker;class WASMAudioDecoderWorker extends getWorker(){constructor(Z,q,J,I){WASMAudioDecoderCommon.modules||new WASMAudioDecoderCommon;let D=WASMAudioDecoderCommon.modules.get(J);if(!D){let a="text/javascript",O,F=`'use strict';(${((z,K,te)=>{let ne,ee,re=new Promise(ce=>{ee=ce});self.onmessage=({data:{id:ce,command:oe,data:se}})=>{let fe=re,ge={id:ce},ue;oe==="init"?(Object.defineProperties(z,{WASMAudioDecoderCommon:{value:K},EmscriptenWASM:{value:te},module:{value:se.module},isWebWorker:{value:!0}}),ne=new z(se.options),ee()):oe==="free"?ne.free():oe==="ready"?fe=fe.then(()=>ne.ready):oe==="reset"?fe=fe.then(()=>ne.reset()):(Object.assign(ge,ne[oe](Array.isArray(se)?se.map(_e=>new Uint8Array(_e)):new Uint8Array(se))),ue=ge.channelData?ge.channelData.map(_e=>_e.buffer):[]),fe.then(()=>self.postMessage(ge,ue))}}).toString()})(${J}, ${WASMAudioDecoderCommon}, ${I})`;try{O=typeof process.versions.node<"u"}catch{}D=O?`data:${a};base64,${Buffer.from(F).toString("base64")}`:URL.createObjectURL(new Blob([F],{type:a})),WASMAudioDecoderCommon.modules.set(J,D)}super(D,{name:q}),this._id=Number.MIN_SAFE_INTEGER,this._enqueuedOperations=new Map,this.onmessage=({data:a})=>{const{id:O,...F}=a;this._enqueuedOperations.get(O)(F),this._enqueuedOperations.delete(O)},new I(WASMAudioDecoderCommon).getModule().then(a=>{this.postToDecoder("init",{module:a,options:Z})})}async postToDecoder(Z,q){return new Promise(J=>{this.postMessage({command:Z,id:this._id,data:q}),this._enqueuedOperations.set(this._id++,J)})}get ready(){return this.postToDecoder("ready")}async free(){await this.postToDecoder("free").finally(()=>{this.terminate()})}async reset(){await this.postToDecoder("reset")}}const assignNames=(N,Z)=>{Object.defineProperty(N,"name",{value:Z})};function EmscriptenWASM(N){function Z(){}function q(Se){throw Se}var J,I;function D(){var Se=I.buffer;J=new Uint8Array(Se),new BigInt64Array(Se),new BigUint64Array(Se)}for(var a=()=>q(""),O=()=>{},F={},z=Se=>Se(),K=()=>performance.now(),te=(Se,Me)=>{if(F[Se]&&(clearTimeout(F[Se].id),delete F[Se]),!Me)return 0;var We=setTimeout(()=>{delete F[Se],z(()=>we(Se,K()))},Me);return F[Se]={id:We,timeout_ms:Me},0},ne=Math.cos,ee=Se=>(J.length,!1),re=Se=>{throw`exit(${Se})`},ce=new Uint8Array(123),oe=25;oe>=0;--oe)ce[48+oe]=52+oe,ce[65+oe]=oe,ce[97+oe]=26+oe;ce[43]=62,ce[47]=63;var se={d:a,c:O,e:te,a:ne,f:ee,b:re};function fe(Se){ge=Se.i,ue=Se.j,_e=Se.k,pe=Se.l,ye=Se.m,we=Se.o}var ge,ue,_e,pe,ye,we;function Ie(Se){Se.h()}EmscriptenWASM.wasm||Object.defineProperty(EmscriptenWASM,"wasm",{get:()=>String.raw`dynEncode0158c8b8d85e¼æ=M™]™lGu³õPoš]ÐãÞ·£3² ÁÚ= ’Êöc/ÓZ8s³‹íÛ³u­Ð¥t"+¦›¦~dòR\(nº}÷£¢¢ë¢k}Ÿt¡) ,‚­äÕüP
13
+ */var hasRequiredBuffer;function requireBuffer(){return hasRequiredBuffer||(hasRequiredBuffer=1,function(O){const N=requireBase64Js(),I=requireIeee754(),D=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;O.Buffer=c,O.SlowBuffer=ie,O.INSPECT_MAX_BYTES=50;const f=2147483647;O.kMaxLength=f,c.TYPED_ARRAY_SUPPORT=k(),!c.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function k(){try{const X=new Uint8Array(1),F={foo:function(){return 42}};return Object.setPrototypeOf(F,Uint8Array.prototype),Object.setPrototypeOf(X,F),X.foo()===42}catch{return!1}}Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}});function i(X){if(X>f)throw new RangeError('The value "'+X+'" is invalid for option "size"');const F=new Uint8Array(X);return Object.setPrototypeOf(F,c.prototype),F}function c(X,F,j){if(typeof X=="number"){if(typeof F=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Z(X)}return $(X,F,j)}c.poolSize=8192;function $(X,F,j){if(typeof X=="string")return J(X,F);if(ArrayBuffer.isView(X))return Q(X);if(X==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof X);if(Ut(X,ArrayBuffer)||X&&Ut(X.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ut(X,SharedArrayBuffer)||X&&Ut(X.buffer,SharedArrayBuffer)))return ee(X,F,j);if(typeof X=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const ae=X.valueOf&&X.valueOf();if(ae!=null&&ae!==X)return c.from(ae,F,j);const ve=Y(X);if(ve)return ve;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof X[Symbol.toPrimitive]=="function")return c.from(X[Symbol.toPrimitive]("string"),F,j);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof X)}c.from=function(X,F,j){return $(X,F,j)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array);function C(X){if(typeof X!="number")throw new TypeError('"size" argument must be of type number');if(X<0)throw new RangeError('The value "'+X+'" is invalid for option "size"')}function M(X,F,j){return C(X),X<=0?i(X):F!==void 0?typeof j=="string"?i(X).fill(F,j):i(X).fill(F):i(X)}c.alloc=function(X,F,j){return M(X,F,j)};function Z(X){return C(X),i(X<0?0:te(X)|0)}c.allocUnsafe=function(X){return Z(X)},c.allocUnsafeSlow=function(X){return Z(X)};function J(X,F){if((typeof F!="string"||F==="")&&(F="utf8"),!c.isEncoding(F))throw new TypeError("Unknown encoding: "+F);const j=ye(X,F)|0;let ae=i(j);const ve=ae.write(X,F);return ve!==j&&(ae=ae.slice(0,ve)),ae}function z(X){const F=X.length<0?0:te(X.length)|0,j=i(F);for(let ae=0;ae<F;ae+=1)j[ae]=X[ae]&255;return j}function Q(X){if(Ut(X,Uint8Array)){const F=new Uint8Array(X);return ee(F.buffer,F.byteOffset,F.byteLength)}return z(X)}function ee(X,F,j){if(F<0||X.byteLength<F)throw new RangeError('"offset" is outside of buffer bounds');if(X.byteLength<F+(j||0))throw new RangeError('"length" is outside of buffer bounds');let ae;return F===void 0&&j===void 0?ae=new Uint8Array(X):j===void 0?ae=new Uint8Array(X,F):ae=new Uint8Array(X,F,j),Object.setPrototypeOf(ae,c.prototype),ae}function Y(X){if(c.isBuffer(X)){const F=te(X.length)|0,j=i(F);return j.length===0||X.copy(j,0,0,F),j}if(X.length!==void 0)return typeof X.length!="number"||jt(X.length)?i(0):z(X);if(X.type==="Buffer"&&Array.isArray(X.data))return z(X.data)}function te(X){if(X>=f)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f.toString(16)+" bytes");return X|0}function ie(X){return+X!=X&&(X=0),c.alloc(+X)}c.isBuffer=function(F){return F!=null&&F._isBuffer===!0&&F!==c.prototype},c.compare=function(F,j){if(Ut(F,Uint8Array)&&(F=c.from(F,F.offset,F.byteLength)),Ut(j,Uint8Array)&&(j=c.from(j,j.offset,j.byteLength)),!c.isBuffer(F)||!c.isBuffer(j))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(F===j)return 0;let ae=F.length,ve=j.length;for(let Ee=0,Ce=Math.min(ae,ve);Ee<Ce;++Ee)if(F[Ee]!==j[Ee]){ae=F[Ee],ve=j[Ee];break}return ae<ve?-1:ve<ae?1:0},c.isEncoding=function(F){switch(String(F).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(F,j){if(!Array.isArray(F))throw new TypeError('"list" argument must be an Array of Buffers');if(F.length===0)return c.alloc(0);let ae;if(j===void 0)for(j=0,ae=0;ae<F.length;++ae)j+=F[ae].length;const ve=c.allocUnsafe(j);let Ee=0;for(ae=0;ae<F.length;++ae){let Ce=F[ae];if(Ut(Ce,Uint8Array))Ee+Ce.length>ve.length?(c.isBuffer(Ce)||(Ce=c.from(Ce)),Ce.copy(ve,Ee)):Uint8Array.prototype.set.call(ve,Ce,Ee);else if(c.isBuffer(Ce))Ce.copy(ve,Ee);else throw new TypeError('"list" argument must be an Array of Buffers');Ee+=Ce.length}return ve};function ye(X,F){if(c.isBuffer(X))return X.length;if(ArrayBuffer.isView(X)||Ut(X,ArrayBuffer))return X.byteLength;if(typeof X!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof X);const j=X.length,ae=arguments.length>2&&arguments[2]===!0;if(!ae&&j===0)return 0;let ve=!1;for(;;)switch(F){case"ascii":case"latin1":case"binary":return j;case"utf8":case"utf-8":return Ht(X).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j*2;case"hex":return j>>>1;case"base64":return Zt(X).length;default:if(ve)return ae?-1:Ht(X).length;F=(""+F).toLowerCase(),ve=!0}}c.byteLength=ye;function re(X,F,j){let ae=!1;if((F===void 0||F<0)&&(F=0),F>this.length||((j===void 0||j>this.length)&&(j=this.length),j<=0)||(j>>>=0,F>>>=0,j<=F))return"";for(X||(X="utf8");;)switch(X){case"hex":return Mt(this,F,j);case"utf8":case"utf-8":return Pe(this,F,j);case"ascii":return _t(this,F,j);case"latin1":case"binary":return St(this,F,j);case"base64":return Ue(this,F,j);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return At(this,F,j);default:if(ae)throw new TypeError("Unknown encoding: "+X);X=(X+"").toLowerCase(),ae=!0}}c.prototype._isBuffer=!0;function de(X,F,j){const ae=X[F];X[F]=X[j],X[j]=ae}c.prototype.swap16=function(){const F=this.length;if(F%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let j=0;j<F;j+=2)de(this,j,j+1);return this},c.prototype.swap32=function(){const F=this.length;if(F%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let j=0;j<F;j+=4)de(this,j,j+3),de(this,j+1,j+2);return this},c.prototype.swap64=function(){const F=this.length;if(F%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let j=0;j<F;j+=8)de(this,j,j+7),de(this,j+1,j+6),de(this,j+2,j+5),de(this,j+3,j+4);return this},c.prototype.toString=function(){const F=this.length;return F===0?"":arguments.length===0?Pe(this,0,F):re.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(F){if(!c.isBuffer(F))throw new TypeError("Argument must be a Buffer");return this===F?!0:c.compare(this,F)===0},c.prototype.inspect=function(){let F="";const j=O.INSPECT_MAX_BYTES;return F=this.toString("hex",0,j).replace(/(.{2})/g,"$1 ").trim(),this.length>j&&(F+=" ... "),"<Buffer "+F+">"},D&&(c.prototype[D]=c.prototype.inspect),c.prototype.compare=function(F,j,ae,ve,Ee){if(Ut(F,Uint8Array)&&(F=c.from(F,F.offset,F.byteLength)),!c.isBuffer(F))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof F);if(j===void 0&&(j=0),ae===void 0&&(ae=F?F.length:0),ve===void 0&&(ve=0),Ee===void 0&&(Ee=this.length),j<0||ae>F.length||ve<0||Ee>this.length)throw new RangeError("out of range index");if(ve>=Ee&&j>=ae)return 0;if(ve>=Ee)return-1;if(j>=ae)return 1;if(j>>>=0,ae>>>=0,ve>>>=0,Ee>>>=0,this===F)return 0;let Ce=Ee-ve,tt=ae-j;const mt=Math.min(Ce,tt),ot=this.slice(ve,Ee),wt=F.slice(j,ae);for(let yt=0;yt<mt;++yt)if(ot[yt]!==wt[yt]){Ce=ot[yt],tt=wt[yt];break}return Ce<tt?-1:tt<Ce?1:0};function se(X,F,j,ae,ve){if(X.length===0)return-1;if(typeof j=="string"?(ae=j,j=0):j>2147483647?j=2147483647:j<-2147483648&&(j=-2147483648),j=+j,jt(j)&&(j=ve?0:X.length-1),j<0&&(j=X.length+j),j>=X.length){if(ve)return-1;j=X.length-1}else if(j<0)if(ve)j=0;else return-1;if(typeof F=="string"&&(F=c.from(F,ae)),c.isBuffer(F))return F.length===0?-1:ue(X,F,j,ae,ve);if(typeof F=="number")return F=F&255,typeof Uint8Array.prototype.indexOf=="function"?ve?Uint8Array.prototype.indexOf.call(X,F,j):Uint8Array.prototype.lastIndexOf.call(X,F,j):ue(X,[F],j,ae,ve);throw new TypeError("val must be string, number or Buffer")}function ue(X,F,j,ae,ve){let Ee=1,Ce=X.length,tt=F.length;if(ae!==void 0&&(ae=String(ae).toLowerCase(),ae==="ucs2"||ae==="ucs-2"||ae==="utf16le"||ae==="utf-16le")){if(X.length<2||F.length<2)return-1;Ee=2,Ce/=2,tt/=2,j/=2}function mt(wt,yt){return Ee===1?wt[yt]:wt.readUInt16BE(yt*Ee)}let ot;if(ve){let wt=-1;for(ot=j;ot<Ce;ot++)if(mt(X,ot)===mt(F,wt===-1?0:ot-wt)){if(wt===-1&&(wt=ot),ot-wt+1===tt)return wt*Ee}else wt!==-1&&(ot-=ot-wt),wt=-1}else for(j+tt>Ce&&(j=Ce-tt),ot=j;ot>=0;ot--){let wt=!0;for(let yt=0;yt<tt;yt++)if(mt(X,ot+yt)!==mt(F,yt)){wt=!1;break}if(wt)return ot}return-1}c.prototype.includes=function(F,j,ae){return this.indexOf(F,j,ae)!==-1},c.prototype.indexOf=function(F,j,ae){return se(this,F,j,ae,!0)},c.prototype.lastIndexOf=function(F,j,ae){return se(this,F,j,ae,!1)};function he(X,F,j,ae){j=Number(j)||0;const ve=X.length-j;ae?(ae=Number(ae),ae>ve&&(ae=ve)):ae=ve;const Ee=F.length;ae>Ee/2&&(ae=Ee/2);let Ce;for(Ce=0;Ce<ae;++Ce){const tt=parseInt(F.substr(Ce*2,2),16);if(jt(tt))return Ce;X[j+Ce]=tt}return Ce}function we(X,F,j,ae){return Gt(Ht(F,X.length-j),X,j,ae)}function fe(X,F,j,ae){return Gt(Ft(F),X,j,ae)}function me(X,F,j,ae){return Gt(Zt(F),X,j,ae)}function Re(X,F,j,ae){return Gt(rn(F,X.length-j),X,j,ae)}c.prototype.write=function(F,j,ae,ve){if(j===void 0)ve="utf8",ae=this.length,j=0;else if(ae===void 0&&typeof j=="string")ve=j,ae=this.length,j=0;else if(isFinite(j))j=j>>>0,isFinite(ae)?(ae=ae>>>0,ve===void 0&&(ve="utf8")):(ve=ae,ae=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Ee=this.length-j;if((ae===void 0||ae>Ee)&&(ae=Ee),F.length>0&&(ae<0||j<0)||j>this.length)throw new RangeError("Attempt to write outside buffer bounds");ve||(ve="utf8");let Ce=!1;for(;;)switch(ve){case"hex":return he(this,F,j,ae);case"utf8":case"utf-8":return we(this,F,j,ae);case"ascii":case"latin1":case"binary":return fe(this,F,j,ae);case"base64":return me(this,F,j,ae);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Re(this,F,j,ae);default:if(Ce)throw new TypeError("Unknown encoding: "+ve);ve=(""+ve).toLowerCase(),Ce=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ue(X,F,j){return F===0&&j===X.length?N.fromByteArray(X):N.fromByteArray(X.slice(F,j))}function Pe(X,F,j){j=Math.min(X.length,j);const ae=[];let ve=F;for(;ve<j;){const Ee=X[ve];let Ce=null,tt=Ee>239?4:Ee>223?3:Ee>191?2:1;if(ve+tt<=j){let mt,ot,wt,yt;switch(tt){case 1:Ee<128&&(Ce=Ee);break;case 2:mt=X[ve+1],(mt&192)===128&&(yt=(Ee&31)<<6|mt&63,yt>127&&(Ce=yt));break;case 3:mt=X[ve+1],ot=X[ve+2],(mt&192)===128&&(ot&192)===128&&(yt=(Ee&15)<<12|(mt&63)<<6|ot&63,yt>2047&&(yt<55296||yt>57343)&&(Ce=yt));break;case 4:mt=X[ve+1],ot=X[ve+2],wt=X[ve+3],(mt&192)===128&&(ot&192)===128&&(wt&192)===128&&(yt=(Ee&15)<<18|(mt&63)<<12|(ot&63)<<6|wt&63,yt>65535&&yt<1114112&&(Ce=yt))}}Ce===null?(Ce=65533,tt=1):Ce>65535&&(Ce-=65536,ae.push(Ce>>>10&1023|55296),Ce=56320|Ce&1023),ae.push(Ce),ve+=tt}return vt(ae)}const De=4096;function vt(X){const F=X.length;if(F<=De)return String.fromCharCode.apply(String,X);let j="",ae=0;for(;ae<F;)j+=String.fromCharCode.apply(String,X.slice(ae,ae+=De));return j}function _t(X,F,j){let ae="";j=Math.min(X.length,j);for(let ve=F;ve<j;++ve)ae+=String.fromCharCode(X[ve]&127);return ae}function St(X,F,j){let ae="";j=Math.min(X.length,j);for(let ve=F;ve<j;++ve)ae+=String.fromCharCode(X[ve]);return ae}function Mt(X,F,j){const ae=X.length;(!F||F<0)&&(F=0),(!j||j<0||j>ae)&&(j=ae);let ve="";for(let Ee=F;Ee<j;++Ee)ve+=dn[X[Ee]];return ve}function At(X,F,j){const ae=X.slice(F,j);let ve="";for(let Ee=0;Ee<ae.length-1;Ee+=2)ve+=String.fromCharCode(ae[Ee]+ae[Ee+1]*256);return ve}c.prototype.slice=function(F,j){const ae=this.length;F=~~F,j=j===void 0?ae:~~j,F<0?(F+=ae,F<0&&(F=0)):F>ae&&(F=ae),j<0?(j+=ae,j<0&&(j=0)):j>ae&&(j=ae),j<F&&(j=F);const ve=this.subarray(F,j);return Object.setPrototypeOf(ve,c.prototype),ve};function ct(X,F,j){if(X%1!==0||X<0)throw new RangeError("offset is not uint");if(X+F>j)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUintLE=c.prototype.readUIntLE=function(F,j,ae){F=F>>>0,j=j>>>0,ae||ct(F,j,this.length);let ve=this[F],Ee=1,Ce=0;for(;++Ce<j&&(Ee*=256);)ve+=this[F+Ce]*Ee;return ve},c.prototype.readUintBE=c.prototype.readUIntBE=function(F,j,ae){F=F>>>0,j=j>>>0,ae||ct(F,j,this.length);let ve=this[F+--j],Ee=1;for(;j>0&&(Ee*=256);)ve+=this[F+--j]*Ee;return ve},c.prototype.readUint8=c.prototype.readUInt8=function(F,j){return F=F>>>0,j||ct(F,1,this.length),this[F]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(F,j){return F=F>>>0,j||ct(F,2,this.length),this[F]|this[F+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(F,j){return F=F>>>0,j||ct(F,2,this.length),this[F]<<8|this[F+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(F,j){return F=F>>>0,j||ct(F,4,this.length),(this[F]|this[F+1]<<8|this[F+2]<<16)+this[F+3]*16777216},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(F,j){return F=F>>>0,j||ct(F,4,this.length),this[F]*16777216+(this[F+1]<<16|this[F+2]<<8|this[F+3])},c.prototype.readBigUInt64LE=Kt(function(F){F=F>>>0,ut(F,"offset");const j=this[F],ae=this[F+7];(j===void 0||ae===void 0)&&Tt(F,this.length-8);const ve=j+this[++F]*2**8+this[++F]*2**16+this[++F]*2**24,Ee=this[++F]+this[++F]*2**8+this[++F]*2**16+ae*2**24;return BigInt(ve)+(BigInt(Ee)<<BigInt(32))}),c.prototype.readBigUInt64BE=Kt(function(F){F=F>>>0,ut(F,"offset");const j=this[F],ae=this[F+7];(j===void 0||ae===void 0)&&Tt(F,this.length-8);const ve=j*2**24+this[++F]*2**16+this[++F]*2**8+this[++F],Ee=this[++F]*2**24+this[++F]*2**16+this[++F]*2**8+ae;return(BigInt(ve)<<BigInt(32))+BigInt(Ee)}),c.prototype.readIntLE=function(F,j,ae){F=F>>>0,j=j>>>0,ae||ct(F,j,this.length);let ve=this[F],Ee=1,Ce=0;for(;++Ce<j&&(Ee*=256);)ve+=this[F+Ce]*Ee;return Ee*=128,ve>=Ee&&(ve-=Math.pow(2,8*j)),ve},c.prototype.readIntBE=function(F,j,ae){F=F>>>0,j=j>>>0,ae||ct(F,j,this.length);let ve=j,Ee=1,Ce=this[F+--ve];for(;ve>0&&(Ee*=256);)Ce+=this[F+--ve]*Ee;return Ee*=128,Ce>=Ee&&(Ce-=Math.pow(2,8*j)),Ce},c.prototype.readInt8=function(F,j){return F=F>>>0,j||ct(F,1,this.length),this[F]&128?(255-this[F]+1)*-1:this[F]},c.prototype.readInt16LE=function(F,j){F=F>>>0,j||ct(F,2,this.length);const ae=this[F]|this[F+1]<<8;return ae&32768?ae|4294901760:ae},c.prototype.readInt16BE=function(F,j){F=F>>>0,j||ct(F,2,this.length);const ae=this[F+1]|this[F]<<8;return ae&32768?ae|4294901760:ae},c.prototype.readInt32LE=function(F,j){return F=F>>>0,j||ct(F,4,this.length),this[F]|this[F+1]<<8|this[F+2]<<16|this[F+3]<<24},c.prototype.readInt32BE=function(F,j){return F=F>>>0,j||ct(F,4,this.length),this[F]<<24|this[F+1]<<16|this[F+2]<<8|this[F+3]},c.prototype.readBigInt64LE=Kt(function(F){F=F>>>0,ut(F,"offset");const j=this[F],ae=this[F+7];(j===void 0||ae===void 0)&&Tt(F,this.length-8);const ve=this[F+4]+this[F+5]*2**8+this[F+6]*2**16+(ae<<24);return(BigInt(ve)<<BigInt(32))+BigInt(j+this[++F]*2**8+this[++F]*2**16+this[++F]*2**24)}),c.prototype.readBigInt64BE=Kt(function(F){F=F>>>0,ut(F,"offset");const j=this[F],ae=this[F+7];(j===void 0||ae===void 0)&&Tt(F,this.length-8);const ve=(j<<24)+this[++F]*2**16+this[++F]*2**8+this[++F];return(BigInt(ve)<<BigInt(32))+BigInt(this[++F]*2**24+this[++F]*2**16+this[++F]*2**8+ae)}),c.prototype.readFloatLE=function(F,j){return F=F>>>0,j||ct(F,4,this.length),I.read(this,F,!0,23,4)},c.prototype.readFloatBE=function(F,j){return F=F>>>0,j||ct(F,4,this.length),I.read(this,F,!1,23,4)},c.prototype.readDoubleLE=function(F,j){return F=F>>>0,j||ct(F,8,this.length),I.read(this,F,!0,52,8)},c.prototype.readDoubleBE=function(F,j){return F=F>>>0,j||ct(F,8,this.length),I.read(this,F,!1,52,8)};function Qe(X,F,j,ae,ve,Ee){if(!c.isBuffer(X))throw new TypeError('"buffer" argument must be a Buffer instance');if(F>ve||F<Ee)throw new RangeError('"value" argument is out of bounds');if(j+ae>X.length)throw new RangeError("Index out of range")}c.prototype.writeUintLE=c.prototype.writeUIntLE=function(F,j,ae,ve){if(F=+F,j=j>>>0,ae=ae>>>0,!ve){const tt=Math.pow(2,8*ae)-1;Qe(this,F,j,ae,tt,0)}let Ee=1,Ce=0;for(this[j]=F&255;++Ce<ae&&(Ee*=256);)this[j+Ce]=F/Ee&255;return j+ae},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(F,j,ae,ve){if(F=+F,j=j>>>0,ae=ae>>>0,!ve){const tt=Math.pow(2,8*ae)-1;Qe(this,F,j,ae,tt,0)}let Ee=ae-1,Ce=1;for(this[j+Ee]=F&255;--Ee>=0&&(Ce*=256);)this[j+Ee]=F/Ce&255;return j+ae},c.prototype.writeUint8=c.prototype.writeUInt8=function(F,j,ae){return F=+F,j=j>>>0,ae||Qe(this,F,j,1,255,0),this[j]=F&255,j+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(F,j,ae){return F=+F,j=j>>>0,ae||Qe(this,F,j,2,65535,0),this[j]=F&255,this[j+1]=F>>>8,j+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(F,j,ae){return F=+F,j=j>>>0,ae||Qe(this,F,j,2,65535,0),this[j]=F>>>8,this[j+1]=F&255,j+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(F,j,ae){return F=+F,j=j>>>0,ae||Qe(this,F,j,4,4294967295,0),this[j+3]=F>>>24,this[j+2]=F>>>16,this[j+1]=F>>>8,this[j]=F&255,j+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(F,j,ae){return F=+F,j=j>>>0,ae||Qe(this,F,j,4,4294967295,0),this[j]=F>>>24,this[j+1]=F>>>16,this[j+2]=F>>>8,this[j+3]=F&255,j+4};function Lt(X,F,j,ae,ve){et(F,ae,ve,X,j,7);let Ee=Number(F&BigInt(4294967295));X[j++]=Ee,Ee=Ee>>8,X[j++]=Ee,Ee=Ee>>8,X[j++]=Ee,Ee=Ee>>8,X[j++]=Ee;let Ce=Number(F>>BigInt(32)&BigInt(4294967295));return X[j++]=Ce,Ce=Ce>>8,X[j++]=Ce,Ce=Ce>>8,X[j++]=Ce,Ce=Ce>>8,X[j++]=Ce,j}function gt(X,F,j,ae,ve){et(F,ae,ve,X,j,7);let Ee=Number(F&BigInt(4294967295));X[j+7]=Ee,Ee=Ee>>8,X[j+6]=Ee,Ee=Ee>>8,X[j+5]=Ee,Ee=Ee>>8,X[j+4]=Ee;let Ce=Number(F>>BigInt(32)&BigInt(4294967295));return X[j+3]=Ce,Ce=Ce>>8,X[j+2]=Ce,Ce=Ce>>8,X[j+1]=Ce,Ce=Ce>>8,X[j]=Ce,j+8}c.prototype.writeBigUInt64LE=Kt(function(F,j=0){return Lt(this,F,j,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=Kt(function(F,j=0){return gt(this,F,j,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(F,j,ae,ve){if(F=+F,j=j>>>0,!ve){const mt=Math.pow(2,8*ae-1);Qe(this,F,j,ae,mt-1,-mt)}let Ee=0,Ce=1,tt=0;for(this[j]=F&255;++Ee<ae&&(Ce*=256);)F<0&&tt===0&&this[j+Ee-1]!==0&&(tt=1),this[j+Ee]=(F/Ce>>0)-tt&255;return j+ae},c.prototype.writeIntBE=function(F,j,ae,ve){if(F=+F,j=j>>>0,!ve){const mt=Math.pow(2,8*ae-1);Qe(this,F,j,ae,mt-1,-mt)}let Ee=ae-1,Ce=1,tt=0;for(this[j+Ee]=F&255;--Ee>=0&&(Ce*=256);)F<0&&tt===0&&this[j+Ee+1]!==0&&(tt=1),this[j+Ee]=(F/Ce>>0)-tt&255;return j+ae},c.prototype.writeInt8=function(F,j,ae){return F=+F,j=j>>>0,ae||Qe(this,F,j,1,127,-128),F<0&&(F=255+F+1),this[j]=F&255,j+1},c.prototype.writeInt16LE=function(F,j,ae){return F=+F,j=j>>>0,ae||Qe(this,F,j,2,32767,-32768),this[j]=F&255,this[j+1]=F>>>8,j+2},c.prototype.writeInt16BE=function(F,j,ae){return F=+F,j=j>>>0,ae||Qe(this,F,j,2,32767,-32768),this[j]=F>>>8,this[j+1]=F&255,j+2},c.prototype.writeInt32LE=function(F,j,ae){return F=+F,j=j>>>0,ae||Qe(this,F,j,4,2147483647,-2147483648),this[j]=F&255,this[j+1]=F>>>8,this[j+2]=F>>>16,this[j+3]=F>>>24,j+4},c.prototype.writeInt32BE=function(F,j,ae){return F=+F,j=j>>>0,ae||Qe(this,F,j,4,2147483647,-2147483648),F<0&&(F=4294967295+F+1),this[j]=F>>>24,this[j+1]=F>>>16,this[j+2]=F>>>8,this[j+3]=F&255,j+4},c.prototype.writeBigInt64LE=Kt(function(F,j=0){return Lt(this,F,j,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=Kt(function(F,j=0){return gt(this,F,j,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ae(X,F,j,ae,ve,Ee){if(j+ae>X.length)throw new RangeError("Index out of range");if(j<0)throw new RangeError("Index out of range")}function Ye(X,F,j,ae,ve){return F=+F,j=j>>>0,ve||Ae(X,F,j,4),I.write(X,F,j,ae,23,4),j+4}c.prototype.writeFloatLE=function(F,j,ae){return Ye(this,F,j,!0,ae)},c.prototype.writeFloatBE=function(F,j,ae){return Ye(this,F,j,!1,ae)};function qt(X,F,j,ae,ve){return F=+F,j=j>>>0,ve||Ae(X,F,j,8),I.write(X,F,j,ae,52,8),j+8}c.prototype.writeDoubleLE=function(F,j,ae){return qt(this,F,j,!0,ae)},c.prototype.writeDoubleBE=function(F,j,ae){return qt(this,F,j,!1,ae)},c.prototype.copy=function(F,j,ae,ve){if(!c.isBuffer(F))throw new TypeError("argument should be a Buffer");if(ae||(ae=0),!ve&&ve!==0&&(ve=this.length),j>=F.length&&(j=F.length),j||(j=0),ve>0&&ve<ae&&(ve=ae),ve===ae||F.length===0||this.length===0)return 0;if(j<0)throw new RangeError("targetStart out of bounds");if(ae<0||ae>=this.length)throw new RangeError("Index out of range");if(ve<0)throw new RangeError("sourceEnd out of bounds");ve>this.length&&(ve=this.length),F.length-j<ve-ae&&(ve=F.length-j+ae);const Ee=ve-ae;return this===F&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(j,ae,ve):Uint8Array.prototype.set.call(F,this.subarray(ae,ve),j),Ee},c.prototype.fill=function(F,j,ae,ve){if(typeof F=="string"){if(typeof j=="string"?(ve=j,j=0,ae=this.length):typeof ae=="string"&&(ve=ae,ae=this.length),ve!==void 0&&typeof ve!="string")throw new TypeError("encoding must be a string");if(typeof ve=="string"&&!c.isEncoding(ve))throw new TypeError("Unknown encoding: "+ve);if(F.length===1){const Ce=F.charCodeAt(0);(ve==="utf8"&&Ce<128||ve==="latin1")&&(F=Ce)}}else typeof F=="number"?F=F&255:typeof F=="boolean"&&(F=Number(F));if(j<0||this.length<j||this.length<ae)throw new RangeError("Out of range index");if(ae<=j)return this;j=j>>>0,ae=ae===void 0?this.length:ae>>>0,F||(F=0);let Ee;if(typeof F=="number")for(Ee=j;Ee<ae;++Ee)this[Ee]=F;else{const Ce=c.isBuffer(F)?F:c.from(F,ve),tt=Ce.length;if(tt===0)throw new TypeError('The value "'+F+'" is invalid for argument "value"');for(Ee=0;Ee<ae-j;++Ee)this[Ee+j]=Ce[Ee%tt]}return this};const Ot={};function Ke(X,F,j){Ot[X]=class extends j{constructor(){super(),Object.defineProperty(this,"message",{value:F.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${X}]`,this.stack,delete this.name}get code(){return X}set code(ve){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:ve,writable:!0})}toString(){return`${this.name} [${X}]: ${this.message}`}}}Ke("ERR_BUFFER_OUT_OF_BOUNDS",function(X){return X?`${X} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Ke("ERR_INVALID_ARG_TYPE",function(X,F){return`The "${X}" argument must be of type number. Received type ${typeof F}`},TypeError),Ke("ERR_OUT_OF_RANGE",function(X,F,j){let ae=`The value of "${X}" is out of range.`,ve=j;return Number.isInteger(j)&&Math.abs(j)>2**32?ve=Ve(String(j)):typeof j=="bigint"&&(ve=String(j),(j>BigInt(2)**BigInt(32)||j<-(BigInt(2)**BigInt(32)))&&(ve=Ve(ve)),ve+="n"),ae+=` It must be ${F}. Received ${ve}`,ae},RangeError);function Ve(X){let F="",j=X.length;const ae=X[0]==="-"?1:0;for(;j>=ae+4;j-=3)F=`_${X.slice(j-3,j)}${F}`;return`${X.slice(0,j)}${F}`}function Xe(X,F,j){ut(F,"offset"),(X[F]===void 0||X[F+j]===void 0)&&Tt(F,X.length-(j+1))}function et(X,F,j,ae,ve,Ee){if(X>j||X<F){const Ce=typeof F=="bigint"?"n":"";let tt;throw F===0||F===BigInt(0)?tt=`>= 0${Ce} and < 2${Ce} ** ${(Ee+1)*8}${Ce}`:tt=`>= -(2${Ce} ** ${(Ee+1)*8-1}${Ce}) and < 2 ** ${(Ee+1)*8-1}${Ce}`,new Ot.ERR_OUT_OF_RANGE("value",tt,X)}Xe(ae,ve,Ee)}function ut(X,F){if(typeof X!="number")throw new Ot.ERR_INVALID_ARG_TYPE(F,"number",X)}function Tt(X,F,j){throw Math.floor(X)!==X?(ut(X,j),new Ot.ERR_OUT_OF_RANGE("offset","an integer",X)):F<0?new Ot.ERR_BUFFER_OUT_OF_BOUNDS:new Ot.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${F}`,X)}const Ct=/[^+/0-9A-Za-z-_]/g;function Dt(X){if(X=X.split("=")[0],X=X.trim().replace(Ct,""),X.length<2)return"";for(;X.length%4!==0;)X=X+"=";return X}function Ht(X,F){F=F||1/0;let j;const ae=X.length;let ve=null;const Ee=[];for(let Ce=0;Ce<ae;++Ce){if(j=X.charCodeAt(Ce),j>55295&&j<57344){if(!ve){if(j>56319){(F-=3)>-1&&Ee.push(239,191,189);continue}else if(Ce+1===ae){(F-=3)>-1&&Ee.push(239,191,189);continue}ve=j;continue}if(j<56320){(F-=3)>-1&&Ee.push(239,191,189),ve=j;continue}j=(ve-55296<<10|j-56320)+65536}else ve&&(F-=3)>-1&&Ee.push(239,191,189);if(ve=null,j<128){if((F-=1)<0)break;Ee.push(j)}else if(j<2048){if((F-=2)<0)break;Ee.push(j>>6|192,j&63|128)}else if(j<65536){if((F-=3)<0)break;Ee.push(j>>12|224,j>>6&63|128,j&63|128)}else if(j<1114112){if((F-=4)<0)break;Ee.push(j>>18|240,j>>12&63|128,j>>6&63|128,j&63|128)}else throw new Error("Invalid code point")}return Ee}function Ft(X){const F=[];for(let j=0;j<X.length;++j)F.push(X.charCodeAt(j)&255);return F}function rn(X,F){let j,ae,ve;const Ee=[];for(let Ce=0;Ce<X.length&&!((F-=2)<0);++Ce)j=X.charCodeAt(Ce),ae=j>>8,ve=j%256,Ee.push(ve),Ee.push(ae);return Ee}function Zt(X){return N.toByteArray(Dt(X))}function Gt(X,F,j,ae){let ve;for(ve=0;ve<ae&&!(ve+j>=F.length||ve>=X.length);++ve)F[ve+j]=X[ve];return ve}function Ut(X,F){return X instanceof F||X!=null&&X.constructor!=null&&X.constructor.name!=null&&X.constructor.name===F.name}function jt(X){return X!==X}const dn=function(){const X="0123456789abcdef",F=new Array(256);for(let j=0;j<16;++j){const ae=j*16;for(let ve=0;ve<16;++ve)F[ae+ve]=X[j]+X[ve]}return F}();function Kt(X){return typeof BigInt>"u"?zt:X}function zt(){throw new Error("BigInt not supported")}}(buffer)),buffer}var toolsEbml={},hasRequiredToolsEbml;function requireToolsEbml(){if(hasRequiredToolsEbml)return toolsEbml;hasRequiredToolsEbml=1;var O=toolsEbml&&toolsEbml.__assign||function(){return O=Object.assign||function(f){for(var k,i=1,c=arguments.length;i<c;i++){k=arguments[i];for(var $ in k)Object.prototype.hasOwnProperty.call(k,$)&&(f[$]=k[$])}return f},O.apply(this,arguments)},N=toolsEbml&&toolsEbml.__spreadArray||function(f,k,i){if(i||arguments.length===2)for(var c=0,$=k.length,C;c<$;c++)(C||!(c in k))&&(C||(C=Array.prototype.slice.call(k,0,c)),C[c]=k[c]);return f.concat(C||Array.prototype.slice.call(k))};Object.defineProperty(toolsEbml,"__esModule",{value:!0});var I=requireTools(),D=function(){function f(){}return f.readVint=function(k,i){i===void 0&&(i=0);var c=8-Math.floor(Math.log2(k[i]));if(c>8){var $=f.readHexString(k,i,i+c);throw new Error("Unrepresentable length: ".concat(c," ").concat($))}if(i+c>k.length)return null;for(var C=k[i]&(1<<8-c)-1,M=1;M<c;M+=1){if(M===7&&C>=Math.pow(2,8)&&k[i+7]>0)return{length:c,value:-1};C*=Math.pow(2,8),C+=k[i+M]}return{length:c,value:C}},f.writeVint=function(k){if(k<0||k>Math.pow(2,53))throw new Error("Unrepresentable value: ".concat(k));var i=1;for(i=1;i<=8&&!(k<Math.pow(2,7*i)-1);i+=1);for(var c=I.Buffer.alloc(i),$=k,C=1;C<=i;C+=1){var M=$&255;c[i-C]=M,$-=M,$/=Math.pow(2,8)}return c[0]|=1<<8-i,c},f.concatenate=function(k,i){return!k&&!i?I.Buffer.from([]):!k||k.byteLength===0?i:!i||i.byteLength===0?k:I.Buffer.from(N(N([],k,!0),i,!0))},f.readHexString=function(k,i,c){return i===void 0&&(i=0),c===void 0&&(c=k.byteLength),Array.from(k.slice(i,c)).map(function($){return Number($).toString(16)}).reduce(function($,C){return"".concat($).concat(C.padStart(2,"0"))},"")},f.readUtf8=function(k){try{return I.Buffer.from(k).toString("utf8")}catch{return null}},f.readUnsigned=function(k){var i=new DataView(k.buffer,k.byteOffset,k.byteLength);switch(k.byteLength){case 1:return i.getUint8(0);case 2:return i.getUint16(0);case 4:return i.getUint32(0)}return k.byteLength<=6?k.reduce(function(c,$){return c*256+$},0):f.readHexString(k,0,k.byteLength)},f.readSigned=function(k){var i=new DataView(k.buffer,k.byteOffset,k.byteLength);switch(k.byteLength){case 1:return i.getInt8(0);case 2:return i.getInt16(0);case 4:return i.getInt32(0);default:return NaN}},f.readFloat=function(k){var i=new DataView(k.buffer,k.byteOffset,k.byteLength);switch(k.byteLength){case 4:return i.getFloat32(0);case 8:return i.getFloat64(0);default:return NaN}},f.readDate=function(k){var i=new DataView(k.buffer,k.byteOffset,k.byteLength);switch(k.byteLength){case 1:return new Date(i.getUint8(0));case 2:return new Date(i.getUint16(0));case 4:return new Date(i.getUint32(0));case 8:return new Date(Number.parseInt(f.readHexString(k),16));default:return new Date(0)}},f.readDataFromTag=function(k,i){var c=k.type,$=k.name,C=k.track,M=k.discardable||!1,Z=k.keyframe||!1,J=null,z;switch(c){case"u":z=f.readUnsigned(i);break;case"f":z=f.readFloat(i);break;case"i":z=f.readSigned(i);break;case"s":z=String.fromCharCode.apply(String,i);break;case"8":z=f.readUtf8(i);break;case"d":z=f.readDate(i);break}if($==="SimpleBlock"||$==="Block"){var Q=0,ee=f.readVint(i,Q),Y=ee.length,te=ee.value;Q+=Y,C=te,z=f.readSigned(i.subarray(Q,Q+2)),Q+=2,$==="SimpleBlock"&&(Z=!!(i[Y+2]&128),M=!!(i[Y+2]&1)),Q+=1,J=i.subarray(Q)}return O(O({},k),{data:i,discardable:M,keyframe:Z,payload:J,track:C,value:z})},f}();return toolsEbml.default=D,toolsEbml}var vint,hasRequiredVint;function requireVint(){return hasRequiredVint||(hasRequiredVint=1,vint=function(O,N,I){N=N||0;for(var D=1;D<=8&&!(O[N]>=Math.pow(2,8-D));D++);if(D>8)throw new Error("Unrepresentable length: "+D+" "+O.toString("hex",N,N+D));if(N+D>O.length)return null;var f,k=O[N]&(1<<8-D)-1;for(f=1;f<D;f++){if(f===7&&k>=Math.pow(2,45)&&O[N+7]>0)return{length:D,value:-1};k*=Math.pow(2,8),k+=O[N+f]}return I&&(k-=Math.pow(2,D*7-1)-1),{length:D,value:k}}),vint}var bufferReader,hasRequiredBufferReader;function requireBufferReader(){if(hasRequiredBufferReader)return bufferReader;hasRequiredBufferReader=1;var O=requireVint();function N(I){this.buffer=I,this.offset=0}return N.prototype.nextInt16BE=function(){var I=this.buffer.readInt16BE(this.offset);return this.offset+=2,I},N.prototype.nextUInt8=function(){var I=this.buffer.readUInt8(this.offset);return this.offset+=1,I},N.prototype.nextUIntV=function(){var I=O(this.buffer,this.offset);return this.offset+=I.length,I.value},N.prototype.nextIntV=function(){var I=O(this.buffer,this.offset,!0);return this.offset+=I.length,I.value},N.prototype.nextBuffer=function(I){var D=I?this.buffer.slice(this.offset,this.offset+I):this.buffer.slice(this.offset);return this.offset+=I||this.length,D},Object.defineProperty(N.prototype,"length",{get:function(){return this.buffer.length-this.offset}}),bufferReader=N,bufferReader}var ebmlBlock,hasRequiredEbmlBlock;function requireEbmlBlock(){if(hasRequiredEbmlBlock)return ebmlBlock;hasRequiredEbmlBlock=1;var O=requireBufferReader(),N=1,I=3,D=2;ebmlBlock=function(k){var i={},c=new O(k);i.trackNumber=c.nextUIntV(),i.timecode=c.nextInt16BE();var $=c.nextUInt8();i.invisible=!!($&8),i.keyframe=!!($&128),i.discardable=!!($&1);var C=($&6)>>1;return i.frames=f(c,C),i};function f(k,i){if(!i)return[k.nextBuffer()];var c,$,C=[],M=k.nextUInt8()+1;if(i===D){if(k.length%M!==0)throw new Error("Fixed-Size Lacing Error");for($=k.length/M,c=0;c<M;c++)C.push(k.nextBuffer($));return C}var Z=[];if(i===N)for(c=0;c<M-1;c++){var J;$=0;do J=k.nextUInt8(),$+=J;while(J===255);Z.push($)}else if(i===I)for($=k.nextUIntV(),Z.push($),c=1;c<M-1;c++)$+=k.nextIntV(),Z.push($);for(c=0;c<M-1;c++)C.push(k.nextBuffer(Z[c]));return C.push(k.nextBuffer()),C}return ebmlBlock}var hasRequiredTools;function requireTools(){return hasRequiredTools||(hasRequiredTools=1,function(O){Object.defineProperty(O,"__esModule",{value:!0}),O.convertEBMLDateToJSDate=O.createFloatBuffer=O.createIntBuffer=O.createUIntBuffer=O.encodeValueToBuffer=O.concat=O.putRefinedMetaData=O.extractElement=O.removeElement=O.makeMetadataSeekable=O.createRIFFChunk=O.VP8BitStreamToRiffWebPBuffer=O.WebPBlockFilter=O.encodeTag=O.readBlock=O.ebmlBlock=O.writeVint=O.readVint=O.Buffer=void 0;var N=requireInt64Buffer(),I=requireEBMLEncoder(),D=requireBuffer(),f=requireToolsEbml(),k=requireEbmlBlock();O.Buffer=D.Buffer,O.readVint=f.default.readVint,O.writeVint=f.default.writeVint,O.ebmlBlock=k;function i(fe){return(0,O.ebmlBlock)(new O.Buffer(fe))}O.readBlock=i;function c(fe,me,Re){return Re===void 0&&(Re=!1),re([fe,Re?new O.Buffer("01ffffffffffffff","hex"):(0,O.writeVint)(me.length),me])}O.encodeTag=c;function $(fe){return fe.reduce(function(me,Re){if(Re.type!=="b"||Re.name!=="SimpleBlock")return me;var Ue=(0,O.ebmlBlock)(Re.data),Pe=Ue.frames.some(function(De){var vt=De.slice(3,6).toString("hex");return vt==="9d012a"});return Pe?me.concat(Re):me},[])}O.WebPBlockFilter=$;function C(fe){var me=M("VP8 ",fe),Re=re([new O.Buffer("WEBP","ascii"),me]);return M("RIFF",Re)}O.VP8BitStreamToRiffWebPBuffer=C;function M(fe,me){var Re=new O.Buffer(4);return Re.writeUInt32LE(me.byteLength,0),re([new O.Buffer(fe.substr(0,4),"ascii"),Re,me,new O.Buffer(me.byteLength%2===0?0:1)])}O.createRIFFChunk=M;function Z(fe,me,Re){var Ue=z("EBML",fe),Pe=ee(Ue),De=Pe+12,vt=fe[fe.length-1].dataEnd-De,_t=z("Info",fe);J("Duration",_t),_t.splice(1,0,{name:"Duration",type:"f",data:he(me,8)});for(var St=ee(_t),Mt=z("Tracks",fe),At=ee(Mt),ct=47,Qe=[],Lt=5+Re.length*15,gt=[],Ae=-1,Ye=10,qt=function(et){var ut=ct,Tt=ut+St,Ct=Tt+At,Dt=Ct+Lt,Ht=Dt-vt;if(Qe=[],Qe.push({name:"SeekHead",type:"m",isEnd:!1}),Qe.push({name:"Seek",type:"m",isEnd:!1}),Qe.push({name:"SeekID",type:"b",data:new O.Buffer([21,73,169,102])}),Qe.push({name:"SeekPosition",type:"u",data:se(ut)}),Qe.push({name:"Seek",type:"m",isEnd:!0}),Qe.push({name:"Seek",type:"m",isEnd:!1}),Qe.push({name:"SeekID",type:"b",data:new O.Buffer([22,84,174,107])}),Qe.push({name:"SeekPosition",type:"u",data:se(Tt)}),Qe.push({name:"Seek",type:"m",isEnd:!0}),Qe.push({name:"Seek",type:"m",isEnd:!1}),Qe.push({name:"SeekID",type:"b",data:new O.Buffer([28,83,187,107])}),Qe.push({name:"SeekPosition",type:"u",data:se(Ct)}),Qe.push({name:"Seek",type:"m",isEnd:!0}),Qe.push({name:"SeekHead",type:"m",isEnd:!0}),ct=ee(Qe),gt=[],gt.push({name:"Cues",type:"m",isEnd:!1}),Re.forEach(function(Ft){var rn=Ft.CueTrack,Zt=Ft.CueClusterPosition,Gt=Ft.CueTime;gt.push({name:"CuePoint",type:"m",isEnd:!1}),gt.push({name:"CueTime",type:"u",data:se(Gt)}),gt.push({name:"CueTrackPositions",type:"m",isEnd:!1}),gt.push({name:"CueTrack",type:"u",data:se(rn)}),Zt-=De,Zt+=Ht,gt.push({name:"CueClusterPosition",type:"u",data:se(Zt)}),gt.push({name:"CueTrackPositions",type:"m",isEnd:!0}),gt.push({name:"CuePoint",type:"m",isEnd:!0})}),gt.push({name:"Cues",type:"m",isEnd:!0}),Lt=ee(gt),Ae!==Ht){if(Ae=Ht,et===Ye-1)throw new Error("Failed to converge to a stable metadata size")}else return"break"},Ot=0;Ot<Ye;Ot++){var Ke=qt(Ot);if(Ke==="break")break}var Ve=[].concat.apply([],[Ue,{name:"Segment",type:"m",isEnd:!1,unknownSize:!0},Qe,_t,Mt,gt]),Xe=new I.default().encode(Ve);return Xe}O.makeMetadataSeekable=Z;function J(fe,me){for(var Re=-1,Ue=0;Ue<me.length;Ue++){var Pe=me[Ue];if(Pe.name===fe)if(Pe.type==="m")if(!Pe.isEnd)Re=Ue;else{if(Re==-1)throw new Error("Detected ".concat(fe," closing element before finding the start"));me.splice(Re,Ue-Re+1);return}else{me.splice(Ue,1);return}}}O.removeElement=J;function z(fe,me){for(var Re=[],Ue=-1,Pe=0;Pe<me.length;Pe++){var De=me[Pe];if(De.name===fe)if(De.type==="m")if(!De.isEnd)Ue=Pe;else{if(Ue==-1)throw new Error("Detected ".concat(fe," closing element before finding the start"));Re=me.slice(Ue,Pe+1);break}else{Re.push(me[Pe]);break}}return Re}O.extractElement=z;function Q(fe,me){Array.isArray(me.cueInfos)&&!Array.isArray(me.cues)&&(console.warn("putRefinedMetaData: info.cueInfos property is deprecated. please use info.cues"),me.cues=me.cueInfos);for(var Re=[],Ue=[],Pe=0;Pe<fe.length;Pe++){var De=fe[Pe];if(De.type==="m"&&De.name==="Segment"){if(Re=fe.slice(0,Pe),Ue=fe.slice(Pe),De.unknownSize){Ue.shift();break}throw new Error("this metadata is not streaming webm file")}}if(!(Ue[Ue.length-1].dataEnd>0))throw new Error("metadata dataEnd has wrong number");var vt=Ue[Ue.length-1].dataEnd,_t=Re[Re.length-1].dataEnd,St=new I.default().encode(Re).byteLength,Mt=St-_t,At=vt-Ue[0].tagStart;Ue[0].tagStart-_t,Ue[0].tagStart;var ct=new O.Buffer([24,83,128,103]),Qe=new O.Buffer("01ffffffffffffff","hex"),Lt=ct.byteLength+Qe.byteLength,gt=At,Ae;for(Ae=1;Ae<20;Ae++){var Ye=_t+Lt+gt,qt=Ye-vt,Ot=Mt+qt,Ke=Y(Ue,Ot,me),Ve=new I.default().encode(Ke).byteLength;if(Ve===gt)return new I.default().encode([].concat(Re,[{type:"m",name:"Segment",isEnd:!1,unknownSize:!0}],Ke));gt=Ve}throw new Error("unable to refine metadata, stable size could not be found in "+Ae+" iterations!")}O.putRefinedMetaData=Q;function ee(fe){var me=new I.default;return fe.reduce(function(Re,Ue){return Re.concat(me.encode([Ue]))},[]).reduce(function(Re,Ue){return Re+Ue.byteLength},0)}function Y(fe,me,Re){var Ue=Re.duration,Pe=Re.clusterPtrs,De=Re.cues,vt=fe.slice(0);if(typeof Ue=="number"){var _t=!1;vt.forEach(function(Mt){Mt.type==="f"&&Mt.name==="Duration"&&(_t=!0,Mt.data=he(Ue,8))}),_t||ye(vt,"Info",[{name:"Duration",type:"f",data:he(Ue,8)}])}Array.isArray(De)&&ye(vt,"Cues",ie(De,me));var St=[];return Array.isArray(Pe)&&(console.warn("append cluster pointers to seekhead is deprecated. please use cues"),St=te(Pe,me)),ye(vt,"SeekHead",St,!0),vt}function te(fe,me){var Re=[];return fe.forEach(function(Ue){Re.push({name:"Seek",type:"m",isEnd:!1}),Re.push({name:"SeekID",type:"b",data:new O.Buffer([31,67,182,117])}),Re.push({name:"SeekPosition",type:"u",data:se(Ue+me)}),Re.push({name:"Seek",type:"m",isEnd:!0})}),Re}function ie(fe,me){var Re=[];return fe.forEach(function(Ue){var Pe=Ue.CueTrack,De=Ue.CueClusterPosition,vt=Ue.CueTime;Re.push({name:"CuePoint",type:"m",isEnd:!1}),Re.push({name:"CueTime",type:"u",data:se(vt)}),Re.push({name:"CueTrackPositions",type:"m",isEnd:!1}),Re.push({name:"CueTrack",type:"u",data:se(Pe)}),Re.push({name:"CueClusterPosition",type:"u",data:se(De+me)}),Re.push({name:"CueTrackPositions",type:"m",isEnd:!0}),Re.push({name:"CuePoint",type:"m",isEnd:!0})}),Re}function ye(fe,me,Re,Ue){Ue===void 0&&(Ue=!1);for(var Pe=-1,De=0;De<fe.length;De++){var vt=fe[De];if(vt.type==="m"&&vt.name===me&&vt.isEnd===!1){Pe=De;break}}Pe>=0?Array.prototype.splice.apply(fe,[Pe+1,0].concat(Re)):Ue?[].concat([{name:me,type:"m",isEnd:!1}],Re,[{name:me,type:"m",isEnd:!0}]).reverse().forEach(function(_t){fe.unshift(_t)}):(fe.push({name:me,type:"m",isEnd:!1}),Re.forEach(function(_t){fe.push(_t)}),fe.push({name:me,type:"m",isEnd:!0}))}function re(fe){return O.Buffer.concat(fe)}O.concat=re;function de(fe){var me=new O.Buffer(0);if(fe.type==="m")return fe;switch(fe.type){case"u":me=se(fe.value);break;case"i":me=ue(fe.value);break;case"f":me=he(fe.value);break;case"s":me=new O.Buffer(fe.value,"ascii");break;case"8":me=new O.Buffer(fe.value,"utf8");break;case"b":me=fe.value;break;case"d":me=new N.Int64BE(fe.value.getTime().toString()).toBuffer();break}return Object.assign({},fe,{data:me})}O.encodeValueToBuffer=de;function se(fe){for(var me=1;fe>=Math.pow(2,8*me);me++);if(me>=7)return console.warn("7bit or more bigger uint not supported."),new N.Uint64BE(fe).toBuffer();var Re=new O.Buffer(me);return Re.writeUIntBE(fe,0,me),Re}O.createUIntBuffer=se;function ue(fe){for(var me=1;fe>=Math.pow(2,8*me);me++);if(me>=7)return console.warn("7bit or more bigger uint not supported."),new N.Int64BE(fe).toBuffer();var Re=new O.Buffer(me);return Re.writeIntBE(fe,0,me),Re}O.createIntBuffer=ue;function he(fe,me){if(me===void 0&&(me=8),me===8){var Re=new O.Buffer(8);return Re.writeDoubleBE(fe,0),Re}else if(me===4){var Re=new O.Buffer(4);return Re.writeFloatBE(fe,0),Re}else throw new Error("float type bits must 4bytes or 8bytes")}O.createFloatBuffer=he;function we(fe){return fe instanceof Date?fe:new Date(new Date("2001-01-01T00:00:00.000Z").getTime()+Number(fe)/1e3/1e3)}O.convertEBMLDateToJSDate=we}(tools)),tools}var hasRequiredEBMLDecoder;function requireEBMLDecoder(){if(hasRequiredEBMLDecoder)return EBMLDecoder;hasRequiredEBMLDecoder=1,Object.defineProperty(EBMLDecoder,"__esModule",{value:!0});var O=requireInt64Buffer(),N=requireTools(),I=requireTools(),D=requireEbmlID(),f;(function(i){i[i.STATE_TAG=1]="STATE_TAG",i[i.STATE_SIZE=2]="STATE_SIZE",i[i.STATE_CONTENT=3]="STATE_CONTENT"})(f||(f={}));var k=function(){function i(){this._buffer=new N.Buffer(0),this._tag_stack=[],this._state=f.STATE_TAG,this._cursor=0,this._total=0,this._schema=D.byEbmlID,this._result=[]}return i.prototype.decode=function(c){this.readChunk(c);var $=this._result;return this._result=[],$},i.prototype.readChunk=function(c){for(this._buffer=I.concat([this._buffer,new N.Buffer(c)]);this._cursor<this._buffer.length&&!(this._state===f.STATE_TAG&&!this.readTag()||this._state===f.STATE_SIZE&&!this.readSize()||this._state===f.STATE_CONTENT&&!this.readContent()););},i.prototype.getSchemaInfo=function(c){return this._schema[c]||{name:"unknown",level:-1,type:"unknown",description:"unknown"}},i.prototype.readTag=function(){if(this._cursor>=this._buffer.length)return!1;var c=(0,N.readVint)(this._buffer,this._cursor);if(c==null)return!1;var $=this._buffer.slice(this._cursor,this._cursor+c.length),C=$.reduce(function(J,z,Q,ee){return J+z*Math.pow(16,2*(ee.length-1-Q))},0),M=this.getSchemaInfo(C),Z={EBML_ID:C.toString(16),schema:M,type:M.type,name:M.name,level:M.level,tagStart:this._total,tagEnd:this._total+c.length,sizeStart:this._total+c.length,sizeEnd:null,dataStart:null,dataEnd:null,dataSize:null,data:null};return this._tag_stack.push(Z),this._cursor+=c.length,this._total+=c.length,this._state=f.STATE_SIZE,!0},i.prototype.readSize=function(){if(this._cursor>=this._buffer.length)return!1;var c=(0,N.readVint)(this._buffer,this._cursor);if(c==null)return!1;var $=this._tag_stack[this._tag_stack.length-1];return $.sizeEnd=$.sizeStart+c.length,$.dataStart=$.sizeEnd,$.dataSize=c.value,c.value===-1?($.dataEnd=-1,$.type==="m"&&($.unknownSize=!0)):$.dataEnd=$.sizeEnd+c.value,this._cursor+=c.length,this._total+=c.length,this._state=f.STATE_CONTENT,!0},i.prototype.readContent=function(){var c=this._tag_stack[this._tag_stack.length-1];if(c.type==="m"){if(c.isEnd=!1,this._result.push(c),this._state=f.STATE_TAG,c.dataSize===0){var $=Object.assign({},c,{isEnd:!0});this._result.push($),this._tag_stack.pop()}return!0}if(this._buffer.length<this._cursor+c.dataSize)return!1;var C=this._buffer.slice(this._cursor,this._cursor+c.dataSize);switch(this._buffer=this._buffer.slice(this._cursor+c.dataSize),c.data=C,c.type){case"u":c.value=C.readUIntBE(0,C.length);break;case"i":c.value=C.readIntBE(0,C.length);break;case"f":c.value=c.dataSize===4?C.readFloatBE(0):c.dataSize===8?C.readDoubleBE(0):(console.warn("cannot read ".concat(c.dataSize," octets float. failback to 0")),0);break;case"s":c.value=C.toString("ascii");break;case"8":c.value=C.toString("utf8");break;case"b":c.value=C;break;case"d":c.value=(0,N.convertEBMLDateToJSDate)(new O.Int64BE(C).toNumber());break}if(c.value===null)throw new Error("unknown tag type:"+c.type);for(this._result.push(c),this._total+=c.dataSize,this._state=f.STATE_TAG,this._cursor=0,this._tag_stack.pop();this._tag_stack.length>0;){var M=this._tag_stack[this._tag_stack.length-1];if(M.dataEnd<0)return this._tag_stack.pop(),!0;if(this._total<M.dataEnd)break;if(M.type!=="m")throw new Error("parent element is not master element");var $=Object.assign({},M,{isEnd:!0});this._result.push($),this._tag_stack.pop()}return!0},i}();return EBMLDecoder.default=k,EBMLDecoder}var EBMLReader={},events={exports:{}},hasRequiredEvents;function requireEvents(){if(hasRequiredEvents)return events.exports;hasRequiredEvents=1;var O=typeof Reflect=="object"?Reflect:null,N=O&&typeof O.apply=="function"?O.apply:function(de,se,ue){return Function.prototype.apply.call(de,se,ue)},I;O&&typeof O.ownKeys=="function"?I=O.ownKeys:Object.getOwnPropertySymbols?I=function(de){return Object.getOwnPropertyNames(de).concat(Object.getOwnPropertySymbols(de))}:I=function(de){return Object.getOwnPropertyNames(de)};function D(re){console&&console.warn&&console.warn(re)}var f=Number.isNaN||function(de){return de!==de};function k(){k.init.call(this)}events.exports=k,events.exports.once=te,k.EventEmitter=k,k.prototype._events=void 0,k.prototype._eventsCount=0,k.prototype._maxListeners=void 0;var i=10;function c(re){if(typeof re!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof re)}Object.defineProperty(k,"defaultMaxListeners",{enumerable:!0,get:function(){return i},set:function(re){if(typeof re!="number"||re<0||f(re))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+re+".");i=re}}),k.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},k.prototype.setMaxListeners=function(de){if(typeof de!="number"||de<0||f(de))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+de+".");return this._maxListeners=de,this};function $(re){return re._maxListeners===void 0?k.defaultMaxListeners:re._maxListeners}k.prototype.getMaxListeners=function(){return $(this)},k.prototype.emit=function(de){for(var se=[],ue=1;ue<arguments.length;ue++)se.push(arguments[ue]);var he=de==="error",we=this._events;if(we!==void 0)he=he&&we.error===void 0;else if(!he)return!1;if(he){var fe;if(se.length>0&&(fe=se[0]),fe instanceof Error)throw fe;var me=new Error("Unhandled error."+(fe?" ("+fe.message+")":""));throw me.context=fe,me}var Re=we[de];if(Re===void 0)return!1;if(typeof Re=="function")N(Re,this,se);else for(var Ue=Re.length,Pe=Q(Re,Ue),ue=0;ue<Ue;++ue)N(Pe[ue],this,se);return!0};function C(re,de,se,ue){var he,we,fe;if(c(se),we=re._events,we===void 0?(we=re._events=Object.create(null),re._eventsCount=0):(we.newListener!==void 0&&(re.emit("newListener",de,se.listener?se.listener:se),we=re._events),fe=we[de]),fe===void 0)fe=we[de]=se,++re._eventsCount;else if(typeof fe=="function"?fe=we[de]=ue?[se,fe]:[fe,se]:ue?fe.unshift(se):fe.push(se),he=$(re),he>0&&fe.length>he&&!fe.warned){fe.warned=!0;var me=new Error("Possible EventEmitter memory leak detected. "+fe.length+" "+String(de)+" listeners added. Use emitter.setMaxListeners() to increase limit");me.name="MaxListenersExceededWarning",me.emitter=re,me.type=de,me.count=fe.length,D(me)}return re}k.prototype.addListener=function(de,se){return C(this,de,se,!1)},k.prototype.on=k.prototype.addListener,k.prototype.prependListener=function(de,se){return C(this,de,se,!0)};function M(){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 Z(re,de,se){var ue={fired:!1,wrapFn:void 0,target:re,type:de,listener:se},he=M.bind(ue);return he.listener=se,ue.wrapFn=he,he}k.prototype.once=function(de,se){return c(se),this.on(de,Z(this,de,se)),this},k.prototype.prependOnceListener=function(de,se){return c(se),this.prependListener(de,Z(this,de,se)),this},k.prototype.removeListener=function(de,se){var ue,he,we,fe,me;if(c(se),he=this._events,he===void 0)return this;if(ue=he[de],ue===void 0)return this;if(ue===se||ue.listener===se)--this._eventsCount===0?this._events=Object.create(null):(delete he[de],he.removeListener&&this.emit("removeListener",de,ue.listener||se));else if(typeof ue!="function"){for(we=-1,fe=ue.length-1;fe>=0;fe--)if(ue[fe]===se||ue[fe].listener===se){me=ue[fe].listener,we=fe;break}if(we<0)return this;we===0?ue.shift():ee(ue,we),ue.length===1&&(he[de]=ue[0]),he.removeListener!==void 0&&this.emit("removeListener",de,me||se)}return this},k.prototype.off=k.prototype.removeListener,k.prototype.removeAllListeners=function(de){var se,ue,he;if(ue=this._events,ue===void 0)return this;if(ue.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):ue[de]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete ue[de]),this;if(arguments.length===0){var we=Object.keys(ue),fe;for(he=0;he<we.length;++he)fe=we[he],fe!=="removeListener"&&this.removeAllListeners(fe);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(se=ue[de],typeof se=="function")this.removeListener(de,se);else if(se!==void 0)for(he=se.length-1;he>=0;he--)this.removeListener(de,se[he]);return this};function J(re,de,se){var ue=re._events;if(ue===void 0)return[];var he=ue[de];return he===void 0?[]:typeof he=="function"?se?[he.listener||he]:[he]:se?Y(he):Q(he,he.length)}k.prototype.listeners=function(de){return J(this,de,!0)},k.prototype.rawListeners=function(de){return J(this,de,!1)},k.listenerCount=function(re,de){return typeof re.listenerCount=="function"?re.listenerCount(de):z.call(re,de)},k.prototype.listenerCount=z;function z(re){var de=this._events;if(de!==void 0){var se=de[re];if(typeof se=="function")return 1;if(se!==void 0)return se.length}return 0}k.prototype.eventNames=function(){return this._eventsCount>0?I(this._events):[]};function Q(re,de){for(var se=new Array(de),ue=0;ue<de;++ue)se[ue]=re[ue];return se}function ee(re,de){for(;de+1<re.length;de++)re[de]=re[de+1];re.pop()}function Y(re){for(var de=new Array(re.length),se=0;se<de.length;++se)de[se]=re[se].listener||re[se];return de}function te(re,de){return new Promise(function(se,ue){function he(fe){re.removeListener(de,we),ue(fe)}function we(){typeof re.removeListener=="function"&&re.removeListener("error",he),se([].slice.call(arguments))}ye(re,de,we,{once:!0}),de!=="error"&&ie(re,he,{once:!0})})}function ie(re,de,se){typeof re.on=="function"&&ye(re,"error",de,se)}function ye(re,de,se,ue){if(typeof re.on=="function")ue.once?re.once(de,se):re.on(de,se);else if(typeof re.addEventListener=="function")re.addEventListener(de,function he(we){ue.once&&re.removeEventListener(de,he),se(we)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof re)}return events.exports}var hasRequiredEBMLReader;function requireEBMLReader(){if(hasRequiredEBMLReader)return EBMLReader;hasRequiredEBMLReader=1;var O=EBMLReader&&EBMLReader.__extends||function(){var f=function(k,i){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,$){c.__proto__=$}||function(c,$){for(var C in $)Object.prototype.hasOwnProperty.call($,C)&&(c[C]=$[C])},f(k,i)};return function(k,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");f(k,i);function c(){this.constructor=k}k.prototype=i===null?Object.create(i):(c.prototype=i.prototype,new c)}}();Object.defineProperty(EBMLReader,"__esModule",{value:!0});var N=requireEvents(),I=requireTools(),D=function(f){O(k,f);function k(){var i=f.call(this)||this;return i.logGroup="",i.hasLoggingStarted=!1,i.metadataloaded=!1,i.chunks=[],i.stack=[],i.segmentOffset=0,i.last2SimpleBlockVideoTrackTimecode=[0,0],i.last2SimpleBlockAudioTrackTimecode=[0,0],i.lastClusterTimecode=0,i.lastClusterPosition=0,i.timecodeScale=1e6,i.metadataSize=0,i.metadatas=[],i.cues=[],i.firstVideoBlockRead=!1,i.firstAudioBlockRead=!1,i.currentTrack={TrackNumber:-1,TrackType:-1,DefaultDuration:null,CodecDelay:null},i.trackTypes=[],i.trackDefaultDuration=[],i.trackCodecDelay=[],i.trackInfo={type:"nothing"},i.ended=!1,i.logging=!1,i.use_duration_every_simpleblock=!1,i.use_webp=!1,i.use_segment_info=!0,i.drop_default_duration=!0,i}return k.prototype.stop=function(){for(this.ended=!0,this.emit_segment_info();this.stack.length;)this.stack.pop(),this.logging&&console.groupEnd();this.logging&&this.hasLoggingStarted&&this.logGroup&&console.groupEnd()},k.prototype.emit_segment_info=function(){var i=this.chunks;if(this.chunks=[],this.metadataloaded){if(!this.use_segment_info)return;var C=this.lastClusterTimecode,M=this.duration,Z=this.timecodeScale;this.emit("cluster",{timecode:C,data:i}),this.emit("duration",{timecodeScale:Z,duration:M})}else{this.metadataloaded=!0,this.metadatas=i;var c=this.trackTypes.indexOf(1),$=this.trackTypes.indexOf(2);if(this.trackInfo=c>=0&&$>=0?{type:"both",trackNumber:c}:c>=0?{type:"video",trackNumber:c}:$>=0?{type:"audio",trackNumber:$}:{type:"nothing"},!this.use_segment_info)return;this.emit("metadata",{data:i,metadataSize:this.metadataSize})}},k.prototype.read=function(i){var c=this,$=!1;if(!this.ended){if(i.type==="m")if(i.isEnd)this.stack.pop();else{var C=this.stack[this.stack.length-1];if(C!=null&&C.level>=i.level){this.stack.pop(),this.logging&&console.groupEnd(),C.dataEnd=i.dataEnd,C.dataSize=i.dataEnd-C.dataStart,C.unknownSize=!1;var M=Object.assign({},C,{name:C.name,type:C.type,isEnd:!0});this.chunks.push(M)}this.stack.push(i)}if(i.type==="m"&&i.name=="Segment")this.segmentOffset!=0&&console.warn("Multiple segments detected!"),this.segmentOffset=i.dataStart,this.emit("segment_offset",this.segmentOffset);else if(i.type==="b"&&i.name==="SimpleBlock"){var Z=I.ebmlBlock(i.data),J=Z.timecode,z=Z.trackNumber,Q=Z.frames;if(this.trackTypes[z]===1){if(!this.firstVideoBlockRead&&(this.firstVideoBlockRead=!0,this.trackInfo.type==="both"||this.trackInfo.type==="video")){var ee=this.lastClusterTimecode+J;this.cues.push({CueTrack:z,CueClusterPosition:this.lastClusterPosition,CueTime:ee}),this.emit("cue_info",{CueTrack:z,CueClusterPosition:this.lastClusterPosition,CueTime:this.lastClusterTimecode}),this.emit("cue",{CueTrack:z,CueClusterPosition:this.lastClusterPosition,CueTime:ee})}this.last2SimpleBlockVideoTrackTimecode=[this.last2SimpleBlockVideoTrackTimecode[1],J]}else if(this.trackTypes[z]===2){if(!this.firstAudioBlockRead&&(this.firstAudioBlockRead=!0,this.trackInfo.type==="audio")){var ee=this.lastClusterTimecode+J;this.cues.push({CueTrack:z,CueClusterPosition:this.lastClusterPosition,CueTime:ee}),this.emit("cue_info",{CueTrack:z,CueClusterPosition:this.lastClusterPosition,CueTime:this.lastClusterTimecode}),this.emit("cue",{CueTrack:z,CueClusterPosition:this.lastClusterPosition,CueTime:ee})}this.last2SimpleBlockAudioTrackTimecode=[this.last2SimpleBlockAudioTrackTimecode[1],J]}this.use_duration_every_simpleblock&&this.emit("duration",{timecodeScale:this.timecodeScale,duration:this.duration}),this.use_webp&&Q.forEach(function(Y){var te=Y.slice(3,6).toString("hex");if(te==="9d012a"){var ie=I.VP8BitStreamToRiffWebPBuffer(Y),ye=new Blob([ie],{type:"image/webp"}),re=c.duration;c.emit("webp",{currentTime:re,webp:ye})}})}else i.type==="m"&&i.name==="Cluster"&&i.isEnd===!1?(this.firstVideoBlockRead=!1,this.firstAudioBlockRead=!1,this.emit_segment_info(),this.emit("cluster_ptr",i.tagStart),this.lastClusterPosition=i.tagStart):i.type==="u"&&i.name==="Timecode"?this.lastClusterTimecode=i.value:i.type==="u"&&i.name==="TimecodeScale"?this.timecodeScale=i.value:i.type==="m"&&i.name==="TrackEntry"?i.isEnd?(this.trackTypes[this.currentTrack.TrackNumber]=this.currentTrack.TrackType,this.trackDefaultDuration[this.currentTrack.TrackNumber]=this.currentTrack.DefaultDuration,this.trackCodecDelay[this.currentTrack.TrackNumber]=this.currentTrack.CodecDelay):this.currentTrack={TrackNumber:-1,TrackType:-1,DefaultDuration:null,CodecDelay:null}:i.type==="u"&&i.name==="TrackType"?this.currentTrack.TrackType=i.value:i.type==="u"&&i.name==="TrackNumber"?this.currentTrack.TrackNumber=i.value:i.type==="u"&&i.name==="CodecDelay"?this.currentTrack.CodecDelay=i.value:i.type==="u"&&i.name==="DefaultDuration"?this.drop_default_duration?(console.warn("DefaultDuration detected!, remove it"),$=!0):this.currentTrack.DefaultDuration=i.value:i.name==="unknown"&&console.warn(i);!this.metadataloaded&&i.dataEnd>0&&(this.metadataSize=i.dataEnd),$||this.chunks.push(i),this.logging&&this.put(i)}},Object.defineProperty(k.prototype,"duration",{get:function(){if(this.trackInfo.type==="nothing")return console.warn("no video, no audio track"),0;var i=0,c=0,$=0,C=this.trackDefaultDuration[this.trackInfo.trackNumber];if(typeof C=="number")i=C;else if(this.trackInfo.type==="both")if(this.last2SimpleBlockAudioTrackTimecode[1]>this.last2SimpleBlockVideoTrackTimecode[1]){i=(this.last2SimpleBlockAudioTrackTimecode[1]-this.last2SimpleBlockAudioTrackTimecode[0])*this.timecodeScale;var M=this.trackCodecDelay[this.trackTypes.indexOf(2)];typeof M=="number"&&(c=M),$=this.last2SimpleBlockAudioTrackTimecode[1]}else{i=(this.last2SimpleBlockVideoTrackTimecode[1]-this.last2SimpleBlockVideoTrackTimecode[0])*this.timecodeScale;var M=this.trackCodecDelay[this.trackTypes.indexOf(1)];typeof M=="number"&&(c=M),$=this.last2SimpleBlockVideoTrackTimecode[1]}else if(this.trackInfo.type==="video"){i=(this.last2SimpleBlockVideoTrackTimecode[1]-this.last2SimpleBlockVideoTrackTimecode[0])*this.timecodeScale;var M=this.trackCodecDelay[this.trackInfo.trackNumber];typeof M=="number"&&(c=M),$=this.last2SimpleBlockVideoTrackTimecode[1]}else if(this.trackInfo.type==="audio"){i=(this.last2SimpleBlockAudioTrackTimecode[1]-this.last2SimpleBlockAudioTrackTimecode[0])*this.timecodeScale;var M=this.trackCodecDelay[this.trackInfo.trackNumber];typeof M=="number"&&(c=M),$=this.last2SimpleBlockAudioTrackTimecode[1]}var Z=(this.lastClusterTimecode+$)*this.timecodeScale+i-c,J=Z/this.timecodeScale;return Math.floor(J)},enumerable:!1,configurable:!0}),k.prototype.addListener=function(i,c){return f.prototype.addListener.call(this,i,c)},k.prototype.put=function(i){this.hasLoggingStarted||(this.hasLoggingStarted=!0,this.logging&&this.logGroup&&console.groupCollapsed(this.logGroup)),i.type==="m"?i.isEnd?console.groupEnd():console.group(i.name+":"+i.tagStart):i.type==="b"?console.log(i.name,i.type):console.log(i.name,i.tagStart,i.type,i.value)},k}(N.EventEmitter);return EBMLReader.default=D,EBMLReader}var hasRequiredEbml;function requireEbml(){return hasRequiredEbml||(hasRequiredEbml=1,function(O){var N=ebml&&ebml.__createBinding||(Object.create?function(c,$,C,M){M===void 0&&(M=C),Object.defineProperty(c,M,{enumerable:!0,get:function(){return $[C]}})}:function(c,$,C,M){M===void 0&&(M=C),c[M]=$[C]}),I=ebml&&ebml.__exportStar||function(c,$){for(var C in c)C!=="default"&&!Object.prototype.hasOwnProperty.call($,C)&&N($,c,C)};Object.defineProperty(O,"__esModule",{value:!0}),O.tools=O.Reader=O.Encoder=O.Decoder=void 0,I(requireEBML(),O);var D=requireEBMLDecoder();O.Decoder=D.default;var f=requireEBMLEncoder();O.Encoder=f.default;var k=requireEBMLReader();O.Reader=k.default;var i=requireTools();O.tools=i}(ebml)),ebml}var hasRequiredLib;function requireLib(){if(hasRequiredLib)return lib;hasRequiredLib=1;var O=lib&&lib.__awaiter||function(f,k,i,c){function $(C){return C instanceof i?C:new i(function(M){M(C)})}return new(i||(i=Promise))(function(C,M){function Z(Q){try{z(c.next(Q))}catch(ee){M(ee)}}function J(Q){try{z(c.throw(Q))}catch(ee){M(ee)}}function z(Q){Q.done?C(Q.value):$(Q.value).then(Z,J)}z((c=c.apply(f,k||[])).next())})},N=lib&&lib.__generator||function(f,k){var i={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},c,$,C,M;return M={next:Z(0),throw:Z(1),return:Z(2)},typeof Symbol=="function"&&(M[Symbol.iterator]=function(){return this}),M;function Z(z){return function(Q){return J([z,Q])}}function J(z){if(c)throw new TypeError("Generator is already executing.");for(;i;)try{if(c=1,$&&(C=z[0]&2?$.return:z[0]?$.throw||((C=$.return)&&C.call($),0):$.next)&&!(C=C.call($,z[1])).done)return C;switch($=0,C&&(z=[z[0]&2,C.value]),z[0]){case 0:case 1:C=z;break;case 4:return i.label++,{value:z[1],done:!1};case 5:i.label++,$=z[1],z=[0];continue;case 7:z=i.ops.pop(),i.trys.pop();continue;default:if(C=i.trys,!(C=C.length>0&&C[C.length-1])&&(z[0]===6||z[0]===2)){i=0;continue}if(z[0]===3&&(!C||z[1]>C[0]&&z[1]<C[3])){i.label=z[1];break}if(z[0]===6&&i.label<C[1]){i.label=C[1],C=z;break}if(C&&i.label<C[2]){i.label=C[2],i.ops.push(z);break}C[2]&&i.ops.pop(),i.trys.pop();continue}z=k.call(f,i)}catch(Q){z=[6,Q],$=0}finally{c=C=0}if(z[0]&5)throw z[1];return{value:z[0]?z[1]:void 0,done:!0}}};Object.defineProperty(lib,"__esModule",{value:!0});var I=requireEbml();function D(f){return O(this,void 0,void 0,function(){var k,i,c,$,C,M,Z,J,z,Q,ee,Y;return N(this,function(te){switch(te.label){case 0:if(!f)throw Error("call to fixWebmDuration requires a blob");k=new I.Decoder,i=new I.Reader,c=f.stream(),$=c.getReader(),te.label=1;case 1:return[4,$.read()];case 2:return C=te.sent(),M=C.done,Z=C.value,M?(i.stop(),[3,3]):(J=k.decode(Z),J=J==null?void 0:J.filter(function(ie){return ie.type!=="unknown"}),J.forEach(function(ie){i.read(ie)}),Z=null,[3,1]);case 3:return z=I.tools.makeMetadataSeekable(i.metadatas,i.duration,i.cues),Q=new Blob([z],{type:f.type}),ee=f.slice(i.metadataSize),Y=new Blob([Q,ee],{type:f.type}),[2,Y]}})})}return lib.default=D,lib}var libExports=requireLib();const fixWebmDuration=getDefaultExportFromCjs(libExports);class StreamRecorder{constructor(){Ge(this,Wt);Ge(this,cn,!1);Ge(this,an,!1);Ge(this,gn,0);Ge(this,kn,0);Ge(this,Xt,0);Ge(this,tn,0);Ge(this,ln,0);_e(this,"onchange",N=>{});_e(this,"onDurationChange",N=>{});_e(this,"start",async(N="")=>{N||(N=`video_Record_${E(Date.now())}`);let I=[];return navigator.mediaDevices.getDisplayMedia({audio:!0,video:!0}).then(D=>{const f=D.getTracks();for(const i of f)i.onended=()=>this.stop();kt(this,cn,!0),kt(this,an,!1),kt(this,Wt,new MediaRecorder(D)),Oe(this,Wt).start();const k=new Date().getTime();kt(this,gn,k),kt(this,Xt,k),Oe(this,un).call(this),Oe(this,Sn).call(this),Oe(this,Wt).addEventListener("dataavailable",i=>{I.push(i.data)}),Oe(this,Wt).addEventListener("stop",async()=>{kt(this,cn,!1);const i=new Date().getTime();kt(this,kn,i),kt(this,tn,Oe(this,tn)+(i-Oe(this,Xt))),Oe(this,un).call(this),clearInterval(Oe(this,ln));const c=D.getTracks();for(const J of c)J.stop();if(Oe(this,Wt)===null)return;const $=new Blob(I,{type:Oe(this,Wt).mimeType}),C=await fixWebmDuration($),M=URL.createObjectURL(C),Z=document.createElement("a");Z.href=M,Z.download=`${N}.mp4`,Z.click(),URL.revokeObjectURL(M),I=[],kt(this,Wt,null)})})});_e(this,"pause",async()=>{var I;await new Promise(D=>setTimeout(()=>D(!0),300)),(I=Oe(this,Wt))==null||I.pause(),kt(this,an,!0);const N=new Date().getTime();kt(this,tn,Oe(this,tn)+(N-Oe(this,Xt))),Oe(this,un).call(this),clearInterval(Oe(this,ln))});_e(this,"resume",async()=>{var I;(I=Oe(this,Wt))==null||I.resume(),kt(this,an,!1);const N=new Date().getTime();kt(this,Xt,N),Oe(this,un).call(this),Oe(this,Sn).call(this)});_e(this,"stop",async()=>{var N;(N=Oe(this,Wt))==null||N.stop()});_e(this,"getDuration",()=>{if(Oe(this,Xt)===0)return 0;let N=Oe(this,tn);const I=new Date().getTime();if(Oe(this,cn)&&Oe(this,an)===!1){const D=I-Oe(this,Xt);kt(this,Xt,I),N=N+D}return N});_e(this,"getInfo",()=>({active:Oe(this,cn),pause:Oe(this,an),startTime:Oe(this,gn),endTime:Oe(this,kn),duration:Oe(this,tn)}));Ge(this,un,()=>{const N=this.getInfo();this.onchange(N)});Ge(this,Sn,()=>{clearInterval(Oe(this,ln)),kt(this,ln,window.setInterval(()=>{kt(this,tn,this.getDuration()),this.onDurationChange(Oe(this,tn))},500))})}}Wt=new WeakMap,cn=new WeakMap,an=new WeakMap,gn=new WeakMap,kn=new WeakMap,Xt=new WeakMap,tn=new WeakMap,ln=new WeakMap,un=new WeakMap,Sn=new WeakMap;var l=Object.defineProperty,y=O=>{throw TypeError(O)},q=(O,N,I)=>N in O?l(O,N,{enumerable:!0,configurable:!0,writable:!0,value:I}):O[N]=I,s=(O,N,I)=>q(O,typeof N!="symbol"?N+"":N,I),P=(O,N,I)=>N.has(O)||y("Cannot "+I),n=(O,N,I)=>(P(O,N,"read from private field"),I?I.call(O):N.get(O)),a=(O,N,I)=>N.has(O)?y("Cannot add the same private member more than once"):N instanceof WeakSet?N.add(O):N.set(O,I),d,x,u;class p{constructor(N={}){s(this,"queue",[]),s(this,"timer",0),s(this,"activeIndex",0),s(this,"activePromise"),s(this,"options",{timeout:0}),s(this,"add",(I,D={})=>new Promise(async(f,k)=>{const i=D.timeout||this.options.timeout,c=D.key||n(this,d).call(this),$=D.describe||"";if(this.queue.findIndex(M=>M.key===c)!==-1)return k(`${c} is exist.`);const C={key:c,func:I,describe:$,timeout:i,resolve:f,reject:k};this.queue.unshift(C),this.activePromise||n(this,u).call(this)})),s(this,"clear",()=>{this.queue=[],clearTimeout(this.timer)}),a(this,d,()=>(this.activeIndex=this.activeIndex+1,`${this.activeIndex}`)),a(this,x,I=>{const D=this.queue.findIndex(f=>f.key===I);this.queue.splice(D,1)}),a(this,u,async()=>{const I=this.queue.length;if(I===0)return;const D=I-1,f=this.queue[D];this.activePromise=f;const{key:k,func:i,resolve:c,reject:$,timeout:C}=this.activePromise;C&&(this.timer=window.setTimeout(()=>{$(`pr-async-queue: ${k} is timeout.`),n(this,u).call(this)},C)),await i().then(c).catch($).finally(()=>{clearTimeout(this.timer),this.activePromise=void 0,n(this,x).call(this,k),n(this,u).call(this)})}),this.options={timeout:0,...N}}}d=new WeakMap,x=new WeakMap,u=new WeakMap;class RoomBase{constructor(N){_e(this,"options",{appid:"",sdkToken:"",roomId:"",userId:"",earlyId:"",callType:0,debug:!1,reportErr:!0,logUrl:"https://logs1.quickvo.org",newPublishAutoSubscribe:!0});_e(this,"sdk_service_version","1.0.6");_e(this,"prohibitNotify",!1);_e(this,"isEarly",!1);_e(this,"isInRoom",!1);_e(this,"asyncQueue");_e(this,"roomState","ready");_e(this,"createAt",Date.now());_e(this,"cwsIns");_e(this,"peerIns");_e(this,"transceiverMap",new Map);_e(this,"sendChannel");_e(this,"receiveChannel");_e(this,"userMap",new Map);_e(this,"setLocalStreamActiveMap",new Map);_e(this,"phoneyStreams",new Map);_e(this,"recorder",new StreamRecorder);_e(this,"networkQualityTester",new NetworkQualityTester);_e(this,"mediaDevicesErrInfo",{microphoneCamera_audio:"",microphoneCamera_video:"",screenSharing_video:"",screenSharing_audio:""});_e(this,"reportLogs",(N,I="未知错误")=>{const{appid:D,userId:f,earlyId:k="",logUrl:i,reportErr:c}=this.options;if(!c)return;const $="web",C=M=>({ws_c_timeout:0,webrtc_c_timeout:1,join_room_error:2,publish_error:3,subscribe_error:4,close_track_error:5,heartbeat_e_timeout:6,heartbeat_i_timeout:7,quit_room_error:8})[M].toString();{const M=C(N),Z={origin:$,type:M,app_id:D,user_id:f,ins_id:k,desc:I},J=btoa(encodeURI(JSON.stringify(Z))),z=`${i}/upload/log?log_key=${J}`;{const Q=localStorage.getItem("#quickvo.logs")||JSON.stringify([]),Y=new TextEncoder().encode(Q),te=pako.deflate(Y,{gzip:!0});this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: reportLogs",{obj:Z,url:z,size:lt(te.byteLength)}),fetch(z,{headers:{"Content-Type":"multipart/form-data"},method:"POST",body:te})}}});_e(this,"initPhoneyStreams",(N,I=[])=>{I.length===0&&(I=mediaType_keys);for(const D of I){const f=this.phoneyStreams.get(D);if(f){const k=f.getTracks();for(const i of k)i.stop()}switch(D){case"microphoneCamera_audio":this.phoneyStreams.set("microphoneCamera_audio",createMutedAudioStream(N));break;case"microphoneCamera_video":this.phoneyStreams.set("microphoneCamera_video",createFakeVideoStream());break;case"screenSharing_audio":this.phoneyStreams.set("screenSharing_audio",createMutedAudioStream(N));break;case"screenSharing_video":this.phoneyStreams.set("screenSharing_video",createFakeVideoStream());break}}});_e(this,"getPhoneyStreams",N=>this.phoneyStreams.get(N));_e(this,"getRoomInfo",()=>{const{options:N,roomState:I,createAt:D}=this;return{...N,roomState:I,createAt:D}});_e(this,"setRoomState",N=>{this.roomState=N;const I=enum_roomState[N],D={state:N,stateStr:I};this.cwsIns.emitNotify("onRoomState",{code:200,data:D,desc:"room state is change."})});_e(this,"setOptions",async N=>{const I={...this.options,...N};this.options=I});_e(this,"stopStream",async N=>{const I=N.getTracks();for(const D of I)D.stop()});_e(this,"getMediaDevicesErrInfo",async()=>{try{const N=await navigator.mediaDevices.enumerateDevices();N.find(D=>D.kind==="audioinput")||(this.mediaDevicesErrInfo.microphoneCamera_audio="audioinput is not available."),N.find(D=>D.kind==="videoinput")||(this.mediaDevicesErrInfo.microphoneCamera_video="videoinput is not available.")}catch(N){this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: getMediaDevicesErrInfo is error.",N)}return this.mediaDevicesErrInfo});_e(this,"getUserMediaKey",(N,I)=>`${N}-${I}`);_e(this,"getCallAction",async N=>{let I="";const D=k=>N.findIndex(({type:c,enabled:$=!0})=>c===k&&$)===-1?"0":"1";return I=`${D(0)}${I}`,I=`${D(1)}${I}`,I=`${D(2)}${I}`,I=`${D(3)}${I}`,parseInt(I,2)});_e(this,"getCallActionMap",(N=0)=>{const D=Number(N).toString(2).padStart(4,"0").split(""),[f,k,i,c]=D;return{microphoneCamera_audio:!!Number(c),microphoneCamera_video:!!Number(i),screenSharing_video:!!Number(k),screenSharing_audio:!!Number(f)}});_e(this,"getBanBehaviorMap",(N=0)=>{const D=Number(N).toString(2).padStart(4,"0").split(""),[f,k,i,c]=D;return{microphoneCamera_audio:!!Number(c),microphoneCamera_video:!!Number(i),screenSharing_video:!!Number(k),screenSharing_audio:!!Number(f)}});_e(this,"getAverageVolume",(N,I)=>{N.getByteFrequencyData(I);let D=0;for(let k=0;k<I.length;k++)D+=I[k];return Math.ceil(D/I.length)});_e(this,"getTrackNamesFormTracks",(N,I=[],D="trackName")=>{const f=[];for(const k of N){const{type:i}=k;if(I.length===0||I.includes(i)){const c=k[D];c&&f.push(`${c}`)}}return f});_e(this,"usersFilter",N=>dt(N,["id","isSelf","isOwner","joinTime","tracks","network","permissions","isPublished","updateStreams","callAction","callActionStr","callActionMap","banBehavior","banBehaviorStr","banBehaviorMap"]).sort((f,k)=>f.id.localeCompare(k.id,"en")));this.setOptions(N),this.cwsIns=new CallsWebSocket({...N}),this.asyncQueue=new p}}var m=Object.defineProperty,G=(O,N,I)=>N in O?m(O,N,{enumerable:!0,configurable:!0,writable:!0,value:I}):O[N]=I,e$1=(O,N,I)=>G(O,typeof N!="symbol"?N+"":N,I);class g{constructor(N,I){e$1(this,"inputStream",new MediaStream),e$1(this,"outputStream",new MediaStream),e$1(this,"inputGain",1),e$1(this,"enhanceGain",1),e$1(this,"bgsGain",1),e$1(this,"bgmGain",1),e$1(this,"outputGain",1),e$1(this,"mixAudioMap",new Map),e$1(this,"audioContext",new AudioContext),e$1(this,"sourceNode"),e$1(this,"inputGainNode"),e$1(this,"enhanceGainNode"),e$1(this,"bgsGainNode"),e$1(this,"bgmGainNode"),e$1(this,"analyserNode"),e$1(this,"analyserArrayData"),e$1(this,"outputGainNode"),e$1(this,"destinationNode"),e$1(this,"filterStream",D=>D),e$1(this,"stop",()=>{{const D=this.inputStream.getTracks();for(const f of D)f.stop(),this.inputStream.removeTrack(f)}}),e$1(this,"getStream",()=>this.filterStream(this.outputStream)),e$1(this,"setMute",(D=!0)=>{D?this.analyserNode.disconnect(this.outputGainNode):this.analyserNode.connect(this.outputGainNode)}),e$1(this,"setInputGain",D=>{this.inputGain=D,this.inputGainNode.gain.setValueAtTime(D,this.audioContext.currentTime)}),e$1(this,"setEnhanceGain",async D=>{this.enhanceGain=D+1,this.enhanceGainNode.gain.setValueAtTime(this.enhanceGain,this.audioContext.currentTime)}),e$1(this,"setBgsGain",D=>{this.bgsGain=D,this.bgsGainNode.gain.setValueAtTime(D,this.audioContext.currentTime)}),e$1(this,"setBgmGain",D=>{this.bgmGain=D,this.bgmGainNode.gain.setValueAtTime(D,this.audioContext.currentTime)}),e$1(this,"setOutputGain",D=>{this.outputGain=D,this.outputGainNode.gain.setValueAtTime(this.outputGain,this.audioContext.currentTime)}),e$1(this,"getVolume",()=>{const{analyserNode:D,analyserArrayData:f}=this;D.getByteFrequencyData(f);let k=0;for(let i=0;i<f.length;i++)k+=f[i];return Math.ceil(k/f.length)}),e$1(this,"mixAudio",(D,f="bgm")=>new Promise(async(k,i)=>{try{{const C=this.mixAudioMap.get(f);C&&C.stop()}const c=f==="bgs"?this.bgsGainNode:this.bgmGainNode,$=this.audioContext.createBufferSource();this.mixAudioMap.set(f,$),$.buffer=D,$.connect(c),$.onended=()=>{$.disconnect(c),this.mixAudioMap.delete(f),k(!0)},$.start(0)}catch(c){i(c)}})),e$1(this,"mixAudioStop",D=>{const f=this.mixAudioMap.get(D);f==null||f.stop()}),e$1(this,"changeMix",(D,f)=>{const k=D==="bgs"?this.bgsGainNode:this.bgmGainNode;f?k.connect(this.destinationNode):k.disconnect(this.destinationNode)}),I&&(this.audioContext=I),this.inputStream=N,this.sourceNode=this.audioContext.createMediaStreamSource(this.inputStream),this.inputGainNode=this.audioContext.createGain(),this.inputGainNode.gain.setValueAtTime(this.inputGain,this.audioContext.currentTime),this.enhanceGainNode=this.audioContext.createGain(),this.enhanceGainNode.gain.setValueAtTime(this.enhanceGain,this.audioContext.currentTime),this.bgsGainNode=this.audioContext.createGain(),this.bgsGainNode.gain.setValueAtTime(this.bgsGain,this.audioContext.currentTime),this.bgmGainNode=this.audioContext.createGain(),this.bgmGainNode.gain.setValueAtTime(this.bgmGain,this.audioContext.currentTime),this.analyserNode=this.audioContext.createAnalyser(),this.analyserNode.fftSize=512,this.analyserArrayData=new Uint8Array(this.analyserNode.frequencyBinCount),this.outputGainNode=this.audioContext.createGain(),this.outputGainNode.gain.setValueAtTime(this.outputGain,this.audioContext.currentTime),this.destinationNode=this.audioContext.createMediaStreamDestination(),this.outputStream=this.destinationNode.stream;{const{sourceNode:D,inputGainNode:f,enhanceGainNode:k,bgsGainNode:i,bgmGainNode:c,analyserNode:$,outputGainNode:C,destinationNode:M}=this;D.connect(f),f.connect(k),k.connect($),i.connect($),c.connect($),k.connect(M),i.connect(M),c.connect(M),$.connect(C),C.connect(this.audioContext.destination)}this.setMute(!0),this.audioContext.resume()}}class RoomMedias extends RoomBase{constructor(I){super(I);Ge(this,pn,[]);Ge(this,Vt,new Map);Ge(this,Nt,new Map);Ge(this,en,new Map);Ge(this,nn,new Map);Ge(this,sn,new Map);_e(this,"localStreamsActionMap",new Map);Ge(this,mn,new Map);_e(this,"audioContext",new(window.AudioContext||window.webkitAudioContext));_e(this,"initMediaPhoneyStreams",(I=[])=>this.initPhoneyStreams(this.audioContext,I));_e(this,"initLocalStreamsFilter",()=>{for(const I of mediaType_keys){const D=async f=>f;Oe(this,mn).set(I,D)}});_e(this,"setLocalFilterStream",(I,D)=>{Oe(this,mn).set(I,D)});Ge(this,Nn,()=>{Oe(this,Nt).set("microphoneCamera_audio",{autoGainControl:!0,echoCancellation:!0,noiseSuppression:!0}),Oe(this,Nt).set("microphoneCamera_video",{frameRate:{min:10,ideal:30}}),Oe(this,Nt).set("screenSharing_video",{frameRate:{min:10,ideal:30}}),Oe(this,Nt).set("screenSharing_audio",{autoGainControl:!0,echoCancellation:!0,noiseSuppression:!0})});Ge(this,Mn,()=>{Oe(this,Vt).set("audioinput","default"),Oe(this,Vt).set("videoinput","default"),Oe(this,Vt).set("audiooutput","default")});_e(this,"emitNotifyUpdateUsersStreams",async I=>{this.cwsIns.emitNotify("onRoomUsersStreams",{code:200,data:I,desc:"users streams is change."})});_e(this,"initUserMediaStreamContext",async(I,D,f)=>{const[k]=f.getTracks();if(!k){console.warn("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: tracks.length is 0.",{userId:I,mediaType:D,stream:f});return}this.removeUserMediaStreamContext(I,D);const i=this.getUserMediaKey(I,D),{kind:c}=k;switch(c){case"audio":{const $=new MediaStream;$.addTrack(k);const C=new g($,this.audioContext);Oe(this,en).set(i,C)}break;case"video":{const $=new VideoMediaContext(k);Oe(this,nn).set(i,$)}break}});_e(this,"getUserMediaStreamContext",(I,D)=>{const f=this.getUserMediaKey(I,D);if(["microphoneCamera_audio","screenSharing_audio"].includes(D))return Oe(this,en).get(f);if(["microphoneCamera_video","screenSharing_video"].includes(D))return Oe(this,nn).get(f)});_e(this,"getUserAudioMediaStreamContext",(I,D)=>{const f=this.getUserMediaKey(I,D);return Oe(this,en).get(f)});_e(this,"removeUserMediaStreamContext",(I,D)=>{const f=this.getUserMediaKey(I,D);if(["microphoneCamera_audio","screenSharing_audio"].includes(D)){const k=Oe(this,en).get(f);return k==null||k.stop(),Oe(this,en).delete(f)}if(["microphoneCamera_video","screenSharing_video"].includes(D)){const k=Oe(this,nn).get(f);return k==null||k.stop(),Oe(this,nn).get(f)}});_e(this,"getUserStream",(I,D)=>{const f=this.getUserMediaStreamContext(I,D);return(f==null?void 0:f.getStream())||new MediaStream});_e(this,"getUserStreams",(I,D=[])=>{D.length===0&&(D=mediaType_keys);const f={};for(const k of D){const i=this.getUserStream(I,k);f[k]=i}return f});_e(this,"removeUserStreams",async(I,D=[])=>{D.length===0&&(D=mediaType_keys);for(const f of D)this.removeUserMediaStreamContext(I,f)});_e(this,"clearUserStreams",()=>{{const I=Oe(this,en).values();for(const D of I)D.stop();kt(this,en,new Map)}{const I=Oe(this,nn).values();for(const D of I)D.stop();kt(this,nn,new Map)}});_e(this,"setMediaTrackConstraints",async(I,D)=>{Oe(this,Nt).set(I,D);const f=await this.getLocalStream(I);if(!f)return;const k=f.getTracks();if(k.length!==0)for(const i of k){const c=i.getConstraints(),C={...Oe(this,Nt).get(I),...c,...D};await i.applyConstraints(C)}});_e(this,"stopLocalStreams",async(I=[])=>{I.length===0&&(I=mediaType_keys);for(const D of I){const f=Oe(this,sn).get(D);f&&await this.stopStream(f),Oe(this,sn).delete(D)}});_e(this,"addLocalStream",(I,D)=>{const f=Oe(this,sn).get(I);f&&this.stopStream(f),Oe(this,sn).set(I,D)});_e(this,"initLocalStream",async I=>{switch(I){case"microphoneCamera_audio":{const D=Oe(this,Vt).get("audioinput"),f=Oe(this,Nt).get("microphoneCamera_audio"),k=await navigator.mediaDevices.getUserMedia({audio:{deviceId:D,...f},video:!1});this.addLocalStream("microphoneCamera_audio",k)}break;case"microphoneCamera_video":{const D=Oe(this,Vt).get("videoinput"),f=Oe(this,Nt).get("microphoneCamera_video"),k=await navigator.mediaDevices.getUserMedia({audio:!1,video:{deviceId:D,...f}});this.addLocalStream("microphoneCamera_video",k)}break;case"microphoneCamera":{const D=Oe(this,Vt).get("audioinput"),f=Oe(this,Vt).get("videoinput"),k=Oe(this,Nt).get("microphoneCamera_audio"),i=Oe(this,Nt).get("microphoneCamera_video"),$=(await navigator.mediaDevices.getUserMedia({audio:{deviceId:D,...k},video:{deviceId:f,...i}})).getTracks();for(const C of $){const{kind:M}=C;if(M==="audio"){const Z=new MediaStream;Z.addTrack(C),this.addLocalStream("microphoneCamera_audio",Z)}if(M==="video"){const Z=new MediaStream;Z.addTrack(C),this.addLocalStream("microphoneCamera_video",Z)}}}break;case"screenSharing_audio":{const D=Oe(this,Nt).get("screenSharing_audio"),k=(await navigator.mediaDevices.getDisplayMedia({audio:!0,video:!0,...D})).getTracks();for(const i of k){const{kind:c}=i;if(c==="audio"){const $=new MediaStream;$.addTrack(i),this.addLocalStream("screenSharing_audio",$)}}}break;case"screenSharing_video":{const D=Oe(this,Nt).get(I),k=(await navigator.mediaDevices.getDisplayMedia({audio:!1,video:!0,...D})).getTracks();for(const i of k){const{kind:c}=i;if(c==="video"){const $=new MediaStream;$.addTrack(i),this.addLocalStream("screenSharing_video",$)}}}break;case"screenSharing":{const D=Oe(this,Nt).get("screenSharing_audio"),f=Oe(this,Nt).get("screenSharing_video"),i=(await navigator.mediaDevices.getDisplayMedia({audio:!0,video:!0,...D,...f})).getTracks();for(const c of i){const{kind:$}=c;if($==="audio"){const C=new MediaStream;C.addTrack(c),this.addLocalStream("screenSharing_audio",C)}if($==="video"){const C=new MediaStream;C.addTrack(c),this.addLocalStream("screenSharing_video",C)}}}break}});_e(this,"getLocalStream",async I=>{const D=Oe(this,sn).get(I),f=Oe(this,mn).get(I);let k=D;return D&&f&&(k=await f(D)),k});_e(this,"getLocalStreams",async(I=[])=>{I.length===0&&(I=mediaType_keys);const D={};for(const f of I)D[f]=await this.getLocalStream(f);return D});Ge(this,yn,async()=>!navigator.mediaDevices||!navigator.mediaDevices.enumerateDevices?(console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: 不支持 enumerateDevices"),[]):(await navigator.mediaDevices.enumerateDevices().then(I=>{const D=I.filter(f=>!["communications"].includes(f.deviceId));kt(this,pn,D.sort((f,k)=>f.label.localeCompare(k.label,"zh-Hans-CN",{sensitivity:"accent"})))}).catch(function(I){console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: getEnumerateDevices is err",I)}),Oe(this,pn)));Ge(this,qn,()=>{navigator.mediaDevices&&(navigator.mediaDevices.ondevicechange=async()=>{await Oe(this,yn).call(this),this.cwsIns.emitNotify("onDevicechange",{code:200,data:{},desc:"device is change."})}),Oe(this,yn).call(this)});_e(this,"getMediaDeviceKind",I=>Oe(this,Vt).get(I));_e(this,"changeAudiooutput",async()=>{try{const I=Oe(this,Vt).get("audiooutput");await this.audioContext.setSinkId(I)}catch(I){console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: setSinkId is error.",I)}});_e(this,"setDeviceKind",(I,D)=>{Oe(this,Vt).set(I,D)});_e(this,"setAudioOutputDevice",I=>this.setDeviceKind("audiooutput",I));_e(this,"getEnumerateDevices",async I=>(await Oe(this,yn).call(this),Oe(this,pn).filter(f=>f.kind===I)));_e(this,"getEnumerateAudioinputDevices",()=>this.getEnumerateDevices("audioinput"));_e(this,"getEnumerateAudioOutputDevices",()=>this.getEnumerateDevices("audiooutput"));_e(this,"getEnumerateVideoinputDevices",()=>this.getEnumerateDevices("videoinput"));Oe(this,qn).call(this),Oe(this,Mn).call(this),Oe(this,Nn).call(this),this.initPhoneyStreams(this.audioContext),document.addEventListener("click",()=>{var D;((D=this.audioContext)==null?void 0:D.state)==="suspended"&&this.audioContext.resume()})}}pn=new WeakMap,Vt=new WeakMap,Nt=new WeakMap,en=new WeakMap,nn=new WeakMap,sn=new WeakMap,mn=new WeakMap,Nn=new WeakMap,Mn=new WeakMap,yn=new WeakMap,qn=new WeakMap;class RoomUsers extends RoomMedias{constructor(I){super(I);_e(this,"getMaxVolumeUser",()=>{const I=Array.from(this.userMap.values(),({id:f})=>f);if(I.length===0)return;let D=[];for(const f of I){const k=this.getUserAudioMediaStreamContext(f,"microphoneCamera_audio");if(!k)continue;const i=k.getVolume();D.push({id:f,volume:i})}return D=D.sort((f,k)=>f.volume-k.volume>0?-1:1),D[0]});_e(this,"setVolume",(I,D,f)=>{const k=this.getUserAudioMediaStreamContext(I,D);k==null||k.setInputGain(f)});_e(this,"setEnhanceGain",async(I,D,f)=>{const k=this.getUserAudioMediaStreamContext(I,D);k==null||k.setEnhanceGain(f)});_e(this,"setSpeaker",(I,D,f)=>{const k=this.getUserAudioMediaStreamContext(I,D);k==null||k.setOutputGain(f);const i=f===0;k==null||k.setMute(i)});_e(this,"playBgs",(I,D,f)=>{const k=this.getUserAudioMediaStreamContext(I,D);return k==null?void 0:k.mixAudio(f,"bgs")});_e(this,"setBgsGain",(I,D,f)=>{const k=this.getUserAudioMediaStreamContext(I,D);k==null||k.setBgsGain(f)});_e(this,"stopBgs",(I,D)=>{const f=this.getUserAudioMediaStreamContext(I,D);f==null||f.mixAudioStop("bgs")});_e(this,"playBgm",(I,D,f)=>{const k=this.getUserAudioMediaStreamContext(I,D);return k==null?void 0:k.mixAudio(f,"bgm")});_e(this,"setBgmGain",(I,D,f)=>{const k=this.getUserAudioMediaStreamContext(I,D);k==null||k.setBgmGain(f)});_e(this,"stopBgm",(I,D)=>{const f=this.getUserAudioMediaStreamContext(I,D);f==null||f.mixAudioStop("bgm")});_e(this,"changBgsMix",(I,D,f)=>{const k=this.getUserAudioMediaStreamContext(I,D);k==null||k.changeMix("bgs",f)});_e(this,"changBgmMix",(I,D,f)=>{const k=this.getUserAudioMediaStreamContext(I,D);k==null||k.changeMix("bgm",f)});_e(this,"getVolume",(I,D)=>{const f=this.getUserAudioMediaStreamContext(I,D);return f==null?void 0:f.getVolume()});_e(this,"clearUsers",()=>{this.userMap=new Map});_e(this,"removeUsers",async I=>{for(const D of I)this.userMap.delete(D),await this.removeUserStreams(D)});_e(this,"createUser",async I=>{const D=Date.now(),f={id:I,permissions:0,callAction:0,callActionStr:"",callActionMap:{microphoneCamera_audio:!1,microphoneCamera_video:!1,screenSharing_video:!1,screenSharing_audio:!1},banBehavior:0,banBehaviorStr:"",banBehaviorMap:{microphoneCamera_audio:!1,microphoneCamera_video:!1,screenSharing_video:!1,screenSharing_audio:!1},callState:0,isOwner:this.userMap.size===0,isSelf:I===this.options.userId,isPublished:!1,joinTime:D,updateAt:D,network:{egress:0,ingress:0},tracks:[],channels:[],updateStreams:{microphoneCamera_audio:!1,microphoneCamera_video:!1,screenSharing_video:!1,screenSharing_audio:!1}};this.userMap.set(I,f)});_e(this,"getUser",async I=>(this.userMap.has(I)||await this.createUser(I),this.userMap.get(I)));_e(this,"getUsers",async(I=[])=>{I.length===0&&(I=[...this.userMap.keys()]);const D=[];for(const f of I){const k=await this.getUser(f);D.push(k)}return D});_e(this,"getAllUserTrackMids",async()=>{const I=await this.getUsers(),D=[];for(const f of I){const{tracks:k=[]}=f;for(const i of k)D.push(i.mid)}return D});_e(this,"getUserTrackByTrackName",async I=>{const D=await this.getUsers(),f=[];for(const k of D){const{tracks:i=[]}=k;for(const c of i){const{trackName:$}=c;I.includes($)&&f.push(c)}}return f});_e(this,"getUserTrackFromMid",async I=>{const D=await this.getUsers();let f;for(const k of D){const{tracks:i=[]}=k;for(const c of i)if(c.mid===I){f=c;break}}return f});_e(this,"checkUserInRoom",I=>this.userMap.has(I));_e(this,"getUsersId",async()=>[...this.userMap.keys()]);_e(this,"getSelfInfo",async()=>await this.getUser(this.options.userId));_e(this,"updateIsPublished",async(I,D=!1)=>{const f=await this.getUser(I);f.isPublished=D});_e(this,"setUserUpdateStreams",async(I,D,f=!0)=>{const k=await this.getUser(I),i={microphoneCamera_audio:!1,microphoneCamera_video:!1,screenSharing_video:!1,screenSharing_audio:!1};i[D]=f,k.updateStreams=i});_e(this,"updateUserChannels",async(I,D=[],f)=>{const k=await this.getUser(I);f&&(D=[...k.channels,...D]),k.channels=D});_e(this,"updateUsertracks",async(I,D=[],f)=>{const k=await this.getUser(I);f&&(D=[...k.tracks,...D]),D=D.filter(({mid:$=""})=>$!==""),D=pt(D,["type"]),D=D.sort(($,C)=>$.type-C.type<0?-1:1);for(const $ of D)$.userId=I,$.mediaType=mediaType_keys[$.type],$.enabled===void 0&&($.enabled=!0);k.updateStreams={microphoneCamera_audio:!1,microphoneCamera_video:!1,screenSharing_video:!1,screenSharing_audio:!1};const i=dt(k.tracks,["mediaType","enabled","mid","msid","trackName"]),c=dt(D,["mediaType","enabled","mid","msid","trackName"]);{const $="microphoneCamera_audio",C=c.find(J=>J.mediaType===$),M=i.find(J=>J.mediaType===$),Z=JSON.stringify(C)!==JSON.stringify(M);k.updateStreams[$]=Z}{const $="microphoneCamera_video",C=c.find(J=>J.mediaType===$),M=i.find(J=>J.mediaType===$),Z=JSON.stringify(C)!==JSON.stringify(M);k.updateStreams[$]=Z}{const $="screenSharing_audio",C=c.find(J=>J.mediaType===$),M=i.find(J=>J.mediaType===$),Z=JSON.stringify(C)!==JSON.stringify(M);k.updateStreams[$]=Z}{const $="screenSharing_video",C=c.find(J=>J.mediaType===$),M=i.find(J=>J.mediaType===$),Z=JSON.stringify(C)!==JSON.stringify(M);k.updateStreams[$]=Z}k.tracks=D});_e(this,"updateUserCallAction",async(I,D=0)=>{const f=await this.getUser(I);f.callAction=D,f.callActionStr=D.toString(2).padStart(4,"0"),f.callActionMap=this.getCallActionMap(D)});_e(this,"updateUserBehaviors",async(I,D=0)=>{const f=await this.getUser(I);f.banBehavior=D,f.banBehaviorStr=D.toString(2).padStart(4,"0"),f.banBehaviorMap=this.getBanBehaviorMap(D)});_e(this,"updateUserNetwork",async(I,D={egress:5,ingress:5})=>{const f=await this.getUser(I);f.network=D});_e(this,"updateUserPermissions",async(I,D)=>{if(D){const f=await this.getUser(I);f.permissions=D}});_e(this,"updateUserBase",async I=>{const D=await this.getUser(I);D.isSelf=I===this.options.userId,D.updateAt=Date.now()});_e(this,"updateUsers",async I=>{for(const D of I){const{id:f,tracks:k,callAction:i,permissions:c,isPublished:$}=D;await this.updateUserBase(f),await this.updateIsPublished(f,$),await this.updateUserPermissions(f,c),await this.updateUsertracks(f,k,!0),await this.updateUserCallAction(f,i),await this.updateUserNetwork(f)}});_e(this,"emitNotifyUpdateUser",async I=>{const D=await this.getUsers([I]),[f]=this.usersFilter(D);this.cwsIns.emitNotify("onRoomUser",{code:200,data:f,desc:"user info is change."})});_e(this,"emitNotifyUpdateUsers",async()=>{const I=await this.getUsers(),D=this.usersFilter(I);this.cwsIns.emitNotify("onRoomUsers",{code:200,data:D,desc:"all users info is change."})})}}const t=(O,N=4294967295,I=79764919)=>{const D=new Int32Array(256);let f,k,i,c=N;for(f=0;f<256;f++){for(i=f<<24,k=8;k>0;--k)i=2147483648&i?i<<1^I:i<<1;D[f]=i}for(f=0;f<O.length;f++)c=c<<8^D[255&(c>>24^O[f])];return c},e=(O,N=t)=>{const I=Y=>new Uint8Array(Y.length/2).map((te,ie)=>parseInt(Y.substring(2*ie,2*(ie+1)),16)),D=Y=>I(Y)[0],f=new Map;[,8364,,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,,381,,,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,,382,376].forEach((Y,te)=>f.set(Y,te));const k=new Uint8Array(O.length);let i,c,$,C=!1,M=0,Z=42,J=O.length>13&&O.substring(0,9)==="dynEncode",z=0;J&&(z=11,c=D(O.substring(9,z)),c<=1&&(z+=2,Z=D(O.substring(11,z))),c===1&&(z+=8,$=(Y=>new DataView(I(Y).buffer).getInt32(0,!0))(O.substring(13,z))));const Q=256-Z;for(let Y=z;Y<O.length;Y++)if(i=O.charCodeAt(Y),i!==61||C){if(i===92&&Y<O.length-5&&J){const te=O.charCodeAt(Y+1);te!==117&&te!==85||(i=parseInt(O.substring(Y+2,Y+6),16),Y+=5)}if(i>255){const te=f.get(i);te&&(i=te+127)}C&&(C=!1,i-=64),k[M++]=i<Z&&i>0?i+Q:i-Z}else C=!0;const ee=k.subarray(0,M);if(J&&c===1){const Y=N(ee);if(Y!==$){const te="Decode failed crc32 validation";throw console.error("`simple-yenc`\n",te+`
14
+ `,"Expected: "+$+"; Got: "+Y+`
15
+ `,"Visit https://github.com/eshaz/simple-yenc for more information"),Error(te)}}return ee};function WASMAudioDecoderCommon(){const O=Uint8Array,N=Float32Array;WASMAudioDecoderCommon.modules||Object.defineProperties(WASMAudioDecoderCommon,{modules:{value:new WeakMap},setModule:{value(I,D){WASMAudioDecoderCommon.modules.set(I,Promise.resolve(D))}},getModule:{value(I,D){let f=WASMAudioDecoderCommon.modules.get(I);return f||(D?f=WebAssembly.compile(e(D)):(D=I.wasm,f=WASMAudioDecoderCommon.inflateDynEncodeString(D).then(k=>WebAssembly.compile(k))),WASMAudioDecoderCommon.modules.set(I,f)),f}},concatFloat32:{value(I,D){let f=new N(D),k=0,i=0;for(;k<I.length;)f.set(I[k],i),i+=I[k++].length;return f}},getDecodedAudio:{value:(I,D,f,k,i)=>({errors:I,channelData:D,samplesDecoded:f,sampleRate:k,bitDepth:i})},getDecodedAudioMultiChannel:{value(I,D,f,k,i,c){let $=[],C,M;for(C=0;C<f;C++){const Z=[];for(M=0;M<D.length;)Z.push(D[M++][C]||[]);$.push(WASMAudioDecoderCommon.concatFloat32(Z,k))}return WASMAudioDecoderCommon.getDecodedAudio(I,$,k,i,c)}},inflateDynEncodeString:{value(I){return I=e(I),new Promise(D=>{const f=String.raw`dynEncode012804c7886d(‰›•)((()>+ˆ*§§)§ˆ,§§§§)§ˆ+§§§)§+.-()(*)-+)(ˆ.7*§)i¸¸,3§(i¸¸,3/G+.••—š¡*(,˜ŽŽ(,3‡‡‰˜‡Š‰›+)2å:-œ),§H(P*DI*H(P*@I++hH)H*r,hH(H(P*<J,i)’^*<H,H(P*4’U((I-H(H*i0’J,^*DH+H-H*œšI+H,I*4)33H(H*H)“^*DH(H+H)^*@H+i§H)œi§›™3æ*).§K(iH“I/+§H,iHn,§H+i(H+i(rCJ0I,H*I-+hH,,hH(H-V)(i)œ’J.H.W)(i)’c)(H,i)“I,H-i*’I-4)33i(I.*hH(V)(H+n5(H(i*’I-i(I,i)I.+hH,i*’J+iHn,hi(I-i*I,+hH,H/’H-c)(H,iFn,hi(I,+hH,H0n5-H*V)(J(,hH/H(i)œ’J(H(V)(J(i)’c)(H)H(i)œ’H,c)(3H*i*’I*H,i)’I,4(3(-H(H,’W)(H-’I-H,i*’I,4)3(3(3H,H-’I1H+I,H.i)œH1V)(“J.i(v5(33H.-H(H,’i(c)(H,i*’I,4)333–)-§i*I*+§H*iHn,hiž73H,H(i)8(H+šJ+H)P*(H*’V)(J-“r,§H)P*,H.i)œ’H+H,“i)œ’V)(-H*i*’I*H+i)œI+H-H.’I.H,H-’i)œI,4)333Ã+)-§iø7i(^*(iü7I,*h+hH+iDn,h*hilI+i)I,+hH+,hH+iô7’H,c)(i)H+i´8’W)(œH,’I,H+i*’I+4)-+hH(H)8*J-i(p5.*h*h*hH-i')u,hH(P*(J+,hH(P*0J,H(P*,n50H+H,’H-b((3H(P*0i)’I.4)3H-i¨*n5*H-iÅ*s,hiž73H-i)œJ+V)&+I,H(H+V)æ,8(I.H(H*8*J-i(p51H-i)œJ+i¸7’V)(H(H+iø7’V)(8(’J/H(P*0J+s,hi73H+H,H.’J,’I.H(P*(m5(H.H(P*,s5.+hH,m5*H(P*(J.H+’H.H+H/“’U((b((H(H(P*0i)’J+^*0H,i)“I,4(3(3H(H.^*03H-i¨*o5)33i(73(3(3-H,H+i)žc)(H,i*’I,H+i)’I+4)33i)I-3H-3!2)0§K(i2“J,L(H,H(^*(H,H*^*4H,i(^*0H,i(^*DH,j(_*<H,H)P*(^*,H,H+P*(^*8*h*h+hH,i)8(I3i§I**h*h*h*h*h*h*hH,i*8(6+(),03H,j(_*@i*I-H,P*<J.i,’J(H,P*8J/s50H,H.i+’J0^*<i¦I*H.H,P*4J1’J.U(*H.U((J2›i')o5/H.U()I.H,H(^*<H0H1’U((H.i0œJ.i§›i0ži')™o5/H/H.H2šJ*H(’J.q50H,P*0J/H*’I-H,P*(J0,hH,P*,H-q,hi)I-423+hH*m5+H/H0’H(H1’U((b((H/i)’I/H(i)’I(H*i)“I*4(3(3H,H.^*<H,H-^*04*3iØ1U((5+i(I(i¨7i1^*(i$6iè1^*(i°7iè6^*(i¬7iÈ6^*(+hH(iÈ*n,hiÈ*I(+hH(i¨,n,hi¨,I(+hH(iØ,n,hiØ,I(+hH(iè,o,hH,i-’H(’i0c)(H(i*’I(4)33iè1i1H,i-’iÈ*8)Bi(I(+hH(ido,hH,i-’H(’i-c)(H(i*’I(4)33iÈ6iè6H,i-’iF8)BiØ1i)b((41-H,i-’H(’i/c)(H(i*’I(4)3(3(-H,i-’H(’i1c)(H(i*’I(4)3(3(-H,i-’H(’i0c)(H(i*’I(4)3(3(3H,H/^*0H,H(^*<3i(I*4*3H,H,i¸)’^*TH,H,iø-’^*PH,H,iX’^*LH,H,i(’^*HH,i-8(I(H,i-8(I-i¥I*H,i,8(I.H(iErH-iErš5)H(i©*’I1H-i)’I0i(i;H.i,’J(i(H(i(rCJ(“J*H*i;sCI*i¨1I-H(I/+hH/,hH,i-’H-V)(i)œ’H,i+8(c)(H/i)“I/H-i*’I-H*i)’I*4)-H(i)œi¨1’I/+hH(H*o,hH,i-’H/V)(i)œ’i(c)(H/i*’I/H(i)’I(4)33i¤I*H,iø-’H,i¸)’H,i-’i;8)5+H0H1’I2i(I-+hH-H2p,hH,H,iP’8*J*i(p5-H*i7u,hH,i-’H-i)œ’H*c)(H-i)’I-4*3i(I/i+I.i+I(*h*h*hH*i8“6*(*)3H-m,hi£I*403H-i)œH,’W)-I/i*I(4)3i3I.i/I(3H2H,H(8(H.’J(H-’J.p,hi¢I*4.3H,i-’H-i)œ’I*+hH(,hH*H/c)(H*i*’I*H(i)“I(4)-H.I-4+3(3(33H,W)1m,hiŸI*4,3H,iø-’H,i¸)’H,i-’H18)J(,hi¡I*H(i(p5,H1H,V)ú-H,V)ø-’o5,3H,i(’H,iX’H,i-’H1i)œ’H08)J(,hi I*H(i(p5,H0H,V)šH,V)˜’o5,3H,H,iP’H,iH’8+I*4+3(3(3H,i$6i¬78+I*3H*H3šm5(3i)I-H*i(r5)3H)H,P*0^*(H+H,P*<^*(H*I-3H,i2’L(H-33Á)+(i¨03b+(,(-(.(/(0(1(2(3(5(7(9(;(?(C(G(K(S([(c(k({(‹(›(«(Ë(ë( (*)(iø03O)()()()(*(*(*(*(+(+(+(+(,(,(,(,(-(-(-(-(i¨13M8(9(:(((0(/(1(.(2(-(3(,(4(+(5(*(6()(7(T7œ‰šœ‡Ž‰œš›*S7•œ‰Š”U”—Љ”›S0›‘–U œ`;WASMAudioDecoderCommon.getModule(WASMAudioDecoderCommon,f).then(k=>WebAssembly.instantiate(k,{})).then(({exports:k})=>{const i=new Map(Object.entries(k)),c=i.get("puff"),$=i.get("memory").buffer,C=new O($),M=new DataView($);let Z=i.get("__heap_base");const J=I.length,z=Z;Z+=4,M.setInt32(z,J,!0);const Q=Z;Z+=J,C.set(I,Q);const ee=Z;Z+=4,M.setInt32(ee,C.byteLength-Z,!0),c(Z,ee,Q,z),D(C.slice(Z,Z+M.getInt32(ee,!0)))})})}}}),Object.defineProperty(this,"wasm",{enumerable:!0,get:()=>this._wasm}),this.getOutputChannels=(I,D,f)=>{let k=[],i=0;for(;i<D;)k.push(I.slice(i*f,i++*f+f));return k},this.allocateTypedArray=(I,D,f=!0)=>{const k=this._wasm.malloc(D.BYTES_PER_ELEMENT*I);return f&&this._pointers.add(k),{ptr:k,len:I,buf:new D(this._wasm.HEAP,k,I)}},this.free=()=>{this._pointers.forEach(I=>{this._wasm.free(I)}),this._pointers.clear()},this.codeToString=I=>{const D=[],f=new Uint8Array(this._wasm.HEAP);for(let k=f[I];k!==0;k=f[++I])D.push(k);return String.fromCharCode.apply(null,D)},this.addError=(I,D,f,k,i,c)=>{I.push({message:D,frameLength:f,frameNumber:k,inputBytes:i,outputSamples:c})},this.instantiate=(I,D)=>(D&&WASMAudioDecoderCommon.setModule(I,D),this._wasm=new I(WASMAudioDecoderCommon).instantiate(),this._pointers=new Set,this._wasm.ready.then(()=>this))}var browser,hasRequiredBrowser;function requireBrowser(){return hasRequiredBrowser||(hasRequiredBrowser=1,browser=Worker),browser}var browserExports=requireBrowser();const NodeWorker=getDefaultExportFromCjs(browserExports),getWorker=()=>globalThis.Worker||NodeWorker;class WASMAudioDecoderWorker extends getWorker(){constructor(N,I,D,f){WASMAudioDecoderCommon.modules||new WASMAudioDecoderCommon;let k=WASMAudioDecoderCommon.modules.get(D);if(!k){let i="text/javascript",c,$=`'use strict';(${((C,M,Z)=>{let J,z,Q=new Promise(ee=>{z=ee});self.onmessage=({data:{id:ee,command:Y,data:te}})=>{let ie=Q,ye={id:ee},re;Y==="init"?(Object.defineProperties(C,{WASMAudioDecoderCommon:{value:M},EmscriptenWASM:{value:Z},module:{value:te.module},isWebWorker:{value:!0}}),J=new C(te.options),z()):Y==="free"?J.free():Y==="ready"?ie=ie.then(()=>J.ready):Y==="reset"?ie=ie.then(()=>J.reset()):(Object.assign(ye,J[Y](Array.isArray(te)?te.map(de=>new Uint8Array(de)):new Uint8Array(te))),re=ye.channelData?ye.channelData.map(de=>de.buffer):[]),ie.then(()=>self.postMessage(ye,re))}}).toString()})(${D}, ${WASMAudioDecoderCommon}, ${f})`;try{c=typeof process.versions.node<"u"}catch{}k=c?`data:${i};base64,${Buffer.from($).toString("base64")}`:URL.createObjectURL(new Blob([$],{type:i})),WASMAudioDecoderCommon.modules.set(D,k)}super(k,{name:I}),this._id=Number.MIN_SAFE_INTEGER,this._enqueuedOperations=new Map,this.onmessage=({data:i})=>{const{id:c,...$}=i;this._enqueuedOperations.get(c)($),this._enqueuedOperations.delete(c)},new f(WASMAudioDecoderCommon).getModule().then(i=>{this.postToDecoder("init",{module:i,options:N})})}async postToDecoder(N,I){return new Promise(D=>{this.postMessage({command:N,id:this._id,data:I}),this._enqueuedOperations.set(this._id++,D)})}get ready(){return this.postToDecoder("ready")}async free(){await this.postToDecoder("free").finally(()=>{this.terminate()})}async reset(){await this.postToDecoder("reset")}}const assignNames=(O,N)=>{Object.defineProperty(O,"name",{value:N})};function EmscriptenWASM(O){function N(){}function I(me){throw me}var D,f;function k(){var me=f.buffer;D=new Uint8Array(me),new BigInt64Array(me),new BigUint64Array(me)}for(var i=()=>I(""),c=()=>{},$={},C=me=>me(),M=()=>performance.now(),Z=(me,Re)=>{if($[me]&&(clearTimeout($[me].id),delete $[me]),!Re)return 0;var Ue=setTimeout(()=>{delete $[me],C(()=>he(me,M()))},Re);return $[me]={id:Ue,timeout_ms:Re},0},J=Math.cos,z=me=>(D.length,!1),Q=me=>{throw`exit(${me})`},ee=new Uint8Array(123),Y=25;Y>=0;--Y)ee[48+Y]=52+Y,ee[65+Y]=Y,ee[97+Y]=26+Y;ee[43]=62,ee[47]=63;var te={d:i,c,e:Z,a:J,f:z,b:Q};function ie(me){ye=me.i,re=me.j,de=me.k,se=me.l,ue=me.m,he=me.o}var ye,re,de,se,ue,he;function we(me){me.h()}EmscriptenWASM.wasm||Object.defineProperty(EmscriptenWASM,"wasm",{get:()=>String.raw`dynEncode0158c8b8d85e¼æ=M™]™lGu³õPoš]ÐãÞ·£3² ÁÚ= ’Êöc/ÓZ8s³‹íÛ³u­Ð¥t"+¦›¦~dòR\(nº}÷£¢¢ë¢k}Ÿt¡) ,‚­äÕüP
16
16
  *øüäÖeù‡i“ ÝWŠÍ¦ÖPMŸ¨[æu>Ü(«l‹'Ë$c‡˜¿9ZEúº¼ù‹¼=}ŠŒäÍÂý²­‚\åô҅'.õt­ÅXî=}~õ"uÊr˜ÁýóòÝ ÔúéÊ
17
17
  /Αÿ4ñ3‚sl¬8mæÑå›68à8uNÑçm–hÔ¶©hwÒ½¸t¡î¾¾|®½®­ê²
18
18
  #Hzò44›Bv  ½!;1Û÷Ô±xü½#Ó–7(‰…‹‹0#,È$Ï#$$GÓé­Ë Eä àoç7ãoéJÉíŒï7±çO—HAŸWᐕì@ì‘>j‰_Ž»·ÄBg¡& ºËáPÍþՂâ|óZ†5qœíœê£Š1Œ(£=Mj»‰-³;œÉb¸m͂IÙ㇒ˆ•[@œºšk„¶äáV9t#wäԋy£óþN÷¸å‘KS W£)ýŒÌQ<¼°ì=}=}ʗÌ@㈼¤j­@V¸0Wïú!÷ý£¾±²BMðôŠ=MãÕ2Úÿ¤ÜïV&¸á„ÇòßBÕØ&eÞj«@ߎ¥¬/ϛ©‹Ì).ø~|V‡}o:¶çBj '¯ÅIÝŽBVU0¦~VBq´µOF#їÈV„ï Ÿó>±w…5ooø«–òÏ©2ú*Yó€×&؛scò,ó•Wû® =M‹«À•3ÃUK£AhV!.ßÖª3œ3p‹êPÃ¥“¢’;אòZ¹N´*Rwç²Ã= +2pæOôŽïÈ5 È5p£µ~ØÎE2¿×z݊ê…LÂP7]‹O(&³BTJn™6‹ìŒ‡¬vøzšýO˜b_¯ëSº [Þá4'þI&xa^í’‡‚k¨a¨­(bñý"w®×‰ŽµØg),LèÏþ¬1‡×Ÿü= àúN(5F:‘kTçZ„òË"êþÄUψa%/ Áïâ׀ž*Ï3}~èKŒŒƒKnw‡][ŽsÆ\3²( •¥o)1™|•”()¥Õå¾!?= Ó¹O4xÙ¨ ÌÕÆh£§Š×w¬¢¾9B{ÍØJÙ÷Âwf«E¢ÒpBÒGïÎUƒW‘¾£—ÓYáƒG»‚mU^ðÛ7L„ôyí¾7Nì?}Ádtœ|Öñåu&qýŸ’q¶
@@ -203,4 +203,4 @@ DÙ VààÍ³ÄvÒ2; 5c±-ìʞ‹öª§}Ou¡ƒ¡‡¦ƒîGÇ D
203
203
  Ùup3‹q@ݱu„Xt•X07=M˜‡p_¤I¬ø®®[¦ó[ÀRŠ˜VsX?F^":hˆa?ØÎeÄQc{Yíz’0j¹{b ×c˜4ö–= %¡›ì?XÜñÊ,ŒxþÀŠf©û‡y O}:Fà= NuÙO_hÌÍtÝg|ȳ]²(aŸ= žTÜøN»j/Ì|éŽÚœ{^ëÐÖ{¡•Çzñú_|Åûl*†Ztì{8ޝa@©¥Z”K؍¨c¿iš<±†üFÇkº-cy 5±4§o9ы,;KzÌ $à1I=MºôÉ©¤=MêÈ5
204
204
  }õíë(—ŒðìÍäWD„?£©ÿ㪔=M äҕ±ì6í)ˆ‘ÏÙtbFÐöÚFÈ´Ù§R‚1.]¢¦¨ùû­,9ï‚tö»LÂô⍦qªk{ä(9«ž4>°»ŽB‰¶ñ»šGÓ½vÃâ£d$°AŠ‹†0ô‰¼¦­d=M¢«£ Àß}â$ æ0òÊ6¾%¼>3(…-D+ÂÔÂ…o7#æFåEIîkNDÒ_&Š3iÍHÌúk&@â‹k1ýîW¶ƒY¬ŽXޖXáXâ¢XEeØØÈ\‘gi,Ç~æ{™…Ü-ïœÈÛx6„Û{—í8+¾\g¦ñ۟írŠô9³®°3D_åãxQÈxþÚ·/ª= Íu_̛uL•^t^{g9áqž?ª•(üo!€*Írâ&ÚËì÷¨Pd׺ÓG)àþê¤sJ’…ñAÉå$†AÐNÎç˜õn„D1MøhO¥me Q†Ê¸[F< ^MBÜÛ
205
205
   Aãϧüï†4î%M°6M…ùtN)›FR˜[¾F™qV6¥óðlœò©Ë= c»R =}Ù8õ.­%BÂIµÃI&æ×U”1Q«Ïñ3&ÑóÓÝ»“ñ²eL°(ÑòOzBð·Q]üôföê+h.³´)ÅKé¥JR#/GóuÉɾ¯Áõ¿-½ñ'î<·Q ¼=MÛ²6+þ筓Ydb_öcHm™öôزj¾…nÚ7aÌvؓOå¹÷e0Ff˜ÊÈønØ#?ÁhÊÀcœ–Ýåõ(å û)ü)éðк¿ÓÜ¡]q†ákÈۚÝL·ºrCMmp_ÀÏ Óìcç6®þsosÒÝóô1¬Ã6<2#Ò±Cˆ“65Q"4ŠB&pç
206
- gUn…g= !þ+µèm M½Êê½½²¦é%0Yg~´p5.\Ø®z‚y9%Ôiܒ!Ùc‰ÝŦH>ÓX ÿZR’[¬&ønÇl’Ó_:ïi«ñ<ø"QÚ©yz …®ªOL¥ÎêŠÌÝi?Ê‚'/Ne»:2NÅÝ_òspüR Oø!!ù+##üÓkéªX-fpd“q[U*]@ ö¨5͔pÖYhܪ= › ÛN3{ü® À)¡9þ‘ž-1® ÂcBNö÷0+È6ò„Òэ;lÅ^_>ÓÛQ&jðMIŠì¤³àlS×j΀¢@ȝåÕ¢•­on‡=M°©xÉûÖäav=MM©²öÖ¹?{ß ßî€øyÛ= ‰„0òûÏ4gr’èNÒíÏqëðð-êö¸†ᖥ$¨”Q.Ò4ä¿V$N_Ý><´æë[⑲F#T1É'utÿZXÁ“š(ošàx¡Jo˜"­ö–ùSæ÷ÒUFÓs* U¡ ÓºUµøGáL¨÷©ASjÕ®'!L‹¢ÕvC¿m·Gžâ¼N¹Ÿ³OÃで1T:ê¹\Z£ËZæ.î}ª°O'ãà¾I;ûÁ€HÃä&ÃÐÐK@3EÅÓÉ>½e@ã/òi¡’|ÌE³{ñSCm…ÎëöÁÐÐ%Ó>dš''¶9Á/T.N?äª †æÿÀÐÐ%Ó¶ ö¾ì¦)ÃÕ÷×"e|ÚþBåýrv¶K6“ŸŒöuâÐÌRÎËýæ×%I­OIø¦Ä(HTJ†~),ÕDCWWÃö(›VwV=M§TsLP³ þV'tT#¡ZLŽêé;ßù[`});var be={a:se};this.setModule=Se=>{N.setModule(EmscriptenWASM,Se)},this.getModule=()=>N.getModule(EmscriptenWASM),this.instantiate=()=>(this.getModule().then(Se=>WebAssembly.instantiate(Se,be)).then(Se=>{const Me=Se.exports;fe(Me),I=Me.g,D(),Ie(Me),Z()}),this.ready=new Promise(Se=>{Z=Se}).then(()=>{this.HEAP=I.buffer,this.malloc=ue,this.free=ye,this.opus_frame_decoder_create=ge,this.opus_frame_decode_float_deinterleaved=_e,this.opus_frame_decoder_destroy=pe}),this)}function OpusDecoder(N={}){OpusDecoder.errors||Object.defineProperties(OpusDecoder,{errors:{value:new Map([[-1,"OPUS_BAD_ARG: One or more invalid/out of range arguments"],[-2,"OPUS_BUFFER_TOO_SMALL: Not enough bytes allocated in the buffer"],[-3,"OPUS_INTERNAL_ERROR: An internal error was detected"],[-4,"OPUS_INVALID_PACKET: The compressed data passed is corrupted"],[-5,"OPUS_UNIMPLEMENTED: Invalid/unsupported request number"],[-6,"OPUS_INVALID_STATE: An encoder or decoder structure is invalid or already freed"],[-7,"OPUS_ALLOC_FAIL: Memory allocation has failed"]])}}),this._init=()=>new this._WASMAudioDecoderCommon(this).instantiate(this._EmscriptenWASM,this._module).then(K=>{this._common=K,this._inputBytes=0,this._outputSamples=0,this._frameNumber=0,this._input=this._common.allocateTypedArray(this._inputSize,Uint8Array),this._output=this._common.allocateTypedArray(this._outputChannels*this._outputChannelSize,Float32Array);const te=this._common.allocateTypedArray(this._channels,Uint8Array);te.buf.set(this._channelMappingTable),this._decoder=this._common.wasm.opus_frame_decoder_create(this._sampleRate,this._channels,this._streamCount,this._coupledStreamCount,te.ptr,this._preSkip,this._forceStereo)}),Object.defineProperty(this,"ready",{enumerable:!0,get:()=>this._ready}),this.reset=()=>(this.free(),this._init()),this.free=()=>{this._common.free(),this._common.wasm.opus_frame_decoder_destroy(this._decoder),this._common.wasm.free(this._decoder)},this._decode=K=>{if(!(K instanceof Uint8Array))throw Error("Data to decode must be Uint8Array. Instead got "+typeof K);this._input.buf.set(K);let te=this._common.wasm.opus_frame_decode_float_deinterleaved(this._decoder,this._input.ptr,K.length,this._output.ptr),ne;return te<0&&(ne="libopus "+te+" "+(OpusDecoder.errors.get(te)||"Unknown Error"),console.error(ne),te=0),{outputBuffer:this._common.getOutputChannels(this._output.buf,this._outputChannels,te),samplesDecoded:te,error:ne}},this.decodeFrame=K=>{let te=[];const ne=this._decode(K);return ne.error&&this._common.addError(te,ne.error,K.length,this._frameNumber,this._inputBytes,this._outputSamples),this._frameNumber++,this._inputBytes+=K.length,this._outputSamples+=ne.samplesDecoded,this._WASMAudioDecoderCommon.getDecodedAudioMultiChannel(te,[ne.outputBuffer],this._outputChannels,ne.samplesDecoded,this._sampleRate)},this.decodeFrames=K=>{let te=[],ne=[],ee=0,re=0;for(;re<K.length;){const ce=K[re++],oe=this._decode(ce);te.push(oe.outputBuffer),ee+=oe.samplesDecoded,oe.error&&this._common.addError(ne,oe.error,ce.length,this._frameNumber,this._inputBytes,this._outputSamples),this._frameNumber++,this._inputBytes+=ce.length,this._outputSamples+=oe.samplesDecoded}return this._WASMAudioDecoderCommon.getDecodedAudioMultiChannel(ne,te,this._outputChannels,ee,this._sampleRate)},this._isWebWorker=OpusDecoder.isWebWorker,this._WASMAudioDecoderCommon=OpusDecoder.WASMAudioDecoderCommon||WASMAudioDecoderCommon,this._EmscriptenWASM=OpusDecoder.EmscriptenWASM||EmscriptenWASM,this._module=OpusDecoder.module;const Z=8,q=K=>typeof K=="number",J=N.sampleRate,I=N.channels,D=N.streamCount,a=N.coupledStreamCount,O=N.channelMappingTable,F=N.preSkip,z=N.forceStereo?1:0;if(I>2&&(!q(D)||!q(a)||!Array.isArray(O)))throw new Error("Invalid Opus Decoder Options for multichannel decoding.");return this._sampleRate=[8e3,12e3,16e3,24e3,48e3].includes(J)?J:48e3,this._channels=q(I)?I:2,this._streamCount=q(D)?D:1,this._coupledStreamCount=q(a)?a:this._channels-1,this._channelMappingTable=O||(this._channels===2?[0,1]:[0]),this._preSkip=F||0,this._forceStereo=I<=Z&&I!=2?z:0,this._inputSize=32e3*.12*this._channels,this._outputChannelSize=120*48,this._outputChannels=this._forceStereo?2:this._channels,this._ready=this._init(),this}class OpusDecoderWebWorker extends WASMAudioDecoderWorker{constructor(Z){super(Z,"opus-decoder",OpusDecoder,EmscriptenWASM)}async decodeFrame(Z){return this.postToDecoder("decodeFrame",Z)}async decodeFrames(Z){return this.postToDecoder("decodeFrames",Z)}}assignNames(OpusDecoder,"OpusDecoder"),assignNames(OpusDecoderWebWorker,"OpusDecoderWebWorker"),new OpusDecoder;class RoomPeer extends RoomUsers{constructor(q){super(q);Ee(this,"getPeerStatsTimer",0);Ee(this,"reports",[]);Ee(this,"peerNetwork",{inboundBytes:0,outboundBytes:0,lostRate:"0.00",roundTripTime:"0",jitter:"0"});Ee(this,"initPeer",()=>{var q;(q=this.peerIns)==null||q.close(),this.transceiverMap=new Map,this.peerIns=new RTCPeerConnection({iceServers:[{urls:"stun:stun.cloudflare.com:3478"}],bundlePolicy:"max-bundle"}),this.peerIns.createDataChannel("scapegoat-channel"),De(this,Hn).call(this),De(this,zn).call(this)});Ee(this,"getNatType",async()=>{});Ee(this,"initSendChannel",(q="",J)=>{});Ee(this,"initReceiveChannel",(q="",J)=>{});Ee(this,"replaceSenderStream",async(q=[],J)=>{const{userId:I}=this.options;q.length===0&&(q=mediaType_keys);for(const D of q){const a=this.transceiverMap.get(D);let O;if(a){const{sender:F}=a;J?O=this.getUserStream(I,D):O=this.getPhoneyStreams(D);const[z]=O.getTracks();z&&await F.replaceTrack(z)}}});Ee(this,"getSenderTracks",async(q=[])=>{const J=[];for(const I of q){const D=this.transceiverMap.get(I);if(!D)continue;const{mid:a,sender:O}=D,{track:F}=O;if(!F)continue;const{id:z,enabled:K}=F,te=mediaType_keys.findIndex(ee=>ee===I),ne={type:te,enabled:K,trackName:`web-${te}-${z}`,location:"local",mid:a};J.push(ne)}return J});Ee(this,"addSenders",async(q=[])=>{q.length===0&&(this.peerIns.addTransceiver("audio",{direction:"sendonly"}),this.peerIns.addTransceiver("video",{direction:"sendonly"}));const J=[];for(const I of q){if(this.transceiverMap.get(I))continue;const a=this.getPhoneyStreams(I),[O]=a.getTracks(),F=this.peerIns.addTransceiver(O,{direction:"sendonly"});this.transceiverMap.set(I,F),J.push(I)}if(q.length===0||J.length!==0){const I=await this.peerIns.createOffer();if(this.options.debug){const D=libExports$1.parse(I.sdp),a=dt(D.media,["mid","msid","type"]);console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ffffff;","------->quickvo: setLocalDescription",{msidArr:a,sdpJson:D,description:I})}await this.peerIns.setLocalDescription(I)}return J});Ee(this,"removeSenders",async(q=[])=>{q.length===0&&(q=mediaType_keys);for(const J of q)this.transceiverMap.has(J)&&this.transceiverMap.delete(J)});Ee(this,"onSubscribeUserTracks",q=>{let J=0;return new Promise(async I=>{const D=[];for(const a of q){const{tracks:O=[]}=a;for(const F of O){const{trackName:z,mid:K}=F,[te]=await this.getUserTrackByTrackName([z]);D.push({...te,mid:K})}}{let a=[];const O=async()=>{clearTimeout(J);const z=new Map;for(const te of a){const{userId:ne,mediaType:ee}=te;if(!ne||!ee)continue;z.has(ne)||z.set(ne,{userId:ne,tracks:[],updateStreams:{}});const ce=z.get(ne);ce.tracks.push(te),ce.updateStreams[ee]=!0}const K=[...z.values()];for(const te of K){const{userId:ne,tracks:ee}=te;await this.updateUsertracks(ne,ee,!0)}await this.emitNotifyUpdateUsersStreams(K),this.peerIns.removeEventListener("track",F);{const te=Array.from(D,re=>re.trackName),ne=Array.from(a,re=>re.trackName),ee=te.filter(re=>!ne.includes(re));I({target:te,success:ne,fail:ee})}},F=async z=>{const{streams:K,transceiver:te}=z,[ne]=K,{mid:ee,receiver:re}=te,{track:ce}=re,{id:oe}=ce,se=D.find(ue=>ue.mid===`${ee}`);if(!se)return;const{userId:fe,mediaType:ge}=se;if(!(!fe||!ge)){{const ue={...se,mid:ee,msid:oe};a.push(ue)}this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#00b60f;",`------->quickvo: await subscribe ${a.length}/${D.length}`,{mediaType:ge,mid:ee,userTrack:se,e:z});{const ue=new Audio;if(ue.srcObject=ne,await this.initUserMediaStreamContext(fe,ge,ne),ge==="microphoneCamera_audio"||ge==="screenSharing_audio"){const _e=this.getUserAudioMediaStreamContext(fe,ge);_e==null||_e.setMute(!1)}}D.length===a.length&&O()}};this.peerIns.addEventListener("track",F),J=window.setTimeout(()=>{this.reportLogs("subscribe_error",`incomplete subscription. (${a.length}/${D.length})`),O()},5*1e3)}})});at(this,Hn,()=>{let q=0;const J=()=>{this.peerIns.close(),this.setRoomState("closed")};this.peerIns.oniceconnectionstatechange=async()=>{const I=this.peerIns.iceConnectionState;switch(await this.taskQueue.setCondition("ice",!1),clearTimeout(q),I){case"connected":this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#00b60f;",`------->quickvo: connectionState:${I}`),await this.taskQueue.setCondition("ice",!0),this.setRoomState("connected");break;case"disconnected":this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#b64900;",`------->quickvo: connectionState:${I}`),q=window.setTimeout(J,30*1e3);break;case"failed":this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#b60000;",`------->quickvo: connectionState:${I}`),this.setRoomState("failed");break;case"closed":this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#b60000;",`------->quickvo: connectionState:${I}`),J();break;default:this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#b64900;",`------->quickvo: connectionState:${I}`);break}}});Ee(this,"closeUserTracks",async(q,J=[],I=!1)=>{const D=[];for(const z of J){const{trackName:K,msid:te}=z;D.push(K),te&&D.push(te)}const a=z=>D.includes(z),O=this.peerIns.getTransceivers();for(const z of O){const{mid:K,sender:te,receiver:ne}=z;te.track&&a(te.track.id)&&(z.stop(),this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;",`------->quickvo: transceiver.sender: ${K} is stop.`,z)),ne.track&&a(ne.track.id)&&(z.stop(),this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;",`------->quickvo: transceiver.receiver: ${K} is stop.`,z))}const F=await this.getUser(q);if(F){for(const z of F.tracks){const{trackName:K,msid:te,userId:ne,mediaType:ee}=z;!ne||!ee||!a(K)||(this.removeUserMediaStreamContext(ne,ee),te&&delete z.msid)}if(I){const z=F.tracks.filter(({trackName:K})=>!a(K));await this.updateUsertracks(q,z,!1)}}});Ee(this,"createOffer",async()=>{const q=await this.peerIns.createOffer();if(this.options.debug){const J=libExports$1.parse(q.sdp),I=dt(J.media,["mid","msid","type"]);console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ffffff;","------->quickvo: createOffer",{msidArr:I,sdpJson:J,description:q})}await this.peerIns.setLocalDescription(q)});Ee(this,"createAnswer",async()=>{const q=await this.peerIns.createAnswer();if(this.options.debug){const J=libExports$1.parse(q.sdp),I=dt(J.media,["mid","msid","type"]);console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ffffff;","------->quickvo: createAnswer",{msidArr:I,sdpJson:J,description:q})}await this.peerIns.setLocalDescription(q)});Ee(this,"getSdp",()=>{var q;return(q=this.peerIns.localDescription)==null?void 0:q.sdp});Ee(this,"setRemoteDescription",async q=>{if(this.options.debug){const J=libExports$1.parse(q.sdp),I=dt(J.media,["mid","msid","type"]);console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ffffff;","------->quickvo: setRemoteDescription",{msidArr:I,sdpJson:J,description:q})}return await this.peerIns.setRemoteDescription(q),q});Ee(this,"setCallStrategy",async(q,J=[])=>{J.length===0&&(J=mediaType_keys);let I="balanced";switch(q){case"qualityPriority":I="maintain-resolution";break;case"fluencyPriority":I="maintain-framerate";break;case"balancedDowngrade":I="balanced";break}const D=await this.getSelfInfo(),a=Array.from(D.tracks,({trackName:F})=>F),O=this.peerIns.getSenders();for(const F of O){const{track:z}=F;if(!z||!a.includes(z.id))continue;const K=F.getParameters();F.setParameters({...K,degradationPreference:I})}});Ee(this,"setRTCRtpSenderParameters",q=>{try{const J=this.peerIns.getSenders();for(const I of J){const D=I.getParameters();I.setParameters({...D,...q})}}catch(J){console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: setRTCRtpSenderParameters is error.",J)}});Ee(this,"getReportsByMid",async(q=[])=>q.length===0?this.reports:this.reports.filter(J=>q.includes(J.mid)));Ee(this,"getRoomNetwork",()=>this.peerNetwork);Ee(this,"getPeerNetwork",()=>this.peerNetwork);at(this,jn,async()=>{try{const q=await this.peerIns.getStats(),J=["inbound-rtp","remote-inbound-rtp","outbound-rtp","transport"],D=[...q.values()].filter(_e=>J.includes(_e.type));let a=0,O=0,F=0,z=0,K=0,te=0,ne=[],ee=[];for(const _e of this.reports){const{packetsSent:pe,packetsLost:ye}=_e;pe&&(F+=pe),ye&&(z+=ye)}this.reports=D;for(const _e of this.reports){const{bytesSent:pe,bytesReceived:ye,packetsSent:we,packetsLost:Ie,roundTripTime:be,jitter:Se}=_e;pe&&(O=pe),ye&&(a=ye),we&&(K+=we),Ie&&(te+=Ie),be&&ne.push((be*100).toFixed(2)),Se&&ee.push(Se.toFixed(2))}ee.sort().reverse(),ne.sort().reverse();const re=K-F,ce=te-z,oe=re===0?"0.00":(ce/re).toFixed(2),[se="0"]=ne,[fe="0"]=ee,ge={outboundBytes:O,inboundBytes:a,lostRate:oe,roundTripTime:se,jitter:fe};this.peerNetwork=ge;const ue=(_e,pe,ye)=>{const we=Number(_e),Ie=Number(pe),be=Number(ye);let Se="0";return we<.03&&Ie<100&&be<.05?Se="5":we<.06&&Ie<160&&be<.1?Se="4":we<.1&&Ie<250&&be<.15?Se="3":we<.15&&Ie<400&&be<.2?Se="2":Se="1",Number(Se)};{const _e=ue(oe,se,fe),pe=await this.getSelfInfo(),{network:ye}=pe,we={egress:_e,ingress:_e};$t("updateUserNetwork",async()=>{if(await this.updateUserNetwork(this.options.userId,we),JSON.stringify(ye)!==JSON.stringify(we)){this.emitNotifyUpdateUsers();const{userId:Se,roomId:Me}=this.options;this.cwsIns.sendMessage({event:"networkQualityChange",data:{...we,userId:Se,roomId:Me}},!1)}},3*1e3)}}catch(q){console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: setNetQuality is err.",q)}});at(this,zn,()=>{const q=async()=>{this.peerIns.connectionState!=="connected"||!this.options.roomId||De(this,jn).call(this)};this.getPeerStatsTimer=window.setInterval(q,1*1e3)});Ee(this,"stopGetPeerStats",()=>clearInterval(this.getPeerStatsTimer))}}Hn=new WeakMap,jn=new WeakMap,zn=new WeakMap;class RoomCalls extends RoomPeer{constructor(q){super(q);at(this,Tn,0);Ee(this,"setLocalStream",(q,J)=>new Promise(async(I,D)=>{try{typeof q=="string"&&(q=[q]);for(const O of q)this.localStreamsActionMap.set(O,J);if(J){if(q.includes("microphoneCamera_audio")&&q.includes("microphoneCamera_video")?await this.initLocalStream("microphoneCamera"):q.includes("microphoneCamera_audio")?await this.initLocalStream("microphoneCamera_audio"):q.includes("microphoneCamera_video")?await this.initLocalStream("microphoneCamera_video"):q.includes("screenSharing_audio")&&q.includes("screenSharing_video")?await this.initLocalStream("screenSharing"):q.includes("screenSharing_audio")&&!q.includes("screenSharing_video")?await this.initLocalStream("screenSharing_audio"):q.includes("screenSharing_video")&&!q.includes("screenSharing_audio")&&await this.initLocalStream("screenSharing_video"),q.includes("screenSharing_audio")){const O=await this.getLocalStream("screenSharing_audio");if(O){const F=O.getTracks();for(const z of F)z.onended=()=>this.stopPublish(["screenSharing_audio","screenSharing_video"])}}if(q.includes("screenSharing_video")){const O=await this.getLocalStream("screenSharing_video");if(O){const F=O.getTracks();for(const z of F)z.onended=()=>this.stopPublish(["screenSharing_audio","screenSharing_video"])}}}else await this.stopLocalStreams(q);const a=await this.getLocalStreams(q);this.cwsIns.emitNotify("onLocalStream",{code:200,data:a,desc:"local stream is change."}),I(a)}catch(a){D(a)}}));Ee(this,"setMediaDeviceKind",(q,J)=>new Promise(async(I,D)=>{this.setDeviceKind(q,J);const a=await this.getSelfInfo(),{id:O,tracks:F=[],callActionMap:z}=a,K=[],te=async ne=>{const ee=this.localStreamsActionMap.get(ne),re=F.find(oe=>oe.mediaType===ne),ce=z[ne];if(ee){K.push(ne),await this.stopLocalStreams([ne]);try{await this.initLocalStream(ne)}catch(oe){this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: initLocalStream is error.",oe),await this.inactiveTracks([ne],!1),D(oe)}}if(re){const oe=await this.getLocalStream(ne);oe&&(await this.initUserMediaStreamContext(O,ne,oe),ce&&await this.replaceSenderStream([ne],!0))}{const oe=await this.getLocalStreams(K);this.cwsIns.emitNotify("onLocalStream",{code:200,data:oe,desc:"local stream is change."}),await this.emitNotifyUpdateUsers(),I(!0)}};q==="audioinput"&&te("microphoneCamera_audio"),q==="videoinput"&&te("microphoneCamera_video"),q==="audiooutput"&&(await this.changeAudiooutput(),I(!0))}));Ee(this,"changeScreenSharing",async q=>{const J=await this.getSelfInfo(),{tracks:I=[],callActionMap:D}=J;try{await this.setLocalStream(q,!0);for(const a of q)I.find(F=>F.mediaType===a&&D[a])&&await this.replaceSenderStream([a],!0)}catch(a){this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: changeScreenSharing is error.",a)}});Ee(this,"createSession",()=>new Promise(async(q,J)=>{if(["connecting","connected"].includes(this.roomState))return q(!0);this.setRoomState("connecting"),await this.taskQueue.createTask({describe:"createSession",conditionKeys:["createWs","createSession"],changeConditionKeys:["createSession"],func:()=>new Promise(async(I,D)=>{try{await this.addSenders(),this.cwsIns.sendMessage({event:"connectCF",data:{sdp:this.getSdp()}}).then(async a=>{const{code:O=0,desc:F,data:z}=a;if(O!==200)return D(F);const{remoteSdp:K}=z;if(this.options.debug){const te=libExports$1.parse(K),ne=dt(te.media,["mid","msid","type"]);console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ffffff;","------->quickvo: setLocalDescription",{msidArr:ne,sdpJson:te})}await this.taskQueue.setCondition("ice",!1),await this.taskQueue.createTask({describe:"ice",timeout:30*1e3,conditionKeys:["ice"],func:()=>new Promise(te=>setTimeout(()=>te(!0),300)),success:async()=>{I(!0)},fail:async te=>{throw new Error(`ice connection failed: ${te}`)}}),await this.setRemoteDescription({type:"answer",sdp:K})})}catch(a){D(a)}}),success:async I=>{q(I)},fail:async I=>{this.reportLogs("ws_c_timeout",I.message||I),J(I)},complete:()=>{this.taskQueue.setCondition("createSession",!0)}})}));Ee(this,"earlyConnect",(q=[])=>{this.isEarly=!0,De(this,Cn).call(this),this.createSession(),q.length===0&&(q=["microphoneCamera_audio","microphoneCamera_video"]),De(this,An).call(this,q)});Ee(this,"joinRoom",async q=>new Promise(async(J,I)=>{await this.taskQueue.createTask({describe:"joinRoom",conditionKeys:["createWs"],changeConditionKeys:["joinRoom"],func:()=>new Promise(async(D,a)=>{try{this.setOptions(q),await De(this,Cn).call(this),this.clearUsers();const{roomId:O,userId:F,callType:z,sdkToken:K}=this.options;this.cwsIns.sendMessage({event:this.isEarly?"joinRoomEx":"joinRoom",data:{callType:z,roomId:O,user:{id:F,tracks:[],callAction:0},token:K},version:2}).then(async te=>{const{code:ne=0,desc:ee="服务器繁忙",data:re}=te;if(ne!==200)return a(ee);const{roomId:ce="",roomUsers:oe=[]}=re;if(ce!==O)return a("加入的房间不匹配");this.isInRoom=!0,this.taskQueue.setCondition("createTrack",!0),this.taskQueue.setCondition("publish",!0),this.taskQueue.setCondition("subscribe",!0),this.taskQueue.setCondition("renegotiate",!0),this.taskQueue.setCondition("closeTrack",!0),this.initHeartbeat(),this.createSession(),await this.updateUsers(oe);const se=[];for(const ge of oe){const{id:ue,channelCache:_e}=ge,{channels:pe=[]}=_e;await this.updateUserBehaviors(ue,ge.behavior),await this.updateUserChannels(ue,pe,!1),pe.length!==0&&se.push({userId:ue,channels:pe})}this.subChannel(se),await this.emitNotifyUpdateUsers();const fe=await this.getUsers();D(fe)})}catch(O){a(O)}}),success:async D=>{J(D)},fail:async D=>{this.reportLogs("join_room_error",D.message||D),I(D)},complete:()=>{this.taskQueue.setCondition("joinRoom",!0)}})}));Ee(this,"quitRoom",()=>new Promise(async q=>{const{roomId:J,userId:I}=this.options,D={roomId:J,user:{id:I}};try{this.isInRoom=!1,clearInterval(De(this,Tn)),await this.stopLocalStreams(),this.stopSubscribe(),this.stopGetPeerStats(),this.clearUsers(),this.clearUserStreams(),this.cwsIns.clearEvents(),this.setRoomState("ready")}catch(a){this.reportLogs("quit_room_error",a.message||a)}await new Promise(a=>setTimeout(()=>a(!0),300)),await this.taskQueue.setCondition("closeTrack",!0),this.cwsIns.sendMessage({event:"quitRoom",data:D}),q(!0)}));Ee(this,"quitRoomEx",()=>new Promise(async q=>{const{roomId:J,userId:I}=this.options,D={roomId:J,user:{id:I}};try{this.isInRoom=!1,this.initHeartbeat(),await this.stopLocalStreams(),this.stopSubscribe(),this.stopGetPeerStats(),this.clearUsers(),this.clearUserStreams()}catch(a){this.reportLogs("quit_room_error",a.message||a)}await new Promise(a=>setTimeout(()=>a(!0),300)),this.cwsIns.sendMessage({event:"quitRoomEx",data:D}),q(!0)}));Ee(this,"syncRoomInfo",()=>new Promise(async(q,J)=>{const{userId:I}=this.options,D=await this.getUser(I),{id:a=I,callAction:O=0}=D;this.cwsIns.sendMessage({event:"syncRoomInfo",data:{user:{id:a,callAction:O}}}).then(async F=>{if(F.code!==200)return J(F.desc);const z=F.data.users;this.clearUsers(),await this.updateUsers(z),await this.updateUsertracks(D.id,D.tracks,!1);{const K=await this.getUsers();q(K)}}).catch(F=>J(F))}));Ee(this,"checkInRoom",()=>new Promise(async(q,J)=>{const{userId:I}=this.options,D=await this.getUser(I),{id:a=I,callAction:O=0}=D;this.cwsIns.sendMessage({event:"syncRoomInfo",data:{user:{id:a,callAction:O}}}).then(async F=>F.code!==200?J(F.desc):F.data.users.find(te=>te.id===this.options.userId)?q(!0):q(!1)).catch(()=>q(!1))}));Ee(this,"publish",q=>new Promise(async(J,I)=>{{const D=await this.getSelfInfo(),{banBehaviorMap:a}=D;let O=!0;for(const F of q)if(a[F]){O=!1;break}if(O===!1)return I("publish is error: prohibited by administrator.")}try{await this.setLocalStream(q,!0)}catch(D){this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: setLocalStream is error.",D)}await this.taskQueue.createTask({describe:"publish",conditionKeys:["createWs","createSession","ice","createTrack","publish","subscribe","renegotiate","closeTrack"],changeConditionKeys:["publish"],func:()=>new Promise(async(D,a)=>{try{const O=await this.getSelfInfo(),F=[];for(const ee of q){{const re=this.getPhoneyStreams(ee);await this.initUserMediaStreamContext(O.id,ee,re)}{const re=await this.getLocalStream(ee);re?await this.initUserMediaStreamContext(O.id,ee,re):F.push(ee)}}const z=q.filter(ee=>!F.includes(ee)||["microphoneCamera_audio","microphoneCamera_video"].includes(ee));await this.replaceSenderStream(q,!1),await De(this,An).call(this,z);const K=await this.getSenderTracks(z),te=[...O.tracks,...K];await this.updateUsertracks(O.id,te,!0),F.length!==0&&await this.inactiveTracks(F,!1),z.length!==0&&await this.replaceSenderStream(z,!0);const ne=await this.getCallAction(te);await De(this,On).call(this,ne),await new Promise(ee=>setTimeout(()=>ee(!0),230)),De(this,Jn).call(this,q);{await this.emitNotifyUpdateUsers();const ee=await this.getSelfInfo();D(ee)}}catch(O){a(O)}}),success:async D=>{J(D)},fail:async D=>{this.reportLogs("publish_error",D.message||D),I(D)},complete:async()=>{await this.taskQueue.setCondition("publish",!0)}})}));Ee(this,"stopPublish",(q=[])=>new Promise(async(J,I)=>{await this.taskQueue.createTask({describe:"stopPublish",conditionKeys:["createWs","createSession","ice","createTrack","publish","subscribe","renegotiate","closeTrack"],changeConditionKeys:["closeTrack"],func:()=>new Promise(async(D,a)=>{try{const O=await this.getSelfInfo();q.length===0&&(q=mediaType_keys);const F=O.tracks.filter(({mediaType:K})=>K&&q.includes(K)),z=async()=>{this.initMediaPhoneyStreams(q);const K=await this.getSelfInfo();await this.emitNotifyUpdateUsers(),D(K)};if(F.length===0)return z();await this.replaceSenderStream(q,!0),await this.closeUserTracks(O.id,F,!0),await this.removeSenders(q);{const K=await this.getCallAction(O.tracks);await De(this,On).call(this,K)}await this.createOffer(),this.cwsIns.sendMessage({event:"closeTrack",data:{roomId:this.options.roomId,sdp:this.getSdp(),tracks:F}}).then(async K=>{const{code:te=0,data:ne,desc:ee}=K;if(te!==200)return a(ee);const{remoteSdp:re}=ne;await this.setRemoteDescription({type:"answer",sdp:re}),z()})}catch(O){a(O)}}),success:async D=>{J(D)},fail:async D=>{this.reportLogs("close_track_error",D.message||D),I(D)},complete:async()=>{await this.taskQueue.setCondition("closeTrack",!0)}})}));Ee(this,"subscribe",(q=[],J=3)=>new Promise(async(I,D)=>{const a=await this.taskQueue.createTask({describe:"subscribe",strict:!0,conditionKeys:["createWs","createSession","ice","createTrack","publish","subscribe","renegotiate","closeTrack"],changeConditionKeys:["subscribe"],func:()=>new Promise(async(O,F)=>{try{const z=await this.getUsers();let K=[];for(const ee of z){const{isSelf:re,tracks:ce=[]}=ee;if(!re){const oe=ce.filter(({trackName:se,mid:fe=""})=>fe!==""&&(q.includes(se)||q.length===0));oe.length!==0&&K.push({...ee,tracks:oe})}}const te=async(ee={})=>{const re=Array.from(K,({id:oe})=>oe),ce=await this.getUsers(re);await this.emitNotifyUpdateUsers(),O({users:ce,detail:ee})};if(K.length===0)return te();const ne=[];for(const ee of K){const{id:re,tracks:ce}=ee,oe=dt(ce,["type","trackName"]),se={id:re,tracks:oe};ne.push(se)}this.cwsIns.sendMessage({event:"subscribe",data:{users:ne}}).then(async ee=>{const{code:re=0,data:ce,desc:oe}=ee;if(re===2017&&oe.includes("renegotiation is expected before pulling or pushing tracks")&&await this.renegotiate(),re!==200)return F(oe);const{remoteSdp:se,users:fe=[]}=ce;this.onSubscribeUserTracks(fe).then(async ge=>{await this.renegotiate().then(()=>te(ge)).catch(ue=>F(ue))}).catch(ge=>{F(ge)}),await this.setRemoteDescription({type:"offer",sdp:se})})}catch(z){F(z)}}),success:async O=>{a.clear(),this.taskQueue.setCondition("subscribe",!0),I(O)},fail:async O=>{if(this.options.debug&&console.info("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;",`------->quickvo: subscribe error. surplus count is ${J}`),J>0)return await new Promise(F=>setTimeout(()=>F(!0),(3-J)*1e3)),J=J-1,a.retry();a.clear(),this.reportLogs("subscribe_error",O.message||O),this.taskQueue.setCondition("subscribe",!0),D(O)},complete:async()=>{}})}));Ee(this,"renegotiate",()=>new Promise(async(q,J)=>{try{await this.taskQueue.setCondition("renegotiate",!1),await this.createAnswer(),this.cwsIns.sendMessage({event:"renegotiate",data:{sdp:this.getSdp()}}).then(I=>{const{code:D=0,desc:a}=I;if(D!==200)return J(a);q(I)})}catch(I){J(I)}this.taskQueue.setCondition("renegotiate",!0)}));Ee(this,"stopSubscribe",(q=[])=>new Promise(async(J,I)=>{await this.taskQueue.createTask({describe:"closeTrack",conditionKeys:["createWs","createSession","ice","createTrack","publish","subscribe"],changeConditionKeys:["closeTrack"],func:()=>new Promise(async(D,a)=>{try{const O=await this.getUsers(),F=[];for(const K of O){const{tracks:te=[]}=K;for(const ne of te){const{type:ee,mid:re,trackName:ce,mediaType:oe,msid:se}=ne;if(!(!oe||!se)&&(q.length===0||q.includes(ce))){const fe={type:ee,mid:re,trackName:se};F.push(fe),await this.closeUserTracks(K.id,[ne])}}}const z=async()=>{await this.emitNotifyUpdateUsers(),D(!0)};if(F.length===0)return z();await this.createOffer(),await this.cwsIns.sendMessage({event:"closeTrack",data:{roomId:this.options.roomId,sdp:this.getSdp(),tracks:F}}).then(async K=>{const{remoteSdp:te}=K.data;await this.setRemoteDescription({type:"answer",sdp:te})}),z()}catch(O){a(O)}}),success:async D=>{J(D)},fail:async D=>{console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: stopPublish is error.",D),this.reportLogs("close_track_error",D.message||D),I(D)},complete:async()=>{await this.taskQueue.setCondition("closeTrack",!0)}})}));Ee(this,"inactiveTracks",async(q,J)=>new Promise(async I=>{const D=await this.getSelfInfo();if(!D||!D.id)return I(!0);const{tracks:a=[]}=D,O=[...a];for(let z of O){const{mediaType:K}=z;if(K&&q.includes(K)){z.enabled=J;const te=await this.getLocalStream(K);if(!te)continue;const ne=te.getTracks();for(const ee of ne)ee.enabled=J}}await this.replaceSenderStream(q,J);const F=await this.getCallAction(O);await De(this,On).call(this,F),await this.emitNotifyUpdateUsers(),I(!0)}));Ee(this,"setBanBehaviors",q=>new Promise(async(J,I)=>{try{const{roomId:D}=this.options,a=[];for(const O of q){const{id:F,banBehaviors:z}=O,K=Object.keys(z);if(K.length===0)continue;const te=[];for(const ee of K){const re=mediaType_keys.findIndex(se=>se===ee),ce=z[ee],oe={type:re,behavior:ce};te.push(oe)}const ne={id:F,behaviors:te};a.push(ne)}this.cwsIns.sendMessage({event:"preventUsersBehavior",data:{roomId:D,users:a}}).then(async O=>{const{code:F=0,desc:z}=O;if(F!==200)return I(z);J(O)}).finally(()=>{})}catch(D){I(D)}}));Ee(this,"pubChannel",()=>new Promise(async(q,J)=>{const D=[{dataChannelName:"web-channe"}];await this.cwsIns.sendMessage({event:"pubChannel",data:{channels:D}}).then(async a=>{const{code:O=0,data:F,desc:z}=a;if(O!==200)return J(z);const{channels:K=[]}=F;for(const te of K){const{channels:ne=[]}=te;for(const ee of ne){const{dataChannelName:re,id:ce}=ee;this.initSendChannel(re,ce)}}q(!0)}).catch(a=>{J(a)})}));Ee(this,"subChannel",(q=[])=>new Promise(async(J,I)=>{if(q.length===0)return J(!0);await this.taskQueue.createTask({describe:"subChannel",strict:!0,conditionKeys:["createWs","createSession","ice"],changeConditionKeys:[],func:()=>this.cwsIns.sendMessage({event:"subChannel",data:{channels:q}}).then(async D=>{const{code:a=0,data:O,desc:F}=D;if(a!==200)return I(F);const{channels:z=[]}=O;for(const K of z){const{channels:te=[]}=K;for(const ne of te){const{dataChannelName:ee,id:re}=ne;this.initReceiveChannel(ee,re)}}}),success:async D=>{J(D)},fail:async D=>{I(D)}})}));Ee(this,"debugger",()=>new Promise(async(q,J)=>{await this.cwsIns.sendMessage({event:"debugger"},!1).then(async I=>{if(I.code!==200)return J(I.desc);q(!0)}).catch(I=>{J(I)})}));Ee(this,"shutdown",()=>new Promise(async(q,J)=>{await this.cwsIns.sendMessage({event:"shutdown"},!1).then(async I=>{if(I.code!==200)return J(I.desc);q(!0)}).catch(I=>{J(I)})}));Ee(this,"initHeartbeat",()=>{this.stopHeartbeat();const q=()=>this.cwsIns.sendMessage({event:this.isInRoom?"heartbeat":"heartbeatEx"},!1),J=this.isInRoom?5*1e3:30*1e3;Ct(this,Tn,window.setInterval(q,J)),q()});Ee(this,"stopHeartbeat",()=>{clearInterval(De(this,Tn))});at(this,Jn,async q=>{const{roomId:J}=this.options;if(!J)return;const{id:I,tracks:D=[]}=await this.getSelfInfo(),a=D.filter(O=>O.mediaType&&q.includes(O.mediaType));a.length!==0&&this.cwsIns.sendMessage({event:"pubNotify",data:{roomId:J,user:{id:I,tracks:a}}})});at(this,On,async q=>new Promise(async(J,I)=>{const{roomId:D,userId:a}=this.options,O={roomId:D,user:{id:a,callAction:q}};await this.cwsIns.sendMessage({event:"updateCall",data:O}).then(async F=>{const{code:z=0}=F;if(z!==200)return I(F);await this.updateUserCallAction(a,q),J(q)}).catch(F=>I(F))}));at(this,Cn,()=>new Promise(async(q,J)=>{try{if(["connecting","connected"].includes(this.cwsIns.state))return q(!0);await this.taskQueue.setCondition("createWs",!1),this.cwsIns.clearEvents(),this.initPeer();const{appid:I,roomId:D,userId:a}=this.options;if(!I)return J("quickvo: createWs is error. You must first use QuickVO.setOptions to set the appid.");const O={c:I,r:D,v:this.sdk_service_version};if(this.isEarly){const z=xt();O.i=z,this.setOptions({earlyId:z})}else O.b=a;this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: createWs",O);const F=btoa(encodeURI(JSON.stringify(O)));await this.cwsIns.connect(F),this.initHeartbeat(),await this.taskQueue.setCondition("createWs",!0),await this.taskQueue.setCondition("createSession",!0),q(!0)}catch(I){console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: createWs is error.",I),this.reportLogs("ws_c_timeout",I.message||I),J(I)}}));at(this,An,async q=>new Promise(async(J,I)=>{await this.taskQueue.createTask({describe:"createTrack",conditionKeys:["createWs","createSession","ice","createTrack","subscribe","renegotiate","closeTrack"],func:()=>new Promise(async(D,a)=>{try{await this.taskQueue.setCondition("createTrack",!1);const O=await this.addSenders(q),F=await this.getSenderTracks(O);if(F.length===0)return await this.taskQueue.setCondition("createTrack",!0),D(!0);this.cwsIns.sendMessage({event:"publish",data:{sdp:this.getSdp(),tracks:F,callAction:0}}).then(async z=>{const{code:K=0,desc:te,data:ne}=z;if(K!==200)return a(te);const{remoteSdp:ee}=ne;await this.setRemoteDescription({type:"answer",sdp:ee}),D(!0)})}catch(O){await this.removeSenders(q),a(O)}}),success:async D=>{J(D)},fail:async D=>{this.reportLogs("publish_error",D.message||D),I(D)},complete:async()=>{await this.taskQueue.setCondition("createTrack",!0)}})}))}}Tn=new WeakMap,Jn=new WeakMap,On=new WeakMap,Cn=new WeakMap,An=new WeakMap;class Room extends RoomCalls{constructor(Z){super(Z)}}class QuickVO extends Room{constructor(q){super(q);at(this,bn,new Map);Ee(this,"reconstruct",async()=>{if(this.cwsIns.state!=="connected")return;this.setRoomState("ready"),this.initMediaPhoneyStreams(),this.taskQueue.clear(),this.initPeer(),this.taskQueue.setCondition("createSession",!0),this.taskQueue.setCondition("ice",!0),await this.createSession();const q=[],J=[],I=await this.getUsers();for(const D of I){const{isSelf:a,callActionMap:O,tracks:F=[]}=D;if(a)for(const z of mediaType_keys)O[z]&&q.push(z);for(const z of F)z.msid&&J.push(z.trackName)}await this.syncRoomInfo(),await this.publish(q),await this.subscribe(J)});at(this,Wn,()=>{{const q=async J=>{const{state:I}=J.data;if(I==="closed"){const{roomId:D,userId:a}=this.options,O={roomId:D,user:{id:a}};this.stopHeartbeat(),this.cwsIns.sendMessage({event:"quitRoom",data:O}),this.cwsIns.close(),this.reportLogs("webrtc_c_timeout","webrtc state is closed.")}};this.cwsIns.addNotify({event:"onRoomState",callback:q},!0)}{const q=async J=>{const{qualities:I=[]}=J.data,[D]=I;if(!(D&&D.userId===this.options.userId&&I.length===1)){for(const a of I){const{userId:O,egress:F,ingress:z}=a;this.checkUserInRoom(O)&&await this.updateUserNetwork(O,{egress:F,ingress:z})}await this.emitNotifyUpdateUsers()}};this.cwsIns.addNotify({event:"onNetQuality",callback:q},!0)}{const q=async J=>{const I=J.data.user;await this.updateUsers([I]),await this.updateUsertracks(I.id,I.track,!1),await this.updateUserBehaviors(I.id,I.behavior),await this.emitNotifyUpdateUsers()};this.cwsIns.addNotify({event:"onJoinRoom",callback:q},!0)}{const q=async J=>{await this.removeUsers([J.data.user.id]),await this.emitNotifyUpdateUsers()};this.cwsIns.addNotify({event:"onQuitRoom",callback:q},!0)}{const q=async J=>{const{user:I}=J.data,{id:D,tracks:a=[],callAction:O=0}=I;if(await this.updateUserCallAction(D,O),await this.updateUserPermissions(D,3),await this.updateUsertracks(D,a,!0),this.options.newPublishAutoSubscribe){const F=this.getTrackNamesFormTracks(a);await this.subscribe(F)}else await this.emitNotifyUpdateUsers()};this.cwsIns.addNotify({event:"onPublish",callback:q},!0)}{const q=async J=>{const I=[J.data];this.subChannel(I)};this.cwsIns.addNotify({event:"onDataChannelPublish",callback:q},!0)}{const q=async J=>{const{id:I,tracks:D}=J.data.user;I!==this.options.userId&&(await this.closeUserTracks(I,D,!0),await this.emitNotifyUpdateUsers())};this.cwsIns.addNotify({event:"onCloseTrack",callback:q},!0)}{const q=async J=>{const{id:I,callAction:D}=J.data.user;this.checkUserInRoom(I)&&(await this.updateUserCallAction(I,D),this.emitNotifyUpdateUsers())};this.cwsIns.addNotify({event:"onUpdateCall",callback:q},!0)}{const q=async J=>{const{user:I}=J.data,{id:D,permissions:a=1}=I;a===1?await this.removeUsers([D]):a===3&&await this.updateUsers([I]),await this.emitNotifyUpdateUsers()};this.cwsIns.addNotify({event:"onUpdatePermissions",callback:q},!0)}{const q=async J=>{const{users:I}=J.data;for(const D of I){const{id:a,behavior:O}=D;await this.updateUserBehaviors(a,O)}await this.emitNotifyUpdateUsers()};this.cwsIns.addNotify({event:"onUpdateBehavior",callback:q},!0)}this.cwsIns.addNotify({event:"onTokenExpired",callback:async q=>this.destroy()},!0),this.cwsIns.addNotify({event:"destroyRoom",callback:this.destroy},!0)});Ee(this,"addNotify",q=>this.cwsIns.addNotify(q));at(this,Vn,()=>{});at(this,Zn,()=>{this.cwsIns.onReconnectSuccess=async()=>{await this.checkInRoom()?await this.reconstruct():this.setRoomState("closed")}});at(this,Kn,async()=>{this.cwsIns.onReconnectStop=async()=>{this.setRoomState("closed")}});Ee(this,"addRequestAnimationFrame",async(q,J)=>{{const D=De(this,bn).get(q);D&&cancelAnimationFrame(D)}const I=(D=Date.now())=>{J(D);const a=requestAnimationFrame(I);De(this,bn).set(q,a)};I()});Ee(this,"clearRequestAnimationFrame",async(q=[])=>{q.length===0&&(q=[...De(this,bn).keys()]);const J=[];for(const I of q){const D=De(this,bn).get(I);D&&(cancelAnimationFrame(D),J.push(D))}return J});Ee(this,"destroy",async()=>{this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: 销毁SDK"),this.cwsIns.emitNotify("onDestroy",{code:200,data:{},desc:"sdk is destroy."}),this.stopLocalStreams(),await new Promise(q=>setTimeout(()=>q(!0),300)),this.stopGetPeerStats(),this.clearUsers(),this.clearUserStreams(),this.cwsIns.clearEvents(),this.cwsIns.close()});De(this,Vn).call(this),De(this,Zn).call(this),De(this,Kn).call(this),De(this,Wn).call(this),this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ffffff;","------->quickvo: quickvo",this)}}bn=new WeakMap,Wn=new WeakMap,Vn=new WeakMap,Zn=new WeakMap,Kn=new WeakMap,exports.QuickVO=QuickVO,exports.ignoreEvent=ignoreEvent,Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})});
206
+ gUn…g= !þ+µèm M½Êê½½²¦é%0Yg~´p5.\Ø®z‚y9%Ôiܒ!Ùc‰ÝŦH>ÓX ÿZR’[¬&ønÇl’Ó_:ïi«ñ<ø"QÚ©yz …®ªOL¥ÎêŠÌÝi?Ê‚'/Ne»:2NÅÝ_òspüR Oø!!ù+##üÓkéªX-fpd“q[U*]@ ö¨5͔pÖYhܪ= › ÛN3{ü® À)¡9þ‘ž-1® ÂcBNö÷0+È6ò„Òэ;lÅ^_>ÓÛQ&jðMIŠì¤³àlS×j΀¢@ȝåÕ¢•­on‡=M°©xÉûÖäav=MM©²öÖ¹?{ß ßî€øyÛ= ‰„0òûÏ4gr’èNÒíÏqëðð-êö¸†ᖥ$¨”Q.Ò4ä¿V$N_Ý><´æë[⑲F#T1É'utÿZXÁ“š(ošàx¡Jo˜"­ö–ùSæ÷ÒUFÓs* U¡ ÓºUµøGáL¨÷©ASjÕ®'!L‹¢ÕvC¿m·Gžâ¼N¹Ÿ³OÃで1T:ê¹\Z£ËZæ.î}ª°O'ãà¾I;ûÁ€HÃä&ÃÐÐK@3EÅÓÉ>½e@ã/òi¡’|ÌE³{ñSCm…ÎëöÁÐÐ%Ó>dš''¶9Á/T.N?äª †æÿÀÐÐ%Ó¶ ö¾ì¦)ÃÕ÷×"e|ÚþBåýrv¶K6“ŸŒöuâÐÌRÎËýæ×%I­OIø¦Ä(HTJ†~),ÕDCWWÃö(›VwV=M§TsLP³ þV'tT#¡ZLŽêé;ßù[`});var fe={a:te};this.setModule=me=>{O.setModule(EmscriptenWASM,me)},this.getModule=()=>O.getModule(EmscriptenWASM),this.instantiate=()=>(this.getModule().then(me=>WebAssembly.instantiate(me,fe)).then(me=>{const Re=me.exports;ie(Re),f=Re.g,k(),we(Re),N()}),this.ready=new Promise(me=>{N=me}).then(()=>{this.HEAP=f.buffer,this.malloc=re,this.free=ue,this.opus_frame_decoder_create=ye,this.opus_frame_decode_float_deinterleaved=de,this.opus_frame_decoder_destroy=se}),this)}function OpusDecoder(O={}){OpusDecoder.errors||Object.defineProperties(OpusDecoder,{errors:{value:new Map([[-1,"OPUS_BAD_ARG: One or more invalid/out of range arguments"],[-2,"OPUS_BUFFER_TOO_SMALL: Not enough bytes allocated in the buffer"],[-3,"OPUS_INTERNAL_ERROR: An internal error was detected"],[-4,"OPUS_INVALID_PACKET: The compressed data passed is corrupted"],[-5,"OPUS_UNIMPLEMENTED: Invalid/unsupported request number"],[-6,"OPUS_INVALID_STATE: An encoder or decoder structure is invalid or already freed"],[-7,"OPUS_ALLOC_FAIL: Memory allocation has failed"]])}}),this._init=()=>new this._WASMAudioDecoderCommon(this).instantiate(this._EmscriptenWASM,this._module).then(M=>{this._common=M,this._inputBytes=0,this._outputSamples=0,this._frameNumber=0,this._input=this._common.allocateTypedArray(this._inputSize,Uint8Array),this._output=this._common.allocateTypedArray(this._outputChannels*this._outputChannelSize,Float32Array);const Z=this._common.allocateTypedArray(this._channels,Uint8Array);Z.buf.set(this._channelMappingTable),this._decoder=this._common.wasm.opus_frame_decoder_create(this._sampleRate,this._channels,this._streamCount,this._coupledStreamCount,Z.ptr,this._preSkip,this._forceStereo)}),Object.defineProperty(this,"ready",{enumerable:!0,get:()=>this._ready}),this.reset=()=>(this.free(),this._init()),this.free=()=>{this._common.free(),this._common.wasm.opus_frame_decoder_destroy(this._decoder),this._common.wasm.free(this._decoder)},this._decode=M=>{if(!(M instanceof Uint8Array))throw Error("Data to decode must be Uint8Array. Instead got "+typeof M);this._input.buf.set(M);let Z=this._common.wasm.opus_frame_decode_float_deinterleaved(this._decoder,this._input.ptr,M.length,this._output.ptr),J;return Z<0&&(J="libopus "+Z+" "+(OpusDecoder.errors.get(Z)||"Unknown Error"),console.error(J),Z=0),{outputBuffer:this._common.getOutputChannels(this._output.buf,this._outputChannels,Z),samplesDecoded:Z,error:J}},this.decodeFrame=M=>{let Z=[];const J=this._decode(M);return J.error&&this._common.addError(Z,J.error,M.length,this._frameNumber,this._inputBytes,this._outputSamples),this._frameNumber++,this._inputBytes+=M.length,this._outputSamples+=J.samplesDecoded,this._WASMAudioDecoderCommon.getDecodedAudioMultiChannel(Z,[J.outputBuffer],this._outputChannels,J.samplesDecoded,this._sampleRate)},this.decodeFrames=M=>{let Z=[],J=[],z=0,Q=0;for(;Q<M.length;){const ee=M[Q++],Y=this._decode(ee);Z.push(Y.outputBuffer),z+=Y.samplesDecoded,Y.error&&this._common.addError(J,Y.error,ee.length,this._frameNumber,this._inputBytes,this._outputSamples),this._frameNumber++,this._inputBytes+=ee.length,this._outputSamples+=Y.samplesDecoded}return this._WASMAudioDecoderCommon.getDecodedAudioMultiChannel(J,Z,this._outputChannels,z,this._sampleRate)},this._isWebWorker=OpusDecoder.isWebWorker,this._WASMAudioDecoderCommon=OpusDecoder.WASMAudioDecoderCommon||WASMAudioDecoderCommon,this._EmscriptenWASM=OpusDecoder.EmscriptenWASM||EmscriptenWASM,this._module=OpusDecoder.module;const N=8,I=M=>typeof M=="number",D=O.sampleRate,f=O.channels,k=O.streamCount,i=O.coupledStreamCount,c=O.channelMappingTable,$=O.preSkip,C=O.forceStereo?1:0;if(f>2&&(!I(k)||!I(i)||!Array.isArray(c)))throw new Error("Invalid Opus Decoder Options for multichannel decoding.");return this._sampleRate=[8e3,12e3,16e3,24e3,48e3].includes(D)?D:48e3,this._channels=I(f)?f:2,this._streamCount=I(k)?k:1,this._coupledStreamCount=I(i)?i:this._channels-1,this._channelMappingTable=c||(this._channels===2?[0,1]:[0]),this._preSkip=$||0,this._forceStereo=f<=N&&f!=2?C:0,this._inputSize=32e3*.12*this._channels,this._outputChannelSize=120*48,this._outputChannels=this._forceStereo?2:this._channels,this._ready=this._init(),this}class OpusDecoderWebWorker extends WASMAudioDecoderWorker{constructor(N){super(N,"opus-decoder",OpusDecoder,EmscriptenWASM)}async decodeFrame(N){return this.postToDecoder("decodeFrame",N)}async decodeFrames(N){return this.postToDecoder("decodeFrames",N)}}assignNames(OpusDecoder,"OpusDecoder"),assignNames(OpusDecoderWebWorker,"OpusDecoderWebWorker"),new OpusDecoder;class RoomPeer extends RoomUsers{constructor(I){super(I);_e(this,"getPeerStatsTimer",0);_e(this,"reports",[]);_e(this,"candidates",[]);Ge(this,Tn,[]);Ge(this,vn,0);_e(this,"peerNetwork",{inboundBytes:0,outboundBytes:0,lostRate:"0.00",roundTripTime:"0",jitter:"0"});_e(this,"initPeer",()=>{var I;clearTimeout(Oe(this,vn)),this.transceiverMap=new Map,(I=this.peerIns)==null||I.close(),this.peerIns=void 0,this.peerIns=new RTCPeerConnection({iceServers:[{urls:"stun:stun.cloudflare.com:3478"}],bundlePolicy:"max-bundle"}),this.peerIns.createDataChannel("scapegoat-channel"),Oe(this,Pn).call(this),Oe(this,Ln).call(this)});_e(this,"getNatType",()=>"normal");_e(this,"initSendChannel",(I="",D)=>{});_e(this,"initReceiveChannel",(I="",D)=>{});_e(this,"replaceSenderStream",async(I=[],D)=>{const{userId:f}=this.options;I.length===0&&(I=mediaType_keys);for(const k of I){const i=this.transceiverMap.get(k);let c;if(i){const{sender:$}=i;D?c=this.getUserStream(f,k):c=this.getPhoneyStreams(k);const[C]=c.getTracks();C&&await $.replaceTrack(C)}}});_e(this,"getSenderTracks",async(I=[])=>{const D=[];for(const f of I){const k=this.transceiverMap.get(f);if(!k)continue;const{mid:i,sender:c}=k,{track:$}=c;if(!$)continue;const{id:C,enabled:M}=$,Z=mediaType_keys.findIndex(z=>z===f),J={type:Z,enabled:M,trackName:`web-${Z}-${C}`,location:"local",mid:i};D.push(J)}return D});_e(this,"addSenders",async(I=[])=>{I.length===0&&(this.peerIns.addTransceiver("audio",{direction:"sendonly"}),this.peerIns.addTransceiver("video",{direction:"sendonly"}));const D=[];for(const f of I){if(this.transceiverMap.get(f))continue;const i=this.getPhoneyStreams(f),[c]=i.getTracks(),$=this.peerIns.addTransceiver(c,{direction:"sendonly"});this.transceiverMap.set(f,$),D.push(f)}if(I.length===0||D.length!==0){const f=await this.peerIns.createOffer();if(this.options.debug){const k=libExports$1.parse(f.sdp),i=dt(k.media,["mid","msid","type"]);console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ffffff;","------->quickvo: setLocalDescription",{msidArr:i,sdpJson:k,description:f})}await this.peerIns.setLocalDescription(f)}return D});_e(this,"removeSenders",async(I=[])=>{I.length===0&&(I=mediaType_keys);for(const D of I)this.transceiverMap.has(D)&&this.transceiverMap.delete(D)});_e(this,"onSubscribeUserTracks",I=>{let D=0;return new Promise(async f=>{const k=[];for(const i of I){const{tracks:c=[]}=i;for(const $ of c){const{trackName:C,mid:M}=$,[Z]=await this.getUserTrackByTrackName([C]);k.push({...Z,mid:M})}}{let i=[];const c=async()=>{clearTimeout(D);const C=new Map;for(const Z of i){const{userId:J,mediaType:z}=Z;if(!J||!z)continue;C.has(J)||C.set(J,{userId:J,tracks:[],updateStreams:{}});const ee=C.get(J);ee.tracks.push(Z),ee.updateStreams[z]=!0}const M=[...C.values()];for(const Z of M){const{userId:J,tracks:z}=Z;await this.updateUsertracks(J,z,!0)}await this.emitNotifyUpdateUsersStreams(M),this.peerIns.removeEventListener("track",$);{const Z=Array.from(k,Q=>Q.trackName),J=Array.from(i,Q=>Q.trackName),z=Z.filter(Q=>!J.includes(Q));f({target:Z,success:J,fail:z})}},$=async C=>{const{streams:M,transceiver:Z}=C,[J]=M,{mid:z,receiver:Q}=Z,{track:ee}=Q,{id:Y}=ee,te=k.find(re=>re.mid===`${z}`);if(!te)return;const{userId:ie,mediaType:ye}=te;if(!(!ie||!ye)){{const re={...te,mid:z,msid:Y};i.push(re)}this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#00b60f;",`------->quickvo: await subscribe ${i.length}/${k.length}`,{mediaType:ye,mid:z,userTrack:te,e:C});{const re=new Audio;if(re.srcObject=J,await this.initUserMediaStreamContext(ie,ye,J),ye==="microphoneCamera_audio"||ye==="screenSharing_audio"){const de=this.getUserAudioMediaStreamContext(ie,ye);de==null||de.setMute(!1)}}k.length===i.length&&c()}};this.peerIns.addEventListener("track",$),D=window.setTimeout(()=>{this.reportLogs("subscribe_error",`incomplete subscription. (${i.length}/${k.length})`),c()},5*1e3)}})});Ge(this,Pn,()=>{const I=()=>{this.peerIns.close(),this.setRoomState("closed")};this.peerIns.oniceconnectionstatechange=async()=>{const D=this.peerIns.iceConnectionState;switch(clearTimeout(Oe(this,vn)),D){case"connected":{this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#00b60f;",`------->quickvo: connectionState:${D}`),this.setRoomState("connected");for(const f of Oe(this,Tn))await f()}break;case"disconnected":this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#b64900;",`------->quickvo: connectionState:${D}`),kt(this,vn,window.setTimeout(I,30*1e3));break;case"failed":this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#b60000;",`------->quickvo: connectionState:${D}`),this.setRoomState("failed");break;case"closed":this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#b60000;",`------->quickvo: connectionState:${D}`),I();break;default:this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#b64900;",`------->quickvo: connectionState:${D}`);break}}});_e(this,"iceConnected",()=>new Promise(I=>{if(this.peerIns.iceConnectionState==="connected")return I(!0);Oe(this,Tn).push(I)}));_e(this,"closeUserTracks",async(I,D=[],f=!1)=>{const k=[];for(const C of D){const{trackName:M,msid:Z}=C;k.push(M),Z&&k.push(Z)}const i=C=>k.includes(C),c=this.peerIns.getTransceivers();for(const C of c){const{mid:M,sender:Z,receiver:J}=C;Z.track&&i(Z.track.id)&&(C.stop(),this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;",`------->quickvo: transceiver.sender: ${M} is stop.`,C)),J.track&&i(J.track.id)&&(C.stop(),this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;",`------->quickvo: transceiver.receiver: ${M} is stop.`,C))}const $=await this.getUser(I);if($){for(const C of $.tracks){const{trackName:M,msid:Z,userId:J,mediaType:z}=C;!J||!z||!i(M)||(this.removeUserMediaStreamContext(J,z),Z&&delete C.msid)}if(f){const C=$.tracks.filter(({trackName:M})=>!i(M));await this.updateUsertracks(I,C,!1)}}});_e(this,"createOffer",async()=>{const I=await this.peerIns.createOffer();if(this.options.debug){const D=libExports$1.parse(I.sdp),f=dt(D.media,["mid","msid","type"]);console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ffffff;","------->quickvo: createOffer",{msidArr:f,sdpJson:D,description:I})}await this.peerIns.setLocalDescription(I)});_e(this,"createAnswer",async()=>{const I=await this.peerIns.createAnswer();if(this.options.debug){const D=libExports$1.parse(I.sdp),f=dt(D.media,["mid","msid","type"]);console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ffffff;","------->quickvo: createAnswer",{msidArr:f,sdpJson:D,description:I})}await this.peerIns.setLocalDescription(I)});_e(this,"getSdp",()=>{var I;return(I=this.peerIns.localDescription)==null?void 0:I.sdp});_e(this,"setRemoteDescription",async I=>{if(this.options.debug){const D=libExports$1.parse(I.sdp),f=dt(D.media,["mid","msid","type"]);console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ffffff;","------->quickvo: setRemoteDescription",{msidArr:f,sdpJson:D,description:I})}return await this.peerIns.setRemoteDescription(I),I});_e(this,"setCallStrategy",async(I,D=[])=>{D.length===0&&(D=mediaType_keys);let f="balanced";switch(I){case"qualityPriority":f="maintain-resolution";break;case"fluencyPriority":f="maintain-framerate";break;case"balancedDowngrade":f="balanced";break}const k=await this.getSelfInfo(),i=Array.from(k.tracks,({trackName:$})=>$),c=this.peerIns.getSenders();for(const $ of c){const{track:C}=$;if(!C||!i.includes(C.id))continue;const M=$.getParameters();$.setParameters({...M,degradationPreference:f})}});_e(this,"setRTCRtpSenderParameters",I=>{try{const D=this.peerIns.getSenders();for(const f of D){const k=f.getParameters();f.setParameters({...k,...I})}}catch(D){console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: setRTCRtpSenderParameters is error.",D)}});_e(this,"getReportsByMid",async(I=[])=>I.length===0?this.reports:this.reports.filter(D=>I.includes(D.mid)));_e(this,"getRoomNetwork",()=>this.peerNetwork);_e(this,"getPeerNetwork",()=>this.peerNetwork);Ge(this,Un,async()=>{try{const I=await this.peerIns.getStats(),D=["inbound-rtp","remote-inbound-rtp","outbound-rtp","transport"],k=[...I.values()].filter(de=>D.includes(de.type));let i=0,c=0,$=0,C=0,M=0,Z=0,J=[],z=[];for(const de of this.reports){const{packetsSent:se,packetsLost:ue}=de;se&&($+=se),ue&&(C+=ue)}this.reports=k;for(const de of this.reports){const{bytesSent:se,bytesReceived:ue,packetsSent:he,packetsLost:we,roundTripTime:fe,jitter:me}=de;se&&(c=se),ue&&(i=ue),he&&(M+=he),we&&(Z+=we),fe&&J.push((fe*100).toFixed(2)),me&&z.push(me.toFixed(2))}z.sort().reverse(),J.sort().reverse();const Q=M-$,ee=Z-C,Y=Q===0?"0.00":(ee/Q).toFixed(2),[te="0"]=J,[ie="0"]=z,ye={outboundBytes:c,inboundBytes:i,lostRate:Y,roundTripTime:te,jitter:ie};this.peerNetwork=ye;const re=(de,se,ue)=>{const he=Number(de),we=Number(se),fe=Number(ue);let me="0";return he<.03&&we<100&&fe<.05?me="5":he<.06&&we<160&&fe<.1?me="4":he<.1&&we<250&&fe<.15?me="3":he<.15&&we<400&&fe<.2?me="2":me="1",Number(me)};{const de=re(Y,te,ie),se=await this.getSelfInfo(),{network:ue}=se,he={egress:de,ingress:de};$t("updateUserNetwork",async()=>{if(await this.updateUserNetwork(this.options.userId,he),JSON.stringify(ue)!==JSON.stringify(he)){this.emitNotifyUpdateUsers();const{userId:me,roomId:Re}=this.options;this.cwsIns.sendMessage({event:"networkQualityChange",data:{...he,userId:me,roomId:Re}},!1)}},3*1e3)}}catch(I){console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: setNetQuality is err.",I)}});Ge(this,Ln,()=>{const I=async()=>{this.peerIns.connectionState!=="connected"||!this.options.roomId||Oe(this,Un).call(this)};this.getPeerStatsTimer=window.setInterval(I,1*1e3)});_e(this,"stopGetPeerStats",()=>clearInterval(this.getPeerStatsTimer))}}Tn=new WeakMap,vn=new WeakMap,Pn=new WeakMap,Un=new WeakMap,Ln=new WeakMap;class RoomCalls extends RoomPeer{constructor(I){super(I);Ge(this,bn,0);Ge(this,On,[]);_e(this,"setLocalStream",(I,D)=>new Promise(async(f,k)=>{try{typeof I=="string"&&(I=[I]);for(const c of I)this.localStreamsActionMap.set(c,D);if(D){if(I.includes("microphoneCamera_audio")&&I.includes("microphoneCamera_video")?await this.initLocalStream("microphoneCamera"):I.includes("microphoneCamera_audio")?await this.initLocalStream("microphoneCamera_audio"):I.includes("microphoneCamera_video")?await this.initLocalStream("microphoneCamera_video"):I.includes("screenSharing_audio")&&I.includes("screenSharing_video")?await this.initLocalStream("screenSharing"):I.includes("screenSharing_audio")&&!I.includes("screenSharing_video")?await this.initLocalStream("screenSharing_audio"):I.includes("screenSharing_video")&&!I.includes("screenSharing_audio")&&await this.initLocalStream("screenSharing_video"),I.includes("screenSharing_audio")){const c=await this.getLocalStream("screenSharing_audio");if(c){const $=c.getTracks();for(const C of $)C.onended=()=>this.stopPublish(["screenSharing_audio","screenSharing_video"])}}if(I.includes("screenSharing_video")){const c=await this.getLocalStream("screenSharing_video");if(c){const $=c.getTracks();for(const C of $)C.onended=()=>this.stopPublish(["screenSharing_audio","screenSharing_video"])}}}else await this.stopLocalStreams(I);const i=await this.getLocalStreams(I);await this.cwsIns.emitNotify("onLocalStream",{code:200,data:i,desc:"local stream is change."}),f(i)}catch(i){k(i)}}));_e(this,"setMediaDeviceKind",(I,D)=>new Promise(async(f,k)=>{this.setDeviceKind(I,D);const i=await this.getSelfInfo(),{id:c,tracks:$=[],callActionMap:C}=i,M=[],Z=async J=>{const z=this.localStreamsActionMap.get(J),Q=$.find(Y=>Y.mediaType===J),ee=C[J];if(z){M.push(J),await this.stopLocalStreams([J]);try{await this.initLocalStream(J)}catch(Y){this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: initLocalStream is error.",Y),await this.inactiveTracks([J],!1),k(Y)}}if(Q){const Y=await this.getLocalStream(J);Y&&(await this.initUserMediaStreamContext(c,J,Y),ee&&await this.replaceSenderStream([J],!0))}{const Y=await this.getLocalStreams(M);await this.cwsIns.emitNotify("onLocalStream",{code:200,data:Y,desc:"local stream is change."}),await this.emitNotifyUpdateUsers(),f(!0)}};I==="audioinput"&&await Z("microphoneCamera_audio"),I==="videoinput"&&await Z("microphoneCamera_video"),I==="audiooutput"&&(await this.changeAudiooutput(),f(!0))}));_e(this,"changeScreenSharing",async I=>{const D=await this.getSelfInfo(),{tracks:f=[],callActionMap:k}=D;try{await this.setLocalStream(I,!0);for(const i of I)f.find($=>$.mediaType===i&&k[i])&&await this.replaceSenderStream([i],!0)}catch(i){this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: changeScreenSharing is error.",i)}});_e(this,"createSession",()=>new Promise(async(I,D)=>{try{await this.addSenders(),await this.cwsIns.sendMessage({event:"connectCF",data:{sdp:this.getSdp()}}).then(async f=>{const{code:k=0,desc:i,data:c}=f;if(k!==200)throw new Error(i);const{remoteSdp:$}=c;if(this.options.debug){const C=libExports$1.parse($),M=dt(C.media,["mid","msid","type"]);console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ffffff;","------->quickvo: setLocalDescription",{msidArr:M,sdpJson:C})}await this.setRemoteDescription({type:"answer",sdp:$}),await this.iceConnected().then(()=>{I(!0)})})}catch(f){D(f)}}));_e(this,"earlyConnect",(I=[])=>{this.isEarly=!0;const D=()=>new Promise(f=>{Oe(this,En).call(this).then(async()=>{await this.createSession(),I.length===0&&(I=["microphoneCamera_audio","microphoneCamera_video"]),await Oe(this,In).call(this,I),f(!0)})});this.asyncQueue.add(D,{describe:"earlyConnect"})});_e(this,"joinRoom",async I=>new Promise(async(D,f)=>{try{this.setOptions(I),this.asyncQueue.clear(),this.isEarly===!1&&await Oe(this,En).call(this),await Oe(this,Fn).call(this),this.clearUsers();const{roomId:k,userId:i,callType:c,sdkToken:$}=this.options;await this.cwsIns.sendMessage({event:this.isEarly?"joinRoomEx":"joinRoom",data:{callType:c,roomId:k,user:{id:i,tracks:[],callAction:0},token:$},version:2}).then(async C=>{const{code:M=0,desc:Z="服务器繁忙",data:J}=C;if(M!==200)throw new Error(Z);const{roomId:z="",roomUsers:Q=[]}=J;if(z!==k)return f("加入的房间不匹配");this.isInRoom=!0,this.initHeartbeat(),this.isEarly===!1&&await this.createSession(),await this.updateUsers(Q);const ee=[];for(const te of Q){const{id:ie,channelCache:ye}=te,{channels:re=[]}=ye;await this.updateUserBehaviors(ie,te.behavior),await this.updateUserChannels(ie,re,!1),re.length!==0&&ee.push({userId:ie,channels:re})}await this.subChannel(ee),await this.emitNotifyUpdateUsers();const Y=await this.getUsers();D(Y)})}catch(k){f(k)}}));_e(this,"quitRoom",()=>new Promise(async I=>{const{roomId:D,userId:f}=this.options,k={roomId:D,user:{id:f}};try{this.isInRoom=!1,this.asyncQueue.clear(),clearInterval(Oe(this,bn)),await this.stopLocalStreams(),this.stopSubscribe(),this.stopGetPeerStats(),this.clearUsers(),this.clearUserStreams(),this.cwsIns.clearEvents(),this.setRoomState("ready")}catch(i){this.reportLogs("quit_room_error",i.message||i)}await new Promise(i=>setTimeout(()=>i(!0),300)),await this.cwsIns.sendMessage({event:"quitRoom",data:k}),I(!0)}));_e(this,"quitRoomEx",()=>new Promise(async I=>{const{roomId:D,userId:f}=this.options,k={roomId:D,user:{id:f}};try{this.isInRoom=!1,this.asyncQueue.clear(),this.stopHeartbeat(),this.initHeartbeat(),await this.stopLocalStreams(),this.stopSubscribe(),this.stopGetPeerStats(),this.clearUsers(),this.clearUserStreams()}catch(i){this.reportLogs("quit_room_error",i.message||i)}await new Promise(i=>setTimeout(()=>i(!0),300)),this.cwsIns.sendMessage({event:"quitRoomEx",data:k}),I(!0)}));_e(this,"syncRoomInfo",()=>new Promise(async(I,D)=>{const{userId:f}=this.options,k=await this.getUser(f),{id:i=f,callAction:c=0}=k;await this.cwsIns.sendMessage({event:"syncRoomInfo",data:{user:{id:i,callAction:c}}}).then(async $=>{const{code:C=0,desc:M}=$;if(C!==200)throw new Error(M);const Z=$.data.users;this.clearUsers(),await this.updateUsers(Z),await this.updateUsertracks(k.id,k.tracks,!1);{const J=await this.getUsers();I(J)}}).catch($=>D($))}));_e(this,"checkInRoom",()=>new Promise(async I=>{const{userId:D}=this.options,f=await this.getUser(D),{id:k=D,callAction:i=0}=f;await this.cwsIns.sendMessage({event:"syncRoomInfo",data:{user:{id:k,callAction:i}}}).then(async c=>{var J;const{code:$=0,desc:C}=c;if($!==200)throw new Error(C);const M=c.data.users;return(J=c.data)!=null&&J.isActive||M.find(z=>z.id===this.options.userId)?I(!0):I(!1)}).catch(()=>I(!1))}));_e(this,"publish",I=>{const D=()=>new Promise(async(f,k)=>{try{{const J=await this.getSelfInfo(),{banBehaviorMap:z}=J;let Q=!0;for(const ee of I)if(z[ee]){Q=!1;break}if(Q===!1)return k("publish is error: prohibited by administrator.")}try{await this.setLocalStream(I,!0)}catch(J){this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: setLocalStream is error.",J)}const i=await this.getSelfInfo(),c=[];for(const J of I){{const z=this.getPhoneyStreams(J);await this.initUserMediaStreamContext(i.id,J,z)}{const z=await this.getLocalStream(J);z?await this.initUserMediaStreamContext(i.id,J,z):c.push(J)}}const $=I.filter(J=>!c.includes(J)||["microphoneCamera_audio","microphoneCamera_video"].includes(J));await this.replaceSenderStream(I,!1),await Oe(this,In).call(this,$);const C=await this.getSenderTracks($),M=[...i.tracks,...C];await this.updateUsertracks(i.id,M,!0),c.length!==0&&await this.inactiveTracks(c,!1),$.length!==0&&await this.replaceSenderStream($,!0);const Z=await this.getCallAction(M);await Oe(this,_n).call(this,Z),await new Promise(J=>setTimeout(()=>J(!0),230)),Oe(this,Hn).call(this,I);{await this.emitNotifyUpdateUsers();const J=await this.getSelfInfo();f(J)}}catch(i){this.reportLogs("publish_error",i.message||i),k(i)}});return this.asyncQueue.add(D,{describe:"publish"})});_e(this,"stopPublish",(I=[])=>{const D=()=>new Promise(async(f,k)=>{try{const i=await this.getSelfInfo();I.length===0&&(I=mediaType_keys);const c=i.tracks.filter(({mediaType:C})=>C&&I.includes(C)),$=async()=>{this.initMediaPhoneyStreams(I);const C=await this.getSelfInfo();await this.emitNotifyUpdateUsers(),f(C)};if(c.length===0)return $();await this.replaceSenderStream(I,!0),await this.closeUserTracks(i.id,c,!0),await this.removeSenders(I);{const C=await this.getCallAction(i.tracks);await Oe(this,_n).call(this,C)}await this.createOffer(),await this.cwsIns.sendMessage({event:"closeTrack",data:{roomId:this.options.roomId,sdp:this.getSdp(),tracks:c}}).then(async C=>{const{code:M=0,data:Z,desc:J}=C;if(M!==200)throw new Error(J);const{remoteSdp:z}=Z;await this.setRemoteDescription({type:"answer",sdp:z}),$()})}catch(i){this.reportLogs("close_track_error",i.message||i),k(i)}});return this.asyncQueue.add(D,{describe:"stopPublish"})});_e(this,"subscribe",(I=[],D=3)=>{const f=()=>new Promise(async(k,i)=>{try{await this.iceConnected();const c=await this.getUsers();let $=[];for(const J of c){const{isSelf:z,tracks:Q=[]}=J;if(!z){const ee=Q.filter(({trackName:Y,mid:te=""})=>te!==""&&(I.includes(Y)||I.length===0));ee.length!==0&&$.push({...J,tracks:ee})}}const C=async(J={})=>{const z=Array.from($,({id:ee})=>ee),Q=await this.getUsers(z);await this.emitNotifyUpdateUsers(),k({users:Q,detail:J})};if($.length===0)return C();const M=[];for(const J of $){const{id:z,tracks:Q}=J,ee=dt(Q,["type","trackName"]),Y={id:z,tracks:ee};M.push(Y)}const Z=async()=>{await this.cwsIns.sendMessage({event:"subscribe",data:{users:M}}).then(async J=>{const{code:z=0,data:Q,desc:ee}=J;if(z===2017&&ee.includes("renegotiation is expected before pulling or pushing tracks")&&await this.renegotiate(),z!==200){if(D>=0)return D--,await Z();throw new Error(ee)}const{remoteSdp:Y,users:te=[]}=Q;this.onSubscribeUserTracks(te).then(async ie=>{await this.renegotiate().then(()=>C(ie))}).catch(ie=>{throw new Error(ie)}),await this.setRemoteDescription({type:"offer",sdp:Y})})};await Z()}catch(c){this.reportLogs("subscribe_error",c.message||c),i(c)}});return this.asyncQueue.add(f,{describe:"subscribe"})});_e(this,"renegotiate",()=>new Promise(async(I,D)=>{try{await this.createAnswer(),await this.cwsIns.sendMessage({event:"renegotiate",data:{sdp:this.getSdp()}}).then(f=>{const{code:k=0,desc:i}=f;if(k!==200)throw new Error(i);I(f)})}catch(f){D(f)}}));_e(this,"stopSubscribe",(I=[])=>{const D=()=>new Promise(async(f,k)=>{try{const i=await this.getUsers(),c=[];for(const C of i){const{tracks:M=[]}=C;for(const Z of M){const{type:J,mid:z,trackName:Q,mediaType:ee,msid:Y}=Z;if(!(!ee||!Y)&&(I.length===0||I.includes(Q))){const te={type:J,mid:z,trackName:Y};c.push(te),await this.closeUserTracks(C.id,[Z])}}}const $=async()=>{await this.emitNotifyUpdateUsers(),f(!0)};if(c.length===0)return $();await this.createOffer(),await this.cwsIns.sendMessage({event:"closeTrack",data:{roomId:this.options.roomId,sdp:this.getSdp(),tracks:c}}).then(async C=>{const{remoteSdp:M}=C.data;await this.setRemoteDescription({type:"answer",sdp:M})}),$()}catch(i){this.reportLogs("close_track_error",i.message||i),k(i)}});return this.asyncQueue.add(D,{describe:"stopSubscribe"})});_e(this,"inactiveTracks",async(I,D)=>new Promise(async f=>{const k=await this.getSelfInfo();if(!k||!k.id)return f(!0);const{tracks:i=[]}=k,c=[...i];for(let C of c){const{mediaType:M}=C;if(M&&I.includes(M)){C.enabled=D;const Z=await this.getLocalStream(M);if(!Z)continue;const J=Z.getTracks();for(const z of J)z.enabled=D}}await this.replaceSenderStream(I,D);const $=await this.getCallAction(c);await Oe(this,_n).call(this,$),await this.emitNotifyUpdateUsers(),f(!0)}));_e(this,"setBanBehaviors",I=>new Promise(async(D,f)=>{try{const{roomId:k}=this.options,i=[];for(const c of I){const{id:$,banBehaviors:C}=c,M=Object.keys(C);if(M.length===0)continue;const Z=[];for(const z of M){const Q=mediaType_keys.findIndex(te=>te===z),ee=C[z],Y={type:Q,behavior:ee};Z.push(Y)}const J={id:$,behaviors:Z};i.push(J)}await this.cwsIns.sendMessage({event:"preventUsersBehavior",data:{roomId:k,users:i}}).then(async c=>{const{code:$=0,desc:C}=c;if($!==200)return f(C);D(c)})}catch(k){f(k)}}));_e(this,"pubChannel",()=>new Promise(async(I,D)=>{const k=[{dataChannelName:"web-channe"}];await this.cwsIns.sendMessage({event:"pubChannel",data:{channels:k}}).then(async i=>{const{code:c=0,data:$,desc:C}=i;if(c!==200)throw new Error(C);const{channels:M=[]}=$;for(const Z of M){const{channels:J=[]}=Z;for(const z of J){const{dataChannelName:Q,id:ee}=z;this.initSendChannel(Q,ee)}}I(!0)}).catch(i=>{D(i)})}));_e(this,"subChannel",(I=[])=>new Promise(async D=>{if(I.length===0)return D(!0);await this.cwsIns.sendMessage({event:"subChannel",data:{channels:I}}).then(async f=>{const{code:k=0,data:i,desc:c}=f;if(k!==200)throw new Error(c);const{channels:$=[]}=i;for(const C of $){const{channels:M=[]}=C;for(const Z of M){const{dataChannelName:J,id:z}=Z;this.initReceiveChannel(J,z)}}})}));_e(this,"debugger",()=>new Promise(async(I,D)=>{await this.cwsIns.sendMessage({event:"debugger"},!1).then(async f=>{if(f.code!==200)return D(f.desc);I(!0)}).catch(f=>{D(f)})}));_e(this,"shutdown",()=>new Promise(async(I,D)=>{await this.cwsIns.sendMessage({event:"shutdown"},!1).then(async f=>{if(f.code!==200)return D(f.desc);I(!0)}).catch(f=>{D(f)})}));_e(this,"initHeartbeat",()=>{this.stopHeartbeat();const I=()=>this.cwsIns.sendMessage({event:this.isInRoom?"heartbeat":"heartbeatEx"},!1),D=this.isInRoom?5*1e3:30*1e3;kt(this,bn,window.setInterval(I,D)),I()});_e(this,"stopHeartbeat",()=>{clearInterval(Oe(this,bn))});Ge(this,Hn,async I=>new Promise(async(D,f)=>{try{const{roomId:k}=this.options;if(!k)return;const{id:i,tracks:c=[]}=await this.getSelfInfo(),$=c.filter(C=>C.mediaType&&I.includes(C.mediaType));if($.length===0)return;await this.cwsIns.sendMessage({event:"pubNotify",data:{roomId:k,user:{id:i,tracks:$}}}),D(!0)}catch(k){f(k)}}));Ge(this,_n,async I=>new Promise(async(D,f)=>{const{roomId:k,userId:i}=this.options,c={roomId:k,user:{id:i,callAction:I}};await this.cwsIns.sendMessage({event:"updateCall",data:c}).then(async $=>{const{code:C=0}=$;if(C!==200)return f($);await this.updateUserCallAction(i,I),D(I)}).catch($=>f($))}));Ge(this,En,()=>new Promise(async(I,D)=>{try{if(["connecting","connected"].includes(this.cwsIns.state))return I(!0);this.cwsIns.clearEvents(),this.initPeer();const{appid:f,roomId:k,userId:i}=this.options;if(!f)return D("quickvo: createWs is error. You must first use QuickVO.setOptions to set the appid.");const c={c:f,r:k,v:this.sdk_service_version};if(this.isEarly){const C=xt();c.i=C,this.setOptions({earlyId:C})}else c.b=i;this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: createWs",c);const $=btoa(encodeURI(JSON.stringify(c)));await this.cwsIns.connect($),this.initHeartbeat();for(const C of Oe(this,On))await C();I(!0)}catch(f){console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: createWs is error.",f),this.reportLogs("ws_c_timeout",f.message||f),D(f)}}));Ge(this,In,async I=>new Promise(async(D,f)=>{try{await this.iceConnected();const k=await this.addSenders(I),i=await this.getSenderTracks(k);if(i.length===0)return D(!0);await this.cwsIns.sendMessage({event:"publish",data:{sdp:this.getSdp(),tracks:i,callAction:0}}).then(async c=>{const{code:$=0,desc:C,data:M}=c;if($!==200)throw new Error(C);const{remoteSdp:Z}=M;await this.setRemoteDescription({type:"answer",sdp:Z}),D(!0)})}catch(k){this.reportLogs("publish_error",k.message||k),await this.removeSenders(I),f(k)}}));Ge(this,Fn,()=>new Promise(I=>{if(this.cwsIns.state==="connected")return I(!0);Oe(this,On).push(I)}))}}bn=new WeakMap,On=new WeakMap,Hn=new WeakMap,_n=new WeakMap,En=new WeakMap,In=new WeakMap,Fn=new WeakMap;class Room extends RoomCalls{constructor(N){super(N)}}class QuickVO extends Room{constructor(I){super(I);Ge(this,fn,new Map);_e(this,"reconstruct",async()=>{if(this.cwsIns.state!=="connected")return;this.setRoomState("ready"),this.initMediaPhoneyStreams(),this.asyncQueue.clear(),this.initPeer(),await this.createSession();const I=[],D=[],f=await this.getUsers();for(const k of f){const{isSelf:i,callActionMap:c,tracks:$=[]}=k;if(i)for(const C of mediaType_keys)c[C]&&I.push(C);for(const C of $)C.msid&&D.push(C.trackName)}await this.syncRoomInfo(),await this.publish(I),await this.subscribe(D)});Ge(this,jn,()=>{{const I=async D=>{const{state:f}=D.data;if(f==="closed"){const{roomId:k,userId:i}=this.options,c={roomId:k,user:{id:i}};this.stopHeartbeat(),this.cwsIns.sendMessage({event:"quitRoom",data:c}),this.cwsIns.close(),this.reportLogs("webrtc_c_timeout","webrtc state is closed.")}};this.cwsIns.addNotify({event:"onRoomState",callback:I},!0)}{const I=async D=>{const{qualities:f=[]}=D.data,[k]=f;if(!(k&&k.userId===this.options.userId&&f.length===1)){for(const i of f){const{userId:c,egress:$,ingress:C}=i;this.checkUserInRoom(c)&&await this.updateUserNetwork(c,{egress:$,ingress:C})}await this.emitNotifyUpdateUsers()}};this.cwsIns.addNotify({event:"onNetQuality",callback:I},!0)}{const I=async D=>{const f=D.data.user;await this.updateUsers([f]),await this.updateUsertracks(f.id,f.track,!1),await this.updateUserBehaviors(f.id,f.behavior),await this.emitNotifyUpdateUsers()};this.cwsIns.addNotify({event:"onJoinRoom",callback:I},!0)}{const I=async D=>{await this.removeUsers([D.data.user.id]),await this.emitNotifyUpdateUsers()};this.cwsIns.addNotify({event:"onQuitRoom",callback:I},!0)}{const I=async D=>{const{user:f}=D.data,{id:k,tracks:i=[],callAction:c=0}=f;if(await this.updateUserCallAction(k,c),await this.updateUserPermissions(k,3),await this.updateUsertracks(k,i,!0),this.options.newPublishAutoSubscribe){const $=this.getTrackNamesFormTracks(i);await this.subscribe($)}else await this.emitNotifyUpdateUsers()};this.cwsIns.addNotify({event:"onPublish",callback:I},!0)}{const I=async D=>{const f=[D.data];this.subChannel(f)};this.cwsIns.addNotify({event:"onDataChannelPublish",callback:I},!0)}{const I=async D=>{const{id:f,tracks:k}=D.data.user;f!==this.options.userId&&(await this.closeUserTracks(f,k,!0),await this.emitNotifyUpdateUsers())};this.cwsIns.addNotify({event:"onCloseTrack",callback:I},!0)}{const I=async D=>{const{id:f,callAction:k}=D.data.user;this.checkUserInRoom(f)&&(await this.updateUserCallAction(f,k),this.emitNotifyUpdateUsers())};this.cwsIns.addNotify({event:"onUpdateCall",callback:I},!0)}{const I=async D=>{const{user:f}=D.data,{id:k,permissions:i=1}=f;i===1?await this.removeUsers([k]):i===3&&await this.updateUsers([f]),await this.emitNotifyUpdateUsers()};this.cwsIns.addNotify({event:"onUpdatePermissions",callback:I},!0)}{const I=async D=>{const{users:f}=D.data;for(const k of f){const{id:i,behavior:c}=k;await this.updateUserBehaviors(i,c)}await this.emitNotifyUpdateUsers()};this.cwsIns.addNotify({event:"onUpdateBehavior",callback:I},!0)}this.cwsIns.addNotify({event:"onTokenExpired",callback:async I=>this.destroy()},!0),this.cwsIns.addNotify({event:"destroyRoom",callback:this.destroy},!0)});_e(this,"addNotify",I=>this.cwsIns.addNotify(I));Ge(this,zn,()=>{});Ge(this,Jn,()=>{this.cwsIns.onReconnectSuccess=async()=>{await this.checkInRoom()?await this.reconstruct():this.setRoomState("closed")}});Ge(this,Wn,async()=>{this.cwsIns.onReconnectStop=async()=>{this.setRoomState("closed")}});_e(this,"addRequestAnimationFrame",async(I,D)=>{{const k=Oe(this,fn).get(I);k&&cancelAnimationFrame(k)}const f=(k=Date.now())=>{D(k);const i=requestAnimationFrame(f);Oe(this,fn).set(I,i)};f()});_e(this,"clearRequestAnimationFrame",async(I=[])=>{I.length===0&&(I=[...Oe(this,fn).keys()]);const D=[];for(const f of I){const k=Oe(this,fn).get(f);k&&(cancelAnimationFrame(k),D.push(k))}return D});_e(this,"destroy",async()=>{this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: 销毁SDK"),this.cwsIns.emitNotify("onDestroy",{code:200,data:{},desc:"sdk is destroy."}),this.stopLocalStreams(),await new Promise(I=>setTimeout(()=>I(!0),300)),this.stopGetPeerStats(),this.clearUsers(),this.clearUserStreams(),this.stopHeartbeat(),this.cwsIns.clearEvents(),this.cwsIns.close()});Oe(this,zn).call(this),Oe(this,Jn).call(this),Oe(this,Wn).call(this),Oe(this,jn).call(this)}}fn=new WeakMap,jn=new WeakMap,zn=new WeakMap,Jn=new WeakMap,Wn=new WeakMap,exports.QuickVO=QuickVO,Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})});