trtc-sdk-v5
Version:
Tencent Cloud RTC SDK for Web
5 lines • 682 kB
JavaScript
var Tf=Object.create;var es=Object.defineProperty,Ef=Object.defineProperties,qu=Object.getOwnPropertyDescriptor,Sf=Object.getOwnPropertyDescriptors,If=Object.getOwnPropertyNames,Sn=Object.getOwnPropertySymbols,ju=Object.getPrototypeOf,Vc=Object.prototype.hasOwnProperty,Xu=Object.prototype.propertyIsEnumerable,Af=Reflect.get;var Zi=Math.pow,wc=(o,i,e)=>i in o?es(o,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[i]=e,N=(o,i)=>{for(var e in i||(i={}))Vc.call(i,e)&&wc(o,e,i[e]);if(Sn)for(var e of Sn(i))Xu.call(i,e)&&wc(o,e,i[e]);return o},L=(o,i)=>Ef(o,Sf(i));var zu=(o,i)=>{var e={};for(var t in o)Vc.call(o,t)&&i.indexOf(t)<0&&(e[t]=o[t]);if(o!=null&&Sn)for(var t of Sn(o))i.indexOf(t)<0&&Xu.call(o,t)&&(e[t]=o[t]);return e};var Ei=(o,i)=>()=>(i||o((i={exports:{}}).exports,i),i.exports),Si=(o,i)=>{for(var e in i)es(o,e,{get:i[e],enumerable:!0})},Rf=(o,i,e,t)=>{if(i&&typeof i=="object"||typeof i=="function")for(let r of If(i))!Vc.call(o,r)&&r!==e&&es(o,r,{get:()=>i[r],enumerable:!(t=qu(i,r))||t.enumerable});return o};var $e=(o,i,e)=>(e=o!=null?Tf(ju(o)):{},Rf(i||!o||!o.__esModule?es(e,"default",{value:o,enumerable:!0}):e,o));var v=(o,i,e,t)=>{for(var r=t>1?void 0:t?qu(i,e):i,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(t?n(i,e,r):n(r))||r);return t&&r&&es(i,e,r),r};var d=(o,i,e)=>wc(o,typeof i!="symbol"?i+"":i,e);var He=(o,i,e)=>Af(ju(o),e,i);var f=(o,i,e)=>new Promise((t,r)=>{var s=c=>{try{a(e.next(c))}catch(l){r(l)}},n=c=>{try{a(e.throw(c))}catch(l){r(l)}},a=c=>c.done?t(c.value):Promise.resolve(c.value).then(s,n);a((e=e.apply(o,i)).next())});var Ye=Ei((ME,Uc)=>{"use strict";var Cf=Object.prototype.hasOwnProperty,Qe="~";function ts(){}Object.create&&(ts.prototype=Object.create(null),new ts().__proto__||(Qe=!1));function yf(o,i,e){this.fn=o,this.context=i,this.once=e||!1}function Qu(o,i,e,t,r){if(typeof e!="function")throw new TypeError("The listener must be a function");var s=new yf(e,t||o,r),n=Qe?Qe+i:i;return o._events[n]?o._events[n].fn?o._events[n]=[o._events[n],s]:o._events[n].push(s):(o._events[n]=s,o._eventsCount++),o}function In(o,i){--o._eventsCount===0?o._events=new ts:delete o._events[i]}function We(){this._events=new ts,this._eventsCount=0}We.prototype.eventNames=function(){var i=[],e,t;if(this._eventsCount===0)return i;for(t in e=this._events)Cf.call(e,t)&&i.push(Qe?t.slice(1):t);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i};We.prototype.listeners=function(i){var e=Qe?Qe+i:i,t=this._events[e];if(!t)return[];if(t.fn)return[t.fn];for(var r=0,s=t.length,n=new Array(s);r<s;r++)n[r]=t[r].fn;return n};We.prototype.listenerCount=function(i){var e=Qe?Qe+i:i,t=this._events[e];return t?t.fn?1:t.length:0};We.prototype.emit=function(i,e,t,r,s,n){var a=Qe?Qe+i:i;if(!this._events[a])return!1;var c=this._events[a],l=arguments.length,h,u;if(c.fn){switch(c.once&&this.removeListener(i,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,t),!0;case 4:return c.fn.call(c.context,e,t,r),!0;case 5:return c.fn.call(c.context,e,t,r,s),!0;case 6:return c.fn.call(c.context,e,t,r,s,n),!0}for(u=1,h=new Array(l-1);u<l;u++)h[u-1]=arguments[u];c.fn.apply(c.context,h)}else{var m=c.length,g;for(u=0;u<m;u++)switch(c[u].once&&this.removeListener(i,c[u].fn,void 0,!0),l){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,e);break;case 3:c[u].fn.call(c[u].context,e,t);break;case 4:c[u].fn.call(c[u].context,e,t,r);break;default:if(!h)for(g=1,h=new Array(l-1);g<l;g++)h[g-1]=arguments[g];c[u].fn.apply(c[u].context,h)}}return!0};We.prototype.on=function(i,e,t){return Qu(this,i,e,t,!1)};We.prototype.once=function(i,e,t){return Qu(this,i,e,t,!0)};We.prototype.removeListener=function(i,e,t,r){var s=Qe?Qe+i:i;if(!this._events[s])return this;if(!e)return In(this,s),this;var n=this._events[s];if(n.fn)n.fn===e&&(!r||n.once)&&(!t||n.context===t)&&In(this,s);else{for(var a=0,c=[],l=n.length;a<l;a++)(n[a].fn!==e||r&&!n[a].once||t&&n[a].context!==t)&&c.push(n[a]);c.length?this._events[s]=c.length===1?c[0]:c:In(this,s)}return this};We.prototype.removeAllListeners=function(i){var e;return i?(e=Qe?Qe+i:i,this._events[e]&&In(this,e)):(this._events=new ts,this._eventsCount=0),this};We.prototype.off=We.prototype.removeListener;We.prototype.addListener=We.prototype.on;We.prefixed=Qe;We.EventEmitter=We;typeof Uc!="undefined"&&(Uc.exports=We)});var da=Ei((PS,wh)=>{"use strict";var Lh=wh.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(o){return o.encoding?"rtpmap:%d %s/%s/%s":o.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(o){return o.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(o){return o.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(o){return"extmap:%d"+(o.direction?"/%s":"%v")+(o["encrypt-uri"]?" %s":"%v")+" %s"+(o.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(o){return o.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(o){var i="candidate:%s %d %s %d %s %d typ %s";return i+=o.raddr!=null?" raddr %s rport %d":"%v%v",i+=o.tcptype!=null?" tcptype %s":"%v",o.generation!=null&&(i+=" generation %d"),i+=o["network-id"]!=null?" network-id %d":"%v",i+=o["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(o){var i="ssrc:%d";return o.attribute!=null&&(i+=" %s",o.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(o){return o.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(o){return o.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(o){return"imageattr:%s %s %s"+(o.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(o){return"simulcast:%s %s"+(o.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(o){return"ts-refclk:%s"+(o.clksrcExt!=null?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(o){var i="mediaclk:";return i+=o.id!=null?"id=%s %s":"%v%s",i+=o.mediaClockValue!=null?"=%s":"",i+=o.rateNumerator!=null?" rate=%s":"",i+=o.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"]}]};Object.keys(Lh).forEach(function(o){var i=Lh[o];i.forEach(function(e){e.reg||(e.reg=/(.*)/),e.format||(e.format="%s")})})});var Bh=Ei(Li=>{"use strict";var No=function(o){return String(Number(o))===o?Number(o):o},I_=function(o,i,e,t){if(t&&!e)i[t]=No(o[1]);else for(var r=0;r<e.length;r+=1)o[r+1]!=null&&(i[e[r]]=No(o[r+1]))},A_=function(o,i,e){var t=o.name&&o.names;o.push&&!i[o.push]?i[o.push]=[]:t&&!i[o.name]&&(i[o.name]={});var r=o.push?{}:t?i[o.name]:i;I_(e.match(o.reg),r,o.names,o.name),o.push&&i[o.push].push(r)},Vh=da(),R_=RegExp.prototype.test.bind(/^([a-z])=(.*)/);Li.parse=function(o){var i={},e=[],t=i;return o.split(/(\r\n|\r|\n)/).filter(R_).forEach(function(r){var s=r[0],n=r.slice(2);s==="m"&&(e.push({rtp:[],fmtp:[]}),t=e[e.length-1]);for(var a=0;a<(Vh[s]||[]).length;a+=1){var c=Vh[s][a];if(c.reg.test(n))return A_(c,t,n)}}),i.media=e,i};var Uh=function(o,i){var e=i.split(/=(.+)/,2);return e.length===2?o[e[0]]=No(e[1]):e.length===1&&i.length>1&&(o[e[0]]=void 0),o};Li.parseParams=function(o){return o.split(/;\s?/).reduce(Uh,{})};Li.parseFmtpConfig=Li.parseParams;Li.parsePayloads=function(o){return o.toString().split(" ").map(Number)};Li.parseRemoteCandidates=function(o){for(var i=[],e=o.split(" ").map(No),t=0;t<e.length;t+=3)i.push({component:e[t],ip:e[t+1],port:e[t+2]});return i};Li.parseImageAttributes=function(o){return o.split(" ").map(function(i){return i.substring(1,i.length-1).split(",").reduce(Uh,{})})};Li.parseSimulcastStreamList=function(o){return o.split(";").map(function(i){return i.split(",").map(function(e){var t,r=!1;return e[0]!=="~"?t=No(e):(t=No(e.substring(1,e.length)),r=!0),{scid:t,paused:r}})})}});var $h=Ei((wS,Fh)=>{"use strict";var Fd=da(),C_=/%[sdv%]/g,y_=function(o){var i=1,e=arguments,t=e.length;return o.replace(C_,function(r){if(i>=t)return r;var s=e[i];switch(i+=1,r){case"%%":return"%";case"%s":return String(s);case"%d":return Number(s);case"%v":return""}})},Ms=function(o,i,e){var t=i.format instanceof Function?i.format(i.push?e:e[i.name]):i.format,r=[o+"="+t];if(i.names)for(var s=0;s<i.names.length;s+=1){var n=i.names[s];i.name?r.push(e[i.name][n]):r.push(e[i.names[s]])}else r.push(e[i.name]);return y_.apply(null,r)},b_=["v","o","s","i","u","e","p","c","b","t","r","z","a"],N_=["i","c","b","a"];Fh.exports=function(o,i){i=i||{},o.version==null&&(o.version=0),o.name==null&&(o.name=" "),o.media.forEach(function(s){s.payloads==null&&(s.payloads="")});var e=i.outerOrder||b_,t=i.innerOrder||N_,r=[];return e.forEach(function(s){Fd[s].forEach(function(n){n.name in o&&o[n.name]!=null?r.push(Ms(s,n,o)):n.push in o&&o[n.push]!=null&&o[n.push].forEach(function(a){r.push(Ms(s,n,a))})})}),o.media.forEach(function(s){r.push(Ms("m",Fd.m[0],s)),t.forEach(function(n){Fd[n].forEach(function(a){a.name in s&&s[a.name]!=null?r.push(Ms(n,a,s)):a.push in s&&s[a.push]!=null&&s[a.push].forEach(function(c){r.push(Ms(n,a,c))})})})}),r.join(`\r
`)+`\r
`}});var Hh=Ei(ri=>{"use strict";var Pr=Bh(),v_=$h(),D_=da();ri.grammar=D_;ri.write=v_;ri.parse=Pr.parse;ri.parseParams=Pr.parseParams;ri.parseFmtpConfig=Pr.parseFmtpConfig;ri.parsePayloads=Pr.parsePayloads;ri.parseRemoteCandidates=Pr.parseRemoteCandidates;ri.parseImageAttributes=Pr.parseImageAttributes;ri.parseSimulcastStreamList=Pr.parseSimulcastStreamList});var vu=Ei((Jw,yp)=>{"use strict";var Cp=yp.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(o){return o.encoding?"rtpmap:%d %s/%s/%s":o.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(o){return o.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(o){return o.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(o){return"extmap:%d"+(o.direction?"/%s":"%v")+(o["encrypt-uri"]?" %s":"%v")+" %s"+(o.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(o){return o.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(o){var i="candidate:%s %d %s %d %s %d typ %s";return i+=o.raddr!=null?" raddr %s rport %d":"%v%v",i+=o.tcptype!=null?" tcptype %s":"%v",o.generation!=null&&(i+=" generation %d"),i+=o["network-id"]!=null?" network-id %d":"%v",i+=o["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(o){var i="ssrc:%d";return o.attribute!=null&&(i+=" %s",o.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(o){return o.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(o){return o.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(o){return"imageattr:%s %s %s"+(o.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(o){return"simulcast:%s %s"+(o.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(o){return"ts-refclk:%s"+(o.clksrcExt!=null?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(o){var i="mediaclk:";return i+=o.id!=null?"id=%s %s":"%v%s",i+=o.mediaClockValue!=null?"=%s":"",i+=o.rateNumerator!=null?" rate=%s":"",i+=o.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"]}]};Object.keys(Cp).forEach(function(o){var i=Cp[o];i.forEach(function(e){e.reg||(e.reg=/(.*)/),e.format||(e.format="%s")})})});var vp=Ei(zi=>{"use strict";var zo=function(o){return String(Number(o))===o?Number(o):o},tE=function(o,i,e,t){if(t&&!e)i[t]=zo(o[1]);else for(var r=0;r<e.length;r+=1)o[r+1]!=null&&(i[e[r]]=zo(o[r+1]))},iE=function(o,i,e){var t=o.name&&o.names;o.push&&!i[o.push]?i[o.push]=[]:t&&!i[o.name]&&(i[o.name]={});var r=o.push?{}:t?i[o.name]:i;tE(e.match(o.reg),r,o.names,o.name),o.push&&i[o.push].push(r)},bp=vu(),rE=RegExp.prototype.test.bind(/^([a-z])=(.*)/);zi.parse=function(o){var i={},e=[],t=i;return o.split(/(\r\n|\r|\n)/).filter(rE).forEach(function(r){var s=r[0],n=r.slice(2);s==="m"&&(e.push({rtp:[],fmtp:[]}),t=e[e.length-1]);for(var a=0;a<(bp[s]||[]).length;a+=1){var c=bp[s][a];if(c.reg.test(n))return iE(c,t,n)}}),i.media=e,i};var Np=function(o,i){var e=i.split(/=(.+)/,2);return e.length===2?o[e[0]]=zo(e[1]):e.length===1&&i.length>1&&(o[e[0]]=void 0),o};zi.parseParams=function(o){return o.split(/;\s?/).reduce(Np,{})};zi.parseFmtpConfig=zi.parseParams;zi.parsePayloads=function(o){return o.toString().split(" ").map(Number)};zi.parseRemoteCandidates=function(o){for(var i=[],e=o.split(" ").map(zo),t=0;t<e.length;t+=3)i.push({component:e[t],ip:e[t+1],port:e[t+2]});return i};zi.parseImageAttributes=function(o){return o.split(" ").map(function(i){return i.substring(1,i.length-1).split(",").reduce(Np,{})})};zi.parseSimulcastStreamList=function(o){return o.split(";").map(function(i){return i.split(",").map(function(e){var t,r=!1;return e[0]!=="~"?t=zo(e):(t=zo(e.substring(1,e.length)),r=!0),{scid:t,paused:r}})})}});var Op=Ei((jw,Dp)=>{"use strict";var Du=vu(),oE=/%[sdv%]/g,sE=function(o){var i=1,e=arguments,t=e.length;return o.replace(oE,function(r){if(i>=t)return r;var s=e[i];switch(i+=1,r){case"%%":return"%";case"%s":return String(s);case"%d":return Number(s);case"%v":return""}})},hn=function(o,i,e){var t=i.format instanceof Function?i.format(i.push?e:e[i.name]):i.format,r=[o+"="+t];if(i.names)for(var s=0;s<i.names.length;s+=1){var n=i.names[s];i.name?r.push(e[i.name][n]):r.push(e[i.names[s]])}else r.push(e[i.name]);return sE.apply(null,r)},nE=["v","o","s","i","u","e","p","c","b","t","r","z","a"],aE=["i","c","b","a"];Dp.exports=function(o,i){i=i||{},o.version==null&&(o.version=0),o.name==null&&(o.name=" "),o.media.forEach(function(s){s.payloads==null&&(s.payloads="")});var e=i.outerOrder||nE,t=i.innerOrder||aE,r=[];return e.forEach(function(s){Du[s].forEach(function(n){n.name in o&&o[n.name]!=null?r.push(hn(s,n,o)):n.push in o&&o[n.push]!=null&&o[n.push].forEach(function(a){r.push(hn(s,n,a))})})}),o.media.forEach(function(s){r.push(hn("m",Du.m[0],s)),t.forEach(function(n){Du[n].forEach(function(a){a.name in s&&s[a.name]!=null?r.push(hn(n,a,s)):a.push in s&&s[a.push]!=null&&s[a.push].forEach(function(c){r.push(hn(n,a,c))})})})}),r.join(`\r
`)+`\r
`}});var Ou=Ei(Qi=>{"use strict";var Qr=vp(),cE=Op();Qi.write=cE;Qi.parse=Qr.parse;Qi.parseParams=Qr.parseParams;Qi.parseFmtpConfig=Qr.parseFmtpConfig;Qi.parsePayloads=Qr.parsePayloads;Qi.parseRemoteCandidates=Qr.parseRemoteCandidates;Qi.parseImageAttributes=Qr.parseImageAttributes;Qi.parseSimulcastStreamList=Qr.parseSimulcastStreamList});import nH from"webrtc-adapter";var _p=$e(Ye());var Yu=(U=>(U[U.INVALID_PARAMETER=4096]="INVALID_PARAMETER",U[U.INVALID_OPERATION=4097]="INVALID_OPERATION",U[U.NOT_SUPPORTED=4098]="NOT_SUPPORTED",U[U.DEVICE_NOT_FOUND=4099]="DEVICE_NOT_FOUND",U[U.INITIALIZE_FAILED=4100]="INITIALIZE_FAILED",U[U.SIGNAL_CHANNEL_SETUP_FAILED=16385]="SIGNAL_CHANNEL_SETUP_FAILED",U[U.SIGNAL_CHANNEL_ERROR=16386]="SIGNAL_CHANNEL_ERROR",U[U.ICE_TRANSPORT_ERROR=16387]="ICE_TRANSPORT_ERROR",U[U.JOIN_ROOM_FAILED=16388]="JOIN_ROOM_FAILED",U[U.CREATE_OFFER_FAILED=16389]="CREATE_OFFER_FAILED",U[U.SIGNAL_CHANNEL_RECONNECTION_FAILED=16390]="SIGNAL_CHANNEL_RECONNECTION_FAILED",U[U.UPLINK_RECONNECTION_FAILED=16391]="UPLINK_RECONNECTION_FAILED",U[U.DOWNLINK_RECONNECTION_FAILED=16392]="DOWNLINK_RECONNECTION_FAILED",U[U.REMOTE_STREAM_NOT_EXIST=16400]="REMOTE_STREAM_NOT_EXIST",U[U.CLIENT_BANNED=16448]="CLIENT_BANNED",U[U.SERVER_TIMEOUT=16449]="SERVER_TIMEOUT",U[U.SUBSCRIPTION_TIMEOUT=16450]="SUBSCRIPTION_TIMEOUT",U[U.PLAY_NOT_ALLOWED=16451]="PLAY_NOT_ALLOWED",U[U.DEVICE_AUTO_RECOVER_FAILED=16452]="DEVICE_AUTO_RECOVER_FAILED",U[U.START_PUBLISH_CDN_FAILED=16453]="START_PUBLISH_CDN_FAILED",U[U.STOP_PUBLISH_CDN_FAILED=16454]="STOP_PUBLISH_CDN_FAILED",U[U.START_MIX_TRANSCODE_FAILED=16455]="START_MIX_TRANSCODE_FAILED",U[U.STOP_MIX_TRANSCODE_FAILED=16456]="STOP_MIX_TRANSCODE_FAILED",U[U.NOT_SUPPORTED_H264=16457]="NOT_SUPPORTED_H264",U[U.SWITCH_ROLE_FAILED=16458]="SWITCH_ROLE_FAILED",U[U.API_CALL_TIMEOUT=16459]="API_CALL_TIMEOUT",U[U.SCHEDULE_FAILED=16460]="SCHEDULE_FAILED",U[U.API_CALL_ABORTED=16461]="API_CALL_ABORTED",U[U.SPC_INITIALIZED_FAILED=16462]="SPC_INITIALIZED_FAILED",U[U.VIDEO_MANAGER_ERROR=16463]="VIDEO_MANAGER_ERROR",U[U.SWITCH_ROOM_FAILED=16464]="SWITCH_ROOM_FAILED",U[U.UNKNOWN=65535]="UNKNOWN",U))(Yu||{}),I=Yu;var bf=function(o){for(let i in I)if(I[i]===o)return i;return"UNKNOWN"},Bc=class extends Error{constructor({name:e="RtcError",message:t,code:r=I.UNKNOWN,extraCode:s=0,constraint:n}){let a=`<${bf(r)} 0x${r.toString(16)}>`,c=`${t}${n?` constraint: ${n}`:""}${t!=null&&t.includes(a)?"":` ${a}`}`;super(c);d(this,"code");d(this,"extraCode");d(this,"message");d(this,"originMessage");d(this,"name");d(this,"constraint");this.code=r,this.extraCode=s,this.name=e,this.message=c,this.constraint=n,this.originMessage=t}getCode(){return this.code}getExtraCode(){return this.extraCode}toString(){return this.originMessage}},y=Bc;var Zu=new Date().getTime(),Fc=0,Ku=function(o){Zu=o,Fc=Zu-new Date().getTime();let i=new Date;i.setTime(o),C.info(`baseTime from server: ${i} offset: ${Fc}`)},is=function(){return new Date().getTime()+Fc},An=function(){let o=new Date;return o.setTime(is()),o.toLocaleString()},to=function(o){let i=String(o.getMilliseconds());return"padStart"in String.prototype&&(i=i.toString().padStart(3,"0")),`${o.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/,"$1")}:${i}`};var mt={};Si(mt,{bytes2ms:()=>ah,calculateScaleResolutionDownNumber:()=>ho,convertObjectNumberToInt:()=>ms,copyProperties:()=>nh,deepClone:()=>Rr,deepMerge:()=>At,delay:()=>Ni,fibonacci:()=>yr,formatedTime:()=>fh,getConstructorName:()=>no,getContainerFromElement:()=>ph,getEnv:()=>oh,getInternalVersion:()=>hh,getLoggerUrl:()=>yi,getMediaStreamTrackInfo:()=>Un,getMuteStateFromFlag:()=>bi,getNetworkType:()=>td,getNumNetworkType:()=>Cr,getReconnectionTimeout:()=>xt,getStringByteLength:()=>hs,getTurnServer:()=>mh,getUint32Version:()=>Ln,getValueType:()=>Re,getViewListFromView:()=>lo,glog:()=>od,ipv4ToUint32:()=>co,isArray:()=>Se,isAudioWorkletSupported:()=>uh,isBoolean:()=>me,isConstructor:()=>br,isEmpty:()=>ao,isFunction:()=>ne,isLangChinese:()=>kt,isMediaStreamTrack:()=>dh,isNumber:()=>q,isObject:()=>ht,isOverseaSdkAppId:()=>Ci,isPlainObject:()=>Je,isPortrait:()=>sd,isPromise:()=>or,isRemoteTrack:()=>lh,isRotate90Or270:()=>vi,isString:()=>ee,isUndefined:()=>T,loadImage:()=>uo,ms2bytes:()=>ch,ms2samples:()=>rd,normalizeUrl:()=>Vn,performanceNow:()=>V,promiseAny:()=>Nr,samples2ms:()=>id,setNetworkType:()=>xn,stringify:()=>It,stringifyIncludeValue:()=>Pn,throttlePromise:()=>wn});var ed={};Si(ed,{AUDIO_MUTE_BIT:()=>Dn,AUDIO_STAT_BIT:()=>ir,AUX_STAT_BIT:()=>Er,AUX_STREAM_MSID:()=>jc,BACKEND_ENV:()=>vn,BASE_DOC_URL:()=>Xt,BASE_HOST:()=>eh,CAPABILITIES_KEYS:()=>kn,CLASS_NAME:()=>Xf,CLOUD_CONSOLE_URL:()=>Of,CROSS_ROOM_BIT:()=>qc,DATA_FREEZE_TIMING:()=>Mn,DEFAULT_ASSETS_URL:()=>Rn,DOC_URL:()=>Mf,DTLS_STATE_UNKNOWN:()=>Mt,ENV_NAME:()=>Ii,EXCHANGE_SDP_TIMEOUT:()=>Zc,IS_WORKER:()=>io,IS_WORKLET:()=>os,KIBANA_EVENT:()=>ot,LOCAL_STREAM_PUBLISH_STATE:()=>ih,LOGGER_CMD_TYPE:()=>Ki,LOGGER_DOMAIN:()=>Hc,LOGGER_DOMAIN_OVERSEA:()=>Gc,LOG_LEVEL:()=>Dt,LOG_LEVEL_NAME:()=>Qf,MAIN_STREAM_MSID:()=>as,MAX_RTT:()=>ls,MICROPHONE_COMMUNICATIONS:()=>zf,MICROPHONE_DEFAULT:()=>Ar,MUTE_ALL_BIT:()=>Pf,NAME:()=>p,NETWORK_TYPE:()=>Cn,NOT_SUPPORTED_H264:()=>Sr,PAUSED_RETRY_COUNT:()=>Ir,PEERCONNECTION_CONNECTING_TIMEOUT:()=>cs,PEER_CONNECTION_STATE:()=>ge,PEER_LEAVE_REASON:()=>Kc,RECOVER_CAPTURE_INTERVAL:()=>so,REMOTE_STREAM_TYPE_AUX:()=>zc,REMOTE_STREAM_TYPE_MAIN:()=>Xc,RENDER_FREEZE_TIMING:()=>Wf,SCHEDULE_DOMAIN:()=>Ri,SCHEDULE_TIMEOUT:()=>jf,SDP_SEMANTICS_PLAN_B:()=>ro,SDP_SEMANTICS_UNIFIED_PLAN:()=>rr,SECOND_HOST:()=>vf,SIGNAL_PING_PONG_INTERVAL:()=>xf,SIGNAL_PING_TIMEOUT:()=>kf,SIGNAL_RECONNECTION_COUNT:()=>Hf,SMALL_STAT_BIT:()=>ns,SPEAKER_DEFAULT:()=>ds,STORAGE_EXPIRES_TIME:()=>yn,STREAM_TYPE_BIG:()=>Jf,STREAM_TYPE_SMALL:()=>qf,SUBSCRIBE_SMALL_RETRY_COUNT:()=>oo,SYNC_USER_LIST_INTERVAL:()=>Gf,Scene:()=>zt,THIRD_HOST:()=>Df,TRANSPORT_DIRECTION:()=>te,TRTC_ERROR_ASSISTANCE:()=>Wc,TRTC_QUALITY_BAD:()=>Bf,TRTC_QUALITY_DISCONNECTED:()=>$f,TRTC_QUALITY_EXCELLENT:()=>wf,TRTC_QUALITY_GOOD:()=>Vf,TRTC_QUALITY_POOR:()=>Uf,TRTC_QUALITY_UNKNOWN:()=>Lf,TRTC_QUALITY_VERY_BAD:()=>Ff,UPDATE_OFFER_TIMEOUT:()=>Yc,VIDEO_MUTE_BIT:()=>On,VIDEO_STAT_BIT:()=>tr,audioProfileMap:()=>bn,defaultBigVideoProfile:()=>er,defaultSmallVideoProfile:()=>Jc,getRetryCount:()=>Ai,getScriptDir:()=>Nf,innerVersion:()=>rs,loggerProxy:()=>ss,screenProfileMap:()=>Nn,setLoggerProxy:()=>Tr,setRetryCount:()=>Qc,setVersion:()=>$c,version:()=>xe,videoProfileMap:()=>Ot});var rs="4.15.00.1600",xe="5.0.0";function $c(o){xe=o;let[i,e,t]=o.split(".").map(r=>parseInt(r,10));rs=`${i}.${Math.min(15,e)}.${Math.min(15,t)}.${e.toString().padStart(2,"0")}${t.toString().padStart(2,"0")}`}var io=typeof importScripts!="undefined",os=typeof registerProcessor!="undefined",Nf=()=>{let o=io?self.location.href:document.currentScript.src;return o.substring(0,o.lastIndexOf("/")+1)},ss="",Tr=o=>ss=o,eh="web.sdk.qcloud.com",vf="web.sdk.tencent.cn",Df="web.sdk.cloud.tencent.cn",Of="https://console.cloud.tencent.com/trtc",Xt=`https://${eh}/trtc/webrtc/v5/doc`,Rn="https://web.sdk.qcloud.com/trtc/webrtc/v5/assets/",Mf=`${Xt}/zh-cn/`,Hc="https://yun.tim.qq.com",Gc="https://apisgp.my-imcloud.com",Wc="trtc_error_assistance",Ki={LOG:"jssdk_log",EVENT:"jssdk_event",KEY_POINT:"jssdk_new_endreport",KV_STAT:"jssdk_key_metrics_report"},Ii={QCLOUD:"qcloud",OLD_CLOUD_LADDER:"trtc",WEBRTC:"webrtc"},Dt=(n=>(n[n.TRACE=0]="TRACE",n[n.DEBUG=1]="DEBUG",n[n.INFO=2]="INFO",n[n.WARN=3]="WARN",n[n.ERROR=4]="ERROR",n[n.NONE=5]="NONE",n))(Dt||{}),kf=18e3,xf=2e3,Cn={unknown:0,wifi:1,"3g":2,"2g":3,"4g":4,wired:5,"5g":6},yn=7*24*3600*1e3,bn={standard:{sampleRate:48e3,channelCount:1,bitrate:40},"standard-stereo":{sampleRate:48e3,channelCount:2,bitrate:64},high:{sampleRate:48e3,channelCount:1,bitrate:128},"high-stereo":{sampleRate:48e3,channelCount:2,bitrate:192}},Ot={"120p":{width:160,height:120,frameRate:15,bitrate:200},"120p_2":{width:160,height:120,frameRate:15,bitrate:100},"180p":{width:320,height:180,frameRate:15,bitrate:350},"180p_2":{width:320,height:180,frameRate:15,bitrate:150},"240p":{width:320,height:240,frameRate:15,bitrate:400},"240p_2":{width:320,height:240,frameRate:15,bitrate:200},"360p":{width:640,height:360,frameRate:15,bitrate:800},"360p_2":{width:640,height:360,frameRate:15,bitrate:400},"480p":{width:640,height:480,frameRate:15,bitrate:900},"480p_2":{width:640,height:480,frameRate:15,bitrate:500},"720p":{width:1280,height:720,frameRate:15,bitrate:1500},"1080p":{width:1920,height:1080,frameRate:15,bitrate:2e3},"1440p":{width:2560,height:1440,frameRate:30,bitrate:4860},"4K":{width:3840,height:2160,frameRate:30,bitrate:9e3}},er=Ot["480p_2"],Jc=Ot["120p_2"],Nn={"480p":{width:640,height:480,frameRate:5,bitrate:900},"480p_2":{width:640,height:480,frameRate:30,bitrate:1e3},"720p":{width:1280,height:720,frameRate:5,bitrate:1200},"720p_2":{width:1280,height:720,frameRate:30,bitrate:3e3},"1080p":{width:1920,height:1080,frameRate:5,bitrate:1600},"1080p_2":{width:1920,height:1080,frameRate:30,bitrate:4e3}},p={CANVAS:"canvas",AUDIO:"audio",VIDEO:"video",SCREEN:"screen",SMALL:"small",BIG:"big",AUXILIARY:"auxiliary",SMALL_VIDEO:"smallVideo",FACING_MODE_USER:"user",FACING_MODE_ENVIRONMENT:"environment",MUTE:"mute",UNMUTE:"unmute",ENDED:"ended",PLAYING:"playing",PAUSE:"pause",ERROR:"error",LOADEDDATA:"loadeddata",LOADEDMETADATA:"loadedmetadata",AUDIO_INPUT:"audioinput",VIDEO_INPUT:"videoinput",DETAIL:"detail",TEXT:"text",MAIN:"main",BACKUP:"backup",BANNED:"banned",KICK:"kick",USER_TIME_OUT:"user_time_out",ROOM_DISBAND:"room_disband",SEI_MESSAGE:"sei-message",ADD:"add",REMOVE:"remove",REPLACE:"replace",TRACK:"track",SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe",TRANSCEIVER_DIRECTION_SENDONLY:"sendonly",TRANSCEIVER_DIRECTION_RECVONLY:"recvonly",ENTER_PICTURE_IN_PICTURE:"enterpictureinpicture",LEAVE_PICTURE_IN_PICTURE:"leavepictureinpicture"},te={INACTIVE:"inactive",SENDONLY:"sendonly",RECVONLY:"recvonly"},vn={OLD_CLOUD_LADDER:"wss://trtc.rtc.qq.com",WEBRTC:"wss://webrtc.qq.com"},zt=(e=>(e.LIVE="live",e.RTC="rtc",e))(zt||{}),tr=1,ns=2,Er=4,ir=8,Dn=64,On=16,Pf=112,qc=128,as="5Y2wZK8nANNAoVw6dSAHVjNxrD1ObBM2kBPV",jc="224d130c-7b5c-415b-aaa2-79c2eb5a6df2",Xc=p.MAIN,zc=p.AUXILIARY,Lf=0,wf=1,Vf=2,Uf=3,Bf=4,Ff=5,$f=6,Mt="unknown",ge={NEW:"new",CONNECTING:"connecting",FAILED:"failed",CLOSED:"closed",DISCONNECTED:"disconnected",CONNECTED:"connected",COMPLETED:"completed"},th=1/0;function Qc(o){th=o}function Ai(){return th}var Hf=30,ot={JOIN:"join",DELTA_JOIN:"delta-join",REJOIN:"rejoin",LEAVE:"leave",DELTA_LEAVE:"delta-leave",PUBLISH:"publish",DELTA_PUBLISH:"delta-publish",UNPUBLISH:"unpublish",SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe",UPLINK_CONNECTION:"uplink-connection",UPLINK_RECONNECTION:"uplink-reconnection",DOWNLINK_CONNECTION:"downlink-connection",DOWNLINK_RECONNECTION:"downlink-reconnection",ON_TRACK:"ontrack",ICE_CONNECTION_STATE:"iceConnectionState",LOCAL_STREAM_INITIALIZE:"stream-initialize",SIGNAL_CONNECTION:"websocketConnectionState",SIGNAL_RECONNECTION:"websocketReconnectionState",UPDATE_STREAM:"update-stream",RECOVER_LOCAL_AUDIO_TRACK:"recover-local-audio-track",RECOVER_LOCAL_VIDEO_TRACK:"recover-local-video-track",RECOVER_SUBSCRIPTION:"recover-subscription",START_MIX_TRANSCODE:"start-mix-transcode",STOP_MIX_TRANSCODE:"stop-mix-transcode",PLAYER_ERROR:"player-error",SCHEDULE:"schedule",LOAD_WORKLET:"load-worklet",VIDEO_FROZEN_COUNT:"videoFrozenCount",GET_USER_MEDIA_RETRY:"getUserMedia-retry"},Gf=1e4,Yc=1e4,Zc=1e4,rr="unified-plan",ro="plan-b",Sr=1028,ih=(t=>(t[t.UNPUBLISH=-1]="UNPUBLISH",t[t.PUBLISHING=0]="PUBLISHING",t[t.PUBLISHED=1]="PUBLISHED",t))(ih||{}),Mn=500,Wf=1e3,Jf=p.BIG,qf=p.SMALL,cs=10*1e3,Ri={MAIN:"schedule.cloud-rtc.com",BACKUP:"schedule.cloud-rtc.net",MAIN_OVERSEA:"schedule.rtc-web.com",BACKUP_OVERSEA:"schedule.rtc-web.io",MAIN_OVERSEA_BACKUP:"intl-schedule.cloud-rtc.com"},jf=2e3,Xf={TRTC:"TRTC",CLIENT:"Client",LOCAL_STREAM:"LocalStream",REMOTE_STREAM:"RemoteStream",STREAM:"Stream"},Ir=5,Ar="default",ds=Ar,zf="communications",Qf=Object.keys(Dt),Kc=["normal leave","timeout leave","kick","role change"],oo=10,so=2e3,kn=["width","height","frameRate","facingMode","sampleRate","sampleSize","channelCount","deviceId","min","max"],ls=10*1e3;var oh=function(){return new URLSearchParams(location.search).get("trtc_env")||""},Ci=o=>Number(o)<14e8,yi=function(o,i){let e;ss?e=ss:e=Ci(o)?Gc:Hc;let t=Math.floor(Math.random()*Zi(2,31));return`${e}/v5/AVQualityReportSvc/C2S?random=${t}&sdkappid=${o}&cmdtype=${i}`},us="unknown";function td(){if(us!=="unknown")return us;let{userAgent:o,connection:i}=navigator,e=(o.match(/NetType\/\S+/)||[])[0]||"";e=e.toLowerCase().replace("nettype/",""),e==="3gnet"&&(e="3g");let t=i&&i.type&&i.type.toLowerCase(),r=i&&i.effectiveType&&i.effectiveType.toLowerCase();return r==="slow-2"&&(r="2g"),t&&(us=sh(t,r)),us}function sh(o,i){if(Cn[o])return o;switch(o){case"cellular":case"wimax":return i||"unknown";case"ethernet":return"wired";case"none":case"other":default:return"unknown"}}function xn(o){us=sh(o)}function Cr(){return Cn[td()]}function nh(o,i){for(let e of Reflect.ownKeys(i))if(e!=="constructor"&&e!=="prototype"&&e!=="name"){let t=Object.getOwnPropertyDescriptor(i,e)||"";Object.defineProperty(o,e,t)}return o}function ah(o,i=48e3){return id(o/4,i)}function id(o,i=48e3){return o*1e3/i}function ch(o,i=48e3){return rd(o,i)*4}function rd(o,i=48e3){return o*i/1e3}var od=typeof window!="undefined"&&typeof window.glog=="function"?window.glog:()=>{},kt=()=>{let o=navigator.language;return o=o.substring(0,2),o==="zh"},Je=function(o){if(!o||typeof o!="object"||Object.prototype.toString.call(o)!="[object Object]")return!1;let i=Object.getPrototypeOf(o);if(i===null)return!0;let e=Object.prototype.hasOwnProperty.call(i,"constructor")&&i.constructor;return typeof e=="function"&&e instanceof e&&Function.prototype.toString.call(e)===Function.prototype.toString.call(Object)};function yr(o,i=1,e=1){return o<=1?e:yr(o-1,e,i+e)}function xt(o){return o>8?30*1e3:yr(o)*1e3}function Re(o){return Reflect.apply(Object.prototype.toString,o,[]).replace(/^\[object\s(\w+)\]$/,"$1").toLowerCase()}var ne=o=>typeof o=="function",T=o=>typeof o=="undefined",ee=o=>typeof o=="string",q=o=>typeof o=="number",me=o=>typeof o=="boolean",ht=o=>Re(o)==="object",Se=o=>Re(o)==="array",dh=o=>Re(o)==="MediaStreamTrack".toLowerCase(),lh=o=>o.isRemote,or=o=>Re(o)==="promise",br=o=>ne(o)&&o.prototype.constructor===o,no=o=>br(o)?o.prototype.constructor.name:"",uh=typeof AudioWorkletNode!="undefined";function Nr(o){return new Promise((i,e)=>{let t=[];o.forEach(r=>{r.then(i).catch(s=>{t.push(s),t.length===o.length&&e(t)})})})}function V(){return!performance||!performance.now?Date.now():Math.floor(performance.now())}var rh=o=>+o<10?`0${o}`:o,hh=o=>{let i=o.match(/^\d+\.\d+\.\d+/)[0];if(!i)return o;let e=i.split("."),t=rh(e[1])+rh(e[2]);return e[1]-15>0&&(e[1]="15"),e[2]-15>0&&(e[2]="15"),`${e.join(".")}.${t}`},Yf=Object.prototype.hasOwnProperty,{toString:$E}=Object.prototype;function ao(o){if(o==null)return!0;if(typeof o=="boolean")return!1;if(typeof o=="number")return o===0;if(typeof o=="string"||typeof o=="function"||Array.isArray(o))return o.length===0;if(o instanceof Error)return o.message==="";if(Je(o))switch(Object.prototype.toString.call(o)){case"[object File]":case"[object Map]":case"[object Set]":return o.size===0;case"[object Object]":{for(let i in o)if(Yf.call(o,i))return!1;return!0}}return!1}function bi(o,i){return{userId:i,hasAudio:!!(o&ir),hasVideo:!!(o&tr),hasAuxiliary:!!(o&Er),hasSmall:!!(o&ns),audioMuted:!!(o&Dn),videoMuted:!!(o&On),audioAvailable:!!(o&ir)&&!(o&Dn),videoAvailable:!!(o&tr)&&!(o&On)}}function mh(o){let i={urls:o.url.startsWith("turn:")||o.url.startsWith("turns:")?o.url:`turn:${o.url}`};return!T(o.username)&&!T(o.credential)&&(i.username=o.username,i.credential=o.credential,i.credentialType="password",T(o.credentialType)||(i.credentialType=o.credentialType)),i}function co(o,i=!0){if(!ee(o))return 0;let e=o.split(".");return i?(Number(e[0])<<24|Number(e[1])<<16|Number(e[2])<<8|Number(e[3]))>>>0:(Number(e[3])<<24|Number(e[2])<<16|Number(e[1])<<8|Number(e[0]))>>>0}var At=function(o,i,e,t){if(!(ht(o)&&ht(i)))return 0;let r=0,s=Object.keys(i),n;for(let a=0,c=s.length;a<c;a++)if(n=s[a],!(T(i[n])||e&&e.includes(n)))if(ht(o[n])&&ht(i[n]))r+=At(o[n],i[n],e,t);else{if(t&&t.includes(i[n]))continue;o[n]!==i[n]&&(o[n]=Rr(i[n]),r+=1)}return r};function Rr(o){if(Se(o)){let i=[];return o.forEach((e,t)=>{i[t]=Rr(e)}),i}if(ht(o)){let i={};return Object.keys(o).forEach(e=>{i[e]=Rr(o[e])}),i}return o}var lo=o=>{let i=[];if(Se(o))i=[...o];else if(ee(o)){let e=document.getElementById(o);e&&i.push(e)}else o&&i.push(o);return i},ph=o=>ee(o)?document.getElementById(o):o,Zf=o=>{let i=c=>c<10?`0${c}`:`${c}`,e=o.getFullYear(),t=o.getMonth()+1,r=o.getDate(),s=i(o.getHours()),n=i(o.getMinutes()),a=i(o.getSeconds());return`${e}/${t}/${r} ${s}:${n}:${a}`},fh=()=>Zf(new Date);function It(o,{keysToInclude:i,keysToExclude:e}){try{if(Se(o))return`[${o.map(n=>It(n,{keysToInclude:i,keysToExclude:e})).join(",")}]`;if(!Je(o)||!Se(i)&&!Se(e))return JSON.stringify(o);let t={},r=new Set(i),s=new Set(e);return Object.keys(o).forEach(n=>{(s.size===0&&r.has(n)||r.size===0&&!s.has(n))&&(t[n]=Je(o[n])||Se(o[n])?JSON.parse(It(o[n],{keysToExclude:e,keysToInclude:i})):o[n])}),JSON.stringify(t)}catch(t){return"{}"}}function Pn(o,i=!1){let e=[];return Object.keys(o).forEach(t=>{i===o[t]&&e.push(t)}),It(o,{keysToInclude:e})}function hs(o){return o.replace(/[\u4e00-\u9fa5]/g,"aa").length}var sd=()=>{var o,i,e,t;return(o=window.screen)!=null&&o.orientation?!!((t=(e=(i=window.screen)==null?void 0:i.orientation)==null?void 0:e.type)!=null&&t.includes("portrait")):window.orientation===0||window.orientation===180},uo=o=>f(void 0,null,function*(){return new Promise((i,e)=>{let t;if(ee(o))t=new Image,t.crossOrigin="anonymous",t.src=o;else if(t=o,t.complete){i(t);return}t.onload=()=>i(t),t.onerror=()=>{e(new y({code:I.INVALID_PARAMETER,message:`load image failed, url: ${o}`}))}})}),Ln=o=>{let i=o.split(".");return+i[0]<<24|+i[1]<<16|+i[2]<<8|+i[3]<<0},ms=o=>(Object.keys(o).forEach(i=>{q(o[i])&&(i.startsWith("uint")||i.startsWith("int"))?o[i]=Math.floor(o[i]):(Je(o[i])||Se(o[i]))&&ms(o[i])}),o);function Ni(o,i){return new Promise(e=>{let t=setTimeout(e,o);i&&i(t)})}function wn(o,i){let e=null;return function(...t){return e||(e=o.apply(i||this,t),e.finally(()=>e=null),e)}}function Vn(o){return o.replace(/(^|[^:])\/{2,}/g,"$1/")}function Un(o){var i;try{let{width:e,height:t,frameRate:r,sampleRate:s,sampleSize:n,channelCount:a}=(i=o.getSettings)==null?void 0:i.call(o),c=o.kind===p.AUDIO?`${s}x${n}@${a}`:`${e}x${t}@${r}`,l=o.stats?` stats: ${JSON.stringify(o.stats).replaceAll('"',"")}`:"";return`${o.id} ${o.readyState} muted:${o.muted} ${o.kind} ${o.label} ${c}${l}`}catch(e){return""}}function ho(o,i){return o.width*o.height===i.width*i.height?1:sd()&&i.width>i.height&&o.height>i.width?Math.max(o.width/i.height,o.height/i.width,1):Math.max(o.width/i.width,o.height/i.height,1)}function vi(o){return o===90||o===270}function Di({url:o,body:i,method:e="POST",timeout:t,priority:r}){return new Promise((s,n)=>{if("fetch"in window)return fetch(o,{method:e,body:i,priority:r}).then(c=>c.text()).then(c=>{try{s({data:JSON.parse(c)})}catch(l){s({data:c})}},n);let a=new XMLHttpRequest;a.onreadystatechange=()=>{if(a.readyState===4)if(a.status>=200&&a.status<300)try{let c=JSON.parse(a.response);s({data:c})}catch(c){s({data:a.response})}else n({status:a.status,statusText:a.statusText||"request failed!"})},a.timeout=t||5e3,a.open(e,o,!0),a.send(i)})}function nd(o){return f(this,null,function*(){let i=V(),e=JSON.stringify(o);try{if(!CompressionStream||e.length<=2800)return e;let r=new Blob([e],{type:"application/json"}).stream().pipeThrough(new CompressionStream("gzip")),a=yield(yield(yield new Response(r)).blob()).arrayBuffer();return C.debug(`compressJSON ${e.length} -> ${a.byteLength} ${V()-i}ms`),a}catch(t){return e}})}var Kf=Object.prototype.hasOwnProperty;var Qt=o=>typeof o=="function",Oi=o=>typeof o=="undefined";var Bn=o=>typeof o=="boolean";var ad=o=>o.isRemote;var cd=function(o){if(!o||typeof o!="object"||Object.prototype.toString.call(o)!="[object Object]")return!1;let i=Object.getPrototypeOf(o);if(i===null)return!0;let e=Object.prototype.hasOwnProperty.call(i,"constructor")&&i.constructor;return typeof e=="function"&&e instanceof e&&Function.prototype.toString.call(e)===Function.prototype.toString.call(Object)};function _h(o){if(o==null)return!0;if(typeof o=="boolean")return!1;if(typeof o=="number")return o===0;if(typeof o=="string"||typeof o=="function"||Array.isArray(o))return o.length===0;if(o instanceof Error)return o.message==="";if(cd(o))switch(Object.prototype.toString.call(o)){case"[object File]":case"[object Map]":case"[object Set]":return o.size===0;case"[object Object]":{for(let i in o)if(Kf.call(o,i))return!1;return!0}}return!1}var e_=0,t_=1,gh=2;function i_({retryFunction:o,settings:i,onError:e,onRetrying:t,onRetryFailed:r,onRetrySuccess:s,context:n}){return function(...a){let{retries:c=5,timeout:l=1e3}=i,h=0,u=-1,m=e_,g=(D,_)=>f(this,null,function*(){let S=n||this;try{let O=yield o.apply(S,a);h>0&&s&&s.call(this,h),h=0,D(O)}catch(O){let K=()=>{clearTimeout(u),h=0,m=gh,_(O)},G=()=>{m!==gh&&h<(Qt(c)?c():c)?(h++,m=t_,Qt(t)&&t.call(this,h,K),u=window.setTimeout(()=>{u=-1,g(D,_)},Qt(l)?l(h):l)):(K(),Qt(r)&&r.call(this,O))};Qt(e)?e.call(this,{error:O,retry:G,reject:_,retryFuncArgs:a,retriedCount:h}):G()}});return new Promise(g)}}var Yt=i_;var mo=class{constructor(i){d(this,"userId");d(this,"remoteUserId");d(this,"id");d(this,"sdkAppId");d(this,"type");d(this,"isLocal");this.id=i.id,this.userId=i.userId,this.sdkAppId=i.sdkAppId,this.remoteUserId=i.remoteUserId,this.isLocal=Bn(i.isLocal)?i.isLocal:!0,this.type=this.isLocal?"":i.type}createChild(i){return Object.setPrototypeOf(i,this)}setUserId(i){this.userId=i}setSdkAppId(i){this.sdkAppId=i}log(i,e){let t=this.isLocal?this.userId:this.remoteUserId;e.unshift(`[${this.isLocal?"\u2191":"\u2193"}${this.type&&this.type!=="main"?"*":""}${this.id}${t?`|${t}`:""}]`),C.log(i,e,Oi(this.userId)||_h(this.userId),this.userId,this.sdkAppId)}info(...i){this.log(2,i)}debug(...i){this.log(1,i)}warn(...i){this.log(3,i)}error(...i){this.log(4,i)}};var Co={};Si(Co,{ANDROID_VERSION:()=>ud,CHROME_MAJOR_VERSION:()=>st,CHROME_VERSION:()=>ia,EDGE_VERSION:()=>$n,EDG_MAJOR_VERSION:()=>hd,EDG_VERSION:()=>Hn,FIREFOX_MAJOR_VERSION:()=>_o,FIREFOX_VERSION:()=>Fn,HUAWEI_VERSION:()=>Zn,IE_VERSION:()=>a_,IOS_MAIN_VERSION:()=>nt,IOS_VERSION:()=>Kt,IPADQQB_VERSION:()=>Qn,IS_ANDROID:()=>pe,IS_ANDROID_WEBVIEW:()=>u_,IS_ANY_SAFARI:()=>nr,IS_CHROME:()=>Ro,IS_CHROME_OS:()=>md,IS_CHROMIUM_BASE:()=>Ze,IS_DESKTOP_IOS_CHROME:()=>Ad,IS_EDG:()=>go,IS_EDGE:()=>vr,IS_ELECTRON:()=>d_,IS_FIREFOX:()=>ae,IS_HEADLESS_CHROME:()=>Td,IS_HONOR:()=>_d,IS_HUAWEI:()=>fd,IS_HUAWEIBROWSER:()=>Is,IS_IE:()=>Ih,IS_IE8:()=>n_,IS_IOS:()=>Ie,IS_IOS_13_OR_14:()=>Id,IS_IOS_15_1:()=>Sd,IS_IOS_CHROME:()=>Ah,IS_IPAD:()=>fo,IS_IPADQQB:()=>Ts,IS_IPAD_PRO:()=>ld,IS_IPHONE:()=>sr,IS_IPOD:()=>Sh,IS_LINUX:()=>Es,IS_LOCAL:()=>Ut,IS_MAC:()=>Vt,IS_MACQQB:()=>gs,IS_MIBROWSER:()=>Ss,IS_MQQB:()=>Io,IS_NATIVE_ANDROID:()=>s_,IS_OLD_ANDROID:()=>o_,IS_OPENHARMONY:()=>gd,IS_OPPOBROWSER:()=>Rs,IS_SAFARI:()=>Pe,IS_SAFARI_15_1:()=>h_,IS_SAMSUNGBROWSER:()=>As,IS_SOGOU:()=>fs,IS_SOGOUM:()=>ps,IS_TBS:()=>wt,IS_UCBROWSER:()=>pd,IS_VIVOBROWSER:()=>Cs,IS_WECHAT:()=>Eo,IS_WIN:()=>Dr,IS_WQQB:()=>_s,IS_WX:()=>c_,IS_X5MQQB:()=>So,IS_XWEB:()=>To,MACQQB_VERSION:()=>zn,MI_VERSION:()=>Yn,MQQB_VERSION:()=>po,OPENHARMONY_VERSION:()=>l_,OPPO_VERSION:()=>ea,SAFARI_VERSION:()=>Mi,SAMSUNG_VERSION:()=>Kn,SOGOUM_VERSION:()=>Gn,SOGOU_VERSION:()=>Wn,TBS_VERSION:()=>Jn,UA_DATA_STRING:()=>Pt,USER_AGENT:()=>Lt,VIVO_VERSION:()=>ta,WECHAT_VERSION:()=>jn,WQQB_VERSION:()=>Xn,XWEB_VERSION:()=>qn,browserInfo:()=>Zt,getBrowserInfo:()=>Rh,getChromeMajorVersion:()=>Ao,getDeviceModel:()=>Mr,getGPUInfo:()=>Cd,getOSName:()=>ra,getOSNumber:()=>ys,getOSString:()=>xi,getOSType:()=>m_,getTerminalType:()=>yd,getUserAgentData:()=>Or,isLocalStorageEnabled:()=>ki,isMobile:()=>Rd,isVersionSmallerThan:()=>Ed});var Lt=typeof navigator=="undefined"?"":navigator.userAgent,z=o=>new RegExp(o,"i").test(Lt),Oe=o=>{if(z(o)){let i=new RegExp(`${o}\\/([\\d.]+)`),e=Lt.match(i);if(e&&e[1])return e[1]}return""},dd=o=>{if(z(o)){let i=new RegExp(`${o}\\/(\\d+)`),e=Lt.match(i);if(e&&e[1])return parseFloat(e[1])}return NaN},Th=/AppleWebKit\/([\d.]+)/i.exec(Lt),r_=Th?parseFloat(Th[1]):NaN,fo=z("iPad"),ld=typeof navigator!="undefined"&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&z("Macintosh"),sr=z("iPhone")&&!fo,Sh=z("iPod"),Ie=sr||fo||Sh||ld,pe=z("Android"),ud=function(){if(pe){let o=Lt.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(o){let i=o[1]&&parseFloat(o[1]),e=o[2]&&parseFloat(o[2]);if(i&&e)return parseFloat(`${o[1]}.${o[2]}`);if(i)return i}}return NaN}(),o_=pe&&z("webkit")&&ud<2.3,s_=pe&&ud<5&&r_<537,ae=z("Firefox"),Fn=Oe("Firefox"),_o=dd("Firefox"),vr=z("Edge"),$n=Oe("Edge"),go=z("Edg"),Hn=Oe("Edg"),hd=dd("Edg"),ps=z("SogouMobileBrowser"),Gn=Oe("SogouMobileBrowser"),fs=z("MetaSr\\s"),Wn=Oe("MetaSr\\s"),wt=z("TBS"),Jn=Oe("TBS"),To=z("XWEB"),qn=Oe("XWEB"),n_=z("MSIE\\s8\\.0"),Ih=z("MSIE\\/\\d+"),a_=function(){if(Ih){let o=/MSIE\s(\d+)\.\d/.exec(Lt),i=o&&parseFloat(o[1]);return!i&&/Trident\/7.0/i.test(Lt)&&/rv:11.0/.test(Lt)&&(i=11),i}return NaN}(),Eo=z("(micromessenger|webbrowser)"),jn=Oe("MicroMessenger"),So=!wt&&z("MQQBrowser")&&z("COVC"),Io=!wt&&z("MQQBrowser")&&!z("COVC"),po=Io||So?Oe("MQQBrowser"):"",_s=!wt&&z(" QQBrowser"),Xn=Oe(" QQBrowser"),gs=!wt&&z("QQBrowserLite"),zn=Oe("QQBrowserLite"),Ts=!wt&&z("MQBHD"),Qn=Oe("MQBHD"),Dr=z("Windows"),Vt=!Ie&&z("MA