@byteplus/veplayer-plugin 2.9.0-rc.1 → 2.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).__VEPLAYER_PLUGIN_RTM__={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n=function(e){return e&&e.Math==Math&&e},i=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||function(){return this}()||t||Function("return this")(),o=function(e){try{return!!e()}catch(t){return!0}},a=!o((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),s=a,u=Function.prototype,l=u.apply,c=u.call,f="object"==typeof Reflect&&Reflect.apply||(s?c.bind(l):function(){return c.apply(l,arguments)}),d=a,p=Function.prototype,h=p.call,v=d&&p.bind.bind(h,h),m=d?v:function(e){return function(){return h.apply(e,arguments)}},y=m,g=y({}.toString),_=y("".slice),b=function(e){return _(g(e),8,-1)},w=b,S=m,k=function(e){if("Function"===w(e))return S(e)},R="object"==typeof document&&document.all,T={all:R,IS_HTMLDDA:void 0===R&&void 0!==R},x=T.all,E=T.IS_HTMLDDA?function(e){return"function"==typeof e||e===x}:function(e){return"function"==typeof e},L={},O=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),P=a,I=Function.prototype.call,C=P?I.bind(I):function(){return I.apply(I,arguments)},Z={},j={}.propertyIsEnumerable,A=Object.getOwnPropertyDescriptor,D=A&&!j.call({1:2},1);Z.f=D?function(e){var t=A(this,e);return!!t&&t.enumerable}:j;var V,W,M=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},G=o,F=b,N=Object,U=m("".split),X=G((function(){return!N("z").propertyIsEnumerable(0)}))?function(e){return"String"==F(e)?U(e,""):N(e)}:N,H=function(e){return null==e},B=H,K=TypeError,Y=function(e){if(B(e))throw K("Can't call method on "+e);return e},J=X,z=Y,Q=function(e){return J(z(e))},q=E,$=T.all,ee=T.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:q(e)||e===$}:function(e){return"object"==typeof e?null!==e:q(e)},te={},re=te,ne=i,ie=E,oe=function(e){return ie(e)?e:void 0},ae=function(e,t){return arguments.length<2?oe(re[e])||oe(ne[e]):re[e]&&re[e][t]||ne[e]&&ne[e][t]},se=m({}.isPrototypeOf),ue="undefined"!=typeof navigator&&String(navigator.userAgent)||"",le=i,ce=ue,fe=le.process,de=le.Deno,pe=fe&&fe.versions||de&&de.version,he=pe&&pe.v8;he&&(W=(V=he.split("."))[0]>0&&V[0]<4?1:+(V[0]+V[1])),!W&&ce&&(!(V=ce.match(/Edge\/(\d+)/))||V[1]>=74)&&(V=ce.match(/Chrome\/(\d+)/))&&(W=+V[1]);var ve=W,me=ve,ye=o,ge=i.String,_e=!!Object.getOwnPropertySymbols&&!ye((function(){var e=Symbol();return!ge(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&me&&me<41})),be=_e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,we=ae,Se=E,ke=se,Re=Object,Te=be?function(e){return"symbol"==typeof e}:function(e){var t=we("Symbol");return Se(t)&&ke(t.prototype,Re(e))},xe=String,Ee=function(e){try{return xe(e)}catch(t){return"Object"}},Le=E,Oe=Ee,Pe=TypeError,Ie=function(e){if(Le(e))return e;throw Pe(Oe(e)+" is not a function")},Ce=Ie,Ze=H,je=function(e,t){var r=e[t];return Ze(r)?void 0:Ce(r)},Ae=C,De=E,Ve=ee,We=TypeError,Me={exports:{}},Ge=i,Fe=Object.defineProperty,Ne=function(e,t){try{Fe(Ge,e,{value:t,configurable:!0,writable:!0})}catch(r){Ge[e]=t}return t},Ue="__core-js_shared__",Xe=i[Ue]||Ne(Ue,{}),He=Xe;(Me.exports=function(e,t){return He[e]||(He[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.2",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"});var Be=Me.exports,Ke=Y,Ye=Object,Je=function(e){return Ye(Ke(e))},ze=Je,Qe=m({}.hasOwnProperty),qe=Object.hasOwn||function(e,t){return Qe(ze(e),t)},$e=m,et=0,tt=Math.random(),rt=$e(1..toString),nt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+rt(++et+tt,36)},it=Be,ot=qe,at=nt,st=_e,ut=be,lt=i.Symbol,ct=it("wks"),ft=ut?lt.for||lt:lt&&lt.withoutSetter||at,dt=function(e){return ot(ct,e)||(ct[e]=st&&ot(lt,e)?lt[e]:ft("Symbol."+e)),ct[e]},pt=C,ht=ee,vt=Te,mt=je,yt=function(e,t){var r,n;if("string"===t&&De(r=e.toString)&&!Ve(n=Ae(r,e)))return n;if(De(r=e.valueOf)&&!Ve(n=Ae(r,e)))return n;if("string"!==t&&De(r=e.toString)&&!Ve(n=Ae(r,e)))return n;throw We("Can't convert object to primitive value")},gt=TypeError,_t=dt("toPrimitive"),bt=function(e,t){if(!ht(e)||vt(e))return e;var r,n=mt(e,_t);if(n){if(void 0===t&&(t="default"),r=pt(n,e,t),!ht(r)||vt(r))return r;throw gt("Can't convert object to primitive value")}return void 0===t&&(t="number"),yt(e,t)},wt=Te,St=function(e){var t=bt(e,"string");return wt(t)?t:t+""},kt=ee,Rt=i.document,Tt=kt(Rt)&&kt(Rt.createElement),xt=function(e){return Tt?Rt.createElement(e):{}},Et=xt,Lt=!O&&!o((function(){return 7!=Object.defineProperty(Et("div"),"a",{get:function(){return 7}}).a})),Ot=O,Pt=C,It=Z,Ct=M,Zt=Q,jt=St,At=qe,Dt=Lt,Vt=Object.getOwnPropertyDescriptor;L.f=Ot?Vt:function(e,t){if(e=Zt(e),t=jt(t),Dt)try{return Vt(e,t)}catch(r){}if(At(e,t))return Ct(!Pt(It.f,e,t),e[t])};var Wt=o,Mt=E,Gt=/#|\.prototype\./,Ft=function(e,t){var r=Ut[Nt(e)];return r==Ht||r!=Xt&&(Mt(t)?Wt(t):!!t)},Nt=Ft.normalize=function(e){return String(e).replace(Gt,".").toLowerCase()},Ut=Ft.data={},Xt=Ft.NATIVE="N",Ht=Ft.POLYFILL="P",Bt=Ft,Kt=Ie,Yt=a,Jt=k(k.bind),zt=function(e,t){return Kt(e),void 0===t?e:Yt?Jt(e,t):function(){return e.apply(t,arguments)}},Qt={},qt=O&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),$t=ee,er=String,tr=TypeError,rr=function(e){if($t(e))return e;throw tr(er(e)+" is not an object")},nr=O,ir=Lt,or=qt,ar=rr,sr=St,ur=TypeError,lr=Object.defineProperty,cr=Object.getOwnPropertyDescriptor,fr="enumerable",dr="configurable",pr="writable";Qt.f=nr?or?function(e,t,r){if(ar(e),t=sr(t),ar(r),"function"==typeof e&&"prototype"===t&&"value"in r&&pr in r&&!r[pr]){var n=cr(e,t);n&&n[pr]&&(e[t]=r.value,r={configurable:dr in r?r[dr]:n[dr],enumerable:fr in r?r[fr]:n[fr],writable:!1})}return lr(e,t,r)}:lr:function(e,t,r){if(ar(e),t=sr(t),ar(r),ir)try{return lr(e,t,r)}catch(n){}if("get"in r||"set"in r)throw ur("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var hr=Qt,vr=M,mr=O?function(e,t,r){return hr.f(e,t,vr(1,r))}:function(e,t,r){return e[t]=r,e},yr=i,gr=f,_r=k,br=E,wr=L.f,Sr=Bt,kr=te,Rr=zt,Tr=mr,xr=qe,Er=function(e){var t=function(r,n,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,n)}return new e(r,n,i)}return gr(e,this,arguments)};return t.prototype=e.prototype,t},Lr=function(e,t){var r,n,i,o,a,s,u,l,c,f=e.target,d=e.global,p=e.stat,h=e.proto,v=d?yr:p?yr[f]:(yr[f]||{}).prototype,m=d?kr:kr[f]||Tr(kr,f,{})[f],y=m.prototype;for(o in t)n=!(r=Sr(d?o:f+(p?".":"#")+o,e.forced))&&v&&xr(v,o),s=m[o],n&&(u=e.dontCallGetSet?(c=wr(v,o))&&c.value:v[o]),a=n&&u?u:t[o],n&&typeof s==typeof a||(l=e.bind&&n?Rr(a,yr):e.wrap&&n?Er(a):h&&br(a)?_r(a):a,(e.sham||a&&a.sham||s&&s.sham)&&Tr(l,"sham",!0),Tr(m,o,l),h&&(xr(kr,i=f+"Prototype")||Tr(kr,i,{}),Tr(kr[i],o,a),e.real&&y&&(r||!y[o])&&Tr(y,o,a)))},Or=b,Pr=Array.isArray||function(e){return"Array"==Or(e)},Ir=Math.ceil,Cr=Math.floor,Zr=Math.trunc||function(e){var t=+e;return(t>0?Cr:Ir)(t)},jr=function(e){var t=+e;return t!=t||0===t?0:Zr(t)},Ar=jr,Dr=Math.min,Vr=function(e){return e>0?Dr(Ar(e),9007199254740991):0},Wr=Vr,Mr=function(e){return Wr(e.length)},Gr=TypeError,Fr=function(e){if(e>9007199254740991)throw Gr("Maximum allowed index exceeded");return e},Nr=St,Ur=Qt,Xr=M,Hr=function(e,t,r){var n=Nr(t);n in e?Ur.f(e,n,Xr(0,r)):e[n]=r},Br={};Br[dt("toStringTag")]="z";var Kr="[object z]"===String(Br),Yr=Kr,Jr=E,zr=b,Qr=dt("toStringTag"),qr=Object,$r="Arguments"==zr(function(){return arguments}()),en=Yr?zr:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(r){}}(t=qr(e),Qr))?r:$r?zr(t):"Object"==(n=zr(t))&&Jr(t.callee)?"Arguments":n},tn=E,rn=Xe,nn=m(Function.toString);tn(rn.inspectSource)||(rn.inspectSource=function(e){return nn(e)});var on=rn.inspectSource,an=m,sn=o,un=E,ln=en,cn=on,fn=function(){},dn=[],pn=ae("Reflect","construct"),hn=/^\s*(?:class|function)\b/,vn=an(hn.exec),mn=!hn.exec(fn),yn=function(e){if(!un(e))return!1;try{return pn(fn,dn,e),!0}catch(t){return!1}},gn=function(e){if(!un(e))return!1;switch(ln(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return mn||!!vn(hn,cn(e))}catch(t){return!0}};gn.sham=!0;var _n=!pn||sn((function(){var e;return yn(yn.call)||!yn(Object)||!yn((function(){e=!0}))||e}))?gn:yn,bn=Pr,wn=_n,Sn=ee,kn=dt("species"),Rn=Array,Tn=function(e){var t;return bn(e)&&(t=e.constructor,(wn(t)&&(t===Rn||bn(t.prototype))||Sn(t)&&null===(t=t[kn]))&&(t=void 0)),void 0===t?Rn:t},xn=function(e,t){return new(Tn(e))(0===t?0:t)},En=o,Ln=ve,On=dt("species"),Pn=function(e){return Ln>=51||!En((function(){var t=[];return(t.constructor={})[On]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},In=Lr,Cn=o,Zn=Pr,jn=ee,An=Je,Dn=Mr,Vn=Fr,Wn=Hr,Mn=xn,Gn=Pn,Fn=ve,Nn=dt("isConcatSpreadable"),Un=Fn>=51||!Cn((function(){var e=[];return e[Nn]=!1,e.concat()[0]!==e})),Xn=function(e){if(!jn(e))return!1;var t=e[Nn];return void 0!==t?!!t:Zn(e)};In({target:"Array",proto:!0,arity:1,forced:!Un||!Gn("concat")},{concat:function(e){var t,r,n,i,o,a=An(this),s=Mn(a,0),u=0;for(t=-1,n=arguments.length;t<n;t++)if(Xn(o=-1===t?a:arguments[t]))for(i=Dn(o),Vn(u+i),r=0;r<i;r++,u++)r in o&&Wn(s,u,o[r]);else Vn(u+1),Wn(s,u++,o);return s.length=u,s}});var Hn=en,Bn=String,Kn=function(e){if("Symbol"===Hn(e))throw TypeError("Cannot convert a Symbol value to a string");return Bn(e)},Yn={},Jn=jr,zn=Math.max,Qn=Math.min,qn=function(e,t){var r=Jn(e);return r<0?zn(r+t,0):Qn(r,t)},$n=Q,ei=qn,ti=Mr,ri=function(e){return function(t,r,n){var i,o=$n(t),a=ti(o),s=ei(n,a);if(e&&r!=r){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===r)return e||s||0;return!e&&-1}},ni={includes:ri(!0),indexOf:ri(!1)},ii={},oi=qe,ai=Q,si=ni.indexOf,ui=ii,li=m([].push),ci=function(e,t){var r,n=ai(e),i=0,o=[];for(r in n)!oi(ui,r)&&oi(n,r)&&li(o,r);for(;t.length>i;)oi(n,r=t[i++])&&(~si(o,r)||li(o,r));return o},fi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],di=ci,pi=fi,hi=Object.keys||function(e){return di(e,pi)},vi=O,mi=qt,yi=Qt,gi=rr,_i=Q,bi=hi;Yn.f=vi&&!mi?Object.defineProperties:function(e,t){gi(e);for(var r,n=_i(t),i=bi(t),o=i.length,a=0;o>a;)yi.f(e,r=i[a++],n[r]);return e};var wi,Si=ae("document","documentElement"),ki=nt,Ri=Be("keys"),Ti=function(e){return Ri[e]||(Ri[e]=ki(e))},xi=rr,Ei=Yn,Li=fi,Oi=ii,Pi=Si,Ii=xt,Ci="prototype",Zi="script",ji=Ti("IE_PROTO"),Ai=function(){},Di=function(e){return"<"+Zi+">"+e+"</"+Zi+">"},Vi=function(e){e.write(Di("")),e.close();var t=e.parentWindow.Object;return e=null,t},Wi=function(){try{wi=new ActiveXObject("htmlfile")}catch(i){}var e,t,r;Wi="undefined"!=typeof document?document.domain&&wi?Vi(wi):(t=Ii("iframe"),r="java"+Zi+":",t.style.display="none",Pi.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(Di("document.F=Object")),e.close(),e.F):Vi(wi);for(var n=Li.length;n--;)delete Wi[Ci][Li[n]];return Wi()};Oi[ji]=!0;var Mi=Object.create||function(e,t){var r;return null!==e?(Ai[Ci]=xi(e),r=new Ai,Ai[Ci]=null,r[ji]=e):r=Wi(),void 0===t?r:Ei.f(r,t)},Gi={},Fi=ci,Ni=fi.concat("length","prototype");Gi.f=Object.getOwnPropertyNames||function(e){return Fi(e,Ni)};var Ui={},Xi=qn,Hi=Mr,Bi=Hr,Ki=Array,Yi=Math.max,Ji=function(e,t,r){for(var n=Hi(e),i=Xi(t,n),o=Xi(void 0===r?n:r,n),a=Ki(Yi(o-i,0)),s=0;i<o;i++,s++)Bi(a,s,e[i]);return a.length=s,a},zi=b,Qi=Q,qi=Gi.f,$i=Ji,eo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Ui.f=function(e){return eo&&"Window"==zi(e)?function(e){try{return qi(e)}catch(t){return $i(eo)}}(e):qi(Qi(e))};var to={};to.f=Object.getOwnPropertySymbols;var ro=mr,no=function(e,t,r,n){return n&&n.enumerable?e[t]=r:ro(e,t,r),e},io=Qt,oo=function(e,t,r){return io.f(e,t,r)},ao={},so=dt;ao.f=so;var uo,lo,co,fo=te,po=qe,ho=ao,vo=Qt.f,mo=function(e){var t=fo.Symbol||(fo.Symbol={});po(t,e)||vo(t,e,{value:ho.f(e)})},yo=C,go=ae,_o=dt,bo=no,wo=function(){var e=go("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=_o("toPrimitive");t&&!t[n]&&bo(t,n,(function(e){return yo(r,this)}),{arity:1})},So=en,ko=Kr?{}.toString:function(){return"[object "+So(this)+"]"},Ro=Kr,To=Qt.f,xo=mr,Eo=qe,Lo=ko,Oo=dt("toStringTag"),Po=function(e,t,r,n){if(e){var i=r?e:e.prototype;Eo(i,Oo)||To(i,Oo,{configurable:!0,value:t}),n&&!Ro&&xo(i,"toString",Lo)}},Io=E,Co=i.WeakMap,Zo=Io(Co)&&/native code/.test(String(Co)),jo=i,Ao=ee,Do=mr,Vo=qe,Wo=Xe,Mo=Ti,Go=ii,Fo="Object already initialized",No=jo.TypeError,Uo=jo.WeakMap;if(Zo||Wo.state){var Xo=Wo.state||(Wo.state=new Uo);Xo.get=Xo.get,Xo.has=Xo.has,Xo.set=Xo.set,uo=function(e,t){if(Xo.has(e))throw No(Fo);return t.facade=e,Xo.set(e,t),t},lo=function(e){return Xo.get(e)||{}},co=function(e){return Xo.has(e)}}else{var Ho=Mo("state");Go[Ho]=!0,uo=function(e,t){if(Vo(e,Ho))throw No(Fo);return t.facade=e,Do(e,Ho,t),t},lo=function(e){return Vo(e,Ho)?e[Ho]:{}},co=function(e){return Vo(e,Ho)}}var Bo={set:uo,get:lo,has:co,enforce:function(e){return co(e)?lo(e):uo(e,{})},getterFor:function(e){return function(t){var r;if(!Ao(t)||(r=lo(t)).type!==e)throw No("Incompatible receiver, "+e+" required");return r}}},Ko=zt,Yo=X,Jo=Je,zo=Mr,Qo=xn,qo=m([].push),$o=function(e){var t=1==e,r=2==e,n=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(u,l,c,f){for(var d,p,h=Jo(u),v=Yo(h),m=Ko(l,c),y=zo(v),g=0,_=f||Qo,b=t?_(u,y):r||a?_(u,0):void 0;y>g;g++)if((s||g in v)&&(p=m(d=v[g],g,h),e))if(t)b[g]=p;else if(p)switch(e){case 3:return!0;case 5:return d;case 6:return g;case 2:qo(b,d)}else switch(e){case 4:return!1;case 7:qo(b,d)}return o?-1:n||i?i:b}},ea={forEach:$o(0),map:$o(1),filter:$o(2),some:$o(3),every:$o(4),find:$o(5),findIndex:$o(6),filterReject:$o(7)},ta=Lr,ra=i,na=C,ia=m,oa=O,aa=_e,sa=o,ua=qe,la=se,ca=rr,fa=Q,da=St,pa=Kn,ha=M,va=Mi,ma=hi,ya=Gi,ga=Ui,_a=to,ba=L,wa=Qt,Sa=Yn,ka=Z,Ra=no,Ta=oo,xa=Be,Ea=ii,La=nt,Oa=dt,Pa=ao,Ia=mo,Ca=wo,Za=Po,ja=Bo,Aa=ea.forEach,Da=Ti("hidden"),Va="Symbol",Wa="prototype",Ma=ja.set,Ga=ja.getterFor(Va),Fa=Object[Wa],Na=ra.Symbol,Ua=Na&&Na[Wa],Xa=ra.TypeError,Ha=ra.QObject,Ba=ba.f,Ka=wa.f,Ya=ga.f,Ja=ka.f,za=ia([].push),Qa=xa("symbols"),qa=xa("op-symbols"),$a=xa("wks"),es=!Ha||!Ha[Wa]||!Ha[Wa].findChild,ts=oa&&sa((function(){return 7!=va(Ka({},"a",{get:function(){return Ka(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=Ba(Fa,t);n&&delete Fa[t],Ka(e,t,r),n&&e!==Fa&&Ka(Fa,t,n)}:Ka,rs=function(e,t){var r=Qa[e]=va(Ua);return Ma(r,{type:Va,tag:e,description:t}),oa||(r.description=t),r},ns=function(e,t,r){e===Fa&&ns(qa,t,r),ca(e);var n=da(t);return ca(r),ua(Qa,n)?(r.enumerable?(ua(e,Da)&&e[Da][n]&&(e[Da][n]=!1),r=va(r,{enumerable:ha(0,!1)})):(ua(e,Da)||Ka(e,Da,ha(1,{})),e[Da][n]=!0),ts(e,n,r)):Ka(e,n,r)},is=function(e,t){ca(e);var r=fa(t),n=ma(r).concat(us(r));return Aa(n,(function(t){oa&&!na(os,r,t)||ns(e,t,r[t])})),e},os=function(e){var t=da(e),r=na(Ja,this,t);return!(this===Fa&&ua(Qa,t)&&!ua(qa,t))&&(!(r||!ua(this,t)||!ua(Qa,t)||ua(this,Da)&&this[Da][t])||r)},as=function(e,t){var r=fa(e),n=da(t);if(r!==Fa||!ua(Qa,n)||ua(qa,n)){var i=Ba(r,n);return!i||!ua(Qa,n)||ua(r,Da)&&r[Da][n]||(i.enumerable=!0),i}},ss=function(e){var t=Ya(fa(e)),r=[];return Aa(t,(function(e){ua(Qa,e)||ua(Ea,e)||za(r,e)})),r},us=function(e){var t=e===Fa,r=Ya(t?qa:fa(e)),n=[];return Aa(r,(function(e){!ua(Qa,e)||t&&!ua(Fa,e)||za(n,Qa[e])})),n};aa||(Na=function(){if(la(Ua,this))throw Xa("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?pa(arguments[0]):void 0,t=La(e),r=function(e){this===Fa&&na(r,qa,e),ua(this,Da)&&ua(this[Da],t)&&(this[Da][t]=!1),ts(this,t,ha(1,e))};return oa&&es&&ts(Fa,t,{configurable:!0,set:r}),rs(t,e)},Ra(Ua=Na[Wa],"toString",(function(){return Ga(this).tag})),Ra(Na,"withoutSetter",(function(e){return rs(La(e),e)})),ka.f=os,wa.f=ns,Sa.f=is,ba.f=as,ya.f=ga.f=ss,_a.f=us,Pa.f=function(e){return rs(Oa(e),e)},oa&&Ta(Ua,"description",{configurable:!0,get:function(){return Ga(this).description}})),ta({global:!0,constructor:!0,wrap:!0,forced:!aa,sham:!aa},{Symbol:Na}),Aa(ma($a),(function(e){Ia(e)})),ta({target:Va,stat:!0,forced:!aa},{useSetter:function(){es=!0},useSimple:function(){es=!1}}),ta({target:"Object",stat:!0,forced:!aa,sham:!oa},{create:function(e,t){return void 0===t?va(e):is(va(e),t)},defineProperty:ns,defineProperties:is,getOwnPropertyDescriptor:as}),ta({target:"Object",stat:!0,forced:!aa},{getOwnPropertyNames:ss}),Ca(),Za(Na,Va),Ea[Da]=!0;var ls=_e&&!!Symbol.for&&!!Symbol.keyFor,cs=Lr,fs=ae,ds=qe,ps=Kn,hs=Be,vs=ls,ms=hs("string-to-symbol-registry"),ys=hs("symbol-to-string-registry");cs({target:"Symbol",stat:!0,forced:!vs},{for:function(e){var t=ps(e);if(ds(ms,t))return ms[t];var r=fs("Symbol")(t);return ms[t]=r,ys[r]=t,r}});var gs=Lr,_s=qe,bs=Te,ws=Ee,Ss=ls,ks=Be("symbol-to-string-registry");gs({target:"Symbol",stat:!0,forced:!Ss},{keyFor:function(e){if(!bs(e))throw TypeError(ws(e)+" is not a symbol");if(_s(ks,e))return ks[e]}});var Rs=m([].slice),Ts=Pr,xs=E,Es=b,Ls=Kn,Os=m([].push),Ps=Lr,Is=ae,Cs=f,Zs=C,js=m,As=o,Ds=E,Vs=Te,Ws=Rs,Ms=function(e){if(xs(e))return e;if(Ts(e)){for(var t=e.length,r=[],n=0;n<t;n++){var i=e[n];"string"==typeof i?Os(r,i):"number"!=typeof i&&"Number"!=Es(i)&&"String"!=Es(i)||Os(r,Ls(i))}var o=r.length,a=!0;return function(e,t){if(a)return a=!1,t;if(Ts(this))return t;for(var n=0;n<o;n++)if(r[n]===e)return t}}},Gs=_e,Fs=String,Ns=Is("JSON","stringify"),Us=js(/./.exec),Xs=js("".charAt),Hs=js("".charCodeAt),Bs=js("".replace),Ks=js(1..toString),Ys=/[\uD800-\uDFFF]/g,Js=/^[\uD800-\uDBFF]$/,zs=/^[\uDC00-\uDFFF]$/,Qs=!Gs||As((function(){var e=Is("Symbol")();return"[null]"!=Ns([e])||"{}"!=Ns({a:e})||"{}"!=Ns(Object(e))})),qs=As((function(){return'"\\udf06\\ud834"'!==Ns("\udf06\ud834")||'"\\udead"'!==Ns("\udead")})),$s=function(e,t){var r=Ws(arguments),n=Ms(t);if(Ds(n)||void 0!==e&&!Vs(e))return r[1]=function(e,t){if(Ds(n)&&(t=Zs(n,this,Fs(e),t)),!Vs(t))return t},Cs(Ns,null,r)},eu=function(e,t,r){var n=Xs(r,t-1),i=Xs(r,t+1);return Us(Js,e)&&!Us(zs,i)||Us(zs,e)&&!Us(Js,n)?"\\u"+Ks(Hs(e,0),16):e};Ns&&Ps({target:"JSON",stat:!0,arity:3,forced:Qs||qs},{stringify:function(e,t,r){var n=Ws(arguments),i=Cs(Qs?$s:Ns,null,n);return qs&&"string"==typeof i?Bs(i,Ys,eu):i}});var tu=to,ru=Je;Lr({target:"Object",stat:!0,forced:!_e||o((function(){tu.f(1)}))},{getOwnPropertySymbols:function(e){var t=tu.f;return t?t(ru(e)):[]}}),mo("asyncIterator"),mo("hasInstance"),mo("isConcatSpreadable"),mo("iterator"),mo("match"),mo("matchAll"),mo("replace"),mo("search"),mo("species"),mo("split");var nu=wo;mo("toPrimitive"),nu();var iu=ae,ou=Po;mo("toStringTag"),ou(iu("Symbol"),"Symbol"),mo("unscopables"),Po(i.JSON,"JSON",!0);var au,su,uu,lu=te.Symbol,cu={},fu=O,du=qe,pu=Function.prototype,hu=fu&&Object.getOwnPropertyDescriptor,vu=du(pu,"name"),mu={EXISTS:vu,PROPER:vu&&"something"===function(){}.name,CONFIGURABLE:vu&&(!fu||fu&&hu(pu,"name").configurable)},yu=!o((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),gu=qe,_u=E,bu=Je,wu=yu,Su=Ti("IE_PROTO"),ku=Object,Ru=ku.prototype,Tu=wu?ku.getPrototypeOf:function(e){var t=bu(e);if(gu(t,Su))return t[Su];var r=t.constructor;return _u(r)&&t instanceof r?r.prototype:t instanceof ku?Ru:null},xu=o,Eu=E,Lu=ee,Ou=Mi,Pu=Tu,Iu=no,Cu=dt("iterator"),Zu=!1;[].keys&&("next"in(uu=[].keys())?(su=Pu(Pu(uu)))!==Object.prototype&&(au=su):Zu=!0);var ju=!Lu(au)||xu((function(){var e={};return au[Cu].call(e)!==e}));Eu((au=ju?{}:Ou(au))[Cu])||Iu(au,Cu,(function(){return this}));var Au={IteratorPrototype:au,BUGGY_SAFARI_ITERATORS:Zu},Du=Au.IteratorPrototype,Vu=Mi,Wu=M,Mu=Po,Gu=cu,Fu=function(){return this},Nu=function(e,t,r,n){var i=t+" Iterator";return e.prototype=Vu(Du,{next:Wu(+!n,r)}),Mu(e,i,!1,!0),Gu[i]=Fu,e},Uu=m,Xu=Ie,Hu=E,Bu=String,Ku=TypeError,Yu=function(e,t,r){try{return Uu(Xu(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(n){}},Ju=rr,zu=function(e){if("object"==typeof e||Hu(e))return e;throw Ku("Can't set "+Bu(e)+" as a prototype")},Qu=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=Yu(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(n){}return function(r,n){return Ju(r),zu(n),t?e(r,n):r.__proto__=n,r}}():void 0),qu=Lr,$u=C,el=mu,tl=Nu,rl=Tu,nl=Po,il=no,ol=cu,al=Au,sl=el.PROPER,ul=al.BUGGY_SAFARI_ITERATORS,ll=dt("iterator"),cl="keys",fl="values",dl="entries",pl=function(){return this},hl=function(e,t,r,n,i,o,a){tl(r,t,n);var s,u,l,c=function(e){if(e===i&&v)return v;if(!ul&&e in p)return p[e];switch(e){case cl:case fl:case dl:return function(){return new r(this,e)}}return function(){return new r(this)}},f=t+" Iterator",d=!1,p=e.prototype,h=p[ll]||p["@@iterator"]||i&&p[i],v=!ul&&h||c(i),m="Array"==t&&p.entries||h;if(m&&(s=rl(m.call(new e)))!==Object.prototype&&s.next&&(nl(s,f,!0,!0),ol[f]=pl),sl&&i==fl&&h&&h.name!==fl&&(d=!0,v=function(){return $u(h,this)}),i)if(u={values:c(fl),keys:o?v:c(cl),entries:c(dl)},a)for(l in u)(ul||d||!(l in p))&&il(p,l,u[l]);else qu({target:t,proto:!0,forced:ul||d},u);return a&&p[ll]!==v&&il(p,ll,v,{name:i}),ol[t]=v,u},vl=function(e,t){return{value:e,done:t}},ml=Q,yl=cu,gl=Bo;Qt.f;var _l=hl,bl=vl,wl="Array Iterator",Sl=gl.set,kl=gl.getterFor(wl);_l(Array,"Array",(function(e,t){Sl(this,{type:wl,target:ml(e),index:0,kind:t})}),(function(){var e=kl(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,bl(void 0,!0)):bl("keys"==r?n:"values"==r?t[n]:[n,t[n]],!1)}),"values"),yl.Arguments=yl.Array;var Rl={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=i,xl=en,El=mr,Ll=cu,Ol=dt("toStringTag");for(var Pl in Rl){var Il=Tl[Pl],Cl=Il&&Il.prototype;Cl&&xl(Cl)!==Ol&&El(Cl,Ol,Pl),Ll[Pl]=Ll.Array}var Zl=lu;mo("dispose");var jl=Zl;mo("asyncDispose");var Al=Lr,Dl=m,Vl=ae("Symbol"),Wl=Vl.keyFor,Ml=Dl(Vl.prototype.valueOf);Al({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==Wl(Ml(e))}catch(t){return!1}}});for(var Gl=Lr,Fl=Be,Nl=ae,Ul=m,Xl=Te,Hl=dt,Bl=Nl("Symbol"),Kl=Bl.isWellKnown,Yl=Nl("Object","getOwnPropertyNames"),Jl=Ul(Bl.prototype.valueOf),zl=Fl("wks"),Ql=0,ql=Yl(Bl),$l=ql.length;Ql<$l;Ql++)try{var ec=ql[Ql];Xl(Bl[ec])&&Hl(ec)}catch(PC){}Gl({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if(Kl&&Kl(e))return!0;try{for(var t=Jl(e),r=0,n=Yl(zl),i=n.length;r<i;r++)if(zl[n[r]]==t)return!0}catch(PC){}return!1}}),mo("matcher"),mo("metadataKey"),mo("observable"),mo("metadata"),mo("patternMatch"),mo("replaceAll");var tc=jl,rc=r(tc),nc=m,ic=jr,oc=Kn,ac=Y,sc=nc("".charAt),uc=nc("".charCodeAt),lc=nc("".slice),cc=function(e){return function(t,r){var n,i,o=oc(ac(t)),a=ic(r),s=o.length;return a<0||a>=s?e?"":void 0:(n=uc(o,a))<55296||n>56319||a+1===s||(i=uc(o,a+1))<56320||i>57343?e?sc(o,a):n:e?lc(o,a,a+2):i-56320+(n-55296<<10)+65536}},fc={codeAt:cc(!1),charAt:cc(!0)},dc=fc.charAt,pc=Kn,hc=Bo,vc=hl,mc=vl,yc="String Iterator",gc=hc.set,_c=hc.getterFor(yc);vc(String,"String",(function(e){gc(this,{type:yc,string:pc(e),index:0})}),(function(){var e,t=_c(this),r=t.string,n=t.index;return n>=r.length?mc(void 0,!0):(e=dc(r,n),t.index+=e.length,mc(e,!1))}));var bc=ao.f("iterator"),wc=r(bc);function Sc(e){return(Sc="function"==typeof rc&&"symbol"==typeof wc?function(e){return typeof e}:function(e){return e&&"function"==typeof rc&&e.constructor===rc&&e!==rc.prototype?"symbol":typeof e})(e)}var kc=r(tc),Rc=en,Tc=je,xc=H,Ec=cu,Lc=dt("iterator"),Oc=function(e){if(!xc(e))return Tc(e,Lc)||Tc(e,"@@iterator")||Ec[Rc(e)]},Pc=r(Oc),Ic=Je,Cc=hi;Lr({target:"Object",stat:!0,forced:o((function(){Cc(1)}))},{keys:function(e){return Cc(Ic(e))}});var Zc=r(te.Object.keys),jc=r(te.Object.getOwnPropertySymbols),Ac=ea.filter;Lr({target:"Array",proto:!0,forced:!Pn("filter")},{filter:function(e){return Ac(this,e,arguments.length>1?arguments[1]:void 0)}});var Dc=te,Vc=function(e){return Dc[e+"Prototype"]},Wc=Vc("Array").filter,Mc=se,Gc=Wc,Fc=Array.prototype,Nc=r((function(e){var t=e.filter;return e===Fc||Mc(Fc,e)&&t===Fc.filter?Gc:t})),Uc={exports:{}},Xc=Lr,Hc=o,Bc=Q,Kc=L.f,Yc=O;Xc({target:"Object",stat:!0,forced:!Yc||Hc((function(){Kc(1)})),sham:!Yc},{getOwnPropertyDescriptor:function(e,t){return Kc(Bc(e),t)}});var Jc=te.Object,zc=Uc.exports=function(e,t){return Jc.getOwnPropertyDescriptor(e,t)};Jc.getOwnPropertyDescriptor.sham&&(zc.sham=!0);var Qc=r(Uc.exports),qc=o,$c=function(e,t){var r=[][e];return!!r&&qc((function(){r.call(null,t||function(){return 1},1)}))},ef=ea.forEach,tf=$c("forEach")?[].forEach:function(e){return ef(this,e,arguments.length>1?arguments[1]:void 0)};Lr({target:"Array",proto:!0,forced:[].forEach!=tf},{forEach:tf});var rf=Vc("Array").forEach,nf=en,of=qe,af=se,sf=rf,uf=Array.prototype,lf={DOMTokenList:!0,NodeList:!0},cf=r((function(e){var t=e.forEach;return e===uf||af(uf,e)&&t===uf.forEach||of(lf,nf(e))?sf:t})),ff=ae,df=Gi,pf=to,hf=rr,vf=m([].concat),mf=ff("Reflect","ownKeys")||function(e){var t=df.f(hf(e)),r=pf.f;return r?vf(t,r(e)):t},yf=mf,gf=Q,_f=L,bf=Hr;Lr({target:"Object",stat:!0,sham:!O},{getOwnPropertyDescriptors:function(e){for(var t,r,n=gf(e),i=_f.f,o=yf(n),a={},s=0;o.length>s;)void 0!==(r=i(n,t=o[s++]))&&bf(a,t,r);return a}});var wf=r(te.Object.getOwnPropertyDescriptors),Sf={exports:{}},kf=Lr,Rf=O,Tf=Yn.f;kf({target:"Object",stat:!0,forced:Object.defineProperties!==Tf,sham:!Rf},{defineProperties:Tf});var xf=te.Object,Ef=Sf.exports=function(e,t){return xf.defineProperties(e,t)};xf.defineProperties.sham&&(Ef.sham=!0);var Lf=r(Sf.exports),Of={exports:{}},Pf=Lr,If=O,Cf=Qt.f;Pf({target:"Object",stat:!0,forced:Object.defineProperty!==Cf,sham:!If},{defineProperty:Cf});var Zf=te.Object,jf=Of.exports=function(e,t,r){return Zf.defineProperty(e,t,r)};Zf.defineProperty.sham&&(jf.sham=!0);var Af=r(Of.exports);Lr({target:"Object",stat:!0,sham:!O},{create:Mi});var Df=te.Object,Vf=r((function(e,t){return Df.create(e,t)})),Wf=Je,Mf=Tu,Gf=yu;Lr({target:"Object",stat:!0,forced:o((function(){Mf(1)})),sham:!Gf},{getPrototypeOf:function(e){return Mf(Wf(e))}});var Ff=r(te.Object.getPrototypeOf);Lr({target:"Object",stat:!0},{setPrototypeOf:Qu});var Nf=r(te.Object.setPrototypeOf),Uf=qe,Xf=mf,Hf=L,Bf=Qt,Kf=ee,Yf=mr,Jf=Error,zf=m("".replace),Qf=String(Jf("zxcasd").stack),qf=/\n\s*at [^:]*:[^\n]*/,$f=qf.test(Qf),ed=M,td=!o((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",ed(1,7)),7!==e.stack)})),rd=mr,nd=function(e,t){if($f&&"string"==typeof e&&!Jf.prepareStackTrace)for(;t--;)e=zf(e,qf,"");return e},id=td,od=Error.captureStackTrace,ad=cu,sd=dt("iterator"),ud=Array.prototype,ld=function(e){return void 0!==e&&(ad.Array===e||ud[sd]===e)},cd=C,fd=Ie,dd=rr,pd=Ee,hd=Oc,vd=TypeError,md=function(e,t){var r=arguments.length<2?hd(e):t;if(fd(r))return dd(cd(r,e));throw vd(pd(e)+" is not iterable")},yd=C,gd=rr,_d=je,bd=function(e,t,r){var n,i;gd(e);try{if(!(n=_d(e,"return"))){if("throw"===t)throw r;return r}n=yd(n,e)}catch(PC){i=!0,n=PC}if("throw"===t)throw r;if(i)throw n;return gd(n),r},wd=zt,Sd=C,kd=rr,Rd=Ee,Td=ld,xd=Mr,Ed=se,Ld=md,Od=Oc,Pd=bd,Id=TypeError,Cd=function(e,t){this.stopped=e,this.result=t},Zd=Cd.prototype,jd=function(e,t,r){var n,i,o,a,s,u,l,c=r&&r.that,f=!(!r||!r.AS_ENTRIES),d=!(!r||!r.IS_RECORD),p=!(!r||!r.IS_ITERATOR),h=!(!r||!r.INTERRUPTED),v=wd(t,c),m=function(e){return n&&Pd(n,"normal",e),new Cd(!0,e)},y=function(e){return f?(kd(e),h?v(e[0],e[1],m):v(e[0],e[1])):h?v(e,m):v(e)};if(d)n=e.iterator;else if(p)n=e;else{if(!(i=Od(e)))throw Id(Rd(e)+" is not iterable");if(Td(i)){for(o=0,a=xd(e);a>o;o++)if((s=y(e[o]))&&Ed(Zd,s))return s;return new Cd(!1)}n=Ld(e,i)}for(u=d?e.next:n.next;!(l=Sd(u,n)).done;){try{s=y(l.value)}catch(PC){Pd(n,"throw",PC)}if("object"==typeof s&&s&&Ed(Zd,s))return s}return new Cd(!1)},Ad=Kn,Dd=Lr,Vd=se,Wd=Tu,Md=Qu,Gd=function(e,t,r){for(var n=Xf(t),i=Bf.f,o=Hf.f,a=0;a<n.length;a++){var s=n[a];Uf(e,s)||r&&Uf(r,s)||i(e,s,o(t,s))}},Fd=Mi,Nd=mr,Ud=M,Xd=function(e,t){Kf(t)&&"cause"in t&&Yf(e,"cause",t.cause)},Hd=function(e,t,r,n){id&&(od?od(e,t):rd(e,"stack",nd(r,n)))},Bd=jd,Kd=function(e,t){return void 0===e?arguments.length<2?"":t:Ad(e)},Yd=dt("toStringTag"),Jd=Error,zd=[].push,Qd=function(e,t){var r,n=Vd(qd,this);Md?r=Md(Jd(),n?Wd(this):qd):(r=n?this:Fd(qd),Nd(r,Yd,"Error")),void 0!==t&&Nd(r,"message",Kd(t)),Hd(r,Qd,r.stack,1),arguments.length>2&&Xd(r,arguments[2]);var i=[];return Bd(e,zd,{that:i}),Nd(r,"errors",i),r};Md?Md(Qd,Jd):Gd(Qd,Jd,{name:!0});var qd=Qd.prototype=Fd(Jd.prototype,{constructor:Ud(1,Qd),message:Ud(1,""),name:Ud(1,"AggregateError")});Dd({global:!0,constructor:!0,arity:2},{AggregateError:Qd});var $d,ep,tp,rp,np="undefined"!=typeof process&&"process"==b(process),ip=ae,op=oo,ap=O,sp=dt("species"),up=function(e){var t=ip(e);ap&&t&&!t[sp]&&op(t,sp,{configurable:!0,get:function(){return this}})},lp=se,cp=TypeError,fp=function(e,t){if(lp(t,e))return e;throw cp("Incorrect invocation")},dp=_n,pp=Ee,hp=TypeError,vp=function(e){if(dp(e))return e;throw hp(pp(e)+" is not a constructor")},mp=rr,yp=vp,gp=H,_p=dt("species"),bp=function(e,t){var r,n=mp(e).constructor;return void 0===n||gp(r=mp(n)[_p])?t:yp(r)},wp=TypeError,Sp=function(e,t){if(e<t)throw wp("Not enough arguments");return e},kp=/(?:ipad|iphone|ipod).*applewebkit/i.test(ue),Rp=i,Tp=f,xp=zt,Ep=E,Lp=qe,Op=o,Pp=Si,Ip=Rs,Cp=xt,Zp=Sp,jp=kp,Ap=np,Dp=Rp.setImmediate,Vp=Rp.clearImmediate,Wp=Rp.process,Mp=Rp.Dispatch,Gp=Rp.Function,Fp=Rp.MessageChannel,Np=Rp.String,Up=0,Xp={},Hp="onreadystatechange";Op((function(){$d=Rp.location}));var Bp=function(e){if(Lp(Xp,e)){var t=Xp[e];delete Xp[e],t()}},Kp=function(e){return function(){Bp(e)}},Yp=function(e){Bp(e.data)},Jp=function(e){Rp.postMessage(Np(e),$d.protocol+"//"+$d.host)};Dp&&Vp||(Dp=function(e){Zp(arguments.length,1);var t=Ep(e)?e:Gp(e),r=Ip(arguments,1);return Xp[++Up]=function(){Tp(t,void 0,r)},ep(Up),Up},Vp=function(e){delete Xp[e]},Ap?ep=function(e){Wp.nextTick(Kp(e))}:Mp&&Mp.now?ep=function(e){Mp.now(Kp(e))}:Fp&&!jp?(rp=(tp=new Fp).port2,tp.port1.onmessage=Yp,ep=xp(rp.postMessage,rp)):Rp.addEventListener&&Ep(Rp.postMessage)&&!Rp.importScripts&&$d&&"file:"!==$d.protocol&&!Op(Jp)?(ep=Jp,Rp.addEventListener("message",Yp,!1)):ep=Hp in Cp("script")?function(e){Pp.appendChild(Cp("script"))[Hp]=function(){Pp.removeChild(this),Bp(e)}}:function(e){setTimeout(Kp(e),0)});var zp={set:Dp,clear:Vp},Qp=function(){this.head=null,this.tail=null};Qp.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var qp,$p,eh,th,rh,nh=Qp,ih=/ipad|iphone|ipod/i.test(ue)&&"undefined"!=typeof Pebble,oh=/web0s(?!.*chrome)/i.test(ue),ah=i,sh=zt,uh=L.f,lh=zp.set,ch=nh,fh=kp,dh=ih,ph=oh,hh=np,vh=ah.MutationObserver||ah.WebKitMutationObserver,mh=ah.document,yh=ah.process,gh=ah.Promise,_h=uh(ah,"queueMicrotask"),bh=_h&&_h.value;if(!bh){var wh=new ch,Sh=function(){var e,t;for(hh&&(e=yh.domain)&&e.exit();t=wh.get();)try{t()}catch(PC){throw wh.head&&qp(),PC}e&&e.enter()};fh||hh||ph||!vh||!mh?!dh&&gh&&gh.resolve?((th=gh.resolve(void 0)).constructor=gh,rh=sh(th.then,th),qp=function(){rh(Sh)}):hh?qp=function(){yh.nextTick(Sh)}:(lh=sh(lh,ah),qp=function(){lh(Sh)}):($p=!0,eh=mh.createTextNode(""),new vh(Sh).observe(eh,{characterData:!0}),qp=function(){eh.data=$p=!$p}),bh=function(e){wh.head||qp(),wh.add(e)}}var kh=bh,Rh=function(e){try{return{error:!1,value:e()}}catch(PC){return{error:!0,value:PC}}},Th=i.Promise,xh="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Eh=!xh&&!np&&"object"==typeof window&&"object"==typeof document,Lh=i,Oh=Th,Ph=E,Ih=Bt,Ch=on,Zh=dt,jh=Eh,Ah=xh,Dh=ve,Vh=Oh&&Oh.prototype,Wh=Zh("species"),Mh=!1,Gh=Ph(Lh.PromiseRejectionEvent),Fh={CONSTRUCTOR:Ih("Promise",(function(){var e=Ch(Oh),t=e!==String(Oh);if(!t&&66===Dh)return!0;if(!Vh.catch||!Vh.finally)return!0;if(!Dh||Dh<51||!/native code/.test(e)){var r=new Oh((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[Wh]=n,!(Mh=r.then((function(){}))instanceof n))return!0}return!t&&(jh||Ah)&&!Gh})),REJECTION_EVENT:Gh,SUBCLASSING:Mh},Nh={},Uh=Ie,Xh=TypeError,Hh=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw Xh("Bad Promise constructor");t=e,r=n})),this.resolve=Uh(t),this.reject=Uh(r)};Nh.f=function(e){return new Hh(e)};var Bh,Kh,Yh=Lr,Jh=np,zh=i,Qh=C,qh=no,$h=Po,ev=up,tv=Ie,rv=E,nv=ee,iv=fp,ov=bp,av=zp.set,sv=kh,uv=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(PC){}},lv=Rh,cv=nh,fv=Bo,dv=Th,pv=Fh,hv=Nh,vv="Promise",mv=pv.CONSTRUCTOR,yv=pv.REJECTION_EVENT,gv=fv.getterFor(vv),_v=fv.set,bv=dv&&dv.prototype,wv=dv,Sv=bv,kv=zh.TypeError,Rv=zh.document,Tv=zh.process,xv=hv.f,Ev=xv,Lv=!!(Rv&&Rv.createEvent&&zh.dispatchEvent),Ov="unhandledrejection",Pv=function(e){var t;return!(!nv(e)||!rv(t=e.then))&&t},Iv=function(e,t){var r,n,i,o=t.value,a=1==t.state,s=a?e.ok:e.fail,u=e.resolve,l=e.reject,c=e.domain;try{s?(a||(2===t.rejection&&Dv(t),t.rejection=1),!0===s?r=o:(c&&c.enter(),r=s(o),c&&(c.exit(),i=!0)),r===e.promise?l(kv("Promise-chain cycle")):(n=Pv(r))?Qh(n,r,u,l):u(r)):l(o)}catch(PC){c&&!i&&c.exit(),l(PC)}},Cv=function(e,t){e.notified||(e.notified=!0,sv((function(){for(var r,n=e.reactions;r=n.get();)Iv(r,e);e.notified=!1,t&&!e.rejection&&jv(e)})))},Zv=function(e,t,r){var n,i;Lv?((n=Rv.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),zh.dispatchEvent(n)):n={promise:t,reason:r},!yv&&(i=zh["on"+e])?i(n):e===Ov&&uv("Unhandled promise rejection",r)},jv=function(e){Qh(av,zh,(function(){var t,r=e.facade,n=e.value;if(Av(e)&&(t=lv((function(){Jh?Tv.emit("unhandledRejection",n,r):Zv(Ov,r,n)})),e.rejection=Jh||Av(e)?2:1,t.error))throw t.value}))},Av=function(e){return 1!==e.rejection&&!e.parent},Dv=function(e){Qh(av,zh,(function(){var t=e.facade;Jh?Tv.emit("rejectionHandled",t):Zv("rejectionhandled",t,e.value)}))},Vv=function(e,t,r){return function(n){e(t,n,r)}},Wv=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,Cv(e,!0))},Mv=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw kv("Promise can't be resolved itself");var n=Pv(t);n?sv((function(){var r={done:!1};try{Qh(n,t,Vv(Mv,r,e),Vv(Wv,r,e))}catch(PC){Wv(r,PC,e)}})):(e.value=t,e.state=1,Cv(e,!1))}catch(PC){Wv({done:!1},PC,e)}}};mv&&(Sv=(wv=function(e){iv(this,Sv),tv(e),Qh(Bh,this);var t=gv(this);try{e(Vv(Mv,t),Vv(Wv,t))}catch(PC){Wv(t,PC)}}).prototype,(Bh=function(e){_v(this,{type:vv,done:!1,notified:!1,parent:!1,reactions:new cv,rejection:!1,state:0,value:void 0})}).prototype=qh(Sv,"then",(function(e,t){var r=gv(this),n=xv(ov(this,wv));return r.parent=!0,n.ok=!rv(e)||e,n.fail=rv(t)&&t,n.domain=Jh?Tv.domain:void 0,0==r.state?r.reactions.add(n):sv((function(){Iv(n,r)})),n.promise})),Kh=function(){var e=new Bh,t=gv(e);this.promise=e,this.resolve=Vv(Mv,t),this.reject=Vv(Wv,t)},hv.f=xv=function(e){return e===wv||undefined===e?new Kh(e):Ev(e)}),Yh({global:!0,constructor:!0,wrap:!0,forced:mv},{Promise:wv}),$h(wv,vv,!1,!0),ev(vv);var Gv=dt("iterator"),Fv=!1;try{var Nv=0,Uv={next:function(){return{done:!!Nv++}},return:function(){Fv=!0}};Uv[Gv]=function(){return this},Array.from(Uv,(function(){throw 2}))}catch(PC){}var Xv=function(e,t){if(!t&&!Fv)return!1;var r=!1;try{var n={};n[Gv]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(PC){}return r},Hv=Th,Bv=Fh.CONSTRUCTOR||!Xv((function(e){Hv.all(e).then(void 0,(function(){}))})),Kv=C,Yv=Ie,Jv=Nh,zv=Rh,Qv=jd;Lr({target:"Promise",stat:!0,forced:Bv},{all:function(e){var t=this,r=Jv.f(t),n=r.resolve,i=r.reject,o=zv((function(){var r=Yv(t.resolve),o=[],a=0,s=1;Qv(e,(function(e){var u=a++,l=!1;s++,Kv(r,t,e).then((function(e){l||(l=!0,o[u]=e,--s||n(o))}),i)})),--s||n(o)}));return o.error&&i(o.value),r.promise}});var qv=Lr,$v=Fh.CONSTRUCTOR;Th&&Th.prototype,qv({target:"Promise",proto:!0,forced:$v,real:!0},{catch:function(e){return this.then(void 0,e)}});var em=C,tm=Ie,rm=Nh,nm=Rh,im=jd;Lr({target:"Promise",stat:!0,forced:Bv},{race:function(e){var t=this,r=rm.f(t),n=r.reject,i=nm((function(){var i=tm(t.resolve);im(e,(function(e){em(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}});var om=C,am=Nh;Lr({target:"Promise",stat:!0,forced:Fh.CONSTRUCTOR},{reject:function(e){var t=am.f(this);return om(t.reject,void 0,e),t.promise}});var sm=rr,um=ee,lm=Nh,cm=function(e,t){if(sm(e),um(t)&&t.constructor===e)return t;var r=lm.f(e);return(0,r.resolve)(t),r.promise},fm=Lr,dm=Th,pm=Fh.CONSTRUCTOR,hm=cm,vm=ae("Promise"),mm=!pm;fm({target:"Promise",stat:!0,forced:true},{resolve:function(e){return hm(mm&&this===vm?dm:this,e)}});var ym=C,gm=Ie,_m=Nh,bm=Rh,wm=jd;Lr({target:"Promise",stat:!0,forced:Bv},{allSettled:function(e){var t=this,r=_m.f(t),n=r.resolve,i=r.reject,o=bm((function(){var r=gm(t.resolve),i=[],o=0,a=1;wm(e,(function(e){var s=o++,u=!1;a++,ym(r,t,e).then((function(e){u||(u=!0,i[s]={status:"fulfilled",value:e},--a||n(i))}),(function(e){u||(u=!0,i[s]={status:"rejected",reason:e},--a||n(i))}))})),--a||n(i)}));return o.error&&i(o.value),r.promise}});var Sm=C,km=Ie,Rm=ae,Tm=Nh,xm=Rh,Em=jd,Lm="No one promise resolved";Lr({target:"Promise",stat:!0,forced:Bv},{any:function(e){var t=this,r=Rm("AggregateError"),n=Tm.f(t),i=n.resolve,o=n.reject,a=xm((function(){var n=km(t.resolve),a=[],s=0,u=1,l=!1;Em(e,(function(e){var c=s++,f=!1;u++,Sm(n,t,e).then((function(e){f||l||(l=!0,i(e))}),(function(e){f||l||(f=!0,a[c]=e,--u||o(new r(a,Lm)))}))})),--u||o(new r(a,Lm))}));return a.error&&o(a.value),n.promise}});var Om=Lr,Pm=Th,Im=o,Cm=ae,Zm=E,jm=bp,Am=cm,Dm=Pm&&Pm.prototype;Om({target:"Promise",proto:!0,real:!0,forced:!!Pm&&Im((function(){Dm.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=jm(this,Cm("Promise")),r=Zm(e);return this.then(r?function(r){return Am(t,e()).then((function(){return r}))}:e,r?function(r){return Am(t,e()).then((function(){throw r}))}:e)}});var Vm=te.Promise,Wm=Nh,Mm=Rh;Lr({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=Wm.f(this),r=Mm(e);return(r.error?t.reject:t.resolve)(r.value),t.promise}});var Gm=r(Vm),Fm=Lr,Nm=Pr,Um=m([].reverse),Xm=[1,2];Fm({target:"Array",proto:!0,forced:String(Xm)===String(Xm.reverse())},{reverse:function(){return Nm(this)&&(this.length=this.length),Um(this)}});var Hm=Vc("Array").reverse,Bm=se,Km=Hm,Ym=Array.prototype,Jm=r((function(e){var t=e.reverse;return e===Ym||Bm(Ym,e)&&t===Ym.reverse?Km:t})),zm=Lr,Qm=Pr,qm=_n,$m=ee,ey=qn,ty=Mr,ry=Q,ny=Hr,iy=dt,oy=Rs,ay=Pn("slice"),sy=iy("species"),uy=Array,ly=Math.max;zm({target:"Array",proto:!0,forced:!ay},{slice:function(e,t){var r,n,i,o=ry(this),a=ty(o),s=ey(e,a),u=ey(void 0===t?a:t,a);if(Qm(o)&&(r=o.constructor,(qm(r)&&(r===uy||Qm(r.prototype))||$m(r)&&null===(r=r[sy]))&&(r=void 0),r===uy||void 0===r))return oy(o,s,u);for(n=new(void 0===r?uy:r)(ly(u-s,0)),i=0;s<u;s++,i++)s in o&&ny(n,i,o[s]);return n.length=i,n}});var cy=Vc("Array").slice,fy=se,dy=cy,py=Array.prototype,hy=r((function(e){var t=e.slice;return e===py||fy(py,e)&&t===py.slice?dy:t})),vy=m,my=Ie,yy=ee,gy=qe,_y=Rs,by=a,wy=Function,Sy=vy([].concat),ky=vy([].join),Ry={},Ty=by?wy.bind:function(e){var t=my(this),r=t.prototype,n=_y(arguments,1),i=function(){var r=Sy(n,_y(arguments));return this instanceof i?function(e,t,r){if(!gy(Ry,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";Ry[t]=wy("C,a","return new C("+ky(n,",")+")")}return Ry[t](e,r)}(t,r.length,r):t.apply(e,r)};return yy(r)&&(i.prototype=r),i},xy=Ty;Lr({target:"Function",proto:!0,forced:Function.bind!==xy},{bind:xy});var Ey=Vc("Function").bind,Ly=se,Oy=Ey,Py=Function.prototype,Iy=r((function(e){var t=e.bind;return e===Py||Ly(Py,e)&&t===Py.bind?Oy:t})),Cy=Lr,Zy=f,jy=Ty,Ay=vp,Dy=rr,Vy=ee,Wy=Mi,My=o,Gy=ae("Reflect","construct"),Fy=Object.prototype,Ny=[].push,Uy=My((function(){function e(){}return!(Gy((function(){}),[],e)instanceof e)})),Xy=!My((function(){Gy((function(){}))})),Hy=Uy||Xy;Cy({target:"Reflect",stat:!0,forced:Hy,sham:Hy},{construct:function(e,t){Ay(e),Dy(t);var r=arguments.length<3?e:Ay(arguments[2]);if(Xy&&!Uy)return Gy(e,t,r);if(e==r){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];return Zy(Ny,n,t),new(Zy(jy,e,n))}var i=r.prototype,o=Wy(Vy(i)?i:Fy),a=Zy(e,o,t);return Vy(a)?a:o}});var By=r(te.Reflect.construct),Ky=Lr,Yy=ni.indexOf,Jy=$c,zy=k([].indexOf),Qy=!!zy&&1/zy([1],1,-0)<0;Ky({target:"Array",proto:!0,forced:Qy||!Jy("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return Qy?zy(this,e,t)||0:Yy(this,e,t)}});var qy=Vc("Array").indexOf,$y=se,eg=qy,tg=Array.prototype,rg=r((function(e){var t=e.indexOf;return e===tg||$y(tg,e)&&t===tg.indexOf?eg:t}));Lr({target:"Array",stat:!0},{isArray:Pr});var ng=r(te.Array.isArray),ig=rr,og=bd,ag=zt,sg=C,ug=Je,lg=function(e,t,r,n){try{return n?t(ig(r)[0],r[1]):t(r)}catch(PC){og(e,"throw",PC)}},cg=ld,fg=_n,dg=Mr,pg=Hr,hg=md,vg=Oc,mg=Array,yg=function(e){var t=ug(e),r=fg(this),n=arguments.length,i=n>1?arguments[1]:void 0,o=void 0!==i;o&&(i=ag(i,n>2?arguments[2]:void 0));var a,s,u,l,c,f,d=vg(t),p=0;if(!d||this===mg&&cg(d))for(a=dg(t),s=r?new this(a):mg(a);a>p;p++)f=o?i(t[p],p):t[p],pg(s,p,f);else for(c=(l=hg(t,d)).next,s=r?new this:[];!(u=sg(c,l)).done;p++)f=o?lg(l,i,[u.value,p],!0):u.value,pg(s,p,f);return s.length=p,s},gg=yg;Lr({target:"Array",stat:!0,forced:!Xv((function(e){Array.from(e)}))},{from:gg});var _g=r(te.Array.from),bg=r(ao.f("toPrimitive"));function wg(e,t){var r=Zc(e);if(jc){var n=jc(e);t&&(n=Nc(n).call(n,(function(t){return Qc(e,t).enumerable}))),r.push.apply(r,n)}return r}function Sg(e){for(var t=1;t<arguments.length;t++){var r,n,i=null!=arguments[t]?arguments[t]:{};t%2?cf(r=wg(Object(i),!0)).call(r,(function(t){Og(e,t,i[t])})):wf?Lf(e,wf(i)):cf(n=wg(Object(i))).call(n,(function(t){Af(e,t,Qc(i,t))}))}return e}function kg(){kg=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Af||function(e,t,r){e[t]=r.value},i="function"==typeof kc?kc:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Af(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(E){u=function(e,t,r){return e[t]=r}}function l(e,t,r,i){var o=t&&t.prototype instanceof d?t:d,a=Vf(o.prototype),s=new R(i||[]);return n(a,"_invoke",{value:b(e,r,s)}),a}function c(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(E){return{type:"throw",arg:E}}}e.wrap=l;var f={};function d(){}function p(){}function h(){}var v={};u(v,o,(function(){return this}));var m=Ff&&Ff(Ff(T([])));m&&m!==t&&r.call(m,o)&&(v=m);var y=h.prototype=d.prototype=Vf(v);function g(e){var t;cf(t=["next","throw","return"]).call(t,(function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(n,o,a,s){var u=c(e[n],e,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==Sc(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return i("throw",e,a,s)}))}s(u.arg)}var o;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return o=o?o.then(n,n):n()}})}function b(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=w(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=c(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var i=c(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,f;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],cf(e).call(e,S,this),this.reset(!0)}function T(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:x}}function x(){return{value:void 0,done:!0}}return p.prototype=h,n(y,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:p,configurable:!0}),p.displayName=u(h,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Nf?Nf(e,h):(e.__proto__=h,u(e,s,"GeneratorFunction")),e.prototype=Vf(y),e},e.awrap=function(e){return{__await:e}},g(_.prototype),u(_.prototype,a,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,i,o){void 0===o&&(o=Gm);var a=new _(l(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(y),u(y,s,"Generator"),u(y,o,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return Jm(r).call(r),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=T,R.prototype={constructor:R,reset:function(e){var t;if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,cf(t=this.tryEntries).call(t,k),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+hy(n).call(n,1))&&(this[n]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),k(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;k(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:T(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function Rg(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(PC){return void r(PC)}s.done?t(u):Gm.resolve(u).then(n,i)}function Tg(e){return function(){var t=this,r=arguments;return new Gm((function(n,i){var o=e.apply(t,r);function a(e){Rg(o,n,i,a,s,"next",e)}function s(e){Rg(o,n,i,a,s,"throw",e)}a(void 0)}))}}function xg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Eg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Af(e,Gg(n.key),n)}}function Lg(e,t,r){return t&&Eg(e.prototype,t),r&&Eg(e,r),Af(e,"prototype",{writable:!1}),e}function Og(e,t,r){return(t=Gg(t))in e?Af(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Pg(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Vf(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Af(e,"prototype",{writable:!1}),t&&Cg(e,t)}function Ig(e){var t;return(Ig=Nf?Iy(t=Ff).call(t):function(e){return e.__proto__||Ff(e)})(e)}function Cg(e,t){var r;return(Cg=Nf?Iy(r=Nf).call(r):function(e,t){return e.__proto__=t,e})(e,t)}function Zg(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Zc(e);for(n=0;n<o.length;n++)r=o[n],rg(t).call(t,r)>=0||(i[r]=e[r]);return i}(e,t);if(jc){var o=jc(e);for(n=0;n<o.length;n++)r=o[n],rg(t).call(t,r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function jg(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ag(e){var t=function(){if("undefined"==typeof Reflect||!By)return!1;if(By.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(By(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ig(e);if(t){var i=Ig(this).constructor;r=By(n,arguments,i)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===Sc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return jg(e)}(this,r)}}function Dg(e,t){return function(e){if(ng(e))return e}(e)||function(e,t){var r=null==e?null:void 0!==kc&&Pc(e)||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,l=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||Wg(e,t)||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 Vg(e){return function(e){if(ng(e))return Mg(e)}(e)||function(e){if(void 0!==kc&&null!=Pc(e)||null!=e["@@iterator"])return _g(e)}(e)||Wg(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wg(e,t){var r;if(e){if("string"==typeof e)return Mg(e,t);var n=hy(r=Object.prototype.toString.call(e)).call(r,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?_g(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mg(e,t):void 0}}function Mg(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Gg(e){var t=function(e,t){if("object"!==Sc(e)||null===e)return e;var r=e[bg];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Sc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Sc(t)?t:String(t)}var Fg,Ng=Vc("Array").concat,Ug=se,Xg=Ng,Hg=Array.prototype,Bg=r((function(e){var t=e.concat;return e===Hg||Ug(Hg,e)&&t===Hg.concat?Xg:t})),Kg="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,Yg=i,Jg=f,zg=E,Qg=Kg,qg=ue,$g=Rs,e_=Sp,t_=Yg.Function,r_=/MSIE .\./.test(qg)||Qg&&((Fg=Yg.Bun.version.split(".")).length<3||0==Fg[0]&&(Fg[1]<3||3==Fg[1]&&0==Fg[2])),n_=function(e,t){var r=t?2:1;return r_?function(n,i){var o=e_(arguments.length,1)>r,a=zg(n)?n:t_(n),s=o?$g(arguments,r):[],u=o?function(){Jg(a,this,s)}:a;return t?e(u,i):e(u)}:e},i_=Lr,o_=i,a_=n_(o_.setInterval,!0);i_({global:!0,bind:!0,forced:o_.setInterval!==a_},{setInterval:a_});var s_=Lr,u_=i,l_=n_(u_.setTimeout,!0);s_({global:!0,bind:!0,forced:u_.setTimeout!==l_},{setTimeout:l_});var c_=r(te.setTimeout),f_=o,d_=dt("iterator"),p_=!f_((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),!e.toJSON||!t.size&&true||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[d_]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),h_=O,v_=m,m_=C,y_=o,g_=hi,__=to,b_=Z,w_=Je,S_=X,k_=Object.assign,R_=Object.defineProperty,T_=v_([].concat),x_=!k_||y_((function(){if(h_&&1!==k_({b:1},k_(R_({},"a",{enumerable:!0,get:function(){R_(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!=k_({},e)[r]||g_(k_({},t)).join("")!=n}))?function(e,t){for(var r=w_(e),n=arguments.length,i=1,o=__.f,a=b_.f;n>i;)for(var s,u=S_(arguments[i++]),l=o?T_(g_(u),o(u)):g_(u),c=l.length,f=0;c>f;)s=l[f++],h_&&!m_(a,u,s)||(r[s]=u[s]);return r}:k_,E_=m,L_=2147483647,O_=/[^\0-\u007E]/,P_=/[.\u3002\uFF0E\uFF61]/g,I_="Overflow: input needs wider integers to process",C_=RangeError,Z_=E_(P_.exec),j_=Math.floor,A_=String.fromCharCode,D_=E_("".charCodeAt),V_=E_([].join),W_=E_([].push),M_=E_("".replace),G_=E_("".split),F_=E_("".toLowerCase),N_=function(e){return e+22+75*(e<26)},U_=function(e,t,r){var n=0;for(e=r?j_(e/700):e>>1,e+=j_(e/t);e>455;)e=j_(e/35),n+=36;return j_(n+36*e/(e+38))},X_=function(e){var t=[];e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=D_(e,r++);if(i>=55296&&i<=56319&&r<n){var o=D_(e,r++);56320==(64512&o)?W_(t,((1023&i)<<10)+(1023&o)+65536):(W_(t,i),r--)}else W_(t,i)}return t}(e);var r,n,i=e.length,o=128,a=0,s=72;for(r=0;r<e.length;r++)(n=e[r])<128&&W_(t,A_(n));var u=t.length,l=u;for(u&&W_(t,"-");l<i;){var c=L_;for(r=0;r<e.length;r++)(n=e[r])>=o&&n<c&&(c=n);var f=l+1;if(c-o>j_((L_-a)/f))throw C_(I_);for(a+=(c-o)*f,o=c,r=0;r<e.length;r++){if((n=e[r])<o&&++a>L_)throw C_(I_);if(n==o){for(var d=a,p=36;;){var h=p<=s?1:p>=s+26?26:p-s;if(d<h)break;var v=d-h,m=36-h;W_(t,A_(N_(h+v%m))),d=j_(v/m),p+=36}W_(t,A_(N_(d))),s=U_(a,f,l==u),a=0,l++}}a++,o++}return V_(t,"")},H_=no,B_=function(e,t,r){for(var n in t)r&&r.unsafe&&e[n]?e[n]=t[n]:H_(e,n,t[n],r);return e},K_=Ji,Y_=Math.floor,J_=function(e,t){var r=e.length,n=Y_(r/2);return r<8?z_(e,t):Q_(e,J_(K_(e,0,n),t),J_(K_(e,n),t),t)},z_=function(e,t){for(var r,n,i=e.length,o=1;o<i;){for(n=o,r=e[o];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==o++&&(e[n]=r)}return e},Q_=function(e,t,r,n){for(var i=t.length,o=r.length,a=0,s=0;a<i||s<o;)e[a+s]=a<i&&s<o?n(t[a],r[s])<=0?t[a++]:r[s++]:a<i?t[a++]:r[s++];return e},q_=J_,$_=Lr,eb=i,tb=C,rb=m,nb=O,ib=p_,ob=no,ab=oo,sb=B_,ub=Po,lb=Nu,cb=Bo,fb=fp,db=E,pb=qe,hb=zt,vb=en,mb=rr,yb=ee,gb=Kn,_b=Mi,bb=M,wb=md,Sb=Oc,kb=Sp,Rb=q_,Tb=dt("iterator"),xb="URLSearchParams",Eb=xb+"Iterator",Lb=cb.set,Ob=cb.getterFor(xb),Pb=cb.getterFor(Eb),Ib=Object.getOwnPropertyDescriptor,Cb=function(e){if(!nb)return eb[e];var t=Ib(eb,e);return t&&t.value},Zb=Cb("fetch"),jb=Cb("Request"),Ab=Cb("Headers"),Db=jb&&jb.prototype,Vb=Ab&&Ab.prototype,Wb=eb.RegExp,Mb=eb.TypeError,Gb=eb.decodeURIComponent,Fb=eb.encodeURIComponent,Nb=rb("".charAt),Ub=rb([].join),Xb=rb([].push),Hb=rb("".replace),Bb=rb([].shift),Kb=rb([].splice),Yb=rb("".split),Jb=rb("".slice),zb=/\+/g,Qb=Array(4),qb=function(e){return Qb[e-1]||(Qb[e-1]=Wb("((?:%[\\da-f]{2}){"+e+"})","gi"))},$b=function(e){try{return Gb(e)}catch(PC){return e}},ew=function(e){var t=Hb(e,zb," "),r=4;try{return Gb(t)}catch(PC){for(;r;)t=Hb(t,qb(r--),$b);return t}},tw=/[!'()~]|%20/g,rw={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},nw=function(e){return rw[e]},iw=function(e){return Hb(Fb(e),tw,nw)},ow=lb((function(e,t){Lb(this,{type:Eb,iterator:wb(Ob(e).entries),kind:t})}),"Iterator",(function(){var e=Pb(this),t=e.kind,r=e.iterator.next(),n=r.value;return r.done||(r.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),r}),!0),aw=function(e){this.entries=[],this.url=null,void 0!==e&&(yb(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Nb(e,0)?Jb(e,1):e:gb(e)))};aw.prototype={type:xb,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,o,a,s,u=Sb(e);if(u)for(r=(t=wb(e,u)).next;!(n=tb(r,t)).done;){if(o=(i=wb(mb(n.value))).next,(a=tb(o,i)).done||(s=tb(o,i)).done||!tb(o,i).done)throw Mb("Expected sequence with length 2");Xb(this.entries,{key:gb(a.value),value:gb(s.value)})}else for(var l in e)pb(e,l)&&Xb(this.entries,{key:l,value:gb(e[l])})},parseQuery:function(e){if(e)for(var t,r,n=Yb(e,"&"),i=0;i<n.length;)(t=n[i++]).length&&(r=Yb(t,"="),Xb(this.entries,{key:ew(Bb(r)),value:ew(Ub(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],Xb(r,iw(e.key)+"="+iw(e.value));return Ub(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var sw=function(){fb(this,uw);var e=Lb(this,new aw(arguments.length>0?arguments[0]:void 0));nb||(this.length=e.entries.length)},uw=sw.prototype;if(sb(uw,{append:function(e,t){kb(arguments.length,2);var r=Ob(this);Xb(r.entries,{key:gb(e),value:gb(t)}),nb||this.length++,r.updateURL()},delete:function(e){kb(arguments.length,1);for(var t=Ob(this),r=t.entries,n=gb(e),i=0;i<r.length;)r[i].key===n?Kb(r,i,1):i++;nb||(this.length=r.length),t.updateURL()},get:function(e){kb(arguments.length,1);for(var t=Ob(this).entries,r=gb(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){kb(arguments.length,1);for(var t=Ob(this).entries,r=gb(e),n=[],i=0;i<t.length;i++)t[i].key===r&&Xb(n,t[i].value);return n},has:function(e){kb(arguments.length,1);for(var t=Ob(this).entries,r=gb(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){kb(arguments.length,1);for(var r,n=Ob(this),i=n.entries,o=!1,a=gb(e),s=gb(t),u=0;u<i.length;u++)(r=i[u]).key===a&&(o?Kb(i,u--,1):(o=!0,r.value=s));o||Xb(i,{key:a,value:s}),nb||(this.length=i.length),n.updateURL()},sort:function(){var e=Ob(this);Rb(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=Ob(this).entries,n=hb(e,arguments.length>1?arguments[1]:void 0),i=0;i<r.length;)n((t=r[i++]).value,t.key,this)},keys:function(){return new ow(this,"keys")},values:function(){return new ow(this,"values")},entries:function(){return new ow(this,"entries")}},{enumerable:!0}),ob(uw,Tb,uw.entries,{name:"entries"}),ob(uw,"toString",(function(){return Ob(this).serialize()}),{enumerable:!0}),nb&&ab(uw,"size",{get:function(){return Ob(this).entries.length},configurable:!0,enumerable:!0}),ub(sw,xb),$_({global:!0,constructor:!0,forced:!ib},{URLSearchParams:sw}),!ib&&db(Ab)){var lw=rb(Vb.has),cw=rb(Vb.set),fw=function(e){if(yb(e)){var t,r=e.body;if(vb(r)===xb)return t=e.headers?new Ab(e.headers):new Ab,lw(t,"content-type")||cw(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),_b(e,{body:bb(0,gb(r)),headers:bb(0,t)})}return e};if(db(Zb)&&$_({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return Zb(e,arguments.length>1?fw(arguments[1]):{})}}),db(jb)){var dw=function(e){return fb(this,Db),new jb(e,arguments.length>1?fw(arguments[1]):{})};Db.constructor=dw,dw.prototype=Db,$_({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:dw})}}var pw,hw=Lr,vw=O,mw=p_,yw=i,gw=zt,_w=m,bw=no,ww=oo,Sw=fp,kw=qe,Rw=x_,Tw=yg,xw=Ji,Ew=fc.codeAt,Lw=function(e){var t,r,n=[],i=G_(M_(F_(e),P_,"."),".");for(t=0;t<i.length;t++)r=i[t],W_(n,Z_(O_,r)?"xn--"+X_(r):r);return V_(n,".")},Ow=Kn,Pw=Po,Iw=Sp,Cw={URLSearchParams:sw,getState:Ob},Zw=Bo,jw=Zw.set,Aw=Zw.getterFor("URL"),Dw=Cw.URLSearchParams,Vw=Cw.getState,Ww=yw.URL,Mw=yw.TypeError,Gw=yw.parseInt,Fw=Math.floor,Nw=Math.pow,Uw=_w("".charAt),Xw=_w(/./.exec),Hw=_w([].join),Bw=_w(1..toString),Kw=_w([].pop),Yw=_w([].push),Jw=_w("".replace),zw=_w([].shift),Qw=_w("".split),qw=_w("".slice),$w=_w("".toLowerCase),eS=_w([].unshift),tS="Invalid scheme",rS="Invalid host",nS="Invalid port",iS=/[a-z]/i,oS=/[\d+-.a-z]/i,aS=/\d/,sS=/^0x/i,uS=/^[0-7]+$/,lS=/^\d+$/,cS=/^[\da-f]+$/i,fS=/[\0\t\n\r #%/:<>?@[\\\]^|]/,dS=/[\0\t\n\r #/:<>?@[\\\]^|]/,pS=/^[\u0000-\u0020]+/,hS=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,vS=/[\t\n\r]/g,mS=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)eS(t,e%256),e=Fw(e/256);return Hw(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,i=0,o=0;o<8;o++)0!==e[o]?(i>r&&(t=n,r=i),n=null,i=0):(null===n&&(n=o),++i);return i>r&&(t=n,r=i),t}(e),r=0;r<8;r++)i&&0===e[r]||(i&&(i=!1),n===r?(t+=r?":":"::",i=!0):(t+=Bw(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},yS={},gS=Rw({},yS,{" ":1,'"':1,"<":1,">":1,"`":1}),_S=Rw({},gS,{"#":1,"?":1,"{":1,"}":1}),bS=Rw({},_S,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),wS=function(e,t){var r=Ew(e,0);return r>32&&r<127&&!kw(t,e)?e:encodeURIComponent(e)},SS={ftp:21,file:null,http:80,https:443,ws:80,wss:443},kS=function(e,t){var r;return 2==e.length&&Xw(iS,Uw(e,0))&&(":"==(r=Uw(e,1))||!t&&"|"==r)},RS=function(e){var t;return e.length>1&&kS(qw(e,0,2))&&(2==e.length||"/"===(t=Uw(e,2))||"\\"===t||"?"===t||"#"===t)},TS=function(e){return"."===e||"%2e"===$w(e)},xS={},ES={},LS={},OS={},PS={},IS={},CS={},ZS={},jS={},AS={},DS={},VS={},WS={},MS={},GS={},FS={},NS={},US={},XS={},HS={},BS={},KS=function(e,t,r){var n,i,o,a=Ow(e);if(t){if(i=this.parse(a))throw Mw(i);this.searchParams=null}else{if(void 0!==r&&(n=new KS(r,!0)),i=this.parse(a,null,n))throw Mw(i);(o=Vw(new Dw)).bindURL(this),this.searchParams=o}};KS.prototype={type:"URL",parse:function(e,t,r){var n,i,o,a,s,u=this,l=t||xS,c=0,f="",d=!1,p=!1,h=!1;for(e=Ow(e),t||(u.scheme="",u.username="",u.password="",u.host=null,u.port=null,u.path=[],u.query=null,u.fragment=null,u.cannotBeABaseURL=!1,e=Jw(e,pS,""),e=Jw(e,hS,"$1")),e=Jw(e,vS,""),n=Tw(e);c<=n.length;){switch(i=n[c],l){case xS:if(!i||!Xw(iS,i)){if(t)return tS;l=LS;continue}f+=$w(i),l=ES;break;case ES:if(i&&(Xw(oS,i)||"+"==i||"-"==i||"."==i))f+=$w(i);else{if(":"!=i){if(t)return tS;f="",l=LS,c=0;continue}if(t&&(u.isSpecial()!=kw(SS,f)||"file"==f&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=f,t)return void(u.isSpecial()&&SS[u.scheme]==u.port&&(u.port=null));f="","file"==u.scheme?l=MS:u.isSpecial()&&r&&r.scheme==u.scheme?l=OS:u.isSpecial()?l=ZS:"/"==n[c+1]?(l=PS,c++):(u.cannotBeABaseURL=!0,Yw(u.path,""),l=XS)}break;case LS:if(!r||r.cannotBeABaseURL&&"#"!=i)return tS;if(r.cannotBeABaseURL&&"#"==i){u.scheme=r.scheme,u.path=xw(r.path),u.query=r.query,u.fragment="",u.cannotBeABaseURL=!0,l=BS;break}l="file"==r.scheme?MS:IS;continue;case OS:if("/"!=i||"/"!=n[c+1]){l=IS;continue}l=jS,c++;break;case PS:if("/"==i){l=AS;break}l=US;continue;case IS:if(u.scheme=r.scheme,i==pw)u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=xw(r.path),u.query=r.query;else if("/"==i||"\\"==i&&u.isSpecial())l=CS;else if("?"==i)u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=xw(r.path),u.query="",l=HS;else{if("#"!=i){u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=xw(r.path),u.path.length--,l=US;continue}u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=xw(r.path),u.query=r.query,u.fragment="",l=BS}break;case CS:if(!u.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,l=US;continue}l=AS}else l=jS;break;case ZS:if(l=jS,"/"!=i||"/"!=Uw(f,c+1))continue;c++;break;case jS:if("/"!=i&&"\\"!=i){l=AS;continue}break;case AS:if("@"==i){d&&(f="%40"+f),d=!0,o=Tw(f);for(var v=0;v<o.length;v++){var m=o[v];if(":"!=m||h){var y=wS(m,bS);h?u.password+=y:u.username+=y}else h=!0}f=""}else if(i==pw||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(d&&""==f)return"Invalid authority";c-=Tw(f).length+1,f="",l=DS}else f+=i;break;case DS:case VS:if(t&&"file"==u.scheme){l=FS;continue}if(":"!=i||p){if(i==pw||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(u.isSpecial()&&""==f)return rS;if(t&&""==f&&(u.includesCredentials()||null!==u.port))return;if(a=u.parseHost(f))return a;if(f="",l=NS,t)return;continue}"["==i?p=!0:"]"==i&&(p=!1),f+=i}else{if(""==f)return rS;if(a=u.parseHost(f))return a;if(f="",l=WS,t==VS)return}break;case WS:if(!Xw(aS,i)){if(i==pw||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()||t){if(""!=f){var g=Gw(f,10);if(g>65535)return nS;u.port=u.isSpecial()&&g===SS[u.scheme]?null:g,f=""}if(t)return;l=NS;continue}return nS}f+=i;break;case MS:if(u.scheme="file","/"==i||"\\"==i)l=GS;else{if(!r||"file"!=r.scheme){l=US;continue}if(i==pw)u.host=r.host,u.path=xw(r.path),u.query=r.query;else if("?"==i)u.host=r.host,u.path=xw(r.path),u.query="",l=HS;else{if("#"!=i){RS(Hw(xw(n,c),""))||(u.host=r.host,u.path=xw(r.path),u.shortenPath()),l=US;continue}u.host=r.host,u.path=xw(r.path),u.query=r.query,u.fragment="",l=BS}}break;case GS:if("/"==i||"\\"==i){l=FS;break}r&&"file"==r.scheme&&!RS(Hw(xw(n,c),""))&&(kS(r.path[0],!0)?Yw(u.path,r.path[0]):u.host=r.host),l=US;continue;case FS:if(i==pw||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&kS(f))l=US;else if(""==f){if(u.host="",t)return;l=NS}else{if(a=u.parseHost(f))return a;if("localhost"==u.host&&(u.host=""),t)return;f="",l=NS}continue}f+=i;break;case NS:if(u.isSpecial()){if(l=US,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=pw&&(l=US,"/"!=i))continue}else u.fragment="",l=BS;else u.query="",l=HS;break;case US:if(i==pw||"/"==i||"\\"==i&&u.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=$w(s=f))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(u.shortenPath(),"/"==i||"\\"==i&&u.isSpecial()||Yw(u.path,"")):TS(f)?"/"==i||"\\"==i&&u.isSpecial()||Yw(u.path,""):("file"==u.scheme&&!u.path.length&&kS(f)&&(u.host&&(u.host=""),f=Uw(f,0)+":"),Yw(u.path,f)),f="","file"==u.scheme&&(i==pw||"?"==i||"#"==i))for(;u.path.length>1&&""===u.path[0];)zw(u.path);"?"==i?(u.query="",l=HS):"#"==i&&(u.fragment="",l=BS)}else f+=wS(i,_S);break;case XS:"?"==i?(u.query="",l=HS):"#"==i?(u.fragment="",l=BS):i!=pw&&(u.path[0]+=wS(i,yS));break;case HS:t||"#"!=i?i!=pw&&("'"==i&&u.isSpecial()?u.query+="%27":u.query+="#"==i?"%23":wS(i,yS)):(u.fragment="",l=BS);break;case BS:i!=pw&&(u.fragment+=wS(i,gS))}c++}},parseHost:function(e){var t,r,n;if("["==Uw(e,0)){if("]"!=Uw(e,e.length-1))return rS;if(t=function(e){var t,r,n,i,o,a,s,u=[0,0,0,0,0,0,0,0],l=0,c=null,f=0,d=function(){return Uw(e,f)};if(":"==d()){if(":"!=Uw(e,1))return;f+=2,c=++l}for(;d();){if(8==l)return;if(":"!=d()){for(t=r=0;r<4&&Xw(cS,d());)t=16*t+Gw(d(),16),f++,r++;if("."==d()){if(0==r)return;if(f-=r,l>6)return;for(n=0;d();){if(i=null,n>0){if(!("."==d()&&n<4))return;f++}if(!Xw(aS,d()))return;for(;Xw(aS,d());){if(o=Gw(d(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;f++}u[l]=256*u[l]+i,2!=++n&&4!=n||l++}if(4!=n)return;break}if(":"==d()){if(f++,!d())return}else if(d())return;u[l++]=t}else{if(null!==c)return;f++,c=++l}}if(null!==c)for(a=l-c,l=7;0!=l&&a>0;)s=u[l],u[l--]=u[c+a-1],u[c+--a]=s;else if(8!=l)return;return u}(qw(e,1,-1)),!t)return rS;this.host=t}else if(this.isSpecial()){if(e=Lw(e),Xw(fS,e))return rS;if(t=function(e){var t,r,n,i,o,a,s,u=Qw(e,".");if(u.length&&""==u[u.length-1]&&u.length--,(t=u.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(i=u[n]))return e;if(o=10,i.length>1&&"0"==Uw(i,0)&&(o=Xw(sS,i)?16:8,i=qw(i,8==o?1:2)),""===i)a=0;else{if(!Xw(10==o?lS:8==o?uS:cS,i))return e;a=Gw(i,o)}Yw(r,a)}for(n=0;n<t;n++)if(a=r[n],n==t-1){if(a>=Nw(256,5-t))return null}else if(a>255)return null;for(s=Kw(r),n=0;n<r.length;n++)s+=r[n]*Nw(256,3-n);return s}(e),null===t)return rS;this.host=t}else{if(Xw(dS,e))return rS;for(t="",r=Tw(e),n=0;n<r.length;n++)t+=wS(r[n],yS);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return kw(SS,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&kS(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,i=e.host,o=e.port,a=e.path,s=e.query,u=e.fragment,l=t+":";return null!==i?(l+="//",e.includesCredentials()&&(l+=r+(n?":"+n:"")+"@"),l+=mS(i),null!==o&&(l+=":"+o)):"file"==t&&(l+="//"),l+=e.cannotBeABaseURL?a[0]:a.length?"/"+Hw(a,"/"):"",null!==s&&(l+="?"+s),null!==u&&(l+="#"+u),l},setHref:function(e){var t=this.parse(e);if(t)throw Mw(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new YS(e.path[0]).origin}catch(PC){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+mS(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Ow(e)+":",xS)},getUsername:function(){return this.username},setUsername:function(e){var t=Tw(Ow(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=wS(t[r],bS)}},getPassword:function(){return this.password},setPassword:function(e){var t=Tw(Ow(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=wS(t[r],bS)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?mS(e):mS(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,DS)},getHostname:function(){var e=this.host;return null===e?"":mS(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,VS)},getPort:function(){var e=this.port;return null===e?"":Ow(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=Ow(e))?this.port=null:this.parse(e,WS))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+Hw(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,NS))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=Ow(e))?this.query=null:("?"==Uw(e,0)&&(e=qw(e,1)),this.query="",this.parse(e,HS)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=Ow(e))?("#"==Uw(e,0)&&(e=qw(e,1)),this.fragment="",this.parse(e,BS)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var YS=function(e){var t=Sw(this,JS),r=Iw(arguments.length,1)>1?arguments[1]:void 0,n=jw(t,new KS(e,!1,r));vw||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},JS=YS.prototype,zS=function(e,t){return{get:function(){return Aw(this)[e]()},set:t&&function(e){return Aw(this)[t](e)},configurable:!0,enumerable:!0}};if(vw&&(ww(JS,"href",zS("serialize","setHref")),ww(JS,"origin",zS("getOrigin")),ww(JS,"protocol",zS("getProtocol","setProtocol")),ww(JS,"username",zS("getUsername","setUsername")),ww(JS,"password",zS("getPassword","setPassword")),ww(JS,"host",zS("getHost","setHost")),ww(JS,"hostname",zS("getHostname","setHostname")),ww(JS,"port",zS("getPort","setPort")),ww(JS,"pathname",zS("getPathname","setPathname")),ww(JS,"search",zS("getSearch","setSearch")),ww(JS,"searchParams",zS("getSearchParams")),ww(JS,"hash",zS("getHash","setHash"))),bw(JS,"toJSON",(function(){return Aw(this).serialize()}),{enumerable:!0}),bw(JS,"toString",(function(){return Aw(this).serialize()}),{enumerable:!0}),Ww){var QS=Ww.createObjectURL,qS=Ww.revokeObjectURL;QS&&bw(YS,"createObjectURL",gw(QS,Ww)),qS&&bw(YS,"revokeObjectURL",gw(qS,Ww))}Pw(YS,"URL"),hw({global:!0,constructor:!0,forced:!mw,sham:!vw},{URL:YS});var $S=Lr,ek=o,tk=Sp,rk=Kn,nk=p_,ik=ae("URL");$S({target:"URL",stat:!0,forced:!(nk&&ek((function(){ik.canParse()})))},{canParse:function(e){var t=tk(arguments.length,1),r=rk(e),n=t<2||void 0===arguments[1]?void 0:rk(arguments[1]);try{return!!new ik(r,n)}catch(PC){return!1}}});var ok=r(te.URL),ak=Lr,sk=ea.find,uk="find",lk=!0;uk in[]&&Array(1)[uk]((function(){lk=!1})),ak({target:"Array",proto:!0,forced:lk},{find:function(e){return sk(this,e,arguments.length>1?arguments[1]:void 0)}});var ck=Vc("Array").find,fk=se,dk=ck,pk=Array.prototype,hk=r((function(e){var t=e.find;return e===pk||fk(pk,e)&&t===pk.find?dk:t})),vk=O,mk=Pr,yk=TypeError,gk=Object.getOwnPropertyDescriptor,_k=vk&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(PC){return PC instanceof TypeError}}(),bk=Ee,wk=TypeError,Sk=function(e,t){if(!delete e[t])throw wk("Cannot delete property "+bk(t)+" of "+bk(e))},kk=Lr,Rk=Je,Tk=qn,xk=jr,Ek=Mr,Lk=_k?function(e,t){if(mk(e)&&!gk(e,"length").writable)throw yk("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},Ok=Fr,Pk=xn,Ik=Hr,Ck=Sk,Zk=Pn("splice"),jk=Math.max,Ak=Math.min;kk({target:"Array",proto:!0,forced:!Zk},{splice:function(e,t){var r,n,i,o,a,s,u=Rk(this),l=Ek(u),c=Tk(e,l),f=arguments.length;for(0===f?r=n=0:1===f?(r=0,n=l-c):(r=f-2,n=Ak(jk(xk(t),0),l-c)),Ok(l+r-n),i=Pk(u,n),o=0;o<n;o++)(a=c+o)in u&&Ik(i,o,u[a]);if(i.length=n,r<n){for(o=c;o<l-n;o++)s=o+r,(a=o+n)in u?u[s]=u[a]:Ck(u,s);for(o=l;o>l-n+r;o--)Ck(u,o-1)}else if(r>n)for(o=l-n;o>c;o--)s=o+r-1,(a=o+n-1)in u?u[s]=u[a]:Ck(u,s);for(o=0;o<r;o++)u[o+c]=arguments[o+2];return Lk(u,l-n+r),i}});var Dk=Vc("Array").splice,Vk=se,Wk=Dk,Mk=Array.prototype,Gk=r((function(e){var t=e.splice;return e===Mk||Vk(Mk,e)&&t===Mk.splice?Wk:t}));Lr({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var Fk=r(te.Number.isNaN),Nk="\t\n\v\f\r                 \u2028\u2029\ufeff",Uk=Y,Xk=Kn,Hk=Nk,Bk=m("".replace),Kk=RegExp("^["+Hk+"]+"),Yk=RegExp("(^|[^"+Hk+"])["+Hk+"]+$"),Jk=function(e){return function(t){var r=Xk(Uk(t));return 1&e&&(r=Bk(r,Kk,"")),2&e&&(r=Bk(r,Yk,"$1")),r}},zk={start:Jk(1),end:Jk(2),trim:Jk(3)},Qk=i,qk=o,$k=m,eR=Kn,tR=zk.trim,rR=Nk,nR=Qk.parseInt,iR=Qk.Symbol,oR=iR&&iR.iterator,aR=/^[+-]?0x/i,sR=$k(aR.exec),uR=8!==nR(rR+"08")||22!==nR(rR+"0x16")||oR&&!qk((function(){nR(Object(oR))}))?function(e,t){var r=tR(eR(e));return nR(r,t>>>0||(sR(aR,r)?16:10))}:nR;Lr({global:!0,forced:parseInt!=uR},{parseInt:uR});var lR=r(te.parseInt),cR=ea.map;Lr({target:"Array",proto:!0,forced:!Pn("map")},{map:function(e){return cR(this,e,arguments.length>1?arguments[1]:void 0)}});var fR=Vc("Array").map,dR=se,pR=fR,hR=Array.prototype,vR=r((function(e){var t=e.map;return e===hR||dR(hR,e)&&t===hR.map?pR:t})),mR=x_;Lr({target:"Object",stat:!0,arity:2,forced:Object.assign!==mR},{assign:mR});var yR=r(te.Object.assign),gR=r(bc),_R=qe,bR=C,wR=ee,SR=rr,kR=function(e){return void 0!==e&&(_R(e,"value")||_R(e,"writable"))},RR=L,TR=Tu;Lr({target:"Reflect",stat:!0},{get:function e(t,r){var n,i,o=arguments.length<3?t:arguments[2];return SR(t)===o?t[r]:(n=RR.f(t,r))?kR(n)?n.value:void 0===n.get?void 0:bR(n.get,o):wR(i=TR(t))?e(i,r,o):void 0}});var xR=r(te.Reflect.get);function ER(e,t){var r=Zc(e);if(jc){var n=jc(e);t&&(n=Nc(n).call(n,(function(t){return Qc(e,t).enumerable}))),r.push.apply(r,n)}return r}function LR(e){for(var t=1;t<arguments.length;t++){var r,n,i=null!=arguments[t]?arguments[t]:{};t%2?cf(r=ER(Object(i),!0)).call(r,(function(t){ZR(e,t,i[t])})):wf?Lf(e,wf(i)):cf(n=ER(Object(i))).call(n,(function(t){Af(e,t,Qc(i,t))}))}return e}function OR(e){return(OR="function"==typeof kc&&"symbol"==typeof gR?function(e){return typeof e}:function(e){return e&&"function"==typeof kc&&e.constructor===kc&&e!==kc.prototype?"symbol":typeof e})(e)}function PR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IR(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Af(e,DR(n.key),n)}}function CR(e,t,r){return t&&IR(e.prototype,t),r&&IR(e,r),Af(e,"prototype",{writable:!1}),e}function ZR(e,t,r){return(t=DR(t))in e?Af(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jR(e){return function(e){if(ng(e))return AR(e)}(e)||function(e){if(void 0!==kc&&null!=Pc(e)||null!=e["@@iterator"])return _g(e)}(e)||function(e,t){var r;if(!e)return;if("string"==typeof e)return AR(e,t);var n=hy(r=Object.prototype.toString.call(e)).call(r,8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return _g(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return AR(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function AR(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function DR(e){var t=function(e,t){if("object"!==Sc(e)||null===e)return e;var r=e[bg];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Sc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Sc(t)?t:String(t)}var VR={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,n,o,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new i(n,o||e,a),u=r?r+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],s]:e._events[u].push(s):(e._events[u]=s,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}Vf&&(n.prototype=Vf(null),(new n).__proto__||(r=!1)),s.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?hy(n).call(n,1):n);return jc?Bg(i).call(i,jc(e)):i},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,a=new Array(o);i<o;i++)a[i]=n[i].fn;return a},s.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},s.prototype.emit=function(e,t,n,i,o,a){var s=r?r+e:e;if(!this._events[s])return!1;var u,l,c=this._events[s],f=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),f){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,o),!0;case 6:return c.fn.call(c.context,t,n,i,o,a),!0}for(l=1,u=new Array(f-1);l<f;l++)u[l-1]=arguments[l];c.fn.apply(c.context,u)}else{var d,p=c.length;for(l=0;l<p;l++)switch(c[l].once&&this.removeListener(e,c[l].fn,void 0,!0),f){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,t);break;case 3:c[l].fn.call(c[l].context,t,n);break;case 4:c[l].fn.call(c[l].context,t,n,i);break;default:if(!u)for(d=1,u=new Array(f-1);d<f;d++)u[d-1]=arguments[d];c[l].fn.apply(c[l].context,u)}}return!0},s.prototype.on=function(e,t,r){return o(this,e,t,r,!1)},s.prototype.once=function(e,t,r){return o(this,e,t,r,!0)},s.prototype.removeListener=function(e,t,n,i){var o=r?r+e:e;if(!this._events[o])return this;if(!t)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==t||i&&!s.once||n&&s.context!==n||a(this,o);else{for(var u=0,l=[],c=s.length;u<c;u++)(s[u].fn!==t||i&&!s[u].once||n&&s[u].context!==n)&&l.push(s[u]);l.length?this._events[o]=1===l.length?l[0]:l:a(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&a(this,t)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s}(VR);var WR=r(VR.exports),MR=ea.some;Lr({target:"Array",proto:!0,forced:!$c("some")},{some:function(e){return MR(this,e,arguments.length>1?arguments[1]:void 0)}});var GR=Vc("Array").some,FR=se,NR=GR,UR=Array.prototype,XR=r((function(e){var t=e.some;return e===UR||FR(UR,e)&&t===UR.some?NR:t})),HR=jr,BR=Kn,KR=Y,YR=RangeError,JR=m,zR=Vr,QR=Kn,qR=Y,$R=JR((function(e){var t=BR(KR(this)),r="",n=HR(e);if(n<0||n==1/0)throw YR("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(t+=t))1&n&&(r+=t);return r})),eT=JR("".slice),tT=Math.ceil,rT=function(e){return function(t,r,n){var i,o,a=QR(qR(t)),s=zR(r),u=a.length,l=void 0===n?" ":QR(n);return s<=u||""==l?a:((o=$R(l,tT((i=s-u)/l.length))).length>i&&(o=eT(o,0,i)),e?a+o:o+a)}},nT={start:rT(!1),end:rT(!0)},iT=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(ue),oT=nT.start;Lr({target:"String",proto:!0,forced:iT},{padStart:function(e){return oT(this,e,arguments.length>1?arguments[1]:void 0)}});var aT=Vc("String").padStart,sT=se,uT=aT,lT=String.prototype,cT=r((function(e){var t=e.padStart;return"string"==typeof e||e===lT||sT(lT,e)&&t===lT.padStart?uT:t})),fT=r(te.setInterval),dT=ea.every;Lr({target:"Array",proto:!0,forced:!$c("every")},{every:function(e){return dT(this,e,arguments.length>1?arguments[1]:void 0)}});var pT=Vc("Array").every,hT=se,vT=pT,mT=Array.prototype,yT=r((function(e){var t=e.every;return e===mT||hT(mT,e)&&t===mT.every?vT:t})),gT=i,_T=o,bT=Kn,wT=zk.trim,ST=Nk,kT=m("".charAt),RT=gT.parseFloat,TT=gT.Symbol,xT=TT&&TT.iterator,ET=1/RT(ST+"-0")!=-1/0||xT&&!_T((function(){RT(Object(xT))}))?function(e){var t=wT(bT(e)),r=RT(t);return 0===r&&"-"==kT(t,0)?-0:r}:RT;Lr({global:!0,forced:parseFloat!=ET},{parseFloat:ET});var LT=r(te.parseFloat),OT=mu.PROPER,PT=o,IT=Nk,CT=zk.trim;Lr({target:"String",proto:!0,forced:function(e){return PT((function(){return!!IT[e]()||"​…᠎"!=="​…᠎"[e]()||OT&&IT[e].name!==e}))}("trim")},{trim:function(){return CT(this)}});var ZT=Vc("String").trim,jT=se,AT=ZT,DT=String.prototype,VT=r((function(e){var t=e.trim;return"string"==typeof e||e===DT||jT(DT,e)&&t===DT.trim?AT:t})),WT=ue.match(/firefox\/(\d+)/i),MT=!!WT&&+WT[1],GT=/MSIE|Trident/.test(ue),FT=ue.match(/AppleWebKit\/(\d+)\./),NT=!!FT&&+FT[1],UT=Lr,XT=m,HT=Ie,BT=Je,KT=Mr,YT=Sk,JT=Kn,zT=o,QT=q_,qT=$c,$T=MT,ex=GT,tx=ve,rx=NT,nx=[],ix=XT(nx.sort),ox=XT(nx.push),ax=zT((function(){nx.sort(void 0)})),sx=zT((function(){nx.sort(null)})),ux=qT("sort"),lx=!zT((function(){if(tx)return tx<70;if(!($T&&$T>3)){if(ex)return!0;if(rx)return rx<603;var e,t,r,n,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)nx.push({k:t+n,v:r})}for(nx.sort((function(e,t){return t.v-e.v})),n=0;n<nx.length;n++)t=nx[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));UT({target:"Array",proto:!0,forced:ax||!sx||!ux||!lx},{sort:function(e){void 0!==e&&HT(e);var t=BT(this);if(lx)return void 0===e?ix(t):ix(t,e);var r,n,i=[],o=KT(t);for(n=0;n<o;n++)n in t&&ox(i,t[n]);for(QT(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:JT(t)>JT(r)?1:-1}}(e)),r=KT(i),n=0;n<r;)t[n]=i[n++];for(;n<o;)YT(t,n++);return t}});var cx=Vc("Array").sort,fx=se,dx=cx,px=Array.prototype,hx=r((function(e){var t=e.sort;return e===px||fx(px,e)&&t===px.sort?dx:t})),vx=Lr,mx=Date,yx=m(mx.prototype.getTime);vx({target:"Date",stat:!0},{now:function(){return yx(new mx)}});var gx,_x=r(te.Date.now),bx="undefined"!=typeof window&&window.location&&rg(gx=window.location.href).call(gx,"xgplayerdebugger=1")>-1,wx="color: #525252; background-color: #90ee90;",Sx="color: #525252; background-color: red;",kx="color: #525252; background-color: yellow; ",Rx="%c[xgplayer]",Tx={config:{debug:bx?3:0},logInfo:function(e){for(var t,r,n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];this.config.debug>=3&&(r=console).log.apply(r,Bg(t=[Rx,wx,e]).call(t,i))},logWarn:function(e){for(var t,r,n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];this.config.debug>=1&&(r=console).warn.apply(r,Bg(t=[Rx,kx,e]).call(t,i))},logError:function(e){var t,r;if(!(this.config.debug<1)){for(var n=this.config.debug>=2?"trace":"error",i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];(r=console)[n].apply(r,Bg(t=[Rx,Sx,e]).call(t,o))}}},xx=function(){function e(t){PR(this,e),this.bufferedList=t}return CR(e,[{key:"start",value:function(e){return this.bufferedList[e].start}},{key:"end",value:function(e){return this.bufferedList[e].end}},{key:"length",get:function(){return this.bufferedList.length}}]),e}(),Ex={};Ex.createDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=document.createElement(t);return o.className=i,o.innerHTML=r,cf(e=Zc(n)).call(e,(function(e){var r=e,i=n[e];"video"===t||"audio"===t||"live-video"===t?i&&o.setAttribute(r,i):o.setAttribute(r,i)})),o},Ex.createDomFromHtml=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";try{var n=document.createElement("div");n.innerHTML=e;var i=n.children;if(n=null,i.length>0){var o;if(i=i[0],r&&Ex.addClass(i,r),t)cf(o=Zc(t)).call(o,(function(e){i.setAttribute(e,t[e])}));return i}return null}catch(a){return Tx.logError("util.createDomFromHtml",a),null}},Ex.hasClass=function(e,t){if(!e||!t)return!1;try{return XR(Array.prototype).call(e.classList,(function(e){return e===t}))}catch(n){var r=e.className&&"object"===OR(e.className)?e.getAttribute("class"):e.className;return r&&!!r.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}},Ex.addClass=function(e,t){if(e&&t)try{var r;cf(r=t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(r,(function(t){t&&e.classList.add(t)}))}catch(n){Ex.hasClass(e,t)||(e.className&&"object"===OR(e.className)?e.setAttribute("class",e.getAttribute("class")+" "+t):e.className+=" "+t)}},Ex.removeClass=function(e,t){if(e&&t)try{var r;cf(r=t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(r,(function(t){t&&e.classList.remove(t)}))}catch(i){var n;if(Ex.hasClass(e,t))cf(n=t.split(/\s+/g)).call(n,(function(t){var r=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className&&"object"===OR(e.className)?e.setAttribute("class",e.getAttribute("class").replace(r," ")):e.className=e.className.replace(r," ")}))}},Ex.toggleClass=function(e,t){var r;e&&cf(r=t.split(/\s+/g)).call(r,(function(t){Ex.hasClass(e,t)?Ex.removeClass(e,t):Ex.addClass(e,t)}))},Ex.classNames=function(){for(var e=arguments,t=[],r=function(r){if("String"===Ex.typeOf(e[r]))t.push(e[r]);else if("Object"===Ex.typeOf(e[r])){var n;vR(n=Zc(e[r])).call(n,(function(n){e[r][n]&&t.push(n)}))}},n=0;n<arguments.length;n++)r(n);return t.join(" ")},Ex.findDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,r=arguments.length>1?arguments[1]:void 0;try{e=t.querySelector(r)}catch(n){Tx.logError("util.findDom",n),0===rg(r).call(r,"#")&&(e=t.getElementById(hy(r).call(r,1)))}return e},Ex.getCss=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,!1)[t]},Ex.padStart=function(e,t,r){for(var n=String(r),i=t>>0,o=Math.ceil(i/n.length),a=[],s=String(e);o--;)a.push(n);return a.join("").substring(0,i-s.length)+s},Ex.format=function(e){if(window.isNaN(e))return"";e=Math.round(e);var t=cT(Ex).call(Ex,Math.floor(e/3600),2,0),r=cT(Ex).call(Ex,Math.floor((e-3600*t)/60),2,0),n=cT(Ex).call(Ex,Math.floor(e-3600*t-60*r),2,0);return("00"===t?[r,n]:[t,r,n]).join(":")},Ex.event=function(e){if(e.touches){var t=e.touches[0]||e.changedTouches[0];e.clientX=t.clientX||0,e.clientY=t.clientY||0,e.offsetX=t.pageX-t.target.offsetLeft,e.offsetY=t.pageY-t.target.offsetTop}e._target=e.target||e.srcElement},Ex.typeOf=function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},Ex.deepCopy=function(e,t){var r;if("Object"===Ex.typeOf(t)&&"Object"===Ex.typeOf(e))return cf(r=Zc(t)).call(r,(function(r){if("Object"!==Ex.typeOf(t[r])||t[r]instanceof Node)if("Array"===Ex.typeOf(t[r])){var n;e[r]="Array"===Ex.typeOf(e[r])?Bg(n=e[r]).call(n,t[r]):t[r]}else e[r]=t[r];else void 0===e[r]||void 0===e[r]?e[r]=t[r]:Ex.deepCopy(e[r],t[r])})),e},Ex.deepMerge=function(e,t){var r;return vR(r=Zc(t)).call(r,(function(r){var n;"Array"===Ex.typeOf(t[r])&&"Array"===Ex.typeOf(e[r])?"Array"===Ex.typeOf(e[r])&&(n=e[r]).push.apply(n,jR(t[r])):Ex.typeOf(e[r])!==Ex.typeOf(t[r])||null===e[r]||"Object"!==Ex.typeOf(e[r])||t[r]instanceof window.Node?null!==t[r]&&(e[r]=t[r]):Ex.deepMerge(e[r],t[r])})),e},Ex.getBgImage=function(e){var t=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;if(!t||"none"===t)return"";var r=document.createElement("a");return r.href=t.replace(/url\("|"\)/g,""),r.href},Ex.copyDom=function(e){if(e&&1===e.nodeType){var t=document.createElement(e.tagName);return cf(Array.prototype).call(e.attributes,(function(e){t.setAttribute(e.name,e.value)})),e.innerHTML&&(t.innerHTML=e.innerHTML),t}return""},Ex.setInterval=function(e,t,r,n){e._interval[t]||(e._interval[t]=fT(Iy(r).call(r,e),n))},Ex.clearInterval=function(e,t){clearInterval(e._interval[t]),e._interval[t]=null},Ex.setTimeout=function(e,t,r){e._timers||(e._timers=[]);var n=c_((function(){t(),Ex.clearTimeout(e,n)}),r);return e._timers.push(n),n},Ex.clearTimeout=function(e,t){var r=e._timers;if("Array"===Ex.typeOf(r)){for(var n=0;n<r.length;n++)if(r[n]===t){Gk(r).call(r,n,1),clearTimeout(t);break}}else clearTimeout(t)},Ex.clearAllTimers=function(e){var t=e._timers;"Array"===Ex.typeOf(t)&&(vR(t).call(t,(function(e){clearTimeout(e)})),e._timerIds=[])},Ex.createImgBtn=function(e,t,r,n){var i,o,a,s,u,l,c,f,d,p,h,v,m=Ex.createDom("xg-".concat(e),"",{},"xgplayer-".concat(e,"-img"));(m.style.backgroundImage='url("'.concat(t,'")'),r&&n)&&(yT(i=["px","rem","em","pt","dp","vw","vh","vm","%"]).call(i,(function(e){var t,i;return!(rg(r).call(r,e)>-1&&rg(n).call(n,e)>-1)||(c=LT(VT(t=hy(r).call(r,0,rg(r).call(r,e))).call(t)),f=LT(VT(i=hy(n).call(n,0,rg(n).call(n,e))).call(i)),d=e,!1)})),m.style.width=Bg(o="".concat(c)).call(o,d),m.style.height=Bg(a="".concat(f)).call(a,d),m.style.backgroundSize=Bg(s=Bg(u=Bg(l="".concat(c)).call(l,d," ")).call(u,f)).call(s,d),m.style.margin="start"===e?Bg(p=Bg(h=Bg(v="-".concat(f/2)).call(v,d," auto auto -")).call(h,c/2)).call(p,d):"auto 5px auto 5px");return m},Ex.Hex2RGBA=function(e,t){var r,n=[];if(/^\#[0-9A-F]{3}$/i.test(e)){var i="#";e.replace(/[0-9A-F]/gi,(function(e){i+=e+e})),e=i}return/^#[0-9A-F]{6}$/i.test(e)?(e.replace(/[0-9A-F]{2}/gi,(function(e){n.push(lR(e,16))})),Bg(r="rgba(".concat(n.join(","),", ")).call(r,t,")")):"rgba(255, 255, 255, 0.1)"},Ex.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},Ex.checkIsFunction=function(e){return e&&"function"==typeof e},Ex.checkIsObject=function(e){return null!==e&&"object"===OR(e)},Ex.hide=function(e){e.style.display="none"},Ex.show=function(e,t){e.style.display=t||"block"},Ex.isUndefined=function(e){if(null==e)return!0},Ex.isNotNull=function(e){return!(null==e)},Ex.setStyleFromCsstext=function(e,t){if(t)if("String"===Ex.typeOf(t)){var r=t.replace(/\s+/g,"").split(";");vR(r).call(r,(function(t){if(t){var r=t.split(":");r.length>1&&(e.style[r[0]]=r[1])}}))}else{var n;vR(n=Zc(t)).call(n,(function(r){e.style[r]=t[r]}))}},Ex.filterStyleFromText=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["width","height","top","left","bottom","right","position","z-index","padding","margin","transform"],n=e.style.cssText;if(!n)return{};var i=n.replace(/\s+/g,"").split(";"),o={},a={};return vR(i).call(i,(function(e){if(e){var t=e.split(":");t.length>1&&(!function(e,t){for(var r=0,n=t.length;r<n;r++)if(rg(e).call(e,t[r])>-1)return!0;return!1}(t[0],r)?a[t[0]]=t[1]:o[t[0]]=t[1])}})),e.setAttribute("style",""),vR(t=Zc(a)).call(t,(function(t){e.style[t]=a[t]})),o},Ex.getStyleFromCsstext=function(e){var t=e.style.cssText;if(!t)return{};var r=t.replace(/\s+/g,"").split(";"),n={};return vR(r).call(r,(function(e){if(e){var t=e.split(":");t.length>1&&(n[t[0]]=t[1])}})),n},Ex.preloadImg=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(e){var n=new window.Image;n.onload=function(e){n=null,t&&t(e)},n.onerror=function(e){n=null,r&&r(e)},n.src=e}},Ex.stopPropagation=function(e){e&&e.stopPropagation()},Ex.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},Ex.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},Ex.checkTouchSupport=function(){return"ontouchstart"in window},Ex.getBuffered2=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,r=[],n=0;n<e.length;n++)r.push({start:e.start(n)<.5?0:e.start(n),end:e.end(n)});hx(r).call(r,(function(e,t){var r=e.start-t.start;return r||t.end-e.end}));var i=[];if(t)for(var o=0;o<r.length;o++){var a=i.length;if(a){var s=i[a-1].end;r[o].start-s<t?r[o].end>s&&(i[a-1].end=r[o].end):i.push(r[o])}else i.push(r[o])}else i=r;return new xx(i)},Ex.getEventPos=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.touches&&e.touches.length>0&&(e=e.touches[0]),{x:e.x/t,y:e.y/t,clientX:e.clientX/t,clientY:e.clientY/t,offsetX:e.offsetX/t,offsetY:e.offsetY/t,pageX:e.pageX/t,pageY:e.pageY/t}},Ex.requestAnimationFrame=function(e){var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(t)return t(e)},Ex.getHostFromUrl=function(e){if("String"!==Ex.typeOf(e))return"";var t=e.split("/"),r="";return t.length>3&&t[2]&&(r=t[2]),r},Ex.cancelAnimationFrame=function(e){var t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;t&&t(e)},Ex.isMSE=function(e){return e.media&&(e=e.media),!!(e&&e instanceof HTMLMediaElement)&&(/^blob/.test(e.currentSrc)||/^blob/.test(e.src))},Ex.isBlob=function(e){return"string"==typeof e&&/^blob/.test(e)},Ex.generateSessionId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(new Date).getTime();try{e=lR(e)}catch(r){e=0}return t+=e,window.performance&&"function"==typeof window.performance.now&&(t+=lR(window.performance.now())),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:3&r|8).toString(16)}))},Ex.createEvent=function(e){var t;return"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},Ex.adjustTimeByDuration=function(e,t,r){return t&&e&&(e>t||r&&e<t)?t:e},Ex.createPositionBar=function(e,t){var r=Ex.createDom("xg-bar","",{"data-index":-1},e);return t.appendChild(r),r},Ex.getTransformStyle=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0,scale:1,rotate:0},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n={scale:"".concat(t.scale||1),translate:Bg(e="".concat(t.x||0,"%, ")).call(e,t.y||0,"%"),rotate:"".concat(t.rotate||0,"deg")},i=Zc(n);return cf(i).call(i,(function(e){var t,i=new RegExp("".concat(e,"\\([^\\(]+\\)"),"g"),o=Bg(t="".concat(e,"(")).call(t,n[e],")");i.test(r)?(i.lastIndex=-1,r=r.replace(i,o)):r+="".concat(o," ")})),r},Ex.convertDeg=function(e){return Math.abs(e)<=1?360*e:e%360},Ex.getIndexByTime=function(e,t){var r=t.length,n=-1;if(r<1)return n;if(e<=t[0].end||r<2)n=0;else if(e>t[r-1].end)n=r-1;else for(var i=1;i<r;i++)if(e>t[i-1].end&&e<=t[i].end){n=i;break}return n},Ex.getOffsetCurrentTime=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,n=-1;if((n=r>=0&&r<t.length?r:Ex.getIndexByTime(e,t))<0)return-1;var i=t.length,o=t[n],a=o.start,s=o.end,u=o.cTime,l=o.offset;return e<a?u:e>=a&&e<=s?e-l:e>s&&n>=i-1?s:-1},Ex.getCurrentTimeByOffset=function(e,t){var r=-1;if(!t||t.length<0)return e;for(var n=0;n<t.length;n++)if(e<=t[n].duration){r=n;break}if(-1!==r){var i=t[r].start;return r-1<0?i+e:i+(e-t[r-1].duration)}return e};var Lx="3.0.21-rc.21",Ox={1:5101,2:5102,3:5103,4:5104,5:5105,6:5106},Px=CR((function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{errorType:"",errorCode:0,errorMessage:"",originError:"",ext:{},mediaError:null};PR(this,e);var n=t&&t.i18n?t.i18n.ERROR_TYPES:null;if(t.media){var i,o=r.mediaError?r.mediaError:t.media.error||{},a=t.duration,s=t.currentTime,u=t.ended,l=t.src,c=t.currentSrc,f=t.media,d=f.readyState,p=f.networkState,h=r.errorCode||o.code;Ox[h]&&(h=Ox[h]);var v={playerVersion:Lx,currentTime:s,duration:a,ended:u,readyState:d,networkState:p,src:l||c,errorType:r.errorType,errorCode:h,message:r.errorMessage||o.message,mediaError:o,originError:r.originError?r.originError.stack:"",host:Ex.getHostFromUrl(l||c)};return r.ext&&vR(i=Zc(r.ext)).call(i,(function(e){v[e]=r.ext[e]})),v}if(arguments.length>1){for(var m={playerVersion:Lx,domain:document.domain},y=["errorType","currentTime","duration","networkState","readyState","src","currentSrc","ended","errd","errorCode","mediaError"],g=0;g<arguments.length;g++)m[y[g]]=arguments[g];return m.ex=n?(n[arguments[0]]||{}).msg:"",m}}));function Ix(e,t,r){for(var n,i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];var s,u=t.call.apply(t,Bg(n=[e]).call(n,o));r&&"function"==typeof r&&(u&&u.then?u.then((function(){for(var t,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];r.call.apply(r,Bg(t=[e]).call(t,i))})):r.call.apply(r,Bg(s=[e]).call(s,o)))}function Cx(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{pre:null,next:null};return this.__hooks||(this.__hooks={}),!this.__hooks[e]&&(this.__hooks[e]=null),Iy(r=function(){var r,i=arguments,o=this;if(n.pre)try{var a,s;(s=n.pre).call.apply(s,Bg(a=[this]).call(a,hy(Array.prototype).call(arguments)))}catch(v){var u,l;throw v.message=Bg(u=Bg(l="[pluginName: ".concat(this.pluginName,":")).call(l,e,":pre error] >> ")).call(u,v.message),v}if(this.__hooks&&this.__hooks[e])try{var c,f=function(e,t,r){for(var n=arguments.length,i=new Array(n>3?n-3:0),o=3;o<n;o++)i[o-3]=arguments[o];if(e.__hooks&&ng(e.__hooks[t])){var a,s=e.__hooks[t],u=-1,l=function e(t,r,n){for(var i,o,a=arguments.length,l=new Array(a>3?a-3:0),c=3;c<a;c++)l[c-3]=arguments[c];if(u++,0===s.length||u===s.length)return n.call.apply(n,Bg(o=[t,t]).call(o,l));var f,d=s[u],p=d.call.apply(d,Bg(i=[t,t]).call(i,l));return p&&p.then?p.then((function(i){var o;return!1===i?null:e.apply(void 0,Bg(o=[t,r,n]).call(o,l))})).catch((function(e){console.warn("[runHooks]".concat(r," reject"),e.message)})):!1!==p?e.apply(void 0,Bg(f=[t,r,n]).call(f,l)):void 0};return l.apply(void 0,Bg(a=[e,t,r]).call(a,i))}var c;return r.call.apply(r,Bg(c=[e,e]).call(c,i))}(this,e,t);if(f)if(f.then)f.then((function(e){var r;!1!==e&&Ix.apply(void 0,Bg(r=[o,t,n.next]).call(r,jR(i)))})).catch((function(e){throw e}));else Ix.apply(void 0,Bg(c=[this,t,n.next]).call(c,hy(Array.prototype).call(arguments)));else if(void 0===f){var d;Ix.apply(void 0,Bg(d=[this,t,n.next]).call(d,hy(Array.prototype).call(arguments)))}}catch(v){var p,h;throw v.message=Bg(p=Bg(h="[pluginName: ".concat(this.pluginName,":")).call(h,e,"] >> ")).call(p,v.message),v}else Ix.apply(void 0,Bg(r=[this,t,n.next]).call(r,hy(Array.prototype).call(arguments)))}).call(r,this)}function Zx(e,t){var r=this.__hooks;if(!r||!ng(r[e]))return-1;for(var n=r[e],i=0;i<n.length;i++)if(n[i]===t)return i;return-1}function jx(e,t){var r=this.__hooks;if(r)return r.hasOwnProperty(e)?(ng(r[e])||(r[e]=[]),-1===Zx.call(this,e,t)&&r[e].push(t),!0):(console.warn("has no supported hook which name [".concat(e,"]")),!1)}function Ax(e,t){var r=this.__hooks;if(r)if(ng(r[e])){var n=r[e],i=Zx.call(this,e,t);-1!==i&&Gk(n).call(n,i,1)}else r[e]&&(r[e]=null)}function Dx(e,t){var r;Tx.logError(Bg(r="[".concat(e,"] event or callback cant be undefined or null when call ")).call(r,t))}var Vx=function(){function e(t){PR(this,e),Ex.checkIsFunction(this.beforeCreate)&&this.beforeCreate(t),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.__hooks={},t&&vR(t).call(t,(function(t){e.__hooks[t]=null})),Af(e,"hooks",{get:function(){var t;return e.__hooks&&vR(t=Zc(e.__hooks)).call(t,(function(t){if(e.__hooks[t])return t}))}})}(this),this.__args=t,this.__events={},this.__onceEvents={},this.config=t.config||{},this.player=null,this.playerConfig={},this.pluginName="",this.__init(t)}return CR(e,[{key:"beforeCreate",value:function(e){}},{key:"afterCreate",value:function(){}},{key:"beforePlayerInit",value:function(){}},{key:"onPluginsReady",value:function(){}},{key:"afterPlayerInit",value:function(){}},{key:"destroy",value:function(){}},{key:"__init",value:function(e){this.player=e.player,this.playerConfig=e.player&&e.player.config,this.pluginName=e.pluginName?e.pluginName.toLowerCase():this.constructor.pluginName.toLowerCase(),this.logger=e.player&&e.player.logger}},{key:"updateLang",value:function(e){e||(e=this.lang)}},{key:"lang",get:function(){return this.player.lang}},{key:"i18n",get:function(){return this.player.i18n}},{key:"i18nKeys",get:function(){return this.player.i18nKeys}},{key:"domEventType",get:function(){var e=Ex.checkTouchSupport()?"touch":"mouse";return!this.playerConfig||"touch"!==this.playerConfig.domEventType&&"mouse"!==this.playerConfig.domEventType||(e=this.playerConfig.domEventType),e}},{key:"on",value:function(e,t){var r=this;e&&t&&this.player?"string"==typeof e?(this.__events[e]=t,this.player.on(e,t)):ng(e)&&cf(e).call(e,(function(e){r.__events[e]=t,r.player.on(e,t)})):Dx(this.pluginName,"plugin.on(event, callback)")}},{key:"once",value:function(e,t){var r=this;e&&t&&this.player?"string"==typeof e?(this.__onceEvents[e]=t,this.player.once(e,t)):ng(e)&&cf(e).call(e,(function(n){r.__onceEvents[n]=t,r.player.once(e,t)})):Dx(this.pluginName,"plugin.once(event, callback)")}},{key:"off",value:function(e,t){var r=this;e&&t&&this.player?"string"==typeof e?(delete this.__events[e],this.player.off(e,t)):ng(e)&&cf(e).call(e,(function(n){delete r.__events[e],r.player.off(n,t)})):Dx(this.pluginName,"plugin.off(event, callback)")}},{key:"offAll",value:function(){var e,t=this;cf(e=["__events","__onceEvents"]).call(e,(function(e){var r;cf(r=Zc(t[e])).call(r,(function(r){t[e][r]&&t.off(r,t[e][r]),r&&delete t[e][r]}))})),this.__events={},this.__onceEvents={}}},{key:"emit",value:function(e){var t,r;if(this.player){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];(r=this.player).emit.apply(r,Bg(t=[e]).call(t,i))}}},{key:"emitUserAction",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.player){var n=LR(LR({},r),{},{pluginName:this.pluginName});this.player.emitUserAction(e,t,n)}}},{key:"hook",value:function(e,t){var r;return Cx.call.apply(Cx,Bg(r=[this]).call(r,hy(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){for(var r,n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];return jx.call.apply(jx,Bg(r=[this]).call(r,hy(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){for(var r,n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];return Ax.call.apply(Ax,Bg(r=[this]).call(r,hy(Array.prototype).call(arguments)))}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(this.player)return r&&(t.pluginName=r),this.player.registerPlugin({plugin:e,options:t})}},{key:"getPlugin",value:function(e){return this.player?this.player.getPlugin(e):null}},{key:"__destroy",value:function(){var e,t=this,r=this.player,n=this.pluginName;this.offAll(),Ex.clearAllTimers(this),Ex.checkIsFunction(this.destroy)&&this.destroy(),vR(e=["player","playerConfig","pluginName","logger","__args","__hooks"]).call(e,(function(e){t[e]=null})),r.unRegisterPlugin(n),this.__hooks=null}}],[{key:"defineGetterOrSetter",value:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&Af(e,r,t[r])}},{key:"defineMethod",value:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&"function"==typeof t[r]&&Af(e,r,{configurable:!0,value:t[r]})}},{key:"defaultConfig",get:function(){return{}}},{key:"pluginName",get:function(){return"pluginName"}}]),e}(),Wx=te,Mx=f;Wx.JSON||(Wx.JSON={stringify:JSON.stringify});var Gx=function(e,t,r){return Mx(Wx.JSON.stringify,null,arguments)},Fx=r(Gx),Nx=ee,Ux=b,Xx=dt("match"),Hx=function(e){var t;return Nx(e)&&(void 0!==(t=e[Xx])?!!t:"RegExp"==Ux(e))},Bx=TypeError,Kx=dt("match"),Yx=ni.includes;Lr({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(e){return Yx(this,e,arguments.length>1?arguments[1]:void 0)}});var Jx=Vc("Array").includes,zx=Lr,Qx=function(e){if(Hx(e))throw Bx("The method doesn't accept regular expressions");return e},qx=Y,$x=Kn,eE=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[Kx]=!1,"/./"[e](t)}catch(n){}}return!1},tE=m("".indexOf);zx({target:"String",proto:!0,forced:!eE("includes")},{includes:function(e){return!!~tE($x(qx(this)),$x(Qx(e)),arguments.length>1?arguments[1]:void 0)}});var rE=Vc("String").includes,nE=se,iE=Jx,oE=rE,aE=Array.prototype,sE=String.prototype,uE=r((function(e){var t=e.includes;return e===aE||nE(aE,e)&&t===aE.includes?iE:"string"==typeof e||e===sE||nE(sE,e)&&t===sE.includes?oE:t})),lE={exports:{}},cE=o((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),fE=o,dE=ee,pE=b,hE=cE,vE=Object.isExtensible,mE=fE((function(){vE(1)}))||hE?function(e){return!!dE(e)&&((!hE||"ArrayBuffer"!=pE(e))&&(!vE||vE(e)))}:vE,yE=!o((function(){return Object.isExtensible(Object.preventExtensions({}))})),gE=Lr,_E=m,bE=ii,wE=ee,SE=qe,kE=Qt.f,RE=Gi,TE=Ui,xE=mE,EE=yE,LE=!1,OE=nt("meta"),PE=0,IE=function(e){kE(e,OE,{value:{objectID:"O"+PE++,weakData:{}}})},CE=lE.exports={enable:function(){CE.enable=function(){},LE=!0;var e=RE.f,t=_E([].splice),r={};r[OE]=1,e(r).length&&(RE.f=function(r){for(var n=e(r),i=0,o=n.length;i<o;i++)if(n[i]===OE){t(n,i,1);break}return n},gE({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:TE.f}))},fastKey:function(e,t){if(!wE(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!SE(e,OE)){if(!xE(e))return"F";if(!t)return"E";IE(e)}return e[OE].objectID},getWeakData:function(e,t){if(!SE(e,OE)){if(!xE(e))return!0;if(!t)return!1;IE(e)}return e[OE].weakData},onFreeze:function(e){return EE&&LE&&xE(e)&&!SE(e,OE)&&IE(e),e}};bE[OE]=!0;var ZE=lE.exports,jE=Lr,AE=i,DE=ZE,VE=o,WE=mr,ME=jd,GE=fp,FE=E,NE=ee,UE=Po,XE=Qt.f,HE=ea.forEach,BE=O,KE=Bo.set,YE=Bo.getterFor,JE=Mi,zE=oo,QE=B_,qE=zt,$E=fp,eL=H,tL=jd,rL=hl,nL=vl,iL=up,oL=O,aL=ZE.fastKey,sL=Bo.set,uL=Bo.getterFor,lL={getConstructor:function(e,t,r,n){var i=e((function(e,i){$E(e,o),sL(e,{type:t,index:JE(null),first:void 0,last:void 0,size:0}),oL||(e.size=0),eL(i)||tL(i,e[n],{that:e,AS_ENTRIES:r})})),o=i.prototype,a=uL(t),s=function(e,t,r){var n,i,o=a(e),s=u(e,t);return s?s.value=r:(o.last=s={index:i=aL(t,!0),key:t,value:r,previous:n=o.last,next:void 0,removed:!1},o.first||(o.first=s),n&&(n.next=s),oL?o.size++:e.size++,"F"!==i&&(o.index[i]=s)),e},u=function(e,t){var r,n=a(e),i=aL(t);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key==t)return r};return QE(o,{clear:function(){for(var e=a(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,oL?e.size=0:this.size=0},delete:function(e){var t=this,r=a(t),n=u(t,e);if(n){var i=n.next,o=n.previous;delete r.index[n.index],n.removed=!0,o&&(o.next=i),i&&(i.previous=o),r.first==n&&(r.first=i),r.last==n&&(r.last=o),oL?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=a(this),n=qE(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!u(this,e)}}),QE(o,r?{get:function(e){var t=u(this,e);return t&&t.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),oL&&zE(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(e,t,r){var n=t+" Iterator",i=uL(t),o=uL(n);rL(e,t,(function(e,t){sL(this,{type:n,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?nL("keys"==t?r.key:"values"==t?r.value:[r.key,r.value],!1):(e.target=void 0,nL(void 0,!0))}),r?"entries":"values",!r,!0),iL(t)}};(function(e,t,r){var n,i=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),a=i?"set":"add",s=AE[e],u=s&&s.prototype,l={};if(BE&&FE(s)&&(o||u.forEach&&!VE((function(){(new s).entries().next()})))){var c=(n=t((function(t,r){KE(GE(t,c),{type:e,collection:new s}),null!=r&&ME(r,t[a],{that:t,AS_ENTRIES:i})}))).prototype,f=YE(e);HE(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in u)||o&&"clear"==e||WE(c,e,(function(r,n){var i=f(this).collection;if(!t&&o&&!NE(r))return"get"==e&&void 0;var a=i[e](0===r?0:r,n);return t?this:a}))})),o||XE(c,"size",{configurable:!0,get:function(){return f(this).collection.size}})}else n=r.getConstructor(t,e,i,a),DE.enable();UE(n,e,!1,!0),l[e]=n,jE({global:!0,forced:!0},l),o||r.setStrong(n,e,i)})("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),lL);var cL=te.Map,fL=zt,dL=C,pL=Ie,hL=vp,vL=H,mL=jd,yL=[].push,gL=function(e){var t,r,n,i,o=arguments.length,a=o>1?arguments[1]:void 0;return hL(this),(t=void 0!==a)&&pL(a),vL(e)?new this:(r=[],t?(n=0,i=fL(a,o>2?arguments[2]:void 0),mL(e,(function(e){dL(yL,r,i(e,n++))}))):mL(e,yL,{that:r}),new this(r))};Lr({target:"Map",stat:!0,forced:!0},{from:gL});var _L=Rs,bL=function(){return new this(_L(arguments))};Lr({target:"Map",stat:!0,forced:!0},{of:bL});var wL=Ee,SL=function(e){if("object"==typeof e&&"size"in e&&"has"in e&&"get"in e&&"set"in e&&"delete"in e&&"entries"in e)return e;throw TypeError(wL(e)+" is not a map")},kL=function(e,t){return 1==t?function(t,r){return t[e](r)}:function(t,r,n){return t[e](r,n)}},RL=ae("Map"),TL={Map:RL,set:kL("set",2),get:kL("get",1),has:kL("has",1),remove:kL("delete",1),proto:RL.prototype},xL=SL,EL=TL.remove;Lr({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=xL(this),r=!0,n=0,i=arguments.length;n<i;n++)e=EL(t,arguments[n]),r=r&&e;return!!r}});var LL=SL,OL=TL.get,PL=TL.has,IL=TL.set;Lr({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var r,n,i=LL(this);return PL(i,e)?(r=OL(i,e),"update"in t&&(r=t.update(r,e,i),IL(i,e,r)),r):(n=t.insert(e,i),IL(i,e,n),n)}});var CL=C,ZL=function(e,t,r){for(var n,i,o=r||e.next;!(n=CL(o,e)).done;)if(void 0!==(i=t(n.value)))return i},jL=function(e,t,r){return r?ZL(e.entries(),(function(e){return t(e[1],e[0])})):e.forEach(t)},AL=zt,DL=SL,VL=jL;Lr({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=DL(this),r=AL(e,arguments.length>1?arguments[1]:void 0);return!1!==VL(t,(function(e,n){if(!r(e,n,t))return!1}),!0)}});var WL=zt,ML=SL,GL=jL,FL=TL.Map,NL=TL.set;Lr({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=ML(this),r=WL(e,arguments.length>1?arguments[1]:void 0),n=new FL;return GL(t,(function(e,i){r(e,i,t)&&NL(n,i,e)})),n}});var UL=zt,XL=SL,HL=jL;Lr({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=XL(this),r=UL(e,arguments.length>1?arguments[1]:void 0),n=HL(t,(function(e,n){if(r(e,n,t))return{value:e}}),!0);return n&&n.value}});var BL=zt,KL=SL,YL=jL;Lr({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=KL(this),r=BL(e,arguments.length>1?arguments[1]:void 0),n=YL(t,(function(e,n){if(r(e,n,t))return{key:n}}),!0);return n&&n.key}});var JL=Lr,zL=C,QL=E,qL=Ie,$L=jd,eO=TL.Map,tO=m([].push);JL({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){var r=new(QL(this)?this:eO);qL(t);var n=qL(r.has),i=qL(r.get),o=qL(r.set);return $L(e,(function(e){var a=t(e);zL(n,r,a)?tO(zL(i,r,a),e):zL(o,r,a,[e])})),r}});var rO=function(e,t){return e===t||e!=e&&t!=t},nO=SL,iO=jL;Lr({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===iO(nO(this),(function(t){if(rO(t,e))return!0}),!0)}});var oO=C,aO=jd,sO=E,uO=Ie,lO=TL.Map;Lr({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var r=new(sO(this)?this:lO);uO(t);var n=uO(r.set);return aO(e,(function(e){oO(n,r,t(e),e)})),r}});var cO=SL,fO=jL;Lr({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=fO(cO(this),(function(t,r){if(t===e)return{key:r}}),!0);return t&&t.key}});var dO=zt,pO=SL,hO=jL,vO=TL.Map,mO=TL.set;Lr({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=pO(this),r=dO(e,arguments.length>1?arguments[1]:void 0),n=new vO;return hO(t,(function(e,i){mO(n,r(e,i,t),e)})),n}});var yO=zt,gO=SL,_O=jL,bO=TL.Map,wO=TL.set;Lr({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=gO(this),r=yO(e,arguments.length>1?arguments[1]:void 0),n=new bO;return _O(t,(function(e,i){wO(n,i,r(e,i,t))})),n}});var SO=SL,kO=jd,RO=TL.set;Lr({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=SO(this),r=arguments.length,n=0;n<r;)kO(arguments[n++],(function(e,r){RO(t,e,r)}),{AS_ENTRIES:!0});return t}});var TO=Ie,xO=SL,EO=jL,LO=TypeError;Lr({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=xO(this),r=arguments.length<2,n=r?void 0:arguments[1];if(TO(e),EO(t,(function(i,o){r?(r=!1,n=i):n=e(n,i,o,t)})),r)throw LO("Reduce of empty map with no initial value");return n}});var OO=zt,PO=SL,IO=jL;Lr({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=PO(this),r=OO(e,arguments.length>1?arguments[1]:void 0);return!0===IO(t,(function(e,n){if(r(e,n,t))return!0}),!0)}});var CO=Ie,ZO=SL,jO=TypeError,AO=TL.get,DO=TL.has,VO=TL.set;Lr({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var r=ZO(this),n=arguments.length;CO(t);var i=DO(r,e);if(!i&&n<3)throw jO("Updating absent value");var o=i?AO(r,e):CO(n>2?arguments[2]:void 0)(e,r);return VO(r,e,t(o,e,r)),r}});var WO=C,MO=Ie,GO=E,FO=rr,NO=TypeError,UO=function(e,t){var r,n=FO(this),i=MO(n.get),o=MO(n.has),a=MO(n.set),s=arguments.length>2?arguments[2]:void 0;if(!GO(t)&&!GO(s))throw NO("At least one callback required");return WO(o,n,e)?(r=WO(i,n,e),GO(t)&&(r=t(r),WO(a,n,e,r))):GO(s)&&(r=s(),WO(a,n,e,r)),r};Lr({target:"Map",proto:!0,real:!0,forced:!0},{upsert:UO}),Lr({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:UO});var XO=r(cL);function HO(e,t){var r=Zc(e);if(jc){var n=jc(e);t&&(n=Nc(n).call(n,(function(t){return Qc(e,t).enumerable}))),r.push.apply(r,n)}return r}function BO(e){for(var t=1;t<arguments.length;t++){var r,n,i=null!=arguments[t]?arguments[t]:{};t%2?cf(r=HO(Object(i),!0)).call(r,(function(t){eP(e,t,i[t])})):wf?Lf(e,wf(i)):cf(n=HO(Object(i))).call(n,(function(t){Af(e,t,Qc(i,t))}))}return e}function KO(){KO=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Af||function(e,t,r){e[t]=r.value},i="function"==typeof kc?kc:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Af(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(E){u=function(e,t,r){return e[t]=r}}function l(e,t,r,i){var o=t&&t.prototype instanceof d?t:d,a=Vf(o.prototype),s=new R(i||[]);return n(a,"_invoke",{value:b(e,r,s)}),a}function c(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(E){return{type:"throw",arg:E}}}e.wrap=l;var f={};function d(){}function p(){}function h(){}var v={};u(v,o,(function(){return this}));var m=Ff&&Ff(Ff(T([])));m&&m!==t&&r.call(m,o)&&(v=m);var y=h.prototype=d.prototype=Vf(v);function g(e){var t;cf(t=["next","throw","return"]).call(t,(function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(n,o,a,s){var u=c(e[n],e,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==Sc(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return i("throw",e,a,s)}))}s(u.arg)}var o;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return o=o?o.then(n,n):n()}})}function b(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=w(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=c(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var i=c(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,f;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],cf(e).call(e,S,this),this.reset(!0)}function T(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:x}}function x(){return{value:void 0,done:!0}}return p.prototype=h,n(y,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:p,configurable:!0}),p.displayName=u(h,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Nf?Nf(e,h):(e.__proto__=h,u(e,s,"GeneratorFunction")),e.prototype=Vf(y),e},e.awrap=function(e){return{__await:e}},g(_.prototype),u(_.prototype,a,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,i,o){void 0===o&&(o=Gm);var a=new _(l(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(y),u(y,s,"Generator"),u(y,o,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return Jm(r).call(r),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=T,R.prototype={constructor:R,reset:function(e){var t;if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,cf(t=this.tryEntries).call(t,k),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+hy(n).call(n,1))&&(this[n]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),k(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;k(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:T(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function YO(e){return(YO="function"==typeof kc&&"symbol"==typeof gR?function(e){return typeof e}:function(e){return e&&"function"==typeof kc&&e.constructor===kc&&e!==kc.prototype?"symbol":typeof e})(e)}function JO(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(PC){return void r(PC)}s.done?t(u):Gm.resolve(u).then(n,i)}function zO(e){return function(){var t=this,r=arguments;return new Gm((function(n,i){var o=e.apply(t,r);function a(e){JO(o,n,i,a,s,"next",e)}function s(e){JO(o,n,i,a,s,"throw",e)}a(void 0)}))}}function QO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qO(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Af(e,pP(n.key),n)}}function $O(e,t,r){return t&&qO(e.prototype,t),r&&qO(e,r),Af(e,"prototype",{writable:!1}),e}function eP(e,t,r){return(t=pP(t))in e?Af(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tP(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Vf(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Af(e,"prototype",{writable:!1}),t&&nP(e,t)}function rP(e){var t;return(rP=Nf?Iy(t=Ff).call(t):function(e){return e.__proto__||Ff(e)})(e)}function nP(e,t){var r;return(nP=Nf?Iy(r=Nf).call(r):function(e,t){return e.__proto__=t,e})(e,t)}function iP(){if("undefined"==typeof Reflect||!By)return!1;if(By.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(By(Boolean,[],(function(){}))),!0}catch(e){return!1}}function oP(e,t,r){var n;iP()?oP=Iy(n=By).call(n):oP=function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Iy(Function).apply(e,n));return r&&nP(i,r.prototype),i};return oP.apply(null,arguments)}function aP(e){var t="function"==typeof XO?new XO:void 0;return aP=function(e){if(null===e||(r=e,-1===rg(n=Function.toString.call(r)).call(n,"[native code]")))return e;var r,n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return oP(e,arguments,rP(this).constructor)}return i.prototype=Vf(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),nP(i,e)},aP(e)}function sP(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Zc(e);for(n=0;n<o.length;n++)r=o[n],rg(t).call(t,r)>=0||(i[r]=e[r]);return i}(e,t);if(jc){var o=jc(e);for(n=0;n<o.length;n++)r=o[n],rg(t).call(t,r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function uP(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lP(e){var t=iP();return function(){var r,n=rP(e);if(t){var i=rP(this).constructor;r=By(n,arguments,i)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===Sc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return uP(e)}(this,r)}}function cP(){var e;"undefined"!=typeof Reflect&&xR?cP=Iy(e=xR).call(e):cP=function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=rP(e)););return e}(e,t);if(n){var i=Qc(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}};return cP.apply(this,arguments)}function fP(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function dP(e,t){var r=void 0!==kc&&Pc(e)||e["@@iterator"];if(!r){if(ng(e)||(r=function(e,t){var r;if(e){if("string"==typeof e)return fP(e,t);var n=hy(r=Object.prototype.toString.call(e)).call(r,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?_g(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fP(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function pP(e){var t=function(e,t){if("object"!==Sc(e)||null===e)return e;var r=e[bg];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Sc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Sc(t)?t:String(t)}var hP=Ie,vP=Je,mP=X,yP=Mr,gP=TypeError,_P=function(e){return function(t,r,n,i){hP(r);var o=vP(t),a=mP(o),s=yP(o),u=e?s-1:0,l=e?-1:1;if(n<2)for(;;){if(u in a){i=a[u],u+=l;break}if(u+=l,e?u<0:s<=u)throw gP("Reduce of empty array with no initial value")}for(;e?u>=0:s>u;u+=l)u in a&&(i=r(i,a[u],u,o));return i}},bP={left:_P(!1),right:_P(!0)}.left;Lr({target:"Array",proto:!0,forced:!np&&ve>79&&ve<83||!$c("reduce")},{reduce:function(e){var t=arguments.length;return bP(this,e,t,t>1?arguments[1]:void 0)}});var wP,SP=Vc("Array").reduce,kP=se,RP=SP,TP=Array.prototype,xP=r((function(e){var t=e.reduce;return e===TP||kP(TP,e)&&t===TP.reduce?RP:t})),EP="network",LP="network_timeout",OP="network_forbidden",PP="network_notfound",IP="network_range_not_satisfiable",CP="demux",ZP="remux",jP="media",AP="drm",DP="other",VP="runtime",WP={FLV:"FLV",HLS:"HLS",MP4:"MP4",FMP4:"FMP4",MSE_ADD_SB:"MSE_ADD_SB",MSE_APPEND_BUFFER:"MSE_APPEND_BUFFER",MSE_OTHER:"MSE_OTHER",MSE_FULL:"MSE_FULL",OPTION:"OPTION",DASH:"DASH",LICENSE:"LICENSE",CUSTOM_LICENSE:"CUSTOM_LICENSE",MSE_HIJACK:"MSE_HIJACK",EME_HIJACK:"EME_HIJACK",SIDX:"SIDX",NO_CANPLAY_ERROR:"NO_CANPLAY_ERROR",BUFFERBREAK_ERROR:"BUFFERBREAK_ERROR",WAITING_TIMEOUT_ERROR:"WAITING_TIMEOUT_ERROR",MEDIA_ERR_ABORTED:"MEDIA_ERR_ABORTED",MEDIA_ERR_NETWORK:"MEDIA_ERR_NETWORK",MEDIA_ERR_DECODE:"MEDIA_ERR_DECODE",MEDIA_ERR_SRC_NOT_SUPPORTED:"MEDIA_ERR_SRC_NOT_SUPPORTED",MEDIA_ERR_CODEC_NOT_SUPPORTED:"MEDIA_ERR_CODEC_NOT_SUPPORTED",MEDIA_ERR_URL_EMPTY:"MEDIA_ERR_URL_EMPTY"},MP=(eP(wP={},"manifest",{HLS:1100,DASH:1200}),eP(wP,EP,2100),eP(wP,LP,2101),eP(wP,OP,2103),eP(wP,PP,2104),eP(wP,IP,2116),eP(wP,CP,{FLV:3100,HLS:3200,MP4:3300,FMP4:3400,SIDX:3410}),eP(wP,ZP,{FMP4:4100,MP4:4200}),eP(wP,jP,{MEDIA_ERR_ABORTED:5101,MEDIA_ERR_NETWORK:5102,MEDIA_ERR_DECODE:5103,MEDIA_ERR_SRC_NOT_SUPPORTED:5104,MEDIA_ERR_CODEC_NOT_SUPPORTED:5105,MEDIA_ERR_URL_EMPTY:5106,MSE_ADD_SB:5200,MSE_APPEND_BUFFER:5201,MSE_OTHER:5202,MSE_FULL:5203,MSE_HIJACK:5204,EME_HIJACK:5301}),eP(wP,AP,{LICENSE:7100,CUSTOM_LICENSE:7200}),eP(wP,DP,8e3),eP(wP,VP,{NO_CANPLAY_ERROR:9001,BUFFERBREAK_ERROR:9002,WAITING_TIMEOUT_ERROR:9003}),wP),GP=function(e){tP(r,e);var t=lP(r);function r(e,n,i,o,a){var s;return QO(this,r),(s=t.call(this,a||(null==i?void 0:i.message))).errorType=e===LP?EP:e,s.originError=i,s.ext=o,s.errorCode=MP[e][n]||MP[e],s.errorMessage=s.message,s.errorCode||(s.errorType=DP,s.errorCode=MP[s.errorType]),s}return $O(r,null,[{key:"create",value:function(e,t,n,i,o){return e instanceof r?e:(e instanceof Error&&(n=e,e=""),e||(e=DP),new r(e,t,n,i,o))}},{key:"network",value:function(e){var t;return new r(null!=e&&e.isTimeout?LP:EP,null,e instanceof Error?e:null,{url:null==e?void 0:e.url,response:null==e?void 0:e.response,httpCode:null==e||null===(t=e.response)||void 0===t?void 0:t.status})}}]),r}(aP(Error)),FP=1,NP=2,UP=3,XP=4,HP=["Boolean","Number","String","Undefined","Null","Date","Object"],BP=function(){function e(t,r){QO(this,e),this.name=t||"",this._prefix="[".concat(this.name,"]"),this.logCacheLevel=(null==r?void 0:r.logCacheLevel)||3,this.logMaxSize=(null==r?void 0:r.logMaxSize)||204800,this.logSize=0,this.logTextArray=[]}return $O(e,[{key:"debug",value:function(){for(var t,r,n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,Bg(t=[FP]).call(t,o)),e.disabled||(n=console).debug.apply(n,Bg(r=[this._prefix,KP()]).call(r,o))}},{key:"log",value:function(){for(var t,r,n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,Bg(t=[NP]).call(t,o)),e.disabled||(n=console).log.apply(n,Bg(r=[this._prefix,KP()]).call(r,o))}},{key:"warn",value:function(){for(var t,r,n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,Bg(t=[UP]).call(t,o)),e.disabled||(n=console).warn.apply(n,Bg(r=[this._prefix,KP()]).call(r,o))}},{key:"error",value:function(){for(var t,r,n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,Bg(t=[XP]).call(t,o)),e.disabled||(n=console).error.apply(n,Bg(r=[this._prefix,KP()]).call(r,o))}},{key:"logCache",value:function(e){if(!(e<this.logCacheLevel)){var t="";try{for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];var o=vR(n).call(n,(function(e){return JP(e)}));t=this._prefix+KP()+Fx(o)}catch(s){return}if(e>=this.logCacheLevel&&(this.logSize+=t.length,this.logTextArray.push(t)),this.logSize>this.logMaxSize){var a=this.logTextArray.shift();this.logSize-=a.length}}}},{key:"getLogCache",value:function(){var e=this.logTextArray.join("\n");return this.reset(),e}},{key:"reset",value:function(){this.logTextArray=[],this.logSize=0}},{key:"table",value:function(){var t;e.disabled||(console.group(this._prefix),(t=console).table.apply(t,arguments),console.groupEnd())}},{key:"setLogLevel",value:function(e){this.logCacheLevel=e}}],[{key:"enable",value:function(){e.disabled=!1}},{key:"disable",value:function(){e.disabled=!0}}]),e}();function KP(){return(new Date).toLocaleString()}function YP(e){var t;if("object"!==YO(e))return e;var r=hy(t=Object.prototype.toString.call(e)).call(t,8,-1);switch(r){case"Array":case"Uint8Array":case"ArrayBuffer":return r+"["+e.length+"]";case"Object":return"{}";default:return r}}function JP(e,t,r){var n;r||(r=1),t||(t=2);var i={};if(!e||"object"!==YO(e))return e;var o=hy(n=Object.prototype.toString.call(e)).call(n,8,-1);if(!uE(HP).call(HP,o))return o;if(!(r>t)){for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r===t?i[a]=YP(e[a]):"object"===YO(e[a])?i[a]=JP(e[a],t,r+1):i[a]=e[a]);return i}}eP(BP,"disabled",!0);var zP="fetch",QP="xhr",qP="arraybuffer",$P="text",eI="json",tI=function(e){tP(r,e);var t=lP(r);function r(e,n,i,o){var a;return QO(this,r),eP(uP(a=t.call(this,o)),"retryCount",0),eP(uP(a),"isTimeout",!1),eP(uP(a),"loaderType",zP),eP(uP(a),"startTime",0),eP(uP(a),"endTime",0),eP(uP(a),"options",{}),a.url=e,a.request=n,a.response=i,a}return $O(r)}(aP(Error)),rI=Object.prototype.toString;function nI(e){if("[object Object]"!==rI.call(e))return!1;var t=Ff(e);return null===t||t===Object.prototype}function iI(e){if(e&&null!==e[0]&&void 0!==e[0]&&(0!==e[0]||null!==e[1]&&void 0!==e[1])){var t="bytes="+e[0]+"-";return e[1]&&(t+=e[1]),t}}function oI(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function aI(e,t){var r,n;if(e){if(!t)return e;var i,o=Nc(r=vR(n=Zc(t)).call(n,(function(e){if(null!=(i=t[e]))return ng(i)?e+="[]":i=[i],vR(i).call(i,(function(t){var r,n;return n=t,"[object Date]"===rI.call(n)?t=t.toISOString():function(e){return null!==e&&"object"===YO(e)}(t)&&(t=Fx(t)),Bg(r="".concat(oI(e),"=")).call(r,oI(t))})).join("&")}))).call(r,Boolean).join("&");if(o){var a=rg(e).call(e,"#");-1!==a&&(e=hy(e).call(e,0,a)),e+=(-1===rg(e).call(e,"?")?"?":"&")+o}return e}}function sI(e,t,r,n,i,o,a,s,u,l,c){return i=null!=i?LT(i):null,n=lR(n||"0",10),Fk(n)&&(n=0),{data:e,done:t,options:{range:u,vid:l,index:s,contentLength:n,age:i,startTime:o,firstByteTime:a,endTime:_x(),priOptions:c},response:r}}function uI(e,t){return Math.round(8*e*1e3/t/1024)}var lI="error",cI="core.ttfb",fI="core.loadstart",dI="core.loadresponseheaders",pI="core.loadcomplete",hI="core.loadretry",vI="core.metadataparsed",mI="core.sei",yI="real_time_speed",gI=2097152,_I=function(e){tP(n,e);var t,r=lP(n);function n(){var e;return QO(this,n),eP(uP(e=r.call(this)),"_abortController",null),eP(uP(e),"_timeoutTimer",null),eP(uP(e),"_reader",null),eP(uP(e),"_response",null),eP(uP(e),"_aborted",!1),eP(uP(e),"_index",-1),eP(uP(e),"_range",null),eP(uP(e),"_receivedLength",0),eP(uP(e),"_running",!1),eP(uP(e),"_logger",null),eP(uP(e),"_vid",""),eP(uP(e),"_onProcessMinLen",0),eP(uP(e),"_onCancel",null),eP(uP(e),"_priOptions",null),e}return $O(n,[{key:"load",value:function(e){var t,r=this,n=e.url,i=e.vid,o=e.timeout,a=e.responseType,s=e.onProgress,u=e.index,l=e.onTimeout,c=e.onCancel,f=e.range,d=e.transformResponse,p=e.request,h=e.params,v=e.logger,m=e.method,y=e.headers,g=e.body,_=e.mode,b=e.credentials,w=e.cache,S=e.redirect,k=e.referrer,R=e.referrerPolicy,T=e.onProcessMinLen,x=e.priOptions;this._logger=v,this._aborted=!1,this._onProcessMinLen=T,this._onCancel=c,this._abortController="undefined"!=typeof AbortController&&new AbortController,this._running=!0,this._index=u,this._range=f||[0,0],this._vid=i||n,this._priOptions=x||{};var E={method:m,headers:y,body:g,mode:_,credentials:b,cache:w,redirect:S,referrer:k,referrerPolicy:R,signal:null===(t=this._abortController)||void 0===t?void 0:t.signal},L=!1;clearTimeout(this._timeoutTimer),n=aI(n,h);var O=iI(f);O&&(y=p?p.headers:E.headers=E.headers||(Headers?new Headers:{}),Headers&&y instanceof Headers?y.append("Range",O):y.Range=O),o&&(this._timeoutTimer=c_((function(){if(L=!0,r.cancel(),l){var e=new tI(n,E,null,"timeout");e.isTimeout=!0,l(e,{index:r._index,range:r._range,vid:r._vid,priOptions:r._priOptions})}}),o));var P=_x();return this._logger.debug("[fetch load start], index,",u,",range,",f),new Gm((function(e,t){fetch(p||n,p?void 0:E).then(function(){var i=zO(KO().mark((function i(o){var l,c,p,h;return KO().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(clearTimeout(r._timeoutTimer),r._response=o,!r._aborted&&r._running){i.next=4;break}return i.abrupt("return");case 4:if(d&&(o=d(o,n)||o),o.ok){i.next=7;break}throw new tI(n,E,o,"bad network response");case 7:if(l=_x(),a!==$P){i.next=15;break}return i.next=11,o.text();case 11:c=i.sent,r._running=!1,i.next=37;break;case 15:if(a!==eI){i.next=22;break}return i.next=18,o.json();case 18:c=i.sent,r._running=!1,i.next=37;break;case 22:if(!s){i.next=29;break}return r.resolve=e,r.reject=t,r._loadChunk(o,s,P,l),i.abrupt("return");case 29:return i.next=31,o.arrayBuffer();case 31:c=i.sent,c=new Uint8Array(c),r._running=!1,p=_x()-P,h=uI(c.byteLength,p),r.emit(yI,{speed:h,len:c.byteLength,time:p,vid:r._vid,index:r._index,range:r._range,priOptions:r._priOptions});case 37:r._logger.debug("[fetch load end], index,",u,",range,",f),e(sI(c,!0,o,o.headers.get("Content-Length"),o.headers.get("age"),P,l,u,f,r._vid,r._priOptions));case 39:case"end":return i.stop()}}),i)})));return function(e){return i.apply(this,arguments)}}()).catch((function(e){var i;clearTimeout(r._timeoutTimer),r._running=!1,r._aborted&&!L||((e=e instanceof tI?e:new tI(n,E,null,null===(i=e)||void 0===i?void 0:i.message)).startTime=P,e.endTime=_x(),e.isTimeout=L,e.options={index:r._index,range:r._range,vid:r._vid,priOptions:r._priOptions},t(e))}))}))}},{key:"cancel",value:(t=zO(KO().mark((function e(){return KO().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._aborted){e.next=2;break}return e.abrupt("return");case 2:if(this._aborted=!0,this._running=!1,!this._response){e.next=14;break}if(e.prev=5,!this._reader){e.next=9;break}return e.next=9,this._reader.cancel();case 9:e.next=13;break;case 11:e.prev=11,e.t0=e.catch(5);case 13:this._response=this._reader=null;case 14:if(this._abortController){try{this._abortController.abort()}catch(PC){}this._abortController=null}this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions});case 16:case"end":return e.stop()}}),e,this,[[5,11]])}))),function(){return t.apply(this,arguments)})},{key:"_loadChunk",value:function(e,t,r,n){var i=this;if(!e.body||!e.body.getReader){this._running=!1;var o=new tI(e.url,"",e,"onProgress of bad response.body.getReader");return o.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},void this.reject(o)}this._onProcessMinLen>0&&(this._cache=new Uint8Array(gI),this._writeIdx=0);var a,s,u,l=this._reader=e.body.getReader(),c=function(){var o=zO(KO().mark((function o(){var f,d,p,h,v,m,y,g;return KO().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return s=_x(),o.prev=1,o.next=4,l.read();case 4:a=o.sent,u=_x(),o.next=13;break;case 8:return o.prev=8,o.t0=o.catch(1),u=_x(),i._aborted||(i._running=!1,o.t0.options={index:i._index,range:i._range,vid:i._vid,priOptions:i._priOptions},i.reject(o.t0)),o.abrupt("return");case 13:if(d=(null===(f=i._range)||void 0===f?void 0:f.length)>0?i._range[0]:0,p=d+i._receivedLength,!i._aborted){o.next=19;break}return i._running=!1,t(void 0,!1,{range:[p,p],vid:i._vid,index:i._index,startTime:s,endTime:u,st:r,firstByteTime:n,priOptions:i._priOptions},e),o.abrupt("return");case 19:var _;if(h=a.value?a.value.byteLength:0,i._receivedLength+=h,i._logger.debug("【fetchLoader,onProgress call】,task,",i._range,", start,",p,", end,",d+i._receivedLength,", done,",a.done),i._onProcessMinLen>0){if(i._writeIdx+h>=i._onProcessMinLen||a.done)(v=new Uint8Array(i._writeIdx+h)).set(hy(_=i._cache).call(_,0,i._writeIdx),0),h>0&&v.set(a.value,i._writeIdx),i._writeIdx=0,i._logger.debug("【fetchLoader,onProgress enough】,done,",a.done,",len,",v.byteLength,", writeIdx,",i._writeIdx);else if(h>0&&i._writeIdx+h<gI)i._cache.set(a.value,i._writeIdx),i._writeIdx+=h,i._logger.debug("【fetchLoader,onProgress cache】,len,",h,", writeIdx,",i._writeIdx);else if(h>0){var b;m=new Uint8Array(i._writeIdx+h+2048),i._logger.debug("【fetchLoader,onProgress extra start】,size,",i._writeIdx+h+2048,", datalen,",h,", writeIdx,",i._writeIdx),m.set(hy(b=i._cache).call(b,0,i._writeIdx),0),h>0&&m.set(a.value,i._writeIdx),i._writeIdx+=h,delete i._cache,i._cache=m,i._logger.debug("【fetchLoader,onProgress extra end】,len,",h,", writeIdx,",i._writeIdx)}}else v=a.value;(v&&v.byteLength>0||a.done)&&t(v,a.done,{range:[i._range[0]+i._receivedLength-(v?v.byteLength:0),i._range[0]+i._receivedLength],vid:i._vid,index:i._index,startTime:s,endTime:u,st:r,firstByteTime:n,priOptions:i._priOptions},e),a.done?(y=_x()-r,g=uI(i._receivedLength,y),i.emit(yI,{speed:g,len:i._receivedLength,time:y,vid:i._vid,index:i._index,range:i._range,priOptions:i._priOptions}),i._running=!1,i._logger.debug("[fetchLoader onProgress end],task,",i._range,",done,",a.done),i.resolve(sI(a,!0,e,e.headers.get("Content-Length"),e.headers.get("age"),r,n,i._index,i._range,i._vid,i._priOptions))):c();case 25:case"end":return o.stop()}}),o,null,[[1,8]])})));return function(){return o.apply(this,arguments)}}();c()}},{key:"receiveLen",get:function(){return this._receivedLength}},{key:"running",get:function(){return this._running},set:function(e){this._running=e}}],[{key:"isSupported",value:function(){return!("undefined"==typeof fetch)}}]),n}(WR);var bI=function(e){tP(r,e);var t=lP(r);function r(){var e;return QO(this,r),eP(uP(e=t.call(this)),"_xhr",null),eP(uP(e),"_aborted",!1),eP(uP(e),"_timeoutTimer",null),eP(uP(e),"_range",null),eP(uP(e),"_receivedLength",0),eP(uP(e),"_url",null),eP(uP(e),"_onProgress",null),eP(uP(e),"_index",-1),eP(uP(e),"_headers",null),eP(uP(e),"_currentChunkSizeKB",384),eP(uP(e),"_timeout",null),eP(uP(e),"_xhr",null),eP(uP(e),"_withCredentials",null),eP(uP(e),"_startTime",-1),eP(uP(e),"_loadCompleteResolve",null),eP(uP(e),"_loadCompleteReject",null),eP(uP(e),"_runing",!1),eP(uP(e),"_logger",!1),eP(uP(e),"_vid",""),eP(uP(e),"_responseType",void 0),eP(uP(e),"_credentials",void 0),eP(uP(e),"_method",void 0),eP(uP(e),"_transformResponse",void 0),eP(uP(e),"_firstRtt",void 0),eP(uP(e),"_onCancel",null),eP(uP(e),"_priOptions",null),e}return $O(r,[{key:"load",value:function(e){var t=this;clearTimeout(this._timeoutTimer),this._logger=e.logger,this._range=e.range,this._onProgress=e.onProgress,this._index=e.index,this._headers=e.headers,this._withCredentials="include"===e.credentials||"same-origin"===e.credentials,this._body=e.body||null,e.method&&(this._method=e.method),this._timeout=e.timeout||null,this._runing=!0,this._vid=e.vid||e.url,this._responseType=e.responseType,this._firstRtt=-1,this._onTimeout=e.onTimeout,this._onCancel=e.onCancel,this._request=e.request,this._priOptions=e.priOptions||{},this._logger.debug("【xhrLoader task】, range",this._range),this._url=aI(e.url,e.params);var r=_x();return new Gm((function(e,r){t._loadCompleteResolve=e,t._loadCompleteReject=r,t._startLoad()})).catch((function(e){if(clearTimeout(t._timeoutTimer),t._runing=!1,!t._aborted)throw(e=e instanceof tI?e:new tI(t._url,t._request)).startTime=r,e.endTime=_x(),e.options={index:t._index,vid:t._vid,priOptions:t._priOptions},e}))}},{key:"_startLoad",value:function(){var e=null;if(this._responseType===qP&&this._range&&this._range.length>1)if(this._onProgress){this._firstRtt=-1;var t=1024*this._currentChunkSizeKB,r=this._range[0]+this._receivedLength,n=this._range[1];t<this._range[1]-r&&(n=r+t),e=[r,n],this._logger.debug("[xhr_loader->],tast :",this._range,", SubRange, ",e)}else e=this._range,this._logger.debug("[xhr_loader->],tast :",this._range,", allRange, ",e);this._internalOpen(e)}},{key:"_internalOpen",value:function(e){var t=this;try{var r,n;this._startTime=_x();var i=this._xhr=new XMLHttpRequest;i.open(this._method||"GET",this._url,!0),i.responseType=this._responseType,this._timeout&&(i.timeout=this._timeout),i.withCredentials=this._withCredentials,i.onload=Iy(r=this._onLoad).call(r,this),i.onreadystatechange=Iy(n=this._onReadyStatechange).call(n,this),i.onerror=function(e){var r,n,i;t._running=!1;var o=new tI(t._url,t._request,null==e||null===(r=e.currentTarget)||void 0===r?void 0:r.response,"xhr.onerror.status:"+(null==e||null===(n=e.currentTarget)||void 0===n?void 0:n.status)+",statusText,"+(null==e||null===(i=e.currentTarget)||void 0===i?void 0:i.statusText));o.options={index:t._index,range:t._range,vid:t._vid,priOptions:t._priOptions},t._loadCompleteReject(o)},i.ontimeout=function(e){t.cancel();var r=new tI(t._url,t._request,{status:408},"timeout");t._onTimeout&&(r.isTimeout=!0,t._onTimeout(r,{index:t._index,range:t._range,vid:t._vid,priOptions:t._priOptions})),r.options={index:t._index,range:t._range,vid:t._vid,priOptions:t._priOptions},t._loadCompleteReject(r)};var o,a=this._headers||{},s=iI(e);if(s&&(a.Range=s),a)cf(o=Zc(a)).call(o,(function(e){i.setRequestHeader(e,a[e])}));this._logger.debug("[xhr.send->] tast,",this._range,",load sub range, ",e),i.send(this._body)}catch(u){u.options={index:this._index,range:e,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(u)}}},{key:"_onReadyStatechange",value:function(e){2===e.target.readyState&&this._firstRtt<0&&(this._firstRtt=_x())}},{key:"_onLoad",value:function(e){var t,r=e.target.status;if(r<200||r>299){var n=new tI(this._url,null,BO(BO({},e.target.response),{},{status:r}),"bad response,status:"+r);return n.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(n)}var i,o=null,a=!1,s=(null===(t=this._range)||void 0===t?void 0:t.length)>0?this._range[0]:0;if(this._responseType===qP){var u,l=new Uint8Array(e.target.response);if(i=s+this._receivedLength,l&&l.byteLength>0){this._receivedLength+=l.byteLength;var c=_x()-this._startTime,f=uI(this._receivedLength,c);this.emit(yI,{speed:f,len:this._receivedLength,time:c,vid:this._vid,index:this._index,range:[i,s+this._receivedLength],priOptions:this._priOptions})}o=l,a=!((null===(u=this._range)||void 0===u?void 0:u.length)>1&&this._range[1]&&this._receivedLength<this._range[1]-this._range[0]),this._logger.debug("[xhr load done->], tast :",this._range,", start",i,"end ",s+this._receivedLength,",dataLen,",l?l.byteLength:0,",receivedLength",this._receivedLength,",index,",this._index,", done,",a)}else a=!0,o=e.target.response;var d={ok:r>=200&&r<300,status:r,statusText:this._xhr.statusText,url:this._xhr.responseURL,headers:this._getHeaders(this._xhr),body:this._xhr.response};this._transformResponse&&(d=this._transformResponse(d,this._url)||d),this._onProgress&&this._onProgress(o,a,{index:this._index,vid:this._vid,range:[i,s+this._receivedLength],startTime:this._startTime,endTime:_x(),priOptions:this._priOptions},d),a?(this._runing=!1,this._loadCompleteResolve&&this._loadCompleteResolve(sI(this._onProgress?null:o,a,d,d.headers["content-length"],d.headers.age,this._startTime,this._firstRtt,this._index,this._range,this._vid,this._priOptions))):this._startLoad()}},{key:"cancel",value:function(){if(!this._aborted)return this._aborted=!0,this._runing=!1,cP(rP(r.prototype),"removeAllListeners",this).call(this),this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions}),this._xhr?this._xhr.abort():void 0}},{key:"receiveLen",get:function(){return this._receivedLength}},{key:"running",get:function(){return this._running},set:function(e){this._running=e}},{key:"_getHeaders",value:function(e){var t,r,n={},i=dP(VT(t=e.getAllResponseHeaders()).call(t).split("\r\n"));try{for(i.s();!(r=i.n()).done;){var o=r.value.split(": ");n[o[0].toLowerCase()]=hy(o).call(o,1).join(": ")}}catch(a){i.e(a)}finally{i.f()}return n}}],[{key:"isSupported",value:function(){return"undefined"!=typeof XMLHttpRequest}}]),r}(WR),wI=["retry","retryDelay","onRetryError","transformError"],SI=function(){function e(t,r){var n,i,o;QO(this,e),this.promise=((o=new Gm((function(e,t){n=e,i=t}))).used=!1,o.resolve=function(){return o.used=!0,n.apply(void 0,arguments)},o.reject=function(){return o.used=!0,i.apply(void 0,arguments)},o),this.alive=!!r.onProgress,!r.logger&&(r.logger=new BP("Loader")),this._loaderType=t,this._loader=t===zP&&"undefined"!=typeof fetch?new _I:new bI,this._config=r,this._retryCount=0,this._retryTimer=null,this._canceled=!1,this._retryCheckFunc=r.retryCheckFunc,this._logger=r.logger}var t;return $O(e,[{key:"exec",value:function(){var e=this,t=this._config,r=t.retry,n=t.retryDelay,i=t.onRetryError,o=t.transformError,a=sP(t,wI),s=function(){var t=zO(KO().mark((function t(){var u,l,c;return KO().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e._loader.load(a);case 3:u=t.sent,e.promise.resolve(u),t.next=27;break;case 7:if(t.prev=7,t.t0=t.catch(0),e._loader.running=!1,e._logger.debug("[task request catch err]",t.t0),!e._canceled){t.next=13;break}return t.abrupt("return");case 13:if(t.t0.loaderType=e._loaderType,t.t0.retryCount=e._retryCount,l=t.t0,o&&(l=o(l)||l),i&&e._retryCount>0&&i(l,e._retryCount,{index:a.index,vid:a.vid,range:a.range,priOptions:a.priOptions}),e._retryCount++,c=!0,e._retryCheckFunc&&(c=e._retryCheckFunc(t.t0)),!(c&&e._retryCount<=r)){t.next=26;break}return clearTimeout(e._retryTimer),e._logger.debug("[task request setTimeout],retry",e._retryCount,",retry range,",a.range),e._retryTimer=c_(s,n),t.abrupt("return");case 26:e.promise.reject(l);case 27:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(){return t.apply(this,arguments)}}();return s(),this.promise}},{key:"cancel",value:(t=zO(KO().mark((function e(){return KO().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return clearTimeout(this._retryTimer),this._canceled=!0,this._loader.running=!1,e.abrupt("return",this._loader.cancel());case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"running",get:function(){return this._loader&&this._loader.running}},{key:"loader",get:function(){return this._loader}}]),e}();function kI(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Gm((function(t){return c_(t,e)}))}var RI,TI=function(e){tP(n,e);var t,r=lP(n);function n(e){var t;return QO(this,n),eP(uP(t=r.call(this,e)),"type",zP),eP(uP(t),"_queue",[]),eP(uP(t),"_alive",[]),eP(uP(t),"_currentTask",null),eP(uP(t),"_finnalUrl",""),eP(uP(t),"_config",void 0),t._config=function(e){return BO({loaderType:zP,retry:0,retryDelay:0,timeout:0,request:null,onTimeout:void 0,onProgress:void 0,onRetryError:void 0,transformRequest:void 0,transformResponse:void 0,transformError:void 0,responseType:$P,range:void 0,url:"",params:void 0,method:"GET",headers:{},body:void 0,mode:void 0,credentials:void 0,cache:void 0,redirect:void 0,referrer:void 0,referrerPolicy:void 0,integrity:void 0,onProcessMinLen:0},e)}(e),t._config.loaderType!==QP&&_I.isSupported()||(t.type=QP),t.log=e.logger,t}return $O(n,[{key:"isFetch",value:function(){return this.type===zP}},{key:"load",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"!=typeof e&&e?r=e:r.url=e||r.url||this._config.url,(r=yR({},this._config,r)).params&&(r.params=yR({},r.params)),r.headers&&nI(r.headers)&&(r.headers=yR({},r.headers)),r.body&&nI(r.body)&&(r.body=yR({},r.body)),r.transformRequest&&(r=r.transformRequest(r)||r),r.logger=this.log;var n=new SI(this.type,r);return n.loader.on(yI,(function(e){t.emit(yI,e)})),this._queue.push(n),1!==this._queue.length||this._currentTask&&this._currentTask.running||this._processTask(),n.promise}},{key:"cancel",value:(t=zO(KO().mark((function e(){var t;return KO().wrap((function(e){for(var r,n,i;;)switch(e.prev=e.next){case 0:return t=Bg(r=vR(n=this._queue).call(n,(function(e){return e.cancel()}))).call(r,vR(i=this._alive).call(i,(function(e){return e.cancel()}))),this._currentTask&&t.push(this._currentTask.cancel()),this._queue=[],this._alive=[],e.next=6,Gm.all(t);case 6:return e.next=8,kI();case 8:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"_processTask",value:function(){var e=this;if(this._currentTask=this._queue.shift(),this._currentTask){this._currentTask.alive&&this._alive.push(this._currentTask);var t=this._currentTask.exec().catch((function(e){}));t&&"function"==typeof t.finally&&t.finally((function(){var t,r,n;null!==(t=e._currentTask)&&void 0!==t&&t.alive&&(null===(r=e._alive)||void 0===r?void 0:r.length)>0&&(e._alive=Nc(n=e._alive).call(n,(function(t){return t&&t!==e._currentTask})));e._processTask()}))}}}],[{key:"isFetchSupport",value:function(){return _I.isSupported()}}]),n}(WR),xI="core.rtcstatechange",EI="core.rtcnetwork",LI={},OI={},PI={exports:{}},II=PI.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(e){return e.encoding?"rtpmap:%d %s/%s/%s":e.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(e){return null!=e.address?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%s trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(e){return null!=e.subtype?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:(\d+)(?:\/(\w+))?(?: (urn:ietf:params:rtp-hdrext:encrypt))? (\S*)(?: (\S*))?/,names:["value","direction","encrypt-uri","uri","config"],format:function(e){return"extmap:%d"+(e.direction?"/%s":"%v")+(e["encrypt-uri"]?" %s":"%v")+" %s"+(e.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(e){return null!=e.sessionConfig?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"connectionType",reg:/^connection:(new|existing)/,format:"connection:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*(?:\.\d*)*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*(?:\.\d*)*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation","network-id","network-cost"],format:function(e){var t="candidate:%s %d %s %d %s %d typ %s";return t+=null!=e.raddr?" raddr %s rport %d":"%v%v",t+=null!=e.tcptype?" tcptype %s":"%v",null!=e.generation&&(t+=" generation %d"),t+=null!=e["network-id"]?" network-id %d":"%v",t+=null!=e["network-cost"]?" network-cost %d":"%v"}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_-]*)(?::(.*))?/,names:["id","attribute","value"],format:function(e){var t="ssrc:%d";return null!=e.attribute&&(t+=" %s",null!=e.value&&(t+=":%s")),t}},{push:"ssrcGroups",reg:/^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{name:"sctpmap",reg:/^sctpmap:([\w_/]*) (\S*)(?: (\S*))?/,names:["sctpmapNumber","app","maxMessageSize"],format:function(e){return null!=e.maxMessageSize?"sctpmap:%s %s %s":"sctpmap:%s %s"}},{name:"xGoogleFlag",reg:/^x-google-flag:([^\s]*)/,format:"x-google-flag:%s"},{push:"rids",reg:/^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,names:["id","direction","params"],format:function(e){return e.params?"rid:%s %s %s":"rid:%s %s"}},{push:"imageattrs",reg:new RegExp("^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"),names:["pt","dir1","attrs1","dir2","attrs2"],format:function(e){return"imageattr:%s %s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast",reg:new RegExp("^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"),names:["dir1","list1","dir2","list2"],format:function(e){return"simulcast:%s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast_03",reg:/^simulcast:[\s\t]+([\S+\s\t]+)$/,names:["value"],format:"simulcast: %s"},{name:"framerate",reg:/^framerate:(\d+(?:$|\.\d+))/,format:"framerate:%s"},{name:"sourceFilter",reg:/^source-filter: *(excl|incl) (\S*) (IP4|IP6|\*) (\S*) (.*)/,names:["filterMode","netType","addressTypes","destAddress","srcList"],format:"source-filter: %s %s %s %s %s"},{name:"bundleOnly",reg:/^(bundle-only)/},{name:"label",reg:/^label:(.+)/,format:"label:%s"},{name:"sctpPort",reg:/^sctp-port:(\d+)$/,format:"sctp-port:%s"},{name:"maxMessageSize",reg:/^max-message-size:(\d+)$/,format:"max-message-size:%s"},{push:"tsRefClocks",reg:/^ts-refclk:([^\s=]*)(?:=(\S*))?/,names:["clksrc","clksrcExt"],format:function(e){return"ts-refclk:%s"+(null!=e.clksrcExt?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(e){var t="mediaclk:";return t+=null!=e.id?"id=%s %s":"%v%s",t+=null!=e.mediaClockValue?"=%s":"",t+=null!=e.rateNumerator?" rate=%s":"",t+=null!=e.rateDenominator?"/%s":""}},{name:"keywords",reg:/^keywds:(.+)$/,format:"keywds:%s"},{name:"content",reg:/^content:(.+)/,format:"content:%s"},{name:"bfcpFloorCtrl",reg:/^floorctrl:(c-only|s-only|c-s)/,format:"floorctrl:%s"},{name:"bfcpConfId",reg:/^confid:(\d+)/,format:"confid:%s"},{name:"bfcpUserId",reg:/^userid:(\d+)/,format:"userid:%s"},{name:"bfcpFloorId",reg:/^floorid:(.+) (?:m-stream|mstrm):(.+)/,names:["id","mStream"],format:"floorid:%s mstrm:%s"},{push:"invalid",names:["value"]}]};cf(RI=Zc(II)).call(RI,(function(e){var t=II[e];cf(t).call(t,(function(e){e.reg||(e.reg=/(.*)/),e.format||(e.format="%s")}))}));var CI=PI.exports;!function(e,t){var r=function(e){return String(Number(e))===e?Number(e):e},n=function(e,t,n){var i=e.name&&e.names;e.push&&!t[e.push]?t[e.push]=[]:i&&!t[e.name]&&(t[e.name]={});var o=e.push?{}:i?t[e.name]:t;!function(e,t,n,i){if(i&&!n)t[i]=r(e[1]);else for(var o=0;o<n.length;o+=1)null!=e[o+1]&&(t[n[o]]=r(e[o+1]))}(n.match(e.reg),o,e.names,e.name),e.push&&t[e.push].push(o)},i=CI,o=Iy(t=RegExp.prototype.test).call(t,/^([a-z])=(.*)/);e.parse=function(e){var t,r,a={},s=[],u=a;return cf(t=Nc(r=e.split(/(\r\n|\r|\n)/)).call(r,o)).call(t,(function(e){var t=e[0],r=hy(e).call(e,2);"m"===t&&(s.push({rtp:[],fmtp:[]}),u=s[s.length-1]);for(var o=0;o<(i[t]||[]).length;o+=1){var a=i[t][o];if(a.reg.test(r))return n(a,u,r)}})),a.media=s,a};var a=function(e,t){var n=t.split(/=(.+)/,2);return 2===n.length?e[n[0]]=r(n[1]):1===n.length&&t.length>1&&(e[n[0]]=void 0),e};e.parseParams=function(e){var t;return xP(t=e.split(/;\s?/)).call(t,a,{})},e.parseFmtpConfig=e.parseParams,e.parsePayloads=function(e){var t;return vR(t=e.toString().split(" ")).call(t,Number)},e.parseRemoteCandidates=function(e){for(var t,n=[],i=vR(t=e.split(" ")).call(t,r),o=0;o<i.length;o+=3)n.push({component:i[o],ip:i[o+1],port:i[o+2]});return n},e.parseImageAttributes=function(e){var t;return vR(t=e.split(" ")).call(t,(function(e){var t;return xP(t=e.substring(1,e.length-1).split(",")).call(t,a,{})}))},e.parseSimulcastStreamList=function(e){var t;return vR(t=e.split(";")).call(t,(function(e){var t;return vR(t=e.split(",")).call(t,(function(e){var t,n=!1;return"~"!==e[0]?t=r(e):(t=r(e.substring(1,e.length)),n=!0),{scid:t,paused:n}}))}))}}(OI);var ZI=CI,jI=/%[sdv%]/g,AI=function(e){var t=1,r=arguments,n=r.length;return e.replace(jI,(function(e){if(t>=n)return e;var i=r[t];switch(t+=1,e){case"%%":return"%";case"%s":return String(i);case"%d":return Number(i);case"%v":return""}}))},DI=function(e,t,r){var n=[e+"="+(t.format instanceof Function?t.format(t.push?r:r[t.name]):t.format)];if(t.names)for(var i=0;i<t.names.length;i+=1){var o=t.names[i];t.name?n.push(r[t.name][o]):n.push(r[t.names[i]])}else n.push(r[t.name]);return AI.apply(null,n)},VI=["v","o","s","i","u","e","p","c","b","t","r","z","a"],WI=["i","c","b","a"],MI=OI,GI=function(e,t){var r,n;t=t||{},null==e.version&&(e.version=0),null==e.name&&(e.name=" "),cf(r=e.media).call(r,(function(e){null==e.payloads&&(e.payloads="")}));var i=t.outerOrder||VI,o=t.innerOrder||WI,a=[];return cf(i).call(i,(function(t){var r;cf(r=ZI[t]).call(r,(function(r){if(r.name in e&&null!=e[r.name])a.push(DI(t,r,e));else if(r.push in e&&null!=e[r.push]){var n;cf(n=e[r.push]).call(n,(function(e){a.push(DI(t,r,e))}))}}))})),cf(n=e.media).call(n,(function(e){a.push(DI("m",ZI.m[0],e)),cf(o).call(o,(function(t){var r;cf(r=ZI[t]).call(r,(function(r){if(r.name in e&&null!=e[r.name])a.push(DI(t,r,e));else if(r.push in e&&null!=e[r.push]){var n;cf(n=e[r.push]).call(n,(function(e){a.push(DI(t,r,e))}))}}))}))})),a.join("\r\n")+"\r\n"};LI.write=GI,LI.parse=MI.parse,LI.parseParams=MI.parseParams,LI.parseFmtpConfig=MI.parseFmtpConfig,LI.parsePayloads=MI.parsePayloads,LI.parseRemoteCandidates=MI.parseRemoteCandidates,LI.parseImageAttributes=MI.parseImageAttributes,LI.parseSimulcastStreamList=MI.parseSimulcastStreamList;var FI=["adaptiveJitterBuffer"];function NI(e){return new Gm((function(t){var r;null===(r=e.getStats(null))||void 0===r||r.then((function(e){var r,n,i;t((n=[],i=[],cf(r=e).call(r,(function(e){"inbound-rtp"===e.type&&n.push(e),"remote-outbound-rtp"===e.type&&i.push(e)})),vR(n).call(n,(function(e){var t,n=r.get(e.codecId),o=r.get(e.trackId);return{type:null!==(t=e.mediaType)&&void 0!==t?t:e.kind,inboundRtp:e,remoteOutBoundRtp:hk(i).call(i,(function(t){return t.mediaType===e.mediaType})),codec:n,track:o}}))))}))})).catch((function(){}))}function UI(e){var t,r,n,i,o,a,s,u,l,c,f,d,p,h,v,m,y,g,_,b,w,S,k,R,T,x,E,L,O,P,I,C,Z,j,A,D,V,W=null==e?void 0:Nc(e).call(e,(function(e){return"video"===e.type}))[0],M=null==e?void 0:Nc(e).call(e,(function(e){return"audio"===e.type}))[0];(W&&W.remoteOutBoundRtp&&(Z={bytesSent:W.remoteOutBoundRtp.bytesSent,packetsSent:W.remoteOutBoundRtp.packetsSent}),M&&M.remoteOutBoundRtp&&(j={bytesSent:M.remoteOutBoundRtp.bytesSent,packetsSent:M.remoteOutBoundRtp.packetsSent}),void 0!==(null==W||null===(t=W.inboundRtp)||void 0===t?void 0:t.jitterBufferDelay))&&(A=(null===(D=W.inboundRtp)||void 0===D?void 0:D.jitterBufferDelay)/(null===(V=W.inboundRtp)||void 0===V?void 0:V.jitterBufferEmittedCount)*1e3);return{video:W?{codec:null===(r=W.codec)||void 0===r?void 0:r.mimeType,payloadType:null===(n=W.codec)||void 0===n?void 0:n.payloadType,sdpFmtpLine:null===(i=W.codec)||void 0===i?void 0:i.sdpFmtpLine,bytesReceived:(null===(o=W.inboundRtp)||void 0===o?void 0:o.bytesReceived)||0,firCount:null===(a=W.inboundRtp)||void 0===a?void 0:a.firCount,pliCount:null===(s=W.inboundRtp)||void 0===s?void 0:s.pliCount,frameHeight:null===(u=W.inboundRtp)||void 0===u?void 0:u.frameHeight,frameWidth:null===(l=W.inboundRtp)||void 0===l?void 0:l.frameWidth,framesDecoded:null===(c=W.inboundRtp)||void 0===c?void 0:c.framesDecoded,framesDropped:null===(f=W.inboundRtp)||void 0===f?void 0:f.framesDropped,framesPerSecond:null===(d=W.inboundRtp)||void 0===d?void 0:d.framesPerSecond,framesReceived:null!==(p=null===(h=W.inboundRtp)||void 0===h?void 0:h.framesReceived)&&void 0!==p?p:null===(v=W.track)||void 0===v?void 0:v.framesReceived,jitter:null===(m=W.inboundRtp)||void 0===m?void 0:m.jitter,jitterBufferDelay:null===(y=W.inboundRtp)||void 0===y?void 0:y.jitterBufferDelay,keyFramesDecoded:null===(g=W.inboundRtp)||void 0===g?void 0:g.keyFramesDecoded,nackCount:null===(_=W.inboundRtp)||void 0===_?void 0:_.nackCount,packetsLost:(null===(b=W.inboundRtp)||void 0===b?void 0:b.packetsLost)||0,packetsReceived:(null===(w=W.inboundRtp)||void 0===w?void 0:w.packetsReceived)||0,averageJitterBufferDelay:A}:void 0,audio:M?{codec:null===(S=M.codec)||void 0===S?void 0:S.mimeType,payloadType:null===(k=M.codec)||void 0===k?void 0:k.payloadType,sdpFmtpLine:null===(R=M.codec)||void 0===R?void 0:R.sdpFmtpLine,bytesReceived:(null===(T=M.inboundRtp)||void 0===T?void 0:T.bytesReceived)||0,audioLevel:null===(x=M.inboundRtp)||void 0===x?void 0:x.audioLevel,jitter:null===(E=M.inboundRtp)||void 0===E?void 0:E.jitter,jitterBufferDelay:null===(L=M.inboundRtp)||void 0===L?void 0:L.jitterBufferDelay,packetsLost:(null===(O=M.inboundRtp)||void 0===O?void 0:O.packetsLost)||0,packetsReceived:(null===(P=M.inboundRtp)||void 0===P?void 0:P.packetsReceived)||0,totalSamplesDuration:null===(I=M.inboundRtp)||void 0===I?void 0:I.totalSamplesDuration,totalSamplesReceived:null===(C=M.inboundRtp)||void 0===C?void 0:C.totalSamplesReceived}:void 0,videoRemote:Z,audioRemote:j}}var XI=function(){function e(t,r){var n=this;xg(this,e),Og(this,"_pc",null),Og(this,"_lastVideoStats",null),Og(this,"_lastRemoteVideoStats",null),Og(this,"_timer",0),Og(this,"_timerInterval",0),Og(this,"_speedQueue",[]),Og(this,"_lostRateQueue",[]),Og(this,"_receivedRateQueue",[]),Og(this,"_currentSpeed",-1),Og(this,"_currentLostRate",-1),Og(this,"_currentReceivedRate",-1),Og(this,"_evaluate",Tg(kg().mark((function e(){var t,r,i,o,a,s,u,l,c,f,d,p,h,v,m,y;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,NI(n._pc).then((function(e){return UI(e)}));case 3:t=e.sent,n._lastVideoStats&&null!=t&&t.video&&(r=t.video,i=r.bytesReceived,o=r.packetsLost,a=r.packetsReceived,s=n._lastVideoStats,u=s.bytesReceived,l=s.packetsLost,c=s.packetsReceived,u&&n._cacheSpeed(8e3*(i-u)/n._timerInterval),f=o-l,(d=a-c)&&f>=0&&n._cacheLostRate(f/(f+d)*1e3/n._timerInterval)),n._lastRemoteVideoStats&&null!=t&&t.videoRemote&&(p=t.video.bytesReceived,h=n._lastVideoStats.bytesReceived,v=null==t?void 0:t.videoRemote,m=v.bytesSent,(y=n._lastRemoteVideoStats.bytesSent)&&m&&m-y>0&&n._cacheReceivedRate((p-h)/(m-y))),n._lastVideoStats=null==t?void 0:t.video,n._lastRemoteVideoStats=null==t?void 0:t.videoRemote,e.next=12;break;case 10:e.prev=10,e.t0=e.catch(0);case 12:case"end":return e.stop()}}),e,null,[[0,10]])})))),this._pc=t,this._timerInterval=r,this.start(r)}return Lg(e,[{key:"start",value:function(e){clearInterval(this._timer),this._pc&&(this._timer=fT(this._evaluate,e))}},{key:"getStats",value:function(){return this._speedQueue.length?{speed:LT(this._currentSpeed.toFixed(2)),avgSpeed:LT(this._getAvgSpeed().toFixed(2)),lostRate:LT(this._currentLostRate.toFixed(2)),avgLostRate:LT(this._getAvgLostRate().toFixed(2)),receivedRate:LT(this._currentReceivedRate.toFixed(2)),avgReceivedRate:LT(this._getAvgReceivedRate().toFixed(2))}:{}}},{key:"destroy",value:function(){clearInterval(this._timer),this._pc=null,this._lastVideoStats=null}},{key:"_cacheSpeed",value:function(e){var t;(this._currentSpeed=e,this._speedQueue.length>5)&&(this._speedQueue=hy(t=this._speedQueue).call(t,5));this._speedQueue.push(e)}},{key:"_cacheLostRate",value:function(e){var t;(this._currentLostRate=e,this._lostRateQueue.length>5)&&(this._lostRateQueue=hy(t=this._lostRateQueue).call(t,5));this._lostRateQueue.push(e)}},{key:"_cacheReceivedRate",value:function(e){var t;(this._currentReceivedRate=e,this._receivedRateQueue.length>5)&&(this._receivedRateQueue=hy(t=this._receivedRateQueue).call(t,5));this._receivedRateQueue.push(e)}},{key:"_getAvgSpeed",value:function(){var e;return-1===this._currentSpeed?-1:xP(e=this._speedQueue).call(e,(function(e,t){return e+t}),0)/this._speedQueue.length}},{key:"_getAvgLostRate",value:function(){var e;return-1===this._currentLostRate?-1:xP(e=this._lostRateQueue).call(e,(function(e,t){return e+t}),0)/this._lostRateQueue.length}},{key:"_getAvgReceivedRate",value:function(){var e;return-1===this._currentReceivedRate?-1:xP(e=this._receivedRateQueue).call(e,(function(e,t){return e+t}),0)/this._receivedRateQueue.length}}]),e}();function HI(){return!(!window.RTCPeerConnection||!window.RTCPeerConnection.prototype.addTransceiver)}var BI=function(){return"undefined"!=typeof window&&window.Worker},KI=function(){return"undefined"!=typeof MessageChannel},YI=function(){return"undefined"!=typeof TransformStream&&"undefined"!=typeof RTCRtpSender&&"undefined"!=typeof RTCRtpReceiver&&void 0!==RTCRtpSender.prototype.createEncodedStreams&&void 0!==RTCRtpReceiver.prototype.createEncodedStreams},JI={getNALUnits:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e.length-e.position<4)return[];var r=e.position;return 1===e.getInt32(r)||0===e.getInt16(r)&&1===e.getInt8(r+2)?JI.getAnnexbNals(e,t):JI.getAvccNals(e,t)},getAnnexbNals:function(e,t){for(var r=[],n=JI.getHeaderPositionAnnexB(e),i=n.pos,o=i;i<e.length-4;){var a,s,u=new Uint8Array(hy(a=e.buffer).call(a,i,i+n.headerLength));n.pos===e.position&&e.skip(n.headerLength),o=(n=JI.getHeaderPositionAnnexB(e)).pos;var l={header:u,body:new Uint8Array(hy(s=e.buffer).call(s,i+u.byteLength,o)),type:-1};t?JI.analyseH265Nal(l):JI.analyseNal(l),(l.type<=9||t&&l.type<=40)&&0!==l.type&&r.push(l),e.skip(o-e.position),i=o}return r},getAvccNals:function(e,t){for(var r=[];e.position<e.length-4;){var n=e.getInt32(e.position);if(!(e.length-e.position>=n))break;var i,o,a=new Uint8Array(hy(i=e.buffer).call(i,e.position,e.position+4));e.skip(4);var s=new Uint8Array(hy(o=e.buffer).call(o,e.position,e.position+n));e.skip(n);var u={header:a,body:s,type:-1};t?JI.analyseH265Nal(u):JI.analyseNal(u),u.type<=9&&0!==u.type&&r.push(u)}return r},analyseNal:function(e){var t=31&e.body[0];switch(e.type=t,t){case 1:e.ndr=!0;break;case 5:e.idr=!0;break;case 6:e.sei=!0;break;case 7:e.sps=!0;break;case 8:e.pps=!0}},analyseH265Nal:function(e){var t=(126&e.body[0])>>1;switch(e.type=t,t){case 39:case 40:e.sei=!0}},getHeaderPositionAnnexB:function(e){for(var t=e.position,r=0,n=e.length;3!==r&&4!==r&&t<n-4;)0===e.getInt16(t)?1===e.getInt16(t+2)?r=4:1===e.getInt8(t+2)?r=3:t++:t++;return t===n-4&&(0===e.getInt16(t)?1===e.getInt16(t+2)?r=4:t=n:(t++,0===e.getInt16(t)&&1===e.getInt8(t)?r=3:t=n)),{pos:t,headerLength:r}},isH265VideoFrame:function(e){var t,r,n;return uE(t=((null===(r=e.getMetadata)||void 0===r||null===(n=r.call(e))||void 0===n?void 0:n.mimeType)||"").toLowerCase()).call(t,"h265")}},zI=function(){function e(t){xg(this,e),Og(this,"_position",0),this._dataview=new DataView(t)}return Lg(e,[{key:"length",get:function(){return this.buffer.byteLength}},{key:"buffer",get:function(){return this._dataview.buffer}},{key:"position",get:function(){return this._position},set:function(e){this._position=e}},{key:"back",value:function(e){this.position-=e}},{key:"getUint8",value:function(e){return this._dataview.getUint8(e)}},{key:"getInt8",value:function(e){return this._dataview.getInt8(e)}},{key:"getInt16",value:function(e){return this._dataview.getInt16(e)}},{key:"getUint16",value:function(e){return this._dataview.getUint16(e)}},{key:"getUint32",value:function(e){return this._dataview.getUint32(e)}},{key:"getInt32",value:function(e){return this._dataview.getInt32(e)}},{key:"skip",value:function(t){for(var r=Math.floor(t/4),n=t%4,i=0;i<r;i++)e.readByte(this,4);n>0&&e.readByte(this,n)}},{key:"readUint8",value:function(){return e.readByte(this,1)}},{key:"readUint16",value:function(){return e.readByte(this,2)}},{key:"readUint24",value:function(){return e.readByte(this,3)}},{key:"readUint32",value:function(){return e.readByte(this,4)}},{key:"readUint64",value:function(){return e.readByte(this,8)}},{key:"readInt8",value:function(){return e.readByte(this,1,!0)}},{key:"readInt16",value:function(){return e.readByte(this,2,!0)}},{key:"readInt32",value:function(){return e.readByte(this,4,!0)}},{key:"writeUint32",value:function(e){return new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e])}}],[{key:"readByte",value:function(e,t,r){var n;switch(t){case 1:n=r?e.getInt8(e.position):e.getUint8(e.position);break;case 2:n=r?e.getInt16(e.position):e.getUint16(e.position);break;case 3:if(r)throw new Error("not supported for readByte 3");n=e.getUint8(e.position)<<16,n|=e.getUint8(e.position+1)<<8,n|=e.getUint8(e.position+2);break;case 4:n=r?e.getInt32(e.position):e.getUint32(e.position);break;case 8:if(r)throw new Error("not supported for readBody 8");n=e.getUint32(e.position)<<32,n|=e.getUint32(e.position+4);break;default:n=""}return e.position+=t,n}}]),e}();function QI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Af(e,(i=n.key,o=void 0,o=function(e,t){if("object"!==Sc(e)||null===e)return e;var r=e[bg];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Sc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"===Sc(o)?o:String(o)),n)}var i,o}function qI(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<24>>>0)+(e[t+1]<<16)+(e[t+2]<<8)+(e[t+3]||0)}var $I=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,n=[{key:"parseAnnexB",value:function(e){var t=e.byteLength-1,r=0;do{if(0!==e[t])break;r++,t--}while(t>0);r>=3&&(e=e.subarray(0,t+1));for(var n=e.length,i=2,o=0;null!==e[i]&&void 0!==e[i]&&1!==e[i];)i++;if((o=2+ ++i)>=n)return[];for(var a=[];o<n;)switch(e[o]){case 0:if(0!==e[o-1]){o+=2;break}if(0!==e[o-2]){o++;break}if(o<n-1&&1!==e[o+1]){o++;break}i!==o-2&&a.push(e.subarray(i,o-2));do{o++}while(1!==e[o]&&o<n);o=(i=o+1)+2;break;case 1:if(0!==e[o-1]||0!==e[o-2]){o+=3;break}i!==o-2&&a.push(e.subarray(i,o-2)),o=(i=o+1)+2;break;default:o+=3}return i<n&&a.push(e.subarray(i)),a}},{key:"parseAvcC",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;if(!(e.length<4)){for(var r,n=e.length,i=[],o=0;o+t<n;)if(r=qI(e,o),3===t&&(r>>>=8),o+=t,r){if(o+r>n)break;i.push(e.subarray(o,o+r)),o+=r}return i}}},{key:"parseSEI",value:function(e,t){for(var r=e.length,n=t?2:1,i=0,o=0,a="";255===e[n];)i+=255,n++;for(i+=e[n++];255===e[n];)o+=255,n++;if(o+=e[n++],5===i&&r>n+16)for(var s=0;s<16;s++)a+=e[n].toString(16),n++;return{payload:e.subarray(n,n+o),type:i,size:o,uuid:a}}},{key:"removeEPB",value:function(e){for(var t=e.byteLength,r=[],n=1;n<t-2;)0===e[n]&&0===e[n+1]&&3===e[n+2]?(r.push(n+2),n+=2):n++;if(!r.length)return e;var i=t-r.length,o=new Uint8Array(i),a=0;for(n=0;n<i;a++,n++)a===r[0]&&(a++,r.shift()),o[n]=e[a];return o}}],(r=null)&&QI(t.prototype,r),n&&QI(t,n),Af(t,"prototype",{writable:!1}),e}();function eC(e){return new TransformStream({transform:function(t,r){var n=JI.isH265VideoFrame(t),i=JI.getNALUnits(new zI(t.data),n);cf(i).call(i,(function(t){if(t.sei){var r=$I.parseSEI($I.removeEPB(t.body),!1);r&&e({data:r,sei:{code:r.type,content:r.payload}})}})),r.enqueue(t)}})}"undefined"!=typeof self&&"DedicatedWorkerGlobalScope"===self.constructor.name&&self.addEventListener("rtctransform",(function(e){var t=e.transformer,r=t.options.port,n=eC((function(e){r.postMessage(e)}));t.readable.pipeThrough(n).pipeTo(e.transformer.writable)}));var tC="IWZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO3ZhciBlPXtnZXROQUxVbml0czpmdW5jdGlvbih0KXt2YXIgbj1hcmd1bWVudHMubGVuZ3RoPjEmJnZvaWQgMCE9PWFyZ3VtZW50c1sxXSYmYXJndW1lbnRzWzFdO2lmKHQubGVuZ3RoLXQucG9zaXRpb248NClyZXR1cm5bXTt2YXIgcj10LnBvc2l0aW9uO3JldHVybiAxPT09dC5nZXRJbnQzMihyKXx8MD09PXQuZ2V0SW50MTYocikmJjE9PT10LmdldEludDgocisyKT9lLmdldEFubmV4Yk5hbHModCxuKTplLmdldEF2Y2NOYWxzKHQsbil9LGdldEFubmV4Yk5hbHM6ZnVuY3Rpb24odCxuKXtmb3IodmFyIHI9W10saT1lLmdldEhlYWRlclBvc2l0aW9uQW5uZXhCKHQpLGE9aS5wb3Msbz1hO2E8dC5sZW5ndGgtNDspe3ZhciB1PW5ldyBVaW50OEFycmF5KHQuYnVmZmVyLnNsaWNlKGEsYStpLmhlYWRlckxlbmd0aCkpO2kucG9zPT09dC5wb3NpdGlvbiYmdC5za2lwKGkuaGVhZGVyTGVuZ3RoKSxvPShpPWUuZ2V0SGVhZGVyUG9zaXRpb25Bbm5leEIodCkpLnBvczt2YXIgcz17aGVhZGVyOnUsYm9keTpuZXcgVWludDhBcnJheSh0LmJ1ZmZlci5zbGljZShhK3UuYnl0ZUxlbmd0aCxvKSksdHlwZTotMX07bj9lLmFuYWx5c2VIMjY1TmFsKHMpOmUuYW5hbHlzZU5hbChzKSwocy50eXBlPD05fHxuJiZzLnR5cGU8PTQwKSYmMCE9PXMudHlwZSYmci5wdXNoKHMpLHQuc2tpcChvLXQucG9zaXRpb24pLGE9b31yZXR1cm4gcn0sZ2V0QXZjY05hbHM6ZnVuY3Rpb24odCxuKXtmb3IodmFyIHI9W107dC5wb3NpdGlvbjx0Lmxlbmd0aC00Oyl7dmFyIGk9dC5nZXRJbnQzMih0LnBvc2l0aW9uKTtpZighKHQubGVuZ3RoLXQucG9zaXRpb24+PWkpKWJyZWFrO3ZhciBhPW5ldyBVaW50OEFycmF5KHQuYnVmZmVyLnNsaWNlKHQucG9zaXRpb24sdC5wb3NpdGlvbis0KSk7dC5za2lwKDQpO3ZhciBvPW5ldyBVaW50OEFycmF5KHQuYnVmZmVyLnNsaWNlKHQucG9zaXRpb24sdC5wb3NpdGlvbitpKSk7dC5za2lwKGkpO3ZhciB1PXtoZWFkZXI6YSxib2R5Om8sdHlwZTotMX07bj9lLmFuYWx5c2VIMjY1TmFsKHUpOmUuYW5hbHlzZU5hbCh1KSx1LnR5cGU8PTkmJjAhPT11LnR5cGUmJnIucHVzaCh1KX1yZXR1cm4gcn0sYW5hbHlzZU5hbDpmdW5jdGlvbihlKXt2YXIgdD0zMSZlLmJvZHlbMF07c3dpdGNoKGUudHlwZT10LHQpe2Nhc2UgMTplLm5kcj0hMDticmVhaztjYXNlIDU6ZS5pZHI9ITA7YnJlYWs7Y2FzZSA2OmUuc2VpPSEwO2JyZWFrO2Nhc2UgNzplLnNwcz0hMDticmVhaztjYXNlIDg6ZS5wcHM9ITB9fSxhbmFseXNlSDI2NU5hbDpmdW5jdGlvbihlKXt2YXIgdD0oMTI2JmUuYm9keVswXSk+PjE7c3dpdGNoKGUudHlwZT10LHQpe2Nhc2UgMzk6Y2FzZSA0MDplLnNlaT0hMH19LGdldEhlYWRlclBvc2l0aW9uQW5uZXhCOmZ1bmN0aW9uKGUpe2Zvcih2YXIgdD1lLnBvc2l0aW9uLG49MCxyPWUubGVuZ3RoOzMhPT1uJiY0IT09biYmdDxyLTQ7KTA9PT1lLmdldEludDE2KHQpPzE9PT1lLmdldEludDE2KHQrMik/bj00OjE9PT1lLmdldEludDgodCsyKT9uPTM6dCsrOnQrKztyZXR1cm4gdD09PXItNCYmKDA9PT1lLmdldEludDE2KHQpPzE9PT1lLmdldEludDE2KHQrMik/bj00OnQ9cjoodCsrLDA9PT1lLmdldEludDE2KHQpJiYxPT09ZS5nZXRJbnQ4KHQpP249Mzp0PXIpKSx7cG9zOnQsaGVhZGVyTGVuZ3RoOm59fSxpc0gyNjVWaWRlb0ZyYW1lOmZ1bmN0aW9uKGUpe3ZhciB0LG47cmV0dXJuKChudWxsPT09KHQ9ZS5nZXRNZXRhZGF0YSl8fHZvaWQgMD09PXR8fG51bGw9PT0obj10LmNhbGwoZSkpfHx2b2lkIDA9PT1uP3ZvaWQgMDpuLm1pbWVUeXBlKXx8IiIpLnRvTG93ZXJDYXNlKCkuaW5jbHVkZXMoImgyNjUiKX19O2Z1bmN0aW9uIHQoZSl7cmV0dXJuKHQ9ImZ1bmN0aW9uIj09dHlwZW9mIFN5bWJvbCYmInN5bWJvbCI9PXR5cGVvZiBTeW1ib2wuaXRlcmF0b3I/ZnVuY3Rpb24oZSl7cmV0dXJuIHR5cGVvZiBlfTpmdW5jdGlvbihlKXtyZXR1cm4gZSYmImZ1bmN0aW9uIj09dHlwZW9mIFN5bWJvbCYmZS5jb25zdHJ1Y3Rvcj09PVN5bWJvbCYmZSE9PVN5bWJvbC5wcm90b3R5cGU/InN5bWJvbCI6dHlwZW9mIGV9KShlKX1mdW5jdGlvbiBuKGUsdCl7Zm9yKHZhciBuPTA7bjx0Lmxlbmd0aDtuKyspe3ZhciBpPXRbbl07aS5lbnVtZXJhYmxlPWkuZW51bWVyYWJsZXx8ITEsaS5jb25maWd1cmFibGU9ITAsInZhbHVlImluIGkmJihpLndyaXRhYmxlPSEwKSxPYmplY3QuZGVmaW5lUHJvcGVydHkoZSxyKGkua2V5KSxpKX19ZnVuY3Rpb24gcihlKXt2YXIgdD1mdW5jdGlvbihlLHQpe2lmKCJvYmplY3QiIT10eXBlb2YgZXx8bnVsbD09PWUpcmV0dXJuIGU7dmFyIG49ZVtTeW1ib2wudG9QcmltaXRpdmVdO2lmKHZvaWQgMCE9PW4pe3ZhciByPW4uY2FsbChlLHR8fCJkZWZhdWx0Iik7aWYoIm9iamVjdCIhPXR5cGVvZiByKXJldHVybiByO3Rocm93IG5ldyBUeXBlRXJyb3IoIkBAdG9QcmltaXRpdmUgbXVzdCByZXR1cm4gYSBwcmltaXRpdmUgdmFsdWUuIil9cmV0dXJuKCJzdHJpbmciPT09dD9TdHJpbmc6TnVtYmVyKShlKX0oZSwic3RyaW5nIik7cmV0dXJuInN5bWJvbCI9PXR5cGVvZiB0P3Q6U3RyaW5nKHQpfXZhciBpPWZ1bmN0aW9uKCl7ZnVuY3Rpb24gZSh0KXt2YXIgbixpLGE7IWZ1bmN0aW9uKGUsdCl7aWYoIShlIGluc3RhbmNlb2YgdCkpdGhyb3cgbmV3IFR5cGVFcnJvcigiQ2Fubm90IGNhbGwgYSBjbGFzcyBhcyBhIGZ1bmN0aW9uIil9KHRoaXMsZSksbj10aGlzLGE9MCwoaT1yKGk9Il9wb3NpdGlvbiIpKWluIG4/T2JqZWN0LmRlZmluZVByb3BlcnR5KG4saSx7dmFsdWU6YSxlbnVtZXJhYmxlOiEwLGNvbmZpZ3VyYWJsZTohMCx3cml0YWJsZTohMH0pOm5baV09YSx0aGlzLl9kYXRhdmlldz1uZXcgRGF0YVZpZXcodCl9dmFyIHQsaSxhO3JldHVybiB0PWUsYT1be2tleToicmVhZEJ5dGUiLHZhbHVlOmZ1bmN0aW9uKGUsdCxuKXt2YXIgcjtzd2l0Y2godCl7Y2FzZSAxOnI9bj9lLmdldEludDgoZS5wb3NpdGlvbik6ZS5nZXRVaW50OChlLnBvc2l0aW9uKTticmVhaztjYXNlIDI6cj1uP2UuZ2V0SW50MTYoZS5wb3NpdGlvbik6ZS5nZXRVaW50MTYoZS5wb3NpdGlvbik7YnJlYWs7Y2FzZSAzOmlmKG4pdGhyb3cgbmV3IEVycm9yKCJub3Qgc3VwcG9ydGVkIGZvciByZWFkQnl0ZSAzIik7cj1lLmdldFVpbnQ4KGUucG9zaXRpb24pPDwxNixyfD1lLmdldFVpbnQ4KGUucG9zaXRpb24rMSk8PDgscnw9ZS5nZXRVaW50OChlLnBvc2l0aW9uKzIpO2JyZWFrO2Nhc2UgNDpyPW4/ZS5nZXRJbnQzMihlLnBvc2l0aW9uKTplLmdldFVpbnQzMihlLnBvc2l0aW9uKTticmVhaztjYXNlIDg6aWYobil0aHJvdyBuZXcgRXJyb3IoIm5vdCBzdXBwb3J0ZWQgZm9yIHJlYWRCb2R5IDgiKTtyPWUuZ2V0VWludDMyKGUucG9zaXRpb24pPDwzMixyfD1lLmdldFVpbnQzMihlLnBvc2l0aW9uKzQpO2JyZWFrO2RlZmF1bHQ6cj0iIn1yZXR1cm4gZS5wb3NpdGlvbis9dCxyfX1dLChpPVt7a2V5OiJsZW5ndGgiLGdldDpmdW5jdGlvbigpe3JldHVybiB0aGlzLmJ1ZmZlci5ieXRlTGVuZ3RofX0se2tleToiYnVmZmVyIixnZXQ6ZnVuY3Rpb24oKXtyZXR1cm4gdGhpcy5fZGF0YXZpZXcuYnVmZmVyfX0se2tleToicG9zaXRpb24iLGdldDpmdW5jdGlvbigpe3JldHVybiB0aGlzLl9wb3NpdGlvbn0sc2V0OmZ1bmN0aW9uKGUpe3RoaXMuX3Bvc2l0aW9uPWV9fSx7a2V5OiJiYWNrIix2YWx1ZTpmdW5jdGlvbihlKXt0aGlzLnBvc2l0aW9uLT1lfX0se2tleToiZ2V0VWludDgiLHZhbHVlOmZ1bmN0aW9uKGUpe3JldHVybiB0aGlzLl9kYXRhdmlldy5nZXRVaW50OChlKX19LHtrZXk6ImdldEludDgiLHZhbHVlOmZ1bmN0aW9uKGUpe3JldHVybiB0aGlzLl9kYXRhdmlldy5nZXRJbnQ4KGUpfX0se2tleToiZ2V0SW50MTYiLHZhbHVlOmZ1bmN0aW9uKGUpe3JldHVybiB0aGlzLl9kYXRhdmlldy5nZXRJbnQxNihlKX19LHtrZXk6ImdldFVpbnQxNiIsdmFsdWU6ZnVuY3Rpb24oZSl7cmV0dXJuIHRoaXMuX2RhdGF2aWV3LmdldFVpbnQxNihlKX19LHtrZXk6ImdldFVpbnQzMiIsdmFsdWU6ZnVuY3Rpb24oZSl7cmV0dXJuIHRoaXMuX2RhdGF2aWV3LmdldFVpbnQzMihlKX19LHtrZXk6ImdldEludDMyIix2YWx1ZTpmdW5jdGlvbihlKXtyZXR1cm4gdGhpcy5fZGF0YXZpZXcuZ2V0SW50MzIoZSl9fSx7a2V5OiJza2lwIix2YWx1ZTpmdW5jdGlvbih0KXtmb3IodmFyIG49TWF0aC5mbG9vcih0LzQpLHI9dCU0LGk9MDtpPG47aSsrKWUucmVhZEJ5dGUodGhpcyw0KTtyPjAmJmUucmVhZEJ5dGUodGhpcyxyKX19LHtrZXk6InJlYWRVaW50OCIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDEpfX0se2tleToicmVhZFVpbnQxNiIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDIpfX0se2tleToicmVhZFVpbnQyNCIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDMpfX0se2tleToicmVhZFVpbnQzMiIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDQpfX0se2tleToicmVhZFVpbnQ2NCIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDgpfX0se2tleToicmVhZEludDgiLHZhbHVlOmZ1bmN0aW9uKCl7cmV0dXJuIGUucmVhZEJ5dGUodGhpcywxLCEwKX19LHtrZXk6InJlYWRJbnQxNiIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDIsITApfX0se2tleToicmVhZEludDMyIix2YWx1ZTpmdW5jdGlvbigpe3JldHVybiBlLnJlYWRCeXRlKHRoaXMsNCwhMCl9fSx7a2V5OiJ3cml0ZVVpbnQzMiIsdmFsdWU6ZnVuY3Rpb24oZSl7cmV0dXJuIG5ldyBVaW50OEFycmF5KFtlPj4+MjQmMjU1LGU+Pj4xNiYyNTUsZT4+PjgmMjU1LDI1NSZlXSl9fV0pJiZuKHQucHJvdG90eXBlLGkpLGEmJm4odCxhKSxPYmplY3QuZGVmaW5lUHJvcGVydHkodCwicHJvdG90eXBlIix7d3JpdGFibGU6ITF9KSxlfSgpO2Z1bmN0aW9uIGEoZSxuKXtmb3IodmFyIHI9MDtyPG4ubGVuZ3RoO3IrKyl7dmFyIGk9bltyXTtpLmVudW1lcmFibGU9aS5lbnVtZXJhYmxlfHwhMSxpLmNvbmZpZ3VyYWJsZT0hMCwidmFsdWUiaW4gaSYmKGkud3JpdGFibGU9ITApLE9iamVjdC5kZWZpbmVQcm9wZXJ0eShlLChhPWkua2V5LG89dm9pZCAwLG89ZnVuY3Rpb24oZSxuKXtpZigib2JqZWN0IiE9PXQoZSl8fG51bGw9PT1lKXJldHVybiBlO3ZhciByPWVbU3ltYm9sLnRvUHJpbWl0aXZlXTtpZih2b2lkIDAhPT1yKXt2YXIgaT1yLmNhbGwoZSxufHwiZGVmYXVsdCIpO2lmKCJvYmplY3QiIT09dChpKSlyZXR1cm4gaTt0aHJvdyBuZXcgVHlwZUVycm9yKCJAQHRvUHJpbWl0aXZlIG11c3QgcmV0dXJuIGEgcHJpbWl0aXZlIHZhbHVlLiIpfXJldHVybigic3RyaW5nIj09PW4/U3RyaW5nOk51bWJlcikoZSl9KGEsInN0cmluZyIpLCJzeW1ib2wiPT09dChvKT9vOlN0cmluZyhvKSksaSl9dmFyIGEsb31mdW5jdGlvbiBvKGUpe3ZhciB0PWFyZ3VtZW50cy5sZW5ndGg+MSYmdm9pZCAwIT09YXJndW1lbnRzWzFdP2FyZ3VtZW50c1sxXTowO3JldHVybihlW3RdPDwyND4+PjApKyhlW3QrMV08PDE2KSsoZVt0KzJdPDw4KSsoZVt0KzNdfHwwKX12YXIgdT1mdW5jdGlvbigpe2Z1bmN0aW9uIGUoKXshZnVuY3Rpb24oZSx0KXtpZighKGUgaW5zdGFuY2VvZiB0KSl0aHJvdyBuZXcgVHlwZUVycm9yKCJDYW5ub3QgY2FsbCBhIGNsYXNzIGFzIGEgZnVuY3Rpb24iKX0odGhpcyxlKX12YXIgdCxuLHI7cmV0dXJuIHQ9ZSxyPVt7a2V5OiJwYXJzZUFubmV4QiIsdmFsdWU6ZnVuY3Rpb24oZSl7dmFyIHQ9ZS5ieXRlTGVuZ3RoLTEsbj0wO2Rve2lmKDAhPT1lW3RdKWJyZWFrO24rKyx0LS19d2hpbGUodD4wKTtuPj0zJiYoZT1lLnN1YmFycmF5KDAsdCsxKSk7Zm9yKHZhciByPWUubGVuZ3RoLGk9MixhPTA7bnVsbCE9PWVbaV0mJnZvaWQgMCE9PWVbaV0mJjEhPT1lW2ldOylpKys7aWYoKGE9MisgKytpKT49cilyZXR1cm5bXTtmb3IodmFyIG89W107YTxyOylzd2l0Y2goZVthXSl7Y2FzZSAwOmlmKDAhPT1lW2EtMV0pe2ErPTI7YnJlYWt9aWYoMCE9PWVbYS0yXSl7YSsrO2JyZWFrfWlmKGE8ci0xJiYxIT09ZVthKzFdKXthKys7YnJlYWt9aSE9PWEtMiYmby5wdXNoKGUuc3ViYXJyYXkoaSxhLTIpKTtkb3thKyt9d2hpbGUoMSE9PWVbYV0mJmE8cik7YT0oaT1hKzEpKzI7YnJlYWs7Y2FzZSAxOmlmKDAhPT1lW2EtMV18fDAhPT1lW2EtMl0pe2ErPTM7YnJlYWt9aSE9PWEtMiYmby5wdXNoKGUuc3ViYXJyYXkoaSxhLTIpKSxhPShpPWErMSkrMjticmVhaztkZWZhdWx0OmErPTN9cmV0dXJuIGk8ciYmby5wdXNoKGUuc3ViYXJyYXkoaSkpLG99fSx7a2V5OiJwYXJzZUF2Y0MiLHZhbHVlOmZ1bmN0aW9uKGUpe3ZhciB0PWFyZ3VtZW50cy5sZW5ndGg+MSYmdm9pZCAwIT09YXJndW1lbnRzWzFdP2FyZ3VtZW50c1sxXTo0O2lmKCEoZS5sZW5ndGg8NCkpe2Zvcih2YXIgbixyPWUubGVuZ3RoLGk9W10sYT0wO2ErdDxyOylpZihuPW8oZSxhKSwzPT09dCYmKG4+Pj49OCksYSs9dCxuKXtpZihhK24+cilicmVhaztpLnB1c2goZS5zdWJhcnJheShhLGErbikpLGErPW59cmV0dXJuIGl9fX0se2tleToicGFyc2VTRUkiLHZhbHVlOmZ1bmN0aW9uKGUsdCl7Zm9yKHZhciBuPWUubGVuZ3RoLHI9dD8yOjEsaT0wLGE9MCxvPSIiOzI1NT09PWVbcl07KWkrPTI1NSxyKys7Zm9yKGkrPWVbcisrXTsyNTU9PT1lW3JdOylhKz0yNTUscisrO2lmKGErPWVbcisrXSw1PT09aSYmbj5yKzE2KWZvcih2YXIgdT0wO3U8MTY7dSsrKW8rPWVbcl0udG9TdHJpbmcoMTYpLHIrKztyZXR1cm57cGF5bG9hZDplLnN1YmFycmF5KHIscithKSx0eXBlOmksc2l6ZTphLHV1aWQ6b319fSx7a2V5OiJyZW1vdmVFUEIiLHZhbHVlOmZ1bmN0aW9uKGUpe2Zvcih2YXIgdD1lLmJ5dGVMZW5ndGgsbj1bXSxyPTE7cjx0LTI7KTA9PT1lW3JdJiYwPT09ZVtyKzFdJiYzPT09ZVtyKzJdPyhuLnB1c2gocisyKSxyKz0yKTpyKys7aWYoIW4ubGVuZ3RoKXJldHVybiBlO3ZhciBpPXQtbi5sZW5ndGgsYT1uZXcgVWludDhBcnJheShpKSxvPTA7Zm9yKHI9MDtyPGk7bysrLHIrKylvPT09blswXSYmKG8rKyxuLnNoaWZ0KCkpLGFbcl09ZVtvXTtyZXR1cm4gYX19XSwobj1udWxsKSYmYSh0LnByb3RvdHlwZSxuKSxyJiZhKHQsciksT2JqZWN0LmRlZmluZVByb3BlcnR5KHQsInByb3RvdHlwZSIse3dyaXRhYmxlOiExfSksZX0oKTsidW5kZWZpbmVkIiE9dHlwZW9mIHNlbGYmJiJEZWRpY2F0ZWRXb3JrZXJHbG9iYWxTY29wZSI9PT1zZWxmLmNvbnN0cnVjdG9yLm5hbWUmJnNlbGYuYWRkRXZlbnRMaXN0ZW5lcigicnRjdHJhbnNmb3JtIiwoZnVuY3Rpb24odCl7dmFyIG4scj10LnRyYW5zZm9ybWVyLGE9ci5vcHRpb25zLnBvcnQsbz0obj1mdW5jdGlvbihlKXthLnBvc3RNZXNzYWdlKGUpfSxuZXcgVHJhbnNmb3JtU3RyZWFtKHt0cmFuc2Zvcm06ZnVuY3Rpb24odCxyKXt2YXIgYT1lLmlzSDI2NVZpZGVvRnJhbWUodCk7ZS5nZXROQUxVbml0cyhuZXcgaSh0LmRhdGEpLGEpLmZvckVhY2goKGZ1bmN0aW9uKGUpe2lmKGUuc2VpKXt2YXIgdD11LnBhcnNlU0VJKHUucmVtb3ZlRVBCKGUuYm9keSksITEpO3QmJm4oe2RhdGE6dCxzZWk6e2NvZGU6dC50eXBlLGNvbnRlbnQ6dC5wYXlsb2FkfX0pfX0pKSxyLmVucXVldWUodCl9fSkpO3IucmVhZGFibGUucGlwZVRocm91Z2gobykucGlwZVRvKHQudHJhbnNmb3JtZXIud3JpdGFibGUpfSkpfSgpOwo=",rC="undefined"!=typeof window&&window.Blob&&new Blob([atob(tC)],{type:"text/javascript;charset=utf-8"});function nC(){var e=rC&&(ok||window.webkitURL).createObjectURL(rC);try{return e?new Worker(e,{}):new Worker("data:application/javascript;base64,"+tC,{type:"module"})}finally{e&&(ok||window.webkitURL).revokeObjectURL(e)}}var iC=function(){function e(){xg(this,e),Og(this,"_audioStallTimer",null),Og(this,"_preSample",null),Og(this,"_isStallInPreReportEnd",!1),Og(this,"_stallList",[]),Og(this,"_audioTransceiver",null)}var t,r;return Lg(e,[{key:"start",value:function(t){this.stop(),this._audioTransceiver=t,e.interval>=100&&this._startStallCountInterval()}},{key:"stop",value:function(){this._stallList=[],this._audioStallTimer&&(clearTimeout(this._audioStallTimer),this._audioStallTimer=null)}},{key:"destroy",value:function(){this.stop(),this._audioTransceiver=null}},{key:"getAudioStallInfo",value:(r=Tg(kg().mark((function e(){var t,r;return kg().wrap((function(e){for(var n;;)switch(e.prev=e.next){case 0:return t={stats_count:Nc(n=this._stallList).call(n,(function(e){return e.get_stats_cost})).length,stall_list:Vg(this._stallList)},e.prev=1,e.next=4,this._audioStallCount();case 4:e.next=8;break;case 6:e.prev=6,e.t0=e.catch(1);case 8:return r=oC(this._stallList,2,this._isStallInPreReportEnd),this._isStallInPreReportEnd=r.isStallInEnd,this.stop(),this._startStallCountInterval(),e.abrupt("return",{stallCount:r.stall_count,stallDuration:r.stall_duration,list:r.list,extra:t});case 13:case"end":return e.stop()}}),e,this,[[1,6]])}))),function(){return r.apply(this,arguments)})},{key:"_startStallCountInterval",value:function(){var t=this,r=function(){var n=Tg(kg().mark((function n(){return kg().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return clearTimeout(t._audioStallTimer),t._audioStallTimer=null,n.next=4,t._audioStallCount();case 4:t._audioStallTimer||(t._audioStallTimer=c_(r,e.interval));case 5:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}();this._audioStallTimer=c_(r,e.interval)}},{key:"_audioStallCount",value:(t=Tg(kg().mark((function t(){var r,n,i,o,a,s,u,l,c,f,d,p,h,v,m,y,g;return kg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(this._preSample&&_x()-this._preSample.ts<.5*e.interval)){t.next=2;break}return t.abrupt("return");case 2:return r=_x(),o=0,t.prev=4,t.next=7,null===(a=this._audioTransceiver)||void 0===a?void 0:a.receiver.getStats();case 7:null==(s=t.sent)||cf(s).call(s,(function(e){"inbound-rtp"===e.type&&(n=e),o++})),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(4),i=t.t0.message||Fx(t.t0);case 14:if(this._preSample){t.next=17;break}return this._preSample={ts:_x(),concealedSamples:(null===(u=n)||void 0===u?void 0:u.concealedSamples)||0,totalSamplesReceived:(null===(l=n)||void 0===l?void 0:l.totalSamplesReceived)||0},t.abrupt("return");case 17:c=_x(),f=_x(),d=f-this._preSample.ts,n?(h=(p=n).concealedSamples,v=p.totalSamplesReceived,m=h-this._preSample.concealedSamples,y=v-this._preSample.totalSamplesReceived,g=m>=0&&y>=0&&m>=e.ratio*y,this._stallList.push({concealed:m,received:y,diff:d,start:this._preSample.ts,end:f,get_stats_cost:c-r,get_stats_start:r,get_stats_end:c,is_stall:g}),this._preSample.concealedSamples=h,this._preSample.totalSamplesReceived=v,this._preSample.ts=f):this._stallList.push({diff:d,start:this._preSample.ts,end:f,get_stats_cost:c-r,get_stats_start:r,get_stats_end:c,reason:o?i||"no inbound-rtp":"no report"});case 21:case"end":return t.stop()}}),t,this,[[4,11]])}))),function(){return t.apply(this,arguments)})}]),e}();Og(iC,"interval",100),Og(iC,"ratio",.6);var oC=function(e,t,r){for(var n,i={stall_count:0,stall_duration:0,isStallInEnd:!1,list:[]},o=0,a=0,s=function(r){var n=e[r];n.is_stall&&(o++,a+=n.diff||0);var s=r===e.length-1;if(!n.is_stall||s){var l=o>=t,c=r+t-o-1;if(!l&&o>2){var f,d=0;cf(f=hy(e).call(e,r+1,c+1)).call(f,(function(e){e.is_stall&&(d+=e.diff||0)})),(l=a+d>iC.interval*t*iC.ratio)&&(r=c,a+=d)}l&&(i.stall_count++,i.stall_duration+=a,i.list.push(a)),s&&(i.isStallInEnd=l),o=a=0}u=r},u=0;u<e.length;u++)s(u);return!0===(null===(n=e[0])||void 0===n?void 0:n.is_stall)&&r&&i.stall_count>0&&i.stall_count--,i};function aC(){var e=navigator.userAgent;return null!==e.match("Safari")&&null===e.match("Chrome")}function sC(){return null!==navigator.userAgent.match("Firefox")}var uC=function(){function e(){var t=this;xg(this,e),Og(this,"_handleVisibilityChange",(function(){"hidden"===document.visibilityState&&t._framePause()})),Og(this,"_framePause",(function(){if(t._prePts){var e=performance.now(),r=e-t._prePts;t._stallList.push({playTime:e,timeUpdateInterval:Math.round(r)}),t._prePts=void 0}})),this._removeHandler=void 0,this._remotePlayPauseHandler=void 0,this._prePts=void 0,this._stallList=void 0,this._videoInWaiting100ms=!1,this._videoInWaiting500ms=!1,this._isPaused=void 0,this._pauseStart=0,this._pauseDuration=0,this._requestVideoFrameCallbackTimer=void 0,this._player=void 0,this._stallTimeThreshold={stall500ms:aC()||sC()?550:500,stall100ms:100},this._support100msStall="undefined"!=typeof window&&"function"==typeof HTMLVideoElement.prototype.requestVideoFrameCallback}return Lg(e,[{key:"start",value:function(e){var t=this;if(this._player=e,this._support100msStall){var r;if(e)this._requestVideoFrameCallbackTimer=e.requestVideoFrameCallback(Iy(r=this._onVideoRefresh).call(r,this)),this._removeHandler=function(){t._requestVideoFrameCallbackTimer&&e.cancelVideoFrameCallback(t._requestVideoFrameCallbackTimer)}}else{var n=function(){return t._onVideoTimeupdate(e)};e.addEventListener("timeupdate",n),this._removeHandler=function(){return e.removeEventListener("timeupdate",n)}}var i=function(){return t._onVideoPause()};e.addEventListener("pause",i);var o=function(){return t._onVideoPlay()};e.addEventListener("play",o),this._remotePlayPauseHandler=function(){e.removeEventListener("pause",i),e.removeEventListener("play",o)},document.addEventListener("visibilitychange",this._handleVisibilityChange),document.addEventListener("pagehide",this._framePause())}},{key:"stop",value:function(){delete this._player,this._removeHandler&&this._removeHandler(),delete this._removeHandler,this._remotePlayPauseHandler&&this._remotePlayPauseHandler(),delete this._remotePlayPauseHandler,delete this._stallList,delete this._prePts,this._videoInWaiting100ms=!1,this._videoInWaiting500ms=!1,document.removeEventListener("visibilitychange",this._handleVisibilityChange),document.removeEventListener("pagehide",this._framePause())}},{key:"destroy",value:function(){this.stop()}},{key:"getStallInfo",value:function(e){var t=this,r=e.interval,n=e.frameRateReceived,i=e.frameRateDecoded,o=e.bitrate,a={pts:0,stall:{stallCount500ms:0,stallDuration500ms:0,stallRate500ms:0,stallCount100ms:0,stallDuration100ms:0,stallRate100ms:0},pauseDuration:this._getPauseDuration()};if(this._stallList&&"visible"===document.visibilityState&&!this._isPaused){var s;if((aC()||sC())&&(0===o||(i||1/0)<=1||(n||1/0)<=1)||0===this._stallList.length)a.stall.stallDuration500ms=r,a.stall.stallCount500ms=this._videoInWaiting500ms?0:1,a.stall.stallRate500ms=1,this._videoInWaiting500ms=!0,this._support100msStall&&(a.stall.stallDuration100ms=r,a.stall.stallCount100ms=this._videoInWaiting100ms?0:1,a.stall.stallRate100ms=1,this._videoInWaiting100ms=!0);else cf(s=this._stallList).call(s,(function(e,n){var i=e.timeUpdateInterval,o=e.playTime,s=i;0===n&&(t._videoInWaiting100ms||t._videoInWaiting500ms)&&(s=Math.round(i%r)),i>t._stallTimeThreshold.stall500ms?(a.stall.stallDuration500ms+=s,t._videoInWaiting500ms||a.stall.stallCount500ms++,t._videoInWaiting500ms=!0):t._videoInWaiting500ms=!1,t._support100msStall&&(i>t._stallTimeThreshold.stall100ms?(a.stall.stallDuration100ms+=s,t._videoInWaiting100ms||a.stall.stallCount100ms++,t._videoInWaiting100ms=!0):t._videoInWaiting100ms=!1),a.pts=o}));var u=a.stall,l=u.stallDuration500ms,c=u.stallDuration100ms;a.stall.stallRate500ms=Math.min(Number((l/r).toFixed(4)),1),this._support100msStall?a.stall.stallRate100ms=Math.min(Number((c/r).toFixed(4)),1):(delete a.stall.stallRate100ms,delete a.stall.stallCount100ms,delete a.stall.stallDuration100ms),this._stallList=[]}return a}},{key:"_getPauseDuration",value:function(){var e=this._pauseDuration;if(this._pauseDuration=0,this._isPaused){var t=_x(),r=t-(this._pauseStart||0);r>500&&(this._pauseStart=t,e+=r)}return e}},{key:"_onVideoPause",value:function(){this._isPaused=!0,this._pauseStart=_x(),this._framePause()}},{key:"_onVideoPlay",value:function(){this._isPaused=!1;var e=_x()-this._pauseStart;e>500&&(this._pauseDuration+=e)}},{key:"_onVideoTimeupdate",value:function(e){if(e&&0!==e.currentTime)if(void 0!==this._prePts){if(this._stallList||(this._stallList=[]),e.currentTime>this._prePts){var t=e.currentTime-this._prePts;this._stallList.push({playTime:e.currentTime,timeUpdateInterval:Math.round(1e3*t)})}this._prePts=e.currentTime}else this._prePts=e.currentTime}},{key:"_onVideoRefresh",value:function(e,t){if(this._stallList||(this._stallList=[]),this._prePts){var r=t.presentationTime-this._prePts;this._stallList.push({playTime:t.presentationTime,timeUpdateInterval:Math.round(r)})}var n;(this._prePts=t.presentationTime,this._player)&&this._player.requestVideoFrameCallback(Iy(n=this._onVideoRefresh).call(n,this))}}]),e}();function lC(e){return cC.apply(this,arguments)}function cC(){return(cC=Tg(kg().mark((function e(t){var r,n;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={},e.next=3,t;case 3:return n=e.sent,r.timestamp=_x(),null==n||cf(n).call(n,(function(e){"inbound-rtp"===e.type?(r.packetsLost=e.packetsLost,r.packetsReceived=e.packetsReceived,r.bytesReceived=e.bytesReceived,void 0!==e.jitterBufferDelay&&(r.jitterBufferDelay=e.jitterBufferDelay,r.jitterBufferEmittedCount=e.jitterBufferEmittedCount),void 0!==e.totalSamplesReceived&&(r.totalSamplesReceived=e.totalSamplesReceived,r.concealedSamples=e.concealedSamples,r.silentConcealedSamples=e.silentConcealedSamples,r.concealmentEvents=e.concealmentEvents),void 0!==e.fecPacketsReceived&&(r.fecPacketsReceived=e.fecPacketsReceived),void 0!==e.estimatedPlayoutTimestamp&&(r.estimatedPlayoutTimestamp=e.estimatedPlayoutTimestamp),void 0!==e.totalSamplesDuration&&(r.totalSamplesDuration=e.totalSamplesDuration)):"codec"===e.type?(r.recordSampleRate=e.clockRate,e.channels&&(r.numChannels=e.channels),r.codecType=e.mimeType):"candidate-pair"===e.type?(r.rtt=1e3*e.currentRoundTripTime,r.total_rtt=1e3*e.totalRoundTripTime):"track"===e.type&&void 0!==e.audioLevel||e.type})),e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fC(e,t){var r=vC(e,t,"timestamp"),n=vC(e,t,"packetsLost"),i=Math.round(vC(e,t,"jitterBufferDelay")/vC(e,t,"jitterBufferEmittedCount")*1e3),o=vC(e,t,"packetsReceived");return{audioLossRate:+(n/(o+n)).toFixed(2),receivedKBitrate:+(8*vC(e,t,"bytesReceived")/r).toFixed(2),statsInterval:r,rtt:t.rtt||0,jitterBufferDelay:i,packetsReceived:o,numChannels:t.numChannels||1,estimatedPlayoutTimestamp:t.estimatedPlayoutTimestamp,samplesDuration:Math.round(1e3*vC(e,t,"totalSamplesDuration")),receivedSampleRate:vC(e,t,"totalSamplesReceived")/r,concealedSamples:Math.round(vC(e,t,"concealedSamples")),concealmentEvent:Math.round(vC(e,t,"concealmentEvents")),e2eDelay:Math.round(t.rtt+i)}}function dC(e){return pC.apply(this,arguments)}function pC(){return(pC=Tg(kg().mark((function e(t){var r,n;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={},e.next=3,t;case 3:return n=e.sent,r.timestamp=_x(),null==n||cf(n).call(n,(function(e){"inbound-rtp"===e.type?(r.packetsLost=e.packetsLost,r.packetsReceived=e.packetsReceived,r.bytesReceived=e.bytesReceived,r.framesDecoded=e.framesDecoded,r.totalDecodeTime=e.totalDecodeTime,r.framesReceived=e.framesReceived,r.keyFramesDecoded=e.keyFramesDecoded,r.framesDropped=e.framesDropped,r.firCount=e.firCount,r.nackCount=e.nackCount,r.pliCount=e.pliCount,void 0!==e.jitterBufferDelay&&(r.jitterBufferEmittedCount=e.jitterBufferEmittedCount,r.jitterBufferDelay=e.jitterBufferDelay),void 0!==e.frameWidth&&(r.width=e.frameWidth,r.height=e.frameHeight),void 0!==e.estimatedPlayoutTimestamp&&(r.estimatedPlayoutTimestamp=e.estimatedPlayoutTimestamp)):"track"===e.type&&void 0!==e.frameWidth?(r.width=e.frameWidth,r.height=e.frameHeight,void 0!==e.framesReceived&&(r.framesReceived=e.framesReceived)):"codec"===e.type?r.codecType=e.mimeType:"candidate-pair"===e.type&&(r.rtt=1e3*e.currentRoundTripTime,r.totalRtt=1e3*e.totalRoundTripTime)})),e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function hC(e,t){var r=vC(e,t,"timestamp"),n=vC(e,t,"packetsLost"),i=vC(e,t,"nackCount"),o=vC(e,t,"packetsReceived"),a=Math.round(vC(e,t,"jitterBufferDelay")/vC(e,t,"jitterBufferEmittedCount")*1e3);return{statsInterval:r,width:t.width||0,height:t.height||0,estimatedPlayoutTimestamp:t.estimatedPlayoutTimestamp,videoLossRate:+n/(vC(e,t,"packetsReceived")+n),receivedKBitrate:+(8*vC(e,t,"bytesReceived")/r).toFixed(2),decoderOutputFrameRate:Math.round(1e3*vC(e,t,"framesDecoded")/r),receivedFrameRate:Math.round(1e3*vC(e,t,"framesReceived")/r),rtt:t.rtt||0,totalRtt:Math.round(t.totalRtt||0),jitterBufferDelay:a,codecType:t.codecType,packetsReceived:o,avgDecodeDelay:Math.round(1e3*vC(e,t,"totalDecodeTime")/vC(e,t,"framesDecoded")),keyFramesDecoded:vC(e,t,"keyFramesDecoded"),framesDropped:vC(e,t,"framesDropped"),firCount:vC(e,t,"firCount"),nackCount:i,pliCount:vC(e,t,"pliCount"),e2eDelay:Math.round(t.rtt+a),retransmittedRate:+(i/(o+n)).toFixed(2)}}function vC(e,t,r){var n=Fk(e[r])?0:+e[r],i=Fk(t[r])?0:+t[r];return Math.max(0,i-n)}var mC=1,yC=2,gC=3,_C=1,bC=2,wC=3,SC=4,kC=5,RC=6,TC=function(){function e(t,r){xg(this,e),Og(this,"_preDownlinkStats",[]),this._peer=t,this._networkQualityParams=r}return Lg(e,[{key:"getDownlinkQuality",value:function(e,t){if(0!==e.receivedKBitrate||0!==t.receivedKBitrate){if("connected"!==this._peer.connectionState&&"connecting"!==this._peer.connectionState||!navigator.onLine)return[RC,{}];var r,n,i,o=this._getQosLevel(e.rtt,e.audioLossRate,t.retransmittedRate),a=this._getDownlinkQoE("audio",e.stallDuration/e.statsInterval,e.e2eDelay),s=this._getNetworkQuality(o,a),u=this._getQosLevel(t.rtt,t.videoLossRate,t.retransmittedRate),l=this._getDownlinkQoE("video",t.stallDuration/t.statsInterval,t.e2eDelay),c=this._getNetworkQuality(u,l),f=s&&c?Math.ceil((s+c)/2):s||c,d=o&&u?Math.ceil((o+u)/2):o||u;if(f)return this._preDownlinkStats=hy(r=Bg(n=[]).call(n,Vg(this._preDownlinkStats),[f])).call(r,-2),[Math.floor(xP(i=this._preDownlinkStats).call(i,(function(e,t){return t+e}),0)/this._preDownlinkStats.length),{qualityQos:d,audioLevel:s,videoLevel:c,audioQos:o,audioQoe:a,videoQos:u,videoQoe:l}]}}},{key:"destroy",value:function(){this._preDownlinkStats=[]}},{key:"_getQosLevel",value:function(e,t,r){var n,i=this._networkQualityParams.networkQos;return n=(!e||e<=i[_C].maxRtt)&&t<=i[_C].maxLoss?_C:(!e||e<=i[bC].maxRtt)&&t<=i[bC].maxLoss?bC:(!e||e<=i[wC].maxRtt)&&t<=i[wC].maxLoss?wC:(!e||e<=i[SC].maxRtt)&&t<=i[SC].maxLoss?SC:kC,r>i[SC].minRetransmittedRate?n=Math.max(n,SC):r>i[wC].minRetransmittedRate?n=Math.max(n,wC):r>i[bC].minRetransmittedRate&&(n=Math.max(n,bC)),n}},{key:"_getDownlinkQoE",value:function(e,t,r){var n=this._networkQualityParams.networkQoe,i={audio:{delay:n.audioDelay,stallRadio:n.audioStallRadio},video:{delay:n.videoDelay,stallRadio:n.videoStallRadio}}[e];return t>i.stallRadio||r>i.delay||t>i.stallRadio/2&&r>i.delay/2?gC:(t>i.stallRadio/2||i.delay,yC)}},{key:"_getNetworkQuality",value:function(e,t){return t===mC?Math.max(e-2,1):t===yC?e:Math.min(e+1,5)}}]),e}(),xC=new BP("rts"),EC=function(e){Pg(o,e);var t,r,n,i=Ag(o);function o(e){var t;return xg(this,o),Og(jg(t=i.call(this)),"_url",""),Og(jg(t),"_pc",null),Og(jg(t),"_audioTransceicer",null),Og(jg(t),"_videoTransceicer",null),Og(jg(t),"_mediaStream",null),Og(jg(t),"_lastMediaStream",null),Og(jg(t),"_media",null),Og(jg(t),"_opts",null),Og(jg(t),"_loader",null),Og(jg(t),"_networkEvaluate",null),Og(jg(t),"_retry",0),Og(jg(t),"_waitingTimer",0),Og(jg(t),"_rctConnectStartTs",0),Og(jg(t),"_isReplacing",!1),Og(jg(t),"_checkStatsErrorTimer",null),Og(jg(t),"_audioStallObserver",null),Og(jg(t),"_videoStallObserver",null),Og(jg(t),"_networkQuality",null),Og(jg(t),"_preAudioStats",null),Og(jg(t),"_preVideoStats",null),Og(jg(t),"_rtcReportTimer",0),Og(jg(t),"_networkQualityResult",[]),Og(jg(t),"_peerStateTimer",null),Og(jg(t),"_checkStatsError",Tg(kg().mark((function e(){return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t._checkStatsErrorTimer&&clearTimeout(t._checkStatsErrorTimer),t._checkStatsErrorTimer=c_(Tg(kg().mark((function e(){var r,n,i;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getStatsSnapshoot();case 2:(r=e.sent).video&&(n=r.video,i=n.framesDecoded,n.bytesReceived?i||t._emitError(GP.create(jP,WP.MEDIA_ERR_DECODE,{message:"rts decode error"})):t._emitError(GP.create(jP,WP.MEDIA_ERR_DECODE,{message:"rts receive empty"})));case 4:case"end":return e.stop()}}),e)}))),t._opts.checkStatsErrorDelay);case 2:case"end":return e.stop()}}),e)})))),Og(jg(t),"_onTrack",(function(e){xC.log("addTrack: ",e.track,e.streams),t["_".concat(e.track.kind)]=e.track})),Og(jg(t),"_mockWaitingByTimeupdate",(function(){var e,r;"connected"!==(null===(e=t._pc)||void 0===e?void 0:e.connectionState)&&"connected"!==(null===(r=t._pc)||void 0===r?void 0:r.iceConnectionState)||(clearTimeout(t._waitingTimer),t._waitingTimer=c_((function(){var e;null!==(e=t._media)&&void 0!==e&&e.paused||t.emit("waiting")}),t._opts.stallInterval))})),Og(jg(t),"_onLoadedData",(function(){xC.log("loadeddata emit"),t.getStatsSnapshoot().then((function(e){t.emit(vI,{type:"video",elapsed:_x()-t._rctConnectStartTs,meta:e.video}),t.emit(vI,{type:"audio",elapsed:_x()-t._rctConnectStartTs,meta:e.audio})}))})),Og(jg(t),"_setDelay",(function(e){if(t._opts.progressiveSetDelay)t._startSetDelayLoop(e);else{var r,n,i=hk(r=["playoutDelayHint","jitterBufferDelayHint","jitterBufferTarget"]).call(r,(function(e){var r,n;return e in(null===(r=t._audioTransceicer)||void 0===r?void 0:r.receiver)&&e in(null===(n=t._videoTransceicer)||void 0===n?void 0:n.receiver)}));if(!i)return;if(e="number"==typeof e&&e>0?e:null,(null===(n=t._audioTransceicer)||void 0===n?void 0:n.receiver[i])===e)return;t._audioTransceicer.receiver[i]=e,t._videoTransceicer.receiver[i]=e}})),Og(jg(t),"_targetDelayHint",null),Og(jg(t),"_setDelayTimer",null),Og(jg(t),"_setDelayError",null),Og(jg(t),"_startSetDelayLoop",function(){var e=Tg(kg().mark((function e(r){var n,i,o,a,s,u,l,c,f;return kg().wrap((function(e){for(var d;;)switch(e.prev=e.next){case 0:if(n=hk(d=["playoutDelayHint","jitterBufferDelayHint","jitterBufferTarget"]).call(d,(function(e){var r,n;return e in(null===(r=t._audioTransceicer)||void 0===r?void 0:r.receiver)&&e in(null===(n=t._videoTransceicer)||void 0===n?void 0:n.receiver)}))){e.next=3;break}return e.abrupt("return");case 3:if(r="number"==typeof r&&r>0?r:null,t._targetDelayHint!==r){e.next=6;break}return e.abrupt("return");case 6:if(t._targetDelayHint=r,!t._setDelayTimer){e.next=9;break}return e.abrupt("return");case 9:i=null,o=null,a=t._opts.adaptiveJitterBuffer,s=a.loopInterval,u=a.maxAvSyncDelay,l=a.maxJitterBufferDiff,c=a.maxStep,f=0,t._setDelayTimer=fT(Tg(kg().mark((function e(){var r,a,s,d,p,h,v,m,y,g,_,b,w,S,k,R;return kg().wrap((function(e){for(var T,x,E,L,O;;)switch(e.prev=e.next){case 0:if(e.prev=0,null!==(r=t._audioTransceicer)&&void 0!==r&&r.receiver&&null!==(a=t._videoTransceicer)&&void 0!==a&&a.receiver){e.next=5;break}return i=null,o=null,e.abrupt("return");case 5:if((s=t._audioTransceicer.receiver[n])!==t._targetDelayHint){e.next=8;break}return e.abrupt("return");case 8:return d=1e3*t._targetDelayHint,p=1e3*s,e.next=12,Gm.all([lC(t._audioTransceicer.receiver.getStats()),dC(t._videoTransceicer.receiver.getStats())]);case 12:if(h=e.sent,v=Dg(h,2),m=v[0],y=v[1],!i||!o){e.next=36;break}if(g=fC(i,m),(_=hC(o,y)).estimatedPlayoutTimestamp&&g.estimatedPlayoutTimestamp&&(b=_.estimatedPlayoutTimestamp-g.estimatedPlayoutTimestamp),w=g.jitterBufferDelay,S=_.jitterBufferDelay,!w||!S){e.next=36;break}if(!(Math.abs(w-S)>u||b&&Math.abs(b)>u)){e.next=27;break}return f++>8&&S>w&&(t._audioTransceicer.receiver[n]=Math.min(S/1e3,t._targetDelayHint),f=0),xC.log(Bg(T=Bg(x=Bg(E="av_jb_diff(".concat(w-S,"=")).call(E,w,"-")).call(x,S,") or av_sync_diff(")).call(T,b,") too much, skip setting")),e.abrupt("return");case 27:if(f=0,null===s||!(Math.abs(w-p)>l||Math.abs(S-p)>l)){e.next=31;break}return xC.log(Bg(L="audio(".concat(w-p,"),video(")).call(L,S-p,"). current_target_diff too much, skip setting")),e.abrupt("return");case 31:k=d>(p||w)?1:-1,R=(R=(Math.abs(d-(p||w))>c?(p||w)+k*c:d)/1e3)>.2?R:null,xC.log(Bg(O="set receiver.".concat(n," = ")).call(O,R)),t._audioTransceicer.receiver[n]=R;case 36:i=m,o=y,e.next=44;break;case 40:e.prev=40,e.t0=e.catch(0),xC.error("set delay loop error:",e.t0),t._setDelayError=e.t0.message||e.t0.toString()||"unknown error";case 44:case"end":return e.stop()}}),e,null,[[0,40]])}))),s);case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),Og(jg(t),"_getDelay",(function(){try{var e,r=hk(e=["playoutDelayHint","jitterBufferDelayHint","jitterBufferTarget"]).call(e,(function(e){return e in t._videoTransceicer.receiver&&e in t._audioTransceicer.receiver}));return t._audioTransceicer.receiver[r]}catch(PC){xC.error("get delay error")}})),Og(jg(t),"_onLoaderRetry",(function(e,r){t.emit(hI,{error:GP.network(e),retryTime:r})})),t._opts=function(e){var t=e||{},r=t.adaptiveJitterBuffer,n=void 0===r?{}:r,i=Zg(t,FI);return Sg({retryCount:0,retryDelay:1e3,loadTimeout:5e3,stallInterval:400,networkEvaluateInterval:1e3,delayHint:0,videoDelaySync:!1,seamlesslyReload:!1,enableSei:!1,enableOriginSdpLogger:!1,checkStatsErrorDelay:5e3,connectionStateChangeTimeout:5e3,enableNetworkQuality:!1,hackCreateOfferIssue:!1,progressiveSetDelay:!1,networkQuality:{networkQos:{1:{maxRtt:250,maxLoss:.15},2:{maxRtt:500,maxLoss:.3,minRetransmittedRate:.2},3:{maxRtt:750,maxLoss:.45,minRetransmittedRate:.35},4:{maxRtt:1e3,maxLoss:.6,minRetransmittedRate:.5}},networkQoe:{audioDelay:2e3,audioStallRadio:.3,videoDelay:2e3,videoStallRadio:.6}},enableAdaptiveJitterBuffer:!1,adaptiveJitterBuffer:Sg({networkWindow:3,windowMethod:"max",loopInterval:500,maxAvSyncDelay:400,maxJitterBufferDiff:500,maxStep:500},n),networkStrategy:{1:{jitterBuffer:null},2:{jitterBuffer:1.5},3:{jitterBuffer:2},4:{jitterBuffer:3},5:{jitterBuffer:3}}},i)}(e),t._media=t._opts.media,t._loader=new TI(Sg(Sg({},e.fetchOptions),{},{responseType:"json",method:"POST",retry:t._opts.retryCount,retryDelay:t._opts.retryDelay,timeout:t._opts.loadTimeout,onRetryError:t._onLoaderRetry,logger:xC})),t._retry=t._opts.retryCount,t._bindMediaEvent(),t._opts.mediaStream&&t._opts.seamlesslyReload&&(t._lastMediaStream=t._opts.mediaStream),t}return Lg(o,[{key:"pc",get:function(){return this._pc}},{key:"audioTrack",get:function(){return this._audio}},{key:"videoTack",get:function(){return this._video}},{key:"loader",get:function(){return this._loader}},{key:"networkStats",get:function(){var e;return null===(e=this._networkEvaluate)||void 0===e?void 0:e.getStats()}},{key:"getStats",value:function(){return NI(this._pc)}},{key:"getStatsSnapshoot",value:function(){return this.getStats().then((function(e){return UI(e)}))}},{key:"load",value:(n=Tg(kg().mark((function e(t){var r,n,i=this;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._disconnect(),this._url=t,this._retry=this._opts.retryCount,!this._opts.hackCreateOfferIssue){e.next=6;break}return e.next=6,this._createEmptyPeer();case 6:return r=YI(),e.prev=7,(n=this._pc)&&n.close(),this._pc=new RTCPeerConnection({encodedInsertableStreams:!(!r||!this._opts.enableSei)||void 0}),this._bindRTCEvents(),e.next=14,this._connect(t);case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(7),c_((function(){return i._emitError(GP.create(DP,null,e.t0))}));case 19:case"end":return e.stop()}}),e,this,[[7,16]])}))),function(e){return n.apply(this,arguments)})},{key:"switchURL",value:function(e){this.load(e||this._url)}},{key:"_bindRTCEvents",value:function(){var e=this,t=this._pc;t.addEventListener("track",this._onTrack),t.addEventListener("connectionstatechange",(function(){if(xC.warn("onconnectionstatechange:",t.connectionState),e._clearPeerStateTimeout(),e.emit(xI,{state:t.connectionState,url:e._url}),"disconnected"!==t.connectionState&&"failed"!==t.connectionState||(e.emit("waiting"),e._stopRtcReport()),"failed"===t.connectionState){if(0===e._retry)return void e._emitError(GP.network(new Error("rtc connect failed")));e._retry--,e.load(e._url)}"connected"===t.connectionState&&(e._handleMediaStream(),e.emit(cI,{url:e._url,responseUrl:e._url,elapsed:_x()-e._rctConnectStartTs}),e._checkStatsError(),e._startRtcReport())}))}},{key:"_handleMediaStream",value:function(){var e=this;if(this._lastMediaStream){var t,r=this._lastMediaStream.getVideoTracks()[0],n=this._lastMediaStream.getAudioTracks()[0];r&&this._lastMediaStream.removeTrack(r),n&&this._lastMediaStream.removeTrack(n),this._mediaStream=this._lastMediaStream,this._audio&&this._mediaStream.addTrack(this._audio),this._video&&this._mediaStream.addTrack(this._video),this._isReplacing=!0,this._media.pause(),null===(t=this._media.play())||void 0===t||t.finally((function(){e._isReplacing=!1}))}else{this._mediaStream=new MediaStream,this._audio&&this._mediaStream.addTrack(this._audio),this._video&&this._mediaStream.addTrack(this._video),this._media.srcObject=this._mediaStream;var i=this._media.play();i&&i.catch&&i.catch((function(e){}))}}},{key:"initVideoEncodedTransform",value:function(){var e=this;if(this._videoTransceicer&&this._videoTransceicer.receiver){var t=this._videoTransceicer.receiver;if(YI()){var r=t.createEncodedStreams(),n=r.readable,i=r.writable;n.pipeThrough(eC((function(t){e.emit(mI,t)}))).pipeTo(i)}else if("undefined"!=typeof TransformStream&&"undefined"!=typeof RTCRtpSender&&"undefined"!=typeof RTCRtpReceiver&&"undefined"!=typeof RTCRtpScriptTransform&&"transform"in RTCRtpSender.prototype&&"transform"in RTCRtpReceiver.prototype&&BI()&&KI()){var o=new nC,a=new MessageChannel;this._videoTransceicer.receiver.transform=new RTCRtpScriptTransform(o,{port:a.port2},[a.port2]),a.port1.onmessage=function(t){e.emit(mI,t.data)}}}else console.log("no receiver found when trying to bind encodedTransform")}},{key:"initAudioEncodedTransform",value:function(){if(this._audioTransceicer&&this._audioTransceicer.receiver)if(YI()){var e=this._audioTransceicer.receiver.createEncodedStreams(),t=e.readable,r=e.writable;t.pipeThrough(new TransformStream({transform:function(e,t){e.data.byteLength<=1e3?t.enqueue(e):xC.log("too large audio frame",e.data.byteLength)}})).pipeTo(r)}else xC.warn("legacy EncodedTransform is not supported");else xC.warn("no receiver found when trying to bind encodedTransform")}},{key:"_bindMediaEvent",value:function(){this._media.addEventListener("timeupdate",this._mockWaitingByTimeupdate),this._media.addEventListener("loadeddata",this._onLoadedData)}},{key:"_connect",value:(r=Tg(kg().mark((function e(){var t,r,n,i,o,a,s,u,l,c,f,d,p,h,v,m;return kg().wrap((function(e){for(var y,g,_,b;;)switch(e.prev=e.next){case 0:if(!(t=this._pc).addTransceiver){e.next=11;break}return this._audioTransceicer=t.addTransceiver("audio",{direction:"recvonly"}),this._videoTransceicer=t.addTransceiver("video",{direction:"recvonly"}),this._setDelay(this._opts.delayHint),this._opts.enableSei&&(this.initVideoEncodedTransform(),this.initAudioEncodedTransform()),e.next=8,t.createOffer();case 8:r=e.sent,e.next=14;break;case 11:return e.next=13,t.createOffer({iceRestart:!0,offerToReceiveAudio:!0,offerToReceiveVideo:!0});case 13:r=e.sent;case 14:return this._opts.hackCreateOfferIssue&&this._createEmptyPeer(),xC.log("local offer"),xC.log(r.sdp),n=LI.parse(r.sdp),cf(y=Nc(g=n.media).call(g,(function(e){return"audio"===e.type}))).call(y,(function(e){var t,r,n,i,o=null===(n=Nc(t=e.rtp).call(t,(function(e){return"opus"===e.codec}))[0])||void 0===n?void 0:n.payload;o&&(cf(r=e.fmtp).call(r,(function(e){e.payload===o&&(e.config="minptime=10;stereo=1;useinbandfec=1")})),null===(i=e.rtcpFb)||void 0===i||i.push({payload:o,type:"nack"}))})),r.sdp=LI.write(n),xC.log("local offer modified:\n",r.sdp),e.next=23,t.setLocalDescription(r);case 23:return i=this._url,e.prev=24,this._opts.preProcessUrl&&(i=this._opts.preProcessUrl(i).url),this._loader.finnalUrl=i,c=/_?session_id=([^&$]+)/.exec(i),f=c?c[1]:_x()+"666",this.emit(fI,{url:i,offersdp:null!==(o=this._opts)&&void 0!==o&&o.enableOriginSdpLogger?r.sdp:void 0,sessionId:f}),d=_x(),e.next=33,this._loader.load(i,{body:Fx({sessionId:f,version:"1.0-html",localSdp:r})});case 33:if(p=e.sent,this.emit(dI,{headers:p.response.headers}),404!==(null==(h=null==p?void 0:p.data)?void 0:h.code)&&403!==(null==h?void 0:h.code)){e.next=41;break}return(v=GP.create(404===h.code?PP:OP,null,h)).errorType=EP,this._emitError(v),e.abrupt("return");case 41:if(200===(null==h?void 0:h.code)){e.next=43;break}throw new Error(Bg(_="code: ".concat(null==h?void 0:h.code,", message:")).call(_,null==h?void 0:h.message));case 43:if(xC.log("answer:"),xC.log(null===(a=h.remoteSdp)||void 0===a?void 0:a.sdp),m=LI.parse(h.remoteSdp.sdp),this.emit(pI,{url:i,elapsed:_x()-d,answersdp:null!==(s=this._opts)&&void 0!==s&&s.enableOriginSdpLogger?null==h||null===(u=h.remoteSdp)||void 0===u?void 0:u.sdp:void 0,parsedSdp:null==m||null===(l=m.media)||void 0===l?void 0:vR(l).call(l,(function(e){return{candidates:e.candidates,rtp:e.rtp,type:e.type}}))}),cf(b=m.media).call(b,(function(e){var t,r;e.fingerprint.hash=e.fingerprint.hash.toUpperCase();var n=null===(t=e.ssrcs)||void 0===t||null===(r=hk(t).call(t,(function(e){return"msid"===e.attribute})))||void 0===r?void 0:r.value;n&&!e.msid&&(e.msid=n)})),h.remoteSdp.sdp=LI.write(m),xC.log("answer modified:\n",h.remoteSdp.sdp),this._rctConnectStartTs=_x(),"closed"!==t.signalingState){e.next=53;break}return e.abrupt("return");case 53:return e.next=55,t.setRemoteDescription(h.remoteSdp);case 55:this._networkEvaluate=new XI(t,this._opts.networkEvaluateInterval),this._listenPeerStateTimeout(),e.next=62;break;case 59:e.prev=59,e.t0=e.catch(24),this._emitError(GP.network(e.t0));case 62:case"end":return e.stop()}}),e,this,[[24,59]])}))),function(){return r.apply(this,arguments)})},{key:"_listenPeerStateTimeout",value:function(){var e=this;this._peerStateTimer&&this._clearPeerStateTimeout(),this._opts.connectionStateChangeTimeout&&(this._peerStateTimer=c_((function(){e._emitError(GP.create(jP,WP.MEDIA_ERR_SRC_NOT_SUPPORTED,{message:"listen connectionstatechange timeout"}))}),this._opts.connectionStateChangeTimeout))}},{key:"_clearPeerStateTimeout",value:function(){clearTimeout(this._peerStateTimer),this._peerStateTimer=null}},{key:"_startRtcReport",value:function(){var e=this;this._stopRtcReport(),this._rtcReportTimer=fT(Tg(kg().mark((function t(){var r,n,i,o,a,s,u,l,c,f,d,p,h,v,m,y,g,_,b;return kg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!==(r=e._audioTransceicer)&&void 0!==r&&r.receiver&&null!==(n=e._videoTransceicer)&&void 0!==n&&n.receiver){t.next=4;break}return e._preAudioStats=null,e._preVideoStats=null,t.abrupt("return");case 4:return!e._audioStallObserver&&e._audioTransceicer&&(e._audioStallObserver=new iC,e._audioStallObserver.start(e._audioTransceicer)),!e._videoStallObserver&&e._video&&(e._videoStallObserver=new uC,e._videoStallObserver.start(e._media)),!e._networkQuality&&e._opts.enableNetworkQuality&&(e._networkQuality=new TC(e._pc,e._opts.networkQuality)),t.next=9,Gm.all([lC(e._audioTransceicer.receiver.getStats()),dC(e._videoTransceicer.receiver.getStats())]);case 9:if(i=t.sent,o=Dg(i,2),a=o[0],s=o[1],!e._preAudioStats||!e._preVideoStats){t.next=26;break}return d=fC(e._preAudioStats,a),p=hC(e._preVideoStats,s),t.next=18,null===(u=e._audioStallObserver)||void 0===u?void 0:u.getAudioStallInfo();case 18:return h=t.sent,t.next=21,null===(l=e._videoStallObserver)||void 0===l?void 0:l.getStallInfo({interval:p.statsInterval,frameRateReceived:p.frameRateReceived,frameRateDecoded:p.frameRateDecoded,bitrate:p.receivedKBitrate});case 21:v=t.sent,m=null!==(c=null===(f=e._networkQuality)||void 0===f?void 0:f.getDownlinkQuality(Sg(Sg({},d),{},{stallDuration:h.stallDuration}),Sg(Sg({},p),{},{stallDuration:v.stall.stallDuration100ms||v.stall.stallDuration500ms})))&&void 0!==c?c:[],y=Dg(m,2),g=y[0],_=y[1],e._opts.enableAdaptiveJitterBuffer&&e._handleJitterBuffer(null==_?void 0:_.qualityQos,e._opts.adaptiveJitterBuffer,e._opts.networkStrategy),p.estimatedPlayoutTimestamp&&d.estimatedPlayoutTimestamp&&(b=p.estimatedPlayoutTimestamp-d.estimatedPlayoutTimestamp),e.emit(EI,{interval:p.statsInterval,network_quality:g,audio_stall_duration:h.stallDuration,audio_stall_count:h.stallCount,audio_stall_time_per_100sec:h.stallDuration/d.statsInterval*100,audio_stall_count_per_100sec:h.stallCount/d.statsInterval*100*1e3,video_stall_duration:v.stall.stallDuration500ms,video_stall_count:v.stall.stallCount500ms,video_stall_duration_100ms:v.stall.stallDuration100ms,video_stall_count_100ms:v.stall.stallCount100ms,video_stall_time_per_100sec:v.stall.stallDuration500ms/p.statsInterval*100,video_stall_count_per_100sec:v.stall.stallCount500ms/p.statsInterval*100*1e3,rtt:p.rtt,video_jb_delay:p.jitterBufferDelay,audio_jb_delay:d.jitterBufferDelay,audio_lost_rate:d.audioLossRate,video_lost_rate:p.videoLossRate,video_retransmitted_rate:p.retransmittedRate,quality_audio_level:null==_?void 0:_.audioLevel,quality_video_level:null==_?void 0:_.videoLevel,quality_audio_qos:null==_?void 0:_.audioQos,quality_video_qos:null==_?void 0:_.videoQos,quality_qos:null==_?void 0:_.qualityQos,quality_audio_qoe:null==_?void 0:_.audioQoe,quality_video_qoe:null==_?void 0:_.videoQoe,current_delay:e._getDelay(),visibility_state:document.visibilityState,target_delay:e._targetDelayHint,av_sync_diff:b,set_delay_error:e._setDelayError||null});case 26:e._preAudioStats=a,e._preVideoStats=s,e.set_delay_error=null;case 29:case"end":return t.stop()}}),t)}))),2e3)}},{key:"_handleJitterBuffer",value:function(e,t,r){var n;this._networkQualityResult.push(e),this._networkQualityResult.length>t.networkWindow&&this._networkQualityResult.shift();var i=Nc(n=this._networkQualityResult).call(n,Boolean);if(i.length===t.networkWindow){var o,a,s;if("min"===t.windowMethod)a=Math.min.apply(Math,Vg(i));else if("max"===t.windowMethod)a=Math.max.apply(Math,Vg(i));else{var u,l=hx(u=Vg(i)).call(u,(function(e,t){return e-t})),c=Math.floor(l.length/2);a=l.length%2!=0?l[c]:(l[c-1]+l[c])/2}if(a&&void 0!==(null===(o=r[a])||void 0===o?void 0:o.jitterBuffer))this._startSetDelayLoop(null===(s=r[a])||void 0===s?void 0:s.jitterBuffer)}}},{key:"_stopRtcReport",value:function(){var e,t,r;null===(e=this._audioStallObserver)||void 0===e||e.destroy(),null===(t=this._videoStallObserver)||void 0===t||t.destroy(),null===(r=this._networkQuality)||void 0===r||r.destroy(),this._audioStallObserver=null,this._videoStallObserver=null,this._networkQuality=null,this._preAudioStats=null,this._preVideoStats=null,this._rtcReportTimer&&(clearInterval(this._rtcReportTimer),this._rtcReportTimer=0)}},{key:"_disconnect",value:function(){var e,t;null===(e=this._loader)||void 0===e||e.cancel(),null===(t=this._networkEvaluate)||void 0===t||t.destroy(),this._stopRtcReport(),clearTimeout(this._checkStatsErrorTimer),this._clearPeerStateTimeout(),this._audioTransceicer=null,this._videoTransceicer=null,this._mediaStream=null,this._networkEvaluate=null}},{key:"_emitError",value:function(e){this.emit(lI,e),clearTimeout(this._checkStatsErrorTimer),this._clearPeerStateTimeout(),this._pc&&(this._pc.close(),this._media&&(this._media.srcObject=null))}},{key:"_createEmptyPeer",value:(t=Tg(kg().mark((function e(){var t;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new RTCPeerConnection,e.next=3,t.createOffer();case 3:t.close(),t=null;case 5:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})},{key:"destroy",value:function(e){var t;this._disconnect(),null===(t=this._media)||void 0===t||t.removeEventListener("timeupdate",this._mockWaitingByTimeupdate),this._media&&!e&&(this._media.srcObject=null),this._pc&&this._pc.close(),this._loader=null,this._media=null,this._pc=null,this._opts=null}}],[{key:"enableLogger",value:function(){BP.enable()}},{key:"disableLogger",value:function(){BP.disable()}}]),o}(WR);try{localStorage.getItem("xgd")?EC.enableLogger():EC.disableLogger()}catch(PC){}var LC=function(e){Pg(n,e);var t,r=Ag(n);function n(){var e,t;xg(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Og(jg(t=r.call.apply(r,Bg(e=[this]).call(e,o))),"_rts",null),Og(jg(t),"_mediaStream",null),Og(jg(t),"_disconnectTimer",void 0),Og(jg(t),"_rtsOpts",null),Og(jg(t),"_onPause",(function(){t._disconnectTimer||(t._disconnectTimer=c_((function(){t._closeAfterPause(),t._clearDisconnectTimer()}),1e3*t.config.disconnectTime))})),Og(jg(t),"_reInit",(function(){var e;t._clearDisconnectTimer(),null!==(e=t._rts)&&void 0!==e&&e._pc||(t._init(),t._bindRtsEvents())})),Og(jg(t),"_init",(function(){var e;null===(e=t._rts)||void 0===e||e.destroy();var r=t.player.config,n=r.rts||{};t._rtsOpts=n,t._rts=new EC(Sg({media:t.player.video,mediaStream:t._mediaStream,preProcessUrl:function(e,r){var n,i;return(null===(n=(i=t.player).preProcessUrl)||void 0===n?void 0:n.call(i,e,r))||{url:e,ext:r}}},n)),t._rts.load(r.url)})),Og(jg(t),"_onSwitchURL",(function(e){e&&(t.player.config.url=e),t._rts?t._rts.switchURL(e):t._reInit()})),Og(jg(t),"destroy",(function(){var e;t.player.switchURL=t._originSwitchFn,t._clearDisconnectTimer(),null===(e=t._rts)||void 0===e||e.destroy(),t._rts=null})),t}return Lg(n,[{key:"pc",get:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.pc}},{key:"videoTrack",get:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.videoTack}},{key:"audioTrack",get:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.audioTrack}},{key:"core",get:function(){return this._rts}},{key:"loader",get:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.loader}},{key:"version",get:function(){return"0.2.1-alpha.42"}},{key:"beforePlayerInit",value:function(){var e,t,r,n,i=this;(this._init(),this._originSwitchFn)||(this._originSwitchFn=Iy(n=this.player.switchURL).call(n,this.player));this.player.switchURL=this._onSwitchURL,null===(e=this.player)||void 0===e||e.useHooks("replay",this._onSwitchURL),this.on("urlchange",this._onSwitchURL),this.on("destroy",this.destroy),void 0!==(null===(t=this.player.config)||void 0===t||null===(r=t.rts)||void 0===r?void 0:r.disconnectTime)&&(this.on("pause",(function(){var e;null!==(e=i._rts)&&void 0!==e&&e._isReplacing||i._onPause()})),this.on("play",(function(){var e;null!==(e=i._rts)&&void 0!==e&&e._isReplacing||i._reInit()}))),this._bindRtsEvents();try{Vx.defineGetterOrSetter(this.player,{__url:{get:function(){try{return ok.createObjectURL(new MediaSource)}catch(r){var e,t;null!==(e=i.player)&&void 0!==e&&null!==(t=e.video)&&void 0!==t&&t.srcObject||(i.player.video.srcObject=new MediaStream)}}}})}catch(o){}}},{key:"getStats",value:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.getStats()}},{key:"getStatsSnapshoot",value:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.getStatsSnapshoot()}},{key:"getNetWorkInfo",value:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.networkStats}},{key:"setDelay",value:function(e){var t;null===(t=this._rts)||void 0===t||t._setDelay(e)}},{key:"_clearDisconnectTimer",value:function(){clearTimeout(this._disconnectTimer),this._disconnectTimer=void 0}},{key:"_closeAfterPause",value:function(){var e,t,r;if(null!==(e=this._rts)&&void 0!==e&&e._pc){var n;if(null!==(t=this.config)&&void 0!==t&&t.seamlesslyReload)this._mediaStream=null===(n=this._rts)||void 0===n?void 0:n._mediaStream;null===(r=this._rts)||void 0===r||r.destroy(!0),this._rts=null}}},{key:"_bindRtsEvents",value:function(){this._transErrorEvent(),this._transCoreEvent(fI),this._transCoreEvent(pI),this._transCoreEvent(cI),this._transCoreEvent(dI),this._transCoreEvent(hI),this._transCoreEvent(vI),this._transCoreEvent(mI),this._transCoreEvent(xI),this._transCoreEvent(EI)}},{key:"_transErrorEvent",value:function(){var e=this;this._rts.on(lI,(function(t){if(e.player){var r=new Px(e.player,t),n=e._rtsOpts,i=n.backupConstruct,o=n.backupURL;if(o){var a,s=e.player;s.emit("core_event",Sg(Sg({},{url:s.config.url,code:r.errorCode,message:r.message,httpCode:r.httpCode}),{},{eventName:"core.degrade"})),s.emit("degrade",{url:s.config.url,code:r.errorCode,message:r.message,httpCode:r.httpCode}),s.unRegisterPlugin("rts"),s.switchURL=e._originSwitchFn,e._rts=null,s.rts=null,null!==(a=s.video)&&void 0!==a&&a.srcObject&&(s.video.srcObject=null),s.config.url=o,i?s.registerPlugin(i).beforePlayerInit():s.video.src=o}else e.player.emit("error",r)}})),this._rts.on("waiting",(function(){var t;null===(t=e.player)||void 0===t||t.emit("waiting")}))}},{key:"_transCoreEvent",value:function(e){var t=this;this._rts.on(e,(function(r){t.player&&t.player.emit("core_event",Sg(Sg({},r),{},{eventName:e}))}))}}],[{key:"pluginName",get:function(){return"rts"}},{key:"isSupported",value:function(){return HI()}},{key:"getCapacity",value:function(){return function(){if(!HI())return Gm.reject("RTCPeerConnection no support");var e;try{(e=new RTCPeerConnection).addTransceiver("video",{direction:"recvonly"}),e.addTransceiver("audio",{direction:"recvonly"})}catch(t){return Gm.reject(null==t?void 0:t.message)}return e.createOffer().then((function(t){var r,n,i,o;xC.log(t.sdp);var a=LI.parse(t.sdp),s=null===(r=a.media)||void 0===r?void 0:Nc(r).call(r,(function(e){return"video"===e.type}))[0],u=null===(n=a.media)||void 0===n?void 0:Nc(n).call(n,(function(e){return"audio"===e.type}))[0],l=null==s||null===(i=s.rtp)||void 0===i?void 0:Nc(i).call(i,(function(e){return"VP8"===e.codec||"VP9"===e.codec||"H264"===e.codec})),c=null==u||null===(o=u.rtp)||void 0===o?void 0:Nc(o).call(o,(function(e){return"opus"===e.codec})),f=null==s?void 0:s.fmtp,d=null==u?void 0:u.fmtp;return f&&vR(l).call(l,(function(e){var t;e.config=null===(t=Nc(f).call(f,(function(t){return t.payload===e.payload}))[0])||void 0===t?void 0:t.config})),d&&vR(c).call(c,(function(e){var t;e.config=null===(t=Nc(d).call(d,(function(t){return t.payload===e.payload}))[0])||void 0===t?void 0:t.config})),e.close(),{video:l,audio:c}}))}()}},{key:"isSupportedH264",value:(t=Tg(kg().mark((function e(t){var r,i,o,a,s;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.getCapacity();case 3:if(i=e.sent,o=null===(r=i.video)||void 0===r?void 0:Nc(r).call(r,(function(e){var r;return"H264"===e.codec&&(!t||-1!==rg(r=e.config).call(r,t))})).length){e.next=10;break}return e.next=8,n.getCapacity();case 8:s=e.sent,o=null===(a=s.video)||void 0===a?void 0:Nc(a).call(a,(function(e){var r;return"H264"===e.codec&&(!t||-1!==rg(r=e.config).call(r,t))})).length;case 10:return e.abrupt("return",!!o);case 13:return e.prev=13,e.t0=e.catch(0),e.abrupt("return",!1);case 16:case"end":return e.stop()}}),e,null,[[0,13]])}))),function(e){return t.apply(this,arguments)})}]),n}(Vx),OC=window.VePlayer.DynamicModule;VePlayer.registerPlugin(OC.PluginRtm,{RtmPlugin:LC}),e.RtmPlugin=LC}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).__VEPLAYER_PLUGIN_RTM__={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n=function(e){return e&&e.Math==Math&&e},i=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||function(){return this}()||t||Function("return this")(),o=function(e){try{return!!e()}catch(t){return!0}},a=!o((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),s=a,u=Function.prototype,l=u.apply,c=u.call,f="object"==typeof Reflect&&Reflect.apply||(s?c.bind(l):function(){return c.apply(l,arguments)}),d=a,p=Function.prototype,h=p.call,v=d&&p.bind.bind(h,h),m=d?v:function(e){return function(){return h.apply(e,arguments)}},y=m,g=y({}.toString),_=y("".slice),b=function(e){return _(g(e),8,-1)},w=b,S=m,k=function(e){if("Function"===w(e))return S(e)},R="object"==typeof document&&document.all,T={all:R,IS_HTMLDDA:void 0===R&&void 0!==R},x=T.all,E=T.IS_HTMLDDA?function(e){return"function"==typeof e||e===x}:function(e){return"function"==typeof e},L={},O=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),P=a,I=Function.prototype.call,C=P?I.bind(I):function(){return I.apply(I,arguments)},Z={},j={}.propertyIsEnumerable,A=Object.getOwnPropertyDescriptor,D=A&&!j.call({1:2},1);Z.f=D?function(e){var t=A(this,e);return!!t&&t.enumerable}:j;var V,W,M=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},G=o,F=b,N=Object,U=m("".split),X=G((function(){return!N("z").propertyIsEnumerable(0)}))?function(e){return"String"==F(e)?U(e,""):N(e)}:N,H=function(e){return null==e},B=H,K=TypeError,Y=function(e){if(B(e))throw K("Can't call method on "+e);return e},J=X,z=Y,Q=function(e){return J(z(e))},q=E,$=T.all,ee=T.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:q(e)||e===$}:function(e){return"object"==typeof e?null!==e:q(e)},te={},re=te,ne=i,ie=E,oe=function(e){return ie(e)?e:void 0},ae=function(e,t){return arguments.length<2?oe(re[e])||oe(ne[e]):re[e]&&re[e][t]||ne[e]&&ne[e][t]},se=m({}.isPrototypeOf),ue="undefined"!=typeof navigator&&String(navigator.userAgent)||"",le=i,ce=ue,fe=le.process,de=le.Deno,pe=fe&&fe.versions||de&&de.version,he=pe&&pe.v8;he&&(W=(V=he.split("."))[0]>0&&V[0]<4?1:+(V[0]+V[1])),!W&&ce&&(!(V=ce.match(/Edge\/(\d+)/))||V[1]>=74)&&(V=ce.match(/Chrome\/(\d+)/))&&(W=+V[1]);var ve=W,me=ve,ye=o,ge=i.String,_e=!!Object.getOwnPropertySymbols&&!ye((function(){var e=Symbol();return!ge(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&me&&me<41})),be=_e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,we=ae,Se=E,ke=se,Re=Object,Te=be?function(e){return"symbol"==typeof e}:function(e){var t=we("Symbol");return Se(t)&&ke(t.prototype,Re(e))},xe=String,Ee=function(e){try{return xe(e)}catch(t){return"Object"}},Le=E,Oe=Ee,Pe=TypeError,Ie=function(e){if(Le(e))return e;throw Pe(Oe(e)+" is not a function")},Ce=Ie,Ze=H,je=function(e,t){var r=e[t];return Ze(r)?void 0:Ce(r)},Ae=C,De=E,Ve=ee,We=TypeError,Me={exports:{}},Ge=i,Fe=Object.defineProperty,Ne=function(e,t){try{Fe(Ge,e,{value:t,configurable:!0,writable:!0})}catch(r){Ge[e]=t}return t},Ue="__core-js_shared__",Xe=i[Ue]||Ne(Ue,{}),He=Xe;(Me.exports=function(e,t){return He[e]||(He[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.2",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"});var Be=Me.exports,Ke=Y,Ye=Object,Je=function(e){return Ye(Ke(e))},ze=Je,Qe=m({}.hasOwnProperty),qe=Object.hasOwn||function(e,t){return Qe(ze(e),t)},$e=m,et=0,tt=Math.random(),rt=$e(1..toString),nt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+rt(++et+tt,36)},it=Be,ot=qe,at=nt,st=_e,ut=be,lt=i.Symbol,ct=it("wks"),ft=ut?lt.for||lt:lt&&lt.withoutSetter||at,dt=function(e){return ot(ct,e)||(ct[e]=st&&ot(lt,e)?lt[e]:ft("Symbol."+e)),ct[e]},pt=C,ht=ee,vt=Te,mt=je,yt=function(e,t){var r,n;if("string"===t&&De(r=e.toString)&&!Ve(n=Ae(r,e)))return n;if(De(r=e.valueOf)&&!Ve(n=Ae(r,e)))return n;if("string"!==t&&De(r=e.toString)&&!Ve(n=Ae(r,e)))return n;throw We("Can't convert object to primitive value")},gt=TypeError,_t=dt("toPrimitive"),bt=function(e,t){if(!ht(e)||vt(e))return e;var r,n=mt(e,_t);if(n){if(void 0===t&&(t="default"),r=pt(n,e,t),!ht(r)||vt(r))return r;throw gt("Can't convert object to primitive value")}return void 0===t&&(t="number"),yt(e,t)},wt=Te,St=function(e){var t=bt(e,"string");return wt(t)?t:t+""},kt=ee,Rt=i.document,Tt=kt(Rt)&&kt(Rt.createElement),xt=function(e){return Tt?Rt.createElement(e):{}},Et=xt,Lt=!O&&!o((function(){return 7!=Object.defineProperty(Et("div"),"a",{get:function(){return 7}}).a})),Ot=O,Pt=C,It=Z,Ct=M,Zt=Q,jt=St,At=qe,Dt=Lt,Vt=Object.getOwnPropertyDescriptor;L.f=Ot?Vt:function(e,t){if(e=Zt(e),t=jt(t),Dt)try{return Vt(e,t)}catch(r){}if(At(e,t))return Ct(!Pt(It.f,e,t),e[t])};var Wt=o,Mt=E,Gt=/#|\.prototype\./,Ft=function(e,t){var r=Ut[Nt(e)];return r==Ht||r!=Xt&&(Mt(t)?Wt(t):!!t)},Nt=Ft.normalize=function(e){return String(e).replace(Gt,".").toLowerCase()},Ut=Ft.data={},Xt=Ft.NATIVE="N",Ht=Ft.POLYFILL="P",Bt=Ft,Kt=Ie,Yt=a,Jt=k(k.bind),zt=function(e,t){return Kt(e),void 0===t?e:Yt?Jt(e,t):function(){return e.apply(t,arguments)}},Qt={},qt=O&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),$t=ee,er=String,tr=TypeError,rr=function(e){if($t(e))return e;throw tr(er(e)+" is not an object")},nr=O,ir=Lt,or=qt,ar=rr,sr=St,ur=TypeError,lr=Object.defineProperty,cr=Object.getOwnPropertyDescriptor,fr="enumerable",dr="configurable",pr="writable";Qt.f=nr?or?function(e,t,r){if(ar(e),t=sr(t),ar(r),"function"==typeof e&&"prototype"===t&&"value"in r&&pr in r&&!r[pr]){var n=cr(e,t);n&&n[pr]&&(e[t]=r.value,r={configurable:dr in r?r[dr]:n[dr],enumerable:fr in r?r[fr]:n[fr],writable:!1})}return lr(e,t,r)}:lr:function(e,t,r){if(ar(e),t=sr(t),ar(r),ir)try{return lr(e,t,r)}catch(n){}if("get"in r||"set"in r)throw ur("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var hr=Qt,vr=M,mr=O?function(e,t,r){return hr.f(e,t,vr(1,r))}:function(e,t,r){return e[t]=r,e},yr=i,gr=f,_r=k,br=E,wr=L.f,Sr=Bt,kr=te,Rr=zt,Tr=mr,xr=qe,Er=function(e){var t=function(r,n,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,n)}return new e(r,n,i)}return gr(e,this,arguments)};return t.prototype=e.prototype,t},Lr=function(e,t){var r,n,i,o,a,s,u,l,c,f=e.target,d=e.global,p=e.stat,h=e.proto,v=d?yr:p?yr[f]:(yr[f]||{}).prototype,m=d?kr:kr[f]||Tr(kr,f,{})[f],y=m.prototype;for(o in t)n=!(r=Sr(d?o:f+(p?".":"#")+o,e.forced))&&v&&xr(v,o),s=m[o],n&&(u=e.dontCallGetSet?(c=wr(v,o))&&c.value:v[o]),a=n&&u?u:t[o],n&&typeof s==typeof a||(l=e.bind&&n?Rr(a,yr):e.wrap&&n?Er(a):h&&br(a)?_r(a):a,(e.sham||a&&a.sham||s&&s.sham)&&Tr(l,"sham",!0),Tr(m,o,l),h&&(xr(kr,i=f+"Prototype")||Tr(kr,i,{}),Tr(kr[i],o,a),e.real&&y&&(r||!y[o])&&Tr(y,o,a)))},Or=b,Pr=Array.isArray||function(e){return"Array"==Or(e)},Ir=Math.ceil,Cr=Math.floor,Zr=Math.trunc||function(e){var t=+e;return(t>0?Cr:Ir)(t)},jr=function(e){var t=+e;return t!=t||0===t?0:Zr(t)},Ar=jr,Dr=Math.min,Vr=function(e){return e>0?Dr(Ar(e),9007199254740991):0},Wr=Vr,Mr=function(e){return Wr(e.length)},Gr=TypeError,Fr=function(e){if(e>9007199254740991)throw Gr("Maximum allowed index exceeded");return e},Nr=St,Ur=Qt,Xr=M,Hr=function(e,t,r){var n=Nr(t);n in e?Ur.f(e,n,Xr(0,r)):e[n]=r},Br={};Br[dt("toStringTag")]="z";var Kr="[object z]"===String(Br),Yr=Kr,Jr=E,zr=b,Qr=dt("toStringTag"),qr=Object,$r="Arguments"==zr(function(){return arguments}()),en=Yr?zr:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(r){}}(t=qr(e),Qr))?r:$r?zr(t):"Object"==(n=zr(t))&&Jr(t.callee)?"Arguments":n},tn=E,rn=Xe,nn=m(Function.toString);tn(rn.inspectSource)||(rn.inspectSource=function(e){return nn(e)});var on=rn.inspectSource,an=m,sn=o,un=E,ln=en,cn=on,fn=function(){},dn=[],pn=ae("Reflect","construct"),hn=/^\s*(?:class|function)\b/,vn=an(hn.exec),mn=!hn.exec(fn),yn=function(e){if(!un(e))return!1;try{return pn(fn,dn,e),!0}catch(t){return!1}},gn=function(e){if(!un(e))return!1;switch(ln(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return mn||!!vn(hn,cn(e))}catch(t){return!0}};gn.sham=!0;var _n=!pn||sn((function(){var e;return yn(yn.call)||!yn(Object)||!yn((function(){e=!0}))||e}))?gn:yn,bn=Pr,wn=_n,Sn=ee,kn=dt("species"),Rn=Array,Tn=function(e){var t;return bn(e)&&(t=e.constructor,(wn(t)&&(t===Rn||bn(t.prototype))||Sn(t)&&null===(t=t[kn]))&&(t=void 0)),void 0===t?Rn:t},xn=function(e,t){return new(Tn(e))(0===t?0:t)},En=o,Ln=ve,On=dt("species"),Pn=function(e){return Ln>=51||!En((function(){var t=[];return(t.constructor={})[On]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},In=Lr,Cn=o,Zn=Pr,jn=ee,An=Je,Dn=Mr,Vn=Fr,Wn=Hr,Mn=xn,Gn=Pn,Fn=ve,Nn=dt("isConcatSpreadable"),Un=Fn>=51||!Cn((function(){var e=[];return e[Nn]=!1,e.concat()[0]!==e})),Xn=function(e){if(!jn(e))return!1;var t=e[Nn];return void 0!==t?!!t:Zn(e)};In({target:"Array",proto:!0,arity:1,forced:!Un||!Gn("concat")},{concat:function(e){var t,r,n,i,o,a=An(this),s=Mn(a,0),u=0;for(t=-1,n=arguments.length;t<n;t++)if(Xn(o=-1===t?a:arguments[t]))for(i=Dn(o),Vn(u+i),r=0;r<i;r++,u++)r in o&&Wn(s,u,o[r]);else Vn(u+1),Wn(s,u++,o);return s.length=u,s}});var Hn=en,Bn=String,Kn=function(e){if("Symbol"===Hn(e))throw TypeError("Cannot convert a Symbol value to a string");return Bn(e)},Yn={},Jn=jr,zn=Math.max,Qn=Math.min,qn=function(e,t){var r=Jn(e);return r<0?zn(r+t,0):Qn(r,t)},$n=Q,ei=qn,ti=Mr,ri=function(e){return function(t,r,n){var i,o=$n(t),a=ti(o),s=ei(n,a);if(e&&r!=r){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===r)return e||s||0;return!e&&-1}},ni={includes:ri(!0),indexOf:ri(!1)},ii={},oi=qe,ai=Q,si=ni.indexOf,ui=ii,li=m([].push),ci=function(e,t){var r,n=ai(e),i=0,o=[];for(r in n)!oi(ui,r)&&oi(n,r)&&li(o,r);for(;t.length>i;)oi(n,r=t[i++])&&(~si(o,r)||li(o,r));return o},fi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],di=ci,pi=fi,hi=Object.keys||function(e){return di(e,pi)},vi=O,mi=qt,yi=Qt,gi=rr,_i=Q,bi=hi;Yn.f=vi&&!mi?Object.defineProperties:function(e,t){gi(e);for(var r,n=_i(t),i=bi(t),o=i.length,a=0;o>a;)yi.f(e,r=i[a++],n[r]);return e};var wi,Si=ae("document","documentElement"),ki=nt,Ri=Be("keys"),Ti=function(e){return Ri[e]||(Ri[e]=ki(e))},xi=rr,Ei=Yn,Li=fi,Oi=ii,Pi=Si,Ii=xt,Ci="prototype",Zi="script",ji=Ti("IE_PROTO"),Ai=function(){},Di=function(e){return"<"+Zi+">"+e+"</"+Zi+">"},Vi=function(e){e.write(Di("")),e.close();var t=e.parentWindow.Object;return e=null,t},Wi=function(){try{wi=new ActiveXObject("htmlfile")}catch(i){}var e,t,r;Wi="undefined"!=typeof document?document.domain&&wi?Vi(wi):(t=Ii("iframe"),r="java"+Zi+":",t.style.display="none",Pi.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(Di("document.F=Object")),e.close(),e.F):Vi(wi);for(var n=Li.length;n--;)delete Wi[Ci][Li[n]];return Wi()};Oi[ji]=!0;var Mi=Object.create||function(e,t){var r;return null!==e?(Ai[Ci]=xi(e),r=new Ai,Ai[Ci]=null,r[ji]=e):r=Wi(),void 0===t?r:Ei.f(r,t)},Gi={},Fi=ci,Ni=fi.concat("length","prototype");Gi.f=Object.getOwnPropertyNames||function(e){return Fi(e,Ni)};var Ui={},Xi=qn,Hi=Mr,Bi=Hr,Ki=Array,Yi=Math.max,Ji=function(e,t,r){for(var n=Hi(e),i=Xi(t,n),o=Xi(void 0===r?n:r,n),a=Ki(Yi(o-i,0)),s=0;i<o;i++,s++)Bi(a,s,e[i]);return a.length=s,a},zi=b,Qi=Q,qi=Gi.f,$i=Ji,eo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Ui.f=function(e){return eo&&"Window"==zi(e)?function(e){try{return qi(e)}catch(t){return $i(eo)}}(e):qi(Qi(e))};var to={};to.f=Object.getOwnPropertySymbols;var ro=mr,no=function(e,t,r,n){return n&&n.enumerable?e[t]=r:ro(e,t,r),e},io=Qt,oo=function(e,t,r){return io.f(e,t,r)},ao={},so=dt;ao.f=so;var uo,lo,co,fo=te,po=qe,ho=ao,vo=Qt.f,mo=function(e){var t=fo.Symbol||(fo.Symbol={});po(t,e)||vo(t,e,{value:ho.f(e)})},yo=C,go=ae,_o=dt,bo=no,wo=function(){var e=go("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=_o("toPrimitive");t&&!t[n]&&bo(t,n,(function(e){return yo(r,this)}),{arity:1})},So=en,ko=Kr?{}.toString:function(){return"[object "+So(this)+"]"},Ro=Kr,To=Qt.f,xo=mr,Eo=qe,Lo=ko,Oo=dt("toStringTag"),Po=function(e,t,r,n){if(e){var i=r?e:e.prototype;Eo(i,Oo)||To(i,Oo,{configurable:!0,value:t}),n&&!Ro&&xo(i,"toString",Lo)}},Io=E,Co=i.WeakMap,Zo=Io(Co)&&/native code/.test(String(Co)),jo=i,Ao=ee,Do=mr,Vo=qe,Wo=Xe,Mo=Ti,Go=ii,Fo="Object already initialized",No=jo.TypeError,Uo=jo.WeakMap;if(Zo||Wo.state){var Xo=Wo.state||(Wo.state=new Uo);Xo.get=Xo.get,Xo.has=Xo.has,Xo.set=Xo.set,uo=function(e,t){if(Xo.has(e))throw No(Fo);return t.facade=e,Xo.set(e,t),t},lo=function(e){return Xo.get(e)||{}},co=function(e){return Xo.has(e)}}else{var Ho=Mo("state");Go[Ho]=!0,uo=function(e,t){if(Vo(e,Ho))throw No(Fo);return t.facade=e,Do(e,Ho,t),t},lo=function(e){return Vo(e,Ho)?e[Ho]:{}},co=function(e){return Vo(e,Ho)}}var Bo={set:uo,get:lo,has:co,enforce:function(e){return co(e)?lo(e):uo(e,{})},getterFor:function(e){return function(t){var r;if(!Ao(t)||(r=lo(t)).type!==e)throw No("Incompatible receiver, "+e+" required");return r}}},Ko=zt,Yo=X,Jo=Je,zo=Mr,Qo=xn,qo=m([].push),$o=function(e){var t=1==e,r=2==e,n=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(u,l,c,f){for(var d,p,h=Jo(u),v=Yo(h),m=Ko(l,c),y=zo(v),g=0,_=f||Qo,b=t?_(u,y):r||a?_(u,0):void 0;y>g;g++)if((s||g in v)&&(p=m(d=v[g],g,h),e))if(t)b[g]=p;else if(p)switch(e){case 3:return!0;case 5:return d;case 6:return g;case 2:qo(b,d)}else switch(e){case 4:return!1;case 7:qo(b,d)}return o?-1:n||i?i:b}},ea={forEach:$o(0),map:$o(1),filter:$o(2),some:$o(3),every:$o(4),find:$o(5),findIndex:$o(6),filterReject:$o(7)},ta=Lr,ra=i,na=C,ia=m,oa=O,aa=_e,sa=o,ua=qe,la=se,ca=rr,fa=Q,da=St,pa=Kn,ha=M,va=Mi,ma=hi,ya=Gi,ga=Ui,_a=to,ba=L,wa=Qt,Sa=Yn,ka=Z,Ra=no,Ta=oo,xa=Be,Ea=ii,La=nt,Oa=dt,Pa=ao,Ia=mo,Ca=wo,Za=Po,ja=Bo,Aa=ea.forEach,Da=Ti("hidden"),Va="Symbol",Wa="prototype",Ma=ja.set,Ga=ja.getterFor(Va),Fa=Object[Wa],Na=ra.Symbol,Ua=Na&&Na[Wa],Xa=ra.TypeError,Ha=ra.QObject,Ba=ba.f,Ka=wa.f,Ya=ga.f,Ja=ka.f,za=ia([].push),Qa=xa("symbols"),qa=xa("op-symbols"),$a=xa("wks"),es=!Ha||!Ha[Wa]||!Ha[Wa].findChild,ts=oa&&sa((function(){return 7!=va(Ka({},"a",{get:function(){return Ka(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=Ba(Fa,t);n&&delete Fa[t],Ka(e,t,r),n&&e!==Fa&&Ka(Fa,t,n)}:Ka,rs=function(e,t){var r=Qa[e]=va(Ua);return Ma(r,{type:Va,tag:e,description:t}),oa||(r.description=t),r},ns=function(e,t,r){e===Fa&&ns(qa,t,r),ca(e);var n=da(t);return ca(r),ua(Qa,n)?(r.enumerable?(ua(e,Da)&&e[Da][n]&&(e[Da][n]=!1),r=va(r,{enumerable:ha(0,!1)})):(ua(e,Da)||Ka(e,Da,ha(1,{})),e[Da][n]=!0),ts(e,n,r)):Ka(e,n,r)},is=function(e,t){ca(e);var r=fa(t),n=ma(r).concat(us(r));return Aa(n,(function(t){oa&&!na(os,r,t)||ns(e,t,r[t])})),e},os=function(e){var t=da(e),r=na(Ja,this,t);return!(this===Fa&&ua(Qa,t)&&!ua(qa,t))&&(!(r||!ua(this,t)||!ua(Qa,t)||ua(this,Da)&&this[Da][t])||r)},as=function(e,t){var r=fa(e),n=da(t);if(r!==Fa||!ua(Qa,n)||ua(qa,n)){var i=Ba(r,n);return!i||!ua(Qa,n)||ua(r,Da)&&r[Da][n]||(i.enumerable=!0),i}},ss=function(e){var t=Ya(fa(e)),r=[];return Aa(t,(function(e){ua(Qa,e)||ua(Ea,e)||za(r,e)})),r},us=function(e){var t=e===Fa,r=Ya(t?qa:fa(e)),n=[];return Aa(r,(function(e){!ua(Qa,e)||t&&!ua(Fa,e)||za(n,Qa[e])})),n};aa||(Na=function(){if(la(Ua,this))throw Xa("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?pa(arguments[0]):void 0,t=La(e),r=function(e){this===Fa&&na(r,qa,e),ua(this,Da)&&ua(this[Da],t)&&(this[Da][t]=!1),ts(this,t,ha(1,e))};return oa&&es&&ts(Fa,t,{configurable:!0,set:r}),rs(t,e)},Ra(Ua=Na[Wa],"toString",(function(){return Ga(this).tag})),Ra(Na,"withoutSetter",(function(e){return rs(La(e),e)})),ka.f=os,wa.f=ns,Sa.f=is,ba.f=as,ya.f=ga.f=ss,_a.f=us,Pa.f=function(e){return rs(Oa(e),e)},oa&&Ta(Ua,"description",{configurable:!0,get:function(){return Ga(this).description}})),ta({global:!0,constructor:!0,wrap:!0,forced:!aa,sham:!aa},{Symbol:Na}),Aa(ma($a),(function(e){Ia(e)})),ta({target:Va,stat:!0,forced:!aa},{useSetter:function(){es=!0},useSimple:function(){es=!1}}),ta({target:"Object",stat:!0,forced:!aa,sham:!oa},{create:function(e,t){return void 0===t?va(e):is(va(e),t)},defineProperty:ns,defineProperties:is,getOwnPropertyDescriptor:as}),ta({target:"Object",stat:!0,forced:!aa},{getOwnPropertyNames:ss}),Ca(),Za(Na,Va),Ea[Da]=!0;var ls=_e&&!!Symbol.for&&!!Symbol.keyFor,cs=Lr,fs=ae,ds=qe,ps=Kn,hs=Be,vs=ls,ms=hs("string-to-symbol-registry"),ys=hs("symbol-to-string-registry");cs({target:"Symbol",stat:!0,forced:!vs},{for:function(e){var t=ps(e);if(ds(ms,t))return ms[t];var r=fs("Symbol")(t);return ms[t]=r,ys[r]=t,r}});var gs=Lr,_s=qe,bs=Te,ws=Ee,Ss=ls,ks=Be("symbol-to-string-registry");gs({target:"Symbol",stat:!0,forced:!Ss},{keyFor:function(e){if(!bs(e))throw TypeError(ws(e)+" is not a symbol");if(_s(ks,e))return ks[e]}});var Rs=m([].slice),Ts=Pr,xs=E,Es=b,Ls=Kn,Os=m([].push),Ps=Lr,Is=ae,Cs=f,Zs=C,js=m,As=o,Ds=E,Vs=Te,Ws=Rs,Ms=function(e){if(xs(e))return e;if(Ts(e)){for(var t=e.length,r=[],n=0;n<t;n++){var i=e[n];"string"==typeof i?Os(r,i):"number"!=typeof i&&"Number"!=Es(i)&&"String"!=Es(i)||Os(r,Ls(i))}var o=r.length,a=!0;return function(e,t){if(a)return a=!1,t;if(Ts(this))return t;for(var n=0;n<o;n++)if(r[n]===e)return t}}},Gs=_e,Fs=String,Ns=Is("JSON","stringify"),Us=js(/./.exec),Xs=js("".charAt),Hs=js("".charCodeAt),Bs=js("".replace),Ks=js(1..toString),Ys=/[\uD800-\uDFFF]/g,Js=/^[\uD800-\uDBFF]$/,zs=/^[\uDC00-\uDFFF]$/,Qs=!Gs||As((function(){var e=Is("Symbol")();return"[null]"!=Ns([e])||"{}"!=Ns({a:e})||"{}"!=Ns(Object(e))})),qs=As((function(){return'"\\udf06\\ud834"'!==Ns("\udf06\ud834")||'"\\udead"'!==Ns("\udead")})),$s=function(e,t){var r=Ws(arguments),n=Ms(t);if(Ds(n)||void 0!==e&&!Vs(e))return r[1]=function(e,t){if(Ds(n)&&(t=Zs(n,this,Fs(e),t)),!Vs(t))return t},Cs(Ns,null,r)},eu=function(e,t,r){var n=Xs(r,t-1),i=Xs(r,t+1);return Us(Js,e)&&!Us(zs,i)||Us(zs,e)&&!Us(Js,n)?"\\u"+Ks(Hs(e,0),16):e};Ns&&Ps({target:"JSON",stat:!0,arity:3,forced:Qs||qs},{stringify:function(e,t,r){var n=Ws(arguments),i=Cs(Qs?$s:Ns,null,n);return qs&&"string"==typeof i?Bs(i,Ys,eu):i}});var tu=to,ru=Je;Lr({target:"Object",stat:!0,forced:!_e||o((function(){tu.f(1)}))},{getOwnPropertySymbols:function(e){var t=tu.f;return t?t(ru(e)):[]}}),mo("asyncIterator"),mo("hasInstance"),mo("isConcatSpreadable"),mo("iterator"),mo("match"),mo("matchAll"),mo("replace"),mo("search"),mo("species"),mo("split");var nu=wo;mo("toPrimitive"),nu();var iu=ae,ou=Po;mo("toStringTag"),ou(iu("Symbol"),"Symbol"),mo("unscopables"),Po(i.JSON,"JSON",!0);var au,su,uu,lu=te.Symbol,cu={},fu=O,du=qe,pu=Function.prototype,hu=fu&&Object.getOwnPropertyDescriptor,vu=du(pu,"name"),mu={EXISTS:vu,PROPER:vu&&"something"===function(){}.name,CONFIGURABLE:vu&&(!fu||fu&&hu(pu,"name").configurable)},yu=!o((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),gu=qe,_u=E,bu=Je,wu=yu,Su=Ti("IE_PROTO"),ku=Object,Ru=ku.prototype,Tu=wu?ku.getPrototypeOf:function(e){var t=bu(e);if(gu(t,Su))return t[Su];var r=t.constructor;return _u(r)&&t instanceof r?r.prototype:t instanceof ku?Ru:null},xu=o,Eu=E,Lu=ee,Ou=Mi,Pu=Tu,Iu=no,Cu=dt("iterator"),Zu=!1;[].keys&&("next"in(uu=[].keys())?(su=Pu(Pu(uu)))!==Object.prototype&&(au=su):Zu=!0);var ju=!Lu(au)||xu((function(){var e={};return au[Cu].call(e)!==e}));Eu((au=ju?{}:Ou(au))[Cu])||Iu(au,Cu,(function(){return this}));var Au={IteratorPrototype:au,BUGGY_SAFARI_ITERATORS:Zu},Du=Au.IteratorPrototype,Vu=Mi,Wu=M,Mu=Po,Gu=cu,Fu=function(){return this},Nu=function(e,t,r,n){var i=t+" Iterator";return e.prototype=Vu(Du,{next:Wu(+!n,r)}),Mu(e,i,!1,!0),Gu[i]=Fu,e},Uu=m,Xu=Ie,Hu=E,Bu=String,Ku=TypeError,Yu=function(e,t,r){try{return Uu(Xu(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(n){}},Ju=rr,zu=function(e){if("object"==typeof e||Hu(e))return e;throw Ku("Can't set "+Bu(e)+" as a prototype")},Qu=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=Yu(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(n){}return function(r,n){return Ju(r),zu(n),t?e(r,n):r.__proto__=n,r}}():void 0),qu=Lr,$u=C,el=mu,tl=Nu,rl=Tu,nl=Po,il=no,ol=cu,al=Au,sl=el.PROPER,ul=al.BUGGY_SAFARI_ITERATORS,ll=dt("iterator"),cl="keys",fl="values",dl="entries",pl=function(){return this},hl=function(e,t,r,n,i,o,a){tl(r,t,n);var s,u,l,c=function(e){if(e===i&&v)return v;if(!ul&&e in p)return p[e];switch(e){case cl:case fl:case dl:return function(){return new r(this,e)}}return function(){return new r(this)}},f=t+" Iterator",d=!1,p=e.prototype,h=p[ll]||p["@@iterator"]||i&&p[i],v=!ul&&h||c(i),m="Array"==t&&p.entries||h;if(m&&(s=rl(m.call(new e)))!==Object.prototype&&s.next&&(nl(s,f,!0,!0),ol[f]=pl),sl&&i==fl&&h&&h.name!==fl&&(d=!0,v=function(){return $u(h,this)}),i)if(u={values:c(fl),keys:o?v:c(cl),entries:c(dl)},a)for(l in u)(ul||d||!(l in p))&&il(p,l,u[l]);else qu({target:t,proto:!0,forced:ul||d},u);return a&&p[ll]!==v&&il(p,ll,v,{name:i}),ol[t]=v,u},vl=function(e,t){return{value:e,done:t}},ml=Q,yl=cu,gl=Bo;Qt.f;var _l=hl,bl=vl,wl="Array Iterator",Sl=gl.set,kl=gl.getterFor(wl);_l(Array,"Array",(function(e,t){Sl(this,{type:wl,target:ml(e),index:0,kind:t})}),(function(){var e=kl(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,bl(void 0,!0)):bl("keys"==r?n:"values"==r?t[n]:[n,t[n]],!1)}),"values"),yl.Arguments=yl.Array;var Rl={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=i,xl=en,El=mr,Ll=cu,Ol=dt("toStringTag");for(var Pl in Rl){var Il=Tl[Pl],Cl=Il&&Il.prototype;Cl&&xl(Cl)!==Ol&&El(Cl,Ol,Pl),Ll[Pl]=Ll.Array}var Zl=lu;mo("dispose");var jl=Zl;mo("asyncDispose");var Al=Lr,Dl=m,Vl=ae("Symbol"),Wl=Vl.keyFor,Ml=Dl(Vl.prototype.valueOf);Al({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==Wl(Ml(e))}catch(t){return!1}}});for(var Gl=Lr,Fl=Be,Nl=ae,Ul=m,Xl=Te,Hl=dt,Bl=Nl("Symbol"),Kl=Bl.isWellKnown,Yl=Nl("Object","getOwnPropertyNames"),Jl=Ul(Bl.prototype.valueOf),zl=Fl("wks"),Ql=0,ql=Yl(Bl),$l=ql.length;Ql<$l;Ql++)try{var ec=ql[Ql];Xl(Bl[ec])&&Hl(ec)}catch(PC){}Gl({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if(Kl&&Kl(e))return!0;try{for(var t=Jl(e),r=0,n=Yl(zl),i=n.length;r<i;r++)if(zl[n[r]]==t)return!0}catch(PC){}return!1}}),mo("matcher"),mo("metadataKey"),mo("observable"),mo("metadata"),mo("patternMatch"),mo("replaceAll");var tc=jl,rc=r(tc),nc=m,ic=jr,oc=Kn,ac=Y,sc=nc("".charAt),uc=nc("".charCodeAt),lc=nc("".slice),cc=function(e){return function(t,r){var n,i,o=oc(ac(t)),a=ic(r),s=o.length;return a<0||a>=s?e?"":void 0:(n=uc(o,a))<55296||n>56319||a+1===s||(i=uc(o,a+1))<56320||i>57343?e?sc(o,a):n:e?lc(o,a,a+2):i-56320+(n-55296<<10)+65536}},fc={codeAt:cc(!1),charAt:cc(!0)},dc=fc.charAt,pc=Kn,hc=Bo,vc=hl,mc=vl,yc="String Iterator",gc=hc.set,_c=hc.getterFor(yc);vc(String,"String",(function(e){gc(this,{type:yc,string:pc(e),index:0})}),(function(){var e,t=_c(this),r=t.string,n=t.index;return n>=r.length?mc(void 0,!0):(e=dc(r,n),t.index+=e.length,mc(e,!1))}));var bc=ao.f("iterator"),wc=r(bc);function Sc(e){return(Sc="function"==typeof rc&&"symbol"==typeof wc?function(e){return typeof e}:function(e){return e&&"function"==typeof rc&&e.constructor===rc&&e!==rc.prototype?"symbol":typeof e})(e)}var kc=r(tc),Rc=en,Tc=je,xc=H,Ec=cu,Lc=dt("iterator"),Oc=function(e){if(!xc(e))return Tc(e,Lc)||Tc(e,"@@iterator")||Ec[Rc(e)]},Pc=r(Oc),Ic=Je,Cc=hi;Lr({target:"Object",stat:!0,forced:o((function(){Cc(1)}))},{keys:function(e){return Cc(Ic(e))}});var Zc=r(te.Object.keys),jc=r(te.Object.getOwnPropertySymbols),Ac=ea.filter;Lr({target:"Array",proto:!0,forced:!Pn("filter")},{filter:function(e){return Ac(this,e,arguments.length>1?arguments[1]:void 0)}});var Dc=te,Vc=function(e){return Dc[e+"Prototype"]},Wc=Vc("Array").filter,Mc=se,Gc=Wc,Fc=Array.prototype,Nc=r((function(e){var t=e.filter;return e===Fc||Mc(Fc,e)&&t===Fc.filter?Gc:t})),Uc={exports:{}},Xc=Lr,Hc=o,Bc=Q,Kc=L.f,Yc=O;Xc({target:"Object",stat:!0,forced:!Yc||Hc((function(){Kc(1)})),sham:!Yc},{getOwnPropertyDescriptor:function(e,t){return Kc(Bc(e),t)}});var Jc=te.Object,zc=Uc.exports=function(e,t){return Jc.getOwnPropertyDescriptor(e,t)};Jc.getOwnPropertyDescriptor.sham&&(zc.sham=!0);var Qc=r(Uc.exports),qc=o,$c=function(e,t){var r=[][e];return!!r&&qc((function(){r.call(null,t||function(){return 1},1)}))},ef=ea.forEach,tf=$c("forEach")?[].forEach:function(e){return ef(this,e,arguments.length>1?arguments[1]:void 0)};Lr({target:"Array",proto:!0,forced:[].forEach!=tf},{forEach:tf});var rf=Vc("Array").forEach,nf=en,of=qe,af=se,sf=rf,uf=Array.prototype,lf={DOMTokenList:!0,NodeList:!0},cf=r((function(e){var t=e.forEach;return e===uf||af(uf,e)&&t===uf.forEach||of(lf,nf(e))?sf:t})),ff=ae,df=Gi,pf=to,hf=rr,vf=m([].concat),mf=ff("Reflect","ownKeys")||function(e){var t=df.f(hf(e)),r=pf.f;return r?vf(t,r(e)):t},yf=mf,gf=Q,_f=L,bf=Hr;Lr({target:"Object",stat:!0,sham:!O},{getOwnPropertyDescriptors:function(e){for(var t,r,n=gf(e),i=_f.f,o=yf(n),a={},s=0;o.length>s;)void 0!==(r=i(n,t=o[s++]))&&bf(a,t,r);return a}});var wf=r(te.Object.getOwnPropertyDescriptors),Sf={exports:{}},kf=Lr,Rf=O,Tf=Yn.f;kf({target:"Object",stat:!0,forced:Object.defineProperties!==Tf,sham:!Rf},{defineProperties:Tf});var xf=te.Object,Ef=Sf.exports=function(e,t){return xf.defineProperties(e,t)};xf.defineProperties.sham&&(Ef.sham=!0);var Lf=r(Sf.exports),Of={exports:{}},Pf=Lr,If=O,Cf=Qt.f;Pf({target:"Object",stat:!0,forced:Object.defineProperty!==Cf,sham:!If},{defineProperty:Cf});var Zf=te.Object,jf=Of.exports=function(e,t,r){return Zf.defineProperty(e,t,r)};Zf.defineProperty.sham&&(jf.sham=!0);var Af=r(Of.exports);Lr({target:"Object",stat:!0,sham:!O},{create:Mi});var Df=te.Object,Vf=r((function(e,t){return Df.create(e,t)})),Wf=Je,Mf=Tu,Gf=yu;Lr({target:"Object",stat:!0,forced:o((function(){Mf(1)})),sham:!Gf},{getPrototypeOf:function(e){return Mf(Wf(e))}});var Ff=r(te.Object.getPrototypeOf);Lr({target:"Object",stat:!0},{setPrototypeOf:Qu});var Nf=r(te.Object.setPrototypeOf),Uf=qe,Xf=mf,Hf=L,Bf=Qt,Kf=ee,Yf=mr,Jf=Error,zf=m("".replace),Qf=String(Jf("zxcasd").stack),qf=/\n\s*at [^:]*:[^\n]*/,$f=qf.test(Qf),ed=M,td=!o((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",ed(1,7)),7!==e.stack)})),rd=mr,nd=function(e,t){if($f&&"string"==typeof e&&!Jf.prepareStackTrace)for(;t--;)e=zf(e,qf,"");return e},id=td,od=Error.captureStackTrace,ad=cu,sd=dt("iterator"),ud=Array.prototype,ld=function(e){return void 0!==e&&(ad.Array===e||ud[sd]===e)},cd=C,fd=Ie,dd=rr,pd=Ee,hd=Oc,vd=TypeError,md=function(e,t){var r=arguments.length<2?hd(e):t;if(fd(r))return dd(cd(r,e));throw vd(pd(e)+" is not iterable")},yd=C,gd=rr,_d=je,bd=function(e,t,r){var n,i;gd(e);try{if(!(n=_d(e,"return"))){if("throw"===t)throw r;return r}n=yd(n,e)}catch(PC){i=!0,n=PC}if("throw"===t)throw r;if(i)throw n;return gd(n),r},wd=zt,Sd=C,kd=rr,Rd=Ee,Td=ld,xd=Mr,Ed=se,Ld=md,Od=Oc,Pd=bd,Id=TypeError,Cd=function(e,t){this.stopped=e,this.result=t},Zd=Cd.prototype,jd=function(e,t,r){var n,i,o,a,s,u,l,c=r&&r.that,f=!(!r||!r.AS_ENTRIES),d=!(!r||!r.IS_RECORD),p=!(!r||!r.IS_ITERATOR),h=!(!r||!r.INTERRUPTED),v=wd(t,c),m=function(e){return n&&Pd(n,"normal",e),new Cd(!0,e)},y=function(e){return f?(kd(e),h?v(e[0],e[1],m):v(e[0],e[1])):h?v(e,m):v(e)};if(d)n=e.iterator;else if(p)n=e;else{if(!(i=Od(e)))throw Id(Rd(e)+" is not iterable");if(Td(i)){for(o=0,a=xd(e);a>o;o++)if((s=y(e[o]))&&Ed(Zd,s))return s;return new Cd(!1)}n=Ld(e,i)}for(u=d?e.next:n.next;!(l=Sd(u,n)).done;){try{s=y(l.value)}catch(PC){Pd(n,"throw",PC)}if("object"==typeof s&&s&&Ed(Zd,s))return s}return new Cd(!1)},Ad=Kn,Dd=Lr,Vd=se,Wd=Tu,Md=Qu,Gd=function(e,t,r){for(var n=Xf(t),i=Bf.f,o=Hf.f,a=0;a<n.length;a++){var s=n[a];Uf(e,s)||r&&Uf(r,s)||i(e,s,o(t,s))}},Fd=Mi,Nd=mr,Ud=M,Xd=function(e,t){Kf(t)&&"cause"in t&&Yf(e,"cause",t.cause)},Hd=function(e,t,r,n){id&&(od?od(e,t):rd(e,"stack",nd(r,n)))},Bd=jd,Kd=function(e,t){return void 0===e?arguments.length<2?"":t:Ad(e)},Yd=dt("toStringTag"),Jd=Error,zd=[].push,Qd=function(e,t){var r,n=Vd(qd,this);Md?r=Md(Jd(),n?Wd(this):qd):(r=n?this:Fd(qd),Nd(r,Yd,"Error")),void 0!==t&&Nd(r,"message",Kd(t)),Hd(r,Qd,r.stack,1),arguments.length>2&&Xd(r,arguments[2]);var i=[];return Bd(e,zd,{that:i}),Nd(r,"errors",i),r};Md?Md(Qd,Jd):Gd(Qd,Jd,{name:!0});var qd=Qd.prototype=Fd(Jd.prototype,{constructor:Ud(1,Qd),message:Ud(1,""),name:Ud(1,"AggregateError")});Dd({global:!0,constructor:!0,arity:2},{AggregateError:Qd});var $d,ep,tp,rp,np="undefined"!=typeof process&&"process"==b(process),ip=ae,op=oo,ap=O,sp=dt("species"),up=function(e){var t=ip(e);ap&&t&&!t[sp]&&op(t,sp,{configurable:!0,get:function(){return this}})},lp=se,cp=TypeError,fp=function(e,t){if(lp(t,e))return e;throw cp("Incorrect invocation")},dp=_n,pp=Ee,hp=TypeError,vp=function(e){if(dp(e))return e;throw hp(pp(e)+" is not a constructor")},mp=rr,yp=vp,gp=H,_p=dt("species"),bp=function(e,t){var r,n=mp(e).constructor;return void 0===n||gp(r=mp(n)[_p])?t:yp(r)},wp=TypeError,Sp=function(e,t){if(e<t)throw wp("Not enough arguments");return e},kp=/(?:ipad|iphone|ipod).*applewebkit/i.test(ue),Rp=i,Tp=f,xp=zt,Ep=E,Lp=qe,Op=o,Pp=Si,Ip=Rs,Cp=xt,Zp=Sp,jp=kp,Ap=np,Dp=Rp.setImmediate,Vp=Rp.clearImmediate,Wp=Rp.process,Mp=Rp.Dispatch,Gp=Rp.Function,Fp=Rp.MessageChannel,Np=Rp.String,Up=0,Xp={},Hp="onreadystatechange";Op((function(){$d=Rp.location}));var Bp=function(e){if(Lp(Xp,e)){var t=Xp[e];delete Xp[e],t()}},Kp=function(e){return function(){Bp(e)}},Yp=function(e){Bp(e.data)},Jp=function(e){Rp.postMessage(Np(e),$d.protocol+"//"+$d.host)};Dp&&Vp||(Dp=function(e){Zp(arguments.length,1);var t=Ep(e)?e:Gp(e),r=Ip(arguments,1);return Xp[++Up]=function(){Tp(t,void 0,r)},ep(Up),Up},Vp=function(e){delete Xp[e]},Ap?ep=function(e){Wp.nextTick(Kp(e))}:Mp&&Mp.now?ep=function(e){Mp.now(Kp(e))}:Fp&&!jp?(rp=(tp=new Fp).port2,tp.port1.onmessage=Yp,ep=xp(rp.postMessage,rp)):Rp.addEventListener&&Ep(Rp.postMessage)&&!Rp.importScripts&&$d&&"file:"!==$d.protocol&&!Op(Jp)?(ep=Jp,Rp.addEventListener("message",Yp,!1)):ep=Hp in Cp("script")?function(e){Pp.appendChild(Cp("script"))[Hp]=function(){Pp.removeChild(this),Bp(e)}}:function(e){setTimeout(Kp(e),0)});var zp={set:Dp,clear:Vp},Qp=function(){this.head=null,this.tail=null};Qp.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var qp,$p,eh,th,rh,nh=Qp,ih=/ipad|iphone|ipod/i.test(ue)&&"undefined"!=typeof Pebble,oh=/web0s(?!.*chrome)/i.test(ue),ah=i,sh=zt,uh=L.f,lh=zp.set,ch=nh,fh=kp,dh=ih,ph=oh,hh=np,vh=ah.MutationObserver||ah.WebKitMutationObserver,mh=ah.document,yh=ah.process,gh=ah.Promise,_h=uh(ah,"queueMicrotask"),bh=_h&&_h.value;if(!bh){var wh=new ch,Sh=function(){var e,t;for(hh&&(e=yh.domain)&&e.exit();t=wh.get();)try{t()}catch(PC){throw wh.head&&qp(),PC}e&&e.enter()};fh||hh||ph||!vh||!mh?!dh&&gh&&gh.resolve?((th=gh.resolve(void 0)).constructor=gh,rh=sh(th.then,th),qp=function(){rh(Sh)}):hh?qp=function(){yh.nextTick(Sh)}:(lh=sh(lh,ah),qp=function(){lh(Sh)}):($p=!0,eh=mh.createTextNode(""),new vh(Sh).observe(eh,{characterData:!0}),qp=function(){eh.data=$p=!$p}),bh=function(e){wh.head||qp(),wh.add(e)}}var kh=bh,Rh=function(e){try{return{error:!1,value:e()}}catch(PC){return{error:!0,value:PC}}},Th=i.Promise,xh="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Eh=!xh&&!np&&"object"==typeof window&&"object"==typeof document,Lh=i,Oh=Th,Ph=E,Ih=Bt,Ch=on,Zh=dt,jh=Eh,Ah=xh,Dh=ve,Vh=Oh&&Oh.prototype,Wh=Zh("species"),Mh=!1,Gh=Ph(Lh.PromiseRejectionEvent),Fh={CONSTRUCTOR:Ih("Promise",(function(){var e=Ch(Oh),t=e!==String(Oh);if(!t&&66===Dh)return!0;if(!Vh.catch||!Vh.finally)return!0;if(!Dh||Dh<51||!/native code/.test(e)){var r=new Oh((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[Wh]=n,!(Mh=r.then((function(){}))instanceof n))return!0}return!t&&(jh||Ah)&&!Gh})),REJECTION_EVENT:Gh,SUBCLASSING:Mh},Nh={},Uh=Ie,Xh=TypeError,Hh=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw Xh("Bad Promise constructor");t=e,r=n})),this.resolve=Uh(t),this.reject=Uh(r)};Nh.f=function(e){return new Hh(e)};var Bh,Kh,Yh=Lr,Jh=np,zh=i,Qh=C,qh=no,$h=Po,ev=up,tv=Ie,rv=E,nv=ee,iv=fp,ov=bp,av=zp.set,sv=kh,uv=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(PC){}},lv=Rh,cv=nh,fv=Bo,dv=Th,pv=Fh,hv=Nh,vv="Promise",mv=pv.CONSTRUCTOR,yv=pv.REJECTION_EVENT,gv=fv.getterFor(vv),_v=fv.set,bv=dv&&dv.prototype,wv=dv,Sv=bv,kv=zh.TypeError,Rv=zh.document,Tv=zh.process,xv=hv.f,Ev=xv,Lv=!!(Rv&&Rv.createEvent&&zh.dispatchEvent),Ov="unhandledrejection",Pv=function(e){var t;return!(!nv(e)||!rv(t=e.then))&&t},Iv=function(e,t){var r,n,i,o=t.value,a=1==t.state,s=a?e.ok:e.fail,u=e.resolve,l=e.reject,c=e.domain;try{s?(a||(2===t.rejection&&Dv(t),t.rejection=1),!0===s?r=o:(c&&c.enter(),r=s(o),c&&(c.exit(),i=!0)),r===e.promise?l(kv("Promise-chain cycle")):(n=Pv(r))?Qh(n,r,u,l):u(r)):l(o)}catch(PC){c&&!i&&c.exit(),l(PC)}},Cv=function(e,t){e.notified||(e.notified=!0,sv((function(){for(var r,n=e.reactions;r=n.get();)Iv(r,e);e.notified=!1,t&&!e.rejection&&jv(e)})))},Zv=function(e,t,r){var n,i;Lv?((n=Rv.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),zh.dispatchEvent(n)):n={promise:t,reason:r},!yv&&(i=zh["on"+e])?i(n):e===Ov&&uv("Unhandled promise rejection",r)},jv=function(e){Qh(av,zh,(function(){var t,r=e.facade,n=e.value;if(Av(e)&&(t=lv((function(){Jh?Tv.emit("unhandledRejection",n,r):Zv(Ov,r,n)})),e.rejection=Jh||Av(e)?2:1,t.error))throw t.value}))},Av=function(e){return 1!==e.rejection&&!e.parent},Dv=function(e){Qh(av,zh,(function(){var t=e.facade;Jh?Tv.emit("rejectionHandled",t):Zv("rejectionhandled",t,e.value)}))},Vv=function(e,t,r){return function(n){e(t,n,r)}},Wv=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,Cv(e,!0))},Mv=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw kv("Promise can't be resolved itself");var n=Pv(t);n?sv((function(){var r={done:!1};try{Qh(n,t,Vv(Mv,r,e),Vv(Wv,r,e))}catch(PC){Wv(r,PC,e)}})):(e.value=t,e.state=1,Cv(e,!1))}catch(PC){Wv({done:!1},PC,e)}}};mv&&(Sv=(wv=function(e){iv(this,Sv),tv(e),Qh(Bh,this);var t=gv(this);try{e(Vv(Mv,t),Vv(Wv,t))}catch(PC){Wv(t,PC)}}).prototype,(Bh=function(e){_v(this,{type:vv,done:!1,notified:!1,parent:!1,reactions:new cv,rejection:!1,state:0,value:void 0})}).prototype=qh(Sv,"then",(function(e,t){var r=gv(this),n=xv(ov(this,wv));return r.parent=!0,n.ok=!rv(e)||e,n.fail=rv(t)&&t,n.domain=Jh?Tv.domain:void 0,0==r.state?r.reactions.add(n):sv((function(){Iv(n,r)})),n.promise})),Kh=function(){var e=new Bh,t=gv(e);this.promise=e,this.resolve=Vv(Mv,t),this.reject=Vv(Wv,t)},hv.f=xv=function(e){return e===wv||undefined===e?new Kh(e):Ev(e)}),Yh({global:!0,constructor:!0,wrap:!0,forced:mv},{Promise:wv}),$h(wv,vv,!1,!0),ev(vv);var Gv=dt("iterator"),Fv=!1;try{var Nv=0,Uv={next:function(){return{done:!!Nv++}},return:function(){Fv=!0}};Uv[Gv]=function(){return this},Array.from(Uv,(function(){throw 2}))}catch(PC){}var Xv=function(e,t){if(!t&&!Fv)return!1;var r=!1;try{var n={};n[Gv]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(PC){}return r},Hv=Th,Bv=Fh.CONSTRUCTOR||!Xv((function(e){Hv.all(e).then(void 0,(function(){}))})),Kv=C,Yv=Ie,Jv=Nh,zv=Rh,Qv=jd;Lr({target:"Promise",stat:!0,forced:Bv},{all:function(e){var t=this,r=Jv.f(t),n=r.resolve,i=r.reject,o=zv((function(){var r=Yv(t.resolve),o=[],a=0,s=1;Qv(e,(function(e){var u=a++,l=!1;s++,Kv(r,t,e).then((function(e){l||(l=!0,o[u]=e,--s||n(o))}),i)})),--s||n(o)}));return o.error&&i(o.value),r.promise}});var qv=Lr,$v=Fh.CONSTRUCTOR;Th&&Th.prototype,qv({target:"Promise",proto:!0,forced:$v,real:!0},{catch:function(e){return this.then(void 0,e)}});var em=C,tm=Ie,rm=Nh,nm=Rh,im=jd;Lr({target:"Promise",stat:!0,forced:Bv},{race:function(e){var t=this,r=rm.f(t),n=r.reject,i=nm((function(){var i=tm(t.resolve);im(e,(function(e){em(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}});var om=C,am=Nh;Lr({target:"Promise",stat:!0,forced:Fh.CONSTRUCTOR},{reject:function(e){var t=am.f(this);return om(t.reject,void 0,e),t.promise}});var sm=rr,um=ee,lm=Nh,cm=function(e,t){if(sm(e),um(t)&&t.constructor===e)return t;var r=lm.f(e);return(0,r.resolve)(t),r.promise},fm=Lr,dm=Th,pm=Fh.CONSTRUCTOR,hm=cm,vm=ae("Promise"),mm=!pm;fm({target:"Promise",stat:!0,forced:true},{resolve:function(e){return hm(mm&&this===vm?dm:this,e)}});var ym=C,gm=Ie,_m=Nh,bm=Rh,wm=jd;Lr({target:"Promise",stat:!0,forced:Bv},{allSettled:function(e){var t=this,r=_m.f(t),n=r.resolve,i=r.reject,o=bm((function(){var r=gm(t.resolve),i=[],o=0,a=1;wm(e,(function(e){var s=o++,u=!1;a++,ym(r,t,e).then((function(e){u||(u=!0,i[s]={status:"fulfilled",value:e},--a||n(i))}),(function(e){u||(u=!0,i[s]={status:"rejected",reason:e},--a||n(i))}))})),--a||n(i)}));return o.error&&i(o.value),r.promise}});var Sm=C,km=Ie,Rm=ae,Tm=Nh,xm=Rh,Em=jd,Lm="No one promise resolved";Lr({target:"Promise",stat:!0,forced:Bv},{any:function(e){var t=this,r=Rm("AggregateError"),n=Tm.f(t),i=n.resolve,o=n.reject,a=xm((function(){var n=km(t.resolve),a=[],s=0,u=1,l=!1;Em(e,(function(e){var c=s++,f=!1;u++,Sm(n,t,e).then((function(e){f||l||(l=!0,i(e))}),(function(e){f||l||(f=!0,a[c]=e,--u||o(new r(a,Lm)))}))})),--u||o(new r(a,Lm))}));return a.error&&o(a.value),n.promise}});var Om=Lr,Pm=Th,Im=o,Cm=ae,Zm=E,jm=bp,Am=cm,Dm=Pm&&Pm.prototype;Om({target:"Promise",proto:!0,real:!0,forced:!!Pm&&Im((function(){Dm.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=jm(this,Cm("Promise")),r=Zm(e);return this.then(r?function(r){return Am(t,e()).then((function(){return r}))}:e,r?function(r){return Am(t,e()).then((function(){throw r}))}:e)}});var Vm=te.Promise,Wm=Nh,Mm=Rh;Lr({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=Wm.f(this),r=Mm(e);return(r.error?t.reject:t.resolve)(r.value),t.promise}});var Gm=r(Vm),Fm=Lr,Nm=Pr,Um=m([].reverse),Xm=[1,2];Fm({target:"Array",proto:!0,forced:String(Xm)===String(Xm.reverse())},{reverse:function(){return Nm(this)&&(this.length=this.length),Um(this)}});var Hm=Vc("Array").reverse,Bm=se,Km=Hm,Ym=Array.prototype,Jm=r((function(e){var t=e.reverse;return e===Ym||Bm(Ym,e)&&t===Ym.reverse?Km:t})),zm=Lr,Qm=Pr,qm=_n,$m=ee,ey=qn,ty=Mr,ry=Q,ny=Hr,iy=dt,oy=Rs,ay=Pn("slice"),sy=iy("species"),uy=Array,ly=Math.max;zm({target:"Array",proto:!0,forced:!ay},{slice:function(e,t){var r,n,i,o=ry(this),a=ty(o),s=ey(e,a),u=ey(void 0===t?a:t,a);if(Qm(o)&&(r=o.constructor,(qm(r)&&(r===uy||Qm(r.prototype))||$m(r)&&null===(r=r[sy]))&&(r=void 0),r===uy||void 0===r))return oy(o,s,u);for(n=new(void 0===r?uy:r)(ly(u-s,0)),i=0;s<u;s++,i++)s in o&&ny(n,i,o[s]);return n.length=i,n}});var cy=Vc("Array").slice,fy=se,dy=cy,py=Array.prototype,hy=r((function(e){var t=e.slice;return e===py||fy(py,e)&&t===py.slice?dy:t})),vy=m,my=Ie,yy=ee,gy=qe,_y=Rs,by=a,wy=Function,Sy=vy([].concat),ky=vy([].join),Ry={},Ty=by?wy.bind:function(e){var t=my(this),r=t.prototype,n=_y(arguments,1),i=function(){var r=Sy(n,_y(arguments));return this instanceof i?function(e,t,r){if(!gy(Ry,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";Ry[t]=wy("C,a","return new C("+ky(n,",")+")")}return Ry[t](e,r)}(t,r.length,r):t.apply(e,r)};return yy(r)&&(i.prototype=r),i},xy=Ty;Lr({target:"Function",proto:!0,forced:Function.bind!==xy},{bind:xy});var Ey=Vc("Function").bind,Ly=se,Oy=Ey,Py=Function.prototype,Iy=r((function(e){var t=e.bind;return e===Py||Ly(Py,e)&&t===Py.bind?Oy:t})),Cy=Lr,Zy=f,jy=Ty,Ay=vp,Dy=rr,Vy=ee,Wy=Mi,My=o,Gy=ae("Reflect","construct"),Fy=Object.prototype,Ny=[].push,Uy=My((function(){function e(){}return!(Gy((function(){}),[],e)instanceof e)})),Xy=!My((function(){Gy((function(){}))})),Hy=Uy||Xy;Cy({target:"Reflect",stat:!0,forced:Hy,sham:Hy},{construct:function(e,t){Ay(e),Dy(t);var r=arguments.length<3?e:Ay(arguments[2]);if(Xy&&!Uy)return Gy(e,t,r);if(e==r){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];return Zy(Ny,n,t),new(Zy(jy,e,n))}var i=r.prototype,o=Wy(Vy(i)?i:Fy),a=Zy(e,o,t);return Vy(a)?a:o}});var By=r(te.Reflect.construct),Ky=Lr,Yy=ni.indexOf,Jy=$c,zy=k([].indexOf),Qy=!!zy&&1/zy([1],1,-0)<0;Ky({target:"Array",proto:!0,forced:Qy||!Jy("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return Qy?zy(this,e,t)||0:Yy(this,e,t)}});var qy=Vc("Array").indexOf,$y=se,eg=qy,tg=Array.prototype,rg=r((function(e){var t=e.indexOf;return e===tg||$y(tg,e)&&t===tg.indexOf?eg:t}));Lr({target:"Array",stat:!0},{isArray:Pr});var ng=r(te.Array.isArray),ig=rr,og=bd,ag=zt,sg=C,ug=Je,lg=function(e,t,r,n){try{return n?t(ig(r)[0],r[1]):t(r)}catch(PC){og(e,"throw",PC)}},cg=ld,fg=_n,dg=Mr,pg=Hr,hg=md,vg=Oc,mg=Array,yg=function(e){var t=ug(e),r=fg(this),n=arguments.length,i=n>1?arguments[1]:void 0,o=void 0!==i;o&&(i=ag(i,n>2?arguments[2]:void 0));var a,s,u,l,c,f,d=vg(t),p=0;if(!d||this===mg&&cg(d))for(a=dg(t),s=r?new this(a):mg(a);a>p;p++)f=o?i(t[p],p):t[p],pg(s,p,f);else for(c=(l=hg(t,d)).next,s=r?new this:[];!(u=sg(c,l)).done;p++)f=o?lg(l,i,[u.value,p],!0):u.value,pg(s,p,f);return s.length=p,s},gg=yg;Lr({target:"Array",stat:!0,forced:!Xv((function(e){Array.from(e)}))},{from:gg});var _g=r(te.Array.from),bg=r(ao.f("toPrimitive"));function wg(e,t){var r=Zc(e);if(jc){var n=jc(e);t&&(n=Nc(n).call(n,(function(t){return Qc(e,t).enumerable}))),r.push.apply(r,n)}return r}function Sg(e){for(var t=1;t<arguments.length;t++){var r,n,i=null!=arguments[t]?arguments[t]:{};t%2?cf(r=wg(Object(i),!0)).call(r,(function(t){Og(e,t,i[t])})):wf?Lf(e,wf(i)):cf(n=wg(Object(i))).call(n,(function(t){Af(e,t,Qc(i,t))}))}return e}function kg(){kg=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Af||function(e,t,r){e[t]=r.value},i="function"==typeof kc?kc:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Af(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(E){u=function(e,t,r){return e[t]=r}}function l(e,t,r,i){var o=t&&t.prototype instanceof d?t:d,a=Vf(o.prototype),s=new R(i||[]);return n(a,"_invoke",{value:b(e,r,s)}),a}function c(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(E){return{type:"throw",arg:E}}}e.wrap=l;var f={};function d(){}function p(){}function h(){}var v={};u(v,o,(function(){return this}));var m=Ff&&Ff(Ff(T([])));m&&m!==t&&r.call(m,o)&&(v=m);var y=h.prototype=d.prototype=Vf(v);function g(e){var t;cf(t=["next","throw","return"]).call(t,(function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(n,o,a,s){var u=c(e[n],e,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==Sc(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return i("throw",e,a,s)}))}s(u.arg)}var o;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return o=o?o.then(n,n):n()}})}function b(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=w(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=c(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var i=c(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,f;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],cf(e).call(e,S,this),this.reset(!0)}function T(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:x}}function x(){return{value:void 0,done:!0}}return p.prototype=h,n(y,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:p,configurable:!0}),p.displayName=u(h,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Nf?Nf(e,h):(e.__proto__=h,u(e,s,"GeneratorFunction")),e.prototype=Vf(y),e},e.awrap=function(e){return{__await:e}},g(_.prototype),u(_.prototype,a,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,i,o){void 0===o&&(o=Gm);var a=new _(l(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(y),u(y,s,"Generator"),u(y,o,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return Jm(r).call(r),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=T,R.prototype={constructor:R,reset:function(e){var t;if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,cf(t=this.tryEntries).call(t,k),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+hy(n).call(n,1))&&(this[n]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),k(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;k(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:T(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function Rg(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(PC){return void r(PC)}s.done?t(u):Gm.resolve(u).then(n,i)}function Tg(e){return function(){var t=this,r=arguments;return new Gm((function(n,i){var o=e.apply(t,r);function a(e){Rg(o,n,i,a,s,"next",e)}function s(e){Rg(o,n,i,a,s,"throw",e)}a(void 0)}))}}function xg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Eg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Af(e,Gg(n.key),n)}}function Lg(e,t,r){return t&&Eg(e.prototype,t),r&&Eg(e,r),Af(e,"prototype",{writable:!1}),e}function Og(e,t,r){return(t=Gg(t))in e?Af(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Pg(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Vf(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Af(e,"prototype",{writable:!1}),t&&Cg(e,t)}function Ig(e){var t;return(Ig=Nf?Iy(t=Ff).call(t):function(e){return e.__proto__||Ff(e)})(e)}function Cg(e,t){var r;return(Cg=Nf?Iy(r=Nf).call(r):function(e,t){return e.__proto__=t,e})(e,t)}function Zg(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Zc(e);for(n=0;n<o.length;n++)r=o[n],rg(t).call(t,r)>=0||(i[r]=e[r]);return i}(e,t);if(jc){var o=jc(e);for(n=0;n<o.length;n++)r=o[n],rg(t).call(t,r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function jg(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ag(e){var t=function(){if("undefined"==typeof Reflect||!By)return!1;if(By.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(By(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ig(e);if(t){var i=Ig(this).constructor;r=By(n,arguments,i)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===Sc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return jg(e)}(this,r)}}function Dg(e,t){return function(e){if(ng(e))return e}(e)||function(e,t){var r=null==e?null:void 0!==kc&&Pc(e)||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,l=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||Wg(e,t)||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 Vg(e){return function(e){if(ng(e))return Mg(e)}(e)||function(e){if(void 0!==kc&&null!=Pc(e)||null!=e["@@iterator"])return _g(e)}(e)||Wg(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wg(e,t){var r;if(e){if("string"==typeof e)return Mg(e,t);var n=hy(r=Object.prototype.toString.call(e)).call(r,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?_g(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mg(e,t):void 0}}function Mg(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Gg(e){var t=function(e,t){if("object"!==Sc(e)||null===e)return e;var r=e[bg];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Sc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Sc(t)?t:String(t)}var Fg,Ng=Vc("Array").concat,Ug=se,Xg=Ng,Hg=Array.prototype,Bg=r((function(e){var t=e.concat;return e===Hg||Ug(Hg,e)&&t===Hg.concat?Xg:t})),Kg="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,Yg=i,Jg=f,zg=E,Qg=Kg,qg=ue,$g=Rs,e_=Sp,t_=Yg.Function,r_=/MSIE .\./.test(qg)||Qg&&((Fg=Yg.Bun.version.split(".")).length<3||0==Fg[0]&&(Fg[1]<3||3==Fg[1]&&0==Fg[2])),n_=function(e,t){var r=t?2:1;return r_?function(n,i){var o=e_(arguments.length,1)>r,a=zg(n)?n:t_(n),s=o?$g(arguments,r):[],u=o?function(){Jg(a,this,s)}:a;return t?e(u,i):e(u)}:e},i_=Lr,o_=i,a_=n_(o_.setInterval,!0);i_({global:!0,bind:!0,forced:o_.setInterval!==a_},{setInterval:a_});var s_=Lr,u_=i,l_=n_(u_.setTimeout,!0);s_({global:!0,bind:!0,forced:u_.setTimeout!==l_},{setTimeout:l_});var c_=r(te.setTimeout),f_=o,d_=dt("iterator"),p_=!f_((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),!e.toJSON||!t.size&&true||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[d_]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),h_=O,v_=m,m_=C,y_=o,g_=hi,__=to,b_=Z,w_=Je,S_=X,k_=Object.assign,R_=Object.defineProperty,T_=v_([].concat),x_=!k_||y_((function(){if(h_&&1!==k_({b:1},k_(R_({},"a",{enumerable:!0,get:function(){R_(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!=k_({},e)[r]||g_(k_({},t)).join("")!=n}))?function(e,t){for(var r=w_(e),n=arguments.length,i=1,o=__.f,a=b_.f;n>i;)for(var s,u=S_(arguments[i++]),l=o?T_(g_(u),o(u)):g_(u),c=l.length,f=0;c>f;)s=l[f++],h_&&!m_(a,u,s)||(r[s]=u[s]);return r}:k_,E_=m,L_=2147483647,O_=/[^\0-\u007E]/,P_=/[.\u3002\uFF0E\uFF61]/g,I_="Overflow: input needs wider integers to process",C_=RangeError,Z_=E_(P_.exec),j_=Math.floor,A_=String.fromCharCode,D_=E_("".charCodeAt),V_=E_([].join),W_=E_([].push),M_=E_("".replace),G_=E_("".split),F_=E_("".toLowerCase),N_=function(e){return e+22+75*(e<26)},U_=function(e,t,r){var n=0;for(e=r?j_(e/700):e>>1,e+=j_(e/t);e>455;)e=j_(e/35),n+=36;return j_(n+36*e/(e+38))},X_=function(e){var t=[];e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=D_(e,r++);if(i>=55296&&i<=56319&&r<n){var o=D_(e,r++);56320==(64512&o)?W_(t,((1023&i)<<10)+(1023&o)+65536):(W_(t,i),r--)}else W_(t,i)}return t}(e);var r,n,i=e.length,o=128,a=0,s=72;for(r=0;r<e.length;r++)(n=e[r])<128&&W_(t,A_(n));var u=t.length,l=u;for(u&&W_(t,"-");l<i;){var c=L_;for(r=0;r<e.length;r++)(n=e[r])>=o&&n<c&&(c=n);var f=l+1;if(c-o>j_((L_-a)/f))throw C_(I_);for(a+=(c-o)*f,o=c,r=0;r<e.length;r++){if((n=e[r])<o&&++a>L_)throw C_(I_);if(n==o){for(var d=a,p=36;;){var h=p<=s?1:p>=s+26?26:p-s;if(d<h)break;var v=d-h,m=36-h;W_(t,A_(N_(h+v%m))),d=j_(v/m),p+=36}W_(t,A_(N_(d))),s=U_(a,f,l==u),a=0,l++}}a++,o++}return V_(t,"")},H_=no,B_=function(e,t,r){for(var n in t)r&&r.unsafe&&e[n]?e[n]=t[n]:H_(e,n,t[n],r);return e},K_=Ji,Y_=Math.floor,J_=function(e,t){var r=e.length,n=Y_(r/2);return r<8?z_(e,t):Q_(e,J_(K_(e,0,n),t),J_(K_(e,n),t),t)},z_=function(e,t){for(var r,n,i=e.length,o=1;o<i;){for(n=o,r=e[o];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==o++&&(e[n]=r)}return e},Q_=function(e,t,r,n){for(var i=t.length,o=r.length,a=0,s=0;a<i||s<o;)e[a+s]=a<i&&s<o?n(t[a],r[s])<=0?t[a++]:r[s++]:a<i?t[a++]:r[s++];return e},q_=J_,$_=Lr,eb=i,tb=C,rb=m,nb=O,ib=p_,ob=no,ab=oo,sb=B_,ub=Po,lb=Nu,cb=Bo,fb=fp,db=E,pb=qe,hb=zt,vb=en,mb=rr,yb=ee,gb=Kn,_b=Mi,bb=M,wb=md,Sb=Oc,kb=Sp,Rb=q_,Tb=dt("iterator"),xb="URLSearchParams",Eb=xb+"Iterator",Lb=cb.set,Ob=cb.getterFor(xb),Pb=cb.getterFor(Eb),Ib=Object.getOwnPropertyDescriptor,Cb=function(e){if(!nb)return eb[e];var t=Ib(eb,e);return t&&t.value},Zb=Cb("fetch"),jb=Cb("Request"),Ab=Cb("Headers"),Db=jb&&jb.prototype,Vb=Ab&&Ab.prototype,Wb=eb.RegExp,Mb=eb.TypeError,Gb=eb.decodeURIComponent,Fb=eb.encodeURIComponent,Nb=rb("".charAt),Ub=rb([].join),Xb=rb([].push),Hb=rb("".replace),Bb=rb([].shift),Kb=rb([].splice),Yb=rb("".split),Jb=rb("".slice),zb=/\+/g,Qb=Array(4),qb=function(e){return Qb[e-1]||(Qb[e-1]=Wb("((?:%[\\da-f]{2}){"+e+"})","gi"))},$b=function(e){try{return Gb(e)}catch(PC){return e}},ew=function(e){var t=Hb(e,zb," "),r=4;try{return Gb(t)}catch(PC){for(;r;)t=Hb(t,qb(r--),$b);return t}},tw=/[!'()~]|%20/g,rw={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},nw=function(e){return rw[e]},iw=function(e){return Hb(Fb(e),tw,nw)},ow=lb((function(e,t){Lb(this,{type:Eb,iterator:wb(Ob(e).entries),kind:t})}),"Iterator",(function(){var e=Pb(this),t=e.kind,r=e.iterator.next(),n=r.value;return r.done||(r.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),r}),!0),aw=function(e){this.entries=[],this.url=null,void 0!==e&&(yb(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Nb(e,0)?Jb(e,1):e:gb(e)))};aw.prototype={type:xb,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,o,a,s,u=Sb(e);if(u)for(r=(t=wb(e,u)).next;!(n=tb(r,t)).done;){if(o=(i=wb(mb(n.value))).next,(a=tb(o,i)).done||(s=tb(o,i)).done||!tb(o,i).done)throw Mb("Expected sequence with length 2");Xb(this.entries,{key:gb(a.value),value:gb(s.value)})}else for(var l in e)pb(e,l)&&Xb(this.entries,{key:l,value:gb(e[l])})},parseQuery:function(e){if(e)for(var t,r,n=Yb(e,"&"),i=0;i<n.length;)(t=n[i++]).length&&(r=Yb(t,"="),Xb(this.entries,{key:ew(Bb(r)),value:ew(Ub(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],Xb(r,iw(e.key)+"="+iw(e.value));return Ub(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var sw=function(){fb(this,uw);var e=Lb(this,new aw(arguments.length>0?arguments[0]:void 0));nb||(this.length=e.entries.length)},uw=sw.prototype;if(sb(uw,{append:function(e,t){kb(arguments.length,2);var r=Ob(this);Xb(r.entries,{key:gb(e),value:gb(t)}),nb||this.length++,r.updateURL()},delete:function(e){kb(arguments.length,1);for(var t=Ob(this),r=t.entries,n=gb(e),i=0;i<r.length;)r[i].key===n?Kb(r,i,1):i++;nb||(this.length=r.length),t.updateURL()},get:function(e){kb(arguments.length,1);for(var t=Ob(this).entries,r=gb(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){kb(arguments.length,1);for(var t=Ob(this).entries,r=gb(e),n=[],i=0;i<t.length;i++)t[i].key===r&&Xb(n,t[i].value);return n},has:function(e){kb(arguments.length,1);for(var t=Ob(this).entries,r=gb(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){kb(arguments.length,1);for(var r,n=Ob(this),i=n.entries,o=!1,a=gb(e),s=gb(t),u=0;u<i.length;u++)(r=i[u]).key===a&&(o?Kb(i,u--,1):(o=!0,r.value=s));o||Xb(i,{key:a,value:s}),nb||(this.length=i.length),n.updateURL()},sort:function(){var e=Ob(this);Rb(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=Ob(this).entries,n=hb(e,arguments.length>1?arguments[1]:void 0),i=0;i<r.length;)n((t=r[i++]).value,t.key,this)},keys:function(){return new ow(this,"keys")},values:function(){return new ow(this,"values")},entries:function(){return new ow(this,"entries")}},{enumerable:!0}),ob(uw,Tb,uw.entries,{name:"entries"}),ob(uw,"toString",(function(){return Ob(this).serialize()}),{enumerable:!0}),nb&&ab(uw,"size",{get:function(){return Ob(this).entries.length},configurable:!0,enumerable:!0}),ub(sw,xb),$_({global:!0,constructor:!0,forced:!ib},{URLSearchParams:sw}),!ib&&db(Ab)){var lw=rb(Vb.has),cw=rb(Vb.set),fw=function(e){if(yb(e)){var t,r=e.body;if(vb(r)===xb)return t=e.headers?new Ab(e.headers):new Ab,lw(t,"content-type")||cw(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),_b(e,{body:bb(0,gb(r)),headers:bb(0,t)})}return e};if(db(Zb)&&$_({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return Zb(e,arguments.length>1?fw(arguments[1]):{})}}),db(jb)){var dw=function(e){return fb(this,Db),new jb(e,arguments.length>1?fw(arguments[1]):{})};Db.constructor=dw,dw.prototype=Db,$_({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:dw})}}var pw,hw=Lr,vw=O,mw=p_,yw=i,gw=zt,_w=m,bw=no,ww=oo,Sw=fp,kw=qe,Rw=x_,Tw=yg,xw=Ji,Ew=fc.codeAt,Lw=function(e){var t,r,n=[],i=G_(M_(F_(e),P_,"."),".");for(t=0;t<i.length;t++)r=i[t],W_(n,Z_(O_,r)?"xn--"+X_(r):r);return V_(n,".")},Ow=Kn,Pw=Po,Iw=Sp,Cw={URLSearchParams:sw,getState:Ob},Zw=Bo,jw=Zw.set,Aw=Zw.getterFor("URL"),Dw=Cw.URLSearchParams,Vw=Cw.getState,Ww=yw.URL,Mw=yw.TypeError,Gw=yw.parseInt,Fw=Math.floor,Nw=Math.pow,Uw=_w("".charAt),Xw=_w(/./.exec),Hw=_w([].join),Bw=_w(1..toString),Kw=_w([].pop),Yw=_w([].push),Jw=_w("".replace),zw=_w([].shift),Qw=_w("".split),qw=_w("".slice),$w=_w("".toLowerCase),eS=_w([].unshift),tS="Invalid scheme",rS="Invalid host",nS="Invalid port",iS=/[a-z]/i,oS=/[\d+-.a-z]/i,aS=/\d/,sS=/^0x/i,uS=/^[0-7]+$/,lS=/^\d+$/,cS=/^[\da-f]+$/i,fS=/[\0\t\n\r #%/:<>?@[\\\]^|]/,dS=/[\0\t\n\r #/:<>?@[\\\]^|]/,pS=/^[\u0000-\u0020]+/,hS=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,vS=/[\t\n\r]/g,mS=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)eS(t,e%256),e=Fw(e/256);return Hw(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,i=0,o=0;o<8;o++)0!==e[o]?(i>r&&(t=n,r=i),n=null,i=0):(null===n&&(n=o),++i);return i>r&&(t=n,r=i),t}(e),r=0;r<8;r++)i&&0===e[r]||(i&&(i=!1),n===r?(t+=r?":":"::",i=!0):(t+=Bw(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},yS={},gS=Rw({},yS,{" ":1,'"':1,"<":1,">":1,"`":1}),_S=Rw({},gS,{"#":1,"?":1,"{":1,"}":1}),bS=Rw({},_S,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),wS=function(e,t){var r=Ew(e,0);return r>32&&r<127&&!kw(t,e)?e:encodeURIComponent(e)},SS={ftp:21,file:null,http:80,https:443,ws:80,wss:443},kS=function(e,t){var r;return 2==e.length&&Xw(iS,Uw(e,0))&&(":"==(r=Uw(e,1))||!t&&"|"==r)},RS=function(e){var t;return e.length>1&&kS(qw(e,0,2))&&(2==e.length||"/"===(t=Uw(e,2))||"\\"===t||"?"===t||"#"===t)},TS=function(e){return"."===e||"%2e"===$w(e)},xS={},ES={},LS={},OS={},PS={},IS={},CS={},ZS={},jS={},AS={},DS={},VS={},WS={},MS={},GS={},FS={},NS={},US={},XS={},HS={},BS={},KS=function(e,t,r){var n,i,o,a=Ow(e);if(t){if(i=this.parse(a))throw Mw(i);this.searchParams=null}else{if(void 0!==r&&(n=new KS(r,!0)),i=this.parse(a,null,n))throw Mw(i);(o=Vw(new Dw)).bindURL(this),this.searchParams=o}};KS.prototype={type:"URL",parse:function(e,t,r){var n,i,o,a,s,u=this,l=t||xS,c=0,f="",d=!1,p=!1,h=!1;for(e=Ow(e),t||(u.scheme="",u.username="",u.password="",u.host=null,u.port=null,u.path=[],u.query=null,u.fragment=null,u.cannotBeABaseURL=!1,e=Jw(e,pS,""),e=Jw(e,hS,"$1")),e=Jw(e,vS,""),n=Tw(e);c<=n.length;){switch(i=n[c],l){case xS:if(!i||!Xw(iS,i)){if(t)return tS;l=LS;continue}f+=$w(i),l=ES;break;case ES:if(i&&(Xw(oS,i)||"+"==i||"-"==i||"."==i))f+=$w(i);else{if(":"!=i){if(t)return tS;f="",l=LS,c=0;continue}if(t&&(u.isSpecial()!=kw(SS,f)||"file"==f&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=f,t)return void(u.isSpecial()&&SS[u.scheme]==u.port&&(u.port=null));f="","file"==u.scheme?l=MS:u.isSpecial()&&r&&r.scheme==u.scheme?l=OS:u.isSpecial()?l=ZS:"/"==n[c+1]?(l=PS,c++):(u.cannotBeABaseURL=!0,Yw(u.path,""),l=XS)}break;case LS:if(!r||r.cannotBeABaseURL&&"#"!=i)return tS;if(r.cannotBeABaseURL&&"#"==i){u.scheme=r.scheme,u.path=xw(r.path),u.query=r.query,u.fragment="",u.cannotBeABaseURL=!0,l=BS;break}l="file"==r.scheme?MS:IS;continue;case OS:if("/"!=i||"/"!=n[c+1]){l=IS;continue}l=jS,c++;break;case PS:if("/"==i){l=AS;break}l=US;continue;case IS:if(u.scheme=r.scheme,i==pw)u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=xw(r.path),u.query=r.query;else if("/"==i||"\\"==i&&u.isSpecial())l=CS;else if("?"==i)u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=xw(r.path),u.query="",l=HS;else{if("#"!=i){u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=xw(r.path),u.path.length--,l=US;continue}u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=xw(r.path),u.query=r.query,u.fragment="",l=BS}break;case CS:if(!u.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,l=US;continue}l=AS}else l=jS;break;case ZS:if(l=jS,"/"!=i||"/"!=Uw(f,c+1))continue;c++;break;case jS:if("/"!=i&&"\\"!=i){l=AS;continue}break;case AS:if("@"==i){d&&(f="%40"+f),d=!0,o=Tw(f);for(var v=0;v<o.length;v++){var m=o[v];if(":"!=m||h){var y=wS(m,bS);h?u.password+=y:u.username+=y}else h=!0}f=""}else if(i==pw||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(d&&""==f)return"Invalid authority";c-=Tw(f).length+1,f="",l=DS}else f+=i;break;case DS:case VS:if(t&&"file"==u.scheme){l=FS;continue}if(":"!=i||p){if(i==pw||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(u.isSpecial()&&""==f)return rS;if(t&&""==f&&(u.includesCredentials()||null!==u.port))return;if(a=u.parseHost(f))return a;if(f="",l=NS,t)return;continue}"["==i?p=!0:"]"==i&&(p=!1),f+=i}else{if(""==f)return rS;if(a=u.parseHost(f))return a;if(f="",l=WS,t==VS)return}break;case WS:if(!Xw(aS,i)){if(i==pw||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()||t){if(""!=f){var g=Gw(f,10);if(g>65535)return nS;u.port=u.isSpecial()&&g===SS[u.scheme]?null:g,f=""}if(t)return;l=NS;continue}return nS}f+=i;break;case MS:if(u.scheme="file","/"==i||"\\"==i)l=GS;else{if(!r||"file"!=r.scheme){l=US;continue}if(i==pw)u.host=r.host,u.path=xw(r.path),u.query=r.query;else if("?"==i)u.host=r.host,u.path=xw(r.path),u.query="",l=HS;else{if("#"!=i){RS(Hw(xw(n,c),""))||(u.host=r.host,u.path=xw(r.path),u.shortenPath()),l=US;continue}u.host=r.host,u.path=xw(r.path),u.query=r.query,u.fragment="",l=BS}}break;case GS:if("/"==i||"\\"==i){l=FS;break}r&&"file"==r.scheme&&!RS(Hw(xw(n,c),""))&&(kS(r.path[0],!0)?Yw(u.path,r.path[0]):u.host=r.host),l=US;continue;case FS:if(i==pw||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&kS(f))l=US;else if(""==f){if(u.host="",t)return;l=NS}else{if(a=u.parseHost(f))return a;if("localhost"==u.host&&(u.host=""),t)return;f="",l=NS}continue}f+=i;break;case NS:if(u.isSpecial()){if(l=US,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=pw&&(l=US,"/"!=i))continue}else u.fragment="",l=BS;else u.query="",l=HS;break;case US:if(i==pw||"/"==i||"\\"==i&&u.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=$w(s=f))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(u.shortenPath(),"/"==i||"\\"==i&&u.isSpecial()||Yw(u.path,"")):TS(f)?"/"==i||"\\"==i&&u.isSpecial()||Yw(u.path,""):("file"==u.scheme&&!u.path.length&&kS(f)&&(u.host&&(u.host=""),f=Uw(f,0)+":"),Yw(u.path,f)),f="","file"==u.scheme&&(i==pw||"?"==i||"#"==i))for(;u.path.length>1&&""===u.path[0];)zw(u.path);"?"==i?(u.query="",l=HS):"#"==i&&(u.fragment="",l=BS)}else f+=wS(i,_S);break;case XS:"?"==i?(u.query="",l=HS):"#"==i?(u.fragment="",l=BS):i!=pw&&(u.path[0]+=wS(i,yS));break;case HS:t||"#"!=i?i!=pw&&("'"==i&&u.isSpecial()?u.query+="%27":u.query+="#"==i?"%23":wS(i,yS)):(u.fragment="",l=BS);break;case BS:i!=pw&&(u.fragment+=wS(i,gS))}c++}},parseHost:function(e){var t,r,n;if("["==Uw(e,0)){if("]"!=Uw(e,e.length-1))return rS;if(t=function(e){var t,r,n,i,o,a,s,u=[0,0,0,0,0,0,0,0],l=0,c=null,f=0,d=function(){return Uw(e,f)};if(":"==d()){if(":"!=Uw(e,1))return;f+=2,c=++l}for(;d();){if(8==l)return;if(":"!=d()){for(t=r=0;r<4&&Xw(cS,d());)t=16*t+Gw(d(),16),f++,r++;if("."==d()){if(0==r)return;if(f-=r,l>6)return;for(n=0;d();){if(i=null,n>0){if(!("."==d()&&n<4))return;f++}if(!Xw(aS,d()))return;for(;Xw(aS,d());){if(o=Gw(d(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;f++}u[l]=256*u[l]+i,2!=++n&&4!=n||l++}if(4!=n)return;break}if(":"==d()){if(f++,!d())return}else if(d())return;u[l++]=t}else{if(null!==c)return;f++,c=++l}}if(null!==c)for(a=l-c,l=7;0!=l&&a>0;)s=u[l],u[l--]=u[c+a-1],u[c+--a]=s;else if(8!=l)return;return u}(qw(e,1,-1)),!t)return rS;this.host=t}else if(this.isSpecial()){if(e=Lw(e),Xw(fS,e))return rS;if(t=function(e){var t,r,n,i,o,a,s,u=Qw(e,".");if(u.length&&""==u[u.length-1]&&u.length--,(t=u.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(i=u[n]))return e;if(o=10,i.length>1&&"0"==Uw(i,0)&&(o=Xw(sS,i)?16:8,i=qw(i,8==o?1:2)),""===i)a=0;else{if(!Xw(10==o?lS:8==o?uS:cS,i))return e;a=Gw(i,o)}Yw(r,a)}for(n=0;n<t;n++)if(a=r[n],n==t-1){if(a>=Nw(256,5-t))return null}else if(a>255)return null;for(s=Kw(r),n=0;n<r.length;n++)s+=r[n]*Nw(256,3-n);return s}(e),null===t)return rS;this.host=t}else{if(Xw(dS,e))return rS;for(t="",r=Tw(e),n=0;n<r.length;n++)t+=wS(r[n],yS);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return kw(SS,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&kS(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,i=e.host,o=e.port,a=e.path,s=e.query,u=e.fragment,l=t+":";return null!==i?(l+="//",e.includesCredentials()&&(l+=r+(n?":"+n:"")+"@"),l+=mS(i),null!==o&&(l+=":"+o)):"file"==t&&(l+="//"),l+=e.cannotBeABaseURL?a[0]:a.length?"/"+Hw(a,"/"):"",null!==s&&(l+="?"+s),null!==u&&(l+="#"+u),l},setHref:function(e){var t=this.parse(e);if(t)throw Mw(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new YS(e.path[0]).origin}catch(PC){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+mS(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Ow(e)+":",xS)},getUsername:function(){return this.username},setUsername:function(e){var t=Tw(Ow(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=wS(t[r],bS)}},getPassword:function(){return this.password},setPassword:function(e){var t=Tw(Ow(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=wS(t[r],bS)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?mS(e):mS(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,DS)},getHostname:function(){var e=this.host;return null===e?"":mS(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,VS)},getPort:function(){var e=this.port;return null===e?"":Ow(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=Ow(e))?this.port=null:this.parse(e,WS))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+Hw(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,NS))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=Ow(e))?this.query=null:("?"==Uw(e,0)&&(e=qw(e,1)),this.query="",this.parse(e,HS)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=Ow(e))?("#"==Uw(e,0)&&(e=qw(e,1)),this.fragment="",this.parse(e,BS)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var YS=function(e){var t=Sw(this,JS),r=Iw(arguments.length,1)>1?arguments[1]:void 0,n=jw(t,new KS(e,!1,r));vw||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},JS=YS.prototype,zS=function(e,t){return{get:function(){return Aw(this)[e]()},set:t&&function(e){return Aw(this)[t](e)},configurable:!0,enumerable:!0}};if(vw&&(ww(JS,"href",zS("serialize","setHref")),ww(JS,"origin",zS("getOrigin")),ww(JS,"protocol",zS("getProtocol","setProtocol")),ww(JS,"username",zS("getUsername","setUsername")),ww(JS,"password",zS("getPassword","setPassword")),ww(JS,"host",zS("getHost","setHost")),ww(JS,"hostname",zS("getHostname","setHostname")),ww(JS,"port",zS("getPort","setPort")),ww(JS,"pathname",zS("getPathname","setPathname")),ww(JS,"search",zS("getSearch","setSearch")),ww(JS,"searchParams",zS("getSearchParams")),ww(JS,"hash",zS("getHash","setHash"))),bw(JS,"toJSON",(function(){return Aw(this).serialize()}),{enumerable:!0}),bw(JS,"toString",(function(){return Aw(this).serialize()}),{enumerable:!0}),Ww){var QS=Ww.createObjectURL,qS=Ww.revokeObjectURL;QS&&bw(YS,"createObjectURL",gw(QS,Ww)),qS&&bw(YS,"revokeObjectURL",gw(qS,Ww))}Pw(YS,"URL"),hw({global:!0,constructor:!0,forced:!mw,sham:!vw},{URL:YS});var $S=Lr,ek=o,tk=Sp,rk=Kn,nk=p_,ik=ae("URL");$S({target:"URL",stat:!0,forced:!(nk&&ek((function(){ik.canParse()})))},{canParse:function(e){var t=tk(arguments.length,1),r=rk(e),n=t<2||void 0===arguments[1]?void 0:rk(arguments[1]);try{return!!new ik(r,n)}catch(PC){return!1}}});var ok=r(te.URL),ak=Lr,sk=ea.find,uk="find",lk=!0;uk in[]&&Array(1)[uk]((function(){lk=!1})),ak({target:"Array",proto:!0,forced:lk},{find:function(e){return sk(this,e,arguments.length>1?arguments[1]:void 0)}});var ck=Vc("Array").find,fk=se,dk=ck,pk=Array.prototype,hk=r((function(e){var t=e.find;return e===pk||fk(pk,e)&&t===pk.find?dk:t})),vk=O,mk=Pr,yk=TypeError,gk=Object.getOwnPropertyDescriptor,_k=vk&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(PC){return PC instanceof TypeError}}(),bk=Ee,wk=TypeError,Sk=function(e,t){if(!delete e[t])throw wk("Cannot delete property "+bk(t)+" of "+bk(e))},kk=Lr,Rk=Je,Tk=qn,xk=jr,Ek=Mr,Lk=_k?function(e,t){if(mk(e)&&!gk(e,"length").writable)throw yk("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},Ok=Fr,Pk=xn,Ik=Hr,Ck=Sk,Zk=Pn("splice"),jk=Math.max,Ak=Math.min;kk({target:"Array",proto:!0,forced:!Zk},{splice:function(e,t){var r,n,i,o,a,s,u=Rk(this),l=Ek(u),c=Tk(e,l),f=arguments.length;for(0===f?r=n=0:1===f?(r=0,n=l-c):(r=f-2,n=Ak(jk(xk(t),0),l-c)),Ok(l+r-n),i=Pk(u,n),o=0;o<n;o++)(a=c+o)in u&&Ik(i,o,u[a]);if(i.length=n,r<n){for(o=c;o<l-n;o++)s=o+r,(a=o+n)in u?u[s]=u[a]:Ck(u,s);for(o=l;o>l-n+r;o--)Ck(u,o-1)}else if(r>n)for(o=l-n;o>c;o--)s=o+r-1,(a=o+n-1)in u?u[s]=u[a]:Ck(u,s);for(o=0;o<r;o++)u[o+c]=arguments[o+2];return Lk(u,l-n+r),i}});var Dk=Vc("Array").splice,Vk=se,Wk=Dk,Mk=Array.prototype,Gk=r((function(e){var t=e.splice;return e===Mk||Vk(Mk,e)&&t===Mk.splice?Wk:t}));Lr({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var Fk=r(te.Number.isNaN),Nk="\t\n\v\f\r                 \u2028\u2029\ufeff",Uk=Y,Xk=Kn,Hk=Nk,Bk=m("".replace),Kk=RegExp("^["+Hk+"]+"),Yk=RegExp("(^|[^"+Hk+"])["+Hk+"]+$"),Jk=function(e){return function(t){var r=Xk(Uk(t));return 1&e&&(r=Bk(r,Kk,"")),2&e&&(r=Bk(r,Yk,"$1")),r}},zk={start:Jk(1),end:Jk(2),trim:Jk(3)},Qk=i,qk=o,$k=m,eR=Kn,tR=zk.trim,rR=Nk,nR=Qk.parseInt,iR=Qk.Symbol,oR=iR&&iR.iterator,aR=/^[+-]?0x/i,sR=$k(aR.exec),uR=8!==nR(rR+"08")||22!==nR(rR+"0x16")||oR&&!qk((function(){nR(Object(oR))}))?function(e,t){var r=tR(eR(e));return nR(r,t>>>0||(sR(aR,r)?16:10))}:nR;Lr({global:!0,forced:parseInt!=uR},{parseInt:uR});var lR=r(te.parseInt),cR=ea.map;Lr({target:"Array",proto:!0,forced:!Pn("map")},{map:function(e){return cR(this,e,arguments.length>1?arguments[1]:void 0)}});var fR=Vc("Array").map,dR=se,pR=fR,hR=Array.prototype,vR=r((function(e){var t=e.map;return e===hR||dR(hR,e)&&t===hR.map?pR:t})),mR=x_;Lr({target:"Object",stat:!0,arity:2,forced:Object.assign!==mR},{assign:mR});var yR=r(te.Object.assign),gR=r(bc),_R=qe,bR=C,wR=ee,SR=rr,kR=function(e){return void 0!==e&&(_R(e,"value")||_R(e,"writable"))},RR=L,TR=Tu;Lr({target:"Reflect",stat:!0},{get:function e(t,r){var n,i,o=arguments.length<3?t:arguments[2];return SR(t)===o?t[r]:(n=RR.f(t,r))?kR(n)?n.value:void 0===n.get?void 0:bR(n.get,o):wR(i=TR(t))?e(i,r,o):void 0}});var xR=r(te.Reflect.get);function ER(e,t){var r=Zc(e);if(jc){var n=jc(e);t&&(n=Nc(n).call(n,(function(t){return Qc(e,t).enumerable}))),r.push.apply(r,n)}return r}function LR(e){for(var t=1;t<arguments.length;t++){var r,n,i=null!=arguments[t]?arguments[t]:{};t%2?cf(r=ER(Object(i),!0)).call(r,(function(t){ZR(e,t,i[t])})):wf?Lf(e,wf(i)):cf(n=ER(Object(i))).call(n,(function(t){Af(e,t,Qc(i,t))}))}return e}function OR(e){return(OR="function"==typeof kc&&"symbol"==typeof gR?function(e){return typeof e}:function(e){return e&&"function"==typeof kc&&e.constructor===kc&&e!==kc.prototype?"symbol":typeof e})(e)}function PR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IR(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Af(e,DR(n.key),n)}}function CR(e,t,r){return t&&IR(e.prototype,t),r&&IR(e,r),Af(e,"prototype",{writable:!1}),e}function ZR(e,t,r){return(t=DR(t))in e?Af(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jR(e){return function(e){if(ng(e))return AR(e)}(e)||function(e){if(void 0!==kc&&null!=Pc(e)||null!=e["@@iterator"])return _g(e)}(e)||function(e,t){var r;if(!e)return;if("string"==typeof e)return AR(e,t);var n=hy(r=Object.prototype.toString.call(e)).call(r,8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return _g(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return AR(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function AR(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function DR(e){var t=function(e,t){if("object"!==Sc(e)||null===e)return e;var r=e[bg];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Sc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Sc(t)?t:String(t)}var VR={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,n,o,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new i(n,o||e,a),u=r?r+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],s]:e._events[u].push(s):(e._events[u]=s,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}Vf&&(n.prototype=Vf(null),(new n).__proto__||(r=!1)),s.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?hy(n).call(n,1):n);return jc?Bg(i).call(i,jc(e)):i},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,a=new Array(o);i<o;i++)a[i]=n[i].fn;return a},s.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},s.prototype.emit=function(e,t,n,i,o,a){var s=r?r+e:e;if(!this._events[s])return!1;var u,l,c=this._events[s],f=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),f){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,o),!0;case 6:return c.fn.call(c.context,t,n,i,o,a),!0}for(l=1,u=new Array(f-1);l<f;l++)u[l-1]=arguments[l];c.fn.apply(c.context,u)}else{var d,p=c.length;for(l=0;l<p;l++)switch(c[l].once&&this.removeListener(e,c[l].fn,void 0,!0),f){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,t);break;case 3:c[l].fn.call(c[l].context,t,n);break;case 4:c[l].fn.call(c[l].context,t,n,i);break;default:if(!u)for(d=1,u=new Array(f-1);d<f;d++)u[d-1]=arguments[d];c[l].fn.apply(c[l].context,u)}}return!0},s.prototype.on=function(e,t,r){return o(this,e,t,r,!1)},s.prototype.once=function(e,t,r){return o(this,e,t,r,!0)},s.prototype.removeListener=function(e,t,n,i){var o=r?r+e:e;if(!this._events[o])return this;if(!t)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==t||i&&!s.once||n&&s.context!==n||a(this,o);else{for(var u=0,l=[],c=s.length;u<c;u++)(s[u].fn!==t||i&&!s[u].once||n&&s[u].context!==n)&&l.push(s[u]);l.length?this._events[o]=1===l.length?l[0]:l:a(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&a(this,t)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s}(VR);var WR=r(VR.exports),MR=ea.some;Lr({target:"Array",proto:!0,forced:!$c("some")},{some:function(e){return MR(this,e,arguments.length>1?arguments[1]:void 0)}});var GR=Vc("Array").some,FR=se,NR=GR,UR=Array.prototype,XR=r((function(e){var t=e.some;return e===UR||FR(UR,e)&&t===UR.some?NR:t})),HR=jr,BR=Kn,KR=Y,YR=RangeError,JR=m,zR=Vr,QR=Kn,qR=Y,$R=JR((function(e){var t=BR(KR(this)),r="",n=HR(e);if(n<0||n==1/0)throw YR("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(t+=t))1&n&&(r+=t);return r})),eT=JR("".slice),tT=Math.ceil,rT=function(e){return function(t,r,n){var i,o,a=QR(qR(t)),s=zR(r),u=a.length,l=void 0===n?" ":QR(n);return s<=u||""==l?a:((o=$R(l,tT((i=s-u)/l.length))).length>i&&(o=eT(o,0,i)),e?a+o:o+a)}},nT={start:rT(!1),end:rT(!0)},iT=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(ue),oT=nT.start;Lr({target:"String",proto:!0,forced:iT},{padStart:function(e){return oT(this,e,arguments.length>1?arguments[1]:void 0)}});var aT=Vc("String").padStart,sT=se,uT=aT,lT=String.prototype,cT=r((function(e){var t=e.padStart;return"string"==typeof e||e===lT||sT(lT,e)&&t===lT.padStart?uT:t})),fT=r(te.setInterval),dT=ea.every;Lr({target:"Array",proto:!0,forced:!$c("every")},{every:function(e){return dT(this,e,arguments.length>1?arguments[1]:void 0)}});var pT=Vc("Array").every,hT=se,vT=pT,mT=Array.prototype,yT=r((function(e){var t=e.every;return e===mT||hT(mT,e)&&t===mT.every?vT:t})),gT=i,_T=o,bT=Kn,wT=zk.trim,ST=Nk,kT=m("".charAt),RT=gT.parseFloat,TT=gT.Symbol,xT=TT&&TT.iterator,ET=1/RT(ST+"-0")!=-1/0||xT&&!_T((function(){RT(Object(xT))}))?function(e){var t=wT(bT(e)),r=RT(t);return 0===r&&"-"==kT(t,0)?-0:r}:RT;Lr({global:!0,forced:parseFloat!=ET},{parseFloat:ET});var LT=r(te.parseFloat),OT=mu.PROPER,PT=o,IT=Nk,CT=zk.trim;Lr({target:"String",proto:!0,forced:function(e){return PT((function(){return!!IT[e]()||"​…᠎"!=="​…᠎"[e]()||OT&&IT[e].name!==e}))}("trim")},{trim:function(){return CT(this)}});var ZT=Vc("String").trim,jT=se,AT=ZT,DT=String.prototype,VT=r((function(e){var t=e.trim;return"string"==typeof e||e===DT||jT(DT,e)&&t===DT.trim?AT:t})),WT=ue.match(/firefox\/(\d+)/i),MT=!!WT&&+WT[1],GT=/MSIE|Trident/.test(ue),FT=ue.match(/AppleWebKit\/(\d+)\./),NT=!!FT&&+FT[1],UT=Lr,XT=m,HT=Ie,BT=Je,KT=Mr,YT=Sk,JT=Kn,zT=o,QT=q_,qT=$c,$T=MT,ex=GT,tx=ve,rx=NT,nx=[],ix=XT(nx.sort),ox=XT(nx.push),ax=zT((function(){nx.sort(void 0)})),sx=zT((function(){nx.sort(null)})),ux=qT("sort"),lx=!zT((function(){if(tx)return tx<70;if(!($T&&$T>3)){if(ex)return!0;if(rx)return rx<603;var e,t,r,n,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)nx.push({k:t+n,v:r})}for(nx.sort((function(e,t){return t.v-e.v})),n=0;n<nx.length;n++)t=nx[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));UT({target:"Array",proto:!0,forced:ax||!sx||!ux||!lx},{sort:function(e){void 0!==e&&HT(e);var t=BT(this);if(lx)return void 0===e?ix(t):ix(t,e);var r,n,i=[],o=KT(t);for(n=0;n<o;n++)n in t&&ox(i,t[n]);for(QT(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:JT(t)>JT(r)?1:-1}}(e)),r=KT(i),n=0;n<r;)t[n]=i[n++];for(;n<o;)YT(t,n++);return t}});var cx=Vc("Array").sort,fx=se,dx=cx,px=Array.prototype,hx=r((function(e){var t=e.sort;return e===px||fx(px,e)&&t===px.sort?dx:t})),vx=Lr,mx=Date,yx=m(mx.prototype.getTime);vx({target:"Date",stat:!0},{now:function(){return yx(new mx)}});var gx,_x=r(te.Date.now),bx="undefined"!=typeof window&&window.location&&rg(gx=window.location.href).call(gx,"xgplayerdebugger=1")>-1,wx="color: #525252; background-color: #90ee90;",Sx="color: #525252; background-color: red;",kx="color: #525252; background-color: yellow; ",Rx="%c[xgplayer]",Tx={config:{debug:bx?3:0},logInfo:function(e){for(var t,r,n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];this.config.debug>=3&&(r=console).log.apply(r,Bg(t=[Rx,wx,e]).call(t,i))},logWarn:function(e){for(var t,r,n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];this.config.debug>=1&&(r=console).warn.apply(r,Bg(t=[Rx,kx,e]).call(t,i))},logError:function(e){var t,r;if(!(this.config.debug<1)){for(var n=this.config.debug>=2?"trace":"error",i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];(r=console)[n].apply(r,Bg(t=[Rx,Sx,e]).call(t,o))}}},xx=function(){function e(t){PR(this,e),this.bufferedList=t}return CR(e,[{key:"start",value:function(e){return this.bufferedList[e].start}},{key:"end",value:function(e){return this.bufferedList[e].end}},{key:"length",get:function(){return this.bufferedList.length}}]),e}(),Ex={};Ex.createDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=document.createElement(t);return o.className=i,o.innerHTML=r,cf(e=Zc(n)).call(e,(function(e){var r=e,i=n[e];"video"===t||"audio"===t||"live-video"===t?i&&o.setAttribute(r,i):o.setAttribute(r,i)})),o},Ex.createDomFromHtml=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";try{var n=document.createElement("div");n.innerHTML=e;var i=n.children;if(n=null,i.length>0){var o;if(i=i[0],r&&Ex.addClass(i,r),t)cf(o=Zc(t)).call(o,(function(e){i.setAttribute(e,t[e])}));return i}return null}catch(a){return Tx.logError("util.createDomFromHtml",a),null}},Ex.hasClass=function(e,t){if(!e||!t)return!1;try{return XR(Array.prototype).call(e.classList,(function(e){return e===t}))}catch(n){var r=e.className&&"object"===OR(e.className)?e.getAttribute("class"):e.className;return r&&!!r.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}},Ex.addClass=function(e,t){if(e&&t)try{var r;cf(r=t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(r,(function(t){t&&e.classList.add(t)}))}catch(n){Ex.hasClass(e,t)||(e.className&&"object"===OR(e.className)?e.setAttribute("class",e.getAttribute("class")+" "+t):e.className+=" "+t)}},Ex.removeClass=function(e,t){if(e&&t)try{var r;cf(r=t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(r,(function(t){t&&e.classList.remove(t)}))}catch(i){var n;if(Ex.hasClass(e,t))cf(n=t.split(/\s+/g)).call(n,(function(t){var r=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className&&"object"===OR(e.className)?e.setAttribute("class",e.getAttribute("class").replace(r," ")):e.className=e.className.replace(r," ")}))}},Ex.toggleClass=function(e,t){var r;e&&cf(r=t.split(/\s+/g)).call(r,(function(t){Ex.hasClass(e,t)?Ex.removeClass(e,t):Ex.addClass(e,t)}))},Ex.classNames=function(){for(var e=arguments,t=[],r=function(r){if("String"===Ex.typeOf(e[r]))t.push(e[r]);else if("Object"===Ex.typeOf(e[r])){var n;vR(n=Zc(e[r])).call(n,(function(n){e[r][n]&&t.push(n)}))}},n=0;n<arguments.length;n++)r(n);return t.join(" ")},Ex.findDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,r=arguments.length>1?arguments[1]:void 0;try{e=t.querySelector(r)}catch(n){Tx.logError("util.findDom",n),0===rg(r).call(r,"#")&&(e=t.getElementById(hy(r).call(r,1)))}return e},Ex.getCss=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,!1)[t]},Ex.padStart=function(e,t,r){for(var n=String(r),i=t>>0,o=Math.ceil(i/n.length),a=[],s=String(e);o--;)a.push(n);return a.join("").substring(0,i-s.length)+s},Ex.format=function(e){if(window.isNaN(e))return"";e=Math.round(e);var t=cT(Ex).call(Ex,Math.floor(e/3600),2,0),r=cT(Ex).call(Ex,Math.floor((e-3600*t)/60),2,0),n=cT(Ex).call(Ex,Math.floor(e-3600*t-60*r),2,0);return("00"===t?[r,n]:[t,r,n]).join(":")},Ex.event=function(e){if(e.touches){var t=e.touches[0]||e.changedTouches[0];e.clientX=t.clientX||0,e.clientY=t.clientY||0,e.offsetX=t.pageX-t.target.offsetLeft,e.offsetY=t.pageY-t.target.offsetTop}e._target=e.target||e.srcElement},Ex.typeOf=function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},Ex.deepCopy=function(e,t){var r;if("Object"===Ex.typeOf(t)&&"Object"===Ex.typeOf(e))return cf(r=Zc(t)).call(r,(function(r){if("Object"!==Ex.typeOf(t[r])||t[r]instanceof Node)if("Array"===Ex.typeOf(t[r])){var n;e[r]="Array"===Ex.typeOf(e[r])?Bg(n=e[r]).call(n,t[r]):t[r]}else e[r]=t[r];else void 0===e[r]||void 0===e[r]?e[r]=t[r]:Ex.deepCopy(e[r],t[r])})),e},Ex.deepMerge=function(e,t){var r;return vR(r=Zc(t)).call(r,(function(r){var n;"Array"===Ex.typeOf(t[r])&&"Array"===Ex.typeOf(e[r])?"Array"===Ex.typeOf(e[r])&&(n=e[r]).push.apply(n,jR(t[r])):Ex.typeOf(e[r])!==Ex.typeOf(t[r])||null===e[r]||"Object"!==Ex.typeOf(e[r])||t[r]instanceof window.Node?null!==t[r]&&(e[r]=t[r]):Ex.deepMerge(e[r],t[r])})),e},Ex.getBgImage=function(e){var t=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;if(!t||"none"===t)return"";var r=document.createElement("a");return r.href=t.replace(/url\("|"\)/g,""),r.href},Ex.copyDom=function(e){if(e&&1===e.nodeType){var t=document.createElement(e.tagName);return cf(Array.prototype).call(e.attributes,(function(e){t.setAttribute(e.name,e.value)})),e.innerHTML&&(t.innerHTML=e.innerHTML),t}return""},Ex.setInterval=function(e,t,r,n){e._interval[t]||(e._interval[t]=fT(Iy(r).call(r,e),n))},Ex.clearInterval=function(e,t){clearInterval(e._interval[t]),e._interval[t]=null},Ex.setTimeout=function(e,t,r){e._timers||(e._timers=[]);var n=c_((function(){t(),Ex.clearTimeout(e,n)}),r);return e._timers.push(n),n},Ex.clearTimeout=function(e,t){var r=e._timers;if("Array"===Ex.typeOf(r)){for(var n=0;n<r.length;n++)if(r[n]===t){Gk(r).call(r,n,1),clearTimeout(t);break}}else clearTimeout(t)},Ex.clearAllTimers=function(e){var t=e._timers;"Array"===Ex.typeOf(t)&&(vR(t).call(t,(function(e){clearTimeout(e)})),e._timerIds=[])},Ex.createImgBtn=function(e,t,r,n){var i,o,a,s,u,l,c,f,d,p,h,v,m=Ex.createDom("xg-".concat(e),"",{},"xgplayer-".concat(e,"-img"));(m.style.backgroundImage='url("'.concat(t,'")'),r&&n)&&(yT(i=["px","rem","em","pt","dp","vw","vh","vm","%"]).call(i,(function(e){var t,i;return!(rg(r).call(r,e)>-1&&rg(n).call(n,e)>-1)||(c=LT(VT(t=hy(r).call(r,0,rg(r).call(r,e))).call(t)),f=LT(VT(i=hy(n).call(n,0,rg(n).call(n,e))).call(i)),d=e,!1)})),m.style.width=Bg(o="".concat(c)).call(o,d),m.style.height=Bg(a="".concat(f)).call(a,d),m.style.backgroundSize=Bg(s=Bg(u=Bg(l="".concat(c)).call(l,d," ")).call(u,f)).call(s,d),m.style.margin="start"===e?Bg(p=Bg(h=Bg(v="-".concat(f/2)).call(v,d," auto auto -")).call(h,c/2)).call(p,d):"auto 5px auto 5px");return m},Ex.Hex2RGBA=function(e,t){var r,n=[];if(/^\#[0-9A-F]{3}$/i.test(e)){var i="#";e.replace(/[0-9A-F]/gi,(function(e){i+=e+e})),e=i}return/^#[0-9A-F]{6}$/i.test(e)?(e.replace(/[0-9A-F]{2}/gi,(function(e){n.push(lR(e,16))})),Bg(r="rgba(".concat(n.join(","),", ")).call(r,t,")")):"rgba(255, 255, 255, 0.1)"},Ex.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},Ex.checkIsFunction=function(e){return e&&"function"==typeof e},Ex.checkIsObject=function(e){return null!==e&&"object"===OR(e)},Ex.hide=function(e){e.style.display="none"},Ex.show=function(e,t){e.style.display=t||"block"},Ex.isUndefined=function(e){if(null==e)return!0},Ex.isNotNull=function(e){return!(null==e)},Ex.setStyleFromCsstext=function(e,t){if(t)if("String"===Ex.typeOf(t)){var r=t.replace(/\s+/g,"").split(";");vR(r).call(r,(function(t){if(t){var r=t.split(":");r.length>1&&(e.style[r[0]]=r[1])}}))}else{var n;vR(n=Zc(t)).call(n,(function(r){e.style[r]=t[r]}))}},Ex.filterStyleFromText=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["width","height","top","left","bottom","right","position","z-index","padding","margin","transform"],n=e.style.cssText;if(!n)return{};var i=n.replace(/\s+/g,"").split(";"),o={},a={};return vR(i).call(i,(function(e){if(e){var t=e.split(":");t.length>1&&(!function(e,t){for(var r=0,n=t.length;r<n;r++)if(rg(e).call(e,t[r])>-1)return!0;return!1}(t[0],r)?a[t[0]]=t[1]:o[t[0]]=t[1])}})),e.setAttribute("style",""),vR(t=Zc(a)).call(t,(function(t){e.style[t]=a[t]})),o},Ex.getStyleFromCsstext=function(e){var t=e.style.cssText;if(!t)return{};var r=t.replace(/\s+/g,"").split(";"),n={};return vR(r).call(r,(function(e){if(e){var t=e.split(":");t.length>1&&(n[t[0]]=t[1])}})),n},Ex.preloadImg=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(e){var n=new window.Image;n.onload=function(e){n=null,t&&t(e)},n.onerror=function(e){n=null,r&&r(e)},n.src=e}},Ex.stopPropagation=function(e){e&&e.stopPropagation()},Ex.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},Ex.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},Ex.checkTouchSupport=function(){return"ontouchstart"in window},Ex.getBuffered2=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,r=[],n=0;n<e.length;n++)r.push({start:e.start(n)<.5?0:e.start(n),end:e.end(n)});hx(r).call(r,(function(e,t){var r=e.start-t.start;return r||t.end-e.end}));var i=[];if(t)for(var o=0;o<r.length;o++){var a=i.length;if(a){var s=i[a-1].end;r[o].start-s<t?r[o].end>s&&(i[a-1].end=r[o].end):i.push(r[o])}else i.push(r[o])}else i=r;return new xx(i)},Ex.getEventPos=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.touches&&e.touches.length>0&&(e=e.touches[0]),{x:e.x/t,y:e.y/t,clientX:e.clientX/t,clientY:e.clientY/t,offsetX:e.offsetX/t,offsetY:e.offsetY/t,pageX:e.pageX/t,pageY:e.pageY/t}},Ex.requestAnimationFrame=function(e){var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(t)return t(e)},Ex.getHostFromUrl=function(e){if("String"!==Ex.typeOf(e))return"";var t=e.split("/"),r="";return t.length>3&&t[2]&&(r=t[2]),r},Ex.cancelAnimationFrame=function(e){var t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;t&&t(e)},Ex.isMSE=function(e){return e.media&&(e=e.media),!!(e&&e instanceof HTMLMediaElement)&&(/^blob/.test(e.currentSrc)||/^blob/.test(e.src))},Ex.isBlob=function(e){return"string"==typeof e&&/^blob/.test(e)},Ex.generateSessionId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(new Date).getTime();try{e=lR(e)}catch(r){e=0}return t+=e,window.performance&&"function"==typeof window.performance.now&&(t+=lR(window.performance.now())),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:3&r|8).toString(16)}))},Ex.createEvent=function(e){var t;return"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},Ex.adjustTimeByDuration=function(e,t,r){return t&&e&&(e>t||r&&e<t)?t:e},Ex.createPositionBar=function(e,t){var r=Ex.createDom("xg-bar","",{"data-index":-1},e);return t.appendChild(r),r},Ex.getTransformStyle=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0,scale:1,rotate:0},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n={scale:"".concat(t.scale||1),translate:Bg(e="".concat(t.x||0,"%, ")).call(e,t.y||0,"%"),rotate:"".concat(t.rotate||0,"deg")},i=Zc(n);return cf(i).call(i,(function(e){var t,i=new RegExp("".concat(e,"\\([^\\(]+\\)"),"g"),o=Bg(t="".concat(e,"(")).call(t,n[e],")");i.test(r)?(i.lastIndex=-1,r=r.replace(i,o)):r+="".concat(o," ")})),r},Ex.convertDeg=function(e){return Math.abs(e)<=1?360*e:e%360},Ex.getIndexByTime=function(e,t){var r=t.length,n=-1;if(r<1)return n;if(e<=t[0].end||r<2)n=0;else if(e>t[r-1].end)n=r-1;else for(var i=1;i<r;i++)if(e>t[i-1].end&&e<=t[i].end){n=i;break}return n},Ex.getOffsetCurrentTime=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,n=-1;if((n=r>=0&&r<t.length?r:Ex.getIndexByTime(e,t))<0)return-1;var i=t.length,o=t[n],a=o.start,s=o.end,u=o.cTime,l=o.offset;return e<a?u:e>=a&&e<=s?e-l:e>s&&n>=i-1?s:-1},Ex.getCurrentTimeByOffset=function(e,t){var r=-1;if(!t||t.length<0)return e;for(var n=0;n<t.length;n++)if(e<=t[n].duration){r=n;break}if(-1!==r){var i=t[r].start;return r-1<0?i+e:i+(e-t[r-1].duration)}return e};var Lx="3.0.21-rc.21",Ox={1:5101,2:5102,3:5103,4:5104,5:5105,6:5106},Px=CR((function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{errorType:"",errorCode:0,errorMessage:"",originError:"",ext:{},mediaError:null};PR(this,e);var n=t&&t.i18n?t.i18n.ERROR_TYPES:null;if(t.media){var i,o=r.mediaError?r.mediaError:t.media.error||{},a=t.duration,s=t.currentTime,u=t.ended,l=t.src,c=t.currentSrc,f=t.media,d=f.readyState,p=f.networkState,h=r.errorCode||o.code;Ox[h]&&(h=Ox[h]);var v={playerVersion:Lx,currentTime:s,duration:a,ended:u,readyState:d,networkState:p,src:l||c,errorType:r.errorType,errorCode:h,message:r.errorMessage||o.message,mediaError:o,originError:r.originError?r.originError.stack:"",host:Ex.getHostFromUrl(l||c)};return r.ext&&vR(i=Zc(r.ext)).call(i,(function(e){v[e]=r.ext[e]})),v}if(arguments.length>1){for(var m={playerVersion:Lx,domain:document.domain},y=["errorType","currentTime","duration","networkState","readyState","src","currentSrc","ended","errd","errorCode","mediaError"],g=0;g<arguments.length;g++)m[y[g]]=arguments[g];return m.ex=n?(n[arguments[0]]||{}).msg:"",m}}));function Ix(e,t,r){for(var n,i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];var s,u=t.call.apply(t,Bg(n=[e]).call(n,o));r&&"function"==typeof r&&(u&&u.then?u.then((function(){for(var t,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];r.call.apply(r,Bg(t=[e]).call(t,i))})):r.call.apply(r,Bg(s=[e]).call(s,o)))}function Cx(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{pre:null,next:null};return this.__hooks||(this.__hooks={}),!this.__hooks[e]&&(this.__hooks[e]=null),Iy(r=function(){var r,i=arguments,o=this;if(n.pre)try{var a,s;(s=n.pre).call.apply(s,Bg(a=[this]).call(a,hy(Array.prototype).call(arguments)))}catch(v){var u,l;throw v.message=Bg(u=Bg(l="[pluginName: ".concat(this.pluginName,":")).call(l,e,":pre error] >> ")).call(u,v.message),v}if(this.__hooks&&this.__hooks[e])try{var c,f=function(e,t,r){for(var n=arguments.length,i=new Array(n>3?n-3:0),o=3;o<n;o++)i[o-3]=arguments[o];if(e.__hooks&&ng(e.__hooks[t])){var a,s=e.__hooks[t],u=-1,l=function e(t,r,n){for(var i,o,a=arguments.length,l=new Array(a>3?a-3:0),c=3;c<a;c++)l[c-3]=arguments[c];if(u++,0===s.length||u===s.length)return n.call.apply(n,Bg(o=[t,t]).call(o,l));var f,d=s[u],p=d.call.apply(d,Bg(i=[t,t]).call(i,l));return p&&p.then?p.then((function(i){var o;return!1===i?null:e.apply(void 0,Bg(o=[t,r,n]).call(o,l))})).catch((function(e){console.warn("[runHooks]".concat(r," reject"),e.message)})):!1!==p?e.apply(void 0,Bg(f=[t,r,n]).call(f,l)):void 0};return l.apply(void 0,Bg(a=[e,t,r]).call(a,i))}var c;return r.call.apply(r,Bg(c=[e,e]).call(c,i))}(this,e,t);if(f)if(f.then)f.then((function(e){var r;!1!==e&&Ix.apply(void 0,Bg(r=[o,t,n.next]).call(r,jR(i)))})).catch((function(e){throw e}));else Ix.apply(void 0,Bg(c=[this,t,n.next]).call(c,hy(Array.prototype).call(arguments)));else if(void 0===f){var d;Ix.apply(void 0,Bg(d=[this,t,n.next]).call(d,hy(Array.prototype).call(arguments)))}}catch(v){var p,h;throw v.message=Bg(p=Bg(h="[pluginName: ".concat(this.pluginName,":")).call(h,e,"] >> ")).call(p,v.message),v}else Ix.apply(void 0,Bg(r=[this,t,n.next]).call(r,hy(Array.prototype).call(arguments)))}).call(r,this)}function Zx(e,t){var r=this.__hooks;if(!r||!ng(r[e]))return-1;for(var n=r[e],i=0;i<n.length;i++)if(n[i]===t)return i;return-1}function jx(e,t){var r=this.__hooks;if(r)return r.hasOwnProperty(e)?(ng(r[e])||(r[e]=[]),-1===Zx.call(this,e,t)&&r[e].push(t),!0):(console.warn("has no supported hook which name [".concat(e,"]")),!1)}function Ax(e,t){var r=this.__hooks;if(r)if(ng(r[e])){var n=r[e],i=Zx.call(this,e,t);-1!==i&&Gk(n).call(n,i,1)}else r[e]&&(r[e]=null)}function Dx(e,t){var r;Tx.logError(Bg(r="[".concat(e,"] event or callback cant be undefined or null when call ")).call(r,t))}var Vx=function(){function e(t){PR(this,e),Ex.checkIsFunction(this.beforeCreate)&&this.beforeCreate(t),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.__hooks={},t&&vR(t).call(t,(function(t){e.__hooks[t]=null})),Af(e,"hooks",{get:function(){var t;return e.__hooks&&vR(t=Zc(e.__hooks)).call(t,(function(t){if(e.__hooks[t])return t}))}})}(this),this.__args=t,this.__events={},this.__onceEvents={},this.config=t.config||{},this.player=null,this.playerConfig={},this.pluginName="",this.__init(t)}return CR(e,[{key:"beforeCreate",value:function(e){}},{key:"afterCreate",value:function(){}},{key:"beforePlayerInit",value:function(){}},{key:"onPluginsReady",value:function(){}},{key:"afterPlayerInit",value:function(){}},{key:"destroy",value:function(){}},{key:"__init",value:function(e){this.player=e.player,this.playerConfig=e.player&&e.player.config,this.pluginName=e.pluginName?e.pluginName.toLowerCase():this.constructor.pluginName.toLowerCase(),this.logger=e.player&&e.player.logger}},{key:"updateLang",value:function(e){e||(e=this.lang)}},{key:"lang",get:function(){return this.player.lang}},{key:"i18n",get:function(){return this.player.i18n}},{key:"i18nKeys",get:function(){return this.player.i18nKeys}},{key:"domEventType",get:function(){var e=Ex.checkTouchSupport()?"touch":"mouse";return!this.playerConfig||"touch"!==this.playerConfig.domEventType&&"mouse"!==this.playerConfig.domEventType||(e=this.playerConfig.domEventType),e}},{key:"on",value:function(e,t){var r=this;e&&t&&this.player?"string"==typeof e?(this.__events[e]=t,this.player.on(e,t)):ng(e)&&cf(e).call(e,(function(e){r.__events[e]=t,r.player.on(e,t)})):Dx(this.pluginName,"plugin.on(event, callback)")}},{key:"once",value:function(e,t){var r=this;e&&t&&this.player?"string"==typeof e?(this.__onceEvents[e]=t,this.player.once(e,t)):ng(e)&&cf(e).call(e,(function(n){r.__onceEvents[n]=t,r.player.once(e,t)})):Dx(this.pluginName,"plugin.once(event, callback)")}},{key:"off",value:function(e,t){var r=this;e&&t&&this.player?"string"==typeof e?(delete this.__events[e],this.player.off(e,t)):ng(e)&&cf(e).call(e,(function(n){delete r.__events[e],r.player.off(n,t)})):Dx(this.pluginName,"plugin.off(event, callback)")}},{key:"offAll",value:function(){var e,t=this;cf(e=["__events","__onceEvents"]).call(e,(function(e){var r;cf(r=Zc(t[e])).call(r,(function(r){t[e][r]&&t.off(r,t[e][r]),r&&delete t[e][r]}))})),this.__events={},this.__onceEvents={}}},{key:"emit",value:function(e){var t,r;if(this.player){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];(r=this.player).emit.apply(r,Bg(t=[e]).call(t,i))}}},{key:"emitUserAction",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.player){var n=LR(LR({},r),{},{pluginName:this.pluginName});this.player.emitUserAction(e,t,n)}}},{key:"hook",value:function(e,t){var r;return Cx.call.apply(Cx,Bg(r=[this]).call(r,hy(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){for(var r,n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];return jx.call.apply(jx,Bg(r=[this]).call(r,hy(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){for(var r,n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];return Ax.call.apply(Ax,Bg(r=[this]).call(r,hy(Array.prototype).call(arguments)))}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(this.player)return r&&(t.pluginName=r),this.player.registerPlugin({plugin:e,options:t})}},{key:"getPlugin",value:function(e){return this.player?this.player.getPlugin(e):null}},{key:"__destroy",value:function(){var e,t=this,r=this.player,n=this.pluginName;this.offAll(),Ex.clearAllTimers(this),Ex.checkIsFunction(this.destroy)&&this.destroy(),vR(e=["player","playerConfig","pluginName","logger","__args","__hooks"]).call(e,(function(e){t[e]=null})),r.unRegisterPlugin(n),this.__hooks=null}}],[{key:"defineGetterOrSetter",value:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&Af(e,r,t[r])}},{key:"defineMethod",value:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&"function"==typeof t[r]&&Af(e,r,{configurable:!0,value:t[r]})}},{key:"defaultConfig",get:function(){return{}}},{key:"pluginName",get:function(){return"pluginName"}}]),e}(),Wx=te,Mx=f;Wx.JSON||(Wx.JSON={stringify:JSON.stringify});var Gx=function(e,t,r){return Mx(Wx.JSON.stringify,null,arguments)},Fx=r(Gx),Nx=ee,Ux=b,Xx=dt("match"),Hx=function(e){var t;return Nx(e)&&(void 0!==(t=e[Xx])?!!t:"RegExp"==Ux(e))},Bx=TypeError,Kx=dt("match"),Yx=ni.includes;Lr({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(e){return Yx(this,e,arguments.length>1?arguments[1]:void 0)}});var Jx=Vc("Array").includes,zx=Lr,Qx=function(e){if(Hx(e))throw Bx("The method doesn't accept regular expressions");return e},qx=Y,$x=Kn,eE=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[Kx]=!1,"/./"[e](t)}catch(n){}}return!1},tE=m("".indexOf);zx({target:"String",proto:!0,forced:!eE("includes")},{includes:function(e){return!!~tE($x(qx(this)),$x(Qx(e)),arguments.length>1?arguments[1]:void 0)}});var rE=Vc("String").includes,nE=se,iE=Jx,oE=rE,aE=Array.prototype,sE=String.prototype,uE=r((function(e){var t=e.includes;return e===aE||nE(aE,e)&&t===aE.includes?iE:"string"==typeof e||e===sE||nE(sE,e)&&t===sE.includes?oE:t})),lE={exports:{}},cE=o((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),fE=o,dE=ee,pE=b,hE=cE,vE=Object.isExtensible,mE=fE((function(){vE(1)}))||hE?function(e){return!!dE(e)&&((!hE||"ArrayBuffer"!=pE(e))&&(!vE||vE(e)))}:vE,yE=!o((function(){return Object.isExtensible(Object.preventExtensions({}))})),gE=Lr,_E=m,bE=ii,wE=ee,SE=qe,kE=Qt.f,RE=Gi,TE=Ui,xE=mE,EE=yE,LE=!1,OE=nt("meta"),PE=0,IE=function(e){kE(e,OE,{value:{objectID:"O"+PE++,weakData:{}}})},CE=lE.exports={enable:function(){CE.enable=function(){},LE=!0;var e=RE.f,t=_E([].splice),r={};r[OE]=1,e(r).length&&(RE.f=function(r){for(var n=e(r),i=0,o=n.length;i<o;i++)if(n[i]===OE){t(n,i,1);break}return n},gE({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:TE.f}))},fastKey:function(e,t){if(!wE(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!SE(e,OE)){if(!xE(e))return"F";if(!t)return"E";IE(e)}return e[OE].objectID},getWeakData:function(e,t){if(!SE(e,OE)){if(!xE(e))return!0;if(!t)return!1;IE(e)}return e[OE].weakData},onFreeze:function(e){return EE&&LE&&xE(e)&&!SE(e,OE)&&IE(e),e}};bE[OE]=!0;var ZE=lE.exports,jE=Lr,AE=i,DE=ZE,VE=o,WE=mr,ME=jd,GE=fp,FE=E,NE=ee,UE=Po,XE=Qt.f,HE=ea.forEach,BE=O,KE=Bo.set,YE=Bo.getterFor,JE=Mi,zE=oo,QE=B_,qE=zt,$E=fp,eL=H,tL=jd,rL=hl,nL=vl,iL=up,oL=O,aL=ZE.fastKey,sL=Bo.set,uL=Bo.getterFor,lL={getConstructor:function(e,t,r,n){var i=e((function(e,i){$E(e,o),sL(e,{type:t,index:JE(null),first:void 0,last:void 0,size:0}),oL||(e.size=0),eL(i)||tL(i,e[n],{that:e,AS_ENTRIES:r})})),o=i.prototype,a=uL(t),s=function(e,t,r){var n,i,o=a(e),s=u(e,t);return s?s.value=r:(o.last=s={index:i=aL(t,!0),key:t,value:r,previous:n=o.last,next:void 0,removed:!1},o.first||(o.first=s),n&&(n.next=s),oL?o.size++:e.size++,"F"!==i&&(o.index[i]=s)),e},u=function(e,t){var r,n=a(e),i=aL(t);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key==t)return r};return QE(o,{clear:function(){for(var e=a(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,oL?e.size=0:this.size=0},delete:function(e){var t=this,r=a(t),n=u(t,e);if(n){var i=n.next,o=n.previous;delete r.index[n.index],n.removed=!0,o&&(o.next=i),i&&(i.previous=o),r.first==n&&(r.first=i),r.last==n&&(r.last=o),oL?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=a(this),n=qE(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!u(this,e)}}),QE(o,r?{get:function(e){var t=u(this,e);return t&&t.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),oL&&zE(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(e,t,r){var n=t+" Iterator",i=uL(t),o=uL(n);rL(e,t,(function(e,t){sL(this,{type:n,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?nL("keys"==t?r.key:"values"==t?r.value:[r.key,r.value],!1):(e.target=void 0,nL(void 0,!0))}),r?"entries":"values",!r,!0),iL(t)}};(function(e,t,r){var n,i=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),a=i?"set":"add",s=AE[e],u=s&&s.prototype,l={};if(BE&&FE(s)&&(o||u.forEach&&!VE((function(){(new s).entries().next()})))){var c=(n=t((function(t,r){KE(GE(t,c),{type:e,collection:new s}),null!=r&&ME(r,t[a],{that:t,AS_ENTRIES:i})}))).prototype,f=YE(e);HE(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in u)||o&&"clear"==e||WE(c,e,(function(r,n){var i=f(this).collection;if(!t&&o&&!NE(r))return"get"==e&&void 0;var a=i[e](0===r?0:r,n);return t?this:a}))})),o||XE(c,"size",{configurable:!0,get:function(){return f(this).collection.size}})}else n=r.getConstructor(t,e,i,a),DE.enable();UE(n,e,!1,!0),l[e]=n,jE({global:!0,forced:!0},l),o||r.setStrong(n,e,i)})("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),lL);var cL=te.Map,fL=zt,dL=C,pL=Ie,hL=vp,vL=H,mL=jd,yL=[].push,gL=function(e){var t,r,n,i,o=arguments.length,a=o>1?arguments[1]:void 0;return hL(this),(t=void 0!==a)&&pL(a),vL(e)?new this:(r=[],t?(n=0,i=fL(a,o>2?arguments[2]:void 0),mL(e,(function(e){dL(yL,r,i(e,n++))}))):mL(e,yL,{that:r}),new this(r))};Lr({target:"Map",stat:!0,forced:!0},{from:gL});var _L=Rs,bL=function(){return new this(_L(arguments))};Lr({target:"Map",stat:!0,forced:!0},{of:bL});var wL=Ee,SL=function(e){if("object"==typeof e&&"size"in e&&"has"in e&&"get"in e&&"set"in e&&"delete"in e&&"entries"in e)return e;throw TypeError(wL(e)+" is not a map")},kL=function(e,t){return 1==t?function(t,r){return t[e](r)}:function(t,r,n){return t[e](r,n)}},RL=ae("Map"),TL={Map:RL,set:kL("set",2),get:kL("get",1),has:kL("has",1),remove:kL("delete",1),proto:RL.prototype},xL=SL,EL=TL.remove;Lr({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=xL(this),r=!0,n=0,i=arguments.length;n<i;n++)e=EL(t,arguments[n]),r=r&&e;return!!r}});var LL=SL,OL=TL.get,PL=TL.has,IL=TL.set;Lr({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var r,n,i=LL(this);return PL(i,e)?(r=OL(i,e),"update"in t&&(r=t.update(r,e,i),IL(i,e,r)),r):(n=t.insert(e,i),IL(i,e,n),n)}});var CL=C,ZL=function(e,t,r){for(var n,i,o=r||e.next;!(n=CL(o,e)).done;)if(void 0!==(i=t(n.value)))return i},jL=function(e,t,r){return r?ZL(e.entries(),(function(e){return t(e[1],e[0])})):e.forEach(t)},AL=zt,DL=SL,VL=jL;Lr({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=DL(this),r=AL(e,arguments.length>1?arguments[1]:void 0);return!1!==VL(t,(function(e,n){if(!r(e,n,t))return!1}),!0)}});var WL=zt,ML=SL,GL=jL,FL=TL.Map,NL=TL.set;Lr({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=ML(this),r=WL(e,arguments.length>1?arguments[1]:void 0),n=new FL;return GL(t,(function(e,i){r(e,i,t)&&NL(n,i,e)})),n}});var UL=zt,XL=SL,HL=jL;Lr({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=XL(this),r=UL(e,arguments.length>1?arguments[1]:void 0),n=HL(t,(function(e,n){if(r(e,n,t))return{value:e}}),!0);return n&&n.value}});var BL=zt,KL=SL,YL=jL;Lr({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=KL(this),r=BL(e,arguments.length>1?arguments[1]:void 0),n=YL(t,(function(e,n){if(r(e,n,t))return{key:n}}),!0);return n&&n.key}});var JL=Lr,zL=C,QL=E,qL=Ie,$L=jd,eO=TL.Map,tO=m([].push);JL({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){var r=new(QL(this)?this:eO);qL(t);var n=qL(r.has),i=qL(r.get),o=qL(r.set);return $L(e,(function(e){var a=t(e);zL(n,r,a)?tO(zL(i,r,a),e):zL(o,r,a,[e])})),r}});var rO=function(e,t){return e===t||e!=e&&t!=t},nO=SL,iO=jL;Lr({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===iO(nO(this),(function(t){if(rO(t,e))return!0}),!0)}});var oO=C,aO=jd,sO=E,uO=Ie,lO=TL.Map;Lr({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var r=new(sO(this)?this:lO);uO(t);var n=uO(r.set);return aO(e,(function(e){oO(n,r,t(e),e)})),r}});var cO=SL,fO=jL;Lr({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=fO(cO(this),(function(t,r){if(t===e)return{key:r}}),!0);return t&&t.key}});var dO=zt,pO=SL,hO=jL,vO=TL.Map,mO=TL.set;Lr({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=pO(this),r=dO(e,arguments.length>1?arguments[1]:void 0),n=new vO;return hO(t,(function(e,i){mO(n,r(e,i,t),e)})),n}});var yO=zt,gO=SL,_O=jL,bO=TL.Map,wO=TL.set;Lr({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=gO(this),r=yO(e,arguments.length>1?arguments[1]:void 0),n=new bO;return _O(t,(function(e,i){wO(n,i,r(e,i,t))})),n}});var SO=SL,kO=jd,RO=TL.set;Lr({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=SO(this),r=arguments.length,n=0;n<r;)kO(arguments[n++],(function(e,r){RO(t,e,r)}),{AS_ENTRIES:!0});return t}});var TO=Ie,xO=SL,EO=jL,LO=TypeError;Lr({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=xO(this),r=arguments.length<2,n=r?void 0:arguments[1];if(TO(e),EO(t,(function(i,o){r?(r=!1,n=i):n=e(n,i,o,t)})),r)throw LO("Reduce of empty map with no initial value");return n}});var OO=zt,PO=SL,IO=jL;Lr({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=PO(this),r=OO(e,arguments.length>1?arguments[1]:void 0);return!0===IO(t,(function(e,n){if(r(e,n,t))return!0}),!0)}});var CO=Ie,ZO=SL,jO=TypeError,AO=TL.get,DO=TL.has,VO=TL.set;Lr({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var r=ZO(this),n=arguments.length;CO(t);var i=DO(r,e);if(!i&&n<3)throw jO("Updating absent value");var o=i?AO(r,e):CO(n>2?arguments[2]:void 0)(e,r);return VO(r,e,t(o,e,r)),r}});var WO=C,MO=Ie,GO=E,FO=rr,NO=TypeError,UO=function(e,t){var r,n=FO(this),i=MO(n.get),o=MO(n.has),a=MO(n.set),s=arguments.length>2?arguments[2]:void 0;if(!GO(t)&&!GO(s))throw NO("At least one callback required");return WO(o,n,e)?(r=WO(i,n,e),GO(t)&&(r=t(r),WO(a,n,e,r))):GO(s)&&(r=s(),WO(a,n,e,r)),r};Lr({target:"Map",proto:!0,real:!0,forced:!0},{upsert:UO}),Lr({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:UO});var XO=r(cL);function HO(e,t){var r=Zc(e);if(jc){var n=jc(e);t&&(n=Nc(n).call(n,(function(t){return Qc(e,t).enumerable}))),r.push.apply(r,n)}return r}function BO(e){for(var t=1;t<arguments.length;t++){var r,n,i=null!=arguments[t]?arguments[t]:{};t%2?cf(r=HO(Object(i),!0)).call(r,(function(t){eP(e,t,i[t])})):wf?Lf(e,wf(i)):cf(n=HO(Object(i))).call(n,(function(t){Af(e,t,Qc(i,t))}))}return e}function KO(){KO=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Af||function(e,t,r){e[t]=r.value},i="function"==typeof kc?kc:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Af(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(E){u=function(e,t,r){return e[t]=r}}function l(e,t,r,i){var o=t&&t.prototype instanceof d?t:d,a=Vf(o.prototype),s=new R(i||[]);return n(a,"_invoke",{value:b(e,r,s)}),a}function c(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(E){return{type:"throw",arg:E}}}e.wrap=l;var f={};function d(){}function p(){}function h(){}var v={};u(v,o,(function(){return this}));var m=Ff&&Ff(Ff(T([])));m&&m!==t&&r.call(m,o)&&(v=m);var y=h.prototype=d.prototype=Vf(v);function g(e){var t;cf(t=["next","throw","return"]).call(t,(function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(n,o,a,s){var u=c(e[n],e,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==Sc(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return i("throw",e,a,s)}))}s(u.arg)}var o;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return o=o?o.then(n,n):n()}})}function b(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=w(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=c(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var i=c(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,f;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],cf(e).call(e,S,this),this.reset(!0)}function T(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:x}}function x(){return{value:void 0,done:!0}}return p.prototype=h,n(y,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:p,configurable:!0}),p.displayName=u(h,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Nf?Nf(e,h):(e.__proto__=h,u(e,s,"GeneratorFunction")),e.prototype=Vf(y),e},e.awrap=function(e){return{__await:e}},g(_.prototype),u(_.prototype,a,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,i,o){void 0===o&&(o=Gm);var a=new _(l(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(y),u(y,s,"Generator"),u(y,o,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return Jm(r).call(r),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=T,R.prototype={constructor:R,reset:function(e){var t;if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,cf(t=this.tryEntries).call(t,k),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+hy(n).call(n,1))&&(this[n]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),k(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;k(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:T(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function YO(e){return(YO="function"==typeof kc&&"symbol"==typeof gR?function(e){return typeof e}:function(e){return e&&"function"==typeof kc&&e.constructor===kc&&e!==kc.prototype?"symbol":typeof e})(e)}function JO(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(PC){return void r(PC)}s.done?t(u):Gm.resolve(u).then(n,i)}function zO(e){return function(){var t=this,r=arguments;return new Gm((function(n,i){var o=e.apply(t,r);function a(e){JO(o,n,i,a,s,"next",e)}function s(e){JO(o,n,i,a,s,"throw",e)}a(void 0)}))}}function QO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qO(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Af(e,pP(n.key),n)}}function $O(e,t,r){return t&&qO(e.prototype,t),r&&qO(e,r),Af(e,"prototype",{writable:!1}),e}function eP(e,t,r){return(t=pP(t))in e?Af(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tP(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Vf(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Af(e,"prototype",{writable:!1}),t&&nP(e,t)}function rP(e){var t;return(rP=Nf?Iy(t=Ff).call(t):function(e){return e.__proto__||Ff(e)})(e)}function nP(e,t){var r;return(nP=Nf?Iy(r=Nf).call(r):function(e,t){return e.__proto__=t,e})(e,t)}function iP(){if("undefined"==typeof Reflect||!By)return!1;if(By.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(By(Boolean,[],(function(){}))),!0}catch(e){return!1}}function oP(e,t,r){var n;iP()?oP=Iy(n=By).call(n):oP=function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Iy(Function).apply(e,n));return r&&nP(i,r.prototype),i};return oP.apply(null,arguments)}function aP(e){var t="function"==typeof XO?new XO:void 0;return aP=function(e){if(null===e||(r=e,-1===rg(n=Function.toString.call(r)).call(n,"[native code]")))return e;var r,n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return oP(e,arguments,rP(this).constructor)}return i.prototype=Vf(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),nP(i,e)},aP(e)}function sP(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Zc(e);for(n=0;n<o.length;n++)r=o[n],rg(t).call(t,r)>=0||(i[r]=e[r]);return i}(e,t);if(jc){var o=jc(e);for(n=0;n<o.length;n++)r=o[n],rg(t).call(t,r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function uP(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lP(e){var t=iP();return function(){var r,n=rP(e);if(t){var i=rP(this).constructor;r=By(n,arguments,i)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===Sc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return uP(e)}(this,r)}}function cP(){var e;"undefined"!=typeof Reflect&&xR?cP=Iy(e=xR).call(e):cP=function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=rP(e)););return e}(e,t);if(n){var i=Qc(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}};return cP.apply(this,arguments)}function fP(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function dP(e,t){var r=void 0!==kc&&Pc(e)||e["@@iterator"];if(!r){if(ng(e)||(r=function(e,t){var r;if(e){if("string"==typeof e)return fP(e,t);var n=hy(r=Object.prototype.toString.call(e)).call(r,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?_g(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fP(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function pP(e){var t=function(e,t){if("object"!==Sc(e)||null===e)return e;var r=e[bg];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Sc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Sc(t)?t:String(t)}var hP=Ie,vP=Je,mP=X,yP=Mr,gP=TypeError,_P=function(e){return function(t,r,n,i){hP(r);var o=vP(t),a=mP(o),s=yP(o),u=e?s-1:0,l=e?-1:1;if(n<2)for(;;){if(u in a){i=a[u],u+=l;break}if(u+=l,e?u<0:s<=u)throw gP("Reduce of empty array with no initial value")}for(;e?u>=0:s>u;u+=l)u in a&&(i=r(i,a[u],u,o));return i}},bP={left:_P(!1),right:_P(!0)}.left;Lr({target:"Array",proto:!0,forced:!np&&ve>79&&ve<83||!$c("reduce")},{reduce:function(e){var t=arguments.length;return bP(this,e,t,t>1?arguments[1]:void 0)}});var wP,SP=Vc("Array").reduce,kP=se,RP=SP,TP=Array.prototype,xP=r((function(e){var t=e.reduce;return e===TP||kP(TP,e)&&t===TP.reduce?RP:t})),EP="network",LP="network_timeout",OP="network_forbidden",PP="network_notfound",IP="network_range_not_satisfiable",CP="demux",ZP="remux",jP="media",AP="drm",DP="other",VP="runtime",WP={FLV:"FLV",HLS:"HLS",MP4:"MP4",FMP4:"FMP4",MSE_ADD_SB:"MSE_ADD_SB",MSE_APPEND_BUFFER:"MSE_APPEND_BUFFER",MSE_OTHER:"MSE_OTHER",MSE_FULL:"MSE_FULL",OPTION:"OPTION",DASH:"DASH",LICENSE:"LICENSE",CUSTOM_LICENSE:"CUSTOM_LICENSE",MSE_HIJACK:"MSE_HIJACK",EME_HIJACK:"EME_HIJACK",SIDX:"SIDX",NO_CANPLAY_ERROR:"NO_CANPLAY_ERROR",BUFFERBREAK_ERROR:"BUFFERBREAK_ERROR",WAITING_TIMEOUT_ERROR:"WAITING_TIMEOUT_ERROR",MEDIA_ERR_ABORTED:"MEDIA_ERR_ABORTED",MEDIA_ERR_NETWORK:"MEDIA_ERR_NETWORK",MEDIA_ERR_DECODE:"MEDIA_ERR_DECODE",MEDIA_ERR_SRC_NOT_SUPPORTED:"MEDIA_ERR_SRC_NOT_SUPPORTED",MEDIA_ERR_CODEC_NOT_SUPPORTED:"MEDIA_ERR_CODEC_NOT_SUPPORTED",MEDIA_ERR_URL_EMPTY:"MEDIA_ERR_URL_EMPTY"},MP=(eP(wP={},"manifest",{HLS:1100,DASH:1200}),eP(wP,EP,2100),eP(wP,LP,2101),eP(wP,OP,2103),eP(wP,PP,2104),eP(wP,IP,2116),eP(wP,CP,{FLV:3100,HLS:3200,MP4:3300,FMP4:3400,SIDX:3410}),eP(wP,ZP,{FMP4:4100,MP4:4200}),eP(wP,jP,{MEDIA_ERR_ABORTED:5101,MEDIA_ERR_NETWORK:5102,MEDIA_ERR_DECODE:5103,MEDIA_ERR_SRC_NOT_SUPPORTED:5104,MEDIA_ERR_CODEC_NOT_SUPPORTED:5105,MEDIA_ERR_URL_EMPTY:5106,MSE_ADD_SB:5200,MSE_APPEND_BUFFER:5201,MSE_OTHER:5202,MSE_FULL:5203,MSE_HIJACK:5204,EME_HIJACK:5301}),eP(wP,AP,{LICENSE:7100,CUSTOM_LICENSE:7200}),eP(wP,DP,8e3),eP(wP,VP,{NO_CANPLAY_ERROR:9001,BUFFERBREAK_ERROR:9002,WAITING_TIMEOUT_ERROR:9003}),wP),GP=function(e){tP(r,e);var t=lP(r);function r(e,n,i,o,a){var s;return QO(this,r),(s=t.call(this,a||(null==i?void 0:i.message))).errorType=e===LP?EP:e,s.originError=i,s.ext=o,s.errorCode=MP[e][n]||MP[e],s.errorMessage=s.message,s.errorCode||(s.errorType=DP,s.errorCode=MP[s.errorType]),s}return $O(r,null,[{key:"create",value:function(e,t,n,i,o){return e instanceof r?e:(e instanceof Error&&(n=e,e=""),e||(e=DP),new r(e,t,n,i,o))}},{key:"network",value:function(e){var t;return new r(null!=e&&e.isTimeout?LP:EP,null,e instanceof Error?e:null,{url:null==e?void 0:e.url,response:null==e?void 0:e.response,httpCode:null==e||null===(t=e.response)||void 0===t?void 0:t.status})}}]),r}(aP(Error)),FP=1,NP=2,UP=3,XP=4,HP=["Boolean","Number","String","Undefined","Null","Date","Object"],BP=function(){function e(t,r){QO(this,e),this.name=t||"",this._prefix="[".concat(this.name,"]"),this.logCacheLevel=(null==r?void 0:r.logCacheLevel)||3,this.logMaxSize=(null==r?void 0:r.logMaxSize)||204800,this.logSize=0,this.logTextArray=[]}return $O(e,[{key:"debug",value:function(){for(var t,r,n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,Bg(t=[FP]).call(t,o)),e.disabled||(n=console).debug.apply(n,Bg(r=[this._prefix,KP()]).call(r,o))}},{key:"log",value:function(){for(var t,r,n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,Bg(t=[NP]).call(t,o)),e.disabled||(n=console).log.apply(n,Bg(r=[this._prefix,KP()]).call(r,o))}},{key:"warn",value:function(){for(var t,r,n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,Bg(t=[UP]).call(t,o)),e.disabled||(n=console).warn.apply(n,Bg(r=[this._prefix,KP()]).call(r,o))}},{key:"error",value:function(){for(var t,r,n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,Bg(t=[XP]).call(t,o)),e.disabled||(n=console).error.apply(n,Bg(r=[this._prefix,KP()]).call(r,o))}},{key:"logCache",value:function(e){if(!(e<this.logCacheLevel)){var t="";try{for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];var o=vR(n).call(n,(function(e){return JP(e)}));t=this._prefix+KP()+Fx(o)}catch(s){return}if(e>=this.logCacheLevel&&(this.logSize+=t.length,this.logTextArray.push(t)),this.logSize>this.logMaxSize){var a=this.logTextArray.shift();this.logSize-=a.length}}}},{key:"getLogCache",value:function(){var e=this.logTextArray.join("\n");return this.reset(),e}},{key:"reset",value:function(){this.logTextArray=[],this.logSize=0}},{key:"table",value:function(){var t;e.disabled||(console.group(this._prefix),(t=console).table.apply(t,arguments),console.groupEnd())}},{key:"setLogLevel",value:function(e){this.logCacheLevel=e}}],[{key:"enable",value:function(){e.disabled=!1}},{key:"disable",value:function(){e.disabled=!0}}]),e}();function KP(){return(new Date).toLocaleString()}function YP(e){var t;if("object"!==YO(e))return e;var r=hy(t=Object.prototype.toString.call(e)).call(t,8,-1);switch(r){case"Array":case"Uint8Array":case"ArrayBuffer":return r+"["+e.length+"]";case"Object":return"{}";default:return r}}function JP(e,t,r){var n;r||(r=1),t||(t=2);var i={};if(!e||"object"!==YO(e))return e;var o=hy(n=Object.prototype.toString.call(e)).call(n,8,-1);if(!uE(HP).call(HP,o))return o;if(!(r>t)){for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r===t?i[a]=YP(e[a]):"object"===YO(e[a])?i[a]=JP(e[a],t,r+1):i[a]=e[a]);return i}}eP(BP,"disabled",!0);var zP="fetch",QP="xhr",qP="arraybuffer",$P="text",eI="json",tI=function(e){tP(r,e);var t=lP(r);function r(e,n,i,o){var a;return QO(this,r),eP(uP(a=t.call(this,o)),"retryCount",0),eP(uP(a),"isTimeout",!1),eP(uP(a),"loaderType",zP),eP(uP(a),"startTime",0),eP(uP(a),"endTime",0),eP(uP(a),"options",{}),a.url=e,a.request=n,a.response=i,a}return $O(r)}(aP(Error)),rI=Object.prototype.toString;function nI(e){if("[object Object]"!==rI.call(e))return!1;var t=Ff(e);return null===t||t===Object.prototype}function iI(e){if(e&&null!==e[0]&&void 0!==e[0]&&(0!==e[0]||null!==e[1]&&void 0!==e[1])){var t="bytes="+e[0]+"-";return e[1]&&(t+=e[1]),t}}function oI(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function aI(e,t){var r,n;if(e){if(!t)return e;var i,o=Nc(r=vR(n=Zc(t)).call(n,(function(e){if(null!=(i=t[e]))return ng(i)?e+="[]":i=[i],vR(i).call(i,(function(t){var r,n;return n=t,"[object Date]"===rI.call(n)?t=t.toISOString():function(e){return null!==e&&"object"===YO(e)}(t)&&(t=Fx(t)),Bg(r="".concat(oI(e),"=")).call(r,oI(t))})).join("&")}))).call(r,Boolean).join("&");if(o){var a=rg(e).call(e,"#");-1!==a&&(e=hy(e).call(e,0,a)),e+=(-1===rg(e).call(e,"?")?"?":"&")+o}return e}}function sI(e,t,r,n,i,o,a,s,u,l,c){return i=null!=i?LT(i):null,n=lR(n||"0",10),Fk(n)&&(n=0),{data:e,done:t,options:{range:u,vid:l,index:s,contentLength:n,age:i,startTime:o,firstByteTime:a,endTime:_x(),priOptions:c},response:r}}function uI(e,t){return Math.round(8*e*1e3/t/1024)}var lI="error",cI="core.ttfb",fI="core.loadstart",dI="core.loadresponseheaders",pI="core.loadcomplete",hI="core.loadretry",vI="core.metadataparsed",mI="core.sei",yI="real_time_speed",gI=2097152,_I=function(e){tP(n,e);var t,r=lP(n);function n(){var e;return QO(this,n),eP(uP(e=r.call(this)),"_abortController",null),eP(uP(e),"_timeoutTimer",null),eP(uP(e),"_reader",null),eP(uP(e),"_response",null),eP(uP(e),"_aborted",!1),eP(uP(e),"_index",-1),eP(uP(e),"_range",null),eP(uP(e),"_receivedLength",0),eP(uP(e),"_running",!1),eP(uP(e),"_logger",null),eP(uP(e),"_vid",""),eP(uP(e),"_onProcessMinLen",0),eP(uP(e),"_onCancel",null),eP(uP(e),"_priOptions",null),e}return $O(n,[{key:"load",value:function(e){var t,r=this,n=e.url,i=e.vid,o=e.timeout,a=e.responseType,s=e.onProgress,u=e.index,l=e.onTimeout,c=e.onCancel,f=e.range,d=e.transformResponse,p=e.request,h=e.params,v=e.logger,m=e.method,y=e.headers,g=e.body,_=e.mode,b=e.credentials,w=e.cache,S=e.redirect,k=e.referrer,R=e.referrerPolicy,T=e.onProcessMinLen,x=e.priOptions;this._logger=v,this._aborted=!1,this._onProcessMinLen=T,this._onCancel=c,this._abortController="undefined"!=typeof AbortController&&new AbortController,this._running=!0,this._index=u,this._range=f||[0,0],this._vid=i||n,this._priOptions=x||{};var E={method:m,headers:y,body:g,mode:_,credentials:b,cache:w,redirect:S,referrer:k,referrerPolicy:R,signal:null===(t=this._abortController)||void 0===t?void 0:t.signal},L=!1;clearTimeout(this._timeoutTimer),n=aI(n,h);var O=iI(f);O&&(y=p?p.headers:E.headers=E.headers||(Headers?new Headers:{}),Headers&&y instanceof Headers?y.append("Range",O):y.Range=O),o&&(this._timeoutTimer=c_((function(){if(L=!0,r.cancel(),l){var e=new tI(n,E,null,"timeout");e.isTimeout=!0,l(e,{index:r._index,range:r._range,vid:r._vid,priOptions:r._priOptions})}}),o));var P=_x();return this._logger.debug("[fetch load start], index,",u,",range,",f),new Gm((function(e,t){fetch(p||n,p?void 0:E).then(function(){var i=zO(KO().mark((function i(o){var l,c,p,h;return KO().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(clearTimeout(r._timeoutTimer),r._response=o,!r._aborted&&r._running){i.next=4;break}return i.abrupt("return");case 4:if(d&&(o=d(o,n)||o),o.ok){i.next=7;break}throw new tI(n,E,o,"bad network response");case 7:if(l=_x(),a!==$P){i.next=15;break}return i.next=11,o.text();case 11:c=i.sent,r._running=!1,i.next=37;break;case 15:if(a!==eI){i.next=22;break}return i.next=18,o.json();case 18:c=i.sent,r._running=!1,i.next=37;break;case 22:if(!s){i.next=29;break}return r.resolve=e,r.reject=t,r._loadChunk(o,s,P,l),i.abrupt("return");case 29:return i.next=31,o.arrayBuffer();case 31:c=i.sent,c=new Uint8Array(c),r._running=!1,p=_x()-P,h=uI(c.byteLength,p),r.emit(yI,{speed:h,len:c.byteLength,time:p,vid:r._vid,index:r._index,range:r._range,priOptions:r._priOptions});case 37:r._logger.debug("[fetch load end], index,",u,",range,",f),e(sI(c,!0,o,o.headers.get("Content-Length"),o.headers.get("age"),P,l,u,f,r._vid,r._priOptions));case 39:case"end":return i.stop()}}),i)})));return function(e){return i.apply(this,arguments)}}()).catch((function(e){var i;clearTimeout(r._timeoutTimer),r._running=!1,r._aborted&&!L||((e=e instanceof tI?e:new tI(n,E,null,null===(i=e)||void 0===i?void 0:i.message)).startTime=P,e.endTime=_x(),e.isTimeout=L,e.options={index:r._index,range:r._range,vid:r._vid,priOptions:r._priOptions},t(e))}))}))}},{key:"cancel",value:(t=zO(KO().mark((function e(){return KO().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._aborted){e.next=2;break}return e.abrupt("return");case 2:if(this._aborted=!0,this._running=!1,!this._response){e.next=14;break}if(e.prev=5,!this._reader){e.next=9;break}return e.next=9,this._reader.cancel();case 9:e.next=13;break;case 11:e.prev=11,e.t0=e.catch(5);case 13:this._response=this._reader=null;case 14:if(this._abortController){try{this._abortController.abort()}catch(PC){}this._abortController=null}this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions});case 16:case"end":return e.stop()}}),e,this,[[5,11]])}))),function(){return t.apply(this,arguments)})},{key:"_loadChunk",value:function(e,t,r,n){var i=this;if(!e.body||!e.body.getReader){this._running=!1;var o=new tI(e.url,"",e,"onProgress of bad response.body.getReader");return o.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},void this.reject(o)}this._onProcessMinLen>0&&(this._cache=new Uint8Array(gI),this._writeIdx=0);var a,s,u,l=this._reader=e.body.getReader(),c=function(){var o=zO(KO().mark((function o(){var f,d,p,h,v,m,y,g;return KO().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return s=_x(),o.prev=1,o.next=4,l.read();case 4:a=o.sent,u=_x(),o.next=13;break;case 8:return o.prev=8,o.t0=o.catch(1),u=_x(),i._aborted||(i._running=!1,o.t0.options={index:i._index,range:i._range,vid:i._vid,priOptions:i._priOptions},i.reject(o.t0)),o.abrupt("return");case 13:if(d=(null===(f=i._range)||void 0===f?void 0:f.length)>0?i._range[0]:0,p=d+i._receivedLength,!i._aborted){o.next=19;break}return i._running=!1,t(void 0,!1,{range:[p,p],vid:i._vid,index:i._index,startTime:s,endTime:u,st:r,firstByteTime:n,priOptions:i._priOptions},e),o.abrupt("return");case 19:var _;if(h=a.value?a.value.byteLength:0,i._receivedLength+=h,i._logger.debug("【fetchLoader,onProgress call】,task,",i._range,", start,",p,", end,",d+i._receivedLength,", done,",a.done),i._onProcessMinLen>0){if(i._writeIdx+h>=i._onProcessMinLen||a.done)(v=new Uint8Array(i._writeIdx+h)).set(hy(_=i._cache).call(_,0,i._writeIdx),0),h>0&&v.set(a.value,i._writeIdx),i._writeIdx=0,i._logger.debug("【fetchLoader,onProgress enough】,done,",a.done,",len,",v.byteLength,", writeIdx,",i._writeIdx);else if(h>0&&i._writeIdx+h<gI)i._cache.set(a.value,i._writeIdx),i._writeIdx+=h,i._logger.debug("【fetchLoader,onProgress cache】,len,",h,", writeIdx,",i._writeIdx);else if(h>0){var b;m=new Uint8Array(i._writeIdx+h+2048),i._logger.debug("【fetchLoader,onProgress extra start】,size,",i._writeIdx+h+2048,", datalen,",h,", writeIdx,",i._writeIdx),m.set(hy(b=i._cache).call(b,0,i._writeIdx),0),h>0&&m.set(a.value,i._writeIdx),i._writeIdx+=h,delete i._cache,i._cache=m,i._logger.debug("【fetchLoader,onProgress extra end】,len,",h,", writeIdx,",i._writeIdx)}}else v=a.value;(v&&v.byteLength>0||a.done)&&t(v,a.done,{range:[i._range[0]+i._receivedLength-(v?v.byteLength:0),i._range[0]+i._receivedLength],vid:i._vid,index:i._index,startTime:s,endTime:u,st:r,firstByteTime:n,priOptions:i._priOptions},e),a.done?(y=_x()-r,g=uI(i._receivedLength,y),i.emit(yI,{speed:g,len:i._receivedLength,time:y,vid:i._vid,index:i._index,range:i._range,priOptions:i._priOptions}),i._running=!1,i._logger.debug("[fetchLoader onProgress end],task,",i._range,",done,",a.done),i.resolve(sI(a,!0,e,e.headers.get("Content-Length"),e.headers.get("age"),r,n,i._index,i._range,i._vid,i._priOptions))):c();case 25:case"end":return o.stop()}}),o,null,[[1,8]])})));return function(){return o.apply(this,arguments)}}();c()}},{key:"receiveLen",get:function(){return this._receivedLength}},{key:"running",get:function(){return this._running},set:function(e){this._running=e}}],[{key:"isSupported",value:function(){return!("undefined"==typeof fetch)}}]),n}(WR);var bI=function(e){tP(r,e);var t=lP(r);function r(){var e;return QO(this,r),eP(uP(e=t.call(this)),"_xhr",null),eP(uP(e),"_aborted",!1),eP(uP(e),"_timeoutTimer",null),eP(uP(e),"_range",null),eP(uP(e),"_receivedLength",0),eP(uP(e),"_url",null),eP(uP(e),"_onProgress",null),eP(uP(e),"_index",-1),eP(uP(e),"_headers",null),eP(uP(e),"_currentChunkSizeKB",384),eP(uP(e),"_timeout",null),eP(uP(e),"_xhr",null),eP(uP(e),"_withCredentials",null),eP(uP(e),"_startTime",-1),eP(uP(e),"_loadCompleteResolve",null),eP(uP(e),"_loadCompleteReject",null),eP(uP(e),"_runing",!1),eP(uP(e),"_logger",!1),eP(uP(e),"_vid",""),eP(uP(e),"_responseType",void 0),eP(uP(e),"_credentials",void 0),eP(uP(e),"_method",void 0),eP(uP(e),"_transformResponse",void 0),eP(uP(e),"_firstRtt",void 0),eP(uP(e),"_onCancel",null),eP(uP(e),"_priOptions",null),e}return $O(r,[{key:"load",value:function(e){var t=this;clearTimeout(this._timeoutTimer),this._logger=e.logger,this._range=e.range,this._onProgress=e.onProgress,this._index=e.index,this._headers=e.headers,this._withCredentials="include"===e.credentials||"same-origin"===e.credentials,this._body=e.body||null,e.method&&(this._method=e.method),this._timeout=e.timeout||null,this._runing=!0,this._vid=e.vid||e.url,this._responseType=e.responseType,this._firstRtt=-1,this._onTimeout=e.onTimeout,this._onCancel=e.onCancel,this._request=e.request,this._priOptions=e.priOptions||{},this._logger.debug("【xhrLoader task】, range",this._range),this._url=aI(e.url,e.params);var r=_x();return new Gm((function(e,r){t._loadCompleteResolve=e,t._loadCompleteReject=r,t._startLoad()})).catch((function(e){if(clearTimeout(t._timeoutTimer),t._runing=!1,!t._aborted)throw(e=e instanceof tI?e:new tI(t._url,t._request)).startTime=r,e.endTime=_x(),e.options={index:t._index,vid:t._vid,priOptions:t._priOptions},e}))}},{key:"_startLoad",value:function(){var e=null;if(this._responseType===qP&&this._range&&this._range.length>1)if(this._onProgress){this._firstRtt=-1;var t=1024*this._currentChunkSizeKB,r=this._range[0]+this._receivedLength,n=this._range[1];t<this._range[1]-r&&(n=r+t),e=[r,n],this._logger.debug("[xhr_loader->],tast :",this._range,", SubRange, ",e)}else e=this._range,this._logger.debug("[xhr_loader->],tast :",this._range,", allRange, ",e);this._internalOpen(e)}},{key:"_internalOpen",value:function(e){var t=this;try{var r,n;this._startTime=_x();var i=this._xhr=new XMLHttpRequest;i.open(this._method||"GET",this._url,!0),i.responseType=this._responseType,this._timeout&&(i.timeout=this._timeout),i.withCredentials=this._withCredentials,i.onload=Iy(r=this._onLoad).call(r,this),i.onreadystatechange=Iy(n=this._onReadyStatechange).call(n,this),i.onerror=function(e){var r,n,i;t._running=!1;var o=new tI(t._url,t._request,null==e||null===(r=e.currentTarget)||void 0===r?void 0:r.response,"xhr.onerror.status:"+(null==e||null===(n=e.currentTarget)||void 0===n?void 0:n.status)+",statusText,"+(null==e||null===(i=e.currentTarget)||void 0===i?void 0:i.statusText));o.options={index:t._index,range:t._range,vid:t._vid,priOptions:t._priOptions},t._loadCompleteReject(o)},i.ontimeout=function(e){t.cancel();var r=new tI(t._url,t._request,{status:408},"timeout");t._onTimeout&&(r.isTimeout=!0,t._onTimeout(r,{index:t._index,range:t._range,vid:t._vid,priOptions:t._priOptions})),r.options={index:t._index,range:t._range,vid:t._vid,priOptions:t._priOptions},t._loadCompleteReject(r)};var o,a=this._headers||{},s=iI(e);if(s&&(a.Range=s),a)cf(o=Zc(a)).call(o,(function(e){i.setRequestHeader(e,a[e])}));this._logger.debug("[xhr.send->] tast,",this._range,",load sub range, ",e),i.send(this._body)}catch(u){u.options={index:this._index,range:e,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(u)}}},{key:"_onReadyStatechange",value:function(e){2===e.target.readyState&&this._firstRtt<0&&(this._firstRtt=_x())}},{key:"_onLoad",value:function(e){var t,r=e.target.status;if(r<200||r>299){var n=new tI(this._url,null,BO(BO({},e.target.response),{},{status:r}),"bad response,status:"+r);return n.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(n)}var i,o=null,a=!1,s=(null===(t=this._range)||void 0===t?void 0:t.length)>0?this._range[0]:0;if(this._responseType===qP){var u,l=new Uint8Array(e.target.response);if(i=s+this._receivedLength,l&&l.byteLength>0){this._receivedLength+=l.byteLength;var c=_x()-this._startTime,f=uI(this._receivedLength,c);this.emit(yI,{speed:f,len:this._receivedLength,time:c,vid:this._vid,index:this._index,range:[i,s+this._receivedLength],priOptions:this._priOptions})}o=l,a=!((null===(u=this._range)||void 0===u?void 0:u.length)>1&&this._range[1]&&this._receivedLength<this._range[1]-this._range[0]),this._logger.debug("[xhr load done->], tast :",this._range,", start",i,"end ",s+this._receivedLength,",dataLen,",l?l.byteLength:0,",receivedLength",this._receivedLength,",index,",this._index,", done,",a)}else a=!0,o=e.target.response;var d={ok:r>=200&&r<300,status:r,statusText:this._xhr.statusText,url:this._xhr.responseURL,headers:this._getHeaders(this._xhr),body:this._xhr.response};this._transformResponse&&(d=this._transformResponse(d,this._url)||d),this._onProgress&&this._onProgress(o,a,{index:this._index,vid:this._vid,range:[i,s+this._receivedLength],startTime:this._startTime,endTime:_x(),priOptions:this._priOptions},d),a?(this._runing=!1,this._loadCompleteResolve&&this._loadCompleteResolve(sI(this._onProgress?null:o,a,d,d.headers["content-length"],d.headers.age,this._startTime,this._firstRtt,this._index,this._range,this._vid,this._priOptions))):this._startLoad()}},{key:"cancel",value:function(){if(!this._aborted)return this._aborted=!0,this._runing=!1,cP(rP(r.prototype),"removeAllListeners",this).call(this),this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions}),this._xhr?this._xhr.abort():void 0}},{key:"receiveLen",get:function(){return this._receivedLength}},{key:"running",get:function(){return this._running},set:function(e){this._running=e}},{key:"_getHeaders",value:function(e){var t,r,n={},i=dP(VT(t=e.getAllResponseHeaders()).call(t).split("\r\n"));try{for(i.s();!(r=i.n()).done;){var o=r.value.split(": ");n[o[0].toLowerCase()]=hy(o).call(o,1).join(": ")}}catch(a){i.e(a)}finally{i.f()}return n}}],[{key:"isSupported",value:function(){return"undefined"!=typeof XMLHttpRequest}}]),r}(WR),wI=["retry","retryDelay","onRetryError","transformError"],SI=function(){function e(t,r){var n,i,o;QO(this,e),this.promise=((o=new Gm((function(e,t){n=e,i=t}))).used=!1,o.resolve=function(){return o.used=!0,n.apply(void 0,arguments)},o.reject=function(){return o.used=!0,i.apply(void 0,arguments)},o),this.alive=!!r.onProgress,!r.logger&&(r.logger=new BP("Loader")),this._loaderType=t,this._loader=t===zP&&"undefined"!=typeof fetch?new _I:new bI,this._config=r,this._retryCount=0,this._retryTimer=null,this._canceled=!1,this._retryCheckFunc=r.retryCheckFunc,this._logger=r.logger}var t;return $O(e,[{key:"exec",value:function(){var e=this,t=this._config,r=t.retry,n=t.retryDelay,i=t.onRetryError,o=t.transformError,a=sP(t,wI),s=function(){var t=zO(KO().mark((function t(){var u,l,c;return KO().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e._loader.load(a);case 3:u=t.sent,e.promise.resolve(u),t.next=27;break;case 7:if(t.prev=7,t.t0=t.catch(0),e._loader.running=!1,e._logger.debug("[task request catch err]",t.t0),!e._canceled){t.next=13;break}return t.abrupt("return");case 13:if(t.t0.loaderType=e._loaderType,t.t0.retryCount=e._retryCount,l=t.t0,o&&(l=o(l)||l),i&&e._retryCount>0&&i(l,e._retryCount,{index:a.index,vid:a.vid,range:a.range,priOptions:a.priOptions}),e._retryCount++,c=!0,e._retryCheckFunc&&(c=e._retryCheckFunc(t.t0)),!(c&&e._retryCount<=r)){t.next=26;break}return clearTimeout(e._retryTimer),e._logger.debug("[task request setTimeout],retry",e._retryCount,",retry range,",a.range),e._retryTimer=c_(s,n),t.abrupt("return");case 26:e.promise.reject(l);case 27:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(){return t.apply(this,arguments)}}();return s(),this.promise}},{key:"cancel",value:(t=zO(KO().mark((function e(){return KO().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return clearTimeout(this._retryTimer),this._canceled=!0,this._loader.running=!1,e.abrupt("return",this._loader.cancel());case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"running",get:function(){return this._loader&&this._loader.running}},{key:"loader",get:function(){return this._loader}}]),e}();function kI(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Gm((function(t){return c_(t,e)}))}var RI,TI=function(e){tP(n,e);var t,r=lP(n);function n(e){var t;return QO(this,n),eP(uP(t=r.call(this,e)),"type",zP),eP(uP(t),"_queue",[]),eP(uP(t),"_alive",[]),eP(uP(t),"_currentTask",null),eP(uP(t),"_finnalUrl",""),eP(uP(t),"_config",void 0),t._config=function(e){return BO({loaderType:zP,retry:0,retryDelay:0,timeout:0,request:null,onTimeout:void 0,onProgress:void 0,onRetryError:void 0,transformRequest:void 0,transformResponse:void 0,transformError:void 0,responseType:$P,range:void 0,url:"",params:void 0,method:"GET",headers:{},body:void 0,mode:void 0,credentials:void 0,cache:void 0,redirect:void 0,referrer:void 0,referrerPolicy:void 0,integrity:void 0,onProcessMinLen:0},e)}(e),t._config.loaderType!==QP&&_I.isSupported()||(t.type=QP),t.log=e.logger,t}return $O(n,[{key:"isFetch",value:function(){return this.type===zP}},{key:"load",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"!=typeof e&&e?r=e:r.url=e||r.url||this._config.url,(r=yR({},this._config,r)).params&&(r.params=yR({},r.params)),r.headers&&nI(r.headers)&&(r.headers=yR({},r.headers)),r.body&&nI(r.body)&&(r.body=yR({},r.body)),r.transformRequest&&(r=r.transformRequest(r)||r),r.logger=this.log;var n=new SI(this.type,r);return n.loader.on(yI,(function(e){t.emit(yI,e)})),this._queue.push(n),1!==this._queue.length||this._currentTask&&this._currentTask.running||this._processTask(),n.promise}},{key:"cancel",value:(t=zO(KO().mark((function e(){var t;return KO().wrap((function(e){for(var r,n,i;;)switch(e.prev=e.next){case 0:return t=Bg(r=vR(n=this._queue).call(n,(function(e){return e.cancel()}))).call(r,vR(i=this._alive).call(i,(function(e){return e.cancel()}))),this._currentTask&&t.push(this._currentTask.cancel()),this._queue=[],this._alive=[],e.next=6,Gm.all(t);case 6:return e.next=8,kI();case 8:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"_processTask",value:function(){var e=this;if(this._currentTask=this._queue.shift(),this._currentTask){this._currentTask.alive&&this._alive.push(this._currentTask);var t=this._currentTask.exec().catch((function(e){}));t&&"function"==typeof t.finally&&t.finally((function(){var t,r,n;null!==(t=e._currentTask)&&void 0!==t&&t.alive&&(null===(r=e._alive)||void 0===r?void 0:r.length)>0&&(e._alive=Nc(n=e._alive).call(n,(function(t){return t&&t!==e._currentTask})));e._processTask()}))}}}],[{key:"isFetchSupport",value:function(){return _I.isSupported()}}]),n}(WR),xI="core.rtcstatechange",EI="core.rtcnetwork",LI={},OI={},PI={exports:{}},II=PI.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(e){return e.encoding?"rtpmap:%d %s/%s/%s":e.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(e){return null!=e.address?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%s trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(e){return null!=e.subtype?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:(\d+)(?:\/(\w+))?(?: (urn:ietf:params:rtp-hdrext:encrypt))? (\S*)(?: (\S*))?/,names:["value","direction","encrypt-uri","uri","config"],format:function(e){return"extmap:%d"+(e.direction?"/%s":"%v")+(e["encrypt-uri"]?" %s":"%v")+" %s"+(e.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(e){return null!=e.sessionConfig?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"connectionType",reg:/^connection:(new|existing)/,format:"connection:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*(?:\.\d*)*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*(?:\.\d*)*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation","network-id","network-cost"],format:function(e){var t="candidate:%s %d %s %d %s %d typ %s";return t+=null!=e.raddr?" raddr %s rport %d":"%v%v",t+=null!=e.tcptype?" tcptype %s":"%v",null!=e.generation&&(t+=" generation %d"),t+=null!=e["network-id"]?" network-id %d":"%v",t+=null!=e["network-cost"]?" network-cost %d":"%v"}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_-]*)(?::(.*))?/,names:["id","attribute","value"],format:function(e){var t="ssrc:%d";return null!=e.attribute&&(t+=" %s",null!=e.value&&(t+=":%s")),t}},{push:"ssrcGroups",reg:/^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{name:"sctpmap",reg:/^sctpmap:([\w_/]*) (\S*)(?: (\S*))?/,names:["sctpmapNumber","app","maxMessageSize"],format:function(e){return null!=e.maxMessageSize?"sctpmap:%s %s %s":"sctpmap:%s %s"}},{name:"xGoogleFlag",reg:/^x-google-flag:([^\s]*)/,format:"x-google-flag:%s"},{push:"rids",reg:/^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,names:["id","direction","params"],format:function(e){return e.params?"rid:%s %s %s":"rid:%s %s"}},{push:"imageattrs",reg:new RegExp("^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"),names:["pt","dir1","attrs1","dir2","attrs2"],format:function(e){return"imageattr:%s %s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast",reg:new RegExp("^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"),names:["dir1","list1","dir2","list2"],format:function(e){return"simulcast:%s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast_03",reg:/^simulcast:[\s\t]+([\S+\s\t]+)$/,names:["value"],format:"simulcast: %s"},{name:"framerate",reg:/^framerate:(\d+(?:$|\.\d+))/,format:"framerate:%s"},{name:"sourceFilter",reg:/^source-filter: *(excl|incl) (\S*) (IP4|IP6|\*) (\S*) (.*)/,names:["filterMode","netType","addressTypes","destAddress","srcList"],format:"source-filter: %s %s %s %s %s"},{name:"bundleOnly",reg:/^(bundle-only)/},{name:"label",reg:/^label:(.+)/,format:"label:%s"},{name:"sctpPort",reg:/^sctp-port:(\d+)$/,format:"sctp-port:%s"},{name:"maxMessageSize",reg:/^max-message-size:(\d+)$/,format:"max-message-size:%s"},{push:"tsRefClocks",reg:/^ts-refclk:([^\s=]*)(?:=(\S*))?/,names:["clksrc","clksrcExt"],format:function(e){return"ts-refclk:%s"+(null!=e.clksrcExt?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(e){var t="mediaclk:";return t+=null!=e.id?"id=%s %s":"%v%s",t+=null!=e.mediaClockValue?"=%s":"",t+=null!=e.rateNumerator?" rate=%s":"",t+=null!=e.rateDenominator?"/%s":""}},{name:"keywords",reg:/^keywds:(.+)$/,format:"keywds:%s"},{name:"content",reg:/^content:(.+)/,format:"content:%s"},{name:"bfcpFloorCtrl",reg:/^floorctrl:(c-only|s-only|c-s)/,format:"floorctrl:%s"},{name:"bfcpConfId",reg:/^confid:(\d+)/,format:"confid:%s"},{name:"bfcpUserId",reg:/^userid:(\d+)/,format:"userid:%s"},{name:"bfcpFloorId",reg:/^floorid:(.+) (?:m-stream|mstrm):(.+)/,names:["id","mStream"],format:"floorid:%s mstrm:%s"},{push:"invalid",names:["value"]}]};cf(RI=Zc(II)).call(RI,(function(e){var t=II[e];cf(t).call(t,(function(e){e.reg||(e.reg=/(.*)/),e.format||(e.format="%s")}))}));var CI=PI.exports;!function(e,t){var r=function(e){return String(Number(e))===e?Number(e):e},n=function(e,t,n){var i=e.name&&e.names;e.push&&!t[e.push]?t[e.push]=[]:i&&!t[e.name]&&(t[e.name]={});var o=e.push?{}:i?t[e.name]:t;!function(e,t,n,i){if(i&&!n)t[i]=r(e[1]);else for(var o=0;o<n.length;o+=1)null!=e[o+1]&&(t[n[o]]=r(e[o+1]))}(n.match(e.reg),o,e.names,e.name),e.push&&t[e.push].push(o)},i=CI,o=Iy(t=RegExp.prototype.test).call(t,/^([a-z])=(.*)/);e.parse=function(e){var t,r,a={},s=[],u=a;return cf(t=Nc(r=e.split(/(\r\n|\r|\n)/)).call(r,o)).call(t,(function(e){var t=e[0],r=hy(e).call(e,2);"m"===t&&(s.push({rtp:[],fmtp:[]}),u=s[s.length-1]);for(var o=0;o<(i[t]||[]).length;o+=1){var a=i[t][o];if(a.reg.test(r))return n(a,u,r)}})),a.media=s,a};var a=function(e,t){var n=t.split(/=(.+)/,2);return 2===n.length?e[n[0]]=r(n[1]):1===n.length&&t.length>1&&(e[n[0]]=void 0),e};e.parseParams=function(e){var t;return xP(t=e.split(/;\s?/)).call(t,a,{})},e.parseFmtpConfig=e.parseParams,e.parsePayloads=function(e){var t;return vR(t=e.toString().split(" ")).call(t,Number)},e.parseRemoteCandidates=function(e){for(var t,n=[],i=vR(t=e.split(" ")).call(t,r),o=0;o<i.length;o+=3)n.push({component:i[o],ip:i[o+1],port:i[o+2]});return n},e.parseImageAttributes=function(e){var t;return vR(t=e.split(" ")).call(t,(function(e){var t;return xP(t=e.substring(1,e.length-1).split(",")).call(t,a,{})}))},e.parseSimulcastStreamList=function(e){var t;return vR(t=e.split(";")).call(t,(function(e){var t;return vR(t=e.split(",")).call(t,(function(e){var t,n=!1;return"~"!==e[0]?t=r(e):(t=r(e.substring(1,e.length)),n=!0),{scid:t,paused:n}}))}))}}(OI);var ZI=CI,jI=/%[sdv%]/g,AI=function(e){var t=1,r=arguments,n=r.length;return e.replace(jI,(function(e){if(t>=n)return e;var i=r[t];switch(t+=1,e){case"%%":return"%";case"%s":return String(i);case"%d":return Number(i);case"%v":return""}}))},DI=function(e,t,r){var n=[e+"="+(t.format instanceof Function?t.format(t.push?r:r[t.name]):t.format)];if(t.names)for(var i=0;i<t.names.length;i+=1){var o=t.names[i];t.name?n.push(r[t.name][o]):n.push(r[t.names[i]])}else n.push(r[t.name]);return AI.apply(null,n)},VI=["v","o","s","i","u","e","p","c","b","t","r","z","a"],WI=["i","c","b","a"],MI=OI,GI=function(e,t){var r,n;t=t||{},null==e.version&&(e.version=0),null==e.name&&(e.name=" "),cf(r=e.media).call(r,(function(e){null==e.payloads&&(e.payloads="")}));var i=t.outerOrder||VI,o=t.innerOrder||WI,a=[];return cf(i).call(i,(function(t){var r;cf(r=ZI[t]).call(r,(function(r){if(r.name in e&&null!=e[r.name])a.push(DI(t,r,e));else if(r.push in e&&null!=e[r.push]){var n;cf(n=e[r.push]).call(n,(function(e){a.push(DI(t,r,e))}))}}))})),cf(n=e.media).call(n,(function(e){a.push(DI("m",ZI.m[0],e)),cf(o).call(o,(function(t){var r;cf(r=ZI[t]).call(r,(function(r){if(r.name in e&&null!=e[r.name])a.push(DI(t,r,e));else if(r.push in e&&null!=e[r.push]){var n;cf(n=e[r.push]).call(n,(function(e){a.push(DI(t,r,e))}))}}))}))})),a.join("\r\n")+"\r\n"};LI.write=GI,LI.parse=MI.parse,LI.parseParams=MI.parseParams,LI.parseFmtpConfig=MI.parseFmtpConfig,LI.parsePayloads=MI.parsePayloads,LI.parseRemoteCandidates=MI.parseRemoteCandidates,LI.parseImageAttributes=MI.parseImageAttributes,LI.parseSimulcastStreamList=MI.parseSimulcastStreamList;var FI=["adaptiveJitterBuffer"];function NI(e){return new Gm((function(t){var r;null===(r=e.getStats(null))||void 0===r||r.then((function(e){var r,n,i;t((n=[],i=[],cf(r=e).call(r,(function(e){"inbound-rtp"===e.type&&n.push(e),"remote-outbound-rtp"===e.type&&i.push(e)})),vR(n).call(n,(function(e){var t,n=r.get(e.codecId),o=r.get(e.trackId);return{type:null!==(t=e.mediaType)&&void 0!==t?t:e.kind,inboundRtp:e,remoteOutBoundRtp:hk(i).call(i,(function(t){return t.mediaType===e.mediaType})),codec:n,track:o}}))))}))})).catch((function(){}))}function UI(e){var t,r,n,i,o,a,s,u,l,c,f,d,p,h,v,m,y,g,_,b,w,S,k,R,T,x,E,L,O,P,I,C,Z,j,A,D,V,W=null==e?void 0:Nc(e).call(e,(function(e){return"video"===e.type}))[0],M=null==e?void 0:Nc(e).call(e,(function(e){return"audio"===e.type}))[0];(W&&W.remoteOutBoundRtp&&(Z={bytesSent:W.remoteOutBoundRtp.bytesSent,packetsSent:W.remoteOutBoundRtp.packetsSent}),M&&M.remoteOutBoundRtp&&(j={bytesSent:M.remoteOutBoundRtp.bytesSent,packetsSent:M.remoteOutBoundRtp.packetsSent}),void 0!==(null==W||null===(t=W.inboundRtp)||void 0===t?void 0:t.jitterBufferDelay))&&(A=(null===(D=W.inboundRtp)||void 0===D?void 0:D.jitterBufferDelay)/(null===(V=W.inboundRtp)||void 0===V?void 0:V.jitterBufferEmittedCount)*1e3);return{video:W?{codec:null===(r=W.codec)||void 0===r?void 0:r.mimeType,payloadType:null===(n=W.codec)||void 0===n?void 0:n.payloadType,sdpFmtpLine:null===(i=W.codec)||void 0===i?void 0:i.sdpFmtpLine,bytesReceived:(null===(o=W.inboundRtp)||void 0===o?void 0:o.bytesReceived)||0,firCount:null===(a=W.inboundRtp)||void 0===a?void 0:a.firCount,pliCount:null===(s=W.inboundRtp)||void 0===s?void 0:s.pliCount,frameHeight:null===(u=W.inboundRtp)||void 0===u?void 0:u.frameHeight,frameWidth:null===(l=W.inboundRtp)||void 0===l?void 0:l.frameWidth,framesDecoded:null===(c=W.inboundRtp)||void 0===c?void 0:c.framesDecoded,framesDropped:null===(f=W.inboundRtp)||void 0===f?void 0:f.framesDropped,framesPerSecond:null===(d=W.inboundRtp)||void 0===d?void 0:d.framesPerSecond,framesReceived:null!==(p=null===(h=W.inboundRtp)||void 0===h?void 0:h.framesReceived)&&void 0!==p?p:null===(v=W.track)||void 0===v?void 0:v.framesReceived,jitter:null===(m=W.inboundRtp)||void 0===m?void 0:m.jitter,jitterBufferDelay:null===(y=W.inboundRtp)||void 0===y?void 0:y.jitterBufferDelay,keyFramesDecoded:null===(g=W.inboundRtp)||void 0===g?void 0:g.keyFramesDecoded,nackCount:null===(_=W.inboundRtp)||void 0===_?void 0:_.nackCount,packetsLost:(null===(b=W.inboundRtp)||void 0===b?void 0:b.packetsLost)||0,packetsReceived:(null===(w=W.inboundRtp)||void 0===w?void 0:w.packetsReceived)||0,averageJitterBufferDelay:A}:void 0,audio:M?{codec:null===(S=M.codec)||void 0===S?void 0:S.mimeType,payloadType:null===(k=M.codec)||void 0===k?void 0:k.payloadType,sdpFmtpLine:null===(R=M.codec)||void 0===R?void 0:R.sdpFmtpLine,bytesReceived:(null===(T=M.inboundRtp)||void 0===T?void 0:T.bytesReceived)||0,audioLevel:null===(x=M.inboundRtp)||void 0===x?void 0:x.audioLevel,jitter:null===(E=M.inboundRtp)||void 0===E?void 0:E.jitter,jitterBufferDelay:null===(L=M.inboundRtp)||void 0===L?void 0:L.jitterBufferDelay,packetsLost:(null===(O=M.inboundRtp)||void 0===O?void 0:O.packetsLost)||0,packetsReceived:(null===(P=M.inboundRtp)||void 0===P?void 0:P.packetsReceived)||0,totalSamplesDuration:null===(I=M.inboundRtp)||void 0===I?void 0:I.totalSamplesDuration,totalSamplesReceived:null===(C=M.inboundRtp)||void 0===C?void 0:C.totalSamplesReceived}:void 0,videoRemote:Z,audioRemote:j}}var XI=function(){function e(t,r){var n=this;xg(this,e),Og(this,"_pc",null),Og(this,"_lastVideoStats",null),Og(this,"_lastRemoteVideoStats",null),Og(this,"_timer",0),Og(this,"_timerInterval",0),Og(this,"_speedQueue",[]),Og(this,"_lostRateQueue",[]),Og(this,"_receivedRateQueue",[]),Og(this,"_currentSpeed",-1),Og(this,"_currentLostRate",-1),Og(this,"_currentReceivedRate",-1),Og(this,"_evaluate",Tg(kg().mark((function e(){var t,r,i,o,a,s,u,l,c,f,d,p,h,v,m,y;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,NI(n._pc).then((function(e){return UI(e)}));case 3:t=e.sent,n._lastVideoStats&&null!=t&&t.video&&(r=t.video,i=r.bytesReceived,o=r.packetsLost,a=r.packetsReceived,s=n._lastVideoStats,u=s.bytesReceived,l=s.packetsLost,c=s.packetsReceived,u&&n._cacheSpeed(8e3*(i-u)/n._timerInterval),f=o-l,(d=a-c)&&f>=0&&n._cacheLostRate(f/(f+d)*1e3/n._timerInterval)),n._lastRemoteVideoStats&&null!=t&&t.videoRemote&&(p=t.video.bytesReceived,h=n._lastVideoStats.bytesReceived,v=null==t?void 0:t.videoRemote,m=v.bytesSent,(y=n._lastRemoteVideoStats.bytesSent)&&m&&m-y>0&&n._cacheReceivedRate((p-h)/(m-y))),n._lastVideoStats=null==t?void 0:t.video,n._lastRemoteVideoStats=null==t?void 0:t.videoRemote,e.next=12;break;case 10:e.prev=10,e.t0=e.catch(0);case 12:case"end":return e.stop()}}),e,null,[[0,10]])})))),this._pc=t,this._timerInterval=r,this.start(r)}return Lg(e,[{key:"start",value:function(e){clearInterval(this._timer),this._pc&&(this._timer=fT(this._evaluate,e))}},{key:"getStats",value:function(){return this._speedQueue.length?{speed:LT(this._currentSpeed.toFixed(2)),avgSpeed:LT(this._getAvgSpeed().toFixed(2)),lostRate:LT(this._currentLostRate.toFixed(2)),avgLostRate:LT(this._getAvgLostRate().toFixed(2)),receivedRate:LT(this._currentReceivedRate.toFixed(2)),avgReceivedRate:LT(this._getAvgReceivedRate().toFixed(2))}:{}}},{key:"destroy",value:function(){clearInterval(this._timer),this._pc=null,this._lastVideoStats=null}},{key:"_cacheSpeed",value:function(e){var t;(this._currentSpeed=e,this._speedQueue.length>5)&&(this._speedQueue=hy(t=this._speedQueue).call(t,5));this._speedQueue.push(e)}},{key:"_cacheLostRate",value:function(e){var t;(this._currentLostRate=e,this._lostRateQueue.length>5)&&(this._lostRateQueue=hy(t=this._lostRateQueue).call(t,5));this._lostRateQueue.push(e)}},{key:"_cacheReceivedRate",value:function(e){var t;(this._currentReceivedRate=e,this._receivedRateQueue.length>5)&&(this._receivedRateQueue=hy(t=this._receivedRateQueue).call(t,5));this._receivedRateQueue.push(e)}},{key:"_getAvgSpeed",value:function(){var e;return-1===this._currentSpeed?-1:xP(e=this._speedQueue).call(e,(function(e,t){return e+t}),0)/this._speedQueue.length}},{key:"_getAvgLostRate",value:function(){var e;return-1===this._currentLostRate?-1:xP(e=this._lostRateQueue).call(e,(function(e,t){return e+t}),0)/this._lostRateQueue.length}},{key:"_getAvgReceivedRate",value:function(){var e;return-1===this._currentReceivedRate?-1:xP(e=this._receivedRateQueue).call(e,(function(e,t){return e+t}),0)/this._receivedRateQueue.length}}]),e}();function HI(){return!(!window.RTCPeerConnection||!window.RTCPeerConnection.prototype.addTransceiver)}var BI=function(){return"undefined"!=typeof window&&window.Worker},KI=function(){return"undefined"!=typeof MessageChannel},YI=function(){return"undefined"!=typeof TransformStream&&"undefined"!=typeof RTCRtpSender&&"undefined"!=typeof RTCRtpReceiver&&void 0!==RTCRtpSender.prototype.createEncodedStreams&&void 0!==RTCRtpReceiver.prototype.createEncodedStreams},JI={getNALUnits:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e.length-e.position<4)return[];var r=e.position;return 1===e.getInt32(r)||0===e.getInt16(r)&&1===e.getInt8(r+2)?JI.getAnnexbNals(e,t):JI.getAvccNals(e,t)},getAnnexbNals:function(e,t){for(var r=[],n=JI.getHeaderPositionAnnexB(e),i=n.pos,o=i;i<e.length-4;){var a,s,u=new Uint8Array(hy(a=e.buffer).call(a,i,i+n.headerLength));n.pos===e.position&&e.skip(n.headerLength),o=(n=JI.getHeaderPositionAnnexB(e)).pos;var l={header:u,body:new Uint8Array(hy(s=e.buffer).call(s,i+u.byteLength,o)),type:-1};t?JI.analyseH265Nal(l):JI.analyseNal(l),(l.type<=9||t&&l.type<=40)&&0!==l.type&&r.push(l),e.skip(o-e.position),i=o}return r},getAvccNals:function(e,t){for(var r=[];e.position<e.length-4;){var n=e.getInt32(e.position);if(!(e.length-e.position>=n))break;var i,o,a=new Uint8Array(hy(i=e.buffer).call(i,e.position,e.position+4));e.skip(4);var s=new Uint8Array(hy(o=e.buffer).call(o,e.position,e.position+n));e.skip(n);var u={header:a,body:s,type:-1};t?JI.analyseH265Nal(u):JI.analyseNal(u),u.type<=9&&0!==u.type&&r.push(u)}return r},analyseNal:function(e){var t=31&e.body[0];switch(e.type=t,t){case 1:e.ndr=!0;break;case 5:e.idr=!0;break;case 6:e.sei=!0;break;case 7:e.sps=!0;break;case 8:e.pps=!0}},analyseH265Nal:function(e){var t=(126&e.body[0])>>1;switch(e.type=t,t){case 39:case 40:e.sei=!0}},getHeaderPositionAnnexB:function(e){for(var t=e.position,r=0,n=e.length;3!==r&&4!==r&&t<n-4;)0===e.getInt16(t)?1===e.getInt16(t+2)?r=4:1===e.getInt8(t+2)?r=3:t++:t++;return t===n-4&&(0===e.getInt16(t)?1===e.getInt16(t+2)?r=4:t=n:(t++,0===e.getInt16(t)&&1===e.getInt8(t)?r=3:t=n)),{pos:t,headerLength:r}},isH265VideoFrame:function(e){var t,r,n;return uE(t=((null===(r=e.getMetadata)||void 0===r||null===(n=r.call(e))||void 0===n?void 0:n.mimeType)||"").toLowerCase()).call(t,"h265")}},zI=function(){function e(t){xg(this,e),Og(this,"_position",0),this._dataview=new DataView(t)}return Lg(e,[{key:"length",get:function(){return this.buffer.byteLength}},{key:"buffer",get:function(){return this._dataview.buffer}},{key:"position",get:function(){return this._position},set:function(e){this._position=e}},{key:"back",value:function(e){this.position-=e}},{key:"getUint8",value:function(e){return this._dataview.getUint8(e)}},{key:"getInt8",value:function(e){return this._dataview.getInt8(e)}},{key:"getInt16",value:function(e){return this._dataview.getInt16(e)}},{key:"getUint16",value:function(e){return this._dataview.getUint16(e)}},{key:"getUint32",value:function(e){return this._dataview.getUint32(e)}},{key:"getInt32",value:function(e){return this._dataview.getInt32(e)}},{key:"skip",value:function(t){for(var r=Math.floor(t/4),n=t%4,i=0;i<r;i++)e.readByte(this,4);n>0&&e.readByte(this,n)}},{key:"readUint8",value:function(){return e.readByte(this,1)}},{key:"readUint16",value:function(){return e.readByte(this,2)}},{key:"readUint24",value:function(){return e.readByte(this,3)}},{key:"readUint32",value:function(){return e.readByte(this,4)}},{key:"readUint64",value:function(){return e.readByte(this,8)}},{key:"readInt8",value:function(){return e.readByte(this,1,!0)}},{key:"readInt16",value:function(){return e.readByte(this,2,!0)}},{key:"readInt32",value:function(){return e.readByte(this,4,!0)}},{key:"writeUint32",value:function(e){return new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e])}}],[{key:"readByte",value:function(e,t,r){var n;switch(t){case 1:n=r?e.getInt8(e.position):e.getUint8(e.position);break;case 2:n=r?e.getInt16(e.position):e.getUint16(e.position);break;case 3:if(r)throw new Error("not supported for readByte 3");n=e.getUint8(e.position)<<16,n|=e.getUint8(e.position+1)<<8,n|=e.getUint8(e.position+2);break;case 4:n=r?e.getInt32(e.position):e.getUint32(e.position);break;case 8:if(r)throw new Error("not supported for readBody 8");n=e.getUint32(e.position)<<32,n|=e.getUint32(e.position+4);break;default:n=""}return e.position+=t,n}}]),e}();function QI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Af(e,(i=n.key,o=void 0,o=function(e,t){if("object"!==Sc(e)||null===e)return e;var r=e[bg];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Sc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"===Sc(o)?o:String(o)),n)}var i,o}function qI(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<24>>>0)+(e[t+1]<<16)+(e[t+2]<<8)+(e[t+3]||0)}var $I=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,n=[{key:"parseAnnexB",value:function(e){var t=e.byteLength-1,r=0;do{if(0!==e[t])break;r++,t--}while(t>0);r>=3&&(e=e.subarray(0,t+1));for(var n=e.length,i=2,o=0;null!==e[i]&&void 0!==e[i]&&1!==e[i];)i++;if((o=2+ ++i)>=n)return[];for(var a=[];o<n;)switch(e[o]){case 0:if(0!==e[o-1]){o+=2;break}if(0!==e[o-2]){o++;break}if(o<n-1&&1!==e[o+1]){o++;break}i!==o-2&&a.push(e.subarray(i,o-2));do{o++}while(1!==e[o]&&o<n);o=(i=o+1)+2;break;case 1:if(0!==e[o-1]||0!==e[o-2]){o+=3;break}i!==o-2&&a.push(e.subarray(i,o-2)),o=(i=o+1)+2;break;default:o+=3}return i<n&&a.push(e.subarray(i)),a}},{key:"parseAvcC",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;if(!(e.length<4)){for(var r,n=e.length,i=[],o=0;o+t<n;)if(r=qI(e,o),3===t&&(r>>>=8),o+=t,r){if(o+r>n)break;i.push(e.subarray(o,o+r)),o+=r}return i}}},{key:"parseSEI",value:function(e,t){for(var r=e.length,n=t?2:1,i=0,o=0,a="";255===e[n];)i+=255,n++;for(i+=e[n++];255===e[n];)o+=255,n++;if(o+=e[n++],5===i&&r>n+16)for(var s=0;s<16;s++)a+=e[n].toString(16),n++;return{payload:e.subarray(n,n+o),type:i,size:o,uuid:a}}},{key:"removeEPB",value:function(e){for(var t=e.byteLength,r=[],n=1;n<t-2;)0===e[n]&&0===e[n+1]&&3===e[n+2]?(r.push(n+2),n+=2):n++;if(!r.length)return e;var i=t-r.length,o=new Uint8Array(i),a=0;for(n=0;n<i;a++,n++)a===r[0]&&(a++,r.shift()),o[n]=e[a];return o}}],(r=null)&&QI(t.prototype,r),n&&QI(t,n),Af(t,"prototype",{writable:!1}),e}();function eC(e){return new TransformStream({transform:function(t,r){var n=JI.isH265VideoFrame(t),i=JI.getNALUnits(new zI(t.data),n);cf(i).call(i,(function(t){if(t.sei){var r=$I.parseSEI($I.removeEPB(t.body),!1);r&&e({data:r,sei:{code:r.type,content:r.payload}})}})),r.enqueue(t)}})}"undefined"!=typeof self&&"DedicatedWorkerGlobalScope"===self.constructor.name&&self.addEventListener("rtctransform",(function(e){var t=e.transformer,r=t.options.port,n=eC((function(e){r.postMessage(e)}));t.readable.pipeThrough(n).pipeTo(e.transformer.writable)}));var tC="IWZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO3ZhciBlPXtnZXROQUxVbml0czpmdW5jdGlvbih0KXt2YXIgbj1hcmd1bWVudHMubGVuZ3RoPjEmJnZvaWQgMCE9PWFyZ3VtZW50c1sxXSYmYXJndW1lbnRzWzFdO2lmKHQubGVuZ3RoLXQucG9zaXRpb248NClyZXR1cm5bXTt2YXIgcj10LnBvc2l0aW9uO3JldHVybiAxPT09dC5nZXRJbnQzMihyKXx8MD09PXQuZ2V0SW50MTYocikmJjE9PT10LmdldEludDgocisyKT9lLmdldEFubmV4Yk5hbHModCxuKTplLmdldEF2Y2NOYWxzKHQsbil9LGdldEFubmV4Yk5hbHM6ZnVuY3Rpb24odCxuKXtmb3IodmFyIHI9W10saT1lLmdldEhlYWRlclBvc2l0aW9uQW5uZXhCKHQpLGE9aS5wb3Msbz1hO2E8dC5sZW5ndGgtNDspe3ZhciB1PW5ldyBVaW50OEFycmF5KHQuYnVmZmVyLnNsaWNlKGEsYStpLmhlYWRlckxlbmd0aCkpO2kucG9zPT09dC5wb3NpdGlvbiYmdC5za2lwKGkuaGVhZGVyTGVuZ3RoKSxvPShpPWUuZ2V0SGVhZGVyUG9zaXRpb25Bbm5leEIodCkpLnBvczt2YXIgcz17aGVhZGVyOnUsYm9keTpuZXcgVWludDhBcnJheSh0LmJ1ZmZlci5zbGljZShhK3UuYnl0ZUxlbmd0aCxvKSksdHlwZTotMX07bj9lLmFuYWx5c2VIMjY1TmFsKHMpOmUuYW5hbHlzZU5hbChzKSwocy50eXBlPD05fHxuJiZzLnR5cGU8PTQwKSYmMCE9PXMudHlwZSYmci5wdXNoKHMpLHQuc2tpcChvLXQucG9zaXRpb24pLGE9b31yZXR1cm4gcn0sZ2V0QXZjY05hbHM6ZnVuY3Rpb24odCxuKXtmb3IodmFyIHI9W107dC5wb3NpdGlvbjx0Lmxlbmd0aC00Oyl7dmFyIGk9dC5nZXRJbnQzMih0LnBvc2l0aW9uKTtpZighKHQubGVuZ3RoLXQucG9zaXRpb24+PWkpKWJyZWFrO3ZhciBhPW5ldyBVaW50OEFycmF5KHQuYnVmZmVyLnNsaWNlKHQucG9zaXRpb24sdC5wb3NpdGlvbis0KSk7dC5za2lwKDQpO3ZhciBvPW5ldyBVaW50OEFycmF5KHQuYnVmZmVyLnNsaWNlKHQucG9zaXRpb24sdC5wb3NpdGlvbitpKSk7dC5za2lwKGkpO3ZhciB1PXtoZWFkZXI6YSxib2R5Om8sdHlwZTotMX07bj9lLmFuYWx5c2VIMjY1TmFsKHUpOmUuYW5hbHlzZU5hbCh1KSx1LnR5cGU8PTkmJjAhPT11LnR5cGUmJnIucHVzaCh1KX1yZXR1cm4gcn0sYW5hbHlzZU5hbDpmdW5jdGlvbihlKXt2YXIgdD0zMSZlLmJvZHlbMF07c3dpdGNoKGUudHlwZT10LHQpe2Nhc2UgMTplLm5kcj0hMDticmVhaztjYXNlIDU6ZS5pZHI9ITA7YnJlYWs7Y2FzZSA2OmUuc2VpPSEwO2JyZWFrO2Nhc2UgNzplLnNwcz0hMDticmVhaztjYXNlIDg6ZS5wcHM9ITB9fSxhbmFseXNlSDI2NU5hbDpmdW5jdGlvbihlKXt2YXIgdD0oMTI2JmUuYm9keVswXSk+PjE7c3dpdGNoKGUudHlwZT10LHQpe2Nhc2UgMzk6Y2FzZSA0MDplLnNlaT0hMH19LGdldEhlYWRlclBvc2l0aW9uQW5uZXhCOmZ1bmN0aW9uKGUpe2Zvcih2YXIgdD1lLnBvc2l0aW9uLG49MCxyPWUubGVuZ3RoOzMhPT1uJiY0IT09biYmdDxyLTQ7KTA9PT1lLmdldEludDE2KHQpPzE9PT1lLmdldEludDE2KHQrMik/bj00OjE9PT1lLmdldEludDgodCsyKT9uPTM6dCsrOnQrKztyZXR1cm4gdD09PXItNCYmKDA9PT1lLmdldEludDE2KHQpPzE9PT1lLmdldEludDE2KHQrMik/bj00OnQ9cjoodCsrLDA9PT1lLmdldEludDE2KHQpJiYxPT09ZS5nZXRJbnQ4KHQpP249Mzp0PXIpKSx7cG9zOnQsaGVhZGVyTGVuZ3RoOm59fSxpc0gyNjVWaWRlb0ZyYW1lOmZ1bmN0aW9uKGUpe3ZhciB0LG47cmV0dXJuKChudWxsPT09KHQ9ZS5nZXRNZXRhZGF0YSl8fHZvaWQgMD09PXR8fG51bGw9PT0obj10LmNhbGwoZSkpfHx2b2lkIDA9PT1uP3ZvaWQgMDpuLm1pbWVUeXBlKXx8IiIpLnRvTG93ZXJDYXNlKCkuaW5jbHVkZXMoImgyNjUiKX19O2Z1bmN0aW9uIHQoZSl7cmV0dXJuKHQ9ImZ1bmN0aW9uIj09dHlwZW9mIFN5bWJvbCYmInN5bWJvbCI9PXR5cGVvZiBTeW1ib2wuaXRlcmF0b3I/ZnVuY3Rpb24oZSl7cmV0dXJuIHR5cGVvZiBlfTpmdW5jdGlvbihlKXtyZXR1cm4gZSYmImZ1bmN0aW9uIj09dHlwZW9mIFN5bWJvbCYmZS5jb25zdHJ1Y3Rvcj09PVN5bWJvbCYmZSE9PVN5bWJvbC5wcm90b3R5cGU/InN5bWJvbCI6dHlwZW9mIGV9KShlKX1mdW5jdGlvbiBuKGUsdCl7Zm9yKHZhciBuPTA7bjx0Lmxlbmd0aDtuKyspe3ZhciBpPXRbbl07aS5lbnVtZXJhYmxlPWkuZW51bWVyYWJsZXx8ITEsaS5jb25maWd1cmFibGU9ITAsInZhbHVlImluIGkmJihpLndyaXRhYmxlPSEwKSxPYmplY3QuZGVmaW5lUHJvcGVydHkoZSxyKGkua2V5KSxpKX19ZnVuY3Rpb24gcihlKXt2YXIgdD1mdW5jdGlvbihlLHQpe2lmKCJvYmplY3QiIT10eXBlb2YgZXx8bnVsbD09PWUpcmV0dXJuIGU7dmFyIG49ZVtTeW1ib2wudG9QcmltaXRpdmVdO2lmKHZvaWQgMCE9PW4pe3ZhciByPW4uY2FsbChlLHR8fCJkZWZhdWx0Iik7aWYoIm9iamVjdCIhPXR5cGVvZiByKXJldHVybiByO3Rocm93IG5ldyBUeXBlRXJyb3IoIkBAdG9QcmltaXRpdmUgbXVzdCByZXR1cm4gYSBwcmltaXRpdmUgdmFsdWUuIil9cmV0dXJuKCJzdHJpbmciPT09dD9TdHJpbmc6TnVtYmVyKShlKX0oZSwic3RyaW5nIik7cmV0dXJuInN5bWJvbCI9PXR5cGVvZiB0P3Q6U3RyaW5nKHQpfXZhciBpPWZ1bmN0aW9uKCl7ZnVuY3Rpb24gZSh0KXt2YXIgbixpLGE7IWZ1bmN0aW9uKGUsdCl7aWYoIShlIGluc3RhbmNlb2YgdCkpdGhyb3cgbmV3IFR5cGVFcnJvcigiQ2Fubm90IGNhbGwgYSBjbGFzcyBhcyBhIGZ1bmN0aW9uIil9KHRoaXMsZSksbj10aGlzLGE9MCwoaT1yKGk9Il9wb3NpdGlvbiIpKWluIG4/T2JqZWN0LmRlZmluZVByb3BlcnR5KG4saSx7dmFsdWU6YSxlbnVtZXJhYmxlOiEwLGNvbmZpZ3VyYWJsZTohMCx3cml0YWJsZTohMH0pOm5baV09YSx0aGlzLl9kYXRhdmlldz1uZXcgRGF0YVZpZXcodCl9dmFyIHQsaSxhO3JldHVybiB0PWUsYT1be2tleToicmVhZEJ5dGUiLHZhbHVlOmZ1bmN0aW9uKGUsdCxuKXt2YXIgcjtzd2l0Y2godCl7Y2FzZSAxOnI9bj9lLmdldEludDgoZS5wb3NpdGlvbik6ZS5nZXRVaW50OChlLnBvc2l0aW9uKTticmVhaztjYXNlIDI6cj1uP2UuZ2V0SW50MTYoZS5wb3NpdGlvbik6ZS5nZXRVaW50MTYoZS5wb3NpdGlvbik7YnJlYWs7Y2FzZSAzOmlmKG4pdGhyb3cgbmV3IEVycm9yKCJub3Qgc3VwcG9ydGVkIGZvciByZWFkQnl0ZSAzIik7cj1lLmdldFVpbnQ4KGUucG9zaXRpb24pPDwxNixyfD1lLmdldFVpbnQ4KGUucG9zaXRpb24rMSk8PDgscnw9ZS5nZXRVaW50OChlLnBvc2l0aW9uKzIpO2JyZWFrO2Nhc2UgNDpyPW4/ZS5nZXRJbnQzMihlLnBvc2l0aW9uKTplLmdldFVpbnQzMihlLnBvc2l0aW9uKTticmVhaztjYXNlIDg6aWYobil0aHJvdyBuZXcgRXJyb3IoIm5vdCBzdXBwb3J0ZWQgZm9yIHJlYWRCb2R5IDgiKTtyPWUuZ2V0VWludDMyKGUucG9zaXRpb24pPDwzMixyfD1lLmdldFVpbnQzMihlLnBvc2l0aW9uKzQpO2JyZWFrO2RlZmF1bHQ6cj0iIn1yZXR1cm4gZS5wb3NpdGlvbis9dCxyfX1dLChpPVt7a2V5OiJsZW5ndGgiLGdldDpmdW5jdGlvbigpe3JldHVybiB0aGlzLmJ1ZmZlci5ieXRlTGVuZ3RofX0se2tleToiYnVmZmVyIixnZXQ6ZnVuY3Rpb24oKXtyZXR1cm4gdGhpcy5fZGF0YXZpZXcuYnVmZmVyfX0se2tleToicG9zaXRpb24iLGdldDpmdW5jdGlvbigpe3JldHVybiB0aGlzLl9wb3NpdGlvbn0sc2V0OmZ1bmN0aW9uKGUpe3RoaXMuX3Bvc2l0aW9uPWV9fSx7a2V5OiJiYWNrIix2YWx1ZTpmdW5jdGlvbihlKXt0aGlzLnBvc2l0aW9uLT1lfX0se2tleToiZ2V0VWludDgiLHZhbHVlOmZ1bmN0aW9uKGUpe3JldHVybiB0aGlzLl9kYXRhdmlldy5nZXRVaW50OChlKX19LHtrZXk6ImdldEludDgiLHZhbHVlOmZ1bmN0aW9uKGUpe3JldHVybiB0aGlzLl9kYXRhdmlldy5nZXRJbnQ4KGUpfX0se2tleToiZ2V0SW50MTYiLHZhbHVlOmZ1bmN0aW9uKGUpe3JldHVybiB0aGlzLl9kYXRhdmlldy5nZXRJbnQxNihlKX19LHtrZXk6ImdldFVpbnQxNiIsdmFsdWU6ZnVuY3Rpb24oZSl7cmV0dXJuIHRoaXMuX2RhdGF2aWV3LmdldFVpbnQxNihlKX19LHtrZXk6ImdldFVpbnQzMiIsdmFsdWU6ZnVuY3Rpb24oZSl7cmV0dXJuIHRoaXMuX2RhdGF2aWV3LmdldFVpbnQzMihlKX19LHtrZXk6ImdldEludDMyIix2YWx1ZTpmdW5jdGlvbihlKXtyZXR1cm4gdGhpcy5fZGF0YXZpZXcuZ2V0SW50MzIoZSl9fSx7a2V5OiJza2lwIix2YWx1ZTpmdW5jdGlvbih0KXtmb3IodmFyIG49TWF0aC5mbG9vcih0LzQpLHI9dCU0LGk9MDtpPG47aSsrKWUucmVhZEJ5dGUodGhpcyw0KTtyPjAmJmUucmVhZEJ5dGUodGhpcyxyKX19LHtrZXk6InJlYWRVaW50OCIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDEpfX0se2tleToicmVhZFVpbnQxNiIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDIpfX0se2tleToicmVhZFVpbnQyNCIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDMpfX0se2tleToicmVhZFVpbnQzMiIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDQpfX0se2tleToicmVhZFVpbnQ2NCIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDgpfX0se2tleToicmVhZEludDgiLHZhbHVlOmZ1bmN0aW9uKCl7cmV0dXJuIGUucmVhZEJ5dGUodGhpcywxLCEwKX19LHtrZXk6InJlYWRJbnQxNiIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDIsITApfX0se2tleToicmVhZEludDMyIix2YWx1ZTpmdW5jdGlvbigpe3JldHVybiBlLnJlYWRCeXRlKHRoaXMsNCwhMCl9fSx7a2V5OiJ3cml0ZVVpbnQzMiIsdmFsdWU6ZnVuY3Rpb24oZSl7cmV0dXJuIG5ldyBVaW50OEFycmF5KFtlPj4+MjQmMjU1LGU+Pj4xNiYyNTUsZT4+PjgmMjU1LDI1NSZlXSl9fV0pJiZuKHQucHJvdG90eXBlLGkpLGEmJm4odCxhKSxPYmplY3QuZGVmaW5lUHJvcGVydHkodCwicHJvdG90eXBlIix7d3JpdGFibGU6ITF9KSxlfSgpO2Z1bmN0aW9uIGEoZSxuKXtmb3IodmFyIHI9MDtyPG4ubGVuZ3RoO3IrKyl7dmFyIGk9bltyXTtpLmVudW1lcmFibGU9aS5lbnVtZXJhYmxlfHwhMSxpLmNvbmZpZ3VyYWJsZT0hMCwidmFsdWUiaW4gaSYmKGkud3JpdGFibGU9ITApLE9iamVjdC5kZWZpbmVQcm9wZXJ0eShlLChhPWkua2V5LG89dm9pZCAwLG89ZnVuY3Rpb24oZSxuKXtpZigib2JqZWN0IiE9PXQoZSl8fG51bGw9PT1lKXJldHVybiBlO3ZhciByPWVbU3ltYm9sLnRvUHJpbWl0aXZlXTtpZih2b2lkIDAhPT1yKXt2YXIgaT1yLmNhbGwoZSxufHwiZGVmYXVsdCIpO2lmKCJvYmplY3QiIT09dChpKSlyZXR1cm4gaTt0aHJvdyBuZXcgVHlwZUVycm9yKCJAQHRvUHJpbWl0aXZlIG11c3QgcmV0dXJuIGEgcHJpbWl0aXZlIHZhbHVlLiIpfXJldHVybigic3RyaW5nIj09PW4/U3RyaW5nOk51bWJlcikoZSl9KGEsInN0cmluZyIpLCJzeW1ib2wiPT09dChvKT9vOlN0cmluZyhvKSksaSl9dmFyIGEsb31mdW5jdGlvbiBvKGUpe3ZhciB0PWFyZ3VtZW50cy5sZW5ndGg+MSYmdm9pZCAwIT09YXJndW1lbnRzWzFdP2FyZ3VtZW50c1sxXTowO3JldHVybihlW3RdPDwyND4+PjApKyhlW3QrMV08PDE2KSsoZVt0KzJdPDw4KSsoZVt0KzNdfHwwKX12YXIgdT1mdW5jdGlvbigpe2Z1bmN0aW9uIGUoKXshZnVuY3Rpb24oZSx0KXtpZighKGUgaW5zdGFuY2VvZiB0KSl0aHJvdyBuZXcgVHlwZUVycm9yKCJDYW5ub3QgY2FsbCBhIGNsYXNzIGFzIGEgZnVuY3Rpb24iKX0odGhpcyxlKX12YXIgdCxuLHI7cmV0dXJuIHQ9ZSxyPVt7a2V5OiJwYXJzZUFubmV4QiIsdmFsdWU6ZnVuY3Rpb24oZSl7dmFyIHQ9ZS5ieXRlTGVuZ3RoLTEsbj0wO2Rve2lmKDAhPT1lW3RdKWJyZWFrO24rKyx0LS19d2hpbGUodD4wKTtuPj0zJiYoZT1lLnN1YmFycmF5KDAsdCsxKSk7Zm9yKHZhciByPWUubGVuZ3RoLGk9MixhPTA7bnVsbCE9PWVbaV0mJnZvaWQgMCE9PWVbaV0mJjEhPT1lW2ldOylpKys7aWYoKGE9MisgKytpKT49cilyZXR1cm5bXTtmb3IodmFyIG89W107YTxyOylzd2l0Y2goZVthXSl7Y2FzZSAwOmlmKDAhPT1lW2EtMV0pe2ErPTI7YnJlYWt9aWYoMCE9PWVbYS0yXSl7YSsrO2JyZWFrfWlmKGE8ci0xJiYxIT09ZVthKzFdKXthKys7YnJlYWt9aSE9PWEtMiYmby5wdXNoKGUuc3ViYXJyYXkoaSxhLTIpKTtkb3thKyt9d2hpbGUoMSE9PWVbYV0mJmE8cik7YT0oaT1hKzEpKzI7YnJlYWs7Y2FzZSAxOmlmKDAhPT1lW2EtMV18fDAhPT1lW2EtMl0pe2ErPTM7YnJlYWt9aSE9PWEtMiYmby5wdXNoKGUuc3ViYXJyYXkoaSxhLTIpKSxhPShpPWErMSkrMjticmVhaztkZWZhdWx0OmErPTN9cmV0dXJuIGk8ciYmby5wdXNoKGUuc3ViYXJyYXkoaSkpLG99fSx7a2V5OiJwYXJzZUF2Y0MiLHZhbHVlOmZ1bmN0aW9uKGUpe3ZhciB0PWFyZ3VtZW50cy5sZW5ndGg+MSYmdm9pZCAwIT09YXJndW1lbnRzWzFdP2FyZ3VtZW50c1sxXTo0O2lmKCEoZS5sZW5ndGg8NCkpe2Zvcih2YXIgbixyPWUubGVuZ3RoLGk9W10sYT0wO2ErdDxyOylpZihuPW8oZSxhKSwzPT09dCYmKG4+Pj49OCksYSs9dCxuKXtpZihhK24+cilicmVhaztpLnB1c2goZS5zdWJhcnJheShhLGErbikpLGErPW59cmV0dXJuIGl9fX0se2tleToicGFyc2VTRUkiLHZhbHVlOmZ1bmN0aW9uKGUsdCl7Zm9yKHZhciBuPWUubGVuZ3RoLHI9dD8yOjEsaT0wLGE9MCxvPSIiOzI1NT09PWVbcl07KWkrPTI1NSxyKys7Zm9yKGkrPWVbcisrXTsyNTU9PT1lW3JdOylhKz0yNTUscisrO2lmKGErPWVbcisrXSw1PT09aSYmbj5yKzE2KWZvcih2YXIgdT0wO3U8MTY7dSsrKW8rPWVbcl0udG9TdHJpbmcoMTYpLHIrKztyZXR1cm57cGF5bG9hZDplLnN1YmFycmF5KHIscithKSx0eXBlOmksc2l6ZTphLHV1aWQ6b319fSx7a2V5OiJyZW1vdmVFUEIiLHZhbHVlOmZ1bmN0aW9uKGUpe2Zvcih2YXIgdD1lLmJ5dGVMZW5ndGgsbj1bXSxyPTE7cjx0LTI7KTA9PT1lW3JdJiYwPT09ZVtyKzFdJiYzPT09ZVtyKzJdPyhuLnB1c2gocisyKSxyKz0yKTpyKys7aWYoIW4ubGVuZ3RoKXJldHVybiBlO3ZhciBpPXQtbi5sZW5ndGgsYT1uZXcgVWludDhBcnJheShpKSxvPTA7Zm9yKHI9MDtyPGk7bysrLHIrKylvPT09blswXSYmKG8rKyxuLnNoaWZ0KCkpLGFbcl09ZVtvXTtyZXR1cm4gYX19XSwobj1udWxsKSYmYSh0LnByb3RvdHlwZSxuKSxyJiZhKHQsciksT2JqZWN0LmRlZmluZVByb3BlcnR5KHQsInByb3RvdHlwZSIse3dyaXRhYmxlOiExfSksZX0oKTsidW5kZWZpbmVkIiE9dHlwZW9mIHNlbGYmJiJEZWRpY2F0ZWRXb3JrZXJHbG9iYWxTY29wZSI9PT1zZWxmLmNvbnN0cnVjdG9yLm5hbWUmJnNlbGYuYWRkRXZlbnRMaXN0ZW5lcigicnRjdHJhbnNmb3JtIiwoZnVuY3Rpb24odCl7dmFyIG4scj10LnRyYW5zZm9ybWVyLGE9ci5vcHRpb25zLnBvcnQsbz0obj1mdW5jdGlvbihlKXthLnBvc3RNZXNzYWdlKGUpfSxuZXcgVHJhbnNmb3JtU3RyZWFtKHt0cmFuc2Zvcm06ZnVuY3Rpb24odCxyKXt2YXIgYT1lLmlzSDI2NVZpZGVvRnJhbWUodCk7ZS5nZXROQUxVbml0cyhuZXcgaSh0LmRhdGEpLGEpLmZvckVhY2goKGZ1bmN0aW9uKGUpe2lmKGUuc2VpKXt2YXIgdD11LnBhcnNlU0VJKHUucmVtb3ZlRVBCKGUuYm9keSksITEpO3QmJm4oe2RhdGE6dCxzZWk6e2NvZGU6dC50eXBlLGNvbnRlbnQ6dC5wYXlsb2FkfX0pfX0pKSxyLmVucXVldWUodCl9fSkpO3IucmVhZGFibGUucGlwZVRocm91Z2gobykucGlwZVRvKHQudHJhbnNmb3JtZXIud3JpdGFibGUpfSkpfSgpOwo=",rC="undefined"!=typeof window&&window.Blob&&new Blob([atob(tC)],{type:"text/javascript;charset=utf-8"});function nC(){var e=rC&&(ok||window.webkitURL).createObjectURL(rC);try{return e?new Worker(e,{}):new Worker("data:application/javascript;base64,"+tC,{type:"module"})}finally{e&&(ok||window.webkitURL).revokeObjectURL(e)}}var iC=function(){function e(){xg(this,e),Og(this,"_audioStallTimer",null),Og(this,"_preSample",null),Og(this,"_isStallInPreReportEnd",!1),Og(this,"_stallList",[]),Og(this,"_audioTransceiver",null)}var t,r;return Lg(e,[{key:"start",value:function(t){this.stop(),this._audioTransceiver=t,e.interval>=100&&this._startStallCountInterval()}},{key:"stop",value:function(){this._stallList=[],this._audioStallTimer&&(clearTimeout(this._audioStallTimer),this._audioStallTimer=null)}},{key:"destroy",value:function(){this.stop(),this._audioTransceiver=null}},{key:"getAudioStallInfo",value:(r=Tg(kg().mark((function e(){var t,r;return kg().wrap((function(e){for(var n;;)switch(e.prev=e.next){case 0:return t={stats_count:Nc(n=this._stallList).call(n,(function(e){return e.get_stats_cost})).length,stall_list:Vg(this._stallList)},e.prev=1,e.next=4,this._audioStallCount();case 4:e.next=8;break;case 6:e.prev=6,e.t0=e.catch(1);case 8:return r=oC(this._stallList,2,this._isStallInPreReportEnd),this._isStallInPreReportEnd=r.isStallInEnd,this.stop(),this._startStallCountInterval(),e.abrupt("return",{stallCount:r.stall_count,stallDuration:r.stall_duration,list:r.list,extra:t});case 13:case"end":return e.stop()}}),e,this,[[1,6]])}))),function(){return r.apply(this,arguments)})},{key:"_startStallCountInterval",value:function(){var t=this,r=function(){var n=Tg(kg().mark((function n(){return kg().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return clearTimeout(t._audioStallTimer),t._audioStallTimer=null,n.next=4,t._audioStallCount();case 4:t._audioStallTimer||(t._audioStallTimer=c_(r,e.interval));case 5:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}();this._audioStallTimer=c_(r,e.interval)}},{key:"_audioStallCount",value:(t=Tg(kg().mark((function t(){var r,n,i,o,a,s,u,l,c,f,d,p,h,v,m,y,g;return kg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(this._preSample&&_x()-this._preSample.ts<.5*e.interval)){t.next=2;break}return t.abrupt("return");case 2:return r=_x(),o=0,t.prev=4,t.next=7,null===(a=this._audioTransceiver)||void 0===a?void 0:a.receiver.getStats();case 7:null==(s=t.sent)||cf(s).call(s,(function(e){"inbound-rtp"===e.type&&(n=e),o++})),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(4),i=t.t0.message||Fx(t.t0);case 14:if(this._preSample){t.next=17;break}return this._preSample={ts:_x(),concealedSamples:(null===(u=n)||void 0===u?void 0:u.concealedSamples)||0,totalSamplesReceived:(null===(l=n)||void 0===l?void 0:l.totalSamplesReceived)||0},t.abrupt("return");case 17:c=_x(),f=_x(),d=f-this._preSample.ts,n?(h=(p=n).concealedSamples,v=p.totalSamplesReceived,m=h-this._preSample.concealedSamples,y=v-this._preSample.totalSamplesReceived,g=m>=0&&y>=0&&m>=e.ratio*y,this._stallList.push({concealed:m,received:y,diff:d,start:this._preSample.ts,end:f,get_stats_cost:c-r,get_stats_start:r,get_stats_end:c,is_stall:g}),this._preSample.concealedSamples=h,this._preSample.totalSamplesReceived=v,this._preSample.ts=f):this._stallList.push({diff:d,start:this._preSample.ts,end:f,get_stats_cost:c-r,get_stats_start:r,get_stats_end:c,reason:o?i||"no inbound-rtp":"no report"});case 21:case"end":return t.stop()}}),t,this,[[4,11]])}))),function(){return t.apply(this,arguments)})}]),e}();Og(iC,"interval",100),Og(iC,"ratio",.6);var oC=function(e,t,r){for(var n,i={stall_count:0,stall_duration:0,isStallInEnd:!1,list:[]},o=0,a=0,s=function(r){var n=e[r];n.is_stall&&(o++,a+=n.diff||0);var s=r===e.length-1;if(!n.is_stall||s){var l=o>=t,c=r+t-o-1;if(!l&&o>2){var f,d=0;cf(f=hy(e).call(e,r+1,c+1)).call(f,(function(e){e.is_stall&&(d+=e.diff||0)})),(l=a+d>iC.interval*t*iC.ratio)&&(r=c,a+=d)}l&&(i.stall_count++,i.stall_duration+=a,i.list.push(a)),s&&(i.isStallInEnd=l),o=a=0}u=r},u=0;u<e.length;u++)s(u);return!0===(null===(n=e[0])||void 0===n?void 0:n.is_stall)&&r&&i.stall_count>0&&i.stall_count--,i};function aC(){var e=navigator.userAgent;return null!==e.match("Safari")&&null===e.match("Chrome")}function sC(){return null!==navigator.userAgent.match("Firefox")}var uC=function(){function e(){var t=this;xg(this,e),Og(this,"_handleVisibilityChange",(function(){"hidden"===document.visibilityState&&t._framePause()})),Og(this,"_framePause",(function(){if(t._prePts){var e=performance.now(),r=e-t._prePts;t._stallList.push({playTime:e,timeUpdateInterval:Math.round(r)}),t._prePts=void 0}})),this._removeHandler=void 0,this._remotePlayPauseHandler=void 0,this._prePts=void 0,this._stallList=void 0,this._videoInWaiting100ms=!1,this._videoInWaiting500ms=!1,this._isPaused=void 0,this._pauseStart=0,this._pauseDuration=0,this._requestVideoFrameCallbackTimer=void 0,this._player=void 0,this._stallTimeThreshold={stall500ms:aC()||sC()?550:500,stall100ms:100},this._support100msStall="undefined"!=typeof window&&"function"==typeof HTMLVideoElement.prototype.requestVideoFrameCallback}return Lg(e,[{key:"start",value:function(e){var t=this;if(this._player=e,this._support100msStall){var r;if(e)this._requestVideoFrameCallbackTimer=e.requestVideoFrameCallback(Iy(r=this._onVideoRefresh).call(r,this)),this._removeHandler=function(){t._requestVideoFrameCallbackTimer&&e.cancelVideoFrameCallback(t._requestVideoFrameCallbackTimer)}}else{var n=function(){return t._onVideoTimeupdate(e)};e.addEventListener("timeupdate",n),this._removeHandler=function(){return e.removeEventListener("timeupdate",n)}}var i=function(){return t._onVideoPause()};e.addEventListener("pause",i);var o=function(){return t._onVideoPlay()};e.addEventListener("play",o),this._remotePlayPauseHandler=function(){e.removeEventListener("pause",i),e.removeEventListener("play",o)},document.addEventListener("visibilitychange",this._handleVisibilityChange),document.addEventListener("pagehide",this._framePause())}},{key:"stop",value:function(){delete this._player,this._removeHandler&&this._removeHandler(),delete this._removeHandler,this._remotePlayPauseHandler&&this._remotePlayPauseHandler(),delete this._remotePlayPauseHandler,delete this._stallList,delete this._prePts,this._videoInWaiting100ms=!1,this._videoInWaiting500ms=!1,document.removeEventListener("visibilitychange",this._handleVisibilityChange),document.removeEventListener("pagehide",this._framePause())}},{key:"destroy",value:function(){this.stop()}},{key:"getStallInfo",value:function(e){var t=this,r=e.interval,n=e.frameRateReceived,i=e.frameRateDecoded,o=e.bitrate,a={pts:0,stall:{stallCount500ms:0,stallDuration500ms:0,stallRate500ms:0,stallCount100ms:0,stallDuration100ms:0,stallRate100ms:0},pauseDuration:this._getPauseDuration()};if(this._stallList&&"visible"===document.visibilityState&&!this._isPaused){var s;if((aC()||sC())&&(0===o||(i||1/0)<=1||(n||1/0)<=1)||0===this._stallList.length)a.stall.stallDuration500ms=r,a.stall.stallCount500ms=this._videoInWaiting500ms?0:1,a.stall.stallRate500ms=1,this._videoInWaiting500ms=!0,this._support100msStall&&(a.stall.stallDuration100ms=r,a.stall.stallCount100ms=this._videoInWaiting100ms?0:1,a.stall.stallRate100ms=1,this._videoInWaiting100ms=!0);else cf(s=this._stallList).call(s,(function(e,n){var i=e.timeUpdateInterval,o=e.playTime,s=i;0===n&&(t._videoInWaiting100ms||t._videoInWaiting500ms)&&(s=Math.round(i%r)),i>t._stallTimeThreshold.stall500ms?(a.stall.stallDuration500ms+=s,t._videoInWaiting500ms||a.stall.stallCount500ms++,t._videoInWaiting500ms=!0):t._videoInWaiting500ms=!1,t._support100msStall&&(i>t._stallTimeThreshold.stall100ms?(a.stall.stallDuration100ms+=s,t._videoInWaiting100ms||a.stall.stallCount100ms++,t._videoInWaiting100ms=!0):t._videoInWaiting100ms=!1),a.pts=o}));var u=a.stall,l=u.stallDuration500ms,c=u.stallDuration100ms;a.stall.stallRate500ms=Math.min(Number((l/r).toFixed(4)),1),this._support100msStall?a.stall.stallRate100ms=Math.min(Number((c/r).toFixed(4)),1):(delete a.stall.stallRate100ms,delete a.stall.stallCount100ms,delete a.stall.stallDuration100ms),this._stallList=[]}return a}},{key:"_getPauseDuration",value:function(){var e=this._pauseDuration;if(this._pauseDuration=0,this._isPaused){var t=_x(),r=t-(this._pauseStart||0);r>500&&(this._pauseStart=t,e+=r)}return e}},{key:"_onVideoPause",value:function(){this._isPaused=!0,this._pauseStart=_x(),this._framePause()}},{key:"_onVideoPlay",value:function(){this._isPaused=!1;var e=_x()-this._pauseStart;e>500&&(this._pauseDuration+=e)}},{key:"_onVideoTimeupdate",value:function(e){if(e&&0!==e.currentTime)if(void 0!==this._prePts){if(this._stallList||(this._stallList=[]),e.currentTime>this._prePts){var t=e.currentTime-this._prePts;this._stallList.push({playTime:e.currentTime,timeUpdateInterval:Math.round(1e3*t)})}this._prePts=e.currentTime}else this._prePts=e.currentTime}},{key:"_onVideoRefresh",value:function(e,t){if(this._stallList||(this._stallList=[]),this._prePts){var r=t.presentationTime-this._prePts;this._stallList.push({playTime:t.presentationTime,timeUpdateInterval:Math.round(r)})}var n;(this._prePts=t.presentationTime,this._player)&&this._player.requestVideoFrameCallback(Iy(n=this._onVideoRefresh).call(n,this))}}]),e}();function lC(e){return cC.apply(this,arguments)}function cC(){return(cC=Tg(kg().mark((function e(t){var r,n;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={},e.next=3,t;case 3:return n=e.sent,r.timestamp=_x(),null==n||cf(n).call(n,(function(e){"inbound-rtp"===e.type?(r.packetsLost=e.packetsLost,r.packetsReceived=e.packetsReceived,r.bytesReceived=e.bytesReceived,void 0!==e.jitterBufferDelay&&(r.jitterBufferDelay=e.jitterBufferDelay,r.jitterBufferEmittedCount=e.jitterBufferEmittedCount),void 0!==e.totalSamplesReceived&&(r.totalSamplesReceived=e.totalSamplesReceived,r.concealedSamples=e.concealedSamples,r.silentConcealedSamples=e.silentConcealedSamples,r.concealmentEvents=e.concealmentEvents),void 0!==e.fecPacketsReceived&&(r.fecPacketsReceived=e.fecPacketsReceived),void 0!==e.estimatedPlayoutTimestamp&&(r.estimatedPlayoutTimestamp=e.estimatedPlayoutTimestamp),void 0!==e.totalSamplesDuration&&(r.totalSamplesDuration=e.totalSamplesDuration)):"codec"===e.type?(r.recordSampleRate=e.clockRate,e.channels&&(r.numChannels=e.channels),r.codecType=e.mimeType):"candidate-pair"===e.type?(r.rtt=1e3*e.currentRoundTripTime,r.total_rtt=1e3*e.totalRoundTripTime):"track"===e.type&&void 0!==e.audioLevel||e.type})),e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fC(e,t){var r=vC(e,t,"timestamp"),n=vC(e,t,"packetsLost"),i=Math.round(vC(e,t,"jitterBufferDelay")/vC(e,t,"jitterBufferEmittedCount")*1e3),o=vC(e,t,"packetsReceived");return{audioLossRate:+(n/(o+n)).toFixed(2),receivedKBitrate:+(8*vC(e,t,"bytesReceived")/r).toFixed(2),statsInterval:r,rtt:t.rtt||0,jitterBufferDelay:i,packetsReceived:o,numChannels:t.numChannels||1,estimatedPlayoutTimestamp:t.estimatedPlayoutTimestamp,samplesDuration:Math.round(1e3*vC(e,t,"totalSamplesDuration")),receivedSampleRate:vC(e,t,"totalSamplesReceived")/r,concealedSamples:Math.round(vC(e,t,"concealedSamples")),concealmentEvent:Math.round(vC(e,t,"concealmentEvents")),e2eDelay:Math.round(t.rtt+i)}}function dC(e){return pC.apply(this,arguments)}function pC(){return(pC=Tg(kg().mark((function e(t){var r,n;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={},e.next=3,t;case 3:return n=e.sent,r.timestamp=_x(),null==n||cf(n).call(n,(function(e){"inbound-rtp"===e.type?(r.packetsLost=e.packetsLost,r.packetsReceived=e.packetsReceived,r.bytesReceived=e.bytesReceived,r.framesDecoded=e.framesDecoded,r.totalDecodeTime=e.totalDecodeTime,r.framesReceived=e.framesReceived,r.keyFramesDecoded=e.keyFramesDecoded,r.framesDropped=e.framesDropped,r.firCount=e.firCount,r.nackCount=e.nackCount,r.pliCount=e.pliCount,void 0!==e.jitterBufferDelay&&(r.jitterBufferEmittedCount=e.jitterBufferEmittedCount,r.jitterBufferDelay=e.jitterBufferDelay),void 0!==e.frameWidth&&(r.width=e.frameWidth,r.height=e.frameHeight),void 0!==e.estimatedPlayoutTimestamp&&(r.estimatedPlayoutTimestamp=e.estimatedPlayoutTimestamp)):"track"===e.type&&void 0!==e.frameWidth?(r.width=e.frameWidth,r.height=e.frameHeight,void 0!==e.framesReceived&&(r.framesReceived=e.framesReceived)):"codec"===e.type?r.codecType=e.mimeType:"candidate-pair"===e.type&&(r.rtt=1e3*e.currentRoundTripTime,r.totalRtt=1e3*e.totalRoundTripTime)})),e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function hC(e,t){var r=vC(e,t,"timestamp"),n=vC(e,t,"packetsLost"),i=vC(e,t,"nackCount"),o=vC(e,t,"packetsReceived"),a=Math.round(vC(e,t,"jitterBufferDelay")/vC(e,t,"jitterBufferEmittedCount")*1e3);return{statsInterval:r,width:t.width||0,height:t.height||0,estimatedPlayoutTimestamp:t.estimatedPlayoutTimestamp,videoLossRate:+n/(vC(e,t,"packetsReceived")+n),receivedKBitrate:+(8*vC(e,t,"bytesReceived")/r).toFixed(2),decoderOutputFrameRate:Math.round(1e3*vC(e,t,"framesDecoded")/r),receivedFrameRate:Math.round(1e3*vC(e,t,"framesReceived")/r),rtt:t.rtt||0,totalRtt:Math.round(t.totalRtt||0),jitterBufferDelay:a,codecType:t.codecType,packetsReceived:o,avgDecodeDelay:Math.round(1e3*vC(e,t,"totalDecodeTime")/vC(e,t,"framesDecoded")),keyFramesDecoded:vC(e,t,"keyFramesDecoded"),framesDropped:vC(e,t,"framesDropped"),firCount:vC(e,t,"firCount"),nackCount:i,pliCount:vC(e,t,"pliCount"),e2eDelay:Math.round(t.rtt+a),retransmittedRate:+(i/(o+n)).toFixed(2)}}function vC(e,t,r){var n=Fk(e[r])?0:+e[r],i=Fk(t[r])?0:+t[r];return Math.max(0,i-n)}var mC=1,yC=2,gC=3,_C=1,bC=2,wC=3,SC=4,kC=5,RC=6,TC=function(){function e(t,r){xg(this,e),Og(this,"_preDownlinkStats",[]),this._peer=t,this._networkQualityParams=r}return Lg(e,[{key:"getDownlinkQuality",value:function(e,t){if(0!==e.receivedKBitrate||0!==t.receivedKBitrate){if("connected"!==this._peer.connectionState&&"connecting"!==this._peer.connectionState||!navigator.onLine)return[RC,{}];var r,n,i,o=this._getQosLevel(e.rtt,e.audioLossRate,t.retransmittedRate),a=this._getDownlinkQoE("audio",e.stallDuration/e.statsInterval,e.e2eDelay),s=this._getNetworkQuality(o,a),u=this._getQosLevel(t.rtt,t.videoLossRate,t.retransmittedRate),l=this._getDownlinkQoE("video",t.stallDuration/t.statsInterval,t.e2eDelay),c=this._getNetworkQuality(u,l),f=s&&c?Math.ceil((s+c)/2):s||c,d=o&&u?Math.ceil((o+u)/2):o||u;if(f)return this._preDownlinkStats=hy(r=Bg(n=[]).call(n,Vg(this._preDownlinkStats),[f])).call(r,-2),[Math.floor(xP(i=this._preDownlinkStats).call(i,(function(e,t){return t+e}),0)/this._preDownlinkStats.length),{qualityQos:d,audioLevel:s,videoLevel:c,audioQos:o,audioQoe:a,videoQos:u,videoQoe:l}]}}},{key:"destroy",value:function(){this._preDownlinkStats=[]}},{key:"_getQosLevel",value:function(e,t,r){var n,i=this._networkQualityParams.networkQos;return n=(!e||e<=i[_C].maxRtt)&&t<=i[_C].maxLoss?_C:(!e||e<=i[bC].maxRtt)&&t<=i[bC].maxLoss?bC:(!e||e<=i[wC].maxRtt)&&t<=i[wC].maxLoss?wC:(!e||e<=i[SC].maxRtt)&&t<=i[SC].maxLoss?SC:kC,r>i[SC].minRetransmittedRate?n=Math.max(n,SC):r>i[wC].minRetransmittedRate?n=Math.max(n,wC):r>i[bC].minRetransmittedRate&&(n=Math.max(n,bC)),n}},{key:"_getDownlinkQoE",value:function(e,t,r){var n=this._networkQualityParams.networkQoe,i={audio:{delay:n.audioDelay,stallRadio:n.audioStallRadio},video:{delay:n.videoDelay,stallRadio:n.videoStallRadio}}[e];return t>i.stallRadio||r>i.delay||t>i.stallRadio/2&&r>i.delay/2?gC:(t>i.stallRadio/2||i.delay,yC)}},{key:"_getNetworkQuality",value:function(e,t){return t===mC?Math.max(e-2,1):t===yC?e:Math.min(e+1,5)}}]),e}(),xC=new BP("rts"),EC=function(e){Pg(o,e);var t,r,n,i=Ag(o);function o(e){var t;return xg(this,o),Og(jg(t=i.call(this)),"_url",""),Og(jg(t),"_pc",null),Og(jg(t),"_audioTransceicer",null),Og(jg(t),"_videoTransceicer",null),Og(jg(t),"_mediaStream",null),Og(jg(t),"_lastMediaStream",null),Og(jg(t),"_media",null),Og(jg(t),"_opts",null),Og(jg(t),"_loader",null),Og(jg(t),"_networkEvaluate",null),Og(jg(t),"_retry",0),Og(jg(t),"_waitingTimer",0),Og(jg(t),"_rctConnectStartTs",0),Og(jg(t),"_isReplacing",!1),Og(jg(t),"_checkStatsErrorTimer",null),Og(jg(t),"_audioStallObserver",null),Og(jg(t),"_videoStallObserver",null),Og(jg(t),"_networkQuality",null),Og(jg(t),"_preAudioStats",null),Og(jg(t),"_preVideoStats",null),Og(jg(t),"_rtcReportTimer",0),Og(jg(t),"_networkQualityResult",[]),Og(jg(t),"_peerStateTimer",null),Og(jg(t),"_checkStatsError",Tg(kg().mark((function e(){return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t._checkStatsErrorTimer&&clearTimeout(t._checkStatsErrorTimer),t._checkStatsErrorTimer=c_(Tg(kg().mark((function e(){var r,n,i;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getStatsSnapshoot();case 2:(r=e.sent).video&&(n=r.video,i=n.framesDecoded,n.bytesReceived?i||t._emitError(GP.create(jP,WP.MEDIA_ERR_DECODE,{message:"rts decode error"})):t._emitError(GP.create(jP,WP.MEDIA_ERR_DECODE,{message:"rts receive empty"})));case 4:case"end":return e.stop()}}),e)}))),t._opts.checkStatsErrorDelay);case 2:case"end":return e.stop()}}),e)})))),Og(jg(t),"_onTrack",(function(e){xC.log("addTrack: ",e.track,e.streams),t["_".concat(e.track.kind)]=e.track})),Og(jg(t),"_mockWaitingByTimeupdate",(function(){var e,r;"connected"!==(null===(e=t._pc)||void 0===e?void 0:e.connectionState)&&"connected"!==(null===(r=t._pc)||void 0===r?void 0:r.iceConnectionState)||(clearTimeout(t._waitingTimer),t._waitingTimer=c_((function(){var e;null!==(e=t._media)&&void 0!==e&&e.paused||t.emit("waiting")}),t._opts.stallInterval))})),Og(jg(t),"_onLoadedData",(function(){xC.log("loadeddata emit"),t.getStatsSnapshoot().then((function(e){t.emit(vI,{type:"video",elapsed:_x()-t._rctConnectStartTs,meta:e.video}),t.emit(vI,{type:"audio",elapsed:_x()-t._rctConnectStartTs,meta:e.audio})}))})),Og(jg(t),"_setDelay",(function(e){if(t._opts.progressiveSetDelay)t._startSetDelayLoop(e);else{var r,n,i=hk(r=["playoutDelayHint","jitterBufferDelayHint","jitterBufferTarget"]).call(r,(function(e){var r,n;return e in(null===(r=t._audioTransceicer)||void 0===r?void 0:r.receiver)&&e in(null===(n=t._videoTransceicer)||void 0===n?void 0:n.receiver)}));if(!i)return;if(e="number"==typeof e&&e>0?e:null,(null===(n=t._audioTransceicer)||void 0===n?void 0:n.receiver[i])===e)return;t._audioTransceicer.receiver[i]=e,t._videoTransceicer.receiver[i]=e}})),Og(jg(t),"_targetDelayHint",null),Og(jg(t),"_setDelayTimer",null),Og(jg(t),"_setDelayError",null),Og(jg(t),"_startSetDelayLoop",function(){var e=Tg(kg().mark((function e(r){var n,i,o,a,s,u,l,c,f;return kg().wrap((function(e){for(var d;;)switch(e.prev=e.next){case 0:if(n=hk(d=["playoutDelayHint","jitterBufferDelayHint","jitterBufferTarget"]).call(d,(function(e){var r,n;return e in(null===(r=t._audioTransceicer)||void 0===r?void 0:r.receiver)&&e in(null===(n=t._videoTransceicer)||void 0===n?void 0:n.receiver)}))){e.next=3;break}return e.abrupt("return");case 3:if(r="number"==typeof r&&r>0?r:null,t._targetDelayHint!==r){e.next=6;break}return e.abrupt("return");case 6:if(t._targetDelayHint=r,!t._setDelayTimer){e.next=9;break}return e.abrupt("return");case 9:i=null,o=null,a=t._opts.adaptiveJitterBuffer,s=a.loopInterval,u=a.maxAvSyncDelay,l=a.maxJitterBufferDiff,c=a.maxStep,f=0,t._setDelayTimer=fT(Tg(kg().mark((function e(){var r,a,s,d,p,h,v,m,y,g,_,b,w,S,k,R;return kg().wrap((function(e){for(var T,x,E,L,O;;)switch(e.prev=e.next){case 0:if(e.prev=0,null!==(r=t._audioTransceicer)&&void 0!==r&&r.receiver&&null!==(a=t._videoTransceicer)&&void 0!==a&&a.receiver){e.next=5;break}return i=null,o=null,e.abrupt("return");case 5:if((s=t._audioTransceicer.receiver[n])!==t._targetDelayHint){e.next=8;break}return e.abrupt("return");case 8:return d=1e3*t._targetDelayHint,p=1e3*s,e.next=12,Gm.all([lC(t._audioTransceicer.receiver.getStats()),dC(t._videoTransceicer.receiver.getStats())]);case 12:if(h=e.sent,v=Dg(h,2),m=v[0],y=v[1],!i||!o){e.next=36;break}if(g=fC(i,m),(_=hC(o,y)).estimatedPlayoutTimestamp&&g.estimatedPlayoutTimestamp&&(b=_.estimatedPlayoutTimestamp-g.estimatedPlayoutTimestamp),w=g.jitterBufferDelay,S=_.jitterBufferDelay,!w||!S){e.next=36;break}if(!(Math.abs(w-S)>u||b&&Math.abs(b)>u)){e.next=27;break}return f++>8&&S>w&&(t._audioTransceicer.receiver[n]=Math.min(S/1e3,t._targetDelayHint),f=0),xC.log(Bg(T=Bg(x=Bg(E="av_jb_diff(".concat(w-S,"=")).call(E,w,"-")).call(x,S,") or av_sync_diff(")).call(T,b,") too much, skip setting")),e.abrupt("return");case 27:if(f=0,null===s||!(Math.abs(w-p)>l||Math.abs(S-p)>l)){e.next=31;break}return xC.log(Bg(L="audio(".concat(w-p,"),video(")).call(L,S-p,"). current_target_diff too much, skip setting")),e.abrupt("return");case 31:k=d>(p||w)?1:-1,R=(R=(Math.abs(d-(p||w))>c?(p||w)+k*c:d)/1e3)>.2?R:null,xC.log(Bg(O="set receiver.".concat(n," = ")).call(O,R)),t._audioTransceicer.receiver[n]=R;case 36:i=m,o=y,e.next=44;break;case 40:e.prev=40,e.t0=e.catch(0),xC.error("set delay loop error:",e.t0),t._setDelayError=e.t0.message||e.t0.toString()||"unknown error";case 44:case"end":return e.stop()}}),e,null,[[0,40]])}))),s);case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),Og(jg(t),"_getDelay",(function(){try{var e,r=hk(e=["playoutDelayHint","jitterBufferDelayHint","jitterBufferTarget"]).call(e,(function(e){return e in t._videoTransceicer.receiver&&e in t._audioTransceicer.receiver}));return t._audioTransceicer.receiver[r]}catch(PC){xC.error("get delay error")}})),Og(jg(t),"_onLoaderRetry",(function(e,r){t.emit(hI,{error:GP.network(e),retryTime:r})})),t._opts=function(e){var t=e||{},r=t.adaptiveJitterBuffer,n=void 0===r?{}:r,i=Zg(t,FI);return Sg({retryCount:0,retryDelay:1e3,loadTimeout:5e3,stallInterval:400,networkEvaluateInterval:1e3,delayHint:0,videoDelaySync:!1,seamlesslyReload:!1,enableSei:!1,enableOriginSdpLogger:!1,checkStatsErrorDelay:5e3,connectionStateChangeTimeout:5e3,enableNetworkQuality:!1,hackCreateOfferIssue:!1,progressiveSetDelay:!1,networkQuality:{networkQos:{1:{maxRtt:250,maxLoss:.15},2:{maxRtt:500,maxLoss:.3,minRetransmittedRate:.2},3:{maxRtt:750,maxLoss:.45,minRetransmittedRate:.35},4:{maxRtt:1e3,maxLoss:.6,minRetransmittedRate:.5}},networkQoe:{audioDelay:2e3,audioStallRadio:.3,videoDelay:2e3,videoStallRadio:.6}},enableAdaptiveJitterBuffer:!1,adaptiveJitterBuffer:Sg({networkWindow:3,windowMethod:"max",loopInterval:500,maxAvSyncDelay:400,maxJitterBufferDiff:500,maxStep:500},n),networkStrategy:{1:{jitterBuffer:null},2:{jitterBuffer:1.5},3:{jitterBuffer:2},4:{jitterBuffer:3},5:{jitterBuffer:3}}},i)}(e),t._media=t._opts.media,t._loader=new TI(Sg(Sg({},e.fetchOptions),{},{responseType:"json",method:"POST",retry:t._opts.retryCount,retryDelay:t._opts.retryDelay,timeout:t._opts.loadTimeout,onRetryError:t._onLoaderRetry,logger:xC})),t._retry=t._opts.retryCount,t._bindMediaEvent(),t._opts.mediaStream&&t._opts.seamlesslyReload&&(t._lastMediaStream=t._opts.mediaStream),t}return Lg(o,[{key:"pc",get:function(){return this._pc}},{key:"audioTrack",get:function(){return this._audio}},{key:"videoTack",get:function(){return this._video}},{key:"loader",get:function(){return this._loader}},{key:"networkStats",get:function(){var e;return null===(e=this._networkEvaluate)||void 0===e?void 0:e.getStats()}},{key:"getStats",value:function(){return NI(this._pc)}},{key:"getStatsSnapshoot",value:function(){return this.getStats().then((function(e){return UI(e)}))}},{key:"load",value:(n=Tg(kg().mark((function e(t){var r,n,i=this;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._disconnect(),this._url=t,this._retry=this._opts.retryCount,!this._opts.hackCreateOfferIssue){e.next=6;break}return e.next=6,this._createEmptyPeer();case 6:return r=YI(),e.prev=7,(n=this._pc)&&n.close(),this._pc=new RTCPeerConnection({encodedInsertableStreams:!(!r||!this._opts.enableSei)||void 0}),this._bindRTCEvents(),e.next=14,this._connect(t);case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(7),c_((function(){return i._emitError(GP.create(DP,null,e.t0))}));case 19:case"end":return e.stop()}}),e,this,[[7,16]])}))),function(e){return n.apply(this,arguments)})},{key:"switchURL",value:function(e){this.load(e||this._url)}},{key:"_bindRTCEvents",value:function(){var e=this,t=this._pc;t.addEventListener("track",this._onTrack),t.addEventListener("connectionstatechange",(function(){if(xC.warn("onconnectionstatechange:",t.connectionState),e._clearPeerStateTimeout(),e.emit(xI,{state:t.connectionState,url:e._url}),"disconnected"!==t.connectionState&&"failed"!==t.connectionState||(e.emit("waiting"),e._stopRtcReport()),"failed"===t.connectionState){if(0===e._retry)return void e._emitError(GP.network(new Error("rtc connect failed")));e._retry--,e.load(e._url)}"connected"===t.connectionState&&(e._handleMediaStream(),e.emit(cI,{url:e._url,responseUrl:e._url,elapsed:_x()-e._rctConnectStartTs}),e._checkStatsError(),e._startRtcReport())}))}},{key:"_handleMediaStream",value:function(){var e=this;if(this._lastMediaStream){var t,r=this._lastMediaStream.getVideoTracks()[0],n=this._lastMediaStream.getAudioTracks()[0];r&&this._lastMediaStream.removeTrack(r),n&&this._lastMediaStream.removeTrack(n),this._mediaStream=this._lastMediaStream,this._audio&&this._mediaStream.addTrack(this._audio),this._video&&this._mediaStream.addTrack(this._video),this._isReplacing=!0,this._media.pause(),null===(t=this._media.play())||void 0===t||t.finally((function(){e._isReplacing=!1}))}else{this._mediaStream=new MediaStream,this._audio&&this._mediaStream.addTrack(this._audio),this._video&&this._mediaStream.addTrack(this._video),this._media.srcObject=this._mediaStream;var i=this._media.play();i&&i.catch&&i.catch((function(e){}))}}},{key:"initVideoEncodedTransform",value:function(){var e=this;if(this._videoTransceicer&&this._videoTransceicer.receiver){var t=this._videoTransceicer.receiver;if(YI()){var r=t.createEncodedStreams(),n=r.readable,i=r.writable;n.pipeThrough(eC((function(t){e.emit(mI,t)}))).pipeTo(i)}else if("undefined"!=typeof TransformStream&&"undefined"!=typeof RTCRtpSender&&"undefined"!=typeof RTCRtpReceiver&&"undefined"!=typeof RTCRtpScriptTransform&&"transform"in RTCRtpSender.prototype&&"transform"in RTCRtpReceiver.prototype&&BI()&&KI()){var o=new nC,a=new MessageChannel;this._videoTransceicer.receiver.transform=new RTCRtpScriptTransform(o,{port:a.port2},[a.port2]),a.port1.onmessage=function(t){e.emit(mI,t.data)}}}else console.log("no receiver found when trying to bind encodedTransform")}},{key:"initAudioEncodedTransform",value:function(){if(this._audioTransceicer&&this._audioTransceicer.receiver)if(YI()){var e=this._audioTransceicer.receiver.createEncodedStreams(),t=e.readable,r=e.writable;t.pipeThrough(new TransformStream({transform:function(e,t){e.data.byteLength<=1e3?t.enqueue(e):xC.log("too large audio frame",e.data.byteLength)}})).pipeTo(r)}else xC.warn("legacy EncodedTransform is not supported");else xC.warn("no receiver found when trying to bind encodedTransform")}},{key:"_bindMediaEvent",value:function(){this._media.addEventListener("timeupdate",this._mockWaitingByTimeupdate),this._media.addEventListener("loadeddata",this._onLoadedData)}},{key:"_connect",value:(r=Tg(kg().mark((function e(){var t,r,n,i,o,a,s,u,l,c,f,d,p,h,v,m;return kg().wrap((function(e){for(var y,g,_,b;;)switch(e.prev=e.next){case 0:if(!(t=this._pc).addTransceiver){e.next=11;break}return this._audioTransceicer=t.addTransceiver("audio",{direction:"recvonly"}),this._videoTransceicer=t.addTransceiver("video",{direction:"recvonly"}),this._setDelay(this._opts.delayHint),this._opts.enableSei&&(this.initVideoEncodedTransform(),this.initAudioEncodedTransform()),e.next=8,t.createOffer();case 8:r=e.sent,e.next=14;break;case 11:return e.next=13,t.createOffer({iceRestart:!0,offerToReceiveAudio:!0,offerToReceiveVideo:!0});case 13:r=e.sent;case 14:return this._opts.hackCreateOfferIssue&&this._createEmptyPeer(),xC.log("local offer"),xC.log(r.sdp),n=LI.parse(r.sdp),cf(y=Nc(g=n.media).call(g,(function(e){return"audio"===e.type}))).call(y,(function(e){var t,r,n,i,o=null===(n=Nc(t=e.rtp).call(t,(function(e){return"opus"===e.codec}))[0])||void 0===n?void 0:n.payload;o&&(cf(r=e.fmtp).call(r,(function(e){e.payload===o&&(e.config="minptime=10;stereo=1;useinbandfec=1")})),null===(i=e.rtcpFb)||void 0===i||i.push({payload:o,type:"nack"}))})),r.sdp=LI.write(n),xC.log("local offer modified:\n",r.sdp),e.next=23,t.setLocalDescription(r);case 23:return i=this._url,e.prev=24,this._opts.preProcessUrl&&(i=this._opts.preProcessUrl(i).url),this._loader.finnalUrl=i,c=/_?session_id=([^&$]+)/.exec(i),f=c?c[1]:_x()+"666",this.emit(fI,{url:i,offersdp:null!==(o=this._opts)&&void 0!==o&&o.enableOriginSdpLogger?r.sdp:void 0,sessionId:f}),d=_x(),e.next=33,this._loader.load(i,{body:Fx({sessionId:f,version:"1.0-html",localSdp:r})});case 33:if(p=e.sent,this.emit(dI,{headers:p.response.headers}),404!==(null==(h=null==p?void 0:p.data)?void 0:h.code)&&403!==(null==h?void 0:h.code)){e.next=41;break}return(v=GP.create(404===h.code?PP:OP,null,h)).errorType=EP,this._emitError(v),e.abrupt("return");case 41:if(200===(null==h?void 0:h.code)){e.next=43;break}throw new Error(Bg(_="code: ".concat(null==h?void 0:h.code,", message:")).call(_,null==h?void 0:h.message));case 43:if(xC.log("answer:"),xC.log(null===(a=h.remoteSdp)||void 0===a?void 0:a.sdp),m=LI.parse(h.remoteSdp.sdp),this.emit(pI,{url:i,elapsed:_x()-d,answersdp:null!==(s=this._opts)&&void 0!==s&&s.enableOriginSdpLogger?null==h||null===(u=h.remoteSdp)||void 0===u?void 0:u.sdp:void 0,parsedSdp:null==m||null===(l=m.media)||void 0===l?void 0:vR(l).call(l,(function(e){return{candidates:e.candidates,rtp:e.rtp,type:e.type}}))}),cf(b=m.media).call(b,(function(e){var t,r;e.fingerprint.hash=e.fingerprint.hash.toUpperCase();var n=null===(t=e.ssrcs)||void 0===t||null===(r=hk(t).call(t,(function(e){return"msid"===e.attribute})))||void 0===r?void 0:r.value;n&&!e.msid&&(e.msid=n)})),h.remoteSdp.sdp=LI.write(m),xC.log("answer modified:\n",h.remoteSdp.sdp),this._rctConnectStartTs=_x(),"closed"!==t.signalingState){e.next=53;break}return e.abrupt("return");case 53:return e.next=55,t.setRemoteDescription(h.remoteSdp);case 55:this._networkEvaluate=new XI(t,this._opts.networkEvaluateInterval),this._listenPeerStateTimeout(),e.next=62;break;case 59:e.prev=59,e.t0=e.catch(24),this._emitError(GP.network(e.t0));case 62:case"end":return e.stop()}}),e,this,[[24,59]])}))),function(){return r.apply(this,arguments)})},{key:"_listenPeerStateTimeout",value:function(){var e=this;this._peerStateTimer&&this._clearPeerStateTimeout(),this._opts.connectionStateChangeTimeout&&(this._peerStateTimer=c_((function(){e._emitError(GP.create(jP,WP.MEDIA_ERR_SRC_NOT_SUPPORTED,{message:"listen connectionstatechange timeout"}))}),this._opts.connectionStateChangeTimeout))}},{key:"_clearPeerStateTimeout",value:function(){clearTimeout(this._peerStateTimer),this._peerStateTimer=null}},{key:"_startRtcReport",value:function(){var e=this;this._stopRtcReport(),this._rtcReportTimer=fT(Tg(kg().mark((function t(){var r,n,i,o,a,s,u,l,c,f,d,p,h,v,m,y,g,_,b;return kg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!==(r=e._audioTransceicer)&&void 0!==r&&r.receiver&&null!==(n=e._videoTransceicer)&&void 0!==n&&n.receiver){t.next=4;break}return e._preAudioStats=null,e._preVideoStats=null,t.abrupt("return");case 4:return!e._audioStallObserver&&e._audioTransceicer&&(e._audioStallObserver=new iC,e._audioStallObserver.start(e._audioTransceicer)),!e._videoStallObserver&&e._video&&(e._videoStallObserver=new uC,e._videoStallObserver.start(e._media)),!e._networkQuality&&e._opts.enableNetworkQuality&&(e._networkQuality=new TC(e._pc,e._opts.networkQuality)),t.next=9,Gm.all([lC(e._audioTransceicer.receiver.getStats()),dC(e._videoTransceicer.receiver.getStats())]);case 9:if(i=t.sent,o=Dg(i,2),a=o[0],s=o[1],!e._preAudioStats||!e._preVideoStats){t.next=26;break}return d=fC(e._preAudioStats,a),p=hC(e._preVideoStats,s),t.next=18,null===(u=e._audioStallObserver)||void 0===u?void 0:u.getAudioStallInfo();case 18:return h=t.sent,t.next=21,null===(l=e._videoStallObserver)||void 0===l?void 0:l.getStallInfo({interval:p.statsInterval,frameRateReceived:p.frameRateReceived,frameRateDecoded:p.frameRateDecoded,bitrate:p.receivedKBitrate});case 21:v=t.sent,m=null!==(c=null===(f=e._networkQuality)||void 0===f?void 0:f.getDownlinkQuality(Sg(Sg({},d),{},{stallDuration:h.stallDuration}),Sg(Sg({},p),{},{stallDuration:v.stall.stallDuration100ms||v.stall.stallDuration500ms})))&&void 0!==c?c:[],y=Dg(m,2),g=y[0],_=y[1],e._opts.enableAdaptiveJitterBuffer&&e._handleJitterBuffer(null==_?void 0:_.qualityQos,e._opts.adaptiveJitterBuffer,e._opts.networkStrategy),p.estimatedPlayoutTimestamp&&d.estimatedPlayoutTimestamp&&(b=p.estimatedPlayoutTimestamp-d.estimatedPlayoutTimestamp),e.emit(EI,{interval:p.statsInterval,network_quality:g,audio_stall_duration:h.stallDuration,audio_stall_count:h.stallCount,audio_stall_time_per_100sec:h.stallDuration/d.statsInterval*100,audio_stall_count_per_100sec:h.stallCount/d.statsInterval*100*1e3,video_stall_duration:v.stall.stallDuration500ms,video_stall_count:v.stall.stallCount500ms,video_stall_duration_100ms:v.stall.stallDuration100ms,video_stall_count_100ms:v.stall.stallCount100ms,video_stall_time_per_100sec:v.stall.stallDuration500ms/p.statsInterval*100,video_stall_count_per_100sec:v.stall.stallCount500ms/p.statsInterval*100*1e3,rtt:p.rtt,video_jb_delay:p.jitterBufferDelay,audio_jb_delay:d.jitterBufferDelay,audio_lost_rate:d.audioLossRate,video_lost_rate:p.videoLossRate,video_retransmitted_rate:p.retransmittedRate,quality_audio_level:null==_?void 0:_.audioLevel,quality_video_level:null==_?void 0:_.videoLevel,quality_audio_qos:null==_?void 0:_.audioQos,quality_video_qos:null==_?void 0:_.videoQos,quality_qos:null==_?void 0:_.qualityQos,quality_audio_qoe:null==_?void 0:_.audioQoe,quality_video_qoe:null==_?void 0:_.videoQoe,current_delay:e._getDelay(),visibility_state:document.visibilityState,target_delay:e._targetDelayHint,av_sync_diff:b,set_delay_error:e._setDelayError||null});case 26:e._preAudioStats=a,e._preVideoStats=s,e.set_delay_error=null;case 29:case"end":return t.stop()}}),t)}))),2e3)}},{key:"_handleJitterBuffer",value:function(e,t,r){var n;this._networkQualityResult.push(e),this._networkQualityResult.length>t.networkWindow&&this._networkQualityResult.shift();var i=Nc(n=this._networkQualityResult).call(n,Boolean);if(i.length===t.networkWindow){var o,a,s;if("min"===t.windowMethod)a=Math.min.apply(Math,Vg(i));else if("max"===t.windowMethod)a=Math.max.apply(Math,Vg(i));else{var u,l=hx(u=Vg(i)).call(u,(function(e,t){return e-t})),c=Math.floor(l.length/2);a=l.length%2!=0?l[c]:(l[c-1]+l[c])/2}if(a&&void 0!==(null===(o=r[a])||void 0===o?void 0:o.jitterBuffer))this._startSetDelayLoop(null===(s=r[a])||void 0===s?void 0:s.jitterBuffer)}}},{key:"_stopRtcReport",value:function(){var e,t,r;null===(e=this._audioStallObserver)||void 0===e||e.destroy(),null===(t=this._videoStallObserver)||void 0===t||t.destroy(),null===(r=this._networkQuality)||void 0===r||r.destroy(),this._audioStallObserver=null,this._videoStallObserver=null,this._networkQuality=null,this._preAudioStats=null,this._preVideoStats=null,this._rtcReportTimer&&(clearInterval(this._rtcReportTimer),this._rtcReportTimer=0)}},{key:"_disconnect",value:function(){var e,t;null===(e=this._loader)||void 0===e||e.cancel(),null===(t=this._networkEvaluate)||void 0===t||t.destroy(),this._stopRtcReport(),clearTimeout(this._checkStatsErrorTimer),this._clearPeerStateTimeout(),this._audioTransceicer=null,this._videoTransceicer=null,this._mediaStream=null,this._networkEvaluate=null}},{key:"_emitError",value:function(e){this.emit(lI,e),clearTimeout(this._checkStatsErrorTimer),this._clearPeerStateTimeout(),this._pc&&(this._pc.close(),this._media&&(this._media.srcObject=null,this._media.removeAttribute("src")))}},{key:"_createEmptyPeer",value:(t=Tg(kg().mark((function e(){var t;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new RTCPeerConnection,e.next=3,t.createOffer();case 3:t.close(),t=null;case 5:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})},{key:"destroy",value:function(e){var t;this._disconnect(),null===(t=this._media)||void 0===t||t.removeEventListener("timeupdate",this._mockWaitingByTimeupdate),this._media&&!e&&(this._media.srcObject=null),this._pc&&this._pc.close(),this._loader=null,this._media=null,this._pc=null,this._opts=null}}],[{key:"enableLogger",value:function(){BP.enable()}},{key:"disableLogger",value:function(){BP.disable()}}]),o}(WR);try{localStorage.getItem("xgd")?EC.enableLogger():EC.disableLogger()}catch(PC){}var LC=function(e){Pg(n,e);var t,r=Ag(n);function n(){var e,t;xg(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Og(jg(t=r.call.apply(r,Bg(e=[this]).call(e,o))),"_rts",null),Og(jg(t),"_mediaStream",null),Og(jg(t),"_disconnectTimer",void 0),Og(jg(t),"_rtsOpts",null),Og(jg(t),"_onPause",(function(){t._disconnectTimer||(t._disconnectTimer=c_((function(){t._closeAfterPause(),t._clearDisconnectTimer()}),1e3*t.config.disconnectTime))})),Og(jg(t),"_reInit",(function(){var e;t._clearDisconnectTimer(),null!==(e=t._rts)&&void 0!==e&&e._pc||(t._init(),t._bindRtsEvents())})),Og(jg(t),"_init",(function(){var e;null===(e=t._rts)||void 0===e||e.destroy();var r=t.player.config,n=r.rts||{};t._rtsOpts=n,t._rts=new EC(Sg({media:t.player.video,mediaStream:t._mediaStream,preProcessUrl:function(e,r){var n,i;return(null===(n=(i=t.player).preProcessUrl)||void 0===n?void 0:n.call(i,e,r))||{url:e,ext:r}}},n)),t._rts.load(r.url)})),Og(jg(t),"_onSwitchURL",(function(e){e&&(t.player.config.url=e),t._rts?t._rts.switchURL(e):t._reInit()})),Og(jg(t),"destroy",(function(){var e;t.player.switchURL=t._originSwitchFn,t._clearDisconnectTimer(),null===(e=t._rts)||void 0===e||e.destroy(),t._rts=null})),t}return Lg(n,[{key:"pc",get:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.pc}},{key:"videoTrack",get:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.videoTack}},{key:"audioTrack",get:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.audioTrack}},{key:"core",get:function(){return this._rts}},{key:"loader",get:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.loader}},{key:"version",get:function(){return"0.2.1-alpha.43"}},{key:"beforePlayerInit",value:function(){var e,t,r,n,i=this;(this._init(),this._originSwitchFn)||(this._originSwitchFn=Iy(n=this.player.switchURL).call(n,this.player));this.player.switchURL=this._onSwitchURL,null===(e=this.player)||void 0===e||e.useHooks("replay",this._onSwitchURL),this.on("urlchange",this._onSwitchURL),this.on("destroy",this.destroy),void 0!==(null===(t=this.player.config)||void 0===t||null===(r=t.rts)||void 0===r?void 0:r.disconnectTime)&&(this.on("pause",(function(){var e;null!==(e=i._rts)&&void 0!==e&&e._isReplacing||i._onPause()})),this.on("play",(function(){var e;null!==(e=i._rts)&&void 0!==e&&e._isReplacing||i._reInit()}))),this._bindRtsEvents();try{Vx.defineGetterOrSetter(this.player,{__url:{get:function(){try{return ok.createObjectURL(new MediaSource)}catch(r){var e,t;null!==(e=i.player)&&void 0!==e&&null!==(t=e.video)&&void 0!==t&&t.srcObject||(i.player.video.srcObject=new MediaStream)}}}})}catch(o){}}},{key:"getStats",value:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.getStats()}},{key:"getStatsSnapshoot",value:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.getStatsSnapshoot()}},{key:"getNetWorkInfo",value:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.networkStats}},{key:"setDelay",value:function(e){var t;null===(t=this._rts)||void 0===t||t._setDelay(e)}},{key:"_clearDisconnectTimer",value:function(){clearTimeout(this._disconnectTimer),this._disconnectTimer=void 0}},{key:"_closeAfterPause",value:function(){var e,t,r;if(null!==(e=this._rts)&&void 0!==e&&e._pc){var n;if(null!==(t=this.config)&&void 0!==t&&t.seamlesslyReload)this._mediaStream=null===(n=this._rts)||void 0===n?void 0:n._mediaStream;null===(r=this._rts)||void 0===r||r.destroy(!0),this._rts=null}}},{key:"_bindRtsEvents",value:function(){this._transErrorEvent(),this._transCoreEvent(fI),this._transCoreEvent(pI),this._transCoreEvent(cI),this._transCoreEvent(dI),this._transCoreEvent(hI),this._transCoreEvent(vI),this._transCoreEvent(mI),this._transCoreEvent(xI),this._transCoreEvent(EI)}},{key:"_transErrorEvent",value:function(){var e=this;this._rts.on(lI,(function(t){if(e.player){var r=new Px(e.player,t),n=e._rtsOpts,i=n.backupConstruct,o=n.backupURL;if(o){var a,s=e.player;s.emit("core_event",Sg(Sg({},{url:s.config.url,code:r.errorCode,message:r.message,httpCode:r.httpCode}),{},{eventName:"core.degrade"})),s.emit("degrade",{url:s.config.url,code:r.errorCode,message:r.message,httpCode:r.httpCode}),s.unRegisterPlugin("rts"),s.switchURL=e._originSwitchFn,e._rts=null,s.rts=null,null!==(a=s.video)&&void 0!==a&&a.srcObject&&(s.video.srcObject=null),s.config.url=o,i?s.registerPlugin(i).beforePlayerInit():s.video.src=o}else e.player.emit("error",r)}})),this._rts.on("waiting",(function(){var t;null===(t=e.player)||void 0===t||t.emit("waiting")}))}},{key:"_transCoreEvent",value:function(e){var t=this;this._rts.on(e,(function(r){t.player&&t.player.emit("core_event",Sg(Sg({},r),{},{eventName:e}))}))}}],[{key:"pluginName",get:function(){return"rts"}},{key:"isSupported",value:function(){return HI()}},{key:"getCapacity",value:function(){return function(){if(!HI())return Gm.reject("RTCPeerConnection no support");var e;try{(e=new RTCPeerConnection).addTransceiver("video",{direction:"recvonly"}),e.addTransceiver("audio",{direction:"recvonly"})}catch(t){return Gm.reject(null==t?void 0:t.message)}return e.createOffer().then((function(t){var r,n,i,o;xC.log(t.sdp);var a=LI.parse(t.sdp),s=null===(r=a.media)||void 0===r?void 0:Nc(r).call(r,(function(e){return"video"===e.type}))[0],u=null===(n=a.media)||void 0===n?void 0:Nc(n).call(n,(function(e){return"audio"===e.type}))[0],l=null==s||null===(i=s.rtp)||void 0===i?void 0:Nc(i).call(i,(function(e){return"VP8"===e.codec||"VP9"===e.codec||"H264"===e.codec})),c=null==u||null===(o=u.rtp)||void 0===o?void 0:Nc(o).call(o,(function(e){return"opus"===e.codec})),f=null==s?void 0:s.fmtp,d=null==u?void 0:u.fmtp;return f&&vR(l).call(l,(function(e){var t;e.config=null===(t=Nc(f).call(f,(function(t){return t.payload===e.payload}))[0])||void 0===t?void 0:t.config})),d&&vR(c).call(c,(function(e){var t;e.config=null===(t=Nc(d).call(d,(function(t){return t.payload===e.payload}))[0])||void 0===t?void 0:t.config})),e.close(),{video:l,audio:c}}))}()}},{key:"isSupportedH264",value:(t=Tg(kg().mark((function e(t){var r,i,o,a,s;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.getCapacity();case 3:if(i=e.sent,o=null===(r=i.video)||void 0===r?void 0:Nc(r).call(r,(function(e){var r;return"H264"===e.codec&&(!t||-1!==rg(r=e.config).call(r,t))})).length){e.next=10;break}return e.next=8,n.getCapacity();case 8:s=e.sent,o=null===(a=s.video)||void 0===a?void 0:Nc(a).call(a,(function(e){var r;return"H264"===e.codec&&(!t||-1!==rg(r=e.config).call(r,t))})).length;case 10:return e.abrupt("return",!!o);case 13:return e.prev=13,e.t0=e.catch(0),e.abrupt("return",!1);case 16:case"end":return e.stop()}}),e,null,[[0,13]])}))),function(e){return t.apply(this,arguments)})}]),n}(Vx),OC=window.VePlayer.DynamicModule;VePlayer.registerPlugin(OC.PluginRtm,{RtmPlugin:LC}),e.RtmPlugin=LC}));