@byteplus/rtc 4.66.36-beta.0 → 4.66.36-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/extension-ainr/index.js +2 -2
- package/extension-ainr/index.umd.js +2 -2
- package/extension-beauty/index.js +2 -2
- package/extension-beauty/index.umd.js +2 -2
- package/extension-sr/index.js +2 -2
- package/extension-sr/index.umd.js +2 -2
- package/index.d.ts +2 -1
- package/index.esm.min.js +2 -2
- package/index.min.js +2 -2
- package/package.json +22 -13
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright (c) 2026 The BytePlusRTC project authors. All Rights Reserved.
|
|
3
3
|
* @brief BytePlusRTC Advance API
|
|
4
|
-
* version: 4.66.36-beta.
|
|
4
|
+
* version: 4.66.36-beta.3
|
|
5
5
|
*/
|
|
6
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).RTCSRExtension=e()}(this,(function(){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var r=function(t){return t&&t.Math===Math&&t},n=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof t&&t)||r("object"==typeof t&&t)||function(){return this}()||Function("return this")(),o=function(t){try{return!!t()}catch(e){return!0}},i=!o((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),a=i,u=Function.prototype,s=u.apply,c=u.call,l="object"==typeof Reflect&&Reflect.apply||(a?c.bind(s):function(){return c.apply(s,arguments)}),f=i,v=Function.prototype,d=v.call,h=f&&v.bind.bind(d,d),p=f?h:function(t){return function(){return d.apply(t,arguments)}},y=p,g=y({}.toString),m=y("".slice),b=function(t){return m(g(t),8,-1)},_=b,w=p,S=function(t){if("Function"===_(t))return w(t)},E="object"==typeof document&&document.all,x=void 0===E&&void 0!==E?function(t){return"function"==typeof t||t===E}:function(t){return"function"==typeof t},T={},O=!o((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),R=i,k=Function.prototype.call,C=R?k.bind(k):function(){return k.apply(k,arguments)},A={},P={}.propertyIsEnumerable,j=Object.getOwnPropertyDescriptor,D=j&&!P.call({1:2},1);A.f=D?function(t){var e=j(this,t);return!!e&&e.enumerable}:P;var L,I,M=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},F=o,N=b,W=Object,U=p("".split),G=F((function(){return!W("z").propertyIsEnumerable(0)}))?function(t){return"String"===N(t)?U(t,""):W(t)}:W,z=function(t){return null==t},V=z,B=TypeError,H=function(t){if(V(t))throw new B("Can't call method on "+t);return t},X=G,q=H,J=function(t){return X(q(t))},$=x,K=function(t){return"object"==typeof t?null!==t:$(t)},Y={},Z=Y,Q=n,tt=x,et=function(t){return tt(t)?t:void 0},rt=function(t,e){return arguments.length<2?et(Z[t])||et(Q[t]):Z[t]&&Z[t][e]||Q[t]&&Q[t][e]},nt=p({}.isPrototypeOf),ot=n.navigator,it=ot&&ot.userAgent,at=it?String(it):"",ut=n,st=at,ct=ut.process,lt=ut.Deno,ft=ct&&ct.versions||lt&<.version,vt=ft&&ft.v8;vt&&(I=(L=vt.split("."))[0]>0&&L[0]<4?1:+(L[0]+L[1])),!I&&st&&(!(L=st.match(/Edge\/(\d+)/))||L[1]>=74)&&(L=st.match(/Chrome\/(\d+)/))&&(I=+L[1]);var dt=I,ht=dt,pt=o,yt=n.String,gt=!!Object.getOwnPropertySymbols&&!pt((function(){var t=Symbol("symbol detection");return!yt(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&ht&&ht<41})),mt=gt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,bt=rt,_t=x,wt=nt,St=Object,Et=mt?function(t){return"symbol"==typeof t}:function(t){var e=bt("Symbol");return _t(e)&&wt(e.prototype,St(t))},xt=String,Tt=function(t){try{return xt(t)}catch(e){return"Object"}},Ot=x,Rt=Tt,kt=TypeError,Ct=function(t){if(Ot(t))return t;throw new kt(Rt(t)+" is not a function")},At=Ct,Pt=z,jt=function(t,e){var r=t[e];return Pt(r)?void 0:At(r)},Dt=C,Lt=x,It=K,Mt=TypeError,Ft={exports:{}},Nt=n,Wt=Object.defineProperty,Ut=n,Gt=function(t,e){try{Wt(Nt,t,{value:e,configurable:!0,writable:!0})}catch(r){Nt[t]=e}return e},zt="__core-js_shared__",Vt=Ft.exports=Ut[zt]||Gt(zt,{});(Vt.versions||(Vt.versions=[])).push({version:"3.39.0",mode:"pure",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.39.0/LICENSE",source:"https://github.com/zloirock/core-js"});var Bt=Ft.exports,Ht=Bt,Xt=function(t,e){return Ht[t]||(Ht[t]=e||{})},qt=H,Jt=Object,$t=function(t){return Jt(qt(t))},Kt=$t,Yt=p({}.hasOwnProperty),Zt=Object.hasOwn||function(t,e){return Yt(Kt(t),e)},Qt=p,te=0,ee=Math.random(),re=Qt(1..toString),ne=function(t){return"Symbol("+(void 0===t?"":t)+")_"+re(++te+ee,36)},oe=Xt,ie=Zt,ae=ne,ue=gt,se=mt,ce=n.Symbol,le=oe("wks"),fe=se?ce.for||ce:ce&&ce.withoutSetter||ae,ve=function(t){return ie(le,t)||(le[t]=ue&&ie(ce,t)?ce[t]:fe("Symbol."+t)),le[t]},de=C,he=K,pe=Et,ye=jt,ge=function(t,e){var r,n;if("string"===e&&Lt(r=t.toString)&&!It(n=Dt(r,t)))return n;if(Lt(r=t.valueOf)&&!It(n=Dt(r,t)))return n;if("string"!==e&&Lt(r=t.toString)&&!It(n=Dt(r,t)))return n;throw new Mt("Can't convert object to primitive value")},me=TypeError,be=ve("toPrimitive"),_e=function(t,e){if(!he(t)||pe(t))return t;var r,n=ye(t,be);if(n){if(void 0===e&&(e="default"),r=de(n,t,e),!he(r)||pe(r))return r;throw new me("Can't convert object to primitive value")}return void 0===e&&(e="number"),ge(t,e)},we=_e,Se=Et,Ee=function(t){var e=we(t,"string");return Se(e)?e:e+""},xe=K,Te=n.document,Oe=xe(Te)&&xe(Te.createElement),Re=function(t){return Oe?Te.createElement(t):{}},ke=Re,Ce=!O&&!o((function(){return 7!==Object.defineProperty(ke("div"),"a",{get:function(){return 7}}).a})),Ae=O,Pe=C,je=A,De=M,Le=J,Ie=Ee,Me=Zt,Fe=Ce,Ne=Object.getOwnPropertyDescriptor;T.f=Ae?Ne:function(t,e){if(t=Le(t),e=Ie(e),Fe)try{return Ne(t,e)}catch(r){}if(Me(t,e))return De(!Pe(je.f,t,e),t[e])};var We=o,Ue=x,Ge=/#|\.prototype\./,ze=function(t,e){var r=Be[Ve(t)];return r===Xe||r!==He&&(Ue(e)?We(e):!!e)},Ve=ze.normalize=function(t){return String(t).replace(Ge,".").toLowerCase()},Be=ze.data={},He=ze.NATIVE="N",Xe=ze.POLYFILL="P",qe=ze,Je=Ct,$e=i,Ke=S(S.bind),Ye=function(t,e){return Je(t),void 0===e?t:$e?Ke(t,e):function(){return t.apply(e,arguments)}},Ze={},Qe=O&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),tr=K,er=String,rr=TypeError,nr=function(t){if(tr(t))return t;throw new rr(er(t)+" is not an object")},or=O,ir=Ce,ar=Qe,ur=nr,sr=Ee,cr=TypeError,lr=Object.defineProperty,fr=Object.getOwnPropertyDescriptor,vr="enumerable",dr="configurable",hr="writable";Ze.f=or?ar?function(t,e,r){if(ur(t),e=sr(e),ur(r),"function"==typeof t&&"prototype"===e&&"value"in r&&hr in r&&!r[hr]){var n=fr(t,e);n&&n[hr]&&(t[e]=r.value,r={configurable:dr in r?r[dr]:n[dr],enumerable:vr in r?r[vr]:n[vr],writable:!1})}return lr(t,e,r)}:lr:function(t,e,r){if(ur(t),e=sr(e),ur(r),ir)try{return lr(t,e,r)}catch(n){}if("get"in r||"set"in r)throw new cr("Accessors not supported");return"value"in r&&(t[e]=r.value),t};var pr=Ze,yr=M,gr=O?function(t,e,r){return pr.f(t,e,yr(1,r))}:function(t,e,r){return t[e]=r,t},mr=n,br=l,_r=S,wr=x,Sr=T.f,Er=qe,xr=Y,Tr=Ye,Or=gr,Rr=Zt,kr=function(t){var e=function(r,n,o){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(r);case 2:return new t(r,n)}return new t(r,n,o)}return br(t,this,arguments)};return e.prototype=t.prototype,e},Cr=function(t,e){var r,n,o,i,a,u,s,c,l,f=t.target,v=t.global,d=t.stat,h=t.proto,p=v?mr:d?mr[f]:mr[f]&&mr[f].prototype,y=v?xr:xr[f]||Or(xr,f,{})[f],g=y.prototype;for(i in e)n=!(r=Er(v?i:f+(d?".":"#")+i,t.forced))&&p&&Rr(p,i),u=y[i],n&&(s=t.dontCallGetSet?(l=Sr(p,i))&&l.value:p[i]),a=n&&s?s:e[i],(r||h||typeof u!=typeof a)&&(c=t.bind&&n?Tr(a,mr):t.wrap&&n?kr(a):h&&wr(a)?_r(a):a,(t.sham||a&&a.sham||u&&u.sham)&&Or(c,"sham",!0),Or(y,i,c),h&&(Rr(xr,o=f+"Prototype")||Or(xr,o,{}),Or(xr[o],i,a),t.real&&g&&(r||!g[i])&&Or(g,i,a)))},Ar=p([].slice),Pr=p,jr=Ct,Dr=K,Lr=Zt,Ir=Ar,Mr=i,Fr=Function,Nr=Pr([].concat),Wr=Pr([].join),Ur={},Gr=Mr?Fr.bind:function(t){var e=jr(this),r=e.prototype,n=Ir(arguments,1),o=function(){var r=Nr(n,Ir(arguments));return this instanceof o?function(t,e,r){if(!Lr(Ur,e)){for(var n=[],o=0;o<e;o++)n[o]="a["+o+"]";Ur[e]=Fr("C,a","return new C("+Wr(n,",")+")")}return Ur[e](t,r)}(e,r.length,r):e.apply(t,r)};return Dr(r)&&(o.prototype=r),o},zr={};zr[ve("toStringTag")]="z";var Vr="[object z]"===String(zr),Br=Vr,Hr=x,Xr=b,qr=ve("toStringTag"),Jr=Object,$r="Arguments"===Xr(function(){return arguments}()),Kr=Br?Xr:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(r){}}(e=Jr(t),qr))?r:$r?Xr(e):"Object"===(n=Xr(e))&&Hr(e.callee)?"Arguments":n},Yr=x,Zr=Bt,Qr=p(Function.toString);Yr(Zr.inspectSource)||(Zr.inspectSource=function(t){return Qr(t)});var tn=Zr.inspectSource,en=p,rn=o,nn=x,on=Kr,an=tn,un=function(){},sn=rt("Reflect","construct"),cn=/^\s*(?:class|function)\b/,ln=en(cn.exec),fn=!cn.test(un),vn=function(t){if(!nn(t))return!1;try{return sn(un,[],t),!0}catch(e){return!1}},dn=function(t){if(!nn(t))return!1;switch(on(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return fn||!!ln(cn,an(t))}catch(e){return!0}};dn.sham=!0;var hn=!sn||rn((function(){var t;return vn(vn.call)||!vn(Object)||!vn((function(){t=!0}))||t}))?dn:vn,pn=hn,yn=Tt,gn=TypeError,mn=function(t){if(pn(t))return t;throw new gn(yn(t)+" is not a constructor")},bn={},_n=Math.ceil,wn=Math.floor,Sn=Math.trunc||function(t){var e=+t;return(e>0?wn:_n)(e)},En=function(t){var e=+t;return e!=e||0===e?0:Sn(e)},xn=En,Tn=Math.max,On=Math.min,Rn=function(t,e){var r=xn(t);return r<0?Tn(r+e,0):On(r,e)},kn=En,Cn=Math.min,An=function(t){var e=kn(t);return e>0?Cn(e,9007199254740991):0},Pn=An,jn=function(t){return Pn(t.length)},Dn=J,Ln=Rn,In=jn,Mn=function(t){return function(e,r,n){var o=Dn(e),i=In(o);if(0===i)return!t&&-1;var a,u=Ln(n,i);if(t&&r!=r){for(;i>u;)if((a=o[u++])!=a)return!0}else for(;i>u;u++)if((t||u in o)&&o[u]===r)return t||u||0;return!t&&-1}},Fn={includes:Mn(!0),indexOf:Mn(!1)},Nn={},Wn=Zt,Un=J,Gn=Fn.indexOf,zn=Nn,Vn=p([].push),Bn=function(t,e){var r,n=Un(t),o=0,i=[];for(r in n)!Wn(zn,r)&&Wn(n,r)&&Vn(i,r);for(;e.length>o;)Wn(n,r=e[o++])&&(~Gn(i,r)||Vn(i,r));return i},Hn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Xn=Bn,qn=Hn,Jn=Object.keys||function(t){return Xn(t,qn)},$n=O,Kn=Qe,Yn=Ze,Zn=nr,Qn=J,to=Jn;bn.f=$n&&!Kn?Object.defineProperties:function(t,e){Zn(t);for(var r,n=Qn(e),o=to(e),i=o.length,a=0;i>a;)Yn.f(t,r=o[a++],n[r]);return t};var eo,ro=rt("document","documentElement"),no=ne,oo=Xt("keys"),io=function(t){return oo[t]||(oo[t]=no(t))},ao=nr,uo=bn,so=Hn,co=Nn,lo=ro,fo=Re,vo="prototype",ho="script",po=io("IE_PROTO"),yo=function(){},go=function(t){return"<"+ho+">"+t+"</"+ho+">"},mo=function(t){t.write(go("")),t.close();var e=t.parentWindow.Object;return t=null,e},bo=function(){try{eo=new ActiveXObject("htmlfile")}catch(o){}var t,e,r;bo="undefined"!=typeof document?document.domain&&eo?mo(eo):(e=fo("iframe"),r="java"+ho+":",e.style.display="none",lo.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(go("document.F=Object")),t.close(),t.F):mo(eo);for(var n=so.length;n--;)delete bo[vo][so[n]];return bo()};co[po]=!0;var _o=Object.create||function(t,e){var r;return null!==t?(yo[vo]=ao(t),r=new yo,yo[vo]=null,r[po]=t):r=bo(),void 0===e?r:uo.f(r,e)},wo=Cr,So=l,Eo=Gr,xo=mn,To=nr,Oo=K,Ro=_o,ko=o,Co=rt("Reflect","construct"),Ao=Object.prototype,Po=[].push,jo=ko((function(){function t(){}return!(Co((function(){}),[],t)instanceof t)})),Do=!ko((function(){Co((function(){}))})),Lo=jo||Do;wo({target:"Reflect",stat:!0,forced:Lo,sham:Lo},{construct:function(t,e){xo(t),To(e);var r=arguments.length<3?t:xo(arguments[2]);if(Do&&!jo)return Co(t,e,r);if(t===r){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var n=[null];return So(Po,n,e),new(So(Eo,t,n))}var o=r.prototype,i=Ro(Oo(o)?o:Ao),a=So(t,i,e);return Oo(a)?a:i}});var Io=Y.Reflect.construct,Mo=e(Io),Fo=e(Io),No=b,Wo=Array.isArray||function(t){return"Array"===No(t)},Uo=TypeError,Go=function(t){if(t>9007199254740991)throw Uo("Maximum allowed index exceeded");return t},zo=O,Vo=Ze,Bo=M,Ho=function(t,e,r){zo?Vo.f(t,e,Bo(0,r)):t[e]=r},Xo=Wo,qo=hn,Jo=K,$o=ve("species"),Ko=Array,Yo=function(t){var e;return Xo(t)&&(e=t.constructor,(qo(e)&&(e===Ko||Xo(e.prototype))||Jo(e)&&null===(e=e[$o]))&&(e=void 0)),void 0===e?Ko:e},Zo=function(t,e){return new(Yo(t))(0===e?0:e)},Qo=o,ti=dt,ei=ve("species"),ri=function(t){return ti>=51||!Qo((function(){var e=[];return(e.constructor={})[ei]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},ni=Cr,oi=o,ii=Wo,ai=K,ui=$t,si=jn,ci=Go,li=Ho,fi=Zo,vi=ri,di=dt,hi=ve("isConcatSpreadable"),pi=di>=51||!oi((function(){var t=[];return t[hi]=!1,t.concat()[0]!==t})),yi=function(t){if(!ai(t))return!1;var e=t[hi];return void 0!==e?!!e:ii(t)};ni({target:"Array",proto:!0,arity:1,forced:!pi||!vi("concat")},{concat:function(t){var e,r,n,o,i,a=ui(this),u=fi(a,0),s=0;for(e=-1,n=arguments.length;e<n;e++)if(yi(i=-1===e?a:arguments[e]))for(o=si(i),ci(s+o),r=0;r<o;r++,s++)r in i&&li(u,s,i[r]);else ci(s+1),li(u,s++,i);return u.length=s,u}});var gi=Kr,mi=String,bi=function(t){if("Symbol"===gi(t))throw new TypeError("Cannot convert a Symbol value to a string");return mi(t)},_i={},wi=Bn,Si=Hn.concat("length","prototype");_i.f=Object.getOwnPropertyNames||function(t){return wi(t,Si)};var Ei={},xi=b,Ti=J,Oi=_i.f,Ri=Ar,ki="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Ei.f=function(t){return ki&&"Window"===xi(t)?function(t){try{return Oi(t)}catch(e){return Ri(ki)}}(t):Oi(Ti(t))};var Ci={};Ci.f=Object.getOwnPropertySymbols;var Ai=gr,Pi=function(t,e,r,n){return n&&n.enumerable?t[e]=r:Ai(t,e,r),t},ji=Ze,Di=function(t,e,r){return ji.f(t,e,r)},Li={},Ii=ve;Li.f=Ii;var Mi,Fi,Ni,Wi=Y,Ui=Zt,Gi=Li,zi=Ze.f,Vi=function(t){var e=Wi.Symbol||(Wi.Symbol={});Ui(e,t)||zi(e,t,{value:Gi.f(t)})},Bi=C,Hi=rt,Xi=ve,qi=Pi,Ji=function(){var t=Hi("Symbol"),e=t&&t.prototype,r=e&&e.valueOf,n=Xi("toPrimitive");e&&!e[n]&&qi(e,n,(function(t){return Bi(r,this)}),{arity:1})},$i=Kr,Ki=Vr?{}.toString:function(){return"[object "+$i(this)+"]"},Yi=Vr,Zi=Ze.f,Qi=gr,ta=Zt,ea=Ki,ra=ve("toStringTag"),na=function(t,e,r,n){var o=r?t:t&&t.prototype;o&&(ta(o,ra)||Zi(o,ra,{configurable:!0,value:e}),n&&!Yi&&Qi(o,"toString",ea))},oa=x,ia=n.WeakMap,aa=oa(ia)&&/native code/.test(String(ia)),ua=n,sa=K,ca=gr,la=Zt,fa=Bt,va=io,da=Nn,ha="Object already initialized",pa=ua.TypeError,ya=ua.WeakMap;if(aa||fa.state){var ga=fa.state||(fa.state=new ya);ga.get=ga.get,ga.has=ga.has,ga.set=ga.set,Mi=function(t,e){if(ga.has(t))throw new pa(ha);return e.facade=t,ga.set(t,e),e},Fi=function(t){return ga.get(t)||{}},Ni=function(t){return ga.has(t)}}else{var ma=va("state");da[ma]=!0,Mi=function(t,e){if(la(t,ma))throw new pa(ha);return e.facade=t,ca(t,ma,e),e},Fi=function(t){return la(t,ma)?t[ma]:{}},Ni=function(t){return la(t,ma)}}var ba={set:Mi,get:Fi,has:Ni,enforce:function(t){return Ni(t)?Fi(t):Mi(t,{})},getterFor:function(t){return function(e){var r;if(!sa(e)||(r=Fi(e)).type!==t)throw new pa("Incompatible receiver, "+t+" required");return r}}},_a=Ye,wa=G,Sa=$t,Ea=jn,xa=Zo,Ta=p([].push),Oa=function(t){var e=1===t,r=2===t,n=3===t,o=4===t,i=6===t,a=7===t,u=5===t||i;return function(s,c,l,f){for(var v,d,h=Sa(s),p=wa(h),y=Ea(p),g=_a(c,l),m=0,b=f||xa,_=e?b(s,y):r||a?b(s,0):void 0;y>m;m++)if((u||m in p)&&(d=g(v=p[m],m,h),t))if(e)_[m]=d;else if(d)switch(t){case 3:return!0;case 5:return v;case 6:return m;case 2:Ta(_,v)}else switch(t){case 4:return!1;case 7:Ta(_,v)}return i?-1:n||o?o:_}},Ra={forEach:Oa(0),map:Oa(1),filter:Oa(2),some:Oa(3),every:Oa(4),find:Oa(5),findIndex:Oa(6),filterReject:Oa(7)},ka=Cr,Ca=n,Aa=C,Pa=p,ja=O,Da=gt,La=o,Ia=Zt,Ma=nt,Fa=nr,Na=J,Wa=Ee,Ua=bi,Ga=M,za=_o,Va=Jn,Ba=_i,Ha=Ei,Xa=Ci,qa=T,Ja=Ze,$a=bn,Ka=A,Ya=Pi,Za=Di,Qa=Xt,tu=Nn,eu=ne,ru=ve,nu=Li,ou=Vi,iu=Ji,au=na,uu=ba,su=Ra.forEach,cu=io("hidden"),lu="Symbol",fu="prototype",vu=uu.set,du=uu.getterFor(lu),hu=Object[fu],pu=Ca.Symbol,yu=pu&&pu[fu],gu=Ca.RangeError,mu=Ca.TypeError,bu=Ca.QObject,_u=qa.f,wu=Ja.f,Su=Ha.f,Eu=Ka.f,xu=Pa([].push),Tu=Qa("symbols"),Ou=Qa("op-symbols"),Ru=Qa("wks"),ku=!bu||!bu[fu]||!bu[fu].findChild,Cu=function(t,e,r){var n=_u(hu,e);n&&delete hu[e],wu(t,e,r),n&&t!==hu&&wu(hu,e,n)},Au=ja&&La((function(){return 7!==za(wu({},"a",{get:function(){return wu(this,"a",{value:7}).a}})).a}))?Cu:wu,Pu=function(t,e){var r=Tu[t]=za(yu);return vu(r,{type:lu,tag:t,description:e}),ja||(r.description=e),r},ju=function(t,e,r){t===hu&&ju(Ou,e,r),Fa(t);var n=Wa(e);return Fa(r),Ia(Tu,n)?(r.enumerable?(Ia(t,cu)&&t[cu][n]&&(t[cu][n]=!1),r=za(r,{enumerable:Ga(0,!1)})):(Ia(t,cu)||wu(t,cu,Ga(1,za(null))),t[cu][n]=!0),Au(t,n,r)):wu(t,n,r)},Du=function(t,e){Fa(t);var r=Na(e),n=Va(r).concat(Fu(r));return su(n,(function(e){ja&&!Aa(Lu,r,e)||ju(t,e,r[e])})),t},Lu=function(t){var e=Wa(t),r=Aa(Eu,this,e);return!(this===hu&&Ia(Tu,e)&&!Ia(Ou,e))&&(!(r||!Ia(this,e)||!Ia(Tu,e)||Ia(this,cu)&&this[cu][e])||r)},Iu=function(t,e){var r=Na(t),n=Wa(e);if(r!==hu||!Ia(Tu,n)||Ia(Ou,n)){var o=_u(r,n);return!o||!Ia(Tu,n)||Ia(r,cu)&&r[cu][n]||(o.enumerable=!0),o}},Mu=function(t){var e=Su(Na(t)),r=[];return su(e,(function(t){Ia(Tu,t)||Ia(tu,t)||xu(r,t)})),r},Fu=function(t){var e=t===hu,r=Su(e?Ou:Na(t)),n=[];return su(r,(function(t){!Ia(Tu,t)||e&&!Ia(hu,t)||xu(n,Tu[t])})),n};Da||(pu=function(){if(Ma(yu,this))throw new mu("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?Ua(arguments[0]):void 0,e=eu(t),r=function(t){var n=void 0===this?Ca:this;n===hu&&Aa(r,Ou,t),Ia(n,cu)&&Ia(n[cu],e)&&(n[cu][e]=!1);var o=Ga(1,t);try{Au(n,e,o)}catch(i){if(!(i instanceof gu))throw i;Cu(n,e,o)}};return ja&&ku&&Au(hu,e,{configurable:!0,set:r}),Pu(e,t)},Ya(yu=pu[fu],"toString",(function(){return du(this).tag})),Ya(pu,"withoutSetter",(function(t){return Pu(eu(t),t)})),Ka.f=Lu,Ja.f=ju,$a.f=Du,qa.f=Iu,Ba.f=Ha.f=Mu,Xa.f=Fu,nu.f=function(t){return Pu(ru(t),t)},ja&&Za(yu,"description",{configurable:!0,get:function(){return du(this).description}})),ka({global:!0,constructor:!0,wrap:!0,forced:!Da,sham:!Da},{Symbol:pu}),su(Va(Ru),(function(t){ou(t)})),ka({target:lu,stat:!0,forced:!Da},{useSetter:function(){ku=!0},useSimple:function(){ku=!1}}),ka({target:"Object",stat:!0,forced:!Da,sham:!ja},{create:function(t,e){return void 0===e?za(t):Du(za(t),e)},defineProperty:ju,defineProperties:Du,getOwnPropertyDescriptor:Iu}),ka({target:"Object",stat:!0,forced:!Da},{getOwnPropertyNames:Mu}),iu(),au(pu,lu),tu[cu]=!0;var Nu=gt&&!!Symbol.for&&!!Symbol.keyFor,Wu=Cr,Uu=rt,Gu=Zt,zu=bi,Vu=Xt,Bu=Nu,Hu=Vu("string-to-symbol-registry"),Xu=Vu("symbol-to-string-registry");Wu({target:"Symbol",stat:!0,forced:!Bu},{for:function(t){var e=zu(t);if(Gu(Hu,e))return Hu[e];var r=Uu("Symbol")(e);return Hu[e]=r,Xu[r]=e,r}});var qu=Cr,Ju=Zt,$u=Et,Ku=Tt,Yu=Nu,Zu=Xt("symbol-to-string-registry");qu({target:"Symbol",stat:!0,forced:!Yu},{keyFor:function(t){if(!$u(t))throw new TypeError(Ku(t)+" is not a symbol");if(Ju(Zu,t))return Zu[t]}});var Qu=Wo,ts=x,es=b,rs=bi,ns=p([].push),os=Cr,is=rt,as=l,us=C,ss=p,cs=o,ls=x,fs=Et,vs=Ar,ds=function(t){if(ts(t))return t;if(Qu(t)){for(var e=t.length,r=[],n=0;n<e;n++){var o=t[n];"string"==typeof o?ns(r,o):"number"!=typeof o&&"Number"!==es(o)&&"String"!==es(o)||ns(r,rs(o))}var i=r.length,a=!0;return function(t,e){if(a)return a=!1,e;if(Qu(this))return e;for(var n=0;n<i;n++)if(r[n]===t)return e}}},hs=gt,ps=String,ys=is("JSON","stringify"),gs=ss(/./.exec),ms=ss("".charAt),bs=ss("".charCodeAt),_s=ss("".replace),ws=ss(1..toString),Ss=/[\uD800-\uDFFF]/g,Es=/^[\uD800-\uDBFF]$/,xs=/^[\uDC00-\uDFFF]$/,Ts=!hs||cs((function(){var t=is("Symbol")("stringify detection");return"[null]"!==ys([t])||"{}"!==ys({a:t})||"{}"!==ys(Object(t))})),Os=cs((function(){return'"\\udf06\\ud834"'!==ys("\udf06\ud834")||'"\\udead"'!==ys("\udead")})),Rs=function(t,e){var r=vs(arguments),n=ds(e);if(ls(n)||void 0!==t&&!fs(t))return r[1]=function(t,e){if(ls(n)&&(e=us(n,this,ps(t),e)),!fs(e))return e},as(ys,null,r)},ks=function(t,e,r){var n=ms(r,e-1),o=ms(r,e+1);return gs(Es,t)&&!gs(xs,o)||gs(xs,t)&&!gs(Es,n)?"\\u"+ws(bs(t,0),16):t};ys&&os({target:"JSON",stat:!0,arity:3,forced:Ts||Os},{stringify:function(t,e,r){var n=vs(arguments),o=as(Ts?Rs:ys,null,n);return Os&&"string"==typeof o?_s(o,Ss,ks):o}});var Cs=Ci,As=$t;Cr({target:"Object",stat:!0,forced:!gt||o((function(){Cs.f(1)}))},{getOwnPropertySymbols:function(t){var e=Cs.f;return e?e(As(t)):[]}}),Vi("asyncIterator"),Vi("hasInstance"),Vi("isConcatSpreadable"),Vi("iterator"),Vi("match"),Vi("matchAll"),Vi("replace"),Vi("search"),Vi("species"),Vi("split");var Ps=Ji;Vi("toPrimitive"),Ps();var js=rt,Ds=na;Vi("toStringTag"),Ds(js("Symbol"),"Symbol"),Vi("unscopables"),na(n.JSON,"JSON",!0);var Ls,Is,Ms,Fs=Y.Symbol,Ns={},Ws=O,Us=Zt,Gs=Function.prototype,zs=Ws&&Object.getOwnPropertyDescriptor,Vs=Us(Gs,"name"),Bs={EXISTS:Vs,PROPER:Vs&&"something"===function(){}.name,CONFIGURABLE:Vs&&(!Ws||Ws&&zs(Gs,"name").configurable)},Hs=!o((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Xs=Zt,qs=x,Js=$t,$s=Hs,Ks=io("IE_PROTO"),Ys=Object,Zs=Ys.prototype,Qs=$s?Ys.getPrototypeOf:function(t){var e=Js(t);if(Xs(e,Ks))return e[Ks];var r=e.constructor;return qs(r)&&e instanceof r?r.prototype:e instanceof Ys?Zs:null},tc=o,ec=x,rc=K,nc=_o,oc=Qs,ic=Pi,ac=ve("iterator"),uc=!1;[].keys&&("next"in(Ms=[].keys())?(Is=oc(oc(Ms)))!==Object.prototype&&(Ls=Is):uc=!0);var sc=!rc(Ls)||tc((function(){var t={};return Ls[ac].call(t)!==t}));ec((Ls=sc?{}:nc(Ls))[ac])||ic(Ls,ac,(function(){return this}));var cc={IteratorPrototype:Ls,BUGGY_SAFARI_ITERATORS:uc},lc=cc.IteratorPrototype,fc=_o,vc=M,dc=na,hc=Ns,pc=function(){return this},yc=p,gc=Ct,mc=K,bc=function(t){return mc(t)||null===t},_c=String,wc=TypeError,Sc=function(t,e,r){try{return yc(gc(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(n){}},Ec=K,xc=H,Tc=function(t){if(bc(t))return t;throw new wc("Can't set "+_c(t)+" as a prototype")},Oc=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=Sc(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(n){}return function(r,n){return xc(r),Tc(n),Ec(r)?(e?t(r,n):r.__proto__=n,r):r}}():void 0),Rc=Cr,kc=C,Cc=Bs,Ac=function(t,e,r,n){var o=e+" Iterator";return t.prototype=fc(lc,{next:vc(+!n,r)}),dc(t,o,!1,!0),hc[o]=pc,t},Pc=Qs,jc=na,Dc=Pi,Lc=Ns,Ic=cc,Mc=Cc.PROPER,Fc=Ic.BUGGY_SAFARI_ITERATORS,Nc=ve("iterator"),Wc="keys",Uc="values",Gc="entries",zc=function(){return this},Vc=function(t,e,r,n,o,i,a){Ac(r,e,n);var u,s,c,l=function(t){if(t===o&&p)return p;if(!Fc&&t&&t in d)return d[t];switch(t){case Wc:case Uc:case Gc:return function(){return new r(this,t)}}return function(){return new r(this)}},f=e+" Iterator",v=!1,d=t.prototype,h=d[Nc]||d["@@iterator"]||o&&d[o],p=!Fc&&h||l(o),y="Array"===e&&d.entries||h;if(y&&(u=Pc(y.call(new t)))!==Object.prototype&&u.next&&(jc(u,f,!0,!0),Lc[f]=zc),Mc&&o===Uc&&h&&h.name!==Uc&&(v=!0,p=function(){return kc(h,this)}),o)if(s={values:l(Uc),keys:i?p:l(Wc),entries:l(Gc)},a)for(c in s)(Fc||v||!(c in d))&&Dc(d,c,s[c]);else Rc({target:e,proto:!0,forced:Fc||v},s);return a&&d[Nc]!==p&&Dc(d,Nc,p,{name:o}),Lc[e]=p,s},Bc=function(t,e){return{value:t,done:e}},Hc=J,Xc=Ns,qc=ba;Ze.f;var Jc=Vc,$c=Bc,Kc="Array Iterator",Yc=qc.set,Zc=qc.getterFor(Kc);Jc(Array,"Array",(function(t,e){Yc(this,{type:Kc,target:Hc(t),index:0,kind:e})}),(function(){var t=Zc(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,$c(void 0,!0);switch(t.kind){case"keys":return $c(r,!1);case"values":return $c(e[r],!1)}return $c([r,e[r]],!1)}),"values"),Xc.Arguments=Xc.Array;var Qc={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},tl=n,el=na,rl=Ns;for(var nl in Qc)el(tl[nl],nl),rl[nl]=rl.Array;var ol=Fs,il=ve,al=Ze.f,ul=il("metadata"),sl=Function.prototype;void 0===sl[ul]&&al(sl,ul,{value:null}),Vi("asyncDispose"),Vi("dispose"),Vi("metadata");var cl=ol,ll=p,fl=rt("Symbol"),vl=fl.keyFor,dl=ll(fl.prototype.valueOf),hl=fl.isRegisteredSymbol||function(t){try{return void 0!==vl(dl(t))}catch(e){return!1}};Cr({target:"Symbol",stat:!0},{isRegisteredSymbol:hl});for(var pl=Xt,yl=rt,gl=p,ml=Et,bl=ve,_l=yl("Symbol"),wl=_l.isWellKnownSymbol,Sl=yl("Object","getOwnPropertyNames"),El=gl(_l.prototype.valueOf),xl=pl("wks"),Tl=0,Ol=Sl(_l),Rl=Ol.length;Tl<Rl;Tl++)try{var kl=Ol[Tl];ml(_l[kl])&&bl(kl)}catch(LO){}var Cl=function(t){if(wl&&wl(t))return!0;try{for(var e=El(t),r=0,n=Sl(xl),o=n.length;r<o;r++)if(xl[n[r]]==e)return!0}catch(LO){}return!1};Cr({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:Cl}),Vi("customMatcher"),Vi("observable"),Cr({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:hl}),Cr({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:Cl}),Vi("matcher"),Vi("metadataKey"),Vi("patternMatch"),Vi("replaceAll");var Al=cl,Pl=e(Al),jl=p,Dl=En,Ll=bi,Il=H,Ml=jl("".charAt),Fl=jl("".charCodeAt),Nl=jl("".slice),Wl=function(t){return function(e,r){var n,o,i=Ll(Il(e)),a=Dl(r),u=i.length;return a<0||a>=u?t?"":void 0:(n=Fl(i,a))<55296||n>56319||a+1===u||(o=Fl(i,a+1))<56320||o>57343?t?Ml(i,a):n:t?Nl(i,a,a+2):o-56320+(n-55296<<10)+65536}},Ul={codeAt:Wl(!1),charAt:Wl(!0)}.charAt,Gl=bi,zl=ba,Vl=Vc,Bl=Bc,Hl="String Iterator",Xl=zl.set,ql=zl.getterFor(Hl);Vl(String,"String",(function(t){Xl(this,{type:Hl,string:Gl(t),index:0})}),(function(){var t,e=ql(this),r=e.string,n=e.index;return n>=r.length?Bl(void 0,!0):(t=Ul(r,n),e.index+=t.length,Bl(t,!1))}));var Jl=Li.f("iterator"),$l=e(Jl);function Kl(t){return(Kl="function"==typeof Pl&&"symbol"==typeof $l?function(t){return typeof t}:function(t){return t&&"function"==typeof Pl&&t.constructor===Pl&&t!==Pl.prototype?"symbol":typeof t})(t)}var Yl={exports:{}},Zl=Cr,Ql=O,tf=Ze.f;Zl({target:"Object",stat:!0,forced:Object.defineProperty!==tf,sham:!Ql},{defineProperty:tf});var ef=Y.Object,rf=Yl.exports=function(t,e,r){return ef.defineProperty(t,e,r)};ef.defineProperty.sham&&(rf.sham=!0);var nf=Yl.exports,of=e(nf);Cr({target:"Object",stat:!0,sham:!O},{create:_o});var af=Y.Object,uf=function(t,e){return af.create(t,e)},sf=e(uf),cf=$t,lf=Qs,ff=Hs;Cr({target:"Object",stat:!0,forced:o((function(){lf(1)})),sham:!ff},{getPrototypeOf:function(t){return lf(cf(t))}});var vf=Y.Object.getPrototypeOf,df=e(vf),hf=o,pf=function(t,e){var r=[][t];return!!r&&hf((function(){r.call(null,e||function(){return 1},1)}))},yf=Ra.forEach,gf=pf("forEach")?[].forEach:function(t){return yf(this,t,arguments.length>1?arguments[1]:void 0)};Cr({target:"Array",proto:!0,forced:[].forEach!==gf},{forEach:gf});var mf=n,bf=Y,_f=function(t,e){var r=bf[t+"Prototype"],n=r&&r[e];if(n)return n;var o=mf[t],i=o&&o.prototype;return i&&i[e]},wf=_f("Array","forEach"),Sf=Kr,Ef=Zt,xf=nt,Tf=wf,Of=Array.prototype,Rf={DOMTokenList:!0,NodeList:!0},kf=e((function(t){var e=t.forEach;return t===Of||xf(Of,t)&&e===Of.forEach||Ef(Rf,Sf(t))?Tf:e})),Cf=O,Af=Wo,Pf=TypeError,jf=Object.getOwnPropertyDescriptor,Df=Cf&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(LO){return LO instanceof TypeError}}(),Lf=$t,If=jn,Mf=Df?function(t,e){if(Af(t)&&!jf(t,"length").writable)throw new Pf("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e},Ff=Go;Cr({target:"Array",proto:!0,arity:1,forced:o((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(LO){return LO instanceof TypeError}}()},{push:function(t){var e=Lf(this),r=If(e),n=arguments.length;Ff(r+n);for(var o=0;o<n;o++)e[r]=arguments[o],r++;return Mf(e,r),r}});var Nf=_f("Array","push"),Wf=nt,Uf=Nf,Gf=Array.prototype,zf=e((function(t){var e=t.push;return t===Gf||Wf(Gf,t)&&e===Gf.push?Uf:e}));Cr({target:"Object",stat:!0},{setPrototypeOf:Oc});var Vf=Y.Object.setPrototypeOf,Bf=e(Vf),Hf=rt,Xf=_i,qf=Ci,Jf=nr,$f=p([].concat),Kf=Hf("Reflect","ownKeys")||function(t){var e=Xf.f(Jf(t)),r=qf.f;return r?$f(e,r(t)):e},Yf=Zt,Zf=Kf,Qf=T,tv=Ze,ev=K,rv=gr,nv=Error,ov=p("".replace),iv=String(new nv("zxcasd").stack),av=/\n\s*at [^:]*:[^\n]*/,uv=av.test(iv),sv=M,cv=!o((function(){var t=new Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",sv(1,7)),7!==t.stack)})),lv=gr,fv=function(t,e){if(uv&&"string"==typeof t&&!nv.prepareStackTrace)for(;e--;)t=ov(t,av,"");return t},vv=cv,dv=Error.captureStackTrace,hv=Ns,pv=ve("iterator"),yv=Array.prototype,gv=function(t){return void 0!==t&&(hv.Array===t||yv[pv]===t)},mv=Kr,bv=jt,_v=z,wv=Ns,Sv=ve("iterator"),Ev=function(t){if(!_v(t))return bv(t,Sv)||bv(t,"@@iterator")||wv[mv(t)]},xv=C,Tv=Ct,Ov=nr,Rv=Tt,kv=Ev,Cv=TypeError,Av=function(t,e){var r=arguments.length<2?kv(t):e;if(Tv(r))return Ov(xv(r,t));throw new Cv(Rv(t)+" is not iterable")},Pv=C,jv=nr,Dv=jt,Lv=function(t,e,r){var n,o;jv(t);try{if(!(n=Dv(t,"return"))){if("throw"===e)throw r;return r}n=Pv(n,t)}catch(LO){o=!0,n=LO}if("throw"===e)throw r;if(o)throw n;return jv(n),r},Iv=Ye,Mv=C,Fv=nr,Nv=Tt,Wv=gv,Uv=jn,Gv=nt,zv=Av,Vv=Ev,Bv=Lv,Hv=TypeError,Xv=function(t,e){this.stopped=t,this.result=e},qv=Xv.prototype,Jv=function(t,e,r){var n,o,i,a,u,s,c,l=r&&r.that,f=!(!r||!r.AS_ENTRIES),v=!(!r||!r.IS_RECORD),d=!(!r||!r.IS_ITERATOR),h=!(!r||!r.INTERRUPTED),p=Iv(e,l),y=function(t){return n&&Bv(n,"normal",t),new Xv(!0,t)},g=function(t){return f?(Fv(t),h?p(t[0],t[1],y):p(t[0],t[1])):h?p(t,y):p(t)};if(v)n=t.iterator;else if(d)n=t;else{if(!(o=Vv(t)))throw new Hv(Nv(t)+" is not iterable");if(Wv(o)){for(i=0,a=Uv(t);a>i;i++)if((u=g(t[i]))&&Gv(qv,u))return u;return new Xv(!1)}n=zv(t,o)}for(s=v?t.next:n.next;!(c=Mv(s,n)).done;){try{u=g(c.value)}catch(LO){Bv(n,"throw",LO)}if("object"==typeof u&&u&&Gv(qv,u))return u}return new Xv(!1)},$v=bi,Kv=Cr,Yv=nt,Zv=Qs,Qv=Oc,td=function(t,e,r){for(var n=Zf(e),o=tv.f,i=Qf.f,a=0;a<n.length;a++){var u=n[a];Yf(t,u)||r&&Yf(r,u)||o(t,u,i(e,u))}},ed=_o,rd=gr,nd=M,od=function(t,e){ev(e)&&"cause"in e&&rv(t,"cause",e.cause)},id=function(t,e,r,n){vv&&(dv?dv(t,e):lv(t,"stack",fv(r,n)))},ad=Jv,ud=function(t,e){return void 0===t?arguments.length<2?"":e:$v(t)},sd=ve("toStringTag"),cd=Error,ld=[].push,fd=function(t,e){var r,n=Yv(vd,this);Qv?r=Qv(new cd,n?Zv(this):vd):(r=n?this:ed(vd),rd(r,sd,"Error")),void 0!==e&&rd(r,"message",ud(e)),id(r,fd,r.stack,1),arguments.length>2&&od(r,arguments[2]);var o=[];return ad(t,ld,{that:o}),rd(r,"errors",o),r};Qv?Qv(fd,cd):td(fd,cd,{name:!0});var vd=fd.prototype=ed(cd.prototype,{constructor:nd(1,fd),message:nd(1,""),name:nd(1,"AggregateError")});Kv({global:!0,constructor:!0,arity:2},{AggregateError:fd});var dd,hd,pd,yd,gd=n,md=at,bd=b,_d=function(t){return md.slice(0,t.length)===t},wd=_d("Bun/")?"BUN":_d("Cloudflare-Workers")?"CLOUDFLARE":_d("Deno/")?"DENO":_d("Node.js/")?"NODE":gd.Bun&&"string"==typeof Bun.version?"BUN":gd.Deno&&"object"==typeof Deno.version?"DENO":"process"===bd(gd.process)?"NODE":gd.window&&gd.document?"BROWSER":"REST",Sd="NODE"===wd,Ed=rt,xd=Di,Td=O,Od=ve("species"),Rd=function(t){var e=Ed(t);Td&&e&&!e[Od]&&xd(e,Od,{configurable:!0,get:function(){return this}})},kd=nt,Cd=TypeError,Ad=function(t,e){if(kd(e,t))return t;throw new Cd("Incorrect invocation")},Pd=nr,jd=mn,Dd=z,Ld=ve("species"),Id=function(t,e){var r,n=Pd(t).constructor;return void 0===n||Dd(r=Pd(n)[Ld])?e:jd(r)},Md=TypeError,Fd=function(t,e){if(t<e)throw new Md("Not enough arguments");return t},Nd=/(?:ipad|iphone|ipod).*applewebkit/i.test(at),Wd=n,Ud=l,Gd=Ye,zd=x,Vd=Zt,Bd=o,Hd=ro,Xd=Ar,qd=Re,Jd=Fd,$d=Nd,Kd=Sd,Yd=Wd.setImmediate,Zd=Wd.clearImmediate,Qd=Wd.process,th=Wd.Dispatch,eh=Wd.Function,rh=Wd.MessageChannel,nh=Wd.String,oh=0,ih={},ah="onreadystatechange";Bd((function(){dd=Wd.location}));var uh=function(t){if(Vd(ih,t)){var e=ih[t];delete ih[t],e()}},sh=function(t){return function(){uh(t)}},ch=function(t){uh(t.data)},lh=function(t){Wd.postMessage(nh(t),dd.protocol+"//"+dd.host)};Yd&&Zd||(Yd=function(t){Jd(arguments.length,1);var e=zd(t)?t:eh(t),r=Xd(arguments,1);return ih[++oh]=function(){Ud(e,void 0,r)},hd(oh),oh},Zd=function(t){delete ih[t]},Kd?hd=function(t){Qd.nextTick(sh(t))}:th&&th.now?hd=function(t){th.now(sh(t))}:rh&&!$d?(yd=(pd=new rh).port2,pd.port1.onmessage=ch,hd=Gd(yd.postMessage,yd)):Wd.addEventListener&&zd(Wd.postMessage)&&!Wd.importScripts&&dd&&"file:"!==dd.protocol&&!Bd(lh)?(hd=lh,Wd.addEventListener("message",ch,!1)):hd=ah in qd("script")?function(t){Hd.appendChild(qd("script"))[ah]=function(){Hd.removeChild(this),uh(t)}}:function(t){setTimeout(sh(t),0)});var fh={set:Yd,clear:Zd},vh=n,dh=O,hh=Object.getOwnPropertyDescriptor,ph=function(){this.head=null,this.tail=null};ph.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var yh,gh,mh,bh,_h,wh=ph,Sh=/ipad|iphone|ipod/i.test(at)&&"undefined"!=typeof Pebble,Eh=/web0s(?!.*chrome)/i.test(at),xh=n,Th=function(t){if(!dh)return vh[t];var e=hh(vh,t);return e&&e.value},Oh=Ye,Rh=fh.set,kh=wh,Ch=Nd,Ah=Sh,Ph=Eh,jh=Sd,Dh=xh.MutationObserver||xh.WebKitMutationObserver,Lh=xh.document,Ih=xh.process,Mh=xh.Promise,Fh=Th("queueMicrotask");if(!Fh){var Nh=new kh,Wh=function(){var t,e;for(jh&&(t=Ih.domain)&&t.exit();e=Nh.get();)try{e()}catch(LO){throw Nh.head&&yh(),LO}t&&t.enter()};Ch||jh||Ph||!Dh||!Lh?!Ah&&Mh&&Mh.resolve?((bh=Mh.resolve(void 0)).constructor=Mh,_h=Oh(bh.then,bh),yh=function(){_h(Wh)}):jh?yh=function(){Ih.nextTick(Wh)}:(Rh=Oh(Rh,xh),yh=function(){Rh(Wh)}):(gh=!0,mh=Lh.createTextNode(""),new Dh(Wh).observe(mh,{characterData:!0}),yh=function(){mh.data=gh=!gh}),Fh=function(t){Nh.head||yh(),Nh.add(t)}}var Uh=Fh,Gh=function(t){try{return{error:!1,value:t()}}catch(LO){return{error:!0,value:LO}}},zh=n.Promise,Vh=n,Bh=zh,Hh=x,Xh=qe,qh=tn,Jh=ve,$h=wd,Kh=dt,Yh=Bh&&Bh.prototype,Zh=Jh("species"),Qh=!1,tp=Hh(Vh.PromiseRejectionEvent),ep={CONSTRUCTOR:Xh("Promise",(function(){var t=qh(Bh),e=t!==String(Bh);if(!e&&66===Kh)return!0;if(!Yh.catch||!Yh.finally)return!0;if(!Kh||Kh<51||!/native code/.test(t)){var r=new Bh((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};if((r.constructor={})[Zh]=n,!(Qh=r.then((function(){}))instanceof n))return!0}return!(e||"BROWSER"!==$h&&"DENO"!==$h||tp)})),REJECTION_EVENT:tp,SUBCLASSING:Qh},rp={},np=Ct,op=TypeError,ip=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw new op("Bad Promise constructor");e=t,r=n})),this.resolve=np(e),this.reject=np(r)};rp.f=function(t){return new ip(t)};var ap,up,sp=Cr,cp=Sd,lp=n,fp=C,vp=Pi,dp=na,hp=Rd,pp=Ct,yp=x,gp=K,mp=Ad,bp=Id,_p=fh.set,wp=Uh,Sp=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(LO){}},Ep=Gh,xp=wh,Tp=ba,Op=zh,Rp=ep,kp=rp,Cp="Promise",Ap=Rp.CONSTRUCTOR,Pp=Rp.REJECTION_EVENT,jp=Tp.getterFor(Cp),Dp=Tp.set,Lp=Op&&Op.prototype,Ip=Op,Mp=Lp,Fp=lp.TypeError,Np=lp.document,Wp=lp.process,Up=kp.f,Gp=Up,zp=!!(Np&&Np.createEvent&&lp.dispatchEvent),Vp="unhandledrejection",Bp=function(t){var e;return!(!gp(t)||!yp(e=t.then))&&e},Hp=function(t,e){var r,n,o,i=e.value,a=1===e.state,u=a?t.ok:t.fail,s=t.resolve,c=t.reject,l=t.domain;try{u?(a||(2===e.rejection&&Kp(e),e.rejection=1),!0===u?r=i:(l&&l.enter(),r=u(i),l&&(l.exit(),o=!0)),r===t.promise?c(new Fp("Promise-chain cycle")):(n=Bp(r))?fp(n,r,s,c):s(r)):c(i)}catch(LO){l&&!o&&l.exit(),c(LO)}},Xp=function(t,e){t.notified||(t.notified=!0,wp((function(){for(var r,n=t.reactions;r=n.get();)Hp(r,t);t.notified=!1,e&&!t.rejection&&Jp(t)})))},qp=function(t,e,r){var n,o;zp?((n=Np.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),lp.dispatchEvent(n)):n={promise:e,reason:r},!Pp&&(o=lp["on"+t])?o(n):t===Vp&&Sp("Unhandled promise rejection",r)},Jp=function(t){fp(_p,lp,(function(){var e,r=t.facade,n=t.value;if($p(t)&&(e=Ep((function(){cp?Wp.emit("unhandledRejection",n,r):qp(Vp,r,n)})),t.rejection=cp||$p(t)?2:1,e.error))throw e.value}))},$p=function(t){return 1!==t.rejection&&!t.parent},Kp=function(t){fp(_p,lp,(function(){var e=t.facade;cp?Wp.emit("rejectionHandled",e):qp("rejectionhandled",e,t.value)}))},Yp=function(t,e,r){return function(n){t(e,n,r)}},Zp=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,Xp(t,!0))},Qp=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw new Fp("Promise can't be resolved itself");var n=Bp(e);n?wp((function(){var r={done:!1};try{fp(n,e,Yp(Qp,r,t),Yp(Zp,r,t))}catch(LO){Zp(r,LO,t)}})):(t.value=e,t.state=1,Xp(t,!1))}catch(LO){Zp({done:!1},LO,t)}}};Ap&&(Mp=(Ip=function(t){mp(this,Mp),pp(t),fp(ap,this);var e=jp(this);try{t(Yp(Qp,e),Yp(Zp,e))}catch(LO){Zp(e,LO)}}).prototype,(ap=function(t){Dp(this,{type:Cp,done:!1,notified:!1,parent:!1,reactions:new xp,rejection:!1,state:0,value:null})}).prototype=vp(Mp,"then",(function(t,e){var r=jp(this),n=Up(bp(this,Ip));return r.parent=!0,n.ok=!yp(t)||t,n.fail=yp(e)&&e,n.domain=cp?Wp.domain:void 0,0===r.state?r.reactions.add(n):wp((function(){Hp(n,r)})),n.promise})),up=function(){var t=new ap,e=jp(t);this.promise=t,this.resolve=Yp(Qp,e),this.reject=Yp(Zp,e)},kp.f=Up=function(t){return t===Ip||undefined===t?new up(t):Gp(t)}),sp({global:!0,constructor:!0,wrap:!0,forced:Ap},{Promise:Ip}),dp(Ip,Cp,!1,!0),hp(Cp);var ty=ve("iterator"),ey=!1;try{var ry=0,ny={next:function(){return{done:!!ry++}},return:function(){ey=!0}};ny[ty]=function(){return this},Array.from(ny,(function(){throw 2}))}catch(LO){}var oy=function(t,e){try{if(!e&&!ey)return!1}catch(LO){return!1}var r=!1;try{var n={};n[ty]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(LO){}return r},iy=zh,ay=ep.CONSTRUCTOR||!oy((function(t){iy.all(t).then(void 0,(function(){}))})),uy=C,sy=Ct,cy=rp,ly=Gh,fy=Jv;Cr({target:"Promise",stat:!0,forced:ay},{all:function(t){var e=this,r=cy.f(e),n=r.resolve,o=r.reject,i=ly((function(){var r=sy(e.resolve),i=[],a=0,u=1;fy(t,(function(t){var s=a++,c=!1;u++,uy(r,e,t).then((function(t){c||(c=!0,i[s]=t,--u||n(i))}),o)})),--u||n(i)}));return i.error&&o(i.value),r.promise}});var vy=Cr,dy=ep.CONSTRUCTOR;zh&&zh.prototype,vy({target:"Promise",proto:!0,forced:dy,real:!0},{catch:function(t){return this.then(void 0,t)}});var hy=C,py=Ct,yy=rp,gy=Gh,my=Jv;Cr({target:"Promise",stat:!0,forced:ay},{race:function(t){var e=this,r=yy.f(e),n=r.reject,o=gy((function(){var o=py(e.resolve);my(t,(function(t){hy(o,e,t).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});var by=rp;Cr({target:"Promise",stat:!0,forced:ep.CONSTRUCTOR},{reject:function(t){var e=by.f(this);return(0,e.reject)(t),e.promise}});var _y=nr,wy=K,Sy=rp,Ey=function(t,e){if(_y(t),wy(e)&&e.constructor===t)return e;var r=Sy.f(t);return(0,r.resolve)(e),r.promise},xy=Cr,Ty=zh,Oy=ep.CONSTRUCTOR,Ry=Ey,ky=rt("Promise"),Cy=!Oy;xy({target:"Promise",stat:!0,forced:true},{resolve:function(t){return Ry(Cy&&this===ky?Ty:this,t)}});var Ay=C,Py=Ct,jy=rp,Dy=Gh,Ly=Jv;Cr({target:"Promise",stat:!0,forced:ay},{allSettled:function(t){var e=this,r=jy.f(e),n=r.resolve,o=r.reject,i=Dy((function(){var r=Py(e.resolve),o=[],i=0,a=1;Ly(t,(function(t){var u=i++,s=!1;a++,Ay(r,e,t).then((function(t){s||(s=!0,o[u]={status:"fulfilled",value:t},--a||n(o))}),(function(t){s||(s=!0,o[u]={status:"rejected",reason:t},--a||n(o))}))})),--a||n(o)}));return i.error&&o(i.value),r.promise}});var Iy=C,My=Ct,Fy=rt,Ny=rp,Wy=Gh,Uy=Jv,Gy="No one promise resolved";Cr({target:"Promise",stat:!0,forced:ay},{any:function(t){var e=this,r=Fy("AggregateError"),n=Ny.f(e),o=n.resolve,i=n.reject,a=Wy((function(){var n=My(e.resolve),a=[],u=0,s=1,c=!1;Uy(t,(function(t){var l=u++,f=!1;s++,Iy(n,e,t).then((function(t){f||c||(c=!0,o(t))}),(function(t){f||c||(f=!0,a[l]=t,--s||i(new r(a,Gy)))}))})),--s||i(new r(a,Gy))}));return a.error&&i(a.value),n.promise}});var zy=Cr,Vy=l,By=Ar,Hy=rp,Xy=Ct,qy=Gh,Jy=n.Promise,$y=!1;zy({target:"Promise",stat:!0,forced:!Jy||!Jy.try||qy((function(){Jy.try((function(t){$y=8===t}),8)})).error||!$y},{try:function(t){var e=arguments.length>1?By(arguments,1):[],r=Hy.f(this),n=qy((function(){return Vy(Xy(t),void 0,e)}));return(n.error?r.reject:r.resolve)(n.value),r.promise}});var Ky=rp;Cr({target:"Promise",stat:!0},{withResolvers:function(){var t=Ky.f(this);return{promise:t.promise,resolve:t.resolve,reject:t.reject}}});var Yy=Cr,Zy=zh,Qy=o,tg=rt,eg=x,rg=Id,ng=Ey,og=Zy&&Zy.prototype;Yy({target:"Promise",proto:!0,real:!0,forced:!!Zy&&Qy((function(){og.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=rg(this,tg("Promise")),r=eg(t);return this.then(r?function(r){return ng(e,t()).then((function(){return r}))}:t,r?function(r){return ng(e,t()).then((function(){throw r}))}:t)}});var ig=Y.Promise,ag=e(ig),ug=Cr,sg=Wo,cg=p([].reverse),lg=[1,2];ug({target:"Array",proto:!0,forced:String(lg)===String(lg.reverse())},{reverse:function(){return sg(this)&&(this.length=this.length),cg(this)}});var fg=_f("Array","reverse"),vg=nt,dg=fg,hg=Array.prototype,pg=e((function(t){var e=t.reverse;return t===hg||vg(hg,t)&&e===hg.reverse?dg:e})),yg=Cr,gg=Wo,mg=hn,bg=K,_g=Rn,wg=jn,Sg=J,Eg=Ho,xg=ve,Tg=Ar,Og=ri("slice"),Rg=xg("species"),kg=Array,Cg=Math.max;yg({target:"Array",proto:!0,forced:!Og},{slice:function(t,e){var r,n,o,i=Sg(this),a=wg(i),u=_g(t,a),s=_g(void 0===e?a:e,a);if(gg(i)&&(r=i.constructor,(mg(r)&&(r===kg||gg(r.prototype))||bg(r)&&null===(r=r[Rg]))&&(r=void 0),r===kg||void 0===r))return Tg(i,u,s);for(n=new(void 0===r?kg:r)(Cg(s-u,0)),o=0;u<s;u++,o++)u in i&&Eg(n,o,i[u]);return n.length=o,n}});var Ag=_f("Array","slice"),Pg=nt,jg=Ag,Dg=Array.prototype,Lg=function(t){var e=t.slice;return t===Dg||Pg(Dg,t)&&e===Dg.slice?jg:e},Ig=e(Lg);function Mg(){Mg=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=of||function(t,e,r){t[e]=r.value},i="function"==typeof Pl?Pl:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(t,e,r){return of(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(P){c=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=sf(i.prototype),u=new C(n||[]);return o(a,"_invoke",{value:T(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(n){return{type:"throw",arg:n}}}e.wrap=l;var v="suspendedStart",d="suspendedYield",h="executing",p="completed",y={};function g(){}function m(){}function b(){}var _={};c(_,a,(function(){return this}));var w=df&&df(df(A([])));w&&w!==r&&n.call(w,a)&&(_=w);var S=b.prototype=g.prototype=sf(_);function E(t){var e;kf(e=["next","throw","return"]).call(e,(function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,u){var s=f(t[o],t,i);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==Kl(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,u)}))}u(s.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function T(e,r,n){var o=v;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var s=O(u,n);if(s){if(s===y)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=f(e,r,n);if("normal"===c.type){if(o=n.done?p:d,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function R(t){var e,r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),zf(e=this.tryEntries).call(e,r)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],kf(t).call(t,R,this),this.reset(!0)}function A(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Kl(e)+" is not iterable")}return m.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:m,configurable:!0}),m.displayName=c(b,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Bf?Bf(t,b):(t.__proto__=b,c(t,s,"GeneratorFunction")),t.prototype=sf(S),t},e.awrap=function(t){return{__await:t}},E(x.prototype),c(x.prototype,u,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=ag);var a=new x(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(S),c(S,s,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)zf(r).call(r,n);return pg(r).call(r),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=A,C.prototype={constructor:C,reset:function(e){var r;if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,kf(r=this.tryEntries).call(r,k),!e)for(var o in this)"t"===o.charAt(0)&&n.call(this,o)&&!isNaN(+Ig(o).call(o,1))&&(this[o]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function Fg(t,e,r,n,o,i,a){try{var u=t[i](a),s=u.value}catch(c){return void r(c)}u.done?e(s):ag.resolve(s).then(n,o)}function Ng(t){return function(){var e=this,r=arguments;return new ag((function(n,o){var i=t.apply(e,r);function a(t){Fg(i,n,o,a,u,"next",t)}function u(t){Fg(i,n,o,a,u,"throw",t)}a(void 0)}))}}function Wg(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Ug=Li.f("toPrimitive"),Gg=e(Ug);function zg(t){var e=function(t,e){if("object"!=Kl(t)||!t)return t;var r=t[Gg];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Kl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Kl(e)?e:e+""}function Vg(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),of(t,zg(n.key),n)}}function Bg(t,e,r){return e&&Vg(t.prototype,e),r&&Vg(t,r),of(t,"prototype",{writable:!1}),t}function Hg(t,e){if(e&&("object"==Kl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Xg(){try{var t=!Boolean.prototype.valueOf.call(Mo(Boolean,[],(function(){})))}catch(e){}return(Xg=function(){return!!t})()}var qg=Gr;Cr({target:"Function",proto:!0,forced:Function.bind!==qg},{bind:qg});var Jg=_f("Function","bind"),$g=nt,Kg=Jg,Yg=Function.prototype,Zg=function(t){var e=t.bind;return t===Yg||$g(Yg,t)&&e===Yg.bind?Kg:e},Qg=e(Zg);function tm(t){var e;return(tm=Bf?Qg(e=df).call(e):function(t){return t.__proto__||df(t)})(t)}function em(t,e){var r;return(em=Bf?Qg(r=Bf).call(r):function(t,e){return t.__proto__=e,t})(t,e)}function rm(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=sf(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),of(t,"prototype",{writable:!1}),e&&em(t,e)}function nm(t,e,r){return(e=zg(e))in t?of(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var om=e(nf),im={exports:{}},am=Cr,um=o,sm=J,cm=T.f,lm=O;am({target:"Object",stat:!0,forced:!lm||um((function(){cm(1)})),sham:!lm},{getOwnPropertyDescriptor:function(t,e){return cm(sm(t),e)}});var fm=Y.Object,vm=im.exports=function(t,e){return fm.getOwnPropertyDescriptor(t,e)};fm.getOwnPropertyDescriptor.sham&&(vm.sham=!0);var dm=e(im.exports),hm=En,pm=bi,ym=H,gm=RangeError,mm=p,bm=An,_m=bi,wm=H,Sm=mm((function(t){var e=pm(ym(this)),r="",n=hm(t);if(n<0||n===1/0)throw new gm("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(e+=e))1&n&&(r+=e);return r})),Em=mm("".slice),xm=Math.ceil,Tm=function(t){return function(e,r,n){var o,i,a=_m(wm(e)),u=bm(r),s=a.length,c=void 0===n?" ":_m(n);return u<=s||""===c?a:((i=Sm(c,xm((o=u-s)/c.length))).length>o&&(i=Em(i,0,o)),t?a+i:i+a)}},Om={start:Tm(!1),end:Tm(!0)},Rm=p,km=o,Cm=Om.start,Am=RangeError,Pm=isFinite,jm=Math.abs,Dm=Date.prototype,Lm=Dm.toISOString,Im=Rm(Dm.getTime),Mm=Rm(Dm.getUTCDate),Fm=Rm(Dm.getUTCFullYear),Nm=Rm(Dm.getUTCHours),Wm=Rm(Dm.getUTCMilliseconds),Um=Rm(Dm.getUTCMinutes),Gm=Rm(Dm.getUTCMonth),zm=Rm(Dm.getUTCSeconds),Vm=km((function(){return"0385-07-25T07:06:39.999Z"!==Lm.call(new Date(-50000000000001))}))||!km((function(){Lm.call(new Date(NaN))}))?function(){if(!Pm(Im(this)))throw new Am("Invalid time value");var t=this,e=Fm(t),r=Wm(t),n=e<0?"-":e>9999?"+":"";return n+Cm(jm(e),n?6:4,0)+"-"+Cm(Gm(t)+1,2,0)+"-"+Cm(Mm(t),2,0)+"T"+Cm(Nm(t),2,0)+":"+Cm(Um(t),2,0)+":"+Cm(zm(t),2,0)+"."+Cm(r,3,0)+"Z"}:Lm,Bm=C,Hm=$t,Xm=_e,qm=Vm,Jm=b;Cr({target:"Date",proto:!0,forced:o((function(){return null!==new Date(NaN).toJSON()||1!==Bm(Date.prototype.toJSON,{toISOString:function(){return 1}})}))},{toJSON:function(t){var e=Hm(this),r=Xm(e,"number");return"number"!=typeof r||isFinite(r)?"toISOString"in e||"Date"!==Jm(e)?e.toISOString():Bm(qm,e):null}});var $m=Y,Km=l;$m.JSON||($m.JSON={stringify:JSON.stringify});var Ym=function(t,e,r){return Km($m.JSON.stringify,null,arguments)},Zm=e(Ym),Qm=_f("Array","concat"),tb=nt,eb=Qm,rb=Array.prototype,nb=e((function(t){var e=t.concat;return t===rb||tb(rb,t)&&e===rb.concat?eb:e})),ob=e(uf),ib=e(Lg),ab=e(Y.Object.getOwnPropertySymbols),ub={exports:{}};!function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}function o(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function i(t,e,n,i,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var u=new o(n,i||t,a),s=r?r+e:e;return t._events[s]?t._events[s].fn?t._events[s]=[t._events[s],u]:t._events[s].push(u):(t._events[s]=u,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new n:delete t._events[e]}function u(){this._events=new n,this._eventsCount=0}ob&&(n.prototype=ob(null),(new n).__proto__||(r=!1)),u.prototype.eventNames=function(){var t,n,o=[];if(0===this._eventsCount)return o;for(n in t=this._events)e.call(t,n)&&o.push(r?ib(n).call(n,1):n);return ab?nb(o).call(o,ab(t)):o},u.prototype.listeners=function(t){var e=r?r+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,i=n.length,a=new Array(i);o<i;o++)a[o]=n[o].fn;return a},u.prototype.listenerCount=function(t){var e=r?r+t:t,n=this._events[e];return n?n.fn?1:n.length:0},u.prototype.emit=function(t,e,n,o,i,a){var u=r?r+t:t;if(!this._events[u])return!1;var s,c,l=this._events[u],f=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,n),!0;case 4:return l.fn.call(l.context,e,n,o),!0;case 5:return l.fn.call(l.context,e,n,o,i),!0;case 6:return l.fn.call(l.context,e,n,o,i,a),!0}for(c=1,s=new Array(f-1);c<f;c++)s[c-1]=arguments[c];l.fn.apply(l.context,s)}else{var v,d=l.length;for(c=0;c<d;c++)switch(l[c].once&&this.removeListener(t,l[c].fn,void 0,!0),f){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,e);break;case 3:l[c].fn.call(l[c].context,e,n);break;case 4:l[c].fn.call(l[c].context,e,n,o);break;default:if(!s)for(v=1,s=new Array(f-1);v<f;v++)s[v-1]=arguments[v];l[c].fn.apply(l[c].context,s)}}return!0},u.prototype.on=function(t,e,r){return i(this,t,e,r,!1)},u.prototype.once=function(t,e,r){return i(this,t,e,r,!0)},u.prototype.removeListener=function(t,e,n,o){var i=r?r+t:t;if(!this._events[i])return this;if(!e)return a(this,i),this;var u=this._events[i];if(u.fn)u.fn!==e||o&&!u.once||n&&u.context!==n||a(this,i);else{for(var s=0,c=[],l=u.length;s<l;s++)(u[s].fn!==e||o&&!u[s].once||n&&u[s].context!==n)&&c.push(u[s]);c.length?this._events[i]=1===c.length?c[0]:c:a(this,i)}return this},u.prototype.removeAllListeners=function(t){var e;return t?(e=r?r+t:t,this._events[e]&&a(this,e)):(this._events=new n,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=r,u.EventEmitter=u,t.exports=u}(ub);var sb=function(t){function e(){var t,r,n,o,i;Wg(this,e);for(var a=arguments.length,u=new Array(a),s=0;s<a;s++)u[s]=arguments[s];return n=this,o=e,i=nb(t=[]).call(t,u),o=tm(o),nm(r=Hg(n,Xg()?Fo(o,i||[],tm(n).constructor):o.apply(n,i)),"monitor",void 0),nm(r,"logger",void 0),r}return rm(e,t),Bg(e,[{key:"isSupported",value:(r=Ng(Mg().mark((function t(){return Mg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",!0);case 1:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)})},{key:"_reportName",get:function(){return"plugin<".concat(this.name,">")}}]);var r}(ub.exports.EventEmitter),cb=Ev;Cr({target:"Array",stat:!0},{isArray:Wo});var lb=Y.Array.isArray,fb=nr,vb=Lv,db=Ye,hb=C,pb=$t,yb=function(t,e,r,n){try{return n?e(fb(r)[0],r[1]):e(r)}catch(LO){vb(t,"throw",LO)}},gb=gv,mb=hn,bb=jn,_b=Ho,wb=Av,Sb=Ev,Eb=Array,xb=function(t){var e=pb(t),r=mb(this),n=arguments.length,o=n>1?arguments[1]:void 0,i=void 0!==o;i&&(o=db(o,n>2?arguments[2]:void 0));var a,u,s,c,l,f,v=Sb(e),d=0;if(!v||this===Eb&&gb(v))for(a=bb(e),u=r?new this(a):Eb(a);a>d;d++)f=i?o(e[d],d):e[d],_b(u,d,f);else for(u=r?new this:[],l=(c=wb(e,v)).next;!(s=hb(l,c)).done;d++)f=i?yb(c,o,[s.value,d],!0):s.value,_b(u,d,f);return u.length=d,u};Cr({target:"Array",stat:!0,forced:!oy((function(t){Array.from(t)}))},{from:xb});var Tb=Y.Array.from,Ob={exports:{}},Rb=o((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),kb=o,Cb=K,Ab=b,Pb=Rb,jb=Object.isExtensible,Db=kb((function(){jb(1)}))||Pb?function(t){return!!Cb(t)&&((!Pb||"ArrayBuffer"!==Ab(t))&&(!jb||jb(t)))}:jb,Lb=!o((function(){return Object.isExtensible(Object.preventExtensions({}))})),Ib=Cr,Mb=p,Fb=Nn,Nb=K,Wb=Zt,Ub=Ze.f,Gb=_i,zb=Ei,Vb=Db,Bb=Lb,Hb=!1,Xb=ne("meta"),qb=0,Jb=function(t){Ub(t,Xb,{value:{objectID:"O"+qb++,weakData:{}}})},$b=Ob.exports={enable:function(){$b.enable=function(){},Hb=!0;var t=Gb.f,e=Mb([].splice),r={};r[Xb]=1,t(r).length&&(Gb.f=function(r){for(var n=t(r),o=0,i=n.length;o<i;o++)if(n[o]===Xb){e(n,o,1);break}return n},Ib({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:zb.f}))},fastKey:function(t,e){if(!Nb(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!Wb(t,Xb)){if(!Vb(t))return"F";if(!e)return"E";Jb(t)}return t[Xb].objectID},getWeakData:function(t,e){if(!Wb(t,Xb)){if(!Vb(t))return!0;if(!e)return!1;Jb(t)}return t[Xb].weakData},onFreeze:function(t){return Bb&&Hb&&Vb(t)&&!Wb(t,Xb)&&Jb(t),t}};Fb[Xb]=!0;var Kb=Ob.exports,Yb=Cr,Zb=n,Qb=Kb,t_=o,e_=gr,r_=Jv,n_=Ad,o_=x,i_=K,a_=z,u_=na,s_=Ze.f,c_=Ra.forEach,l_=O,f_=ba.set,v_=ba.getterFor,d_=Pi,h_=_o,p_=Di,y_=function(t,e,r){for(var n in e)r&&r.unsafe&&t[n]?t[n]=e[n]:d_(t,n,e[n],r);return t},g_=Ye,m_=Ad,b_=z,__=Jv,w_=Vc,S_=Bc,E_=Rd,x_=O,T_=Kb.fastKey,O_=ba.set,R_=ba.getterFor,k_={getConstructor:function(t,e,r,n){var o=t((function(t,o){m_(t,i),O_(t,{type:e,index:h_(null),first:null,last:null,size:0}),x_||(t.size=0),b_(o)||__(o,t[n],{that:t,AS_ENTRIES:r})})),i=o.prototype,a=R_(e),u=function(t,e,r){var n,o,i=a(t),u=s(t,e);return u?u.value=r:(i.last=u={index:o=T_(e,!0),key:e,value:r,previous:n=i.last,next:null,removed:!1},i.first||(i.first=u),n&&(n.next=u),x_?i.size++:t.size++,"F"!==o&&(i.index[o]=u)),t},s=function(t,e){var r,n=a(t),o=T_(e);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key===e)return r};return y_(i,{clear:function(){for(var t=a(this),e=t.first;e;)e.removed=!0,e.previous&&(e.previous=e.previous.next=null),e=e.next;t.first=t.last=null,t.index=h_(null),x_?t.size=0:this.size=0},delete:function(t){var e=this,r=a(e),n=s(e,t);if(n){var o=n.next,i=n.previous;delete r.index[n.index],n.removed=!0,i&&(i.next=o),o&&(o.previous=i),r.first===n&&(r.first=o),r.last===n&&(r.last=i),x_?r.size--:e.size--}return!!n},forEach:function(t){for(var e,r=a(this),n=g_(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:r.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!s(this,t)}}),y_(i,r?{get:function(t){var e=s(this,t);return e&&e.value},set:function(t,e){return u(this,0===t?0:t,e)}}:{add:function(t){return u(this,t=0===t?0:t,t)}}),x_&&p_(i,"size",{configurable:!0,get:function(){return a(this).size}}),o},setStrong:function(t,e,r){var n=e+" Iterator",o=R_(e),i=R_(n);w_(t,e,(function(t,e){O_(this,{type:n,target:t,state:o(t),kind:e,last:null})}),(function(){for(var t=i(this),e=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?S_("keys"===e?r.key:"values"===e?r.value:[r.key,r.value],!1):(t.target=null,S_(void 0,!0))}),r?"entries":"values",!r,!0),E_(e)}},C_=Ye,A_=nr,P_=$t,j_=Jv,D_=nr,L_=C,I_=function(t,e,r){for(var n,o,i=r?t:t.iterator,a=t.next;!(n=L_(a,i)).done;)if(void 0!==(o=e(n.value)))return o},M_=function(t){return t[t.CAPTURE=0]="CAPTURE",t[t.PRE_PROCESSING=1]="PRE_PROCESSING",t[t.ENCODE=2]="ENCODE",t[t.TRANSFER=3]="TRANSFER",t[t.POST_PROCESSING=4]="POST_PROCESSING",t[t.DECODE=5]="DECODE",t[t.RENDERING=6]="RENDERING",t}(M_||{});var F_=function(t){function e(){var t,r,n,o,i;Wg(this,e);for(var a=arguments.length,u=new Array(a),s=0;s<a;s++)u[s]=arguments[s];return n=this,o=e,i=nb(t=[]).call(t,u),o=tm(o),nm(r=Hg(n,Xg()?Fo(o,i||[],tm(n).constructor):o.apply(n,i)),"type",M_.RENDERING),r}return rm(e,t),Bg(e)}(sb);function N_(t,e,r){var n=r.value;r.value=function(){for(var t,r=this.monitor,o=this.name,i=nb(t="".concat(o,".")).call(t,e),a=arguments.length,u=new Array(a),s=0;s<a;s++)u[s]=arguments[s];null==r||r.report("rtc_sdk_api_call",{sdk_api_name:i,message:Zm(u),error_code:0});var c=n.apply(this,u);return"function"==typeof(null==c?void 0:c.then)?c.then((function(t){return null==r||r.report("rtc_sdk_callback",{sdk_callback_name:i,error_code:0,message:Zm(t||{})}),t})).catch((function(t){throw null==r||r.report("rtc_sdk_callback",{sdk_callback_name:i,error_code:t.code||-1,message:t.message||""}),t})):(null==r||r.report("rtc_sdk_callback",{sdk_callback_name:i,error_code:0,message:c||""}),c)}}var W_=e(ig),U_=Zt,G_=C,z_=K,V_=nr,B_=function(t){return void 0!==t&&(U_(t,"value")||U_(t,"writable"))},H_=T,X_=Qs;Cr({target:"Reflect",stat:!0},{get:function t(e,r){var n,o,i=arguments.length<3?e:arguments[2];return V_(e)===i?e[r]:(n=H_.f(e,r))?B_(n)?n.value:void 0===n.get?void 0:G_(n.get,i):z_(o=X_(e))?t(o,r,i):void 0}});var q_=e(Y.Reflect.get),J_=e(Zg),$_=e(Vf),K_=e(vf),Y_=e(Al),Z_=e(Ug),Q_=e(Jl),tw=O,ew=p,rw=C,nw=o,ow=Jn,iw=Ci,aw=A,uw=$t,sw=G,cw=Object.assign,lw=Object.defineProperty,fw=ew([].concat),vw=!cw||nw((function(){if(tw&&1!==cw({b:1},cw(lw({},"a",{enumerable:!0,get:function(){lw(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach((function(t){e[t]=t})),7!==cw({},t)[r]||ow(cw({},e)).join("")!==n}))?function(t,e){for(var r=uw(t),n=arguments.length,o=1,i=iw.f,a=aw.f;n>o;)for(var u,s=sw(arguments[o++]),c=i?fw(ow(s),i(s)):ow(s),l=c.length,f=0;l>f;)u=c[f++],tw&&!rw(a,s,u)||(r[u]=s[u]);return r}:cw,dw=vw;Cr({target:"Object",stat:!0,arity:2,forced:Object.assign!==dw},{assign:dw});var hw,pw=e(Y.Object.assign),yw=n,gw=l,mw=x,bw=wd,_w=at,ww=Ar,Sw=Fd,Ew=yw.Function,xw=/MSIE .\./.test(_w)||"BUN"===bw&&((hw=yw.Bun.version.split(".")).length<3||"0"===hw[0]&&(hw[1]<3||"3"===hw[1]&&"0"===hw[2])),Tw=function(t,e){var r=e?2:1;return xw?function(n,o){var i=Sw(arguments.length,1)>r,a=mw(n)?n:Ew(n),u=i?ww(arguments,r):[],s=i?function(){gw(a,this,u)}:a;return e?t(s,o):t(s)}:t},Ow=Cr,Rw=n,kw=Tw(Rw.setInterval,!0);Ow({global:!0,bind:!0,forced:Rw.setInterval!==kw},{setInterval:kw});var Cw=Cr,Aw=n,Pw=Tw(Aw.setTimeout,!0);Cw({global:!0,bind:!0,forced:Aw.setTimeout!==Pw},{setTimeout:Pw});var jw=e(Y.setTimeout),Dw=Fn.includes;Cr({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(t){return Dw(this,t,arguments.length>1?arguments[1]:void 0)}});var Lw=_f("Array","includes"),Iw=K,Mw=b,Fw=ve("match"),Nw=function(t){var e;return Iw(t)&&(void 0!==(e=t[Fw])?!!e:"RegExp"===Mw(t))},Ww=TypeError,Uw=function(t){if(Nw(t))throw new Ww("The method doesn't accept regular expressions");return t},Gw=ve("match"),zw=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[Gw]=!1,"/./"[t](e)}catch(n){}}return!1},Vw=Cr,Bw=Uw,Hw=H,Xw=bi,qw=zw,Jw=p("".indexOf);Vw({target:"String",proto:!0,forced:!qw("includes")},{includes:function(t){return!!~Jw(Xw(Hw(this)),Xw(Bw(t)),arguments.length>1?arguments[1]:void 0)}});var $w=_f("String","includes"),Kw=nt,Yw=Lw,Zw=$w,Qw=Array.prototype,tS=String.prototype,eS=e((function(t){var e=t.includes;return t===Qw||Kw(Qw,t)&&e===Qw.includes?Yw:"string"==typeof t||t===tS||Kw(tS,t)&&e===tS.includes?Zw:e}));(function(t,e,r){var n,o=-1!==t.indexOf("Map"),i=-1!==t.indexOf("Weak"),a=o?"set":"add",u=Zb[t],s=u&&u.prototype,c={};if(l_&&o_(u)&&(i||s.forEach&&!t_((function(){(new u).entries().next()})))){var l=(n=e((function(e,r){f_(n_(e,l),{type:t,collection:new u}),a_(r)||r_(r,e[a],{that:e,AS_ENTRIES:o})}))).prototype,f=v_(t);c_(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(t){var e="add"===t||"set"===t;!(t in s)||i&&"clear"===t||e_(l,t,(function(r,n){var o=f(this).collection;if(!e&&i&&!i_(r))return"get"===t&&void 0;var a=o[t](0===r?0:r,n);return e?this:a}))})),i||s_(l,"size",{configurable:!0,get:function(){return f(this).collection.size}})}else n=r.getConstructor(e,t,o,a),Qb.enable();u_(n,t,!1,!0),c[t]=n,Yb({global:!0,forced:!0},c),i||r.setStrong(n,t,o)})("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),k_);var rS=Tt,nS=TypeError,oS=function(t){if("object"==typeof t&&"size"in t&&"has"in t&&"add"in t&&"delete"in t&&"keys"in t)return t;throw new nS(rS(t)+" is not a set")},iS=function(t,e){return 1===e?function(e,r){return e[t](r)}:function(e,r,n){return e[t](r,n)}},aS=rt("Set"),uS=aS.prototype,sS={Set:aS,add:iS("add",1),has:iS("has",1),remove:iS("delete",1),proto:uS},cS=I_,lS=function(t,e,r){return r?cS(t.keys(),e,!0):t.forEach(e)},fS=lS,vS=sS.Set,dS=sS.add,hS=function(t){var e=new vS;return fS(t,(function(t){dS(e,t)})),e},pS=function(t){return t.size},yS=Ct,gS=nr,mS=C,bS=En,_S=function(t){return{iterator:t,next:t.next,done:!1}},wS="Invalid size",SS=RangeError,ES=TypeError,xS=Math.max,TS=function(t,e){this.set=t,this.size=xS(e,0),this.has=yS(t.has),this.keys=yS(t.keys)};TS.prototype={getIterator:function(){return _S(gS(mS(this.keys,this.set)))},includes:function(t){return mS(this.has,this.set,t)}};var OS=function(t){gS(t);var e=+t.size;if(e!=e)throw new ES(wS);var r=bS(e);if(r<0)throw new SS(wS);return new TS(t,r)},RS=oS,kS=hS,CS=pS,AS=OS,PS=lS,jS=I_,DS=sS.has,LS=sS.remove,IS=function(t){var e=RS(this),r=AS(t),n=kS(e);return CS(e)<=r.size?PS(e,(function(t){r.includes(t)&&LS(n,t)})):jS(r.getIterator(),(function(t){DS(e,t)&&LS(n,t)})),n},MS=function(){return!1},FS=IS;Cr({target:"Set",proto:!0,real:!0,forced:!MS()},{difference:FS});var NS=oS,WS=pS,US=OS,GS=lS,zS=I_,VS=sS.Set,BS=sS.add,HS=sS.has,XS=function(t){var e=NS(this),r=US(t),n=new VS;return WS(e)>r.size?zS(r.getIterator(),(function(t){HS(e,t)&&BS(n,t)})):GS(e,(function(t){r.includes(t)&&BS(n,t)})),n},qS=XS;Cr({target:"Set",proto:!0,real:!0,forced:!MS()},{intersection:qS});var JS=oS,$S=sS.has,KS=pS,YS=OS,ZS=lS,QS=I_,tE=Lv,eE=function(t){var e=JS(this),r=YS(t);if(KS(e)<=r.size)return!1!==ZS(e,(function(t){if(r.includes(t))return!1}),!0);var n=r.getIterator();return!1!==QS(n,(function(t){if($S(e,t))return tE(n,"normal",!1)}))},rE=eE;Cr({target:"Set",proto:!0,real:!0,forced:!MS()},{isDisjointFrom:rE});var nE=oS,oE=pS,iE=lS,aE=OS,uE=function(t){var e=nE(this),r=aE(t);return!(oE(e)>r.size)&&!1!==iE(e,(function(t){if(!r.includes(t))return!1}),!0)},sE=uE;Cr({target:"Set",proto:!0,real:!0,forced:!MS()},{isSubsetOf:sE});var cE=oS,lE=sS.has,fE=pS,vE=OS,dE=I_,hE=Lv,pE=function(t){var e=cE(this),r=vE(t);if(fE(e)<r.size)return!1;var n=r.getIterator();return!1!==dE(n,(function(t){if(!lE(e,t))return hE(n,"normal",!1)}))},yE=pE;Cr({target:"Set",proto:!0,real:!0,forced:!MS()},{isSupersetOf:yE});var gE=oS,mE=hS,bE=OS,_E=I_,wE=sS.add,SE=sS.has,EE=sS.remove,xE=function(t){var e=gE(this),r=bE(t).getIterator(),n=mE(e);return _E(r,(function(t){SE(e,t)?EE(n,t):wE(n,t)})),n},TE=xE;Cr({target:"Set",proto:!0,real:!0,forced:!MS()},{symmetricDifference:TE});var OE=oS,RE=sS.add,kE=hS,CE=OS,AE=I_,PE=function(t){var e=OE(this),r=CE(t).getIterator(),n=kE(e);return AE(r,(function(t){RE(n,t)})),n},jE=PE;Cr({target:"Set",proto:!0,real:!0,forced:!MS()},{union:jE});var DE=Y.Set,LE=function(t,e,r){return function(n){var o=P_(n),i=arguments.length,a=i>1?arguments[1]:void 0,u=void 0!==a,s=u?C_(a,i>2?arguments[2]:void 0):void 0,c=new t,l=0;return j_(o,(function(t){var n=u?s(t,l++):t;r?e(c,A_(n)[0],n[1]):e(c,n)})),c}};Cr({target:"Set",stat:!0,forced:!0},{from:LE(sS.Set,sS.add,!1)});var IE=function(t,e,r){return function(){for(var n=new t,o=arguments.length,i=0;i<o;i++){var a=arguments[i];r?e(n,D_(a)[0],a[1]):e(n,a)}return n}};Cr({target:"Set",stat:!0,forced:!0},{of:IE(sS.Set,sS.add,!1)});var ME=oS,FE=sS.add;Cr({target:"Set",proto:!0,real:!0,forced:!0},{addAll:function(){for(var t=ME(this),e=0,r=arguments.length;e<r;e++)FE(t,arguments[e]);return t}});var NE=oS,WE=sS.remove;Cr({target:"Set",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=NE(this),r=!0,n=0,o=arguments.length;n<o;n++)t=WE(e,arguments[n]),r=r&&t;return!!r}});var UE=Ye,GE=oS,zE=lS;Cr({target:"Set",proto:!0,real:!0,forced:!0},{every:function(t){var e=GE(this),r=UE(t,arguments.length>1?arguments[1]:void 0);return!1!==zE(e,(function(t){if(!r(t,t,e))return!1}),!0)}});var VE=Kr,BE=Zt,HE=z,XE=Ns,qE=ve("iterator"),JE=Object,$E=x,KE=function(t){if(HE(t))return!1;var e=JE(t);return void 0!==e[qE]||"@@iterator"in e||BE(XE,VE(e))},YE=K,ZE=rt("Set"),QE=function(t){return function(t){return YE(t)&&"number"==typeof t.size&&$E(t.has)&&$E(t.keys)}(t)?t:KE(t)?new ZE(t):t},tx=C,ex=QE,rx=IS;Cr({target:"Set",proto:!0,real:!0,forced:!0},{difference:function(t){return tx(rx,this,ex(t))}});var nx=Ye,ox=oS,ix=lS,ax=sS.Set,ux=sS.add;Cr({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(t){var e=ox(this),r=nx(t,arguments.length>1?arguments[1]:void 0),n=new ax;return ix(e,(function(t){r(t,t,e)&&ux(n,t)})),n}});var sx=Ye,cx=oS,lx=lS;Cr({target:"Set",proto:!0,real:!0,forced:!0},{find:function(t){var e=cx(this),r=sx(t,arguments.length>1?arguments[1]:void 0),n=lx(e,(function(t){if(r(t,t,e))return{value:t}}),!0);return n&&n.value}});var fx=C,vx=QE,dx=XS;Cr({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(t){return fx(dx,this,vx(t))}});var hx=C,px=QE,yx=eE;Cr({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(t){return hx(yx,this,px(t))}});var gx=C,mx=QE,bx=uE;Cr({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(t){return gx(bx,this,mx(t))}});var _x=C,wx=QE,Sx=pE;Cr({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(t){return _x(Sx,this,wx(t))}});var Ex=Cr,xx=p,Tx=oS,Ox=lS,Rx=bi,kx=xx([].join),Cx=xx([].push);Ex({target:"Set",proto:!0,real:!0,forced:!0},{join:function(t){var e=Tx(this),r=void 0===t?",":Rx(t),n=[];return Ox(e,(function(t){Cx(n,t)})),kx(n,r)}});var Ax=Ye,Px=oS,jx=lS,Dx=sS.Set,Lx=sS.add;Cr({target:"Set",proto:!0,real:!0,forced:!0},{map:function(t){var e=Px(this),r=Ax(t,arguments.length>1?arguments[1]:void 0),n=new Dx;return jx(e,(function(t){Lx(n,r(t,t,e))})),n}});var Ix=Ct,Mx=oS,Fx=lS,Nx=TypeError;Cr({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(t){var e=Mx(this),r=arguments.length<2,n=r?void 0:arguments[1];if(Ix(t),Fx(e,(function(o){r?(r=!1,n=o):n=t(n,o,o,e)})),r)throw new Nx("Reduce of empty set with no initial value");return n}});var Wx=Ye,Ux=oS,Gx=lS;Cr({target:"Set",proto:!0,real:!0,forced:!0},{some:function(t){var e=Ux(this),r=Wx(t,arguments.length>1?arguments[1]:void 0);return!0===Gx(e,(function(t){if(r(t,t,e))return!0}),!0)}});var zx=C,Vx=QE,Bx=xE;Cr({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(t){return zx(Bx,this,Vx(t))}});var Hx=C,Xx=QE,qx=PE;Cr({target:"Set",proto:!0,real:!0,forced:!0},{union:function(t){return Hx(qx,this,Xx(t))}});var Jx=e(DE),$x=e(lb),Kx=e(cb),Yx=e(Tb),Zx=Cr,Qx=Fn.indexOf,tT=pf,eT=S([].indexOf),rT=!!eT&&1/eT([1],1,-0)<0;Zx({target:"Array",proto:!0,forced:rT||!tT("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return rT?eT(this,t,e)||0:Qx(this,t,e)}});var nT=_f("Array","indexOf"),oT=nt,iT=nT,aT=Array.prototype,uT=e((function(t){var e=t.indexOf;return t===aT||oT(aT,t)&&e===aT.indexOf?iT:e})),sT=Cr,cT=S;T.f;var lT=An,fT=bi,vT=Uw,dT=H,hT=zw,pT=cT("".slice),yT=Math.min;sT({target:"String",proto:!0,forced:!hT("startsWith")},{startsWith:function(t){var e=fT(dT(this));vT(t);var r=lT(yT(arguments.length>1?arguments[1]:void 0,e.length)),n=fT(t);return pT(e,r,r+n.length)===n}});var gT=_f("String","startsWith"),mT=nt,bT=gT,_T=String.prototype,wT=e((function(t){var e=t.startsWith;return"string"==typeof t||t===_T||mT(_T,t)&&e===_T.startsWith?bT:e})),ST=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(at),ET=Om.start;Cr({target:"String",proto:!0,forced:ST},{padStart:function(t){return ET(this,t,arguments.length>1?arguments[1]:void 0)}});var xT=_f("String","padStart"),TT=nt,OT=xT,RT=String.prototype,kT=e((function(t){var e=t.padStart;return"string"==typeof t||t===RT||TT(RT,t)&&e===RT.padStart?OT:e}));function CT(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function AT(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),om(t,DT(n.key),n)}}function PT(t,e,r){return(e=DT(e))in t?om(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function jT(t,e){return function(t){if($x(t))return t}(t)||function(t,e){var r=null==t?null:(void 0===Y_?"undefined":Kl(Y_))<"u"&&Kx(t)||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],s=!0,c=!1;try{if(i=(r=r.call(t)).next,0!==e)for(;!(s=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);s=!0);}catch(l){c=!0,o=l}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return u}}(t,e)||IT(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function DT(t){var e=function(t,e){if("object"!=Kl(t)||!t)return t;var r=t[Z_];if(void 0!==r){var n=r.call(t,e);if("object"!=Kl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Kl(e)?e:e+""}function LT(t){return(LT="function"==typeof Y_&&"symbol"==typeof Q_?function(t){return typeof t}:function(t){return t&&"function"==typeof Y_&&t.constructor===Y_&&t!==Y_.prototype?"symbol":typeof t})(t)}function IT(t,e){if(t){var r;if("string"==typeof t)return CT(t,e);var n=ib(r={}.toString.call(t)).call(r,8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Yx(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?CT(t,e):void 0}}function MT(){var t;return!eS(t=navigator.userAgent).call(t,"Windows")&&(/Android|Alicar|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent)||"number"==typeof navigator.maxTouchPoints&&navigator.maxTouchPoints>0)}var FT=function(t){return t[t.AAC=0]="AAC",t[t.OPUS=1]="OPUS",t[t.H264=2]="H264",t[t.H265=3]="H265",t[t.AV1=4]="AV1",t}(FT||{});PT(PT(PT(PT(PT({},FT.AAC,"mp4a.40.2"),FT.OPUS,"opus"),FT.H264,"avc1.42002a"),FT.H265,"hev1.1.6.L93.B0"),FT.AV1,"av01.0.04M.08"),PT(PT(PT(PT({},FT.AAC,"mp4a.40.2"),FT.OPUS,"opus"),FT.H264,"avc1.4DE033"),FT.H265,"hev1.1.6.L93.B0");var NT={log:function(){},send:function(){},$custom:{},$enableLog:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];NT.log=t?function(){for(var t,e,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];(e=console).log.apply(e,nb(t=[UT()]).call(t,n)),NT.enableLogSend&&WT(n)}:function(){}},$enableSend:function(){NT.send=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];WT(e)}}};function WT(t){if(NT.$logger)try{NT.$logger(t)}catch(e){console.error(UT(),"debug send fail:",e)}}function UT(){var t,e,r=new Date;return nb(t="[".concat(r.toLocaleTimeString()," ")).call(t,kT(e=r.getMilliseconds().toString()).call(e,3,"0")," media-engine]")}!function(){var t;"object"===(("undefined"==typeof window?"undefined":Kl(window))>"u"?"undefined":LT(window))&&!window.__me_debug_helper&&(window.__me_debug_helper=NT);var e=location.search.substring(1),r="_medh_";if(null===(t=NT.$isInnerEnv)||void 0===t||t.call(NT),!e){var n=location.hash,o=uT(n).call(n,"?");if(!n||-1===o||!(e=n.substring(o+1)))return}var i,a=function(t,e){var r=(void 0===Y_?"undefined":Kl(Y_))<"u"&&Kx(t)||t["@@iterator"];if(!r){if($x(t)||(r=IT(t))||e){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e.split("&"));try{for(a.s();!(i=a.n()).done;){var u=jT(i.value.split("="),2),s=u[0],c=u[1];if(wT(s).call(s,r)){var l=s.replace(r,"");wT(l).call(l,"inner_")&&(l=l.replace("inner_","")),"log"===l?NT.$enableLog():"send"===l?NT.$enableSend():NT[l]=c||!0}}}catch(f){a.e(f)}finally{a.f()}"localhost"===location.hostname&&NT.$enableLog()}(),MT();var GT=function(){return function(t,e,r){return e&&AT(t.prototype,e),r&&AT(t,r),om(t,"prototype",{writable:!1}),t}((function t(e){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.name="",this.type="main",pw(this,e||{})}),[{key:"isWorkerPlugin",get:function(){return"worker"===this.type}},{key:"init",value:function(t){pw(this,t||{})}}])}();function zT(t,e,r,n,o,i,a){try{var u=t[i](a),s=u.value}catch(c){return void r(c)}u.done?e(s):W_.resolve(s).then(n,o)}function VT(t,e,r){return e=JT(e),function(t,e){if(e&&("object"==Kl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,KT()?Fo(e,r||[],JT(t).constructor):e.apply(t,r))}function BT(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function HT(t,e,r){return e&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),om(t,eO(n.key),n)}}(t.prototype,e),om(t,"prototype",{writable:!1}),t}function XT(t,e,r){return(e=eO(e))in t?om(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qT(){var t;return qT=("undefined"==typeof Reflect?"undefined":Kl(Reflect))<"u"&&q_?J_(t=q_).call(t):function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=JT(t)););return t}(t,e);if(n){var o=dm(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},qT.apply(null,arguments)}function JT(t){var e;return(JT=$_?J_(e=K_).call(e):function(t){return t.__proto__||K_(t)})(t)}function $T(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=ob(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),om(t,"prototype",{writable:!1}),e&&QT(t,e)}function KT(){try{var t=!Boolean.prototype.valueOf.call(Fo(Boolean,[],(function(){})))}catch(e){}return(KT=function(){return!!t})()}function YT(){var t,e,r="function"==typeof Y_?Y_:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof u?n:u,c=ob(s.prototype);return ZT(c,"_invoke",function(r,n,o){var i,u,s,c=0,l=o||[],f=!1,v={p:0,n:0,v:t,a:d,f:J_(d).call(d,t,4),d:function(e,r){return i=e,u=0,s=t,v.n=r,a}};function d(r,n){for(u=r,s=n,e=0;!f&&c&&!o&&e<l.length;e++){var o,i=l[e],d=v.p,h=i[2];r>3?(o=h===n)&&(s=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=d&&((o=r<2&&d<i[1])?(u=0,v.v=n,v.n=i[1]):d<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,v.n=h,u=0))}if(o||r>1)return a;throw f=!0,n}return function(o,l,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),u=l,s=h;(e=u<2?t:s)||!f;){i||(u?u<3?(u>1&&(v.n=-1),d(u,s)):v.n=s:v.v=s);try{if(c=2,i){if(u||(o="next"),e=i[o]){if(!(e=e.call(i,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,u<2&&(u=0)}else 1===u&&(e=i.return)&&e.call(i),u<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=t}else if((e=(f=v.n<0)?s:r.call(n,v))!==a)break}catch(p){i=t,u=1,s=p}finally{c=1}}return{value:e,done:f}}}(r,o,i),!0),c}var a={};function u(){}function s(){}function c(){}e=K_;var l=[][n]?e(e([][n]())):(ZT(e={},n,(function(){return this})),e),f=c.prototype=u.prototype=ob(l);function v(t){return $_?$_(t,c):(t.__proto__=c,ZT(t,o,"GeneratorFunction")),t.prototype=ob(f),t}return s.prototype=c,ZT(f,"constructor",c),ZT(c,"constructor",s),s.displayName="GeneratorFunction",ZT(c,o,"GeneratorFunction"),ZT(f),ZT(f,o,"Generator"),ZT(f,n,(function(){return this})),ZT(f,"toString",(function(){return"[object Generator]"})),(YT=function(){return{w:i,m:v}})()}function ZT(t,e,r,n){var o=om;try{o({},"",{})}catch(i){o=0}(ZT=function(t,e,r,n){if(e)o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r;else{var i=function(e,r){ZT(t,e,(function(t){return this._invoke(e,r,t)}))};i("next",0),i("throw",1),i("return",2)}})(t,e,r,n)}function QT(t,e){var r;return(QT=$_?J_(r=$_).call(r):function(t,e){return t.__proto__=e,t})(t,e)}function tO(t,e,r,n){var o=qT(JT(t.prototype),e,r);return"function"==typeof o?function(t){return o.apply(r,t)}:o}function eO(t){var e=function(t,e){if("object"!=Kl(t)||!t)return t;var r=t[Z_];if(void 0!==r){var n=r.call(t,e);if("object"!=Kl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Kl(e)?e:e+""}function rO(t){return(rO="function"==typeof Y_&&"symbol"==typeof Q_?function(t){return typeof t}:function(t){return t&&"function"==typeof Y_&&t.constructor===Y_&&t!==Y_.prototype?"symbol":typeof t})(t)}var nO,oO=2,iO=5,aO=0,uO=4,sO=8,cO=16,lO=32,fO=1,vO=3,dO=XT(XT(XT(XT(XT(XT({},aO,2),uO,1.1),sO,1.2),cO,1.3),lO,1.4),fO,1.5),hO=0,pO=1,yO=2,gO=3,mO="bmfCanvas";function bO(){return nO||(t="https://lf3-vod-cdn-tos.douyinstatic.com/obj/vodsass/super_resolution.js",nO=new W_((function(e,r){var n=document.createElement("script");n.src=t,n.onload=function(){e(!0),n.remove()},n.onerror=r,document.body.appendChild(n)}))),nO;var t}var _O=function(){return HT((function t(e){var r=this,n=e.canvas,o=e.video,i=e.onError,a=e.isDebug,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};BT(this,t),this.elapsed=0,this._wasmReady=!1,this._isCanvasAdded=!1,this._running=!1,this._hasGLLoged=!1,this._hasDelayedAddCanvas=!1,this._preVideoHeight=-1,this._preVideoWidth=-1,this._useVideoTexture=!1,this._isCrossOrigin=!1,this.isVideoPlaying=!1,this._destroyed=!1,this._errorCount=0,this._doAppendCanvas=function(){if(r._running){if(!r._isCanvasAdded){if(!r._video)return;r._root=r._video.parentElement,r._isCanvasAdded=!0}r._adjustCanvasPosition()}},this._adjustCanvasPosition=function(){},this._onRequestAnimationFrame=function(){!r._running||!r._video||r._destroyed||(cancelAnimationFrame(r._renderId),r._renderId=requestAnimationFrame(r._onRequestAnimationFrame),r._onRender())},this.onError=i,this._isDebug=null!=a&&a,this._opts=pw({disabled:!1,algType:oO,scaleType:aO,backend:vO,poolSize:2,maxWidth:2048,maxHeight:2048,wasmUrl:"",degradeFrameRate:.15,degradeFrameRateCount:3,canvasId:"",useVFC:!0,isSingle:!1,threshold:2,minRenderCount:20,useDelayedSR:!1,useScale:!0},u),n.setAttribute("id",mO),n.addEventListener("webglcontextlost",(function(){r._codeMsg="WEBGL Context LOST",r.code=gO}),!1),this._canvas=n;try{this.ready=this._init(o)}catch(c){var s;null===(s=this.onError)||void 0===s||s.call(this,c),this.ready=W_.resolve()}}),[{key:"_init",value:(t=function(t){return function(){var e=this,r=arguments;return new W_((function(n,o){var i=t.apply(e,r);function a(t){zT(i,n,o,a,u,"next",t)}function u(t){zT(i,n,o,a,u,"throw",t)}a(void 0)}))}}(YT().m((function t(e){var r,n,o=this;return YT().w((function(t){for(;;)switch(t.n){case 0:if(window.BMFModule){t.n=1;break}return t.n=1,bO();case 1:this._srWasmModule={onRuntimeInitialized:function(){o._isDebug&&console.log("onRuntimeInitialized");try{o.onReady()}catch(e){var t;null===(t=o.onError)||void 0===t||t.call(o,e)}},print:function(t){},printErr:function(t){this._isDebug&&console.log("printError:",t)},onAbort:function(t){this._isDebug&&console.log("onAbort",t)}},window.BMFModule(this._srWasmModule),this.bindMediaElement(e,{onRenderCallback:function(){},onRenderLostCallback:function(){},onSRCodeChanged:function(t){o._isDebug&&console.log("onSRCodeChanged",t)}}),this.isVideoPlaying?this._setCanvasWidthHeight(!0):(r=null,n=function(){o.isVideoPlaying=!0,o._setCanvasWidthHeight(!0),clearTimeout(r),e.removeEventListener("play",n)},e.addEventListener("play",n),r=jw(n,10));case 2:return t.a(2)}}),t,this)}))),function(e){return t.apply(this,arguments)})},{key:"onReady",value:function(){var t,e,r,n,o,i,a=this._srWasmModule,u="#".concat(mO),s=(new TextEncoder).encode(u),c=a._malloc(s.byteLength+1);a.HEAPU8.set(s,c);var l=this._opts,f=l.algType,v=l.backend,d=l.scaleType,h=l.maxWidth,p=l.maxHeight,y=l.poolSize;this._isDebug&&console.log(nb(t=nb(e=nb(r=nb(n=nb(o="algType:".concat(f,", backend:")).call(o,v,", scaleType:")).call(n,d,", maxWidht:")).call(r,h,", maxHeight:")).call(e,p,", poolSize:")).call(t,y));var g=a._createContext(c,f,v,d,y,h,p,1);this._isDebug&&console.log("CreateContext result:".concat(g));var m=this.getError(!0);a._free(c),0===g&&0===m?(this._isDebug&&console.log("CreateContext SUCCESS"),this._wasmReady=!0):(this.code=pO,this._codeMsg=nb(i="CreateContextFail code:".concat(g,", errRet:")).call(i,m),this._wasmReady=!1,this._isDebug&&console.log("CreateContext Fail, Fail code",g))}},{key:"getError",value:function(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this._wasmReady){var t=this._srWasmModule._getError();return this._isDebug&&console.log("getError ".concat(t)),t}return 0}},{key:"getRuntimeInfo",value:function(){var t=this._srWasmModule._getRunInfo(),e=this._srWasmModule.UTF8ToString(t);return this._isDebug&&console.log("getRuntimeInfo ".concat(e)),e}},{key:"bindMediaElement",value:function(t,e){var r=e.onRenderCallback,n=e.onRenderLostCallback,o=e.onSRCodeChanged;this._video!==t&&(this._video&&this.unBindMediaElement(),this._onRenderCallback=r,this._onRenderLostCallback=n,this._onSRCodeChanged=o,this._video=t,this._srWasmModule.video=this._getRenderTex(),this._hasDelayedAddCanvas=!1)}},{key:"unBindMediaElement",value:function(){this._isCanvasAdded=!1,this._onRenderLostCallback&&this._onRenderLostCallback(),this._srWasmModule&&(this._srWasmModule.video=null),this._video&&this._video instanceof HTMLVideoElement&&(this._video.__canvas=null),this._video=null,this._root=null,this._onRenderCallback=null,this._onRenderLostCallback=null,this._onRender(!0)}},{key:"_getRenderTex",value:function(){return this._video?this._video instanceof HTMLVideoElement?this._video:this._canvas:null}},{key:"_onRender",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!document.hidden&&"hidden"!==document.visibilityState){if(!this._wasmReady)return void(this._isDebug&&console.log("SR DEBUG","_onRender wasm not ready"));var e=this._opts.useScale?dO[this._opts.scaleType]:1,r=this._video;try{var n;this._hasGLLoged;var o=!0,i=(null===(n=this._srWasmModule)||void 0===n?void 0:n.video)instanceof HTMLVideoElement;if(i&&0===this._srWasmModule.video.readyState&&(o=!1),this._srWasmModule.video&&o){var a=this._srWasmModule.video.videoWidth,u=this._srWasmModule.video.videoHeight,s=this._useVideoTexture?1:0;if(i){var c=a>=this._opts.maxWidth,l=u>=this._opts.maxHeight;if(c||l)return void this._onRenderCallback({code:yO,msg:"Invalid width or height"})}-1===this._preVideoHeight&&(this._preVideoHeight=u,this._preVideoWidth=a),(this._preVideoHeight!==u||this._preVideoWidth!==a)&&(this._setCanvasWidthHeight(!0),this._isDebug&&console.log("canvas size change"),this._preVideoHeight=u,this._preVideoWidth=a);var f=this._srWasmModule._drawFrame(r.videoWidth,r.videoHeight,e,1,s);if(this._hasGLLoged,this._hasGLLoged=!0,t&&f!==hO)return;this._onRenderCallback({code:f}),this._hasDelayedAddCanvas&&!this._isCanvasAdded&&this._doAppendCanvas(),this._hasDelayedAddCanvas=!0}}catch(w){var v,d,h,p,y;if(console.warn("render error",w),this._errorCount++,this._errorCount>5)return this._errorCount=0,this._running=!1,void(null===(y=this.onError)||void 0===y||y.call(this,w));var g="",m=null==w||null===(d=w.stack)||void 0===d?void 0:eS(d).call(d,"contains cross-origin data"),b=(null===(h=this._srWasmModule)||void 0===h?void 0:h.video)instanceof HTMLVideoElement;m&&b&&(g=nb(v="crossorigin:".concat(this._srWasmModule.video.getAttribute("crossorigin"),",set:")).call(v,this._isCrossOrigin));var _=Zm({errMsg:w.message,columnNumber:w.columnNumber,fileName:w.fileName,stack:null==w?void 0:w.stack});null===(p=this._onRenderCallback)||void 0===p||p.call(this,{code:-1,error:_,errMsg:w.message+g})}}}},{key:"_tryRender",value:function(){this._srWasmModule.video=this._getRenderTex(),this._onRequestAnimationFrame()}},{key:"doRender",value:function(){this._video.paused?this._isCanvasAdded&&this._onRender():this.run()}},{key:"run",value:function(){this._running=!0,this._tryRender()}},{key:"stop",value:function(){this._running=!1,this._doAppendCanvas()}},{key:"_setCanvasWidthHeight",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._canvas,r=this._getWidthHeight(),n=r.width,o=r.height;t||(e.style.width="".concat(n,"px"),e.style.height="".concat(o,"px"));var i=n,a=o,u=this._opts.useScale?dO[this._opts.scaleType]:1;e.width=Math.floor(i*u),e.height=Math.floor(a*u)}},{key:"_getWidthHeight",value:function(){var t=this._video;return{width:t.videoWidth||t.width,height:t.videoHeight||t.height}}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,this._srWasmModule._destroy())}},{key:"setParam",value:function(){}},{key:"setEnabled",value:function(t){t?this.doRender():this.stop()}},{key:"reInitCanvas",value:function(t){this._setCanvasWidthHeight(!0),this._preVideoHeight=(null==t?void 0:t.width)||0,this._preVideoWidth=(null==t?void 0:t.height)||0}}]);var t}(),wO=function(){return HT((function t(e,r){BT(this,t),this.options=e,this.supported=!1,this.elapsed=0,this.stopped=!1,this.enabled=!1,this.paramOptions={},this.onError=e.onError;try{var n=e.canvas.getContext("webgl");if(n){this.gl=n,this.supported=!0,this.setParam(r),this.initCanvas();var o=this.initProgram();if(!o)return;var i=this.initTexture(o),a=i.uTexture,u=i.texture;if(!a||!u)return void(this.supported=!1);this.uTexture=a,this.texture=u,this.render()}}catch(c){var s;this.supported=!1,null===(s=this.onError)||void 0===s||s.call(this,c)}}),[{key:"render",value:function(){var t=this;if(!this.stopped&&this.enabled){if(document.hidden||"hidden"===document.visibilityState)return void requestAnimationFrame((function(){t.render()}));var e=this.options.video;if(e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA){var r=performance.now(),n=this.gl,o=this.texture,i=this.uTexture,a=this.options.canvas;n.activeTexture(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,o),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!0),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,e),n.uniform1i(i,0),n.viewport(0,0,a.width,a.height),n.clear(n.COLOR_BUFFER_BIT),n.drawArrays(n.TRIANGLE_STRIP,0,4),this.elapsed=.8*this.elapsed+.2*(performance.now()-r)}requestAnimationFrame((function(){t.render()}))}}},{key:"initProgram",value:function(){var t=this.gl,e=this.createShader(t.VERTEX_SHADER,this.vertexShader()),r=this.createShader(t.FRAGMENT_SHADER,this.fragmentShader()),n=t.createProgram();if(n&&e&&r){t.attachShader(n,e),t.attachShader(n,r),t.linkProgram(n),t.useProgram(n);var o=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,o),t.bufferData(t.ARRAY_BUFFER,new Float32Array([-1,-1,0,0,1,-1,1,0,-1,1,0,1,1,1,1,1]),t.STATIC_DRAW);var i=t.getAttribLocation(n,"a_position"),a=t.getAttribLocation(n,"a_texCoord");return t.enableVertexAttribArray(i),t.vertexAttribPointer(i,2,t.FLOAT,!1,16,0),t.enableVertexAttribArray(a),t.vertexAttribPointer(a,2,t.FLOAT,!1,16,8),n}this.supported=!1}},{key:"createShader",value:function(t,e){var r=this.gl,n=r.createShader(t);return n?(r.shaderSource(n,e),r.compileShader(n),n):(this.supported=!1,null)}},{key:"setParam",value:function(t){this.paramOptions=pw(this.paramOptions,this.mergeDefaultParam(t||{}))}},{key:"destroy",value:function(){this.stopped=!0}},{key:"setEnabled",value:function(t){t!==this.enabled&&(this.enabled=t,this.enabled&&(this.stopped=!1,this.render()))}}])}(),SO=function(t){function e(){return BT(this,e),VT(this,e,arguments)}return $T(e,t),HT(e,[{key:"mergeDefaultParam",value:function(t){return pw({scale:4},t)}},{key:"initCanvas",value:function(){var t=this.options,e=t.canvas,r=t.width,n=t.height,o=this.paramOptions.scale,i=r*o,a=n*o;if(Math.min(i,a)>4e3){var u=r/n;i>a?i=(a=4e3)*u:a=(i=4e3)/u}e.width=Math.round(i),e.height=Math.round(a)}},{key:"setParam",value:function(t){var r=!1;if(t&&"number"==typeof(null==t?void 0:t.scale)&&t.scale!==this.paramOptions.scale&&(r=!0),tO(e,"setParam",this)([t]),r){this.initCanvas();var n=this.options.canvas;console.log("init SRBicubic canvas",n.width,n.height),this.gl.uniform2f(this.uTexSize,n.width,n.height)}}},{key:"initTexture",value:function(t){var e=this.gl,r=e.createTexture();e.bindTexture(e.TEXTURE_2D,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR);var n=e.getUniformLocation(t,"u_texture");this.uTexSize=e.getUniformLocation(t,"u_texSize");var o=this.options.canvas;return e.uniform2f(this.uTexSize,o.width,o.height),{uTexture:n,texture:r}}},{key:"vertexShader",value:function(){return"\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\nvarying vec2 v_texCoord;\nvoid main() {\n gl_Position = vec4(a_position, 0, 1);\n v_texCoord = a_texCoord;\n}"}},{key:"fragmentShader",value:function(){return"\nprecision mediump float;\nuniform sampler2D u_texture;\nuniform vec2 u_texSize; // 新增\nvarying vec2 v_texCoord;\n\nfloat cubic(float v) {\n v = abs(v);\n if (v <= 1.0) {\n return 1.0 - 2.0 * v * v + v * v * v;\n } else if (v < 2.0) {\n return 4.0 - 8.0 * v + 5.0 * v * v - v * v * v;\n }\n return 0.0;\n}\n\nvoid main() {\n vec2 texSize = u_texSize; // 使用 uniform\n vec2 uv = v_texCoord;\n vec2 pixel = uv * texSize - 0.5;\n vec2 base = floor(pixel);\n vec2 f = pixel - base;\n\n vec4 color = vec4(0.0);\n float total = 0.0;\n for (int m = -1; m <= 2; ++m) {\n for (int n = -1; n <= 2; ++n) {\n float weight = cubic(float(m) - f.x) * cubic(f.y - float(n));\n vec2 coord = (base + vec2(float(m), float(n)) + 0.5) / texSize;\n color += texture2D(u_texture, coord) * weight;\n total += weight;\n }\n }\n gl_FragColor = color / total;\n}"}}])}(wO),EO=function(t){function e(){return BT(this,e),VT(this,e,arguments)}return $T(e,t),HT(e,[{key:"mergeDefaultParam",value:function(t){return pw({sharpness:.7,contrast:1.2,saturation:1.1},t)}},{key:"initCanvas",value:function(){var t=this.options,e=t.canvas,r=t.width,n=t.height;e.width=r,e.height=n}},{key:"setParam",value:function(t){t&&("number"==typeof t.sharpness&&t.sharpness!==this.paramOptions.sharpness&&this.gl.uniform1f(this.uSharpness,t.sharpness),"number"==typeof t.contrast&&t.contrast!==this.paramOptions.contrast&&this.gl.uniform1f(this.uContrast,t.contrast),"number"==typeof t.saturation&&t.saturation!==this.paramOptions.saturation&&this.gl.uniform1f(this.uSaturation,t.saturation)),tO(e,"setParam",this)([t])}},{key:"initTexture",value:function(t){var e=this.gl,r=e.createTexture();e.bindTexture(e.TEXTURE_2D,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR);var n=e.getUniformLocation(t,"u_texture");this.uSharpness=e.getUniformLocation(t,"uSharpness"),this.uContrast=e.getUniformLocation(t,"uContrast"),this.uSaturation=e.getUniformLocation(t,"uSaturation");var o=this.paramOptions,i=o.sharpness,a=o.contrast,u=o.saturation;return e.uniform1f(this.uSharpness,i),e.uniform1f(this.uContrast,a),e.uniform1f(this.uSaturation,u),{uTexture:n,texture:r}}},{key:"vertexShader",value:function(){return"\nattribute vec4 a_position;\nattribute vec2 a_texCoord;\nvarying highp vec2 vTextureCoord;\nvoid main(void) {\n gl_Position = a_position;\n vTextureCoord = a_texCoord;\n}"}},{key:"fragmentShader",value:function(){return" \nprecision highp float;\nvarying highp vec2 vTextureCoord;\nuniform sampler2D u_texture;\nuniform float uSharpness;\nuniform float uContrast;\nuniform float uSaturation;\nvec4 sharpen(vec4 color, vec2 texCoord, float amount) {\n vec2 texelSize = vec2(0.001, 0.001);\n vec4 blur = vec4(0.0);\n blur += texture2D(u_texture, texCoord + vec2(-1.0, -1.0) * texelSize) * 0.0625;\n blur += texture2D(u_texture, texCoord + vec2(-1.0, 0.0) * texelSize) * 0.125;\n blur += texture2D(u_texture, texCoord + vec2(-1.0, 1.0) * texelSize) * 0.0625;\n blur += texture2D(u_texture, texCoord + vec2( 0.0, -1.0) * texelSize) * 0.125;\n blur += texture2D(u_texture, texCoord + vec2( 0.0, 0.0) * texelSize) * 0.25;\n blur += texture2D(u_texture, texCoord + vec2( 0.0, 1.0) * texelSize) * 0.125;\n blur += texture2D(u_texture, texCoord + vec2( 1.0, -1.0) * texelSize) * 0.0625;\n blur += texture2D(u_texture, texCoord + vec2( 1.0, 0.0) * texelSize) * 0.125;\n blur += texture2D(u_texture, texCoord + vec2( 1.0, 1.0) * texelSize) * 0.0625;\n return mix(blur, color, amount);\n}\nvec4 adjustContrast(vec4 color, float contrast) {\n return vec4((color.rgb - 0.5) * contrast + 0.5, color.a);\n}\nvec4 adjustSaturation(vec4 color, float saturation) {\n float grey = dot(color.rgb, vec3(0.299, 0.587, 0.114));\n return vec4(mix(vec3(grey), color.rgb, saturation), color.a);\n}\nvoid main(void) {\n vec4 originalColor = texture2D(u_texture, vTextureCoord);\n vec4 sharpenedColor = sharpen(originalColor, vTextureCoord, uSharpness);\n vec4 contrastedColor = adjustContrast(sharpenedColor, uContrast);\n vec4 finalColor = adjustSaturation(contrastedColor, uSaturation);\n gl_FragColor = finalColor;\n}"}}])}(wO),xO=new Jx(["play","pause","playing","waiting","seeking","seeked","ended","ratechange","volumechange","loadedmetadata","loadeddata","canplay","canplaythrough","durationchange","timeupdate","abort","error","emptied","stalled","suspend","resume","autoplay","autoplayfailed"]),TO=function(){return HT((function t(e){BT(this,t),this.tagName="VIDEO",this.isAdapter=!0,this.enabled=!1,this.video=e.video,this.canvas=e.canvas}),[{key:"setEnabled",value:function(t){this.enabled=t,this.renderEle.style.cursor=(t?this.video:this.canvas).style.cursor}},{key:"renderEle",get:function(){return this.enabled?this.canvas:this.video}},{key:"load",value:function(){return this.video.load()}},{key:"pause",value:function(){return this.video.pause()}},{key:"paused",get:function(){return this.video.paused}},{key:"volume",get:function(){return this.video.volume},set:function(t){this.video.volume=t}},{key:"play",value:function(){return this.video.play()}},{key:"videoWidth",get:function(){return this.video.videoWidth}},{key:"videoHeight",get:function(){return this.video.videoHeight}},{key:"muted",get:function(){return this.video.muted},set:function(t){this.video.muted=t}},{key:"style",get:function(){return this.renderEle.style}},{key:"cancelVideoFrameCallback",value:function(t){return this.video.cancelVideoFrameCallback(t)}},{key:"requestVideoFrameCallback",value:function(t){return this.video.requestVideoFrameCallback(t)}},{key:"addEventListener",value:function(t,e){return(xO.has(t)?this.video:this.canvas).addEventListener(t,e)}},{key:"removeEventListener",value:function(t,e){return(xO.has(t)?this.video:this.canvas).removeEventListener(t,e)}},{key:"requestPointerLock",value:function(){return this.renderEle.requestPointerLock()}},{key:"requestFullscreen",value:function(){return this.renderEle.requestFullscreen()}},{key:"remove",value:function(){this.video.remove(),this.canvas.remove()}},{key:"setAttribute",value:function(t,e){return this.renderEle.setAttribute(t,e)}},{key:"getAttribute",value:function(t){return this.renderEle.getAttribute(t)}},{key:"playsInline",set:function(t){this.video.playsInline=t}},{key:"autoplay",set:function(t){this.video.autoplay=t}},{key:"srcObject",get:function(){return this.video.srcObject},set:function(t){this.video.srcObject=t}},{key:"parentElement",get:function(){return this.renderEle.parentElement}},{key:"controls",get:function(){return this.video.controls},set:function(t){this.video.controls=t}},{key:"id",get:function(){return this.renderEle.id},set:function(t){this.renderEle.id=t}}])}();function OO(){if(MT())return!1;try{return function(){try{var t=document.createElement("canvas").getContext("webgl"),e=!!t&&"function"==typeof t.getParameter;if(t){var r=t.getExtension("WEBGL_lose_context");r&&r.loseContext()}return e}catch(n){return console.error("WebGL 检测失败:",n),!1}}()&&function(){try{var t=document.createElement("canvas").getContext("webgl2");if(t){var e=t.getExtension("WEBGL_lose_context");e&&e.loseContext()}return!!t}catch(r){return console.error("WebGL2 检测失败:",r),!1}}()&&function(){try{if("object"!==(("undefined"==typeof WebAssembly?"undefined":Kl(WebAssembly))>"u"?"undefined":rO(WebAssembly)))return!1;var t=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));return"object"===rO(new WebAssembly.Instance(t))}catch(e){return console.error("WebAssembly 检测失败:",e),!1}}()}catch(t){return!1}}var RO={bicubic:SO,enhance:EO,bmf:_O};function kO(){!function(t){var e;if(null!==(e=document)&&void 0!==e&&e.createElement){var r=document.createElement("style");r.innerHTML=t,document.head.appendChild(r)}}("\n.vecg-sr-canvas {\n width: 100%;\n height: 100%;\n object-fit: contain;\n}\n.vecg-sr-canvas-hide{\n position: absolute;\n z-index: -10000;\n opacity: 0;\n display: none;\n}\n.vecg-sr-video {\n height: 0px;\n width: 0px;\n position: fixed;\n top: -100000px;\n z-index: -100000;\n opacity: 0;\n}\n.vecg-sr-debug-video {\n position: fixed;\n z-index: 100000;\n left: 500px;\n top: 0px;\n width: 400px;\n height: 800px;\n}")}var CO=function(t){function e(){var t,r,n,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return BT(this,e),(n=VT(this,e,[{name:"superResolution",type:"main",config:o}])).isVideoDataReady=!1,n.pendingEnabled=null,n.enabled=!1,n.onError=o.onError,n.disableDomManipulation=null!==(t=o.disableDomManipulation)&&void 0!==t&&t,n.isDebug=null!==(r=o.isDebug)&&void 0!==r&&r,kO(),n}return $T(e,t),HT(e,[{key:"init",value:function(t){var r,n,o;(tO(e,"init",this)([t]),null!==(r=t.config)&&void 0!==r&&r.onError)&&(this.onError=null===(o=t.config)||void 0===o?void 0:o.onError);return null!==(n=t.config)&&void 0!==n&&n.video?this.initVideo(t.config.video):null}},{key:"initVideo",value:function(t){return this.config.video=t,this.isVideoDataReady=!1,this.pendingEnabled=null,this._initVideo()}},{key:"destroy",value:function(){var t,e;this.canvas.remove(),this.isDebug&&console.log("remove canvas from body"),null===(t=this.mode)||void 0===t||t.setEnabled(!1),null===(e=this.mode)||void 0===e||e.destroy()}},{key:"switchMode",value:function(t){var e,r=this;this.isDebug&&console.log("SR DEBUG",t),this.config.mode=t,null===(e=this.mode)||void 0===e||e.destroy();var n=this.config.video;if(this.mode=new RO[t]({video:n,width:n.videoWidth,height:n.videoHeight,canvas:this.canvas,onError:function(t){var e;null===(e=r.onError)||void 0===e||e.call(r,t)},isDebug:this.isDebug},this.config.config),this.isVideoDataReady=!0,null!==this.pendingEnabled){var o=this.pendingEnabled;this.pendingEnabled=null,this.setEnabled(o)}}},{key:"setParam",value:function(t){var e;null===(e=this.mode)||void 0===e||e.setParam(t)}},{key:"getElapsed",value:function(){var t;return(null===(t=this.mode)||void 0===t?void 0:t.elapsed)||0}},{key:"setEnabled",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.isDebug&&console.log("SR DEBUG setEnabled",t,!this.isVideoDataReady,!this.mode),this.isVideoDataReady&&this.mode){if(t!==this.enabled){if(this.enabled=t,!this.disableDomManipulation)if(t){var n;null===(n=this.video.canvas.classList)||void 0===n||n.remove("vecg-sr-canvas-hide");var o=function(){var t,r;null===(t=e.video.video.parentElement)||void 0===t||t.insertBefore(e.video.canvas,e.video.video),null===(r=e.video.video.classList)||void 0===r||r.add("vecg-sr-video"),e.isDebug&&console.log("SR DEBUG insert canvas before video")};this.isDebug&&console.log("SR DEBUG fromInit",r),r?jw(o,500):o()}else{var i,a;null===(i=this.video.video.classList)||void 0===i||i.remove("vecg-sr-video"),null===(a=this.video.canvas.classList)||void 0===a||a.add("vecg-sr-canvas-hide"),this.video.canvas.parentElement.insertBefore(this.video.video,this.video.canvas),this.isDebug&&console.log("SR DEBUG insert video before canvas")}this.video.setEnabled(t),this.mode.setEnabled(t)}}else this.pendingEnabled=t}},{key:"reInitCanvas",value:function(t){var e;null===(e=this.mode)||void 0===e||e.reInitCanvas(t)}},{key:"_initVideo",value:function(){var t=this,e=this.config.mode,r=void 0===e?"bicubic":e,n=this.config.video,o=n.style;this.canvas=document.createElement("canvas"),this.disableDomManipulation||(this.canvas.classList.add("vecg-sr-canvas"),this.canvas.classList.add("vecg-sr-canvas-hide"),this.canvas.style.objectFit=o.objectFit,document.body.appendChild(this.canvas),this.isDebug&&console.log("add canvas to body"),window.__showSROriginVideo&&n.classList.add("vecg-sr-debug-video"));var i=new TO({video:n,canvas:this.canvas});return this.video=i,n.readyState>=2||n.videoHeight?this.switchMode(r):n.addEventListener("loadedmetadata",(function(){t.switchMode(r)})),i}}])}(GT);CO.isSuperResolutionSupport=OO;var AO=om,PO=dm,jO=function(t,e,r,n){for(var o,i=n>1?void 0:n?PO(e,r):e,a=t.length-1;a>=0;a--)(o=t[a])&&(i=(n?o(e,r,i):o(i))||i);return n&&i&&AO(e,r,i),i},DO=function(t){function e(){var t,r,n,o,i,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Wg(this,e),n=this,o=tm(o=e),nm(r=Hg(n,Xg()?Fo(o,i||[],tm(n).constructor):o.apply(n,i)),"name","RTCSRExtension"),nm(r,"version","4.66.36-beta.0"),nm(r,"_enable",!1),nm(r,"_superResolution",void 0),nm(r,"_scale",2),nm(r,"_isReady",!1),r._scale=null!==(t=a.scale)&&void 0!==t?t:2,r}return rm(e,t),Bg(e,[{key:"init",value:(o=Ng(Mg().mark((function t(){var e,r;return Mg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return null===(e=this.monitor)||void 0===e||e.report("rtc_invoke_status",{sdk_api_name:"RTCSRExtension.init.params",message:Zm({scale:this._scale}),error_code:0}),t.next=3,bO();case 3:null===(r=this.logger)||void 0===r||r.print("SR","Extension initialized");case 4:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"initVideoAndScale",value:function(t,e){void 0!==e&&(this._scale=e),this._superResolution&&(this._superResolution.destroy(),this._superResolution=void 0,this._isReady=!1);var r,n=this._getAlgTypeAndScaleType(this._scale);(this._superResolution=new CO,this._superResolution.init({config:{mode:"bmf",onError:function(t){console.log(t)},config:n}}),t)&&(null===(r=this._superResolution)||void 0===r||r.initVideo(t),this._isReady=!0)}},{key:"checkCompatibility",value:(n=Ng(Mg().mark((function t(){var e,r;return Mg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e="",r=[],t.prev=2,OO()){t.next=7;break}return r.push("Browser does not support required features"),t.abrupt("return",{isCompatible:!1,reasons:r,message:"Unsupported browser"});case 7:return t.abrupt("return",{isCompatible:!0,reasons:[],message:e});case 10:return t.prev=10,t.t0=t.catch(2),e=(null===t.t0||void 0===t.t0?void 0:t.t0.toString())||(null===t.t0||void 0===t.t0?void 0:t.t0.stack)||"",r.push("Compatibility check failed"),t.abrupt("return",{isCompatible:!1,reasons:r,message:e});case 15:case"end":return t.stop()}}),t,null,[[2,10]])}))),function(){return n.apply(this,arguments)})},{key:"enable",value:function(){var t,e;!this._enable&&this._isReady&&(this._enable=!0,null===(t=this._superResolution)||void 0===t||t.setEnabled(!0),null===(e=this.logger)||void 0===e||e.info("SR","enabled"))}},{key:"disable",value:function(){var t,e;this._enable&&this._isReady&&(this._enable=!1,null===(t=this._superResolution)||void 0===t||t.setEnabled(!1),null===(e=this.logger)||void 0===e||e.info("SR","disabled"))}},{key:"isSupported",value:(r=Ng(Mg().mark((function t(){var e;return Mg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.checkCompatibility();case 2:return e=t.sent,t.abrupt("return",e.isCompatible);case 4:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"isOpen",value:function(){return this._enable}},{key:"destroy",value:function(){var t;null===(t=this._superResolution)||void 0===t||t.destroy(),this._superResolution=void 0,this._isReady=!1,this._enable=!1}},{key:"_getAlgTypeAndScaleType",value:function(t){var e={};switch(t){case 2:e={algType:oO,scaleType:aO};break;case 1.1:e={algType:iO,scaleType:uO};break;case 1.2:e={algType:iO,scaleType:sO};break;case 1.3:e={algType:iO,scaleType:cO};break;case 1.4:e={algType:iO,scaleType:lO};break;case 1.5:e={algType:iO,scaleType:fO}}return e}}]);var r,n,o}(F_);return jO([N_],DO.prototype,"init",1),jO([N_],DO.prototype,"initVideoAndScale",1),jO([N_],DO.prototype,"checkCompatibility",1),jO([N_],DO.prototype,"enable",1),jO([N_],DO.prototype,"disable",1),DO}));
|
|
6
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).RTCSRExtension=e()}(this,(function(){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var r=function(t){return t&&t.Math===Math&&t},n=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof t&&t)||r("object"==typeof t&&t)||function(){return this}()||Function("return this")(),o=function(t){try{return!!t()}catch(e){return!0}},i=!o((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),a=i,u=Function.prototype,s=u.apply,c=u.call,l="object"==typeof Reflect&&Reflect.apply||(a?c.bind(s):function(){return c.apply(s,arguments)}),f=i,v=Function.prototype,d=v.call,h=f&&v.bind.bind(d,d),p=f?h:function(t){return function(){return d.apply(t,arguments)}},y=p,g=y({}.toString),m=y("".slice),b=function(t){return m(g(t),8,-1)},_=b,w=p,S=function(t){if("Function"===_(t))return w(t)},E="object"==typeof document&&document.all,x=void 0===E&&void 0!==E?function(t){return"function"==typeof t||t===E}:function(t){return"function"==typeof t},T={},O=!o((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),R=i,k=Function.prototype.call,C=R?k.bind(k):function(){return k.apply(k,arguments)},A={},P={}.propertyIsEnumerable,j=Object.getOwnPropertyDescriptor,D=j&&!P.call({1:2},1);A.f=D?function(t){var e=j(this,t);return!!e&&e.enumerable}:P;var L,I,M=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},F=o,N=b,W=Object,U=p("".split),G=F((function(){return!W("z").propertyIsEnumerable(0)}))?function(t){return"String"===N(t)?U(t,""):W(t)}:W,z=function(t){return null==t},V=z,B=TypeError,H=function(t){if(V(t))throw new B("Can't call method on "+t);return t},X=G,q=H,J=function(t){return X(q(t))},$=x,K=function(t){return"object"==typeof t?null!==t:$(t)},Y={},Z=Y,Q=n,tt=x,et=function(t){return tt(t)?t:void 0},rt=function(t,e){return arguments.length<2?et(Z[t])||et(Q[t]):Z[t]&&Z[t][e]||Q[t]&&Q[t][e]},nt=p({}.isPrototypeOf),ot=n.navigator,it=ot&&ot.userAgent,at=it?String(it):"",ut=n,st=at,ct=ut.process,lt=ut.Deno,ft=ct&&ct.versions||lt&<.version,vt=ft&&ft.v8;vt&&(I=(L=vt.split("."))[0]>0&&L[0]<4?1:+(L[0]+L[1])),!I&&st&&(!(L=st.match(/Edge\/(\d+)/))||L[1]>=74)&&(L=st.match(/Chrome\/(\d+)/))&&(I=+L[1]);var dt=I,ht=dt,pt=o,yt=n.String,gt=!!Object.getOwnPropertySymbols&&!pt((function(){var t=Symbol("symbol detection");return!yt(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&ht&&ht<41})),mt=gt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,bt=rt,_t=x,wt=nt,St=Object,Et=mt?function(t){return"symbol"==typeof t}:function(t){var e=bt("Symbol");return _t(e)&&wt(e.prototype,St(t))},xt=String,Tt=function(t){try{return xt(t)}catch(e){return"Object"}},Ot=x,Rt=Tt,kt=TypeError,Ct=function(t){if(Ot(t))return t;throw new kt(Rt(t)+" is not a function")},At=Ct,Pt=z,jt=function(t,e){var r=t[e];return Pt(r)?void 0:At(r)},Dt=C,Lt=x,It=K,Mt=TypeError,Ft={exports:{}},Nt=n,Wt=Object.defineProperty,Ut=n,Gt=function(t,e){try{Wt(Nt,t,{value:e,configurable:!0,writable:!0})}catch(r){Nt[t]=e}return e},zt="__core-js_shared__",Vt=Ft.exports=Ut[zt]||Gt(zt,{});(Vt.versions||(Vt.versions=[])).push({version:"3.39.0",mode:"pure",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.39.0/LICENSE",source:"https://github.com/zloirock/core-js"});var Bt=Ft.exports,Ht=Bt,Xt=function(t,e){return Ht[t]||(Ht[t]=e||{})},qt=H,Jt=Object,$t=function(t){return Jt(qt(t))},Kt=$t,Yt=p({}.hasOwnProperty),Zt=Object.hasOwn||function(t,e){return Yt(Kt(t),e)},Qt=p,te=0,ee=Math.random(),re=Qt(1..toString),ne=function(t){return"Symbol("+(void 0===t?"":t)+")_"+re(++te+ee,36)},oe=Xt,ie=Zt,ae=ne,ue=gt,se=mt,ce=n.Symbol,le=oe("wks"),fe=se?ce.for||ce:ce&&ce.withoutSetter||ae,ve=function(t){return ie(le,t)||(le[t]=ue&&ie(ce,t)?ce[t]:fe("Symbol."+t)),le[t]},de=C,he=K,pe=Et,ye=jt,ge=function(t,e){var r,n;if("string"===e&&Lt(r=t.toString)&&!It(n=Dt(r,t)))return n;if(Lt(r=t.valueOf)&&!It(n=Dt(r,t)))return n;if("string"!==e&&Lt(r=t.toString)&&!It(n=Dt(r,t)))return n;throw new Mt("Can't convert object to primitive value")},me=TypeError,be=ve("toPrimitive"),_e=function(t,e){if(!he(t)||pe(t))return t;var r,n=ye(t,be);if(n){if(void 0===e&&(e="default"),r=de(n,t,e),!he(r)||pe(r))return r;throw new me("Can't convert object to primitive value")}return void 0===e&&(e="number"),ge(t,e)},we=_e,Se=Et,Ee=function(t){var e=we(t,"string");return Se(e)?e:e+""},xe=K,Te=n.document,Oe=xe(Te)&&xe(Te.createElement),Re=function(t){return Oe?Te.createElement(t):{}},ke=Re,Ce=!O&&!o((function(){return 7!==Object.defineProperty(ke("div"),"a",{get:function(){return 7}}).a})),Ae=O,Pe=C,je=A,De=M,Le=J,Ie=Ee,Me=Zt,Fe=Ce,Ne=Object.getOwnPropertyDescriptor;T.f=Ae?Ne:function(t,e){if(t=Le(t),e=Ie(e),Fe)try{return Ne(t,e)}catch(r){}if(Me(t,e))return De(!Pe(je.f,t,e),t[e])};var We=o,Ue=x,Ge=/#|\.prototype\./,ze=function(t,e){var r=Be[Ve(t)];return r===Xe||r!==He&&(Ue(e)?We(e):!!e)},Ve=ze.normalize=function(t){return String(t).replace(Ge,".").toLowerCase()},Be=ze.data={},He=ze.NATIVE="N",Xe=ze.POLYFILL="P",qe=ze,Je=Ct,$e=i,Ke=S(S.bind),Ye=function(t,e){return Je(t),void 0===e?t:$e?Ke(t,e):function(){return t.apply(e,arguments)}},Ze={},Qe=O&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),tr=K,er=String,rr=TypeError,nr=function(t){if(tr(t))return t;throw new rr(er(t)+" is not an object")},or=O,ir=Ce,ar=Qe,ur=nr,sr=Ee,cr=TypeError,lr=Object.defineProperty,fr=Object.getOwnPropertyDescriptor,vr="enumerable",dr="configurable",hr="writable";Ze.f=or?ar?function(t,e,r){if(ur(t),e=sr(e),ur(r),"function"==typeof t&&"prototype"===e&&"value"in r&&hr in r&&!r[hr]){var n=fr(t,e);n&&n[hr]&&(t[e]=r.value,r={configurable:dr in r?r[dr]:n[dr],enumerable:vr in r?r[vr]:n[vr],writable:!1})}return lr(t,e,r)}:lr:function(t,e,r){if(ur(t),e=sr(e),ur(r),ir)try{return lr(t,e,r)}catch(n){}if("get"in r||"set"in r)throw new cr("Accessors not supported");return"value"in r&&(t[e]=r.value),t};var pr=Ze,yr=M,gr=O?function(t,e,r){return pr.f(t,e,yr(1,r))}:function(t,e,r){return t[e]=r,t},mr=n,br=l,_r=S,wr=x,Sr=T.f,Er=qe,xr=Y,Tr=Ye,Or=gr,Rr=Zt,kr=function(t){var e=function(r,n,o){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(r);case 2:return new t(r,n)}return new t(r,n,o)}return br(t,this,arguments)};return e.prototype=t.prototype,e},Cr=function(t,e){var r,n,o,i,a,u,s,c,l,f=t.target,v=t.global,d=t.stat,h=t.proto,p=v?mr:d?mr[f]:mr[f]&&mr[f].prototype,y=v?xr:xr[f]||Or(xr,f,{})[f],g=y.prototype;for(i in e)n=!(r=Er(v?i:f+(d?".":"#")+i,t.forced))&&p&&Rr(p,i),u=y[i],n&&(s=t.dontCallGetSet?(l=Sr(p,i))&&l.value:p[i]),a=n&&s?s:e[i],(r||h||typeof u!=typeof a)&&(c=t.bind&&n?Tr(a,mr):t.wrap&&n?kr(a):h&&wr(a)?_r(a):a,(t.sham||a&&a.sham||u&&u.sham)&&Or(c,"sham",!0),Or(y,i,c),h&&(Rr(xr,o=f+"Prototype")||Or(xr,o,{}),Or(xr[o],i,a),t.real&&g&&(r||!g[i])&&Or(g,i,a)))},Ar=p([].slice),Pr=p,jr=Ct,Dr=K,Lr=Zt,Ir=Ar,Mr=i,Fr=Function,Nr=Pr([].concat),Wr=Pr([].join),Ur={},Gr=Mr?Fr.bind:function(t){var e=jr(this),r=e.prototype,n=Ir(arguments,1),o=function(){var r=Nr(n,Ir(arguments));return this instanceof o?function(t,e,r){if(!Lr(Ur,e)){for(var n=[],o=0;o<e;o++)n[o]="a["+o+"]";Ur[e]=Fr("C,a","return new C("+Wr(n,",")+")")}return Ur[e](t,r)}(e,r.length,r):e.apply(t,r)};return Dr(r)&&(o.prototype=r),o},zr={};zr[ve("toStringTag")]="z";var Vr="[object z]"===String(zr),Br=Vr,Hr=x,Xr=b,qr=ve("toStringTag"),Jr=Object,$r="Arguments"===Xr(function(){return arguments}()),Kr=Br?Xr:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(r){}}(e=Jr(t),qr))?r:$r?Xr(e):"Object"===(n=Xr(e))&&Hr(e.callee)?"Arguments":n},Yr=x,Zr=Bt,Qr=p(Function.toString);Yr(Zr.inspectSource)||(Zr.inspectSource=function(t){return Qr(t)});var tn=Zr.inspectSource,en=p,rn=o,nn=x,on=Kr,an=tn,un=function(){},sn=rt("Reflect","construct"),cn=/^\s*(?:class|function)\b/,ln=en(cn.exec),fn=!cn.test(un),vn=function(t){if(!nn(t))return!1;try{return sn(un,[],t),!0}catch(e){return!1}},dn=function(t){if(!nn(t))return!1;switch(on(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return fn||!!ln(cn,an(t))}catch(e){return!0}};dn.sham=!0;var hn=!sn||rn((function(){var t;return vn(vn.call)||!vn(Object)||!vn((function(){t=!0}))||t}))?dn:vn,pn=hn,yn=Tt,gn=TypeError,mn=function(t){if(pn(t))return t;throw new gn(yn(t)+" is not a constructor")},bn={},_n=Math.ceil,wn=Math.floor,Sn=Math.trunc||function(t){var e=+t;return(e>0?wn:_n)(e)},En=function(t){var e=+t;return e!=e||0===e?0:Sn(e)},xn=En,Tn=Math.max,On=Math.min,Rn=function(t,e){var r=xn(t);return r<0?Tn(r+e,0):On(r,e)},kn=En,Cn=Math.min,An=function(t){var e=kn(t);return e>0?Cn(e,9007199254740991):0},Pn=An,jn=function(t){return Pn(t.length)},Dn=J,Ln=Rn,In=jn,Mn=function(t){return function(e,r,n){var o=Dn(e),i=In(o);if(0===i)return!t&&-1;var a,u=Ln(n,i);if(t&&r!=r){for(;i>u;)if((a=o[u++])!=a)return!0}else for(;i>u;u++)if((t||u in o)&&o[u]===r)return t||u||0;return!t&&-1}},Fn={includes:Mn(!0),indexOf:Mn(!1)},Nn={},Wn=Zt,Un=J,Gn=Fn.indexOf,zn=Nn,Vn=p([].push),Bn=function(t,e){var r,n=Un(t),o=0,i=[];for(r in n)!Wn(zn,r)&&Wn(n,r)&&Vn(i,r);for(;e.length>o;)Wn(n,r=e[o++])&&(~Gn(i,r)||Vn(i,r));return i},Hn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Xn=Bn,qn=Hn,Jn=Object.keys||function(t){return Xn(t,qn)},$n=O,Kn=Qe,Yn=Ze,Zn=nr,Qn=J,to=Jn;bn.f=$n&&!Kn?Object.defineProperties:function(t,e){Zn(t);for(var r,n=Qn(e),o=to(e),i=o.length,a=0;i>a;)Yn.f(t,r=o[a++],n[r]);return t};var eo,ro=rt("document","documentElement"),no=ne,oo=Xt("keys"),io=function(t){return oo[t]||(oo[t]=no(t))},ao=nr,uo=bn,so=Hn,co=Nn,lo=ro,fo=Re,vo="prototype",ho="script",po=io("IE_PROTO"),yo=function(){},go=function(t){return"<"+ho+">"+t+"</"+ho+">"},mo=function(t){t.write(go("")),t.close();var e=t.parentWindow.Object;return t=null,e},bo=function(){try{eo=new ActiveXObject("htmlfile")}catch(o){}var t,e,r;bo="undefined"!=typeof document?document.domain&&eo?mo(eo):(e=fo("iframe"),r="java"+ho+":",e.style.display="none",lo.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(go("document.F=Object")),t.close(),t.F):mo(eo);for(var n=so.length;n--;)delete bo[vo][so[n]];return bo()};co[po]=!0;var _o=Object.create||function(t,e){var r;return null!==t?(yo[vo]=ao(t),r=new yo,yo[vo]=null,r[po]=t):r=bo(),void 0===e?r:uo.f(r,e)},wo=Cr,So=l,Eo=Gr,xo=mn,To=nr,Oo=K,Ro=_o,ko=o,Co=rt("Reflect","construct"),Ao=Object.prototype,Po=[].push,jo=ko((function(){function t(){}return!(Co((function(){}),[],t)instanceof t)})),Do=!ko((function(){Co((function(){}))})),Lo=jo||Do;wo({target:"Reflect",stat:!0,forced:Lo,sham:Lo},{construct:function(t,e){xo(t),To(e);var r=arguments.length<3?t:xo(arguments[2]);if(Do&&!jo)return Co(t,e,r);if(t===r){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var n=[null];return So(Po,n,e),new(So(Eo,t,n))}var o=r.prototype,i=Ro(Oo(o)?o:Ao),a=So(t,i,e);return Oo(a)?a:i}});var Io=Y.Reflect.construct,Mo=e(Io),Fo=e(Io),No=b,Wo=Array.isArray||function(t){return"Array"===No(t)},Uo=TypeError,Go=function(t){if(t>9007199254740991)throw Uo("Maximum allowed index exceeded");return t},zo=O,Vo=Ze,Bo=M,Ho=function(t,e,r){zo?Vo.f(t,e,Bo(0,r)):t[e]=r},Xo=Wo,qo=hn,Jo=K,$o=ve("species"),Ko=Array,Yo=function(t){var e;return Xo(t)&&(e=t.constructor,(qo(e)&&(e===Ko||Xo(e.prototype))||Jo(e)&&null===(e=e[$o]))&&(e=void 0)),void 0===e?Ko:e},Zo=function(t,e){return new(Yo(t))(0===e?0:e)},Qo=o,ti=dt,ei=ve("species"),ri=function(t){return ti>=51||!Qo((function(){var e=[];return(e.constructor={})[ei]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},ni=Cr,oi=o,ii=Wo,ai=K,ui=$t,si=jn,ci=Go,li=Ho,fi=Zo,vi=ri,di=dt,hi=ve("isConcatSpreadable"),pi=di>=51||!oi((function(){var t=[];return t[hi]=!1,t.concat()[0]!==t})),yi=function(t){if(!ai(t))return!1;var e=t[hi];return void 0!==e?!!e:ii(t)};ni({target:"Array",proto:!0,arity:1,forced:!pi||!vi("concat")},{concat:function(t){var e,r,n,o,i,a=ui(this),u=fi(a,0),s=0;for(e=-1,n=arguments.length;e<n;e++)if(yi(i=-1===e?a:arguments[e]))for(o=si(i),ci(s+o),r=0;r<o;r++,s++)r in i&&li(u,s,i[r]);else ci(s+1),li(u,s++,i);return u.length=s,u}});var gi=Kr,mi=String,bi=function(t){if("Symbol"===gi(t))throw new TypeError("Cannot convert a Symbol value to a string");return mi(t)},_i={},wi=Bn,Si=Hn.concat("length","prototype");_i.f=Object.getOwnPropertyNames||function(t){return wi(t,Si)};var Ei={},xi=b,Ti=J,Oi=_i.f,Ri=Ar,ki="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Ei.f=function(t){return ki&&"Window"===xi(t)?function(t){try{return Oi(t)}catch(e){return Ri(ki)}}(t):Oi(Ti(t))};var Ci={};Ci.f=Object.getOwnPropertySymbols;var Ai=gr,Pi=function(t,e,r,n){return n&&n.enumerable?t[e]=r:Ai(t,e,r),t},ji=Ze,Di=function(t,e,r){return ji.f(t,e,r)},Li={},Ii=ve;Li.f=Ii;var Mi,Fi,Ni,Wi=Y,Ui=Zt,Gi=Li,zi=Ze.f,Vi=function(t){var e=Wi.Symbol||(Wi.Symbol={});Ui(e,t)||zi(e,t,{value:Gi.f(t)})},Bi=C,Hi=rt,Xi=ve,qi=Pi,Ji=function(){var t=Hi("Symbol"),e=t&&t.prototype,r=e&&e.valueOf,n=Xi("toPrimitive");e&&!e[n]&&qi(e,n,(function(t){return Bi(r,this)}),{arity:1})},$i=Kr,Ki=Vr?{}.toString:function(){return"[object "+$i(this)+"]"},Yi=Vr,Zi=Ze.f,Qi=gr,ta=Zt,ea=Ki,ra=ve("toStringTag"),na=function(t,e,r,n){var o=r?t:t&&t.prototype;o&&(ta(o,ra)||Zi(o,ra,{configurable:!0,value:e}),n&&!Yi&&Qi(o,"toString",ea))},oa=x,ia=n.WeakMap,aa=oa(ia)&&/native code/.test(String(ia)),ua=n,sa=K,ca=gr,la=Zt,fa=Bt,va=io,da=Nn,ha="Object already initialized",pa=ua.TypeError,ya=ua.WeakMap;if(aa||fa.state){var ga=fa.state||(fa.state=new ya);ga.get=ga.get,ga.has=ga.has,ga.set=ga.set,Mi=function(t,e){if(ga.has(t))throw new pa(ha);return e.facade=t,ga.set(t,e),e},Fi=function(t){return ga.get(t)||{}},Ni=function(t){return ga.has(t)}}else{var ma=va("state");da[ma]=!0,Mi=function(t,e){if(la(t,ma))throw new pa(ha);return e.facade=t,ca(t,ma,e),e},Fi=function(t){return la(t,ma)?t[ma]:{}},Ni=function(t){return la(t,ma)}}var ba={set:Mi,get:Fi,has:Ni,enforce:function(t){return Ni(t)?Fi(t):Mi(t,{})},getterFor:function(t){return function(e){var r;if(!sa(e)||(r=Fi(e)).type!==t)throw new pa("Incompatible receiver, "+t+" required");return r}}},_a=Ye,wa=G,Sa=$t,Ea=jn,xa=Zo,Ta=p([].push),Oa=function(t){var e=1===t,r=2===t,n=3===t,o=4===t,i=6===t,a=7===t,u=5===t||i;return function(s,c,l,f){for(var v,d,h=Sa(s),p=wa(h),y=Ea(p),g=_a(c,l),m=0,b=f||xa,_=e?b(s,y):r||a?b(s,0):void 0;y>m;m++)if((u||m in p)&&(d=g(v=p[m],m,h),t))if(e)_[m]=d;else if(d)switch(t){case 3:return!0;case 5:return v;case 6:return m;case 2:Ta(_,v)}else switch(t){case 4:return!1;case 7:Ta(_,v)}return i?-1:n||o?o:_}},Ra={forEach:Oa(0),map:Oa(1),filter:Oa(2),some:Oa(3),every:Oa(4),find:Oa(5),findIndex:Oa(6),filterReject:Oa(7)},ka=Cr,Ca=n,Aa=C,Pa=p,ja=O,Da=gt,La=o,Ia=Zt,Ma=nt,Fa=nr,Na=J,Wa=Ee,Ua=bi,Ga=M,za=_o,Va=Jn,Ba=_i,Ha=Ei,Xa=Ci,qa=T,Ja=Ze,$a=bn,Ka=A,Ya=Pi,Za=Di,Qa=Xt,tu=Nn,eu=ne,ru=ve,nu=Li,ou=Vi,iu=Ji,au=na,uu=ba,su=Ra.forEach,cu=io("hidden"),lu="Symbol",fu="prototype",vu=uu.set,du=uu.getterFor(lu),hu=Object[fu],pu=Ca.Symbol,yu=pu&&pu[fu],gu=Ca.RangeError,mu=Ca.TypeError,bu=Ca.QObject,_u=qa.f,wu=Ja.f,Su=Ha.f,Eu=Ka.f,xu=Pa([].push),Tu=Qa("symbols"),Ou=Qa("op-symbols"),Ru=Qa("wks"),ku=!bu||!bu[fu]||!bu[fu].findChild,Cu=function(t,e,r){var n=_u(hu,e);n&&delete hu[e],wu(t,e,r),n&&t!==hu&&wu(hu,e,n)},Au=ja&&La((function(){return 7!==za(wu({},"a",{get:function(){return wu(this,"a",{value:7}).a}})).a}))?Cu:wu,Pu=function(t,e){var r=Tu[t]=za(yu);return vu(r,{type:lu,tag:t,description:e}),ja||(r.description=e),r},ju=function(t,e,r){t===hu&&ju(Ou,e,r),Fa(t);var n=Wa(e);return Fa(r),Ia(Tu,n)?(r.enumerable?(Ia(t,cu)&&t[cu][n]&&(t[cu][n]=!1),r=za(r,{enumerable:Ga(0,!1)})):(Ia(t,cu)||wu(t,cu,Ga(1,za(null))),t[cu][n]=!0),Au(t,n,r)):wu(t,n,r)},Du=function(t,e){Fa(t);var r=Na(e),n=Va(r).concat(Fu(r));return su(n,(function(e){ja&&!Aa(Lu,r,e)||ju(t,e,r[e])})),t},Lu=function(t){var e=Wa(t),r=Aa(Eu,this,e);return!(this===hu&&Ia(Tu,e)&&!Ia(Ou,e))&&(!(r||!Ia(this,e)||!Ia(Tu,e)||Ia(this,cu)&&this[cu][e])||r)},Iu=function(t,e){var r=Na(t),n=Wa(e);if(r!==hu||!Ia(Tu,n)||Ia(Ou,n)){var o=_u(r,n);return!o||!Ia(Tu,n)||Ia(r,cu)&&r[cu][n]||(o.enumerable=!0),o}},Mu=function(t){var e=Su(Na(t)),r=[];return su(e,(function(t){Ia(Tu,t)||Ia(tu,t)||xu(r,t)})),r},Fu=function(t){var e=t===hu,r=Su(e?Ou:Na(t)),n=[];return su(r,(function(t){!Ia(Tu,t)||e&&!Ia(hu,t)||xu(n,Tu[t])})),n};Da||(pu=function(){if(Ma(yu,this))throw new mu("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?Ua(arguments[0]):void 0,e=eu(t),r=function(t){var n=void 0===this?Ca:this;n===hu&&Aa(r,Ou,t),Ia(n,cu)&&Ia(n[cu],e)&&(n[cu][e]=!1);var o=Ga(1,t);try{Au(n,e,o)}catch(i){if(!(i instanceof gu))throw i;Cu(n,e,o)}};return ja&&ku&&Au(hu,e,{configurable:!0,set:r}),Pu(e,t)},Ya(yu=pu[fu],"toString",(function(){return du(this).tag})),Ya(pu,"withoutSetter",(function(t){return Pu(eu(t),t)})),Ka.f=Lu,Ja.f=ju,$a.f=Du,qa.f=Iu,Ba.f=Ha.f=Mu,Xa.f=Fu,nu.f=function(t){return Pu(ru(t),t)},ja&&Za(yu,"description",{configurable:!0,get:function(){return du(this).description}})),ka({global:!0,constructor:!0,wrap:!0,forced:!Da,sham:!Da},{Symbol:pu}),su(Va(Ru),(function(t){ou(t)})),ka({target:lu,stat:!0,forced:!Da},{useSetter:function(){ku=!0},useSimple:function(){ku=!1}}),ka({target:"Object",stat:!0,forced:!Da,sham:!ja},{create:function(t,e){return void 0===e?za(t):Du(za(t),e)},defineProperty:ju,defineProperties:Du,getOwnPropertyDescriptor:Iu}),ka({target:"Object",stat:!0,forced:!Da},{getOwnPropertyNames:Mu}),iu(),au(pu,lu),tu[cu]=!0;var Nu=gt&&!!Symbol.for&&!!Symbol.keyFor,Wu=Cr,Uu=rt,Gu=Zt,zu=bi,Vu=Xt,Bu=Nu,Hu=Vu("string-to-symbol-registry"),Xu=Vu("symbol-to-string-registry");Wu({target:"Symbol",stat:!0,forced:!Bu},{for:function(t){var e=zu(t);if(Gu(Hu,e))return Hu[e];var r=Uu("Symbol")(e);return Hu[e]=r,Xu[r]=e,r}});var qu=Cr,Ju=Zt,$u=Et,Ku=Tt,Yu=Nu,Zu=Xt("symbol-to-string-registry");qu({target:"Symbol",stat:!0,forced:!Yu},{keyFor:function(t){if(!$u(t))throw new TypeError(Ku(t)+" is not a symbol");if(Ju(Zu,t))return Zu[t]}});var Qu=Wo,ts=x,es=b,rs=bi,ns=p([].push),os=Cr,is=rt,as=l,us=C,ss=p,cs=o,ls=x,fs=Et,vs=Ar,ds=function(t){if(ts(t))return t;if(Qu(t)){for(var e=t.length,r=[],n=0;n<e;n++){var o=t[n];"string"==typeof o?ns(r,o):"number"!=typeof o&&"Number"!==es(o)&&"String"!==es(o)||ns(r,rs(o))}var i=r.length,a=!0;return function(t,e){if(a)return a=!1,e;if(Qu(this))return e;for(var n=0;n<i;n++)if(r[n]===t)return e}}},hs=gt,ps=String,ys=is("JSON","stringify"),gs=ss(/./.exec),ms=ss("".charAt),bs=ss("".charCodeAt),_s=ss("".replace),ws=ss(1..toString),Ss=/[\uD800-\uDFFF]/g,Es=/^[\uD800-\uDBFF]$/,xs=/^[\uDC00-\uDFFF]$/,Ts=!hs||cs((function(){var t=is("Symbol")("stringify detection");return"[null]"!==ys([t])||"{}"!==ys({a:t})||"{}"!==ys(Object(t))})),Os=cs((function(){return'"\\udf06\\ud834"'!==ys("\udf06\ud834")||'"\\udead"'!==ys("\udead")})),Rs=function(t,e){var r=vs(arguments),n=ds(e);if(ls(n)||void 0!==t&&!fs(t))return r[1]=function(t,e){if(ls(n)&&(e=us(n,this,ps(t),e)),!fs(e))return e},as(ys,null,r)},ks=function(t,e,r){var n=ms(r,e-1),o=ms(r,e+1);return gs(Es,t)&&!gs(xs,o)||gs(xs,t)&&!gs(Es,n)?"\\u"+ws(bs(t,0),16):t};ys&&os({target:"JSON",stat:!0,arity:3,forced:Ts||Os},{stringify:function(t,e,r){var n=vs(arguments),o=as(Ts?Rs:ys,null,n);return Os&&"string"==typeof o?_s(o,Ss,ks):o}});var Cs=Ci,As=$t;Cr({target:"Object",stat:!0,forced:!gt||o((function(){Cs.f(1)}))},{getOwnPropertySymbols:function(t){var e=Cs.f;return e?e(As(t)):[]}}),Vi("asyncIterator"),Vi("hasInstance"),Vi("isConcatSpreadable"),Vi("iterator"),Vi("match"),Vi("matchAll"),Vi("replace"),Vi("search"),Vi("species"),Vi("split");var Ps=Ji;Vi("toPrimitive"),Ps();var js=rt,Ds=na;Vi("toStringTag"),Ds(js("Symbol"),"Symbol"),Vi("unscopables"),na(n.JSON,"JSON",!0);var Ls,Is,Ms,Fs=Y.Symbol,Ns={},Ws=O,Us=Zt,Gs=Function.prototype,zs=Ws&&Object.getOwnPropertyDescriptor,Vs=Us(Gs,"name"),Bs={EXISTS:Vs,PROPER:Vs&&"something"===function(){}.name,CONFIGURABLE:Vs&&(!Ws||Ws&&zs(Gs,"name").configurable)},Hs=!o((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Xs=Zt,qs=x,Js=$t,$s=Hs,Ks=io("IE_PROTO"),Ys=Object,Zs=Ys.prototype,Qs=$s?Ys.getPrototypeOf:function(t){var e=Js(t);if(Xs(e,Ks))return e[Ks];var r=e.constructor;return qs(r)&&e instanceof r?r.prototype:e instanceof Ys?Zs:null},tc=o,ec=x,rc=K,nc=_o,oc=Qs,ic=Pi,ac=ve("iterator"),uc=!1;[].keys&&("next"in(Ms=[].keys())?(Is=oc(oc(Ms)))!==Object.prototype&&(Ls=Is):uc=!0);var sc=!rc(Ls)||tc((function(){var t={};return Ls[ac].call(t)!==t}));ec((Ls=sc?{}:nc(Ls))[ac])||ic(Ls,ac,(function(){return this}));var cc={IteratorPrototype:Ls,BUGGY_SAFARI_ITERATORS:uc},lc=cc.IteratorPrototype,fc=_o,vc=M,dc=na,hc=Ns,pc=function(){return this},yc=p,gc=Ct,mc=K,bc=function(t){return mc(t)||null===t},_c=String,wc=TypeError,Sc=function(t,e,r){try{return yc(gc(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(n){}},Ec=K,xc=H,Tc=function(t){if(bc(t))return t;throw new wc("Can't set "+_c(t)+" as a prototype")},Oc=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=Sc(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(n){}return function(r,n){return xc(r),Tc(n),Ec(r)?(e?t(r,n):r.__proto__=n,r):r}}():void 0),Rc=Cr,kc=C,Cc=Bs,Ac=function(t,e,r,n){var o=e+" Iterator";return t.prototype=fc(lc,{next:vc(+!n,r)}),dc(t,o,!1,!0),hc[o]=pc,t},Pc=Qs,jc=na,Dc=Pi,Lc=Ns,Ic=cc,Mc=Cc.PROPER,Fc=Ic.BUGGY_SAFARI_ITERATORS,Nc=ve("iterator"),Wc="keys",Uc="values",Gc="entries",zc=function(){return this},Vc=function(t,e,r,n,o,i,a){Ac(r,e,n);var u,s,c,l=function(t){if(t===o&&p)return p;if(!Fc&&t&&t in d)return d[t];switch(t){case Wc:case Uc:case Gc:return function(){return new r(this,t)}}return function(){return new r(this)}},f=e+" Iterator",v=!1,d=t.prototype,h=d[Nc]||d["@@iterator"]||o&&d[o],p=!Fc&&h||l(o),y="Array"===e&&d.entries||h;if(y&&(u=Pc(y.call(new t)))!==Object.prototype&&u.next&&(jc(u,f,!0,!0),Lc[f]=zc),Mc&&o===Uc&&h&&h.name!==Uc&&(v=!0,p=function(){return kc(h,this)}),o)if(s={values:l(Uc),keys:i?p:l(Wc),entries:l(Gc)},a)for(c in s)(Fc||v||!(c in d))&&Dc(d,c,s[c]);else Rc({target:e,proto:!0,forced:Fc||v},s);return a&&d[Nc]!==p&&Dc(d,Nc,p,{name:o}),Lc[e]=p,s},Bc=function(t,e){return{value:t,done:e}},Hc=J,Xc=Ns,qc=ba;Ze.f;var Jc=Vc,$c=Bc,Kc="Array Iterator",Yc=qc.set,Zc=qc.getterFor(Kc);Jc(Array,"Array",(function(t,e){Yc(this,{type:Kc,target:Hc(t),index:0,kind:e})}),(function(){var t=Zc(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,$c(void 0,!0);switch(t.kind){case"keys":return $c(r,!1);case"values":return $c(e[r],!1)}return $c([r,e[r]],!1)}),"values"),Xc.Arguments=Xc.Array;var Qc={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},tl=n,el=na,rl=Ns;for(var nl in Qc)el(tl[nl],nl),rl[nl]=rl.Array;var ol=Fs,il=ve,al=Ze.f,ul=il("metadata"),sl=Function.prototype;void 0===sl[ul]&&al(sl,ul,{value:null}),Vi("asyncDispose"),Vi("dispose"),Vi("metadata");var cl=ol,ll=p,fl=rt("Symbol"),vl=fl.keyFor,dl=ll(fl.prototype.valueOf),hl=fl.isRegisteredSymbol||function(t){try{return void 0!==vl(dl(t))}catch(e){return!1}};Cr({target:"Symbol",stat:!0},{isRegisteredSymbol:hl});for(var pl=Xt,yl=rt,gl=p,ml=Et,bl=ve,_l=yl("Symbol"),wl=_l.isWellKnownSymbol,Sl=yl("Object","getOwnPropertyNames"),El=gl(_l.prototype.valueOf),xl=pl("wks"),Tl=0,Ol=Sl(_l),Rl=Ol.length;Tl<Rl;Tl++)try{var kl=Ol[Tl];ml(_l[kl])&&bl(kl)}catch(LO){}var Cl=function(t){if(wl&&wl(t))return!0;try{for(var e=El(t),r=0,n=Sl(xl),o=n.length;r<o;r++)if(xl[n[r]]==e)return!0}catch(LO){}return!1};Cr({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:Cl}),Vi("customMatcher"),Vi("observable"),Cr({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:hl}),Cr({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:Cl}),Vi("matcher"),Vi("metadataKey"),Vi("patternMatch"),Vi("replaceAll");var Al=cl,Pl=e(Al),jl=p,Dl=En,Ll=bi,Il=H,Ml=jl("".charAt),Fl=jl("".charCodeAt),Nl=jl("".slice),Wl=function(t){return function(e,r){var n,o,i=Ll(Il(e)),a=Dl(r),u=i.length;return a<0||a>=u?t?"":void 0:(n=Fl(i,a))<55296||n>56319||a+1===u||(o=Fl(i,a+1))<56320||o>57343?t?Ml(i,a):n:t?Nl(i,a,a+2):o-56320+(n-55296<<10)+65536}},Ul={codeAt:Wl(!1),charAt:Wl(!0)}.charAt,Gl=bi,zl=ba,Vl=Vc,Bl=Bc,Hl="String Iterator",Xl=zl.set,ql=zl.getterFor(Hl);Vl(String,"String",(function(t){Xl(this,{type:Hl,string:Gl(t),index:0})}),(function(){var t,e=ql(this),r=e.string,n=e.index;return n>=r.length?Bl(void 0,!0):(t=Ul(r,n),e.index+=t.length,Bl(t,!1))}));var Jl=Li.f("iterator"),$l=e(Jl);function Kl(t){return(Kl="function"==typeof Pl&&"symbol"==typeof $l?function(t){return typeof t}:function(t){return t&&"function"==typeof Pl&&t.constructor===Pl&&t!==Pl.prototype?"symbol":typeof t})(t)}var Yl={exports:{}},Zl=Cr,Ql=O,tf=Ze.f;Zl({target:"Object",stat:!0,forced:Object.defineProperty!==tf,sham:!Ql},{defineProperty:tf});var ef=Y.Object,rf=Yl.exports=function(t,e,r){return ef.defineProperty(t,e,r)};ef.defineProperty.sham&&(rf.sham=!0);var nf=Yl.exports,of=e(nf);Cr({target:"Object",stat:!0,sham:!O},{create:_o});var af=Y.Object,uf=function(t,e){return af.create(t,e)},sf=e(uf),cf=$t,lf=Qs,ff=Hs;Cr({target:"Object",stat:!0,forced:o((function(){lf(1)})),sham:!ff},{getPrototypeOf:function(t){return lf(cf(t))}});var vf=Y.Object.getPrototypeOf,df=e(vf),hf=o,pf=function(t,e){var r=[][t];return!!r&&hf((function(){r.call(null,e||function(){return 1},1)}))},yf=Ra.forEach,gf=pf("forEach")?[].forEach:function(t){return yf(this,t,arguments.length>1?arguments[1]:void 0)};Cr({target:"Array",proto:!0,forced:[].forEach!==gf},{forEach:gf});var mf=n,bf=Y,_f=function(t,e){var r=bf[t+"Prototype"],n=r&&r[e];if(n)return n;var o=mf[t],i=o&&o.prototype;return i&&i[e]},wf=_f("Array","forEach"),Sf=Kr,Ef=Zt,xf=nt,Tf=wf,Of=Array.prototype,Rf={DOMTokenList:!0,NodeList:!0},kf=e((function(t){var e=t.forEach;return t===Of||xf(Of,t)&&e===Of.forEach||Ef(Rf,Sf(t))?Tf:e})),Cf=O,Af=Wo,Pf=TypeError,jf=Object.getOwnPropertyDescriptor,Df=Cf&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(LO){return LO instanceof TypeError}}(),Lf=$t,If=jn,Mf=Df?function(t,e){if(Af(t)&&!jf(t,"length").writable)throw new Pf("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e},Ff=Go;Cr({target:"Array",proto:!0,arity:1,forced:o((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(LO){return LO instanceof TypeError}}()},{push:function(t){var e=Lf(this),r=If(e),n=arguments.length;Ff(r+n);for(var o=0;o<n;o++)e[r]=arguments[o],r++;return Mf(e,r),r}});var Nf=_f("Array","push"),Wf=nt,Uf=Nf,Gf=Array.prototype,zf=e((function(t){var e=t.push;return t===Gf||Wf(Gf,t)&&e===Gf.push?Uf:e}));Cr({target:"Object",stat:!0},{setPrototypeOf:Oc});var Vf=Y.Object.setPrototypeOf,Bf=e(Vf),Hf=rt,Xf=_i,qf=Ci,Jf=nr,$f=p([].concat),Kf=Hf("Reflect","ownKeys")||function(t){var e=Xf.f(Jf(t)),r=qf.f;return r?$f(e,r(t)):e},Yf=Zt,Zf=Kf,Qf=T,tv=Ze,ev=K,rv=gr,nv=Error,ov=p("".replace),iv=String(new nv("zxcasd").stack),av=/\n\s*at [^:]*:[^\n]*/,uv=av.test(iv),sv=M,cv=!o((function(){var t=new Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",sv(1,7)),7!==t.stack)})),lv=gr,fv=function(t,e){if(uv&&"string"==typeof t&&!nv.prepareStackTrace)for(;e--;)t=ov(t,av,"");return t},vv=cv,dv=Error.captureStackTrace,hv=Ns,pv=ve("iterator"),yv=Array.prototype,gv=function(t){return void 0!==t&&(hv.Array===t||yv[pv]===t)},mv=Kr,bv=jt,_v=z,wv=Ns,Sv=ve("iterator"),Ev=function(t){if(!_v(t))return bv(t,Sv)||bv(t,"@@iterator")||wv[mv(t)]},xv=C,Tv=Ct,Ov=nr,Rv=Tt,kv=Ev,Cv=TypeError,Av=function(t,e){var r=arguments.length<2?kv(t):e;if(Tv(r))return Ov(xv(r,t));throw new Cv(Rv(t)+" is not iterable")},Pv=C,jv=nr,Dv=jt,Lv=function(t,e,r){var n,o;jv(t);try{if(!(n=Dv(t,"return"))){if("throw"===e)throw r;return r}n=Pv(n,t)}catch(LO){o=!0,n=LO}if("throw"===e)throw r;if(o)throw n;return jv(n),r},Iv=Ye,Mv=C,Fv=nr,Nv=Tt,Wv=gv,Uv=jn,Gv=nt,zv=Av,Vv=Ev,Bv=Lv,Hv=TypeError,Xv=function(t,e){this.stopped=t,this.result=e},qv=Xv.prototype,Jv=function(t,e,r){var n,o,i,a,u,s,c,l=r&&r.that,f=!(!r||!r.AS_ENTRIES),v=!(!r||!r.IS_RECORD),d=!(!r||!r.IS_ITERATOR),h=!(!r||!r.INTERRUPTED),p=Iv(e,l),y=function(t){return n&&Bv(n,"normal",t),new Xv(!0,t)},g=function(t){return f?(Fv(t),h?p(t[0],t[1],y):p(t[0],t[1])):h?p(t,y):p(t)};if(v)n=t.iterator;else if(d)n=t;else{if(!(o=Vv(t)))throw new Hv(Nv(t)+" is not iterable");if(Wv(o)){for(i=0,a=Uv(t);a>i;i++)if((u=g(t[i]))&&Gv(qv,u))return u;return new Xv(!1)}n=zv(t,o)}for(s=v?t.next:n.next;!(c=Mv(s,n)).done;){try{u=g(c.value)}catch(LO){Bv(n,"throw",LO)}if("object"==typeof u&&u&&Gv(qv,u))return u}return new Xv(!1)},$v=bi,Kv=Cr,Yv=nt,Zv=Qs,Qv=Oc,td=function(t,e,r){for(var n=Zf(e),o=tv.f,i=Qf.f,a=0;a<n.length;a++){var u=n[a];Yf(t,u)||r&&Yf(r,u)||o(t,u,i(e,u))}},ed=_o,rd=gr,nd=M,od=function(t,e){ev(e)&&"cause"in e&&rv(t,"cause",e.cause)},id=function(t,e,r,n){vv&&(dv?dv(t,e):lv(t,"stack",fv(r,n)))},ad=Jv,ud=function(t,e){return void 0===t?arguments.length<2?"":e:$v(t)},sd=ve("toStringTag"),cd=Error,ld=[].push,fd=function(t,e){var r,n=Yv(vd,this);Qv?r=Qv(new cd,n?Zv(this):vd):(r=n?this:ed(vd),rd(r,sd,"Error")),void 0!==e&&rd(r,"message",ud(e)),id(r,fd,r.stack,1),arguments.length>2&&od(r,arguments[2]);var o=[];return ad(t,ld,{that:o}),rd(r,"errors",o),r};Qv?Qv(fd,cd):td(fd,cd,{name:!0});var vd=fd.prototype=ed(cd.prototype,{constructor:nd(1,fd),message:nd(1,""),name:nd(1,"AggregateError")});Kv({global:!0,constructor:!0,arity:2},{AggregateError:fd});var dd,hd,pd,yd,gd=n,md=at,bd=b,_d=function(t){return md.slice(0,t.length)===t},wd=_d("Bun/")?"BUN":_d("Cloudflare-Workers")?"CLOUDFLARE":_d("Deno/")?"DENO":_d("Node.js/")?"NODE":gd.Bun&&"string"==typeof Bun.version?"BUN":gd.Deno&&"object"==typeof Deno.version?"DENO":"process"===bd(gd.process)?"NODE":gd.window&&gd.document?"BROWSER":"REST",Sd="NODE"===wd,Ed=rt,xd=Di,Td=O,Od=ve("species"),Rd=function(t){var e=Ed(t);Td&&e&&!e[Od]&&xd(e,Od,{configurable:!0,get:function(){return this}})},kd=nt,Cd=TypeError,Ad=function(t,e){if(kd(e,t))return t;throw new Cd("Incorrect invocation")},Pd=nr,jd=mn,Dd=z,Ld=ve("species"),Id=function(t,e){var r,n=Pd(t).constructor;return void 0===n||Dd(r=Pd(n)[Ld])?e:jd(r)},Md=TypeError,Fd=function(t,e){if(t<e)throw new Md("Not enough arguments");return t},Nd=/(?:ipad|iphone|ipod).*applewebkit/i.test(at),Wd=n,Ud=l,Gd=Ye,zd=x,Vd=Zt,Bd=o,Hd=ro,Xd=Ar,qd=Re,Jd=Fd,$d=Nd,Kd=Sd,Yd=Wd.setImmediate,Zd=Wd.clearImmediate,Qd=Wd.process,th=Wd.Dispatch,eh=Wd.Function,rh=Wd.MessageChannel,nh=Wd.String,oh=0,ih={},ah="onreadystatechange";Bd((function(){dd=Wd.location}));var uh=function(t){if(Vd(ih,t)){var e=ih[t];delete ih[t],e()}},sh=function(t){return function(){uh(t)}},ch=function(t){uh(t.data)},lh=function(t){Wd.postMessage(nh(t),dd.protocol+"//"+dd.host)};Yd&&Zd||(Yd=function(t){Jd(arguments.length,1);var e=zd(t)?t:eh(t),r=Xd(arguments,1);return ih[++oh]=function(){Ud(e,void 0,r)},hd(oh),oh},Zd=function(t){delete ih[t]},Kd?hd=function(t){Qd.nextTick(sh(t))}:th&&th.now?hd=function(t){th.now(sh(t))}:rh&&!$d?(yd=(pd=new rh).port2,pd.port1.onmessage=ch,hd=Gd(yd.postMessage,yd)):Wd.addEventListener&&zd(Wd.postMessage)&&!Wd.importScripts&&dd&&"file:"!==dd.protocol&&!Bd(lh)?(hd=lh,Wd.addEventListener("message",ch,!1)):hd=ah in qd("script")?function(t){Hd.appendChild(qd("script"))[ah]=function(){Hd.removeChild(this),uh(t)}}:function(t){setTimeout(sh(t),0)});var fh={set:Yd,clear:Zd},vh=n,dh=O,hh=Object.getOwnPropertyDescriptor,ph=function(){this.head=null,this.tail=null};ph.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var yh,gh,mh,bh,_h,wh=ph,Sh=/ipad|iphone|ipod/i.test(at)&&"undefined"!=typeof Pebble,Eh=/web0s(?!.*chrome)/i.test(at),xh=n,Th=function(t){if(!dh)return vh[t];var e=hh(vh,t);return e&&e.value},Oh=Ye,Rh=fh.set,kh=wh,Ch=Nd,Ah=Sh,Ph=Eh,jh=Sd,Dh=xh.MutationObserver||xh.WebKitMutationObserver,Lh=xh.document,Ih=xh.process,Mh=xh.Promise,Fh=Th("queueMicrotask");if(!Fh){var Nh=new kh,Wh=function(){var t,e;for(jh&&(t=Ih.domain)&&t.exit();e=Nh.get();)try{e()}catch(LO){throw Nh.head&&yh(),LO}t&&t.enter()};Ch||jh||Ph||!Dh||!Lh?!Ah&&Mh&&Mh.resolve?((bh=Mh.resolve(void 0)).constructor=Mh,_h=Oh(bh.then,bh),yh=function(){_h(Wh)}):jh?yh=function(){Ih.nextTick(Wh)}:(Rh=Oh(Rh,xh),yh=function(){Rh(Wh)}):(gh=!0,mh=Lh.createTextNode(""),new Dh(Wh).observe(mh,{characterData:!0}),yh=function(){mh.data=gh=!gh}),Fh=function(t){Nh.head||yh(),Nh.add(t)}}var Uh=Fh,Gh=function(t){try{return{error:!1,value:t()}}catch(LO){return{error:!0,value:LO}}},zh=n.Promise,Vh=n,Bh=zh,Hh=x,Xh=qe,qh=tn,Jh=ve,$h=wd,Kh=dt,Yh=Bh&&Bh.prototype,Zh=Jh("species"),Qh=!1,tp=Hh(Vh.PromiseRejectionEvent),ep={CONSTRUCTOR:Xh("Promise",(function(){var t=qh(Bh),e=t!==String(Bh);if(!e&&66===Kh)return!0;if(!Yh.catch||!Yh.finally)return!0;if(!Kh||Kh<51||!/native code/.test(t)){var r=new Bh((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};if((r.constructor={})[Zh]=n,!(Qh=r.then((function(){}))instanceof n))return!0}return!(e||"BROWSER"!==$h&&"DENO"!==$h||tp)})),REJECTION_EVENT:tp,SUBCLASSING:Qh},rp={},np=Ct,op=TypeError,ip=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw new op("Bad Promise constructor");e=t,r=n})),this.resolve=np(e),this.reject=np(r)};rp.f=function(t){return new ip(t)};var ap,up,sp=Cr,cp=Sd,lp=n,fp=C,vp=Pi,dp=na,hp=Rd,pp=Ct,yp=x,gp=K,mp=Ad,bp=Id,_p=fh.set,wp=Uh,Sp=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(LO){}},Ep=Gh,xp=wh,Tp=ba,Op=zh,Rp=ep,kp=rp,Cp="Promise",Ap=Rp.CONSTRUCTOR,Pp=Rp.REJECTION_EVENT,jp=Tp.getterFor(Cp),Dp=Tp.set,Lp=Op&&Op.prototype,Ip=Op,Mp=Lp,Fp=lp.TypeError,Np=lp.document,Wp=lp.process,Up=kp.f,Gp=Up,zp=!!(Np&&Np.createEvent&&lp.dispatchEvent),Vp="unhandledrejection",Bp=function(t){var e;return!(!gp(t)||!yp(e=t.then))&&e},Hp=function(t,e){var r,n,o,i=e.value,a=1===e.state,u=a?t.ok:t.fail,s=t.resolve,c=t.reject,l=t.domain;try{u?(a||(2===e.rejection&&Kp(e),e.rejection=1),!0===u?r=i:(l&&l.enter(),r=u(i),l&&(l.exit(),o=!0)),r===t.promise?c(new Fp("Promise-chain cycle")):(n=Bp(r))?fp(n,r,s,c):s(r)):c(i)}catch(LO){l&&!o&&l.exit(),c(LO)}},Xp=function(t,e){t.notified||(t.notified=!0,wp((function(){for(var r,n=t.reactions;r=n.get();)Hp(r,t);t.notified=!1,e&&!t.rejection&&Jp(t)})))},qp=function(t,e,r){var n,o;zp?((n=Np.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),lp.dispatchEvent(n)):n={promise:e,reason:r},!Pp&&(o=lp["on"+t])?o(n):t===Vp&&Sp("Unhandled promise rejection",r)},Jp=function(t){fp(_p,lp,(function(){var e,r=t.facade,n=t.value;if($p(t)&&(e=Ep((function(){cp?Wp.emit("unhandledRejection",n,r):qp(Vp,r,n)})),t.rejection=cp||$p(t)?2:1,e.error))throw e.value}))},$p=function(t){return 1!==t.rejection&&!t.parent},Kp=function(t){fp(_p,lp,(function(){var e=t.facade;cp?Wp.emit("rejectionHandled",e):qp("rejectionhandled",e,t.value)}))},Yp=function(t,e,r){return function(n){t(e,n,r)}},Zp=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,Xp(t,!0))},Qp=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw new Fp("Promise can't be resolved itself");var n=Bp(e);n?wp((function(){var r={done:!1};try{fp(n,e,Yp(Qp,r,t),Yp(Zp,r,t))}catch(LO){Zp(r,LO,t)}})):(t.value=e,t.state=1,Xp(t,!1))}catch(LO){Zp({done:!1},LO,t)}}};Ap&&(Mp=(Ip=function(t){mp(this,Mp),pp(t),fp(ap,this);var e=jp(this);try{t(Yp(Qp,e),Yp(Zp,e))}catch(LO){Zp(e,LO)}}).prototype,(ap=function(t){Dp(this,{type:Cp,done:!1,notified:!1,parent:!1,reactions:new xp,rejection:!1,state:0,value:null})}).prototype=vp(Mp,"then",(function(t,e){var r=jp(this),n=Up(bp(this,Ip));return r.parent=!0,n.ok=!yp(t)||t,n.fail=yp(e)&&e,n.domain=cp?Wp.domain:void 0,0===r.state?r.reactions.add(n):wp((function(){Hp(n,r)})),n.promise})),up=function(){var t=new ap,e=jp(t);this.promise=t,this.resolve=Yp(Qp,e),this.reject=Yp(Zp,e)},kp.f=Up=function(t){return t===Ip||undefined===t?new up(t):Gp(t)}),sp({global:!0,constructor:!0,wrap:!0,forced:Ap},{Promise:Ip}),dp(Ip,Cp,!1,!0),hp(Cp);var ty=ve("iterator"),ey=!1;try{var ry=0,ny={next:function(){return{done:!!ry++}},return:function(){ey=!0}};ny[ty]=function(){return this},Array.from(ny,(function(){throw 2}))}catch(LO){}var oy=function(t,e){try{if(!e&&!ey)return!1}catch(LO){return!1}var r=!1;try{var n={};n[ty]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(LO){}return r},iy=zh,ay=ep.CONSTRUCTOR||!oy((function(t){iy.all(t).then(void 0,(function(){}))})),uy=C,sy=Ct,cy=rp,ly=Gh,fy=Jv;Cr({target:"Promise",stat:!0,forced:ay},{all:function(t){var e=this,r=cy.f(e),n=r.resolve,o=r.reject,i=ly((function(){var r=sy(e.resolve),i=[],a=0,u=1;fy(t,(function(t){var s=a++,c=!1;u++,uy(r,e,t).then((function(t){c||(c=!0,i[s]=t,--u||n(i))}),o)})),--u||n(i)}));return i.error&&o(i.value),r.promise}});var vy=Cr,dy=ep.CONSTRUCTOR;zh&&zh.prototype,vy({target:"Promise",proto:!0,forced:dy,real:!0},{catch:function(t){return this.then(void 0,t)}});var hy=C,py=Ct,yy=rp,gy=Gh,my=Jv;Cr({target:"Promise",stat:!0,forced:ay},{race:function(t){var e=this,r=yy.f(e),n=r.reject,o=gy((function(){var o=py(e.resolve);my(t,(function(t){hy(o,e,t).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});var by=rp;Cr({target:"Promise",stat:!0,forced:ep.CONSTRUCTOR},{reject:function(t){var e=by.f(this);return(0,e.reject)(t),e.promise}});var _y=nr,wy=K,Sy=rp,Ey=function(t,e){if(_y(t),wy(e)&&e.constructor===t)return e;var r=Sy.f(t);return(0,r.resolve)(e),r.promise},xy=Cr,Ty=zh,Oy=ep.CONSTRUCTOR,Ry=Ey,ky=rt("Promise"),Cy=!Oy;xy({target:"Promise",stat:!0,forced:true},{resolve:function(t){return Ry(Cy&&this===ky?Ty:this,t)}});var Ay=C,Py=Ct,jy=rp,Dy=Gh,Ly=Jv;Cr({target:"Promise",stat:!0,forced:ay},{allSettled:function(t){var e=this,r=jy.f(e),n=r.resolve,o=r.reject,i=Dy((function(){var r=Py(e.resolve),o=[],i=0,a=1;Ly(t,(function(t){var u=i++,s=!1;a++,Ay(r,e,t).then((function(t){s||(s=!0,o[u]={status:"fulfilled",value:t},--a||n(o))}),(function(t){s||(s=!0,o[u]={status:"rejected",reason:t},--a||n(o))}))})),--a||n(o)}));return i.error&&o(i.value),r.promise}});var Iy=C,My=Ct,Fy=rt,Ny=rp,Wy=Gh,Uy=Jv,Gy="No one promise resolved";Cr({target:"Promise",stat:!0,forced:ay},{any:function(t){var e=this,r=Fy("AggregateError"),n=Ny.f(e),o=n.resolve,i=n.reject,a=Wy((function(){var n=My(e.resolve),a=[],u=0,s=1,c=!1;Uy(t,(function(t){var l=u++,f=!1;s++,Iy(n,e,t).then((function(t){f||c||(c=!0,o(t))}),(function(t){f||c||(f=!0,a[l]=t,--s||i(new r(a,Gy)))}))})),--s||i(new r(a,Gy))}));return a.error&&i(a.value),n.promise}});var zy=Cr,Vy=l,By=Ar,Hy=rp,Xy=Ct,qy=Gh,Jy=n.Promise,$y=!1;zy({target:"Promise",stat:!0,forced:!Jy||!Jy.try||qy((function(){Jy.try((function(t){$y=8===t}),8)})).error||!$y},{try:function(t){var e=arguments.length>1?By(arguments,1):[],r=Hy.f(this),n=qy((function(){return Vy(Xy(t),void 0,e)}));return(n.error?r.reject:r.resolve)(n.value),r.promise}});var Ky=rp;Cr({target:"Promise",stat:!0},{withResolvers:function(){var t=Ky.f(this);return{promise:t.promise,resolve:t.resolve,reject:t.reject}}});var Yy=Cr,Zy=zh,Qy=o,tg=rt,eg=x,rg=Id,ng=Ey,og=Zy&&Zy.prototype;Yy({target:"Promise",proto:!0,real:!0,forced:!!Zy&&Qy((function(){og.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=rg(this,tg("Promise")),r=eg(t);return this.then(r?function(r){return ng(e,t()).then((function(){return r}))}:t,r?function(r){return ng(e,t()).then((function(){throw r}))}:t)}});var ig=Y.Promise,ag=e(ig),ug=Cr,sg=Wo,cg=p([].reverse),lg=[1,2];ug({target:"Array",proto:!0,forced:String(lg)===String(lg.reverse())},{reverse:function(){return sg(this)&&(this.length=this.length),cg(this)}});var fg=_f("Array","reverse"),vg=nt,dg=fg,hg=Array.prototype,pg=e((function(t){var e=t.reverse;return t===hg||vg(hg,t)&&e===hg.reverse?dg:e})),yg=Cr,gg=Wo,mg=hn,bg=K,_g=Rn,wg=jn,Sg=J,Eg=Ho,xg=ve,Tg=Ar,Og=ri("slice"),Rg=xg("species"),kg=Array,Cg=Math.max;yg({target:"Array",proto:!0,forced:!Og},{slice:function(t,e){var r,n,o,i=Sg(this),a=wg(i),u=_g(t,a),s=_g(void 0===e?a:e,a);if(gg(i)&&(r=i.constructor,(mg(r)&&(r===kg||gg(r.prototype))||bg(r)&&null===(r=r[Rg]))&&(r=void 0),r===kg||void 0===r))return Tg(i,u,s);for(n=new(void 0===r?kg:r)(Cg(s-u,0)),o=0;u<s;u++,o++)u in i&&Eg(n,o,i[u]);return n.length=o,n}});var Ag=_f("Array","slice"),Pg=nt,jg=Ag,Dg=Array.prototype,Lg=function(t){var e=t.slice;return t===Dg||Pg(Dg,t)&&e===Dg.slice?jg:e},Ig=e(Lg);function Mg(){Mg=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=of||function(t,e,r){t[e]=r.value},i="function"==typeof Pl?Pl:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(t,e,r){return of(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(P){c=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=sf(i.prototype),u=new C(n||[]);return o(a,"_invoke",{value:T(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(n){return{type:"throw",arg:n}}}e.wrap=l;var v="suspendedStart",d="suspendedYield",h="executing",p="completed",y={};function g(){}function m(){}function b(){}var _={};c(_,a,(function(){return this}));var w=df&&df(df(A([])));w&&w!==r&&n.call(w,a)&&(_=w);var S=b.prototype=g.prototype=sf(_);function E(t){var e;kf(e=["next","throw","return"]).call(e,(function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,u){var s=f(t[o],t,i);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==Kl(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,u)}))}u(s.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function T(e,r,n){var o=v;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var s=O(u,n);if(s){if(s===y)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=f(e,r,n);if("normal"===c.type){if(o=n.done?p:d,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function R(t){var e,r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),zf(e=this.tryEntries).call(e,r)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],kf(t).call(t,R,this),this.reset(!0)}function A(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Kl(e)+" is not iterable")}return m.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:m,configurable:!0}),m.displayName=c(b,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Bf?Bf(t,b):(t.__proto__=b,c(t,s,"GeneratorFunction")),t.prototype=sf(S),t},e.awrap=function(t){return{__await:t}},E(x.prototype),c(x.prototype,u,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=ag);var a=new x(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(S),c(S,s,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)zf(r).call(r,n);return pg(r).call(r),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=A,C.prototype={constructor:C,reset:function(e){var r;if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,kf(r=this.tryEntries).call(r,k),!e)for(var o in this)"t"===o.charAt(0)&&n.call(this,o)&&!isNaN(+Ig(o).call(o,1))&&(this[o]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function Fg(t,e,r,n,o,i,a){try{var u=t[i](a),s=u.value}catch(c){return void r(c)}u.done?e(s):ag.resolve(s).then(n,o)}function Ng(t){return function(){var e=this,r=arguments;return new ag((function(n,o){var i=t.apply(e,r);function a(t){Fg(i,n,o,a,u,"next",t)}function u(t){Fg(i,n,o,a,u,"throw",t)}a(void 0)}))}}function Wg(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Ug=Li.f("toPrimitive"),Gg=e(Ug);function zg(t){var e=function(t,e){if("object"!=Kl(t)||!t)return t;var r=t[Gg];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Kl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Kl(e)?e:e+""}function Vg(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),of(t,zg(n.key),n)}}function Bg(t,e,r){return e&&Vg(t.prototype,e),r&&Vg(t,r),of(t,"prototype",{writable:!1}),t}function Hg(t,e){if(e&&("object"==Kl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Xg(){try{var t=!Boolean.prototype.valueOf.call(Mo(Boolean,[],(function(){})))}catch(e){}return(Xg=function(){return!!t})()}var qg=Gr;Cr({target:"Function",proto:!0,forced:Function.bind!==qg},{bind:qg});var Jg=_f("Function","bind"),$g=nt,Kg=Jg,Yg=Function.prototype,Zg=function(t){var e=t.bind;return t===Yg||$g(Yg,t)&&e===Yg.bind?Kg:e},Qg=e(Zg);function tm(t){var e;return(tm=Bf?Qg(e=df).call(e):function(t){return t.__proto__||df(t)})(t)}function em(t,e){var r;return(em=Bf?Qg(r=Bf).call(r):function(t,e){return t.__proto__=e,t})(t,e)}function rm(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=sf(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),of(t,"prototype",{writable:!1}),e&&em(t,e)}function nm(t,e,r){return(e=zg(e))in t?of(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var om=e(nf),im={exports:{}},am=Cr,um=o,sm=J,cm=T.f,lm=O;am({target:"Object",stat:!0,forced:!lm||um((function(){cm(1)})),sham:!lm},{getOwnPropertyDescriptor:function(t,e){return cm(sm(t),e)}});var fm=Y.Object,vm=im.exports=function(t,e){return fm.getOwnPropertyDescriptor(t,e)};fm.getOwnPropertyDescriptor.sham&&(vm.sham=!0);var dm=e(im.exports),hm=En,pm=bi,ym=H,gm=RangeError,mm=p,bm=An,_m=bi,wm=H,Sm=mm((function(t){var e=pm(ym(this)),r="",n=hm(t);if(n<0||n===1/0)throw new gm("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(e+=e))1&n&&(r+=e);return r})),Em=mm("".slice),xm=Math.ceil,Tm=function(t){return function(e,r,n){var o,i,a=_m(wm(e)),u=bm(r),s=a.length,c=void 0===n?" ":_m(n);return u<=s||""===c?a:((i=Sm(c,xm((o=u-s)/c.length))).length>o&&(i=Em(i,0,o)),t?a+i:i+a)}},Om={start:Tm(!1),end:Tm(!0)},Rm=p,km=o,Cm=Om.start,Am=RangeError,Pm=isFinite,jm=Math.abs,Dm=Date.prototype,Lm=Dm.toISOString,Im=Rm(Dm.getTime),Mm=Rm(Dm.getUTCDate),Fm=Rm(Dm.getUTCFullYear),Nm=Rm(Dm.getUTCHours),Wm=Rm(Dm.getUTCMilliseconds),Um=Rm(Dm.getUTCMinutes),Gm=Rm(Dm.getUTCMonth),zm=Rm(Dm.getUTCSeconds),Vm=km((function(){return"0385-07-25T07:06:39.999Z"!==Lm.call(new Date(-50000000000001))}))||!km((function(){Lm.call(new Date(NaN))}))?function(){if(!Pm(Im(this)))throw new Am("Invalid time value");var t=this,e=Fm(t),r=Wm(t),n=e<0?"-":e>9999?"+":"";return n+Cm(jm(e),n?6:4,0)+"-"+Cm(Gm(t)+1,2,0)+"-"+Cm(Mm(t),2,0)+"T"+Cm(Nm(t),2,0)+":"+Cm(Um(t),2,0)+":"+Cm(zm(t),2,0)+"."+Cm(r,3,0)+"Z"}:Lm,Bm=C,Hm=$t,Xm=_e,qm=Vm,Jm=b;Cr({target:"Date",proto:!0,forced:o((function(){return null!==new Date(NaN).toJSON()||1!==Bm(Date.prototype.toJSON,{toISOString:function(){return 1}})}))},{toJSON:function(t){var e=Hm(this),r=Xm(e,"number");return"number"!=typeof r||isFinite(r)?"toISOString"in e||"Date"!==Jm(e)?e.toISOString():Bm(qm,e):null}});var $m=Y,Km=l;$m.JSON||($m.JSON={stringify:JSON.stringify});var Ym=function(t,e,r){return Km($m.JSON.stringify,null,arguments)},Zm=e(Ym),Qm=_f("Array","concat"),tb=nt,eb=Qm,rb=Array.prototype,nb=e((function(t){var e=t.concat;return t===rb||tb(rb,t)&&e===rb.concat?eb:e})),ob=e(uf),ib=e(Lg),ab=e(Y.Object.getOwnPropertySymbols),ub={exports:{}};!function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}function o(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function i(t,e,n,i,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var u=new o(n,i||t,a),s=r?r+e:e;return t._events[s]?t._events[s].fn?t._events[s]=[t._events[s],u]:t._events[s].push(u):(t._events[s]=u,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new n:delete t._events[e]}function u(){this._events=new n,this._eventsCount=0}ob&&(n.prototype=ob(null),(new n).__proto__||(r=!1)),u.prototype.eventNames=function(){var t,n,o=[];if(0===this._eventsCount)return o;for(n in t=this._events)e.call(t,n)&&o.push(r?ib(n).call(n,1):n);return ab?nb(o).call(o,ab(t)):o},u.prototype.listeners=function(t){var e=r?r+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,i=n.length,a=new Array(i);o<i;o++)a[o]=n[o].fn;return a},u.prototype.listenerCount=function(t){var e=r?r+t:t,n=this._events[e];return n?n.fn?1:n.length:0},u.prototype.emit=function(t,e,n,o,i,a){var u=r?r+t:t;if(!this._events[u])return!1;var s,c,l=this._events[u],f=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,n),!0;case 4:return l.fn.call(l.context,e,n,o),!0;case 5:return l.fn.call(l.context,e,n,o,i),!0;case 6:return l.fn.call(l.context,e,n,o,i,a),!0}for(c=1,s=new Array(f-1);c<f;c++)s[c-1]=arguments[c];l.fn.apply(l.context,s)}else{var v,d=l.length;for(c=0;c<d;c++)switch(l[c].once&&this.removeListener(t,l[c].fn,void 0,!0),f){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,e);break;case 3:l[c].fn.call(l[c].context,e,n);break;case 4:l[c].fn.call(l[c].context,e,n,o);break;default:if(!s)for(v=1,s=new Array(f-1);v<f;v++)s[v-1]=arguments[v];l[c].fn.apply(l[c].context,s)}}return!0},u.prototype.on=function(t,e,r){return i(this,t,e,r,!1)},u.prototype.once=function(t,e,r){return i(this,t,e,r,!0)},u.prototype.removeListener=function(t,e,n,o){var i=r?r+t:t;if(!this._events[i])return this;if(!e)return a(this,i),this;var u=this._events[i];if(u.fn)u.fn!==e||o&&!u.once||n&&u.context!==n||a(this,i);else{for(var s=0,c=[],l=u.length;s<l;s++)(u[s].fn!==e||o&&!u[s].once||n&&u[s].context!==n)&&c.push(u[s]);c.length?this._events[i]=1===c.length?c[0]:c:a(this,i)}return this},u.prototype.removeAllListeners=function(t){var e;return t?(e=r?r+t:t,this._events[e]&&a(this,e)):(this._events=new n,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=r,u.EventEmitter=u,t.exports=u}(ub);var sb=function(t){function e(){var t,r,n,o,i;Wg(this,e);for(var a=arguments.length,u=new Array(a),s=0;s<a;s++)u[s]=arguments[s];return n=this,o=e,i=nb(t=[]).call(t,u),o=tm(o),nm(r=Hg(n,Xg()?Fo(o,i||[],tm(n).constructor):o.apply(n,i)),"monitor",void 0),nm(r,"logger",void 0),r}return rm(e,t),Bg(e,[{key:"isSupported",value:(r=Ng(Mg().mark((function t(){return Mg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",!0);case 1:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)})},{key:"_reportName",get:function(){return"plugin<".concat(this.name,">")}}]);var r}(ub.exports.EventEmitter),cb=Ev;Cr({target:"Array",stat:!0},{isArray:Wo});var lb=Y.Array.isArray,fb=nr,vb=Lv,db=Ye,hb=C,pb=$t,yb=function(t,e,r,n){try{return n?e(fb(r)[0],r[1]):e(r)}catch(LO){vb(t,"throw",LO)}},gb=gv,mb=hn,bb=jn,_b=Ho,wb=Av,Sb=Ev,Eb=Array,xb=function(t){var e=pb(t),r=mb(this),n=arguments.length,o=n>1?arguments[1]:void 0,i=void 0!==o;i&&(o=db(o,n>2?arguments[2]:void 0));var a,u,s,c,l,f,v=Sb(e),d=0;if(!v||this===Eb&&gb(v))for(a=bb(e),u=r?new this(a):Eb(a);a>d;d++)f=i?o(e[d],d):e[d],_b(u,d,f);else for(u=r?new this:[],l=(c=wb(e,v)).next;!(s=hb(l,c)).done;d++)f=i?yb(c,o,[s.value,d],!0):s.value,_b(u,d,f);return u.length=d,u};Cr({target:"Array",stat:!0,forced:!oy((function(t){Array.from(t)}))},{from:xb});var Tb=Y.Array.from,Ob={exports:{}},Rb=o((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),kb=o,Cb=K,Ab=b,Pb=Rb,jb=Object.isExtensible,Db=kb((function(){jb(1)}))||Pb?function(t){return!!Cb(t)&&((!Pb||"ArrayBuffer"!==Ab(t))&&(!jb||jb(t)))}:jb,Lb=!o((function(){return Object.isExtensible(Object.preventExtensions({}))})),Ib=Cr,Mb=p,Fb=Nn,Nb=K,Wb=Zt,Ub=Ze.f,Gb=_i,zb=Ei,Vb=Db,Bb=Lb,Hb=!1,Xb=ne("meta"),qb=0,Jb=function(t){Ub(t,Xb,{value:{objectID:"O"+qb++,weakData:{}}})},$b=Ob.exports={enable:function(){$b.enable=function(){},Hb=!0;var t=Gb.f,e=Mb([].splice),r={};r[Xb]=1,t(r).length&&(Gb.f=function(r){for(var n=t(r),o=0,i=n.length;o<i;o++)if(n[o]===Xb){e(n,o,1);break}return n},Ib({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:zb.f}))},fastKey:function(t,e){if(!Nb(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!Wb(t,Xb)){if(!Vb(t))return"F";if(!e)return"E";Jb(t)}return t[Xb].objectID},getWeakData:function(t,e){if(!Wb(t,Xb)){if(!Vb(t))return!0;if(!e)return!1;Jb(t)}return t[Xb].weakData},onFreeze:function(t){return Bb&&Hb&&Vb(t)&&!Wb(t,Xb)&&Jb(t),t}};Fb[Xb]=!0;var Kb=Ob.exports,Yb=Cr,Zb=n,Qb=Kb,t_=o,e_=gr,r_=Jv,n_=Ad,o_=x,i_=K,a_=z,u_=na,s_=Ze.f,c_=Ra.forEach,l_=O,f_=ba.set,v_=ba.getterFor,d_=Pi,h_=_o,p_=Di,y_=function(t,e,r){for(var n in e)r&&r.unsafe&&t[n]?t[n]=e[n]:d_(t,n,e[n],r);return t},g_=Ye,m_=Ad,b_=z,__=Jv,w_=Vc,S_=Bc,E_=Rd,x_=O,T_=Kb.fastKey,O_=ba.set,R_=ba.getterFor,k_={getConstructor:function(t,e,r,n){var o=t((function(t,o){m_(t,i),O_(t,{type:e,index:h_(null),first:null,last:null,size:0}),x_||(t.size=0),b_(o)||__(o,t[n],{that:t,AS_ENTRIES:r})})),i=o.prototype,a=R_(e),u=function(t,e,r){var n,o,i=a(t),u=s(t,e);return u?u.value=r:(i.last=u={index:o=T_(e,!0),key:e,value:r,previous:n=i.last,next:null,removed:!1},i.first||(i.first=u),n&&(n.next=u),x_?i.size++:t.size++,"F"!==o&&(i.index[o]=u)),t},s=function(t,e){var r,n=a(t),o=T_(e);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key===e)return r};return y_(i,{clear:function(){for(var t=a(this),e=t.first;e;)e.removed=!0,e.previous&&(e.previous=e.previous.next=null),e=e.next;t.first=t.last=null,t.index=h_(null),x_?t.size=0:this.size=0},delete:function(t){var e=this,r=a(e),n=s(e,t);if(n){var o=n.next,i=n.previous;delete r.index[n.index],n.removed=!0,i&&(i.next=o),o&&(o.previous=i),r.first===n&&(r.first=o),r.last===n&&(r.last=i),x_?r.size--:e.size--}return!!n},forEach:function(t){for(var e,r=a(this),n=g_(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:r.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!s(this,t)}}),y_(i,r?{get:function(t){var e=s(this,t);return e&&e.value},set:function(t,e){return u(this,0===t?0:t,e)}}:{add:function(t){return u(this,t=0===t?0:t,t)}}),x_&&p_(i,"size",{configurable:!0,get:function(){return a(this).size}}),o},setStrong:function(t,e,r){var n=e+" Iterator",o=R_(e),i=R_(n);w_(t,e,(function(t,e){O_(this,{type:n,target:t,state:o(t),kind:e,last:null})}),(function(){for(var t=i(this),e=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?S_("keys"===e?r.key:"values"===e?r.value:[r.key,r.value],!1):(t.target=null,S_(void 0,!0))}),r?"entries":"values",!r,!0),E_(e)}},C_=Ye,A_=nr,P_=$t,j_=Jv,D_=nr,L_=C,I_=function(t,e,r){for(var n,o,i=r?t:t.iterator,a=t.next;!(n=L_(a,i)).done;)if(void 0!==(o=e(n.value)))return o},M_=function(t){return t[t.CAPTURE=0]="CAPTURE",t[t.PRE_PROCESSING=1]="PRE_PROCESSING",t[t.ENCODE=2]="ENCODE",t[t.TRANSFER=3]="TRANSFER",t[t.POST_PROCESSING=4]="POST_PROCESSING",t[t.DECODE=5]="DECODE",t[t.RENDERING=6]="RENDERING",t}(M_||{});var F_=function(t){function e(){var t,r,n,o,i;Wg(this,e);for(var a=arguments.length,u=new Array(a),s=0;s<a;s++)u[s]=arguments[s];return n=this,o=e,i=nb(t=[]).call(t,u),o=tm(o),nm(r=Hg(n,Xg()?Fo(o,i||[],tm(n).constructor):o.apply(n,i)),"type",M_.RENDERING),r}return rm(e,t),Bg(e)}(sb);function N_(t,e,r){var n=r.value;r.value=function(){for(var t,r=this.monitor,o=this.name,i=nb(t="".concat(o,".")).call(t,e),a=arguments.length,u=new Array(a),s=0;s<a;s++)u[s]=arguments[s];null==r||r.report("rtc_sdk_api_call",{sdk_api_name:i,message:Zm(u),error_code:0});var c=n.apply(this,u);return"function"==typeof(null==c?void 0:c.then)?c.then((function(t){return null==r||r.report("rtc_sdk_callback",{sdk_callback_name:i,error_code:0,message:Zm(t||{})}),t})).catch((function(t){throw null==r||r.report("rtc_sdk_callback",{sdk_callback_name:i,error_code:t.code||-1,message:t.message||""}),t})):(null==r||r.report("rtc_sdk_callback",{sdk_callback_name:i,error_code:0,message:c||""}),c)}}var W_=e(ig),U_=Zt,G_=C,z_=K,V_=nr,B_=function(t){return void 0!==t&&(U_(t,"value")||U_(t,"writable"))},H_=T,X_=Qs;Cr({target:"Reflect",stat:!0},{get:function t(e,r){var n,o,i=arguments.length<3?e:arguments[2];return V_(e)===i?e[r]:(n=H_.f(e,r))?B_(n)?n.value:void 0===n.get?void 0:G_(n.get,i):z_(o=X_(e))?t(o,r,i):void 0}});var q_=e(Y.Reflect.get),J_=e(Zg),$_=e(Vf),K_=e(vf),Y_=e(Al),Z_=e(Ug),Q_=e(Jl),tw=O,ew=p,rw=C,nw=o,ow=Jn,iw=Ci,aw=A,uw=$t,sw=G,cw=Object.assign,lw=Object.defineProperty,fw=ew([].concat),vw=!cw||nw((function(){if(tw&&1!==cw({b:1},cw(lw({},"a",{enumerable:!0,get:function(){lw(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach((function(t){e[t]=t})),7!==cw({},t)[r]||ow(cw({},e)).join("")!==n}))?function(t,e){for(var r=uw(t),n=arguments.length,o=1,i=iw.f,a=aw.f;n>o;)for(var u,s=sw(arguments[o++]),c=i?fw(ow(s),i(s)):ow(s),l=c.length,f=0;l>f;)u=c[f++],tw&&!rw(a,s,u)||(r[u]=s[u]);return r}:cw,dw=vw;Cr({target:"Object",stat:!0,arity:2,forced:Object.assign!==dw},{assign:dw});var hw,pw=e(Y.Object.assign),yw=n,gw=l,mw=x,bw=wd,_w=at,ww=Ar,Sw=Fd,Ew=yw.Function,xw=/MSIE .\./.test(_w)||"BUN"===bw&&((hw=yw.Bun.version.split(".")).length<3||"0"===hw[0]&&(hw[1]<3||"3"===hw[1]&&"0"===hw[2])),Tw=function(t,e){var r=e?2:1;return xw?function(n,o){var i=Sw(arguments.length,1)>r,a=mw(n)?n:Ew(n),u=i?ww(arguments,r):[],s=i?function(){gw(a,this,u)}:a;return e?t(s,o):t(s)}:t},Ow=Cr,Rw=n,kw=Tw(Rw.setInterval,!0);Ow({global:!0,bind:!0,forced:Rw.setInterval!==kw},{setInterval:kw});var Cw=Cr,Aw=n,Pw=Tw(Aw.setTimeout,!0);Cw({global:!0,bind:!0,forced:Aw.setTimeout!==Pw},{setTimeout:Pw});var jw=e(Y.setTimeout),Dw=Fn.includes;Cr({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(t){return Dw(this,t,arguments.length>1?arguments[1]:void 0)}});var Lw=_f("Array","includes"),Iw=K,Mw=b,Fw=ve("match"),Nw=function(t){var e;return Iw(t)&&(void 0!==(e=t[Fw])?!!e:"RegExp"===Mw(t))},Ww=TypeError,Uw=function(t){if(Nw(t))throw new Ww("The method doesn't accept regular expressions");return t},Gw=ve("match"),zw=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[Gw]=!1,"/./"[t](e)}catch(n){}}return!1},Vw=Cr,Bw=Uw,Hw=H,Xw=bi,qw=zw,Jw=p("".indexOf);Vw({target:"String",proto:!0,forced:!qw("includes")},{includes:function(t){return!!~Jw(Xw(Hw(this)),Xw(Bw(t)),arguments.length>1?arguments[1]:void 0)}});var $w=_f("String","includes"),Kw=nt,Yw=Lw,Zw=$w,Qw=Array.prototype,tS=String.prototype,eS=e((function(t){var e=t.includes;return t===Qw||Kw(Qw,t)&&e===Qw.includes?Yw:"string"==typeof t||t===tS||Kw(tS,t)&&e===tS.includes?Zw:e}));(function(t,e,r){var n,o=-1!==t.indexOf("Map"),i=-1!==t.indexOf("Weak"),a=o?"set":"add",u=Zb[t],s=u&&u.prototype,c={};if(l_&&o_(u)&&(i||s.forEach&&!t_((function(){(new u).entries().next()})))){var l=(n=e((function(e,r){f_(n_(e,l),{type:t,collection:new u}),a_(r)||r_(r,e[a],{that:e,AS_ENTRIES:o})}))).prototype,f=v_(t);c_(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(t){var e="add"===t||"set"===t;!(t in s)||i&&"clear"===t||e_(l,t,(function(r,n){var o=f(this).collection;if(!e&&i&&!i_(r))return"get"===t&&void 0;var a=o[t](0===r?0:r,n);return e?this:a}))})),i||s_(l,"size",{configurable:!0,get:function(){return f(this).collection.size}})}else n=r.getConstructor(e,t,o,a),Qb.enable();u_(n,t,!1,!0),c[t]=n,Yb({global:!0,forced:!0},c),i||r.setStrong(n,t,o)})("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),k_);var rS=Tt,nS=TypeError,oS=function(t){if("object"==typeof t&&"size"in t&&"has"in t&&"add"in t&&"delete"in t&&"keys"in t)return t;throw new nS(rS(t)+" is not a set")},iS=function(t,e){return 1===e?function(e,r){return e[t](r)}:function(e,r,n){return e[t](r,n)}},aS=rt("Set"),uS=aS.prototype,sS={Set:aS,add:iS("add",1),has:iS("has",1),remove:iS("delete",1),proto:uS},cS=I_,lS=function(t,e,r){return r?cS(t.keys(),e,!0):t.forEach(e)},fS=lS,vS=sS.Set,dS=sS.add,hS=function(t){var e=new vS;return fS(t,(function(t){dS(e,t)})),e},pS=function(t){return t.size},yS=Ct,gS=nr,mS=C,bS=En,_S=function(t){return{iterator:t,next:t.next,done:!1}},wS="Invalid size",SS=RangeError,ES=TypeError,xS=Math.max,TS=function(t,e){this.set=t,this.size=xS(e,0),this.has=yS(t.has),this.keys=yS(t.keys)};TS.prototype={getIterator:function(){return _S(gS(mS(this.keys,this.set)))},includes:function(t){return mS(this.has,this.set,t)}};var OS=function(t){gS(t);var e=+t.size;if(e!=e)throw new ES(wS);var r=bS(e);if(r<0)throw new SS(wS);return new TS(t,r)},RS=oS,kS=hS,CS=pS,AS=OS,PS=lS,jS=I_,DS=sS.has,LS=sS.remove,IS=function(t){var e=RS(this),r=AS(t),n=kS(e);return CS(e)<=r.size?PS(e,(function(t){r.includes(t)&&LS(n,t)})):jS(r.getIterator(),(function(t){DS(e,t)&&LS(n,t)})),n},MS=function(){return!1},FS=IS;Cr({target:"Set",proto:!0,real:!0,forced:!MS()},{difference:FS});var NS=oS,WS=pS,US=OS,GS=lS,zS=I_,VS=sS.Set,BS=sS.add,HS=sS.has,XS=function(t){var e=NS(this),r=US(t),n=new VS;return WS(e)>r.size?zS(r.getIterator(),(function(t){HS(e,t)&&BS(n,t)})):GS(e,(function(t){r.includes(t)&&BS(n,t)})),n},qS=XS;Cr({target:"Set",proto:!0,real:!0,forced:!MS()},{intersection:qS});var JS=oS,$S=sS.has,KS=pS,YS=OS,ZS=lS,QS=I_,tE=Lv,eE=function(t){var e=JS(this),r=YS(t);if(KS(e)<=r.size)return!1!==ZS(e,(function(t){if(r.includes(t))return!1}),!0);var n=r.getIterator();return!1!==QS(n,(function(t){if($S(e,t))return tE(n,"normal",!1)}))},rE=eE;Cr({target:"Set",proto:!0,real:!0,forced:!MS()},{isDisjointFrom:rE});var nE=oS,oE=pS,iE=lS,aE=OS,uE=function(t){var e=nE(this),r=aE(t);return!(oE(e)>r.size)&&!1!==iE(e,(function(t){if(!r.includes(t))return!1}),!0)},sE=uE;Cr({target:"Set",proto:!0,real:!0,forced:!MS()},{isSubsetOf:sE});var cE=oS,lE=sS.has,fE=pS,vE=OS,dE=I_,hE=Lv,pE=function(t){var e=cE(this),r=vE(t);if(fE(e)<r.size)return!1;var n=r.getIterator();return!1!==dE(n,(function(t){if(!lE(e,t))return hE(n,"normal",!1)}))},yE=pE;Cr({target:"Set",proto:!0,real:!0,forced:!MS()},{isSupersetOf:yE});var gE=oS,mE=hS,bE=OS,_E=I_,wE=sS.add,SE=sS.has,EE=sS.remove,xE=function(t){var e=gE(this),r=bE(t).getIterator(),n=mE(e);return _E(r,(function(t){SE(e,t)?EE(n,t):wE(n,t)})),n},TE=xE;Cr({target:"Set",proto:!0,real:!0,forced:!MS()},{symmetricDifference:TE});var OE=oS,RE=sS.add,kE=hS,CE=OS,AE=I_,PE=function(t){var e=OE(this),r=CE(t).getIterator(),n=kE(e);return AE(r,(function(t){RE(n,t)})),n},jE=PE;Cr({target:"Set",proto:!0,real:!0,forced:!MS()},{union:jE});var DE=Y.Set,LE=function(t,e,r){return function(n){var o=P_(n),i=arguments.length,a=i>1?arguments[1]:void 0,u=void 0!==a,s=u?C_(a,i>2?arguments[2]:void 0):void 0,c=new t,l=0;return j_(o,(function(t){var n=u?s(t,l++):t;r?e(c,A_(n)[0],n[1]):e(c,n)})),c}};Cr({target:"Set",stat:!0,forced:!0},{from:LE(sS.Set,sS.add,!1)});var IE=function(t,e,r){return function(){for(var n=new t,o=arguments.length,i=0;i<o;i++){var a=arguments[i];r?e(n,D_(a)[0],a[1]):e(n,a)}return n}};Cr({target:"Set",stat:!0,forced:!0},{of:IE(sS.Set,sS.add,!1)});var ME=oS,FE=sS.add;Cr({target:"Set",proto:!0,real:!0,forced:!0},{addAll:function(){for(var t=ME(this),e=0,r=arguments.length;e<r;e++)FE(t,arguments[e]);return t}});var NE=oS,WE=sS.remove;Cr({target:"Set",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=NE(this),r=!0,n=0,o=arguments.length;n<o;n++)t=WE(e,arguments[n]),r=r&&t;return!!r}});var UE=Ye,GE=oS,zE=lS;Cr({target:"Set",proto:!0,real:!0,forced:!0},{every:function(t){var e=GE(this),r=UE(t,arguments.length>1?arguments[1]:void 0);return!1!==zE(e,(function(t){if(!r(t,t,e))return!1}),!0)}});var VE=Kr,BE=Zt,HE=z,XE=Ns,qE=ve("iterator"),JE=Object,$E=x,KE=function(t){if(HE(t))return!1;var e=JE(t);return void 0!==e[qE]||"@@iterator"in e||BE(XE,VE(e))},YE=K,ZE=rt("Set"),QE=function(t){return function(t){return YE(t)&&"number"==typeof t.size&&$E(t.has)&&$E(t.keys)}(t)?t:KE(t)?new ZE(t):t},tx=C,ex=QE,rx=IS;Cr({target:"Set",proto:!0,real:!0,forced:!0},{difference:function(t){return tx(rx,this,ex(t))}});var nx=Ye,ox=oS,ix=lS,ax=sS.Set,ux=sS.add;Cr({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(t){var e=ox(this),r=nx(t,arguments.length>1?arguments[1]:void 0),n=new ax;return ix(e,(function(t){r(t,t,e)&&ux(n,t)})),n}});var sx=Ye,cx=oS,lx=lS;Cr({target:"Set",proto:!0,real:!0,forced:!0},{find:function(t){var e=cx(this),r=sx(t,arguments.length>1?arguments[1]:void 0),n=lx(e,(function(t){if(r(t,t,e))return{value:t}}),!0);return n&&n.value}});var fx=C,vx=QE,dx=XS;Cr({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(t){return fx(dx,this,vx(t))}});var hx=C,px=QE,yx=eE;Cr({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(t){return hx(yx,this,px(t))}});var gx=C,mx=QE,bx=uE;Cr({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(t){return gx(bx,this,mx(t))}});var _x=C,wx=QE,Sx=pE;Cr({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(t){return _x(Sx,this,wx(t))}});var Ex=Cr,xx=p,Tx=oS,Ox=lS,Rx=bi,kx=xx([].join),Cx=xx([].push);Ex({target:"Set",proto:!0,real:!0,forced:!0},{join:function(t){var e=Tx(this),r=void 0===t?",":Rx(t),n=[];return Ox(e,(function(t){Cx(n,t)})),kx(n,r)}});var Ax=Ye,Px=oS,jx=lS,Dx=sS.Set,Lx=sS.add;Cr({target:"Set",proto:!0,real:!0,forced:!0},{map:function(t){var e=Px(this),r=Ax(t,arguments.length>1?arguments[1]:void 0),n=new Dx;return jx(e,(function(t){Lx(n,r(t,t,e))})),n}});var Ix=Ct,Mx=oS,Fx=lS,Nx=TypeError;Cr({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(t){var e=Mx(this),r=arguments.length<2,n=r?void 0:arguments[1];if(Ix(t),Fx(e,(function(o){r?(r=!1,n=o):n=t(n,o,o,e)})),r)throw new Nx("Reduce of empty set with no initial value");return n}});var Wx=Ye,Ux=oS,Gx=lS;Cr({target:"Set",proto:!0,real:!0,forced:!0},{some:function(t){var e=Ux(this),r=Wx(t,arguments.length>1?arguments[1]:void 0);return!0===Gx(e,(function(t){if(r(t,t,e))return!0}),!0)}});var zx=C,Vx=QE,Bx=xE;Cr({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(t){return zx(Bx,this,Vx(t))}});var Hx=C,Xx=QE,qx=PE;Cr({target:"Set",proto:!0,real:!0,forced:!0},{union:function(t){return Hx(qx,this,Xx(t))}});var Jx=e(DE),$x=e(lb),Kx=e(cb),Yx=e(Tb),Zx=Cr,Qx=Fn.indexOf,tT=pf,eT=S([].indexOf),rT=!!eT&&1/eT([1],1,-0)<0;Zx({target:"Array",proto:!0,forced:rT||!tT("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return rT?eT(this,t,e)||0:Qx(this,t,e)}});var nT=_f("Array","indexOf"),oT=nt,iT=nT,aT=Array.prototype,uT=e((function(t){var e=t.indexOf;return t===aT||oT(aT,t)&&e===aT.indexOf?iT:e})),sT=Cr,cT=S;T.f;var lT=An,fT=bi,vT=Uw,dT=H,hT=zw,pT=cT("".slice),yT=Math.min;sT({target:"String",proto:!0,forced:!hT("startsWith")},{startsWith:function(t){var e=fT(dT(this));vT(t);var r=lT(yT(arguments.length>1?arguments[1]:void 0,e.length)),n=fT(t);return pT(e,r,r+n.length)===n}});var gT=_f("String","startsWith"),mT=nt,bT=gT,_T=String.prototype,wT=e((function(t){var e=t.startsWith;return"string"==typeof t||t===_T||mT(_T,t)&&e===_T.startsWith?bT:e})),ST=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(at),ET=Om.start;Cr({target:"String",proto:!0,forced:ST},{padStart:function(t){return ET(this,t,arguments.length>1?arguments[1]:void 0)}});var xT=_f("String","padStart"),TT=nt,OT=xT,RT=String.prototype,kT=e((function(t){var e=t.padStart;return"string"==typeof t||t===RT||TT(RT,t)&&e===RT.padStart?OT:e}));function CT(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function AT(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),om(t,DT(n.key),n)}}function PT(t,e,r){return(e=DT(e))in t?om(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function jT(t,e){return function(t){if($x(t))return t}(t)||function(t,e){var r=null==t?null:(void 0===Y_?"undefined":Kl(Y_))<"u"&&Kx(t)||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],s=!0,c=!1;try{if(i=(r=r.call(t)).next,0!==e)for(;!(s=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);s=!0);}catch(l){c=!0,o=l}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return u}}(t,e)||IT(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function DT(t){var e=function(t,e){if("object"!=Kl(t)||!t)return t;var r=t[Z_];if(void 0!==r){var n=r.call(t,e);if("object"!=Kl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Kl(e)?e:e+""}function LT(t){return(LT="function"==typeof Y_&&"symbol"==typeof Q_?function(t){return typeof t}:function(t){return t&&"function"==typeof Y_&&t.constructor===Y_&&t!==Y_.prototype?"symbol":typeof t})(t)}function IT(t,e){if(t){var r;if("string"==typeof t)return CT(t,e);var n=ib(r={}.toString.call(t)).call(r,8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Yx(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?CT(t,e):void 0}}function MT(){var t;return!eS(t=navigator.userAgent).call(t,"Windows")&&(/Android|Alicar|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent)||"number"==typeof navigator.maxTouchPoints&&navigator.maxTouchPoints>0)}var FT=function(t){return t[t.AAC=0]="AAC",t[t.OPUS=1]="OPUS",t[t.H264=2]="H264",t[t.H265=3]="H265",t[t.AV1=4]="AV1",t}(FT||{});PT(PT(PT(PT(PT({},FT.AAC,"mp4a.40.2"),FT.OPUS,"opus"),FT.H264,"avc1.42002a"),FT.H265,"hev1.1.6.L93.B0"),FT.AV1,"av01.0.04M.08"),PT(PT(PT(PT({},FT.AAC,"mp4a.40.2"),FT.OPUS,"opus"),FT.H264,"avc1.4DE033"),FT.H265,"hev1.1.6.L93.B0");var NT={log:function(){},send:function(){},$custom:{},$enableLog:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];NT.log=t?function(){for(var t,e,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];(e=console).log.apply(e,nb(t=[UT()]).call(t,n)),NT.enableLogSend&&WT(n)}:function(){}},$enableSend:function(){NT.send=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];WT(e)}}};function WT(t){if(NT.$logger)try{NT.$logger(t)}catch(e){console.error(UT(),"debug send fail:",e)}}function UT(){var t,e,r=new Date;return nb(t="[".concat(r.toLocaleTimeString()," ")).call(t,kT(e=r.getMilliseconds().toString()).call(e,3,"0")," media-engine]")}!function(){var t;"object"===(("undefined"==typeof window?"undefined":Kl(window))>"u"?"undefined":LT(window))&&!window.__me_debug_helper&&(window.__me_debug_helper=NT);var e=location.search.substring(1),r="_medh_";if(null===(t=NT.$isInnerEnv)||void 0===t||t.call(NT),!e){var n=location.hash,o=uT(n).call(n,"?");if(!n||-1===o||!(e=n.substring(o+1)))return}var i,a=function(t,e){var r=(void 0===Y_?"undefined":Kl(Y_))<"u"&&Kx(t)||t["@@iterator"];if(!r){if($x(t)||(r=IT(t))||e){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e.split("&"));try{for(a.s();!(i=a.n()).done;){var u=jT(i.value.split("="),2),s=u[0],c=u[1];if(wT(s).call(s,r)){var l=s.replace(r,"");wT(l).call(l,"inner_")&&(l=l.replace("inner_","")),"log"===l?NT.$enableLog():"send"===l?NT.$enableSend():NT[l]=c||!0}}}catch(f){a.e(f)}finally{a.f()}"localhost"===location.hostname&&NT.$enableLog()}(),MT();var GT=function(){return function(t,e,r){return e&&AT(t.prototype,e),r&&AT(t,r),om(t,"prototype",{writable:!1}),t}((function t(e){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.name="",this.type="main",pw(this,e||{})}),[{key:"isWorkerPlugin",get:function(){return"worker"===this.type}},{key:"init",value:function(t){pw(this,t||{})}}])}();function zT(t,e,r,n,o,i,a){try{var u=t[i](a),s=u.value}catch(c){return void r(c)}u.done?e(s):W_.resolve(s).then(n,o)}function VT(t,e,r){return e=JT(e),function(t,e){if(e&&("object"==Kl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,KT()?Fo(e,r||[],JT(t).constructor):e.apply(t,r))}function BT(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function HT(t,e,r){return e&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),om(t,eO(n.key),n)}}(t.prototype,e),om(t,"prototype",{writable:!1}),t}function XT(t,e,r){return(e=eO(e))in t?om(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qT(){var t;return qT=("undefined"==typeof Reflect?"undefined":Kl(Reflect))<"u"&&q_?J_(t=q_).call(t):function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=JT(t)););return t}(t,e);if(n){var o=dm(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},qT.apply(null,arguments)}function JT(t){var e;return(JT=$_?J_(e=K_).call(e):function(t){return t.__proto__||K_(t)})(t)}function $T(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=ob(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),om(t,"prototype",{writable:!1}),e&&QT(t,e)}function KT(){try{var t=!Boolean.prototype.valueOf.call(Fo(Boolean,[],(function(){})))}catch(e){}return(KT=function(){return!!t})()}function YT(){var t,e,r="function"==typeof Y_?Y_:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof u?n:u,c=ob(s.prototype);return ZT(c,"_invoke",function(r,n,o){var i,u,s,c=0,l=o||[],f=!1,v={p:0,n:0,v:t,a:d,f:J_(d).call(d,t,4),d:function(e,r){return i=e,u=0,s=t,v.n=r,a}};function d(r,n){for(u=r,s=n,e=0;!f&&c&&!o&&e<l.length;e++){var o,i=l[e],d=v.p,h=i[2];r>3?(o=h===n)&&(s=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=d&&((o=r<2&&d<i[1])?(u=0,v.v=n,v.n=i[1]):d<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,v.n=h,u=0))}if(o||r>1)return a;throw f=!0,n}return function(o,l,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),u=l,s=h;(e=u<2?t:s)||!f;){i||(u?u<3?(u>1&&(v.n=-1),d(u,s)):v.n=s:v.v=s);try{if(c=2,i){if(u||(o="next"),e=i[o]){if(!(e=e.call(i,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,u<2&&(u=0)}else 1===u&&(e=i.return)&&e.call(i),u<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=t}else if((e=(f=v.n<0)?s:r.call(n,v))!==a)break}catch(p){i=t,u=1,s=p}finally{c=1}}return{value:e,done:f}}}(r,o,i),!0),c}var a={};function u(){}function s(){}function c(){}e=K_;var l=[][n]?e(e([][n]())):(ZT(e={},n,(function(){return this})),e),f=c.prototype=u.prototype=ob(l);function v(t){return $_?$_(t,c):(t.__proto__=c,ZT(t,o,"GeneratorFunction")),t.prototype=ob(f),t}return s.prototype=c,ZT(f,"constructor",c),ZT(c,"constructor",s),s.displayName="GeneratorFunction",ZT(c,o,"GeneratorFunction"),ZT(f),ZT(f,o,"Generator"),ZT(f,n,(function(){return this})),ZT(f,"toString",(function(){return"[object Generator]"})),(YT=function(){return{w:i,m:v}})()}function ZT(t,e,r,n){var o=om;try{o({},"",{})}catch(i){o=0}(ZT=function(t,e,r,n){if(e)o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r;else{var i=function(e,r){ZT(t,e,(function(t){return this._invoke(e,r,t)}))};i("next",0),i("throw",1),i("return",2)}})(t,e,r,n)}function QT(t,e){var r;return(QT=$_?J_(r=$_).call(r):function(t,e){return t.__proto__=e,t})(t,e)}function tO(t,e,r,n){var o=qT(JT(t.prototype),e,r);return"function"==typeof o?function(t){return o.apply(r,t)}:o}function eO(t){var e=function(t,e){if("object"!=Kl(t)||!t)return t;var r=t[Z_];if(void 0!==r){var n=r.call(t,e);if("object"!=Kl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Kl(e)?e:e+""}function rO(t){return(rO="function"==typeof Y_&&"symbol"==typeof Q_?function(t){return typeof t}:function(t){return t&&"function"==typeof Y_&&t.constructor===Y_&&t!==Y_.prototype?"symbol":typeof t})(t)}var nO,oO=2,iO=5,aO=0,uO=4,sO=8,cO=16,lO=32,fO=1,vO=3,dO=XT(XT(XT(XT(XT(XT({},aO,2),uO,1.1),sO,1.2),cO,1.3),lO,1.4),fO,1.5),hO=0,pO=1,yO=2,gO=3,mO="bmfCanvas";function bO(){return nO||(t="https://lf3-vod-cdn-tos.douyinstatic.com/obj/vodsass/super_resolution.js",nO=new W_((function(e,r){var n=document.createElement("script");n.src=t,n.onload=function(){e(!0),n.remove()},n.onerror=r,document.body.appendChild(n)}))),nO;var t}var _O=function(){return HT((function t(e){var r=this,n=e.canvas,o=e.video,i=e.onError,a=e.isDebug,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};BT(this,t),this.elapsed=0,this._wasmReady=!1,this._isCanvasAdded=!1,this._running=!1,this._hasGLLoged=!1,this._hasDelayedAddCanvas=!1,this._preVideoHeight=-1,this._preVideoWidth=-1,this._useVideoTexture=!1,this._isCrossOrigin=!1,this.isVideoPlaying=!1,this._destroyed=!1,this._errorCount=0,this._doAppendCanvas=function(){if(r._running){if(!r._isCanvasAdded){if(!r._video)return;r._root=r._video.parentElement,r._isCanvasAdded=!0}r._adjustCanvasPosition()}},this._adjustCanvasPosition=function(){},this._onRequestAnimationFrame=function(){!r._running||!r._video||r._destroyed||(cancelAnimationFrame(r._renderId),r._renderId=requestAnimationFrame(r._onRequestAnimationFrame),r._onRender())},this.onError=i,this._isDebug=null!=a&&a,this._opts=pw({disabled:!1,algType:oO,scaleType:aO,backend:vO,poolSize:2,maxWidth:2048,maxHeight:2048,wasmUrl:"",degradeFrameRate:.15,degradeFrameRateCount:3,canvasId:"",useVFC:!0,isSingle:!1,threshold:2,minRenderCount:20,useDelayedSR:!1,useScale:!0},u),n.setAttribute("id",mO),n.addEventListener("webglcontextlost",(function(){r._codeMsg="WEBGL Context LOST",r.code=gO}),!1),this._canvas=n;try{this.ready=this._init(o)}catch(c){var s;null===(s=this.onError)||void 0===s||s.call(this,c),this.ready=W_.resolve()}}),[{key:"_init",value:(t=function(t){return function(){var e=this,r=arguments;return new W_((function(n,o){var i=t.apply(e,r);function a(t){zT(i,n,o,a,u,"next",t)}function u(t){zT(i,n,o,a,u,"throw",t)}a(void 0)}))}}(YT().m((function t(e){var r,n,o=this;return YT().w((function(t){for(;;)switch(t.n){case 0:if(window.BMFModule){t.n=1;break}return t.n=1,bO();case 1:this._srWasmModule={onRuntimeInitialized:function(){o._isDebug&&console.log("onRuntimeInitialized");try{o.onReady()}catch(e){var t;null===(t=o.onError)||void 0===t||t.call(o,e)}},print:function(t){},printErr:function(t){this._isDebug&&console.log("printError:",t)},onAbort:function(t){this._isDebug&&console.log("onAbort",t)}},window.BMFModule(this._srWasmModule),this.bindMediaElement(e,{onRenderCallback:function(){},onRenderLostCallback:function(){},onSRCodeChanged:function(t){o._isDebug&&console.log("onSRCodeChanged",t)}}),this.isVideoPlaying?this._setCanvasWidthHeight(!0):(r=null,n=function(){o.isVideoPlaying=!0,o._setCanvasWidthHeight(!0),clearTimeout(r),e.removeEventListener("play",n)},e.addEventListener("play",n),r=jw(n,10));case 2:return t.a(2)}}),t,this)}))),function(e){return t.apply(this,arguments)})},{key:"onReady",value:function(){var t,e,r,n,o,i,a=this._srWasmModule,u="#".concat(mO),s=(new TextEncoder).encode(u),c=a._malloc(s.byteLength+1);a.HEAPU8.set(s,c);var l=this._opts,f=l.algType,v=l.backend,d=l.scaleType,h=l.maxWidth,p=l.maxHeight,y=l.poolSize;this._isDebug&&console.log(nb(t=nb(e=nb(r=nb(n=nb(o="algType:".concat(f,", backend:")).call(o,v,", scaleType:")).call(n,d,", maxWidht:")).call(r,h,", maxHeight:")).call(e,p,", poolSize:")).call(t,y));var g=a._createContext(c,f,v,d,y,h,p,1);this._isDebug&&console.log("CreateContext result:".concat(g));var m=this.getError(!0);a._free(c),0===g&&0===m?(this._isDebug&&console.log("CreateContext SUCCESS"),this._wasmReady=!0):(this.code=pO,this._codeMsg=nb(i="CreateContextFail code:".concat(g,", errRet:")).call(i,m),this._wasmReady=!1,this._isDebug&&console.log("CreateContext Fail, Fail code",g))}},{key:"getError",value:function(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this._wasmReady){var t=this._srWasmModule._getError();return this._isDebug&&console.log("getError ".concat(t)),t}return 0}},{key:"getRuntimeInfo",value:function(){var t=this._srWasmModule._getRunInfo(),e=this._srWasmModule.UTF8ToString(t);return this._isDebug&&console.log("getRuntimeInfo ".concat(e)),e}},{key:"bindMediaElement",value:function(t,e){var r=e.onRenderCallback,n=e.onRenderLostCallback,o=e.onSRCodeChanged;this._video!==t&&(this._video&&this.unBindMediaElement(),this._onRenderCallback=r,this._onRenderLostCallback=n,this._onSRCodeChanged=o,this._video=t,this._srWasmModule.video=this._getRenderTex(),this._hasDelayedAddCanvas=!1)}},{key:"unBindMediaElement",value:function(){this._isCanvasAdded=!1,this._onRenderLostCallback&&this._onRenderLostCallback(),this._srWasmModule&&(this._srWasmModule.video=null),this._video&&this._video instanceof HTMLVideoElement&&(this._video.__canvas=null),this._video=null,this._root=null,this._onRenderCallback=null,this._onRenderLostCallback=null,this._onRender(!0)}},{key:"_getRenderTex",value:function(){return this._video?this._video instanceof HTMLVideoElement?this._video:this._canvas:null}},{key:"_onRender",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!document.hidden&&"hidden"!==document.visibilityState){if(!this._wasmReady)return void(this._isDebug&&console.log("SR DEBUG","_onRender wasm not ready"));var e=this._opts.useScale?dO[this._opts.scaleType]:1,r=this._video;try{var n;this._hasGLLoged;var o=!0,i=(null===(n=this._srWasmModule)||void 0===n?void 0:n.video)instanceof HTMLVideoElement;if(i&&0===this._srWasmModule.video.readyState&&(o=!1),this._srWasmModule.video&&o){var a=this._srWasmModule.video.videoWidth,u=this._srWasmModule.video.videoHeight,s=this._useVideoTexture?1:0;if(i){var c=a>=this._opts.maxWidth,l=u>=this._opts.maxHeight;if(c||l)return void this._onRenderCallback({code:yO,msg:"Invalid width or height"})}-1===this._preVideoHeight&&(this._preVideoHeight=u,this._preVideoWidth=a),(this._preVideoHeight!==u||this._preVideoWidth!==a)&&(this._setCanvasWidthHeight(!0),this._isDebug&&console.log("canvas size change"),this._preVideoHeight=u,this._preVideoWidth=a);var f=this._srWasmModule._drawFrame(r.videoWidth,r.videoHeight,e,1,s);if(this._hasGLLoged,this._hasGLLoged=!0,t&&f!==hO)return;this._onRenderCallback({code:f}),this._hasDelayedAddCanvas&&!this._isCanvasAdded&&this._doAppendCanvas(),this._hasDelayedAddCanvas=!0}}catch(w){var v,d,h,p,y;if(console.warn("render error",w),this._errorCount++,this._errorCount>5)return this._errorCount=0,this._running=!1,void(null===(y=this.onError)||void 0===y||y.call(this,w));var g="",m=null==w||null===(d=w.stack)||void 0===d?void 0:eS(d).call(d,"contains cross-origin data"),b=(null===(h=this._srWasmModule)||void 0===h?void 0:h.video)instanceof HTMLVideoElement;m&&b&&(g=nb(v="crossorigin:".concat(this._srWasmModule.video.getAttribute("crossorigin"),",set:")).call(v,this._isCrossOrigin));var _=Zm({errMsg:w.message,columnNumber:w.columnNumber,fileName:w.fileName,stack:null==w?void 0:w.stack});null===(p=this._onRenderCallback)||void 0===p||p.call(this,{code:-1,error:_,errMsg:w.message+g})}}}},{key:"_tryRender",value:function(){this._srWasmModule.video=this._getRenderTex(),this._onRequestAnimationFrame()}},{key:"doRender",value:function(){this._video.paused?this._isCanvasAdded&&this._onRender():this.run()}},{key:"run",value:function(){this._running=!0,this._tryRender()}},{key:"stop",value:function(){this._running=!1,this._doAppendCanvas()}},{key:"_setCanvasWidthHeight",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._canvas,r=this._getWidthHeight(),n=r.width,o=r.height;t||(e.style.width="".concat(n,"px"),e.style.height="".concat(o,"px"));var i=n,a=o,u=this._opts.useScale?dO[this._opts.scaleType]:1;e.width=Math.floor(i*u),e.height=Math.floor(a*u)}},{key:"_getWidthHeight",value:function(){var t=this._video;return{width:t.videoWidth||t.width,height:t.videoHeight||t.height}}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,this._srWasmModule._destroy())}},{key:"setParam",value:function(){}},{key:"setEnabled",value:function(t){t?this.doRender():this.stop()}},{key:"reInitCanvas",value:function(t){this._setCanvasWidthHeight(!0),this._preVideoHeight=(null==t?void 0:t.width)||0,this._preVideoWidth=(null==t?void 0:t.height)||0}}]);var t}(),wO=function(){return HT((function t(e,r){BT(this,t),this.options=e,this.supported=!1,this.elapsed=0,this.stopped=!1,this.enabled=!1,this.paramOptions={},this.onError=e.onError;try{var n=e.canvas.getContext("webgl");if(n){this.gl=n,this.supported=!0,this.setParam(r),this.initCanvas();var o=this.initProgram();if(!o)return;var i=this.initTexture(o),a=i.uTexture,u=i.texture;if(!a||!u)return void(this.supported=!1);this.uTexture=a,this.texture=u,this.render()}}catch(c){var s;this.supported=!1,null===(s=this.onError)||void 0===s||s.call(this,c)}}),[{key:"render",value:function(){var t=this;if(!this.stopped&&this.enabled){if(document.hidden||"hidden"===document.visibilityState)return void requestAnimationFrame((function(){t.render()}));var e=this.options.video;if(e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA){var r=performance.now(),n=this.gl,o=this.texture,i=this.uTexture,a=this.options.canvas;n.activeTexture(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,o),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!0),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,e),n.uniform1i(i,0),n.viewport(0,0,a.width,a.height),n.clear(n.COLOR_BUFFER_BIT),n.drawArrays(n.TRIANGLE_STRIP,0,4),this.elapsed=.8*this.elapsed+.2*(performance.now()-r)}requestAnimationFrame((function(){t.render()}))}}},{key:"initProgram",value:function(){var t=this.gl,e=this.createShader(t.VERTEX_SHADER,this.vertexShader()),r=this.createShader(t.FRAGMENT_SHADER,this.fragmentShader()),n=t.createProgram();if(n&&e&&r){t.attachShader(n,e),t.attachShader(n,r),t.linkProgram(n),t.useProgram(n);var o=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,o),t.bufferData(t.ARRAY_BUFFER,new Float32Array([-1,-1,0,0,1,-1,1,0,-1,1,0,1,1,1,1,1]),t.STATIC_DRAW);var i=t.getAttribLocation(n,"a_position"),a=t.getAttribLocation(n,"a_texCoord");return t.enableVertexAttribArray(i),t.vertexAttribPointer(i,2,t.FLOAT,!1,16,0),t.enableVertexAttribArray(a),t.vertexAttribPointer(a,2,t.FLOAT,!1,16,8),n}this.supported=!1}},{key:"createShader",value:function(t,e){var r=this.gl,n=r.createShader(t);return n?(r.shaderSource(n,e),r.compileShader(n),n):(this.supported=!1,null)}},{key:"setParam",value:function(t){this.paramOptions=pw(this.paramOptions,this.mergeDefaultParam(t||{}))}},{key:"destroy",value:function(){this.stopped=!0}},{key:"setEnabled",value:function(t){t!==this.enabled&&(this.enabled=t,this.enabled&&(this.stopped=!1,this.render()))}}])}(),SO=function(t){function e(){return BT(this,e),VT(this,e,arguments)}return $T(e,t),HT(e,[{key:"mergeDefaultParam",value:function(t){return pw({scale:4},t)}},{key:"initCanvas",value:function(){var t=this.options,e=t.canvas,r=t.width,n=t.height,o=this.paramOptions.scale,i=r*o,a=n*o;if(Math.min(i,a)>4e3){var u=r/n;i>a?i=(a=4e3)*u:a=(i=4e3)/u}e.width=Math.round(i),e.height=Math.round(a)}},{key:"setParam",value:function(t){var r=!1;if(t&&"number"==typeof(null==t?void 0:t.scale)&&t.scale!==this.paramOptions.scale&&(r=!0),tO(e,"setParam",this)([t]),r){this.initCanvas();var n=this.options.canvas;console.log("init SRBicubic canvas",n.width,n.height),this.gl.uniform2f(this.uTexSize,n.width,n.height)}}},{key:"initTexture",value:function(t){var e=this.gl,r=e.createTexture();e.bindTexture(e.TEXTURE_2D,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR);var n=e.getUniformLocation(t,"u_texture");this.uTexSize=e.getUniformLocation(t,"u_texSize");var o=this.options.canvas;return e.uniform2f(this.uTexSize,o.width,o.height),{uTexture:n,texture:r}}},{key:"vertexShader",value:function(){return"\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\nvarying vec2 v_texCoord;\nvoid main() {\n gl_Position = vec4(a_position, 0, 1);\n v_texCoord = a_texCoord;\n}"}},{key:"fragmentShader",value:function(){return"\nprecision mediump float;\nuniform sampler2D u_texture;\nuniform vec2 u_texSize; // 新增\nvarying vec2 v_texCoord;\n\nfloat cubic(float v) {\n v = abs(v);\n if (v <= 1.0) {\n return 1.0 - 2.0 * v * v + v * v * v;\n } else if (v < 2.0) {\n return 4.0 - 8.0 * v + 5.0 * v * v - v * v * v;\n }\n return 0.0;\n}\n\nvoid main() {\n vec2 texSize = u_texSize; // 使用 uniform\n vec2 uv = v_texCoord;\n vec2 pixel = uv * texSize - 0.5;\n vec2 base = floor(pixel);\n vec2 f = pixel - base;\n\n vec4 color = vec4(0.0);\n float total = 0.0;\n for (int m = -1; m <= 2; ++m) {\n for (int n = -1; n <= 2; ++n) {\n float weight = cubic(float(m) - f.x) * cubic(f.y - float(n));\n vec2 coord = (base + vec2(float(m), float(n)) + 0.5) / texSize;\n color += texture2D(u_texture, coord) * weight;\n total += weight;\n }\n }\n gl_FragColor = color / total;\n}"}}])}(wO),EO=function(t){function e(){return BT(this,e),VT(this,e,arguments)}return $T(e,t),HT(e,[{key:"mergeDefaultParam",value:function(t){return pw({sharpness:.7,contrast:1.2,saturation:1.1},t)}},{key:"initCanvas",value:function(){var t=this.options,e=t.canvas,r=t.width,n=t.height;e.width=r,e.height=n}},{key:"setParam",value:function(t){t&&("number"==typeof t.sharpness&&t.sharpness!==this.paramOptions.sharpness&&this.gl.uniform1f(this.uSharpness,t.sharpness),"number"==typeof t.contrast&&t.contrast!==this.paramOptions.contrast&&this.gl.uniform1f(this.uContrast,t.contrast),"number"==typeof t.saturation&&t.saturation!==this.paramOptions.saturation&&this.gl.uniform1f(this.uSaturation,t.saturation)),tO(e,"setParam",this)([t])}},{key:"initTexture",value:function(t){var e=this.gl,r=e.createTexture();e.bindTexture(e.TEXTURE_2D,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR);var n=e.getUniformLocation(t,"u_texture");this.uSharpness=e.getUniformLocation(t,"uSharpness"),this.uContrast=e.getUniformLocation(t,"uContrast"),this.uSaturation=e.getUniformLocation(t,"uSaturation");var o=this.paramOptions,i=o.sharpness,a=o.contrast,u=o.saturation;return e.uniform1f(this.uSharpness,i),e.uniform1f(this.uContrast,a),e.uniform1f(this.uSaturation,u),{uTexture:n,texture:r}}},{key:"vertexShader",value:function(){return"\nattribute vec4 a_position;\nattribute vec2 a_texCoord;\nvarying highp vec2 vTextureCoord;\nvoid main(void) {\n gl_Position = a_position;\n vTextureCoord = a_texCoord;\n}"}},{key:"fragmentShader",value:function(){return" \nprecision highp float;\nvarying highp vec2 vTextureCoord;\nuniform sampler2D u_texture;\nuniform float uSharpness;\nuniform float uContrast;\nuniform float uSaturation;\nvec4 sharpen(vec4 color, vec2 texCoord, float amount) {\n vec2 texelSize = vec2(0.001, 0.001);\n vec4 blur = vec4(0.0);\n blur += texture2D(u_texture, texCoord + vec2(-1.0, -1.0) * texelSize) * 0.0625;\n blur += texture2D(u_texture, texCoord + vec2(-1.0, 0.0) * texelSize) * 0.125;\n blur += texture2D(u_texture, texCoord + vec2(-1.0, 1.0) * texelSize) * 0.0625;\n blur += texture2D(u_texture, texCoord + vec2( 0.0, -1.0) * texelSize) * 0.125;\n blur += texture2D(u_texture, texCoord + vec2( 0.0, 0.0) * texelSize) * 0.25;\n blur += texture2D(u_texture, texCoord + vec2( 0.0, 1.0) * texelSize) * 0.125;\n blur += texture2D(u_texture, texCoord + vec2( 1.0, -1.0) * texelSize) * 0.0625;\n blur += texture2D(u_texture, texCoord + vec2( 1.0, 0.0) * texelSize) * 0.125;\n blur += texture2D(u_texture, texCoord + vec2( 1.0, 1.0) * texelSize) * 0.0625;\n return mix(blur, color, amount);\n}\nvec4 adjustContrast(vec4 color, float contrast) {\n return vec4((color.rgb - 0.5) * contrast + 0.5, color.a);\n}\nvec4 adjustSaturation(vec4 color, float saturation) {\n float grey = dot(color.rgb, vec3(0.299, 0.587, 0.114));\n return vec4(mix(vec3(grey), color.rgb, saturation), color.a);\n}\nvoid main(void) {\n vec4 originalColor = texture2D(u_texture, vTextureCoord);\n vec4 sharpenedColor = sharpen(originalColor, vTextureCoord, uSharpness);\n vec4 contrastedColor = adjustContrast(sharpenedColor, uContrast);\n vec4 finalColor = adjustSaturation(contrastedColor, uSaturation);\n gl_FragColor = finalColor;\n}"}}])}(wO),xO=new Jx(["play","pause","playing","waiting","seeking","seeked","ended","ratechange","volumechange","loadedmetadata","loadeddata","canplay","canplaythrough","durationchange","timeupdate","abort","error","emptied","stalled","suspend","resume","autoplay","autoplayfailed"]),TO=function(){return HT((function t(e){BT(this,t),this.tagName="VIDEO",this.isAdapter=!0,this.enabled=!1,this.video=e.video,this.canvas=e.canvas}),[{key:"setEnabled",value:function(t){this.enabled=t,this.renderEle.style.cursor=(t?this.video:this.canvas).style.cursor}},{key:"renderEle",get:function(){return this.enabled?this.canvas:this.video}},{key:"load",value:function(){return this.video.load()}},{key:"pause",value:function(){return this.video.pause()}},{key:"paused",get:function(){return this.video.paused}},{key:"volume",get:function(){return this.video.volume},set:function(t){this.video.volume=t}},{key:"play",value:function(){return this.video.play()}},{key:"videoWidth",get:function(){return this.video.videoWidth}},{key:"videoHeight",get:function(){return this.video.videoHeight}},{key:"muted",get:function(){return this.video.muted},set:function(t){this.video.muted=t}},{key:"style",get:function(){return this.renderEle.style}},{key:"cancelVideoFrameCallback",value:function(t){return this.video.cancelVideoFrameCallback(t)}},{key:"requestVideoFrameCallback",value:function(t){return this.video.requestVideoFrameCallback(t)}},{key:"addEventListener",value:function(t,e){return(xO.has(t)?this.video:this.canvas).addEventListener(t,e)}},{key:"removeEventListener",value:function(t,e){return(xO.has(t)?this.video:this.canvas).removeEventListener(t,e)}},{key:"requestPointerLock",value:function(){return this.renderEle.requestPointerLock()}},{key:"requestFullscreen",value:function(){return this.renderEle.requestFullscreen()}},{key:"remove",value:function(){this.video.remove(),this.canvas.remove()}},{key:"setAttribute",value:function(t,e){return this.renderEle.setAttribute(t,e)}},{key:"getAttribute",value:function(t){return this.renderEle.getAttribute(t)}},{key:"playsInline",set:function(t){this.video.playsInline=t}},{key:"autoplay",set:function(t){this.video.autoplay=t}},{key:"srcObject",get:function(){return this.video.srcObject},set:function(t){this.video.srcObject=t}},{key:"parentElement",get:function(){return this.renderEle.parentElement}},{key:"controls",get:function(){return this.video.controls},set:function(t){this.video.controls=t}},{key:"id",get:function(){return this.renderEle.id},set:function(t){this.renderEle.id=t}}])}();function OO(){if(MT())return!1;try{return function(){try{var t=document.createElement("canvas").getContext("webgl"),e=!!t&&"function"==typeof t.getParameter;if(t){var r=t.getExtension("WEBGL_lose_context");r&&r.loseContext()}return e}catch(n){return console.error("WebGL 检测失败:",n),!1}}()&&function(){try{var t=document.createElement("canvas").getContext("webgl2");if(t){var e=t.getExtension("WEBGL_lose_context");e&&e.loseContext()}return!!t}catch(r){return console.error("WebGL2 检测失败:",r),!1}}()&&function(){try{if("object"!==(("undefined"==typeof WebAssembly?"undefined":Kl(WebAssembly))>"u"?"undefined":rO(WebAssembly)))return!1;var t=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));return"object"===rO(new WebAssembly.Instance(t))}catch(e){return console.error("WebAssembly 检测失败:",e),!1}}()}catch(t){return!1}}var RO={bicubic:SO,enhance:EO,bmf:_O};function kO(){!function(t){var e;if(null!==(e=document)&&void 0!==e&&e.createElement){var r=document.createElement("style");r.innerHTML=t,document.head.appendChild(r)}}("\n.vecg-sr-canvas {\n width: 100%;\n height: 100%;\n object-fit: contain;\n}\n.vecg-sr-canvas-hide{\n position: absolute;\n z-index: -10000;\n opacity: 0;\n display: none;\n}\n.vecg-sr-video {\n height: 0px;\n width: 0px;\n position: fixed;\n top: -100000px;\n z-index: -100000;\n opacity: 0;\n}\n.vecg-sr-debug-video {\n position: fixed;\n z-index: 100000;\n left: 500px;\n top: 0px;\n width: 400px;\n height: 800px;\n}")}var CO=function(t){function e(){var t,r,n,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return BT(this,e),(n=VT(this,e,[{name:"superResolution",type:"main",config:o}])).isVideoDataReady=!1,n.pendingEnabled=null,n.enabled=!1,n.onError=o.onError,n.disableDomManipulation=null!==(t=o.disableDomManipulation)&&void 0!==t&&t,n.isDebug=null!==(r=o.isDebug)&&void 0!==r&&r,kO(),n}return $T(e,t),HT(e,[{key:"init",value:function(t){var r,n,o;(tO(e,"init",this)([t]),null!==(r=t.config)&&void 0!==r&&r.onError)&&(this.onError=null===(o=t.config)||void 0===o?void 0:o.onError);return null!==(n=t.config)&&void 0!==n&&n.video?this.initVideo(t.config.video):null}},{key:"initVideo",value:function(t){return this.config.video=t,this.isVideoDataReady=!1,this.pendingEnabled=null,this._initVideo()}},{key:"destroy",value:function(){var t,e;this.canvas.remove(),this.isDebug&&console.log("remove canvas from body"),null===(t=this.mode)||void 0===t||t.setEnabled(!1),null===(e=this.mode)||void 0===e||e.destroy()}},{key:"switchMode",value:function(t){var e,r=this;this.isDebug&&console.log("SR DEBUG",t),this.config.mode=t,null===(e=this.mode)||void 0===e||e.destroy();var n=this.config.video;if(this.mode=new RO[t]({video:n,width:n.videoWidth,height:n.videoHeight,canvas:this.canvas,onError:function(t){var e;null===(e=r.onError)||void 0===e||e.call(r,t)},isDebug:this.isDebug},this.config.config),this.isVideoDataReady=!0,null!==this.pendingEnabled){var o=this.pendingEnabled;this.pendingEnabled=null,this.setEnabled(o)}}},{key:"setParam",value:function(t){var e;null===(e=this.mode)||void 0===e||e.setParam(t)}},{key:"getElapsed",value:function(){var t;return(null===(t=this.mode)||void 0===t?void 0:t.elapsed)||0}},{key:"setEnabled",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.isDebug&&console.log("SR DEBUG setEnabled",t,!this.isVideoDataReady,!this.mode),this.isVideoDataReady&&this.mode){if(t!==this.enabled){if(this.enabled=t,!this.disableDomManipulation)if(t){var n;null===(n=this.video.canvas.classList)||void 0===n||n.remove("vecg-sr-canvas-hide");var o=function(){var t,r;null===(t=e.video.video.parentElement)||void 0===t||t.insertBefore(e.video.canvas,e.video.video),null===(r=e.video.video.classList)||void 0===r||r.add("vecg-sr-video"),e.isDebug&&console.log("SR DEBUG insert canvas before video")};this.isDebug&&console.log("SR DEBUG fromInit",r),r?jw(o,500):o()}else{var i,a;null===(i=this.video.video.classList)||void 0===i||i.remove("vecg-sr-video"),null===(a=this.video.canvas.classList)||void 0===a||a.add("vecg-sr-canvas-hide"),this.video.canvas.parentElement.insertBefore(this.video.video,this.video.canvas),this.isDebug&&console.log("SR DEBUG insert video before canvas")}this.video.setEnabled(t),this.mode.setEnabled(t)}}else this.pendingEnabled=t}},{key:"reInitCanvas",value:function(t){var e;null===(e=this.mode)||void 0===e||e.reInitCanvas(t)}},{key:"_initVideo",value:function(){var t=this,e=this.config.mode,r=void 0===e?"bicubic":e,n=this.config.video,o=n.style;this.canvas=document.createElement("canvas"),this.disableDomManipulation||(this.canvas.classList.add("vecg-sr-canvas"),this.canvas.classList.add("vecg-sr-canvas-hide"),this.canvas.style.objectFit=o.objectFit,document.body.appendChild(this.canvas),this.isDebug&&console.log("add canvas to body"),window.__showSROriginVideo&&n.classList.add("vecg-sr-debug-video"));var i=new TO({video:n,canvas:this.canvas});return this.video=i,n.readyState>=2||n.videoHeight?this.switchMode(r):n.addEventListener("loadedmetadata",(function(){t.switchMode(r)})),i}}])}(GT);CO.isSuperResolutionSupport=OO;var AO=om,PO=dm,jO=function(t,e,r,n){for(var o,i=n>1?void 0:n?PO(e,r):e,a=t.length-1;a>=0;a--)(o=t[a])&&(i=(n?o(e,r,i):o(i))||i);return n&&i&&AO(e,r,i),i},DO=function(t){function e(){var t,r,n,o,i,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Wg(this,e),n=this,o=tm(o=e),nm(r=Hg(n,Xg()?Fo(o,i||[],tm(n).constructor):o.apply(n,i)),"name","RTCSRExtension"),nm(r,"version","4.66.36-beta.3"),nm(r,"_enable",!1),nm(r,"_superResolution",void 0),nm(r,"_scale",2),nm(r,"_isReady",!1),r._scale=null!==(t=a.scale)&&void 0!==t?t:2,r}return rm(e,t),Bg(e,[{key:"init",value:(o=Ng(Mg().mark((function t(){var e,r;return Mg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return null===(e=this.monitor)||void 0===e||e.report("rtc_invoke_status",{sdk_api_name:"RTCSRExtension.init.params",message:Zm({scale:this._scale}),error_code:0}),t.next=3,bO();case 3:null===(r=this.logger)||void 0===r||r.print("SR","Extension initialized");case 4:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"initVideoAndScale",value:function(t,e){void 0!==e&&(this._scale=e),this._superResolution&&(this._superResolution.destroy(),this._superResolution=void 0,this._isReady=!1);var r,n=this._getAlgTypeAndScaleType(this._scale);(this._superResolution=new CO,this._superResolution.init({config:{mode:"bmf",onError:function(t){console.log(t)},config:n}}),t)&&(null===(r=this._superResolution)||void 0===r||r.initVideo(t),this._isReady=!0)}},{key:"checkCompatibility",value:(n=Ng(Mg().mark((function t(){var e,r;return Mg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e="",r=[],t.prev=2,OO()){t.next=7;break}return r.push("Browser does not support required features"),t.abrupt("return",{isCompatible:!1,reasons:r,message:"Unsupported browser"});case 7:return t.abrupt("return",{isCompatible:!0,reasons:[],message:e});case 10:return t.prev=10,t.t0=t.catch(2),e=(null===t.t0||void 0===t.t0?void 0:t.t0.toString())||(null===t.t0||void 0===t.t0?void 0:t.t0.stack)||"",r.push("Compatibility check failed"),t.abrupt("return",{isCompatible:!1,reasons:r,message:e});case 15:case"end":return t.stop()}}),t,null,[[2,10]])}))),function(){return n.apply(this,arguments)})},{key:"enable",value:function(){var t,e;!this._enable&&this._isReady&&(this._enable=!0,null===(t=this._superResolution)||void 0===t||t.setEnabled(!0),null===(e=this.logger)||void 0===e||e.info("SR","enabled"))}},{key:"disable",value:function(){var t,e;this._enable&&this._isReady&&(this._enable=!1,null===(t=this._superResolution)||void 0===t||t.setEnabled(!1),null===(e=this.logger)||void 0===e||e.info("SR","disabled"))}},{key:"isSupported",value:(r=Ng(Mg().mark((function t(){var e;return Mg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.checkCompatibility();case 2:return e=t.sent,t.abrupt("return",e.isCompatible);case 4:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"isOpen",value:function(){return this._enable}},{key:"destroy",value:function(){var t;null===(t=this._superResolution)||void 0===t||t.destroy(),this._superResolution=void 0,this._isReady=!1,this._enable=!1}},{key:"_getAlgTypeAndScaleType",value:function(t){var e={};switch(t){case 2:e={algType:oO,scaleType:aO};break;case 1.1:e={algType:iO,scaleType:uO};break;case 1.2:e={algType:iO,scaleType:sO};break;case 1.3:e={algType:iO,scaleType:cO};break;case 1.4:e={algType:iO,scaleType:lO};break;case 1.5:e={algType:iO,scaleType:fO}}return e}}]);var r,n,o}(F_);return jO([N_],DO.prototype,"init",1),jO([N_],DO.prototype,"initVideoAndScale",1),jO([N_],DO.prototype,"checkCompatibility",1),jO([N_],DO.prototype,"enable",1),jO([N_],DO.prototype,"disable",1),DO}));
|
package/index.d.ts
CHANGED
|
@@ -1460,7 +1460,8 @@ export declare enum ReconnectReason {
|
|
|
1460
1460
|
ICE_FAILED = "iceFailed",
|
|
1461
1461
|
NODE_CHANGE = "nodeChange",
|
|
1462
1462
|
JOIN_TIMEOUT = "joinTimeout",
|
|
1463
|
-
NOTIFY_RECONNECT = "notifyReconnect"
|
|
1463
|
+
NOTIFY_RECONNECT = "notifyReconnect",
|
|
1464
|
+
MANUAL = "manual"
|
|
1464
1465
|
}
|
|
1465
1466
|
|
|
1466
1467
|
/**
|