mode/plugin/trtc.js

(开头部分) 687KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).TRTC=t()}(this,(function(){function e(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(i){if("default"!==i&&!(i in e)){var r=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,r.get?r:{enumerable:!0,get:function(){return t[i]}})}}))})),Object.freeze(e)}var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},i=function(e){try{return!!e()}catch(t){return!0}},r=!i((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),n=r,o=Function.prototype,s=o.call,a=n&&o.bind.bind(s,s),c=n?a:function(e){return function(){return s.apply(e,arguments)}},l=c,d=l({}.toString),u=l("".slice),h=function(e){return u(d(e),8,-1)},p=i,m=h,_=Object,f=c("".split),g=p((function(){return!_("z").propertyIsEnumerable(0)}))?function(e){return"String"==m(e)?f(e,""):_(e)}:_,T=function(e){return null==e},E=T,v=TypeError,y=function(e){if(E(e))throw v("Can't call method on "+e);return e},S=g,I=y,R=function(e){return S(I(e))},A=function(e){return e&&e.Math==Math&&e},C=A("object"==typeof globalThis&&globalThis)||A("object"==typeof window&&window)||A("object"==typeof self&&self)||A("object"==typeof t&&t)||function(){return this}()||Function("return this")(),b={},k={get exports(){return b},set exports(e){b=e}},D=C,N=Object.defineProperty,w=function(e,t){try{N(D,e,{value:t,configurable:!0,writable:!0})}catch(i){D[e]=t}return t},O=w,P="__core-js_shared__",M=C[P]||O(P,{}),L=M;(k.exports=function(e,t){return L[e]||(L[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.0",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.0/LICENSE",source:"https://github.com/zloirock/core-js"});var x,V,U=y,F=Object,B=function(e){return F(U(e))},H=B,j=c({}.hasOwnProperty),W=Object.hasOwn||function(e,t){return j(H(e),t)},G=c,J=0,K=Math.random(),z=G(1..toString),q=function(e){return"Symbol("+(void 0===e?"":e)+")_"+z(++J+K,36)},Y="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Q=C,X=Y,$=Q.process,Z=Q.Deno,ee=$&&$.versions||Z&&Z.version,te=ee&&ee.v8;te&&(V=(x=te.split("."))[0]>0&&x[0]<4?1:+(x[0]+x[1])),!V&&X&&(!(x=X.match(/Edge\/(\d+)/))||x[1]>=74)&&(x=X.match(/Chrome\/(\d+)/))&&(V=+x[1]);var ie=V,re=ie,ne=i,oe=!!Object.getOwnPropertySymbols&&!ne((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&re&&re<41})),se=oe&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ae=b,ce=W,le=q,de=oe,ue=se,he=C.Symbol,pe=ae("wks"),me=ue?he.for||he:he&&he.withoutSetter||le,_e=function(e){return ce(pe,e)||(pe[e]=de&&ce(he,e)?he[e]:me("Symbol."+e)),pe[e]},fe="object"==typeof document&&document.all,ge={all:fe,IS_HTMLDDA:void 0===fe&&void 0!==fe},Te=ge.all,Ee=ge.IS_HTMLDDA?function(e){return"function"==typeof e||e===Te}:function(e){return"function"==typeof e},ve=Ee,ye=ge.all,Se=ge.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:ve(e)||e===ye}:function(e){return"object"==typeof e?null!==e:ve(e)},Ie=Se,Re=String,Ae=TypeError,Ce=function(e){if(Ie(e))return e;throw Ae(Re(e)+" is not an object")},be={},ke=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),De=ke&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ne={},we=Se,Oe=C.document,Pe=we(Oe)&&we(Oe.createElement),Me=function(e){return Pe?Oe.createElement(e):{}},Le=Me,xe=!ke&&!i((function(){return 7!=Object.defineProperty(Le("div"),"a",{get:function(){return 7}}).a})),Ve=r,Ue=Function.prototype.call,Fe=Ve?Ue.bind(Ue):function(){return Ue.apply(Ue,arguments)},Be=C,He=Ee,je=function(e,t){return arguments.length<2?(i=Be[e],He(i)?i:void 0):Be[e]&&Be[e][t];var i},We=c({}.isPrototypeOf),Ge=je,Je=Ee,Ke=We,ze=Object,qe=se?function(e){return"symbol"==typeof e}:function(e){var t=Ge("Symbol");return Je(t)&&Ke(t.prototype,ze(e))},Ye=String,Qe=function(e){try{return Ye(e)}catch(t){return"Object"}},Xe=Ee,$e=Qe,Ze=TypeError,et=function(e){if(Xe(e))return e;throw Ze($e(e)+" is not a function")},tt=et,it=T,rt=function(e,t){var i=e[t];return it(i)?void 0:tt(i)},nt=Fe,ot=Ee,st=Se,at=TypeError,ct=Fe,lt=Se,dt=qe,ut=rt,ht=function(e,t){var i,r;if("string"===t&&ot(i=e.toString)&&!st(r=nt(i,e)))return r;if(ot(i=e.valueOf)&&!st(r=nt(i,e)))return r;if("string"!==t&&ot(i=e.toString)&&!st(r=nt(i,e)))return r;throw at("Can't convert object to primitive value")},pt=TypeError,mt=_e("toPrimitive"),_t=function(e,t){if(!lt(e)||dt(e))return e;var i,r=ut(e,mt);if(r){if(void 0===t&&(t="default"),i=ct(r,e,t),!lt(i)||dt(i))return i;throw pt("Can't convert object to primitive value")}return void 0===t&&(t="number"),ht(e,t)},ft=_t,gt=qe,Tt=function(e){var t=ft(e,"string");return gt(t)?t:t+""},Et=ke,vt=xe,yt=De,St=Ce,It=Tt,Rt=TypeError,At=Object.defineProperty,Ct=Object.getOwnPropertyDescriptor,bt="enumerable",kt="configurable",Dt="writable";Ne.f=Et?yt?function(e,t,i){if(St(e),t=It(t),St(i),"function"==typeof e&&"prototype"===t&&"value"in i&&Dt in i&&!i[Dt]){var r=Ct(e,t);r&&r[Dt]&&(e[t]=i.value,i={configurable:kt in i?i[kt]:r[kt],enumerable:bt in i?i[bt]:r[bt],writable:!1})}return At(e,t,i)}:At:function(e,t,i){if(St(e),t=It(t),St(i),vt)try{return At(e,t,i)}catch(r){}if("get"in i||"set"in i)throw Rt("Accessors not supported");return"value"in i&&(e[t]=i.value),e};var Nt=Math.ceil,wt=Math.floor,Ot=Math.trunc||function(e){var t=+e;return(t>0?wt:Nt)(t)},Pt=Ot,Mt=function(e){var t=+e;return t!=t||0===t?0:Pt(t)},Lt=Mt,xt=Math.max,Vt=Math.min,Ut=function(e,t){var i=Lt(e);return i<0?xt(i+t,0):Vt(i,t)},Ft=Mt,Bt=Math.min,Ht=function(e){return e>0?Bt(Ft(e),9007199254740991):0},jt=Ht,Wt=function(e){return jt(e.length)},Gt=R,Jt=Ut,Kt=Wt,zt=function(e){return function(t,i,r){var n,o=Gt(t),s=Kt(o),a=Jt(r,s);if(e&&i!=i){for(;s>a;)if((n=o[a++])!=n)return!0}else for(;s>a;a++)if((e||a in o)&&o[a]===i)return e||a||0;return!e&&-1}},qt={includes:zt(!0),indexOf:zt(!1)},Yt={},Qt=W,Xt=R,$t=qt.indexOf,Zt=Yt,ei=c([].push),ti=function(e,t){var i,r=Xt(e),n=0,o=[];for(i in r)!Qt(Zt,i)&&Qt(r,i)&&ei(o,i);for(;t.length>n;)Qt(r,i=t[n++])&&(~$t(o,i)||ei(o,i));return o},ii=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ri=ti,ni=ii,oi=Object.keys||function(e){return ri(e,ni)},si=ke,ai=De,ci=Ne,li=Ce,di=R,ui=oi;be.f=si&&!ai?Object.defineProperties:function(e,t){li(e);for(var i,r=di(t),n=ui(t),o=n.length,s=0;o>s;)ci.f(e,i=n[s++],r[i]);return e};var hi,pi=je("document","documentElement"),mi=q,_i=b("keys"),fi=function(e){return _i[e]||(_i[e]=mi(e))},gi=Ce,Ti=be,Ei=ii,vi=Yt,yi=pi,Si=Me,Ii="prototype",Ri="script",Ai=fi("IE_PROTO"),Ci=function(){},bi=function(e){return"<"+Ri+">"+e+"</"+Ri+">"},ki=function(e){e.write(bi("")),e.close();var t=e.parentWindow.Object;return e=null,t},Di=function(){try{hi=new ActiveXObject("htmlfile")}catch(n){}var e,t,i;Di="undefined"!=typeof document?document.domain&&hi?ki(hi):(t=Si("iframe"),i="java"+Ri+":",t.style.display="none",yi.appendChild(t),t.src=String(i),(e=t.contentWindow.document).open(),e.write(bi("document.F=Object")),e.close(),e.F):ki(hi);for(var r=Ei.length;r--;)delete Di[Ii][Ei[r]];return Di()};vi[Ai]=!0;var Ni=Object.create||function(e,t){var i;return null!==e?(Ci[Ii]=gi(e),i=new Ci,Ci[Ii]=null,i[Ai]=e):i=Di(),void 0===t?i:Ti.f(i,t)},wi=_e,Oi=Ni,Pi=Ne.f,Mi=wi("unscopables"),Li=Array.prototype;null==Li[Mi]&&Pi(Li,Mi,{configurable:!0,value:Oi(null)});var xi,Vi,Ui,Fi=function(e){Li[Mi][e]=!0},Bi={},Hi=Ee,ji=C.WeakMap,Wi=Hi(ji)&&/native code/.test(String(ji)),Gi=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Ji=Ne,Ki=Gi,zi=ke?function(e,t,i){return Ji.f(e,t,Ki(1,i))}:function(e,t,i){return e[t]=i,e},qi=Wi,Yi=C,Qi=Se,Xi=zi,$i=W,Zi=M,er=fi,tr=Yt,ir="Object already initialized",rr=Yi.TypeError,nr=Yi.WeakMap;if(qi||Zi.state){var or=Zi.state||(Zi.state=new nr);or.get=or.get,or.has=or.has,or.set=or.set,xi=function(e,t){if(or.has(e))throw rr(ir);return t.facade=e,or.set(e,t),t},Vi=function(e){return or.get(e)||{}},Ui=function(e){return or.has(e)}}else{var sr=er("state");tr[sr]=!0,xi=function(e,t){if($i(e,sr))throw rr(ir);return t.facade=e,Xi(e,sr,t),t},Vi=function(e){return $i(e,sr)?e[sr]:{}},Ui=function(e){return $i(e,sr)}}var ar={set:xi,get:Vi,has:Ui,enforce:function(e){return Ui(e)?Vi(e):xi(e,{})},getterFor:function(e){return function(t){var i;if(!Qi(t)||(i=Vi(t)).type!==e)throw rr("Incompatible receiver, "+e+" required");return i}}},cr={},lr={},dr={}.propertyIsEnumerable,ur=Object.getOwnPropertyDescriptor,hr=ur&&!dr.call({1:2},1);lr.f=hr?function(e){var t=ur(this,e);return!!t&&t.enumerable}:dr;var pr=ke,mr=Fe,_r=lr,fr=Gi,gr=R,Tr=Tt,Er=W,vr=xe,yr=Object.getOwnPropertyDescriptor;cr.f=pr?yr:function(e,t){if(e=gr(e),t=Tr(t),vr)try{return yr(e,t)}catch(i){}if(Er(e,t))return fr(!mr(_r.f,e,t),e[t])};var Sr={},Ir={get exports(){return Sr},set exports(e){Sr=e}},Rr=ke,Ar=W,Cr=Function.prototype,br=Rr&&Object.getOwnPropertyDescriptor,kr=Ar(Cr,"name"),Dr={EXISTS:kr,PROPER:kr&&"something"===function(){}.name,CONFIGURABLE:kr&&(!Rr||Rr&&br(Cr,"name").configurable)},Nr=Ee,wr=M,Or=c(Function.toString);Nr(wr.inspectSource)||(wr.inspectSource=function(e){return Or(e)});var Pr=wr.inspectSource,Mr=c,Lr=i,xr=Ee,Vr=W,Ur=ke,Fr=Dr.CONFIGURABLE,Br=Pr,Hr=ar.enforce,jr=ar.get,Wr=String,Gr=Object.defineProperty,Jr=Mr("".slice),Kr=Mr("".replace),zr=Mr([].join),qr=Ur&&!Lr((function(){return 8!==Gr((function(){}),"length",{value:8}).length})),Yr=String(String).split("String"),Qr=Ir.exports=function(e,t,i){"Symbol("===Jr(Wr(t),0,7)&&(t="["+Kr(Wr(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),i&&i.getter&&(t="get "+t),i&&i.setter&&(t="set "+t),(!Vr(e,"name")||Fr&&e.name!==t)&&(Ur?Gr(e,"name",{value:t,configurable:!0}):e.name=t),qr&&i&&Vr(i,"arity")&&e.length!==i.arity&&Gr(e,"length",{value:i.arity});try{i&&Vr(i,"constructor")&&i.constructor?Ur&&Gr(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(n){}var r=Hr(e);return Vr(r,"source")||(r.source=zr(Yr,"string"==typeof t?t:"")),e};Function.prototype.toString=Qr((function(){return xr(this)&&jr(this).source||Br(this)}),"toString");var Xr=Ee,$r=Ne,Zr=Sr,en=w,tn=function(e,t,i,r){r||(r={});var n=r.enumerable,o=void 0!==r.name?r.name:t;if(Xr(i)&&Zr(i,o,r),r.global)n?e[t]=i:en(t,i);else{try{r.unsafe?e[t]&&(n=!0):delete e[t]}catch(s){}n?e[t]=i:$r.f(e,t,{value:i,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},rn={},nn=ti,on=ii.concat("length","prototype");rn.f=Object.getOwnPropertyNames||function(e){return nn(e,on)};var sn={};sn.f=Object.getOwnPropertySymbols;var an,cn,ln,dn=je,un=rn,hn=sn,pn=Ce,mn=c([].concat),_n=dn("Reflect","ownKeys")||function(e){var t=un.f(pn(e)),i=hn.f;return i?mn(t,i(e)):t},fn=W,gn=_n,Tn=cr,En=Ne,vn=function(e,t,i){for(var r=gn(t),n=En.f,o=Tn.f,s=0;s<r.length;s++){var a=r[s];fn(e,a)||i&&fn(i,a)||n(e,a,o(t,a))}},yn=i,Sn=Ee,In=/#|\.prototype\./,Rn=function(e,t){var i=Cn[An(e)];return i==kn||i!=bn&&(Sn(t)?yn(t):!!t)},An=Rn.normalize=function(e){return String(e).replace(In,".").toLowerCase()},Cn=Rn.data={},bn=Rn.NATIVE="N",kn=Rn.POLYFILL="P",Dn=Rn,Nn=C,wn=cr.f,On=zi,Pn=tn,Mn=w,Ln=vn,xn=Dn,Vn=function(e,t){var i,r,n,o,s,a=e.target,c=e.global,l=e.stat;if(i=c?Nn:l?Nn[a]||Mn(a,{}):(Nn[a]||{}).prototype)for(r in t){if(o=t[r],n=e.dontCallGetSet?(s=wn(i,r))&&s.value:i[r],!xn(c?r:a+(l?".":"#")+r,e.forced)&&void 0!==n){if(typeof o==typeof n)continue;Ln(o,n)}(e.sham||n&&n.sham)&&On(o,"sham",!0),Pn(i,r,o,e)}},Un=!i((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Fn=W,Bn=Ee,Hn=B,jn=Un,Wn=fi("IE_PROTO"),Gn=Object,Jn=Gn.prototype,Kn=jn?Gn.getPrototypeOf:function(e){var t=Hn(e);if(Fn(t,Wn))return t[Wn];var i=t.constructor;return Bn(i)&&t instanceof i?i.prototype:t instanceof Gn?Jn:null},zn=i,qn=Ee,Yn=Se,Qn=Kn,Xn=tn,$n=_e("iterator"),Zn=!1;[].keys&&("next"in(ln=[].keys())?(cn=Qn(Qn(ln)))!==Object.prototype&&(an=cn):Zn=!0);var eo=!Yn(an)||zn((function(){var e={};return an[$n].call(e)!==e}));eo&&(an={}),qn(an[$n])||Xn(an,$n,(function(){return this}));var to={IteratorPrototype:an,BUGGY_SAFARI_ITERATORS:Zn},io=Ne.f,ro=W,no=_e("toStringTag"),oo=function(e,t,i){e&&!i&&(e=e.prototype),e&&!ro(e,no)&&io(e,no,{configurable:!0,value:t})},so=to.IteratorPrototype,ao=Ni,co=Gi,lo=oo,uo=Bi,ho=function(){return this},po=function(e,t,i,r){var n=t+" Iterator";return e.prototype=ao(so,{next:co(+!r,i)}),lo(e,n,!1),uo[n]=ho,e},mo=c,_o=et,fo=Ee,go=String,To=TypeError,Eo=function(e,t,i){try{return mo(_o(Object.getOwnPropertyDescriptor(e,t)[i]))}catch(r){}},vo=Ce,yo=function(e){if("object"==typeof e||fo(e))return e;throw To("Can't set "+go(e)+" as a prototype")},So=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,i={};try{(e=Eo(Object.prototype,"__proto__","set"))(i,[]),t=i instanceof Array}catch(r){}return function(i,r){return vo(i),yo(r),t?e(i,r):i.__proto__=r,i}}():void 0),Io=Vn,Ro=Fe,Ao=Ee,Co=po,bo=Kn,ko=So,Do=oo,No=zi,wo=tn,Oo=Bi,Po=Dr.PROPER,Mo=Dr.CONFIGURABLE,Lo=to.IteratorPrototype,xo=to.BUGGY_SAFARI_ITERATORS,Vo=_e("iterator"),Uo="keys",Fo="values",Bo="entries",Ho=function(){return this},jo=function(e,t,i,r,n,o,s){Co(i,t,r);var a,c,l,d=function(e){if(e===n&&_)return _;if(!xo&&e in p)return p[e];switch(e){case Uo:case Fo:case Bo:return function(){return new i(this,e)}}return function(){return new i(this)}},u=t+" Iterator",h=!1,p=e.prototype,m=p[Vo]||p["@@iterator"]||n&&p[n],_=!xo&&m||d(n),f="Array"==t&&p.entries||m;if(f&&(a=bo(f.call(new e)))!==Object.prototype&&a.next&&(bo(a)!==Lo&&(ko?ko(a,Lo):Ao(a[Vo])||wo(a,Vo,Ho)),Do(a,u,!0)),Po&&n==Fo&&m&&m.name!==Fo&&(Mo?No(p,"name",Fo):(h=!0,_=function(){return Ro(m,this)})),n)if(c={values:d(Fo),keys:o?_:d(Uo),entries:d(Bo)},s)for(l in c)(xo||h||!(l in p))&&wo(p,l,c[l]);else Io({target:t,proto:!0,forced:xo||h},c);return p[Vo]!==_&&wo(p,Vo,_,{name:n}),Oo[t]=_,c},Wo=function(e,t){return{value:e,done:t}},Go=R,Jo=Fi,Ko=Bi,zo=ar,qo=Ne.f,Yo=jo,Qo=Wo,Xo=ke,$o="Array Iterator",Zo=zo.set,es=zo.getterFor($o),ts=Yo(Array,"Array",(function(e,t){Zo(this,{type:$o,target:Go(e),index:0,kind:t})}),(function(){var e=es(this),t=e.target,i=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,Qo(void 0,!0)):Qo("keys"==i?r:"values"==i?t[r]:[r,t[r]],!1)}),"values"),is=Ko.Arguments=Ko.Array;if(Jo("keys"),Jo("values"),Jo("entries"),Xo&&"values"!==is.name)try{qo(is,"name",{value:"values"})}catch(SB){}var rs={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},ns=Me("span").classList,os=ns&&ns.constructor&&ns.constructor.prototype,ss=os===Object.prototype?void 0:os,as=C,cs=rs,ls=ss,ds=ts,us=zi,hs=_e,ps=hs("iterator"),ms=hs("toStringTag"),_s=ds.values,fs=function(e,t){if(e){if(e[ps]!==_s)try{us(e,ps,_s)}catch(SB){e[ps]=_s}if(e[ms]||us(e,ms,t),cs[t])for(var i in ds)if(e[i]!==ds[i])try{us(e,i,ds[i])}catch(SB){e[i]=ds[i]}}};for(var gs in cs)fs(as[gs]&&as[gs].prototype,gs);fs(ls,"DOMTokenList");var Ts="undefined"!=typeof process&&"process"==h(process),Es=Sr,vs=Ne,ys=function(e,t,i){return i.get&&Es(i.get,t,{getter:!0}),i.set&&Es(i.set,t,{setter:!0}),vs.f(e,t,i)},Ss=je,Is=ys,Rs=ke,As=_e("species"),Cs=function(e){var t=Ss(e);Rs&&t&&!t[As]&&Is(t,As,{configurable:!0,get:function(){return this}})},bs=We,ks=TypeError,Ds=function(e,t){if(bs(t,e))return e;throw ks("Incorrect invocation")},Ns={};Ns[_e("toStringTag")]="z";var ws="[object z]"===String(Ns),Os=Ee,Ps=h,Ms=_e("toStringTag"),Ls=Object,xs="Arguments"==Ps(function(){return arguments}()),Vs=ws?Ps:function(e){var t,i,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=function(e,t){try{return e[t]}catch(SB){}}(t=Ls(e),Ms))?i:xs?Ps(t):"Object"==(r=Ps(t))&&Os(t.callee)?"Arguments":r},Us=c,Fs=i,Bs=Ee,Hs=Vs,js=Pr,Ws=function(){},Gs=[],Js=je("Reflect","construct"),Ks=/^\s*(?:class|function)\b/,zs=Us(Ks.exec),qs=!Ks.exec(Ws),Ys=function(e){if(!Bs(e))return!1;try{return Js(Ws,Gs,e),!0}catch(SB){return!1}},Qs=function(e){if(!Bs(e))return!1;switch(Hs(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return qs||!!zs(Ks,js(e))}catch(SB){return!0}};Qs.sham=!0;var Xs,$s,Zs,ea,ta=!Js||Fs((function(){var e;return Ys(Ys.call)||!Ys(Object)||!Ys((function(){e=!0}))||e}))?Qs:Ys,ia=ta,ra=Qe,na=TypeError,oa=function(e){if(ia(e))return e;throw na(ra(e)+" is not a constructor")},sa=Ce,aa=oa,ca=T,la=_e("species"),da=function(e,t){var i,r=sa(e).constructor;return void 0===r||ca(i=sa(r)[la])?t:aa(i)},ua=r,ha=Function.prototype,pa=ha.apply,ma=ha.call,_a="object"==typeof Reflect&&Reflect.apply||(ua?ma.bind(pa):function(){return ma.apply(pa,arguments)}),fa=h,ga=c,Ta=function(e){if("Function"===fa(e))return ga(e)},Ea=et,va=r,ya=Ta(Ta.bind),Sa=function(e,t){return Ea(e),void 0===t?e:va?ya(e,t):function(){return e.apply(t,arguments)}},Ia=c([].slice),Ra=TypeError,Aa=function(e,t){if(e<t)throw Ra("Not enough arguments");return e},Ca=/(?:ipad|iphone|ipod).*applewebkit/i.test(Y),ba=C,ka=_a,Da=Sa,Na=Ee,wa=W,Oa=i,Pa=pi,Ma=Ia,La=Me,xa=Aa,Va=Ca,Ua=Ts,Fa=ba.setImmediate,Ba=ba.clearImmediate,Ha=ba.process,ja=ba.Dispatch,Wa=ba.Function,Ga=ba.MessageChannel,Ja=ba.String,Ka=0,za={},qa="onreadystatechange";Oa((function(){Xs=ba.location}));var Ya=function(e){if(wa(za,e)){var t=za[e];delete za[e],t()}},Qa=function(e){return function(){Ya(e)}},Xa=function(e){Ya(e.data)},$a=function(e){ba.postMessage(Ja(e),Xs.protocol+"//"+Xs.host)};Fa&&Ba||(Fa=function(e){xa(arguments.length,1);var t=Na(e)?e:Wa(e),i=Ma(arguments,1);return za[++Ka]=function(){ka(t,void 0,i)},$s(Ka),Ka},Ba=function(e){delete za[e]},Ua?$s=function(e){Ha.nextTick(Qa(e))}:ja&&ja.now?$s=function(e){ja.now(Qa(e))}:Ga&&!Va?(ea=(Zs=new Ga).port2,Zs.port1.onmessage=Xa,$s=Da(ea.postMessage,ea)):ba.addEventListener&&Na(ba.postMessage)&&!ba.importScripts&&Xs&&"file:"!==Xs.protocol&&!Oa($a)?($s=$a,ba.addEventListener("message",Xa,!1)):$s=qa in La("script")?function(e){Pa.appendChild(La("script"))[qa]=function(){Pa.removeChild(this),Ya(e)}}:function(e){setTimeout(Qa(e),0)});var Za={set:Fa,clear:Ba},ec=function(){this.head=null,this.tail=null};ec.prototype={add:function(e){var t={item:e,next:null},i=this.tail;i?i.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var tc,ic,rc,nc,oc,sc=ec,ac=/ipad|iphone|ipod/i.test(Y)&&"undefined"!=typeof Pebble,cc=/web0s(?!.*chrome)/i.test(Y),lc=C,dc=Sa,uc=cr.f,hc=Za.set,pc=sc,mc=Ca,_c=ac,fc=cc,gc=Ts,Tc=lc.MutationObserver||lc.WebKitMutationObserver,Ec=lc.document,vc=lc.process,yc=lc.Promise,Sc=uc(lc,"queueMicrotask"),Ic=Sc&&Sc.value;if(!Ic){var Rc=new pc,Ac=function(){var e,t;for(gc&&(e=vc.domain)&&e.exit();t=Rc.get();)try{t()}catch(SB){throw Rc.head&&tc(),SB}e&&e.enter()};mc||gc||fc||!Tc||!Ec?!_c&&yc&&yc.resolve?((nc=yc.resolve(void 0)).constructor=yc,oc=dc(nc.then,nc),tc=function(){oc(Ac)}):gc?tc=function(){vc.nextTick(Ac)}:(hc=dc(hc,lc),tc=function(){hc(Ac)}):(ic=!0,rc=Ec.createTextNode(""),new Tc(Ac).observe(rc,{characterData:!0}),tc=function(){rc.data=ic=!ic}),Ic=function(e){Rc.head||tc(),Rc.add(e)}}var Cc=Ic,bc=function(e){try{return{error:!1,value:e()}}catch(SB){return{error:!0,value:SB}}},kc=C.Promise,Dc="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Nc=!Dc&&!Ts&&"object"==typeof window&&"object"==typeof document,wc=C,Oc=kc,Pc=Ee,Mc=Dn,Lc=Pr,xc=_e,Vc=Nc,Uc=Dc,Fc=ie;Oc&&Oc.prototype;var Bc=xc("species"),Hc=!1,jc=Pc(wc.PromiseRejectionEvent),Wc=Mc("Promise",(function(){var e=Lc(Oc),t=e!==String(Oc);if(!t&&66===Fc)return!0;if(!Fc||Fc<51||!/native code/.test(e)){var i=new Oc((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((i.constructor={})[Bc]=r,!(Hc=i.then((function(){}))instanceof r))return!0}return!t&&(Vc||Uc)&&!jc})),Gc={CONSTRUCTOR:Wc,REJECTION_EVENT:jc,SUBCLASSING:Hc},Jc={},Kc=et,zc=TypeError,qc=function(e){var t,i;this.promise=new e((function(e,r){if(void 0!==t||void 0!==i)throw zc("Bad Promise constructor");t=e,i=r})),this.resolve=Kc(t),this.reject=Kc(i)};Jc.f=function(e){return new qc(e)};var Yc,Qc,Xc,$c=Vn,Zc=Ts,el=C,tl=Fe,il=tn,rl=So,nl=oo,ol=Cs,sl=et,al=Ee,cl=Se,ll=Ds,dl=da,ul=Za.set,hl=Cc,pl=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(SB){}},ml=bc,_l=sc,fl=ar,gl=kc,Tl=Jc,El="Promise",vl=Gc.CONSTRUCTOR,yl=Gc.REJECTION_EVENT,Sl=Gc.SUBCLASSING,Il=fl.getterFor(El),Rl=fl.set,Al=gl&&gl.prototype,Cl=gl,bl=Al,kl=el.TypeError,Dl=el.document,Nl=el.process,wl=Tl.f,Ol=wl,Pl=!!(Dl&&Dl.createEvent&&el.dispatchEvent),Ml="unhandledrejection",Ll=function(e){var t;return!(!cl(e)||!al(t=e.then))&&t},xl=function(e,t){var i,r,n,o=t.value,s=1==t.state,a=s?e.ok:e.fail,c=e.resolve,l=e.reject,d=e.domain;try{a?(s||(2===t.rejection&&Hl(t),t.rejection=1),!0===a?i=o:(d&&d.enter(),i=a(o),d&&(d.exit(),n=!0)),i===e.promise?l(kl("Promise-chain cycle")):(r=Ll(i))?tl(r,i,c,l):c(i)):l(o)}catch(SB){d&&!n&&d.exit(),l(SB)}},Vl=function(e,t){e.notified||(e.notified=!0,hl((function(){for(var i,r=e.reactions;i=r.get();)xl(i,e);e.notified=!1,t&&!e.rejection&&Fl(e)})))},Ul=function(e,t,i){var r,n;Pl?((r=Dl.createEvent("Event")).promise=t,r.reason=i,r.initEvent(e,!1,!0),el.dispatchEvent(r)):r={promise:t,reason:i},!yl&&(n=el["on"+e])?n(r):e===Ml&&pl("Unhandled promise rejection",i)},Fl=function(e){tl(ul,el,(function(){var t,i=e.facade,r=e.value;if(Bl(e)&&(t=ml((function(){Zc?Nl.emit("unhandledRejection",r,i):Ul(Ml,i,r)})),e.rejection=Zc||Bl(e)?2:1,t.error))throw t.value}))},Bl=function(e){return 1!==e.rejection&&!e.parent},Hl=function(e){tl(ul,el,(function(){var t=e.facade;Zc?Nl.emit("rejectionHandled",t):Ul("rejectionhandled",t,e.value)}))},jl=function(e,t,i){return function(r){e(t,r,i)}},Wl=function(e,t,i){e.done||(e.done=!0,i&&(e=i),e.value=t,e.state=2,Vl(e,!0))},Gl=function(e,t,i){if(!e.done){e.done=!0,i&&(e=i);try{if(e.facade===t)throw kl("Promise can't be resolved itself");var r=Ll(t);r?hl((function(){var i={done:!1};try{tl(r,t,jl(Gl,i,e),jl(Wl,i,e))}catch(SB){Wl(i,SB,e)}})):(e.value=t,e.state=1,Vl(e,!1))}catch(SB){Wl({done:!1},SB,e)}}};if(vl&&(bl=(Cl=function(e){ll(this,bl),sl(e),tl(Yc,this);var t=Il(this);try{e(jl(Gl,t),jl(Wl,t))}catch(SB){Wl(t,SB)}}).prototype,(Yc=function(e){Rl(this,{type:El,done:!1,notified:!1,parent:!1,reactions:new _l,rejection:!1,state:0,value:void 0})}).prototype=il(bl,"then",(function(e,t){var i=Il(this),r=wl(dl(this,Cl));return i.parent=!0,r.ok=!al(e)||e,r.fail=al(t)&&t,r.domain=Zc?Nl.domain:void 0,0==i.state?i.reactions.add(r):hl((function(){xl(r,i)})),r.promise})),Qc=function(){var e=new Yc,t=Il(e);this.promise=e,this.resolve=jl(Gl,t),this.reject=jl(Wl,t)},Tl.f=wl=function(e){return e===Cl||undefined===e?new Qc(e):Ol(e)},al(gl)&&Al!==Object.prototype)){Xc=Al.then,Sl||il(Al,"then",(function(e,t){var i=this;return new Cl((function(e,t){tl(Xc,i,e,t)})).then(e,t)}),{unsafe:!0});try{delete Al.constructor}catch(SB){}rl&&rl(Al,bl)}$c({global:!0,constructor:!0,wrap:!0,forced:vl},{Promise:Cl}),nl(Cl,El,!1),ol(El);var Jl=Bi,Kl=_e("iterator"),zl=Array.prototype,ql=function(e){return void 0!==e&&(Jl.Array===e||zl[Kl]===e)},Yl=Vs,Ql=rt,Xl=T,$l=Bi,Zl=_e("iterator"),ed=function(e){if(!Xl(e))return Ql(e,Zl)||Ql(e,"@@iterator")||$l[Yl(e)]},td=Fe,id=et,rd=Ce,nd=Qe,od=ed,sd=TypeError,ad=function(e,t){var i=arguments.length<2?od(e):t;if(id(i))return rd(td(i,e));throw sd(nd(e)+" is not iterable")},cd=Fe,ld=Ce,dd=rt,ud=function(e,t,i){var r,n;ld(e);try{if(!(r=dd(e,"return"))){if("throw"===t)throw i;return i}r=cd(r,e)}catch(SB){n=!0,r=SB}if("throw"===t)throw i;if(n)throw r;return ld(r),i},hd=Sa,pd=Fe,md=Ce,_d=Qe,fd=ql,gd=Wt,Td=We,Ed=ad,vd=ed,yd=ud,Sd=TypeError,Id=function(e,t){this.stopped=e,this.result=t},Rd=Id.prototype,Ad=function(e,t,i){var r,n,o,s,a,c,l,d=i&&i.that,u=!(!i||!i.AS_ENTRIES),h=!(!i||!i.IS_RECORD),p=!(!i||!i.IS_ITERATOR),m=!(!i||!i.INTERRUPTED),_=hd(t,d),f=function(e){return r&&yd(r,"normal",e),new Id(!0,e)},g=function(e){return u?(md(e),m?_(e[0],e[1],f):_(e[0],e[1])):m?_(e,f):_(e)};if(h)r=e.iterator;else if(p)r=e;else{if(!(n=vd(e)))throw Sd(_d(e)+" is not iterable");if(fd(n)){for(o=0,s=gd(e);s>o;o++)if((a=g(e[o]))&&Td(Rd,a))return a;return new Id(!1)}r=Ed(e,n)}for(c=h?e.next:r.next;!(l=pd(c,r)).done;){try{a=g(l.value)}catch(SB){yd(r,"throw",SB)}if("object"==typeof a&&a&&Td(Rd,a))return a}return new Id(!1)},Cd=_e("iterator"),bd=!1;try{var kd=0,Dd={next:function(){return{done:!!kd++}},return:function(){bd=!0}};Dd[Cd]=function(){return this},Array.from(Dd,(function(){throw 2}))}catch(SB){}var Nd=function(e,t){if(!t&&!bd)return!1;var i=!1;try{var r={};r[Cd]=function(){return{next:function(){return{done:i=!0}}}},e(r)}catch(SB){}return i},wd=kc,Od=Gc.CONSTRUCTOR||!Nd((function(e){wd.all(e).then(void 0,(function(){}))})),Pd=Fe,Md=et,Ld=Jc,xd=bc,Vd=Ad;Vn({target:"Promise",stat:!0,forced:Od},{all:function(e){var t=this,i=Ld.f(t),r=i.resolve,n=i.reject,o=xd((function(){var i=Md(t.resolve),o=[],s=0,a=1;Vd(e,(function(e){var c=s++,l=!1;a++,Pd(i,t,e).then((function(e){l||(l=!0,o[c]=e,--a||r(o))}),n)})),--a||r(o)}));return o.error&&n(o.value),i.promise}});var Ud=Vn,Fd=Gc.CONSTRUCTOR,Bd=kc,Hd=je,jd=Ee,Wd=tn,Gd=Bd&&Bd.prototype;if(Ud({target:"Promise",proto:!0,forced:Fd,real:!0},{catch:function(e){return this.then(void 0,e)}}),jd(Bd)){var Jd=Hd("Promise").prototype.catch;Gd.catch!==Jd&&Wd(Gd,"catch",Jd,{unsafe:!0})}var Kd=Fe,zd=et,qd=Jc,Yd=bc,Qd=Ad;Vn({target:"Promise",stat:!0,forced:Od},{race:function(e){var t=this,i=qd.f(t),r=i.reject,n=Yd((function(){var n=zd(t.resolve);Qd(e,(function(e){Kd(n,t,e).then(i.resolve,r)}))}));return n.error&&r(n.value),i.promise}});var Xd=Fe,$d=Jc;Vn({target:"Promise",stat:!0,forced:Gc.CONSTRUCTOR},{reject:function(e){var t=$d.f(this);return Xd(t.reject,void 0,e),t.promise}});var Zd=Ce,eu=Se,tu=Jc,iu=function(e,t){if(Zd(e),eu(t)&&t.constructor===e)return t;var i=tu.f(e);return(0,i.resolve)(t),i.promise},ru=Vn,nu=Gc.CONSTRUCTOR,ou=iu;je("Promise"),ru({target:"Promise",stat:!0,forced:nu},{resolve:function(e){return ou(this,e)}});var su=Ee,au=Se,cu=So,lu=function(e,t,i){var r,n;return cu&&su(r=t.constructor)&&r!==i&&au(n=r.prototype)&&n!==i.prototype&&cu(e,n),e},du=Se,uu=h,hu=_e("match"),pu=Vs,mu=String,_u=function(e){if("Symbol"===pu(e))throw TypeError("Cannot convert a Symbol value to a string");return mu(e)},fu=Ce,gu=function(){var e=fu(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},Tu=Fe,Eu=W,vu=We,yu=gu,Su=RegExp.prototype,Iu=i,Ru=C.RegExp,Au=Iu((function(){var e=Ru("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Cu=Au||Iu((function(){return!Ru("a","y").sticky})),bu=Au||Iu((function(){var e=Ru("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),ku={BROKEN_CARET:bu,MISSED_STICKY:Cu,UNSUPPORTED_Y:Au},Du=Ne.f,Nu=i,wu=C.RegExp,Ou=Nu((function(){var e=wu(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Pu=i,Mu=C.RegExp,Lu=Pu((function(){var e=Mu("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),xu=ke,Vu=C,Uu=c,Fu=Dn,Bu=lu,Hu=zi,ju=rn.f,Wu=We,Gu=function(e){var t;return du(e)&&(void 0!==(t=e[hu])?!!t:"RegExp"==uu(e))},Ju=_u,Ku=function(e){var t=e.flags;return void 0!==t||"flags"in Su||Eu(e,"flags")||!vu(Su,e)?t:Tu(yu,e)},zu=ku,qu=function(e,t,i){i in e||Du(e,i,{configurable:!0,get:function(){return t[i]},set:function(e){t[i]=e}})},Yu=tn,Qu=i,Xu=W,$u=ar.enforce,Zu=Cs,eh=Ou,th=Lu,ih=_e("match"),rh=Vu.RegExp,nh=rh.prototype,oh=Vu.SyntaxError,sh=Uu(nh.exec),ah=Uu("".charAt),ch=Uu("".replace),lh=Uu("".indexOf),dh=Uu("".slice),uh=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,hh=/a/g,ph=/a/g,mh=new rh(hh)!==hh,_h=zu.MISSED_STICKY,fh=zu.UNSUPPORTED_Y,gh=xu&&(!mh||_h||eh||th||Qu((function(){return ph[ih]=!1,rh(hh)!=hh||rh(ph)==ph||"/a/i"!=rh(hh,"i")})));if(Fu("RegExp",gh)){for(var Th=function(e,t){var i,r,n,o,s,a,c=Wu(nh,this),l=Gu(e),d=void 0===t,u=[],h=e;if(!c&&l&&d&&e.constructor===Th)return e;if((l||Wu(nh,e))&&(e=e.source,d&&(t=Ku(h))),e=void 0===e?"":Ju(e),t=void 0===t?"":Ju(t),h=e,eh&&"dotAll"in hh&&(r=!!t&&lh(t,"s")>-1)&&(t=ch(t,/s/g,"")),i=t,_h&&"sticky"in hh&&(n=!!t&&lh(t,"y")>-1)&&fh&&(t=ch(t,/y/g,"")),th&&(o=function(e){for(var t,i=e.length,r=0,n="",o=[],s={},a=!1,c=!1,l=0,d="";r<=i;r++){if("\\"===(t=ah(e,r)))t+=ah(e,++r);else if("]"===t)a=!1;else if(!a)switch(!0){case"["===t:a=!0;break;case"("===t:sh(uh,dh(e,r+1))&&(r+=2,c=!0),n+=t,l++;continue;case">"===t&&c:if(""===d||Xu(s,d))throw new oh("Invalid capture group name");s[d]=!0,o[o.length]=[d,l],c=!1,d="";continue}c?d+=t:n+=t}return[n,o]}(e),e=o[0],u=o[1]),s=Bu(rh(e,t),c?this:nh,Th),(r||n||u.length)&&(a=$u(s),r&&(a.dotAll=!0,a.raw=Th(function(e){for(var t,i=e.length,r=0,n="",o=!1;r<=i;r++)"\\"!==(t=ah(e,r))?o||"."!==t?("["===t?o=!0:"]"===t&&(o=!1),n+=t):n+="[\\s\\S]":n+=t+ah(e,++r);return n}(e),i)),n&&(a.sticky=!0),u.length&&(a.groups=u)),e!==h)try{Hu(s,"source",""===h?"(?:)":h)}catch(SB){}return s},Eh=ju(rh),vh=0;Eh.length>vh;)qu(Th,rh,Eh[vh++]);nh.constructor=Th,Th.prototype=nh,Yu(Vu,"RegExp",Th,{constructor:!0})}Zu("RegExp");var yh=Fe,Sh=c,Ih=_u,Rh=gu,Ah=ku,Ch=Ni,bh=ar.get,kh=Ou,Dh=Lu,Nh=b("native-string-replace",String.prototype.replace),wh=RegExp.prototype.exec,Oh=wh,Ph=Sh("".charAt),Mh=Sh("".indexOf),Lh=Sh("".replace),xh=Sh("".slice),Vh=function(){var e=/a/,t=/b*/g;return yh(wh,e,"a"),yh(wh,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),Uh=Ah.BROKEN_CARET,Fh=void 0!==/()??/.exec("")[1];(Vh||Fh||Uh||kh||Dh)&&(Oh=function(e){var t,i,r,n,o,s,a,c=this,l=bh(c),d=Ih(e),u=l.raw;if(u)return u.lastIndex=c.lastIndex,t=yh(Oh,u,d),c.lastIndex=u.lastIndex,t;var h=l.groups,p=Uh&&c.sticky,m=yh(Rh,c),_=c.source,f=0,g=d;if(p&&(m=Lh(m,"y",""),-1===Mh(m,"g")&&(m+="g"),g=xh(d,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Ph(d,c.lastIndex-1))&&(_="(?: "+_+")",g=" "+g,f++),i=new RegExp("^(?:"+_+")",m)),Fh&&(i=new RegExp("^"+_+"$(?!\\s)",m)),Vh&&(r=c.lastIndex),n=yh(wh,p?i:c,g),p?n?(n.input=xh(n.input,f),n[0]=xh(n[0],f),n.index=c.lastIndex,c.lastIndex+=n[0].length):c.lastIndex=0:Vh&&n&&(c.lastIndex=c.global?n.index+n[0].length:r),Fh&&n&&n.length>1&&yh(Nh,n[0],i,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(n[o]=void 0)})),n&&h)for(n.groups=s=Ch(null),o=0;o<h.length;o++)s[(a=h[o])[0]]=n[a[1]];return n});var Bh=Oh;Vn({target:"RegExp",proto:!0,forced:/./.exec!==Bh},{exec:Bh});var Hh=h,jh=Array.isArray||function(e){return"Array"==Hh(e)},Wh=jh,Gh=ta,Jh=Se,Kh=_e("species"),zh=Array,qh=function(e){var t;return Wh(e)&&(t=e.constructor,(Gh(t)&&(t===zh||Wh(t.prototype))||Jh(t)&&null===(t=t[Kh]))&&(t=void 0)),void 0===t?zh:t},Yh=Sa,Qh=g,Xh=B,$h=Wt,Zh=function(e,t){return new(qh(e))(0===t?0:t)},ep=c([].push),tp=function(e){var t=1==e,i=2==e,r=3==e,n=4==e,o=6==e,s=7==e,a=5==e||o;return function(c,l,d,u){for(var h,p,m=Xh(c),_=Qh(m),f=Yh(l,d),g=$h(_),T=0,E=u||Zh,v=t?E(c,g):i||s?E(c,0):void 0;g>T;T++)if((a||T in _)&&(p=f(h=_[T],T,m),e))if(t)v[T]=p;else if(p)switch(e){case 3:return!0;case 5:return h;case 6:return T;case 2:ep(v,h)}else switch(e){case 4:return!1;case 7:ep(v,h)}return o?-1:r||n?n:v}},ip={forEach:tp(0),map:tp(1),filter:tp(2),some:tp(3),every:tp(4),find:tp(5),findIndex:tp(6),filterReject:tp(7)},rp=i,np=function(e,t){var i=[][e];return!!i&&rp((function(){i.call(null,t||function(){return 1},1)}))},op=ip.forEach,sp=np("forEach")?[].forEach:function(e){return op(this,e,arguments.length>1?arguments[1]:void 0)},ap=C,cp=rs,lp=ss,dp=sp,up=zi,hp=function(e){if(e&&e.forEach!==dp)try{up(e,"forEach",dp)}catch(SB){e.forEach=dp}};for(var pp in cp)cp[pp]&&hp(ap[pp]&&ap[pp].prototype);hp(lp);var mp=et,_p=B,fp=g,gp=Wt,Tp=TypeError,Ep=function(e){return function(t,i,r,n){mp(i);var o=_p(t),s=fp(o),a=gp(o),c=e?a-1:0,l=e?-1:1;if(r<2)for(;;){if(c in s){n=s[c],c+=l;break}if(c+=l,e?c<0:a<=c)throw Tp("Reduce of empty array with no initial value")}for(;e?c>=0:a>c;c+=l)c in s&&(n=i(n,s[c],c,o));return n}},vp={left:Ep(!1),right:Ep(!0)}.left;Vn({target:"Array",proto:!0,forced:!Ts&&ie>79&&ie<83||!np("reduce")},{reduce:function(e){var t=arguments.length;return vp(this,e,t,t>1?arguments[1]:void 0)}});var yp=Ta,Sp=tn,Ip=Bh,Rp=i,Ap=_e,Cp=zi,bp=Ap("species"),kp=RegExp.prototype,Dp=c,Np=Mt,wp=_u,Op=y,Pp=Dp("".charAt),Mp=Dp("".charCodeAt),Lp=Dp("".slice),xp=function(e){return function(t,i){var r,n,o=wp(Op(t)),s=Np(i),a=o.length;return s<0||s>=a?e?"":void 0:(r=Mp(o,s))<55296||r>56319||s+1===a||(n=Mp(o,s+1))<56320||n>57343?e?Pp(o,s):r:e?Lp(o,s,s+2):n-56320+(r-55296<<10)+65536}},Vp={codeAt:xp(!1),charAt:xp(!0)},Up=Vp.charAt,Fp=c,Bp=B,Hp=Math.floor,jp=Fp("".charAt),Wp=Fp("".replace),Gp=Fp("".slice),Jp=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Kp=/\$([$&'`]|\d{1,2})/g,zp=Fe,qp=Ce,Yp=Ee,Qp=h,Xp=Bh,$p=TypeError,Zp=_a,em=Fe,tm=c,im=function(e,t,i,r){var n=Ap(e),o=!Rp((function(){var t={};return t[n]=function(){return 7},7!=""[e](t)})),s=o&&!Rp((function(){var t=!1,i=/a/;return"split"===e&&((i={}).constructor={},i.constructor[bp]=function(){return i},i.flags="",i[n]=/./[n]),i.exec=function(){return t=!0,null},i[n](""),!t}));if(!o||!s||i){var a=yp(/./[n]),c=t(n,""[e],(function(e,t,i,r,n){var s=yp(e),c=t.exec;return c===Ip||c===kp.exec?o&&!n?{done:!0,value:a(t,i,r)}:{done:!0,value:s(i,t,r)}:{done:!1}}));Sp(String.prototype,e,c[0]),Sp(kp,n,c[1])}r&&Cp(kp[n],"sham",!0)},rm=i,nm=Ce,om=Ee,sm=T,am=Mt,cm=Ht,lm=_u,dm=y,um=function(e,t,i){return t+(i?Up(e,t).length:1)},hm=rt,pm=function(e,t,i,r,n,o){var s=i+e.length,a=r.length,c=Kp;return void 0!==n&&(n=Bp(n),c=Jp),Wp(o,c,(function(o,c){var l;switch(jp(c,0)){case"$":return"$";case"&":return e;case"`":return Gp(t,0,i);case"'":return Gp(t,s);case"<":l=n[Gp(c,1,-1)];break;default:var d=+c;if(0===d)return o;if(d>a){var u=Hp(d/10);return 0===u?o:u<=a?void 0===r[u-1]?jp(c,1):r[u-1]+jp(c,1):o}l=r[d-1]}return void 0===l?"":l}))},mm=function(e,t){var i=e.exec;if(Yp(i)){var r=zp(i,e,t);return null!==r&&qp(r),r}if("RegExp"===Qp(e))return zp(Xp,e,t);throw $p("RegExp#exec called on incompatible receiver")},_m=_e("replace"),fm=Math.max,gm=Math.min,Tm=tm([].concat),Em=tm([].push),vm=tm("".indexOf),ym=tm("".slice),Sm="$0"==="a".replace(/./,"$0"),Im=!!/./[_m]&&""===/./[_m]("a","$0"),Rm=!rm((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}));im("replace",(function(e,t,i){var r=Im?"$":"$0";return[function(e,i){var r=dm(this),n=sm(e)?void 0:hm(e,_m);return n?em(n,e,r,i):em(t,lm(r),e,i)},function(e,n){var o=nm(this),s=lm(e);if("string"==typeof n&&-1===vm(n,r)&&-1===vm(n,"$<")){var a=i(t,o,s,n);if(a.done)return a.value}var c=om(n);c||(n=lm(n));var l=o.global;if(l){var d=o.unicode;o.lastIndex=0}for(var u=[];;){var h=mm(o,s);if(null===h)break;if(Em(u,h),!l)break;""===lm(h[0])&&(o.lastIndex=um(s,cm(o.lastIndex),d))}for(var p,m="",_=0,f=0;f<u.length;f++){for(var g=lm((h=u[f])[0]),T=fm(gm(am(h.index),s.length),0),E=[],v=1;v<h.length;v++)Em(E,void 0===(p=h[v])?p:String(p));var y=h.groups;if(c){var S=Tm([g],E,T,s);void 0!==y&&Em(S,y);var I=lm(Zp(n,void 0,S))}else I=pm(g,s,T,E,y,n);T>=_&&(m+=ym(s,_,T)+I,_=T+g.length)}return m+ym(s,_)}]}),!Rm||!Sm||Im);var Am=qt.includes,Cm=Fi;Vn({target:"Array",proto:!0,forced:i((function(){return!Array(1).includes()}))},{includes:function(e){return Am(this,e,arguments.length>1?arguments[1]:void 0)}}),Cm("includes");var bm=Mt,km=_u,Dm=y,Nm=RangeError,wm=c,Om=Ht,Pm=_u,Mm=function(e){var t=km(Dm(this)),i="",r=bm(e);if(r<0||Infinity==r)throw Nm("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(i+=t);return i},Lm=y,xm=wm(Mm),Vm=wm("".slice),Um=Math.ceil,Fm=function(e){return function(t,i,r){var n,o,s=Pm(Lm(t)),a=Om(i),c=s.length,l=void 0===r?" ":Pm(r);return a<=c||""==l?s:((o=xm(l,Um((n=a-c)/l.length))).length>n&&(o=Vm(o,0,n)),e?s+o:o+s)}},Bm={start:Fm(!1),end:Fm(!0)},Hm=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(Y),jm=Bm.start;Vn({target:"String",proto:!0,forced:Hm},{padStart:function(e){return jm(this,e,arguments.length>1?arguments[1]:void 0)}});var Wm=i,Gm=ke,Jm=_e("iterator"),Km=!Wm((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,i="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),i+=r+e})),!t.size&&!Gm||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Jm]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==i||"x"!==new URL("http://x",void 0).host})),zm=tn,qm=function(e,t,i){for(var r in t)zm(e,r,t[r],i);return e},Ym=Tt,Qm=Ne,Xm=Gi,$m=function(e,t,i){var r=Ym(t);r in e?Qm.f(e,r,Xm(0,i)):e[r]=i},Zm=Ut,e_=Wt,t_=$m,i_=Array,r_=Math.max,n_=function(e,t,i){for(var r=e_(e),n=Zm(t,r),o=Zm(void 0===i?r:i,r),s=i_(r_(o-n,0)),a=0;n<o;n++,a++)t_(s,a,e[n]);return s.length=a,s},o_=n_,s_=Math.floor,a_=function(e,t){var i=e.length,r=s_(i/2);return i<8?c_(e,t):l_(e,a_(o_(e,0,r),t),a_(o_(e,r),t),t)},c_=function(e,t){for(var i,r,n=e.length,o=1;o<n;){for(r=o,i=e[o];r&&t(e[r-1],i)>0;)e[r]=e[--r];r!==o++&&(e[r]=i)}return e},l_=function(e,t,i,r){for(var n=t.length,o=i.length,s=0,a=0;s<n||a<o;)e[s+a]=s<n&&a<o?r(t[s],i[a])<=0?t[s++]:i[a++]:s<n?t[s++]:i[a++];return e},d_=a_,u_=Vn,h_=C,p_=Fe,m_=c,__=ke,f_=Km,g_=tn,T_=ys,E_=qm,v_=oo,y_=po,S_=ar,I_=Ds,R_=Ee,A_=W,C_=Sa,b_=Vs,k_=Ce,D_=Se,N_=_u,w_=Ni,O_=Gi,P_=ad,M_=ed,L_=Aa,x_=d_,V_=_e("iterator"),U_="URLSearchParams",F_=U_+"Iterator",B_=S_.set,H_=S_.getterFor(U_),j_=S_.getterFor(F_),W_=Object.getOwnPropertyDescriptor,G_=function(e){if(!__)return h_[e];var t=W_(h_,e);return t&&t.value},J_=G_("fetch"),K_=G_("Request"),z_=G_("Headers"),q_=K_&&K_.prototype,Y_=z_&&z_.prototype,Q_=h_.RegExp,X_=h_.TypeError,$_=h_.decodeURIComponent,Z_=h_.encodeURIComponent,ef=m_("".charAt),tf=m_([].join),rf=m_([].push),nf=m_("".replace),of=m_([].shift),sf=m_([].splice),af=m_("".split),cf=m_("".slice),lf=/\+/g,df=Array(4),uf=function(e){return df[e-1]||(df[e-1]=Q_("((?:%[\\da-f]{2}){"+e+"})","gi"))},hf=function(e){try{return $_(e)}catch(SB){return e}},pf=function(e){var t=nf(e,lf," "),i=4;try{return $_(t)}catch(SB){for(;i;)t=nf(t,uf(i--),hf);return t}},mf=/[!'()~]|%20/g,_f={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ff=function(e){return _f[e]},gf=function(e){return nf(Z_(e),mf,ff)},Tf=y_((function(e,t){B_(this,{type:F_,iterator:P_(H_(e).entries),kind:t})}),"Iterator",(function(){var e=j_(this),t=e.kind,i=e.iterator.next(),r=i.value;return i.done||(i.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),i}),!0),Ef=function(e){this.entries=[],this.url=null,void 0!==e&&(D_(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===ef(e,0)?cf(e,1):e:N_(e)))};Ef.prototype={type:U_,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,i,r,n,o,s,a,c=M_(e);if(c)for(i=(t=P_(e,c)).next;!(r=p_(i,t)).done;){if(o=(n=P_(k_(r.value))).next,(s=p_(o,n)).done||(a=p_(o,n)).done||!p_(o,n).done)throw X_("Expected sequence with length 2");rf(this.entries,{key:N_(s.value),value:N_(a.value)})}else for(var l in e)A_(e,l)&&rf(this.entries,{key:l,value:N_(e[l])})},parseQuery:function(e){if(e)for(var t,i,r=af(e,"&"),n=0;n<r.length;)(t=r[n++]).length&&(i=af(t,"="),rf(this.entries,{key:pf(of(i)),value:pf(tf(i,"="))}))},serialize:function(){for(var e,t=this.entries,i=[],r=0;r<t.length;)e=t[r++],rf(i,gf(e.key)+"="+gf(e.value));return tf(i,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var vf=function(){I_(this,yf);var e=B_(this,new Ef(arguments.length>0?arguments[0]:void 0));__||(this.length=e.entries.length)},yf=vf.prototype;if(E_(yf,{append:function(e,t){L_(arguments.length,2);var i=H_(this);rf(i.entries,{key:N_(e),value:N_(t)}),__||this.length++,i.updateURL()},delete:function(e){L_(arguments.length,1);for(var t=H_(this),i=t.entries,r=N_(e),n=0;n<i.length;)i[n].key===r?sf(i,n,1):n++;__||(this.length=i.length),t.updateURL()},get:function(e){L_(arguments.length,1);for(var t=H_(this).entries,i=N_(e),r=0;r<t.length;r++)if(t[r].key===i)return t[r].value;return null},getAll:function(e){L_(arguments.length,1);for(var t=H_(this).entries,i=N_(e),r=[],n=0;n<t.length;n++)t[n].key===i&&rf(r,t[n].value);return r},has:function(e){L_(arguments.length,1);for(var t=H_(this).entries,i=N_(e),r=0;r<t.length;)if(t[r++].key===i)return!0;return!1},set:function(e,t){L_(arguments.length,1);for(var i,r=H_(this),n=r.entries,o=!1,s=N_(e),a=N_(t),c=0;c<n.length;c++)(i=n[c]).key===s&&(o?sf(n,c--,1):(o=!0,i.value=a));o||rf(n,{key:s,value:a}),__||(this.length=n.length),r.updateURL()},sort:function(){var e=H_(this);x_(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,i=H_(this).entries,r=C_(e,arguments.length>1?arguments[1]:void 0),n=0;n<i.length;)r((t=i[n++]).value,t.key,this)},keys:function(){return new Tf(this,"keys")},values:function(){return new Tf(this,"values")},entries:function(){return new Tf(this,"entries")}},{enumerable:!0}),g_(yf,V_,yf.entries,{name:"entries"}),g_(yf,"toString",(function(){return H_(this).serialize()}),{enumerable:!0}),__&&T_(yf,"size",{get:function(){return H_(this).entries.length},configurable:!0,enumerable:!0}),v_(vf,U_),u_({global:!0,constructor:!0,forced:!f_},{URLSearchParams:vf}),!f_&&R_(z_)){var Sf=m_(Y_.has),If=m_(Y_.set),Rf=function(e){if(D_(e)){var t,i=e.body;if(b_(i)===U_)return t=e.headers?new z_(e.headers):new z_,Sf(t,"content-type")||If(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),w_(e,{body:O_(0,N_(i)),headers:O_(0,t)})}return e};if(R_(J_)&&u_({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return J_(e,arguments.length>1?Rf(arguments[1]):{})}}),R_(K_)){var Af=function(e){return I_(this,q_),new K_(e,arguments.length>1?Rf(arguments[1]):{})};q_.constructor=Af,Af.prototype=q_,u_({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Af})}}var Cf={URLSearchParams:vf,getState:H_},bf=Vn,kf=kc,Df=i,Nf=je,wf=Ee,Of=da,Pf=iu,Mf=tn,Lf=kf&&kf.prototype;if(bf({target:"Promise",proto:!0,real:!0,forced:!!kf&&Df((function(){Lf.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Of(this,Nf("Promise")),i=wf(e);return this.then(i?function(i){return Pf(t,e()).then((function(){return i}))}:e,i?function(i){return Pf(t,e()).then((function(){throw i}))}:e)}}),wf(kf)){var xf=Nf("Promise").prototype.finally;Lf.finally!==xf&&Mf(Lf,"finally",xf,{unsafe:!0})}var Vf="\t\n\v\f\r                 \u2028\u2029\ufeff",Uf=y,Ff=_u,Bf=Vf,Hf=c("".replace),jf=RegExp("^["+Bf+"]+"),Wf=RegExp("(^|[^"+Bf+"])["+Bf+"]+$"),Gf=function(e){return function(t){var i=Ff(Uf(t));return 1&e&&(i=Hf(i,jf,"")),2&e&&(i=Hf(i,Wf,"$1")),i}},Jf={start:Gf(1),end:Gf(2),trim:Gf(3)},Kf=Dr.PROPER,zf=i,qf=Vf,Yf=Jf.trim;Vn({target:"String",proto:!0,forced:function(e){return zf((function(){return!!qf[e]()||"​…᠎"!=="​…᠎"[e]()||Kf&&qf[e].name!==e}))}("trim")},{trim:function(){return Yf(this)}});var Qf="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,Xf=Mt,$f=Ht,Zf=RangeError,eg=function(e){if(void 0===e)return 0;var t=Xf(e),i=$f(t);if(t!==i)throw Zf("Wrong length or index");return i},tg=Array,ig=Math.abs,rg=Math.pow,ng=Math.floor,og=Math.log,sg=Math.LN2,ag={pack:function(e,t,i){var r,n,o,s=tg(i),a=8*i-t-1,c=(1<<a)-1,l=c>>1,d=23===t?rg(2,-24)-rg(2,-77):0,u=e<0||0===e&&1/e<0?1:0,h=0;for((e=ig(e))!=e||Infinity===e?(n=e!=e?1:0,r=c):(r=ng(og(e)/sg),e*(o=rg(2,-r))<1&&(r--,o*=2),(e+=r+l>=1?d/o:d*rg(2,1-l))*o>=2&&(r++,o/=2),r+l>=c?(n=0,r=c):r+l>=1?(n=(e*o-1)*rg(2,t),r+=l):(n=e*rg(2,l-1)*rg(2,t),r=0));t>=8;)s[h++]=255&n,n/=256,t-=8;for(r=r<<t|n,a+=t;a>0;)s[h++]=255&r,r/=256,a-=8;return s[--h]|=128*u,s},unpack:function(e,t){var i,r=e.length,n=8*r-t-1,o=(1<<n)-1,s=o>>1,a=n-7,c=r-1,l=e[c--],d=127&l;for(l>>=7;a>0;)d=256*d+e[c--],a-=8;for(i=d&(1<<-a)-1,d>>=-a,a+=t;a>0;)i=256*i+e[c--],a-=8;if(0===d)d=1-s;else{if(d===o)return i?NaN:l?-Infinity:Infinity;i+=rg(2,t),d-=s}return(l?-1:1)*i*rg(2,d-t)}},cg=B,lg=Ut,dg=Wt,ug=function(e){for(var t=cg(this),i=dg(t),r=arguments.length,n=lg(r>1?arguments[1]:void 0,i),o=r>2?arguments[2]:void 0,s=void 0===o?i:lg(o,i);s>n;)t[n++]=e;return t},hg=C,pg=c,mg=ke,_g=Qf,fg=Dr,gg=zi,Tg=ys,Eg=qm,vg=i,yg=Ds,Sg=Mt,Ig=Ht,Rg=eg,Ag=ag,Cg=Kn,bg=So,kg=rn.f,Dg=ug,Ng=n_,wg=oo,Og=ar,Pg=fg.PROPER,Mg=fg.CONFIGURABLE,Lg="ArrayBuffer",xg="DataView",Vg="prototype",Ug="Wrong index",Fg=Og.getterFor(Lg),Bg=Og.getterFor(xg),Hg=Og.set,jg=hg[Lg],Wg=jg,Gg=Wg&&Wg[Vg],Jg=hg[xg],Kg=Jg&&Jg[Vg],zg=Object.prototype,qg=hg.Array,Yg=hg.RangeError,Qg=pg(Dg),Xg=pg([].reverse),$g=Ag.pack,Zg=Ag.unpack,eT=function(e){return[255&e]},tT=function(e){return[255&e,e>>8&255]},iT=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},rT=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},nT=function(e){return $g(e,23,4)},oT=function(e){return $g(e,52,8)},sT=function(e,t,i){Tg(e[Vg],t,{configurable:!0,get:function(){return i(this)[t]}})},aT=function(e,t,i,r){var n=Rg(i),o=Bg(e);if(n+t>o.byteLength)throw Yg(Ug);var s=o.bytes,a=n+o.byteOffset,c=Ng(s,a,a+t);return r?c:Xg(c)},cT=function(e,t,i,r,n,o){var s=Rg(i),a=Bg(e);if(s+t>a.byteLength)throw Yg(Ug);for(var c=a.bytes,l=s+a.byteOffset,d=r(+n),u=0;u<t;u++)c[l+u]=d[o?u:t-u-1]};if(_g){var lT=Pg&&jg.name!==Lg;if(vg((function(){jg(1)}))&&vg((function(){new jg(-1)}))&&!vg((function(){return new jg,new jg(1.5),new jg(NaN),1!=jg.length||lT&&!Mg})))lT&&Mg&&gg(jg,"name",Lg);else{(Wg=function(e){return yg(this,Gg),new jg(Rg(e))})[Vg]=Gg;for(var dT,uT=kg(jg),hT=0;uT.length>hT;)(dT=uT[hT++])in Wg||gg(Wg,dT,jg[dT]);Gg.constructor=Wg}bg&&Cg(Kg)!==zg&&bg(Kg,zg);var pT=new Jg(new Wg(2)),mT=pg(Kg.setInt8);pT.setInt8(0,2147483648),pT.setInt8(1,2147483649),!pT.getInt8(0)&&pT.getInt8(1)||Eg(Kg,{setInt8:function(e,t){mT(this,e,t<<24>>24)},setUint8:function(e,t){mT(this,e,t<<24>>24)}},{unsafe:!0})}else Gg=(Wg=function(e){yg(this,Gg);var t=Rg(e);Hg(this,{type:Lg,bytes:Qg(qg(t),0),byteLength:t}),mg||(this.byteLength=t,this.detached=!1)})[Vg],Kg=(Jg=function(e,t,i){yg(this,Kg),yg(e,Gg);var r=Fg(e),n=r.byteLength,o=Sg(t);if(o<0||o>n)throw Yg("Wrong offset");if(o+(i=void 0===i?n-o:Ig(i))>n)throw Yg("Wrong length");Hg(this,{type:xg,buffer:e,byteLength:i,byteOffset:o,bytes:r.bytes}),mg||(this.buffer=e,this.byteLength=i,this.byteOffset=o)})[Vg],mg&&(sT(Wg,"byteLength",Fg),sT(Jg,"buffer",Bg),sT(Jg,"byteLength",Bg),sT(Jg,"byteOffset",Bg)),Eg(Kg,{getInt8:function(e){return aT(this,1,e)[0]<<24>>24},getUint8:function(e){return aT(this,1,e)[0]},getInt16:function(e){var t=aT(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=aT(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return rT(aT(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return rT(aT(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return Zg(aT(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return Zg(aT(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){cT(this,1,e,eT,t)},setUint8:function(e,t){cT(this,1,e,eT,t)},setInt16:function(e,t){cT(this,2,e,tT,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){cT(this,2,e,tT,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){cT(this,4,e,iT,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){cT(this,4,e,iT,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){cT(this,4,e,nT,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){cT(this,8,e,oT,t,arguments.length>2?arguments[2]:void 0)}});wg(Wg,Lg),wg(Jg,xg);var _T={ArrayBuffer:Wg,DataView:Jg},fT=Vn,gT=Ta,TT=i,ET=Ce,vT=Ut,yT=Ht,ST=da,IT=_T.ArrayBuffer,RT=_T.DataView,AT=RT.prototype,CT=gT(IT.prototype.slice),bT=gT(AT.getUint8),kT=gT(AT.setUint8);fT({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:TT((function(){return!new IT(2).slice(1,void 0).byteLength}))},{slice:function(e,t){if(CT&&void 0===t)return CT(ET(this),e);for(var i=ET(this).byteLength,r=vT(e,i),n=vT(void 0===t?i:t,i),o=new(ST(this,IT))(yT(n-r)),s=new RT(this),a=new RT(o),c=0;r<n;)kT(a,c++,bT(s,r++));return o}});var DT,NT,wT,OT={},PT={get exports(){return OT},set exports(e){OT=e}},MT=Qf,LT=ke,xT=C,VT=Ee,UT=Se,FT=W,BT=Vs,HT=Qe,jT=zi,WT=tn,GT=ys,JT=We,KT=Kn,zT=So,qT=_e,YT=q,QT=ar.enforce,XT=ar.get,$T=xT.Int8Array,ZT=$T&&$T.prototype,eE=xT.Uint8ClampedArray,tE=eE&&eE.prototype,iE=$T&&KT($T),rE=ZT&&KT(ZT),nE=Object.prototype,oE=xT.TypeError,sE=qT("toStringTag"),aE=YT("TYPED_ARRAY_TAG"),cE="TypedArrayConstructor",lE=MT&&!!zT&&"Opera"!==BT(xT.opera),dE=!1,uE={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},hE={BigInt64Array:8,BigUint64Array:8},pE=function(e){var t=KT(e);if(UT(t)){var i=XT(t);return i&&FT(i,cE)?i[cE]:pE(t)}},mE=function(e){if(!UT(e))return!1;var t=BT(e);return FT(uE,t)||FT(hE,t)};for(DT in uE)(wT=(NT=xT[DT])&&NT.prototype)?QT(wT)[cE]=NT:lE=!1;for(DT in hE)(wT=(NT=xT[DT])&&NT.prototype)&&(QT(wT)[cE]=NT);if((!lE||!VT(iE)||iE===Function.prototype)&&(iE=function(){throw oE("Incorrect invocation")},lE))for(DT in uE)xT[DT]&&zT(xT[DT],iE);if((!lE||!rE||rE===nE)&&(rE=iE.prototype,lE))for(DT in uE)xT[DT]&&zT(xT[DT].prototype,rE);if(lE&&KT(tE)!==rE&&zT(tE,rE),LT&&!FT(rE,sE))for(DT in dE=!0,GT(rE,sE,{configurable:!0,get:function(){return UT(this)?this[aE]:void 0}}),uE)xT[DT]&&jT(xT[DT],aE,DT);var _E={NATIVE_ARRAY_BUFFER_VIEWS:lE,TYPED_ARRAY_TAG:dE&&aE,aTypedArray:function(e){if(mE(e))return e;throw oE("Target is not a typed array")},aTypedArrayConstructor:function(e){if(VT(e)&&(!zT||JT(iE,e)))return e;throw oE(HT(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,i,r){if(LT){if(i)for(var n in uE){var o=xT[n];if(o&&FT(o.prototype,e))try{delete o.prototype[e]}catch(SB){try{o.prototype[e]=t}catch(s){}}}rE[e]&&!i||WT(rE,e,i?t:lE&&ZT[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,i){var r,n;if(LT){if(zT){if(i)for(r in uE)if((n=xT[r])&&FT(n,e))try{delete n[e]}catch(SB){}if(iE[e]&&!i)return;try{return WT(iE,e,i?t:lE&&iE[e]||t)}catch(SB){}}for(r in uE)!(n=xT[r])||n[e]&&!i||WT(n,e,t)}},getTypedArrayConstructor:pE,isView:function(e){if(!UT(e))return!1;var t=BT(e);return"DataView"===t||FT(uE,t)||FT(hE,t)},isTypedArray:mE,TypedArray:iE,TypedArrayPrototype:rE},fE=C,gE=i,TE=Nd,EE=_E.NATIVE_ARRAY_BUFFER_VIEWS,vE=fE.ArrayBuffer,yE=fE.Int8Array,SE=!EE||!gE((function(){yE(1)}))||!gE((function(){new yE(-1)}))||!TE((function(e){new yE,new yE(null),new yE(1.5),new yE(e)}),!0)||gE((function(){return 1!==new yE(new vE(2),1,void 0).length})),IE=Se,RE=Math.floor,AE=Number.isInteger||function(e){return!IE(e)&&isFinite(e)&&RE(e)===e},CE=Mt,bE=RangeError,kE=function(e){var t=CE(e);if(t<0)throw bE("The argument can't be less than 0");return t},DE=RangeError,NE=function(e,t){var i=kE(e);if(i%t)throw DE("Wrong offset");return i},wE=Vs,OE=_t,PE=TypeError,ME=function(e){var t=OE(e,"number");if("number"==typeof t)throw PE("Can't convert number to bigint");return BigInt(t)},LE=Sa,xE=Fe,VE=oa,UE=B,FE=Wt,BE=ad,HE=ed,jE=ql,WE=function(e){var t=wE(e);return"BigInt64Array"==t||"BigUint64Array"==t},GE=_E.aTypedArrayConstructor,JE=ME,KE=function(e){var t,i,r,n,o,s,a,c,l=VE(this),d=UE(e),u=arguments.length,h=u>1?arguments[1]:void 0,p=void 0!==h,m=HE(d);if(m&&!jE(m))for(c=(a=BE(d,m)).next,d=[];!(s=xE(c,a)).done;)d.push(s.value);for(p&&u>2&&(h=LE(h,arguments[2])),i=FE(d),r=new(GE(l))(i),n=WE(r),t=0;i>t;t++)o=p?h(d[t],t):d[t],r[t]=n?JE(o):+o;return r},zE=Vn,qE=C,YE=Fe,QE=ke,XE=SE,$E=_E,ZE=_T,ev=Ds,tv=Gi,iv=zi,rv=AE,nv=Ht,ov=eg,sv=NE,av=Tt,cv=W,lv=Vs,dv=Se,uv=qe,hv=Ni,pv=We,mv=So,_v=rn.f,fv=KE,gv=ip.forEach,Tv=Cs,Ev=ys,vv=Ne,yv=cr,Sv=lu,Iv=ar.get,Rv=ar.set,Av=ar.enforce,Cv=vv.f,bv=yv.f,kv=Math.round,Dv=qE.RangeError,Nv=ZE.ArrayBuffer,wv=Nv.prototype,Ov=ZE.DataView,Pv=$E.NATIVE_ARRAY_BUFFER_VIEWS,Mv=$E.TYPED_ARRAY_TAG,Lv=$E.TypedArray,xv=$E.TypedArrayPrototype,Vv=$E.aTypedArrayConstructor,Uv=$E.isTypedArray,Fv="BYTES_PER_ELEMENT",Bv="Wrong length",Hv=function(e,t){Vv(e);for(var i=0,r=t.length,n=new e(r);r>i;)n[i]=t[i++];return n},jv=function(e,t){Ev(e,t,{configurable:!0,get:function(){return Iv(this)[t]}})},Wv=function(e){var t;return pv(wv,e)||"ArrayBuffer"==(t=lv(e))||"SharedArrayBuffer"==t},Gv=function(e,t){return Uv(e)&&!uv(t)&&t in e&&rv(+t)&&t>=0},Jv=function(e,t){return t=av(t),Gv(e,t)?tv(2,e[t]):bv(e,t)},Kv=function(e,t,i){return t=av(t),!(Gv(e,t)&&dv(i)&&cv(i,"value"))||cv(i,"get")||cv(i,"set")||i.configurable||cv(i,"writable")&&!i.writable||cv(i,"enumerable")&&!i.enumerable?Cv(e,t,i):(e[t]=i.value,e)};QE?(Pv||(yv.f=Jv,vv.f=Kv,jv(xv,"buffer"),jv(xv,"byteOffset"),jv(xv,"byteLength"),jv(xv,"length")),zE({target:"Object",stat:!0,forced:!Pv},{getOwnPropertyDescriptor:Jv,defineProperty:Kv}),PT.exports=function(e,t,i){var r=e.match(/\d+/)[0]/8,n=e+(i?"Clamped":"")+"Array",o="get"+e,s="set"+e,a=qE[n],c=a,l=c&&c.prototype,d={},u=function(e,t){Cv(e,t,{get:function(){return function(e,t){var i=Iv(e);return i.view[o](t*r+i.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,n){var o=Iv(e);i&&(n=(n=kv(n))<0?0:n>255?255:255&n),o.view[s](t*r+o.byteOffset,n,!0)}(this,t,e)},enumerable:!0})};Pv?XE&&(c=t((function(e,t,i,n){return ev(e,l),Sv(dv(t)?Wv(t)?void 0!==n?new a(t,sv(i,r),n):void 0!==i?new a(t,sv(i,r)):new a(t):Uv(t)?Hv(c,t):YE(fv,c,t):new a(ov(t)),e,c)})),mv&&mv(c,Lv),gv(_v(a),(function(e){e in c||iv(c,e,a[e])})),c.prototype=l):(c=t((function(e,t,i,n){ev(e,l);var o,s,a,d=0,h=0;if(dv(t)){if(!Wv(t))return Uv(t)?Hv(c,t):YE(fv,c,t);o=t,h=sv(i,r);var p=t.byteLength;if(void 0===n){if(p%r)throw Dv(Bv);if((s=p-h)<0)throw Dv(Bv)}else if((s=nv(n)*r)+h>p)throw Dv(Bv);a=s/r}else a=ov(t),o=new Nv(s=a*r);for(Rv(e,{buffer:o,byteOffset:h,byteLength:s,length:a,view:new Ov(o)});d<a;)u(e,d++)})),mv&&mv(c,Lv),l=c.prototype=hv(xv)),l.constructor!==c&&iv(l,"constructor",c),Av(l).TypedArrayConstructor=c,Mv&&iv(l,Mv,n);var h=c!=a;d[n]=c,zE({global:!0,constructor:!0,forced:h,sham:!Pv},d),Fv in c||iv(c,Fv,r),Fv in l||iv(l,Fv,r),Tv(n)}):PT.exports=function(){},OT("Uint8",(function(e){return function(t,i,r){return e(this,t,i,r)}}));var zv=ug,qv=ME,Yv=Vs,Qv=Fe,Xv=i,$v=_E.aTypedArray,Zv=_E.exportTypedArrayMethod,ey=c("".slice);Zv("fill",(function(e){var t=arguments.length;$v(this);var i="Big"===ey(Yv(this),0,3)?qv(e):+e;return Qv(zv,this,i,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),Xv((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var ty=C,iy=Fe,ry=_E,ny=Wt,oy=NE,sy=B,ay=i,cy=ty.RangeError,ly=ty.Int8Array,dy=ly&&ly.prototype,uy=dy&&dy.set,hy=ry.aTypedArray,py=ry.exportTypedArrayMethod,my=!ay((function(){var e=new Uint8ClampedArray(2);return iy(uy,e,{length:1,0:3},1),3!==e[1]})),_y=my&&ry.NATIVE_ARRAY_BUFFER_VIEWS&&ay((function(){var e=new ly(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));py("set",(function(e){hy(this);var t=oy(arguments.length>1?arguments[1]:void 0,1),i=sy(e);if(my)return iy(uy,this,i,t);var r=this.length,n=ny(i),o=0;if(n+t>r)throw cy("Wrong length");for(;o<n;)this[t+o]=i[o++]}),!my||_y);var fy=Y.match(/firefox\/(\d+)/i),gy=!!fy&&+fy[1],Ty=/MSIE|Trident/.test(Y),Ey=Y.match(/AppleWebKit\/(\d+)\./),vy=!!Ey&&+Ey[1],yy=Ta,Sy=i,Iy=et,Ry=d_,Ay=gy,Cy=Ty,by=ie,ky=vy,Dy=_E.aTypedArray,Ny=_E.exportTypedArrayMethod,wy=C.Uint16Array,Oy=wy&&yy(wy.prototype.sort),Py=!(!Oy||Sy((function(){Oy(new wy(2),null)}))&&Sy((function(){Oy(new wy(2),{})}))),My=!!Oy&&!Sy((function(){if(by)return by<74;if(Ay)return Ay<67;if(Cy)return!0;if(ky)return ky<602;var e,t,i=new wy(516),r=Array(516);for(e=0;e<516;e++)t=e%4,i[e]=515-e,r[e]=e-2*t+3;for(Oy(i,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(i[e]!==r[e])return!0}));Ny("sort",(function(e){return void 0!==e&&Iy(e),My?Oy(this,e):Ry(Dy(this),function(e){return function(t,i){return void 0!==e?+e(t,i)||0:i!=i?-1:t!=t?1:0===t&&0===i?1/t>0&&1/i<0?1:-1:t>i}}(e))}),!My||Py);var Ly=Vn,xy=ke,Vy=c,Uy=W,Fy=Ee,By=We,Hy=_u,jy=ys,Wy=vn,Gy=C.Symbol,Jy=Gy&&Gy.prototype;if(xy&&Fy(Gy)&&(!("description"in Jy)||void 0!==Gy().description)){var Ky={},zy=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:Hy(arguments[0]),t=By(Jy,this)?new Gy(e):void 0===e?Gy():Gy(e);return""===e&&(Ky[t]=!0),t};Wy(zy,Gy),zy.prototype=Jy,Jy.constructor=zy;var qy="Symbol(test)"==String(Gy("test")),Yy=Vy(Jy.valueOf),Qy=Vy(Jy.toString),Xy=/^Symbol\((.*)\)[^)]+$/,$y=Vy("".replace),Zy=Vy("".slice);jy(Jy,"description",{configurable:!0,get:function(){var e=Yy(this);if(Uy(Ky,e))return"";var t=Qy(e),i=qy?Zy(t,7,-1):$y(t,Xy,"$1");return""===i?void 0:i}}),Ly({global:!0,constructor:!0,forced:!0},{Symbol:zy})}var eS=Vp.charAt,tS=_u,iS=ar,rS=jo,nS=Wo,oS="String Iterator",sS=iS.set,aS=iS.getterFor(oS);rS(String,"String",(function(e){sS(this,{type:oS,string:tS(e),index:0})}),(function(){var e,t=aS(this),i=t.string,r=t.index;return r>=i.length?nS(void 0,!0):(e=eS(i,r),t.index+=e.length,nS(e,!1))}));var cS,lS=ke,dS=c,uS=Fe,hS=i,pS=oi,mS=sn,_S=lr,fS=B,gS=g,TS=Object.assign,ES=Object.defineProperty,vS=dS([].concat),yS=!TS||hS((function(){if(lS&&1!==TS({b:1},TS(ES({},"a",{enumerable:!0,get:function(){ES(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},i=Symbol(),r="abcdefghijklmnopqrst";return e[i]=7,r.split("").forEach((function(e){t[e]=e})),7!=TS({},e)[i]||pS(TS({},t)).join("")!=r}))?function(e,t){for(var i=fS(e),r=arguments.length,n=1,o=mS.f,s=_S.f;r>n;)for(var a,c=gS(arguments[n++]),l=o?vS(pS(c),o(c)):pS(c),d=l.length,u=0;d>u;)a=l[u++],lS&&!uS(s,c,a)||(i[a]=c[a]);return i}:TS,SS=Ce,IS=ud,RS=Sa,AS=Fe,CS=B,bS=function(e,t,i,r){try{return r?t(SS(i)[0],i[1]):t(i)}catch(SB){IS(e,"throw",SB)}},kS=ql,DS=ta,NS=Wt,wS=$m,OS=ad,PS=ed,MS=Array,LS=c,xS=2147483647,VS=/[^\0-\u007E]/,US=/[.\u3002\uFF0E\uFF61]/g,FS="Overflow: input needs wider integers to process",BS=RangeError,HS=LS(US.exec),jS=Math.floor,WS=String.fromCharCode,GS=LS("".charCodeAt),JS=LS([].join),KS=LS([].push),zS=LS("".replace),qS=LS("".split),YS=LS("".toLowerCase),QS=function(e){return e+22+75*(e<26)},XS=function(e,t,i){var r=0;for(e=i?jS(e/700):e>>1,e+=jS(e/t);e>455;)e=jS(e/35),r+=36;return jS(r+36*e/(e+38))},$S=function(e){var t=[];e=function(e){for(var t=[],i=0,r=e.length;i<r;){var n=GS(e,i++);if(n>=55296&&n<=56319&&i<r){var o=GS(e,i++);56320==(64512&o)?KS(t,((1023&n)<<10)+(1023&o)+65536):(KS(t,n),i--)}else KS(t,n)}return t}(e);var i,r,n=e.length,o=128,s=0,a=72;for(i=0;i<e.length;i++)(r=e[i])<128&&KS(t,WS(r));var c=t.length,l=c;for(c&&KS(t,"-");l<n;){var d=xS;for(i=0;i<e.length;i++)(r=e[i])>=o&&r<d&&(d=r);var u=l+1;if(d-o>jS((xS-s)/u))throw BS(FS);for(s+=(d-o)*u,o=d,i=0;i<e.length;i++){if((r=e[i])<o&&++s>xS)throw BS(FS);if(r==o){for(var h=s,p=36;;){var m=p<=a?1:p>=a+26?26:p-a;if(h<m)break;var _=h-m,f=36-m;KS(t,WS(QS(m+_%f))),h=jS(_/f),p+=36}KS(t,WS(QS(h))),a=XS(s,u,l==c),s=0,l++}}s++,o++}return JS(t,"")},ZS=Vn,eI=ke,tI=Km,iI=C,rI=Sa,nI=c,oI=tn,sI=ys,aI=Ds,cI=W,lI=yS,dI=function(e){var t=CS(e),i=DS(this),r=arguments.length,n=r>1?arguments[1]:void 0,o=void 0!==n;o&&(n=RS(n,r>2?arguments[2]:void 0));var s,a,c,l,d,u,h=PS(t),p=0;if(!h||this===MS&&kS(h))for(s=NS(t),a=i?new this(s):MS(s);s>p;p++)u=o?n(t[p],p):t[p],wS(a,p,u);else for(d=(l=OS(t,h)).next,a=i?new this:[];!(c=AS(d,l)).done;p++)u=o?bS(l,n,[c.value,p],!0):c.value,wS(a,p,u);return a.length=p,a},uI=n_,hI=Vp.codeAt,pI=function(e){var t,i,r=[],n=qS(zS(YS(e),US,"."),".");for(t=0;t<n.length;t++)i=n[t],KS(r,HS(VS,i)?"xn--"+$S(i):i);return JS(r,".")},mI=_u,_I=oo,fI=Aa,gI=Cf,TI=ar,EI=TI.set,vI=TI.getterFor("URL"),yI=gI.URLSearchParams,SI=gI.getState,II=iI.URL,RI=iI.TypeError,AI=iI.parseInt,CI=Math.floor,bI=Math.pow,kI=nI("".charAt),DI=nI(/./.exec),NI=nI([].join),wI=nI(1..toString),OI=nI([].pop),PI=nI([].push),MI=nI("".replace),LI=nI([].shift),xI=nI("".split),VI=nI("".slice),UI=nI("".toLowerCase),FI=nI([].unshift),BI="Invalid scheme",HI="Invalid host",jI="Invalid port",WI=/[a-z]/i,GI=/[\d+-.a-z]/i,JI=/\d/,KI=/^0x/i,zI=/^[0-7]+$/,qI=/^\d+$/,YI=/^[\da-f]+$/i,QI=/[\0\t\n\r #%/:<>?@[\\\]^|]/,XI=/[\0\t\n\r #/:<>?@[\\\]^|]/,$I=/^[\u0000-\u0020]+/,ZI=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,eR=/[\t\n\r]/g,tR=function(e){var t,i,r,n;if("number"==typeof e){for(t=[],i=0;i<4;i++)FI(t,e%256),e=CI(e/256);return NI(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,i=1,r=null,n=0,o=0;o<8;o++)0!==e[o]?(n>i&&(t=r,i=n),r=null,n=0):(null===r&&(r=o),++n);return n>i&&(t=r,i=n),t}(e),i=0;i<8;i++)n&&0===e[i]||(n&&(n=!1),r===i?(t+=i?":":"::",n=!0):(t+=wI(e[i],16),i<7&&(t+=":")));return"["+t+"]"}return e},iR={},rR=lI({},iR,{" ":1,'"':1,"<":1,">":1,"`":1}),nR=lI({},rR,{"#":1,"?":1,"{":1,"}":1}),oR=lI({},nR,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),sR=function(e,t){var i=hI(e,0);return i>32&&i<127&&!cI(t,e)?e:encodeURIComponent(e)},aR={ftp:21,file:null,http:80,https:443,ws:80,wss:443},cR=function(e,t){var i;return 2==e.length&&DI(WI,kI(e,0))&&(":"==(i=kI(e,1))||!t&&"|"==i)},lR=function(e){var t;return e.length>1&&cR(VI(e,0,2))&&(2==e.length||"/"===(t=kI(e,2))||"\\"===t||"?"===t||"#"===t)},dR=function(e){return"."===e||"%2e"===UI(e)},uR={},hR={},pR={},mR={},_R={},fR={},gR={},TR={},ER={},vR={},yR={},SR={},IR={},RR={},AR={},CR={},bR={},kR={},DR={},NR={},wR={},OR=function(e,t,i){var r,n,o,s=mI(e);if(t){if(n=this.parse(s))throw RI(n);this.searchParams=null}else{if(void 0!==i&&(r=new OR(i,!0)),n=this.parse(s,null,r))throw RI(n);(o=SI(new yI)).bindURL(this),this.searchParams=o}};OR.prototype={type:"URL",parse:function(e,t,i){var r,n,o,s,a,c=this,l=t||uR,d=0,u="",h=!1,p=!1,m=!1;for(e=mI(e),t||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,e=MI(e,$I,""),e=MI(e,ZI,"$1")),e=MI(e,eR,""),r=dI(e);d<=r.length;){switch(n=r[d],l){case uR:if(!n||!DI(WI,n)){if(t)return BI;l=pR;continue}u+=UI(n),l=hR;break;case hR:if(n&&(DI(GI,n)||"+"==n||"-"==n||"."==n))u+=UI(n);else{if(":"!=n){if(t)return BI;u="",l=pR,d=0;continue}if(t&&(c.isSpecial()!=cI(aR,u)||"file"==u&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=u,t)return void(c.isSpecial()&&aR[c.scheme]==c.port&&(c.port=null));u="","file"==c.scheme?l=RR:c.isSpecial()&&i&&i.scheme==c.scheme?l=mR:c.isSpecial()?l=TR:"/"==r[d+1]?(l=_R,d++):(c.cannotBeABaseURL=!0,PI(c.path,""),l=DR)}break;case pR:if(!i||i.cannotBeABaseURL&&"#"!=n)return BI;if(i.cannotBeABaseURL&&"#"==n){c.scheme=i.scheme,c.path=uI(i.path),c.query=i.query,c.fragment="",c.cannotBeABaseURL=!0,l=wR;break}l="file"==i.scheme?RR:fR;continue;case mR:if("/"!=n||"/"!=r[d+1]){l=fR;continue}l=ER,d++;break;case _R:if("/"==n){l=vR;break}l=kR;continue;case fR:if(c.scheme=i.scheme,n==cS)c.username=i.username,c.password=i.password,c.host=i.host,c.port=i.port,c.path=uI(i.path),c.query=i.query;else if("/"==n||"\\"==n&&c.isSpecial())l=gR;else if("?"==n)c.username=i.username,c.password=i.password,c.host=i.host,c.port=i.port,c.path=uI(i.path),c.query="",l=NR;else{if("#"!=n){c.username=i.username,c.password=i.password,c.host=i.host,c.port=i.port,c.path=uI(i.path),c.path.length--,l=kR;continue}c.username=i.username,c.password=i.password,c.host=i.host,c.port=i.port,c.path=uI(i.path),c.query=i.query,c.fragment="",l=wR}break;case gR:if(!c.isSpecial()||"/"!=n&&"\\"!=n){if("/"!=n){c.username=i.username,c.password=i.password,c.host=i.host,c.port=i.port,l=kR;continue}l=vR}else l=ER;break;case TR:if(l=ER,"/"!=n||"/"!=kI(u,d+1))continue;d++;break;case ER:if("/"!=n&&"\\"!=n){l=vR;continue}break;case vR:if("@"==n){h&&(u="%40"+u),h=!0,o=dI(u);for(var _=0;_<o.length;_++){var f=o[_];if(":"!=f||m){var g=sR(f,oR);m?c.password+=g:c.username+=g}else m=!0}u=""}else if(n==cS||"/"==n||"?"==n||"#"==n||"\\"==n&&c.isSpecial()){if(h&&""==u)return"Invalid authority";d-=dI(u).length+1,u="",l=yR}else u+=n;break;case yR:case SR:if(t&&"file"==c.scheme){l=CR;continue}if(":"!=n||p){if(n==cS||"/"==n||"?"==n||"#"==n||"\\"==n&&c.isSpecial()){if(c.isSpecial()&&""==u)return HI;if(t&&""==u&&(c.includesCredentials()||null!==c.port))return;if(s=c.parseHost(u))return s;if(u="",l=bR,t)return;continue}"["==n?p=!0:"]"==n&&(p=!1),u+=n}else{if(""==u)return HI;if(s=c.parseHost(u))return s;if(u="",l=IR,t==SR)return}break;case IR:if(!DI(JI,n)){if(n==cS||"/"==n||"?"==n||"#"==n||"\\"==n&&c.isSpecial()||t){if(""!=u){var T=AI(u,10);if(T>65535)return jI;c.port=c.isSpecial()&&T===aR[c.scheme]?null:T,u=""}if(t)return;l=bR;continue}return jI}u+=n;break;case RR:if(c.scheme="file","/"==n||"\\"==n)l=AR;else{if(!i||"file"!=i.scheme){l=kR;continue}if(n==cS)c.host=i.host,c.path=uI(i.path),c.query=i.query;else if("?"==n)c.host=i.host,c.path=uI(i.path),c.query="",l=NR;else{if("#"!=n){lR(NI(uI(r,d),""))||(c.host=i.host,c.path=uI(i.path),c.shortenPath()),l=kR;continue}c.host=i.host,c.path=uI(i.path),c.query=i.query,c.fragment="",l=wR}}break;case AR:if("/"==n||"\\"==n){l=CR;break}i&&"file"==i.scheme&&!lR(NI(uI(r,d),""))&&(cR(i.path[0],!0)?PI(c.path,i.path[0]):c.host=i.host),l=kR;continue;case CR:if(n==cS||"/"==n||"\\"==n||"?"==n||"#"==n){if(!t&&cR(u))l=kR;else if(""==u){if(c.host="",t)return;l=bR}else{if(s=c.parseHost(u))return s;if("localhost"==c.host&&(c.host=""),t)return;u="",l=bR}continue}u+=n;break;case bR:if(c.isSpecial()){if(l=kR,"/"!=n&&"\\"!=n)continue}else if(t||"?"!=n)if(t||"#"!=n){if(n!=cS&&(l=kR,"/"!=n))continue}else c.fragment="",l=wR;else c.query="",l=NR;break;case kR:if(n==cS||"/"==n||"\\"==n&&c.isSpecial()||!t&&("?"==n||"#"==n)){if(".."===(a=UI(a=u))||"%2e."===a||".%2e"===a||"%2e%2e"===a?(c.shortenPath(),"/"==n||"\\"==n&&c.isSpecial()||PI(c.path,"")):dR(u)?"/"==n||"\\"==n&&c.isSpecial()||PI(c.path,""):("file"==c.scheme&&!c.path.length&&cR(u)&&(c.host&&(c.host=""),u=kI(u,0)+":"),PI(c.path,u)),u="","file"==c.scheme&&(n==cS||"?"==n||"#"==n))for(;c.path.length>1&&""===c.path[0];)LI(c.path);"?"==n?(c.query="",l=NR):"#"==n&&(c.fragment="",l=wR)}else u+=sR(n,nR);break;case DR:"?"==n?(c.query="",l=NR):"#"==n?(c.fragment="",l=wR):n!=cS&&(c.path[0]+=sR(n,iR));break;case NR:t||"#"!=n?n!=cS&&("'"==n&&c.isSpecial()?c.query+="%27":c.query+="#"==n?"%23":sR(n,iR)):(c.fragment="",l=wR);break;case wR:n!=cS&&(c.fragment+=sR(n,rR))}d++}},parseHost:function(e){var t,i,r;if("["==kI(e,0)){if("]"!=kI(e,e.length-1))return HI;if(t=function(e){var t,i,r,n,o,s,a,c=[0,0,0,0,0,0,0,0],l=0,d=null,u=0,h=function(){return kI(e,u)};if(":"==h()){if(":"!=kI(e,1))return;u+=2,d=++l}for(;h();){if(8==l)return;if(":"!=h()){for(t=i=0;i<4&&DI(YI,h());)t=16*t+AI(h(),16),u++,i++;if("."==h()){if(0==i)return;if(u-=i,l>6)return;for(r=0;h();){if(n=null,r>0){if(!("."==h()&&r<4))return;u++}if(!DI(JI,h()))return;for(;DI(JI,h());){if(o=AI(h(),10),null===n)n=o;else{if(0==n)return;n=10*n+o}if(n>255)return;u++}c[l]=256*c[l]+n,2!=++r&&4!=r||l++}if(4!=r)return;break}if(":"==h()){if(u++,!h())return}else if(h())return;c[l++]=t}else{if(null!==d)return;u++,d=++l}}if(null!==d)for(s=l-d,l=7;0!=l&&s>0;)a=c[l],c[l--]=c[d+s-1],c[d+--s]=a;else if(8!=l)return;return c}(VI(e,1,-1)),!t)return HI;this.host=t}else if(this.isSpecial()){if(e=pI(e),DI(QI,e))return HI;if(t=function(e){var t,i,r,n,o,s,a,c=xI(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(i=[],r=0;r<t;r++){if(""==(n=c[r]))return e;if(o=10,n.length>1&&"0"==kI(n,0)&&(o=DI(KI,n)?16:8,n=VI(n,8==o?1:2)),""===n)s=0;else{if(!DI(10==o?qI:8==o?zI:YI,n))return e;s=AI(n,o)}PI(i,s)}for(r=0;r<t;r++)if(s=i[r],r==t-1){if(s>=bI(256,5-t))return null}else if(s>255)return null;for(a=OI(i),r=0;r<i.length;r++)a+=i[r]*bI(256,3-r);return a}(e),null===t)return HI;this.host=t}else{if(DI(XI,e))return HI;for(t="",i=dI(e),r=0;r<i.length;r++)t+=sR(i[r],iR);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return cI(aR,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&cR(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,i=e.username,r=e.password,n=e.host,o=e.port,s=e.path,a=e.query,c=e.fragment,l=t+":";return null!==n?(l+="//",e.includesCredentials()&&(l+=i+(r?":"+r:"")+"@"),l+=tR(n),null!==o&&(l+=":"+o)):"file"==t&&(l+="//"),l+=e.cannotBeABaseURL?s[0]:s.length?"/"+NI(s,"/"):"",null!==a&&(l+="?"+a),null!==c&&(l+="#"+c),l},setHref:function(e){var t=this.parse(e);if(t)throw RI(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new PR(e.path[0]).origin}catch(SB){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+tR(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(mI(e)+":",uR)},getUsername:function(){return this.username},setUsername:function(e){var t=dI(mI(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var i=0;i<t.length;i++)this.username+=sR(t[i],oR)}},getPassword:function(){return this.password},setPassword:function(e){var t=dI(mI(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var i=0;i<t.length;i++)this.password+=sR(t[i],oR)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?tR(e):tR(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,yR)},getHostname:function(){var e=this.host;return null===e?"":tR(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,SR)},getPort:function(){var e=this.port;return null===e?"":mI(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=mI(e))?this.port=null:this.parse(e,IR))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+NI(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,bR))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=mI(e))?this.query=null:("?"==kI(e,0)&&(e=VI(e,1)),this.query="",this.parse(e,NR)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=mI(e))?("#"==kI(e,0)&&(e=VI(e,1)),this.fragment="",this.parse(e,wR)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var PR=function(e){var t=aI(this,MR),i=fI(arguments.length,1)>1?arguments[1]:void 0,r=EI(t,new OR(e,!1,i));eI||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},MR=PR.prototype,LR=function(e,t){return{get:function(){return vI(this)[e]()},set:t&&function(e){return vI(this)[t](e)},configurable:!0,enumerable:!0}};if(eI&&(sI(MR,"href",LR("serialize","setHref")),sI(MR,"origin",LR("getOrigin")),sI(MR,"protocol",LR("getProtocol","setProtocol")),sI(MR,"username",LR("getUsername","setUsername")),sI(MR,"password",LR("getPassword","setPassword")),sI(MR,"host",LR("getHost","setHost")),sI(MR,"hostname",LR("getHostname","setHostname")),sI(MR,"port",LR("getPort","setPort")),sI(MR,"pathname",LR("getPathname","setPathname")),sI(MR,"search",LR("getSearch","setSearch")),sI(MR,"searchParams",LR("getSearchParams")),sI(MR,"hash",LR("getHash","setHash"))),oI(MR,"toJSON",(function(){return vI(this).serialize()}),{enumerable:!0}),oI(MR,"toString",(function(){return vI(this).serialize()}),{enumerable:!0}),II){var xR=II.createObjectURL,VR=II.revokeObjectURL;xR&&oI(PR,"createObjectURL",rI(xR,II)),VR&&oI(PR,"revokeObjectURL",rI(VR,II))}_I(PR,"URL"),ZS({global:!0,constructor:!0,forced:!tI,sham:!eI},{URL:PR}),OT("Float32",(function(e){return function(t,i,r){return e(this,t,i,r)}}));var UR=Cs,FR="ArrayBuffer",BR=_T[FR];Vn({global:!0,constructor:!0,forced:C[FR]!==BR},{ArrayBuffer:BR}),UR(FR);var HR=Vn,jR=jh,WR=c([].reverse),GR=[1,2];HR({target:"Array",proto:!0,forced:String(GR)===String(GR.reverse())},{reverse:function(){return jR(this)&&(this.length=this.length),WR(this)}});var JR=Qe,KR=TypeError,zR=Vn,qR=c,YR=et,QR=B,XR=Wt,$R=function(e,t){if(!delete e[t])throw KR("Cannot delete property "+JR(t)+" of "+JR(e))},ZR=_u,eA=i,tA=d_,iA=np,rA=gy,nA=Ty,oA=ie,sA=vy,aA=[],cA=qR(aA.sort),lA=qR(aA.push),dA=eA((function(){aA.sort(void 0)})),uA=eA((function(){aA.sort(null)})),hA=iA("sort"),pA=!eA((function(){if(oA)return oA<70;if(!(rA&&rA>3)){if(nA)return!0;if(sA)return sA<603;var e,t,i,r,n="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:i=3;break;case 68:case 71:i=4;break;default:i=2}for(r=0;r<47;r++)aA.push({k:t+r,v:i})}for(aA.sort((function(e,t){return t.v-e.v})),r=0;r<aA.length;r++)t=aA[r].k.charAt(0),n.charAt(n.length-1)!==t&&(n+=t);return"DGBEFHACIJK"!==n}}));zR({target:"Array",proto:!0,forced:dA||!uA||!hA||!pA},{sort:function(e){void 0!==e&&YR(e);var t=QR(this);if(pA)return void 0===e?cA(t):cA(t,e);var i,r,n=[],o=XR(t);for(r=0;r<o;r++)r in t&&lA(n,t[r]);for(tA(n,function(e){return function(t,i){return void 0===i?-1:void 0===t?1:void 0!==e?+e(t,i)||0:ZR(t)>ZR(i)?1:-1}}(e)),i=XR(n),r=0;r<i;)t[r]=n[r++];for(;r<o;)$R(t,r++);return t}}),(0,_E.exportTypedArrayStaticMethod)("from",KE,SE);let mA=!0,_A=!0;function fA(e,t,i){const r=e.match(t);return r&&r.length>=i&&parseInt(r[i],10)}function gA(e,t,i){if(!e.RTCPeerConnection)return;const r=e.RTCPeerConnection.prototype,n=r.addEventListener;r.addEventListener=function(e,r){if(e!==t)return n.apply(this,arguments);const o=e=>{const t=i(e);t&&(r.handleEvent?r.handleEvent(t):r(t))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(r,o),n.apply(this,[e,o])};const o=r.removeEventListener;r.removeEventListener=function(e,i){if(e!==t||!this._eventMap||!this._eventMap[t])return o.apply(this,arguments);if(!this._eventMap[t].has(i))return o.apply(this,arguments);const r=this._eventMap[t].get(i);return this._eventMap[t].delete(i),0===this._eventMap[t].size&&delete this._eventMap[t],0===Object.keys(this._eventMap).length&&delete this._eventMap,o.apply(this,[e,r])},Object.defineProperty(r,"on"+t,{get(){return this["_on"+t]},set(e){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),e&&this.addEventListener(t,this["_on"+t]=e)},enumerable:!0,configurable:!0})}function TA(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(mA=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function EA(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(_A=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function vA(){if("object"==typeof window){if(mA)return;"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}}function yA(e,t){_A&&console.warn(e+" is deprecated, please use "+t+" instead.")}function SA(e){return"[object Object]"===Object.prototype.toString.call(e)}function IA(e){return SA(e)?Object.keys(e).reduce((function(t,i){const r=SA(e[i]),n=r?IA(e[i]):e[i],o=r&&!Object.keys(n).length;return void 0===n||o?t:Object.assign(t,{[i]:n})}),{}):e}function RA(e,t,i){t&&!i.has(t.id)&&(i.set(t.id,t),Object.keys(t).forEach((r=>{r.endsWith("Id")?RA(e,e.get(t[r]),i):r.endsWith("Ids")&&t[r].forEach((t=>{RA(e,e.get(t),i)}))})))}function AA(e,t,i){const r=i?"outbound-rtp":"inbound-rtp",n=new Map;if(null===t)return n;const o=[];return e.forEach((e=>{"track"===e.type&&e.trackIdentifier===t.id&&o.push(e)})),o.forEach((t=>{e.forEach((i=>{i.type===r&&i.trackId===t.id&&RA(e,i,n)}))})),n}const CA=vA;function bA(e,t){const i=e&&e.navigator;if(!i.mediaDevices)return;const r=function(e){if("object"!=typeof e||e.mandatory||e.optional)return e;const t={};return Object.keys(e).forEach((i=>{if("require"===i||"advanced"===i||"mediaSource"===i)return;const r="object"==typeof e[i]?e[i]:{ideal:e[i]};void 0!==r.exact&&"number"==typeof r.exact&&(r.min=r.max=r.exact);const n=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==r.ideal){t.optional=t.optional||[];let e={};"number"==typeof r.ideal?(e[n("min",i)]=r.ideal,t.optional.push(e),e={},e[n("max",i)]=r.ideal,t.optional.push(e)):(e[n("",i)]=r.ideal,t.optional.push(e))}void 0!==r.exact&&"number"!=typeof r.exact?(t.mandatory=t.mandatory||{},t.mandatory[n("",i)]=r.exact):["min","max"].forEach((e=>{void 0!==r[e]&&(t.mandatory=t.mandatory||{},t.mandatory[n(e,i)]=r[e])}))})),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},n=function(e,n){if(t.version>=61)return n(e);if((e=JSON.parse(JSON.stringify(e)))&&"object"==typeof e.audio){const t=function(e,t,i){t in e&&!(i in e)&&(e[i]=e[t],delete e[t])};t((e=JSON.parse(JSON.stringify(e))).audio,"autoGainControl","googAutoGainControl"),t(e.audio,"noiseSuppression","googNoiseSuppression"),e.audio=r(e.audio)}if(e&&"object"==typeof e.video){let o=e.video.facingMode;o=o&&("object"==typeof o?o:{ideal:o});const s=t.version<66;if(o&&("user"===o.exact||"environment"===o.exact||"user"===o.ideal||"environment"===o.ideal)&&(!i.mediaDevices.getSupportedConstraints||!i.mediaDevices.getSupportedConstraints().facingMode||s)){let t;if(delete e.video.facingMode,"environment"===o.exact||"environment"===o.ideal?t=["back","rear"]:"user"!==o.exact&&"user"!==o.ideal||(t=["front"]),t)return i.mediaDevices.enumerateDevices().then((i=>{let s=(i=i.filter((e=>"videoinput"===e.kind))).find((e=>t.some((t=>e.label.toLowerCase().includes(t)))));return!s&&i.length&&t.includes("back")&&(s=i[i.length-1]),s&&(e.video.deviceId=o.exact?{exact:s.deviceId}:{ideal:s.deviceId}),e.video=r(e.video),CA("chrome: "+JSON.stringify(e)),n(e)}))}e.video=r(e.video)}return CA("chrome: "+JSON.stringify(e)),n(e)},o=function(e){return t.version>=64?e:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}};if(i.getUserMedia=function(e,t,r){n(e,(e=>{i.webkitGetUserMedia(e,t,(e=>{r&&r(o(e))}))}))}.bind(i),i.mediaDevices.getUserMedia){const e=i.mediaDevices.getUserMedia.bind(i.mediaDevices);i.mediaDevices.getUserMedia=function(t){return n(t,(t=>e(t).then((e=>{if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach((e=>{e.stop()})),new DOMException("","NotFoundError");return e}),(e=>Promise.reject(o(e))))))}}}function kA(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function DA(e){if("object"==typeof e&&e.RTCPeerConnection&&!("ontrack"in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(e){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=e)},enumerable:!0,configurable:!0});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=t=>{t.stream.addEventListener("addtrack",(i=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find((e=>e.track&&e.track.id===i.track.id)):{track:i.track};const n=new Event("track");n.track=i.track,n.receiver=r,n.transceiver={receiver:r},n.streams=[t.stream],this.dispatchEvent(n)})),t.stream.getTracks().forEach((i=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find((e=>e.track&&e.track.id===i.id)):{track:i};const n=new Event("track");n.track=i,n.receiver=r,n.transceiver={receiver:r},n.streams=[t.stream],this.dispatchEvent(n)}))},this.addEventListener("addstream",this._ontrackpoly)),t.apply(this,arguments)}}else gA(e,"track",(e=>(e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e)))}function NA(e){if("object"==typeof e&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){const t=function(e,t){return{track:t,get dtmf(){return void 0===this._dtmf&&("audio"===t.kind?this._dtmf=e.createDTMFSender(t):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};const i=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,r){let n=i.apply(this,arguments);return n||(n=t(this,e),this._senders.push(n)),n};const r=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){r.apply(this,arguments);const t=this._senders.indexOf(e);-1!==t&&this._senders.splice(t,1)}}const i=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._senders=this._senders||[],i.apply(this,[e]),e.getTracks().forEach((e=>{this._senders.push(t(this,e))}))};const r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._senders=this._senders||[],r.apply(this,[e]),e.getTracks().forEach((e=>{const t=this._senders.find((t=>t.track===e));t&&this._senders.splice(this._senders.indexOf(t),1)}))}}else if("object"==typeof e&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function wA(e){if(!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[e,i,r]=arguments;if(arguments.length>0&&"function"==typeof e)return t.apply(this,arguments);if(0===t.length&&(0===arguments.length||"function"!=typeof e))return t.apply(this,[]);const n=function(e){const t={};return e.result().forEach((e=>{const i={id:e.id,timestamp:e.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[e.type]||e.type};e.names().forEach((t=>{i[t]=e.stat(t)})),t[i.id]=i})),t},o=function(e){return new Map(Object.keys(e).map((t=>[t,e[t]])))};if(arguments.length>=2){const r=function(e){i(o(n(e)))};return t.apply(this,[r,e])}return new Promise(((e,i)=>{t.apply(this,[function(t){e(o(n(t)))},i])})).then(i,r)}}function OA(e){if(!("object"==typeof e&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver))return;if(!("getStats"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e});const i=e.RTCPeerConnection.prototype.addTrack;i&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=i.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){const e=this;return this._pc.getStats().then((t=>AA(t,e.track,!0)))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e}),gA(e,"track",(e=>(e.receiver._pc=e.srcElement,e))),e.RTCRtpReceiver.prototype.getStats=function(){const e=this;return this._pc.getStats().then((t=>AA(t,e.track,!1)))}}if(!("getStats"in e.RTCRtpSender.prototype)||!("getStats"in e.RTCRtpReceiver.prototype))return;const t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){const e=arguments[0];let t,i,r;return this.getSenders().forEach((i=>{i.track===e&&(t?r=!0:t=i)})),this.getReceivers().forEach((t=>(t.track===e&&(i?r=!0:i=t),t.track===e))),r||t&&i?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):t?t.getStats():i?i.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return t.apply(this,arguments)}}function PA(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map((e=>this._shimmedLocalStreams[e][0]))};const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,i){if(!i)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};const r=t.apply(this,arguments);return this._shimmedLocalStreams[i.id]?-1===this._shimmedLocalStreams[i.id].indexOf(r)&&this._shimmedLocalStreams[i.id].push(r):this._shimmedLocalStreams[i.id]=[i,r],r};const i=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach((e=>{if(this.getSenders().find((t=>t.track===e)))throw new DOMException("Track already exists.","InvalidAccessError")}));const t=this.getSenders();i.apply(this,arguments);const r=this.getSenders().filter((e=>-1===t.indexOf(e)));this._shimmedLocalStreams[e.id]=[e].concat(r)};const r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],r.apply(this,arguments)};const n=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&Object.keys(this._shimmedLocalStreams).forEach((t=>{const i=this._shimmedLocalStreams[t].indexOf(e);-1!==i&&this._shimmedLocalStreams[t].splice(i,1),1===this._shimmedLocalStreams[t].length&&delete this._shimmedLocalStreams[t]})),n.apply(this,arguments)}}function MA(e,t){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return PA(e);const i=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){const e=i.apply(this);return this._reverseStreams=this._reverseStreams||{},e.map((e=>this._reverseStreams[e.id]))};const r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},t.getTracks().forEach((e=>{if(this.getSenders().find((t=>t.track===e)))throw new DOMException("Track already exists.","InvalidAccessError")})),!this._reverseStreams[t.id]){const i=new e.MediaStream(t.getTracks());this._streams[t.id]=i,this._reverseStreams[i.id]=t,t=i}r.apply(this,[t])};const n=e.RTCPeerConnection.prototype.removeStream;function o(e,t){let i=t.sdp;return Object.keys(e._reverseStreams||[]).forEach((t=>{const r=e._reverseStreams[t],n=e._streams[r.id];i=i.replace(new RegExp(n.id,"g"),r.id)})),new RTCSessionDescription({type:t.type,sdp:i})}e.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},n.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[this._streams[e.id]?this._streams[e.id].id:e.id],delete this._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(t,i){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");const r=[].slice.call(arguments,1);if(1!==r.length||!r[0].getTracks().find((e=>e===t)))throw new DOMException("The adapter.js addTrack polyfill only supports a single  stream which is associated with the specified track.","NotSupportedError");if(this.getSenders().find((e=>e.track===t)))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const n=this._streams[i.id];if(n)n.addTrack(t),Promise.resolve().then((()=>{this.dispatchEvent(new Event("negotiationneeded"))}));else{const r=new e.MediaStream([t]);this._streams[i.id]=r,this._reverseStreams[r.id]=i,this.addStream(r)}return this.getSenders().find((e=>e.track===t))},["createOffer","createAnswer"].forEach((function(t){const i=e.RTCPeerConnection.prototype[t],r={[t](){const e=arguments;return arguments.length&&"function"==typeof arguments[0]?i.apply(this,[t=>{const i=o(this,t);e[0].apply(null,[i])},t=>{e[1]&&e[1].apply(null,t)},arguments[2]]):i.apply(this,arguments).then((e=>o(this,e)))}};e.RTCPeerConnection.prototype[t]=r[t]}));const s=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type?(arguments[0]=function(e,t){let i=t.sdp;return Object.keys(e._reverseStreams||[]).forEach((t=>{const r=e._reverseStreams[t],n=e._streams[r.id];i=i.replace(new RegExp(r.id,"g"),n.id)})),new RTCSessionDescription({type:t.type,sdp:i})}(this,arguments[0]),s.apply(this,arguments)):s.apply(this,arguments)};const a=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get(){const e=a.get.apply(this);return""===e.type?e:o(this,e)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!e._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(e._pc===this))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");let t;this._streams=this._streams||{},Object.keys(this._streams).forEach((i=>{this._streams[i].getTracks().find((t=>e.track===t))&&(t=this._streams[i])})),t&&(1===t.getTracks().length?this.removeStream(this._reverseStreams[t.id]):t.removeTrack(e.track),this.dispatchEvent(new Event("negotiationneeded")))}}function LA(e,t){!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection&&t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach((function(t){const i=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),i.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]}))}function xA(e,t){gA(e,"negotiationneeded",(e=>{const i=e.target;if(!(t.version<72||i.getConfiguration&&"plan-b"===i.getConfiguration().sdpSemantics)||"stable"===i.signalingState)return e}))}var VA=Object.freeze({__proto__:null,shimMediaStream:kA,shimOnTrack:DA,shimGetSendersWithDtmf:NA,shimGetStats:wA,shimSenderReceiverGetStats:OA,shimAddTrackRemoveTrackWithNative:PA,shimAddTrackRemoveTrack:MA,shimPeerConnection:LA,fixNegotiationNeeded:xA,shimGetUserMedia:bA,shimGetDisplayMedia:function(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&("function"==typeof t?e.navigator.mediaDevices.getDisplayMedia=function(i){return t(i).then((t=>{const r=i.video&&i.video.width,n=i.video&&i.video.height,o=i.video&&i.video.frameRate;return i.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:t,maxFrameRate:o||3}},r&&(i.video.mandatory.maxWidth=r),n&&(i.video.mandatory.maxHeight=n),e.navigator.mediaDevices.getUserMedia(i)}))}:console.error("shimGetDisplayMedia: getSourceId argument is not a function"))}});function UA(e,t){const i=e&&e.navigator,r=e&&e.MediaStreamTrack;if(i.getUserMedia=function(e,t,r){yA("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),i.mediaDevices.getUserMedia(e).then(t,r)},!(t.version>55&&"autoGainControl"in i.mediaDevices.getSupportedConstraints())){const e=function(e,t,i){t in e&&!(i in e)&&(e[i]=e[t],delete e[t])},t=i.mediaDevices.getUserMedia.bind(i.mediaDevices);if(i.mediaDevices.getUserMedia=function(i){return"object"==typeof i&&"object"==typeof i.audio&&(i=JSON.parse(JSON.stringify(i)),e(i.audio,"autoGainControl","mozAutoGainControl"),e(i.audio,"noiseSuppression","mozNoiseSuppression")),t(i)},r&&r.prototype.getSettings){const t=r.prototype.getSettings;r.prototype.getSettings=function(){const i=t.apply(this,arguments);return e(i,"mozAutoGainControl","autoGainControl"),e(i,"mozNoiseSuppression","noiseSuppression"),i}}if(r&&r.prototype.applyConstraints){const t=r.prototype.applyConstraints;r.prototype.applyConstraints=function(i){return"audio"===this.kind&&"object"==typeof i&&(i=JSON.parse(JSON.stringify(i)),e(i,"autoGainControl","mozAutoGainControl"),e(i,"noiseSuppression","mozNoiseSuppression")),t.apply(this,[i])}}}}function FA(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function BA(e,t){if("object"!=typeof e||!e.RTCPeerConnection&&!e.mozRTCPeerConnection)return;!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach((function(t){const i=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),i.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]}));const i={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},r=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[e,n,o]=arguments;return r.apply(this,[e||null]).then((e=>{if(t.version<53&&!n)try{e.forEach((e=>{e.type=i[e.type]||e.type}))}catch(db){if("TypeError"!==db.name)throw db;e.forEach(((t,r)=>{e.set(r,Object.assign({},t,{type:i[t.type]||t.type}))}))}return e})).then(n,o)}}function HA(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpSender.prototype)return;const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e});const i=e.RTCPeerConnection.prototype.addTrack;i&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=i.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function jA(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpReceiver.prototype)return;const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e}),gA(e,"track",(e=>(e.receiver._pc=e.srcElement,e))),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function WA(e){e.RTCPeerConnection&&!("removeStream"in e.RTCPeerConnection.prototype)&&(e.RTCPeerConnection.prototype.removeStream=function(e){yA("removeStream","removeTrack"),this.getSenders().forEach((t=>{t.track&&e.getTracks().includes(t.track)&&this.removeTrack(t)}))})}function GA(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function JA(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.addTransceiver;t&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let e=arguments[1]&&arguments[1].sendEncodings;void 0===e&&(e=[]),e=[...e];const i=e.length>0;i&&e.forEach((e=>{if("rid"in e){if(!/^[a-z0-9]{0,16}$/i.test(e.rid))throw new TypeError("Invalid RID value provided.")}if("scaleResolutionDownBy"in e&&!(parseFloat(e.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in e&&!(parseFloat(e.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")}));const r=t.apply(this,arguments);if(i){const{sender:t}=r,i=t.getParameters();(!("encodings"in i)||1===i.encodings.length&&0===Object.keys(i.encodings[0]).length)&&(i.encodings=e,t.sendEncodings=e,this.setParametersPromises.push(t.setParameters(i).then((()=>{delete t.sendEncodings})).catch((()=>{delete t.sendEncodings}))))}return r})}function KA(e){if("object"!=typeof e||!e.RTCRtpSender)return;const t=e.RTCRtpSender.prototype.getParameters;t&&(e.RTCRtpSender.prototype.getParameters=function(){const e=t.apply(this,arguments);return"encodings"in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})}function zA(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then((()=>t.apply(this,arguments))).finally((()=>{this.setParametersPromises=[]})):t.apply(this,arguments)}}function qA(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then((()=>t.apply(this,arguments))).finally((()=>{this.setParametersPromises=[]})):t.apply(this,arguments)}}var YA=Object.freeze({__proto__:null,shimOnTrack:FA,shimPeerConnection:BA,shimSenderGetStats:HA,shimReceiverGetStats:jA,shimRemoveStream:WA,shimRTCDataChannel:GA,shimAddTransceiver:JA,shimGetParameters:KA,shimCreateOffer:zA,shimCreateAnswer:qA,shimGetUserMedia:UA,shimGetDisplayMedia:function(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(i){if(!i||!i.video){const e=new DOMException("getDisplayMedia without video constraints is undefined");return e.name="NotFoundError",e.code=8,Promise.reject(e)}return!0===i.video?i.video={mediaSource:t}:i.video.mediaSource=t,e.navigator.mediaDevices.getUserMedia(i)})}});function QA(e){if("object"==typeof e&&e.RTCPeerConnection){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){this._localStreams||(this._localStreams=[]),this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach((i=>t.call(this,i,e))),e.getVideoTracks().forEach((i=>t.call(this,i,e)))},e.RTCPeerConnection.prototype.addTrack=function(e,...i){return i&&i.forEach((e=>{this._localStreams?this._localStreams.includes(e)||this._localStreams.push(e):this._localStreams=[e]})),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){this._localStreams||(this._localStreams=[]);const t=this._localStreams.indexOf(e);if(-1===t)return;this._localStreams.splice(t,1);const i=e.getTracks();this.getSenders().forEach((e=>{i.includes(e.track)&&this.removeTrack(e)}))})}}function XA(e){if("object"==typeof e&&e.RTCPeerConnection&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(e){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=e),this.addEventListener("track",this._onaddstreampoly=e=>{e.streams.forEach((e=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(e))return;this._remoteStreams.push(e);const t=new Event("addstream");t.stream=e,this.dispatchEvent(t)}))})}});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){const e=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(t){t.streams.forEach((t=>{if(e._remoteStreams||(e._remoteStreams=[]),e._remoteStreams.indexOf(t)>=0)return;e._remoteStreams.push(t);const i=new Event("addstream");i.stream=t,e.dispatchEvent(i)}))}),t.apply(e,arguments)}}}function $A(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype,i=t.createOffer,r=t.createAnswer,n=t.setLocalDescription,o=t.setRemoteDescription,s=t.addIceCandidate;t.createOffer=function(e,t){const r=arguments.length>=2?arguments[2]:arguments[0],n=i.apply(this,[r]);return t?(n.then(e,t),Promise.resolve()):n},t.createAnswer=function(e,t){const i=arguments.length>=2?arguments[2]:arguments[0],n=r.apply(this,[i]);return t?(n.then(e,t),Promise.resolve()):n};let a=function(e,t,i){const r=n.apply(this,[e]);return i?(r.then(t,i),Promise.resolve()):r};t.setLocalDescription=a,a=function(e,t,i){const r=o.apply(this,[e]);return i?(r.then(t,i),Promise.resolve()):r},t.setRemoteDescription=a,a=function(e,t,i){const r=s.apply(this,[e]);return i?(r.then(t,i),Promise.resolve()):r},t.addIceCandidate=a}function ZA(e){const t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){const e=t.mediaDevices,i=e.getUserMedia.bind(e);t.mediaDevices.getUserMedia=e=>i(eC(e))}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,i,r){t.mediaDevices.getUserMedia(e).then(i,r)}.bind(t))}function eC(e){return e&&void 0!==e.video?Object.assign({},e,{video:IA(e.video)}):e}function tC(e){if(!e.RTCPeerConnection)return;const t=e.RTCPeerConnection;e.RTCPeerConnection=function(e,i){if(e&&e.iceServers){const t=[];for(let i=0;i<e.iceServers.length;i++){let r=e.iceServers[i];void 0===r.urls&&r.url?(yA("RTCIceServer.url","RTCIceServer.urls"),r=JSON.parse(JSON.stringify(r)),r.urls=r.url,delete r.url,t.push(r)):t.push(e.iceServers[i])}e.iceServers=t}return new t(e,i)},e.RTCPeerConnection.prototype=t.prototype,"generateCertificate"in t&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:()=>t.generateCertificate})}function iC(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function rC(e){const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){if(e){void 0!==e.offerToReceiveAudio&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);const t=this.getTransceivers().find((e=>"audio"===e.receiver.track.kind));!1===e.offerToReceiveAudio&&t?"sendrecv"===t.direction?t.setDirection?t.setDirection("sendonly"):t.direction="sendonly":"recvonly"===t.direction&&(t.setDirection?t.setDirection("inactive"):t.direction="inactive"):!0!==e.offerToReceiveAudio||t||this.addTransceiver("audio",{direction:"recvonly"}),void 0!==e.offerToReceiveVideo&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);const i=this.getTransceivers().find((e=>"video"===e.receiver.track.kind));!1===e.offerToReceiveVideo&&i?"sendrecv"===i.direction?i.setDirection?i.setDirection("sendonly"):i.direction="sendonly":"recvonly"===i.direction&&(i.setDirection?i.setDirection("inactive"):i.direction="inactive"):!0!==e.offerToReceiveVideo||i||this.addTransceiver("video",{direction:"recvonly"})}return t.apply(this,arguments)}}function nC(e){"object"!=typeof e||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var oC=Object.freeze({__proto__:null,shimLocalStreamsAPI:QA,shimRemoteStreamsAPI:XA,shimCallbacksAPI:$A,shimGetUserMedia:ZA,shimConstraints:eC,shimRTCIceServerUrls:tC,shimTrackEventTransceiver:iC,shimCreateOfferLegacy:rC,shimAudioContext:nC}),sC={},aC={get exports(){return sC},set exports(e){sC=e}};!function(e){const t={generateIdentifier:function(){return Math.random().toString(36).substring(2,12)}};t.localCName=t.generateIdentifier(),t.splitLines=function(e){return e.trim().split("\n").map((e=>e.trim()))},t.splitSections=function(e){return e.split("\nm=").map(((e,t)=>(t>0?"m="+e:e).trim()+"\r\n"))},t.getDescription=function(e){const i=t.splitSections(e);return i&&i[0]},t.getMediaSections=function(e){const i=t.splitSections(e);return i.shift(),i},t.matchPrefix=function(e,i){return t.splitLines(e).filter((e=>0===e.indexOf(i)))},t.parseCandidate=function(e){let t;t=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" ");const i={foundation:t[0],component:{1:"rtp",2:"rtcp"}[t[1]]||t[1],protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],address:t[4],port:parseInt(t[5],10),type:t[7]};for(let r=8;r<t.length;r+=2)switch(t[r]){case"raddr":i.relatedAddress=t[r+1];break;case"rport":i.relatedPort=parseInt(t[r+1],10);break;case"tcptype":i.tcpType=t[r+1];break;case"ufrag":i.ufrag=t[r+1],i.usernameFragment=t[r+1];break;default:void 0===i[t[r]]&&(i[t[r]]=t[r+1])}return i},t.writeCandidate=function(e){const t=[];t.push(e.foundation);const i=e.component;"rtp"===i?t.push(1):"rtcp"===i?t.push(2):t.push(i),t.push(e.protocol.toUpperCase()),t.push(e.priority),t.push(e.address||e.ip),t.push(e.port);const r=e.type;return t.push("typ"),t.push(r),"host"!==r&&e.relatedAddress&&e.relatedPort&&(t.push("raddr"),t.push(e.relatedAddress),t.push("rport"),t.push(e.relatedPort)),e.tcpType&&"tcp"===e.protocol.toLowerCase()&&(t.push("tcptype"),t.push(e.tcpType)),(e.usernameFragment||e.ufrag)&&(t.push("ufrag"),t.push(e.usernameFragment||e.ufrag)),"candidate:"+t.join(" ")},t.parseIceOptions=function(e){return e.substring(14).split(" ")},t.parseRtpMap=function(e){let t=e.substring(9).split(" ");const i={payloadType:parseInt(t.shift(),10)};return t=t[0].split("/"),i.name=t[0],i.clockRate=parseInt(t[1],10),i.channels=3===t.length?parseInt(t[2],10):1,i.numChannels=i.channels,i},t.writeRtpMap=function(e){let t=e.payloadType;void 0!==e.preferredPayloadType&&(t=e.preferredPayloadType);const i=e.channels||e.numChannels||1;return"a=rtpmap:"+t+" "+e.name+"/"+e.clockRate+(1!==i?"/"+i:"")+"\r\n"},t.parseExtmap=function(e){const t=e.substring(9).split(" ");return{id:parseInt(t[0],10),direction:t[0].indexOf("/")>0?t[0].split("/")[1]:"sendrecv",uri:t[1],attributes:t.slice(2).join(" ")}},t.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+(e.attributes?" "+e.attributes:"")+"\r\n"},t.parseFmtp=function(e){const t={};let i;const r=e.substring(e.indexOf(" ")+1).split(";");for(let n=0;n<r.length;n++)i=r[n].trim().split("="),t[i[0].trim()]=i[1];return t},t.writeFmtp=function(e){let t="",i=e.payloadType;if(void 0!==e.preferredPayloadType&&(i=e.preferredPayloadType),e.parameters&&Object.keys(e.parameters).length){const r=[];Object.keys(e.parameters).forEach((t=>{void 0!==e.parameters[t]?r.push(t+"="+e.parameters[t]):r.push(t)})),t+="a=fmtp:"+i+" "+r.join(";")+"\r\n"}return t},t.parseRtcpFb=function(e){const t=e.substring(e.indexOf(" ")+1).split(" ");return{type:t.shift(),parameter:t.join(" ")}},t.writeRtcpFb=function(e){let t="",i=e.payloadType;return void 0!==e.preferredPayloadType&&(i=e.preferredPayloadType),e.rtcpFeedback&&e.rtcpFeedback.length&&e.rtcpFeedback.forEach((e=>{t+="a=rtcp-fb:"+i+" "+e.type+(e.parameter&&e.parameter.length?" "+e.parameter:"")+"\r\n"})),t},t.parseSsrcMedia=function(e){const t=e.indexOf(" "),i={ssrc:parseInt(e.substring(7,t),10)},r=e.indexOf(":",t);return r>-1?(i.attribute=e.substring(t+1,r),i.value=e.substring(r+1)):i.attribute=e.substring(t+1),i},t.parseSsrcGroup=function(e){const t=e.substring(13).split(" ");return{semantics:t.shift(),ssrcs:t.map((e=>parseInt(e,10)))}},t.getMid=function(e){const i=t.matchPrefix(e,"a=mid:")[0];if(i)return i.substring(6)},t.parseFingerprint=function(e){const t=e.substring(14).split(" ");return{algorithm:t[0].toLowerCase(),value:t[1].toUpperCase()}},t.getDtlsParameters=function(e,i){return{role:"auto",fingerprints:t.matchPrefix(e+i,"a=fingerprint:").map(t.parseFingerprint)}},t.writeDtlsParameters=function(e,t){let i="a=setup:"+t+"\r\n";return e.fingerprints.forEach((e=>{i+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"})),i},t.parseCryptoLine=function(e){const t=e.substring(9).split(" ");return{tag:parseInt(t[0],10),cryptoSuite:t[1],keyParams:t[2],sessionParams:t.slice(3)}},t.writeCryptoLine=function(e){return"a=crypto:"+e.tag+" "+e.cryptoSuite+" "+("object"==typeof e.keyParams?t.writeCryptoKeyParams(e.keyParams):e.keyParams)+(e.sessionParams?" "+e.sessionParams.join(" "):"")+"\r\n"},t.parseCryptoKeyParams=function(e){if(0!==e.indexOf("inline:"))return null;const t=e.substring(7).split("|");return{keyMethod:"inline",keySalt:t[0],lifeTime:t[1],mkiValue:t[2]?t[2].split(":")[0]:void 0,mkiLength:t[2]?t[2].split(":")[1]:void 0}},t.writeCryptoKeyParams=function(e){return e.keyMethod+":"+e.keySalt+(e.lifeTime?"|"+e.lifeTime:"")+(e.mkiValue&&e.mkiLength?"|"+e.mkiValue+":"+e.mkiLength:"")},t.getCryptoParameters=function(e,i){return t.matchPrefix(e+i,"a=crypto:").map(t.parseCryptoLine)},t.getIceParameters=function(e,i){const r=t.matchPrefix(e+i,"a=ice-ufrag:")[0],n=t.matchPrefix(e+i,"a=ice-pwd:")[0];return r&&n?{usernameFragment:r.substring(12),password:n.substring(10)}:null},t.writeIceParameters=function(e){let t="a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n";return e.iceLite&&(t+="a=ice-lite\r\n"),t},t.parseRtpParameters=function(e){const i={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},r=t.splitLines(e)[0].split(" ");i.profile=r[2];for(let o=3;o<r.length;o++){const n=r[o],s=t.matchPrefix(e,"a=rtpmap:"+n+" ")[0];if(s){const r=t.parseRtpMap(s),o=t.matchPrefix(e,"a=fmtp:"+n+" ");switch(r.parameters=o.length?t.parseFmtp(o[0]):{},r.rtcpFeedback=t.matchPrefix(e,"a=rtcp-fb:"+n+" ").map(t.parseRtcpFb),i.codecs.push(r),r.name.toUpperCase()){case"RED":case"ULPFEC":i.fecMechanisms.push(r.name.toUpperCase())}}}t.matchPrefix(e,"a=extmap:").forEach((e=>{i.headerExtensions.push(t.parseExtmap(e))}));const n=t.matchPrefix(e,"a=rtcp-fb:* ").map(t.parseRtcpFb);return i.codecs.forEach((e=>{n.forEach((t=>{e.rtcpFeedback.find((e=>e.type===t.type&&e.parameter===t.parameter))||e.rtcpFeedback.push(t)}))})),i},t.writeRtpDescription=function(e,i){let r="";r+="m="+e+" ",r+=i.codecs.length>0?"9":"0",r+=" "+(i.profile||"UDP/TLS/RTP/SAVPF")+" ",r+=i.codecs.map((e=>void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType)).join(" ")+"\r\n",r+="c=IN IP4 0.0.0.0\r\n",r+="a=rtcp:9 IN IP4 0.0.0.0\r\n",i.codecs.forEach((e=>{r+=t.writeRtpMap(e),r+=t.writeFmtp(e),r+=t.writeRtcpFb(e)}));let n=0;return i.codecs.forEach((e=>{e.maxptime>n&&(n=e.maxptime)})),n>0&&(r+="a=maxptime:"+n+"\r\n"),i.headerExtensions&&i.headerExtensions.forEach((e=>{r+=t.writeExtmap(e)})),r},t.parseRtpEncodingParameters=function(e){const i=[],r=t.parseRtpParameters(e),n=-1!==r.fecMechanisms.indexOf("RED"),o=-1!==r.fecMechanisms.indexOf("ULPFEC"),s=t.matchPrefix(e,"a=ssrc:").map((e=>t.parseSsrcMedia(e))).filter((e=>"cname"===e.attribute)),a=s.length>0&&s[0].ssrc;let c;const l=t.matchPrefix(e,"a=ssrc-group:FID").map((e=>e.substring(17).split(" ").map((e=>parseInt(e,10)))));l.length>0&&l[0].length>1&&l[0][0]===a&&(c=l[0][1]),r.codecs.forEach((e=>{if("RTX"===e.name.toUpperCase()&&e.parameters.apt){let t={ssrc:a,codecPayloadType:parseInt(e.parameters.apt,10)};a&&c&&(t.rtx={ssrc:c}),i.push(t),n&&(t=JSON.parse(JSON.stringify(t)),t.fec={ssrc:a,mechanism:o?"red+ulpfec":"red"},i.push(t))}})),0===i.length&&a&&i.push({ssrc:a});let d=t.matchPrefix(e,"b=");return d.length&&(d=0===d[0].indexOf("b=TIAS:")?parseInt(d[0].substring(7),10):0===d[0].indexOf("b=AS:")?1e3*parseInt(d[0].substring(5),10)*.95-16e3:void 0,i.forEach((e=>{e.maxBitrate=d}))),i},t.parseRtcpParameters=function(e){const i={},r=t.matchPrefix(e,"a=ssrc:").map((e=>t.parseSsrcMedia(e))).filter((e=>"cname"===e.attribute))[0];r&&(i.cname=r.value,i.ssrc=r.ssrc);const n=t.matchPrefix(e,"a=rtcp-rsize");i.reducedSize=n.length>0,i.compound=0===n.length;const o=t.matchPrefix(e,"a=rtcp-mux");return i.mux=o.length>0,i},t.writeRtcpParameters=function(e){let t="";return e.reducedSize&&(t+="a=rtcp-rsize\r\n"),e.mux&&(t+="a=rtcp-mux\r\n"),void 0!==e.ssrc&&e.cname&&(t+="a=ssrc:"+e.ssrc+" cname:"+e.cname+"\r\n"),t},t.parseMsid=function(e){let i;const r=t.matchPrefix(e,"a=msid:");if(1===r.length)return i=r[0].substring(7).split(" "),{stream:i[0],track:i[1]};const n=t.matchPrefix(e,"a=ssrc:").map((e=>t.parseSsrcMedia(e))).filter((e=>"msid"===e.attribute));return n.length>0?(i=n[0].value.split(" "),{stream:i[0],track:i[1]}):void 0},t.parseSctpDescription=function(e){const i=t.parseMLine(e),r=t.matchPrefix(e,"a=max-message-size:");let n;r.length>0&&(n=parseInt(r[0].substring(19),10)),isNaN(n)&&(n=65536);const o=t.matchPrefix(e,"a=sctp-port:");if(o.length>0)return{port:parseInt(o[0].substring(12),10),protocol:i.fmt,maxMessageSize:n};const s=t.matchPrefix(e,"a=sctpmap:");if(s.length>0){const e=s[0].substring(10).split(" ");return{port:parseInt(e[0],10),protocol:e[1],maxMessageSize:n}}},t.writeSctpDescription=function(e,t){let i=[];return i="DTLS/SCTP"!==e.protocol?["m="+e.kind+" 9 "+e.protocol+" "+t.protocol+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctp-port:"+t.port+"\r\n"]:["m="+e.kind+" 9 "+e.protocol+" "+t.port+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctpmap:"+t.port+" "+t.protocol+" 65535\r\n"],void 0!==t.maxMessageSize&&i.push("a=max-message-size:"+t.maxMessageSize+"\r\n"),i.join("")},t.generateSessionId=function(){return Math.random().toString().substr(2,22)},t.writeSessionBoilerplate=function(e,i,r){let n;const o=void 0!==i?i:2;n=e||t.generateSessionId();return"v=0\r\no="+(r||"thisisadapterortc")+" "+n+" "+o+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},t.getDirection=function(e,i){const r=t.splitLines(e);for(let t=0;t<r.length;t++)switch(r[t]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return r[t].substring(2)}return i?t.getDirection(i):"sendrecv"},t.getKind=function(e){return t.splitLines(e)[0].split(" ")[0].substring(2)},t.isRejected=function(e){return"0"===e.split(" ",2)[1]},t.parseMLine=function(e){const i=t.splitLines(e)[0].substring(2).split(" ");return{kind:i[0],port:parseInt(i[1],10),protocol:i[2],fmt:i.slice(3).join(" ")}},t.parseOLine=function(e){const i=t.matchPrefix(e,"o=")[0].substring(2).split(" ");return{username:i[0],sessionId:i[1],sessionVersion:parseInt(i[2],10),netType:i[3],addressType:i[4],address:i[5]}},t.isValidSDP=function(e){if("string"!=typeof e||0===e.length)return!1;const i=t.splitLines(e);for(let t=0;t<i.length;t++)if(i[t].length<2||"="!==i[t].charAt(1))return!1;return!0},e.exports=t}(aC);var cC=sC,lC=e({__proto__:null,default:cC},[sC]);function dC(e){if(!e.RTCIceCandidate||e.RTCIceCandidate&&"foundation"in e.RTCIceCandidate.prototype)return;const t=e.RTCIceCandidate;e.RTCIceCandidate=function(e){if("object"==typeof e&&e.candidate&&0===e.candidate.indexOf("a=")&&((e=JSON.parse(JSON.stringify(e))).candidate=e.candidate.substring(2)),e.candidate&&e.candidate.length){const i=new t(e),r=cC.parseCandidate(e.candidate);for(const e in r)e in i||Object.defineProperty(i,e,{value:r[e]});return i.toJSON=function(){return{candidate:i.candidate,sdpMid:i.sdpMid,sdpMLineIndex:i.sdpMLineIndex,usernameFragment:i.usernameFragment}},i}return new t(e)},e.RTCIceCandidate.prototype=t.prototype,gA(e,"icecandidate",(t=>(t.candidate&&Object.defineProperty(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:"false"}),t)))}function uC(e){!e.RTCIceCandidate||e.RTCIceCandidate&&"relayProtocol"in e.RTCIceCandidate.prototype||gA(e,"icecandidate",(e=>{if(e.candidate){const t=cC.parseCandidate(e.candidate.candidate);"relay"===t.type&&(e.candidate.relayProtocol={0:"tls",1:"tcp",2:"udp"}[t.priority>>24])}return e}))}function hC(e,t){if(!e.RTCPeerConnection)return;"sctp"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"sctp",{get(){return void 0===this._sctp?null:this._sctp}});const i=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,"chrome"===t.browser&&t.version>=76){const{sdpSemantics:e}=this.getConfiguration();"plan-b"===e&&Object.defineProperty(this,"sctp",{get(){return void 0===this._sctp?null:this._sctp},enumerable:!0,configurable:!0})}if(function(e){if(!e||!e.sdp)return!1;const t=cC.splitSections(e.sdp);return t.shift(),t.some((e=>{const t=cC.parseMLine(e);return t&&"application"===t.kind&&-1!==t.protocol.indexOf("SCTP")}))}(arguments[0])){const e=function(e){const t=e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===t||t.length<2)return-1;const i=parseInt(t[1],10);return i!=i?-1:i}(arguments[0]),i=function(e){let i=65536;return"firefox"===t.browser&&(i=t.version<57?-1===e?16384:2147483637:t.version<60?57===t.version?65535:65536:2147483637),i}(e),r=function(e,i){let r=65536;"firefox"===t.browser&&57===t.version&&(r=65535);const n=cC.matchPrefix(e.sdp,"a=max-message-size:");return n.length>0?r=parseInt(n[0].substring(19),10):"firefox"===t.browser&&-1!==i&&(r=2147483637),r}(arguments[0],e);let n;n=0===i&&0===r?Number.POSITIVE_INFINITY:0===i||0===r?Math.max(i,r):Math.min(i,r);const o={};Object.defineProperty(o,"maxMessageSize",{get:()=>n}),this._sctp=o}return i.apply(this,arguments)}}function pC(e){if(!e.RTCPeerConnection||!("createDataChannel"in e.RTCPeerConnection.prototype))return;function t(e,t){const i=e.send;e.send=function(){const r=arguments[0],n=r.length||r.size||r.byteLength;if("open"===e.readyState&&t.sctp&&n>t.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+t.sctp.maxMessageSize+" bytes)");return i.apply(e,arguments)}}const i=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){const e=i.apply(this,arguments);return t(e,this),e},gA(e,"datachannel",(e=>(t(e.channel,e.target),e)))}function mC(e){if(!e.RTCPeerConnection||"connectionState"in e.RTCPeerConnection.prototype)return;const t=e.RTCPeerConnection.prototype;Object.defineProperty(t,"connectionState",{get(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(t,"onconnectionstatechange",{get(){return this._onconnectionstatechange||null},set(e){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),e&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=e)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach((e=>{const i=t[e];t[e]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=e=>{const t=e.target;if(t._lastConnectionState!==t.connectionState){t._lastConnectionState=t.connectionState;const i=new Event("connectionstatechange",e);t.dispatchEvent(i)}return e},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),i.apply(this,arguments)}}))}function _C(e,t){if(!e.RTCPeerConnection)return;if("chrome"===t.browser&&t.version>=71)return;if("safari"===t.browser&&t.version>=605)return;const i=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(t){if(t&&t.sdp&&-1!==t.sdp.indexOf("\na=extmap-allow-mixed")){const i=t.sdp.split("\n").filter((e=>"a=extmap-allow-mixed"!==e.trim())).join("\n");e.RTCSessionDescription&&t instanceof e.RTCSessionDescription?arguments[0]=new e.RTCSessionDescription({type:t.type,sdp:i}):t.sdp=i}return i.apply(this,arguments)}}function fC(e,t){if(!e.RTCPeerConnection||!e.RTCPeerConnection.prototype)return;const i=e.RTCPeerConnection.prototype.addIceCandidate;i&&0!==i.length&&(e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?("chrome"===t.browser&&t.version<78||"firefox"===t.browser&&t.version<68||"safari"===t.browser)&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():i.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())})}function gC(e,t){if(!e.RTCPeerConnection||!e.RTCPeerConnection.prototype)return;const i=e.RTCPeerConnection.prototype.setLocalDescription;i&&0!==i.length&&(e.RTCPeerConnection.prototype.setLocalDescription=function(){let e=arguments[0]||{};if("object"!=typeof e||e.type&&e.sdp)return i.apply(this,arguments);if(e={type:e.type,sdp:e.sdp},!e.type)switch(this.signalingState){case"stable":case"have-local-offer":case"have-remote-pranswer":e.type="offer";break;default:e.type="answer"}if(e.sdp||"offer"!==e.type&&"answer"!==e.type)return i.apply(this,[e]);return("offer"===e.type?this.createOffer:this.createAnswer).apply(this).then((e=>i.apply(this,[e])))})}var TC=Object.freeze({__proto__:null,shimRTCIceCandidate:dC,shimRTCIceCandidateRelayProtocol:uC,shimMaxMessageSize:hC,shimSendThrowTypeError:pC,shimConnectionState:mC,removeExtmapAllowMixed:_C,shimAddIceCandidateNullOrEmpty:fC,shimParameterlessSetLocalDescription:gC});!function({window:e}={},t={shimChrome:!0,shimFirefox:!0,shimSafari:!0}){const i=vA,r=function(e){const t={browser:null,version:null};if(void 0===e||!e.navigator||!e.navigator.userAgent)return t.browser="Not a browser.",t;const{navigator:i}=e;if(i.mozGetUserMedia)t.browser="firefox",t.version=fA(i.userAgent,/Firefox\/(\d+)\./,1);else if(i.webkitGetUserMedia||!1===e.isSecureContext&&e.webkitRTCPeerConnection)t.browser="chrome",t.version=fA(i.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else{if(!e.RTCPeerConnection||!i.userAgent.match(/AppleWebKit\/(\d+)\./))return t.browser="Not a supported browser.",t;t.browser="safari",t.version=fA(i.userAgent,/AppleWebKit\/(\d+)\./,1),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype}return t}(e),n={browserDetails:r,commonShim:TC,extractVersion:fA,disableLog:TA,disableWarnings:EA,sdp:lC};switch(r.browser){case"chrome":if(!VA||!LA||!t.shimChrome)return i("Chrome shim is not included in this adapter release."),n;if(null===r.version)return i("Chrome shim can not determine version, not shimming."),n;i("adapter.js shimming chrome."),n.browserShim=VA,fC(e,r),gC(e),bA(e,r),kA(e),LA(e,r),DA(e),MA(e,r),NA(e),wA(e),OA(e),xA(e,r),dC(e),uC(e),mC(e),hC(e,r),pC(e),_C(e,r);break;case"firefox":if(!YA||!BA||!t.shimFirefox)return i("Firefox shim is not included in this adapter release."),n;i("adapter.js shimming firefox."),n.browserShim=YA,fC(e,r),gC(e),UA(e,r),BA(e,r),FA(e),WA(e),HA(e),jA(e),GA(e),JA(e),KA(e),zA(e),qA(e),dC(e),mC(e),hC(e,r),pC(e);break;case"safari":if(!oC||!t.shimSafari)return i("Safari shim is not included in this adapter release."),n;i("adapter.js shimming safari."),n.browserShim=oC,fC(e,r),gC(e),tC(e),rC(e),$A(e),QA(e),XA(e),iC(e),ZA(e),nC(e),dC(e),uC(e),hC(e,r),pC(e),_C(e,r);break;default:i("Unsupported browser!")}}({window:"undefined"==typeof window?void 0:window});var EC,vC=Object.create,yC=Object.defineProperty,SC=Object.defineProperties,IC=Object.getOwnPropertyDescriptor,RC=Object.getOwnPropertyDescriptors,AC=Object.getOwnPropertyNames,CC=Object.getOwnPropertySymbols,bC=Object.getPrototypeOf,kC=Object.prototype.hasOwnProperty,DC=Object.prototype.propertyIsEnumerable,NC=Reflect.get,wC=Math.pow,OC=(e,t,i)=>t in e?yC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,PC=(e,t)=>{for(var i in t||(t={}))kC.call(t,i)&&OC(e,i,t[i]);if(CC)for(var i of CC(t))DC.call(t,i)&&OC(e,i,t[i]);return e},MC=(e,t)=>SC(e,RC(t)),LC=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),xC=(e,t)=>{for(var i in t)yC(e,i,{get:t[i],enumerable:!0})},VC=(e,t,i)=>(i=null!=e?vC(bC(e)):{},((e,t,i,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of AC(t))!kC.call(e,n)&&n!==i&&yC(e,n,{get:()=>t[n],enumerable:!(r=IC(t,n))||r.enumerable});return e})(!t&&e&&e.__esModule?i:yC(i,"default",{value:e,enumerable:!0}),e)),UC=(e,t,i,r)=>{for(var n,o=r>1?void 0:r?IC(t,i):t,s=e.length-1;s>=0;s--)(n=e[s])&&(o=(r?n(t,i,o):n(o))||o);return r&&o&&yC(t,i,o),o},FC=(e,t,i)=>(OC(e,"symbol"!=typeof t?t+"":t,i),i),BC=(e,t,i)=>NC(bC(e),i,t),HC=(e,t,i)=>new Promise(((r,n)=>{var o=e=>{try{a(i.next(e))}catch(dO){n(dO)}},s=e=>{try{a(i.throw(e))}catch(dO){n(dO)}},a=e=>e.done?r(e.value):Promise.resolve(e.value).then(o,s);a((i=i.apply(e,t)).next())})),jC=LC(((e,t)=>{var i=Object.prototype.hasOwnProperty,r="~";function n(){}function o(e,t,i){this.fn=e,this.context=t,this.once=i||!1}function s(e,t,i,n,s){if("function"!=typeof i)throw new TypeError("The listener must be a function");var a=new o(i,n||e,s),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function c(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),c.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)i.call(e,t)&&n.push(r?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},c.prototype.listeners=function(e){var t=r?r+e:e,i=this._events[t];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,o=i.length,s=new Array(o);n<o;n++)s[n]=i[n].fn;return s},c.prototype.listenerCount=function(e){var t=r?r+e:e,i=this._events[t];return i?i.fn?1:i.length:0},c.prototype.emit=function(e,t,i,n,o,s){var a=r?r+e:e;if(!this._events[a])return!1;var c,l,d=this._events[a],u=arguments.length;if(d.fn){switch(d.once&&this.removeListener(e,d.fn,void 0,!0),u){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,t),!0;case 3:return d.fn.call(d.context,t,i),!0;case 4:return d.fn.call(d.context,t,i,n),!0;case 5:return d.fn.call(d.context,t,i,n,o),!0;case 6:return d.fn.call(d.context,t,i,n,o,s),!0}for(l=1,c=new Array(u-1);l<u;l++)c[l-1]=arguments[l];d.fn.apply(d.context,c)}else{var h,p=d.length;for(l=0;l<p;l++)switch(d[l].once&&this.removeListener(e,d[l].fn,void 0,!0),u){case 1:d[l].fn.call(d[l].context);break;case 2:d[l].fn.call(d[l].context,t);break;case 3:d[l].fn.call(d[l].context,t,i);break;case 4:d[l].fn.call(d[l].context,t,i,n);break;default:if(!c)for(h=1,c=new Array(u-1);h<u;h++)c[h-1]=arguments[h];d[l].fn.apply(d[l].context,c)}}return!0},c.prototype.on=function(e,t,i){return s(this,e,t,i,!1)},c.prototype.once=function(e,t,i){return s(this,e,t,i,!0)},c.prototype.removeListener=function(e,t,i,n){var o=r?r+e:e;if(!this._events[o])return this;if(!t)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn===t&&(!n||s.once)&&(!i||s.context===i)&&a(this,o);else{for(var c=0,l=[],d=s.length;c<d;c++)(s[c].fn!==t||n&&!s[c].once||i&&s[c].context!==i)&&l.push(s[c]);l.length?this._events[o]=1===l.length?l[0]:l:a(this,o)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&a(this,t)):(this._events=new n,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,void 0!==t&&(t.exports=c)})),WC=LC(((e,t)=>{var i=t.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(e){return e.encoding?"rtpmap:%d %s/%s/%s":e.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(e){return null!=e.address?"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(e){return null!=e.subtype?"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(e){return"extmap:%d"+(e.direction?"/%s":"%v")+(e["encrypt-uri"]?" %s":"%v")+" %s"+(e.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(e){return null!=e.sessionConfig?"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(e){var t="candidate:%s %d %s %d %s %d typ %s";return t+=null!=e.raddr?" raddr %s rport %d":"%v%v",t+=null!=e.tcptype?" tcptype %s":"%v",null!=e.generation&&(t+=" generation %d"),t+=null!=e["network-id"]?" network-id %d":"%v",t+=null!=e["network-cost"]?" network-cost %d":"%v"}},{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(e){var t="ssrc:%d";return null!=e.attribute&&(t+=" %s",null!=e.value&&(t+=":%s")),t}},{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(e){return null!=e.maxMessageSize?"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(e){return e.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(e){return"imageattr:%s %s %s"+(e.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(e){return"simulcast:%s %s"+(e.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(e){return"ts-refclk:%s"+(null!=e.clksrcExt?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(e){var t="mediaclk:";return t+=null!=e.id?"id=%s %s":"%v%s",t+=null!=e.mediaClockValue?"=%s":"",t+=null!=e.rateNumerator?" rate=%s":"",t+=null!=e.rateDenominator?"/%s":""}},{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(i).forEach((function(e){i[e].forEach((function(e){e.reg||(e.reg=/(.*)/),e.format||(e.format="%s")}))}))})),GC=LC((e=>{var t=function(e){return String(Number(e))===e?Number(e):e},i=function(e,i,r){var n=e.name&&e.names;e.push&&!i[e.push]?i[e.push]=[]:n&&!i[e.name]&&(i[e.name]={});var o=e.push?{}:n?i[e.name]:i;(function(e,i,r,n){if(n&&!r)i[n]=t(e[1]);else for(var o=0;o<r.length;o+=1)null!=e[o+1]&&(i[r[o]]=t(e[o+1]))})(r.match(e.reg),o,e.names,e.name),e.push&&i[e.push].push(o)},r=WC(),n=RegExp.prototype.test.bind(/^([a-z])=(.*)/);e.parse=function(e){var t={},o=[],s=t;return e.split(/(\r\n|\r|\n)/).filter(n).forEach((function(e){var t=e[0],n=e.slice(2);"m"===t&&(o.push({rtp:[],fmtp:[]}),s=o[o.length-1]);for(var a=0;a<(r[t]||[]).length;a+=1){var c=r[t][a];if(c.reg.test(n))return i(c,s,n)}})),t.media=o,t};var o=function(e,i){var r=i.split(/=(.+)/,2);return 2===r.length?e[r[0]]=t(r[1]):1===r.length&&i.length>1&&(e[r[0]]=void 0),e};e.parseParams=function(e){return e.split(/;\s?/).reduce(o,{})},e.parseFmtpConfig=e.parseParams,e.parsePayloads=function(e){return e.toString().split(" ").map(Number)},e.parseRemoteCandidates=function(e){for(var i=[],r=e.split(" ").map(t),n=0;n<r.length;n+=3)i.push({component:r[n],ip:r[n+1],port:r[n+2]});return i},e.parseImageAttributes=function(e){return e.split(" ").map((function(e){return e.substring(1,e.length-1).split(",").reduce(o,{})}))},e.parseSimulcastStreamList=function(e){return e.split(";").map((function(e){return e.split(",").map((function(e){var i,r=!1;return"~"!==e[0]?i=t(e):(i=t(e.substring(1,e.length)),r=!0),{scid:i,paused:r}}))}))}})),JC=LC(((e,t)=>{var i=WC(),r=/%[sdv%]/g,n=function(e){var t=1,i=arguments,n=i.length;return e.replace(r,(function(e){if(t>=n)return e;var r=i[t];switch(t+=1,e){case"%%":return"%";case"%s":return String(r);case"%d":return Number(r);case"%v":return""}}))},o=function(e,t,i){var r=[e+"="+(t.format instanceof Function?t.format(t.push?i:i[t.name]):t.format)];if(t.names)for(var o=0;o<t.names.length;o+=1){var s=t.names[o];t.name?r.push(i[t.name][s]):r.push(i[t.names[o]])}else r.push(i[t.name]);return n.apply(null,r)},s=["v","o","s","i","u","e","p","c","b","t","r","z","a"],a=["i","c","b","a"];t.exports=function(e,t){t=t||{},null==e.version&&(e.version=0),null==e.name&&(e.name=" "),e.media.forEach((function(e){null==e.payloads&&(e.payloads="")}));var r=t.outerOrder||s,n=t.innerOrder||a,c=[];return r.forEach((function(t){i[t].forEach((function(i){i.name in e&&null!=e[i.name]?c.push(o(t,i,e)):i.push in e&&null!=e[i.push]&&e[i.push].forEach((function(e){c.push(o(t,i,e))}))}))})),e.media.forEach((function(e){c.push(o("m",i.m[0],e)),n.forEach((function(t){i[t].forEach((function(i){i.name in e&&null!=e[i.name]?c.push(o(t,i,e)):i.push in e&&null!=e[i.push]&&e[i.push].forEach((function(e){c.push(o(t,i,e))}))}))}))})),c.join("\r\n")+"\r\n"}})),KC=LC((e=>{var t=GC(),i=JC();e.write=i,e.parse=t.parse,e.parseParams=t.parseParams,e.parseFmtpConfig=t.parseFmtpConfig,e.parsePayloads=t.parsePayloads,e.parseRemoteCandidates=t.parseRemoteCandidates,e.parseImageAttributes=t.parseImageAttributes,e.parseSimulcastStreamList=t.parseSimulcastStreamList})),zC=LC(((e,t)=>{var i=t.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(e){return e.encoding?"rtpmap:%d %s/%s/%s":e.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(e){return null!=e.address?"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(e){return null!=e.subtype?"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(e){return"extmap:%d"+(e.direction?"/%s":"%v")+(e["encrypt-uri"]?" %s":"%v")+" %s"+(e.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(e){return null!=e.sessionConfig?"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(e){var t="candidate:%s %d %s %d %s %d typ %s";return t+=null!=e.raddr?" raddr %s rport %d":"%v%v",t+=null!=e.tcptype?" tcptype %s":"%v",null!=e.generation&&(t+=" generation %d"),t+=null!=e["network-id"]?" network-id %d":"%v",t+=null!=e["network-cost"]?" network-cost %d":"%v"}},{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(e){var t="ssrc:%d";return null!=e.attribute&&(t+=" %s",null!=e.value&&(t+=":%s")),t}},{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(e){return null!=e.maxMessageSize?"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(e){return e.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(e){return"imageattr:%s %s %s"+(e.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(e){return"simulcast:%s %s"+(e.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(e){return"ts-refclk:%s"+(null!=e.clksrcExt?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(e){var t="mediaclk:";return t+=null!=e.id?"id=%s %s":"%v%s",t+=null!=e.mediaClockValue?"=%s":"",t+=null!=e.rateNumerator?" rate=%s":"",t+=null!=e.rateDenominator?"/%s":""}},{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(i).forEach((function(e){i[e].forEach((function(e){e.reg||(e.reg=/(.*)/),e.format||(e.format="%s")}))}))})),qC=LC((e=>{var t=function(e){return String(Number(e))===e?Number(e):e},i=function(e,i,r){var n=e.name&&e.names;e.push&&!i[e.push]?i[e.push]=[]:n&&!i[e.name]&&(i[e.name]={});var o=e.push?{}:n?i[e.name]:i;(function(e,i,r,n){if(n&&!r)i[n]=t(e[1]);else for(var o=0;o<r.length;o+=1)null!=e[o+1]&&(i[r[o]]=t(e[o+1]))})(r.match(e.reg),o,e.names,e.name),e.push&&i[e.push].push(o)},r=zC(),n=RegExp.prototype.test.bind(/^([a-z])=(.*)/);e.parse=function(e){var t={},o=[],s=t;return e.split(/(\r\n|\r|\n)/).filter(n).forEach((function(e){var t=e[0],n=e.slice(2);"m"===t&&(o.push({rtp:[],fmtp:[]}),s=o[o.length-1]);for(var a=0;a<(r[t]||[]).length;a+=1){var c=r[t][a];if(c.reg.test(n))return i(c,s,n)}})),t.media=o,t};var o=function(e,i){var r=i.split(/=(.+)/,2);return 2===r.length?e[r[0]]=t(r[1]):1===r.length&&i.length>1&&(e[r[0]]=void 0),e};e.parseParams=function(e){return e.split(/;\s?/).reduce(o,{})},e.parseFmtpConfig=e.parseParams,e.parsePayloads=function(e){return e.toString().split(" ").map(Number)},e.parseRemoteCandidates=function(e){for(var i=[],r=e.split(" ").map(t),n=0;n<r.length;n+=3)i.push({component:r[n],ip:r[n+1],port:r[n+2]});return i},e.parseImageAttributes=function(e){return e.split(" ").map((function(e){return e.substring(1,e.length-1).split(",").reduce(o,{})}))},e.parseSimulcastStreamList=function(e){return e.split(";").map((function(e){return e.split(",").map((function(e){var i,r=!1;return"~"!==e[0]?i=t(e):(i=t(e.substring(1,e.length)),r=!0),{scid:i,paused:r}}))}))}})),YC=LC(((e,t)=>{var i=zC(),r=/%[sdv%]/g,n=function(e){var t=1,i=arguments,n=i.length;return e.replace(r,(function(e){if(t>=n)return e;var r=i[t];switch(t+=1,e){case"%%":return"%";case"%s":return String(r);case"%d":return Number(r);case"%v":return""}}))},o=function(e,t,i){var r=[e+"="+(t.format instanceof Function?t.format(t.push?i:i[t.name]):t.format)];if(t.names)for(var o=0;o<t.names.length;o+=1){var s=t.names[o];t.name?r.push(i[t.name][s]):r.push(i[t.names[o]])}else r.push(i[t.name]);return n.apply(null,r)},s=["v","o","s","i","u","e","p","c","b","t","r","z","a"],a=["i","c","b","a"];t.exports=function(e,t){t=t||{},null==e.version&&(e.version=0),null==e.name&&(e.name=" "),e.media.forEach((function(e){null==e.payloads&&(e.payloads="")}));var r=t.outerOrder||s,n=t.innerOrder||a,c=[];return r.forEach((function(t){i[t].forEach((function(i){i.name in e&&null!=e[i.name]?c.push(o(t,i,e)):i.push in e&&null!=e[i.push]&&e[i.push].forEach((function(e){c.push(o(t,i,e))}))}))})),e.media.forEach((function(e){c.push(o("m",i.m[0],e)),n.forEach((function(t){i[t].forEach((function(i){i.name in e&&null!=e[i.name]?c.push(o(t,i,e)):i.push in e&&null!=e[i.push]&&e[i.push].forEach((function(e){c.push(o(t,i,e))}))}))}))})),c.join("\r\n")+"\r\n"}})),QC=LC((e=>{var t=qC(),i=YC();e.write=i,e.parse=t.parse,e.parseParams=t.parseParams,e.parseFmtpConfig=t.parseFmtpConfig,e.parsePayloads=t.parsePayloads,e.parseRemoteCandidates=t.parseRemoteCandidates,e.parseImageAttributes=t.parseImageAttributes,e.parseSimulcastStreamList=t.parseSimulcastStreamList})),XC=VC(jC()),$C=((EC=$C||{})[EC.INVALID_PARAMETER=4096]="INVALID_PARAMETER",EC[EC.INVALID_OPERATION=4097]="INVALID_OPERATION",EC[EC.NOT_SUPPORTED=4098]="NOT_SUPPORTED",EC[EC.DEVICE_NOT_FOUND=4099]="DEVICE_NOT_FOUND",EC[EC.INITIALIZE_FAILED=4100]="INITIALIZE_FAILED",EC[EC.SIGNAL_CHANNEL_SETUP_FAILED=16385]="SIGNAL_CHANNEL_SETUP_FAILED",EC[EC.SIGNAL_CHANNEL_ERROR=16386]="SIGNAL_CHANNEL_ERROR",EC[EC.ICE_TRANSPORT_ERROR=16387]="ICE_TRANSPORT_ERROR",EC[EC.JOIN_ROOM_FAILED=16388]="JOIN_ROOM_FAILED",EC[EC.CREATE_OFFER_FAILED=16389]="CREATE_OFFER_FAILED",EC[EC.SIGNAL_CHANNEL_RECONNECTION_FAILED=16390]="SIGNAL_CHANNEL_RECONNECTION_FAILED",EC[EC.UPLINK_RECONNECTION_FAILED=16391]="UPLINK_RECONNECTION_FAILED",EC[EC.DOWNLINK_RECONNECTION_FAILED=16392]="DOWNLINK_RECONNECTION_FAILED",EC[EC.REMOTE_STREAM_NOT_EXIST=16400]="REMOTE_STREAM_NOT_EXIST",EC[EC.CLIENT_BANNED=16448]="CLIENT_BANNED",EC[EC.SERVER_TIMEOUT=16449]="SERVER_TIMEOUT",EC[EC.SUBSCRIPTION_TIMEOUT=16450]="SUBSCRIPTION_TIMEOUT",EC[EC.PLAY_NOT_ALLOWED=16451]="PLAY_NOT_ALLOWED",EC[EC.DEVICE_AUTO_RECOVER_FAILED=16452]="DEVICE_AUTO_RECOVER_FAILED",EC[EC.START_PUBLISH_CDN_FAILED=16453]="START_PUBLISH_CDN_FAILED",EC[EC.STOP_PUBLISH_CDN_FAILED=16454]="STOP_PUBLISH_CDN_FAILED",EC[EC.START_MIX_TRANSCODE_FAILED=16455]="START_MIX_TRANSCODE_FAILED",EC[EC.STOP_MIX_TRANSCODE_FAILED=16456]="STOP_MIX_TRANSCODE_FAILED",EC[EC.NOT_SUPPORTED_H264=16457]="NOT_SUPPORTED_H264",EC[EC.SWITCH_ROLE_FAILED=16458]="SWITCH_ROLE_FAILED",EC[EC.API_CALL_TIMEOUT=16459]="API_CALL_TIMEOUT",EC[EC.SCHEDULE_FAILED=16460]="SCHEDULE_FAILED",EC[EC.API_CALL_ABORTED=16461]="API_CALL_ABORTED",EC[EC.SPC_INITIALIZED_FAILED=16462]="SPC_INITIALIZED_FAILED",EC[EC.VIDEO_MANAGER_ERROR=16463]="VIDEO_MANAGER_ERROR",EC[EC.UNKNOWN=65535]="UNKNOWN",EC),ZC=$C,eb=class extends Error{constructor(e){let{name:t="RtcError",message:i,code:r=ZC.UNKNOWN,extraCode:n=0,constraint:o}=e,s="<".concat(function(e){for(let t in ZC)if(ZC[t]===e)return t;return"UNKNOWN"}(r)," 0x").concat(r.toString(16),">"),a="".concat(i).concat(o?" constraint: ".concat(o):"").concat(null!=i&&i.includes(s)?"":" ".concat(s));super(a),FC(this,"code"),FC(this,"extraCode"),FC(this,"message"),FC(this,"originMessage"),FC(this,"name"),FC(this,"constraint"),this.code=r,this.extraCode=n,this.name=t,this.message=a,this.constraint=o,this.originMessage=i}getCode(){return this.code}getExtraCode(){return this.extraCode}toString(){return this.originMessage}},tb=eb,ib=((new Date).getTime(),0),rb=function(){return(new Date).getTime()+ib},nb=function(){let e=new Date;return e.setTime(rb()),e.toLocaleString()},ob={};xC(ob,{bytes2ms:()=>uw,convertObjectNumberToInt:()=>eO,copyProperties:()=>dw,deepClone:()=>Gw,deepMerge:()=>Ww,delay:()=>tO,fibonacci:()=>Tw,formatedTime:()=>zw,getAbilityConfigUrl:()=>$N,getConstructorName:()=>Ow,getContainerFromElement:()=>Kw,getEnv:()=>iw,getInternalVersion:()=>Vw,getLoggerUrl:()=>nw,getMuteStateFromFlag:()=>Bw,getNetworkType:()=>sw,getNumNetworkType:()=>lw,getReconnectionTimeout:()=>Ew,getStringByteLength:()=>Qw,getTurnServer:()=>Hw,getUint32Version:()=>Zw,getValueType:()=>vw,getViewListFromView:()=>Jw,glog:()=>_w,ipv4ToUint32:()=>jw,isArray:()=>bw,isAudioWorkletSupported:()=>Pw,isBoolean:()=>Aw,isConstructor:()=>ww,isEmpty:()=>Fw,isFunction:()=>yw,isLangChinese:()=>fw,isMediaStreamTrack:()=>kw,isNumber:()=>Rw,isObject:()=>Cw,isOverseaSdkAppId:()=>rw,isPlainObject:()=>gw,isPortrait:()=>Xw,isPromise:()=>Nw,isRemoteTrack:()=>Dw,isString:()=>Iw,isUndefined:()=>Sw,loadImage:()=>$w,ms2bytes:()=>pw,ms2samples:()=>mw,performanceNow:()=>Lw,promiseAny:()=>Mw,samples2ms:()=>hw,setNetworkType:()=>cw,stringify:()=>qw,stringifyIncludeValue:()=>Yw,throttlePromise:()=>iO});var sb={};xC(sb,{AUDIO_MUTE_BIT:()=>Kb,AUDIO_STAT_BIT:()=>Jb,AUX_STAT_BIT:()=>Gb,AUX_STREAM_MSID:()=>Xb,BACKEND_ENV:()=>Bb,BASE_DOC_URL:()=>Sb,BASE_HOST:()=>Tb,CAPABILITIES_KEYS:()=>jk,CLASS_NAME:()=>Dk,CLOUD_CONSOLE_URL:()=>yb,CROSS_ROOM_BIT:()=>Yb,DATA_FREEZE_TIMING:()=>Sk,DOC_URL:()=>Ib,DTLS_STATE_UNKNOWN:()=>ak,ENV_NAME:()=>kb,EXCHANGE_SDP_TIMEOUT:()=>gk,INTERVAL:()=>Bk,IS_WORKER:()=>pb,IS_WORKLET:()=>mb,KIBANA_EVENT:()=>mk,LOCAL_STREAM_PUBLISH_STATE:()=>yk,LOGGER_CMD_TYPE:()=>bb,LOGGER_DOMAIN:()=>Rb,LOGGER_DOMAIN_OVERSEA:()=>Ab,LOG_LEVEL:()=>Db,LOG_LEVEL_NAME:()=>Mk,MAIN_STREAM_MSID:()=>Qb,MAX_RTT:()=>Wk,MICROPHONE_COMMUNICATIONS:()=>Pk,MICROPHONE_DEFAULT:()=>wk,MUTE_ALL_BIT:()=>qb,NAME:()=>Ub,NETWORK_TYPE:()=>Ob,NOT_SUPPORTED_H264:()=>vk,PAUSED_RETRY_COUNT:()=>Nk,PEERCONNECTION_CONNECTING_TIMEOUT:()=>Ck,PEER_CONNECTION_STATE:()=>ck,PEER_LEAVE_REASON:()=>Lk,RAF:()=>Fk,RECOVER_CAPTURE_INTERVAL:()=>Vk,REMOTE_STREAM_TYPE_AUX:()=>Zb,REMOTE_STREAM_TYPE_MAIN:()=>$b,RENDER_FREEZE_TIMING:()=>Ik,RIC:()=>Uk,SCHEDULE_DOMAIN:()=>bk,SCHEDULE_TIMEOUT:()=>kk,SDP_SEMANTICS_PLAN_B:()=>Ek,SDP_SEMANTICS_UNIFIED_PLAN:()=>Tk,SECOND_HOST:()=>Eb,SIGNAL_PING_PONG_INTERVAL:()=>wb,SIGNAL_PING_TIMEOUT:()=>Nb,SIGNAL_RECONNECTION_COUNT:()=>pk,SMALL_STAT_BIT:()=>Wb,SPEAKER_DEFAULT:()=>Ok,STORAGE_EXPIRES_TIME:()=>Pb,STREAM_TYPE_BIG:()=>Rk,STREAM_TYPE_SMALL:()=>Ak,SUBSCRIBE_SMALL_RETRY_COUNT:()=>xk,SYNC_USER_LIST_INTERVAL:()=>_k,Scene:()=>Hb,Switch:()=>Mb,THIRD_HOST:()=>vb,TIMEOUT:()=>Hk,TRANSPORT_DIRECTION:()=>Fb,TRTC_ERROR_ASSISTANCE:()=>Cb,TRTC_QUALITY_BAD:()=>nk,TRTC_QUALITY_DISCONNECTED:()=>sk,TRTC_QUALITY_EXCELLENT:()=>tk,TRTC_QUALITY_GOOD:()=>ik,TRTC_QUALITY_POOR:()=>rk,TRTC_QUALITY_UNKNOWN:()=>ek,TRTC_QUALITY_VERY_BAD:()=>ok,UPDATE_OFFER_TIMEOUT:()=>fk,VIDEO_MUTE_BIT:()=>zb,VIDEO_STAT_BIT:()=>jb,audioProfileMap:()=>Lb,getRetryCount:()=>uk,getScriptDir:()=>_b,innerVersion:()=>ab,loggerProxy:()=>fb,screenProfileMap:()=>Vb,setLoggerProxy:()=>gb,setRetryCount:()=>dk,setVersion:()=>lb,version:()=>cb,videoProfileMap:()=>xb});var ab="4.15.00.1600",cb="5.0.0";function lb(e){cb=e;let[t,i,r]=e.split(".").map((e=>parseInt(e,10)));ab="".concat(t,".").concat(Math.min(15,i),".").concat(Math.min(15,r),".").concat(i.toString().padStart(2,"0")).concat(r.toString().padStart(2,"0"))}var db,ub,hb,pb="undefined"!=typeof importScripts,mb="undefined"!=typeof registerProcessor,_b=()=>{let e=pb?self.location.href:document.currentScript.src;return e.substring(0,e.lastIndexOf("/")+1)},fb="",gb=e=>fb=e,Tb="web.sdk.qcloud.com",Eb="web.sdk.tencent.cn",vb="web.sdk.cloud.tencent.cn",yb="https://console.cloud.tencent.com/trtc",Sb="https://".concat(Tb,"/trtc/webrtc/v5/doc"),Ib="".concat(Sb,"/zh-cn/"),Rb="https://yun.tim.qq.com",Ab="https://apisgp.my-imcloud.com",Cb="trtc_error_assistance",bb={LOG:"jssdk_log",EVENT:"jssdk_event",KEY_POINT:"jssdk_new_endreport",KV_STAT:"jssdk_key_metrics_report"},kb={QCLOUD:"qcloud",OLD_CLOUD_LADDER:"trtc",WEBRTC:"webrtc"},Db=((hb=Db||{})[hb.TRACE=0]="TRACE",hb[hb.DEBUG=1]="DEBUG",hb[hb.INFO=2]="INFO",hb[hb.WARN=3]="WARN",hb[hb.ERROR=4]="ERROR",hb[hb.NONE=5]="NONE",hb),Nb=18e3,wb=2e3,Ob={unknown:0,wifi:1,"3g":2,"2g":3,"4g":4,wired:5,"5g":6},Pb=6048e5,Mb=((ub=Mb||{}).USEAINS="useAINS",ub.ENABLEDEBUG="enableDebug",ub.USEV2="useV2",ub.USEWT="useWt",ub),Lb={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}},xb={"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}},Vb={"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}},Ub={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",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"},Fb={INACTIVE:"inactive",SENDONLY:"sendonly",RECVONLY:"recvonly"},Bb={OLD_CLOUD_LADDER:"wss://trtc.rtc.qq.com",WEBRTC:"wss://webrtc.qq.com"},Hb=((db=Hb||{}).LIVE="live",db.RTC="rtc",db),jb=1,Wb=2,Gb=4,Jb=8,Kb=64,zb=16,qb=112,Yb=128,Qb="5Y2wZK8nANNAoVw6dSAHVjNxrD1ObBM2kBPV",Xb="224d130c-7b5c-415b-aaa2-79c2eb5a6df2",$b=Ub.MAIN,Zb=Ub.AUXILIARY,ek=0,tk=1,ik=2,rk=3,nk=4,ok=5,sk=6,ak="unknown",ck={NEW:"new",CONNECTING:"connecting",FAILED:"failed",CLOSED:"closed",DISCONNECTED:"disconnected",CONNECTED:"connected",COMPLETED:"completed"},lk=1/0;function dk(e){lk=e}function uk(){return lk}var hk,pk=30,mk={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"},_k=1e4,fk=1e4,gk=1e4,Tk="unified-plan",Ek="plan-b",vk=1028,yk=((hk=yk||{})[hk.UNPUBLISH=-1]="UNPUBLISH",hk[hk.PUBLISHING=0]="PUBLISHING",hk[hk.PUBLISHED=1]="PUBLISHED",hk),Sk=500,Ik=1e3,Rk=Ub.BIG,Ak=Ub.SMALL,Ck=1e4,bk={MAIN:"schedule.cloud-rtc.com",BACKUP:"schedule.cloud-rtc.net",MAIN_OVERSEA:"schedule.rtc-web.com",BACKUP_OVERSEA:"schedule.rtc-web.io",MAIN_OVERSEA_OLD:"schedule.rtc.tencentcloud.com",BACKUP_OVERSEA_OLD:"schedule-ecdn.rtc.tencentcloud.com"},kk=2e3,Dk={TRTC:"TRTC",CLIENT:"Client",LOCAL_STREAM:"LocalStream",REMOTE_STREAM:"RemoteStream",STREAM:"Stream"},Nk=5,wk="default",Ok=wk,Pk="communications",Mk=Object.keys(Db),Lk=["normal leave","timeout leave","kick","role change"],xk=10,Vk=2e3,Uk="ric",Fk="raf",Bk="interval",Hk="timeout",jk=["width","height","frameRate","facingMode","sampleRate","sampleSize","channelCount","deviceId","min","max"],Wk=1e4;function Gk(e){let{url:t,body:i,method:r,timeout:n}=e,o=new XMLHttpRequest;return new Promise(((e,s)=>{o.onreadystatechange=()=>{if(4===o.readyState)if(o.status>=200&&o.status<300)try{let t=JSON.parse(o.response);e({data:t})}catch(t){e({data:o.response})}else s({status:o.status,statusText:o.statusText||"request failed!"})},o.timeout=n||5e3,o.open(r||"POST",t,!0),o.send(i)}))}function Jk(e){return HC(this,null,(function*(){let t=Lw(),i=JSON.stringify(e);try{if(!CompressionStream||i.length<=2800)return i;let e=new Blob([i],{type:"application/json"}).stream().pipeThrough(new CompressionStream("gzip")),r=yield(yield(yield new Response(e)).blob()).arrayBuffer();return sO.debug("compressJSON ".concat(i.length," -> ").concat(r.byteLength," ").concat(Lw()-t,"ms")),r}catch(hk){return i}}))}var Kk=1e8,zk={AVOID_REPEATED_CALL:"AVOID_REPEATED_CALL",INVALID_PARAMETER_REQUIRED:"INVALID_PARAMETER_REQUIRED",INVALID_PARAMETER_TYPE:"INVALID_PARAMETER_TYPE",INVALID_PARAMETER_EMPTY:"INVALID_PARAMETER_EMPTY",INVALID_PARAMETER_INSTANCE:"INVALID_PARAMETER_INSTANCE",INVALID_PARAMETER_RANGE:"INVALID_PARAMETER_RANGE",INVALID_PARAMETER_MIN:"INVALID_PARAMETER_MIN",INVALID_PARAMETER_MAX:"INVALID_PARAMETER_MAX",INVALID_PARAMETER_STREAMTYPE:"INVALID_PARAMETER_STREAMTYPE",API_CALL_TIMEOUT:"API_CALL_TIMEOUT",SIGNAL_CHANNEL_RECONNECTION_FAILED:"SIGNAL_CHANNEL_RECONNECTION_FAILED",SIGNAL_CHANNEL_SETUP_FAILED:"SIGNAL_CHANNEL_SETUP_FAILED",ERROR_MESSAGE:"ERROR_MESSAGE",EXCHANGE_SDP_TIMEOUT:"EXCHANGE_SDP_TIMEOUT",DOWNLINK_RECONNECTION_FAILED:"DOWNLINK_RECONNECTION_FAILED",EXCHANGE_SDP_FAILED:"EXCHANGE_SDP_FAILED",UPDATE_OFFER_TIMEOUT:"UPDATE_OFFER_TIMEOUT",UPLINK_RECONNECTION_FAILED:"UPLINK_RECONNECTION_FAILED",INVALID_RECORDID:"INVALID_RECORDID",INVALID_PURE_AUDIO:"INVALID_PURE_AUDIO",INVALID_STREAMID:"INVALID_STREAMID",INVALID_USER_DEFINE_RECORDID:"INVALID_USER_DEFINE_RECORDID",INVALID_USER_DEFINE_PUSH_ARGS:"INVALID_USER_DEFINE_PUSH_ARGS",INVALID_PROXY:"INVALID_PROXY",INVALID_JOIN:"INVALID_JOIN",INVALID_ROOMID_STRING:"INVALID_ROOMID_STRING",INVALID_ROOMID_INTEGER:"INVALID_ROOMID_INTEGER",INVALID_SIGNAL_CHANNEL:"INVALID_SIGNAL_CHANNEL",JOIN_ROOM_TIMEOUT:"JOIN_ROOM_TIMEOUT",JOIN_ROOM_FAILED:"JOIN_ROOM_FAILED",REJOIN_ROOM_FAILED:"REJOIN_ROOM_FAILED",INVALID_DESTROY:"INVALID_DESTROY",INVALID_PUBLISH:"INVALID_PUBLISH",INVALID_UNPUBLISH:"INVALID_UNPUBLISH",INVALID_AUDIENCE:"INVALID_AUDIENCE",INVALID_INITIALIZE:"INVALID_INITIALIZE",INVALID_DUPLICATE_PUBLISHING:"INVALID_DUPLICATE_PUBLISHING",INVALID_SUBSCRIBE_UNDEFINED:"INVALID_SUBSCRIBE_UNDEFINED",INVALID_SUBSCRIBE_LOCAL:"INVALID_SUBSCRIBE_LOCAL",INVALID_REMOTE_STREAM:"INVALID_REMOTE_STREAM",SUBSCRIBE_FAILED:"SUBSCRIBE_FAILED",INVALID_ROLE:"INVALID_ROLE",INVALID_PARAMETER_SWITCH_ROLE:"INVALID_PARAMETER_SWITCH_ROLE",INVALID_OPERATION_SWITCH_ROLE:"INVALID_OPERATION_SWITCH_ROLE",SWITCH_ROLE_TIMEOUT:"SWITCH_ROLE_TIMEOUT",SWITCH_ROLE_FAILED:"SWITCH_ROLE_FAILED",CLIENT_BANNED:"CLIENT_BANNED",INVALID_OPERATION_START_PUBLISH_CDN:"INVALID_OPERATION_START_PUBLISH_CDN",INVALID_OPERATION_STOP_PUBLISH_CDN:"INVALID_OPERATION_STOP_PUBLISH_CDN",INVALID_STREAM_ID:"INVALID_STREAM_ID",START_PUBLISH_CDN_FAILED:"START_PUBLISH_CDN_FAILED",STOP_PUBLISH_CDN_FAILED:"STOP_PUBLISH_CDN_FAILED",START_MIX_TRANSCODE:"START_MIX_TRANSCODE",STOP_MIX_TRANSCODE:"STOP_MIX_TRANSCODE",INVALID_AUDIO_VOLUME:"INVALID_AUDIO_VOLUME",ENABLE_SMALL_STREAM_PUBLISHED:"ENABLE_SMALL_STREAM_PUBLISHED",DISABLE_SMALL_STREAM_PUBLISHED:"DISABLE_SMALL_STREAM_PUBLISHED",NOT_SUPPORTED_SMALL_STREAM:"NOT_SUPPORTED_SMALL_STREAM",INVALID_SMALL_STREAM_PROFILE:"INVALID_SMALL_STREAM_PROFILE",INVALID_PARAMETER_REMOTE_STREAM:"INVALID_PARAMETER_REMOTE_STREAM",INVALID_OPERATION_CHANGE_SMALL:"INVALID_OPERATION_CHANGE_SMALL",REMOTE_NOT_PUBLISH_SMALL_STREAM:"REMOTE_NOT_PUBLISH_SMALL_STREAM",INVALID_SWITCH_DEVICE:"INVALID_SWITCH_DEVICE",INVALID_SWITCH_DEVICE_PUBLISHING:"INVALID_SWITCH_DEVICE_PUBLISHING",INVALID_REPLACE_TRACK:"INVALID_REPLACE_TRACK",INVALID_INITIALIZE_LOCAL_STREAM:"INVALID_INITIALIZE_LOCAL_STREAM",INVALID_ADD_TRACK_REPETITIVE:"INVALID_ADD_TRACK_REPETITIVE",INVALID_ADD_TRACK_REMOVING:"INVALID_ADD_TRACK_REMOVING",INVALID_ADD_TRACK_PUBLISHING:"INVALID_ADD_TRACK_PUBLISHING",INVALID_STREAM_INITIALIZED:"INVALID_STREAM_INITIALIZED",INVALID_ADD_TRACK_NUMBER:"INVALID_ADD_TRACK_NUMBER",INVALID_REMOVE_AUDIO_TRACK:"INVALID_REMOVE_AUDIO_TRACK",INVALID_REMOVE_AUDIO_ADDING:"INVALID_REMOVE_AUDIO_ADDING",INVALID_REMOVE_AUDIO_ON:"INVALID_REMOVE_AUDIO_ON",INVALID_REMOVE_TRACK_PUBLISHING:"INVALID_REMOVE_TRACK_PUBLISHING",INVALID_REMOVE_TRACK_NOT_TRACK:"INVALID_REMOVE_TRACK_NOT_TRACK",INVALID_REMOVE_TRACK_NUMBER:"INVALID_REMOVE_TRACK_NUMBER",INVALID_REPLACE_TRACK_NO_TRACK:"INVALID_REPLACE_TRACK_NO_TRACK",REPEAT_JOIN:"REPEAT_JOIN",CLIENT_DESTROYED:"CLIENT_DESTROYED",NOT_BUG_PACKAGE:"NOT_BUG_PACKAGE",START_MIX_TRANSCODE_FAILED:"START_MIX_TRANSCODE_FAILED",STOP_MIX_TRANSCODE_FAILED:"STOP_MIX_TRANSCODE_FAILED",MIX_TRANSCODE_NOT_STARTED:"MIX_TRANSCODE_NOT_STARTED",CANNOT_LESS_THAN_ZERO:"CANNOT_LESS_THAN_ZERO",MIX_PARAMS_VIDEO_FRAMERATE:"MIX_PARAMS_VIDEO_FRAMERATE",MIX_PARAMS_VIDEO_GOP:"MIX_PARAMS_VIDEO_GOP",MIX_PARAMS_AUDIO_BITRATE:"MIX_PARAMS_AUDIO_BITRATE",MIX_PARAMS_USER_Z_ORDER:"MIX_PARAMS_USER_Z_ORDER",MIX_PARAMS_NOT_SELF:"MIX_PARAMS_NOT_SELF",MIX_PARAMS_USER_STREAM:"MIX_PARAMS_USER_STREAM",INVALID_PLAY:"INVALID_PLAY",INVALID_ELEMENT_ID:"INVALID_ELEMENT_ID",INVALID_ELEMENT_ID_TYPE:"INVALID_ELEMENT_ID_TYPE",PLAY_FAILED:"PLAY_FAILED",INVALID_USERID:"INVALID_USERID",INVALID_CREATE_STREAM_SOURCE:"INVALID_CREATE_STREAM_SOURCE",INVALID_CREATE_STREAM_SCREEN:"INVALID_CREATE_STREAM_SCREEN",INVALID_CREATE_STREAM_AUDIO:"INVALID_CREATE_STREAM_AUDIO",INVALID_CREATE_STREAM_SCREEN_AUDIO:"INVALID_CREATE_STREAM_SCREEN_AUDIO",NOT_SUPPORTED_HTTP:"NOT_SUPPORTED_HTTP",NOT_SUPPORTED_WEBRTC:"NOT_SUPPORTED_WEBRTC",NOT_SUPPORTED_PROFILE:"NOT_SUPPORTED_PROFILE",NOT_SUPPORTED_MEDIA:"NOT_SUPPORTED_MEDIA",NOT_SUPPORTED_H264ENCODE:"NOT_SUPPORTED_H264ENCODE",NOT_SUPPORTED_H264DECODE:"NOT_SUPPORTED_H264DECODE",NOT_SUPPORTED_TRACK:"NOT_SUPPORTED_TRACK",NOT_SUPPORTED_SWITCH_DEVICE:"NOT_SUPPORTED_SWITCH_DEVICE",NOT_SUPPORTED_CAPTURE:"NOT_SUPPORTED_CAPTURE",NOT_SUPPORTED_AUX:"NOT_SUPPORTED_AUX",MICROPHONE_NOT_FOUND:"MICROPHONE_NOT_FOUND",CAMERA_NOT_FOUND:"CAMERA_NOT_FOUND",SIGNAL_RESPONSE_FAILED:"SIGNAL_RESPONSE_FAILED",CATCH_HANDLER_ERROR:"CATCH_HANDLER_ERROR",API_NOT_EXIST:"API_NOT_EXIST",CONNECTION_CLOSED:"CONNECTION_CLOSED",SUBSCRIBE_ALL_FALSE:"SUBSCRIBE_ALL_FALSE",SEI_NOT_SUPPORT:"SEI_NOT_SUPPORT",SEI_DISABLED:"SEI_DISABLED",SEI_BEFORE_PUBLISH:"SEI_BEFORE_PUBLISH",SEI_NOT_VIDEO:"SEI_NOT_VIDEO",CALL_FREQUENCY_LIMIT:"CALL_FREQUENCY_LIMIT",CONNECTION_ABORTED:"CONNECTION_ABORTED",API_CALL_ABORTED:"API_CALL_ABORTED",DUPLICATE_AUX:"DUPLICATE_AUX"},qk={AVOID_REPEATED_CALL:e=>"previous ".concat(e.name,"() is ongoing, please avoid repeated calls."),INVALID_PARAMETER_REQUIRED(e){let{key:t,rule:i,fnName:r,value:n}=e;return"'".concat(t||i.name,"' is a required param when calling ").concat(r,"(), received: ").concat(n,".")},INVALID_PARAMETER_TYPE(e){let{key:t,rule:i,fnName:r,value:n}=e,o="".concat(t||i.name),s="";return s=Array.isArray(i.type)?i.type.join("|"):i.type,"'".concat(o,"' must be type of ").concat(s," when calling ").concat(r,"(), received type: ").concat(vw(n),".")},INVALID_PARAMETER_EMPTY(e){let{key:t,rule:i,fnName:r,value:n}=e;return"'".concat(t||i.name,"' cannot be '").concat(n,"' when calling ").concat(r,"().")},INVALID_PARAMETER_INSTANCE(e){let{key:t,rule:i,fnName:r,value:n}=e,o="".concat(t||i.name),s="".concat(i.instanceOf.name||i.instanceOf);return"'".concat(o,"' must be instanceof ").concat(s," when calling ").concat(r,"(), received type: ").concat(vw(n),".")},INVALID_PARAMETER_RANGE(e){let{key:t,rule:i,fnName:r,value:n}=e;return"'".concat(t||i.name,"' must be one of ").concat(i.values.join("|")," when calling ").concat(r,"(), received: ").concat(n,".")},INVALID_PARAMETER_MIN(e){let{key:t,rule:i,fnName:r,value:n}=e;return"the min value of ".concat(t||i.name," is ").concat(i.min,", received: ").concat(n,".")},INVALID_PARAMETER_MAX(e){let{key:t,rule:i,fnName:r,value:n}=e;return"the max value of ".concat(t||i.name," is ").concat(i.max,", received: ").concat(n,".")},API_CALL_TIMEOUT:e=>"".concat(e.commandDesc||e.command," timeout observed."),SIGNAL_CHANNEL_RECONNECTION_FAILED:"signal channel reconnection failed, please check your network.",SIGNAL_CHANNEL_SETUP_FAILED:e=>"SignalChannel setup failure: (errorCode: ".concat(e.errorCode,", errorMsg: ").concat(e.errorMsg," })."),ERROR_MESSAGE(e){let t="".concat(e.type," failed");return e.message&&(t="".concat(t,": ").concat(e.message,".")),t},EXCHANGE_SDP_TIMEOUT:"exchange sdp timeout.",DOWNLINK_RECONNECTION_FAILED:"downlink reconnection failed, please check your network and re-join room.",EXCHANGE_SDP_FAILED:e=>"exchange sdp failed ".concat(e.errMsg,"."),UPDATE_OFFER_TIMEOUT:"update offer timeout observed.",UPLINK_RECONNECTION_FAILED:"uplink reconnection failed, please check your network and publish again.",INVALID_RECORDID:"recordId must be an integer number.",INVALID_PURE_AUDIO:"pureAudioPushMode must be 1 or 2.",INVALID_STREAMID:"streamId must be a sting literal within 64 bytes, and not be empty.",INVALID_USER_DEFINE_RECORDID:"userDefineRecordId must be a sting literal contains (a-zA-Z),(0-9), underline and hyphen, within 64 bytes, and not be empty.",INVALID_USER_DEFINE_PUSH_ARGS:"userDefinePushArgs must be a sting literal within 256 bytes, and not be empty.",INVALID_PROXY:'proxy server url must start with "wss://".',INVALID_JOIN:"duplicate join() called.",INVALID_ROOMID_STRING:e=>"'".concat(e,"' must be validate string when useStringRoomId is true."),INVALID_ROOMID_INTEGER:e=>"'".concat(e,"' must be an integer between [1, 4294967294] when useStringRoomId is false."),INVALID_SIGNAL_CHANNEL:"SignalChannel is not ready yet.",JOIN_ROOM_TIMEOUT:"join room timeout.",JOIN_ROOM_FAILED(e){let{error:t,code:i}=e;return"Failed to join room - ".concat(t," code: ").concat(i)},REJOIN_ROOM_FAILED:e=>"reJoin room: ".concat(e.roomId," failed, please check your network."),INVALID_DESTROY:"please call leave() before destroy().",INVALID_PUBLISH:"please call join() before publish().",INVALID_UNPUBLISH:"stream has not been published yet.",INVALID_AUDIENCE:"no permission to publish() under live/".concat("audience",', please call switchRole("',"anchor",'") firstly before publish().'),INVALID_INITIALIZE:"cannot publish stream because stream is not initialized, is switching device, or has been closed.",INVALID_DUPLICATE_PUBLISHING:e=>"duplicate ".concat(e," stream publishing, please unpublish your prev ").concat(e," stream and then re-publish."),INVALID_SUBSCRIBE_UNDEFINED:"stream is undefined or null.",INVALID_SUBSCRIBE_LOCAL:"stream cannot be LocalStream.",INVALID_REMOTE_STREAM:"remoteStream does not exist because it has been unpublished by remote peer.",SUBSCRIBE_FAILED(e){let{message:t,userId:i,streamType:r}=e;return"failed to subscribe ".concat(i," ").concat(r," stream, reason: ").concat(t,".")},INVALID_ROLE:"switchRole can only be called in live mode.",INVALID_PARAMETER_SWITCH_ROLE:"role could only be set to a value as ".concat("anchor"," or ","audience","."),INVALID_OPERATION_SWITCH_ROLE:"please call join() before switchRole().",SWITCH_ROLE_TIMEOUT:"switchRole timeout.",SWITCH_ROLE_FAILED:e=>"switchRole failed, errCode: ".concat(e.code," errMsg: ").concat(e.message,"."),CLIENT_BANNED:e=>"client was banned because of ".concat(e.message,"."),INVALID_OPERATION_START_PUBLISH_CDN:"please call startPublishCDNStream() after join room and publish the local stream.",INVALID_OPERATION_STOP_PUBLISH_CDN:"please call startPublishCDNStream() before stopPublishCDNStream().",START_PUBLISH_CDN_FAILED:e=>"startPublishCDNStream failed, errMsg: ".concat(e.message,"."),STOP_PUBLISH_CDN_FAILED:e=>"stopPublishCDNStream failed, errMsg: ".concat(e.message,"."),INVALID_STREAM_ID:e=>"'".concat(e,"' can only consist of uppercase and lowercase english letters (a-zA-Z), numbers (0-9), hyphens and underscores."),START_MIX_TRANSCODE:"please call startMixTranscode() after join().",STOP_MIX_TRANSCODE:"please call stopMixTranscode() after startMixTranscode().",INVALID_AUDIO_VOLUME:"interval must be a number.",ENABLE_SMALL_STREAM_PUBLISHED:"Cannot enable small stream after localStream published.",DISABLE_SMALL_STREAM_PUBLISHED:"Cannot disable small stream after localStream published.",NOT_SUPPORTED_SMALL_STREAM:"your browser does not support opening small stream.",INVALID_SMALL_STREAM_PROFILE:"small stream profile is invalid.",INVALID_PARAMETER_REMOTE_STREAM:"remoteStream is invalid.",INVALID_OPERATION_CHANGE_SMALL:"cannot switch to the small stream without subscribing to the video of remoteStream.",REMOTE_NOT_PUBLISH_SMALL_STREAM:"remote peer does not publish small stream.",INVALID_SWITCH_DEVICE:"cannot switch device on current stream.",INVALID_SWITCH_DEVICE_PUBLISHING:"cannot switch device when publishing localStream.",INVALID_REPLACE_TRACK:"cannot replace track when publishing localStream.",INVALID_INITIALIZE_LOCAL_STREAM:"local stream has not initialized yet.",INVALID_ADD_TRACK_REPETITIVE:"previous addTrack is ongoing, please avoid repetitive execution.",INVALID_ADD_TRACK_REMOVING:"cannot add track when a track is removing.",INVALID_ADD_TRACK_PUBLISHING:"cannot add track when publishing localStream.",INVALID_STREAM_INITIALIZED:"your local stream haven't been initialized yet.",INVALID_ADD_TRACK_NUMBER:"a Stream has at most one audio track and one video track.",INVALID_REMOVE_AUDIO_TRACK:"remove audio track is not supported on your browser.",INVALID_REMOVE_AUDIO_ADDING:"cannot remove track when a track is adding.",INVALID_REMOVE_AUDIO_ON:"previous removeTrack is ongoing, please avoid repetitive execution.",INVALID_REMOVE_TRACK_PUBLISHING:"cannot remove track when publishing localStream.",INVALID_REMOVE_TRACK_NOT_TRACK:"localStream has not this track.",INVALID_REMOVE_TRACK_NUMBER:"remove the only video track is not supported, please use replaceTrack or muteVideo.",INVALID_REPLACE_TRACK_NO_TRACK:e=>"cannot replace ".concat(e.kind," track because stream has not ").concat(e.kind," track"),NOT_BUG_PACKAGE:"You need to buy packages, refer to tencent console.",START_MIX_TRANSCODE_FAILED:e=>"startMixTranscode failed, errMsg: ".concat(e.message,"."),STOP_MIX_TRANSCODE_FAILED:e=>"stopMixTranscode failed, errMsg: ".concat(e.message,"."),MIX_TRANSCODE_NOT_STARTED:"mixTranscode has not been started.",CANNOT_LESS_THAN_ZERO(e){let{key:t,rule:i,fnName:r,value:n}=e;return"'".concat(t||i.name,"' cannot be less than 0 when calling ").concat(r,"().")},MIX_PARAMS_VIDEO_FRAMERATE:"'config.videoFramerate' should be an integer between 0 and 30, excluding 0.",MIX_PARAMS_VIDEO_GOP:"'config.videoGOP' should be an integer between 1 and 8.",MIX_PARAMS_AUDIO_BITRATE:"'config.audioBitrate' should be an integer between 32 and 192.",MIX_PARAMS_USER_Z_ORDER:e=>"'".concat(e,"' is required and must be between 1 and 15."),MIX_PARAMS_NOT_SELF:"'config.mixUsers' must contain self.",MIX_PARAMS_USER_STREAM:"'config.videoWidth' and 'config.videoHeight' of output stream should be contain all mix stream.",INVALID_PLAY:"duplicate play() call observed, please stop() firstly.",INVALID_ELEMENT_ID:e=>{let{key:t,fnName:i}=e;return"'".concat(t,"' is not found in the document object when calling ").concat(i,"().")},INVALID_ELEMENT_ID_TYPE:e=>{let{key:t,fnName:i,type:r}=e;return"the element corresponding to '".concat(t,"' must be instanceof HTMLElement when calling ").concat(i,"(), received: ").concat(r,".")},PLAY_FAILED:e=>"".concat(e.media," play failed,browser exception: ").concat(e.error.toString()),INVALID_USERID:"userId cannot be all spaces.",INVALID_CREATE_STREAM_SOURCE:"LocalStream must be created by createStream() with either audio/video or audioSource/videoSource, but can not be mixed with audio/video and audioSource/videoSource.",INVALID_CREATE_STREAM_SCREEN:"screen/video cannot be both true.",INVALID_CREATE_STREAM_AUDIO:"audio/screenAudio cannot be both true.",INVALID_CREATE_STREAM_SCREEN_AUDIO:"when screen is true, screenAudio can be configured.",NOT_SUPPORTED_HTTP:"http protocol does not support the ability to capture microphone, camera and screen. please use https to deploy your page.",NOT_SUPPORTED_WEBRTC:"your browser or environment does not support full WebRTC capabilities.",NOT_SUPPORTED_PROFILE:"your browser does not support setVideoProfile.",NOT_SUPPORTED_MEDIA:"your browser or environment does not support navigator.mediaDevices.",NOT_SUPPORTED_H264ENCODE:"your device does not support H.264 encoding.",NOT_SUPPORTED_H264DECODE:"your device does not support H.264 decoding.",NOT_SUPPORTED_TRACK:e=>"".concat(e,"Track is not supported on your browser."),NOT_SUPPORTED_SWITCH_DEVICE:"switchDevice is not supported on your browser.",NOT_SUPPORTED_CAPTURE:"Your browser or environment does not support screen sharing, please check whether the browser version.",MICROPHONE_NOT_FOUND:"no microphone detected, please check your microphone.",CAMERA_NOT_FOUND:"no camera detected, please check your camera.",SIGNAL_RESPONSE_FAILED:e=>"".concat(e.signalResponse," failed, response code is ").concat(e.code," , errMsg: ").concat(e.message,"."),CATCH_HANDLER_ERROR(e){let{name:t,event:i}=e;return"an error was caught in ".concat(t,".on('").concat(i,"', handler), please check your code in 'handler'.")},API_NOT_EXIST(e){let{name:t}=e;return"experimental api ".concat(t," does not exist.")},REPEAT_JOIN:e=>"please avoid repeated join.",CONNECTION_CLOSED:"remoteStream has been unsubscribed or unpublished by remote user.",SUBSCRIBE_ALL_FALSE:"cannot subscribe when both audio & video are false, use client.unsubscribe() instead",CLIENT_DESTROYED(e){let{funName:t}=e;return"failed to call ".concat(t,"() because client was destroyed.")},SEI_NOT_SUPPORT:e=>"not support to sendSEIMessage".concat(!1===e?" without using h264 codec":""),SEI_DISABLED:"SEI is disabled",SEI_BEFORE_PUBLISH:"please call sendSEIMessage() after publish() success",SEI_NOT_VIDEO:"cannot send sei when localStream has not video.",CALL_FREQUENCY_LIMIT:e=>{let{isSize:t,name:i,timesInSecond:r,maxSizeInSecond:n}=e;return"api ".concat(i," call ").concat(t?"size":"times"," is over ").concat(t?"".concat(n," bytes"):r," in a second.")},CONNECTION_ABORTED:e=>"connection aborted due to: ".concat(e),API_CALL_ABORTED(e){let t;return t=e.message.includes("REMOTE_STREAM_NOT_EXIST")?"Subscribe ".concat(e.userId," ").concat(e.streamType," stream aborted, reason: remote user ").concat(e.userId," unpublished stream."):"API aborted, reason: ".concat(e.message),t},DUPLICATE_AUX:"only one auxiliary stream can be published in a room.",NOT_SUPPORTED_AUX:"publish auxiliary stream is not supported on your browser.",INVALID_PARAMETER_STREAMTYPE:e=>"'streamType' is required when 'userId' is not '*', calling ".concat(e,"()")},Yk={};xC(Yk,{ANDROID_VERSION:()=>cD,CHROME_MAJOR_VERSION:()=>lN,CHROME_VERSION:()=>dN,EDGE_VERSION:()=>_D,EDG_MAJOR_VERSION:()=>TD,EDG_VERSION:()=>gD,FIREFOX_MAJOR_VERSION:()=>pD,FIREFOX_VERSION:()=>hD,HUAWEI_VERSION:()=>$D,IE_VERSION:()=>DD,IOS_MAIN_VERSION:()=>fN,IOS_VERSION:()=>_N,IPADQQB_VERSION:()=>BD,IS_ANDROID:()=>aD,IS_ANDROID_WEBVIEW:()=>mN,IS_ANY_SAFARI:()=>hN,IS_CHROME:()=>aN,IS_CHROME_OS:()=>GD,IS_CHROMIUM_BASE:()=>sN,IS_EDG:()=>fD,IS_EDGE:()=>mD,IS_ELECTRON:()=>zD,IS_FIREFOX:()=>uD,IS_HEADLESS_CHROME:()=>cN,IS_HUAWEI:()=>XD,IS_HUAWEIBROWSER:()=>QD,IS_IE:()=>kD,IS_IE8:()=>bD,IS_IOS:()=>sD,IS_IOS_13_OR_14:()=>EN,IS_IOS_15_1:()=>TN,IS_IPAD:()=>iD,IS_IPADQQB:()=>FD,IS_IPAD_PRO:()=>rD,IS_IPHONE:()=>nD,IS_IPOD:()=>oD,IS_LINUX:()=>WD,IS_LOCAL:()=>vN,IS_MAC:()=>jD,IS_MACQQB:()=>VD,IS_MIBROWSER:()=>qD,IS_MQQB:()=>PD,IS_NATIVE_ANDROID:()=>dD,IS_OLD_ANDROID:()=>lD,IS_OPPOBROWSER:()=>tN,IS_SAFARI:()=>uN,IS_SAFARI_15_1:()=>gN,IS_SAMSUNGBROWSER:()=>ZD,IS_SOGOU:()=>yD,IS_SOGOUM:()=>ED,IS_TBS:()=>ID,IS_UCBROWSER:()=>KD,IS_VIVOBROWSER:()=>rN,IS_WECHAT:()=>ND,IS_WIN:()=>HD,IS_WQQB:()=>LD,IS_WX:()=>JD,IS_X5MQQB:()=>OD,IS_XWEB:()=>AD,MACQQB_VERSION:()=>UD,MI_VERSION:()=>YD,MQQB_VERSION:()=>MD,OPPO_VERSION:()=>iN,SAFARI_VERSION:()=>pN,SAMSUNG_VERSION:()=>eN,SOGOUM_VERSION:()=>vD,SOGOU_VERSION:()=>SD,TBS_VERSION:()=>RD,UA_DATA_STRING:()=>AN,USER_AGENT:()=>Qk,VIVO_VERSION:()=>nN,WECHAT_VERSION:()=>wD,WQQB_VERSION:()=>xD,XWEB_VERSION:()=>CD,browserInfo:()=>SN,getBrowserInfo:()=>IN,getChromeMajorVersion:()=>oN,getDeviceModel:()=>bN,getOSName:()=>DN,getOSNumber:()=>NN,getOSString:()=>wN,getOSType:()=>PN,getTerminalType:()=>ON,getUserAgentData:()=>CN,isLocalStorageEnabled:()=>yN});var Qk="undefined"==typeof navigator?"":navigator.userAgent,Xk=e=>new RegExp(e,"i").test(Qk),$k=e=>{if(Xk(e)){let t=new RegExp("".concat(e,"\\/([\\d.]+)")),i=Qk.match(t);if(i&&i[1])return i[1]}return""},Zk=e=>{if(Xk(e)){let t=new RegExp("".concat(e,"\\/(\\d+)")),i=Qk.match(t);if(i&&i[1])return parseFloat(i[1])}return NaN},eD=/AppleWebKit\/([\d.]+)/i.exec(Qk),tD=eD?parseFloat(eD[1]):NaN,iD=Xk("iPad"),rD="undefined"!=typeof navigator&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&Xk("Macintosh"),nD=Xk("iPhone")&&!iD,oD=Xk("iPod"),sD=nD||iD||oD||rD,aD=Xk("Android"),cD=function(){if(aD){let e=Qk.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(e){let t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);if(t&&i)return parseFloat("".concat(e[1],".").concat(e[2]));if(t)return t}}return NaN}(),lD=aD&&Xk("webkit")&&cD<2.3,dD=aD&&cD<5&&tD<537,uD=Xk("Firefox"),hD=$k("Firefox"),pD=Zk("Firefox"),mD=Xk("Edge"),_D=$k("Edge"),fD=Xk("Edg"),gD=$k("Edg"),TD=Zk("Edg"),ED=Xk("SogouMobileBrowser"),vD=$k("SogouMobileBrowser"),yD=Xk("MetaSr\\s"),SD=$k("MetaSr\\s"),ID=Xk("TBS"),RD=$k("TBS"),AD=Xk("XWEB"),CD=$k("XWEB"),bD=Xk("MSIE\\s8\\.0"),kD=Xk("MSIE\\/\\d+"),DD=function(){if(kD){let e=/MSIE\s(\d+)\.\d/.exec(Qk),t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test(Qk)&&/rv:11.0/.test(Qk)&&(t=11),t}return NaN}(),ND=Xk("(micromessenger|webbrowser)"),wD=$k("MicroMessenger"),OD=!ID&&Xk("MQQBrowser")&&Xk("COVC"),PD=!ID&&Xk("MQQBrowser")&&!Xk("COVC"),MD=PD||OD?$k("MQQBrowser"):"",LD=!ID&&Xk(" QQBrowser"),xD=$k(" QQBrowser"),VD=!ID&&Xk("QQBrowserLite"),UD=$k("QQBrowserLite"),FD=!ID&&Xk("MQBHD"),BD=$k("MQBHD"),HD=Xk("Windows"),jD=!sD&&Xk("MAC OS X"),WD=!aD&&Xk("Linux"),GD=Xk("CrOS"),JD=Xk("MicroMessenger"),KD=Xk("UCBrowser"),zD=Xk("Electron"),qD=Xk("MiuiBrowser"),YD=$k("MiuiBrowser"),QD=Xk("HuaweiBrowser"),XD=Xk("Huawei"),$D=$k("HuaweiBrowser"),ZD=Xk("SamsungBrowser"),eN=$k("SamsungBrowser"),tN=Xk("HeyTapBrowser"),iN=$k("HeyTapBrowser"),rN=Xk("VivoBrowser"),nN=$k("VivoBrowser"),oN=()=>Zk("Chrome"),sN=Xk("Chrome"),aN=!mD&&!yD&&!ED&&!ID&&!AD&&!fD&&!LD&&!qD&&!QD&&!ZD&&!tN&&!rN&&sN,cN=Xk("HeadlessChrome"),lN=oN(),dN=$k("Chrome"),uN=!sN&&!PD&&!OD&&!VD&&!FD&&Xk("Safari"),hN=uN||sD,pN=$k("Version"),mN=/Android.*(wv|.0.0.0)/.test(Qk),_N=(()=>{if(rD)return pN;if(sD){let e=Qk.match(/OS (\d+)_(\d+)/i);if(e&&e[1]){let t=e[1];return e[2]&&(t+=".".concat(e[2])),t}}return""})(),fN=Number(_N.split(".")[0]),gN="15.1"===pN,TN="15.1"===_N,EN=(()=>{let e=Number(_N.split(".")[0]);return 14===e||13===e})(),vN="undefined"!=typeof location&&("file:"===location.protocol||"localhost"===location.hostname||"127.0.0.1"===location.hostname),yN=(()=>{let e;return()=>{if(void 0===e)try{e=!!window.localStorage}catch(hO){e=!1}return e}})(),SN=IN();function IN(){let e=new Map([[uD,["Firefox",hD]],[fD,["Edg",gD]],[aN,["Chrome",dN]],[uN,["Safari",pN]],[ID,["TBS",RD]],[AD,["XWEB",CD]],[ND&&nD,["WeChat",wD]],[LD,["QQ(Win)",xD]],[PD,["QQ(Mobile)",MD]],[OD,["QQ(Mobile X5)",MD]],[VD,["QQ(Mac)",UD]],[FD,["QQ(iPad)",BD]],[qD,["MI",YD]],[QD,["HW",$D]],[ZD,["Samsung",eN]],[tN,["OPPO",iN]],[rN,["VIVO",nN]],[mD,["EDGE",_D]],[ED,["SogouMobile",vD]],[yD,["Sogou",SD]]]),t="unknown",i="unknown";return e.has(!0)&&([t,i]=e.get(!0)),{name:t,version:i}}var RN=null,AN="";function CN(){return HC(this,null,(function*(){if(RN)return RN;if(!navigator.userAgentData||"function"!=typeof navigator.userAgentData.getHighEntropyValues)return null;try{return(RN=yield navigator.userAgentData.getHighEntropyValues(["architecture","bitness","model","platformVersion","fullVersionList"]))&&!AN&&(AN="UAData: ".concat(RN.platform,"/").concat(RN.platformVersion),RN.architecture&&RN.bitness&&(AN+=" ".concat(RN.architecture,"/").concat(RN.bitness)),RN.mobile&&(AN+=" mobile"),RN.model&&(AN+=" model: ".concat(RN.model)),RN.fullVersionList&&(AN+=" ".concat(RN.fullVersionList.filter((e=>"Not/A)Brand"!==e.brand)).map((e=>"".concat(e.brand,"/").concat(e.version))).join(",")))),RN}catch(sx){return null}}))}function bN(){return(null==RN?void 0:RN.model)||""}var kN=new Map([[aD,"Android"],[sD,"iOS"],[HD,"Windows"],[jD,"MacOS"],[WD,"Linux"],[GD,"ChromeOS"]]),DN=function(){return kN.get(!0)?kN.get(!0):RN?RN.platform:"unknown"};function NN(){return HD?1:aD?2:jD?3:sD?4:WD?5:GD?6:0}var wN=()=>{let e=DN();return e+="/".concat(SN.name,"/").concat(uN?SN.version:SN.version.split(".")[0]),null!=RN&&RN.platformVersion&&(e+="/".concat(RN.platformVersion)),null!=RN&&RN.architecture&&(e+="/".concat(RN.architecture)),e};function ON(){return aD?4:nD?2:iD?3:jD?12:HD?5:WD?13:1}function PN(){return aD?"Android":nD?"iPhone":iD?"iPad":jD?"Mac":HD?"Windows":WD?"Linux":"unknown"}var MN=(e,t)=>t?"".concat(Sb,"/").concat(e,"/").concat(t):"".concat(Sb,"/").concat(e,"/index.html"),LN=()=>{if(window.TRTC_ERROR_INFO&&window.TRTC_ERROR_LINK)return{TRTC_ERROR_INFO:window.TRTC_ERROR_INFO,TRTC_ERROR_LINK:window.TRTC_ERROR_LINK};let e=null==localStorage?void 0:localStorage.getItem(Cb);if(e){e=JSON.parse(e);let t=document.createElement("script");t.type="text/javascript",t.text=e.message,document.body.appendChild(t);let i=window.TRTC_ERROR_INFO,r=window.TRTC_ERROR_LINK;return document.body.removeChild(t),{TRTC_ERROR_INFO:i,TRTC_ERROR_LINK:r}}return{}};function xN(e){let{key:t,data:i,link:r,addDocLink:n=!0}=e,o="",s="",a="";yw(qk[t])?o=qk[t](i):Iw(qk[t])&&(o=qk[t]);let{TRTC_ERROR_INFO:c,TRTC_ERROR_LINK:l}=LN();r?a="".concat(r.className,".html#").concat(r.fnName):l&&l[t]&&(yw(l[t])?a=l[t](i):Iw(l[t])&&(a=l[t]));let d=o;return fw()&&(c&&c[t]&&(yw(c[t])?s=c[t](i):Iw(c[t])&&(s=c[t])),s&&(d=n?"".concat(s,"\n请查看文档: ").concat(MN("zh-cn",a),"\n\n"):"".concat(s,"\n\n"),d+=o)),n&&(d+=" \nRefer to: ".concat(MN("en",a),"\n")),d}var VN=Object.prototype.hasOwnProperty,UN=e=>"function"==typeof e,FN=e=>void 0===e;function BN(e){if(null==e)return!0;if("boolean"==typeof e)return!1;if("number"==typeof e)return 0===e;if("string"==typeof e||"function"==typeof e||Array.isArray(e))return 0===e.length;if(e instanceof Error)return""===e.message;if(function(e){if(!e||"object"!=typeof e||"[object Object]"!=Object.prototype.toString.call(e))return!1;let t=Object.getPrototypeOf(e);if(null===t)return!0;let i=Object.prototype.hasOwnProperty.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&Function.prototype.toString.call(i)===Function.prototype.toString.call(Object)}(e))switch(Object.prototype.toString.call(e)){case"[object File]":case"[object Map]":case"[object Set]":return 0===e.size;case"[object Object]":for(let t in e)if(VN.call(e,t))return!1;return!0}return!1}var HN=function(e){let{retryFunction:t,settings:i,onError:r,onRetrying:n,onRetryFailed:o,onRetrySuccess:s,context:a}=e;return function(){for(var e=arguments.length,c=new Array(e),l=0;l<e;l++)c[l]=arguments[l];let{retries:d=5,timeout:u=1e3}=i,h=0,p=-1,m=0,_=(e,i)=>HC(this,null,(function*(){let l=a||this;try{let i=yield t.apply(l,c);h>0&&s&&s.call(this,h),h=0,e(i)}catch(f){let t=()=>{clearTimeout(p),h=0,m=2,i(f)},s=()=>{2!==m&&h<(UN(d)?d():d)?(h++,m=1,UN(n)&&n.call(this,h,t),p=window.setTimeout((()=>{p=-1,_(e,i)}),UN(u)?u(h):u)):(t(),UN(o)&&o.call(this,f))};UN(r)?r.call(this,{error:f,retry:s,reject:i,retryFuncArgs:c,retriedCount:h}):s()}}));return new Promise(_)}},jN=new(VC(jC(),1).default),WN=(e=>(e.ROOM_DESTROY="1",e.JOIN_START="21",e.JOIN_SCHEDULE_SUCCESS="22",e.JOIN_SIGNAL_CONNECTION_START="23",e.JOIN_SIGNAL_CONNECTION_END="24",e.JOIN_SEND_CMD="25",e.JOIN_RECEIVED_CMD_RES="26",e.JOIN_SUCCESS="27",e.JOIN_FAILED="28",e.LEAVE_START="51",e.LEAVE_SEND_CMD="52",e.LEAVE_SUCCESS="53",e.PUBLISH_START="61",e.SEND_FIRST_VIDEO_FRAME="62",e.PUBLISH_FAILED="63",e.SUBSCRIBE_START="81",e.SUBSCRIBE_SUCCESS="82",e.SUBSCRIBE_FAILED="84",e.UNSUBSCRIBE_SUCCESS="83",e.LOCAL_TRACK_CAPTURE_START="101",e.LOCAL_TRACK_CAPTURE_SUCCESS="102",e.LOCAL_TRACK_CAPTURE_FAILED="103",e.LOCAL_TRACK_PUBLISHED="104",e.LOCAL_TRACK_UNPUBLISHED="105",e.LOCAL_TRACK_REPLACED="106",e.SWITCH_DEVICE_SUCCESS="107",e.TRACK_MUTED="108",e.TRACK_UNMUTED="109",e.REMOTE_TRACK_SUBSCRIBED="110",e.REMOTE_TRACK_UNSUBSCRIBED="111",e.LOCAL_TRACK_RECAPTURE="112",e.PLAY_TRACK_START="151",e.PLAYER_STATE_CHANGED="152",e.VIDEO_LOADED_DATA="153",e.AUTOPLAY_DIALOG_CLICK_CONFIRM="154",e.SIGNAL_CONNECTION_STATE_CHANGED="201",e.PEER_CONNECTION_STATE_CHANGED="202",e.SINGLE_CONNECTION_STAT="203",e.SPC_RECONNECTED="204",e.HEARTBEAT_REPORT="251",e.RECEIVED_PUBLISHED_USER_LIST="252",e.REMOTE_PUBLISH_STATE_CHANGED="253",e.AUDIO_LEVEL_INTERVAL="260",e.NETWORK_QUALITY="261",e.VIDEO_CODEC_IMPLEMENTATION_CHANGED="262",e.QUALITY_LIMITATION_CHANGED="263",e.LOG="264",e))(WN||{}),GN=new class{constructor(){this._roomIdMap=new Map,"undefined"==typeof registerProcessor&&(this._configs={sdkAppId:"",userId:"",version:cb,env:kb.QCLOUD,browserVersion:SN.name+SN.version,ua:navigator.userAgent})}setConfig(e){let{sdkAppId:t,env:i,userId:r,roomId:n}=e;t!==this._configs.sdkAppId&&(this._configs.sdkAppId=String(t)),this._configs.env=i,this._configs.userId=r,this._roomIdMap.set(r,String(n))}logSuccessEvent(e){vN||!sO.isAbleToUpload||this._configs.env===kb.QCLOUD&&this.uploadEventToKibana(MC(PC({},e),{result:"success"}))}logFailedEvent(e){if(vN||!sO.isAbleToUpload)return;let{eventType:t,code:i,error:r,userId:n}=e,o={roomId:this._roomIdMap.get(n||this._configs.userId),userId:n,eventType:t,result:"failed",code:i||(null==r?void 0:r.extraCode)||(null==r?void 0:r.code)||ZC.UNKNOWN};this._configs.env===kb.QCLOUD&&this.uploadEventToKibana(MC(PC({},o),{error:r}))}uploadEventToKibana(e){let t="stat-".concat(e.eventType,"-").concat(e.result);("delta-join"===e.eventType||"delta-leave"===e.eventType||"delta-publish"===e.eventType)&&(t="".concat(e.eventType,":").concat(e.delta)),this.uploadEvent({log:t,userId:e.userId}),"failed"===e.result&&(t="stat-".concat(e.eventType,"-").concat(e.result,"-").concat(e.code),this.uploadEvent({log:t,userId:e.userId,error:e.error}))}uploadEvent(e){let{log:t,userId:i,error:r}=e,n={timestamp:nb(),sdkAppId:this._configs.sdkAppId,userId:i||this._configs.userId,version:cb,log:t};r&&(n.errorInfo=r.message,r.stack&&(n.errorInfo+="\n".concat(r.stack))),this.sendRequest(nw(this._configs.sdkAppId,bb.LOG),n)}sendRequest(e,t){sO.isAbleToUpload?Gk({url:e,body:JSON.stringify(t)}).catch((()=>{})):setTimeout((()=>{this.sendRequest(e,t)}),1e3)}},JN=null,KN=!0;function zN(e){Aw(e)&&e!==KN&&(KN=e,sO.info("setIsNeedToSchedule ".concat(e)))}function qN(e){return HC(this,arguments,(function(e){let{userId:t,sdkAppId:i,useStringRoomId:r,roomId:n,userSig:o,version:s,frameWorkType:a,role:c,latencyLevel:l}=e;return function*(){if(!KN&&JN)return{isCached:!0,result:JN};let e={delta:0,count:[1,1],msg:[],detail:[]};try{let d=new FormData;d.append("userId",String(t)),d.append("sdkAppId",String(i)),d.append("isStrGroupId",String(r)),d.append("groupId",String(n)),d.append("sdkVersion",s),d.append("userSig",String(o)),c&&d.append("role",String(c)),l&&d.append("latencyLevel",String(l)),a&&d.append("frameWorkType",String(a));let u=Lw(),h=yield function(e,t,i){return new Promise(((r,n)=>{let o=null;Mw([tw((e=>t.count[0]=e+1),(e=>{let{error:r,retry:n,retriedCount:s,retryFuncArgs:a}=e;t.msg[0]=r.message,o||(s>=2&&(a[0]=XN(i,Ub.MAIN,!0)),n())}))(XN(i,Ub.MAIN),e,{get timeout(){return 1e3*Tw(2+t.count[0])}}),tw((e=>t.count[1]=e+1),(e=>{let{error:r,retry:n,retriedCount:s,retryFuncArgs:a}=e;t.msg[1]=r.message,o||(s>=2&&(a[0]=XN(i,Ub.BACKUP,!0)),n())}))(XN(i,Ub.BACKUP),e,{get timeout(){return 1e3*Tw(2+t.count[1])}})]).then((e=>{o=e,r(o)})).catch(n)}))}(d,e,i);h.config&&(h.config.loggerDomain&&gb(h.config.loggerDomain),Aw(h.config.scheduleCache)&&zN(!h.config.scheduleCache)),e.delta=Lw()-u;let p=function(e,t,i){let r={totalCost:0,local:0,dns:0,tcp:0,tls:0,request:0,response:0};try{let n=performance.getEntriesByType("resource"),o=XN(e,Ub.MAIN),s=XN(e,Ub.BACKUP);for(let e of n)if(e.startTime>=i&&(e.name===o||e.name===s)&&e.transferSize>0){let i=e.name===o?Ub.MAIN:Ub.BACKUP,n=Math.round(e.duration),s=Math.round(e.domainLookupStart-e.startTime),a=e.redirectStart>0?Math.round(e.redirectEnd-e.redirectStart):0,c=e.fetchStart>0?Math.round(e.domainLookupStart-e.fetchStart):0,l=Math.round(e.domainLookupEnd-e.domainLookupStart),d=Math.round(e.requestStart-e.secureConnectionStart),u=Math.round(e.secureConnectionStart-e.connectStart),h=Math.round(e.responseStart-e.requestStart),p=Math.round(e.responseEnd-e.responseStart),m=[l,d,u,h,p];GN.uploadEvent({log:"stat-schedule-net:".concat(n,"(").concat(s,"(").concat(a,"->").concat(c,")->").concat(m.join("->"),") ").concat(i),userId:t}),r=MC(PC({},r),{totalCost:n,local:s,dns:l,tcp:u,tls:d,request:h,response:p});break}}catch(o){sO.error("getScheduleDetailCost error",o)}return r}(Number(i),t,u);return JN=h,{isCached:!1,result:h,detailCost:p}}catch(d){let e=bw(d)?d[0]:d,t=Rw(e.code)?e.code:0,i="schedule failed".concat(e.message?": ".concat(e.message):""),r=new tb({code:ZC.SCHEDULE_FAILED,extraCode:t,message:xN({key:zk.JOIN_ROOM_FAILED,data:{error:i,code:t}})});throw sO.error(i,t),r}}()}))}document&&document.head.insertAdjacentHTML("beforeend",Object.values(bk).map((e=>'<link rel="dns-prefetch" href="https://'.concat(e,'">'))).join("\r\n")),jN.on("28",(()=>zN(!0))),jN.on("63",(()=>zN(!0))),jN.on("84",(()=>zN(!0))),jN.on("201",(e=>{"RECONNECTING"===e.state&&zN(!0)})),jN.on("202",(e=>{"RECONNECTING"===e.state&&zN(!0)}));var YN={main:"",backup:""};function QN(e){bw(e)?(YN.main=e[0],YN.backup=e[1]):YN.main=e}function XN(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ub.MAIN,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return"https://".concat(YN[t]||ZN(e,t,i),"/api/v1/config")}function $N(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ub.MAIN;return"https://".concat(YN[t]||ZN(e,t),"/api/v1/trtcAutoConf")}function ZN(e){let t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ub.MAIN,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return rw(e)?i===Ub.MAIN?bk.MAIN_OVERSEA:bk.BACKUP_OVERSEA:(t=rw(e)?r?i===Ub.MAIN?bk.MAIN_OVERSEA_OLD:bk.BACKUP_OVERSEA_OLD:i===Ub.MAIN?bk.MAIN_OVERSEA:bk.BACKUP_OVERSEA:i===Ub.MAIN?bk.MAIN:bk.BACKUP,t)}function ew(e,t,i){return new Promise(((r,n)=>{Gk({url:e,body:t,timeout:i.timeout}).then((e=>{0===e.data.code?r(e.data.data):n({code:e.data.code,message:e.data.msg})})).catch(n)}))}var tw=(e,t)=>HN({retryFunction:ew,settings:{retries:3,timeout:0},onError:t,onRetrying:e});var iw=function(){return new URLSearchParams(location.search).get("trtc_env")||""},rw=e=>Number(e)<14e8,nw=function(e,t){let i;i=fb||(rw(e)?Ab:Rb);let r=Math.floor(Math.random()*wC(2,31));return"".concat(i,"/v5/AVQualityReportSvc/C2S?random=").concat(r,"&sdkappid=").concat(e,"&cmdtype=").concat(t)},ow="unknown";function sw(){if("unknown"!==ow)return ow;let{userAgent:e,connection:t}=navigator,i=(e.match(/NetType\/\S+/)||[])[0]||"";i=i.toLowerCase().replace("nettype/",""),"3gnet"===i&&(i="3g");let r=t&&t.type&&t.type.toLowerCase(),n=t&&t.effectiveType&&t.effectiveType.toLowerCase();return"slow-2"===n&&(n="2g"),r&&(ow=aw(r,n)),ow}function aw(e,t){if(Ob[e])return e;switch(e){case"cellular":case"wimax":return t||"unknown";case"ethernet":return"wired";default:return"unknown"}}function cw(e){ow=aw(e)}function lw(){return Ob[sw()]}function dw(e,t){for(let i of Reflect.ownKeys(t))if("constructor"!==i&&"prototype"!==i&&"name"!==i){let r=Object.getOwnPropertyDescriptor(t,i)||"";Object.defineProperty(e,i,r)}return e}function uw(e){return hw(e/4,arguments.length>1&&void 0!==arguments[1]?arguments[1]:48e3)}function hw(e){return 1e3*e/(arguments.length>1&&void 0!==arguments[1]?arguments[1]:48e3)}function pw(e){return 4*mw(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:48e3)}function mw(e){return e*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:48e3)/1e3}var _w="undefined"!=typeof window&&"function"==typeof window.glog?window.glog:()=>{},fw=()=>{let e=navigator.language;return e=e.substring(0,2),"zh"===e},gw=function(e){if(!e||"object"!=typeof e||"[object Object]"!=Object.prototype.toString.call(e))return!1;let t=Object.getPrototypeOf(e);if(null===t)return!0;let i=Object.prototype.hasOwnProperty.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&Function.prototype.toString.call(i)===Function.prototype.toString.call(Object)};function Tw(e){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return e<=1?t:Tw(e-1,t,(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1)+t)}function Ew(e){return e>8?3e4:1e3*Tw(e)}function vw(e){return Reflect.apply(Object.prototype.toString,e,[]).replace(/^\[object\s(\w+)\]$/,"$1").toLowerCase()}var yw=e=>"function"==typeof e,Sw=e=>void 0===e,Iw=e=>"string"==typeof e,Rw=e=>"number"==typeof e,Aw=e=>"boolean"==typeof e,Cw=e=>"object"===vw(e),bw=e=>"array"===vw(e),kw=e=>vw(e)==="MediaStreamTrack".toLowerCase(),Dw=e=>e.isRemote,Nw=e=>"promise"===vw(e),ww=e=>yw(e)&&e.prototype.constructor===e,Ow=e=>ww(e)?e.prototype.constructor.name:"",Pw="undefined"!=typeof AudioWorkletNode;function Mw(e){return new Promise(((t,i)=>{let r=[];e.forEach((n=>{n.then(t).catch((t=>{r.push(t),r.length===e.length&&i(r)}))}))}))}function Lw(){return performance&&performance.now?Math.floor(performance.now()):Date.now()}var xw=e=>+e<10?"0".concat(e):e,Vw=e=>{let t=e.match(/^\d+\.\d+\.\d+/)[0];if(!t)return e;let i=t.split("."),r=xw(i[1])+xw(i[2]);return i[1]-15>0&&(i[1]="15"),i[2]-15>0&&(i[2]="15"),"".concat(i.join("."),".").concat(r)},Uw=Object.prototype.hasOwnProperty;function Fw(e){if(null==e)return!0;if("boolean"==typeof e)return!1;if("number"==typeof e)return 0===e;if("string"==typeof e||"function"==typeof e||Array.isArray(e))return 0===e.length;if(e instanceof Error)return""===e.message;if(gw(e))switch(Object.prototype.toString.call(e)){case"[object File]":case"[object Map]":case"[object Set]":return 0===e.size;case"[object Object]":for(let t in e)if(Uw.call(e,t))return!1;return!0}return!1}function Bw(e,t){return{userId:t,hasAudio:!!(e&Jb),hasVideo:!!(e&jb),hasAuxiliary:!!(e&Gb),hasSmall:!!(e&Wb),audioMuted:!!(e&Kb),videoMuted:!!(e&zb),audioAvailable:!(!(e&Jb)||e&Kb),videoAvailable:!(!(e&jb)||e&zb)}}function Hw(e){let t={urls:e.url.startsWith("turn:")||e.url.startsWith("turns:")?e.url:"turn:".concat(e.url)};return!Sw(e.username)&&!Sw(e.credential)&&(t.username=e.username,t.credential=e.credential,t.credentialType="password",Sw(e.credentialType)||(t.credentialType=e.credentialType)),t}function jw(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!Iw(e))return 0;let i=e.split(".");return t?(Number(i[0])<<24|Number(i[1])<<16|Number(i[2])<<8|Number(i[3]))>>>0:(Number(i[3])<<24|Number(i[2])<<16|Number(i[1])<<8|Number(i[0]))>>>0}var Ww=function(e,t,i,r){if(!Cw(e)||!Cw(t))return 0;let n,o=0,s=Object.keys(t);for(let a=0,c=s.length;a<c;a++)if(n=s[a],!(Sw(t[n])||i&&i.includes(n)))if(Cw(e[n])&&Cw(t[n]))o+=Ww(e[n],t[n],i,r);else{if(r&&r.includes(t[n]))continue;e[n]!==t[n]&&(e[n]=Gw(t[n]),o+=1)}return o};function Gw(e){if(bw(e)){let t=[];return e.forEach(((e,i)=>{t[i]=Gw(e)})),t}if(Cw(e)){let t={};return Object.keys(e).forEach((i=>{t[i]=Gw(e[i])})),t}return e}var Jw=e=>{let t=[];if(bw(e))t=[...e];else if(Iw(e)){let i=document.getElementById(e);i&&t.push(i)}else e&&t.push(e);return t},Kw=e=>Iw(e)?document.getElementById(e):e,zw=()=>(e=>{let t=e=>e<10?"0".concat(e):"".concat(e),i=e.getFullYear(),r=e.getMonth()+1,n=e.getDate(),o=t(e.getHours()),s=t(e.getMinutes()),a=t(e.getSeconds());return"".concat(i,"/").concat(r,"/").concat(n," ").concat(o,":").concat(s,":").concat(a)})(new Date);function qw(e,t){let{keysToInclude:i,keysToExclude:r}=t;try{if(bw(e))return"[".concat(e.map((e=>qw(e,{keysToInclude:i,keysToExclude:r}))).join(","),"]");if(!gw(e)||!bw(i)&&!bw(r))return JSON.stringify(e);let t={},n=new Set(i),o=new Set(r);return Object.keys(e).forEach((s=>{(0===o.size&&n.has(s)||0===n.size&&!o.has(s))&&(t[s]=gw(e[s])||bw(e[s])?JSON.parse(qw(e[s],{keysToExclude:r,keysToInclude:i})):e[s])})),JSON.stringify(t)}catch(hk){return"{}"}}function Yw(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=[];return Object.keys(e).forEach((r=>{t===e[r]&&i.push(r)})),qw(e,{keysToInclude:i})}function Qw(e){return e.replace(/[\u4e00-\u9fa5]/g,"aa").length}var Xw=()=>{var e,t,i,r;return null!=(e=window.screen)&&e.orientation?!(null==(r=null==(i=null==(t=window.screen)?void 0:t.orientation)?void 0:i.type)||!r.includes("portrait")):0===window.orientation||180===window.orientation},$w=e=>HC(void 0,null,(function*(){return new Promise(((t,i)=>{let r;if(Iw(e))r=new Image,r.crossOrigin="anonymous",r.src=e;else if(r=e,r.complete)return void t(r);r.onload=()=>t(r),r.onerror=()=>{i(new tb({code:ZC.INVALID_PARAMETER,message:"load image failed, url: ".concat(e)}))}}))})),Zw=e=>{let t=e.split(".");return+t[0]<<24|+t[1]<<16|+t[2]<<8|+t[3]},eO=e=>(Object.keys(e).forEach((t=>{Rw(e[t])&&(t.startsWith("uint")||t.startsWith("int"))?e[t]=Math.floor(e[t]):(gw(e[t])||bw(e[t]))&&eO(e[t])})),e);function tO(e,t){return new Promise((i=>{let r=setTimeout(i,e);t&&t(r)}))}var iO=(e,t)=>{let i=null;return function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return i||(i=e.apply(t||this,n),i.finally((()=>i=null)),i)}},rO=class{constructor(e){FC(this,"userId"),FC(this,"remoteUserId"),FC(this,"id"),FC(this,"sdkAppId"),FC(this,"type"),FC(this,"isLocal"),this.id=e.id,this.userId=e.userId,this.sdkAppId=e.sdkAppId,this.remoteUserId=e.remoteUserId,this.isLocal="boolean"!=typeof e.isLocal||e.isLocal,this.type=this.isLocal?"":e.type}createChild(e){return Object.setPrototypeOf(e,this)}setUserId(e){this.userId=e}setSdkAppId(e){this.sdkAppId=e}log(e,t){let i=this.isLocal?this.userId:this.remoteUserId;t.unshift("[".concat(this.isLocal?"↑":"↓").concat(this.type&&"main"!==this.type?"*":"").concat(this.id).concat(i?"|".concat(i):"","]")),sO.log(e,t,FN(this.userId)||BN(this.userId),this.userId,this.sdkAppId)}info(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this.log(2,t)}debug(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this.log(1,t)}warn(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this.log(3,t)}error(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this.log(4,t)}},nO=WN,oO=!(sD||aD||cN),sO=new class{constructor(){FC(this,"_isEnableUploadLog",!0),FC(this,"_localJoinedUser",new Map),FC(this,"_queue",[]),FC(this,"_timeoutId",-1),FC(this,"_logLevel",1),FC(this,"_logLevelToUpload",2),!pb&&!mb&&(this.checkURLParam(),this.installEvents())}get isAbleToUpload(){return this._isEnableUploadLog&&-1!==this._timeoutId}installEvents(){jN.on(nO.JOIN_SCHEDULE_SUCCESS,(e=>{let{schedule:t}=e;var i;(null==(i=null==t?void 0:t.config)?void 0:i.logLevelToUpload)&&Db[t.config.logLevelToUpload]&&(this._logLevelToUpload=t.config.logLevelToUpload)})),jN.on(nO.JOIN_SUCCESS,(e=>{let{room:t}=e;this.addJoinedUser({userId:t.userId,sdkAppId:t.sdkAppId}),this.startUpload()})),jN.once(nO.JOIN_FAILED,(()=>{this.startUpload()})),jN.on(nO.LEAVE_SUCCESS,(e=>{let{room:t}=e;this.deleteJoinedUser(t.userId)}))}startUpload(){-1===this._timeoutId&&this.uploadInterval()}addJoinedUser(e){this._localJoinedUser.set(e.userId,e),this.startUpload()}deleteJoinedUser(e){this._localJoinedUser.delete(e)}uploadInterval(){this.upload().catch((()=>{})),this._timeoutId=window.setTimeout((()=>this.uploadInterval()),2e3)}getLogsToUpload(){let e={map:new Map,splicedQueue:[]};if(this._queue[0].forAllJoinedClients&&0===this._localJoinedUser.size)return e;let t=0;for(;t<this._queue.length&&50!==t;t++){let i=this._queue[t];if(i.forAllJoinedClients)this._localJoinedUser.forEach((t=>{let{userId:r,sdkAppId:n}=t;e.map.has(r)?e.map.get(r).logs.push(i):e.map.set(r,{userId:r,sdkAppId:n,logs:[i]})}));else if(Iw(i.userId)&&Rw(i.sdkAppId)){let{userId:t,sdkAppId:r}=i;e.map.has(t)?e.map.get(t).logs.push(i):e.map.set(t,{userId:t,sdkAppId:r,logs:[i]})}}return e.map.size>0&&(e.splicedQueue=this._queue.splice(0,t)),e}upload(){return HC(this,null,(function*(){if(0===this._queue.length||!this._isEnableUploadLog)return;let{map:e,splicedQueue:t}=this.getLogsToUpload();if(0===e.size)return;try{let t=[...e.values()];for(let e=0;e<t.length;e++){let{userId:i,sdkAppId:r,logs:n}=t[e];yield this.uploadLogWithRetry(JSON.stringify({timestamp:nb(),sdkAppId:String(r),userId:i,version:cb,log:n.map((e=>e.log)).join("\n")}),r),n.forEach((e=>e.uploaded=!0))}}catch(ub){}let i=t.filter((e=>!e.uploaded));i.length>0&&(this._queue=i.concat(this._queue))}))}uploadLogWithRetry(e,t){return HN({retryFunction:()=>Gk({url:nw(t,bb.LOG),body:e,timeout:5e3}),settings:{retries:3,timeout:1e3},onError:e=>{let{retry:t}=e;t()}})()}getPrefix(e){let t=new Date;t.setTime(rb());let i=String(t.getMilliseconds());return"padStart"in String.prototype&&(i=i.toString().padStart(3,"0")),"[".concat(t.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/,"$1"),":").concat(i,"] <").concat(Db[e],">")}getLogLevel(){return this._logLevel}setLogLevel(e){Sw(Db[e])||(this._logLevel!==e&&this.info("setLogLevel",e),this._logLevel=e)}enableUploadLog(){this._isEnableUploadLog=!0}disableUploadLog(){this.warn("disableUploadLog"),this._isEnableUploadLog=!1}logChunkToString(e){if(Iw(e))return e;try{return e instanceof Error?e.toString():JSON.stringify(e)}catch(db){return""}}log(e,t){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3?arguments[3]:void 0,n=arguments.length>4?arguments[4]:void 0;var o;t.unshift(this.getPrefix(e));let s={log:t.reduce(((e,t)=>"".concat(e," ").concat(this.logChunkToString(t)).trim()),""),level:e,userId:r,sdkAppId:n,forAllJoinedClients:i};if(jN.emit(nO.LOG,{log:s}),this._isEnableUploadLog&&e>=this._logLevelToUpload&&this._queue.push(s),e<this._logLevel)return;let a=(null==(o=Db[e])?void 0:o.toLowerCase())||"info";oO?console[a]("%cTRTC%c%s","padding: 1px 4px;border-radius: 3px;color: #fff;background: #1E88E5;","display: inline",...t):console[a](...t)}debug(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this.log(1,t)}info(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this.log(2,t)}warn(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this.log(3,t)}error(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this.log(4,t)}createLogger(e){return new rO(e)}checkURLParam(){let e=new URLSearchParams(location.search).get("logLevelToUpload"),t=e?Number(e):-1;Db[t]&&(this._logLevelToUpload=t)}getQueue(){return this._queue}},aO=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))},cO=new class{constructor(){FC(this,"_prefix","TRTC"),FC(this,"_queue",new Map),this.checkStorage()}getRealKey(e){return"".concat(this._prefix,"_").concat(e)}checkStorage(){yN()&&(setInterval(this.doFlush.bind(this),2e4),Object.keys(localStorage).filter((e=>{if(e.startsWith(this._prefix)){let t=localStorage.getItem(e);if(!t)return!1;let i=JSON.parse(t);if(i&&i.expiresIn<Date.now())return!0}return!1})).forEach((e=>localStorage.removeItem(e))))}doFlush(){if(yN())try{for(let[e,t]of this._queue)localStorage.setItem(e,JSON.stringify(t))}catch(hO){sO.warn(hO)}}getItem(e){if(!yN())return null;try{let t=localStorage.getItem(this.getRealKey(e));if(!t)return null;let i=JSON.parse(t);return i&&i.expiresIn>=Date.now()?i.value:null}catch(db){sO.warn(db)}}setItem(e,t){if(yN())try{let i={expiresIn:Date.now()+Pb,value:t};this._queue.set(this.getRealKey(e),i)}catch(hk){sO.warn(hk)}}deleteItem(e){if(!yN())return!1;try{return e=this.getRealKey(e),this._queue.delete(e),localStorage.removeItem(e),!0}catch(db){return sO.warn(db),!1}}clear(){if(yN())try{localStorage.clear()}catch(hO){sO.warn(hO)}}},lO={};xC(lO,{HTTPS_API:()=>FO,IS_GET_CAPABILITIES_SUPPORTED:()=>nP,IS_GET_SETTINGS_SUPPORTED:()=>rP,IS_GET_SYNCHRONIZATION_SOURCES_SUPPORTED:()=>iP,IS_INSERTABLE_STREAM_SUPPORTED:()=>oP,IS_RTC_RTP_SENDER_SUPPORTED:()=>ZO,IS_SCRIPT_TRANSFORM_SUPPORTED:()=>sP,IS_SEI_SUPPORTED:()=>aP,IS_SPC_SUPPORTED:()=>XO,basis:()=>pP,checkSystemRequirementsInternal:()=>LO,decodeSupportStatus:()=>MO,encodeSupportStatus:()=>PO,getBrowserInfo:()=>CO,getDisplayResolution:()=>HO,isAddTransceiverSupported:()=>QO,isBrowserSupported:()=>bO,isGetReceiversSupported:()=>zO,isGetSendersSupported:()=>qO,isGetTransceiversSupported:()=>YO,isGetUserMediaSupported:()=>jO,isMediaDevicesSupported:()=>DO,isMediaSessionSupported:()=>dP,isMediaStreamTrackProcessorSupported:()=>OO,isReplaceTrackSupported:()=>eP,isRequestVideoFrameCallbackSupported:()=>_P,isSIMDSupported:()=>hP,isScreenCaptureApiAvailable:()=>VO,isSelectedCandidatePair:()=>BO,isSetParametersSupported:()=>tP,isSmallStreamAPISupported:()=>GO,isSmallStreamSupported:()=>JO,isStopTransceiverSupported:()=>$O,isTRTCSupported:()=>xO,isUnifiedPlanDefault:()=>KO,isUsedInHttpProtocol:()=>wO,isWebAudioSupported:()=>WO,isWebCodecSupported:()=>lP,isWebCodecsSupported:()=>kO,isWebRTCSupported:()=>cP,isWebTransportSupported:()=>uP});var dO,uO,hO,pO=VC(KC(),1),mO=class{constructor(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.countMap=new Map,this.distributionMap=new Map,this.log=sO.createLogger({id:"kv"}),e&&(jN.on("102",(e=>{let{track:t,cost:i}=e;this.addSuccessEvent({key:t.kind===Ub.AUDIO?EO.START_MICROPHONE:vO.START_CAMERA,cost:i})})),jN.on("103",(e=>{let{track:t,error:i}=e;this.addFailedEvent({key:t.kind===Ub.AUDIO?EO.START_MICROPHONE:vO.START_CAMERA,error:i})})))}getReportData(){let e={msg_sdk_basic_info:{uint32_sdk_version:Zw(this.version||cb),uint32_terminal_type:15,bytes_device_name:"",bytes_os_version:"",uint32_framework:30,uint32_network_type:0},stats_count:[...this.countMap.entries()].map((e=>{let[t,i]=e;return{uint32_key:t,uint32_count:i}})),stats_distribution:[...this.distributionMap.entries()].map((e=>{let[t,i]=e;return{uint32_key:t,distribution_items:[...i.entries()].map((e=>{let[t,i]=e;return{uint32_item_key:t,uint32_item_value:i}}))}}))};return this.countMap.clear(),this.distributionMap.clear(),e}clear(){this.countMap.clear(),this.distributionMap.clear()}isEnumKey(e){let t=+String(e).slice(-3);return t>=700&&t<799}isErrorCodeKey(e){let t=+String(e).slice(-3);return t>=600&&t<699}isCountKey(e){let t=+String(e).slice(-3);return t>=0&&t<599}isNumberKey(e){let t=+String(e).slice(-3);return t>=800&&t<899}addCount(e){let{key:t,useUV:i=!1}=e;this.isCountKey(t)?i&&this.countMap.has(t)||this.countMap.set(t,(this.countMap.get(t)||0)+1):this.log.debug("".concat(t," is not count key, last 3 number should be 0~599"))}addEnum(e){let{key:t,value:i,useUV:r=!0}=e;var n;if(!this.isEnumKey(t))return this.log.debug("".concat(t," is not enum key, last 3 number should be 700~799"));if(r&&this.countMap.has(t))return;this.countMap.set(t,(this.countMap.get(t)||0)+1);let o=(null==(n=this.distributionMap)?void 0:n.get(t))||new Map;o.set(i,(o.get(i)||0)+1),this.distributionMap.set(t,o)}addNumber(e){let{key:t,value:i,split:r=100,useUV:n=!1}=e;var o;if(!this.isNumberKey(t))return this.log.debug("".concat(t," is not number key, last 3 number should be 800~899"));if(n&&this.countMap.has(t))return;this.countMap.set(t,(this.countMap.get(t)||0)+1);let s=(null==(o=this.distributionMap)?void 0:o.get(t))||new Map,a=0;if(Rw(r))a=Math.floor(i/r);else for(let c=r.length-1;c>0;c--)if(i>r[c]){a=c;break}s.set(a,(s.get(a)||0)+1),this.distributionMap.set(t,s)}addSuccessEvent(e){let{key:t,cost:i,timeKey:r,split:n}=e;if(t&&(this.addEnum({key:t,value:1,useUV:!1}),i)){let e=+String(t).slice(-3);e<800&&e>=700?this.addNumber({key:r||t+100,value:i,split:n}):r||this.log.debug("time stat ignored, ".concat(t))}}addFailedEvent(e){let{key:t,error:i}=e;if(!t)return;let r=ZC.UNKNOWN;i&&(Rw(i)?r=i:(!Sw(i.extraCode)||!Sw(i.code))&&(r=i.extraCode||i.code)),this.addEnum({key:t,value:0,useUV:!1}),this.addEnum({key:t,value:r,useUV:!1})}},_O=((uO=_O||{})[uO.enterRoom=500700]="enterRoom",uO[uO.exitRoom=500701]="exitRoom",uO[uO.switchRole=500702]="switchRole",uO[uO.destroy=500703]="destroy",uO[uO.startLocalAudio=500704]="startLocalAudio",uO[uO.updateLocalAudio=500705]="updateLocalAudio",uO[uO.stopLocalAudio=500706]="stopLocalAudio",uO[uO.startLocalVideo=500707]="startLocalVideo",uO[uO.updateLocalVideo=500708]="updateLocalVideo",uO[uO.stopLocalVideo=500709]="stopLocalVideo",uO[uO.startScreenShare=500710]="startScreenShare",uO[uO.updateScreenShare=500711]="updateScreenShare",uO[uO.stopScreenShare=500712]="stopScreenShare",uO[uO.startRemoteVideo=500713]="startRemoteVideo",uO[uO.updateRemoteVideo=500714]="updateRemoteVideo",uO[uO.stopRemoteVideo=500715]="stopRemoteVideo",uO[uO.muteRemoteAudio=500716]="muteRemoteAudio",uO[uO.setRemoteAudioVolume=500717]="setRemoteAudioVolume",uO[uO.use=500718]="use",uO[uO.sendSEIMessage=5e5]="sendSEIMessage",uO[uO.sendCustomMessage=500001]="sendCustomMessage",uO),fO=((dO=fO||{})[dO.AudioMixer=550700]="AudioMixer",dO[dO.AIDenoiser=551700]="AIDenoiser",dO[dO.VirtualBackground=570700]="VirtualBackground",dO[dO.Beauty=571700]="Beauty",dO[dO.Watermark=572700]="Watermark",dO[dO.BasicBeauty=574700]="BasicBeauty",dO[dO.CDNStreaming=590700]="CDNStreaming",dO[dO.DeviceDetector=591700]="DeviceDetector",dO[dO.Debug=592700]="Debug",dO),gO=(e=>(e[e.AudioMixer=550701]="AudioMixer",e[e.AIDenoiser=551701]="AIDenoiser",e[e.VirtualBackground=570701]="VirtualBackground",e[e.Beauty=571701]="Beauty",e[e.Watermark=572701]="Watermark",e[e.BasicBeauty=574701]="BasicBeauty",e[e.CDNStreaming=590701]="CDNStreaming",e[e.DeviceDetector=591701]="DeviceDetector",e[e.Debug=592701]="Debug",e))(gO||{}),TO=(e=>(e[e.AudioMixer=550702]="AudioMixer",e[e.AIDenoiser=551702]="AIDenoiser",e[e.VirtualBackground=570702]="VirtualBackground",e[e.Beauty=571702]="Beauty",e[e.Watermark=572702]="Watermark",e[e.BasicBeauty=574702]="BasicBeauty",e[e.CDNStreaming=590702]="CDNStreaming",e[e.DeviceDetector=591702]="DeviceDetector",e[e.Debug=592702]="Debug",e))(TO||{}),EO=(e=>(e[e.START_MICROPHONE=501700]="START_MICROPHONE",e[e.MICROPHONE_CAHNNELS=501701]="MICROPHONE_CAHNNELS",e[e.MICROPHONE_SAMPLERATE=501702]="MICROPHONE_SAMPLERATE",e))(EO||{}),vO=((hO=vO||{})[hO.START_CAMERA=511700]="START_CAMERA",hO),yO=new mO(!0),SO=new mO(!1),IO=yO,RO={result:!1,detail:{isBrowserSupported:!1,isWebRTCSupported:!1,isWebCodecsSupported:!1,isMediaDevicesSupported:!1,isScreenShareSupported:!1,isSmallStreamSupported:!1,isH264EncodeSupported:!1,isVp8EncodeSupported:!1,isH264DecodeSupported:!1,isVp8DecodeSupported:!1}},AO=new Map([[uD,["Firefox",hD]],[fD,["Edg",gD]],[aN,["Chrome",dN]],[uN,["Safari",pN]],[ID,["TBS",RD]],[AD,["XWEB",CD]],[ND&&nD,["WeChat",wD]],[LD,["QQ(Win)",xD]],[PD,["QQ(Mobile)",MD]],[OD,["QQ(Mobile X5)",MD]],[VD,["QQ(Mac)",UD]],[FD,["QQ(iPad)",BD]],[qD,["MI",YD]],[QD,["HW",$D]],[ZD,["Samsung",eN]],[tN,["OPPO",iN]],[rN,["VIVO",nN]],[mD,["EDGE",_D]],[ED,["SogouMobile",vD]],[yD,["Sogou",SD]]]);function CO(){let e=AO.get(!0);return{browserName:e?e[0]:"unknown",browserVersion:e?e[1]:"unknown"}}var bO=function(){return!(KD||mD||fD&&TD<80||uD&&pD<56)},kO=function(){return["VideoDecoder","VideoEncoder","AudioEncoder","AudioDecoder","MediaStreamTrackGenerator"].every((e=>e in window))},DO=function(){if(!navigator.mediaDevices)return wO()||sO.error(qk.NOT_SUPPORTED_MEDIA),!1;let e=["getUserMedia","enumerateDevices"];return e.filter((e=>e in navigator.mediaDevices)).length===e.length},NO=!1;function wO(){return"http:"===location.protocol&&!vN&&(NO||sO.error(xN({key:zk.NOT_SUPPORTED_HTTP})),NO=!0,!0)}var OO=function(){return(null==window?void 0:window.OffscreenCanvas)&&(null==window?void 0:window.MediaStreamTrackProcessor)&&(null==window?void 0:window.MediaStreamTrackGenerator)},PO=function(){return HC(this,null,(function*(){if(RO.detail.isH264EncodeSupported&&RO.detail.isVp8EncodeSupported)return{isH264EncodeSupported:RO.detail.isH264EncodeSupported,isVp8EncodeSupported:RO.detail.isVp8EncodeSupported};let e,t=!1,i=!1;try{let r=new RTCPeerConnection,n=document.createElement(Ub.CANVAS);n.getContext("2d");let o=n.captureStream(0);return r.addTrack(o.getVideoTracks()[0],o),e=yield r.createOffer(),-1!==e.sdp.toLowerCase().indexOf("h264")&&(t=!0),-1!==e.sdp.toLowerCase().indexOf("vp8")&&(i=!0),r.close(),RO.detail.isH264EncodeSupported=t,RO.detail.isVp8EncodeSupported=i,{isH264EncodeSupported:RO.detail.isH264EncodeSupported,isVp8EncodeSupported:RO.detail.isVp8EncodeSupported}}catch(hk){return{isH264EncodeSupported:!1,isVp8EncodeSupported:!1}}}))},MO=function(){return HC(this,null,(function*(){if(RO.detail.isH264DecodeSupported&&RO.detail.isVp8DecodeSupported)return{isH264DecodeSupported:RO.detail.isH264DecodeSupported,isVp8DecodeSupported:RO.detail.isVp8DecodeSupported};let e,t=!1,i=!1;try{let r=new RTCPeerConnection;return e=yield r.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0}),-1!==e.sdp.toLowerCase().indexOf("h264")&&(t=!0),-1!==e.sdp.toLowerCase().indexOf("vp8")&&(i=!0),r.close(),{isH264DecodeSupported:t,isVp8DecodeSupported:i}}catch(hk){return{isH264DecodeSupported:!1,isVp8DecodeSupported:!1}}}))},LO=iO((()=>HC(void 0,null,(function*(){if(RO.result&&RO.detail.isH264EncodeSupported&&RO.detail.isVp8EncodeSupported&&RO.detail.isH264DecodeSupported&&RO.detail.isVp8DecodeSupported)return RO;let e=Date.now(),t=bO(),i=cP(),r=kO(),n=DO(),{isH264EncodeSupported:o,isVp8EncodeSupported:s}=yield PO(),{isH264DecodeSupported:a,isVp8DecodeSupported:c}=yield MO();if(!o||!s){let e=yield PO();sO.warn("detect encode again h264:".concat(o," vp8:").concat(s," result: ").concat(JSON.stringify(e))),o=e.isH264EncodeSupported,s=e.isVp8EncodeSupported}if(o&&a&&(tN||rN||mN)&&!ID&&oN()<79){let{encode:e,decode:t}=yield function(){return HC(this,null,(function*(){return UO||(UO=new Promise((e=>HC(this,null,(function*(){let t={encode:!1,decode:!1},i=()=>{};try{sO.warn("detectH264Supported start");let r=document.createElement("canvas"),n=r.getContext("2d");r.width=320,r.height=240;let o=setInterval((()=>{n.fillText("test",Math.floor(320*Math.random()),Math.floor(240*Math.random()))}),66),s=-1,a=-1;i=()=>{clearInterval(s),clearInterval(o),clearTimeout(a),l.close(),d.close(),c.getTracks().forEach((e=>e.stop()))},a=setTimeout((()=>{i(),e(t)}),2e3);let c=r.captureStream(),l=new RTCPeerConnection({}),d=new RTCPeerConnection({offerToReceiveAudio:!0,offerToReceiveVideo:!0});l.addEventListener("icecandidate",(e=>d.addIceCandidate(e.candidate))),d.addEventListener("icecandidate",(e=>l.addIceCandidate(e.candidate))),l.addTrack(c.getVideoTracks()[0],c);let u=yield l.createOffer();yield l.setLocalDescription(u),yield d.setRemoteDescription(u);let h=yield d.createAnswer(),p=pO.default.parse(h.sdp),m=p.media[0].rtp.findIndex((e=>"H264"===e.codec));p.media[0].rtp=[p.media[0].rtp[m]],p.media[0].fmtp=p.media[0].fmtp.filter((e=>e.payload===p.media[0].rtp[0].payload)),p.media[0].rtcpFb&&(p.media[0].rtcpFb=p.media[0].rtcpFb.filter((e=>e.payload===p.media[0].rtp[0].payload))),h.sdp=pO.default.write(p),yield d.setLocalDescription(h),yield l.setRemoteDescription(h),s=setInterval((()=>HC(this,null,(function*(){t.encode&&t.decode&&(i(),e(t));let r=yield l.getSenders()[0].getStats(),n=yield d.getReceivers()[0].getStats();t.encode||r.forEach((e=>{"outbound-rtp"===e.type&&e.mediaType===Ub.VIDEO&&e.bytesSent>0&&(t.encode=!0)})),t.decode||n.forEach((e=>{"inbound-rtp"===e.type&&e.mediaType===Ub.VIDEO&&e.bytesReceived>0&&(t.decode=!0)}))}))),100)}catch(r){i(),sO.warn(r),e(t)}})))).then((e=>((!e.encode||!e.decode)&&sO.warn("detectH264Supported encode: ".concat(e.encode," decode: ").concat(e.decode," ").concat(AN)),e))),UO)}))}();o=e,a=t}return RO.result=t&&i&&n&&(o||s)&&(a||c),RO.detail.isBrowserSupported=t,RO.detail.isWebRTCSupported=i,RO.detail.isWebCodecsSupported=r,RO.detail.isMediaDevicesSupported=n,RO.detail.isScreenShareSupported=VO(),RO.detail.isSmallStreamSupported=JO(),RO.detail.isH264EncodeSupported=o,RO.detail.isVp8EncodeSupported=s,RO.detail.isH264DecodeSupported=a,RO.detail.isVp8DecodeSupported=c,RO.result||sO.error("".concat(navigator.userAgent," ").concat(Yw(RO.detail,!1))),cO.setItem(mP,{ua:navigator.userAgent,checkResult:RO}),IO.addNumber({key:523800,value:Date.now()-e}),RO})))),xO=function(){return RO.result},VO=function(){return!(!navigator.mediaDevices||!navigator.mediaDevices.getDisplayMedia)},UO=null;var FO=(e,t,i)=>{"http:"===location.protocol&&!vN&&(e[t]=()=>{throw new tb({code:ZC.INVALID_OPERATION,message:qk.NOT_SUPPORTED_HTTP})})},BO=function(e){return!("candidate-pair"!==e.type||!e.nominated||"in-progress"!==e.state&&"succeeded"!==e.state)&&!(Aw(e.selected)&&!e.selected)};function HO(){let e="";if(screen.width){let t=screen.width?screen.width*window.devicePixelRatio:"",i=screen.height?screen.height*window.devicePixelRatio:"";e+="".concat(t," * ").concat(i)}return e}function jO(){return navigator.getUserMedia||navigator.mediaDevices&&navigator.mediaDevices.getUserMedia}function WO(){let e={isSupported:!1},t=["AudioContext","webkitAudioContext","mozAudioContext","msAudioContext"];for(let i=0;i<t.length;i++)if(t[i]in window){e.isSupported=!0;break}return e.isSupported}function GO(){return"captureStream"in HTMLCanvasElement.prototype}function JO(){return!(ND||sD||lN&&lN<63)&&!(!bO()||!GO())}var KO=function(){if(Sw(window.RTCRtpTransceiver)||!("currentDirection"in RTCRtpTransceiver.prototype))return!1;let e=null,t=!1;try{e=new RTCPeerConnection({sdpSemantics:Tk}),e.addTransceiver(Ub.AUDIO),t=!0}catch(db){}return null==e||e.close(),t};function zO(){return"RTCPeerConnection"in window&&"getReceivers"in window.RTCPeerConnection.prototype}function qO(){return"RTCPeerConnection"in window&&"getSenders"in window.RTCPeerConnection.prototype}function YO(){return"RTCPeerConnection"in window&&"getTransceivers"in window.RTCPeerConnection.prototype}function QO(){return 11!==fN&&("RTCPeerConnection"in window&&"addTransceiver"in window.RTCPeerConnection.prototype)}var XO=!(!QO()||sN&&lN<86);function $O(){return"RTCRtpTransceiver"in window&&"stop"in window.RTCRtpTransceiver.prototype}var ZO="RTCRtpSender"in window;function eP(){return ZO&&"replaceTrack"in window.RTCRtpSender.prototype}function tP(){return ZO&&"setParameters"in window.RTCRtpSender.prototype&&qO()}var iP="RTCRtpReceiver"in window&&"getSynchronizationSources"in window.RTCRtpReceiver.prototype,rP=window.MediaStreamTrack&&"getSettings"in MediaStreamTrack.prototype,nP=window.MediaStreamTrack&&"getCapabilities"in MediaStreamTrack.prototype,oP=ZO&&"createEncodedStreams"in window.RTCRtpSender.prototype&&oN()>=86,sP="RTCRtpScriptTransform"in window,aP=ZO&&(oP||sP),cP=function(){return["RTCPeerConnection","webkitRTCPeerConnection","RTCIceGatherer"].filter((e=>e in window)).length>0};function lP(){let e={AudioDecoder:!1,AudioEncoder:!1,VideoDecoder:!1,VideoEncoder:!1,ImageDecoder:!1};return Sw(window.AudioDecoder)||(e.AudioDecoder=!0),Sw(window.AudioEncoder)||(e.AudioEncoder=!0),Sw(window.VideoDecoder)||(e.VideoDecoder=!0),Sw(window.VideoEncoder)||(e.VideoEncoder=!0),Sw(window.ImageDecoder)||(e.ImageDecoder=!0),e}function dP(){return"mediaSession"in navigator&&!Sw(navigator.mediaSession.setActionHandler)}function uP(){return!Sw(window.WebTransport)}function hP(){return"undefined"!=typeof WebAssembly&&WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]))}function pP(){let e={browser:"".concat(SN.name,"/").concat(SN.version),os:DN(),displayResolution:HO(),isScreenShareSupported:VO(),isWebRTCSupported:cP(),isGetUserMediaSupported:jO(),isWebAudioSupported:WO(),isWebSocketsSupported:"WebSocket"in window&&2===window.WebSocket.CLOSING,isWebCodecSupported:lP(),isMediaSessionSupported:dP(),isWebTransportSupported:uP()};return navigator.userAgent.includes("miniProgram")&&(e.browser="mini/".concat(e.browser)),e}var mP="checkResult";function _P(){return"requestVideoFrameCallback"in HTMLVideoElement.prototype}!function(){wO();let e=cO.getItem(mP);e&&e.ua===navigator.userAgent&&(RO=e.checkResult),LO()}();var fP=VC(jC(),1),gP=Symbol("instance"),TP=Symbol("cacheResult"),EP=class{constructor(e,t,i){this.oldState=e,this.newState=t,this.action=i,this.aborted=!1}abort(e){this.aborted=!0,RP.call(e,this.oldState,new Error("action '".concat(this.action,"' aborted")))}toString(){return"".concat(this.action,"ing")}},vP=class extends Error{constructor(e,t,i){super(t),this.state=e,this.message=t,this.cause=i}};var yP=new Map;function SP(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(r,n,o)=>{let s=i.action||n;if(!i.context){let i=yP.get(r)||[];yP.has(r)||yP.set(r,i),i.push({from:e,to:t,action:s})}let a=o.value;o.value=function(){let r=this;for(var n=arguments.length,o=new Array(n),c=0;c<n;c++)o[c]=arguments[c];if(i.context&&(r=AP.get("function"==typeof i.context?i.context.call(this,...o):i.context)),r.state===t)return i.sync?r[TP]:Promise.resolve(r[TP]);r.state instanceof EP&&r.state.action==i.abortAction&&r.state.abort(r);let l=null;Array.isArray(e)?0==e.length?r.state instanceof EP&&r.state.abort(r):("string"!=typeof r.state||!e.includes(r.state))&&(l=new vP(r._state,"".concat(r.name," ").concat(s," to ").concat(t," failed: current state ").concat(r._state," not from ").concat(e.join("|")))):e!==r.state&&(l=new vP(r._state,"".concat(r.name," ").concat(s," to ").concat(t," failed: current state ").concat(r._state," not from ").concat(e)));let d=e=>{if(i.fail&&i.fail.call(this,e),i.sync){if(i.ignoreError)return e;throw e}return i.ignoreError?Promise.resolve(e):Promise.reject(e)};if(l)return d(l);let u=r.state,h=new EP(u,t,s);RP.call(r,h);let p=e=>{var n;return r[TP]=e,h.aborted||(RP.call(r,t),null===(n=i.success)||void 0===n||n.call(this,r[TP])),e},m=e=>{let t=e instanceof Error?e.message:String(e);return RP.call(r,u,e),d(new vP(r._state,"action '".concat(s,"' failed :").concat(t),e instanceof Error?e:new Error(t)))};try{let e=a.apply(this,o);return function(e){return"object"==typeof e&&e&&"then"in e}(e)?e.then(p).catch(m):i.sync?p(e):Promise.resolve(p(e))}catch(_){return m(_)}}}}var IP="undefined"!=typeof window&&window.__AFSM__?(e,t)=>{window.dispatchEvent(new CustomEvent(e,{detail:t}))}:"undefined"!=typeof importScripts?(e,t)=>{postMessage({type:e,payload:t})}:()=>{};function RP(e,t){let i=this._state;this._state=e;let r=e.toString();e&&this.emit(r,i),this.emit(AP.STATECHANGED,e,i,t),this.updateDevTools({value:e,old:i,err:t instanceof Error?t.message:String(t)})}var AP=class extends fP.default{constructor(e,t,i){super(),this.name=e,this.groupName=t,this._state=AP.INIT,e||(e=Date.now().toString(36)),i?Object.setPrototypeOf(this,i):i=Object.getPrototypeOf(this),t||(this.groupName=this.constructor.name);let r=i[gP];r?this.name=r.name+"-"+r.count++:i[gP]={name:this.name,count:0},this.updateDevTools({diagram:this.stateDiagram})}get stateDiagram(){let e=Object.getPrototypeOf(this),t=yP.get(e)||[],i=new Set,r=[],n=[],o=new Set,s=Object.getPrototypeOf(e);yP.has(s)&&(s.stateDiagram.forEach((e=>i.add(e))),s.allStates.forEach((e=>o.add(e)))),t.forEach((e=>{let{from:t,to:i,action:o}=e;"string"==typeof t?r.push({from:t,to:i,action:o}):t.length?t.forEach((e=>{r.push({from:e,to:i,action:o})})):n.push({to:i,action:o})})),r.forEach((e=>{let{from:t,to:r,action:n}=e;o.add(t),o.add(r),o.add(n+"ing"),i.add("".concat(t," --\x3e ").concat(n,"ing : ").concat(n)),i.add("".concat(n,"ing --\x3e ").concat(r," : ").concat(n," 🟢")),i.add("".concat(n,"ing --\x3e ").concat(t," : ").concat(n," 🔴"))})),n.forEach((e=>{let{to:t,action:r}=e;i.add("".concat(r,"ing --\x3e ").concat(t," : ").concat(r," 🟢")),o.forEach((e=>{e!==t&&i.add("".concat(e," --\x3e ").concat(r,"ing : ").concat(r))}))}));let a=[...i];return Object.defineProperties(e,{stateDiagram:{value:a},allStates:{value:o}}),a}static get(e){let t;return"string"==typeof e?(t=AP.instances.get(e),t||AP.instances.set(e,t=new AP(e,void 0,Object.create(AP.prototype)))):(t=AP.instances2.get(e),t||AP.instances2.set(e,t=new AP(e.constructor.name,void 0,Object.create(AP.prototype)))),t}static getState(e){var t;return null===(t=AP.get(e))||void 0===t?void 0:t.state}updateDevTools(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};IP(AP.UPDATEAFSM,Object.assign({name:this.name,group:this.groupName},e))}get state(){return this._state}set state(e){RP.call(this,e)}};AP.STATECHANGED="stateChanged",AP.UPDATEAFSM="updateAFSM",AP.INIT="[*]",AP.ON="on",AP.OFF="off",AP.instances=new Map,AP.instances2=new WeakMap;var CP=(null==window?void 0:window.requestIdleCallback)||function(e){let t=Date.now();return setTimeout((()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-t))})}),1e3)},bP=(null==window?void 0:window.cancelIdleCallback)||function(e){clearTimeout(e)},kP=(null==window?void 0:window.cancelAnimationFrame)||(null==window?void 0:window.mozCancelAnimationFrame),DP=class{static generateTaskID(){return this.currentTaskID++}static run(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Hk,t=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;i=PC(e===Bk?{delay:2e3,count:0,backgroundTask:!0}:e===Uk?{delay:1e4,count:0}:e===Fk?{fps:60,delay:16.6,count:0,backgroundTask:!0}:{delay:2e3,count:0,backgroundTask:!0},i),Cw(t)&&(i=PC(PC({},i),t)),yw(e)&&(t=e,e=Hk);let r=PC({taskID:this.generateTaskID(),loopCount:0,intervalID:null,timeoutID:null,rafID:null,ricID:null,taskName:e,callback:t},i);return this.taskMap.set(r.taskID,r),this[e](r),r.taskID}static interval(e){return e.intervalID=setInterval((()=>{e.callback(),e.loopCount+=1,this.isBreakLoop(e)}),e.delay)}static intervalInWorker(e){e.delay=(1e3/e.fps).toFixed(2);let t=new Worker(URL.createObjectURL(new Blob(["\n        let timerID = null;\n        self.onmessage = function (e) {\n          if (e.data === 'start') {\n            timerID = setInterval(() => {\n              self.postMessage('tick');\n            }, ".concat(e.delay,");\n          } else if (e.data === 'stop') {\n            clearInterval(timerID);\n          }\n        };\n      ")],{type:"application/javascript"})));t.onmessage=i=>{"tick"===i.data&&(e.callback(),e.loopCount+=1,this.isBreakLoop(e)&&t.postMessage("stop"))},e.worker=t,t.postMessage("start")}static timeout(e){let t=()=>{if(e.callback(),e.loopCount+=1,!this.isBreakLoop(e))return e.timeoutID=setTimeout(t,e.delay)};return e.timeoutID=setTimeout(t,e.delay)}static ric(e){let t,i=Lw(),r=()=>{if(t=Lw()-i,t>=e.delay&&(i=Lw()-Math.floor(t%e.delay),e.callback(),e.loopCount+=1),!this.isBreakLoop(e))return e.ricID=CP(r,{timeout:e.delay})};return e.ricID=CP(r,{timeout:e.delay})}static raf(e){e.delay=(1e3/e.fps).toFixed(2);let t,i=Lw(),r=()=>document.hidden&&e.backgroundTask?(t=Lw()-i,i=Lw(),e.callback(),e.loopCount+=1,this.isBreakLoop(e)?void 0:e.timeoutID=setTimeout(r,e.delay-Math.floor(t%e.delay))):(t=Lw()-i,t>=e.delay&&(i=Lw()-Math.floor(t%e.delay),e.callback(),e.loopCount+=1),this.isBreakLoop(e)?void 0:e.rafID=requestAnimationFrame(r));if(e.rafID=requestAnimationFrame(r),e.backgroundTask){let t=()=>{if(document.hidden){let t=Lw()-i;t>=e.delay?r():e.timeoutID=setTimeout(r,e.delay-t)}};document.addEventListener("visibilitychange",t),e.onVisibilitychange=t,document.hidden&&t()}return e.taskID}static hasTask(e){return this.taskMap.has(e)}static clearTask(e){if(!this.taskMap.has(e))return!0;let{intervalID:t,timeoutID:i,rafID:r,ricID:n,onVisibilitychange:o,worker:s}=this.taskMap.get(e);return s&&s.terminate(),t&&clearInterval(t),i&&clearTimeout(i),r&&kP(r),n&&bP(n),o&&document.removeEventListener("visibilitychange",o),this.taskMap.delete(e),!0}static isBreakLoop(e){return!this.taskMap.has(e.taskID)||0!==e.count&&e.loopCount>=e.count&&(this.clearTask(e.taskID),!0)}};DP.taskMap=new Map,DP.currentTaskID=1;var NP=DP;Ub.SEI_MESSAGE;var wP={LOADED_DATA:Ub.LOADEDDATA,MEDIA_TRACK_CHANGED:"media-track-changed",PLAYER_STATE_CHANGED:"player-state-changed",ERROR:"error"},OP={};xC(OP,{create:()=>MP,remove:()=>LP});var PP=new WeakMap;function MP(e,t){PP.has(e)||PP.set(e,[]);let i=PP.get(e),r={add:(e,n)=>("addEventListener"in t?(i.push(t.removeEventListener.bind(t,e,n)),t.addEventListener(e,n)):(i.push(t.off.bind(t,e,n)),t.on(e,n)),r)};return r}function LP(e){let t=PP.get(e);t&&(t.forEach((e=>e())),PP.delete(e))}var xP=new WeakMap;function VP(e){let{settings:t={retries:5,timeout:2e3},onError:i,onRetrying:r,onRetryFailed:n}=e;return function(e,o,s){let a=HN({retryFunction:s.value,settings:t,onError(t){let{error:r,retry:n,reject:s,retryFuncArgs:a}=t;var c;i?i.call(this,r,(()=>{var t;null!=(t=xP.get(e))&&t.has(o)?n():s(r)}),s,a):null!=(c=xP.get(e))&&c.has(o)?n():s(r)},onRetrying(t,i){var n;UN(r)&&r.call(this,t,i),null!=(n=xP.get(e))&&n.has(o)&&(xP.get(e).get(o).stopRetry=i)},onRetryFailed:n});return s.value=function(){let t=xP.get(e);for(var i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];return t?t.set(o,{args:r}):xP.set(e,new Map([[o,{args:r}]])),a.apply(this,r).finally((()=>{var t;return null==(t=xP.get(e))?void 0:t.delete(o)}))},s}}function UP(e){let{fnName:t,callback:i,validateArgs:r=!0}=e;return function(e,n,o){let s=o.value;return o.value=function(){for(var n,o,a=arguments.length,c=new Array(a),l=0;l<a;l++)c[l]=arguments[l];if(null!=(n=xP.get(e))&&n.has(t)){let{stopRetry:n,args:s}=xP.get(e).get(t),a=!0;if(r)for(let e of s)if(!c.find((t=>t===e))){a=!1;break}a&&(i&&i.apply(this,c),n&&n(),null==(o=xP.get(e))||o.delete(t))}return s.apply(this,c)},o}}var FP=class extends AP{constructor(e,t){super(e.id,"".concat(t,"-player")),this.kind=t,FC(this,"id"),FC(this,"element",null),FC(this,"track"),FC(this,"url"),FC(this,"attr"),FC(this,"muted"),FC(this,"_log"),FC(this,"_pausedRetryCount"),FC(this,"_isElementPlayingFired",!1),FC(this,"_interval"),FC(this,"_delayDestroyTimeoutId",0),FC(this,"_isReplayByRecreateMediaStreamCalled",!1),this.id=e.id,this._log=e.log,this.track=e.track,this.muted=e.muted,this._pausedRetryCount=Nk,this._state="STOPPED",this.bindTrackEvents(),this._log.info("create ".concat(t,"-player ").concat(this.id))}get isPlaying(){var e;return"PLAYING"===this._state&&!1===(null==(e=this.element)?void 0:e.paused)}get isStopped(){return"STOPPED"===this._state}setAttr(e){this.attr=e}setUrl(e){this.track&&(this.unbindTrackEvents(),this.element&&(this.element.srcObject=null),this.track=null),e!==this.url&&(this.url=e,null!==e&&this.element&&(this.element.crossOrigin="anonymous",this.element.src=e))}play(){return HC(this,null,(function*(){if(!this.isPlaying)try{this._delayDestroyTimeoutId&&(clearTimeout(this._delayDestroyTimeoutId),this._delayDestroyTimeoutId=0,this.bindTrackEvents(),this.bindElementEvents()),this.bindAutoPlayEvent(),yield this.element.play()}catch(db){let t=xN({key:zk.PLAY_FAILED,data:{media:this.kind,error:db}});if(this.track&&!this.track.muted&&this._log.warn(db),t.includes("NotAllowedError"))throw new tb({code:ZC.PLAY_NOT_ALLOWED,message:t})}}))}stop(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this._isElementPlayingFired=!1,this.unbindEvents(),e>0?this._delayDestroyTimeoutId||(this._log.info("destroy element after 3 * ".concat(e)),this._delayDestroyTimeoutId=setTimeout((()=>this.destroyElement()),3*e)):this.destroyElement(),this.handleStopped(Ub.ENDED),this._interval>0&&NP.clearTask(this._interval)}destroyElement(){this.element&&(this._log.debug("destroy element"),this.element.remove(),this.element.srcObject=null,this.element=null),clearTimeout(this._delayDestroyTimeoutId),this._delayDestroyTimeoutId=0}pause(){var e;this.isPlaying&&(null==(e=this.element)||e.pause())}resume(){return this._log.info("resume"),this.isPlaying?Promise.resolve():TN?this.replay():this.play().catch((()=>{}))}setMuted(e){this.element&&(this.element.muted=e),this.muted=e}replay(){return this.stop(),this.play().catch((()=>{}))}bindElementEvents(){if(this.element){let e=this.handleElementEvent.bind(this);return MP(this.element,this.element).add(Ub.PLAYING,e).add(Ub.ENDED,e).add(Ub.PAUSE,e).add(Ub.ERROR,e).add(Ub.LOADEDDATA,e)}}bindTrackEvents(){if(this.track){let e=this.handleTrackEvent.bind(this);null==OP||OP.create(this.track,this.track).add(Ub.ENDED,e).add(Ub.MUTE,e).add(Ub.UNMUTE,e),this.track.readyState===Ub.ENDED&&this.handleTrackEvent({type:Ub.ENDED}),this.track.muted&&this.handleTrackEvent({type:Ub.MUTE})}}bindAutoPlayEvent(){jN.on(nO.AUTOPLAY_DIALOG_CLICK_CONFIRM,this.resume,this)}unbindTrackEvents(){this.track&&LP(this.track)}unbindEvents(){this.element&&LP(this.element),this.unbindTrackEvents(),jN.off(nO.AUTOPLAY_DIALOG_CLICK_CONFIRM,this.resume,this)}handleElementEvent(e){switch(e.type){case Ub.PLAYING:this._isElementPlayingFired=!0,this._log.info("".concat(this.kind," player is playing")),this.handlePlaying(Ub.PLAYING),this._interval&&(NP.clearTask(this._interval),this._interval=-1);break;case Ub.ENDED:this._log.info("".concat(this.kind," player is ended")),this.handleStopped(Ub.ENDED);break;case Ub.PAUSE:this._log.info("".concat(this.kind," player is paused")),this.handlePaused(Ub.PAUSE),sD&&(this._interval=NP.run(Hk,(()=>{this.element&&"PAUSED"===this._state&&this.resume()}),{delay:3e3}));break;case Ub.ERROR:if(this.element&&this.element.error){this.handlePaused(Ub.ERROR);let{code:e,message:t}=this.element.error;this._log.error("".concat(this.kind," ").concat(this._log.isLocal?"local":"remote"," MediaError code: ").concat(e," message: ").concat(t," userAgent: ").concat(navigator.userAgent)),GN.uploadEvent({log:"stat-".concat(this.kind,"-").concat(mk.PLAYER_ERROR,"-").concat(e,"-").concat(navigator.userAgent),error:this.element.error}),this.replayByRecreateMediaStream(this.element.error)}break;case Ub.LOADEDDATA:this.kind===Ub.VIDEO&&this.emit(wP.LOADED_DATA)}}replayByRecreateMediaStream(e){if(!this._isReplayByRecreateMediaStreamCalled)return this._isReplayByRecreateMediaStreamCalled=!0,this.doReplayByRecreateMediaStream(1e3).then((()=>{this._log.warn("replayByRecreateMediaStream success"),GN.uploadEvent({log:"stat-replayByRecreateMediaStream-success"}),IO.addSuccessEvent({key:this.kind===Ub.AUDIO?506700:516700})})).catch((()=>{var t;this._log.error("replayByRecreateMediaStream failed"),GN.uploadEvent({log:"stat-replayByRecreateMediaStream-failed"}),IO.addFailedEvent({key:this.kind===Ub.AUDIO?506700:516700,error:null==(t=this.element)?void 0:t.error}),this.emit(wP.ERROR,e)}))}doReplayByRecreateMediaStream(e){return this._log.warn("delay ".concat(e,"ms to recreate mediaStream")),new Promise(((t,i)=>{tO(e).then((()=>{this.element&&(this.element.srcObject=null,this.element.srcObject=new MediaStream([this.track]),this._log.warn("recreated mediaStream"),this.element.onerror=()=>{var e,t,r;this._log.warn("element onerror ".concat(null==(t=null==(e=this.element)?void 0:e.error)?void 0:t.code," fired after recreated mediaStream")),i(null==(r=this.element)?void 0:r.error)}),tO(5e3).then((()=>{var e,r;(!this.isPlaying||(null==(e=this.element)?void 0:e.error))&&i(null==(r=this.element)?void 0:r.error),t()}))}))})).finally((()=>{this.element&&(this.element.onerror=null)}))}handleTrackEvent(e){switch(e.type){case Ub.ENDED:this.handleStopped(Ub.ENDED);break;case Ub.MUTE:this.handlePaused(Ub.MUTE);break;case Ub.UNMUTE:this._isElementPlayingFired&&this.handlePlaying(Ub.UNMUTE)}}handlePlaying(e){this.emit(wP.PLAYER_STATE_CHANGED,{type:this.kind,state:"PLAYING",reason:e})}handlePaused(e){this.emit(wP.PLAYER_STATE_CHANGED,{type:this.kind,state:"PAUSED",reason:e})}handleStopped(e){this.emit(wP.PLAYER_STATE_CHANGED,{type:this.kind,state:"STOPPED",reason:e})}getElement(){return this.element}};UC([VP({settings:{retries:2,timeout:0},onError(e,t,i,r){r[0]=(r[0]||1e3)+1e3,t()}})],FP.prototype,"doReplayByRecreateMediaStream",1),UC([SP([],"PLAYING",{sync:!0})],FP.prototype,"handlePlaying",1),UC([SP("PLAYING","PAUSED",{ignoreError:!0,sync:!0})],FP.prototype,"handlePaused",1),UC([SP([],"STOPPED",{sync:!0})],FP.prototype,"handleStopped",1);var BP="trtc_autoplay",HP="".concat(BP,"_mask"),jP="".concat(BP,"_wrapper"),WP="".concat(BP,"_header"),GP="".concat(BP,"_content"),JP="".concat(BP,"_action_wrapper"),KP="".concat(BP,"_question"),zP="".concat(BP,"_collapse"),qP="".concat(BP,"_action_confirm"),YP="".concat(BP,"_detail"),QP="#2473E8",XP="dialog",$P="".concat(XP,"-show"),ZP="".concat(XP,"-1"),eM="".concat(XP,"-2"),tM=!1,iM=()=>!!document.querySelector(".".concat(jP)),rM="".concat(Sb,"/").concat(fw()?"zh-cn":"en","/tutorial-21-advanced-auto-play-policy.html"),nM="<br><a href='".concat(rM,"' target='_blank'>").concat(fw()?"其他方案?":"Any other solution?","</a>"),oM="".concat(fw()?"浏览器自动播放策略:在用户与页面产生交互(点击、触摸)之前,浏览器禁止播放有声媒体。该弹窗用于帮助用户恢复音视频播放。".concat(nM):"Autoplay Policy: Before user interacts with the web page (clicking, touching), page will not be allowed to play media with sound. This Dialog is used to help users resume playback. ".concat(nM)),sM=class{constructor(){if(FC(this,"content","音视频播放被浏览器拦截,请点击“恢复播放”。"),FC(this,"_dialogNode",null),FC(this,"_bodyPosition",""),FC(this,"_showDetail",!1),FC(this,"_isCollapseClicked",!1),FC(this,"_isQuestionClicked",!1),fw()||(this.content='Media playback failed. Click the "Resume" to resume playback.'),!tM){let e=document.createElement("style");e.innerHTML=".".concat(HP,"{position:fixed;top:0;left:0;right:0;bottom:0;width:100vw;height:100vh;display:flex;justify-content:center;align-items:center;background:rgba(0,0,0,0.5);z-index:1500;}.").concat(HP," div:not(.").concat(JP,"){display:block !important;}.").concat(jP,"{padding:14px;background:#fff;border-radius:3px;box-shadow:0px 3px 15px #434343;border:1px solid #d1cfcf;max-width:500px;}.").concat(jP," a{color:").concat(QP,";}.").concat(WP,"{overflow:hidden;text-overflow:ellipsis;font-size:16px;font-weight:600;}.").concat(GP,"{margin:8px 0;}.").concat(JP,"{width:100%;display:flex !important;align-items:center;justify-content:right;float:right;}.").concat(zP,"{margin-right:auto;cursor:pointer}.").concat(KP,"{height:100%;line-height:16px;cursor:pointer;}.").concat(qP,"{margin-left:8px;color:#fff;background:").concat(QP,";padding:4px 12px;outline:none;border:1px solid;border-radius:3px;font-weight:bold;}.").concat(qP,":hover{opacity:0.9;}.").concat(zP,",.").concat(qP,",.").concat(GP,",.").concat(KP,"{font-size:14px;}@media screen and (max-width:750px){.").concat(jP,"{width:80vw;}}"),document.head.appendChild(e),tM=!0}this.addDiaLog()}createDiaLog(){let e=document.createElement("template");e.innerHTML='<div class="'.concat(HP,"\"><div class='").concat(jP,"'><div class='").concat(WP,"'>").concat(location.host,"</div><div class='").concat(GP,"'>").concat(this.content,"</div><div class='").concat(YP,'\' style="visibility:hidden;width:100%;height:0;font-size:12px;color:gray;">').concat(oM,"</div><div class='").concat(JP,"'></div></div></div>").trim();let t=document.createElement("button");t.className=qP,t.innerText=fw()?"恢复播放":"Resume",t.onclick=this.onConfirm.bind(this);let i=document.createElement("div");i.className=KP,i.innerHTML='<?xml version="1.0" encoding="UTF-8"?>\n    <svg class="icon" width="18" height="18" p-id="2030" t="1639646523624" version="1.1" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">\n    <path d="m464 784.35c0 26.51 21.49 48 48 48s48-21.49 48-48-21.49-48-48-48-48 21.49-48 48z" p-id="2031"/>\n    <path d="m512 960c-247.04 0-448-200.96-448-448s200.96-448 448-448 448 200.96 448 448-200.96 448-448 448zm0-831.71c-211.58 0-383.71 172.13-383.71 383.71 0 211.55 172.13 383.71 383.71 383.71 211.55 0 383.71-172.16 383.71-383.71 0-211.58-172.16-383.71-383.71-383.71z" p-id="2032"/>\n    <path d="m512 673.7c-17.665 0-32.001-14.336-32.001-31.999v-54.112c0-52.353 40-92.352 75.328-127.65 25.887-25.92 52.672-52.672 52.672-74.017 0-53.343-43.072-96.735-95.999-96.735-53.823 0-95.999 41.536-95.999 94.559 0 17.665-14.336 31.999-32.001 31.999s-32.001-14.336-32.001-31.999c0-87.424 71.775-158.56 160-158.56s160 72.095 160 160.74c0 47.904-36.32 84.192-71.424 119.3-27.84 27.776-56.576 56.512-56.576 82.336v54.112c0 17.665-14.336 32.032-32.001 32.032z" p-id="2033"/>\n    </svg>\n    ',i.onclick=this.onQuestionClick.bind(this);let r=document.createElement("div");r.className=zP,r.innerText="".concat(fw()?"详情 >":"Detail >"),r.onclick=this.onCollapseClick.bind(this);let n=e.content.firstChild,o=n.querySelector(".".concat(JP));return o.appendChild(r),o.appendChild(i),o.appendChild(t),n}addDiaLog(){iM()||(this._dialogNode=this.createDiaLog(),document.body.appendChild(this._dialogNode),this._dialogNode.onclick=this.onConfirm.bind(this),this._dialogNode.querySelector(".".concat(jP)).onclick=e=>e.stopPropagation(),this._bodyPosition=document.body.style.position,document.body.style.position="fixed",sO.info("show autoplay dialog"),GN.uploadEvent({log:$P}))}deleteDiaLog(){this._dialogNode&&(document.body.removeChild(this._dialogNode),document.body.style.position=this._bodyPosition,this._dialogNode=null)}onConfirm(){sO.warn("confirm clicked, try resume stream"),jN.emit(nO.AUTOPLAY_DIALOG_CLICK_CONFIRM),this.deleteDiaLog()}onCollapseClick(){let e=this._dialogNode.querySelector(".".concat(YP));e.style.visibility="".concat(this._showDetail?"hidden":"visible"),e.style.height="".concat(this._showDetail?0:"fit-content"),this._showDetail=!this._showDetail,this._isCollapseClicked||GN.uploadEvent({log:ZP}),this._isCollapseClicked=!0}onQuestionClick(){window.open(rM,"_blank"),this._isQuestionClicked||GN.uploadEvent({log:eM}),this._isQuestionClicked=!0}},aM=class extends FP{constructor(e){super(e,Ub.VIDEO),FC(this,"viewMirror",!1),FC(this,"objectFit"),FC(this,"container"),FC(this,"canvas"),this.container=e.container,this.canvas=e.canvas,Sw(e.viewMirror)||(this.viewMirror=e.viewMirror),Sw(e.objectFit)||(this.objectFit=e.objectFit),this.initializeElement()}initializeElement(){var e;let t=document.createElement(Ub.VIDEO);this.track&&(t.srcObject=new MediaStream([this.track])),t.muted=!0,t.setAttribute("id","video_".concat(this.id)),t.setAttribute("style",this.styleAttribute),this.canvas&&this.canvas.setAttribute("style",this.styleAttribute),t.setAttribute("autoplay","autoplay"),t.setAttribute("playsinline","playsinline"),this.element=t,null==(e=this.container)||e.appendChild(this.elementToRender),this.bindElementEvents()}get styleAttribute(){let e="width: 100%; height: 100%; object-fit: ".concat(this.objectFit,";background-color: black;");return this.viewMirror&&(e+="transform: scaleX(-1);"),e}setContainer(e){var t;this.container=e,this.track&&this.elementToRender&&(null==(t=this.container)||t.appendChild(this.elementToRender))}bindElementEvents(){let e=super.bindElementEvents();this.handleElementEvent=this.handleElementEvent.bind(this),e&&e.add(Ub.ENTER_PICTURE_IN_PICTURE,this.handleElementEvent).add(Ub.LEAVE_PICTURE_IN_PICTURE,this.handleElementEvent)}handleElementEvent(e){var t;super.handleElementEvent(e);let i=e.type;if(i===Ub.PAUSE&&(this.container&&document.getElementById(this.container.id)||this._log.warn("".concat(this.kind," player has been remove, element ID: ").concat(null==(t=this.container)?void 0:t.id)),this._pausedRetryCount>0&&!iM()&&(this._log.info("".concat(this.kind," player auto resume when paused")),this.resume(),this._pausedRetryCount--)),this.viewMirror&&this.element){let e=this.element.style.transform;i===Ub.ENTER_PICTURE_IN_PICTURE?this.element.style.transform=e.replace("scaleX(-1)",""):i===Ub.LEAVE_PICTURE_IN_PICTURE&&!e.includes("scaleX")&&(this.element.style.transform="".concat(e," scaleX(-1)"))}}setCanvas(e){var t,i;this.canvas!==e&&(null==(t=this.canvas)||t.remove(),null==e||e.setAttribute("style",this.styleAttribute),this.canvas=e,e&&(null==(i=this.container)||i.appendChild(e)))}setAttr(e){let t=Object.assign({autoplay:"autoplay",playsinline:"playsinline",muted:!0},e);t.style=Object.assign({width:"100%",height:"100%"},t.style),super.setAttr(t)}get mirror(){return this.viewMirror}setRect(e,t){this.elementToRender&&(this.elementToRender.style.width="".concat(e,"px"),this.elementToRender.style.height="".concat(t,"px"))}setViewMirror(e){this.elementToRender&&(this.elementToRender.style.transform=e?"scaleX(-1)":""),this.viewMirror=e}setObjectFit(e){this.elementToRender&&(this.elementToRender.style.objectFit="".concat(e)),this.objectFit=e}stop(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;var t;super.stop(e),null==(t=this.canvas)||t.remove()}play(){return this.element?this.elementToRender&&this.elementToRender.parentElement!==this.container&&this.container&&this.container.append(this.elementToRender):this.initializeElement(),super.play()}get elementToRender(){return this.canvas||this.element}setTrack(e){e!==this.track&&(this.unbindTrackEvents(),this.track=e,this.emit(wP.MEDIA_TRACK_CHANGED,e),null!==e&&(this.bindTrackEvents(),this.element&&(this.element.srcObject=new MediaStream([e]),this.element.remove()),this.elementToRender&&this.elementToRender.parentElement!==this.container&&this.container&&this.container.append(this.elementToRender)))}getVideoFrame(){if(this.canvas)return this.canvas.toDataURL("image/png");if(!this.element)return"";let e=document.createElement("canvas");return e.width=this.element.videoWidth,e.height=this.element.videoHeight,e.getContext("2d").drawImage(this.element,0,0),e.toDataURL("image/png")}getElement(){return this.element}};function cM(e,t){return HC(this,null,(function*(){if(!e.audioWorklet)return Promise.reject("audioWorklet is not supported");try{yield e.audioWorklet.addModule(t),sO.info("worklet addModule success")}catch(db){throw sO.info("worklet addModule catch error. ".concat(db.message)),db}}))}"undefined"!=typeof window&&(window.AudioContext=window.AudioContext||window.webkitAudioContext||window.mozAudioContext);var lM=new window.AudioContext({sampleRate:48e3}),dM=()=>{"suspended"===lM.state?(lM.resume(),document.addEventListener("click",dM)):"interrupted"===lM.state?lM.resume():document.removeEventListener("click",dM)};document.addEventListener("click",dM),lM.onstatechange=()=>{sO.info("context state: ".concat(lM.state)),dM()};var uM=e=>lM,hM=class{constructor(){this.pre=new Set,this.next=new Set,this.connectedNodes=new Set,this._channelCount=1}get channelCount(){return this._channelCount}set channelCount(e){this._channelCount=e,this.node&&(this.node.channelCount=e),this.next.forEach((t=>t.channelCount=e))}setContext(e){this.context=e,this.node&&e.addMixWeight()}removeContext(){var e;this.node&&(null==(e=this.context)||e.reduceMixWeight()),delete this.context}setNode(e){var t;if(!this.node)try{null==(t=this.context)||t.addMixWeight(),this.node=e,this.node.channelCountMode="explicit",this.node.channelCount=this._channelCount,this.preNodeReconnect(),this.reconnect(),IO.addSuccessEvent({key:502701})}catch(hk){sO.error(hk),IO.addFailedEvent({key:502701,error:hk})}}deleteNode(){var e;if(this.node)try{this._disconnect(),delete this.node,null==(e=this.context)||e.reduceMixWeight(),this.preNodeReconnect(),IO.addSuccessEvent({key:502702})}catch(db){sO.error(db),IO.addFailedEvent({key:502702,error:db})}}preNodeReconnect(){this.pre.forEach((e=>{e.node?e.reconnect():e.preNodeReconnect()}))}connectNext(e){this.next.forEach((t=>e._connect(t.node)||t.connectNext(e)))}_connect(e){return!(!this.node||!e)&&(this.node.connect(e),this.connectedNodes.add(e),!0)}_disconnect(){this.connectedNodes.forEach((e=>{var t;return null==(t=this.node)?void 0:t.disconnect(e)})),this.connectedNodes.clear()}reconnect(){this._disconnect(),this.connectNext(this)}pipeTo(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.forEach((e=>{this.next.add(e),e.pre.add(this)})),this}},pM=class extends hM{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:256;super(),this.fftSize=e,this.dataArray=new Uint8Array(0)}setNode(e){e.fftSize=this.fftSize,this.dataArray=new Uint8Array(e.frequencyBinCount),super.setNode(e)}getByteTimeDomainData(){var e;return null==(e=this.node)||e.getByteTimeDomainData(this.dataArray),this.dataArray}get level(){var e;return null==(e=this.node)||e.getByteTimeDomainData(this.dataArray),Math.max(...this.dataArray)/128-1}get timeDomainPathData(){let e=this.getByteTimeDomainData(),t=0,i=0,r="M".concat(t,",").concat(i);for(let n=0;n<e.length;n++)i=e[n]/128*100/2,r+="L".concat(t,",").concat(i),t+=1;return r}},mM=class{constructor(){this.source=new hM,this.gain=new hM,this.destination=new hM}get volume(){var e;return(null==(e=this.gain.node)?void 0:e.gain.value)||1}setVolume(e){1!==e?(this.gain.node||this.gain.setNode(this.source.node.context.createGain()),this.gain.node.gain.value=e):this.gain.node&&this.gain.deleteNode()}replaceSource(e){this.source.deleteNode(),this.source.setNode(TM(e))}get track(){var e;return null==(e=this.stream)?void 0:e.getAudioTracks()[0]}get stream(){var e;return null==(e=this.destination.node)?void 0:e.stream}},_M=class extends mM{constructor(e){super(),this.context=e,this.denoiser=new hM,this.source.pipeTo(this.denoiser.pipeTo(this.gain.pipeTo(this.destination)))}connect(){this.context.inputs.has(this)||(this.destination.setNode(this.context.destination),this.source.setContext(this.context),this.denoiser.setContext(this.context),this.gain.setContext(this.context),this.context.inputs.add(this))}disconnect(){!this.context.inputs.has(this)||(this.destination.deleteNode(),this.source.removeContext(),this.denoiser.removeContext(),this.gain.removeContext(),this.context.inputs.delete(this))}remove(){this.gain.deleteNode(),this.denoiser.deleteNode(),this.source.deleteNode(),this.disconnect()}setVolume(e){1!==e?(this.gain.node||this.gain.setNode(this.context.audioContext.createGain()),this.gain.node.gain.value=e):this.gain.node&&this.gain.deleteNode()}},fM=class{constructor(){this.audioContext=uM(),this.destination=this.audioContext.createMediaStreamDestination(),this.inputs=new Set,this.mixWeight=0}addMixWeight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.mixWeight+=e,this.mixWeight-1==e+1>>1&&this.mixOnChange()}reduceMixWeight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.addMixWeight(-e)}close(){this.inputs.forEach((e=>e.remove()))}get mixTrack(){return this.destination.stream.getAudioTracks()[0]}},gM=new WeakMap;function TM(e){let t=gM.get(e);if(t)return t;let i=uM();if(e instanceof HTMLAudioElement)t=i.createMediaElementSource(e);else{if(!(e instanceof MediaStreamTrack))return e;t=i.createMediaStreamSource(new MediaStream([e]))}return gM.set(e,t),t}window.AudioWorkletProcessor||(window.AudioWorkletProcessor=class{constructor(){FC(this,"port")}});var EM=class extends AudioWorkletProcessor{constructor(){super(),this.volume=0,this.intervalTime=200,this.tick=200,this.isStop=!1,this.cache=[],this.sentFirstInfo1=!1,this.unmute=!1,this.port.onmessage=e=>{let{data:t}=e;switch(t.name){case"chunk":this.cache.push.apply(this.cache,t.data),this.sentFirstInfo1||(this.port.postMessage({cl:t.data.length}),this.sentFirstInfo1=!0);break;case"setIntervalTime":this.intervalTime=t.intervalTime;break;case"unmute":this.unmute=!0;break;case"stop":this.isStop=!0}}}process(e,t){let i=e[0],r=t[0];if(!i&&!r)return!0;if(this.isStop)return!1;let n=r?r[0].length:0,o=this.cache.length;o>n?(r[0].set(this.cache.slice(0,n)),this.cache=this.cache.slice(n)):this.unmute&&r[0].set(i[0]);let s=o>n?r[0]:i[0];if(!s)return!0;let a=0;for(let c=0;c<s.length;++c)a=Math.max(Math.abs(s[c]),a);return this.volume=a,this.tick-=s.length,this.tick<0&&(this.tick+=this.intervalTime/1e3*sampleRate,this.port.postMessage({volume:this.volume,cacheLen:o,outputLen:n})),!0}},vM=EM.toString();delete window.AudioWorkletProcessor;var yM=class{constructor(e){this._volume=0,this._scriptProcessorNode=null,this._audioWorkletNode=null,this._interval=200,this.ready=this.preload();let{log:t}=e;this._log=t,jN.on(nO.AUDIO_LEVEL_INTERVAL,this.handleAudioLevelInterval,this)}static get isRunning(){return Date.now()-yM.lastMessageTime<2e3}get node(){return this._audioWorkletNode||this._scriptProcessorNode}preload(){if(!yM.workletReady){let e="".concat(vM.slice(0,5)," VolumeMeterWorklet ").concat(vM.slice(6),";registerProcessor('volume-meter', VolumeMeterWorklet);");yM.workletReady=cM(yM.audioContext,URL.createObjectURL(new Blob([e],{type:"application/javascript"})))}return yM.workletReady.then((()=>this.initAudioWorklet())).catch((e=>(this._log.error("volumeMeter preload error: ".concat(e)),this.initScriptProcessor())))}initAudioWorklet(){if(!this._audioWorkletNode)try{this._audioWorkletNode=new AudioWorkletNode(yM.audioContext,"volume-meter");let e=!1;this._audioWorkletNode.port.onmessage=t=>{yM.lastMessageTime=Date.now(),this._volume=t.data.volume||0,!e&&t.data.cacheLen&&t.data.outputLen&&(this._log.warn("worklet play success"),e=!0)},this.handleAudioLevelInterval({interval:this._interval})}catch(hO){this._log.error("volumeMeter init audio worklet error: ".concat(hO)),GN.logFailedEvent({userId:this._log.userId,eventType:mk.LOAD_WORKLET,error:hO}),this.initScriptProcessor()}}initScriptProcessor(){if(!this._scriptProcessorNode)try{this._scriptProcessorNode=uM("volume-meter").createScriptProcessor(2048,1,1),this._scriptProcessorNode.onaudioprocess=e=>{yM.lastMessageTime=Date.now();let t=e.inputBuffer.getChannelData(0),i=0;for(let r=0;r<t.length;++r)i+=t[r]*t[r];this._volume=Math.sqrt(i/t.length)||0}}catch(hO){this._log.error("volumeMeter init script processor error: ".concat(hO))}}destroy(){this._scriptProcessorNode&&(this._scriptProcessorNode.onaudioprocess=null),this._audioWorkletNode&&(this._audioWorkletNode.port.postMessage({name:"stop"}),this._audioWorkletNode.port.onmessage=null),this._audioWorkletNode=null,this._scriptProcessorNode=null,jN.off(nO.AUDIO_LEVEL_INTERVAL,this.handleAudioLevelInterval,this)}getInternalAudioLevel(){return this._volume}getCalculatedVolume(){return parseFloat(this._volume.toFixed(2))}handleAudioLevelInterval(e){var t;let{interval:i}=e;this._interval=i,null==(t=this._audioWorkletNode)||t.port.postMessage({name:"setIntervalTime",intervalTime:i})}},SM=yM;SM.lastMessageTime=0,SM.audioContext=uM();var IM=class extends hM{constructor(e){super(),this._volumeMeter=new SM(e)}deleteNode(){super.deleteNode(),this._volumeMeter.destroy()}init(){return HC(this,null,(function*(){yield this._volumeMeter.preload(),this.setNode(this._volumeMeter.node)}))}getCalculatedVolume(){return this._volumeMeter.getCalculatedVolume()}getInternalAudioLevel(){return this._volumeMeter.getInternalAudioLevel()}write(e){if(this.node){let t=e.allocationSize({planeIndex:0}),i=new Float32Array(t>>2);e.copyTo(i,{planeIndex:0}),this.node.port.postMessage({name:"chunk",data:i},[i.buffer]),e.close()}}},RM=SM,AM=VC(jC(),1),CM=e=>t=>t.deviceId===e,bM=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Input";FC(this,"kind"),FC(this,"type"),FC(this,"devices",[]),this.kind=e,this.type=t}update(e,t){let i=e.filter((e=>e.kind==="".concat(this.kind).concat(this.type.toLocaleLowerCase())));1===this.devices.length&&NM(this.devices[0])||t&&(i.forEach((e=>{if(e.deviceId&&!this.devices.find(CM(e.deviceId))){let i="".concat(this.kind).concat(this.type,"Added");sO.warn("".concat(i,": ").concat(JSON.stringify(e))),t.emit(i,e)}})),this.devices.forEach((e=>{if(e.deviceId&&!i.find(CM(e.deviceId))){let i="".concat(this.kind).concat(this.type,"Removed");sO.warn("".concat(i,": ").concat(JSON.stringify(e))),t.emit(i,e)}}))),this.devices=i}hasDevice(e){return!!this.devices.find((t=>t.deviceId===e))}},kM=class extends AM.EventEmitter{constructor(){super(),FC(this,"audioInputs",new bM(Ub.AUDIO)),FC(this,"videoInputs",new bM(Ub.VIDEO)),FC(this,"audioOutputs",new bM(Ub.AUDIO,"Output")),this.init(),navigator.mediaDevices&&(navigator.mediaDevices.addEventListener&&navigator.mediaDevices.addEventListener("devicechange",(()=>this.update())),"ondevicechange"in navigator.mediaDevices||NP.run(Bk,(()=>{this.update()}),{delay:1e4}))}init(){wM().then((e=>{this.audioInputs.update(e),this.videoInputs.update(e),this.audioOutputs.update(e)}))}update(){return HC(this,arguments,(function(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return function*(){let i=yield wM(t);return e.audioInputs.update(i,e),e.videoInputs.update(i,e),e.audioOutputs.update(i,e),e}()}))}},DM=mb||pb?null:new kM;function NM(e){return e.deviceId===e.groupId&&""===e.groupId}function wM(){return HC(this,arguments,(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return function*(){if(wO()||!DO())return[];let t=yield navigator.mediaDevices.enumerateDevices();if(0!==e){let i={audio:!1,video:!1};if(t.forEach((e=>{NM(e)&&(e.kind===Ub.AUDIO_INPUT?i.audio=!0:e.kind===Ub.VIDEO_INPUT&&(i.video=!0))})),2===e&&(i.audio=!1),1===e&&(i.video=!1),i.audio||i.video){let e;try{e=yield navigator.mediaDevices.getUserMedia(i)}catch(ub){sO.debug("capture before getDevices failed: ",ub)}t=yield navigator.mediaDevices.enumerateDevices(),null==e||e.getTracks().forEach((e=>e.stop()))}}return t.map(((e,t)=>{let i={kind:e.kind,deviceId:e.deviceId,groupId:e.groupId,label:e.label||"".concat(e.kind,"_").concat(t)};return e.deviceId.length>0&&xM.add("".concat(e.deviceId,"_").concat(e.kind)),e.getCapabilities&&(i.getCapabilities=()=>e.getCapabilities()),i}))}()}))}function OM(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return DM.update(e?1:0).then((e=>e.audioInputs.devices))}function PM(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return DM.update(e?2:0).then((e=>e.videoInputs.devices))}var MM=!1;function LM(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return HC(this,null,(function*(){return DM.update(e?1:0).then((e=>e.audioOutputs.devices))}))}var xM=new Set;function VM(e,t){return HC(this,null,(function*(){let i=(yield OM()).find((e=>e.deviceId===wk));return!t&&(null==i?void 0:i.groupId)===e||(null==i?void 0:i.groupId)===e&&i.label===t}))}var UM,FM=class extends mM{constructor(e){super(),this.log=e,FC(this,"volumeMeter"),FC(this,"volumeDestination"),FC(this,"analyser",new pM),this.volumeMeter=new IM({log:this.log}),this.volumeDestination=new hM,this.volumeMeter.pipeTo(this.volumeDestination)}destory(){this.gain.deleteNode(),this.volumeMeter.deleteNode(),this.analyser.deleteNode(),this.source.deleteNode(),this.dest

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。