@byteplus/veplayer-plugin 2.3.1-rc.3 → 2.4.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/index.d.ts +0 -1
- package/esm/index.development.js +20274 -35966
- package/esm/index.production.js +5 -5
- package/esm/veplayer.plugin.flv.development.js +281 -178
- package/esm/veplayer.plugin.flv.production.js +1 -1
- package/esm/veplayer.plugin.hls.development.js +656 -261
- package/esm/veplayer.plugin.hls.production.js +1 -1
- package/package.json +21 -1
- package/umd/index.d.ts +0 -1
- package/umd/veplayer.plugin.flv.development.js +277 -174
- package/umd/veplayer.plugin.flv.production.js +1 -1
- package/umd/veplayer.plugin.hls.development.js +650 -255
- package/umd/veplayer.plugin.hls.production.js +1 -1
- package/esm/veplayer.plugin.drm.development.js +0 -1577
- package/esm/veplayer.plugin.drm.production.js +0 -2
- package/esm/veplayer.plugin.mp4.development.js +0 -38039
- package/esm/veplayer.plugin.mp4.production.js +0 -2
- package/esm/veplayer.plugin.rtm.development.js +0 -5587
- package/esm/veplayer.plugin.rtm.production.js +0 -2
- package/esm/veplayer.plugin.shaka.development.js +0 -15973
- package/esm/veplayer.plugin.shaka.production.js +0 -20
- package/esm/veplayer.plugin.time.shift.development.css +0 -63
- package/esm/veplayer.plugin.time.shift.development.js +0 -339
- package/esm/veplayer.plugin.time.shift.production.css +0 -1
- package/esm/veplayer.plugin.time.shift.production.js +0 -2
- package/esm/veplayer.plugin.xgvideo.development.js +0 -19097
- package/esm/veplayer.plugin.xgvideo.production.js +0 -2
- package/umd/veplayer.plugin.drm.development.js +0 -1579
- package/umd/veplayer.plugin.drm.production.js +0 -1
- package/umd/veplayer.plugin.mp4.development.js +0 -38043
- package/umd/veplayer.plugin.mp4.production.js +0 -1
- package/umd/veplayer.plugin.rtm.development.js +0 -5589
- package/umd/veplayer.plugin.rtm.production.js +0 -1
- package/umd/veplayer.plugin.shaka.development.js +0 -15977
- package/umd/veplayer.plugin.shaka.production.js +0 -1
- package/umd/veplayer.plugin.time.shift.development.css +0 -63
- package/umd/veplayer.plugin.time.shift.development.js +0 -342
- package/umd/veplayer.plugin.time.shift.production.css +0 -1
- package/umd/veplayer.plugin.time.shift.production.js +0 -1
- package/umd/veplayer.plugin.xgvideo.development.js +0 -19099
- package/umd/veplayer.plugin.xgvideo.production.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
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_XGVIDEO__={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var r=function(e){return e&&e.Math==Math&&e},i=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("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,c=u.apply,l=u.call,h="object"==typeof Reflect&&Reflect.apply||(s?l.bind(c):function(){return l.apply(c,arguments)}),A=a,d=Function.prototype,f=d.call,v=A&&d.bind.bind(f,f),p=A?v:function(e){return function(){return f.apply(e,arguments)}},m=p,y=m({}.toString),g=m("".slice),_=function(e){return g(y(e),8,-1)},b=_,E=p,k=function(e){if("Function"===b(e))return E(e)},T="object"==typeof document&&document.all,R={all:T,IS_HTMLDDA:void 0===T&&void 0!==T},S=R.all,w=R.IS_HTMLDDA?function(e){return"function"==typeof e||e===S}:function(e){return"function"==typeof e},D={},I=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),C=a,L=Function.prototype.call,V=C?L.bind(L):function(){return L.apply(L,arguments)},x={},F={}.propertyIsEnumerable,G=Object.getOwnPropertyDescriptor,O=G&&!F.call({1:2},1);x.f=O?function(e){var t=G(this,e);return!!t&&t.enumerable}:F;var Z,P,U=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},N=o,B=_,M=Object,W=p("".split),Y=N((function(){return!M("z").propertyIsEnumerable(0)}))?function(e){return"String"==B(e)?W(e,""):M(e)}:M,X=function(e){return null==e},Q=X,j=TypeError,H=function(e){if(Q(e))throw j("Can't call method on "+e);return e},J=Y,K=H,z=function(e){return J(K(e))},q=w,$=R.all,ee=R.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:q(e)||e===$}:function(e){return"object"==typeof e?null!==e:q(e)},te={},ne=te,re=i,ie=w,oe=function(e){return ie(e)?e:void 0},ae=function(e,t){return arguments.length<2?oe(ne[e])||oe(re[e]):ne[e]&&ne[e][t]||re[e]&&re[e][t]},se=p({}.isPrototypeOf),ue="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ce=i,le=ue,he=ce.process,Ae=ce.Deno,de=he&&he.versions||Ae&&Ae.version,fe=de&&de.v8;fe&&(P=(Z=fe.split("."))[0]>0&&Z[0]<4?1:+(Z[0]+Z[1])),!P&&le&&(!(Z=le.match(/Edge\/(\d+)/))||Z[1]>=74)&&(Z=le.match(/Chrome\/(\d+)/))&&(P=+Z[1]);var ve=P,pe=ve,me=o,ye=i.String,ge=!!Object.getOwnPropertySymbols&&!me((function(){var e=Symbol();return!ye(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&pe&&pe<41})),_e=ge&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,be=ae,Ee=w,ke=se,Te=Object,Re=_e?function(e){return"symbol"==typeof e}:function(e){var t=be("Symbol");return Ee(t)&&ke(t.prototype,Te(e))},Se=String,we=function(e){try{return Se(e)}catch(t){return"Object"}},De=w,Ie=we,Ce=TypeError,Le=function(e){if(De(e))return e;throw Ce(Ie(e)+" is not a function")},Ve=Le,xe=X,Fe=function(e,t){var n=e[t];return xe(n)?void 0:Ve(n)},Ge=V,Oe=w,Ze=ee,Pe=TypeError,Ue={exports:{}},Ne=i,Be=Object.defineProperty,Me=function(e,t){try{Be(Ne,e,{value:t,configurable:!0,writable:!0})}catch(n){Ne[e]=t}return t},We="__core-js_shared__",Ye=i[We]||Me(We,{}),Xe=Ye;(Ue.exports=function(e,t){return Xe[e]||(Xe[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 Qe=Ue.exports,je=H,He=Object,Je=function(e){return He(je(e))},Ke=Je,ze=p({}.hasOwnProperty),qe=Object.hasOwn||function(e,t){return ze(Ke(e),t)},$e=p,et=0,tt=Math.random(),nt=$e(1..toString),rt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+nt(++et+tt,36)},it=Qe,ot=qe,at=rt,st=ge,ut=_e,ct=i.Symbol,lt=it("wks"),ht=ut?ct.for||ct:ct&&ct.withoutSetter||at,At=function(e){return ot(lt,e)||(lt[e]=st&&ot(ct,e)?ct[e]:ht("Symbol."+e)),lt[e]},dt=V,ft=ee,vt=Re,pt=Fe,mt=function(e,t){var n,r;if("string"===t&&Oe(n=e.toString)&&!Ze(r=Ge(n,e)))return r;if(Oe(n=e.valueOf)&&!Ze(r=Ge(n,e)))return r;if("string"!==t&&Oe(n=e.toString)&&!Ze(r=Ge(n,e)))return r;throw Pe("Can't convert object to primitive value")},yt=TypeError,gt=At("toPrimitive"),_t=function(e,t){if(!ft(e)||vt(e))return e;var n,r=pt(e,gt);if(r){if(void 0===t&&(t="default"),n=dt(r,e,t),!ft(n)||vt(n))return n;throw yt("Can't convert object to primitive value")}return void 0===t&&(t="number"),mt(e,t)},bt=Re,Et=function(e){var t=_t(e,"string");return bt(t)?t:t+""},kt=ee,Tt=i.document,Rt=kt(Tt)&&kt(Tt.createElement),St=function(e){return Rt?Tt.createElement(e):{}},wt=St,Dt=!I&&!o((function(){return 7!=Object.defineProperty(wt("div"),"a",{get:function(){return 7}}).a})),It=I,Ct=V,Lt=x,Vt=U,xt=z,Ft=Et,Gt=qe,Ot=Dt,Zt=Object.getOwnPropertyDescriptor;D.f=It?Zt:function(e,t){if(e=xt(e),t=Ft(t),Ot)try{return Zt(e,t)}catch(n){}if(Gt(e,t))return Vt(!Ct(Lt.f,e,t),e[t])};var Pt=o,Ut=w,Nt=/#|\.prototype\./,Bt=function(e,t){var n=Wt[Mt(e)];return n==Xt||n!=Yt&&(Ut(t)?Pt(t):!!t)},Mt=Bt.normalize=function(e){return String(e).replace(Nt,".").toLowerCase()},Wt=Bt.data={},Yt=Bt.NATIVE="N",Xt=Bt.POLYFILL="P",Qt=Bt,jt=Le,Ht=a,Jt=k(k.bind),Kt=function(e,t){return jt(e),void 0===t?e:Ht?Jt(e,t):function(){return e.apply(t,arguments)}},zt={},qt=I&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),$t=ee,en=String,tn=TypeError,nn=function(e){if($t(e))return e;throw tn(en(e)+" is not an object")},rn=I,on=Dt,an=qt,sn=nn,un=Et,cn=TypeError,ln=Object.defineProperty,hn=Object.getOwnPropertyDescriptor,An="enumerable",dn="configurable",fn="writable";zt.f=rn?an?function(e,t,n){if(sn(e),t=un(t),sn(n),"function"==typeof e&&"prototype"===t&&"value"in n&&fn in n&&!n[fn]){var r=hn(e,t);r&&r[fn]&&(e[t]=n.value,n={configurable:dn in n?n[dn]:r[dn],enumerable:An in n?n[An]:r[An],writable:!1})}return ln(e,t,n)}:ln:function(e,t,n){if(sn(e),t=un(t),sn(n),on)try{return ln(e,t,n)}catch(r){}if("get"in n||"set"in n)throw cn("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var vn=zt,pn=U,mn=I?function(e,t,n){return vn.f(e,t,pn(1,n))}:function(e,t,n){return e[t]=n,e},yn=i,gn=h,_n=k,bn=w,En=D.f,kn=Qt,Tn=te,Rn=Kt,Sn=mn,wn=qe,Dn=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return gn(e,this,arguments)};return t.prototype=e.prototype,t},In=function(e,t){var n,r,i,o,a,s,u,c,l,h=e.target,A=e.global,d=e.stat,f=e.proto,v=A?yn:d?yn[h]:(yn[h]||{}).prototype,p=A?Tn:Tn[h]||Sn(Tn,h,{})[h],m=p.prototype;for(o in t)r=!(n=kn(A?o:h+(d?".":"#")+o,e.forced))&&v&&wn(v,o),s=p[o],r&&(u=e.dontCallGetSet?(l=En(v,o))&&l.value:v[o]),a=r&&u?u:t[o],r&&typeof s==typeof a||(c=e.bind&&r?Rn(a,yn):e.wrap&&r?Dn(a):f&&bn(a)?_n(a):a,(e.sham||a&&a.sham||s&&s.sham)&&Sn(c,"sham",!0),Sn(p,o,c),f&&(wn(Tn,i=h+"Prototype")||Sn(Tn,i,{}),Sn(Tn[i],o,a),e.real&&m&&(n||!m[o])&&Sn(m,o,a)))},Cn=_,Ln=Array.isArray||function(e){return"Array"==Cn(e)},Vn=Math.ceil,xn=Math.floor,Fn=Math.trunc||function(e){var t=+e;return(t>0?xn:Vn)(t)},Gn=function(e){var t=+e;return t!=t||0===t?0:Fn(t)},On=Gn,Zn=Math.min,Pn=function(e){return e>0?Zn(On(e),9007199254740991):0},Un=function(e){return Pn(e.length)},Nn=TypeError,Bn=function(e){if(e>9007199254740991)throw Nn("Maximum allowed index exceeded");return e},Mn=Et,Wn=zt,Yn=U,Xn=function(e,t,n){var r=Mn(t);r in e?Wn.f(e,r,Yn(0,n)):e[r]=n},Qn={};Qn[At("toStringTag")]="z";var jn="[object z]"===String(Qn),Hn=jn,Jn=w,Kn=_,zn=At("toStringTag"),qn=Object,$n="Arguments"==Kn(function(){return arguments}()),er=Hn?Kn:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=qn(e),zn))?n:$n?Kn(t):"Object"==(r=Kn(t))&&Jn(t.callee)?"Arguments":r},tr=w,nr=Ye,rr=p(Function.toString);tr(nr.inspectSource)||(nr.inspectSource=function(e){return rr(e)});var ir=nr.inspectSource,or=p,ar=o,sr=w,ur=er,cr=ir,lr=function(){},hr=[],Ar=ae("Reflect","construct"),dr=/^\s*(?:class|function)\b/,fr=or(dr.exec),vr=!dr.exec(lr),pr=function(e){if(!sr(e))return!1;try{return Ar(lr,hr,e),!0}catch(t){return!1}},mr=function(e){if(!sr(e))return!1;switch(ur(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return vr||!!fr(dr,cr(e))}catch(t){return!0}};mr.sham=!0;var yr=!Ar||ar((function(){var e;return pr(pr.call)||!pr(Object)||!pr((function(){e=!0}))||e}))?mr:pr,gr=Ln,_r=yr,br=ee,Er=At("species"),kr=Array,Tr=function(e){var t;return gr(e)&&(t=e.constructor,(_r(t)&&(t===kr||gr(t.prototype))||br(t)&&null===(t=t[Er]))&&(t=void 0)),void 0===t?kr:t},Rr=function(e,t){return new(Tr(e))(0===t?0:t)},Sr=o,wr=ve,Dr=At("species"),Ir=function(e){return wr>=51||!Sr((function(){var t=[];return(t.constructor={})[Dr]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Cr=In,Lr=o,Vr=Ln,xr=ee,Fr=Je,Gr=Un,Or=Bn,Zr=Xn,Pr=Rr,Ur=Ir,Nr=ve,Br=At("isConcatSpreadable"),Mr=Nr>=51||!Lr((function(){var e=[];return e[Br]=!1,e.concat()[0]!==e})),Wr=function(e){if(!xr(e))return!1;var t=e[Br];return void 0!==t?!!t:Vr(e)};Cr({target:"Array",proto:!0,arity:1,forced:!Mr||!Ur("concat")},{concat:function(e){var t,n,r,i,o,a=Fr(this),s=Pr(a,0),u=0;for(t=-1,r=arguments.length;t<r;t++)if(Wr(o=-1===t?a:arguments[t]))for(i=Gr(o),Or(u+i),n=0;n<i;n++,u++)n in o&&Zr(s,u,o[n]);else Or(u+1),Zr(s,u++,o);return s.length=u,s}});var Yr=er,Xr=String,Qr=function(e){if("Symbol"===Yr(e))throw TypeError("Cannot convert a Symbol value to a string");return Xr(e)},jr={},Hr=Gn,Jr=Math.max,Kr=Math.min,zr=function(e,t){var n=Hr(e);return n<0?Jr(n+t,0):Kr(n,t)},qr=z,$r=zr,ei=Un,ti=function(e){return function(t,n,r){var i,o=qr(t),a=ei(o),s=$r(r,a);if(e&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}},ni={includes:ti(!0),indexOf:ti(!1)},ri={},ii=qe,oi=z,ai=ni.indexOf,si=ri,ui=p([].push),ci=function(e,t){var n,r=oi(e),i=0,o=[];for(n in r)!ii(si,n)&&ii(r,n)&&ui(o,n);for(;t.length>i;)ii(r,n=t[i++])&&(~ai(o,n)||ui(o,n));return o},li=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],hi=ci,Ai=li,di=Object.keys||function(e){return hi(e,Ai)},fi=I,vi=qt,pi=zt,mi=nn,yi=z,gi=di;jr.f=fi&&!vi?Object.defineProperties:function(e,t){mi(e);for(var n,r=yi(t),i=gi(t),o=i.length,a=0;o>a;)pi.f(e,n=i[a++],r[n]);return e};var _i,bi=ae("document","documentElement"),Ei=rt,ki=Qe("keys"),Ti=function(e){return ki[e]||(ki[e]=Ei(e))},Ri=nn,Si=jr,wi=li,Di=ri,Ii=bi,Ci=St,Li="prototype",Vi="script",xi=Ti("IE_PROTO"),Fi=function(){},Gi=function(e){return"<"+Vi+">"+e+"</"+Vi+">"},Oi=function(e){e.write(Gi("")),e.close();var t=e.parentWindow.Object;return e=null,t},Zi=function(){try{_i=new ActiveXObject("htmlfile")}catch(i){}var e,t,n;Zi="undefined"!=typeof document?document.domain&&_i?Oi(_i):(t=Ci("iframe"),n="java"+Vi+":",t.style.display="none",Ii.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Gi("document.F=Object")),e.close(),e.F):Oi(_i);for(var r=wi.length;r--;)delete Zi[Li][wi[r]];return Zi()};Di[xi]=!0;var Pi=Object.create||function(e,t){var n;return null!==e?(Fi[Li]=Ri(e),n=new Fi,Fi[Li]=null,n[xi]=e):n=Zi(),void 0===t?n:Si.f(n,t)},Ui={},Ni=ci,Bi=li.concat("length","prototype");Ui.f=Object.getOwnPropertyNames||function(e){return Ni(e,Bi)};var Mi={},Wi=zr,Yi=Un,Xi=Xn,Qi=Array,ji=Math.max,Hi=function(e,t,n){for(var r=Yi(e),i=Wi(t,r),o=Wi(void 0===n?r:n,r),a=Qi(ji(o-i,0)),s=0;i<o;i++,s++)Xi(a,s,e[i]);return a.length=s,a},Ji=_,Ki=z,zi=Ui.f,qi=Hi,$i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Mi.f=function(e){return $i&&"Window"==Ji(e)?function(e){try{return zi(e)}catch(t){return qi($i)}}(e):zi(Ki(e))};var eo={};eo.f=Object.getOwnPropertySymbols;var to=mn,no=function(e,t,n,r){return r&&r.enumerable?e[t]=n:to(e,t,n),e},ro=zt,io=function(e,t,n){return ro.f(e,t,n)},oo={},ao=At;oo.f=ao;var so,uo,co,lo=te,ho=qe,Ao=oo,fo=zt.f,vo=function(e){var t=lo.Symbol||(lo.Symbol={});ho(t,e)||fo(t,e,{value:Ao.f(e)})},po=V,mo=ae,yo=At,go=no,_o=function(){var e=mo("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=yo("toPrimitive");t&&!t[r]&&go(t,r,(function(e){return po(n,this)}),{arity:1})},bo=er,Eo=jn?{}.toString:function(){return"[object "+bo(this)+"]"},ko=jn,To=zt.f,Ro=mn,So=qe,wo=Eo,Do=At("toStringTag"),Io=function(e,t,n,r){if(e){var i=n?e:e.prototype;So(i,Do)||To(i,Do,{configurable:!0,value:t}),r&&!ko&&Ro(i,"toString",wo)}},Co=w,Lo=i.WeakMap,Vo=Co(Lo)&&/native code/.test(String(Lo)),xo=i,Fo=ee,Go=mn,Oo=qe,Zo=Ye,Po=Ti,Uo=ri,No="Object already initialized",Bo=xo.TypeError,Mo=xo.WeakMap;if(Vo||Zo.state){var Wo=Zo.state||(Zo.state=new Mo);Wo.get=Wo.get,Wo.has=Wo.has,Wo.set=Wo.set,so=function(e,t){if(Wo.has(e))throw Bo(No);return t.facade=e,Wo.set(e,t),t},uo=function(e){return Wo.get(e)||{}},co=function(e){return Wo.has(e)}}else{var Yo=Po("state");Uo[Yo]=!0,so=function(e,t){if(Oo(e,Yo))throw Bo(No);return t.facade=e,Go(e,Yo,t),t},uo=function(e){return Oo(e,Yo)?e[Yo]:{}},co=function(e){return Oo(e,Yo)}}var Xo={set:so,get:uo,has:co,enforce:function(e){return co(e)?uo(e):so(e,{})},getterFor:function(e){return function(t){var n;if(!Fo(t)||(n=uo(t)).type!==e)throw Bo("Incompatible receiver, "+e+" required");return n}}},Qo=Kt,jo=Y,Ho=Je,Jo=Un,Ko=Rr,zo=p([].push),qo=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(u,c,l,h){for(var A,d,f=Ho(u),v=jo(f),p=Qo(c,l),m=Jo(v),y=0,g=h||Ko,_=t?g(u,m):n||a?g(u,0):void 0;m>y;y++)if((s||y in v)&&(d=p(A=v[y],y,f),e))if(t)_[y]=d;else if(d)switch(e){case 3:return!0;case 5:return A;case 6:return y;case 2:zo(_,A)}else switch(e){case 4:return!1;case 7:zo(_,A)}return o?-1:r||i?i:_}},$o={forEach:qo(0),map:qo(1),filter:qo(2),some:qo(3),every:qo(4),find:qo(5),findIndex:qo(6),filterReject:qo(7)},ea=In,ta=i,na=V,ra=p,ia=I,oa=ge,aa=o,sa=qe,ua=se,ca=nn,la=z,ha=Et,Aa=Qr,da=U,fa=Pi,va=di,pa=Ui,ma=Mi,ya=eo,ga=D,_a=zt,ba=jr,Ea=x,ka=no,Ta=io,Ra=Qe,Sa=ri,wa=rt,Da=At,Ia=oo,Ca=vo,La=_o,Va=Io,xa=Xo,Fa=$o.forEach,Ga=Ti("hidden"),Oa="Symbol",Za="prototype",Pa=xa.set,Ua=xa.getterFor(Oa),Na=Object[Za],Ba=ta.Symbol,Ma=Ba&&Ba[Za],Wa=ta.TypeError,Ya=ta.QObject,Xa=ga.f,Qa=_a.f,ja=ma.f,Ha=Ea.f,Ja=ra([].push),Ka=Ra("symbols"),za=Ra("op-symbols"),qa=Ra("wks"),$a=!Ya||!Ya[Za]||!Ya[Za].findChild,es=ia&&aa((function(){return 7!=fa(Qa({},"a",{get:function(){return Qa(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=Xa(Na,t);r&&delete Na[t],Qa(e,t,n),r&&e!==Na&&Qa(Na,t,r)}:Qa,ts=function(e,t){var n=Ka[e]=fa(Ma);return Pa(n,{type:Oa,tag:e,description:t}),ia||(n.description=t),n},ns=function(e,t,n){e===Na&&ns(za,t,n),ca(e);var r=ha(t);return ca(n),sa(Ka,r)?(n.enumerable?(sa(e,Ga)&&e[Ga][r]&&(e[Ga][r]=!1),n=fa(n,{enumerable:da(0,!1)})):(sa(e,Ga)||Qa(e,Ga,da(1,{})),e[Ga][r]=!0),es(e,r,n)):Qa(e,r,n)},rs=function(e,t){ca(e);var n=la(t),r=va(n).concat(ss(n));return Fa(r,(function(t){ia&&!na(is,n,t)||ns(e,t,n[t])})),e},is=function(e){var t=ha(e),n=na(Ha,this,t);return!(this===Na&&sa(Ka,t)&&!sa(za,t))&&(!(n||!sa(this,t)||!sa(Ka,t)||sa(this,Ga)&&this[Ga][t])||n)},os=function(e,t){var n=la(e),r=ha(t);if(n!==Na||!sa(Ka,r)||sa(za,r)){var i=Xa(n,r);return!i||!sa(Ka,r)||sa(n,Ga)&&n[Ga][r]||(i.enumerable=!0),i}},as=function(e){var t=ja(la(e)),n=[];return Fa(t,(function(e){sa(Ka,e)||sa(Sa,e)||Ja(n,e)})),n},ss=function(e){var t=e===Na,n=ja(t?za:la(e)),r=[];return Fa(n,(function(e){!sa(Ka,e)||t&&!sa(Na,e)||Ja(r,Ka[e])})),r};oa||(Ba=function(){if(ua(Ma,this))throw Wa("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Aa(arguments[0]):void 0,t=wa(e),n=function(e){this===Na&&na(n,za,e),sa(this,Ga)&&sa(this[Ga],t)&&(this[Ga][t]=!1),es(this,t,da(1,e))};return ia&&$a&&es(Na,t,{configurable:!0,set:n}),ts(t,e)},ka(Ma=Ba[Za],"toString",(function(){return Ua(this).tag})),ka(Ba,"withoutSetter",(function(e){return ts(wa(e),e)})),Ea.f=is,_a.f=ns,ba.f=rs,ga.f=os,pa.f=ma.f=as,ya.f=ss,Ia.f=function(e){return ts(Da(e),e)},ia&&Ta(Ma,"description",{configurable:!0,get:function(){return Ua(this).description}})),ea({global:!0,constructor:!0,wrap:!0,forced:!oa,sham:!oa},{Symbol:Ba}),Fa(va(qa),(function(e){Ca(e)})),ea({target:Oa,stat:!0,forced:!oa},{useSetter:function(){$a=!0},useSimple:function(){$a=!1}}),ea({target:"Object",stat:!0,forced:!oa,sham:!ia},{create:function(e,t){return void 0===t?fa(e):rs(fa(e),t)},defineProperty:ns,defineProperties:rs,getOwnPropertyDescriptor:os}),ea({target:"Object",stat:!0,forced:!oa},{getOwnPropertyNames:as}),La(),Va(Ba,Oa),Sa[Ga]=!0;var us=ge&&!!Symbol.for&&!!Symbol.keyFor,cs=In,ls=ae,hs=qe,As=Qr,ds=Qe,fs=us,vs=ds("string-to-symbol-registry"),ps=ds("symbol-to-string-registry");cs({target:"Symbol",stat:!0,forced:!fs},{for:function(e){var t=As(e);if(hs(vs,t))return vs[t];var n=ls("Symbol")(t);return vs[t]=n,ps[n]=t,n}});var ms=In,ys=qe,gs=Re,_s=we,bs=us,Es=Qe("symbol-to-string-registry");ms({target:"Symbol",stat:!0,forced:!bs},{keyFor:function(e){if(!gs(e))throw TypeError(_s(e)+" is not a symbol");if(ys(Es,e))return Es[e]}});var ks=p([].slice),Ts=Ln,Rs=w,Ss=_,ws=Qr,Ds=p([].push),Is=In,Cs=ae,Ls=h,Vs=V,xs=p,Fs=o,Gs=w,Os=Re,Zs=ks,Ps=function(e){if(Rs(e))return e;if(Ts(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];"string"==typeof i?Ds(n,i):"number"!=typeof i&&"Number"!=Ss(i)&&"String"!=Ss(i)||Ds(n,ws(i))}var o=n.length,a=!0;return function(e,t){if(a)return a=!1,t;if(Ts(this))return t;for(var r=0;r<o;r++)if(n[r]===e)return t}}},Us=ge,Ns=String,Bs=Cs("JSON","stringify"),Ms=xs(/./.exec),Ws=xs("".charAt),Ys=xs("".charCodeAt),Xs=xs("".replace),Qs=xs(1..toString),js=/[\uD800-\uDFFF]/g,Hs=/^[\uD800-\uDBFF]$/,Js=/^[\uDC00-\uDFFF]$/,Ks=!Us||Fs((function(){var e=Cs("Symbol")();return"[null]"!=Bs([e])||"{}"!=Bs({a:e})||"{}"!=Bs(Object(e))})),zs=Fs((function(){return'"\\udf06\\ud834"'!==Bs("\udf06\ud834")||'"\\udead"'!==Bs("\udead")})),qs=function(e,t){var n=Zs(arguments),r=Ps(t);if(Gs(r)||void 0!==e&&!Os(e))return n[1]=function(e,t){if(Gs(r)&&(t=Vs(r,this,Ns(e),t)),!Os(t))return t},Ls(Bs,null,n)},$s=function(e,t,n){var r=Ws(n,t-1),i=Ws(n,t+1);return Ms(Hs,e)&&!Ms(Js,i)||Ms(Js,e)&&!Ms(Hs,r)?"\\u"+Qs(Ys(e,0),16):e};Bs&&Is({target:"JSON",stat:!0,arity:3,forced:Ks||zs},{stringify:function(e,t,n){var r=Zs(arguments),i=Ls(Ks?qs:Bs,null,r);return zs&&"string"==typeof i?Xs(i,js,$s):i}});var eu=eo,tu=Je;In({target:"Object",stat:!0,forced:!ge||o((function(){eu.f(1)}))},{getOwnPropertySymbols:function(e){var t=eu.f;return t?t(tu(e)):[]}}),vo("asyncIterator"),vo("hasInstance"),vo("isConcatSpreadable"),vo("iterator"),vo("match"),vo("matchAll"),vo("replace"),vo("search"),vo("species"),vo("split");var nu=_o;vo("toPrimitive"),nu();var ru=ae,iu=Io;vo("toStringTag"),iu(ru("Symbol"),"Symbol"),vo("unscopables"),Io(i.JSON,"JSON",!0);var ou,au,su,uu=te.Symbol,cu={},lu=I,hu=qe,Au=Function.prototype,du=lu&&Object.getOwnPropertyDescriptor,fu=hu(Au,"name"),vu={EXISTS:fu,PROPER:fu&&"something"===function(){}.name,CONFIGURABLE:fu&&(!lu||lu&&du(Au,"name").configurable)},pu=!o((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),mu=qe,yu=w,gu=Je,_u=pu,bu=Ti("IE_PROTO"),Eu=Object,ku=Eu.prototype,Tu=_u?Eu.getPrototypeOf:function(e){var t=gu(e);if(mu(t,bu))return t[bu];var n=t.constructor;return yu(n)&&t instanceof n?n.prototype:t instanceof Eu?ku:null},Ru=o,Su=w,wu=ee,Du=Pi,Iu=Tu,Cu=no,Lu=At("iterator"),Vu=!1;[].keys&&("next"in(su=[].keys())?(au=Iu(Iu(su)))!==Object.prototype&&(ou=au):Vu=!0);var xu=!wu(ou)||Ru((function(){var e={};return ou[Lu].call(e)!==e}));Su((ou=xu?{}:Du(ou))[Lu])||Cu(ou,Lu,(function(){return this}));var Fu={IteratorPrototype:ou,BUGGY_SAFARI_ITERATORS:Vu},Gu=Fu.IteratorPrototype,Ou=Pi,Zu=U,Pu=Io,Uu=cu,Nu=function(){return this},Bu=function(e,t,n,r){var i=t+" Iterator";return e.prototype=Ou(Gu,{next:Zu(+!r,n)}),Pu(e,i,!1,!0),Uu[i]=Nu,e},Mu=p,Wu=Le,Yu=w,Xu=String,Qu=TypeError,ju=function(e,t,n){try{return Mu(Wu(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(r){}},Hu=nn,Ju=function(e){if("object"==typeof e||Yu(e))return e;throw Qu("Can't set "+Xu(e)+" as a prototype")},Ku=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=ju(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(r){}return function(n,r){return Hu(n),Ju(r),t?e(n,r):n.__proto__=r,n}}():void 0),zu=In,qu=V,$u=vu,ec=Bu,tc=Tu,nc=Io,rc=no,ic=cu,oc=Fu,ac=$u.PROPER,sc=oc.BUGGY_SAFARI_ITERATORS,uc=At("iterator"),cc="keys",lc="values",hc="entries",Ac=function(){return this},dc=function(e,t,n,r,i,o,a){ec(n,t,r);var s,u,c,l=function(e){if(e===i&&v)return v;if(!sc&&e in d)return d[e];switch(e){case cc:case lc:case hc:return function(){return new n(this,e)}}return function(){return new n(this)}},h=t+" Iterator",A=!1,d=e.prototype,f=d[uc]||d["@@iterator"]||i&&d[i],v=!sc&&f||l(i),p="Array"==t&&d.entries||f;if(p&&(s=tc(p.call(new e)))!==Object.prototype&&s.next&&(nc(s,h,!0,!0),ic[h]=Ac),ac&&i==lc&&f&&f.name!==lc&&(A=!0,v=function(){return qu(f,this)}),i)if(u={values:l(lc),keys:o?v:l(cc),entries:l(hc)},a)for(c in u)(sc||A||!(c in d))&&rc(d,c,u[c]);else zu({target:t,proto:!0,forced:sc||A},u);return a&&d[uc]!==v&&rc(d,uc,v,{name:i}),ic[t]=v,u},fc=function(e,t){return{value:e,done:t}},vc=z,pc=cu,mc=Xo;zt.f;var yc=dc,gc=fc,_c="Array Iterator",bc=mc.set,Ec=mc.getterFor(_c);yc(Array,"Array",(function(e,t){bc(this,{type:_c,target:vc(e),index:0,kind:t})}),(function(){var e=Ec(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,gc(void 0,!0)):gc("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),pc.Arguments=pc.Array;var kc={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},Tc=i,Rc=er,Sc=mn,wc=cu,Dc=At("toStringTag");for(var Ic in kc){var Cc=Tc[Ic],Lc=Cc&&Cc.prototype;Lc&&Rc(Lc)!==Dc&&Sc(Lc,Dc,Ic),wc[Ic]=wc.Array}var Vc=uu;vo("dispose");var xc=Vc;vo("asyncDispose");var Fc=In,Gc=p,Oc=ae("Symbol"),Zc=Oc.keyFor,Pc=Gc(Oc.prototype.valueOf);Fc({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==Zc(Pc(e))}catch(t){return!1}}});for(var Uc=In,Nc=Qe,Bc=ae,Mc=p,Wc=Re,Yc=At,Xc=Bc("Symbol"),Qc=Xc.isWellKnown,jc=Bc("Object","getOwnPropertyNames"),Hc=Mc(Xc.prototype.valueOf),Jc=Nc("wks"),Kc=0,zc=jc(Xc),qc=zc.length;Kc<qc;Kc++)try{var $c=zc[Kc];Wc(Xc[$c])&&Yc($c)}catch(b6){}Uc({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if(Qc&&Qc(e))return!0;try{for(var t=Hc(e),n=0,r=jc(Jc),i=r.length;n<i;n++)if(Jc[r[n]]==t)return!0}catch(b6){}return!1}}),vo("matcher"),vo("metadataKey"),vo("observable"),vo("metadata"),vo("patternMatch"),vo("replaceAll");var el=xc,tl=n(el),nl=p,rl=Gn,il=Qr,ol=H,al=nl("".charAt),sl=nl("".charCodeAt),ul=nl("".slice),cl=function(e){return function(t,n){var r,i,o=il(ol(t)),a=rl(n),s=o.length;return a<0||a>=s?e?"":void 0:(r=sl(o,a))<55296||r>56319||a+1===s||(i=sl(o,a+1))<56320||i>57343?e?al(o,a):r:e?ul(o,a,a+2):i-56320+(r-55296<<10)+65536}},ll={codeAt:cl(!1),charAt:cl(!0)},hl=ll.charAt,Al=Qr,dl=Xo,fl=dc,vl=fc,pl="String Iterator",ml=dl.set,yl=dl.getterFor(pl);fl(String,"String",(function(e){ml(this,{type:pl,string:Al(e),index:0})}),(function(){var e,t=yl(this),n=t.string,r=t.index;return r>=n.length?vl(void 0,!0):(e=hl(n,r),t.index+=e.length,vl(e,!1))}));var gl=n(oo.f("iterator"));function _l(e){return(_l="function"==typeof tl&&"symbol"==typeof gl?function(e){return typeof e}:function(e){return e&&"function"==typeof tl&&e.constructor===tl&&e!==tl.prototype?"symbol":typeof e})(e)}var bl=Je,El=di;In({target:"Object",stat:!0,forced:o((function(){El(1)}))},{keys:function(e){return El(bl(e))}});var kl=n(te.Object.keys),Tl=n(te.Object.getOwnPropertySymbols),Rl=$o.filter;In({target:"Array",proto:!0,forced:!Ir("filter")},{filter:function(e){return Rl(this,e,arguments.length>1?arguments[1]:void 0)}});var Sl=te,wl=function(e){return Sl[e+"Prototype"]},Dl=wl("Array").filter,Il=se,Cl=Dl,Ll=Array.prototype,Vl=n((function(e){var t=e.filter;return e===Ll||Il(Ll,e)&&t===Ll.filter?Cl:t})),xl={exports:{}},Fl=In,Gl=o,Ol=z,Zl=D.f,Pl=I;Fl({target:"Object",stat:!0,forced:!Pl||Gl((function(){Zl(1)})),sham:!Pl},{getOwnPropertyDescriptor:function(e,t){return Zl(Ol(e),t)}});var Ul=te.Object,Nl=xl.exports=function(e,t){return Ul.getOwnPropertyDescriptor(e,t)};Ul.getOwnPropertyDescriptor.sham&&(Nl.sham=!0);var Bl=n(xl.exports),Ml=o,Wl=function(e,t){var n=[][e];return!!n&&Ml((function(){n.call(null,t||function(){return 1},1)}))},Yl=$o.forEach,Xl=Wl("forEach")?[].forEach:function(e){return Yl(this,e,arguments.length>1?arguments[1]:void 0)};In({target:"Array",proto:!0,forced:[].forEach!=Xl},{forEach:Xl});var Ql=wl("Array").forEach,jl=er,Hl=qe,Jl=se,Kl=Ql,zl=Array.prototype,ql={DOMTokenList:!0,NodeList:!0},$l=n((function(e){var t=e.forEach;return e===zl||Jl(zl,e)&&t===zl.forEach||Hl(ql,jl(e))?Kl:t})),eh=ae,th=Ui,nh=eo,rh=nn,ih=p([].concat),oh=eh("Reflect","ownKeys")||function(e){var t=th.f(rh(e)),n=nh.f;return n?ih(t,n(e)):t},ah=oh,sh=z,uh=D,ch=Xn;In({target:"Object",stat:!0,sham:!I},{getOwnPropertyDescriptors:function(e){for(var t,n,r=sh(e),i=uh.f,o=ah(r),a={},s=0;o.length>s;)void 0!==(n=i(r,t=o[s++]))&&ch(a,t,n);return a}});var lh=n(te.Object.getOwnPropertyDescriptors),hh={exports:{}},Ah=In,dh=I,fh=jr.f;Ah({target:"Object",stat:!0,forced:Object.defineProperties!==fh,sham:!dh},{defineProperties:fh});var vh=te.Object,ph=hh.exports=function(e,t){return vh.defineProperties(e,t)};vh.defineProperties.sham&&(ph.sham=!0);var mh=n(hh.exports),yh={exports:{}},gh=In,_h=I,bh=zt.f;gh({target:"Object",stat:!0,forced:Object.defineProperty!==bh,sham:!_h},{defineProperty:bh});var Eh=te.Object,kh=yh.exports=function(e,t,n){return Eh.defineProperty(e,t,n)};Eh.defineProperty.sham&&(kh.sham=!0);var Th=n(yh.exports),Rh=n(el);In({target:"Object",stat:!0,sham:!I},{create:Pi});var Sh=te.Object,wh=n((function(e,t){return Sh.create(e,t)})),Dh=Je,Ih=Tu,Ch=pu;In({target:"Object",stat:!0,forced:o((function(){Ih(1)})),sham:!Ch},{getPrototypeOf:function(e){return Ih(Dh(e))}});var Lh=n(te.Object.getPrototypeOf);In({target:"Object",stat:!0},{setPrototypeOf:Ku});var Vh=n(te.Object.setPrototypeOf),xh=qe,Fh=oh,Gh=D,Oh=zt,Zh=ee,Ph=mn,Uh=Error,Nh=p("".replace),Bh=String(Uh("zxcasd").stack),Mh=/\n\s*at [^:]*:[^\n]*/,Wh=Mh.test(Bh),Yh=U,Xh=!o((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Yh(1,7)),7!==e.stack)})),Qh=mn,jh=function(e,t){if(Wh&&"string"==typeof e&&!Uh.prepareStackTrace)for(;t--;)e=Nh(e,Mh,"");return e},Hh=Xh,Jh=Error.captureStackTrace,Kh=cu,zh=At("iterator"),qh=Array.prototype,$h=function(e){return void 0!==e&&(Kh.Array===e||qh[zh]===e)},eA=er,tA=Fe,nA=X,rA=cu,iA=At("iterator"),oA=function(e){if(!nA(e))return tA(e,iA)||tA(e,"@@iterator")||rA[eA(e)]},aA=V,sA=Le,uA=nn,cA=we,lA=oA,hA=TypeError,AA=function(e,t){var n=arguments.length<2?lA(e):t;if(sA(n))return uA(aA(n,e));throw hA(cA(e)+" is not iterable")},dA=V,fA=nn,vA=Fe,pA=function(e,t,n){var r,i;fA(e);try{if(!(r=vA(e,"return"))){if("throw"===t)throw n;return n}r=dA(r,e)}catch(b6){i=!0,r=b6}if("throw"===t)throw n;if(i)throw r;return fA(r),n},mA=Kt,yA=V,gA=nn,_A=we,bA=$h,EA=Un,kA=se,TA=AA,RA=oA,SA=pA,wA=TypeError,DA=function(e,t){this.stopped=e,this.result=t},IA=DA.prototype,CA=function(e,t,n){var r,i,o,a,s,u,c,l=n&&n.that,h=!(!n||!n.AS_ENTRIES),A=!(!n||!n.IS_RECORD),d=!(!n||!n.IS_ITERATOR),f=!(!n||!n.INTERRUPTED),v=mA(t,l),p=function(e){return r&&SA(r,"normal",e),new DA(!0,e)},m=function(e){return h?(gA(e),f?v(e[0],e[1],p):v(e[0],e[1])):f?v(e,p):v(e)};if(A)r=e.iterator;else if(d)r=e;else{if(!(i=RA(e)))throw wA(_A(e)+" is not iterable");if(bA(i)){for(o=0,a=EA(e);a>o;o++)if((s=m(e[o]))&&kA(IA,s))return s;return new DA(!1)}r=TA(e,i)}for(u=A?e.next:r.next;!(c=yA(u,r)).done;){try{s=m(c.value)}catch(b6){SA(r,"throw",b6)}if("object"==typeof s&&s&&kA(IA,s))return s}return new DA(!1)},LA=Qr,VA=In,xA=se,FA=Tu,GA=Ku,OA=function(e,t,n){for(var r=Fh(t),i=Oh.f,o=Gh.f,a=0;a<r.length;a++){var s=r[a];xh(e,s)||n&&xh(n,s)||i(e,s,o(t,s))}},ZA=Pi,PA=mn,UA=U,NA=function(e,t){Zh(t)&&"cause"in t&&Ph(e,"cause",t.cause)},BA=function(e,t,n,r){Hh&&(Jh?Jh(e,t):Qh(e,"stack",jh(n,r)))},MA=CA,WA=function(e,t){return void 0===e?arguments.length<2?"":t:LA(e)},YA=At("toStringTag"),XA=Error,QA=[].push,jA=function(e,t){var n,r=xA(HA,this);GA?n=GA(XA(),r?FA(this):HA):(n=r?this:ZA(HA),PA(n,YA,"Error")),void 0!==t&&PA(n,"message",WA(t)),BA(n,jA,n.stack,1),arguments.length>2&&NA(n,arguments[2]);var i=[];return MA(e,QA,{that:i}),PA(n,"errors",i),n};GA?GA(jA,XA):OA(jA,XA,{name:!0});var HA=jA.prototype=ZA(XA.prototype,{constructor:UA(1,jA),message:UA(1,""),name:UA(1,"AggregateError")});VA({global:!0,constructor:!0,arity:2},{AggregateError:jA});var JA,KA,zA,qA,$A="undefined"!=typeof process&&"process"==_(process),ed=ae,td=io,nd=I,rd=At("species"),id=function(e){var t=ed(e);nd&&t&&!t[rd]&&td(t,rd,{configurable:!0,get:function(){return this}})},od=se,ad=TypeError,sd=function(e,t){if(od(t,e))return e;throw ad("Incorrect invocation")},ud=yr,cd=we,ld=TypeError,hd=function(e){if(ud(e))return e;throw ld(cd(e)+" is not a constructor")},Ad=nn,dd=hd,fd=X,vd=At("species"),pd=function(e,t){var n,r=Ad(e).constructor;return void 0===r||fd(n=Ad(r)[vd])?t:dd(n)},md=TypeError,yd=function(e,t){if(e<t)throw md("Not enough arguments");return e},gd=/(?:ipad|iphone|ipod).*applewebkit/i.test(ue),_d=i,bd=h,Ed=Kt,kd=w,Td=qe,Rd=o,Sd=bi,wd=ks,Dd=St,Id=yd,Cd=gd,Ld=$A,Vd=_d.setImmediate,xd=_d.clearImmediate,Fd=_d.process,Gd=_d.Dispatch,Od=_d.Function,Zd=_d.MessageChannel,Pd=_d.String,Ud=0,Nd={},Bd="onreadystatechange";Rd((function(){JA=_d.location}));var Md=function(e){if(Td(Nd,e)){var t=Nd[e];delete Nd[e],t()}},Wd=function(e){return function(){Md(e)}},Yd=function(e){Md(e.data)},Xd=function(e){_d.postMessage(Pd(e),JA.protocol+"//"+JA.host)};Vd&&xd||(Vd=function(e){Id(arguments.length,1);var t=kd(e)?e:Od(e),n=wd(arguments,1);return Nd[++Ud]=function(){bd(t,void 0,n)},KA(Ud),Ud},xd=function(e){delete Nd[e]},Ld?KA=function(e){Fd.nextTick(Wd(e))}:Gd&&Gd.now?KA=function(e){Gd.now(Wd(e))}:Zd&&!Cd?(qA=(zA=new Zd).port2,zA.port1.onmessage=Yd,KA=Ed(qA.postMessage,qA)):_d.addEventListener&&kd(_d.postMessage)&&!_d.importScripts&&JA&&"file:"!==JA.protocol&&!Rd(Xd)?(KA=Xd,_d.addEventListener("message",Yd,!1)):KA=Bd in Dd("script")?function(e){Sd.appendChild(Dd("script"))[Bd]=function(){Sd.removeChild(this),Md(e)}}:function(e){setTimeout(Wd(e),0)});var Qd={set:Vd,clear:xd},jd=function(){this.head=null,this.tail=null};jd.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.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 Hd,Jd,Kd,zd,qd,$d=jd,ef=/ipad|iphone|ipod/i.test(ue)&&"undefined"!=typeof Pebble,tf=/web0s(?!.*chrome)/i.test(ue),nf=i,rf=Kt,of=D.f,af=Qd.set,sf=$d,uf=gd,cf=ef,lf=tf,hf=$A,Af=nf.MutationObserver||nf.WebKitMutationObserver,df=nf.document,ff=nf.process,vf=nf.Promise,pf=of(nf,"queueMicrotask"),mf=pf&&pf.value;if(!mf){var yf=new sf,gf=function(){var e,t;for(hf&&(e=ff.domain)&&e.exit();t=yf.get();)try{t()}catch(b6){throw yf.head&&Hd(),b6}e&&e.enter()};uf||hf||lf||!Af||!df?!cf&&vf&&vf.resolve?((zd=vf.resolve(void 0)).constructor=vf,qd=rf(zd.then,zd),Hd=function(){qd(gf)}):hf?Hd=function(){ff.nextTick(gf)}:(af=rf(af,nf),Hd=function(){af(gf)}):(Jd=!0,Kd=df.createTextNode(""),new Af(gf).observe(Kd,{characterData:!0}),Hd=function(){Kd.data=Jd=!Jd}),mf=function(e){yf.head||Hd(),yf.add(e)}}var _f=mf,bf=function(e){try{return{error:!1,value:e()}}catch(b6){return{error:!0,value:b6}}},Ef=i.Promise,kf="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Tf=!kf&&!$A&&"object"==typeof window&&"object"==typeof document,Rf=i,Sf=Ef,wf=w,Df=Qt,If=ir,Cf=At,Lf=Tf,Vf=kf,xf=ve,Ff=Sf&&Sf.prototype,Gf=Cf("species"),Of=!1,Zf=wf(Rf.PromiseRejectionEvent),Pf={CONSTRUCTOR:Df("Promise",(function(){var e=If(Sf),t=e!==String(Sf);if(!t&&66===xf)return!0;if(!Ff.catch||!Ff.finally)return!0;if(!xf||xf<51||!/native code/.test(e)){var n=new Sf((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[Gf]=r,!(Of=n.then((function(){}))instanceof r))return!0}return!t&&(Lf||Vf)&&!Zf})),REJECTION_EVENT:Zf,SUBCLASSING:Of},Uf={},Nf=Le,Bf=TypeError,Mf=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw Bf("Bad Promise constructor");t=e,n=r})),this.resolve=Nf(t),this.reject=Nf(n)};Uf.f=function(e){return new Mf(e)};var Wf,Yf,Xf=In,Qf=$A,jf=i,Hf=V,Jf=no,Kf=Io,zf=id,qf=Le,$f=w,ev=ee,tv=sd,nv=pd,rv=Qd.set,iv=_f,ov=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(b6){}},av=bf,sv=$d,uv=Xo,cv=Ef,lv=Pf,hv=Uf,Av="Promise",dv=lv.CONSTRUCTOR,fv=lv.REJECTION_EVENT,vv=uv.getterFor(Av),pv=uv.set,mv=cv&&cv.prototype,yv=cv,gv=mv,_v=jf.TypeError,bv=jf.document,Ev=jf.process,kv=hv.f,Tv=kv,Rv=!!(bv&&bv.createEvent&&jf.dispatchEvent),Sv="unhandledrejection",wv=function(e){var t;return!(!ev(e)||!$f(t=e.then))&&t},Dv=function(e,t){var n,r,i,o=t.value,a=1==t.state,s=a?e.ok:e.fail,u=e.resolve,c=e.reject,l=e.domain;try{s?(a||(2===t.rejection&&xv(t),t.rejection=1),!0===s?n=o:(l&&l.enter(),n=s(o),l&&(l.exit(),i=!0)),n===e.promise?c(_v("Promise-chain cycle")):(r=wv(n))?Hf(r,n,u,c):u(n)):c(o)}catch(b6){l&&!i&&l.exit(),c(b6)}},Iv=function(e,t){e.notified||(e.notified=!0,iv((function(){for(var n,r=e.reactions;n=r.get();)Dv(n,e);e.notified=!1,t&&!e.rejection&&Lv(e)})))},Cv=function(e,t,n){var r,i;Rv?((r=bv.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),jf.dispatchEvent(r)):r={promise:t,reason:n},!fv&&(i=jf["on"+e])?i(r):e===Sv&&ov("Unhandled promise rejection",n)},Lv=function(e){Hf(rv,jf,(function(){var t,n=e.facade,r=e.value;if(Vv(e)&&(t=av((function(){Qf?Ev.emit("unhandledRejection",r,n):Cv(Sv,n,r)})),e.rejection=Qf||Vv(e)?2:1,t.error))throw t.value}))},Vv=function(e){return 1!==e.rejection&&!e.parent},xv=function(e){Hf(rv,jf,(function(){var t=e.facade;Qf?Ev.emit("rejectionHandled",t):Cv("rejectionhandled",t,e.value)}))},Fv=function(e,t,n){return function(r){e(t,r,n)}},Gv=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Iv(e,!0))},Ov=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw _v("Promise can't be resolved itself");var r=wv(t);r?iv((function(){var n={done:!1};try{Hf(r,t,Fv(Ov,n,e),Fv(Gv,n,e))}catch(b6){Gv(n,b6,e)}})):(e.value=t,e.state=1,Iv(e,!1))}catch(b6){Gv({done:!1},b6,e)}}};dv&&(gv=(yv=function(e){tv(this,gv),qf(e),Hf(Wf,this);var t=vv(this);try{e(Fv(Ov,t),Fv(Gv,t))}catch(b6){Gv(t,b6)}}).prototype,(Wf=function(e){pv(this,{type:Av,done:!1,notified:!1,parent:!1,reactions:new sv,rejection:!1,state:0,value:void 0})}).prototype=Jf(gv,"then",(function(e,t){var n=vv(this),r=kv(nv(this,yv));return n.parent=!0,r.ok=!$f(e)||e,r.fail=$f(t)&&t,r.domain=Qf?Ev.domain:void 0,0==n.state?n.reactions.add(r):iv((function(){Dv(r,n)})),r.promise})),Yf=function(){var e=new Wf,t=vv(e);this.promise=e,this.resolve=Fv(Ov,t),this.reject=Fv(Gv,t)},hv.f=kv=function(e){return e===yv||undefined===e?new Yf(e):Tv(e)}),Xf({global:!0,constructor:!0,wrap:!0,forced:dv},{Promise:yv}),Kf(yv,Av,!1,!0),zf(Av);var Zv=At("iterator"),Pv=!1;try{var Uv=0,Nv={next:function(){return{done:!!Uv++}},return:function(){Pv=!0}};Nv[Zv]=function(){return this},Array.from(Nv,(function(){throw 2}))}catch(b6){}var Bv=function(e,t){if(!t&&!Pv)return!1;var n=!1;try{var r={};r[Zv]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(b6){}return n},Mv=Ef,Wv=Pf.CONSTRUCTOR||!Bv((function(e){Mv.all(e).then(void 0,(function(){}))})),Yv=V,Xv=Le,Qv=Uf,jv=bf,Hv=CA;In({target:"Promise",stat:!0,forced:Wv},{all:function(e){var t=this,n=Qv.f(t),r=n.resolve,i=n.reject,o=jv((function(){var n=Xv(t.resolve),o=[],a=0,s=1;Hv(e,(function(e){var u=a++,c=!1;s++,Yv(n,t,e).then((function(e){c||(c=!0,o[u]=e,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise}});var Jv=In,Kv=Pf.CONSTRUCTOR;Ef&&Ef.prototype,Jv({target:"Promise",proto:!0,forced:Kv,real:!0},{catch:function(e){return this.then(void 0,e)}});var zv=V,qv=Le,$v=Uf,ep=bf,tp=CA;In({target:"Promise",stat:!0,forced:Wv},{race:function(e){var t=this,n=$v.f(t),r=n.reject,i=ep((function(){var i=qv(t.resolve);tp(e,(function(e){zv(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var np=V,rp=Uf;In({target:"Promise",stat:!0,forced:Pf.CONSTRUCTOR},{reject:function(e){var t=rp.f(this);return np(t.reject,void 0,e),t.promise}});var ip=nn,op=ee,ap=Uf,sp=function(e,t){if(ip(e),op(t)&&t.constructor===e)return t;var n=ap.f(e);return(0,n.resolve)(t),n.promise},up=In,cp=Ef,lp=Pf.CONSTRUCTOR,hp=sp,Ap=ae("Promise"),dp=!lp;up({target:"Promise",stat:!0,forced:true},{resolve:function(e){return hp(dp&&this===Ap?cp:this,e)}});var fp=V,vp=Le,pp=Uf,mp=bf,yp=CA;In({target:"Promise",stat:!0,forced:Wv},{allSettled:function(e){var t=this,n=pp.f(t),r=n.resolve,i=n.reject,o=mp((function(){var n=vp(t.resolve),i=[],o=0,a=1;yp(e,(function(e){var s=o++,u=!1;a++,fp(n,t,e).then((function(e){u||(u=!0,i[s]={status:"fulfilled",value:e},--a||r(i))}),(function(e){u||(u=!0,i[s]={status:"rejected",reason:e},--a||r(i))}))})),--a||r(i)}));return o.error&&i(o.value),n.promise}});var gp=V,_p=Le,bp=ae,Ep=Uf,kp=bf,Tp=CA,Rp="No one promise resolved";In({target:"Promise",stat:!0,forced:Wv},{any:function(e){var t=this,n=bp("AggregateError"),r=Ep.f(t),i=r.resolve,o=r.reject,a=kp((function(){var r=_p(t.resolve),a=[],s=0,u=1,c=!1;Tp(e,(function(e){var l=s++,h=!1;u++,gp(r,t,e).then((function(e){h||c||(c=!0,i(e))}),(function(e){h||c||(h=!0,a[l]=e,--u||o(new n(a,Rp)))}))})),--u||o(new n(a,Rp))}));return a.error&&o(a.value),r.promise}});var Sp=In,wp=Ef,Dp=o,Ip=ae,Cp=w,Lp=pd,Vp=sp,xp=wp&&wp.prototype;Sp({target:"Promise",proto:!0,real:!0,forced:!!wp&&Dp((function(){xp.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Lp(this,Ip("Promise")),n=Cp(e);return this.then(n?function(n){return Vp(t,e()).then((function(){return n}))}:e,n?function(n){return Vp(t,e()).then((function(){throw n}))}:e)}});var Fp=te.Promise,Gp=Uf,Op=bf;In({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=Gp.f(this),n=Op(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}});var Zp=n(Fp),Pp=In,Up=Ln,Np=p([].reverse),Bp=[1,2];Pp({target:"Array",proto:!0,forced:String(Bp)===String(Bp.reverse())},{reverse:function(){return Up(this)&&(this.length=this.length),Np(this)}});var Mp=wl("Array").reverse,Wp=se,Yp=Mp,Xp=Array.prototype,Qp=n((function(e){var t=e.reverse;return e===Xp||Wp(Xp,e)&&t===Xp.reverse?Yp:t})),jp=In,Hp=Ln,Jp=yr,Kp=ee,zp=zr,qp=Un,$p=z,em=Xn,tm=At,nm=ks,rm=Ir("slice"),im=tm("species"),om=Array,am=Math.max;jp({target:"Array",proto:!0,forced:!rm},{slice:function(e,t){var n,r,i,o=$p(this),a=qp(o),s=zp(e,a),u=zp(void 0===t?a:t,a);if(Hp(o)&&(n=o.constructor,(Jp(n)&&(n===om||Hp(n.prototype))||Kp(n)&&null===(n=n[im]))&&(n=void 0),n===om||void 0===n))return nm(o,s,u);for(r=new(void 0===n?om:n)(am(u-s,0)),i=0;s<u;s++,i++)s in o&&em(r,i,o[s]);return r.length=i,r}});var sm=wl("Array").slice,um=se,cm=sm,lm=Array.prototype,hm=n((function(e){var t=e.slice;return e===lm||um(lm,e)&&t===lm.slice?cm:t})),Am=p,dm=Le,fm=ee,vm=qe,pm=ks,mm=a,ym=Function,gm=Am([].concat),_m=Am([].join),bm={},Em=mm?ym.bind:function(e){var t=dm(this),n=t.prototype,r=pm(arguments,1),i=function(){var n=gm(r,pm(arguments));return this instanceof i?function(e,t,n){if(!vm(bm,t)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";bm[t]=ym("C,a","return new C("+_m(r,",")+")")}return bm[t](e,n)}(t,n.length,n):t.apply(e,n)};return fm(n)&&(i.prototype=n),i},km=Em;In({target:"Function",proto:!0,forced:Function.bind!==km},{bind:km});var Tm=wl("Function").bind,Rm=se,Sm=Tm,wm=Function.prototype,Dm=n((function(e){var t=e.bind;return e===wm||Rm(wm,e)&&t===wm.bind?Sm:t})),Im=In,Cm=h,Lm=Em,Vm=hd,xm=nn,Fm=ee,Gm=Pi,Om=o,Zm=ae("Reflect","construct"),Pm=Object.prototype,Um=[].push,Nm=Om((function(){function e(){}return!(Zm((function(){}),[],e)instanceof e)})),Bm=!Om((function(){Zm((function(){}))})),Mm=Nm||Bm;Im({target:"Reflect",stat:!0,forced:Mm,sham:Mm},{construct:function(e,t){Vm(e),xm(t);var n=arguments.length<3?e:Vm(arguments[2]);if(Bm&&!Nm)return Zm(e,t,n);if(e==n){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 r=[null];return Cm(Um,r,t),new(Cm(Lm,e,r))}var i=n.prototype,o=Gm(Fm(i)?i:Pm),a=Cm(e,o,t);return Fm(a)?a:o}});var Wm=n(te.Reflect.construct),Ym=qe,Xm=V,Qm=ee,jm=nn,Hm=function(e){return void 0!==e&&(Ym(e,"value")||Ym(e,"writable"))},Jm=D,Km=Tu;In({target:"Reflect",stat:!0},{get:function e(t,n){var r,i,o=arguments.length<3?t:arguments[2];return jm(t)===o?t[n]:(r=Jm.f(t,n))?Hm(r)?r.value:void 0===r.get?void 0:Xm(r.get,o):Qm(i=Km(t))?e(i,n,o):void 0}});var zm=n(te.Reflect.get);In({target:"Array",stat:!0},{isArray:Ln});var qm=n(te.Array.isArray),$m=n(oA),ey=nn,ty=pA,ny=Kt,ry=V,iy=Je,oy=function(e,t,n,r){try{return r?t(ey(n)[0],n[1]):t(n)}catch(b6){ty(e,"throw",b6)}},ay=$h,sy=yr,uy=Un,cy=Xn,ly=AA,hy=oA,Ay=Array,dy=function(e){var t=iy(e),n=sy(this),r=arguments.length,i=r>1?arguments[1]:void 0,o=void 0!==i;o&&(i=ny(i,r>2?arguments[2]:void 0));var a,s,u,c,l,h,A=hy(t),d=0;if(!A||this===Ay&&ay(A))for(a=uy(t),s=n?new this(a):Ay(a);a>d;d++)h=o?i(t[d],d):t[d],cy(s,d,h);else for(l=(c=ly(t,A)).next,s=n?new this:[];!(u=ry(l,c)).done;d++)h=o?oy(c,i,[u.value,d],!0):u.value,cy(s,d,h);return s.length=d,s},fy=dy;In({target:"Array",stat:!0,forced:!Bv((function(e){Array.from(e)}))},{from:fy});var vy=n(te.Array.from);function py(e,t){var n=kl(e);if(Tl){var r=Tl(e);t&&(r=Vl(r).call(r,(function(t){return Bl(e,t).enumerable}))),n.push.apply(n,r)}return n}function my(e){for(var t=1;t<arguments.length;t++){var n,r,i=null!=arguments[t]?arguments[t]:{};t%2?$l(n=py(Object(i),!0)).call(n,(function(t){Ty(e,t,i[t])})):lh?mh(e,lh(i)):$l(r=py(Object(i))).call(r,(function(t){Th(e,t,Bl(i,t))}))}return e}function yy(){yy=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Th||function(e,t,n){e[t]=n.value},i="function"==typeof Rh?Rh:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,n){return Th(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(w){u=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var o=t&&t.prototype instanceof A?t:A,a=wh(o.prototype),s=new T(i||[]);return r(a,"_invoke",{value:_(e,n,s)}),a}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(w){return{type:"throw",arg:w}}}e.wrap=c;var h={};function A(){}function d(){}function f(){}var v={};u(v,o,(function(){return this}));var p=Lh&&Lh(Lh(R([])));p&&p!==t&&n.call(p,o)&&(v=p);var m=f.prototype=A.prototype=wh(v);function y(e){var t;$l(t=["next","throw","return"]).call(t,(function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function g(e,t){function i(r,o,a,s){var u=l(e[r],e,o);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==_l(h)&&n.call(h,"__await")?t.resolve(h.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(h).then((function(e){c.value=e,a(c)}),(function(e){return i("throw",e,a,s)}))}s(u.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function _(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=b(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function b(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method))return h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var r=l(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,h;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function E(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 T(e){this.tryEntries=[{tryLoc:"root"}],$l(e).call(e,E,this),this.reset(!0)}function R(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 r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=f,r(m,"constructor",{value:f,configurable:!0}),r(f,"constructor",{value:d,configurable:!0}),d.displayName=u(f,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Vh?Vh(e,f):(e.__proto__=f,u(e,s,"GeneratorFunction")),e.prototype=wh(m),e},e.awrap=function(e){return{__await:e}},y(g.prototype),u(g.prototype,a,(function(){return this})),e.AsyncIterator=g,e.async=function(t,n,r,i,o){void 0===o&&(o=Zp);var a=new g(c(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(m),u(m,s,"Generator"),u(m,o,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return Qp(n).call(n),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=R,T.prototype={constructor:T,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,$l(t=this.tryEntries).call(t,k),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+hm(r).call(r,1))&&(this[r]=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 r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,h):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),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:R(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},e}function gy(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(b6){return void n(b6)}s.done?t(u):Zp.resolve(u).then(r,i)}function _y(e){return function(){var t=this,n=arguments;return new Zp((function(r,i){var o=e.apply(t,n);function a(e){gy(o,r,i,a,s,"next",e)}function s(e){gy(o,r,i,a,s,"throw",e)}a(void 0)}))}}function by(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ey(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Th(e,r.key,r)}}function ky(e,t,n){return t&&Ey(e.prototype,t),n&&Ey(e,n),Th(e,"prototype",{writable:!1}),e}function Ty(e,t,n){return t in e?Th(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ry(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=wh(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Th(e,"prototype",{writable:!1}),t&&wy(e,t)}function Sy(e){var t;return(Sy=Vh?Dm(t=Lh).call(t):function(e){return e.__proto__||Lh(e)})(e)}function wy(e,t){var n;return(wy=Vh?Dm(n=Vh).call(n):function(e,t){return e.__proto__=t,e})(e,t)}function Dy(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Iy(e){var t=function(){if("undefined"==typeof Reflect||!Wm)return!1;if(Wm.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Wm(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Sy(e);if(t){var i=Sy(this).constructor;n=Wm(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===_l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Dy(e)}(this,n)}}function Cy(){var e;"undefined"!=typeof Reflect&&zm?Cy=Dm(e=zm).call(e):Cy=function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Sy(e)););return e}(e,t);if(r){var i=Bl(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}};return Cy.apply(this,arguments)}function Ly(e,t){return function(e){if(qm(e))return e}(e)||function(e,t){var n=null==e?null:void 0!==Rh&&$m(e)||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||xy(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 Vy(e){return function(e){if(qm(e))return Fy(e)}(e)||function(e){if(void 0!==Rh&&null!=$m(e)||null!=e["@@iterator"])return vy(e)}(e)||xy(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 xy(e,t){var n;if(e){if("string"==typeof e)return Fy(e,t);var r=hm(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?vy(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Fy(e,t):void 0}}function Fy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Gy=In,Oy=o,Zy=Mi.f;Gy({target:"Object",stat:!0,forced:Oy((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:Zy});var Py=te.Object,Uy=n((function(e){return Py.getOwnPropertyNames(e)})),Ny="\t\n\v\f\r \u2028\u2029\ufeff",By=H,My=Qr,Wy=Ny,Yy=p("".replace),Xy=RegExp("^["+Wy+"]+"),Qy=RegExp("(^|[^"+Wy+"])["+Wy+"]+$"),jy=function(e){return function(t){var n=My(By(t));return 1&e&&(n=Yy(n,Xy,"")),2&e&&(n=Yy(n,Qy,"$1")),n}},Hy={start:jy(1),end:jy(2),trim:jy(3)},Jy=i,Ky=o,zy=p,qy=Qr,$y=Hy.trim,eg=Ny,tg=Jy.parseInt,ng=Jy.Symbol,rg=ng&&ng.iterator,ig=/^[+-]?0x/i,og=zy(ig.exec),ag=8!==tg(eg+"08")||22!==tg(eg+"0x16")||rg&&!Ky((function(){tg(Object(rg))}))?function(e,t){var n=$y(qy(e));return tg(n,t>>>0||(og(ig,n)?16:10))}:tg;In({global:!0,forced:parseInt!=ag},{parseInt:ag});var sg,ug=n(te.parseInt),cg=wl("Array").concat,lg=se,hg=cg,Ag=Array.prototype,dg=n((function(e){var t=e.concat;return e===Ag||lg(Ag,e)&&t===Ag.concat?hg:t})),fg="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,vg=i,pg=h,mg=w,yg=fg,gg=ue,_g=ks,bg=yd,Eg=vg.Function,kg=/MSIE .\./.test(gg)||yg&&((sg=vg.Bun.version.split(".")).length<3||0==sg[0]&&(sg[1]<3||3==sg[1]&&0==sg[2])),Tg=function(e,t){var n=t?2:1;return kg?function(r,i){var o=bg(arguments.length,1)>n,a=mg(r)?r:Eg(r),s=o?_g(arguments,n):[],u=o?function(){pg(a,this,s)}:a;return t?e(u,i):e(u)}:e},Rg=In,Sg=i,wg=Tg(Sg.setInterval,!0);Rg({global:!0,bind:!0,forced:Sg.setInterval!==wg},{setInterval:wg});var Dg=In,Ig=i,Cg=Tg(Ig.setTimeout,!0);Dg({global:!0,bind:!0,forced:Ig.setTimeout!==Cg},{setTimeout:Cg});var Lg=n(te.setTimeout),Vg=i,xg=o,Fg=Qr,Gg=Hy.trim,Og=Ny,Zg=p("".charAt),Pg=Vg.parseFloat,Ug=Vg.Symbol,Ng=Ug&&Ug.iterator,Bg=1/Pg(Og+"-0")!=-1/0||Ng&&!xg((function(){Pg(Object(Ng))}))?function(e){var t=Gg(Fg(e)),n=Pg(t);return 0===n&&"-"==Zg(t,0)?-0:n}:Pg;In({global:!0,forced:parseFloat!=Bg},{parseFloat:Bg});var Mg=n(te.parseFloat),Wg=Bg;In({target:"Number",stat:!0,forced:Number.parseFloat!=Wg},{parseFloat:Wg});var Yg=n(te.Number.parseFloat);In({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var Xg=n(te.Number.isNaN),Qg=$o.map;In({target:"Array",proto:!0,forced:!Ir("map")},{map:function(e){return Qg(this,e,arguments.length>1?arguments[1]:void 0)}});var jg=wl("Array").map,Hg=se,Jg=jg,Kg=Array.prototype,zg=n((function(e){var t=e.map;return e===Kg||Hg(Kg,e)&&t===Kg.map?Jg:t})),qg=Je,$g=zr,e_=Un,t_=function(e){for(var t=qg(this),n=e_(t),r=arguments.length,i=$g(r>1?arguments[1]:void 0,n),o=r>2?arguments[2]:void 0,a=void 0===o?n:$g(o,n);a>i;)t[i++]=e;return t};In({target:"Array",proto:!0},{fill:t_});var n_=wl("Array").fill,r_=se,i_=n_,o_=Array.prototype,a_=n((function(e){var t=e.fill;return e===o_||r_(o_,e)&&t===o_.fill?i_:t})),s_=function(e){return e&&e.Math==Math&&e},u_=s_("object"==typeof globalThis&&globalThis)||s_("object"==typeof window&&window)||s_("object"==typeof self&&self)||s_("object"==typeof t&&t)||function(){return this}()||Function("return this")(),c_={exports:{}},l_=u_,h_=Object.defineProperty,A_=function(e,t){try{h_(l_,e,{value:t,configurable:!0,writable:!0})}catch(b6){l_[e]=t}return t},d_=A_,f_="__core-js_shared__",v_=u_[f_]||d_(f_,{}),p_=v_;(c_.exports=function(e,t){return p_[e]||(p_[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.26.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE",source:"https://github.com/zloirock/core-js"});var m_,y_,g_=c_.exports,__=function(e){try{return!!e()}catch(b6){return!0}},b_=!__((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),E_=b_,k_=Function.prototype,T_=k_.call,R_=E_&&k_.bind.bind(T_,T_),S_=E_?R_:function(e){return function(){return T_.apply(e,arguments)}},w_=function(e){return null==e},D_=w_,I_=TypeError,C_=function(e){if(D_(e))throw I_("Can't call method on "+e);return e},L_=C_,V_=Object,x_=function(e){return V_(L_(e))},F_=x_,G_=S_({}.hasOwnProperty),O_=Object.hasOwn||function(e,t){return G_(F_(e),t)},Z_=S_,P_=0,U_=Math.random(),N_=Z_(1..toString),B_=function(e){return"Symbol("+(void 0===e?"":e)+")_"+N_(++P_+U_,36)},M_="object"==typeof document&&document.all,W_={all:M_,IS_HTMLDDA:void 0===M_&&void 0!==M_},Y_=W_.all,X_=W_.IS_HTMLDDA?function(e){return"function"==typeof e||e===Y_}:function(e){return"function"==typeof e},Q_=u_,j_=X_,H_=function(e,t){return arguments.length<2?(n=Q_[e],j_(n)?n:void 0):Q_[e]&&Q_[e][t];var n},J_=H_("navigator","userAgent")||"",K_=u_,z_=J_,q_=K_.process,$_=K_.Deno,eb=q_&&q_.versions||$_&&$_.version,tb=eb&&eb.v8;tb&&(y_=(m_=tb.split("."))[0]>0&&m_[0]<4?1:+(m_[0]+m_[1])),!y_&&z_&&(!(m_=z_.match(/Edge\/(\d+)/))||m_[1]>=74)&&(m_=z_.match(/Chrome\/(\d+)/))&&(y_=+m_[1]);var nb=y_,rb=nb,ib=__,ob=!!Object.getOwnPropertySymbols&&!ib((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&rb&&rb<41})),ab=ob&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,sb=u_,ub=O_,cb=B_,lb=ob,hb=ab,Ab=g_("wks"),db=sb.Symbol,fb=db&&db.for,vb=hb?db:db&&db.withoutSetter||cb,pb=function(e){if(!ub(Ab,e)||!lb&&"string"!=typeof Ab[e]){var t="Symbol."+e;lb&&ub(db,e)?Ab[e]=db[e]:Ab[e]=hb&&fb?fb(t):vb(t)}return Ab[e]},mb={};mb[pb("toStringTag")]="z";var yb="[object z]"===String(mb),gb={},_b=!__((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),bb=X_,Eb=W_.all,kb=W_.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:bb(e)||e===Eb}:function(e){return"object"==typeof e?null!==e:bb(e)},Tb=kb,Rb=u_.document,Sb=Tb(Rb)&&Tb(Rb.createElement),wb=function(e){return Sb?Rb.createElement(e):{}},Db=wb,Ib=!_b&&!__((function(){return 7!=Object.defineProperty(Db("div"),"a",{get:function(){return 7}}).a})),Cb=_b&&__((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Lb=kb,Vb=String,xb=TypeError,Fb=function(e){if(Lb(e))return e;throw xb(Vb(e)+" is not an object")},Gb=b_,Ob=Function.prototype.call,Zb=Gb?Ob.bind(Ob):function(){return Ob.apply(Ob,arguments)},Pb=S_({}.isPrototypeOf),Ub=H_,Nb=X_,Bb=Pb,Mb=Object,Wb=ab?function(e){return"symbol"==typeof e}:function(e){var t=Ub("Symbol");return Nb(t)&&Bb(t.prototype,Mb(e))},Yb=String,Xb=function(e){try{return Yb(e)}catch(b6){return"Object"}},Qb=X_,jb=Xb,Hb=TypeError,Jb=function(e){if(Qb(e))return e;throw Hb(jb(e)+" is not a function")},Kb=Jb,zb=w_,qb=function(e,t){var n=e[t];return zb(n)?void 0:Kb(n)},$b=Zb,eE=X_,tE=kb,nE=TypeError,rE=Zb,iE=kb,oE=Wb,aE=qb,sE=function(e,t){var n,r;if("string"===t&&eE(n=e.toString)&&!tE(r=$b(n,e)))return r;if(eE(n=e.valueOf)&&!tE(r=$b(n,e)))return r;if("string"!==t&&eE(n=e.toString)&&!tE(r=$b(n,e)))return r;throw nE("Can't convert object to primitive value")},uE=TypeError,cE=pb("toPrimitive"),lE=function(e,t){if(!iE(e)||oE(e))return e;var n,r=aE(e,cE);if(r){if(void 0===t&&(t="default"),n=rE(r,e,t),!iE(n)||oE(n))return n;throw uE("Can't convert object to primitive value")}return void 0===t&&(t="number"),sE(e,t)},hE=lE,AE=Wb,dE=function(e){var t=hE(e,"string");return AE(t)?t:t+""},fE=_b,vE=Ib,pE=Cb,mE=Fb,yE=dE,gE=TypeError,_E=Object.defineProperty,bE=Object.getOwnPropertyDescriptor,EE="enumerable",kE="configurable",TE="writable";gb.f=fE?pE?function(e,t,n){if(mE(e),t=yE(t),mE(n),"function"==typeof e&&"prototype"===t&&"value"in n&&TE in n&&!n[TE]){var r=bE(e,t);r&&r[TE]&&(e[t]=n.value,n={configurable:kE in n?n[kE]:r[kE],enumerable:EE in n?n[EE]:r[EE],writable:!1})}return _E(e,t,n)}:_E:function(e,t,n){if(mE(e),t=yE(t),mE(n),vE)try{return _E(e,t,n)}catch(b6){}if("get"in n||"set"in n)throw gE("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var RE={exports:{}},SE=_b,wE=O_,DE=Function.prototype,IE=SE&&Object.getOwnPropertyDescriptor,CE=wE(DE,"name"),LE={EXISTS:CE,PROPER:CE&&"something"===function(){}.name,CONFIGURABLE:CE&&(!SE||SE&&IE(DE,"name").configurable)},VE=X_,xE=v_,FE=S_(Function.toString);VE(xE.inspectSource)||(xE.inspectSource=function(e){return FE(e)});var GE,OE,ZE,PE=xE.inspectSource,UE=X_,NE=u_.WeakMap,BE=UE(NE)&&/native code/.test(String(NE)),ME=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},WE=gb,YE=ME,XE=_b?function(e,t,n){return WE.f(e,t,YE(1,n))}:function(e,t,n){return e[t]=n,e},QE=B_,jE=g_("keys"),HE=function(e){return jE[e]||(jE[e]=QE(e))},JE={},KE=BE,zE=u_,qE=kb,$E=XE,ek=O_,tk=v_,nk=HE,rk=JE,ik="Object already initialized",ok=zE.TypeError,ak=zE.WeakMap;if(KE||tk.state){var sk=tk.state||(tk.state=new ak);sk.get=sk.get,sk.has=sk.has,sk.set=sk.set,GE=function(e,t){if(sk.has(e))throw ok(ik);return t.facade=e,sk.set(e,t),t},OE=function(e){return sk.get(e)||{}},ZE=function(e){return sk.has(e)}}else{var uk=nk("state");rk[uk]=!0,GE=function(e,t){if(ek(e,uk))throw ok(ik);return t.facade=e,$E(e,uk,t),t},OE=function(e){return ek(e,uk)?e[uk]:{}},ZE=function(e){return ek(e,uk)}}var ck={set:GE,get:OE,has:ZE,enforce:function(e){return ZE(e)?OE(e):GE(e,{})},getterFor:function(e){return function(t){var n;if(!qE(t)||(n=OE(t)).type!==e)throw ok("Incompatible receiver, "+e+" required");return n}}},lk=__,hk=X_,Ak=O_,dk=_b,fk=LE.CONFIGURABLE,vk=PE,pk=ck.enforce,mk=ck.get,yk=Object.defineProperty,gk=dk&&!lk((function(){return 8!==yk((function(){}),"length",{value:8}).length})),_k=String(String).split("String"),bk=RE.exports=function(e,t,n){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!Ak(e,"name")||fk&&e.name!==t)&&(dk?yk(e,"name",{value:t,configurable:!0}):e.name=t),gk&&n&&Ak(n,"arity")&&e.length!==n.arity&&yk(e,"length",{value:n.arity});try{n&&Ak(n,"constructor")&&n.constructor?dk&&yk(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(b6){}var r=pk(e);return Ak(r,"source")||(r.source=_k.join("string"==typeof t?t:"")),e};Function.prototype.toString=bk((function(){return hk(this)&&mk(this).source||vk(this)}),"toString");var Ek=RE.exports,kk=X_,Tk=gb,Rk=Ek,Sk=A_,wk=function(e,t,n,r){r||(r={});var i=r.enumerable,o=void 0!==r.name?r.name:t;if(kk(n)&&Rk(n,o,r),r.global)i?e[t]=n:Sk(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(b6){}i?e[t]=n:Tk.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},Dk=S_,Ik=Dk({}.toString),Ck=Dk("".slice),Lk=function(e){return Ck(Ik(e),8,-1)},Vk=yb,xk=X_,Fk=Lk,Gk=pb("toStringTag"),Ok=Object,Zk="Arguments"==Fk(function(){return arguments}()),Pk=Vk?Fk:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(b6){}}(t=Ok(e),Gk))?n:Zk?Fk(t):"Object"==(r=Fk(t))&&xk(t.callee)?"Arguments":r},Uk=Pk,Nk=yb?{}.toString:function(){return"[object "+Uk(this)+"]"};yb||wk(Object.prototype,"toString",Nk,{unsafe:!0});var Bk={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},Mk=wb("span").classList,Wk=Mk&&Mk.constructor&&Mk.constructor.prototype,Yk=Wk===Object.prototype?void 0:Wk,Xk=Lk,Qk=S_,jk=function(e){if("Function"===Xk(e))return Qk(e)},Hk=Jb,Jk=b_,Kk=jk(jk.bind),zk=function(e,t){return Hk(e),void 0===t?e:Jk?Kk(e,t):function(){return e.apply(t,arguments)}},qk=__,$k=Lk,eT=Object,tT=S_("".split),nT=qk((function(){return!eT("z").propertyIsEnumerable(0)}))?function(e){return"String"==$k(e)?tT(e,""):eT(e)}:eT,rT=Math.ceil,iT=Math.floor,oT=Math.trunc||function(e){var t=+e;return(t>0?iT:rT)(t)},aT=function(e){var t=+e;return t!=t||0===t?0:oT(t)},sT=aT,uT=Math.min,cT=function(e){return e>0?uT(sT(e),9007199254740991):0},lT=cT,hT=function(e){return lT(e.length)},AT=Lk,dT=Array.isArray||function(e){return"Array"==AT(e)},fT=S_,vT=__,pT=X_,mT=Pk,yT=PE,gT=function(){},_T=[],bT=H_("Reflect","construct"),ET=/^\s*(?:class|function)\b/,kT=fT(ET.exec),TT=!ET.exec(gT),RT=function(e){if(!pT(e))return!1;try{return bT(gT,_T,e),!0}catch(b6){return!1}},ST=function(e){if(!pT(e))return!1;switch(mT(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return TT||!!kT(ET,yT(e))}catch(b6){return!0}};ST.sham=!0;var wT=!bT||vT((function(){var e;return RT(RT.call)||!RT(Object)||!RT((function(){e=!0}))||e}))?ST:RT,DT=dT,IT=wT,CT=kb,LT=pb("species"),VT=Array,xT=function(e){var t;return DT(e)&&(t=e.constructor,(IT(t)&&(t===VT||DT(t.prototype))||CT(t)&&null===(t=t[LT]))&&(t=void 0)),void 0===t?VT:t},FT=function(e,t){return new(xT(e))(0===t?0:t)},GT=zk,OT=nT,ZT=x_,PT=hT,UT=FT,NT=S_([].push),BT=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(u,c,l,h){for(var A,d,f=ZT(u),v=OT(f),p=GT(c,l),m=PT(v),y=0,g=h||UT,_=t?g(u,m):n||a?g(u,0):void 0;m>y;y++)if((s||y in v)&&(d=p(A=v[y],y,f),e))if(t)_[y]=d;else if(d)switch(e){case 3:return!0;case 5:return A;case 6:return y;case 2:NT(_,A)}else switch(e){case 4:return!1;case 7:NT(_,A)}return o?-1:r||i?i:_}},MT={forEach:BT(0),map:BT(1),filter:BT(2),some:BT(3),every:BT(4),find:BT(5),findIndex:BT(6),filterReject:BT(7)},WT=__,YT=function(e,t){var n=[][e];return!!n&&WT((function(){n.call(null,t||function(){return 1},1)}))},XT=MT.forEach,QT=YT("forEach")?[].forEach:function(e){return XT(this,e,arguments.length>1?arguments[1]:void 0)},jT=u_,HT=Bk,JT=Yk,KT=QT,zT=XE,qT=function(e){if(e&&e.forEach!==KT)try{zT(e,"forEach",KT)}catch(b6){e.forEach=KT}};for(var $T in HT)HT[$T]&&qT(jT[$T]&&jT[$T].prototype);qT(JT);var eR={},tR={},nR={}.propertyIsEnumerable,rR=Object.getOwnPropertyDescriptor,iR=rR&&!nR.call({1:2},1);tR.f=iR?function(e){var t=rR(this,e);return!!t&&t.enumerable}:nR;var oR=nT,aR=C_,sR=function(e){return oR(aR(e))},uR=_b,cR=Zb,lR=tR,hR=ME,AR=sR,dR=dE,fR=O_,vR=Ib,pR=Object.getOwnPropertyDescriptor;eR.f=uR?pR:function(e,t){if(e=AR(e),t=dR(t),vR)try{return pR(e,t)}catch(b6){}if(fR(e,t))return hR(!cR(lR.f,e,t),e[t])};var mR={},yR=aT,gR=Math.max,_R=Math.min,bR=function(e,t){var n=yR(e);return n<0?gR(n+t,0):_R(n,t)},ER=sR,kR=bR,TR=hT,RR=function(e){return function(t,n,r){var i,o=ER(t),a=TR(o),s=kR(r,a);if(e&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}},SR={includes:RR(!0),indexOf:RR(!1)},wR=O_,DR=sR,IR=SR.indexOf,CR=JE,LR=S_([].push),VR=function(e,t){var n,r=DR(e),i=0,o=[];for(n in r)!wR(CR,n)&&wR(r,n)&&LR(o,n);for(;t.length>i;)wR(r,n=t[i++])&&(~IR(o,n)||LR(o,n));return o},xR=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],FR=VR,GR=xR.concat("length","prototype");mR.f=Object.getOwnPropertyNames||function(e){return FR(e,GR)};var OR={};OR.f=Object.getOwnPropertySymbols;var ZR=H_,PR=mR,UR=OR,NR=Fb,BR=S_([].concat),MR=ZR("Reflect","ownKeys")||function(e){var t=PR.f(NR(e)),n=UR.f;return n?BR(t,n(e)):t},WR=O_,YR=MR,XR=eR,QR=gb,jR=__,HR=X_,JR=/#|\.prototype\./,KR=function(e,t){var n=qR[zR(e)];return n==eS||n!=$R&&(HR(t)?jR(t):!!t)},zR=KR.normalize=function(e){return String(e).replace(JR,".").toLowerCase()},qR=KR.data={},$R=KR.NATIVE="N",eS=KR.POLYFILL="P",tS=KR,nS=u_,rS=eR.f,iS=XE,oS=wk,aS=A_,sS=function(e,t,n){for(var r=YR(t),i=QR.f,o=XR.f,a=0;a<r.length;a++){var s=r[a];WR(e,s)||n&&WR(n,s)||i(e,s,o(t,s))}},uS=tS,cS=function(e,t){var n,r,i,o,a,s=e.target,u=e.global,c=e.stat;if(n=u?nS:c?nS[s]||aS(s,{}):(nS[s]||{}).prototype)for(r in t){if(o=t[r],i=e.dontCallGetSet?(a=rS(n,r))&&a.value:n[r],!uS(u?r:s+(c?".":"#")+r,e.forced)&&void 0!==i){if(typeof o==typeof i)continue;sS(o,i)}(e.sham||i&&i.sham)&&iS(o,"sham",!0),oS(n,r,o,e)}},lS={},hS=dE,AS=gb,dS=ME,fS=function(e,t,n){var r=hS(t);r in e?AS.f(e,r,dS(0,n)):e[r]=n},vS=bR,pS=hT,mS=fS,yS=Array,gS=Math.max,_S=function(e,t,n){for(var r=pS(e),i=vS(t,r),o=vS(void 0===n?r:n,r),a=yS(gS(o-i,0)),s=0;i<o;i++,s++)mS(a,s,e[i]);return a.length=s,a},bS=Lk,ES=sR,kS=mR.f,TS=_S,RS="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];lS.f=function(e){return RS&&"Window"==bS(e)?function(e){try{return kS(e)}catch(b6){return TS(RS)}}(e):kS(ES(e))};var SS=cS,wS=__,DS=lS.f;SS({target:"Object",stat:!0,forced:wS((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:DS});var IS=Pk,CS=String,LS=function(e){if("Symbol"===IS(e))throw TypeError("Cannot convert a Symbol value to a string");return CS(e)},VS=Fb,xS=function(){var e=VS(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},FS=__,GS=u_.RegExp,OS=FS((function(){var e=GS("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),ZS=OS||FS((function(){return!GS("a","y").sticky})),PS=OS||FS((function(){var e=GS("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),US={BROKEN_CARET:PS,MISSED_STICKY:ZS,UNSUPPORTED_Y:OS},NS={},BS=VR,MS=xR,WS=Object.keys||function(e){return BS(e,MS)},YS=_b,XS=Cb,QS=gb,jS=Fb,HS=sR,JS=WS;NS.f=YS&&!XS?Object.defineProperties:function(e,t){jS(e);for(var n,r=HS(t),i=JS(t),o=i.length,a=0;o>a;)QS.f(e,n=i[a++],r[n]);return e};var KS,zS=H_("document","documentElement"),qS=Fb,$S=NS,ew=xR,tw=JE,nw=zS,rw=wb,iw="prototype",ow="script",aw=HE("IE_PROTO"),sw=function(){},uw=function(e){return"<"+ow+">"+e+"</"+ow+">"},cw=function(e){e.write(uw("")),e.close();var t=e.parentWindow.Object;return e=null,t},lw=function(){try{KS=new ActiveXObject("htmlfile")}catch(b6){}var e,t,n;lw="undefined"!=typeof document?document.domain&&KS?cw(KS):(t=rw("iframe"),n="java"+ow+":",t.style.display="none",nw.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(uw("document.F=Object")),e.close(),e.F):cw(KS);for(var r=ew.length;r--;)delete lw[iw][ew[r]];return lw()};tw[aw]=!0;var hw,Aw,dw=Object.create||function(e,t){var n;return null!==e?(sw[iw]=qS(e),n=new sw,sw[iw]=null,n[aw]=e):n=lw(),void 0===t?n:$S.f(n,t)},fw=__,vw=u_.RegExp,pw=fw((function(){var e=vw(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),mw=__,yw=u_.RegExp,gw=mw((function(){var e=yw("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),_w=Zb,bw=S_,Ew=LS,kw=xS,Tw=US,Rw=dw,Sw=ck.get,ww=pw,Dw=gw,Iw=g_("native-string-replace",String.prototype.replace),Cw=RegExp.prototype.exec,Lw=Cw,Vw=bw("".charAt),xw=bw("".indexOf),Fw=bw("".replace),Gw=bw("".slice),Ow=(Aw=/b*/g,_w(Cw,hw=/a/,"a"),_w(Cw,Aw,"a"),0!==hw.lastIndex||0!==Aw.lastIndex),Zw=Tw.BROKEN_CARET,Pw=void 0!==/()??/.exec("")[1];(Ow||Pw||Zw||ww||Dw)&&(Lw=function(e){var t,n,r,i,o,a,s,u=this,c=Sw(u),l=Ew(e),h=c.raw;if(h)return h.lastIndex=u.lastIndex,t=_w(Lw,h,l),u.lastIndex=h.lastIndex,t;var A=c.groups,d=Zw&&u.sticky,f=_w(kw,u),v=u.source,p=0,m=l;if(d&&(f=Fw(f,"y",""),-1===xw(f,"g")&&(f+="g"),m=Gw(l,u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==Vw(l,u.lastIndex-1))&&(v="(?: "+v+")",m=" "+m,p++),n=new RegExp("^(?:"+v+")",f)),Pw&&(n=new RegExp("^"+v+"$(?!\\s)",f)),Ow&&(r=u.lastIndex),i=_w(Cw,d?n:u,m),d?i?(i.input=Gw(i.input,p),i[0]=Gw(i[0],p),i.index=u.lastIndex,u.lastIndex+=i[0].length):u.lastIndex=0:Ow&&i&&(u.lastIndex=u.global?i.index+i[0].length:r),Pw&&i&&i.length>1&&_w(Iw,i[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(i[o]=void 0)})),i&&A)for(i.groups=a=Rw(null),o=0;o<A.length;o++)a[(s=A[o])[0]]=i[s[1]];return i});var Uw=Lw;cS({target:"RegExp",proto:!0,forced:/./.exec!==Uw},{exec:Uw});var Nw,Bw,Mw=cS,Ww=Zb,Yw=X_,Xw=Fb,Qw=LS,jw=(Nw=!1,(Bw=/[ac]/).exec=function(){return Nw=!0,/./.exec.apply(this,arguments)},!0===Bw.test("abc")&&Nw),Hw=/./.test;Mw({target:"RegExp",proto:!0,forced:!jw},{test:function(e){var t=Xw(this),n=Qw(e),r=t.exec;if(!Yw(r))return Ww(Hw,t,n);var i=Ww(r,t,n);return null!==i&&(Xw(i),!0)}});var Jw=b_,Kw=Function.prototype,zw=Kw.apply,qw=Kw.call,$w="object"==typeof Reflect&&Reflect.apply||(Jw?qw.bind(zw):function(){return qw.apply(zw,arguments)}),eD=jk,tD=wk,nD=Uw,rD=__,iD=pb,oD=XE,aD=iD("species"),sD=RegExp.prototype,uD=S_,cD=aT,lD=LS,hD=C_,AD=uD("".charAt),dD=uD("".charCodeAt),fD=uD("".slice),vD=function(e){return function(t,n){var r,i,o=lD(hD(t)),a=cD(n),s=o.length;return a<0||a>=s?e?"":void 0:(r=dD(o,a))<55296||r>56319||a+1===s||(i=dD(o,a+1))<56320||i>57343?e?AD(o,a):r:e?fD(o,a,a+2):i-56320+(r-55296<<10)+65536}},pD={codeAt:vD(!1),charAt:vD(!0)},mD=pD.charAt,yD=S_,gD=x_,_D=Math.floor,bD=yD("".charAt),ED=yD("".replace),kD=yD("".slice),TD=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,RD=/\$([$&'`]|\d{1,2})/g,SD=Zb,wD=Fb,DD=X_,ID=Lk,CD=Uw,LD=TypeError,VD=$w,xD=Zb,FD=S_,GD=function(e,t,n,r){var i=iD(e),o=!rD((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),a=o&&!rD((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[aD]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t}));if(!o||!a||n){var s=eD(/./[i]),u=t(i,""[e],(function(e,t,n,r,i){var a=eD(e),u=t.exec;return u===nD||u===sD.exec?o&&!i?{done:!0,value:s(t,n,r)}:{done:!0,value:a(n,t,r)}:{done:!1}}));tD(String.prototype,e,u[0]),tD(sD,i,u[1])}r&&oD(sD[i],"sham",!0)},OD=__,ZD=Fb,PD=X_,UD=w_,ND=aT,BD=cT,MD=LS,WD=C_,YD=function(e,t,n){return t+(n?mD(e,t).length:1)},XD=qb,QD=function(e,t,n,r,i,o){var a=n+e.length,s=r.length,u=RD;return void 0!==i&&(i=gD(i),u=TD),ED(o,u,(function(o,u){var c;switch(bD(u,0)){case"$":return"$";case"&":return e;case"`":return kD(t,0,n);case"'":return kD(t,a);case"<":c=i[kD(u,1,-1)];break;default:var l=+u;if(0===l)return o;if(l>s){var h=_D(l/10);return 0===h?o:h<=s?void 0===r[h-1]?bD(u,1):r[h-1]+bD(u,1):o}c=r[l-1]}return void 0===c?"":c}))},jD=function(e,t){var n=e.exec;if(DD(n)){var r=SD(n,e,t);return null!==r&&wD(r),r}if("RegExp"===ID(e))return SD(CD,e,t);throw LD("RegExp#exec called on incompatible receiver")},HD=pb("replace"),JD=Math.max,KD=Math.min,zD=FD([].concat),qD=FD([].push),$D=FD("".indexOf),eI=FD("".slice),tI="$0"==="a".replace(/./,"$0"),nI=!!/./[HD]&&""===/./[HD]("a","$0"),rI=!OD((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}));GD("replace",(function(e,t,n){var r=nI?"$":"$0";return[function(e,n){var r=WD(this),i=UD(e)?void 0:XD(e,HD);return i?xD(i,e,r,n):xD(t,MD(r),e,n)},function(e,i){var o=ZD(this),a=MD(e);if("string"==typeof i&&-1===$D(i,r)&&-1===$D(i,"$<")){var s=n(t,o,a,i);if(s.done)return s.value}var u=PD(i);u||(i=MD(i));var c=o.global;if(c){var l=o.unicode;o.lastIndex=0}for(var h=[];;){var A=jD(o,a);if(null===A)break;if(qD(h,A),!c)break;""===MD(A[0])&&(o.lastIndex=YD(a,BD(o.lastIndex),l))}for(var d,f="",v=0,p=0;p<h.length;p++){for(var m=MD((A=h[p])[0]),y=JD(KD(ND(A.index),a.length),0),g=[],_=1;_<A.length;_++)qD(g,void 0===(d=A[_])?d:String(d));var b=A.groups;if(u){var E=zD([m],g,y,a);void 0!==b&&qD(E,b);var k=MD(VD(i,void 0,E))}else k=QD(m,a,y,g,b,i);y>=v&&(f+=eI(a,v,y)+k,v=y+m.length)}return f+eI(a,v)}]}),!rI||!tI||nI);var iI=__,oI=nb,aI=pb("species"),sI=function(e){return oI>=51||!iI((function(){var t=[];return(t.constructor={})[aI]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},uI=MT.filter;cS({target:"Array",proto:!0,forced:!sI("filter")},{filter:function(e){return uI(this,e,arguments.length>1?arguments[1]:void 0)}});var cI,lI,hI,AI,dI="process"==Lk(u_.process),fI=X_,vI=String,pI=TypeError,mI=S_,yI=Fb,gI=function(e){if("object"==typeof e||fI(e))return e;throw pI("Can't set "+vI(e)+" as a prototype")},_I=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=mI(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(b6){}return function(n,r){return yI(n),gI(r),t?e(n,r):n.__proto__=r,n}}():void 0),bI=gb.f,EI=O_,kI=pb("toStringTag"),TI=function(e,t,n){e&&!n&&(e=e.prototype),e&&!EI(e,kI)&&bI(e,kI,{configurable:!0,value:t})},RI=H_,SI=gb,wI=_b,DI=pb("species"),II=function(e){var t=RI(e),n=SI.f;wI&&t&&!t[DI]&&n(t,DI,{configurable:!0,get:function(){return this}})},CI=Pb,LI=TypeError,VI=function(e,t){if(CI(t,e))return e;throw LI("Incorrect invocation")},xI=wT,FI=Xb,GI=TypeError,OI=function(e){if(xI(e))return e;throw GI(FI(e)+" is not a constructor")},ZI=Fb,PI=OI,UI=w_,NI=pb("species"),BI=function(e,t){var n,r=ZI(e).constructor;return void 0===r||UI(n=ZI(r)[NI])?t:PI(n)},MI=S_([].slice),WI=TypeError,YI=function(e,t){if(e<t)throw WI("Not enough arguments");return e},XI=/(?:ipad|iphone|ipod).*applewebkit/i.test(J_),QI=u_,jI=$w,HI=zk,JI=X_,KI=O_,zI=__,qI=zS,$I=MI,eC=wb,tC=YI,nC=XI,rC=dI,iC=QI.setImmediate,oC=QI.clearImmediate,aC=QI.process,sC=QI.Dispatch,uC=QI.Function,cC=QI.MessageChannel,lC=QI.String,hC=0,AC={},dC="onreadystatechange";try{cI=QI.location}catch(b6){}var fC=function(e){if(KI(AC,e)){var t=AC[e];delete AC[e],t()}},vC=function(e){return function(){fC(e)}},pC=function(e){fC(e.data)},mC=function(e){QI.postMessage(lC(e),cI.protocol+"//"+cI.host)};iC&&oC||(iC=function(e){tC(arguments.length,1);var t=JI(e)?e:uC(e),n=$I(arguments,1);return AC[++hC]=function(){jI(t,void 0,n)},lI(hC),hC},oC=function(e){delete AC[e]},rC?lI=function(e){aC.nextTick(vC(e))}:sC&&sC.now?lI=function(e){sC.now(vC(e))}:cC&&!nC?(AI=(hI=new cC).port2,hI.port1.onmessage=pC,lI=HI(AI.postMessage,AI)):QI.addEventListener&&JI(QI.postMessage)&&!QI.importScripts&&cI&&"file:"!==cI.protocol&&!zI(mC)?(lI=mC,QI.addEventListener("message",pC,!1)):lI=dC in eC("script")?function(e){qI.appendChild(eC("script"))[dC]=function(){qI.removeChild(this),fC(e)}}:function(e){setTimeout(vC(e),0)});var yC,gC,_C,bC,EC,kC,TC,RC,SC={set:iC,clear:oC},wC=u_,DC=/ipad|iphone|ipod/i.test(J_)&&void 0!==wC.Pebble,IC=/web0s(?!.*chrome)/i.test(J_),CC=u_,LC=zk,VC=eR.f,xC=SC.set,FC=XI,GC=DC,OC=IC,ZC=dI,PC=CC.MutationObserver||CC.WebKitMutationObserver,UC=CC.document,NC=CC.process,BC=CC.Promise,MC=VC(CC,"queueMicrotask"),WC=MC&&MC.value;WC||(yC=function(){var e,t;for(ZC&&(e=NC.domain)&&e.exit();gC;){t=gC.fn,gC=gC.next;try{t()}catch(b6){throw gC?bC():_C=void 0,b6}}_C=void 0,e&&e.enter()},FC||ZC||OC||!PC||!UC?!GC&&BC&&BC.resolve?((TC=BC.resolve(void 0)).constructor=BC,RC=LC(TC.then,TC),bC=function(){RC(yC)}):ZC?bC=function(){NC.nextTick(yC)}:(xC=LC(xC,CC),bC=function(){xC(yC)}):(EC=!0,kC=UC.createTextNode(""),new PC(yC).observe(kC,{characterData:!0}),bC=function(){kC.data=EC=!EC}));var YC=WC||function(e){var t={fn:e,next:void 0};_C&&(_C.next=t),gC||(gC=t,bC()),_C=t},XC=u_,QC=function(e){try{return{error:!1,value:e()}}catch(b6){return{error:!0,value:b6}}},jC=function(){this.head=null,this.tail=null};jC.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}};var HC=jC,JC=u_.Promise,KC="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,zC=!KC&&!dI&&"object"==typeof window&&"object"==typeof document,qC=u_,$C=JC,eL=X_,tL=tS,nL=PE,rL=pb,iL=zC,oL=KC,aL=nb;$C&&$C.prototype;var sL=rL("species"),uL=!1,cL=eL(qC.PromiseRejectionEvent),lL={CONSTRUCTOR:tL("Promise",(function(){var e=nL($C),t=e!==String($C);if(!t&&66===aL)return!0;if(!aL||aL<51||!/native code/.test(e)){var n=new $C((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[sL]=r,!(uL=n.then((function(){}))instanceof r))return!0}return!t&&(iL||oL)&&!cL})),REJECTION_EVENT:cL,SUBCLASSING:uL},hL={},AL=Jb,dL=TypeError,fL=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw dL("Bad Promise constructor");t=e,n=r})),this.resolve=AL(t),this.reject=AL(n)};hL.f=function(e){return new fL(e)};var vL,pL,mL,yL=cS,gL=dI,_L=u_,bL=Zb,EL=wk,kL=_I,TL=TI,RL=II,SL=Jb,wL=X_,DL=kb,IL=VI,CL=BI,LL=SC.set,VL=YC,xL=function(e,t){var n=XC.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))},FL=QC,GL=HC,OL=ck,ZL=JC,PL=hL,UL="Promise",NL=lL.CONSTRUCTOR,BL=lL.REJECTION_EVENT,ML=lL.SUBCLASSING,WL=OL.getterFor(UL),YL=OL.set,XL=ZL&&ZL.prototype,QL=ZL,jL=XL,HL=_L.TypeError,JL=_L.document,KL=_L.process,zL=PL.f,qL=zL,$L=!!(JL&&JL.createEvent&&_L.dispatchEvent),eV="unhandledrejection",tV=function(e){var t;return!(!DL(e)||!wL(t=e.then))&&t},nV=function(e,t){var n,r,i,o=t.value,a=1==t.state,s=a?e.ok:e.fail,u=e.resolve,c=e.reject,l=e.domain;try{s?(a||(2===t.rejection&&sV(t),t.rejection=1),!0===s?n=o:(l&&l.enter(),n=s(o),l&&(l.exit(),i=!0)),n===e.promise?c(HL("Promise-chain cycle")):(r=tV(n))?bL(r,n,u,c):u(n)):c(o)}catch(b6){l&&!i&&l.exit(),c(b6)}},rV=function(e,t){e.notified||(e.notified=!0,VL((function(){for(var n,r=e.reactions;n=r.get();)nV(n,e);e.notified=!1,t&&!e.rejection&&oV(e)})))},iV=function(e,t,n){var r,i;$L?((r=JL.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),_L.dispatchEvent(r)):r={promise:t,reason:n},!BL&&(i=_L["on"+e])?i(r):e===eV&&xL("Unhandled promise rejection",n)},oV=function(e){bL(LL,_L,(function(){var t,n=e.facade,r=e.value;if(aV(e)&&(t=FL((function(){gL?KL.emit("unhandledRejection",r,n):iV(eV,n,r)})),e.rejection=gL||aV(e)?2:1,t.error))throw t.value}))},aV=function(e){return 1!==e.rejection&&!e.parent},sV=function(e){bL(LL,_L,(function(){var t=e.facade;gL?KL.emit("rejectionHandled",t):iV("rejectionhandled",t,e.value)}))},uV=function(e,t,n){return function(r){e(t,r,n)}},cV=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,rV(e,!0))},lV=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw HL("Promise can't be resolved itself");var r=tV(t);r?VL((function(){var n={done:!1};try{bL(r,t,uV(lV,n,e),uV(cV,n,e))}catch(b6){cV(n,b6,e)}})):(e.value=t,e.state=1,rV(e,!1))}catch(b6){cV({done:!1},b6,e)}}};if(NL&&(jL=(QL=function(e){IL(this,jL),SL(e),bL(vL,this);var t=WL(this);try{e(uV(lV,t),uV(cV,t))}catch(b6){cV(t,b6)}}).prototype,(vL=function(e){YL(this,{type:UL,done:!1,notified:!1,parent:!1,reactions:new GL,rejection:!1,state:0,value:void 0})}).prototype=EL(jL,"then",(function(e,t){var n=WL(this),r=zL(CL(this,QL));return n.parent=!0,r.ok=!wL(e)||e,r.fail=wL(t)&&t,r.domain=gL?KL.domain:void 0,0==n.state?n.reactions.add(r):VL((function(){nV(r,n)})),r.promise})),pL=function(){var e=new vL,t=WL(e);this.promise=e,this.resolve=uV(lV,t),this.reject=uV(cV,t)},PL.f=zL=function(e){return e===QL||undefined===e?new pL(e):qL(e)},wL(ZL)&&XL!==Object.prototype)){mL=XL.then,ML||EL(XL,"then",(function(e,t){var n=this;return new QL((function(e,t){bL(mL,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete XL.constructor}catch(b6){}kL&&kL(XL,jL)}yL({global:!0,constructor:!0,wrap:!0,forced:NL},{Promise:QL}),TL(QL,UL,!1),RL(UL);var hV={},AV=hV,dV=pb("iterator"),fV=Array.prototype,vV=function(e){return void 0!==e&&(AV.Array===e||fV[dV]===e)},pV=Pk,mV=qb,yV=w_,gV=hV,_V=pb("iterator"),bV=function(e){if(!yV(e))return mV(e,_V)||mV(e,"@@iterator")||gV[pV(e)]},EV=Zb,kV=Jb,TV=Fb,RV=Xb,SV=bV,wV=TypeError,DV=function(e,t){var n=arguments.length<2?SV(e):t;if(kV(n))return TV(EV(n,e));throw wV(RV(e)+" is not iterable")},IV=Zb,CV=Fb,LV=qb,VV=function(e,t,n){var r,i;CV(e);try{if(!(r=LV(e,"return"))){if("throw"===t)throw n;return n}r=IV(r,e)}catch(b6){i=!0,r=b6}if("throw"===t)throw n;if(i)throw r;return CV(r),n},xV=zk,FV=Zb,GV=Fb,OV=Xb,ZV=vV,PV=hT,UV=Pb,NV=DV,BV=bV,MV=VV,WV=TypeError,YV=function(e,t){this.stopped=e,this.result=t},XV=YV.prototype,QV=function(e,t,n){var r,i,o,a,s,u,c,l=n&&n.that,h=!(!n||!n.AS_ENTRIES),A=!(!n||!n.IS_RECORD),d=!(!n||!n.IS_ITERATOR),f=!(!n||!n.INTERRUPTED),v=xV(t,l),p=function(e){return r&&MV(r,"normal",e),new YV(!0,e)},m=function(e){return h?(GV(e),f?v(e[0],e[1],p):v(e[0],e[1])):f?v(e,p):v(e)};if(A)r=e.iterator;else if(d)r=e;else{if(!(i=BV(e)))throw WV(OV(e)+" is not iterable");if(ZV(i)){for(o=0,a=PV(e);a>o;o++)if((s=m(e[o]))&&UV(XV,s))return s;return new YV(!1)}r=NV(e,i)}for(u=A?e.next:r.next;!(c=FV(u,r)).done;){try{s=m(c.value)}catch(b6){MV(r,"throw",b6)}if("object"==typeof s&&s&&UV(XV,s))return s}return new YV(!1)},jV=pb("iterator"),HV=!1;try{var JV=0,KV={next:function(){return{done:!!JV++}},return:function(){HV=!0}};KV[jV]=function(){return this},Array.from(KV,(function(){throw 2}))}catch(b6){}var zV=function(e,t){if(!t&&!HV)return!1;var n=!1;try{var r={};r[jV]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(b6){}return n},qV=JC,$V=lL.CONSTRUCTOR||!zV((function(e){qV.all(e).then(void 0,(function(){}))})),ex=Zb,tx=Jb,nx=hL,rx=QC,ix=QV;cS({target:"Promise",stat:!0,forced:$V},{all:function(e){var t=this,n=nx.f(t),r=n.resolve,i=n.reject,o=rx((function(){var n=tx(t.resolve),o=[],a=0,s=1;ix(e,(function(e){var u=a++,c=!1;s++,ex(n,t,e).then((function(e){c||(c=!0,o[u]=e,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise}});var ox=cS,ax=lL.CONSTRUCTOR,sx=JC,ux=H_,cx=X_,lx=wk,hx=sx&&sx.prototype;if(ox({target:"Promise",proto:!0,forced:ax,real:!0},{catch:function(e){return this.then(void 0,e)}}),cx(sx)){var Ax=ux("Promise").prototype.catch;hx.catch!==Ax&&lx(hx,"catch",Ax,{unsafe:!0})}var dx=Zb,fx=Jb,vx=hL,px=QC,mx=QV;cS({target:"Promise",stat:!0,forced:$V},{race:function(e){var t=this,n=vx.f(t),r=n.reject,i=px((function(){var i=fx(t.resolve);mx(e,(function(e){dx(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var yx=Zb,gx=hL;cS({target:"Promise",stat:!0,forced:lL.CONSTRUCTOR},{reject:function(e){var t=gx.f(this);return yx(t.reject,void 0,e),t.promise}});var _x=Fb,bx=kb,Ex=hL,kx=function(e,t){if(_x(e),bx(t)&&t.constructor===e)return t;var n=Ex.f(e);return(0,n.resolve)(t),n.promise},Tx=cS,Rx=lL.CONSTRUCTOR,Sx=kx;H_("Promise"),Tx({target:"Promise",stat:!0,forced:Rx},{resolve:function(e){return Sx(this,e)}});var wx=TypeError,Dx=function(e){if(e>9007199254740991)throw wx("Maximum allowed index exceeded");return e},Ix=cS,Cx=__,Lx=dT,Vx=kb,xx=x_,Fx=hT,Gx=Dx,Ox=fS,Zx=FT,Px=sI,Ux=nb,Nx=pb("isConcatSpreadable"),Bx=Ux>=51||!Cx((function(){var e=[];return e[Nx]=!1,e.concat()[0]!==e})),Mx=Px("concat"),Wx=function(e){if(!Vx(e))return!1;var t=e[Nx];return void 0!==t?!!t:Lx(e)};Ix({target:"Array",proto:!0,arity:1,forced:!Bx||!Mx},{concat:function(e){var t,n,r,i,o,a=xx(this),s=Zx(a,0),u=0;for(t=-1,r=arguments.length;t<r;t++)if(Wx(o=-1===t?a:arguments[t]))for(i=Fx(o),Gx(u+i),n=0;n<i;n++,u++)n in o&&Ox(s,u,o[n]);else Gx(u+1),Ox(s,u++,o);return s.length=u,s}});var Yx=cS,Xx=JC,Qx=__,jx=H_,Hx=X_,Jx=BI,Kx=kx,zx=wk,qx=Xx&&Xx.prototype;if(Yx({target:"Promise",proto:!0,real:!0,forced:!!Xx&&Qx((function(){qx.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Jx(this,jx("Promise")),n=Hx(e);return this.then(n?function(n){return Kx(t,e()).then((function(){return n}))}:e,n?function(n){return Kx(t,e()).then((function(){throw n}))}:e)}}),Hx(Xx)){var $x=jx("Promise").prototype.finally;qx.finally!==$x&&zx(qx,"finally",$x,{unsafe:!0})}var eF=X_,tF=kb,nF=_I,rF=function(e,t,n){var r,i;return nF&&eF(r=t.constructor)&&r!==n&&tF(i=r.prototype)&&i!==n.prototype&&nF(e,i),e},iF=S_(1..valueOf),oF="\t\n\v\f\r \u2028\u2029\ufeff",aF=C_,sF=LS,uF=oF,cF=S_("".replace),lF="["+uF+"]",hF=RegExp("^"+lF+lF+"*"),AF=RegExp(lF+lF+"*$"),dF=function(e){return function(t){var n=sF(aF(t));return 1&e&&(n=cF(n,hF,"")),2&e&&(n=cF(n,AF,"")),n}},fF={start:dF(1),end:dF(2),trim:dF(3)},vF=_b,pF=u_,mF=S_,yF=tS,gF=wk,_F=O_,bF=rF,EF=Pb,kF=Wb,TF=lE,RF=__,SF=mR.f,wF=eR.f,DF=gb.f,IF=iF,CF=fF.trim,LF="Number",VF=pF[LF],xF=VF.prototype,FF=pF.TypeError,GF=mF("".slice),OF=mF("".charCodeAt),ZF=function(e){var t,n,r,i,o,a,s,u,c=TF(e,"number");if(kF(c))throw FF("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=CF(c),43===(t=OF(c,0))||45===t){if(88===(n=OF(c,2))||120===n)return NaN}else if(48===t){switch(OF(c,1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+c}for(a=(o=GF(c,2)).length,s=0;s<a;s++)if((u=OF(o,s))<48||u>i)return NaN;return parseInt(o,r)}return+c};if(yF(LF,!VF(" 0o1")||!VF("0b1")||VF("+0x1"))){for(var PF,UF=function(e){var t=arguments.length<1?0:VF(function(e){var t=TF(e,"number");return"bigint"==typeof t?t:ZF(t)}(e)),n=this;return EF(xF,n)&&RF((function(){IF(n)}))?bF(Object(t),n,UF):t},NF=vF?SF(VF):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),BF=0;NF.length>BF;BF++)_F(VF,PF=NF[BF])&&!_F(UF,PF)&&DF(UF,PF,wF(VF,PF));UF.prototype=xF,xF.constructor=UF,gF(pF,LF,UF,{constructor:!0})}var MF=u_,WF=__,YF=LS,XF=fF.trim,QF=oF,jF=S_("".charAt),HF=MF.parseFloat,JF=MF.Symbol,KF=JF&&JF.iterator,zF=1/HF(QF+"-0")!=-1/0||KF&&!WF((function(){HF(Object(KF))}))?function(e){var t=XF(YF(e)),n=HF(t);return 0===n&&"-"==jF(t,0)?-0:n}:HF;cS({target:"Number",stat:!0,forced:Number.parseFloat!=zF},{parseFloat:zF}),cS({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var qF=MT.map;cS({target:"Array",proto:!0,forced:!sI("map")},{map:function(e){return qF(this,e,arguments.length>1?arguments[1]:void 0)}});var $F=x_,eG=bR,tG=hT,nG=function(e){for(var t=$F(this),n=tG(t),r=arguments.length,i=eG(r>1?arguments[1]:void 0,n),o=r>2?arguments[2]:void 0,a=void 0===o?n:eG(o,n);a>i;)t[i++]=e;return t},rG=pb,iG=dw,oG=gb.f,aG=rG("unscopables"),sG=Array.prototype;null==sG[aG]&&oG(sG,aG,{configurable:!0,value:iG(null)});var uG=function(e){sG[aG][e]=!0},cG=uG;cS({target:"Array",proto:!0},{fill:nG}),cG("fill");var lG,hG=n(te.setInterval),AG=function(){return"undefined"!=typeof navigator&&Mg((""+(/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))<10&&!window.MSStream},dG=function(){return"wakeLock"in navigator},fG=function(){function e(){var t=this;by(this,e),this.enabled=!1,dG()?(this._wakeLock=null,this.handleVisibilityChange=function(){null!==t._wakeLock&&t.visible&&t.enable()},document.addEventListener("visibilitychange",this.handleVisibilityChange),document.addEventListener("fullscreenchange",this.handleVisibilityChange)):AG()?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"mp4","data:video/mp4;base64, AAAAHGZ0eXBNNFYgAAACAGlzb21pc28yYXZjMQAAAAhmcmVlAAAGF21kYXTeBAAAbGliZmFhYyAxLjI4AABCAJMgBDIARwAAArEGBf//rdxF6b3m2Ui3lizYINkj7u94MjY0IC0gY29yZSAxNDIgcjIgOTU2YzhkOCAtIEguMjY0L01QRUctNCBBVkMgY29kZWMgLSBDb3B5bGVmdCAyMDAzLTIwMTQgLSBodHRwOi8vd3d3LnZpZGVvbGFuLm9yZy94MjY0Lmh0bWwgLSBvcHRpb25zOiBjYWJhYz0wIHJlZj0zIGRlYmxvY2s9MTowOjAgYW5hbHlzZT0weDE6MHgxMTEgbWU9aGV4IHN1Ym1lPTcgcHN5PTEgcHN5X3JkPTEuMDA6MC4wMCBtaXhlZF9yZWY9MSBtZV9yYW5nZT0xNiBjaHJvbWFfbWU9MSB0cmVsbGlzPTEgOHg4ZGN0PTAgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0xIGNocm9tYV9xcF9vZmZzZXQ9LTIgdGhyZWFkcz02IGxvb2thaGVhZF90aHJlYWRzPTEgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTI1MCBrZXlpbnRfbWluPTI1IHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NDAgcmM9Y3JmIG1idHJlZT0xIGNyZj0yMy4wIHFjb21wPTAuNjAgcXBtaW49MCBxcG1heD02OSBxcHN0ZXA9NCB2YnZfbWF4cmF0ZT03NjggdmJ2X2J1ZnNpemU9MzAwMCBjcmZfbWF4PTAuMCBuYWxfaHJkPW5vbmUgZmlsbGVyPTAgaXBfcmF0aW89MS40MCBhcT0xOjEuMDAAgAAAAFZliIQL8mKAAKvMnJycnJycnJycnXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXiEASZACGQAjgCEASZACGQAjgAAAAAdBmjgX4GSAIQBJkAIZACOAAAAAB0GaVAX4GSAhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGagC/AySEASZACGQAjgAAAAAZBmqAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZrAL8DJIQBJkAIZACOAAAAABkGa4C/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmwAvwMkhAEmQAhkAI4AAAAAGQZsgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGbQC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm2AvwMkhAEmQAhkAI4AAAAAGQZuAL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGboC/AySEASZACGQAjgAAAAAZBm8AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZvgL8DJIQBJkAIZACOAAAAABkGaAC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmiAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpAL8DJIQBJkAIZACOAAAAABkGaYC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmoAvwMkhAEmQAhkAI4AAAAAGQZqgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGawC/AySEASZACGQAjgAAAAAZBmuAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZsAL8DJIQBJkAIZACOAAAAABkGbIC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm0AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZtgL8DJIQBJkAIZACOAAAAABkGbgCvAySEASZACGQAjgCEASZACGQAjgAAAAAZBm6AnwMkhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AAAAhubW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAD6AAABDcAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAzB0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAA+kAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAALAAAACQAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAPpAAAAAAABAAAAAAKobWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAB1MAAAdU5VxAAAAAAALWhkbHIAAAAAAAAAAHZpZGUAAAAAAAAAAAAAAABWaWRlb0hhbmRsZXIAAAACU21pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAhNzdGJsAAAAr3N0c2QAAAAAAAAAAQAAAJ9hdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAALAAkABIAAAASAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGP//AAAALWF2Y0MBQsAN/+EAFWdCwA3ZAsTsBEAAAPpAADqYA8UKkgEABWjLg8sgAAAAHHV1aWRraEDyXyRPxbo5pRvPAyPzAAAAAAAAABhzdHRzAAAAAAAAAAEAAAAeAAAD6QAAABRzdHNzAAAAAAAAAAEAAAABAAAAHHN0c2MAAAAAAAAAAQAAAAEAAAABAAAAAQAAAIxzdHN6AAAAAAAAAAAAAAAeAAADDwAAAAsAAAALAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAAiHN0Y28AAAAAAAAAHgAAAEYAAANnAAADewAAA5gAAAO0AAADxwAAA+MAAAP2AAAEEgAABCUAAARBAAAEXQAABHAAAASMAAAEnwAABLsAAATOAAAE6gAABQYAAAUZAAAFNQAABUgAAAVkAAAFdwAABZMAAAWmAAAFwgAABd4AAAXxAAAGDQAABGh0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAACAAAAAAAABDcAAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAQkAAADcAABAAAAAAPgbWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAC7gAAAykBVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAADi21pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAADT3N0YmwAAABnc3RzZAAAAAAAAAABAAAAV21wNGEAAAAAAAAAAQAAAAAAAAAAAAIAEAAAAAC7gAAAAAAAM2VzZHMAAAAAA4CAgCIAAgAEgICAFEAVBbjYAAu4AAAADcoFgICAAhGQBoCAgAECAAAAIHN0dHMAAAAAAAAAAgAAADIAAAQAAAAAAQAAAkAAAAFUc3RzYwAAAAAAAAAbAAAAAQAAAAEAAAABAAAAAgAAAAIAAAABAAAAAwAAAAEAAAABAAAABAAAAAIAAAABAAAABgAAAAEAAAABAAAABwAAAAIAAAABAAAACAAAAAEAAAABAAAACQAAAAIAAAABAAAACgAAAAEAAAABAAAACwAAAAIAAAABAAAADQAAAAEAAAABAAAADgAAAAIAAAABAAAADwAAAAEAAAABAAAAEAAAAAIAAAABAAAAEQAAAAEAAAABAAAAEgAAAAIAAAABAAAAFAAAAAEAAAABAAAAFQAAAAIAAAABAAAAFgAAAAEAAAABAAAAFwAAAAIAAAABAAAAGAAAAAEAAAABAAAAGQAAAAIAAAABAAAAGgAAAAEAAAABAAAAGwAAAAIAAAABAAAAHQAAAAEAAAABAAAAHgAAAAIAAAABAAAAHwAAAAQAAAABAAAA4HN0c3oAAAAAAAAAAAAAADMAAAAaAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw"),this._addSourceToVideo(this.noSleepVideo,"webm","data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4EEQoWBAhhTgGcBAAAAAAAVkhFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEwTbuMU6uEHFO7a1OsghV17AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAAEUq17GDD0JATYCNTGF2ZjU1LjMzLjEwMFdBjUxhdmY1NS4zMy4xMDBzpJBlrrXf3DCDVB8KcgbMpcr+RImIQJBgAAAAAAAWVK5rAQAAAAAAD++uAQAAAAAAADLXgQFzxYEBnIEAIrWcg3VuZIaFVl9WUDiDgQEj44OEAmJaAOABAAAAAAAABrCBsLqBkK4BAAAAAAAPq9eBAnPFgQKcgQAitZyDdW5khohBX1ZPUkJJU4OBAuEBAAAAAAAAEZ+BArWIQOdwAAAAAABiZIEgY6JPbwIeVgF2b3JiaXMAAAAAAoC7AAAAAAAAgLUBAAAAAAC4AQN2b3JiaXMtAAAAWGlwaC5PcmcgbGliVm9yYmlzIEkgMjAxMDExMDEgKFNjaGF1ZmVudWdnZXQpAQAAABUAAABlbmNvZGVyPUxhdmM1NS41Mi4xMDIBBXZvcmJpcyVCQ1YBAEAAACRzGCpGpXMWhBAaQlAZ4xxCzmvsGUJMEYIcMkxbyyVzkCGkoEKIWyiB0JBVAABAAACHQXgUhIpBCCGEJT1YkoMnPQghhIg5eBSEaUEIIYQQQgghhBBCCCGERTlokoMnQQgdhOMwOAyD5Tj4HIRFOVgQgydB6CCED0K4moOsOQghhCQ1SFCDBjnoHITCLCiKgsQwuBaEBDUojILkMMjUgwtCiJqDSTX4GoRnQXgWhGlBCCGEJEFIkIMGQcgYhEZBWJKDBjm4FITLQagahCo5CB+EIDRkFQCQAACgoiiKoigKEBqyCgDIAAAQQFEUx3EcyZEcybEcCwgNWQUAAAEACAAAoEiKpEiO5EiSJFmSJVmSJVmS5omqLMuyLMuyLMsyEBqyCgBIAABQUQxFcRQHCA1ZBQBkAAAIoDiKpViKpWiK54iOCISGrAIAgAAABAAAEDRDUzxHlETPVFXXtm3btm3btm3btm3btm1blmUZCA1ZBQBAAAAQ0mlmqQaIMAMZBkJDVgEACAAAgBGKMMSA0JBVAABAAACAGEoOogmtOd+c46BZDppKsTkdnEi1eZKbirk555xzzsnmnDHOOeecopxZDJoJrTnnnMSgWQqaCa0555wnsXnQmiqtOeeccc7pYJwRxjnnnCateZCajbU555wFrWmOmkuxOeecSLl5UptLtTnnnHPOOeecc84555zqxekcnBPOOeecqL25lpvQxTnnnE/G6d6cEM4555xzzjnnnHPOOeecIDRkFQAABABAEIaNYdwpCNLnaCBGEWIaMulB9+gwCRqDnELq0ehopJQ6CCWVcVJKJwgNWQUAAAIAQAghhRRSSCGFFFJIIYUUYoghhhhyyimnoIJKKqmooowyyyyzzDLLLLPMOuyssw47DDHEEEMrrcRSU2011lhr7jnnmoO0VlprrbVSSimllFIKQkNWAQAgAAAEQgYZZJBRSCGFFGKIKaeccgoqqIDQkFUAACAAgAAAAABP8hzRER3RER3RER3RER3R8RzPESVREiVREi3TMjXTU0VVdWXXlnVZt31b2IVd933d933d+HVhWJZlWZZlWZZlWZZlWZZlWZYgNGQVAAACAAAghBBCSCGFFFJIKcYYc8w56CSUEAgNWQUAAAIACAAAAHAUR3EcyZEcSbIkS9IkzdIsT/M0TxM9URRF0zRV0RVdUTdtUTZl0zVdUzZdVVZtV5ZtW7Z125dl2/d93/d93/d93/d93/d9XQdCQ1YBABIAADqSIymSIimS4ziOJElAaMgqAEAGAEAAAIriKI7jOJIkSZIlaZJneZaomZrpmZ4qqkBoyCoAABAAQAAAAAAAAIqmeIqpeIqoeI7oiJJomZaoqZoryqbsuq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq4LhIasAgAkAAB0JEdyJEdSJEVSJEdygNCQVQCADACAAAAcwzEkRXIsy9I0T/M0TxM90RM901NFV3SB0JBVAAAgAIAAAAAAAAAMybAUy9EcTRIl1VItVVMt1VJF1VNVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVN0zRNEwgNWQkAkAEAkBBTLS3GmgmLJGLSaqugYwxS7KWxSCpntbfKMYUYtV4ah5RREHupJGOKQcwtpNApJq3WVEKFFKSYYyoVUg5SIDRkhQAQmgHgcBxAsixAsiwAAAAAAAAAkDQN0DwPsDQPAAAAAAAAACRNAyxPAzTPAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABA0jRA8zxA8zwAAAAAAAAA0DwP8DwR8EQRAAAAAAAAACzPAzTRAzxRBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABA0jRA8zxA8zwAAAAAAAAAsDwP8EQR0DwRAAAAAAAAACzPAzxRBDzRAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEOAAABBgIRQasiIAiBMAcEgSJAmSBM0DSJYFTYOmwTQBkmVB06BpME0AAAAAAAAAAAAAJE2DpkHTIIoASdOgadA0iCIAAAAAAAAAAAAAkqZB06BpEEWApGnQNGgaRBEAAAAAAAAAAAAAzzQhihBFmCbAM02IIkQRpgkAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAGHAAAAgwoQwUGrIiAIgTAHA4imUBAIDjOJYFAACO41gWAABYliWKAABgWZooAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAYcAAACDChDBQashIAiAIAcCiKZQHHsSzgOJYFJMmyAJYF0DyApgFEEQAIAAAocAAACLBBU2JxgEJDVgIAUQAABsWxLE0TRZKkaZoniiRJ0zxPFGma53meacLzPM80IYqiaJoQRVE0TZimaaoqME1VFQAAUOAAABBgg6bE4gCFhqwEAEICAByKYlma5nmeJ4qmqZokSdM8TxRF0TRNU1VJkqZ5niiKommapqqyLE3zPFEURdNUVVWFpnmeKIqiaaqq6sLzPE8URdE0VdV14XmeJ4qiaJqq6roQRVE0TdNUTVV1XSCKpmmaqqqqrgtETxRNU1Vd13WB54miaaqqq7ouEE3TVFVVdV1ZBpimaaqq68oyQFVV1XVdV5YBqqqqruu6sgxQVdd1XVmWZQCu67qyLMsCAAAOHAAAAoygk4wqi7DRhAsPQKEhKwKAKAAAwBimFFPKMCYhpBAaxiSEFEImJaXSUqogpFJSKRWEVEoqJaOUUmopVRBSKamUCkIqJZVSAADYgQMA2IGFUGjISgAgDwCAMEYpxhhzTiKkFGPOOScRUoox55yTSjHmnHPOSSkZc8w556SUzjnnnHNSSuacc845KaVzzjnnnJRSSuecc05KKSWEzkEnpZTSOeecEwAAVOAAABBgo8jmBCNBhYasBABSAQAMjmNZmuZ5omialiRpmud5niiapiZJmuZ5nieKqsnzPE8URdE0VZXneZ4oiqJpqirXFUXTNE1VVV2yLIqmaZqq6rowTdNUVdd1XZimaaqq67oubFtVVdV1ZRm2raqq6rqyDFzXdWXZloEsu67s2rIAAPAEBwCgAhtWRzgpGgssNGQlAJABAEAYg5BCCCFlEEIKIYSUUggJAAAYcAAACDChDBQashIASAUAAIyx1lprrbXWQGettdZaa62AzFprrbXWWmuttdZaa6211lJrrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmstpZRSSimllFJKKaWUUkoppZRSSgUA+lU4APg/2LA6wknRWGChISsBgHAAAMAYpRhzDEIppVQIMeacdFRai7FCiDHnJKTUWmzFc85BKCGV1mIsnnMOQikpxVZjUSmEUlJKLbZYi0qho5JSSq3VWIwxqaTWWoutxmKMSSm01FqLMRYjbE2ptdhqq7EYY2sqLbQYY4zFCF9kbC2m2moNxggjWywt1VprMMYY3VuLpbaaizE++NpSLDHWXAAAd4MDAESCjTOsJJ0VjgYXGrISAAgJACAQUooxxhhzzjnnpFKMOeaccw5CCKFUijHGnHMOQgghlIwx5pxzEEIIIYRSSsaccxBCCCGEkFLqnHMQQgghhBBKKZ1zDkIIIYQQQimlgxBCCCGEEEoopaQUQgghhBBCCKmklEIIIYRSQighlZRSCCGEEEIpJaSUUgohhFJCCKGElFJKKYUQQgillJJSSimlEkoJJYQSUikppRRKCCGUUkpKKaVUSgmhhBJKKSWllFJKIYQQSikFAAAcOAAABBhBJxlVFmGjCRcegEJDVgIAZAAAkKKUUiktRYIipRikGEtGFXNQWoqocgxSzalSziDmJJaIMYSUk1Qy5hRCDELqHHVMKQYtlRhCxhik2HJLoXMOAAAAQQCAgJAAAAMEBTMAwOAA4XMQdAIERxsAgCBEZohEw0JweFAJEBFTAUBigkIuAFRYXKRdXECXAS7o4q4DIQQhCEEsDqCABByccMMTb3jCDU7QKSp1IAAAAAAADADwAACQXAAREdHMYWRobHB0eHyAhIiMkAgAAAAAABcAfAAAJCVAREQ0cxgZGhscHR4fICEiIyQBAIAAAgAAAAAggAAEBAQAAAAAAAIAAAAEBB9DtnUBAAAAAAAEPueBAKOFggAAgACjzoEAA4BwBwCdASqwAJAAAEcIhYWIhYSIAgIABhwJ7kPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99YAD+/6tQgKOFggADgAqjhYIAD4AOo4WCACSADqOZgQArADECAAEQEAAYABhYL/QACIBDmAYAAKOFggA6gA6jhYIAT4AOo5mBAFMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAGSADqOFggB6gA6jmYEAewAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIAj4AOo5mBAKMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAKSADqOFggC6gA6jmYEAywAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIAz4AOo4WCAOSADqOZgQDzADECAAEQEAAYABhYL/QACIBDmAYAAKOFggD6gA6jhYIBD4AOo5iBARsAEQIAARAQFGAAYWC/0AAiAQ5gGACjhYIBJIAOo4WCATqADqOZgQFDADECAAEQEAAYABhYL/QACIBDmAYAAKOFggFPgA6jhYIBZIAOo5mBAWsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAXqADqOFggGPgA6jmYEBkwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIBpIAOo4WCAbqADqOZgQG7ADECAAEQEAAYABhYL/QACIBDmAYAAKOFggHPgA6jmYEB4wAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIB5IAOo4WCAfqADqOZgQILADECAAEQEAAYABhYL/QACIBDmAYAAKOFggIPgA6jhYICJIAOo5mBAjMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAjqADqOFggJPgA6jmYECWwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYICZIAOo4WCAnqADqOZgQKDADECAAEQEAAYABhYL/QACIBDmAYAAKOFggKPgA6jhYICpIAOo5mBAqsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCArqADqOFggLPgA6jmIEC0wARAgABEBAUYABhYL/QACIBDmAYAKOFggLkgA6jhYIC+oAOo5mBAvsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAw+ADqOZgQMjADECAAEQEAAYABhYL/QACIBDmAYAAKOFggMkgA6jhYIDOoAOo5mBA0sAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCA0+ADqOFggNkgA6jmYEDcwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIDeoAOo4WCA4+ADqOZgQObADECAAEQEAAYABhYL/QACIBDmAYAAKOFggOkgA6jhYIDuoAOo5mBA8MAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCA8+ADqOFggPkgA6jhYID+oAOo4WCBA+ADhxTu2sBAAAAAAAAEbuPs4EDt4r3gQHxghEr8IEK"),this.noSleepVideo.addEventListener("loadedmetadata",(function(){t.noSleepVideo&&(t.noSleepVideo.duration<=1?t.noSleepVideo.setAttribute("loop",""):(t.onTimeupdate=function(){t.noSleepVideo.currentTime>.5&&(t.noSleepVideo.currentTime=Math.random())},t.noSleepVideo.addEventListener("timeupdate",t.onTimeupdate)))})))}return ky(e,[{key:"_addSourceToVideo",value:function(e,t,n){var r=document.createElement("source");r.src=n,r.type="video/".concat(t),e.appendChild(r)}},{key:"visible",get:function(){return"visible"===document.visibilityState}},{key:"isEnabled",get:function(){return this.enabled}},{key:"enable",value:function(){var e,t=this;if(dG()&&this.visible)return navigator.wakeLock.request("screen").then((function(e){t._wakeLock=e,t.enabled=!0,t._wakeLock.addEventListener("release",(function(){}))})).catch((function(){t.enabled=!1}));if(AG())return this.disable(),console.warn("\n NoSleep enabled for older iOS devices. This can interrupt\n active or long-running network requests from completing successfully.\n See https://github.com/richtr/NoSleep.js/issues/15 for more details.\n "),this.noSleepTimer=hG((function(){document.hidden||(window.location.href=window.location.href.split("#")[0],Lg(window.stop,0))}),15e3),this.enabled=!0,Zp.resolve();if(null!==(e=this.noSleepVideo)&&void 0!==e&&e.paused){var n=this.noSleepVideo.play();return n&&n.then((function(e){return t.enabled=!0,e})).catch((function(e){console.log("noSleep: ",e.message),t.enabled=!1}))}}},{key:"disable",value:function(){dG()?(this._wakeLock&&this._wakeLock.release(),this._wakeLock=null):AG()?this.noSleepTimer&&(console.warn("\n NoSleep now disabled for older iOS devices.\n "),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause(),this.enabled=!1}},{key:"toPlay",value:function(){if(this.noSleepVideo&&this.noSleepVideo.paused){var e=performance.now();this.lastTs||(this.lastTs=e),e-this.lastTs>1e4&&(this.enable(),this.lastTs=e)}}},{key:"destroy",value:function(){this.disable(),this.handleVisibilityChange&&(document.removeEventListener("visibilitychange",this.handleVisibilityChange),document.removeEventListener("fullscreenchange",this.handleVisibilityChange)),this.onTimeupdate&&this.noSleepVideo.removeEventListener("timeupdate",this.onTimeupdate),this.noSleepVideo=null}}]),e}();function vG(){if(!document.querySelector("#hackAudioPP")){var e=document.createElement("div");e.innerHTML="<audio id='hackAudioPP'></audio>",document.body.appendChild(e);var t=e.children.item(0);t.controls=!1,t.preload="auto",t.innerHTML="<source src=".concat("data:audio/mpeg;base64,//uQxAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAACAAACcQCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA//////////////////////////////////////////////////////////////////8AAABhTEFNRTMuMTAwA8MAAAAAAAAAABQgJAUHQQAB9AAAAnGMHkkIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//sQxAADgnABGiAAQBCqgCRMAAgEAH///////////////7+n/9FTuQsQH//////2NG0jWUGlio5gLQTOtIoeR2WX////X4s9Atb/JRVCbBUpeRUq//////////////////9RUi0f2jn/+xDECgPCjAEQAABN4AAANIAAAAQVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVQ==",' type="audio/mpeg"></source>'),t.muted=!0,t.loop=!0,t.play().catch((function(){}))}}function pG(){var e=lG||(lG=document.querySelector("#hackAudioPP"));e?!1===e.paused&&!1===e.muted||(e.muted=!1,e.play().catch((function(e){console.log("bgAudio: ",e.message)}))):vG()}var mG=In,yG=Date,gG=p(yG.prototype.getTime);mG({target:"Date",stat:!0},{now:function(){return gG(new yG)}});var _G,bG,EG,kG=n(te.Date.now),TG=!__((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),RG=O_,SG=X_,wG=x_,DG=TG,IG=HE("IE_PROTO"),CG=Object,LG=CG.prototype,VG=DG?CG.getPrototypeOf:function(e){var t=wG(e);if(RG(t,IG))return t[IG];var n=t.constructor;return SG(n)&&t instanceof n?n.prototype:t instanceof CG?LG:null},xG=__,FG=X_,GG=kb,OG=VG,ZG=wk,PG=pb("iterator"),UG=!1;[].keys&&("next"in(EG=[].keys())?(bG=OG(OG(EG)))!==Object.prototype&&(_G=bG):UG=!0),(!GG(_G)||xG((function(){var e={};return _G[PG].call(e)!==e})))&&(_G={}),FG(_G[PG])||ZG(_G,PG,(function(){return this}));var NG={IteratorPrototype:_G,BUGGY_SAFARI_ITERATORS:UG},BG=NG.IteratorPrototype,MG=dw,WG=ME,YG=TI,XG=hV,QG=function(){return this},jG=function(e,t,n,r){var i=t+" Iterator";return e.prototype=MG(BG,{next:WG(+!r,n)}),YG(e,i,!1),XG[i]=QG,e},HG=cS,JG=Zb,KG=X_,zG=jG,qG=VG,$G=_I,eO=TI,tO=XE,nO=wk,rO=hV,iO=LE.PROPER,oO=LE.CONFIGURABLE,aO=NG.IteratorPrototype,sO=NG.BUGGY_SAFARI_ITERATORS,uO=pb("iterator"),cO="keys",lO="values",hO="entries",AO=function(){return this},dO=function(e,t,n,r,i,o,a){zG(n,t,r);var s,u,c,l=function(e){if(e===i&&v)return v;if(!sO&&e in d)return d[e];switch(e){case cO:case lO:case hO:return function(){return new n(this,e)}}return function(){return new n(this)}},h=t+" Iterator",A=!1,d=e.prototype,f=d[uO]||d["@@iterator"]||i&&d[i],v=!sO&&f||l(i),p="Array"==t&&d.entries||f;if(p&&(s=qG(p.call(new e)))!==Object.prototype&&s.next&&(qG(s)!==aO&&($G?$G(s,aO):KG(s[uO])||nO(s,uO,AO)),eO(s,h,!0)),iO&&i==lO&&f&&f.name!==lO&&(oO?tO(d,"name",lO):(A=!0,v=function(){return JG(f,this)})),i)if(u={values:l(lO),keys:o?v:l(cO),entries:l(hO)},a)for(c in u)(sO||A||!(c in d))&&nO(d,c,u[c]);else HG({target:t,proto:!0,forced:sO||A},u);return d[uO]!==v&&nO(d,uO,v,{name:i}),rO[t]=v,u},fO=function(e,t){return{value:e,done:t}},vO=sR,pO=uG,mO=hV,yO=ck,gO=gb.f,_O=dO,bO=fO,EO=_b,kO="Array Iterator",TO=yO.set,RO=yO.getterFor(kO),SO=_O(Array,"Array",(function(e,t){TO(this,{type:kO,target:vO(e),index:0,kind:t})}),(function(){var e=RO(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,bO(void 0,!0)):bO("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),wO=mO.Arguments=mO.Array;if(pO("keys"),pO("values"),pO("entries"),EO&&"values"!==wO.name)try{gO(wO,"name",{value:"values"})}catch(b6){}var DO,IO,CO,LO={exports:{}},VO="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,xO=VO,FO=_b,GO=u_,OO=X_,ZO=kb,PO=O_,UO=Pk,NO=Xb,BO=XE,MO=wk,WO=gb.f,YO=Pb,XO=VG,QO=_I,jO=pb,HO=B_,JO=ck.enforce,KO=ck.get,zO=GO.Int8Array,qO=zO&&zO.prototype,$O=GO.Uint8ClampedArray,eZ=$O&&$O.prototype,tZ=zO&&XO(zO),nZ=qO&&XO(qO),rZ=Object.prototype,iZ=GO.TypeError,oZ=jO("toStringTag"),aZ=HO("TYPED_ARRAY_TAG"),sZ="TypedArrayConstructor",uZ=xO&&!!QO&&"Opera"!==UO(GO.opera),cZ=!1,lZ={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},hZ={BigInt64Array:8,BigUint64Array:8},AZ=function(e){var t=XO(e);if(ZO(t)){var n=KO(t);return n&&PO(n,sZ)?n[sZ]:AZ(t)}},dZ=function(e){if(!ZO(e))return!1;var t=UO(e);return PO(lZ,t)||PO(hZ,t)};for(DO in lZ)(CO=(IO=GO[DO])&&IO.prototype)?JO(CO)[sZ]=IO:uZ=!1;for(DO in hZ)(CO=(IO=GO[DO])&&IO.prototype)&&(JO(CO)[sZ]=IO);if((!uZ||!OO(tZ)||tZ===Function.prototype)&&(tZ=function(){throw iZ("Incorrect invocation")},uZ))for(DO in lZ)GO[DO]&&QO(GO[DO],tZ);if((!uZ||!nZ||nZ===rZ)&&(nZ=tZ.prototype,uZ))for(DO in lZ)GO[DO]&&QO(GO[DO].prototype,nZ);if(uZ&&XO(eZ)!==nZ&&QO(eZ,nZ),FO&&!PO(nZ,oZ))for(DO in cZ=!0,WO(nZ,oZ,{get:function(){return ZO(this)?this[aZ]:void 0}}),lZ)GO[DO]&&BO(GO[DO],aZ,DO);var fZ={NATIVE_ARRAY_BUFFER_VIEWS:uZ,TYPED_ARRAY_TAG:cZ&&aZ,aTypedArray:function(e){if(dZ(e))return e;throw iZ("Target is not a typed array")},aTypedArrayConstructor:function(e){if(OO(e)&&(!QO||YO(tZ,e)))return e;throw iZ(NO(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n,r){if(FO){if(n)for(var i in lZ){var o=GO[i];if(o&&PO(o.prototype,e))try{delete o.prototype[e]}catch(b6){try{o.prototype[e]=t}catch(a){}}}nZ[e]&&!n||MO(nZ,e,n?t:uZ&&qO[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,i;if(FO){if(QO){if(n)for(r in lZ)if((i=GO[r])&&PO(i,e))try{delete i[e]}catch(b6){}if(tZ[e]&&!n)return;try{return MO(tZ,e,n?t:uZ&&tZ[e]||t)}catch(b6){}}for(r in lZ)!(i=GO[r])||i[e]&&!n||MO(i,e,t)}},getTypedArrayConstructor:AZ,isView:function(e){if(!ZO(e))return!1;var t=UO(e);return"DataView"===t||PO(lZ,t)||PO(hZ,t)},isTypedArray:dZ,TypedArray:tZ,TypedArrayPrototype:nZ},vZ=u_,pZ=__,mZ=zV,yZ=fZ.NATIVE_ARRAY_BUFFER_VIEWS,gZ=vZ.ArrayBuffer,_Z=vZ.Int8Array,bZ=!yZ||!pZ((function(){_Z(1)}))||!pZ((function(){new _Z(-1)}))||!mZ((function(e){new _Z,new _Z(null),new _Z(1.5),new _Z(e)}),!0)||pZ((function(){return 1!==new _Z(new gZ(2),1,void 0).length})),EZ=wk,kZ=function(e,t,n){for(var r in t)EZ(e,r,t[r],n);return e},TZ=aT,RZ=cT,SZ=RangeError,wZ=function(e){if(void 0===e)return 0;var t=TZ(e),n=RZ(t);if(t!==n)throw SZ("Wrong length or index");return n},DZ=Array,IZ=Math.abs,CZ=Math.pow,LZ=Math.floor,VZ=Math.log,xZ=Math.LN2,FZ=u_,GZ=S_,OZ=_b,ZZ=VO,PZ=LE,UZ=XE,NZ=kZ,BZ=__,MZ=VI,WZ=aT,YZ=cT,XZ=wZ,QZ={pack:function(e,t,n){var r,i,o,a=DZ(n),s=8*n-t-1,u=(1<<s)-1,c=u>>1,l=23===t?CZ(2,-24)-CZ(2,-77):0,h=e<0||0===e&&1/e<0?1:0,A=0;for((e=IZ(e))!=e||e===1/0?(i=e!=e?1:0,r=u):(r=LZ(VZ(e)/xZ),e*(o=CZ(2,-r))<1&&(r--,o*=2),(e+=r+c>=1?l/o:l*CZ(2,1-c))*o>=2&&(r++,o/=2),r+c>=u?(i=0,r=u):r+c>=1?(i=(e*o-1)*CZ(2,t),r+=c):(i=e*CZ(2,c-1)*CZ(2,t),r=0));t>=8;)a[A++]=255&i,i/=256,t-=8;for(r=r<<t|i,s+=t;s>0;)a[A++]=255&r,r/=256,s-=8;return a[--A]|=128*h,a},unpack:function(e,t){var n,r=e.length,i=8*r-t-1,o=(1<<i)-1,a=o>>1,s=i-7,u=r-1,c=e[u--],l=127&c;for(c>>=7;s>0;)l=256*l+e[u--],s-=8;for(n=l&(1<<-s)-1,l>>=-s,s+=t;s>0;)n=256*n+e[u--],s-=8;if(0===l)l=1-a;else{if(l===o)return n?NaN:c?-1/0:1/0;n+=CZ(2,t),l-=a}return(c?-1:1)*n*CZ(2,l-t)}},jZ=VG,HZ=_I,JZ=mR.f,KZ=gb.f,zZ=nG,qZ=_S,$Z=TI,eP=PZ.PROPER,tP=PZ.CONFIGURABLE,nP=ck.get,rP=ck.set,iP="ArrayBuffer",oP="DataView",aP="prototype",sP="Wrong index",uP=FZ[iP],cP=uP,lP=cP&&cP[aP],hP=FZ[oP],AP=hP&&hP[aP],dP=Object.prototype,fP=FZ.Array,vP=FZ.RangeError,pP=GZ(zZ),mP=GZ([].reverse),yP=QZ.pack,gP=QZ.unpack,_P=function(e){return[255&e]},bP=function(e){return[255&e,e>>8&255]},EP=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},kP=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},TP=function(e){return yP(e,23,4)},RP=function(e){return yP(e,52,8)},SP=function(e,t){KZ(e[aP],t,{get:function(){return nP(this)[t]}})},wP=function(e,t,n,r){var i=XZ(n),o=nP(e);if(i+t>o.byteLength)throw vP(sP);var a=nP(o.buffer).bytes,s=i+o.byteOffset,u=qZ(a,s,s+t);return r?u:mP(u)},DP=function(e,t,n,r,i,o){var a=XZ(n),s=nP(e);if(a+t>s.byteLength)throw vP(sP);for(var u=nP(s.buffer).bytes,c=a+s.byteOffset,l=r(+i),h=0;h<t;h++)u[c+h]=l[o?h:t-h-1]};if(ZZ){var IP=eP&&uP.name!==iP;if(BZ((function(){uP(1)}))&&BZ((function(){new uP(-1)}))&&!BZ((function(){return new uP,new uP(1.5),new uP(NaN),1!=uP.length||IP&&!tP})))IP&&tP&&UZ(uP,"name",iP);else{(cP=function(e){return MZ(this,lP),new uP(XZ(e))})[aP]=lP;for(var CP,LP=JZ(uP),VP=0;LP.length>VP;)(CP=LP[VP++])in cP||UZ(cP,CP,uP[CP]);lP.constructor=cP}HZ&&jZ(AP)!==dP&&HZ(AP,dP);var xP=new hP(new cP(2)),FP=GZ(AP.setInt8);xP.setInt8(0,2147483648),xP.setInt8(1,2147483649),!xP.getInt8(0)&&xP.getInt8(1)||NZ(AP,{setInt8:function(e,t){FP(this,e,t<<24>>24)},setUint8:function(e,t){FP(this,e,t<<24>>24)}},{unsafe:!0})}else lP=(cP=function(e){MZ(this,lP);var t=XZ(e);rP(this,{bytes:pP(fP(t),0),byteLength:t}),OZ||(this.byteLength=t)})[aP],AP=(hP=function(e,t,n){MZ(this,AP),MZ(e,lP);var r=nP(e).byteLength,i=WZ(t);if(i<0||i>r)throw vP("Wrong offset");if(i+(n=void 0===n?r-i:YZ(n))>r)throw vP("Wrong length");rP(this,{buffer:e,byteLength:n,byteOffset:i}),OZ||(this.buffer=e,this.byteLength=n,this.byteOffset=i)})[aP],OZ&&(SP(cP,"byteLength"),SP(hP,"buffer"),SP(hP,"byteLength"),SP(hP,"byteOffset")),NZ(AP,{getInt8:function(e){return wP(this,1,e)[0]<<24>>24},getUint8:function(e){return wP(this,1,e)[0]},getInt16:function(e){var t=wP(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=wP(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return kP(wP(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return kP(wP(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return gP(wP(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return gP(wP(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){DP(this,1,e,_P,t)},setUint8:function(e,t){DP(this,1,e,_P,t)},setInt16:function(e,t){DP(this,2,e,bP,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){DP(this,2,e,bP,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){DP(this,4,e,EP,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){DP(this,4,e,EP,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){DP(this,4,e,TP,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){DP(this,8,e,RP,t,arguments.length>2?arguments[2]:void 0)}});$Z(cP,iP),$Z(hP,oP);var GP={ArrayBuffer:cP,DataView:hP},OP=kb,ZP=Math.floor,PP=Number.isInteger||function(e){return!OP(e)&&isFinite(e)&&ZP(e)===e},UP=aT,NP=RangeError,BP=function(e){var t=UP(e);if(t<0)throw NP("The argument can't be less than 0");return t},MP=RangeError,WP=function(e,t){var n=BP(e);if(n%t)throw MP("Wrong offset");return n},YP=Pk,XP=S_("".slice),QP=lE,jP=TypeError,HP=function(e){var t=QP(e,"number");if("number"==typeof t)throw jP("Can't convert number to bigint");return BigInt(t)},JP=zk,KP=Zb,zP=OI,qP=x_,$P=hT,eU=DV,tU=bV,nU=vV,rU=function(e){return"Big"===XP(YP(e),0,3)},iU=fZ.aTypedArrayConstructor,oU=HP,aU=cS,sU=u_,uU=Zb,cU=_b,lU=bZ,hU=fZ,AU=GP,dU=VI,fU=ME,vU=XE,pU=PP,mU=cT,yU=wZ,gU=WP,_U=dE,bU=O_,EU=Pk,kU=kb,TU=Wb,RU=dw,SU=Pb,wU=_I,DU=mR.f,IU=function(e){var t,n,r,i,o,a,s,u,c=zP(this),l=qP(e),h=arguments.length,A=h>1?arguments[1]:void 0,d=void 0!==A,f=tU(l);if(f&&!nU(f))for(u=(s=eU(l,f)).next,l=[];!(a=KP(u,s)).done;)l.push(a.value);for(d&&h>2&&(A=JP(A,arguments[2])),n=$P(l),r=new(iU(c))(n),i=rU(r),t=0;n>t;t++)o=d?A(l[t],t):l[t],r[t]=i?oU(o):+o;return r},CU=MT.forEach,LU=II,VU=gb,xU=eR,FU=rF,GU=ck.get,OU=ck.set,ZU=ck.enforce,PU=VU.f,UU=xU.f,NU=Math.round,BU=sU.RangeError,MU=AU.ArrayBuffer,WU=MU.prototype,YU=AU.DataView,XU=hU.NATIVE_ARRAY_BUFFER_VIEWS,QU=hU.TYPED_ARRAY_TAG,jU=hU.TypedArray,HU=hU.TypedArrayPrototype,JU=hU.aTypedArrayConstructor,KU=hU.isTypedArray,zU="BYTES_PER_ELEMENT",qU="Wrong length",$U=function(e,t){JU(e);for(var n=0,r=t.length,i=new e(r);r>n;)i[n]=t[n++];return i},eN=function(e,t){PU(e,t,{get:function(){return GU(this)[t]}})},tN=function(e){var t;return SU(WU,e)||"ArrayBuffer"==(t=EU(e))||"SharedArrayBuffer"==t},nN=function(e,t){return KU(e)&&!TU(t)&&t in e&&pU(+t)&&t>=0},rN=function(e,t){return t=_U(t),nN(e,t)?fU(2,e[t]):UU(e,t)},iN=function(e,t,n){return t=_U(t),!(nN(e,t)&&kU(n)&&bU(n,"value"))||bU(n,"get")||bU(n,"set")||n.configurable||bU(n,"writable")&&!n.writable||bU(n,"enumerable")&&!n.enumerable?PU(e,t,n):(e[t]=n.value,e)};cU?(XU||(xU.f=rN,VU.f=iN,eN(HU,"buffer"),eN(HU,"byteOffset"),eN(HU,"byteLength"),eN(HU,"length")),aU({target:"Object",stat:!0,forced:!XU},{getOwnPropertyDescriptor:rN,defineProperty:iN}),LO.exports=function(e,t,n){var r=e.match(/\d+$/)[0]/8,i=e+(n?"Clamped":"")+"Array",o="get"+e,a="set"+e,s=sU[i],u=s,c=u&&u.prototype,l={},h=function(e,t){PU(e,t,{get:function(){return function(e,t){var n=GU(e);return n.view[o](t*r+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,i){var o=GU(e);n&&(i=(i=NU(i))<0?0:i>255?255:255&i),o.view[a](t*r+o.byteOffset,i,!0)}(this,t,e)},enumerable:!0})};XU?lU&&(u=t((function(e,t,n,i){return dU(e,c),FU(kU(t)?tN(t)?void 0!==i?new s(t,gU(n,r),i):void 0!==n?new s(t,gU(n,r)):new s(t):KU(t)?$U(u,t):uU(IU,u,t):new s(yU(t)),e,u)})),wU&&wU(u,jU),CU(DU(s),(function(e){e in u||vU(u,e,s[e])})),u.prototype=c):(u=t((function(e,t,n,i){dU(e,c);var o,a,s,l=0,A=0;if(kU(t)){if(!tN(t))return KU(t)?$U(u,t):uU(IU,u,t);o=t,A=gU(n,r);var d=t.byteLength;if(void 0===i){if(d%r)throw BU(qU);if((a=d-A)<0)throw BU(qU)}else if((a=mU(i)*r)+A>d)throw BU(qU);s=a/r}else s=yU(t),o=new MU(a=s*r);for(OU(e,{buffer:o,byteOffset:A,byteLength:a,length:s,view:new YU(o)});l<s;)h(e,l++)})),wU&&wU(u,jU),c=u.prototype=RU(HU)),c.constructor!==u&&vU(c,"constructor",u),ZU(c).TypedArrayConstructor=u,QU&&vU(c,QU,i);var A=u!=s;l[i]=u,aU({global:!0,constructor:!0,forced:A,sham:!XU},l),zU in u||vU(u,zU,r),zU in c||vU(c,zU,r),LU(i)}):LO.exports=function(){};var oN=LO.exports;oN("Uint8",(function(e){return function(t,n,r){return e(this,t,n,r)}}));var aN=hT,sN=aT,uN=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("at",(function(e){var t=uN(this),n=aN(t),r=sN(e),i=r>=0?r:n+r;return i<0||i>=n?void 0:t[i]}));var cN=Xb,lN=TypeError,hN=function(e,t){if(!delete e[t])throw lN("Cannot delete property "+cN(t)+" of "+cN(e))},AN=x_,dN=bR,fN=hT,vN=hN,pN=Math.min,mN=[].copyWithin||function(e,t){var n=AN(this),r=fN(n),i=dN(e,r),o=dN(t,r),a=arguments.length>2?arguments[2]:void 0,s=pN((void 0===a?r:dN(a,r))-o,r-i),u=1;for(o<i&&i<o+s&&(u=-1,o+=s-1,i+=s-1);s-- >0;)o in n?n[i]=n[o]:vN(n,i),i+=u,o+=u;return n},yN=fZ,gN=S_(mN),_N=yN.aTypedArray;(0,yN.exportTypedArrayMethod)("copyWithin",(function(e,t){return gN(_N(this),e,t,arguments.length>2?arguments[2]:void 0)}));var bN=MT.every,EN=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("every",(function(e){return bN(EN(this),e,arguments.length>1?arguments[1]:void 0)}));var kN=nG,TN=HP,RN=Pk,SN=Zb,wN=__,DN=fZ.aTypedArray,IN=fZ.exportTypedArrayMethod,CN=S_("".slice);IN("fill",(function(e){var t=arguments.length;DN(this);var n="Big"===CN(RN(this),0,3)?TN(e):+e;return SN(kN,this,n,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),wN((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var LN=hT,VN=BI,xN=fZ.aTypedArrayConstructor,FN=fZ.getTypedArrayConstructor,GN=function(e){return xN(VN(e,FN(e)))},ON=function(e,t){for(var n=0,r=LN(t),i=new e(r);r>n;)i[n]=t[n++];return i},ZN=GN,PN=MT.filter,UN=function(e,t){return ON(ZN(e),t)},NN=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("filter",(function(e){var t=PN(NN(this),e,arguments.length>1?arguments[1]:void 0);return UN(this,t)}));var BN=MT.find,MN=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("find",(function(e){return BN(MN(this),e,arguments.length>1?arguments[1]:void 0)}));var WN=MT.findIndex,YN=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("findIndex",(function(e){return WN(YN(this),e,arguments.length>1?arguments[1]:void 0)}));var XN=zk,QN=nT,jN=x_,HN=hT,JN=function(e){var t=1==e;return function(n,r,i){for(var o,a=jN(n),s=QN(a),u=XN(r,i),c=HN(s);c-- >0;)if(u(o=s[c],c,a))switch(e){case 0:return o;case 1:return c}return t?-1:void 0}},KN={findLast:JN(0),findLastIndex:JN(1)},zN=KN.findLast,qN=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("findLast",(function(e){return zN(qN(this),e,arguments.length>1?arguments[1]:void 0)}));var $N=KN.findLastIndex,eB=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("findLastIndex",(function(e){return $N(eB(this),e,arguments.length>1?arguments[1]:void 0)}));var tB=MT.forEach,nB=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("forEach",(function(e){tB(nB(this),e,arguments.length>1?arguments[1]:void 0)}));var rB=SR.includes,iB=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("includes",(function(e){return rB(iB(this),e,arguments.length>1?arguments[1]:void 0)}));var oB=SR.indexOf,aB=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("indexOf",(function(e){return oB(aB(this),e,arguments.length>1?arguments[1]:void 0)}));var sB=u_,uB=__,cB=S_,lB=fZ,hB=SO,AB=pb("iterator"),dB=sB.Uint8Array,fB=cB(hB.values),vB=cB(hB.keys),pB=cB(hB.entries),mB=lB.aTypedArray,yB=lB.exportTypedArrayMethod,gB=dB&&dB.prototype,_B=!uB((function(){gB[AB].call([1])})),bB=!!gB&&gB.values&&gB[AB]===gB.values&&"values"===gB.values.name,EB=function(){return fB(mB(this))};yB("entries",(function(){return pB(mB(this))}),_B),yB("keys",(function(){return vB(mB(this))}),_B),yB("values",EB,_B||!bB,{name:"values"}),yB(AB,EB,_B||!bB,{name:"values"});var kB=fZ.aTypedArray,TB=fZ.exportTypedArrayMethod,RB=S_([].join);TB("join",(function(e){return RB(kB(this),e)}));var SB=$w,wB=sR,DB=aT,IB=hT,CB=YT,LB=Math.min,VB=[].lastIndexOf,xB=!!VB&&1/[1].lastIndexOf(1,-0)<0,FB=CB("lastIndexOf"),GB=xB||!FB?function(e){if(xB)return SB(VB,this,arguments)||0;var t=wB(this),n=IB(t),r=n-1;for(arguments.length>1&&(r=LB(r,DB(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}:VB,OB=$w,ZB=GB,PB=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return OB(ZB,PB(this),t>1?[e,arguments[1]]:[e])}));var UB=MT.map,NB=GN,BB=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("map",(function(e){return UB(BB(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(NB(e))(t)}))}));var MB=Jb,WB=x_,YB=nT,XB=hT,QB=TypeError,jB=function(e){return function(t,n,r,i){MB(n);var o=WB(t),a=YB(o),s=XB(o),u=e?s-1:0,c=e?-1:1;if(r<2)for(;;){if(u in a){i=a[u],u+=c;break}if(u+=c,e?u<0:s<=u)throw QB("Reduce of empty array with no initial value")}for(;e?u>=0:s>u;u+=c)u in a&&(i=n(i,a[u],u,o));return i}},HB={left:jB(!1),right:jB(!0)},JB=HB.left,KB=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return JB(KB(this),e,t,t>1?arguments[1]:void 0)}));var zB=HB.right,qB=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return zB(qB(this),e,t,t>1?arguments[1]:void 0)}));var $B=fZ.aTypedArray,eM=fZ.exportTypedArrayMethod,tM=Math.floor;eM("reverse",(function(){for(var e,t=this,n=$B(t).length,r=tM(n/2),i=0;i<r;)e=t[i],t[i++]=t[--n],t[n]=e;return t}));var nM=u_,rM=Zb,iM=fZ,oM=hT,aM=WP,sM=x_,uM=__,cM=nM.RangeError,lM=nM.Int8Array,hM=lM&&lM.prototype,AM=hM&&hM.set,dM=iM.aTypedArray,fM=iM.exportTypedArrayMethod,vM=!uM((function(){var e=new Uint8ClampedArray(2);return rM(AM,e,{length:1,0:3},1),3!==e[1]})),pM=vM&&iM.NATIVE_ARRAY_BUFFER_VIEWS&&uM((function(){var e=new lM(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));fM("set",(function(e){dM(this);var t=aM(arguments.length>1?arguments[1]:void 0,1),n=sM(e);if(vM)return rM(AM,this,n,t);var r=this.length,i=oM(n),o=0;if(i+t>r)throw cM("Wrong length");for(;o<i;)this[t+o]=n[o++]}),!vM||pM);var mM=GN,yM=MI,gM=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("slice",(function(e,t){for(var n=yM(gM(this),e,t),r=mM(this),i=0,o=n.length,a=new r(o);o>i;)a[i]=n[i++];return a}),__((function(){new Int8Array(1).slice()})));var _M=MT.some,bM=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("some",(function(e){return _M(bM(this),e,arguments.length>1?arguments[1]:void 0)}));var EM=_S,kM=Math.floor,TM=function(e,t){var n=e.length,r=kM(n/2);return n<8?RM(e,t):SM(e,TM(EM(e,0,r),t),TM(EM(e,r),t),t)},RM=function(e,t){for(var n,r,i=e.length,o=1;o<i;){for(r=o,n=e[o];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==o++&&(e[r]=n)}return e},SM=function(e,t,n,r){for(var i=t.length,o=n.length,a=0,s=0;a<i||s<o;)e[a+s]=a<i&&s<o?r(t[a],n[s])<=0?t[a++]:n[s++]:a<i?t[a++]:n[s++];return e},wM=TM,DM=J_.match(/firefox\/(\d+)/i),IM=!!DM&&+DM[1],CM=/MSIE|Trident/.test(J_),LM=J_.match(/AppleWebKit\/(\d+)\./),VM=!!LM&&+LM[1],xM=jk,FM=__,GM=Jb,OM=wM,ZM=IM,PM=CM,UM=nb,NM=VM,BM=fZ.aTypedArray,MM=fZ.exportTypedArrayMethod,WM=u_.Uint16Array,YM=WM&&xM(WM.prototype.sort),XM=!(!YM||FM((function(){YM(new WM(2),null)}))&&FM((function(){YM(new WM(2),{})}))),QM=!!YM&&!FM((function(){if(UM)return UM<74;if(ZM)return ZM<67;if(PM)return!0;if(NM)return NM<602;var e,t,n=new WM(516),r=Array(516);for(e=0;e<516;e++)t=e%4,n[e]=515-e,r[e]=e-2*t+3;for(YM(n,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(n[e]!==r[e])return!0}));MM("sort",(function(e){return void 0!==e&&GM(e),QM?YM(this,e):OM(BM(this),function(e){return function(t,n){return void 0!==e?+e(t,n)||0:n!=n?-1:t!=t?1:0===t&&0===n?1/t>0&&1/n<0?1:-1:t>n}}(e))}),!QM||XM);var jM=cT,HM=bR,JM=GN,KM=fZ.aTypedArray;(0,fZ.exportTypedArrayMethod)("subarray",(function(e,t){var n=KM(this),r=n.length,i=HM(e,r);return new(JM(n))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,jM((void 0===t?r:HM(t,r))-i))}));var zM=$w,qM=fZ,$M=__,eW=MI,tW=u_.Int8Array,nW=qM.aTypedArray,rW=qM.exportTypedArrayMethod,iW=[].toLocaleString,oW=!!tW&&$M((function(){iW.call(new tW(1))}));rW("toLocaleString",(function(){return zM(iW,oW?eW(nW(this)):nW(this),eW(arguments))}),$M((function(){return[1,2].toLocaleString()!=new tW([1,2]).toLocaleString()}))||!$M((function(){tW.prototype.toLocaleString.call([1,2])})));var aW=fZ.exportTypedArrayMethod,sW=__,uW=S_,cW=u_.Uint8Array,lW=cW&&cW.prototype||{},hW=[].toString,AW=uW([].join);sW((function(){hW.call({})}))&&(hW=function(){return AW(this)});var dW=lW.toString!=hW;aW("toString",hW,dW);var fW=new(function(){function e(){var t,n=this;by(this,e);try{var r=/xgd=(\d)/.exec(document.cookie);this._status=!!r,this._level=r&&r[1]}catch(i){this._status=!1}$l(t=["group","groupEnd","log","warn","error"]).call(t,(function(e){n[e]=function(t,r,i,o,a,s,u,c,l,h){var A,d,f;if(n._status){var v=t,p=Vl(A=[r,i,o,a,s,u,c,l,h]).call(A,(function(e){return void 0!==e}));(f=console)[e].apply(f,dg(d=["["+v+"]:"]).call(d,Vy(p)))}}}))}return ky(e,[{key:"enable",get:function(){return this._status}},{key:"long",get:function(){return"2"===this._level}}]),e}());function vW(e,t){if(e&&t){var n=new Uint8Array(e.byteLength+t.byteLength+11);n[0]=1,n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=255,n[5]=225;var r=6;return n.set(new Uint8Array([e.byteLength>>>8&255,255&e.byteLength]),r),r+=2,n.set(e,r),n[r+=e.byteLength]=1,r++,n.set(new Uint8Array([t.byteLength>>>8&255,255&t.byteLength]),r),r+=2,n.set(t,r),n}}var pW=I,mW=p,yW=V,gW=o,_W=di,bW=eo,EW=x,kW=Je,TW=Y,RW=Object.assign,SW=Object.defineProperty,wW=mW([].concat),DW=!RW||gW((function(){if(pW&&1!==RW({b:1},RW(SW({},"a",{enumerable:!0,get:function(){SW(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=RW({},e)[n]||_W(RW({},t)).join("")!=r}))?function(e,t){for(var n=kW(e),r=arguments.length,i=1,o=bW.f,a=EW.f;r>i;)for(var s,u=TW(arguments[i++]),c=o?wW(_W(u),o(u)):_W(u),l=c.length,h=0;l>h;)s=c[h++],pW&&!yW(a,u,s)||(n[s]=u[s]);return n}:RW,IW=DW;In({target:"Object",stat:!0,arity:2,forced:Object.assign!==IW},{assign:IW});var CW=n(te.Object.assign),LW=_b,VW=S_,xW=Zb,FW=__,GW=WS,OW=OR,ZW=tR,PW=x_,UW=nT,NW=Object.assign,BW=Object.defineProperty,MW=VW([].concat),WW=!NW||FW((function(){if(LW&&1!==NW({b:1},NW(BW({},"a",{enumerable:!0,get:function(){BW(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=NW({},e)[n]||GW(NW({},t)).join("")!=r}))?function(e,t){for(var n=PW(e),r=arguments.length,i=1,o=OW.f,a=ZW.f;r>i;)for(var s,u=UW(arguments[i++]),c=o?MW(GW(u),o(u)):GW(u),l=c.length,h=0;l>h;)s=c[h++],LW&&!xW(a,u,s)||(n[s]=u[s]);return n}:NW,YW=WW;cS({target:"Object",stat:!0,arity:2,forced:Object.assign!==YW},{assign:YW});var XW="xg-video",QW=!1;try{QW=WebAssembly&&WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]))}catch(E6){}var jW={preloadDecoder:!1,reuseWasmDecoder:!0,reuseMseForAudio:!1,preciseSeek:0,h264WithWebcodec:!0,lowDecodeThreshold:100,wasmFallbackToAsm:!1,audioWithMse:!0,canUseThreadMode:!1,disabledWhenErrorOccur:!0,disabledDuration:43200,evaluateVVCount:0,disabledByLowdecodePrecent:.5,maxDecodeOnceWasm:QW?6:8,maxDecodeOnceFirstTime:8,maxDecodeOnceWebcodec:20};function HW(){return XW}function JW(){return jW}function KW(){var e="undefined"!=typeof customElements&&customElements.get(XW);return e?{H264_DECODER_URL:e.h264Url,ASM_H264_DECODER_URL:e.h264AsmUrl,H265_DECODER_URL:e.h265Url,H265_THREAD_DECODER_URL:e.h265ThreadUrl,H265_SIMD_DECODER_URL:e.h265SimdUrl,ASM_H265_DECODER_URL:e.h265AsmUrl}:{}}function zW(){if("undefined"==typeof customElements)return!1;var e=customElements.get(XW);return QW&&!(null==e||!e.h265SimdUrl)}function qW(){if("undefined"==typeof customElements)return!1;var e=customElements.get(XW);return!!window.SharedArrayBuffer&&!(null==e||!e.h265ThreadUrl)}var $W=!1;try{var eY,tY;$W="1"===(null===(eY=localStorage)||void 0===eY||null===(tY=eY.getItem)||void 0===tY?void 0:tY.call(eY,"_sds"))}catch(E6){}var nY=0,rY=0,iY=0,oY=!1;function aY(e){localStorage.setItem("xgv_dis",e),2===e&&localStorage.setItem("xgv_dist",(new Date).getTime())}function sY(){if(!0===(!!oY||0!==JW().evaluateVVCount&&(nY===JW().evaluateVVCount&&(iY=rY/nY),iY>=JW().disabledByLowdecodePrecent&&(oY=!0),oY)))return!0;var e=localStorage.getItem("xgv_dis");if(!e)return!1;if("1"===e)return!0;if("2"===e){var t=localStorage.getItem("xgv_dist")||0;if(t=Number(t),((new Date).getTime()-t)/1e3<JW().disabledDuration)return!0;uY()}}function uY(){localStorage.removeItem("xgv_dist"),localStorage.removeItem("xgv_dis")}var cY={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||e,a),u=n?n+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 r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}wh&&(r.prototype=wh(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?hm(r).call(r,1):r);return Tl?dg(i).call(i,Tl(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i<o;i++)a[i]=r[i].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,i,o,a){var s=n?n+e:e;if(!this._events[s])return!1;var u,c,l=this._events[s],h=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),h){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,r),!0;case 4:return l.fn.call(l.context,t,r,i),!0;case 5:return l.fn.call(l.context,t,r,i,o),!0;case 6:return l.fn.call(l.context,t,r,i,o,a),!0}for(c=1,u=new Array(h-1);c<h;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var A,d=l.length;for(c=0;c<d;c++)switch(l[c].once&&this.removeListener(e,l[c].fn,void 0,!0),h){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,t);break;case 3:l[c].fn.call(l[c].context,t,r);break;case 4:l[c].fn.call(l[c].context,t,r,i);break;default:if(!u)for(A=1,u=new Array(h-1);A<h;A++)u[A-1]=arguments[A];l[c].fn.apply(l[c].context,u)}}return!0},s.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,i){var o=n?n+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||r&&s.context!==r||a(this,o);else{for(var u=0,c=[],l=s.length;u<l;u++)(s[u].fn!==t||i&&!s[u].once||r&&s[u].context!==r)&&c.push(s[u]);c.length?this._events[o]=1===c.length?c[0]:c:a(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}(cY);var lY=n(cY.exports),hY=i.isFinite;In({target:"Number",stat:!0},{isFinite:Number.isFinite||function(e){return"number"==typeof e&&hY(e)}});var AY=n(te.Number.isFinite),dY=Le,fY=Je,vY=Y,pY=Un,mY=TypeError,yY=function(e){return function(t,n,r,i){dY(n);var o=fY(t),a=vY(o),s=pY(o),u=e?s-1:0,c=e?-1:1;if(r<2)for(;;){if(u in a){i=a[u],u+=c;break}if(u+=c,e?u<0:s<=u)throw mY("Reduce of empty array with no initial value")}for(;e?u>=0:s>u;u+=c)u in a&&(i=n(i,a[u],u,o));return i}},gY={left:yY(!1),right:yY(!0)}.left;In({target:"Array",proto:!0,forced:!$A&&ve>79&&ve<83||!Wl("reduce")},{reduce:function(e){var t=arguments.length;return gY(this,e,t,t>1?arguments[1]:void 0)}});var _Y=wl("Array").reduce,bY=se,EY=_Y,kY=Array.prototype,TY=n((function(e){var t=e.reduce;return e===kY||bY(kY,e)&&t===kY.reduce?EY:t})),RY=u_.isFinite;cS({target:"Number",stat:!0},{isFinite:Number.isFinite||function(e){return"number"==typeof e&&RY(e)}});var SY=cS,wY=dT,DY=wT,IY=kb,CY=bR,LY=hT,VY=sR,xY=fS,FY=pb,GY=MI,OY=sI("slice"),ZY=FY("species"),PY=Array,UY=Math.max;SY({target:"Array",proto:!0,forced:!OY},{slice:function(e,t){var n,r,i,o=VY(this),a=LY(o),s=CY(e,a),u=CY(void 0===t?a:t,a);if(wY(o)&&(n=o.constructor,(DY(n)&&(n===PY||wY(n.prototype))||IY(n)&&null===(n=n[ZY]))&&(n=void 0),n===PY||void 0===n))return GY(o,s,u);for(r=new(void 0===n?PY:n)(UY(u-s,0)),i=0;s<u;s++,i++)s in o&&xY(r,i,o[s]);return r.length=i,r}});var NY={WAITING:0,CANPLAY:1,PLAY:2,PLAYING:3,PAUSE:4,SEEKING:5,SEEKED:6,LOADEDDATA:7,LOADEDMETADATA:8,TIMEUPDATE:9,DURATION_CHANGE:10,VOLUME_CHANGE:11,PROGRESS:12,ERROR:13,ENDED:14,RESIZE:15,LOADSTART:16,DECODE_FPS:17,LOW_DECODE:18,LARGE_AV_GAP:19,FIRST_FRAME:20},BY=["waiting","canplay","play","playing","pause","seeking","seeked","loadeddata","loadedmetadata","timeupdate","durationchange","volumechange","progress","error","ended","resize","loadstart","decodefps","lowdecode","largeavgap","firstframe"],MY={AUDIO_READY:"audio_ready",AUDIO_NOT_ALLOWED_AUTOPLAY:"audio_not_allowed_autoplay",AUDIO_WAITING:"audio_waiting",AUDIO_SYNC_DTS:"audio_sync_dts"},WY={VIDEO_DECODER_INIT:"video_decode_init",VIDEO_READY:"video_ready",VIDEO_WAITING:"video_waiting",AUTO_RUN:"auto_run",DECODE_LOW_FPS:"decode_low_fps",UPDATE_VIDEO_FILLTYPE:"update_video_filltype",UPDATE_VIDEO_COVER_POSITION:"update_video_cover_position"},YY={PLAY_EVENT:"play_event",SET_METADATA:"set_metadata",APPEND_CHUNKS:"append_chunks",START_RENDER:"start_render",DO_PLAY:"do_play",DO_PAUSE:"do_pause",DO_SEEK:"do_seek",SET_PLAYBACKRATE:"set_playbackrate",SYNC_DTS:"sync_dts",RESET_BASE_DTS:"reset_base_dts",UPDATE_VOLUME:"update_volume",SINGLE_TRACK:"single_track",DESTROY:"destroy",READY:"ready",UPDATE_GL_OPTIONS:"update_gl_options",SET_VIDEO_DURATION:"set_video_duration",SET_PLAY_MODE:"set_play_mode",UPDATE_CAPABILITY_LEVEL:"update_capability_level",INNER_DEGRADE:"inner_degrade",ADJUST_SEEK_TIME:"adjust_seek_time",CHASE_FRAME:"chase_frame",END_OF_STREAM:"end_of_stream",UPDATE_SEGMENT_END:"update_segment_end"},XY={INIT:"init",READY:"decoderready",REMUX:"remux",INIT_FAILED:"initfailed",DATAREADY:"dataReady",PLAY_FAILED:"playfailed",FRAGMENT_END:"fragmentEnd",APPEND_VIDEO:"appendVideo",FIRST_FRAME:"firstFrame",DECODED:"decoded",RENDE_END:"rendeEnd",CHASE_VIDEO_FRAME:"chaseVideoFrame",CHASE_VIDEO_FRAME_END:"chaseVideoFrameEnd",CHASE_AUDIO_FRAME:"chaseAudioFrame",INIT_SEGMENT:"initSegment",MEDIA_SEGMENT:"mediaSegment",FRAME_MAX_COUNY:"frameMaxCount",FRAME_MIN_COUNY:"frameMinCount"},QY=function(e){Ry(n,e);var t=Iy(n);function n(e,r){var i;return by(this,n),(i=t.call(this))._config=e,i._parent=r,i._meta=null,i._ready=!1,i._isLive=!0,i._innerDegrade=!1,i._singleTrack=-1,i}return ky(n,[{key:"analyse",get:function(){return this._parent.analyse}},{key:"isLive",get:function(){return this._isLive}},{key:"innerDegrade",get:function(){return this._innerDegrade}},{key:"noAudio",get:function(){return 1===this._singleTrack||2===this._singleTrack}},{key:"noVideo",get:function(){return 3===this._singleTrack}},{key:"duration",get:function(){return this._timeRange.duration},set:function(e){this._timeRange&&(this._timeRange.duration=e)}},{key:"_bindEvents",value:function(){var e,t,n,r,i,o,a,s,u=this;this._parent.on(YY.APPEND_CHUNKS,Dm(e=this._appendChunk).call(e,this)),this._parent.on(YY.RESET_BASE_DTS,Dm(t=this._resetDts).call(t,this)),this._parent.on(YY.START_RENDER,Dm(n=this._startRender).call(n,this)),this._parent.on(YY.DO_PLAY,Dm(r=this._doPlay).call(r,this)),this._parent.on(YY.DO_PAUSE,Dm(i=this._doPause).call(i,this)),this._parent.on(YY.DO_SEEK,Dm(o=this._doSeek).call(o,this)),this._parent.on(YY.DESTROY,Dm(a=this._destroy).call(a,this)),this._parent.on(YY.CHASE_FRAME,Dm(s=this._doChaseFrame).call(s,this)),this._parent.on(YY.SINGLE_TRACK,(function(e){u._singleTrack=e})),this._parent.on(YY.SET_PLAY_MODE,(function(e){u._isLive="LIVE"===e})),this._parent.on(YY.INNER_DEGRADE,(function(){u._innerDegrade=!0})),this._parent.on(YY.SET_VIDEO_DURATION,(function(e){u.duration=e}))}}]),n}(lY),jY=we,HY=TypeError,JY=function(e,t){if(!delete e[t])throw HY("Cannot delete property "+jY(t)+" of "+jY(e))},KY=Hi,zY=Math.floor,qY=function(e,t){var n=e.length,r=zY(n/2);return n<8?$Y(e,t):eX(e,qY(KY(e,0,r),t),qY(KY(e,r),t),t)},$Y=function(e,t){for(var n,r,i=e.length,o=1;o<i;){for(r=o,n=e[o];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==o++&&(e[r]=n)}return e},eX=function(e,t,n,r){for(var i=t.length,o=n.length,a=0,s=0;a<i||s<o;)e[a+s]=a<i&&s<o?r(t[a],n[s])<=0?t[a++]:n[s++]:a<i?t[a++]:n[s++];return e},tX=qY,nX=ue.match(/firefox\/(\d+)/i),rX=!!nX&&+nX[1],iX=/MSIE|Trident/.test(ue),oX=ue.match(/AppleWebKit\/(\d+)\./),aX=!!oX&&+oX[1],sX=In,uX=p,cX=Le,lX=Je,hX=Un,AX=JY,dX=Qr,fX=o,vX=tX,pX=Wl,mX=rX,yX=iX,gX=ve,_X=aX,bX=[],EX=uX(bX.sort),kX=uX(bX.push),TX=fX((function(){bX.sort(void 0)})),RX=fX((function(){bX.sort(null)})),SX=pX("sort"),wX=!fX((function(){if(gX)return gX<70;if(!(mX&&mX>3)){if(yX)return!0;if(_X)return _X<603;var e,t,n,r,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)bX.push({k:t+r,v:n})}for(bX.sort((function(e,t){return t.v-e.v})),r=0;r<bX.length;r++)t=bX[r].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));sX({target:"Array",proto:!0,forced:TX||!RX||!SX||!wX},{sort:function(e){void 0!==e&&cX(e);var t=lX(this);if(wX)return void 0===e?EX(t):EX(t,e);var n,r,i=[],o=hX(t);for(r=0;r<o;r++)r in t&&kX(i,t[r]);for(vX(i,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:dX(t)>dX(n)?1:-1}}(e)),n=hX(i),r=0;r<n;)t[r]=i[r++];for(;r<o;)AX(t,r++);return t}});var DX=wl("Array").sort,IX=se,CX=DX,LX=Array.prototype,VX=n((function(e){var t=e.sort;return e===LX||IX(LX,e)&&t===LX.sort?CX:t})),xX=cS,FX=S_,GX=Jb,OX=x_,ZX=hT,PX=hN,UX=LS,NX=__,BX=wM,MX=YT,WX=IM,YX=CM,XX=nb,QX=VM,jX=[],HX=FX(jX.sort),JX=FX(jX.push),KX=NX((function(){jX.sort(void 0)})),zX=NX((function(){jX.sort(null)})),qX=MX("sort"),$X=!NX((function(){if(XX)return XX<70;if(!(WX&&WX>3)){if(YX)return!0;if(QX)return QX<603;var e,t,n,r,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)jX.push({k:t+r,v:n})}for(jX.sort((function(e,t){return t.v-e.v})),r=0;r<jX.length;r++)t=jX[r].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));xX({target:"Array",proto:!0,forced:KX||!zX||!qX||!$X},{sort:function(e){void 0!==e&&GX(e);var t=OX(this);if($X)return void 0===e?HX(t):HX(t,e);var n,r,i=[],o=ZX(t);for(r=0;r<o;r++)r in t&&JX(i,t[r]);for(BX(i,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:UX(t)>UX(n)?1:-1}}(e)),n=ZX(i),r=0;r<n;)t[r]=i[r++];for(;r<o;)PX(t,r++);return t}});var eQ=function(){function e(t){by(this,e),this.TAG="AudioTimeRange",this._parent=t,this._buffers=[],this._duration=0,this._baseDts=0,this._lastBuffer=null}return ky(e,[{key:"isLive",get:function(){return this._parent.isLive}},{key:"duration",get:function(){return this._duration},set:function(e){this._duration=e}},{key:"buffered",get:function(){var e=this;if(this.isLive)return{length:this._duration?1:0,start:function(){return 0},end:function(){return e._duration}};var t=this._mergeBufferRanges();return{length:t.length,start:function(e){var n=t[e];return n?n.start:0},end:function(e){var n=t[e];return n?n.end:1/0}}}},{key:"resetDts",value:function(e){this._baseDts=e}},{key:"_transitionSamples",value:function(e){for(var t=e.numberOfChannels,n=e.length,r=512,i=0;i<t;i++){for(var o=e.getChannelData(i),a=0;a<r;a++)o[a]=o[a]*a/r;for(var s=n-r;s<n;s++)o[s]=o[s]*(n-s)/r}}},{key:"append",value:function(e,t,n,r){var i,o,a;-1===this._baseDts&&(this._baseDts=n),this._transitionSamples(e);var s=(n-this._baseDts)/1e3,u=s+t,c={start:s,end:u,startDts:n,source:e,duration:t,delay:r};if(fW.log(this.TAG,dg(i=dg(o="add new buffer range, startDts:".concat(n,", [")).call(o,c.start," , ")).call(i,c.end,"]")),!Vl(a=this._buffers).call(a,(function(e){return e.start===s})).length)return this._buffers.push(c),this.isLive&&(this._duration=u),c.start;console.error("音频重复")}},{key:"deletePassed",value:function(e){var t;return this._buffers=Vl(t=this._buffers).call(t,(function(t){return t.start>=e})),this._buffers[0]}},{key:"canSeek",value:function(e){var t=this._buffers[this._buffers.length-1];return!!t&&!(t.start<e)}},{key:"_mergeBufferRanges",value:function(){var e,t,n=VX(e=hm(t=this._buffers).call(t)).call(e,(function(e,t){return e.start>t.start?1:-1})),r=n.length,i=[];if(!r)return i;for(var o={start:n[0].start,end:n[0].end},a=1;a<r;a++){var s=n[a];Math.abs(o.end-s.start)<.5?o.end=s.end:(i.push(o),o={start:s.start,end:s.end})}return i.push(o),i}},{key:"getBuffer",value:function(e){var t,n,r;if(this.isLive)return this._buffers.shift();var i=Vl(t=this._buffers).call(t,(function(t){return t.start<e+.5&&t.end>e+.5}))[0];return fW.log(this.TAG,dg(n=dg(r="get audio buffer , currentTime:".concat(e," ,buffer:[")).call(r,i&&i.start," , ")).call(n,i&&i.end,"]")),0!==e||i?i:this._buffers[0]}},{key:"hasBuffer",value:function(){var e;return!(null===(e=this._buffers)||void 0===e||!e.length)}}]),e}(),tQ=[-5504,-5248,-6016,-5760,-4480,-4224,-4992,-4736,-7552,-7296,-8064,-7808,-6528,-6272,-7040,-6784,-2752,-2624,-3008,-2880,-2240,-2112,-2496,-2368,-3776,-3648,-4032,-3904,-3264,-3136,-3520,-3392,-22016,-20992,-24064,-23040,-17920,-16896,-19968,-18944,-30208,-29184,-32256,-31232,-26112,-25088,-28160,-27136,-11008,-10496,-12032,-11520,-8960,-8448,-9984,-9472,-15104,-14592,-16128,-15616,-13056,-12544,-14080,-13568,-344,-328,-376,-360,-280,-264,-312,-296,-472,-456,-504,-488,-408,-392,-440,-424,-88,-72,-120,-104,-24,-8,-56,-40,-216,-200,-248,-232,-152,-136,-184,-168,-1376,-1312,-1504,-1440,-1120,-1056,-1248,-1184,-1888,-1824,-2016,-1952,-1632,-1568,-1760,-1696,-688,-656,-752,-720,-560,-528,-624,-592,-944,-912,-1008,-976,-816,-784,-880,-848,5504,5248,6016,5760,4480,4224,4992,4736,7552,7296,8064,7808,6528,6272,7040,6784,2752,2624,3008,2880,2240,2112,2496,2368,3776,3648,4032,3904,3264,3136,3520,3392,22016,20992,24064,23040,17920,16896,19968,18944,30208,29184,32256,31232,26112,25088,28160,27136,11008,10496,12032,11520,8960,8448,9984,9472,15104,14592,16128,15616,13056,12544,14080,13568,344,328,376,360,280,264,312,296,472,456,504,488,408,392,440,424,88,72,120,104,24,8,56,40,216,200,248,232,152,136,184,168,1376,1312,1504,1440,1120,1056,1248,1184,1888,1824,2016,1952,1632,1568,1760,1696,688,656,752,720,560,528,624,592,944,912,1008,976,816,784,880,848],nQ=[-32124,-31100,-30076,-29052,-28028,-27004,-25980,-24956,-23932,-22908,-21884,-20860,-19836,-18812,-17788,-16764,-15996,-15484,-14972,-14460,-13948,-13436,-12924,-12412,-11900,-11388,-10876,-10364,-9852,-9340,-8828,-8316,-7932,-7676,-7420,-7164,-6908,-6652,-6396,-6140,-5884,-5628,-5372,-5116,-4860,-4604,-4348,-4092,-3900,-3772,-3644,-3516,-3388,-3260,-3132,-3004,-2876,-2748,-2620,-2492,-2364,-2236,-2108,-1980,-1884,-1820,-1756,-1692,-1628,-1564,-1500,-1436,-1372,-1308,-1244,-1180,-1116,-1052,-988,-924,-876,-844,-812,-780,-748,-716,-684,-652,-620,-588,-556,-524,-492,-460,-428,-396,-372,-356,-340,-324,-308,-292,-276,-260,-244,-228,-212,-196,-180,-164,-148,-132,-120,-112,-104,-96,-88,-80,-72,-64,-56,-48,-40,-32,-24,-16,-8,0,32124,31100,30076,29052,28028,27004,25980,24956,23932,22908,21884,20860,19836,18812,17788,16764,15996,15484,14972,14460,13948,13436,12924,12412,11900,11388,10876,10364,9852,9340,8828,8316,7932,7676,7420,7164,6908,6652,6396,6140,5884,5628,5372,5116,4860,4604,4348,4092,3900,3772,3644,3516,3388,3260,3132,3004,2876,2748,2620,2492,2364,2236,2108,1980,1884,1820,1756,1692,1628,1564,1500,1436,1372,1308,1244,1180,1116,1052,988,924,876,844,812,780,748,716,684,652,620,588,556,524,492,460,428,396,372,356,340,324,308,292,276,260,244,228,212,196,180,164,148,132,120,112,104,96,88,80,72,64,56,48,40,32,24,16,8,0],rQ=new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);var iQ={decodeG711:function(e,t){if("g7110a"===t)return function(e){for(var t=new Uint8Array(2*e.length),n=0,r=0;n<e.length;){var i=tQ[e[n]];if(void 0===i)throw new Error("can not decode g711 alaw data!");t[r]=255&i,t[r+1]=i>>8,n+=1,r+=2}return t}(e);if("g7110m"===t)return function(e){for(var t=new Uint8Array(2*e.length),n=0,r=0;n<e.length;){var i=nQ[e[n]];if(void 0===i)throw new Error("can not decode g711 ulaw data!");t[r]=255&i,t[r+1]=i>>8,n+=1,r+=2}return t}(e);throw new Error("no supported format=".concat(t," for g711"))},createAudioBufferFromPcm:function(e,t,n,r,i){for(var o,a=function(e,t,n){return e/t/n}(t.byteLength,n,i),s=e.createBuffer(n,a,r),u=new DataView(t),c=0;c<n;c++)for(var l=s.getChannelData(c),h=void 0,A=0;A<a;A++)h=u.getUint16(A*(2*n)+2*c,!0),l[A]=(o=h)>=32768?-(65536-o)/32768:o/32767;return{audioBuffer:s,duration:a/r}},packageAACToAdts:function(e,t){var n=new Uint8Array(t.data.byteLength+7),r=function(e,t){var n=e.sampleRateIndex,r=e.channelCount;n=function(e,t){var n=(7&e[0])<<1|e[1]>>>7;return n!==t?n:t}(e.config,n);var i=new Uint8Array(7);i[0]=255,i[1]=240,i[1]=1|i[1],i[2]=64,i[2]=i[2]|60&n<<2,i[2]=i[2]|1&r>>2,i[3]=192&r<<6;var o=t.byteLength+7;return i[3]=i[3]|3&o>>11,i[4]=255&o>>3,i[5]=224&o<<5,i[5]=31|i[5],i[6]=252,i}(e,t.data);return n.set(r),n.set(t.data,7),n},concatAdts:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0,r=0,i=e.length;r<i;r++)t&&r%t==0||(n+=e[r].byteLength);for(var o=new Uint8Array(n),a=0,s=0,u=e.length;s<u;s++)t&&s%t==0||(o.set(e[s],a),a+=e[s].byteLength);return o},checkRefillFrame:function(e){var t=e[0].dts,n=Vl(e).call(e,(function(e){return e.dts===t})).length;if(!(n<=1))for(var r=0;r<n;r++)e[r].data=rQ}},oQ="create new AudioContext error",aQ=function(e){Ry(i,e);var t,n,r=Iy(i);function i(e,t){var n,o;return by(this,i),Ty(Dy(o=r.call(this,e,t)),"doPause",o._doPause),o.TAG="AudioRender",o._timeRange=new eQ(Dy(o)),o._lastTimeLineTime=0,o._sampleQueue=[],o._source=null,o._audioCanAutoplay=!0,o._lastBuffer=null,o._inDecoding=!1,o._endOfStream=!1,o._delay=0,o._isSourceBufferEnd=-1,o._onSourceBufferEnded=Dm(n=o._onSourceBufferEnded).call(n,Dy(o)),o._initAudioCtx(e.volume||.6),o._bindEvents(),o}return ky(i,[{key:"baseDts",get:function(){return this._timeRange._baseDts}},{key:"currentTime",get:function(){return this._audioCtx?this._lastTimeLineTime+this._audioCtx.currentTime:0}},{key:"preloadTime",get:function(){return this.isLive?1:0}},{key:"timescale",get:function(){return 1e3}},{key:"buffered",get:function(){return this._timeRange.buffered}},{key:"ctxState",get:function(){return this._audioCtx.state}},{key:"audioCanAutoplay",get:function(){return this._audioCanAutoplay}},{key:"resume",value:function(){if(this._audioCtx&&"suspended"===this._audioCtx.state)return this._audioCtx.resume().catch((function(e){}))}},{key:"canSeek",value:function(e){return this._timeRange.canSeek(e)}},{key:"_assembleErr",value:function(e){var t=new Error(e);return t.code=3,t}},{key:"_emitTimelineEvents",value:function(e,t,n){var r,i;null===(r=this._parent)||void 0===r||null===(i=r.emit)||void 0===i||i.call(r,e,t,n)}},{key:"_initAudioCtx",value:function(e){var t=this;fW.log(this.TAG,"init audioCtx");var n=window.AudioContext||window.webkitAudioContext;return this._audioCtx=new n,this._audioCtx?(this._gainNode=this._audioCtx.createGain(),this._gainNode.gain.value=e,this._gainNode.connect(this._audioCtx.destination),this._audioCanAutoplay="running"===this._audioCtx.state,fW.log(this.TAG,"webAudio state:",this._audioCtx.state),vG(),this._bindAudioCtxEvent(),this._audioCtx.suspend()):(fW.warn(this.TAG,"create webaudio error!"),void Lg((function(){t._emitTimelineEvents(YY.PLAY_EVENT,NY.ERROR,t._assembleErr(oQ))})))}},{key:"_bindAudioCtxEvent",value:function(){var e=this;this._onStateChange=function(){e._audioCtx&&"running"===e._audioCtx.state&&e._ready&&e._emitTimelineEvents(YY.PLAY_EVENT,NY.PLAYING)},this._audioCtx.addEventListener("statechange",this._onStateChange)}},{key:"_bindEvents",value:function(){var e,t=this;Cy(Sy(i.prototype),"_bindEvents",this).call(this),this._parent.on(XY.CHASE_AUDIO_FRAME,Dm(e=this._doChaseFrame).call(e,this)),this._parent.on(YY.UPDATE_VOLUME,(function(e){t._gainNode&&(t._gainNode.gain.value=AY(e)?e:1,t._emitTimelineEvents(YY.PLAY_EVENT,NY.VOLUME_CHANGE))})),this._parent.on(YY.END_OF_STREAM,(function(){var e;t._endOfStream=!0,t.noAudio||null!==(e=t._timeRange)&&void 0!==e&&e.hasBuffer()||null==t||t._emitTimelineEvents(YY.PLAY_EVENT,NY.ENDED)}))}},{key:"_appendChunk",value:function(e,t){if(!this.noAudio){this._meta||(this._meta=t,fW.warn(this.TAG,"audio set metadata",this._meta));var n,r=t.samples;if(r.length)if(this._sampleQueue=dg(n=this._sampleQueue).call(n,r),t.samples=[],"aac"===this._meta.codecType){if(this._inDecoding)return;this._decodeAACWrapper()}else this._decodeG711()}}},{key:"_resetDts",value:function(e,t){"video"!==t&&this._timeRange.resetDts(e)}},{key:"_doPlay",value:function(){this.noAudio||this._parent.seeking||(this._source||!this.currentTime?this.resume():this._startRender())}},{key:"_doPause",value:function(){this.noAudio||this._audioCtx.suspend()}},{key:"_reInitAudioCtx",value:function(e){var t=this;if(this._lastTimeLineTime=e,this._lastBuffer=null,this._lastAudioBufferInfo=null,this._delay=0,!this._ready||!this._audioCtx.currentTime)return Zp.resolve();var n=this._gainNode.gain.value;return this._audioCtx.close().then((function(){return t._audioCtx.removeEventListener("statechange",t._onStateChange),t._audioCtx=null,t._source&&t._source.removeEventListener("ended",t._onSourceBufferEnded),t._source=null,t._initAudioCtx(n)}))}},{key:"_doSeek",value:function(e){var t=this;this._reInitAudioCtx(e).then((function(){t._getAudioBuffer(!0)})).catch((function(e){}))}},{key:"_doChaseFrame",value:function(e){var t=this,n=e.position,r=this._timeRange.deletePassed(n);r&&(fW.log(this.TAG,"_doChaseFrame","startTime:",r.start,"buffeLength:",this.buffered.end(0)-r.start),this._reInitAudioCtx(r.start).then((function(){t._startRender(),t._emitTimelineEvents(YY.PLAY_EVENT,NY.TIMEUPDATE)})).catch((function(e){})))}},{key:"_decodeAACWrapper",value:(n=_y(yy().mark((function e(){var t,n,r,i,o,a,s,u,c,l;return yy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this._sampleQueue.length,n=this._sampleQueue[0],r=this._sampleQueue[t-1],!((i=(r.dts-n.dts)/this.timescale)<1)){e.next=6;break}return e.abrupt("return");case 6:for(o=ug(i/3-1)||1,a=ug(t/o),s=[],u=0;u<o;u++){var h,A;u<o-1?s.push(hm(h=this._sampleQueue).call(h,u*a,(u+1)*a)):s.push(hm(A=this._sampleQueue).call(A,u*a))}return this._sampleQueue=[],this._inDecoding=!0,e.prev=12,e.next=15,this._decodeCycle(s);case 15:this._isLive||(c=this._timeRange._buffers,(l=c[c.length-1])&&this._emitTimelineEvents(YY.UPDATE_SEGMENT_END,l.end)),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(12),this._emitTimelineEvents(YY.PLAY_EVENT,NY.ERROR,this._assembleErr("ERROR_MSG.DECODE_ERR:".concat(e.t0&&e.t0.message)));case 21:this._inDecoding=!1;case 22:case"end":return e.stop()}}),e,this,[[12,18]])}))),function(){return n.apply(this,arguments)})},{key:"_decodeCycle",value:(t=_y(yy().mark((function e(t){var n;return yy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.shift()){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,this._decodeAAC(n);case 5:return e.next=7,this._decodeCycle(t);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"_decodeAAC",value:function(e){var t=this,n=e[0],r=0;iQ.checkRefillFrame(e);var i=zg(e).call(e,(function(e){return iQ.packageAACToAdts(t._meta,e)})),o=iQ.concatAdts(i,0);return new Zp((function(e,i){var a=t._audioCtx.decodeAudioData(o.buffer,(function(i){if(t._timeRange){if(t._lastAudioBufferInfo&&t.isLive){var o=t._lastAudioBufferInfo,a=o.dts+o.duration;(r=n.dts-a)>1&&(t._timeRange._duration+=r/1e3,fW.log(t.TAG,"_decodeAAC","audio data dts is not continue, last end dts:",a,",now start Dts:",n.dts,"delay:",r))}t._lastAudioBufferInfo={duration:Math.floor(1e3*i.duration),dts:n.dts};var s=t._timeRange.append(i,i.duration,n.dts,r/1e3);if(!t._ready){var u=Math.abs(s+i.duration-t.currentTime)<.5;(t.isLive||!u)&&(t._ready=!0,fW.log(t.TAG,"_decodeAAC","set ready true start=",s),t.emit(MY.AUDIO_READY,s))}t._emitTimelineEvents(YY.PLAY_EVENT,NY.PROGRESS),t._emitTimelineEvents(YY.PLAY_EVENT,NY.DURATION_CHANGE),e()}}),i);a.catch&&a.catch(i)}))}},{key:"_decodeG711",value:function(){var e,t,n=this._sampleQueue.length,r=this._sampleQueue[0];if(!((this._sampleQueue[n-1].dts-r.dts)/this.timescale<.5)){var i=TY(e=this._sampleQueue).call(e,(function(e,t){return e+=t.data.byteLength}),0),o=new Uint8Array(i),a=0,s=0;$l(t=this._sampleQueue).call(t,(function(e,t){0===t&&(a=e.dts),o.set(e.data,s),s+=e.data.byteLength})),this._sampleQueue=[];try{var u=this._meta,c=u.codecType,l=u.channelCount,h=u.sampleSize,A=u.sampleRate,d=iQ.decodeG711(o,c),f=iQ.createAudioBufferFromPcm(this._audioCtx,d.buffer,l,A,h/8),v=f.audioBuffer,p=f.duration,m=this._timeRange.append(v,p,a,0);this._ready||(this._ready=!0,fW.log(this.TAG,"_decodeG711","set ready true"),this.emit(MY.AUDIO_READY,m)),this._emitTimelineEvents(YY.PLAY_EVENT,NY.PROGRESS),this._emitTimelineEvents(YY.PLAY_EVENT,NY.DURATION_CHANGE)}catch(E6){this._emitTimelineEvents(YY.PLAY_EVENT,NY.ERROR,this._assembleErr("ERROR_MSG.DECODE_ERR:".concat(E6&&E6.message)))}}}},{key:"_onSourceBufferEnded",value:function(){var e;(this._isSourceBufferEnd=!0,fW.long)&&fW.log(this.TAG,dg(e="source play end! currentTime:".concat(this.currentTime," , duration:")).call(e,this.duration));this._startRender()}},{key:"_ajustSeekTime",value:function(e){var t=this._timeRange.getBuffer(e,0);t&&(fW.log(this.TAG,"ajust seek time to:",t.start),this._lastTimeLineTime=t.start)}},{key:"_getAudioBuffer",value:function(e){var t=this;if(this._timeRange){var n=this._timeRange.getBuffer(this._lastBuffer?this._lastBuffer.end:this.currentTime,0);return n?e?(this._ajustSeekTime(n.start),void this.emit(MY.AUDIO_READY)):n:(this._endOfStream||!this._isLive)&&this.currentTime-this.duration>-.5?(this._emitTimelineEvents(YY.PLAY_EVENT,NY.TIMEUPDATE),void this._emitTimelineEvents(YY.PLAY_EVENT,NY.ENDED)):(this._ready=!1,this._audioCtx.suspend(),this.emit(MY.AUDIO_WAITING),void(e&&(this._onAudioReady||(this._onAudioReady=function(e){t._ajustSeekTime(e)}),this.removeListener(MY.AUDIO_READY,this._onAudioReady),this.once(MY.AUDIO_READY,this._onAudioReady))))}}},{key:"_startRender",value:function(e){if(!this.noAudio){if("video"===e&&this.isLive&&this._ready&&!this._isSourceBufferEnd)return console.log(this.TAG,"_startRender, audio currentTime",this.currentTime,"from:",e,"_isSourceBufferEnd:",this._isSourceBufferEnd,"ready:",this._ready),void this._doPlay();var t=this._getAudioBuffer();if(t){"suspended"===this._audioCtx.state&&(this._audioCtx.resume().catch((function(e){})),pG()),this._lastBuffer=t,this._source=null;var n=this._audioCtx.createBufferSource();n.buffer=t.source,n.loop=!1,this._source=n,n.addEventListener("ended",this._onSourceBufferEnded),n.connect(this._gainNode),t.delay&&t.delay>.001&&(this._delay+=t.delay),this.startDts=t.startDts;try{this._isSourceBufferEnd=!1,n.start()}catch(E6){}t.startDts&&this._emitTimelineEvents(YY.SYNC_DTS,t.startDts)}}}},{key:"_destroy",value:function(){fW.log(this.TAG,"destroy audio..."),this._source&&this._source.removeEventListener("ended",this._onSourceBufferEnded),this._audioCtx&&"closed"!==this.ctxState&&this._audioCtx.close(),this._audioCtx=null,this._sampleQueue=null,this._timeRange=null,this._parent=null,this.removeAllListeners()}}]),i}(QY),sQ=In,uQ=$o.findIndex,cQ="findIndex",lQ=!0;cQ in[]&&Array(1)[cQ]((function(){lQ=!1})),sQ({target:"Array",proto:!0,forced:lQ},{findIndex:function(e){return uQ(this,e,arguments.length>1?arguments[1]:void 0)}});var hQ=wl("Array").findIndex,AQ=se,dQ=hQ,fQ=Array.prototype,vQ=n((function(e){var t=e.findIndex;return e===fQ||AQ(fQ,e)&&t===fQ.findIndex?dQ:t})),pQ=I,mQ=Ln,yQ=TypeError,gQ=Object.getOwnPropertyDescriptor,_Q=pQ&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(b6){return b6 instanceof TypeError}}(),bQ=In,EQ=Je,kQ=zr,TQ=Gn,RQ=Un,SQ=_Q?function(e,t){if(mQ(e)&&!gQ(e,"length").writable)throw yQ("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},wQ=Bn,DQ=Rr,IQ=Xn,CQ=JY,LQ=Ir("splice"),VQ=Math.max,xQ=Math.min;bQ({target:"Array",proto:!0,forced:!LQ},{splice:function(e,t){var n,r,i,o,a,s,u=EQ(this),c=RQ(u),l=kQ(e,c),h=arguments.length;for(0===h?n=r=0:1===h?(n=0,r=c-l):(n=h-2,r=xQ(VQ(TQ(t),0),c-l)),wQ(c+n-r),i=DQ(u,r),o=0;o<r;o++)(a=l+o)in u&&IQ(i,o,u[a]);if(i.length=r,n<r){for(o=l;o<c-r;o++)s=o+n,(a=o+r)in u?u[s]=u[a]:CQ(u,s);for(o=c;o>c-r+n;o--)CQ(u,o-1)}else if(n>r)for(o=c-r;o>l;o--)s=o+n-1,(a=o+r-1)in u?u[s]=u[a]:CQ(u,s);for(o=0;o<n;o++)u[o+l]=arguments[o+2];return SQ(u,c-r+n),i}});var FQ=wl("Array").splice,GQ=se,OQ=FQ,ZQ=Array.prototype,PQ=n((function(e){var t=e.splice;return e===ZQ||GQ(ZQ,e)&&t===ZQ.splice?OQ:t})),UQ=cS,NQ=MT.findIndex,BQ=uG,MQ="findIndex",WQ=!0;MQ in[]&&Array(1)[MQ]((function(){WQ=!1})),UQ({target:"Array",proto:!0,forced:WQ},{findIndex:function(e){return NQ(this,e,arguments.length>1?arguments[1]:void 0)}}),BQ(MQ);var YQ=_b,XQ=dT,QQ=TypeError,jQ=Object.getOwnPropertyDescriptor,HQ=YQ&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(b6){return b6 instanceof TypeError}}(),JQ=cS,KQ=x_,zQ=bR,qQ=aT,$Q=hT,ej=HQ?function(e,t){if(XQ(e)&&!jQ(e,"length").writable)throw QQ("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},tj=Dx,nj=FT,rj=fS,ij=hN,oj=sI("splice"),aj=Math.max,sj=Math.min;JQ({target:"Array",proto:!0,forced:!oj},{splice:function(e,t){var n,r,i,o,a,s,u=KQ(this),c=$Q(u),l=zQ(e,c),h=arguments.length;for(0===h?n=r=0:1===h?(n=0,r=c-l):(n=h-2,r=sj(aj(qQ(t),0),c-l)),tj(c+n-r),i=nj(u,r),o=0;o<r;o++)(a=l+o)in u&&rj(i,o,u[a]);if(i.length=r,n<r){for(o=l;o<c-r;o++)s=o+n,(a=o+r)in u?u[s]=u[a]:ij(u,s);for(o=c;o>c-r+n;o--)ij(u,o-1)}else if(n>r)for(o=c-r;o>l;o--)s=o+n-1,(a=o+r-1)in u?u[s]=u[a]:ij(u,s);for(o=0;o<n;o++)u[o+l]=arguments[o+2];return ej(u,c-r+n),i}});var uj=x_,cj=WS;cS({target:"Object",stat:!0,forced:__((function(){cj(1)}))},{keys:function(e){return cj(uj(e))}});var lj=pD.charAt,hj=LS,Aj=ck,dj=dO,fj=fO,vj="String Iterator",pj=Aj.set,mj=Aj.getterFor(vj);dj(String,"String",(function(e){pj(this,{type:vj,string:hj(e),index:0})}),(function(){var e,t=mj(this),n=t.string,r=t.index;return r>=n.length?fj(void 0,!0):(e=lj(n,r),t.index+=e.length,fj(e,!1))}));var yj=u_,gj=Bk,_j=Yk,bj=SO,Ej=XE,kj=pb,Tj=kj("iterator"),Rj=kj("toStringTag"),Sj=bj.values,wj=function(e,t){if(e){if(e[Tj]!==Sj)try{Ej(e,Tj,Sj)}catch(b6){e[Tj]=Sj}if(e[Rj]||Ej(e,Rj,t),gj[t])for(var n in bj)if(e[n]!==bj[n])try{Ej(e,n,bj[n])}catch(b6){e[n]=bj[n]}}};for(var Dj in gj)wj(yj[Dj]&&yj[Dj].prototype,Dj);function Ij(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cj(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Th(e,r.key,r)}}function Lj(e,t,n){return t&&Cj(e.prototype,t),n&&Cj(e,n),Th(e,"prototype",{writable:!1}),e}function Vj(e,t,n){return t in e?Th(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xj(e,t){return function(e){if(qm(e))return e}(e)||function(e,t){var n=null==e?null:void 0!==Rh&&$m(e)||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||Gj(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 Fj(e){return function(e){if(qm(e))return Oj(e)}(e)||function(e){if(void 0!==Rh&&null!=$m(e)||null!=e["@@iterator"])return vy(e)}(e)||Gj(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 Gj(e,t){var n;if(e){if("string"==typeof e)return Oj(e,t);var r=hm(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?vy(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Oj(e,t):void 0}}function Oj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}wj(_j,"DOMTokenList");var Zj="video",Pj="hevc",Uj=Zb,Nj=O_,Bj=Pb,Mj=xS,Wj=RegExp.prototype,Yj=LE.PROPER,Xj=wk,Qj=Fb,jj=LS,Hj=__,Jj=function(e){var t=e.flags;return void 0!==t||"flags"in Wj||Nj(e,"flags")||!Bj(Wj,e)?t:Uj(Mj,e)},Kj="toString",zj=RegExp.prototype[Kj],qj=Hj((function(){return"/a/b"!=zj.call({source:"a",flags:"b"})})),$j=Yj&&zj.name!=Kj;(qj||$j)&&Xj(RegExp.prototype,Kj,(function(){var e=Qj(this);return"/"+jj(e.source)+"/"+jj(Jj(e))}),{unsafe:!0});var eH=_b,tH=LE.EXISTS,nH=S_,rH=gb.f,iH=Function.prototype,oH=nH(iH.toString),aH=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,sH=nH(aH.exec);eH&&!tH&&rH(iH,"name",{configurable:!0,get:function(){try{return sH(aH,oH(this))[1]}catch(b6){return""}}});var uH=cS,cH=nT,lH=sR,hH=YT,AH=S_([].join),dH=cH!=Object,fH=hH("join",",");uH({target:"Array",proto:!0,forced:dH||!fH},{join:function(e){return AH(lH(this),void 0===e?",":e)}});var vH=In,pH=ni.indexOf,mH=Wl,yH=k([].indexOf),gH=!!yH&&1/yH([1],1,-0)<0;vH({target:"Array",proto:!0,forced:gH||!mH("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return gH?yH(this,e,t)||0:pH(this,e,t)}});var _H=wl("Array").indexOf,bH=se,EH=_H,kH=Array.prototype,TH=n((function(e){var t=e.indexOf;return e===kH||bH(kH,e)&&t===kH.indexOf?EH:t}));function RH(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=Vl(t).call(t,Boolean);var r=new Uint8Array(TY(t).call(t,(function(e,t){return e+t.byteLength}),0)),i=0;return $l(t).call(t,(function(e){r.set(e,i),i+=e.byteLength})),r}function SH(e){if(!qm(e)){for(var t=[],n="",r=0;r<e.length;r++)r%2&&(n=e[r-1]+e[r],t.push(ug(n,16)),n="");return t}return zg(e).call(e,(function(e){return ug(e,16)}))}var wH=nn,DH=V,IH=qe,CH=se,LH=function(){var e=wH(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},VH=RegExp.prototype,xH=se,FH=function(e){var t=e.flags;return void 0!==t||"flags"in VH||IH(e,"flags")||!CH(VH,e)?t:DH(LH,e)},GH=RegExp.prototype,OH=n((function(e){return e===GH||xH(GH,e)?FH(e):e.flags})),ZH=wl("Array").entries,PH=er,UH=qe,NH=se,BH=ZH,MH=Array.prototype,WH={DOMTokenList:!0,NodeList:!0},YH=n((function(e){var t=e.entries;return e===MH||NH(MH,e)&&t===MH.entries||UH(WH,PH(e))?BH:t})),XH=In,QH=$o.find,jH="find",HH=!0;jH in[]&&Array(1)[jH]((function(){HH=!1})),XH({target:"Array",proto:!0,forced:HH},{find:function(e){return QH(this,e,arguments.length>1?arguments[1]:void 0)}});var JH=wl("Array").find,KH=se,zH=JH,qH=Array.prototype,$H=n((function(e){var t=e.find;return e===qH||KH(qH,e)&&t===qH.find?zH:t})),eJ=Ek,tJ=gb,nJ=function(e,t,n){return n.get&&eJ(n.get,t,{getter:!0}),n.set&&eJ(n.set,t,{setter:!0}),tJ.f(e,t,n)},rJ=_b,iJ=nJ,oJ=xS,aJ=__,sJ=u_.RegExp,uJ=sJ.prototype;rJ&&aJ((function(){var e=!0;try{sJ(".","d")}catch(b6){e=!1}var t={},n="",r=e?"dgimsy":"gimsy",i=function(e,r){Object.defineProperty(t,e,{get:function(){return n+=r,!0}})},o={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var a in e&&(o.hasIndices="d"),o)i(a,o[a]);return Object.getOwnPropertyDescriptor(uJ,"flags").get.call(t)!==r||n!==r}))&&iJ(uJ,"flags",{configurable:!0,get:oJ});var cJ=aT,lJ=LS,hJ=C_,AJ=RangeError,dJ=cS,fJ=MT.find,vJ=uG,pJ="find",mJ=!0;pJ in[]&&Array(1)[pJ]((function(){mJ=!1})),dJ({target:"Array",proto:!0,forced:mJ},{find:function(e){return fJ(this,e,arguments.length>1?arguments[1]:void 0)}}),vJ(pJ);var yJ=Fb,gJ=VV,_J=zk,bJ=Zb,EJ=x_,kJ=function(e,t,n,r){try{return r?t(yJ(n)[0],n[1]):t(n)}catch(b6){gJ(e,"throw",b6)}},TJ=vV,RJ=wT,SJ=hT,wJ=fS,DJ=DV,IJ=bV,CJ=Array,LJ=II,VJ="ArrayBuffer",xJ=GP[VJ];cS({global:!0,constructor:!0,forced:u_[VJ]!==xJ},{ArrayBuffer:xJ}),LJ(VJ);var FJ,GJ=function(){function e(){Ij(this,e),this.buffer=new Uint8Array(0)}return Lj(e,[{key:"write",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];$l(n).call(n,(function(t){t?e.buffer=function(e){for(var t=0,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];$l(r).call(r,(function(e){t+=e.length}));var o=new e(t),a=0;return $l(r).call(r,(function(e){o.set(e,a),a+=e.length})),o}(Uint8Array,e.buffer,t):window.console.warn(t)}))}}],[{key:"writeUint16",value:function(e){return new Uint8Array([e>>8&255,255&e])}},{key:"writeUint32",value:function(e){return new Uint8Array([e>>24,e>>16&255,e>>8&255,255&e])}}]),e}(),OJ=Math.pow(2,32)-1,ZJ=function(){function e(){Ij(this,e)}return Lj(e,null,[{key:"box",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];n=Vl(n).call(n,Boolean);var i=8+TY(n).call(n,(function(e,t){return e+t.byteLength}),0),o=new Uint8Array(i);o[0]=i>>24&255,o[1]=i>>16&255,o[2]=i>>8&255,o[3]=255&i,o.set(e,4);var a=8;return $l(n).call(n,(function(e){o.set(e,a),a+=e.byteLength})),o}},{key:"ftyp",value:function(t){return $H(t).call(t,(function(e){return e.type===Zj&&e.codecType===Pj}))?e.FTYPHEV1:e.FTYPAVC1}},{key:"initSegment",value:function(t){return RH(e.ftyp(t),e.moov(t))}},{key:"pssh",value:function(t){var n,r=new Uint8Array(dg(n=[1,0,0,0]).call(n,[16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75],[0,0,0,1],SH(t.kid),[0,0,0,0]));return e.box(e.types.pssh,r)}},{key:"moov",value:function(t){if(t[0].useEME&&(t[0].encv||t[0].enca)){var n;t[0].pssh||(t[0].pssh={kid:t[0].kid});var r=this.pssh(t[0].pssh);return e.box.apply(e,dg(n=[e.types.moov,e.mvhd(t[0].mvhdDurtion||t[0].duration,t[0].mvhdTimecale||t[0].timescale),e.mvex(t)]).call(n,Fj(zg(t).call(t,(function(t){return e.trak(t)}))),[r]))}var i;return e.box.apply(e,dg(i=[e.types.moov,e.mvhd(t[0].mvhdDurtion||t[0].duration,t[0].mvhdTimecale||t[0].timescale)]).call(i,Fj(zg(t).call(t,(function(t){return e.trak(t)}))),[e.mvex(t)]))}},{key:"mvhd",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:9e4;return e.box(e.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,n>>24&255,n>>16&255,n>>8&255,255&n,t>>24&255,t>>16&255,t>>8&255,255&t,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}},{key:"trak",value:function(t){return e.box(e.types.trak,e.tkhd(t.id,t.tkhdDuration||0,t.width,t.height),e.mdia(t))}},{key:"tkhd",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return e.box(e.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,t>>24&255,t>>16&255,t>>8&255,255&t,0,0,0,0,n>>24&255,n>>16&255,n>>8&255,255&n,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>8&255,255&r,0,0,i>>8&255,255&i,0,0]))}},{key:"mdia",value:function(t){return e.box(e.types.mdia,e.mdhd(t.duration,t.timescale),e.hdlr(t.type),e.minf(t))}},{key:"mdhd",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:9e4;return e.box(e.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,n>>24&255,n>>16&255,n>>8&255,255&n,t>>24&255,t>>16&255,t>>8&255,255&t,85,196,0,0]))}},{key:"hdlr",value:function(t){return e.box(e.types.hdlr,e.HDLR_TYPES[t])}},{key:"minf",value:function(t){return e.box(e.types.minf,t.type===Zj?e.VMHD:e.SMHD,e.DINF,e.stbl(t))}},{key:"stbl",value:function(t){var n=[];return t&&t.ext&&t.ext.stss&&n.push(e.stss(YH(t.ext.stss))),e.box(e.types.stbl,e.stsd(t),e.STTS,n[0],e.STSC,e.STSZ,e.STCO)}},{key:"stsd",value:function(t){var n;return n="audio"===t.type?t.useEME&&t.enca?e.enca(t):e.mp4a(t):t.useEME&&t.encv?e.encv(t):e.avc1hev1(t),e.box(e.types.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),n)}},{key:"enca",value:function(t){var n=t.enca.channelCount,r=t.enca.sampleRate,i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n,0,16,0,0,0,0,r>>8&255,255&r,0,0]),o=e.esds(t.config),a=e.sinf(t.enca);return e.box(e.types.enca,i,o,a)}},{key:"encv",value:function(t){var n,r,i,o=t.sps.length>0?t.sps[0]:[],a=t.pps.length>0?t.pps[0]:[],s=t.width,u=t.height,c=t.sarRatio[0],l=t.sarRatio[1],h=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,s>>8&255,255&s,u>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),A=new Uint8Array(dg(r=dg(n=dg(i=[1,o[1],o[2],o[3],255,225,o.length>>>8&255,255&o.length]).apply(i,Fj(o))).call(n,[1,a.length>>>8&255,255&a.length])).apply(r,Fj(a))),d=new Uint8Array([0,0,88,57,0,15,200,192,0,4,86,72]),f=e.sinf(t.encv),v=new Uint8Array([c>>24,c>>16&255,c>>8&255,255&c,l>>24,l>>16&255,l>>8&255,255&l]);return e.box(e.types.encv,h,e.box(e.types.avcC,A),e.box(e.types.btrt,d),f,e.box(e.types.pasp,v))}},{key:"schi",value:function(t){var n=new Uint8Array([]),r=e.tenc(t);return e.box(e.types.schi,n,r)}},{key:"tenc",value:function(t){var n,r=new Uint8Array(dg(n=[0,0,0,0,0,0,255&t.default_IsEncrypted,255&t.default_IV_size]).call(n,SH(t.default_KID)));return e.box(e.types.tenc,r)}},{key:"sinf",value:function(t){var n=new Uint8Array([]),r=new Uint8Array([t.data_format.charCodeAt(0),t.data_format.charCodeAt(1),t.data_format.charCodeAt(2),t.data_format.charCodeAt(3)]),i=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]),o=e.schi(t);return e.box(e.types.sinf,n,e.box(e.types.frma,r),e.box(e.types.schm,i),o)}},{key:"avc1hev1",value:function(t){var n,r=t.codecType===Pj,i=r?e.types.hvc1:e.types.avc1,o=r?e.hvcC(t):e.avcC(t),a=[new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,t.width>>8&255,255&t.width,t.height>>8&255,255&t.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o];return r?a.push(e.box(e.types.fiel,new Uint8Array([1,0]))):t.sarRatio&&t.sarRatio.length>1&&a.push(e.pasp(t.sarRatio)),e.box.apply(e,dg(n=[i]).call(n,a))}},{key:"avcC",value:function(t){var n,r,i,o,a,s,u=[],c=[];return $l(n=t.sps).call(n,(function(e){s=e.byteLength,u.push(s>>>8&255),u.push(255&s),u.push.apply(u,Fj(e))})),$l(r=t.pps).call(r,(function(e){s=e.byteLength,c.push(s>>>8&255),c.push(255&s),c.push.apply(c,Fj(e))})),e.box(e.types.avcC,new Uint8Array(dg(o=dg(i=dg(a=[1,u[3],u[4],u[5],255,224|t.sps.length]).apply(a,u)).call(i,[t.pps.length])).apply(o,c)))}},{key:"hvcC",value:function(t){var n=t.hvcC;if(n instanceof ArrayBuffer||n instanceof Uint8Array)return n;var r,i=t.vps,o=t.sps,a=t.pps;if(n){var s=n.generalProfileCompatibilityFlags,u=n.generalConstraintIndicatorFlags,c=(i.length&&1)+(o.length&&1)+(a.length&&1);r=[1,n.generalProfileSpace<<6|n.generalTierFlag<<5|n.generalProfileIdc,s>>>24,s>>>16,s>>>8,s,u[0],u[1],u[2],u[3],u[4],u[5],n.generalLevelIdc,240,0,252,252|n.chromaFormatIdc,248|n.bitDepthLumaMinus8,248|n.bitDepthChromaMinus8,0,0,n.numTemporalLayers<<3|n.temporalIdNested<<2|3,c];var l=function(e){var t;r.push(e.length>>8,e.length),(t=r).push.apply(t,Fj(e))};i.length&&(r.push(160,0,i.length),$l(i).call(i,l)),o.length&&(r.push(161,0,o.length),$l(o).call(o,l)),a.length&&(r.push(162,0,a.length),$l(a).call(a,l))}else r=[1,1,96,0,0,0,144,0,0,0,0,0,93,240,0,252,253,248,248,0,0,15,3,160,0,1,0,24,64,1,12,1,255,255,1,96,0,0,3,0,144,0,0,3,0,0,3,0,93,153,152,9,161,0,1,0,45,66,1,1,1,96,0,0,3,0,144,0,0,3,0,0,3,0,93,160,2,128,128,45,22,89,153,164,147,43,154,128,128,128,130,0,0,3,0,2,0,0,3,0,50,16,162,0,1,0,7,68,1,193,114,180,98,64];return e.box(e.types.hvcC,new Uint8Array(r))}},{key:"pasp",value:function(t){var n=xj(t,2),r=n[0],i=n[1];return e.box(e.types.pasp,new Uint8Array([r>>24,r>>16&255,r>>8&255,255&r,i>>24,i>>16&255,i>>8&255,255&i]))}},{key:"mp4a",value:function(t){return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,t.sampleRate>>8&255,255&t.sampleRate,0,0]),t.config.length?e.esds(t.config):void 0)}},{key:"esds",value:function(t){var n,r,i,o=t.length;return e.box(e.types.esds,new Uint8Array(dg(n=dg(r=dg(i=[0,0,0,0,3,23+o,0,0,0,4,15+o,64,21,0,6,0,0,0,218,192,0,0,218,192,5]).call(i,[o])).call(r,t)).call(n,[6,1,2])))}},{key:"mvex",value:function(t){var n;return e.box.apply(e,dg(n=[e.types.mvex]).call(n,Fj(zg(t).call(t,(function(t){return e.trex(t.id)})))))}},{key:"trex",value:function(t){return e.box(e.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}},{key:"trex1",value:function(t){return e.box(e.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,2,0,0,0,0,0,0,1,0,0]))}},{key:"trex2",value:function(t){return e.box(e.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,4,0,0,0,0,0,2,0,0,0]))}},{key:"moof",value:function(t){var n;return e.box.apply(e,dg(n=[e.types.moof,e.mfhd(t[0].samples?t[0].samples[0].gopId:0)]).call(n,Fj(zg(t).call(t,(function(t){return e.traf(t)})))))}},{key:"mfhd",value:function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))}},{key:"traf",value:function(t){var n,r=e.tfhd(t.id),i=e.tfdt(t,t.baseMediaDecodeTime),o=0;if(t.isVideo&&t.videoSenc&&(n=t.videoSenc,$l(n).call(n,(function(e){o+=8,e.subsamples&&e.subsamples.length&&(o+=2,o+=6*e.subsamples.length)}))),t.videoSencLength=o,t.useEME&&(t.isVideoEncryption||t.isAudioEncryption)){if(t.isVideoEncryption){if(t.isVideo){var a=e.saiz(t),s=e.saio(t),u=e.trun1(t),c=e.senc(t);return e.box(e.types.traf,r,i,a,s,u,c)}if(t.isAudioEncryption){var l=e.sbgp(),h=e.saiz(t),A=e.saio(t),d=e.senc(t),f=e.trun1(t);return e.box(e.types.traf,r,i,l,h,A,d,f)}var v=e.sbgp(),p=e.trun1(t);return e.box(e.types.traf,r,i,v,p)}if(t.isVideo){var m=e.trun1(t);return e.box(e.types.traf,r,i,m)}var y=e.sbgp(),g=e.saiz(t),_=e.saio(t),b=e.senc(t),E=e.trun1(t);return e.box(e.types.traf,r,i,y,g,_,b,E)}var k=e.sdtp(t);return e.box(e.types.traf,r,i,k,e.trun(t.samples,k.byteLength+76))}},{key:"sdtp",value:function(t){var n,r=new GJ;return $l(n=t.samples).call(n,(function(e){r.write(new Uint8Array(t.isVideo?[e.keyframe?32:16]:[16]))})),e.box(e.types.sdtp,this.extension(0,0),r.buffer)}},{key:"trun1",value:function(t){var n,r=new GJ,i=GJ.writeUint32(t.samples.length),o=null;if(t.isVideo){var a=t.videoSencLength;o=GJ.writeUint32(16*t.samples.length+a+149),!t.isVideoEncryption&&t.isAudioEncryption&&(o=GJ.writeUint32(16*t.samples.length+92))}else{var s=12*t.samples.length+124;t.isAudioEncryption&&(s=12*t.samples.length+8*t.audioSenc.length+177),o=GJ.writeUint32(s)}return $l(n=t.samples).call(n,(function(e){r.write(GJ.writeUint32(e.duration)),r.write(GJ.writeUint32(e.size)),r.write(GJ.writeUint32(e.keyframe?33554432:65536)),t.isVideo&&r.write(GJ.writeUint32(e.cts?e.cts:0))})),e.box(e.types.trun,this.extension(0,OH(t)),i,o,r.buffer)}},{key:"senc",value:function(t){var n=new GJ,r=t.samples.length,i=t.isVideo?16:8,o=t.isVideo?2:0,a=[],s=0;return t.isVideo?(a=t.videoSenc,s=t.videoSencLength):a=t.audioSenc,s=s||i*r,n.write(GJ.writeUint32(16+s),e.types.senc,this.extension(0,o)),n.write(GJ.writeUint32(r)),$l(a).call(a,(function(e){for(var t=0;t<e.InitializationVector.length;t++)n.write(new Uint8Array([e.InitializationVector[t]]));var r;e.subsamples&&e.subsamples.length&&(n.write(GJ.writeUint16(e.subsamples.length)),$l(r=e.subsamples).call(r,(function(e){n.write(GJ.writeUint16(e.BytesOfClearData)),n.write(GJ.writeUint32(e.BytesOfProtectedData))})))})),n.buffer}},{key:"saio",value:function(t){var n=12*t.samples.length+141;!t.isVideo&&t.isAudioEncryption&&(n=149);var r=new Uint8Array([1,0,0,0,0,0,0,1,0,0,0,0,n>>24&255,n>>16&255,n>>8&255,255&n]);return e.box(e.types.saio,r)}},{key:"saiz",value:function(t){var n=t.samples.length,r=new Uint8Array([0,0,0,0,16,n>>24&255,n>>16&255,n>>8&255,255&n]);return e.box(e.types.saiz,r)}},{key:"sbgp",value:function(){var t=new Uint8Array([114,111,108,108,0,0,0,1,0,0,1,25,0,0,0,1]);return e.box(e.types.sbgp,this.extension(0,0),t)}},{key:"extension",value:function(e,t){return new Uint8Array([e,t>>16&255,t>>8&255,255&t])}},{key:"tfhd",value:function(t){return e.box(e.types.tfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))}},{key:"tfdt",value:function(t,n){var r=Math.floor(n/(OJ+1)),i=Math.floor(n%(OJ+1));return t.useEME&&(t.isVideoEncryption||t.isAudioEncryption)?e.box(e.types.tfdt,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i])):e.box(e.types.tfdt,new Uint8Array([1,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,i>>24,i>>16&255,i>>8&255,255&i]))}},{key:"trun",value:function(t,n){var r=t.length,i=12+16*r;n+=8+i;var o=new Uint8Array(i);o.set([0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,255&r,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0);for(var a=0;a<r;a++){var s=t[a],u=s.duration,c=s.size,l=s.flag,h=void 0===l?{}:l,A=s.cts,d=void 0===A?0:A;o.set([u>>>24&255,u>>>16&255,u>>>8&255,255&u,c>>>24&255,c>>>16&255,c>>>8&255,255&c,h.isLeading<<2|(null===h.dependsOn||void 0===h.dependsOn?1:h.dependsOn),h.isDependedOn<<6|h.hasRedundancy<<4|h.paddingValue<<1|(null===h.isNonSyncSample||void 0===h.isNonSyncSample?1:h.isNonSyncSample),61440&h.degradationPriority,15&h.degradationPriority,d>>>24&255,d>>>16&255,d>>>8&255,255&d],12+16*a)}return e.box(e.types.trun,o)}},{key:"moovMP4",value:function(t){var n;return e.box.apply(e,dg(n=[e.types.moov,e.mvhd(t[0].duration,t[0].timescale)]).call(n,Fj(zg(t).call(t,(function(t){return e.trackMP4(t)})))))}},{key:"trackMP4",value:function(t){return e.box(e.types.trak,e.tkhd(t.id,t.duration,t.width,t.height),e.mdiaMP4(t))}},{key:"mdiaMP4",value:function(t){return e.box(e.types.mdia,e.mdhd(t.duration,t.timescale),e.hdlr(t.type),e.minfMP4(t))}},{key:"minfMP4",value:function(t){return e.box(e.types.minf,t.type===Zj?e.VMHD:e.SMHD,e.DINF,e.stblMP4(t))}},{key:"stblMP4",value:function(t){var n,r=t.ext,i=[e.stsd(t),e.stts(r.stts),e.stsc(r.stsc),e.stsz(r.stsz),e.stco(r.stco)];return r.stss.length&&i.push(e.stss(r.stss)),r.ctts.length&&i.push(e.ctts(r.ctts)),e.box.apply(e,dg(n=[e.types.stbl]).call(n,i))}},{key:"stts",value:function(t){var n=t.length,r=new Uint8Array(8*n),i=0;return $l(t).call(t,(function(e){var t=e.value,n=e.count;r.set([n>>24,n>>16&255,n>>8&255,255&n,t>>24,t>>16&255,t>>8&255,255&t],i),i+=8})),e.box(e.types.stts,RH(new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n]),r))}},{key:"stsc",value:function(t){var n=t.length,r=new Uint8Array(12*n),i=0;return $l(t).call(t,(function(e){var t=e.firstChunk,n=e.samplesPerChunk,o=e.sampleDescIndex;r.set([t>>24,t>>16&255,t>>8&255,255&t,n>>24,n>>16&255,n>>8&255,255&n,o>>24,o>>16&255,o>>8&255,255&o],i),i+=12})),e.box(e.types.stsc,RH(new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n]),r))}},{key:"stsz",value:function(t){var n=t.length,r=new Uint8Array(4*n),i=0;return $l(t).call(t,(function(e){r.set([e>>24,e>>16&255,e>>8&255,255&e],i),i+=4})),e.box(e.types.stsz,RH(new Uint8Array([0,0,0,0,0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n]),r))}},{key:"stco",value:function(t){var n=t.length,r=new Uint8Array(4*n),i=0;return $l(t).call(t,(function(e){r.set([e>>24,e>>16&255,e>>8&255,255&e],i),i+=4})),e.box(e.types.stco,RH(new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n]),r))}},{key:"stss",value:function(t){var n=t.length,r=new Uint8Array(4*n),i=0;return $l(t).call(t,(function(e){r.set([e>>24,e>>16&255,e>>8&255,255&e],i),i+=4})),e.box(e.types.stss,RH(new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n]),r))}},{key:"ctts",value:function(t){var n=t.length,r=new Uint8Array(8*n),i=0;return $l(t).call(t,(function(e){var t=e.value,n=e.count;r.set([n>>24,n>>16&255,n>>8&255,255&n,t>>24,t>>16&255,t>>8&255,255&t],i),i+=8})),e.box(e.types.ctts,RH(new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n]),r))}},{key:"styp",value:function(){return e.box(e.types.styp,new Uint8Array([109,115,100,104,0,0,0,0,109,115,100,104,109,115,105,120]))}},{key:"sidx",value:function(t){var n,r=t.timescale,i=t.samples[0].duration,o=i*t.samples.length,a=t.samples[0].sampleOffset*i,s=8;$l(n=t.samples).call(n,(function(e){s+=e.size}));var u=0;if(t.isVideo){var c,l=0;t.videoSenc&&(c=t.videoSenc),t.isVideo&&$l(c).call(c,(function(e){l+=8,e.subsamples&&e.subsamples.length&&(l+=2,l+=6*e.subsamples.length)})),t.videoSencLength=l,u=s+141+16*t.samples.length+l,t.useEME&&t.isAudioEncryption&&!t.isVideoEncryption&&(u=s+16*t.samples.length+84)}else u=s+116+12*t.samples.length,t.useEME&&t.isAudioEncryption&&(u=s+169+12*t.samples.length+8*t.audioSenc.length);var h=new Uint8Array([0,0,0,0,0,0,0,255&t.id,r>>24&255,r>>16&255,r>>8&255,255&r,a>>24&255,a>>16&255,a>>8&255,255&a,0,0,0,0,0,0,0,1,0,u>>16&255,u>>8&255,255&u,o>>24&255,o>>16&255,o>>8&255,255&o,144,0,0,0]);return e.box(e.types.sidx,h)}},{key:"mdat",value:function(t){return e.box(e.types.mdat,t)}}]),e}();Vj(ZJ,"types",TY(FJ=["avc1","avcC","hvc1","hvcC","dinf","dref","esds","ftyp","hdlr","mdat","mdhd","mdia","mfhd","minf","moof","moov","mp4a","mvex","mvhd","pasp","stbl","stco","stsc","stsd","stsz","stts","tfdt","tfhd","traf","trak","trex","tkhd","vmhd","smhd","ctts","stss","styp","pssh","sidx","sbgp","saiz","saio","senc","trun","encv","enca","sinf","btrt","frma","tenc","schm","schi","mehd","fiel","sdtp"]).call(FJ,(function(e,t){return e[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)],e}),wh(null))),Vj(ZJ,"HDLR_TYPES",{video:new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),audio:new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0])}),Vj(ZJ,"FTYPAVC1",ZJ.box(ZJ.types.ftyp,new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]))),Vj(ZJ,"FTYPHEV1",ZJ.box(ZJ.types.ftyp,new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,104,101,118,49]))),Vj(ZJ,"DINF",ZJ.box(ZJ.types.dinf,ZJ.box(ZJ.types.dref,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1])))),Vj(ZJ,"VMHD",ZJ.box(ZJ.types.vmhd,new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]))),Vj(ZJ,"SMHD",ZJ.box(ZJ.types.smhd,new Uint8Array([0,0,0,0,0,0,0,0]))),Vj(ZJ,"StblTable",new Uint8Array([0,0,0,0,0,0,0,0])),Vj(ZJ,"STTS",ZJ.box(ZJ.types.stts,ZJ.StblTable)),Vj(ZJ,"STSC",ZJ.box(ZJ.types.stsc,ZJ.StblTable)),Vj(ZJ,"STSZ",ZJ.box(ZJ.types.stsz,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]))),Vj(ZJ,"STCO",ZJ.box(ZJ.types.stco,ZJ.StblTable));var PJ=function(){function e(t,n){Ij(this,e),this.name=t||"",this._prefix="[".concat(this.name,"]"),e.disabled=n}return Lj(e,[{key:"debug",value:function(){var t,n;if(!e.disabled){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];(n=console).debug.apply(n,dg(t=[this._prefix]).call(t,i))}}},{key:"log",value:function(){var t,n;if(!e.disabled){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];(n=console).log.apply(n,dg(t=[this._prefix]).call(t,i))}}},{key:"warn",value:function(){var t,n;if(!e.disabled){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];(n=console).warn.apply(n,dg(t=[this._prefix]).call(t,i))}}},{key:"error",value:function(){var t,n;if(!e.disabled){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];(n=console).error.apply(n,dg(t=[this._prefix]).call(t,i))}}},{key:"table",value:function(){var t;e.disabled||(console.group(this._prefix),(t=console).table.apply(t,arguments),console.groupEnd())}}],[{key:"enable",value:function(){e.disabled=!1}},{key:"disable",value:function(){e.disabled=!0}}]),e}();Vj(PJ,"disabled",!0);var UJ=function(){function e(t,n,r){Ij(this,e),this.videoTrack=t,this.audioTrack=n;var i=/Chrome\/([^.]+)/.exec(navigator.userAgent);this.forceFirstIDR=i&&Number(i[1])<50,this.log=new PJ("FMP4Remuxer",!r||!r.openLog||!r.openLog)}return Lj(e,[{key:"remux",value:function(){var e,t,n,r,i,o=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=this.videoTrack,u=this.audioTrack,c=s.exist(),l=u.exist(),h=[];return o&&(a&&a.initMerge?(c&&h.push(this.videoTrack),l&&h.push(this.audioTrack),n=ZJ.initSegment(h)):(c&&(e=ZJ.initSegment([this.videoTrack])),l&&(t=ZJ.initSegment([this.audioTrack])))),c&&s.hasSample()&&(r=this._remuxVideo()),l&&u.hasSample()&&(i=this._remuxAudio()),s.samples=[],u.samples=[],{initSegment:n,videoInitSegment:e,audioInitSegment:t,videoSegment:r,audioSegment:i}}},{key:"_remuxVideo",value:function(){var e=this.videoTrack;this.forceFirstIDR&&(e.samples[0].flag={dependsOn:2,isNonSyncSample:0});var t=e.samples,n=0;$l(t).call(t,(function(e){var t;n+=TY(t=e.units).call(t,(function(e,t){return e+t.byteLength}),0),n+=4*e.units.length}));for(var r,i=new Uint8Array(n),o=new DataView(i.buffer),a=function(e,n,a,s){var u;s=t[e];var l=0;$l(u=s.units).call(u,(function(e){o.setUint32(a,e.byteLength),a+=4,i.set(e,a),a+=e.byteLength,l+=4+e.byteLength})),s.size=l,c=a,r=s},s=0,u=t.length,c=0;s<u;s++)a(s,0,c,r);var l=ZJ.mdat(i);return RH(ZJ.moof([e]),l)}},{key:"_remuxAudio",value:function(){var e,t,n=this.audioTrack,r=new Uint8Array(TY(e=n.samples).call(e,(function(e,t){return e+t.size}),0));TY(t=n.samples).call(t,(function(e,t){return r.set(t.data,e),e+t.size}),0);var i=ZJ.mdat(r);return RH(ZJ.moof([n]),i)}},{key:"reset",value:function(){this.videoTrack.reset(),this.audioTrack.reset()}}]),e}(),NJ=function(){function e(t,n){Ij(this,e),this.videoTrack=t,this.audioTrack=n}return Lj(e,[{key:"remux",value:function(e,t){this.videoTrack=e||this.videoTrack,this.audioTrack=t||this.audioTrack;var n,r,i=(null==e?void 0:e.exist())&&(null==e?void 0:e.hasSample()),o=(null==t?void 0:t.exist())&&(null==t?void 0:t.hasSample());return i&&o?n=this._remuxMix(e,t):i?n=this._remuxTrack(e):o&&(r=this._remuxTrack(t)),e&&(e.samples=[]),t&&(t.samples=[]),{videoSegment:n,audioSegment:r}}},{key:"_remuxMix",value:function(e,t){var n=ZJ.ftyp([e,t]),r=this._remuxData(e,n.byteLength+8),i=r.mdatData,o=r.chunkOffset,a=this._remuxData(t,o).mdatData,s=ZJ.mdat(RH(i,a)),u=ZJ.moovMP4([e,t]);return e.ext=void 0,t.ext=void 0,e.samples=[],t.samples=[],RH(n,s,u)}},{key:"_remuxTrack",value:function(e){var t=ZJ.ftyp([e]),n=this._remuxData(e,t.byteLength+8).mdatData,r=ZJ.mdat(n),i=ZJ.moovMP4([e]);return e.ext=void 0,e.samples=[],RH(t,r,i)}},{key:"_remuxData",value:function(e,t){var n=e.type===Zj,r=e.samples,i=0;n?$l(r).call(r,(function(e){var t;i+=TY(t=e.units).call(t,(function(e,t){return e+t.byteLength}),0),i+=4*e.units.length})):i=TY(r).call(r,(function(e,t){return e+t.size}),0);for(var o,a=new Uint8Array(i),s=new DataView(a.buffer),u=e.ext={stts:[],stsc:[],stsz:[],stco:[],stss:[],ctts:[]},c=0,l=0,h=r.length,A=0;A<h;A++){l+=(o=r[A]).duration;var d,f=n?0:o.size;if(n)$l(d=o.units).call(d,(function(e){s.setUint32(c,e.byteLength),c+=4,a.set(e,c),c+=e.byteLength,f+=4+e.byteLength}));else a.set(o.data,c),c+=f;o.size=f,u.stsz.push(f),n&&this._fillCttsSamples(u.ctts,o.cts),this._fillSttsSamples(u.stts,o,r[A+1]),this._fillStcoSamples(u.stco,A,1,t),t+=f,n&&o.keyframe&&u.stss.push(A+1)}return e.duration=l,this._fillStscSamples(u.stsc,h,1),{mdatData:a,chunkOffset:t}}},{key:"_fillSttsSamples",value:function(e,t,n){var r=e[e.length-1];n?r&&r.value===t.duration?r.count++:e.push({value:t.duration,count:1}):r?r.count++:e.push({value:40,count:1})}},{key:"_fillCttsSamples",value:function(e,t){var n=e[e.length-1];n&&n.value===t?n.count++:e.push({value:t,count:1})}},{key:"_fillStcoSamples",value:function(e,t,n,r){t%n||e.push(r)}},{key:"_fillStscSamples",value:function(e,t,n){if(t<=n)e.push({firstChunk:1,samplesPerChunk:t,sampleDescIndex:1});else{var r=Math.floor(t/n),i=t%n;e.push({firstChunk:1,samplesPerChunk:n,sampleDescIndex:1}),i&&e.push({firstChunk:r+1,samplesPerChunk:i,sampleDescIndex:1})}}}]),e}(),BJ=o,MJ=At("iterator"),WJ=!BJ((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+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[MJ]||"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"!==n||"x"!==new URL("http://x",void 0).host})),YJ=p,XJ=2147483647,QJ=/[^\0-\u007E]/,jJ=/[.\u3002\uFF0E\uFF61]/g,HJ="Overflow: input needs wider integers to process",JJ=RangeError,KJ=YJ(jJ.exec),zJ=Math.floor,qJ=String.fromCharCode,$J=YJ("".charCodeAt),eK=YJ([].join),tK=YJ([].push),nK=YJ("".replace),rK=YJ("".split),iK=YJ("".toLowerCase),oK=function(e){return e+22+75*(e<26)},aK=function(e,t,n){var r=0;for(e=n?zJ(e/700):e>>1,e+=zJ(e/t);e>455;)e=zJ(e/35),r+=36;return zJ(r+36*e/(e+38))},sK=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=$J(e,n++);if(i>=55296&&i<=56319&&n<r){var o=$J(e,n++);56320==(64512&o)?tK(t,((1023&i)<<10)+(1023&o)+65536):(tK(t,i),n--)}else tK(t,i)}return t}(e);var n,r,i=e.length,o=128,a=0,s=72;for(n=0;n<e.length;n++)(r=e[n])<128&&tK(t,qJ(r));var u=t.length,c=u;for(u&&tK(t,"-");c<i;){var l=XJ;for(n=0;n<e.length;n++)(r=e[n])>=o&&r<l&&(l=r);var h=c+1;if(l-o>zJ((XJ-a)/h))throw JJ(HJ);for(a+=(l-o)*h,o=l,n=0;n<e.length;n++){if((r=e[n])<o&&++a>XJ)throw JJ(HJ);if(r==o){for(var A=a,d=36;;){var f=d<=s?1:d>=s+26?26:d-s;if(A<f)break;var v=A-f,p=36-f;tK(t,qJ(oK(f+v%p))),A=zJ(v/p),d+=36}tK(t,qJ(oK(A))),s=aK(a,h,c==u),a=0,c++}}a++,o++}return eK(t,"")},uK=no,cK=function(e,t,n){for(var r in t)n&&n.unsafe&&e[r]?e[r]=t[r]:uK(e,r,t[r],n);return e},lK=In,hK=i,AK=V,dK=p,fK=I,vK=WJ,pK=no,mK=io,yK=cK,gK=Io,_K=Bu,bK=Xo,EK=sd,kK=w,TK=qe,RK=Kt,SK=er,wK=nn,DK=ee,IK=Qr,CK=Pi,LK=U,VK=AA,xK=oA,FK=yd,GK=tX,OK=At("iterator"),ZK="URLSearchParams",PK=ZK+"Iterator",UK=bK.set,NK=bK.getterFor(ZK),BK=bK.getterFor(PK),MK=Object.getOwnPropertyDescriptor,WK=function(e){if(!fK)return hK[e];var t=MK(hK,e);return t&&t.value},YK=WK("fetch"),XK=WK("Request"),QK=WK("Headers"),jK=XK&&XK.prototype,HK=QK&&QK.prototype,JK=hK.RegExp,KK=hK.TypeError,zK=hK.decodeURIComponent,qK=hK.encodeURIComponent,$K=dK("".charAt),ez=dK([].join),tz=dK([].push),nz=dK("".replace),rz=dK([].shift),iz=dK([].splice),oz=dK("".split),az=dK("".slice),sz=/\+/g,uz=Array(4),cz=function(e){return uz[e-1]||(uz[e-1]=JK("((?:%[\\da-f]{2}){"+e+"})","gi"))},lz=function(e){try{return zK(e)}catch(b6){return e}},hz=function(e){var t=nz(e,sz," "),n=4;try{return zK(t)}catch(b6){for(;n;)t=nz(t,cz(n--),lz);return t}},Az=/[!'()~]|%20/g,dz={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},fz=function(e){return dz[e]},vz=function(e){return nz(qK(e),Az,fz)},pz=_K((function(e,t){UK(this,{type:PK,iterator:VK(NK(e).entries),kind:t})}),"Iterator",(function(){var e=BK(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n}),!0),mz=function(e){this.entries=[],this.url=null,void 0!==e&&(DK(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===$K(e,0)?az(e,1):e:IK(e)))};mz.prototype={type:ZK,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,o,a,s,u=xK(e);if(u)for(n=(t=VK(e,u)).next;!(r=AK(n,t)).done;){if(o=(i=VK(wK(r.value))).next,(a=AK(o,i)).done||(s=AK(o,i)).done||!AK(o,i).done)throw KK("Expected sequence with length 2");tz(this.entries,{key:IK(a.value),value:IK(s.value)})}else for(var c in e)TK(e,c)&&tz(this.entries,{key:c,value:IK(e[c])})},parseQuery:function(e){if(e)for(var t,n,r=oz(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(n=oz(t,"="),tz(this.entries,{key:hz(rz(n)),value:hz(ez(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],tz(n,vz(e.key)+"="+vz(e.value));return ez(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var yz=function(){EK(this,gz);var e=UK(this,new mz(arguments.length>0?arguments[0]:void 0));fK||(this.length=e.entries.length)},gz=yz.prototype;if(yK(gz,{append:function(e,t){FK(arguments.length,2);var n=NK(this);tz(n.entries,{key:IK(e),value:IK(t)}),fK||this.length++,n.updateURL()},delete:function(e){FK(arguments.length,1);for(var t=NK(this),n=t.entries,r=IK(e),i=0;i<n.length;)n[i].key===r?iz(n,i,1):i++;fK||(this.length=n.length),t.updateURL()},get:function(e){FK(arguments.length,1);for(var t=NK(this).entries,n=IK(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){FK(arguments.length,1);for(var t=NK(this).entries,n=IK(e),r=[],i=0;i<t.length;i++)t[i].key===n&&tz(r,t[i].value);return r},has:function(e){FK(arguments.length,1);for(var t=NK(this).entries,n=IK(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){FK(arguments.length,1);for(var n,r=NK(this),i=r.entries,o=!1,a=IK(e),s=IK(t),u=0;u<i.length;u++)(n=i[u]).key===a&&(o?iz(i,u--,1):(o=!0,n.value=s));o||tz(i,{key:a,value:s}),fK||(this.length=i.length),r.updateURL()},sort:function(){var e=NK(this);GK(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=NK(this).entries,r=RK(e,arguments.length>1?arguments[1]:void 0),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new pz(this,"keys")},values:function(){return new pz(this,"values")},entries:function(){return new pz(this,"entries")}},{enumerable:!0}),pK(gz,OK,gz.entries,{name:"entries"}),pK(gz,"toString",(function(){return NK(this).serialize()}),{enumerable:!0}),fK&&mK(gz,"size",{get:function(){return NK(this).entries.length},configurable:!0,enumerable:!0}),gK(yz,ZK),lK({global:!0,constructor:!0,forced:!vK},{URLSearchParams:yz}),!vK&&kK(QK)){var _z=dK(HK.has),bz=dK(HK.set),Ez=function(e){if(DK(e)){var t,n=e.body;if(SK(n)===ZK)return t=e.headers?new QK(e.headers):new QK,_z(t,"content-type")||bz(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),CK(e,{body:LK(0,IK(n)),headers:LK(0,t)})}return e};if(kK(YK)&&lK({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return YK(e,arguments.length>1?Ez(arguments[1]):{})}}),kK(XK)){var kz=function(e){return EK(this,jK),new XK(e,arguments.length>1?Ez(arguments[1]):{})};jK.constructor=kz,kz.prototype=jK,lK({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:kz})}}var Tz,Rz=In,Sz=I,wz=WJ,Dz=i,Iz=Kt,Cz=p,Lz=no,Vz=io,xz=sd,Fz=qe,Gz=DW,Oz=dy,Zz=Hi,Pz=ll.codeAt,Uz=function(e){var t,n,r=[],i=rK(nK(iK(e),jJ,"."),".");for(t=0;t<i.length;t++)n=i[t],tK(r,KJ(QJ,n)?"xn--"+sK(n):n);return eK(r,".")},Nz=Qr,Bz=Io,Mz=yd,Wz={URLSearchParams:yz,getState:NK},Yz=Xo,Xz=Yz.set,Qz=Yz.getterFor("URL"),jz=Wz.URLSearchParams,Hz=Wz.getState,Jz=Dz.URL,Kz=Dz.TypeError,zz=Dz.parseInt,qz=Math.floor,$z=Math.pow,eq=Cz("".charAt),tq=Cz(/./.exec),nq=Cz([].join),rq=Cz(1..toString),iq=Cz([].pop),oq=Cz([].push),aq=Cz("".replace),sq=Cz([].shift),uq=Cz("".split),cq=Cz("".slice),lq=Cz("".toLowerCase),hq=Cz([].unshift),Aq="Invalid scheme",dq="Invalid host",fq="Invalid port",vq=/[a-z]/i,pq=/[\d+-.a-z]/i,mq=/\d/,yq=/^0x/i,gq=/^[0-7]+$/,_q=/^\d+$/,bq=/^[\da-f]+$/i,Eq=/[\0\t\n\r #%/:<>?@[\\\]^|]/,kq=/[\0\t\n\r #/:<>?@[\\\]^|]/,Tq=/^[\u0000-\u0020]+/,Rq=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Sq=/[\t\n\r]/g,wq=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)hq(t,e%256),e=qz(e/256);return nq(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,o=0;o<8;o++)0!==e[o]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(t=r,n=i),t}(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=rq(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},Dq={},Iq=Gz({},Dq,{" ":1,'"':1,"<":1,">":1,"`":1}),Cq=Gz({},Iq,{"#":1,"?":1,"{":1,"}":1}),Lq=Gz({},Cq,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Vq=function(e,t){var n=Pz(e,0);return n>32&&n<127&&!Fz(t,e)?e:encodeURIComponent(e)},xq={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Fq=function(e,t){var n;return 2==e.length&&tq(vq,eq(e,0))&&(":"==(n=eq(e,1))||!t&&"|"==n)},Gq=function(e){var t;return e.length>1&&Fq(cq(e,0,2))&&(2==e.length||"/"===(t=eq(e,2))||"\\"===t||"?"===t||"#"===t)},Oq=function(e){return"."===e||"%2e"===lq(e)},Zq={},Pq={},Uq={},Nq={},Bq={},Mq={},Wq={},Yq={},Xq={},Qq={},jq={},Hq={},Jq={},Kq={},zq={},qq={},$q={},e$={},t$={},n$={},r$={},i$=function(e,t,n){var r,i,o,a=Nz(e);if(t){if(i=this.parse(a))throw Kz(i);this.searchParams=null}else{if(void 0!==n&&(r=new i$(n,!0)),i=this.parse(a,null,r))throw Kz(i);(o=Hz(new jz)).bindURL(this),this.searchParams=o}};i$.prototype={type:"URL",parse:function(e,t,n){var r,i,o,a,s,u=this,c=t||Zq,l=0,h="",A=!1,d=!1,f=!1;for(e=Nz(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=aq(e,Tq,""),e=aq(e,Rq,"$1")),e=aq(e,Sq,""),r=Oz(e);l<=r.length;){switch(i=r[l],c){case Zq:if(!i||!tq(vq,i)){if(t)return Aq;c=Uq;continue}h+=lq(i),c=Pq;break;case Pq:if(i&&(tq(pq,i)||"+"==i||"-"==i||"."==i))h+=lq(i);else{if(":"!=i){if(t)return Aq;h="",c=Uq,l=0;continue}if(t&&(u.isSpecial()!=Fz(xq,h)||"file"==h&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=h,t)return void(u.isSpecial()&&xq[u.scheme]==u.port&&(u.port=null));h="","file"==u.scheme?c=Kq:u.isSpecial()&&n&&n.scheme==u.scheme?c=Nq:u.isSpecial()?c=Yq:"/"==r[l+1]?(c=Bq,l++):(u.cannotBeABaseURL=!0,oq(u.path,""),c=t$)}break;case Uq:if(!n||n.cannotBeABaseURL&&"#"!=i)return Aq;if(n.cannotBeABaseURL&&"#"==i){u.scheme=n.scheme,u.path=Zz(n.path),u.query=n.query,u.fragment="",u.cannotBeABaseURL=!0,c=r$;break}c="file"==n.scheme?Kq:Mq;continue;case Nq:if("/"!=i||"/"!=r[l+1]){c=Mq;continue}c=Xq,l++;break;case Bq:if("/"==i){c=Qq;break}c=e$;continue;case Mq:if(u.scheme=n.scheme,i==Tz)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=Zz(n.path),u.query=n.query;else if("/"==i||"\\"==i&&u.isSpecial())c=Wq;else if("?"==i)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=Zz(n.path),u.query="",c=n$;else{if("#"!=i){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=Zz(n.path),u.path.length--,c=e$;continue}u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=Zz(n.path),u.query=n.query,u.fragment="",c=r$}break;case Wq:if(!u.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,c=e$;continue}c=Qq}else c=Xq;break;case Yq:if(c=Xq,"/"!=i||"/"!=eq(h,l+1))continue;l++;break;case Xq:if("/"!=i&&"\\"!=i){c=Qq;continue}break;case Qq:if("@"==i){A&&(h="%40"+h),A=!0,o=Oz(h);for(var v=0;v<o.length;v++){var p=o[v];if(":"!=p||f){var m=Vq(p,Lq);f?u.password+=m:u.username+=m}else f=!0}h=""}else if(i==Tz||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(A&&""==h)return"Invalid authority";l-=Oz(h).length+1,h="",c=jq}else h+=i;break;case jq:case Hq:if(t&&"file"==u.scheme){c=qq;continue}if(":"!=i||d){if(i==Tz||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(u.isSpecial()&&""==h)return dq;if(t&&""==h&&(u.includesCredentials()||null!==u.port))return;if(a=u.parseHost(h))return a;if(h="",c=$q,t)return;continue}"["==i?d=!0:"]"==i&&(d=!1),h+=i}else{if(""==h)return dq;if(a=u.parseHost(h))return a;if(h="",c=Jq,t==Hq)return}break;case Jq:if(!tq(mq,i)){if(i==Tz||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()||t){if(""!=h){var y=zz(h,10);if(y>65535)return fq;u.port=u.isSpecial()&&y===xq[u.scheme]?null:y,h=""}if(t)return;c=$q;continue}return fq}h+=i;break;case Kq:if(u.scheme="file","/"==i||"\\"==i)c=zq;else{if(!n||"file"!=n.scheme){c=e$;continue}if(i==Tz)u.host=n.host,u.path=Zz(n.path),u.query=n.query;else if("?"==i)u.host=n.host,u.path=Zz(n.path),u.query="",c=n$;else{if("#"!=i){Gq(nq(Zz(r,l),""))||(u.host=n.host,u.path=Zz(n.path),u.shortenPath()),c=e$;continue}u.host=n.host,u.path=Zz(n.path),u.query=n.query,u.fragment="",c=r$}}break;case zq:if("/"==i||"\\"==i){c=qq;break}n&&"file"==n.scheme&&!Gq(nq(Zz(r,l),""))&&(Fq(n.path[0],!0)?oq(u.path,n.path[0]):u.host=n.host),c=e$;continue;case qq:if(i==Tz||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&Fq(h))c=e$;else if(""==h){if(u.host="",t)return;c=$q}else{if(a=u.parseHost(h))return a;if("localhost"==u.host&&(u.host=""),t)return;h="",c=$q}continue}h+=i;break;case $q:if(u.isSpecial()){if(c=e$,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=Tz&&(c=e$,"/"!=i))continue}else u.fragment="",c=r$;else u.query="",c=n$;break;case e$:if(i==Tz||"/"==i||"\\"==i&&u.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=lq(s=h))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(u.shortenPath(),"/"==i||"\\"==i&&u.isSpecial()||oq(u.path,"")):Oq(h)?"/"==i||"\\"==i&&u.isSpecial()||oq(u.path,""):("file"==u.scheme&&!u.path.length&&Fq(h)&&(u.host&&(u.host=""),h=eq(h,0)+":"),oq(u.path,h)),h="","file"==u.scheme&&(i==Tz||"?"==i||"#"==i))for(;u.path.length>1&&""===u.path[0];)sq(u.path);"?"==i?(u.query="",c=n$):"#"==i&&(u.fragment="",c=r$)}else h+=Vq(i,Cq);break;case t$:"?"==i?(u.query="",c=n$):"#"==i?(u.fragment="",c=r$):i!=Tz&&(u.path[0]+=Vq(i,Dq));break;case n$:t||"#"!=i?i!=Tz&&("'"==i&&u.isSpecial()?u.query+="%27":u.query+="#"==i?"%23":Vq(i,Dq)):(u.fragment="",c=r$);break;case r$:i!=Tz&&(u.fragment+=Vq(i,Iq))}l++}},parseHost:function(e){var t,n,r;if("["==eq(e,0)){if("]"!=eq(e,e.length-1))return dq;if(t=function(e){var t,n,r,i,o,a,s,u=[0,0,0,0,0,0,0,0],c=0,l=null,h=0,A=function(){return eq(e,h)};if(":"==A()){if(":"!=eq(e,1))return;h+=2,l=++c}for(;A();){if(8==c)return;if(":"!=A()){for(t=n=0;n<4&&tq(bq,A());)t=16*t+zz(A(),16),h++,n++;if("."==A()){if(0==n)return;if(h-=n,c>6)return;for(r=0;A();){if(i=null,r>0){if(!("."==A()&&r<4))return;h++}if(!tq(mq,A()))return;for(;tq(mq,A());){if(o=zz(A(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;h++}u[c]=256*u[c]+i,2!=++r&&4!=r||c++}if(4!=r)return;break}if(":"==A()){if(h++,!A())return}else if(A())return;u[c++]=t}else{if(null!==l)return;h++,l=++c}}if(null!==l)for(a=c-l,c=7;0!=c&&a>0;)s=u[c],u[c--]=u[l+a-1],u[l+--a]=s;else if(8!=c)return;return u}(cq(e,1,-1)),!t)return dq;this.host=t}else if(this.isSpecial()){if(e=Uz(e),tq(Eq,e))return dq;if(t=function(e){var t,n,r,i,o,a,s,u=uq(e,".");if(u.length&&""==u[u.length-1]&&u.length--,(t=u.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=u[r]))return e;if(o=10,i.length>1&&"0"==eq(i,0)&&(o=tq(yq,i)?16:8,i=cq(i,8==o?1:2)),""===i)a=0;else{if(!tq(10==o?_q:8==o?gq:bq,i))return e;a=zz(i,o)}oq(n,a)}for(r=0;r<t;r++)if(a=n[r],r==t-1){if(a>=$z(256,5-t))return null}else if(a>255)return null;for(s=iq(n),r=0;r<n.length;r++)s+=n[r]*$z(256,3-r);return s}(e),null===t)return dq;this.host=t}else{if(tq(kq,e))return dq;for(t="",n=Oz(e),r=0;r<n.length;r++)t+=Vq(n[r],Dq);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return Fz(xq,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&Fq(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,i=e.host,o=e.port,a=e.path,s=e.query,u=e.fragment,c=t+":";return null!==i?(c+="//",e.includesCredentials()&&(c+=n+(r?":"+r:"")+"@"),c+=wq(i),null!==o&&(c+=":"+o)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?a[0]:a.length?"/"+nq(a,"/"):"",null!==s&&(c+="?"+s),null!==u&&(c+="#"+u),c},setHref:function(e){var t=this.parse(e);if(t)throw Kz(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new o$(e.path[0]).origin}catch(b6){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+wq(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Nz(e)+":",Zq)},getUsername:function(){return this.username},setUsername:function(e){var t=Oz(Nz(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=Vq(t[n],Lq)}},getPassword:function(){return this.password},setPassword:function(e){var t=Oz(Nz(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=Vq(t[n],Lq)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?wq(e):wq(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,jq)},getHostname:function(){var e=this.host;return null===e?"":wq(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Hq)},getPort:function(){var e=this.port;return null===e?"":Nz(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=Nz(e))?this.port=null:this.parse(e,Jq))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+nq(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,$q))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=Nz(e))?this.query=null:("?"==eq(e,0)&&(e=cq(e,1)),this.query="",this.parse(e,n$)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=Nz(e))?("#"==eq(e,0)&&(e=cq(e,1)),this.fragment="",this.parse(e,r$)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var o$=function(e){var t=xz(this,a$),n=Mz(arguments.length,1)>1?arguments[1]:void 0,r=Xz(t,new i$(e,!1,n));Sz||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},a$=o$.prototype,s$=function(e,t){return{get:function(){return Qz(this)[e]()},set:t&&function(e){return Qz(this)[t](e)},configurable:!0,enumerable:!0}};if(Sz&&(Vz(a$,"href",s$("serialize","setHref")),Vz(a$,"origin",s$("getOrigin")),Vz(a$,"protocol",s$("getProtocol","setProtocol")),Vz(a$,"username",s$("getUsername","setUsername")),Vz(a$,"password",s$("getPassword","setPassword")),Vz(a$,"host",s$("getHost","setHost")),Vz(a$,"hostname",s$("getHostname","setHostname")),Vz(a$,"port",s$("getPort","setPort")),Vz(a$,"pathname",s$("getPathname","setPathname")),Vz(a$,"search",s$("getSearch","setSearch")),Vz(a$,"searchParams",s$("getSearchParams")),Vz(a$,"hash",s$("getHash","setHash"))),Lz(a$,"toJSON",(function(){return Qz(this).serialize()}),{enumerable:!0}),Lz(a$,"toString",(function(){return Qz(this).serialize()}),{enumerable:!0}),Jz){var u$=Jz.createObjectURL,c$=Jz.revokeObjectURL;u$&&Lz(o$,"createObjectURL",Iz(u$,Jz)),c$&&Lz(o$,"revokeObjectURL",Iz(c$,Jz))}Bz(o$,"URL"),Rz({global:!0,constructor:!0,forced:!wz,sham:!Sz},{URL:o$});var l$=In,h$=o,A$=yd,d$=Qr,f$=WJ,v$=ae("URL");l$({target:"URL",stat:!0,forced:!(f$&&h$((function(){v$.canParse()})))},{canParse:function(e){var t=A$(arguments.length,1),n=d$(e),r=t<2||void 0===arguments[1]?void 0:d$(arguments[1]);try{return!!new v$(n,r)}catch(b6){return!1}}});var p$=n(te.URL),m$={exports:{}},y$=o((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),g$=o,_$=ee,b$=_,E$=y$,k$=Object.isExtensible,T$=g$((function(){k$(1)}))||E$?function(e){return!!_$(e)&&((!E$||"ArrayBuffer"!=b$(e))&&(!k$||k$(e)))}:k$,R$=!o((function(){return Object.isExtensible(Object.preventExtensions({}))})),S$=In,w$=p,D$=ri,I$=ee,C$=qe,L$=zt.f,V$=Ui,x$=Mi,F$=T$,G$=R$,O$=!1,Z$=rt("meta"),P$=0,U$=function(e){L$(e,Z$,{value:{objectID:"O"+P$++,weakData:{}}})},N$=m$.exports={enable:function(){N$.enable=function(){},O$=!0;var e=V$.f,t=w$([].splice),n={};n[Z$]=1,e(n).length&&(V$.f=function(n){for(var r=e(n),i=0,o=r.length;i<o;i++)if(r[i]===Z$){t(r,i,1);break}return r},S$({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:x$.f}))},fastKey:function(e,t){if(!I$(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!C$(e,Z$)){if(!F$(e))return"F";if(!t)return"E";U$(e)}return e[Z$].objectID},getWeakData:function(e,t){if(!C$(e,Z$)){if(!F$(e))return!0;if(!t)return!1;U$(e)}return e[Z$].weakData},onFreeze:function(e){return G$&&O$&&F$(e)&&!C$(e,Z$)&&U$(e),e}};D$[Z$]=!0;var B$=m$.exports,M$=In,W$=i,Y$=B$,X$=o,Q$=mn,j$=CA,H$=sd,J$=w,K$=ee,z$=Io,q$=zt.f,$$=$o.forEach,e0=I,t0=Xo.set,n0=Xo.getterFor,r0=Pi,i0=io,o0=cK,a0=Kt,s0=sd,u0=X,c0=CA,l0=dc,h0=fc,A0=id,d0=I,f0=B$.fastKey,v0=Xo.set,p0=Xo.getterFor,m0={getConstructor:function(e,t,n,r){var i=e((function(e,i){s0(e,o),v0(e,{type:t,index:r0(null),first:void 0,last:void 0,size:0}),d0||(e.size=0),u0(i)||c0(i,e[r],{that:e,AS_ENTRIES:n})})),o=i.prototype,a=p0(t),s=function(e,t,n){var r,i,o=a(e),s=u(e,t);return s?s.value=n:(o.last=s={index:i=f0(t,!0),key:t,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=s),r&&(r.next=s),d0?o.size++:e.size++,"F"!==i&&(o.index[i]=s)),e},u=function(e,t){var n,r=a(e),i=f0(t);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==t)return n};return o0(o,{clear:function(){for(var e=a(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,d0?e.size=0:this.size=0},delete:function(e){var t=this,n=a(t),r=u(t,e);if(r){var i=r.next,o=r.previous;delete n.index[r.index],r.removed=!0,o&&(o.next=i),i&&(i.previous=o),n.first==r&&(n.first=i),n.last==r&&(n.last=o),d0?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=a(this),r=a0(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!u(this,e)}}),o0(o,n?{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)}}),d0&&i0(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(e,t,n){var r=t+" Iterator",i=p0(t),o=p0(r);l0(e,t,(function(e,t){v0(this,{type:r,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?h0("keys"==t?n.key:"values"==t?n.value:[n.key,n.value],!1):(e.target=void 0,h0(void 0,!0))}),n?"entries":"values",!n,!0),A0(t)}};(function(e,t,n){var r,i=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),a=i?"set":"add",s=W$[e],u=s&&s.prototype,c={};if(e0&&J$(s)&&(o||u.forEach&&!X$((function(){(new s).entries().next()})))){var l=(r=t((function(t,n){t0(H$(t,l),{type:e,collection:new s}),null!=n&&j$(n,t[a],{that:t,AS_ENTRIES:i})}))).prototype,h=n0(e);$$(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in u)||o&&"clear"==e||Q$(l,e,(function(n,r){var i=h(this).collection;if(!t&&o&&!K$(n))return"get"==e&&void 0;var a=i[e](0===n?0:n,r);return t?this:a}))})),o||q$(l,"size",{configurable:!0,get:function(){return h(this).collection.size}})}else r=n.getConstructor(t,e,i,a),Y$.enable();z$(r,e,!1,!0),c[e]=r,M$({global:!0,forced:!0},c),o||n.setStrong(r,e,i)})("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),m0);var y0=te.Map,g0=Kt,_0=V,b0=Le,E0=hd,k0=X,T0=CA,R0=[].push,S0=function(e){var t,n,r,i,o=arguments.length,a=o>1?arguments[1]:void 0;return E0(this),(t=void 0!==a)&&b0(a),k0(e)?new this:(n=[],t?(r=0,i=g0(a,o>2?arguments[2]:void 0),T0(e,(function(e){_0(R0,n,i(e,r++))}))):T0(e,R0,{that:n}),new this(n))};In({target:"Map",stat:!0,forced:!0},{from:S0});var w0=ks,D0=function(){return new this(w0(arguments))};In({target:"Map",stat:!0,forced:!0},{of:D0});var I0=we,C0=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(I0(e)+" is not a map")},L0=function(e,t){return 1==t?function(t,n){return t[e](n)}:function(t,n,r){return t[e](n,r)}},V0=ae("Map"),x0={Map:V0,set:L0("set",2),get:L0("get",1),has:L0("has",1),remove:L0("delete",1),proto:V0.prototype},F0=C0,G0=x0.remove;In({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=F0(this),n=!0,r=0,i=arguments.length;r<i;r++)e=G0(t,arguments[r]),n=n&&e;return!!n}});var O0=C0,Z0=x0.get,P0=x0.has,U0=x0.set;In({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var n,r,i=O0(this);return P0(i,e)?(n=Z0(i,e),"update"in t&&(n=t.update(n,e,i),U0(i,e,n)),n):(r=t.insert(e,i),U0(i,e,r),r)}});var N0=V,B0=function(e,t,n){for(var r,i,o=n||e.next;!(r=N0(o,e)).done;)if(void 0!==(i=t(r.value)))return i},M0=function(e,t,n){return n?B0(e.entries(),(function(e){return t(e[1],e[0])})):e.forEach(t)},W0=Kt,Y0=C0,X0=M0;In({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=Y0(this),n=W0(e,arguments.length>1?arguments[1]:void 0);return!1!==X0(t,(function(e,r){if(!n(e,r,t))return!1}),!0)}});var Q0=Kt,j0=C0,H0=M0,J0=x0.Map,K0=x0.set;In({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=j0(this),n=Q0(e,arguments.length>1?arguments[1]:void 0),r=new J0;return H0(t,(function(e,i){n(e,i,t)&&K0(r,i,e)})),r}});var z0=Kt,q0=C0,$0=M0;In({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=q0(this),n=z0(e,arguments.length>1?arguments[1]:void 0),r=$0(t,(function(e,r){if(n(e,r,t))return{value:e}}),!0);return r&&r.value}});var e1=Kt,t1=C0,n1=M0;In({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=t1(this),n=e1(e,arguments.length>1?arguments[1]:void 0),r=n1(t,(function(e,r){if(n(e,r,t))return{key:r}}),!0);return r&&r.key}});var r1=In,i1=V,o1=w,a1=Le,s1=CA,u1=x0.Map,c1=p([].push);r1({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){var n=new(o1(this)?this:u1);a1(t);var r=a1(n.has),i=a1(n.get),o=a1(n.set);return s1(e,(function(e){var a=t(e);i1(r,n,a)?c1(i1(i,n,a),e):i1(o,n,a,[e])})),n}});var l1=function(e,t){return e===t||e!=e&&t!=t},h1=C0,A1=M0;In({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===A1(h1(this),(function(t){if(l1(t,e))return!0}),!0)}});var d1=V,f1=CA,v1=w,p1=Le,m1=x0.Map;In({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var n=new(v1(this)?this:m1);p1(t);var r=p1(n.set);return f1(e,(function(e){d1(r,n,t(e),e)})),n}});var y1=C0,g1=M0;In({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=g1(y1(this),(function(t,n){if(t===e)return{key:n}}),!0);return t&&t.key}});var _1=Kt,b1=C0,E1=M0,k1=x0.Map,T1=x0.set;In({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=b1(this),n=_1(e,arguments.length>1?arguments[1]:void 0),r=new k1;return E1(t,(function(e,i){T1(r,n(e,i,t),e)})),r}});var R1=Kt,S1=C0,w1=M0,D1=x0.Map,I1=x0.set;In({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=S1(this),n=R1(e,arguments.length>1?arguments[1]:void 0),r=new D1;return w1(t,(function(e,i){I1(r,i,n(e,i,t))})),r}});var C1=C0,L1=CA,V1=x0.set;In({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=C1(this),n=arguments.length,r=0;r<n;)L1(arguments[r++],(function(e,n){V1(t,e,n)}),{AS_ENTRIES:!0});return t}});var x1=Le,F1=C0,G1=M0,O1=TypeError;In({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=F1(this),n=arguments.length<2,r=n?void 0:arguments[1];if(x1(e),G1(t,(function(i,o){n?(n=!1,r=i):r=e(r,i,o,t)})),n)throw O1("Reduce of empty map with no initial value");return r}});var Z1=Kt,P1=C0,U1=M0;In({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=P1(this),n=Z1(e,arguments.length>1?arguments[1]:void 0);return!0===U1(t,(function(e,r){if(n(e,r,t))return!0}),!0)}});var N1=Le,B1=C0,M1=TypeError,W1=x0.get,Y1=x0.has,X1=x0.set;In({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var n=B1(this),r=arguments.length;N1(t);var i=Y1(n,e);if(!i&&r<3)throw M1("Updating absent value");var o=i?W1(n,e):N1(r>2?arguments[2]:void 0)(e,n);return X1(n,e,t(o,e,n)),n}});var Q1=V,j1=Le,H1=w,J1=nn,K1=TypeError,z1=function(e,t){var n,r=J1(this),i=j1(r.get),o=j1(r.has),a=j1(r.set),s=arguments.length>2?arguments[2]:void 0;if(!H1(t)&&!H1(s))throw K1("At least one callback required");return Q1(o,r,e)?(n=Q1(i,r,e),H1(t)&&(n=t(n),Q1(a,r,e,n))):H1(s)&&(n=s(),Q1(a,r,e,n)),n};In({target:"Map",proto:!0,real:!0,forced:!0},{upsert:z1}),In({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:z1});var q1=n(y0);function $1(){$1=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Th||function(e,t,n){e[t]=n.value},i="function"==typeof Rh?Rh:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,n){return Th(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(w){u=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var o=t&&t.prototype instanceof A?t:A,a=wh(o.prototype),s=new T(i||[]);return r(a,"_invoke",{value:_(e,n,s)}),a}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(w){return{type:"throw",arg:w}}}e.wrap=c;var h={};function A(){}function d(){}function f(){}var v={};u(v,o,(function(){return this}));var p=Lh&&Lh(Lh(R([])));p&&p!==t&&n.call(p,o)&&(v=p);var m=f.prototype=A.prototype=wh(v);function y(e){var t;$l(t=["next","throw","return"]).call(t,(function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function g(e,t){function i(r,o,a,s){var u=l(e[r],e,o);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==_l(h)&&n.call(h,"__await")?t.resolve(h.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(h).then((function(e){c.value=e,a(c)}),(function(e){return i("throw",e,a,s)}))}s(u.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function _(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=b(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function b(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method))return h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var r=l(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,h;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function E(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 T(e){this.tryEntries=[{tryLoc:"root"}],$l(e).call(e,E,this),this.reset(!0)}function R(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 r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=f,r(m,"constructor",{value:f,configurable:!0}),r(f,"constructor",{value:d,configurable:!0}),d.displayName=u(f,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Vh?Vh(e,f):(e.__proto__=f,u(e,s,"GeneratorFunction")),e.prototype=wh(m),e},e.awrap=function(e){return{__await:e}},y(g.prototype),u(g.prototype,a,(function(){return this})),e.AsyncIterator=g,e.async=function(t,n,r,i,o){void 0===o&&(o=Zp);var a=new g(c(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(m),u(m,s,"Generator"),u(m,o,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return Qp(n).call(n),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=R,T.prototype={constructor:T,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,$l(t=this.tryEntries).call(t,k),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+hm(r).call(r,1))&&(this[r]=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 r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,h):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),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:R(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},e}function e2(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(b6){return void n(b6)}s.done?t(u):Zp.resolve(u).then(r,i)}function t2(e){return function(){var t=this,n=arguments;return new Zp((function(r,i){var o=e.apply(t,n);function a(e){e2(o,r,i,a,s,"next",e)}function s(e){e2(o,r,i,a,s,"throw",e)}a(void 0)}))}}function n2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Th(e,r.key,r)}}function i2(e,t,n){return t&&r2(e.prototype,t),n&&r2(e,n),Th(e,"prototype",{writable:!1}),e}function o2(e,t,n){return t in e?Th(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a2(e){var t;return(a2=Vh?Dm(t=Lh).call(t):function(e){return e.__proto__||Lh(e)})(e)}function s2(e,t){var n;return(s2=Vh?Dm(n=Vh).call(n):function(e,t){return e.__proto__=t,e})(e,t)}function u2(){if("undefined"==typeof Reflect||!Wm)return!1;if(Wm.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Wm(Boolean,[],(function(){}))),!0}catch(E6){return!1}}function c2(e,t,n){var r;u2()?c2=Dm(r=Wm).call(r):c2=function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Dm(Function).apply(e,r));return n&&s2(i,n.prototype),i};return c2.apply(null,arguments)}function l2(e){var t="function"==typeof q1?new q1:void 0;return l2=function(e){if(null===e||(n=e,-1===TH(r=Function.toString.call(n)).call(r,"[native code]")))return e;var n,r;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 c2(e,arguments,a2(this).constructor)}return i.prototype=wh(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),s2(i,e)},l2(e)}function h2(e,t){if(t&&("object"===_l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}var A2=__,d2=pb("iterator"),f2=!A2((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[d2]||"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"!==n||"x"!==new URL("http://x",void 0).host})),v2=S_,p2=2147483647,m2=/[^\0-\u007E]/,y2=/[.\u3002\uFF0E\uFF61]/g,g2="Overflow: input needs wider integers to process",_2=RangeError,b2=v2(y2.exec),E2=Math.floor,k2=String.fromCharCode,T2=v2("".charCodeAt),R2=v2([].join),S2=v2([].push),w2=v2("".replace),D2=v2("".split),I2=v2("".toLowerCase),C2=function(e){return e+22+75*(e<26)},L2=function(e,t,n){var r=0;for(e=n?E2(e/700):e>>1,e+=E2(e/t);e>455;)e=E2(e/35),r+=36;return E2(r+36*e/(e+38))},V2=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=T2(e,n++);if(i>=55296&&i<=56319&&n<r){var o=T2(e,n++);56320==(64512&o)?S2(t,((1023&i)<<10)+(1023&o)+65536):(S2(t,i),n--)}else S2(t,i)}return t}(e);var n,r,i=e.length,o=128,a=0,s=72;for(n=0;n<e.length;n++)(r=e[n])<128&&S2(t,k2(r));var u=t.length,c=u;for(u&&S2(t,"-");c<i;){var l=p2;for(n=0;n<e.length;n++)(r=e[n])>=o&&r<l&&(l=r);var h=c+1;if(l-o>E2((p2-a)/h))throw _2(g2);for(a+=(l-o)*h,o=l,n=0;n<e.length;n++){if((r=e[n])<o&&++a>p2)throw _2(g2);if(r==o){for(var A=a,d=36;;){var f=d<=s?1:d>=s+26?26:d-s;if(A<f)break;var v=A-f,p=36-f;S2(t,k2(C2(f+v%p))),A=E2(v/p),d+=36}S2(t,k2(C2(A))),s=L2(a,h,c==u),a=0,c++}}a++,o++}return R2(t,"")},x2=cS,F2=u_,G2=Zb,O2=S_,Z2=_b,P2=f2,U2=wk,N2=kZ,B2=TI,M2=jG,W2=ck,Y2=VI,X2=X_,Q2=O_,j2=zk,H2=Pk,J2=Fb,K2=kb,z2=LS,q2=dw,$2=ME,e5=DV,t5=bV,n5=YI,r5=wM,i5=pb("iterator"),o5="URLSearchParams",a5=o5+"Iterator",s5=W2.set,u5=W2.getterFor(o5),c5=W2.getterFor(a5),l5=Object.getOwnPropertyDescriptor,h5=function(e){if(!Z2)return F2[e];var t=l5(F2,e);return t&&t.value},A5=h5("fetch"),d5=h5("Request"),f5=h5("Headers"),v5=d5&&d5.prototype,p5=f5&&f5.prototype,m5=F2.RegExp,y5=F2.TypeError,g5=F2.decodeURIComponent,_5=F2.encodeURIComponent,b5=O2("".charAt),E5=O2([].join),k5=O2([].push),T5=O2("".replace),R5=O2([].shift),S5=O2([].splice),w5=O2("".split),D5=O2("".slice),I5=/\+/g,C5=Array(4),L5=function(e){return C5[e-1]||(C5[e-1]=m5("((?:%[\\da-f]{2}){"+e+"})","gi"))},V5=function(e){try{return g5(e)}catch(b6){return e}},x5=function(e){var t=T5(e,I5," "),n=4;try{return g5(t)}catch(b6){for(;n;)t=T5(t,L5(n--),V5);return t}},F5=/[!'()~]|%20/g,G5={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},O5=function(e){return G5[e]},Z5=function(e){return T5(_5(e),F5,O5)},P5=M2((function(e,t){s5(this,{type:a5,iterator:e5(u5(e).entries),kind:t})}),"Iterator",(function(){var e=c5(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n}),!0),U5=function(e){this.entries=[],this.url=null,void 0!==e&&(K2(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===b5(e,0)?D5(e,1):e:z2(e)))};U5.prototype={type:o5,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,o,a,s,u=t5(e);if(u)for(n=(t=e5(e,u)).next;!(r=G2(n,t)).done;){if(o=(i=e5(J2(r.value))).next,(a=G2(o,i)).done||(s=G2(o,i)).done||!G2(o,i).done)throw y5("Expected sequence with length 2");k5(this.entries,{key:z2(a.value),value:z2(s.value)})}else for(var c in e)Q2(e,c)&&k5(this.entries,{key:c,value:z2(e[c])})},parseQuery:function(e){if(e)for(var t,n,r=w5(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(n=w5(t,"="),k5(this.entries,{key:x5(R5(n)),value:x5(E5(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],k5(n,Z5(e.key)+"="+Z5(e.value));return E5(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var N5=function(){Y2(this,B5),s5(this,new U5(arguments.length>0?arguments[0]:void 0))},B5=N5.prototype;if(N2(B5,{append:function(e,t){n5(arguments.length,2);var n=u5(this);k5(n.entries,{key:z2(e),value:z2(t)}),n.updateURL()},delete:function(e){n5(arguments.length,1);for(var t=u5(this),n=t.entries,r=z2(e),i=0;i<n.length;)n[i].key===r?S5(n,i,1):i++;t.updateURL()},get:function(e){n5(arguments.length,1);for(var t=u5(this).entries,n=z2(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){n5(arguments.length,1);for(var t=u5(this).entries,n=z2(e),r=[],i=0;i<t.length;i++)t[i].key===n&&k5(r,t[i].value);return r},has:function(e){n5(arguments.length,1);for(var t=u5(this).entries,n=z2(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){n5(arguments.length,1);for(var n,r=u5(this),i=r.entries,o=!1,a=z2(e),s=z2(t),u=0;u<i.length;u++)(n=i[u]).key===a&&(o?S5(i,u--,1):(o=!0,n.value=s));o||k5(i,{key:a,value:s}),r.updateURL()},sort:function(){var e=u5(this);r5(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=u5(this).entries,r=j2(e,arguments.length>1?arguments[1]:void 0),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new P5(this,"keys")},values:function(){return new P5(this,"values")},entries:function(){return new P5(this,"entries")}},{enumerable:!0}),U2(B5,i5,B5.entries,{name:"entries"}),U2(B5,"toString",(function(){return u5(this).serialize()}),{enumerable:!0}),B2(N5,o5),x2({global:!0,constructor:!0,forced:!P2},{URLSearchParams:N5}),!P2&&X2(f5)){var M5=O2(p5.has),W5=O2(p5.set),Y5=function(e){if(K2(e)){var t,n=e.body;if(H2(n)===o5)return t=e.headers?new f5(e.headers):new f5,M5(t,"content-type")||W5(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),q2(e,{body:$2(0,z2(n)),headers:$2(0,t)})}return e};if(X2(A5)&&x2({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return A5(e,arguments.length>1?Y5(arguments[1]):{})}}),X2(d5)){var X5=function(e){return Y2(this,v5),new d5(e,arguments.length>1?Y5(arguments[1]):{})};v5.constructor=X5,X5.prototype=v5,x2({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:X5})}}var Q5,j5=cS,H5=_b,J5=f2,K5=u_,z5=zk,q5=S_,$5=wk,e4=nJ,t4=VI,n4=O_,r4=WW,i4=function(e){var t=EJ(e),n=RJ(this),r=arguments.length,i=r>1?arguments[1]:void 0,o=void 0!==i;o&&(i=_J(i,r>2?arguments[2]:void 0));var a,s,u,c,l,h,A=IJ(t),d=0;if(!A||this===CJ&&TJ(A))for(a=SJ(t),s=n?new this(a):CJ(a);a>d;d++)h=o?i(t[d],d):t[d],wJ(s,d,h);else for(l=(c=DJ(t,A)).next,s=n?new this:[];!(u=bJ(l,c)).done;d++)h=o?kJ(c,i,[u.value,d],!0):u.value,wJ(s,d,h);return s.length=d,s},o4=_S,a4=pD.codeAt,s4=function(e){var t,n,r=[],i=D2(w2(I2(e),y2,"."),".");for(t=0;t<i.length;t++)n=i[t],S2(r,b2(m2,n)?"xn--"+V2(n):n);return R2(r,".")},u4=LS,c4=TI,l4=YI,h4={URLSearchParams:N5,getState:u5},A4=ck,d4=A4.set,f4=A4.getterFor("URL"),v4=h4.URLSearchParams,p4=h4.getState,m4=K5.URL,y4=K5.TypeError,g4=K5.parseInt,_4=Math.floor,b4=Math.pow,E4=q5("".charAt),k4=q5(/./.exec),T4=q5([].join),R4=q5(1..toString),S4=q5([].pop),w4=q5([].push),D4=q5("".replace),I4=q5([].shift),C4=q5("".split),L4=q5("".slice),V4=q5("".toLowerCase),x4=q5([].unshift),F4="Invalid scheme",G4="Invalid host",O4="Invalid port",Z4=/[a-z]/i,P4=/[\d+-.a-z]/i,U4=/\d/,N4=/^0x/i,B4=/^[0-7]+$/,M4=/^\d+$/,W4=/^[\da-f]+$/i,Y4=/[\0\t\n\r #%/:<>?@[\\\]^|]/,X4=/[\0\t\n\r #/:<>?@[\\\]^|]/,Q4=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,j4=/[\t\n\r]/g,H4=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)x4(t,e%256),e=_4(e/256);return T4(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,o=0;o<8;o++)0!==e[o]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(t=r,n=i),t}(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=R4(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},J4={},K4=r4({},J4,{" ":1,'"':1,"<":1,">":1,"`":1}),z4=r4({},K4,{"#":1,"?":1,"{":1,"}":1}),q4=r4({},z4,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),$4=function(e,t){var n=a4(e,0);return n>32&&n<127&&!n4(t,e)?e:encodeURIComponent(e)},e3={ftp:21,file:null,http:80,https:443,ws:80,wss:443},t3=function(e,t){var n;return 2==e.length&&k4(Z4,E4(e,0))&&(":"==(n=E4(e,1))||!t&&"|"==n)},n3=function(e){var t;return e.length>1&&t3(L4(e,0,2))&&(2==e.length||"/"===(t=E4(e,2))||"\\"===t||"?"===t||"#"===t)},r3=function(e){return"."===e||"%2e"===V4(e)},i3={},o3={},a3={},s3={},u3={},c3={},l3={},h3={},A3={},d3={},f3={},v3={},p3={},m3={},y3={},g3={},_3={},b3={},E3={},k3={},T3={},R3=function(e,t,n){var r,i,o,a=u4(e);if(t){if(i=this.parse(a))throw y4(i);this.searchParams=null}else{if(void 0!==n&&(r=new R3(n,!0)),i=this.parse(a,null,r))throw y4(i);(o=p4(new v4)).bindURL(this),this.searchParams=o}};R3.prototype={type:"URL",parse:function(e,t,n){var r,i,o,a,s,u=this,c=t||i3,l=0,h="",A=!1,d=!1,f=!1;for(e=u4(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=D4(e,Q4,"")),e=D4(e,j4,""),r=i4(e);l<=r.length;){switch(i=r[l],c){case i3:if(!i||!k4(Z4,i)){if(t)return F4;c=a3;continue}h+=V4(i),c=o3;break;case o3:if(i&&(k4(P4,i)||"+"==i||"-"==i||"."==i))h+=V4(i);else{if(":"!=i){if(t)return F4;h="",c=a3,l=0;continue}if(t&&(u.isSpecial()!=n4(e3,h)||"file"==h&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=h,t)return void(u.isSpecial()&&e3[u.scheme]==u.port&&(u.port=null));h="","file"==u.scheme?c=m3:u.isSpecial()&&n&&n.scheme==u.scheme?c=s3:u.isSpecial()?c=h3:"/"==r[l+1]?(c=u3,l++):(u.cannotBeABaseURL=!0,w4(u.path,""),c=E3)}break;case a3:if(!n||n.cannotBeABaseURL&&"#"!=i)return F4;if(n.cannotBeABaseURL&&"#"==i){u.scheme=n.scheme,u.path=o4(n.path),u.query=n.query,u.fragment="",u.cannotBeABaseURL=!0,c=T3;break}c="file"==n.scheme?m3:c3;continue;case s3:if("/"!=i||"/"!=r[l+1]){c=c3;continue}c=A3,l++;break;case u3:if("/"==i){c=d3;break}c=b3;continue;case c3:if(u.scheme=n.scheme,i==Q5)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=o4(n.path),u.query=n.query;else if("/"==i||"\\"==i&&u.isSpecial())c=l3;else if("?"==i)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=o4(n.path),u.query="",c=k3;else{if("#"!=i){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=o4(n.path),u.path.length--,c=b3;continue}u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=o4(n.path),u.query=n.query,u.fragment="",c=T3}break;case l3:if(!u.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,c=b3;continue}c=d3}else c=A3;break;case h3:if(c=A3,"/"!=i||"/"!=E4(h,l+1))continue;l++;break;case A3:if("/"!=i&&"\\"!=i){c=d3;continue}break;case d3:if("@"==i){A&&(h="%40"+h),A=!0,o=i4(h);for(var v=0;v<o.length;v++){var p=o[v];if(":"!=p||f){var m=$4(p,q4);f?u.password+=m:u.username+=m}else f=!0}h=""}else if(i==Q5||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(A&&""==h)return"Invalid authority";l-=i4(h).length+1,h="",c=f3}else h+=i;break;case f3:case v3:if(t&&"file"==u.scheme){c=g3;continue}if(":"!=i||d){if(i==Q5||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(u.isSpecial()&&""==h)return G4;if(t&&""==h&&(u.includesCredentials()||null!==u.port))return;if(a=u.parseHost(h))return a;if(h="",c=_3,t)return;continue}"["==i?d=!0:"]"==i&&(d=!1),h+=i}else{if(""==h)return G4;if(a=u.parseHost(h))return a;if(h="",c=p3,t==v3)return}break;case p3:if(!k4(U4,i)){if(i==Q5||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()||t){if(""!=h){var y=g4(h,10);if(y>65535)return O4;u.port=u.isSpecial()&&y===e3[u.scheme]?null:y,h=""}if(t)return;c=_3;continue}return O4}h+=i;break;case m3:if(u.scheme="file","/"==i||"\\"==i)c=y3;else{if(!n||"file"!=n.scheme){c=b3;continue}if(i==Q5)u.host=n.host,u.path=o4(n.path),u.query=n.query;else if("?"==i)u.host=n.host,u.path=o4(n.path),u.query="",c=k3;else{if("#"!=i){n3(T4(o4(r,l),""))||(u.host=n.host,u.path=o4(n.path),u.shortenPath()),c=b3;continue}u.host=n.host,u.path=o4(n.path),u.query=n.query,u.fragment="",c=T3}}break;case y3:if("/"==i||"\\"==i){c=g3;break}n&&"file"==n.scheme&&!n3(T4(o4(r,l),""))&&(t3(n.path[0],!0)?w4(u.path,n.path[0]):u.host=n.host),c=b3;continue;case g3:if(i==Q5||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&t3(h))c=b3;else if(""==h){if(u.host="",t)return;c=_3}else{if(a=u.parseHost(h))return a;if("localhost"==u.host&&(u.host=""),t)return;h="",c=_3}continue}h+=i;break;case _3:if(u.isSpecial()){if(c=b3,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=Q5&&(c=b3,"/"!=i))continue}else u.fragment="",c=T3;else u.query="",c=k3;break;case b3:if(i==Q5||"/"==i||"\\"==i&&u.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=V4(s=h))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(u.shortenPath(),"/"==i||"\\"==i&&u.isSpecial()||w4(u.path,"")):r3(h)?"/"==i||"\\"==i&&u.isSpecial()||w4(u.path,""):("file"==u.scheme&&!u.path.length&&t3(h)&&(u.host&&(u.host=""),h=E4(h,0)+":"),w4(u.path,h)),h="","file"==u.scheme&&(i==Q5||"?"==i||"#"==i))for(;u.path.length>1&&""===u.path[0];)I4(u.path);"?"==i?(u.query="",c=k3):"#"==i&&(u.fragment="",c=T3)}else h+=$4(i,z4);break;case E3:"?"==i?(u.query="",c=k3):"#"==i?(u.fragment="",c=T3):i!=Q5&&(u.path[0]+=$4(i,J4));break;case k3:t||"#"!=i?i!=Q5&&("'"==i&&u.isSpecial()?u.query+="%27":u.query+="#"==i?"%23":$4(i,J4)):(u.fragment="",c=T3);break;case T3:i!=Q5&&(u.fragment+=$4(i,K4))}l++}},parseHost:function(e){var t,n,r;if("["==E4(e,0)){if("]"!=E4(e,e.length-1))return G4;if(t=function(e){var t,n,r,i,o,a,s,u=[0,0,0,0,0,0,0,0],c=0,l=null,h=0,A=function(){return E4(e,h)};if(":"==A()){if(":"!=E4(e,1))return;h+=2,l=++c}for(;A();){if(8==c)return;if(":"!=A()){for(t=n=0;n<4&&k4(W4,A());)t=16*t+g4(A(),16),h++,n++;if("."==A()){if(0==n)return;if(h-=n,c>6)return;for(r=0;A();){if(i=null,r>0){if(!("."==A()&&r<4))return;h++}if(!k4(U4,A()))return;for(;k4(U4,A());){if(o=g4(A(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;h++}u[c]=256*u[c]+i,2!=++r&&4!=r||c++}if(4!=r)return;break}if(":"==A()){if(h++,!A())return}else if(A())return;u[c++]=t}else{if(null!==l)return;h++,l=++c}}if(null!==l)for(a=c-l,c=7;0!=c&&a>0;)s=u[c],u[c--]=u[l+a-1],u[l+--a]=s;else if(8!=c)return;return u}(L4(e,1,-1)),!t)return G4;this.host=t}else if(this.isSpecial()){if(e=s4(e),k4(Y4,e))return G4;if(t=function(e){var t,n,r,i,o,a,s,u=C4(e,".");if(u.length&&""==u[u.length-1]&&u.length--,(t=u.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=u[r]))return e;if(o=10,i.length>1&&"0"==E4(i,0)&&(o=k4(N4,i)?16:8,i=L4(i,8==o?1:2)),""===i)a=0;else{if(!k4(10==o?M4:8==o?B4:W4,i))return e;a=g4(i,o)}w4(n,a)}for(r=0;r<t;r++)if(a=n[r],r==t-1){if(a>=b4(256,5-t))return null}else if(a>255)return null;for(s=S4(n),r=0;r<n.length;r++)s+=n[r]*b4(256,3-r);return s}(e),null===t)return G4;this.host=t}else{if(k4(X4,e))return G4;for(t="",n=i4(e),r=0;r<n.length;r++)t+=$4(n[r],J4);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return n4(e3,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&t3(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,i=e.host,o=e.port,a=e.path,s=e.query,u=e.fragment,c=t+":";return null!==i?(c+="//",e.includesCredentials()&&(c+=n+(r?":"+r:"")+"@"),c+=H4(i),null!==o&&(c+=":"+o)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?a[0]:a.length?"/"+T4(a,"/"):"",null!==s&&(c+="?"+s),null!==u&&(c+="#"+u),c},setHref:function(e){var t=this.parse(e);if(t)throw y4(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new S3(e.path[0]).origin}catch(b6){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+H4(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(u4(e)+":",i3)},getUsername:function(){return this.username},setUsername:function(e){var t=i4(u4(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=$4(t[n],q4)}},getPassword:function(){return this.password},setPassword:function(e){var t=i4(u4(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=$4(t[n],q4)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?H4(e):H4(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,f3)},getHostname:function(){var e=this.host;return null===e?"":H4(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,v3)},getPort:function(){var e=this.port;return null===e?"":u4(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=u4(e))?this.port=null:this.parse(e,p3))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+T4(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,_3))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=u4(e))?this.query=null:("?"==E4(e,0)&&(e=L4(e,1)),this.query="",this.parse(e,k3)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=u4(e))?("#"==E4(e,0)&&(e=L4(e,1)),this.fragment="",this.parse(e,T3)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var S3=function(e){var t=t4(this,w3),n=l4(arguments.length,1)>1?arguments[1]:void 0,r=d4(t,new R3(e,!1,n));H5||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},w3=S3.prototype,D3=function(e,t){return{get:function(){return f4(this)[e]()},set:t&&function(e){return f4(this)[t](e)},configurable:!0,enumerable:!0}};if(H5&&(e4(w3,"href",D3("serialize","setHref")),e4(w3,"origin",D3("getOrigin")),e4(w3,"protocol",D3("getProtocol","setProtocol")),e4(w3,"username",D3("getUsername","setUsername")),e4(w3,"password",D3("getPassword","setPassword")),e4(w3,"host",D3("getHost","setHost")),e4(w3,"hostname",D3("getHostname","setHostname")),e4(w3,"port",D3("getPort","setPort")),e4(w3,"pathname",D3("getPathname","setPathname")),e4(w3,"search",D3("getSearch","setSearch")),e4(w3,"searchParams",D3("getSearchParams")),e4(w3,"hash",D3("getHash","setHash"))),$5(w3,"toJSON",(function(){return f4(this).serialize()}),{enumerable:!0}),$5(w3,"toString",(function(){return f4(this).serialize()}),{enumerable:!0}),m4){var I3=m4.createObjectURL,C3=m4.revokeObjectURL;I3&&$5(S3,"createObjectURL",z5(I3,m4)),C3&&$5(S3,"revokeObjectURL",z5(C3,m4))}function L3(){var e,t,n=new Zp((function(n,r){e=n,t=r}));return n.used=!1,n.resolve=function(){return n.used=!0,e.apply(void 0,arguments)},n.reject=function(){return n.used=!0,t.apply(void 0,arguments)},n}function V3(){try{return ug(performance.now(),10)}catch(E6){return(new Date).getTime()}}c4(S3,"URL"),j5({global:!0,constructor:!0,forced:!J5,sham:!H5},{URL:S3});var x3,F3=function(){function e(){n2(this,e)}return i2(e,null,[{key:"start",value:function(e){return e&&e.length?1===e.length&&e.end(0)-e.start(0)<1e-6||1===e.length&&e.start(0)<0?0:e.start(0):0}},{key:"end",value:function(e){return e&&e.length?1===e.length&&e.end(0)-e.start(0)<1e-6?0:e.end(e.length-1):0}},{key:"get",value:function(e){if(e)try{return e.buffered}catch(b6){}}},{key:"buffers",value:function(e,t){if(!e||!e.length)return[];for(var n=[],r=0,i=e.length;r<i;r++){var o=n.length;if(o&&t){var a=n[o-1],s=a[1];if(e.start(r)-s<=t){var u=e.end(r);u>s&&(a[1]=u)}else n.push([e.start(r),e.end(r)])}else n.push([e.start(r),e.end(r)])}return n}},{key:"totalLength",value:function(e){return e&&e.length?TY(e).call(e,(function(e,t){return e+(t[1]-t[0])}),0):0}},{key:"info",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!t||!t.length)return{start:0,end:0,buffers:[]};for(var i=0,o=0,a=0,s=0,u=0,c=0,l=0,h=e.buffers(t,r),A=0,d=h.length;A<d;A++){var f=h[A];if(n+r>=f[0]&&n<f[1])i=f[0],o=f[1],a=A;else{if(n+r<f[0]){s=f[0],u=f[1];break}n+r>f[1]&&(c=f[0],l=f[1])}}return{start:i,end:o,index:a,buffers:h,nextStart:s,nextEnd:u,prevStart:c,prevEnd:l,currentTime:n,behind:n-i,remaining:o?o-n:0,length:e.totalLength&&e.totalLength(h)}}}]),e}(),G3="network",O3="network_timeout",Z3="demux",P3="remux",U3="media",N3="other",B3={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"},M3=(o2(x3={},"manifest",{HLS:1100}),o2(x3,G3,2100),o2(x3,O3,2101),o2(x3,Z3,{FLV:3100,HLS:3200,MP4:3300,FMP4:3400}),o2(x3,P3,{FMP4:4100,MP4:4200}),o2(x3,U3,{MSE_ADD_SB:5200,MSE_APPEND_BUFFER:5201,MSE_OTHER:5202,MSE_FULL:5203}),o2(x3,N3,8e3),x3),W3=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=wh(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Th(e,"prototype",{writable:!1}),t&&s2(e,t)}(i,e);var t,n,r=(t=i,n=u2(),function(){var e,r=a2(t);if(n){var i=a2(this).constructor;e=Wm(r,arguments,i)}else e=r.apply(this,arguments);return h2(this,e)});function i(e,t,n,o,a){var s;return n2(this,i),(s=r.call(this,a||(null==n?void 0:n.message))).errorType=e===O3?G3:e,s.originError=n,s.ext=o,s.errorCode=M3[e][t]||M3[e],s.errorMessage=s.message,s.errorCode||(s.errorType=N3,s.errorCode=M3[s.errorType]),s}return i2(i,null,[{key:"create",value:function(e,t,n,r,o){return e instanceof i?e:(e instanceof Error&&(n=e,e=""),e||(e=N3),new i(e,t,n,r,o))}},{key:"network",value:function(e){var t;return new i(null!=e&&e.isTimeout?O3:G3,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})}}]),i}(l2(Error)),Y3="undefined"!=typeof window,X3=function(){function e(t){n2(this,e),this.name=t||"",this._prefix="[".concat(this.name,"]")}return i2(e,[{key:"debug",value:function(){var t,n;if(!e.disabled){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];(n=console).debug.apply(n,dg(t=[this._prefix,V3()]).call(t,i))}}},{key:"log",value:function(){var t,n;if(!e.disabled){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];(n=console).log.apply(n,dg(t=[this._prefix,V3()]).call(t,i))}}},{key:"warn",value:function(){var t,n;if(!e.disabled){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];(n=console).warn.apply(n,dg(t=[this._prefix,V3()]).call(t,i))}}},{key:"error",value:function(){var t,n;if(!e.disabled){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];(n=console).error.apply(n,dg(t=[this._prefix,V3()]).call(t,i))}}},{key:"table",value:function(){var t;e.disabled||(console.group(this._prefix),(t=console).table.apply(t,arguments),console.groupEnd())}}],[{key:"enable",value:function(){e.disabled=!1}},{key:"disable",value:function(){e.disabled=!0}}]),e}();o2(X3,"disabled",!0);var Q3=function(){try{return Y3?window.MediaSource:null}catch(E6){}}(),j3="appendBuffer",H3="removeBuffer",J3=function(){function e(t,n){var r=this;n2(this,e),o2(this,"media",null),o2(this,"mediaSource",null),o2(this,"_openPromise",L3()),o2(this,"_queue",wh(null)),o2(this,"_sourceBuffer",wh(null)),o2(this,"_mseFullFlag",{}),o2(this,"_st",0),o2(this,"_opst",0),o2(this,"_logger",null),o2(this,"_config",null),o2(this,"_url",null),o2(this,"_onSBUpdateEnd",(function(e){var t=r._queue[e];if(t){var n=t.shift();if(n){var i=V3()-r._opst;r._logger.debug("UpdateEnd",n.opName,i,n.context),n.promise.resolve({name:n.opName,context:n.context,costtime:i}),r._startQueue(e)}}})),o2(this,"_onSBUpdateError",(function(e,t){var n=r._queue[e];if(n){var i=n[0];i&&(r._logger.error("UpdateError",e,i.opName,i.context),i.promise.reject(new W3(U3,B3.MSE_APPEND_BUFFER,t)))}})),this._config=CW(e.getDefaultConfig(),n),t&&this.bindMedia(t),this._logger=new X3("MSE"),this._config.openLog&&X3.enable()}var t,n,r;return i2(e,[{key:"isOpened",get:function(){var e;return"open"===(null===(e=this.mediaSource)||void 0===e?void 0:e.readyState)}},{key:"url",get:function(){return this._url}},{key:"duration",get:function(){var e;return(null===(e=this.mediaSource)||void 0===e?void 0:e.duration)||-1}},{key:"isEnded",get:function(){return!!this.mediaSource&&"ended"===this.mediaSource.readyState}},{key:"isFull",value:function(t){return t?this._mseFullFlag[t]:this._mseFullFlag[e.VIDEO]}},{key:"updateDuration",value:function(e){var t=this;return this.mediaSource&&this.mediaSource.duration>e?Zp.resolve():this._enqueueBlockingOp((function(){t.isEnded?t._logger.debug("[debug mse] setDuration ended"):t.mediaSource&&(t.mediaSource.duration=e,t._logger.debug("[debug mse] setDuration"))}),"updateDuration")}},{key:"open",value:function(){var e=this;if(this._openPromise.used&&!this.isOpened&&this.mediaSource){var t=this.mediaSource;t.addEventListener("sourceopen",(function n(){var r=V3()-e._st;e._logger.debug("MSE OPEN",r),t.removeEventListener("sourceopen",n),e._openPromise.resolve({costtime:r})})),this._openPromise=L3()}return this._openPromise}},{key:"bindMedia",value:(r=t2($1().mark((function e(t){var n,r,i=this;return $1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.mediaSource&&!this.media){e.next=3;break}return e.next=3,this.unbindMedia();case 3:if(t&&Q3){e.next=5;break}throw new Error("Param media or MediaSource does not exist");case 5:return this.media=t,n=this.mediaSource=new Q3,this._st=V3(),r=function e(){var r=V3()-i._st;i._logger.debug("MSE OPEN"),n.removeEventListener("sourceopen",e),p$.revokeObjectURL(t.src),i._openPromise.resolve({costtime:r})},n.addEventListener("sourceopen",r),this._url=p$.createObjectURL(n),t.src=this._url,e.abrupt("return",this._openPromise);case 13:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"unbindMedia",value:(n=t2($1().mark((function e(){var t,n,r,i=this;return $1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._openPromise.used||this._openPromise.resolve(),t=this.mediaSource){var o,a;if($l(o=kl(this._queue)).call(o,(function(e){var t=i._queue[e];t&&$l(t).call(t,(function(e){return e.promise.resolve}))})),n=!!this.media&&this.media.readyState>=1,r="open"===t.readyState,n&&r)try{t.endOfStream()}catch(b6){}$l(a=kl(this._sourceBuffer)).call(a,(function(e){try{t.removeSourceBuffer(i._sourceBuffer[e])}catch(b6){}}))}if(this.media){this.media.removeAttribute("src");try{this.media.load()}catch(b6){}this.media=null}this.mediaSource=null,this._openPromise=L3(),this._queue=wh(null),this._sourceBuffer=wh(null);case 8:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"createSource",value:function(e,t){var n,r;if(!this._sourceBuffer[e]&&this.mediaSource){var i;try{i=this._sourceBuffer[e]=this.mediaSource.addSourceBuffer(t)}catch(b6){throw new W3(U3,B3.MSE_ADD_SB,b6)}i.mimeType=t,i.addEventListener("updateend",Dm(n=this._onSBUpdateEnd).call(n,this,e)),i.addEventListener("error",Dm(r=this._onSBUpdateError).call(r,this,e))}}},{key:"changeType",value:function(e,t){var n=this,r=this._sourceBuffer[e];return this.mediaSource&&r&&r.mimeType!==t&&"function"==typeof r.changeType?this._enqueueOp(e,(function(){r.changeType(t),r.mimeType=t,n._onSBUpdateEnd(e)})):Zp.resolve()}},{key:"createOrChangeSource",value:function(e,t){return this.createSource(e,t),this.changeType(e,t)}},{key:"append",value:function(e,t,n){var r=this;return t&&t.byteLength&&this._sourceBuffer[e]?this._enqueueOp(e,(function(){var i;r.mediaSource&&(r._logger.debug("MSE APPEND START",n),r._opst=V3(),null===(i=r._sourceBuffer[e])||void 0===i||i.appendBuffer(t))}),j3,n):Zp.resolve()}},{key:"remove",value:function(e,t,n,r){var i=this,o=!1;return this._mseFullFlag[e]&&(o=!0),this._enqueueOp(e,(function(){if(i.mediaSource){var o=i._sourceBuffer[e];t>=n||!o?i._onSBUpdateEnd(e):(i._opst=V3(),i._logger.debug("MSE REMOVE START",e,t,n,r),o.remove(t,n))}}),H3,r,o)}},{key:"clearBuffer",value:function(e,t){var n,r,i=this;return $l(n=kl(this._sourceBuffer)).call(n,(function(n){r=i._enqueueOp(n,(function(){if(i.mediaSource){var r=i._sourceBuffer[n];i._logger.debug("MSE clearBuffer START",n,e,t),r.remove(e,t)}}))})),r}},{key:"clearAllBuffer",value:function(){var e,t,n=this;return $l(e=kl(this._sourceBuffer)).call(e,(function(e){t=n._enqueueOp(e,(function(){if(n.mediaSource){var t=n._sourceBuffer[e];n._logger.debug("MSE clearAllBuffer START",e),t.remove(0,F3.end(F3.get(t)))}}))})),t}},{key:"clearOpQueues",value:function(e){var t;this._logger.debug("MSE clearOpQueue START");var n=this._queue[e];if(n&&n[e]&&!(n.length<5)){var r=[];$l(n).call(n,(function(e){e.context&&e.context.isinit&&r.push(e)})),this._queue[e]=hm(n).call(n,0,2),r.length>0&&(t=this._queue[e]).push.apply(t,r)}}},{key:"endOfStream",value:function(e){var t=this;return this.mediaSource&&"open"===this.mediaSource.readyState?this._enqueueBlockingOp((function(){var n=t.mediaSource;n&&"open"===n.readyState&&(t._logger.debug("MSE endOfStream START"),e?n.endOfStream(e):n.endOfStream())}),"endOfStream"):Zp.resolve()}},{key:"setLiveSeekableRange",value:function(e,t){var n=this.mediaSource;e<0||t<e||null==n||!n.setLiveSeekableRange||"open"!==n.readyState||n.setLiveSeekableRange(e,t)}},{key:"getSourceBuffer",value:function(e){return this._sourceBuffer[e]}},{key:"buffered",value:function(e){return F3.get(this._sourceBuffer[e])}},{key:"bufferStart",value:function(e){return F3.start(this.buffered(e))}},{key:"bufferEnd",value:function(e){return F3.end(this.buffered(e))}},{key:"_enqueueOp",value:function(e,t,n,r,i){var o=this;if(!this.mediaSource)return Zp.resolve();var a=this._queue[e]=this._queue[e]||[],s={exec:t,promise:L3(),opName:n,context:r};return i?(PQ(a).call(a,0,0,s),this._mseFullFlag[e]=!1,this._startQueue(e)):a.push(s),this.isOpened?1===a.length&&this._startQueue(e):this._openPromise.then((function(){1===a.length&&o._startQueue(e)})),s.promise}},{key:"_enqueueBlockingOp",value:(t=t2($1().mark((function e(t,n){var r,i,o=this;return $1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.mediaSource){e.next=2;break}return e.abrupt("return",Zp.resolve());case 2:if((r=kl(this._sourceBuffer)).length){e.next=5;break}return e.abrupt("return",t());case 5:return i=[],$l(r).call(r,(function(e){var t=o._queue[e],r=L3();i.push(r),t.push({exec:function(){return r.resolve()},promise:r,opName:n}),1===t.length&&o._startQueue(e)})),e.abrupt("return",Zp.all(i).then((function(){try{return t()}finally{$l(r).call(r,(function(e){var t=o._queue[e],n=o._sourceBuffer[e];null==t||t.shift(),n&&n.updating||o._startQueue(e)}))}})));case 8:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})},{key:"_startQueue",value:function(e){var t=this._queue[e];if(t){var n=t[0];if(n&&!this._mseFullFlag[e])try{n.exec()}catch(b6){var r;b6&&b6.message&&TH(r=b6.message).call(r,"SourceBuffer is full")>=0?(this._mseFullFlag[e]=!0,this._logger.error("[MSE error], context,",n.context," ,name,",n.opName,",err,SourceBuffer is full"),n.promise.reject(new W3(U3,B3.MSE_FULL,b6))):(this._logger.error(b6),n.promise.reject(new W3(U3,B3.MSE_OTHER,b6)),t.shift(),this._startQueue(e))}}}},{key:"setTimeoffset",value:function(e,t,n){var r=this;return this._enqueueOp(e,(function(){t<0&&(t+=.001),r._sourceBuffer[e].timestampOffset=t,r._onSBUpdateEnd(e)}),"setTimeoffset",n)}},{key:"abort",value:function(e,t){var n=this;return this.isOpened?this._enqueueOp(e,(function(){n._sourceBuffer[e].abort(),n._onSBUpdateEnd(e)}),"abort",t):Zp.resolve()}}],[{key:"getDefaultConfig",value:function(){return{openLog:!1}}},{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'video/mp4; codecs="avc1.42E01E,mp4a.40.2"';if(!Q3)return!1;try{return Q3.isTypeSupported(e)}catch(b6){return this._logger.error(e,b6),!1}}}]),e}();o2(J3,"VIDEO","video"),o2(J3,"AUDIO","audio");var K3={"mp4a.40.5":1,"mp4a.40.2":2},z3=.05,q3=new(function(){function e(){by(this,e),Ty(this,"_queue",[]),"undefined"!=typeof document&&(this._tempMedia=document.createElement("video"))}return ky(e,[{key:"tempMedia",get:function(){return this._tempMedia}},{key:"hasCached",get:function(){var e,t;return-1!==vQ(e=this._queue).call(e,(function(e){return 1===e.codec}))&&-1!==vQ(t=this._queue).call(t,(function(e){return 2===e.codec}))}},{key:"getCachedMedia",value:function(e){var t,n,r=vQ(t=this._queue).call(t,(function(t){return t.codec===e}));return-1!==r?PQ(n=this._queue).call(n,r,1)[0]:null}},{key:"cacheMedia",value:function(e){var t,n,r=e.codec,i=e.media,o=e.mse,a=K3[r];if(this._queue=Vl(t=this._queue).call(t,(function(e){var t;return e.mse&&!e.mse.isOpened&&e.mse.unbindMedia(),null===(t=e.mse)||void 0===t?void 0:t.isOpened})),!r||Vl(n=this._queue).call(n,(function(e){return e.codec===a})).length>2)return null==o||o.endOfStream(),void(null==o||o.unbindMedia());this._queue.push({codec:a,media:i,mse:o})}}]),e}()),$3=function(e){Ry(o,e);var t,n,r,i=Iy(o);function o(e,t){var n;return by(this,o),Ty(Dy(n=i.call(this,e,t)),"_media",void 0),Ty(Dy(n),"_isTempMedia",!1),Ty(Dy(n),"_mse",void 0),Ty(Dy(n),"_remuxer",null),Ty(Dy(n),"_codec",""),Ty(Dy(n),"_sourceCreated",!1),Ty(Dy(n),"_needInitSegment",!0),Ty(Dy(n),"_seekNoSideEffect",!1),Ty(Dy(n),"_startRendered",!1),Ty(Dy(n),"_firstTimeAppendedBuffer",!1),Ty(Dy(n),"_sampleQueue",[]),Ty(Dy(n),"_inProcessing",!1),Ty(Dy(n),"_duration",0),Ty(Dy(n),"_mediaCache",q3),Ty(Dy(n),"_resetDts",(function(){})),Ty(Dy(n),"_onCanplay",(function(){n._ready||(n._ready=!0,n.emit(MY.AUDIO_READY))})),Ty(Dy(n),"_onPlaying",(function(){n._parent.ready&&(n._audioCanAutoplay=!0,n._emitTimelineEvents(YY.PLAY_EVENT,NY.PLAYING))})),Ty(Dy(n),"_onWaiting",(function(){if(!n._seekNoSideEffect){try{for(var e,t=n._media.buffered,r=n._media.currentTime,i=0,o=0,a=t.length;o<a;o++)t.start(o)<r&&t.end(o)>r&&(i=t.end(o)-r);if(Math.abs(i)>.5)return;if(Math.abs(n._media.duration-n._media.currentTime)<.3)return n._reuseMse||n._mse.endOfStream(),void(null===(e=Dy(n))||void 0===e||e._emitTimelineEvents(YY.PLAY_EVENT,NY.ENDED))}catch(E6){}n._ready=!1,n.emit(MY.AUDIO_WAITING)}})),Ty(Dy(n),"_onSeeked",(function(){n._seekNoSideEffect||n._isLive?n._seekNoSideEffect=!1:(fW.log(n.TAG,"seeked"),n._ready||(n._media.pause(),n._ready=!0,n.emit(MY.AUDIO_READY)))})),Ty(Dy(n),"_onProgress",(function(){if(n._media.readyState<=1){var e=n._getBufferGap();e>0&&e<1&&(n._media.currentTime+=e+z3,fW.warn(n.TAG,"progress, gap=",e))}n._emitTimelineEvents(YY.PLAY_EVENT,NY.PROGRESS),n._emitTimelineEvents(YY.PLAY_EVENT,NY.DURATION_CHANGE)})),Ty(Dy(n),"_onEnded",(function(){var e;fW.log(n.TAG,"ended!"),null===(e=Dy(n))||void 0===e||e._emitTimelineEvents(YY.PLAY_EVENT,NY.ENDED)})),Ty(Dy(n),"_onOnceProgress",(function(){if(n._media.buffered.length){var e=n._media.buffered.start(0);e&&(n._media.currentTime=e+z3,fW.log(n.TAG,"start gap:",e)),n._media.removeEventListener("progress",n._onOnceProgress)}})),Ty(Dy(n),"_onError",(function(){var e;n._emitTimelineEvents(YY.PLAY_EVENT,NY.ERROR,n._assembleErr("audio error: ".concat(null===(e=n._media.error)||void 0===e?void 0:e.message),3))})),Ty(Dy(n),"_appendChunk",(function(e,t){var r;if(!n.noAudio&&t.samples.length){if(n._codec||(2!==t.objectType&&5!==t.objectType?n._codec="mp4a.40.5":n._codec=t.codec,n._isTempMedia&&n._switchMedia(n._codec)),$l(r=t.samples).call(r,(function(e){e.baseMediaDecodeTime=t.baseMediaDecodeTime,n._sampleQueue.push(e)})),t.samples=[],!n._meta)return n._meta=my(my({},t),{},{exist:function(){return!0},hasSample:function(){return!0},samples:[]}),fW.warn(n.TAG,"audio set metadata",n._meta),void n._doAppendWrapper();var i,o;if(n._meta.sampleRate!==t.sampleRate)fW.warn(n.TAG,dg(i="discontinue: ".concat(n._meta.sampleRate," -> ")).call(i,t.sampleRate)),n._needInitSegment=!0,$l(o=kl(t)).call(o,(function(e){n._meta[e]=t[e]}));!n._inProcessing&&n._sampleQueue.length&&n._doAppendWrapper()}})),Ty(Dy(n),"_doAppend",function(){var e=_y(yy().mark((function e(t){var r,i,o;return yy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n._remuxer||(n._remuxer=new UJ({samples:[],exist:function(){return!1}},t)),r=t.samples,n._sourceCreated){e.next=12;break}return n.analyse.addAudioMseOpenStart(),e.next=6,n._mse.open();case 6:n._sourceCreated=!0,fW.log(n.TAG,"video/mp4;codecs=".concat(n._codec)),n._mse.createSource(t.type,"video/mp4;codecs=".concat(n._codec)),n.analyse.addAudioMseOpend(),fW.log(n.TAG,"sb created!"),n._checkAutoPlay();case 12:if(i=n._remuxer.remux(n._needInitSegment),!n._needInitSegment||i.audioInitSegment){e.next=15;break}return e.abrupt("return");case 15:return n._needInitSegment=!1,o=[],i.audioInitSegment&&o.push(n._mse.append(t.type,i.audioInitSegment)),i.audioSegment&&o.push(n._mse.append(t.type,i.audioSegment)),e.abrupt("return",Zp.all(o).then((function(){return r[r.length-1].dts/1e3})).then((function(){n._firstTimeAppendedBuffer||(n._firstTimeAppendedBuffer=!0,n.analyse.addAudioFirstTimeAppended())})));case 20:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),Ty(Dy(n),"_doPlay",(function(){n._media.play().catch((function(){}))})),Ty(Dy(n),"_doPause",(function(){n._media.pause()})),Ty(Dy(n),"_doSeek",(function(e){n._ready=!1,n._media.currentTime=e})),Ty(Dy(n),"_doChaseFrame",(function(e){var t=e.position;n._seekNoSideEffect=!0,n._media.currentTime=t})),Ty(Dy(n),"_startRender",(function(){fW.log(n.TAG,"start render"),n._startRendered=!0,n._media.play().catch((function(){}))})),n.TAG="AudioMseRender",n._reuseMse=JW().reuseMseForAudio,n._initMedia(),n}return ky(o,[{key:"isMse",get:function(){return!0}},{key:"media",get:function(){return this._media}},{key:"currentTime",get:function(){return this._media.currentTime}},{key:"buffered",get:function(){return this._media.buffered}},{key:"duration",get:function(){return Xg(this._media.duration)?1/0:this._media.duration},set:function(e){this._duration=e,this._updateDuration(e)}},{key:"audioCanAutoplay",get:function(){return this._audioCanAutoplay||this.noAudio}},{key:"_initMedia",value:function(){if(!this._reuseMse||!q3.hasCached)return fW.log(this.TAG,"init media and mse directly"),this._media=document.createElement("video"),this._media.autoplay=!0,this._mse=new J3,this._bindEvents(),this._bindMediaEvents(),void this._mse.bindMedia(this._media);fW.log(this.TAG,"bind media temporary"),this._media=q3.tempMedia,this._bindEvents(),this._isTempMedia=!0}},{key:"_switchMedia",value:function(e){var t=this._media,n=q3.getCachedMedia(K3[e]);n?(fW.warn(this.TAG,"switch to cached media for audio play! codec=".concat(e)),this._media=n.media,this._mse=n.mse,this._bindMediaEvents(),this._updateDuration(this._duration),this._media.currentTime=z3,this._sourceCreated=!0,this._audioCanAutoplay=!0,this.analyse.addAudioMseOpend()):this._initMedia(),this._media.volume=t.volume,this._media.playbackRate=t.playbackRate,this._isTempMedia=!1}},{key:"_getBufferGap",value:function(){for(var e=this.buffered,t=0,n=e.length;t<n;t++)if(!(e.end(t)<this.currentTime))return e.start(t)-this.currentTime;return 0}},{key:"canSeek",value:function(){return!0}},{key:"resume",value:function(){return this._media.play()}},{key:"pause",value:function(){return this._media.pause()}},{key:"seekNoSideEffect",value:function(e){this._doChaseFrame(e)}},{key:"dump",value:function(){}},{key:"_emitTimelineEvents",value:function(e,t,n){var r,i;null===(r=this._parent)||void 0===r||null===(i=r.emit)||void 0===i||i.call(r,e,t,n)}},{key:"_assembleErr",value:function(e,t){var n=new Error(e);return n.code=3,n.subCode=t,n}},{key:"_bindEvents",value:function(){var e=this;Cy(Sy(o.prototype),"_bindEvents",this).call(this),this._parent.on(XY.CHASE_AUDIO_FRAME,this._doChaseFrame),this._parent.on(YY.UPDATE_VOLUME,(function(t){e._media.volume=t,e._emitTimelineEvents(YY.PLAY_EVENT,NY.VOLUME_CHANGE)})),this._parent.on(YY.END_OF_STREAM,(function(){var t;e.reuseMseForAudio||(null===(t=e._mse)||void 0===t||t.endOfStream())})),this._parent.on(YY.SET_PLAYBACKRATE,(function(t){fW.log(e.TAG,"change playbackrate, ",t),e._media.playbackRate=t}))}},{key:"_bindMediaEvents",value:function(){this._media.addEventListener("canplay",this._onCanplay),this._media.addEventListener("playing",this._onPlaying),this._media.addEventListener("waiting",this._onWaiting),this._media.addEventListener("seeked",this._onSeeked),this._media.addEventListener("progress",this._onProgress),this._media.addEventListener("ended",this._onEnded),this._media.addEventListener("progress",this._onOnceProgress),this._media.addEventListener("error",this._onError)}},{key:"_updateDuration",value:(r=_y(yy().mark((function e(t){return yy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._mse){e.next=7;break}if(this._mse.isOpened){e.next=4;break}return e.next=4,this._mse.open();case 4:return e.next=6,this._mse.updateDuration(t);case 6:fW.log(this.TAG,"update duration",t);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"_doAppendWrapper",value:(n=_y(yy().mark((function e(){var t;return yy().wrap((function(e){for(var n;;)switch(e.prev=e.next){case 0:return this._meta.samples=hm(n=this._sampleQueue).call(n),this._meta.baseMediaDecodeTime=this._meta.samples[0].baseMediaDecodeTime,this._sampleQueue=[],e.prev=3,this._inProcessing=!0,e.next=7,this._doAppend(this._meta);case 7:if(t=e.sent,this.isLive&&this._emitTimelineEvents(YY.UPDATE_SEGMENT_END,t),this._inProcessing=!1,!this._sampleQueue.length){e.next=13;break}return e.next=13,this._doAppendWrapper();case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(3),this._emitTimelineEvents(YY.PLAY_EVENT,NY.ERROR,this._assembleErr("audio error: ".concat(null===e.t0||void 0===e.t0?void 0:e.t0.message),3));case 18:case"end":return e.stop()}}),e,this,[[3,15]])}))),function(){return n.apply(this,arguments)})},{key:"_checkAutoPlay",value:function(){var e=this;this._media.addEventListener("canplay",(function t(){var n=e._media.volume;e._media.volume=Math.min(n,.1);var r=e._media.play();(r=r.then?r:Zp.reject()).then((function(){fW.log(e.TAG,"auto play by checkAutoPlay!"),e._audioCanAutoplay=!0})).catch((function(){fW.warn(e.TAG,"can’t auto play!"),e._audioCanAutoplay=!1,e.emit(MY.AUDIO_NOT_ALLOWED_AUTOPLAY)})).finally((function(){e._media.volume=n,e._startRendered||(e._media.pause(),fW.log(e.TAG,"auto paused by checkAutoPlay!")),e._media.removeEventListener("canplay",t)}))}))}},{key:"_destroy",value:(t=_y(yy().mark((function e(){var t,n,r;return yy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(fW.log(this.TAG,"destroy audio render"),this._remuxer=null,this.removeAllListeners(),this._media.removeEventListener("canplay",this._onCanplay),this._media.removeEventListener("playing",this._onPlaying),this._media.removeEventListener("waiting",this._onWaiting),this._media.removeEventListener("seeked",this._onSeeked),this._media.removeEventListener("progress",this._onProgress),this._media.removeEventListener("ended",this._onEnded),this._media.removeEventListener("progress",this._onOnceProgress),this._media.removeEventListener("error",this._onError),this._reuseMse){e.next=17;break}return null===(t=this._mse)||void 0===t||t.endOfStream(),e.next=15,null===(n=this._mse)||void 0===n?void 0:n.unbindMedia();case 15:e.next=20;break;case 17:null===(r=this._mse)||void 0===r||r.clearAllBuffer(),q3.cacheMedia({codec:this._codec,media:this._media,mse:this._mse}),fW.log(this.TAG,"cache media for audio play, codec=",this._codec);case 20:this._meta&&(this._meta.duration=0),this._mse=null,this._media=null;case 23:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}],[{key:"isSupported",value:function(){return JW().audioWithMse&&!!window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="mp4a.40.5"')}}]),o}(QY),e9=function(){function e(t){by(this,e),this.TAG="VideoTimeRange",this._parent=t,this._baseDts=0,this._lastDuration=0,this._duration=0,this._bitrate=0,this._totalSize=0,this._buffers=[],this._currentFrameQueue=[],this._frameIndexInQueue=0,this._delayEstimateList=[],this._keyframeQueue=[]}return ky(e,[{key:"isLive",get:function(){return this._parent.isLive}},{key:"baseDts",get:function(){return this._baseDts}},{key:"duration",get:function(){return this._duration},set:function(e){this._duration=e}},{key:"buffered",get:function(){var e=this;if(this.isLive)return{length:this._duration?1:0,start:function(){return 0},end:function(){return e._duration}};var t=this._mergeBufferRanges();return{length:t.length,start:function(e){var n=t[e];return n?n.start:0},end:function(e){var n=t[e];return n?n.end:1/0}}}},{key:"bufferStart",get:function(){var e;return(null===(e=this._buffers[0])||void 0===e?void 0:e.start)||0}},{key:"frameLength",get:function(){return this._currentFrameQueue.length}},{key:"keyFrameLength",get:function(){return this._keyframeQueue.length}},{key:"totalSize",get:function(){return this._totalSize}},{key:"bitrate",get:function(){return this._bitrate},set:function(e){this._bitrate=e}},{key:"lastDuration",get:function(){return this._lastDuration}},{key:"frames",get:function(){return this._currentFrameQueue}},{key:"getCurrentTime",value:function(e){return this._lastDuration+(e-this._baseDts)/1e3}},{key:"resetDts",value:function(e){this._baseDts=e}},{key:"_mergeBufferRanges",value:function(){var e,t=VX(e=this._buffers).call(e,(function(e,t){return e.start>t.start?1:-1})),n=t.length,r=[];if(!n)return r;for(var i={start:t[0].start,end:t[0].end},o=1;o<n;o++){var a=t[o];Math.abs(i.end-a.start)<.1?i.end=a.end:(r.push(i),i={start:a.start,end:a.end})}return r.push(i),r}},{key:"_caclBaseDts",value:function(e){-1===this._baseDts&&e&&(this._baseDts=e.dts,fW.log(this.TAG,"set baseDts: ",this._baseDts,"frame len:",this._currentFrameQueue.length))}},{key:"_updateDuration",value:function(e){for(var t=e.length,n=e[t-1],r=0;r<t;r++){var i=e[r];if(i&&i.options&&i.options.meta){var o=e[r-1]||this._currentFrameQueue[this._currentFrameQueue.length-1];o?this._lastDuration+=(o.dts-this._baseDts)/1e3:this._lastDuration=this._duration,fW.log(this.TAG,"updateBaseDts,record lastDuration:",this._lastDuration),this._baseDts=i.dts;break}}n&&(this._duration=(n.dts-this._baseDts)/1e3+this._lastDuration)}},{key:"_estimateBitRate",value:function(e){var t=e.length;if(t<=2){var n;if(this._delayEstimateList=dg(n=this._delayEstimateList).call(n,e),(t=this._delayEstimateList.length)<=30)return;e=this._delayEstimateList,this._delayEstimateList=[]}for(var r=0,i=0;i<t;i++){var o,a=e[i];r+=a.data?a.data.length:TY(o=a.units).call(o,(function(e,t){return e+t.byteLength}),0)}this._totalSize+=r;var s=r/(e[t-1].dts-e[0].dts);this._bitrate=ug(8e3*s)}},{key:"_beforeAppendVodBuffer",value:function(e){var t=this;if(e.length){for(var n=[],r=[],i=0,o=e.length;i<o;i++)e[i].keyframe&&(n.push(r),r=[]),r.push(e[i]);r.length&&n.push(r),$l(n).call(n,(function(e){return t._appendVodBuffer(e)}))}}},{key:"_appendVodBuffer",value:function(e){var t,n;if(e.length){var r,i=e[0],o=e[e.length-1],a=(i.dts-this._baseDts)/1e3,s=(o.dts-this._baseDts)/1e3;if(fW.enable)fW.log(this.TAG,dg(r="add new buffer range [".concat(a," , ")).call(r,s,"]"));Vl(t=this._buffers).call(t,(function(e){return a>=e.start&&s<=e.end})).length||(this._buffers.push({start:a,end:s,duartion:s-a,frames:hm(e).call(e)}),VX(n=this._buffers).call(n,(function(e,t){return e.start>t.start?1:-1})),this._afterAppendVodBuffer())}}},{key:"_afterAppendVodBuffer",value:function(){var e;if(Vl(e=this._buffers).call(e,(function(e){var t;return!(null!==(t=e.frames[0])&&void 0!==t&&t.keyframe)})).length){for(var t=this._buffers,n=this._buffers.length,r=[],i=this._buffers[0],o=1;o<n;o++){var a,s;if(null!==(a=t[o].frames[0])&&void 0!==a&&a.keyframe)r.push(i),i=t[o];else i.frames=dg(s=i.frames).call(s,t[o].frames),i.end=t[o].end,i.duartion=i.end-i.start}r.push(i),this._buffers=r}}},{key:"_recordKeyframes",value:function(e){var t,n,r=this;($l(e).call(e,(function(e){if(e.keyframe){var t=(e.dts-r._baseDts)/1e3;r._keyframeQueue.push({position:t,frame:e})}})),this._keyframeQueue=VX(t=this._keyframeQueue).call(t,(function(e,t){return e.position>t.position?1:-1})),this.isLive&&this._keyframeQueue.length>40)&&PQ(n=this._keyframeQueue).call(n,0,20)}},{key:"toAnnexBNalu",value:function(e){$l(e).call(e,(function(e){var t=e.units;if(t){var n=TY(t).call(t,(function(e,t){return e+4+t.byteLength}),0),r=new Uint8Array(n),i=0;$l(t).call(t,(function(e){r.set([0,0,0,1],i),i+=4,r.set(e,i),i+=e.byteLength})),e.units=null,e.data=r}}))}},{key:"append",value:function(e,t,n){var r;(n&&this.toAnnexBNalu(e),this._caclBaseDts(e[0]),t&&this._updateDuration(e),this._estimateBitRate(e),this._recordKeyframes(e),this.isLive)?this._currentFrameQueue=dg(r=this._currentFrameQueue).call(r,e):this._beforeAppendVodBuffer(e)}},{key:"updateSegmentEnd",value:function(e){var t=this._buffers[this._buffers.length-1];t&&(Math.abs(t.end-e)<.5||(t.end=e,t.duartion=e-t.start,fW.log(this.TAG,"video data lack, reset end:",e)))}},{key:"getFrame",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.isLive)return this._currentFrameQueue.shift();if(!(e=this._currentFrameQueue[this._frameIndexInQueue])){if(!(e=this._currentFrameQueue[--this._frameIndexInQueue]))return;if(!this.switchBuffer((e.dts-this._baseDts)/1e3,this._frameIndexInQueue++,t))return;return this.getFrame(++t)}return this._frameIndexInQueue++,e}},{key:"getFramesForPreciseSeek",value:function(e){var t;return Vl(t=this._currentFrameQueue).call(t,(function(t){return t.dts<=e}))}},{key:"updateFrameIndexForPreciseSeek",value:function(e){this._frameIndexInQueue=e}},{key:"switchBuffer",value:function(e){var t,n,r,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!((arguments.length>2&&void 0!==arguments[2]?arguments[2]:0)>=20)){e=e||this.bufferStart;var a,s,u,c,l,h,A,d=Vl(t=this._buffers).call(t,(function(t){return t.start<e+.1&&t.end>=e+.1}))[0];if(!d){var f,v,p=$H(f=this._buffers).call(f,(function(t){return t.start>=e}));return p&&p.start-e<1?(this._currentFrameQueue=hm(v=p.frames).call(v,0),this._frameIndexInQueue=0,p):void 0}if(d.frames[0].dts>=e)return this._currentFrameQueue=hm(a=d.frames).call(a,0),this._frameIndexInQueue=0,fW.log(this.TAG,dg(s=dg(u="switch video buffer, time:".concat(e," , buffer:[")).call(u,d.start," , ")).call(s,d.end,"], index=0")),d;if(d.frames.length>o)return this._currentFrameQueue=hm(c=d.frames).call(c,0),fW.log(this.TAG,dg(l=dg(h=dg(A="switch video buffer, in the same gop and more frame got, time:".concat(e," , buffer:[")).call(A,d.start," , ")).call(h,d.end,"], index=")).call(l,o)),d;fW.log(this.TAG,dg(n=dg(r=dg(i="switch video buffer, in the same gop and no more frame got, time:".concat(e," , buffer:[")).call(i,d.start," , ")).call(r,d.end,"], index=")).call(n,o))}}},{key:"getSeekStartPosition",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if($l(t=this._keyframeQueue).call(t,(function(t){t.position<=e&&(n=t)})),n)return e-n.position<r?n:void 0}},{key:"nextFrame",value:function(){return this._currentFrameQueue[0]}},{key:"deletePassed",value:function(e){var t;this._currentFrameQueue=Vl(t=this._currentFrameQueue).call(t,(function(t){return t.dts>=e}))}},{key:"getDtsOfTime",value:function(e){var t=e-this._lastDuration;return this._baseDts+1e3*t}},{key:"clean",value:function(){this._currentFrameQueue=[]}},{key:"destroy",value:function(){this._currentFrameQueue=[],this._buffers=[]}}]),e}();function t9(e){var t;(null===(t=e.buffer)||void 0===t?void 0:t.close)&&e.buffer.close()}var n9=function(){function e(t){by(this,e),this.TAG="FrameQueue",this._parent=t,this._lastGopId=0,this._frames=[]}return ky(e,[{key:"currentTimeDts",get:function(){return this._parent.preciseVideoDts}},{key:"length",get:function(){return this._frames.length}},{key:"frames",get:function(){return this._frames}},{key:"append",value:function(e){e.info?this._frames.push(e):t9(e)}},{key:"appendVodFrame",value:function(e){this._frames.push(e)}},{key:"nextFrame",value:function(){var e,t=this._frames.length;1===this._parent.noAudio&&t>3&&(this._frames=hm(e=this._frames).call(e,t-2));return this._frames[0]}},{key:"shift",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this._frames.shift();return this.deletePassed(e),t}},{key:"deletePassed",value:function(e){var t;this._frames=Vl(t=this._frames).call(t,(function(t){return!!(t.info&&t.info.dts>e)||(t9(t),!1)}))}},{key:"empty",value:function(){var e;$l(e=this._frames).call(e,(function(e){return t9(e)})),this._frames=[]}},{key:"destroy",value:function(){this.empty(),this._lastGopId=0}}]),e}();oN("Float32",(function(e){return function(t,n,r){return e(this,t,n,r)}}));var r9=new(function(){function e(){by(this,e),Ty(this,"_queue",[]),Ty(this,"TAG","FrameRenderCache")}return ky(e,[{key:"cacheCvs",value:function(e){this._queue.push(e),fW.log(this.TAG,"cache canvas!")}},{key:"getCachedCvs",value:function(){var e=this._queue.pop();return e&&fW.log(this.TAG,"get cached canvas!"),e}}]),e}()),i9=function(){function e(t,n){by(this,e),this.TAG="FrameRender",this.configs=CW({},t),this.parent=n,this.canvas=this.configs.canvas,this.canvas.glInstance=this,this.meta=CW({},this.configs.meta),this.frameRenderCache=r9,this._initMeta(),this._initContextGL(),this.contextGL&&(this._initProgram(),this._initBuffers(),this._initTextures())}return ky(e,[{key:"_initMeta",value:function(){this.chroma=this.meta.chromaFormat,this.height=this.meta.height,this.width=this.meta.width,this.canvas.width===this.meta.width&&this.canvas.height===this.meta.height||(this.canvas.width=this.meta.width,this.canvas.height=this.meta.height,this.parent.emitResizeEvent())}},{key:"_initContextGL",value:function(){if("2d"!==this.configs.type){for(var e=this.canvas,t=null,n=["webgl","experimental-webgl","moz-webgl","webkit-3d"],r=0;!t&&r<n.length;){var i=n[r];try{t=e.getContext(i,this.configs.glCtxOptions),fW.log("FrameRender","use=",i,this.configs.glCtxOptions);break}catch(E6){t=null}t&&"function"==typeof t.getParameter||(t=null),++r}this.contextGL=t}else this.ctx=this.canvas.getContext("2d")}},{key:"_initProgram",value:function(){var e=this.contextGL,t=["attribute vec4 vertexPos;","attribute vec4 texturePos;","attribute vec4 uTexturePos;","attribute vec4 vTexturePos;","varying vec2 textureCoord;","varying vec2 uTextureCoord;","varying vec2 vTextureCoord;","void main()","{"," gl_Position = vertexPos;"," textureCoord = texturePos.xy;"," uTextureCoord = uTexturePos.xy;"," vTextureCoord = vTexturePos.xy;","}"].join("\n"),n=["precision highp float;","varying highp vec2 textureCoord;","varying highp vec2 uTextureCoord;","varying highp vec2 vTextureCoord;","uniform sampler2D ySampler;","uniform sampler2D uSampler;","uniform sampler2D vSampler;","uniform mat4 YUV2RGB;","void main(void) {"," highp float y = texture2D(ySampler, textureCoord).r;"," highp float u = texture2D(uSampler, uTextureCoord).r;"," highp float v = texture2D(vSampler, vTextureCoord).r;"," gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;","}"].join("\n"),r=e.createShader(e.VERTEX_SHADER);e.shaderSource(r,t),e.compileShader(r),e.getShaderParameter(r,e.COMPILE_STATUS)||console.log("Vertex shader failed to compile: "+e.getShaderInfoLog(r));var i=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(i,n),e.compileShader(i),e.getShaderParameter(i,e.COMPILE_STATUS)||console.log("Fragment shader failed to compile: "+e.getShaderInfoLog(i));var o=e.createProgram();e.attachShader(o,r),e.attachShader(o,i),e.linkProgram(o),e.getProgramParameter(o,e.LINK_STATUS)||console.log("Program failed to compile: "+e.getProgramInfoLog(o)),e.useProgram(o);var a=e.getUniformLocation(o,"YUV2RGB");e.uniformMatrix4fv(a,!1,[1.16438,0,1.59603,-.87079,1.16438,-.39176,-.81297,.52959,1.16438,2.01723,0,-1.08139,0,0,0,1]),this.shaderProgram=o}},{key:"_initBuffers",value:function(){var e=this.contextGL,t=this.shaderProgram,n=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,n),e.bufferData(e.ARRAY_BUFFER,new Float32Array([1,1,-1,1,1,-1,-1,-1]),e.STATIC_DRAW);var r=e.getAttribLocation(t,"vertexPos");e.enableVertexAttribArray(r),e.vertexAttribPointer(r,2,e.FLOAT,!1,0,0);var i=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,i),e.bufferData(e.ARRAY_BUFFER,new Float32Array([1,0,0,0,1,1,0,1]),e.STATIC_DRAW);var o=e.getAttribLocation(t,"texturePos");e.enableVertexAttribArray(o),e.vertexAttribPointer(o,2,e.FLOAT,!1,0,0),this.texturePosBuffer=i;var a=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,a),e.bufferData(e.ARRAY_BUFFER,new Float32Array([1,0,0,0,1,1,0,1]),e.STATIC_DRAW);var s=e.getAttribLocation(t,"uTexturePos");e.enableVertexAttribArray(s),e.vertexAttribPointer(s,2,e.FLOAT,!1,0,0),this.uTexturePosBuffer=a;var u=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,u),e.bufferData(e.ARRAY_BUFFER,new Float32Array([1,0,0,0,1,1,0,1]),e.STATIC_DRAW);var c=e.getAttribLocation(t,"vTexturePos");e.enableVertexAttribArray(c),e.vertexAttribPointer(c,2,e.FLOAT,!1,0,0),this.vTexturePosBuffer=u}},{key:"_initTextures",value:function(){var e=this.contextGL,t=this.shaderProgram,n=this._initTexture(),r=e.getUniformLocation(t,"ySampler");e.uniform1i(r,0),this.yTextureRef=n;var i=this._initTexture(),o=e.getUniformLocation(t,"uSampler");e.uniform1i(o,1),this.uTextureRef=i;var a=this._initTexture(),s=e.getUniformLocation(t,"vSampler");e.uniform1i(s,2),this.vTextureRef=a,e.pixelStorei(e.UNPACK_ALIGNMENT,1)}},{key:"_initTexture",value:function(){var e=this.contextGL,t=e.createTexture();return e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),t}},{key:"_drawPictureGL",value:function(e,t,n,r,i){var o=r*n,a=i*n/2;444!==this.chroma&&422!==this.chroma||(a*=2);var s={yData:(e=new Uint8Array(e)).subarray(0,o),uData:e.subarray(o,o+a),vData:e.subarray(o+a,o+a+a)};this._drawPictureGL420(s,t,n,r,i)}},{key:"_drawPictureGL420",value:function(e,t,n,r,i){var o=this.contextGL,a=this.texturePosBuffer,s=this.uTexturePosBuffer,u=this.vTexturePosBuffer,c=this.yTextureRef,l=this.uTextureRef,h=this.vTextureRef,A=e.yData,d=e.uData,f=e.vData,v=r,p=n,m=i,y=n/2;422!==this.chroma&&444!==this.chroma||(y=n);var g=i,_=y,b=this.canvas.width/this.width,E=this.canvas.height/this.height,k=0,T=0,R=this.canvas.width,S=this.canvas.height;b<E?(S=this.height*this.canvas.width/this.width,T=ug((this.canvas.height-this.height*this.canvas.width/this.width)/2)):(R=this.width*this.canvas.height/this.height,k=ug((this.canvas.width-this.width*this.canvas.height/this.height)/2)),o.viewport(k,T,R,S);var w=new Float32Array([1,0,0,0,1,1,0,1]);o.bindBuffer(o.ARRAY_BUFFER,a),o.bufferData(o.ARRAY_BUFFER,w,o.DYNAMIC_DRAW);var D=new Float32Array([1,0,0,0,1,1,0,1]);o.bindBuffer(o.ARRAY_BUFFER,s),o.bufferData(o.ARRAY_BUFFER,D,o.DYNAMIC_DRAW);var I=new Float32Array([1,0,0,0,1,1,0,1]);o.bindBuffer(o.ARRAY_BUFFER,u),o.bufferData(o.ARRAY_BUFFER,I,o.DYNAMIC_DRAW),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,c),o.texImage2D(o.TEXTURE_2D,0,o.LUMINANCE,v,p,0,o.LUMINANCE,o.UNSIGNED_BYTE,A),o.activeTexture(o.TEXTURE1),o.bindTexture(o.TEXTURE_2D,l),o.texImage2D(o.TEXTURE_2D,0,o.LUMINANCE,m,y,0,o.LUMINANCE,o.UNSIGNED_BYTE,d),o.activeTexture(o.TEXTURE2),o.bindTexture(o.TEXTURE_2D,h),o.texImage2D(o.TEXTURE_2D,0,o.LUMINANCE,g,_,0,o.LUMINANCE,o.UNSIGNED_BYTE,f),o.drawArrays(o.TRIANGLE_STRIP,0,4)}},{key:"_drawPicture2d",value:function(e){if(e&&this.canvas){this.ctx||(this.ctx=this.canvas.getContext("2d"));var t=e.displayWidth||e.width,n=e.displayHeight||e.height;this.canvas.height===n&&this.canvas.width===t||(this.canvas.height=n,this.canvas.width=t);try{this.ctx.drawImage(e.dom||e,0,0,t,n)}catch(b6){console.error(this.TAG,"_drawPicture2d",e,e.dom,b6,b6.message)}}}},{key:"_resize",value:function(e,t){this.width===e&&this.height===t||(this.width=e,this.height=t,this.canvas.width=e,this.canvas.height=t,this.parent.emitResizeEvent())}},{key:"render",value:function(e,t,n,r,i){this._resize(t,n),this.contextGL?this._drawPictureGL(e,t,n,r,i):this._drawPicture2d(e)}},{key:"resetMeta",value:function(e){this.meta=CW({},e)}},{key:"updateBind",value:function(e,t){this.parent=e,this.resetMeta(t)}},{key:"destroy",value:function(e){this.parent=null,this.canvas.style.display="none",e&&(this.contextGL&&this.contextGL.clear(this.contextGL.DEPTH_BUFFER_BIT|this.contextGL.COLOR_BUFFER_BIT),r9.cacheCvs(this.canvas))}}]),e}(),o9=function(){function e(t){by(this,e),Ty(this,"_lowDecodeThreshold",JW().lowDecodeThreshold/5),this.TAG="DecodeEstimate",this._needEstimate=!0,this._parent=t,this._lastDecodeDot=0,this._lastDecodeCost=0,this._lastFrameDts=0,this._dtsDeltas=[],this._decodeCosts=[],this._lowDecodeQueue=[],this._fps=0,this._decodeFps=0,this._gopLength=0,this._webcodec=!1}return ky(e,[{key:"fps",get:function(){return this._fps}},{key:"decodeFps",get:function(){return this._decodeFps}},{key:"decodeCost",get:function(){return this._lastDecodeCost}},{key:"gopLength",get:function(){return this._gopLength}},{key:"webcodec",set:function(e){this._webcodec=e}},{key:"updateGopCount",value:function(){this._gopLength++}},{key:"needEstimateFps",value:function(){this._needEstimate=!0}},{key:"addDecodeInfo",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{dts:0};this._estimateDecodeFps(e),this._estimateFps(e)}},{key:"resetDecodeDot",value:function(e){this._lastDecodeDot=e||0}},{key:"reset",value:function(){this._decodeCosts=[],this._lowDecodeQueue=[]}},{key:"_estimateFps",value:function(e){if(this._needEstimate)if(this._lastFrameDts){var t=e.dts-this._lastFrameDts;if(this._lastFrameDts=e.dts,!(Math.abs(t)>200)){this._dtsDeltas.push(t);var n=this._dtsDeltas.length;n<5||(this._fps=Math.ceil(1e3/this._avg(this._dtsDeltas,n)),fW.log(this.TAG,"estimate fps:",this._fps),this._needEstimate=!1)}}else this._lastFrameDts=e.dts}},{key:"_estimateDecodeFps",value:function(e){if(this._lastDecodeDot){var t=performance.now(),n=t-this._lastDecodeDot;this._lastDecodeDot=t,e.cost=n,this._lastDecodeCost=n,this._decodeCosts.push(n);var r=this._decodeCosts.length;if(!(r<5)){var i=this._avg(this._decodeCosts,r);this._decodeFps=Math.floor(1e3/i),this._decodeCosts=[],this._lowDecodeDetect()}}else this._lastDecodeDot=performance.now()}},{key:"_avg",value:function(e,t){var n=TY(e).call(e,(function(e,t){return e+=t}),0);return Math.floor(n/t)||1}},{key:"_lowDecodeDetect",value:function(){this._decodeFps?(this._decodeFps<this._fps*this._parent.playbackRate+(this.webcodec?0:3)?this._lowDecodeQueue.push(this._decodeFps):this._lowDecodeQueue.pop(),this._lowDecodeQueue.length>this._lowDecodeThreshold&&(this._lowDecodeQueue=[],fW.log(this.TAG,"解码效率过低,应该降级"),this._parent.emit(WY.DECODE_LOW_FPS))):this._parent.emit(WY.DECODE_LOW_FPS)}}]),e}(),a9=[],s9=function(){function e(t){var n=this;by(this,e),Ty(this,"_doTask",(function(){var e;null===(e=n._task)||void 0===e||e.call(n)})),this._task=t;var r=new Blob(["\n var timer;\n\n function initTimer (interval) {\n destroy()\n clearInterval(timer);\n timer = setInterval(() => {\n self.postMessage({type: 'NEXT_TICK'});\n }, interval)\n }\n\n function destroy () {\n clearInterval(timer);\n }\n\n self.onmessage = function (e) {\n var {type,interval} = e.data;\n switch (type) {\n case 'START':\n initTimer(interval);\n break;\n case 'DESTROY':\n destroy();\n break;\n }\n }\n"],{type:"application/javascript"});this._worker=a9.pop()||new Worker(p$.createObjectURL(r)),this._bindEvent()}return ky(e,[{key:"_bindEvent",value:function(){this._worker.addEventListener("message",this._doTask)}},{key:"start",value:function(e){(e=ug(e))<10&&(e=10),e>60?e=60:e>25&&(e=25),this._worker.postMessage({type:"START",interval:e})}},{key:"stop",value:function(){this._worker.postMessage({type:"DESTROY"})}},{key:"destroy",value:function(){this._worker&&(this._worker.postMessage({type:"DESTROY"}),this._worker.removeEventListener("message",this._doTask),a9.push(this._worker),fW.log("TickTimer","unbind timer event"),this._worker=null,this._task=null)}}]),e}(),u9=function(e){Ry(n,e);var t=Iy(n);function n(e,r){var i,o;return by(this,n),(o=t.call(this,e,r))._timeRange=new e9(Dy(o)),o._decodeEstimate=new o9(Dy(o)),o._frameQueue=new n9(Dy(o)),o._lastTimeupdate=0,o._renderCost=0,o._canAutoPlay=!0,o._videoDecode=!1,o._inSeeking=!1,o._frameRender=null,o._configuration=null,o._render=Dm(i=o._render).call(i,Dy(o)),o._tickTimer=new s9(o._render),o._initCanvas(e),o._bindEvents(),o}return ky(n,[{key:"canAutoPlay",get:function(){return this._canAutoPlay}},{key:"canvas",get:function(){return this._canvas}},{key:"timescale",get:function(){return 1e3}},{key:"fps",get:function(){return this._decodeEstimate.fps||this._meta&&this._meta.fpsNum/this._meta.fpsDen||24}},{key:"decodeFps",get:function(){return this._decodeEstimate.decodeFps}},{key:"decodeCost",get:function(){return this._decodeEstimate.decodeCost}},{key:"renderCost",get:function(){return this._renderCost}},{key:"totalSize",get:function(){return this._timeRange.totalSize}},{key:"bitrate",get:function(){return this._timeRange.bitrate},set:function(e){this._timeRange.bitrate=e}},{key:"gopLength",get:function(){return this._decodeEstimate.gopLength}},{key:"is540p",get:function(){return this._canvas.height<720}},{key:"buffered",get:function(){return this._timeRange.buffered}},{key:"inSeeking",get:function(){return this._inSeeking}},{key:"interval",get:function(){return Math.floor(1e3/this.fps/this.playbackRate)}},{key:"playbackRate",get:function(){return this._playbackRate||1}},{key:"baseDts",get:function(){return this._timeRange.baseDts}},{key:"currentTime",get:function(){return this._timeRange.getCurrentTime(this.preciseVideoDts)}},{key:"timelinePosition",get:function(){return this._parent.timelinePosition}},{key:"lastTimelinePosition",get:function(){return this._lastTimelinePosition||0},set:function(e){this._lastTimelinePosition=e}},{key:"audioSyncDts",get:function(){return this._audioDts||this.baseDts},set:function(e){this._audioDts=e}},{key:"preciseVideoDts",get:function(){return this.audioSyncDts+Math.floor(1e3*(this.timelinePosition-this.lastTimelinePosition))}},{key:"readyState",get:function(){var e=this._frameQueue.length||(this.currentTime?1:0);return e?e>=8?4:e>=4?3:e>=2?2:1:0}},{key:"isHevc",get:function(){return!("hev1.1.6.L93.B0"!==(this._meta||{}).codec)}},{key:"videoDecode",get:function(){return this._videoDecode}},{key:"decoderMode",get:function(){var e;return null===(e=this._decodeController)||void 0===e?void 0:e.decoderMode}},{key:"configuration",get:function(){var e,t;return this._configuration||(this._configuration=this._meta.configuration||vW(null===(e=this._meta)||void 0===e?void 0:e.sps[0],null===(t=this._meta)||void 0===t?void 0:t.pps[0])),this._configuration},set:function(e){this._configuration=e.configuration||vW(e.sps[0],e.pps[0])}},{key:"setSeekingStatus",value:function(e){this._inSeeking=e}},{key:"getDtsOfTime",value:function(e){return this._timeRange.getDtsOfTime(e)}},{key:"updateReady",value:function(){this._whenReady()}},{key:"forceRender",value:function(){this._render(!0)}},{key:"getSeekStartPosition",value:function(e,t){return this._timeRange.getSeekStartPosition(e,t)}},{key:"canSeek",value:function(){throw new Error("need override by children")}},{key:"emitResizeEvent",value:function(){null==this||this._emitTimelineEvents(YY.PLAY_EVENT,NY.RESIZE)}},{key:"_assembleErr",value:function(e,t){var n=new Error(e);return n.code=3,n.subCode=t,n}},{key:"_emitTimelineEvents",value:function(e,t,n){var r;null===(r=this._parent)||void 0===r||r.emit(e,t,n)}},{key:"_initCanvas",value:function(e){e.canvas?this._canvas=e.canvas:this._canvas=r9.getCachedCvs()||document.createElement("canvas"),this._canvas.style.margin="auto",this._canvas.style.position="absolute",this._canvas.style.pointerEvents="none"}},{key:"_bindEvents",value:function(){var e,t,r=this;Cy(Sy(n.prototype),"_bindEvents",this).call(this);var i=function(e){var t,n,i,o,a,s,u,c,l=e.width,h=e.height,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,f=r._canvas,v=f.width,p=f.height,m=h*v/p,y=l*p/v,g=l-m,_=h-y,b=g*A+"px",E=_*d+"px";r._canvas.style.left=b,r._canvas.style.top=E,fW.warn(r.TAG,dg(t=dg(n=dg(i="cvsWidth=".concat(v,", cvsHeight=")).call(i,p,", scaleCvsWidth=")).call(n,m,", scaleCvsHeight=")).call(t,y)),fW.warn(r.TAG,dg(o=dg(a=dg(s=dg(u=dg(c="cover position: deltaX=".concat(g,", deltaY=")).call(c,_,", width=")).call(u,l,", height=")).call(s,h,", pX=")).call(a,b,", pY=")).call(o,E))};this._parent.on(WY.UPDATE_VIDEO_FILLTYPE,(function(e,t){var n=t.width,o=t.height,a=r._canvas,s=a.width,u=a.height,c=!n||n/o>s/u;if(fW.warn(r.TAG,"UPDATE_VIDEO_FILLTYPE isGapX =",c,"type =",e,s,u,n,o),r._canvas.style.maxWidth="initial",r._canvas.style.maxHeight="initial","cover"===e)return c?(r._canvas.style.left=0,r._canvas.style.top=0,r._canvas.style.height="auto",r._canvas.style.width="100%",void i({width:n,height:o},0,.5)):(r._canvas.style.left=0,r._canvas.style.top=0,r._canvas.style.width="auto",r._canvas.style.height="100%",void i({width:n,height:o},.5,0));if("fill"===e)return r._canvas.style.width="100%",void(r._canvas.style.height="100%");(r._canvas.style.top=0,r._canvas.style.bottom=0,r._canvas.style.left=0,r._canvas.style.right=0,r._canvas.style.maxWidth="100%",r._canvas.style.maxHeight="100%",r._canvas.style.width="initial",r._canvas.style.height="initial",s<n&&u<o)&&(s/n>u/o?r._canvas.style.width="100%":r._canvas.style.height="100%")})),this._parent.on(WY.UPDATE_VIDEO_COVER_POSITION,i),this._parent.on(YY.SYNC_DTS,(function(e){var t,n=r._frameQueue.nextFrame(),i=n&&n.info&&n.info.dts;if(r.lastTimelinePosition=r.timelinePosition,r.noAudio){var o=r._timeRange.nextFrame();e=e||i||o&&o.dts||0}if(r.audioSyncDts=e,i&&i-e>500&&r._emitTimelineEvents(YY.PLAY_EVENT,NY.LARGE_AV_GAP,{aDts:e,vDts:i,frameLength:r._frameQueue.length,currentTime:r._parent.currentTime,duration:r._parent.duration}),fW.log(r.TAG,"audio current buffer play finish, next buffer dts=",e,"currentTime:",r._parent.currentTime,"preciseVideoDts:",r.preciseVideoDts,"next video frame dts:",i,"frame length:",r._frameQueue.length),!(r._isLive||null!==(t=r._parent)&&void 0!==t&&t.seeking)){var a=r._timeRange.nextFrame();if(a){var s=(a.dts-a.baseDts)/1e3;r._parent.currentTime-s>1&&(fW.warn(r.TAG,"丢帧!"),r.ajustSeekTime(r._parent.currentTime))}}})),this._parent.on(YY.UPDATE_GL_OPTIONS,(function(e){r._config.glCtxOptions=e})),this._parent.on(YY.UPDATE_SEGMENT_END,Dm(e=this._updateSegmentEnd).call(e,this)),this.on(WY.AUTO_RUN,Dm(t=this._startRender).call(t,this)),this._parent.on(YY.SET_PLAYBACKRATE,(function(e){r._playbackRate=e,r._startRender()}))}},{key:"ajustSeekTime",value:function(){throw new Error("need override by children")}},{key:"_resetDts",value:function(e,t){"audio"!==t&&this._timeRange.resetDts(e)}},{key:"_setMetadata",value:function(e,t){if("audio"!==e){fW.warn(this.TAG,"video set metadata"),this._meta=t;var n=t&&t.frameRate&&t.frameRate.fps;n?fW.log(this.TAG,"detect fps:",n):fW.warn(this.TAG,"no detect fps,start estimate"),this._initDecoder()}}},{key:"_initDecoder",value:function(){throw new Error("need override by children")}},{key:"_whenDecoderReady",value:function(){throw new Error("need override by children")}},{key:"_appendChunk",value:function(){throw new Error("need override by children")}},{key:"_startDecode",value:function(){throw new Error("need override by children")}},{key:"_receiveFrame",value:function(e,t){if(this._parent&&this._timeRange){var n=e.info||{};if(this._decodeEstimate.addDecodeInfo(n),!this._isLive&&((n.output||n.keyframe)&&(this.setSeekingStatus(!1),fW.warn(this.TAG,"set seeking status=",!1)),this.inSeeking))return fW.log(this.TAG,"drop frame"),void t9(e);this._isLive?this._frameQueue.append(e):this._frameQueue.appendVodFrame(e),t&&t(),this._ready||this.readyState>=1&&this._whenReady()}}},{key:"_startRender",value:function(){fW.log(this.TAG,"start render"),this._tickTimer.start(this.interval)}},{key:"_render",value:function(){throw new Error("need override by children")}},{key:"_updateSegmentEnd",value:function(){throw new Error("need override by children")}},{key:"_whenReady",value:function(){this._ready=!0,this.emit(WY.VIDEO_READY),this.noAudio&&this._emitTimelineEvents(YY.PLAY_EVENT,NY.PLAYING)}},{key:"_doPlay",value:function(){this._tickTimer.start()}},{key:"_doPause",value:function(){this._tickTimer.stop()}},{key:"_doSeek",value:function(){this._ready=!1,this._frameQueue.destroy()}},{key:"_doChaseFrame",value:function(){throw new Error("need override by children")}},{key:"destroy",value:function(e){var t,n,r,i;null===(t=this._tickTimer)||void 0===t||t.destroy(),null===(n=this._timeRange)||void 0===n||n.destroy(),null===(r=this._frameQueue)||void 0===r||r.destroy(),null===(i=this._frameRender)||void 0===i||i.destroy(e),this._tickTimer=null,this._canvas=null,this._timeRange=null,this._frameQueue=null,this._frameRender=null,this._decodeEstimate=null,this._parent=null,this.removeAllListeners()}}]),n}(QY),c9=function(e){Ry(n,e);var t=Iy(n);function n(e){var r;return by(this,n),(r=t.call(this)).TAG="VideoDecoder",r._video=r._createVideo(),r._IsInDecoding=!1,r._fps=0,r._framId=null,r._screenShotNum=0,r._allPicNum=0,r._currentBlob=null,r._basePTS=0,r._totleTime=0,r._isVideoONRun=!0,r.firstEmit=!1,r.ptsArray=[],r._currentCanvasHeight=0,r._canvasList=[],r._realFrameDuration=25,r._maxVideoHeight=e.maxVideoHeight||720,r._minFPSTime=0,r._maxFPSTime=0,r._playFailed=!1,r._isPhoneSafari=!1,r._createCanvasList(),r._bindEvents(),r}return ky(n,[{key:"_createCanvasList",value:function(){this._canvas=document.createElement("canvas"),this._ctx=this._canvas.getContext("2d",{alpha:!1});for(var e=0;e<45;e++){var t=this._createCanvas(),n=t.dom,r=t.ctx;this._canvasList.push({dom:n,ctx:r})}}},{key:"_createCanvas",value:function(){var e=document.createElement("canvas"),t=e.getContext("2d");return{dom:e,ctx:t}}},{key:"_createVideo",value:function(){var e=document.createElement("video");return e.setAttribute("muted",!0),e.setAttribute("autoplay",!0),e.setAttribute("controls",!0),e.setAttribute("webkit-playsinline",!0),e.setAttribute("playsinline",!0),e.setAttribute("x5-video-player-type","h5"),e.setAttribute("x5-video-player-type","h5-page"),e.style.position="absolute",e}},{key:"_initVideo",value:function(e,t){if(e.blobUrl&&void 0!==e.dts){var n=e.blobUrl;this._currentBlob=n,this._basePTS=e.dts,this._currentDuration=e.duration;try{fW.log(this.TAG,"_initVideo, basePTS:",e.dts),this._setVideoSrc(n,t),this._video.paused&&this._videoPlay("_initVideo")}catch(E6){console.error(this.TAG,"_initVideo, load error",E6)}}else console.error(this.TAG,"_initVideo","input info is error, blobUrl:",e.blobUrl,"dts:",e.dts)}},{key:"_setVideoSrc",value:function(e,t){try{var n=this._video;n.src=e,n.load(),n.playbackRate=2}catch(E6){console.error(this.TAG,"_setVideoSrc",E6)}}},{key:"_videoPlay",value:function(e){var t=this,n=this._video;if(fW.log(this.TAG,"_videoPlay, video is pause:",n.paused,e),n&&n.paused){var r=n.play();void 0!==r&&r.then((function(){t._playFailed=!1,fW.log(t.TAG,"_videoPlay success")})).catch((function(e){console.error(t.TAG,"_videoPlay failed,",e.message),t._playFailed=!0,t.emit(XY.PLAY_FAILED,t.firstEmit)}))}}},{key:"_removeEvents",value:function(){var e,t,n,r,i,o=this._video;o.removeEventListener("playing",Dm(e=this._onPlaying).call(e,this)),o.removeEventListener("ended",Dm(t=this._onEnded).call(t,this)),o.removeEventListener("error",Dm(n=this._onError).call(n,this)),o.removeEventListener("loadeddata",Dm(r=this._onLoadeddata).call(r,this)),o.removeEventListener("timeupdate",Dm(i=this._onTimeUpdate).call(i,this))}},{key:"_bindEvents",value:function(){var e,t,n,r,i,o,a,s=this,u=this._video;u?(document.addEventListener("visibilitychange",Dm(e=this._onVisibilityChange).call(e,this)),u.addEventListener("playing",Dm(t=this._onPlaying).call(t,this)),u.addEventListener("ended",Dm(n=this._onEnded).call(n,this)),u.addEventListener("error",Dm(r=this._onError).call(r,this)),u.addEventListener("loadeddata",Dm(i=this._onLoadeddata).call(i,this)),u.addEventListener("timeupdate",Dm(o=this._onTimeUpdate).call(o,this)),u.addEventListener("pause",(function(){fW.log("on pause, currentTime, duration:",s._vCurrentTime,s._vDuration)})),this.on("outputresolutionchange",Dm(a=this._onChange).call(a,this)),this.on("fpsreduce",(function(e){s._adaptFrameDuration(e)}))):console.error(this.TAG,"_bindEvents")}},{key:"_onTimeUpdate",value:function(){this._lastCurrentTime=this._vCurrentTime}},{key:"_onVisibilityChange",value:function(){this._isVideoONRun="visible"===document.visibilityState}},{key:"_onChange",value:function(e,t){this._width=e,this._height=t}},{key:"_onPlaying",value:function(){this._IsInDecoding&&(console.warn(this.TAG,"_onPlaying","last video not correct end"),this._framId&&(window.cancelAnimationFrame(this._framId),this._framId=null)),fW.log(this.TAG,"_onPlaying, video duration:",this._vDuration,"currentTime:",this._vCurrentTime,"_lastPts:",this._lastPts),this._isInDecoding=!0,this._lastCurrentTime=this._vCurrentTime,this.ptsArray=[],this.playingTime||(this.playingTime=!0),this._getFrame()}},{key:"_onEnded",value:function(e,t){fW.log(this.TAG,"_onEnded","current fmp4 duration is:",this._vDuration,"_isInDecoding:",this._isInDecoding,"_lastPts:",this._lastPts,"_realFrameDuration:",this._realFrameDuration,"from:",t),this._isInDecoding&&(this._isInDecoding=!1,this._lastMp4Duration=Math.min(this._vDuration,this._vCurrentTime),this._framId&&(fW.log(this.TAG,"_onEnded","cancelAnimationFrame"),window.cancelAnimationFrame(this._framId),this._framId=null),this._decodeFPS=ug(this._screenShotNum/(this._vDuration/1e3)),this.emit("fps",this._screenShotNum,this._totleTime,this._vDuration,this._metaFPS,{height:this._currentCanvasHeight,relHeight:this._video.videoHeight}),fW.log("_timePerFrame",this._totleTime/this._screenShotNum),this._timePerFrame=this._totleTime/this._screenShotNum,this._screenShotNum=0,this._allPicNum=0,this._totleTime=0,this._currentBlob&&(p$.revokeObjectURL(this._currentBlob),this._currentBlob=null,this._basePTS=0),this.emit(XY.FRAGMENT_END,this._decodeFPS,this._video.duration))}},{key:"_onError",value:function(){this._isInDecoding=!1;var e=this._video;console.error("video error:",e.error.code,e.error.message),this.emit("error",e.error,this.firstEmit)}},{key:"_onLoadeddata",value:function(){var e=this,t=this._video;t.currentTime=.001,this.firstEmit||(this._playFailed?(t.style.visibility="hidden",this.emit(XY.APPEND_VIDEO,t),Lg((function(){fW.log(e.TAG,"onloadeddata, setTimeout firstEmit:",e.firstEmit),e._getFirstFrame()}),40)):(fW.log(this.TAG,"onloadeddata, firstEmit:",this.firstEmit),this._getFirstFrame()))}},{key:"_getFirstFrame",value:function(){this.firstTime=kG();var e=this._vCurrentTime,t=this._basePTS+e,n=this._getImageData(t).imageData;this.firstEmit=!0,this.emit(XY.FIRST_FRAME,n,t)}},{key:"_getFrame",value:function(){var e,t=this._video,n=t.videoWidth,r=t.videoHeight;if(this._allPicNum++,this._isInDecoding){if(n||r){var i,o,a,s=this._vCurrentTime,u=this._basePTS+s;if(this.ptsArray.push(u),this._lastCurrentTime&&this._lastCurrentTime===this._vDuration&&(fW.log(this.TAG,"_getFrame, video ended, lastCurrentTime",this._lastCurrentTime,"duration:",this._vDuration,"isInDecoding:",this._isInDecoding),this._onEnded(null,"getFrame")),this._lastPts)if(u<=this._lastPts)return void(this._framId=window.requestAnimationFrame(Dm(o=this._getFrame).call(o,this)));if(this._lastPts&&u-this._lastPts<this._realFrameDuration)return void(this._framId=window.requestAnimationFrame(Dm(a=this._getFrame).call(a,this)));this._screenShotNum++;var c,l=null,h=kG();try{l=(c=this._getImageData(u)).imageData}catch(E6){console.error(E6,c,this._canvasList.length)}this._lastPts=u;var A=kG()-h;return this._totleTime+=A,this.emit(XY.DECODED,l,u),void(this._framId=window.requestAnimationFrame(Dm(i=this._getFrame).call(i,this)))}this._framId=window.requestAnimationFrame(Dm(e=this._getFrame).call(e,this))}else this._framId&&(window.cancelAnimationFrame(this._framId),this._framId=null)}},{key:"_getImageData",value:function(){var e,t=this._video,n=t.videoWidth,r=t.videoHeight,i=n,o=r;this._width&&this._height&&(i=this._width,o=this._height),o>this._maxVideoHeight&&(o=this._maxVideoHeight,i=ug(o*(n/r))),(e=this._canvasList.shift())||(console.warn(this.TAG,"_getImageData, _canvansList length is 0"),e=this._createCanvas()),e.width=i,e.height=o;var a=e.dom,s=e.ctx;if(this._currentCanvasHeight=o,!a)return{imageData:e};a.width!==i&&(a.width=i,a.height=o);try{r&&n&&i&&o&&s.drawImage(t,0,0,n,r,0,0,i,o)}catch(E6){console.error(this.TAG,"_getImageData, drawImage:",E6)}return{imageData:e}}},{key:"_adaptFrameDuration",value:function(e){e<15?this._minFPSTime++:this._minFPSTime=0,e>30?this._maxFPSTime++:this._maxFPSTime=0,this._minFPSTime>0&&this._decodeFPS<15&&(this._realFrameDuration-=this._timePerFrame,this._realFrameDuration<15&&(this._realFrameDuration=15),this._minFPSTime=0),this._maxFPSTime>0&&this._decodeFPS>30&&(this._realFrameDuration+=this._timePerFrame,this._maxFPSTime=0)}},{key:"_vDuration",get:function(){return ug(1e3*this._video.duration)}},{key:"_vCurrentTime",get:function(){return ug(1e3*this._video.currentTime)}},{key:"_reset",value:function(){this._isInDecoding=!1,this._lastPts=0,this._screenShotNum=0,this._allPicNum=0,this._totleTime=0}},{key:"reStartDecode",value:function(){this._video.pause(),this._reset();var e=this._currentBlob,t=this._basePTS;this._framId&&(window.cancelAnimationFrame(this._framId),this._framId=null),this._initVideo({blobUrl:e,dts:t})}},{key:"doSeek",value:function(e){if(this._isInDecoding){if(e<=0)return;var t=this._vCurrentTime/1e3+e>=this._vDuration/1e3?this._vDuration/1e3:this._vCurrentTime/1e3+1;console.error("doSeek",t),this._video.currentTime=t}}},{key:"pause",value:function(){this._isInDecoding&&this._video.pause()}},{key:"play",value:function(){if(this._isInDecoding&&this._video.paused)return fW.log("video play",this._vCurrentTime),this._video.play()}},{key:"startDecode",value:function(e,t,n){this._initVideo(e,n),this._metaFPS=t}},{key:"stopDecode",value:function(){this._video.paused||(this._video.pause(),this._reset())}},{key:"canPlayType",value:function(e){return this._video.canPlayType(e)}},{key:"destroy",value:function(){this._isInDecoding=!1,window.cancelAnimationFrame(this._framId),this._video.pause(),this._removeEvents()}},{key:"videoWidth",get:function(){return this._video?this._video.videoWidth:0}},{key:"videoHeight",get:function(){return this._video?this._video.videoHeight:0}}]),n}(lY),l9=[{base:720,level:1},{base:540,level:2},{base:360,level:3},{base:280,level:4}],h9=function(e){Ry(n,e);var t=Iy(n);function n(e,r){var i,o;return by(this,n),(o=t.call(this)).TAG="VideoDecoderController",o._decoder=new c9(e),o._remux=new NJ,o._bindEvents(),o._isInit=!1,o._isDataReady=!1,o._ready=!1,o._blobURLList=[],o._isInDecoding=!1,o._mediaSegmentReady=!1,o._parent=r,o._isDecodePause=!1,o._playSuccess=!0,o._isVideoOnRun=!0,o._startDts=0,o._fDuration=0,o._minFPSTime=0,o._lastPts=0,o._frameLengthPerFragment=0,o._gopBufferLength=0,o._maxGopDuration=0,o._minGopDuration=0,o._currentLevel=-1,o._endLevel=e.endLevel||2,o.currentFragmentDuration=0,o._handleKeyFrameVideo=Dm(i=o._handleKeyFrameVideo).call(i,Dy(o)),o}return ky(n,[{key:"_bindEvents",value:function(){var e,t,n,r,i,o,a,s=this;document.addEventListener("visibilitychange",Dm(e=this._onVisibilityChange).call(e,this)),this._decoder.on(XY.APPEND_VIDEO,Dm(t=this._onAppendVideo).call(t,this)),this._decoder.on(XY.PLAY_FAILED,Dm(n=this._onPlayFailed).call(n,this)),this._decoder.on("error",Dm(r=this._onError).call(r,this)),this._decoder.on(XY.DECODED,Dm(i=this._onDecoded).call(i,this)),this._decoder.on(XY.FIRST_FRAME,Dm(o=this._onFirstFrame).call(o,this)),this._decoder.on(XY.FRAGMENT_END,Dm(a=this._onFragmentEnd).call(a,this)),this._decoder.on("fps",(function(){for(var e,t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=dg(e=[s._metaFPS]).call(e,r,[s._frameLengthPerFragment]);s.emit.apply(s,dg(t=["fps"]).call(t,Vy(o)))})),this.on("keyFrame",this._handleKeyFrameVideo)}},{key:"_onRemuxed",value:function(e){var t={blobUrl:this._createBlobURL(e),dts:this.currentFragmentDts,duration:this.currentFragmentDuration,frameDuration:Math.floor(1e3/this._metaFPS)};this._recordGopDuration(this.currentFragmentDuration),this._pushBlob(t),fW.log(this.TAG,"_onRemuxed","maxgopduration:",this._maxGopDuration,"_gopBufferLength:",this._gopBufferLength),!this._isDataReady&&this._gopBufferLength>=this._maxGopDuration&&this._checkDataReady()}},{key:"_onPlayFailed",value:function(e){this._isInDecoding=!1,this._parent.emit(XY.PLAY_FAILED,e)}},{key:"_onAppendVideo",value:function(e){this._parent.emit(XY.APPEND_VIDEO,e)}},{key:"_onVisibilityChange",value:function(){this._isVideoOnRun="visible"===document.visibilityState}},{key:"_onDecoded",value:function(e,t){this._frameLengthPerFragment++;var n=this._buildFrameInfo(e,t);this._parent.emit(XY.DECODED,n),this._lastPts=t}},{key:"_onFirstFrame",value:function(e,t){var n=this._buildFrameInfo(e,t);this._parent.emit(XY.FIRST_FRAME,n)}},{key:"_onFragmentEnd",value:function(e,t){var n=this;fW.log(this.TAG,"_onFragmentEnd ,_isDecodePause:",this._isDecodePause,"decodeFPS:",e),e&&this._reduceResolution(e),this._isInDecoding=!1,this._inDecodeId=-1,this._currentInfo=null,this._frameLengthPerFragment=0,this._getBlobLength()&&!this._isDecodePause?this.startDecode():this.loadNextHandle=hG((function(){n._getBlobLength()&&!n._isDecodePause&&n._isVideoOnRun&&!n._isInDecoding&&(fW.log(n.TAG,"_onFragmentEnd, setInterval start next mp4 decode"),n.startDecode(),clearInterval(n.loadNextHandle))}))}},{key:"_onError",value:function(e,t){this._isInDecoding=!1,this._parent.emit("error",e,t)}},{key:"_checkReady",value:function(){this._isDataReady&&this._isInit&&(this.ready=!0,fW.log(this.TAG,"checkReady trigger ready"),this._parent.emit(XY.READY))}},{key:"_checkDataReady",value:function(){this._isDataReady=!0,this._checkReady()}},{key:"_reduceResolution",value:function(e){if(fW.log(this.TAG,"_reduceResolution","currentLevel:",this._currentLevel,"endLevel:",this._endLevel),this._videoHeight>720&&(fW.log(this.TAG,"_reduceResolution","trigger DECODE_LOW_FPS"),this._parent.emit(WY.DECODE_LOW_FPS)),e&&e<20?(this._minFPSTime++,this._decoder.emit("fpsreduce",e)):this._minFPSTime=0,this._currentLevel>=this._endLevel)return fW.log(this.TAG,"_reduceResolution","trigger DECODE_LOW_FPS",this._currentLevel,this._endLevel),void this._parent.emit(WY.DECODE_LOW_FPS);if(this._minFPSTime>2){var t,n=this._videoWidth,r=this._videoHeight;if(t=this._findLevel(r,this._currentLevel)){if(this._currentLevel=t.level,4===this._currentLevel)return fW.log(this.TAG,"_reduceResolution","trigger DECODE_LOW_FPS, _currentLevel: ",this._currentLevel),void this._parent.emit(WY.DECODE_LOW_FPS);this.width=t.base*(n/r),this.height=t.base,this._decoder.emit("outputresolutionchange",this.width,this.height)}this._minFPSTime=0}}},{key:"_findLevel",value:function(e,t){return $H(l9).call(l9,(function(n){return n.base<e&&n.level>t}))}},{key:"_buildFrameInfo",value:function(e,t){try{var n=e.width,r=e.height;return{msg:"DECODED",width:n,height:r,buffer:e,yLinesize:n,uvLinesize:n/2,info:{baseDts:void 0,dts:t,gopId:0,isGop:void 0,key:!1,pts:t},type:"rgb"}}catch(E6){fW.log(this.TAG,E6)}}},{key:"_pushBlob",value:function(e){fW.log("push blob",e.dts,e.duration),e&&e.duration&&(this._gopBufferLength+=e.duration),this._blobURLList.push(e)}},{key:"_shiftBlob",value:function(){var e=this._blobURLList.shift();return e&&e.duration&&(this._gopBufferLength-=e.duration),e}},{key:"_filterBlob",value:function(e){var t,n=this;this._blobURLList=Vl(t=this._blobURLList).call(t,(function(t){return t.dts<e&&(p$.revokeObjectURL(t.blobUrl),t.duration&&(n._gopBufferLength-=t.duration)),t.dts>=e}))}},{key:"_emptyBlobList",value:function(){this._blobURLList=[],this._gopBufferLength=0}},{key:"_getBlobLength",value:function(){return this._blobURLList.length}},{key:"_handleKeyFrameVideo",value:function(e){try{var t=this._parent._timeRange.frames||[];if(this._parent._timeRange.clean(),!t.length)return;var n=t[0].dts,r=t[t.length-1].dts,i=n-this.endDts;fW.log(this.TAG,"_handleKeyFrameVideo","startDts:",n,"endDts:",r,"samples length:",t.length),this.endDts&&i>Math.floor(1e3/this._metaFPS)+1&&fW.log(this.TAG,"_handleKeyFrame, keyFrame dts:",n,"sample length:",t.length,"endDts:",r,"delay:",i);var o=r-n;if(this._fDuration||(this._fDuration=o),o<1500)return void fW.log(this.TAG,"_handleKeyFrame gopDuration :",o,"sample length:",t.length,"gopStartDts:",n,"gopEndDts:",r);if(this.firstDts||(this.firstDts=t[0].dts),this.currentFragmentDts=t[0].dts,this.currentFragmentDuration=this._getFragmentDuration(t),this.endDts=r,this.currentFragmentDts<this._startDts)return console.warn(this.TAG,"_handleKeyFrameVideo","currentFragmentDts < this._startDts",this.currentFragmentDts,this._startDts),void(t=[]);this.startRemux(t),t=[]}catch(E6){console.error(this.TAG,"_handleKeyFrameVideo",E6)}}},{key:"_getFragmentDuration",value:function(e){var t=0,n=0;return e[0].keyframe||console.error(this.TAG,"_getFragmentDuration","gop firstFrame is not keyframe"),$l(e).call(e,(function(r,i){r.keyframe&&i&&(t+=e[i-1].dts-e[n].dts,n=i)})),t+=e[e.length-1].dts-e[n].dts}},{key:"_createBlobURL",value:function(e){if(e){var t=new window.Blob([e.buffer],{type:"video/mp4"});return p$.createObjectURL(t)}}},{key:"_recordGopDuration",value:function(e){var t=e;this._minGopDuration||(this._minGopDuration=t),t>this._maxGopDuration&&(this._maxGopDuration=t),t<this._minGopDuration&&(this._minGopDuration=t)}},{key:"checkMaxFrames",value:function(e){"number"==typeof e&&(this._isDecodePause=e>40,this._playSuccess&&this._isDecodePause&&this._decoder.pause())}},{key:"checkMinFrames",value:function(e){var t=this;if("number"==typeof e&&(this._isDecodePause=!(e<25),!this._isDecodePause)){var n=this._decoder.play();void 0!==n?n.then((function(){t._playSuccess=!0})).catch((function(){t._playSuccess=!1})):Lg((function(){t._playSuccess=!0}),20)}}},{key:"frameRendend",value:function(e){if(e.dom){if(e.dom.width=0,e.dom.height=0,this._decoder._canvasList.length>40)return;this._decoder._canvasList.push(e)}else fW.error(this.TAG,"_onRendend","imageObj. is error",e)}},{key:"checkValidBlob",value:function(e){this._filterBlob(e)}},{key:"chaseVideoFrame",value:function(e){fW.log(this.TAG,e,e.frame.dts,this.currentFragmentDts);var t=e.frame.dts;if(this._startDts=t,t===this.currentFragmentDts){if(fW.log(this.TAG,"_onChaseFrame","_inDecodeId:",this._inDecodeId,"currentFragmentDts:",this.currentFragmentDts),this._inDecodeId>0&&this._inDecodeId<t)return fW.log(this.TAG,"_onChaseFrame, _inDecodeId > 0 && _inDecodeId < startDts, _inDecodeId:",this._inDecodeId,"startDts:",t),this.stopDecode(),this._filterBlob(t),void this.startDecode();if(this._inDecodeId===t)return fW.log(this.TAG,"_onChaseFrame, _inDecodeId === startDts, startDts:",t),this.stopDecode(),void this.reStrartDecode(this._currentInfo);-1===this._inDecodeId&&(fW.log(this.TAG,"_onChaseFrame","_inDecodeId==-1"),this.startDecode())}t>this.currentFragmentDts&&(fW.log(this.TAG,"_onChaseFrame, startDts > currentFragmentDts, startDts:",t,"currentFragmentDts:",this.currentFragmentDts),this.stopDecode(),this._emptyBlobList()),t<this.currentFragmentDts&&(fW.log(this.TAG,"_onChaseFrame, startDts < currentFragmentDts, startDts:",t,"currentFragmentDts:",this.currentFragmentDts),t>this._inDecodeId&&(this._filterBlob(t),this.stopDecode(),this.startDecode()))}},{key:"init",value:function(e){this._isInit||(this._metaFPS=e.fpsNum/e.fpsDen||25,this._videoWidth=e.width,this._videoHeight=e.height,this._width=this._videoWidth,this._height=this._videoHeight,this._frameDuration=ug(1e3/this._metaFPS),this._isInit=!0,fW.log("".concat(this.TAG," has inited")),this._isInit=!0,this._checkReady())}},{key:"reStrartDecode",value:function(e){if(e)try{fW.log(this.TAG,"reStrartDecode"),this._isInDecoding=!0,this._inDecodeId=e.dts,this._currentInfo=e,this._decoder.startDecode(e,this._metaFPS,this._startTime),this._startTime=0}catch(E6){console.error("load error",E6)}}},{key:"stopDecode",value:function(){this._isInDecoding=!1,this._inDecodeId=-1,this._currentInfo=null,this._frameLengthPerFragment=0,this._decoder.stopDecode()}},{key:"startDecode",value:function(){if(this._isInDecoding)fW.log(this.TAG,"startDecode","this decoder is in decoding");else{var e=this._getBlobLength();if(this._decoder&&e){fW.log(this.TAG,"startDecode","blob url length:",e);var t=this._shiftBlob()||{};try{fW.log(this.TAG,"startDecode",t.dts,t.duration),this._isInDecoding=!0,this._inDecodeId=t.dts,this._currentInfo=t,this._decoder.startDecode(t,this._metaFPS)}catch(E6){console.error(this.TAG,"startDecode","load error",E6)}}}}},{key:"canSeek",value:function(e){var t=e.frame.dts;return!!(this.currentFragmentDts>=t&&this._isInDecoding)&&(this._inDecodeId!==t&&this._inDecodeId<t)}},{key:"startRemux",value:function(e){if(fW.log("startRemux samples length:",e.length),e.length){var t=this._parent._meta;t.samples=e;var n=this._remux.remux(t).videoSegment;this._onRemuxed(n)}else console.error("frame length is 0")}},{key:"canPlayType",value:function(e){if(this._decoder)try{return this._decoder.canPlayType('video/mp4;codecs="'+e.codec+'"')}catch(E6){console.error(E6)}}},{key:"destroy",value:function(){this._blobURLList=[],this._decoder.destroy()}},{key:"empty",value:function(){if(fW.log("empty"),this._decoder){var e=this._decoder._canvasList;return fW.log(this.TAG,"empty >>>>>>>>>>>>>>>>>>length:",e.length),$l(e).call(e,(function(e){e.dom&&(fW.log("clear >>>>>>>>>>>>>>>>>>"),e.dom.width=0,e.dom.height=0,e.dom=null)})),e.length}}},{key:"isIDLE",get:function(){return fW.log(this.TAG,"isIDEL","blob length:",this._getBlobLength(),"_isInDecoding:",this._isInDecoding,"isVideoOnRun:",this._isVideoOnRun,"_isDecodePause",this._isDecodePause),!this._getBlobLength()&&!this._isInDecoding&&this._isVideoOnRun}},{key:"ready",get:function(){return this._ready},set:function(e){this._ready=e}},{key:"remux",get:function(){return this._remux}},{key:"isInit",get:function(){return this._isInit}}]),n}(lY),A9=function(e){Ry(n,e);var t=Iy(n);function n(e,r){var i;return by(this,n),(i=t.call(this,e,r)).TAG="VideoRenderFromVideo",i._videoDecodeController=new h9(e,Dy(i)),i._canAutoPlay=!0,i._videoDecode=e.videoDecode,i._chaseToFrame=null,i}return ky(n,[{key:"videoDecode",get:function(){return this._videoDecode},set:function(e){this._videoDecode=e}},{key:"_bindEvents",value:function(){var e,t,r,i,o,a,s,u,c,l=this;Cy(Sy(n.prototype),"_bindEvents",this).call(this),this.on("keyFrame",Dm(e=this._onKeyFrame).call(e,this)),this.on(XY.READY,Dm(t=this._onReady).call(t,this)),this.on(XY.DECODED,Dm(r=this._onDecoded).call(r,this)),this.on(XY.PLAY_FAILED,Dm(i=this._onPlayFailed).call(i,this)),this.on("error",Dm(o=this._onError).call(o,this)),this.on(XY.APPEND_VIDEO,Dm(a=this._onAppendVideo).call(a,this)),this.on(XY.FIRST_FRAME,Dm(s=this._onFirstFrame).call(s,this)),this._parent.on(XY.CHASE_VIDEO_FRAME,Dm(u=this._onChaseVideoFrame).call(u,this)),this._parent.on(YY.SYNC_DTS,Dm(c=this._onTimeLineSyncDTS).call(c,this)),window.addEventListener("unload",(function(){l._empty()}))}},{key:"_onTimeLineSyncDTS",value:function(e){this._videoDecodeController.checkValidBlob(e)}},{key:"_onChaseVideoFrame",value:function(e){this._doChaseVideoFrame(e)}},{key:"_onAppendVideo",value:function(e){try{this._parent._parent.appendChild(e)}catch(E6){cosole.error(this.TAG,"onAppendVideo",E6)}}},{key:"_onKeyFrame",value:function(){fW.log(this.TAG,"_onKeyFrame, keyframe"),this._videoDecodeController.emit("keyFrame")}},{key:"_onError",value:function(e,t){console.error(this.TAG,"decoder error",e,t),t||this._emitTimelineEvents(YY.PLAY_EVENT,NY.ERROR,this._assembleErr(e&&e.message))}},{key:"_onReady",value:function(){if(!this._frameRender){var e=CW(this._config,{meta:this._meta,canvas:this._canvas,type:"2d"});try{this._frameRender=new i9(e,this)}catch(E6){this._emitTimelineEvents(YY.PLAY_EVENT,NY.ERROR,this._assembleErr(E6&&E6.message))}}this._startDecode()}},{key:"_onFirstFrame",value:function(e){fW.log(this.TAG,"onFirstFrame"),this._receiveFrame(e),this._firstFrame=!0}},{key:"_onDecoded",value:function(e){var t=this;if(this._inChaseFrame){if(this.chaseFrameAfter++,1===this.chaseFrameAfter&&this._chaseToFrame){if(this._parent.emit(XY.CHASE_VIDEO_FRAME_END,this._chaseToFrame),this._frameQueue.length){var n=this._frameQueue.frames;$l(n).call(n,(function(e){t._videoDecodeController.frameRendend(e.buffer)}))}this._frameQueue.empty(),this._videoDecodeController.checkMinFrames(this._frameQueue.length),this._timeRange.deletePassed(this._chaseToFrame.frame.dts),this._inChaseFrame=!1,this._chaseToFrame=null,console.warn(this.TAG,"onDecoded","_inChaseFrame end")}}else this.chaseFrameAfter=0;this._receiveFrame(e)}},{key:"_onPlayFailed",value:function(e){console.warn(this.TAG,"onPlayFailed, this._ready:",this._ready,",firstEmit:",e,",frame length:",this._frameQueue.length),this._ready||e||this._whenReady(),this._canAutoPlay=!1}},{key:"canSeek",value:function(e){return this._videoDecodeController.canSeek(e)}},{key:"_initDecoder",value:function(){this._isInit||(fW.log(this.TAG,"_initDecoder"),this._videoDecodeController.isInit||this._videoDecodeController.init(this._meta),this._isInit=!0)}},{key:"_receiveFrame",value:function(e){Cy(Sy(n.prototype),"_receiveFrame",this).call(this,e),this._videoDecodeController.checkMaxFrames(this._frameQueue._frames.length)}},{key:"_setMetadata",value:function(e){fW.warn(this.TAG,"video set metadata",e),this._meta=e;var t=e.fpsNum/e.fpsDen;t?fW.log(this.TAG,"detect fps:",t):fW.warn(this.TAG,"no detect fps,start estimate"),this._initDecoder(e)}},{key:"_doChaseVideoFrame",value:function(e){this._inChaseFrame=!0,this._chaseToFrame=e,this._videoDecodeController.chaseVideoFrame(e)}},{key:"_appendChunk",value:function(e){var t;this._meta||this._setMetadata(e);for(var n=hm(t=e.samples).call(t),r=n.length,i=0;i<r;i++){var o=n.shift();o.keyframe&&this.emit("keyFrame"),this._timeRange.append([o],this.noAudio,!1)}}},{key:"_startDecode",value:function(){this._videoDecodeController.startDecode()}},{key:"_checkToDecode",value:function(){this._startDecode()}},{key:"_startRender",value:function(){fW.log(this.TAG,"_startRender interval",this.interval),this._tickTimer.start(this.interval)}},{key:"_render",value:function(e){var t=this,n=this._frameQueue.nextFrame(),r=this.preciseVideoDts;if(n&&this._timeRange){var i=n.info;if(!i)return this._frameQueue.shift(),void console.error("not info");this._renderDts=i.dts;var o=i.dts-r;if(o<-150){this.lastPrecise;var a=this._frameQueue.frames,s=this._getDeleteFrames(a,r),u=s.deleteFrames,c=s.useFrames;return PQ(a).call(a,0),$l(c).call(c,(function(e){a.push(e)})),$l(u).call(u,(function(e){t._videoDecodeController.frameRendend(e.buffer)})),this._videoDecodeController.emit("renderDelay",o,this._frameQueue._frames.length),void this._videoDecodeController.checkMinFrames(this._frameQueue.length)}if(!(!e&&o>30&&o<6e4)){var l,h,A,d,f,v;if(Math.abs(this._lastTimeupdate-i.dts)>250&&(this._emitTimelineEvents(YY.PLAY_EVENT,NY.TIMEUPDATE),this._lastTimeupdate=i.dts),fW.long)fW.log(this.TAG,dg(l=dg(h=dg(A=dg(d=dg(f=dg(v="render delay:".concat(o," , timelinePosition:")).call(v,r," , dts:")).call(f,i.dts," , cost:")).call(d,i.cost," , gopID:")).call(A,i.gopId," , rest:")).call(h,this._frameQueue.length,", buffer frame:")).call(l,this._timeRange.frameLength));var p=performance.now();this._frameRender.render(n.buffer,n.width,n.height,n.yLinesize,n.uvLinesize),this.hasFirstFrame||e||(this.hasFirstFrame=!0,this._parent.emit(YY.PLAY_EVENT,"firstframe")),this._videoDecodeController.frameRendend(n.buffer),this._frameQueue.shift(),this._videoDecodeController.checkMinFrames(this._frameQueue.length),this._videoDecodeController.emit("renderDelay",o,this._frameQueue._frames.length),this._renderCost=performance.now()-p,e||(this.lastTime&&(this.lastPrecise,kG(),this.lastTime),this.lastFrameinfo=i.dts,this.lastPrecise=r,this.lastTime=kG(),this.lastAudioTime=this._parent.audioRender.currentTime)}}else{if(this._videoDecodeController.checkMinFrames(this._frameQueue._frames.length),this._parent._paused)return;if(!this._firstFrame)return void fW.log(this.TAG,"_render","not first frame return");var m=this._videoDecodeController;if(fW.log(this.TAG,",lack frame, _inDecoding:",this._videoDecodeController._isInDecoding,this._videoDecodeController._isDecodePause,",_frameQueue.length:",this._frameQueue.length),!this._frameQueue.length&&m.isIDLE){this._ready=!1;var y=this._parent.audioRender;console.warn(this.TAG,"trigger video waiting vdecode, preciseVideoDts:",r,y.currentTime,y.duration,y.buffered.end(0),y.baseDts),this.emit(WY.VIDEO_WAITING)}this._checkToDecode()}}},{key:"_updateSegmentEnd",value:function(){}},{key:"_destroy",value:function(e){this._empty(),Cy(Sy(n.prototype),"destroy",this).call(this,e),this._videoDecodeController.destroy()}},{key:"_doPause",value:function(){fW.log(this.TAG,">>>>>>>>doPause"),this._tickTimer.stop()}},{key:"_getDeleteFrames",value:function(e,t){var n=[],r=[];return $l(e).call(e,(function(e){e.info&&e.info.dts>t?r.push(e):e.info&&e.info.dts<=t&&n.push(e)})),{deleteFrames:n,useFrames:r}}},{key:"_empty",value:function(){var e;this._videoDecodeController&&(this._videoDecodeController.empty(),$l(e=this._frameQueue.frames).call(e,(function(e){e.buffer&&e.buffer.dom&&(e.buffer.dom.width=0,e.buffer.dom.height=0,e.buffer.dom=null)})))}}]),n}(u9),d9=function(e){Ry(n,e);var t=Iy(n);function n(e){var r;return by(this,n),Ty(Dy(r=t.call(this)),"_parent",null),Ty(Dy(r),"_decoderReady",!1),Ty(Dy(r),"_inDecoding",!1),Ty(Dy(r),"_toDecodeFirstframe",!0),Ty(Dy(r),"_id",(new Date).getMilliseconds()),Ty(Dy(r),"_workerErrorCallback",null),Ty(Dy(r),"_workerMessageCallback",null),Ty(Dy(r),"_decoderWorker",null),r._parent=e,r}return ky(n,[{key:"analyse",get:function(){return this._parent.analyse}},{key:"inDecoding",get:function(){return this._inDecoding}},{key:"decoderMode",get:function(){return this._decoderMode}},{key:"decoderReady",get:function(){return this._decoderReady}},{key:"needToDecode",get:function(){return this._inDecoding?0:this._continueDecodeThreshold}},{key:"maxDecodeOnce",get:function(){return this._maxDecodeOnce}},{key:"meta",get:function(){var e;return null===(e=this._parent)||void 0===e?void 0:e._meta},set:function(e){this._parent&&(this._parent._meta=e)}},{key:"init",value:function(e,t){this._workerMessageCallback=e,this._workerErrorCallback=t,this._initWorker()}},{key:"_initWorker",value:function(){throw new Error("need override by children")}},{key:"checkToDecode",value:function(e){this.webcodec?e<=this.needToDecode&&this.doDecode():!this._inDecoding&&e<=this.needToDecode&&this.doDecode()}},{key:"doDecode",value:function(){var e=this,t=this._getFramesToDecode();t&&t.length&&this.meta&&(this._toDecodeFirstframe&&(this._toDecodeFirstframe=!1,this.analyse.addFirstFrameToDecode()),this._avccpushed||this._initDecoderWithConfiguration(this._decoderWorker,this.meta),fW.enable&&fW.log(this.TAG,"doDecode ".concat(t.length," frames")),$l(t).call(t,(function(t){e._doDecodeInternal(t)})),this._inDecoding=!0,this._decoderWorker.postMessage({msg:"finish_flag"}))}},{key:"preciseSeek",value:function(e){var t,n,r,i,o=this,a=1e3*e,s=null===(t=this._parent)||void 0===t||null===(n=t._timeRange)||void 0===n?void 0:n.getFramesForPreciseSeek(a),u=s.length;u<this.maxDecodeOnce?this.doDecode():(null===(r=this._parent)||void 0===r||null===(i=r._timeRange)||void 0===i||i.updateFrameIndexForPreciseSeek(u),fW.enable&&fW.log(this.TAG,"doDecode ".concat(s.length," frames for precise seek")),$l(s).call(s,(function(e,t){o._doDecodeInternal(e,!0,t>=u-6)})),this._inDecoding=!0,this._decoderWorker.postMessage({msg:"finish_flag"}))}},{key:"_getFramesToDecode",value:function(){var e=this._parent,t=e._timeRange,n=e._decodeEstimate;if(this._decoderReady&&t){var r=t.frameLength;if(r){var i=this._toDecodeFirstframe?JW().maxDecodeOnceFirstTime:this.maxDecodeOnce;1===r&&n.resetDecodeDot(performance.now());for(var o=[];i>0;){var a=t&&t.getFrame();if(!a)break;o.push(a),a.gopId&&a.gopId-1==0&&n.updateGopCount(),i--}return o}}}},{key:"_doDecodeInternal",value:function(e,t,n){var r;null!=e&&e.meta&&(this.meta=e.meta,fW.warn(this.TAG,"detect metadata! flush decoder"),this._initDecoderWithConfiguration(this.__decoderWorker,e.meta));var i={dts:e.dts,pts:e.pts||e.dts+e.cts,keyframe:e.keyframe,gopId:e.gopId,id:this._id};t&&(i.preciseSeek=!0,i.output=n);var o=hm(r=e.data).call(r);this._decoderWorker.postMessage({msg:"decode",data:o,info:i},[o.buffer])}},{key:"_initDecoderWithConfiguration",value:function(){throw new Error("need override by children")}},{key:"flushDecoder",value:function(){this._decoderWorker.postMessage({msg:"flush"})}},{key:"destroy",value:function(){throw new Error("need override by children")}}]),n}(lY),f9="IWZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO3ZhciBlPW51bGwsdD1bXSxzPTAsYT0hMTtzZWxmLmFkZEV2ZW50TGlzdGVuZXIoIm1lc3NhZ2UiLChmdW5jdGlvbihvKXtzd2l0Y2goby5kYXRhLm1zZyl7Y2FzZSJjb25maWd1cmF0aW9uIjplPW5ldyBzZWxmLlZpZGVvRGVjb2Rlcih7b3V0cHV0OmZ1bmN0aW9uKG8pe2E9ITAscyYmY2xlYXJUaW1lb3V0KHMpO3ZhciBuPXQuc2hpZnQoKTtuP3NlbGYucG9zdE1lc3NhZ2Uoe3R5cGU6IkRFQ09ERUQiLHdpZHRoOm8uZGlzcGxheVdpZHRoLGhlaWdodDpvLmRpc3BsYXlIZWlnaHQsaW5mbzpuLGJ1ZmZlcjpvfSxbb10pOm8uY2xvc2UoKSxlLmRlY29kZVF1ZXVlU2l6ZT09PXQubGVuZ3RoJiZzZWxmLnBvc3RNZXNzYWdlKHt0eXBlOiJCQVRDSF9GSU5JU0hfRkxBRyJ9KX0sZXJyb3I6ZnVuY3Rpb24oZSl7Y29uc29sZS5sb2coIltXZWJjb2RlY1dvcmtlcl06IixlKSwiQ29kZWMgcmVjbGFpbWVkIGR1ZSB0byBpbmFjdGl2aXR5LiIhPT1lLm1lc3NhZ2UmJnNlbGYucG9zdE1lc3NhZ2Uoe3R5cGU6IkZBSUxFRCIsbWVzc2FnZTplJiZlLm1lc3NhZ2V9KX19KSxzZWxmLlZpZGVvRGVjb2Rlci5pc0NvbmZpZ1N1cHBvcnRlZChvLmRhdGEuZGF0YSkudGhlbigoZnVuY3Rpb24odCl7dC5zdXBwb3J0ZWQmJihlLmNvbmZpZ3VyZShvLmRhdGEuZGF0YSksY29uc29sZS5sb2coIltXZWJjb2RlY1dvcmtlcl06IiwiaXNDb25maWdTdXBwb3J0ZWQiLHQpKX0pKS50aGVuKChmdW5jdGlvbigpe3NlbGYucG9zdE1lc3NhZ2Uoe3R5cGU6IkRFQ09ERVJfUkVBRFkifSkscz1zZXRUaW1lb3V0KChmdW5jdGlvbigpe2F8fHNlbGYucG9zdE1lc3NhZ2Uoe3R5cGU6IkZBSUxFRCIsbWVzc2FnZToibm8gZnJhbWUgb3V0cHV0In0pfSksMmUzKX0pKS5jYXRjaCgoZnVuY3Rpb24oZSl7c2VsZi5wb3N0TWVzc2FnZSh7dHlwZToiRkFJTEVEIixtZXNzYWdlOmUmJmUubWVzc2FnZX0pfSkpO2JyZWFrO2Nhc2UiZGVjb2RlIjp2YXIgbj1vLmRhdGEuZGF0YSxpPW8uZGF0YS5pbmZvO3QucHVzaChpKTt2YXIgZD1uLmJ5dGVMZW5ndGgtNCxjPW5ldyBEYXRhVmlldyhuZXcgQXJyYXlCdWZmZXIoNCkpO2Muc2V0VWludDMyKDAsZCwhMSksbi5zZXQobmV3IFVpbnQ4QXJyYXkoYy5idWZmZXIpLDApLGkua2V5ZnJhbWUmJmUuZmx1c2goKTt2YXIgcj1uZXcgc2VsZi5FbmNvZGVkVmlkZW9DaHVuayh7dHlwZTppLmtleWZyYW1lPyJrZXkiOiJkZWx0YSIsdGltZXN0YW1wOmkucHRzLGRhdGE6bn0pO2UuZGVjb2RlKHIpO2JyZWFrO2Nhc2UiZGVzdHJveSI6ZSYmKGUuZmx1c2goKSxlLmNsb3NlKCkpLGNsZWFyVGltZW91dChzKTticmVhaztjYXNlImNoZWNrRGVjb2RlIjpzZWxmLnBvc3RNZXNzYWdlKHt0eXBlOiJDSEVDS19UT19ERUNPREUiLGRhdGE6MD09PU1hdGguYWJzKGUuZGVjb2RlUXVldWVTaXplLXQubGVuZ3RoKX0pfX0pKX0oKTsK",v9="undefined"!=typeof window&&window.Blob&&new Blob([atob(f9)],{type:"text/javascript;charset=utf-8"});function p9(){var e=v9&&(p$||window.webkitURL).createObjectURL(v9);try{return e?new Worker(e,{}):new Worker("data:application/javascript;base64,"+f9,{type:"module"})}finally{e&&(p$||window.webkitURL).revokeObjectURL(e)}}var m9=JW().maxDecodeOnceWebcodec,y9=function(e){Ry(n,e);var t=Iy(n);function n(){var e,r;by(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Ty(Dy(r=t.call.apply(t,dg(e=[this]).call(e,o))),"TAG","WebCodecController"),Ty(Dy(r),"_decoderMode",5),Ty(Dy(r),"_maxDecodeOnce",m9),Ty(Dy(r),"_continueDecodeThreshold",m9/2),Ty(Dy(r),"_avccpushed",!1),r}return ky(n,[{key:"webcodec",get:function(){return!0}},{key:"needToDecode",get:function(){return this._inDecoding?(this._checkToDecode(),0):this._continueDecodeThreshold}},{key:"_initWorker",value:function(){var e=this;fW.log(this.TAG,"start init webcodec worker");var t=new p9;t.onMessage=function(t){var n,r;switch(t.data.type){case"DECODER_READY":fW.log(e.TAG,"webcodec worker ready "),e._decoderReady=!0,e._workerMessageCallback({type:"DECODER_READY"});break;case"DECODED":if(e._inDecoding=!0,(null===(n=t.data)||void 0===n||null===(r=n.info)||void 0===r?void 0:r.id)!==e._id)return;e._workerMessageCallback({type:"RECEIVE_FRAME",data:t.data});break;case"BATCH_FINISH_FLAG":if(e._inDecoding=!1,!e._workerMessageCallback)return;e._workerMessageCallback({type:"BATCH_FINISH"});break;case"CHECK_TO_DECODE":e._inDecoding=t.data.data;break;case"FAILED":e._whenError(t.data.message)}},t.onError=function(t){var n,r,i=null===(n=e._parent)||void 0===n||null===(r=n._parent)||void 0===r?void 0:r._parent;i&&i.removeChild(i.querySelector("canvas")),e._whenError(t.message)},t.addEventListener("message",t.onMessage),t.addEventListener("error",t.onError),this._decoderWorker=t,this._initDecoderWithConfiguration(t,this._parent.configuration)}},{key:"_whenError",value:function(e){n.canUse=!1,this._workerErrorCallback(e)}},{key:"_initDecoderWithConfiguration",value:function(e,t){e.postMessage({msg:"configuration",data:{codec:this._parent._meta.codec,codedHeight:this._parent._meta.height,codedWidth:this._parent._meta.width,description:t}}),this._avccpushed=!0}},{key:"_checkToDecode",value:function(){this._decoderWorker.postMessage({msg:"checkDecode"})}},{key:"destroy",value:function(){var e=this._decoderWorker;e.removeEventListener("message",e.onMessage),e.removeEventListener("error",e.onError),e.postMessage({msg:"destroy"}),e.terminate(),this._decoderWorker=null}}],[{key:"isSupported",value:function(){return JW().h264WithWebcodec&&!!window.VideoDecoder&&!1!==n.canUse}}]),n}(d9),g9="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Z1bmN0aW9uIHNoaW1JbXBvcnRTY3JpcHRzKHNyYyl7cmV0dXJuIGZldGNoKHNyYykudGhlbigoZnVuY3Rpb24oZSl7cmV0dXJuIGUudGV4dCgpfSkpLnRoZW4oKGZ1bmN0aW9uKHRleHQpe3NlbGYuZXhwb3J0cz17fSxldmFsKHRleHQpLHNlbGYubT1leHBvcnRzLm19KSl9dmFyIE1BWF9TVFJFQU1fQlVGRkVSX0xFTkdUSD0zMTQ1NzI4LGluaXRUcz0wLERlY29kZXI9ZnVuY3Rpb24oZSl7dGhpcy5pbml0ZWQ9ITEsdGhpcy5pbmZvSWQ9MCx0aGlzLnNlbGY9ZSx0aGlzLm1ldGE9dGhpcy5zZWxmLm1ldGEsdGhpcy50cz0wLHRoaXMuaW5mb2xpc3Q9W10sZS5wYXJfYnJvYWR3YXlPbkJyb2Fkd2F5SW5pdGVkPXRoaXMuYnJvYWR3YXlPbkJyb2Fkd2F5SW5pdGVkLmJpbmQodGhpcyksZS5wYXJfYnJvYWR3YXlPblBpY3R1cmVEZWNvZGVkPXRoaXMuYnJvYWR3YXlPblBpY3R1cmVEZWNvZGVkLmJpbmQodGhpcyl9LGRlY29kZXI7ZnVuY3Rpb24gb25Qb3N0UnVuKCl7KGRlY29kZXI9bmV3IERlY29kZXIodGhpcykpLmluaXQoKX1EZWNvZGVyLnByb3RvdHlwZS50b1U4QXJyYXk9ZnVuY3Rpb24oZSx0KXtyZXR1cm4gTW9kdWxlLkhFQVBVOC5zdWJhcnJheShlLGUrdCl9LERlY29kZXIucHJvdG90eXBlLmluaXQ9ZnVuY3Rpb24oKXtNb2R1bGUuX2Jyb2Fkd2F5SW5pdCgwLDEpLHRoaXMub2Zmc2V0PU1vZHVsZS5fYnJvYWR3YXlDcmVhdGVTdHJlYW0oTUFYX1NUUkVBTV9CVUZGRVJfTEVOR1RIKX0sRGVjb2Rlci5wcm90b3R5cGUuYnJvYWR3YXlPblBpY3R1cmVEZWNvZGVkPWZ1bmN0aW9uKGUsdCxvLG4saSl7dmFyIHM9dGhpcy5pbmZvbGlzdC5zaGlmdCgpLHI9byxhPW8vMixjPXQsZD10LzI7aWYoIXRoaXMubWV0YXx8NDQ0IT09dGhpcy5tZXRhLmNocm9tYUZvcm1hdCYmNDIyIT09dGhpcy5tZXRhLmNocm9tYUZvcm1hdHx8KGE9byksIXN8fCFzLnByZWNpc2VTZWVrfHxzLm91dHB1dCl7dmFyIGY9dGhpcy50b1U4QXJyYXkoZSxjKnIrZCphKjIpLHU9bmV3IFVpbnQ4QXJyYXkoZi5sZW5ndGgpO3Uuc2V0KGYpO3ZhciBsPXUuYnVmZmVyO3RoaXMuc2VsZi5wb3N0TWVzc2FnZSh7bXNnOiJERUNPREVEIix3aWR0aDp0LGhlaWdodDpvLHlMaW5lc2l6ZTpjLHV2TGluZXNpemU6ZCxpbmZvOnMsYnVmZmVyOmx9LFtsXSl9fSxEZWNvZGVyLnByb3RvdHlwZS5icm9hZHdheU9uQnJvYWR3YXlJbml0ZWQ9ZnVuY3Rpb24oKXtpZighdGhpcy5pbml0ZWQpe3RoaXMuaW5pdGVkPSEwO3ZhciBlPTA7aW5pdFRzJiYoZT1wZXJmb3JtYW5jZS5ub3coKS1pbml0VHMpLHRoaXMuc2VsZi5wb3N0TWVzc2FnZSh7bXNnOiJERUNPREVSX1JFQURZIixjb3N0OmV9KX19LERlY29kZXIucHJvdG90eXBlLmRlY29kZT1mdW5jdGlvbihlLHQpe3ZhciBvPXBhcnNlSW50KChuZXcgRGF0ZSkuZ2V0VGltZSgpKSxuPW8tMWU5Kk1hdGguZmxvb3Ioby8xZTkpO3RoaXMuaW5mb2xpc3QucHVzaCh0KSx0JiZ0LmtleWZyYW1lJiYodGhpcy5pbmZvbGlzdD1bdF0sTW9kdWxlLl9icm9hZHdheUZsdXNoU3RyZWFtKG4pKSxNb2R1bGUuSEVBUFU4LnNldChlLHRoaXMub2Zmc2V0KSxNb2R1bGUuX2Jyb2Fkd2F5UGxheVN0cmVhbShlLmxlbmd0aCx0aGlzLmluZm9JZCl9LERlY29kZXIucHJvdG90eXBlLmZsdXNoPWZ1bmN0aW9uKCl7TW9kdWxlLl9icm9hZHdheUZsdXNoU3RyZWFtKCl9LERlY29kZXIucHJvdG90eXBlLmRlc3Ryb3k9ZnVuY3Rpb24oKXtNb2R1bGUuX2Jyb2Fkd2F5RXhpdCgpfSxEZWNvZGVyLnByb3RvdHlwZS51cGRhdGVNZXRhPWZ1bmN0aW9uKGUpe3RoaXMubWV0YT1lfTt2YXIgV0FTTV9DRE5fUEFUSF9QUkVGSVg9IiI7ZnVuY3Rpb24gaW5pdChlKXtXQVNNX0NETl9QQVRIX1BSRUZJWD1lLnNwbGl0KCIvIikuc2xpY2UoMCwtMSkuam9pbigiLyIpLGluaXRUcz1wZXJmb3JtYW5jZS5ub3coKTt2YXIgdD0vYXNtLy50ZXN0KGUpO2RlY29kZXJ8fChzZWxmLmltcG9ydFNjcmlwdHM/bmV3IFByb21pc2UoKGZ1bmN0aW9uKHQsbyl7c2VsZi5jb25zb2xlfHwoc2VsZi5jb25zb2xlPXtsb2c6ZnVuY3Rpb24oKXt9LHdhcm46ZnVuY3Rpb24oKXt9LGluZm86ZnVuY3Rpb24oKXt9LGVycm9yOmZ1bmN0aW9uKCl7fX0pO3RyeXtzZWxmLmltcG9ydFNjcmlwdHMoZSksdCgpfWNhdGNoKG4pe2lmKG4ubWVzc2FnZS5pbmNsdWRlcygiTW9kdWxlIHNjcmlwdHMgZG9uJ3Qgc3VwcG9ydCBpbXBvcnRTY3JpcHRzIikpcmV0dXJuIHQoc2hpbUltcG9ydFNjcmlwdHMoZSkpO28obil9fSkpOnNoaW1JbXBvcnRTY3JpcHRzKGUpKS50aGVuKChmdW5jdGlvbigpe3JldHVybiB0Pyhjb25zb2xlLmxvZygiYXV0byBpbnN0YW5jZSBEZWNvZGVyISIpLG5ldyBQcm9taXNlKChmdW5jdGlvbihlLHQpe3NldFRpbWVvdXQoKGZ1bmN0aW9uKCl7dHJ5e29uUG9zdFJ1bi5jYWxsKHNlbGYpLGUoKX1jYXRjaChvKXt0KG8pfX0pKX0pKSk6c2VsZi5tP3NlbGYubSh7aW5zdGFudGlhdGVXYXNtOmZ1bmN0aW9uKGUsdCl7ZmV0Y2goIiIuY29uY2F0KFdBU01fQ0ROX1BBVEhfUFJFRklYLCIvZGVjb2Rlci53YXNtLmpzIikpLnRoZW4oKGZ1bmN0aW9uKGUpe3JldHVybiBlLmFycmF5QnVmZmVyKCl9KSkudGhlbigoZnVuY3Rpb24odCl7cmV0dXJuIFdlYkFzc2VtYmx5Lmluc3RhbnRpYXRlKHQsZSl9KSkudGhlbigoZnVuY3Rpb24oZSl7cmV0dXJuIHQoZS5pbnN0YW5jZSl9KSl9fSkudGhlbigoZnVuY3Rpb24oZSl7c2VsZi5Nb2R1bGU9ZSxvblBvc3RSdW4uY2FsbChzZWxmKX0pKTpuZXcgUHJvbWlzZSgoZnVuY3Rpb24oZSx0KXthZGRPblBvc3RSdW4ob25Qb3N0UnVuLmJpbmQoc2VsZikpLE1vZHVsZS5vblJ1bnRpbWVJbml0aWFsaXplZD1mdW5jdGlvbigpe2UoKX0sTW9kdWxlLm9uQWJvcnQ9ZnVuY3Rpb24oZSl7dChlJiZlLm1lc3NhZ2U/ZTpuZXcgRXJyb3IoIndhc20gaW5pdCBlcnJvciIpKX0sc2V0VGltZW91dCgoZnVuY3Rpb24oKXt0KG5ldyBFcnJvcigid2FzbSBsb2FkIHRpbWVvdXQiKSl9KSw2ZTMpfSkpfSkpLmNhdGNoKChmdW5jdGlvbihlKXtzZWxmLnBvc3RNZXNzYWdlKHttc2c6IklOSVRfRkFJTEVEIixsb2c6ZS5tZXNzYWdlfSl9KSl9c2VsZi5vbm1lc3NhZ2U9ZnVuY3Rpb24oZSl7dmFyIHQ9ZS5kYXRhO2lmKHQubXNnKXtpZigiaW5pdCIhPT10Lm1zZyYmInByZWxvYWQiIT09dC5tc2cmJiFkZWNvZGVyKXJldHVybjtzd2l0Y2godC5tc2cpe2Nhc2UicHJlbG9hZCI6aW5pdCh0LnVybCk7YnJlYWs7Y2FzZSJpbml0IjpzZWxmLm1ldGE9dC5tZXRhLGluaXQodC51cmwpO2JyZWFrO2Nhc2UidXBkYXRlbWV0YSI6c2VsZi5tZXRhPXQubWV0YSxkZWNvZGVyLnVwZGF0ZU1ldGEodC5tZXRhKTticmVhaztjYXNlImluaXREZWNvZGVyIjpkZWNvZGVyLmRlY29kZSh0LmRhdGEpO2JyZWFrO2Nhc2UiZGVjb2RlIjpkZWNvZGVyLmRlY29kZSh0LmRhdGEsdC5pbmZvKTticmVhaztjYXNlImZsdXNoIjpkZWNvZGVyLmZsdXNoKCk7YnJlYWs7Y2FzZSJmaW5pc2hfZmxhZyI6c2VsZi5wb3N0TWVzc2FnZSh7bXNnOiJCQVRDSF9GSU5JU0hfRkxBRyJ9KTticmVhaztjYXNlImRlc3RvcnkiOmRlY29kZXIuZGVzdHJveSgpfX1lbHNlIHNlbGYucG9zdE1lc3NhZ2Uoe21zZzoiRVJST1I6aW52YWxpZCBtZXNzYWdlIn0pfX0pKCk7Cg==",_9="undefined"!=typeof window&&window.Blob&&new Blob([atob(g9)],{type:"text/javascript;charset=utf-8"});function b9(){var e=_9&&(p$||window.webkitURL).createObjectURL(_9);try{return e?new Worker(e,{}):new Worker("data:application/javascript;base64,"+g9,{type:"module"})}finally{e&&(p$||window.webkitURL).revokeObjectURL(e)}}var E9="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Z1bmN0aW9uIHNoaW1JbXBvcnRTY3JpcHRzKHNyYyl7cmV0dXJuIGZldGNoKHNyYykudGhlbigoZnVuY3Rpb24oZSl7cmV0dXJuIGUudGV4dCgpfSkpLnRoZW4oKGZ1bmN0aW9uKHRleHQpe3NlbGYuZXhwb3J0cz17fSxldmFsKHRleHQpLHNlbGYubT1leHBvcnRzLm19KSl9dmFyIE1BWF9TVFJFQU1fQlVGRkVSX0xFTkdUSD01MjQyODgwLEJBVENIX0RFQ09ERV9TSVpFPTgsaW5pdFRzPTAsRGVjb2Rlcj1mdW5jdGlvbihlKXt0aGlzLmluaXRlZD0hMSx0aGlzLmluZm9JZD0wLHRoaXMuc2VsZj1lLHRoaXMubWV0YT1lLm1ldGEsdGhpcy50cz0wLHRoaXMuaW5mb2xpc3Q9W10sZS5wYXJfYnJvYWR3YXlPbkJyb2Fkd2F5SW5pdGVkPXRoaXMuYnJvYWR3YXlPbkJyb2Fkd2F5SW5pdGVkLmJpbmQodGhpcyksZS5wYXJfYnJvYWR3YXlPblBpY3R1cmVEZWNvZGVkPXRoaXMuYnJvYWR3YXlPblBpY3R1cmVEZWNvZGVkLmJpbmQodGhpcyl9LGRlY29kZXI7ZnVuY3Rpb24gb25Qb3N0UnVuKCl7KGRlY29kZXI9bmV3IERlY29kZXIodGhpcykpLmluaXQoKX1EZWNvZGVyLnByb3RvdHlwZS50b1U4QXJyYXk9ZnVuY3Rpb24oZSx0KXtyZXR1cm4gTW9kdWxlLkhFQVBVOC5zdWJhcnJheShlLGUrdCl9LERlY29kZXIucHJvdG90eXBlLmluaXQ9ZnVuY3Rpb24oKXtNb2R1bGUuX2Jyb2Fkd2F5SW5pdCgwLDIpLHRoaXMuc3RyZWFtQnVmZmVyUHRyPU1vZHVsZS5fYnJvYWR3YXlDcmVhdGVTdHJlYW0oTUFYX1NUUkVBTV9CVUZGRVJfTEVOR1RIKSx0aGlzLnN0cmVhbUJ1ZmZlcj10aGlzLnRvVThBcnJheSh0aGlzLnN0cmVhbUJ1ZmZlclB0cixNQVhfU1RSRUFNX0JVRkZFUl9MRU5HVEgpLHRoaXMuYnVmZmVyU2l6ZXNQdHI9TW9kdWxlLl9tYWxsb2MoNCpCQVRDSF9ERUNPREVfU0laRSksdGhpcy5idWZmZXJTaXplcz10aGlzLnRvVThBcnJheSh0aGlzLmJ1ZmZlclNpemVzUHRyLDQqQkFUQ0hfREVDT0RFX1NJWkUpLHRoaXMuc3RyZWFtQnVmZmVyT2Zmc2V0PTAsdGhpcy5mcmFtZUxlbnNPZmZzZXQ9MCx0aGlzLmZyYW1lTGVuc0J1ZmZlcj1uZXcgVWludDMyQXJyYXkoQkFUQ0hfREVDT0RFX1NJWkUpfSxEZWNvZGVyLnByb3RvdHlwZS5icm9hZHdheU9uUGljdHVyZURlY29kZWQ9ZnVuY3Rpb24oZSx0LHIpe3ZhciBzPXRoaXMuaW5mb2xpc3Quc2hpZnQoKSxvPXIsaT1yLzIsbj10LGY9dC8yOyF0aGlzLm1ldGF8fDQ0NCE9PXRoaXMubWV0YS5jaHJvbWFGb3JtYXQmJjQyMiE9PXRoaXMubWV0YS5jaHJvbWFGb3JtYXR8fChpPXIpO3ZhciBhPXRoaXMudG9VOEFycmF5KGUsbipvK2YqaSoyKSxjPW5ldyBVaW50OEFycmF5KGEubGVuZ3RoKTtjLnNldChhKTt2YXIgZD1jLmJ1ZmZlcjt0aGlzLnNlbGYucG9zdE1lc3NhZ2Uoe21zZzoiREVDT0RFRCIsd2lkdGg6dCxoZWlnaHQ6cix5TGluZXNpemU6bix1dkxpbmVzaXplOmYsaW5mbzpzLGJ1ZmZlcjpkfSxbZF0pfSxEZWNvZGVyLnByb3RvdHlwZS5icm9hZHdheU9uQnJvYWR3YXlJbml0ZWQ9ZnVuY3Rpb24oKXtpZighdGhpcy5pbml0ZWQpe3RoaXMuaW5pdGVkPSEwO3ZhciBlPTA7aW5pdFRzJiYoZT1wZXJmb3JtYW5jZS5ub3coKS1pbml0VHMpLHRoaXMuc2VsZi5wb3N0TWVzc2FnZSh7bXNnOiJERUNPREVSX1JFQURZIixjb3N0OmV9KX19LERlY29kZXIucHJvdG90eXBlLnN0b3JlQnVmZmVyPWZ1bmN0aW9uKGUsdCl7dCYmdC5rZXlmcmFtZSYmdGhpcy5mbHVzaCgpLHRoaXMuaW5mb2xpc3QucHVzaCh0KSx0aGlzLnN0cmVhbUJ1ZmZlci5zZXQoZSx0aGlzLnN0cmVhbUJ1ZmZlck9mZnNldCksdGhpcy5mcmFtZUxlbnNCdWZmZXJbdGhpcy5mcmFtZUxlbnNPZmZzZXRdPWUubGVuZ3RoLHRoaXMuc3RyZWFtQnVmZmVyT2Zmc2V0Kz1lLmxlbmd0aCx0aGlzLmZyYW1lTGVuc09mZnNldCs9MSx0aGlzLmJhdGNoRGVjb2RlKCl9LERlY29kZXIucHJvdG90eXBlLmJhdGNoRGVjb2RlPWZ1bmN0aW9uKGUpeyh0aGlzLmZyYW1lTGVuc09mZnNldD49QkFUQ0hfREVDT0RFX1NJWkV8fGUmJnRoaXMuZnJhbWVMZW5zT2Zmc2V0KSYmKHRoaXMuYnVmZmVyU2l6ZXMuc2V0KG5ldyBVaW50OEFycmF5KHRoaXMuZnJhbWVMZW5zQnVmZmVyLmJ1ZmZlciksMCksTW9kdWxlLl9icm9hZHdheVBsYXlTdHJlYW0xKHRoaXMuYnVmZmVyU2l6ZXNQdHIsdGhpcy5mcmFtZUxlbnNPZmZzZXQpLHRoaXMuZnJhbWVMZW5zT2Zmc2V0PTAsdGhpcy5zdHJlYW1CdWZmZXJPZmZzZXQ9MCl9LERlY29kZXIucHJvdG90eXBlLmRlY29kZT1mdW5jdGlvbihlKXt0aGlzLnN0cmVhbUJ1ZmZlci5zZXQoZSksTW9kdWxlLl9icm9hZHdheVBsYXlTdHJlYW0oZS5sZW5ndGgsMCl9LERlY29kZXIucHJvdG90eXBlLmZsdXNoPWZ1bmN0aW9uKCl7dGhpcy5iYXRjaERlY29kZSghMCksTW9kdWxlLl9icm9hZHdheUZsdXNoU3RyZWFtKCl9LERlY29kZXIucHJvdG90eXBlLmRlc3Ryb3k9ZnVuY3Rpb24oKXtNb2R1bGUuX2Jyb2Fkd2F5RXhpdCgpfSxEZWNvZGVyLnByb3RvdHlwZS51cGRhdGVNZXRhPWZ1bmN0aW9uKGUpe3RoaXMubWV0YT1lfTt2YXIgV0FTTV9DRE5fUEFUSF9QUkVGSVg9IiI7ZnVuY3Rpb24gaW5pdChlKXsoV0FTTV9DRE5fUEFUSF9QUkVGSVg9ZS5zcGxpdCgiLyIpLnNsaWNlKDAsLTEpLmpvaW4oIi8iKSxpbml0VHM9cGVyZm9ybWFuY2Uubm93KCksZGVjb2Rlcil8fChzZWxmLmltcG9ydFNjcmlwdHM/bmV3IFByb21pc2UoKGZ1bmN0aW9uKHQscil7c2VsZi5jb25zb2xlfHwoc2VsZi5jb25zb2xlPXtsb2c6ZnVuY3Rpb24oKXt9LHdhcm46ZnVuY3Rpb24oKXt9LGluZm86ZnVuY3Rpb24oKXt9LGVycm9yOmZ1bmN0aW9uKCl7fX0pO3RyeXtzZWxmLmltcG9ydFNjcmlwdHMoZSksdCgpfWNhdGNoKHMpe2lmKHMubWVzc2FnZS5pbmNsdWRlcygiTW9kdWxlIHNjcmlwdHMgZG9uJ3Qgc3VwcG9ydCBpbXBvcnRTY3JpcHRzIikpcmV0dXJuIHQoc2hpbUltcG9ydFNjcmlwdHMoZSkpO3Iocyl9fSkpOnNoaW1JbXBvcnRTY3JpcHRzKGUpKS50aGVuKChmdW5jdGlvbigpe3JldHVybiBmZXRjaChXQVNNX0NETl9QQVRIX1BSRUZJWCsiL2RlY29kZXIud29ya2VyLmpzIikudGhlbigoZnVuY3Rpb24oZSl7cmV0dXJuIGUuYmxvYigpfSkpLnRoZW4oKGZ1bmN0aW9uKGUpe3JldHVybiBzZWxmLm0oe2xvY2F0ZUZpbGU6ZnVuY3Rpb24odCl7cmV0dXJuL1wud29ya2VyXC5qcyQvLnRlc3QodCk/VVJMLmNyZWF0ZU9iamVjdFVSTChlKTovXC53YXNtJC8udGVzdCh0KT9XQVNNX0NETl9QQVRIX1BSRUZJWCsiL2RlY29kZXIud2FzbSI6L1wubWVtJC8udGVzdCh0KT9XQVNNX0NETl9QQVRIX1BSRUZJWCsiL2RlY29kZXIuanMubWVtIjp2b2lkIDB9LG1haW5TY3JpcHRVcmxPckJsb2I6V0FTTV9DRE5fUEFUSF9QUkVGSVgrIi9kZWNvZGVyLmpzIn0pfSkpLnRoZW4oKGZ1bmN0aW9uKGUpe3NlbGYuTW9kdWxlPWUsb25Qb3N0UnVuLmNhbGwoc2VsZil9KSl9KSkuY2F0Y2goKGZ1bmN0aW9uKGUpe3NlbGYucG9zdE1lc3NhZ2Uoe21zZzoiSU5JVF9GQUlMRUQiLGxvZzplLm1lc3NhZ2V9KX0pKX1zZWxmLm9ubWVzc2FnZT1mdW5jdGlvbihlKXt2YXIgdD1lLmRhdGE7aWYoImluaXQiPT09dC5tc2d8fCJwcmVsb2FkIj09PXQubXNnfHxkZWNvZGVyKXN3aXRjaCh0Lm1zZyl7Y2FzZSJwcmVsb2FkIjppbml0KHQudXJsKSxCQVRDSF9ERUNPREVfU0laRT10LmJhdGNoRGVjb2RlQ291bnQ7YnJlYWs7Y2FzZSJpbml0IjpzZWxmLm1ldGE9dC5tZXRhLEJBVENIX0RFQ09ERV9TSVpFPXQuYmF0Y2hEZWNvZGVDb3VudCxpbml0KHQudXJsKTticmVhaztjYXNlInVwZGF0ZW1ldGEiOnNlbGYubWV0YT10Lm1ldGEsZGVjb2Rlci51cGRhdGVNZXRhKHQubWV0YSk7YnJlYWs7Y2FzZSJpbml0RGVjb2RlciI6ZGVjb2Rlci5mcmFtZUxlbnNPZmZzZXQmJmRlY29kZXIuYmF0Y2hEZWNvZGUoITApLGRlY29kZXIuZmx1c2goKSxkZWNvZGVyLmRlY29kZSh0LmRhdGEpO2JyZWFrO2Nhc2UiZGVjb2RlIjpkZWNvZGVyLnN0b3JlQnVmZmVyKHQuZGF0YSx0LmluZm8pO2JyZWFrO2Nhc2UiZmx1c2giOmRlY29kZXIuZmx1c2goKTticmVhaztjYXNlImZpbmlzaF9mbGFnIjpzZWxmLnBvc3RNZXNzYWdlKHttc2c6IkJBVENIX0ZJTklTSF9GTEFHIn0pO2JyZWFrO2Nhc2UiZGVzdG9yeSI6ZGVjb2Rlci5kZXN0cm95KCl9fX0pKCk7Cg==",k9="undefined"!=typeof window&&window.Blob&&new Blob([atob(E9)],{type:"text/javascript;charset=utf-8"});function T9(){var e=k9&&(p$||window.webkitURL).createObjectURL(k9);try{return e?new Worker(e,{}):new Worker("data:application/javascript;base64,"+E9,{type:"module"})}finally{e&&(p$||window.webkitURL).revokeObjectURL(e)}}var R9="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Z1bmN0aW9uIHNoaW1JbXBvcnRTY3JpcHRzKHNyYyl7cmV0dXJuIGZldGNoKHNyYykudGhlbigoZnVuY3Rpb24oZSl7cmV0dXJuIGUudGV4dCgpfSkpLnRoZW4oKGZ1bmN0aW9uKHRleHQpe3NlbGYuZXhwb3J0cz17fSxldmFsKHRleHQpLHNlbGYubT1leHBvcnRzLm19KSl9dmFyIE1BWF9TVFJFQU1fQlVGRkVSX0xFTkdUSD0xMDQ4NTc2LGluaXRUcz0wLERlY29kZXI9ZnVuY3Rpb24oZSl7dGhpcy5pbml0ZWQ9ITEsdGhpcy5zZWxmPWUsdGhpcy5tZXRhPWUubWV0YSx0aGlzLmluZm9saXN0PVtdLGUucGFyX2Jyb2Fkd2F5T25Ccm9hZHdheUluaXRlZD10aGlzLmJyb2Fkd2F5T25Ccm9hZHdheUluaXRlZC5iaW5kKHRoaXMpLGUucGFyX2Jyb2Fkd2F5T25QaWN0dXJlRGVjb2RlZD10aGlzLmJyb2Fkd2F5T25QaWN0dXJlRGVjb2RlZC5iaW5kKHRoaXMpfSxkZWNvZGVyO2Z1bmN0aW9uIG9uUG9zdFJ1bigpeyhkZWNvZGVyPW5ldyBEZWNvZGVyKHRoaXMpKS5pbml0KCl9RGVjb2Rlci5wcm90b3R5cGUudG9VOEFycmF5PWZ1bmN0aW9uKGUsdCl7cmV0dXJuIE1vZHVsZS5IRUFQVTguc3ViYXJyYXkoZSxlK3QpfSxEZWNvZGVyLnByb3RvdHlwZS5pbml0PWZ1bmN0aW9uKCl7TW9kdWxlLl9icm9hZHdheUluaXQoKSx0aGlzLnN0cmVhbUJ1ZmZlcj10aGlzLnRvVThBcnJheShNb2R1bGUuX2Jyb2Fkd2F5Q3JlYXRlU3RyZWFtKE1BWF9TVFJFQU1fQlVGRkVSX0xFTkdUSCwwKSxNQVhfU1RSRUFNX0JVRkZFUl9MRU5HVEgpfSxEZWNvZGVyLnByb3RvdHlwZS5icm9hZHdheU9uUGljdHVyZURlY29kZWQ9ZnVuY3Rpb24oZSx0LG8saSxuLHMscil7dmFyIGE9dGhpcy5pbmZvbGlzdFswXTtpZighYXx8IWEua2V5ZnJhbWV8fHIpe3ZhciBjPU9iamVjdC5hc3NpZ24oe30sdGhpcy5pbmZvbGlzdC5zaGlmdCgpKSxkPW8sZj1vLzI7IXRoaXMubWV0YXx8NDQ0IT09dGhpcy5tZXRhLmNocm9tYUZvcm1hdCYmNDIyIT09dGhpcy5tZXRhLmNocm9tYUZvcm1hdHx8KGY9byk7dmFyIHU9dGhpcy50b1U4QXJyYXkoZSxpKmQrbipmKjIpLGw9bmV3IFVpbnQ4QXJyYXkodS5sZW5ndGgpO2wuc2V0KHUpO3ZhciBtPWwuYnVmZmVyO3RoaXMuc2VsZi5wb3N0TWVzc2FnZSh7bXNnOiJERUNPREVEIix3aWR0aDp0LGhlaWdodDpvLHlMaW5lc2l6ZTppLHV2TGluZXNpemU6bixpbmZvOmMsYnVmZmVyOm19LFttXSl9fSxEZWNvZGVyLnByb3RvdHlwZS5icm9hZHdheU9uQnJvYWR3YXlJbml0ZWQ9ZnVuY3Rpb24oKXt0aGlzLmluaXRlZD0hMDt2YXIgZT0wO2luaXRUcyYmKGU9cGVyZm9ybWFuY2Uubm93KCktaW5pdFRzKSx0aGlzLnNlbGYucG9zdE1lc3NhZ2Uoe21zZzoiREVDT0RFUl9SRUFEWSIsY29zdDplfSl9LERlY29kZXIucHJvdG90eXBlLmRlY29kZT1mdW5jdGlvbihlLHQpe3QmJnRoaXMuaW5mb2xpc3QucHVzaCh0KSx0JiZ0LmtleWZyYW1lJiYodGhpcy5pbmZvbGlzdD1bdF0pLHRoaXMuc3RyZWFtQnVmZmVyLnNldChlKSxNb2R1bGUuX2Jyb2Fkd2F5UGxheVN0cmVhbShlLmxlbmd0aCwwKX0sRGVjb2Rlci5wcm90b3R5cGUuZGVzdHJveT1mdW5jdGlvbigpe01vZHVsZS5fYnJvYWR3YXlFeGl0KCl9LERlY29kZXIucHJvdG90eXBlLnVwZGF0ZU1ldGE9ZnVuY3Rpb24oZSl7dGhpcy5tZXRhPWV9O3ZhciBXQVNNX0NETl9QQVRIX1BSRUZJWD0iIjtmdW5jdGlvbiBpbml0KGUpe1dBU01fQ0ROX1BBVEhfUFJFRklYPWUuc3BsaXQoIi8iKS5zbGljZSgwLC0xKS5qb2luKCIvIiksaW5pdFRzPXBlcmZvcm1hbmNlLm5vdygpO3ZhciB0PS9hc20vLnRlc3QoZSk7ZGVjb2Rlcnx8KHNlbGYuaW1wb3J0U2NyaXB0cz9uZXcgUHJvbWlzZSgoZnVuY3Rpb24odCxvKXtzZWxmLmNvbnNvbGV8fChzZWxmLmNvbnNvbGU9e2xvZzpmdW5jdGlvbigpe30sd2FybjpmdW5jdGlvbigpe30saW5mbzpmdW5jdGlvbigpe30sZXJyb3I6ZnVuY3Rpb24oKXt9fSk7dHJ5e3NlbGYuaW1wb3J0U2NyaXB0cyhlKSx0KCl9Y2F0Y2goaSl7aWYoaS5tZXNzYWdlLmluY2x1ZGVzKCJNb2R1bGUgc2NyaXB0cyBkb24ndCBzdXBwb3J0IGltcG9ydFNjcmlwdHMiKSlyZXR1cm4gdChzaGltSW1wb3J0U2NyaXB0cyhlKSk7byhpKX19KSk6c2hpbUltcG9ydFNjcmlwdHMoZSkpLnRoZW4oKGZ1bmN0aW9uKCl7cmV0dXJuIHQ/KGNvbnNvbGUubG9nKCJhdXRvIGluc3RhbmNlIERlY29kZXIhIiksbmV3IFByb21pc2UoKGZ1bmN0aW9uKGUsdCl7c2V0VGltZW91dCgoZnVuY3Rpb24oKXt0cnl7b25Qb3N0UnVuLmNhbGwoc2VsZiksZSgpfWNhdGNoKG8pe3Qobyl9fSkpfSkpKTpzZWxmLm0oe2luc3RhbnRpYXRlV2FzbTpmdW5jdGlvbihlLHQpe2ZldGNoKCIiLmNvbmNhdChXQVNNX0NETl9QQVRIX1BSRUZJWCwiL2RlY29kZXIud2FzbS5qcyIpKS50aGVuKChmdW5jdGlvbihlKXtyZXR1cm4gZS5hcnJheUJ1ZmZlcigpfSkpLnRoZW4oKGZ1bmN0aW9uKHQpe3JldHVybiBXZWJBc3NlbWJseS5pbnN0YW50aWF0ZSh0LGUpfSkpLnRoZW4oKGZ1bmN0aW9uKGUpe3JldHVybiB0KGUuaW5zdGFuY2UpfSkpfX0pLnRoZW4oKGZ1bmN0aW9uKGUpe3NlbGYuTW9kdWxlPWUsb25Qb3N0UnVuLmNhbGwoc2VsZil9KSl9KSkuY2F0Y2goKGZ1bmN0aW9uKGUpe3NlbGYucG9zdE1lc3NhZ2Uoe21zZzoiSU5JVF9GQUlMRUQiLGxvZzplLm1lc3NhZ2V9KX0pKX1zZWxmLm9ubWVzc2FnZT1mdW5jdGlvbihlKXt2YXIgdD1lLmRhdGE7aWYoImluaXQiPT09dC5tc2d8fCJwcmVsb2FkIj09PXQubXNnfHxkZWNvZGVyKXN3aXRjaCh0Lm1zZyl7Y2FzZSJwcmVsb2FkIjppbml0KHQudXJsKTticmVhaztjYXNlImluaXQiOnNlbGYubWV0YT10Lm1ldGEsc2VsZi5wb3N0TWVzc2FnZSh7bXNnOiJMT0ciLGxvZzoid29ya2VyIGluaXRlZCJ9KSxpbml0KHQudXJsKTticmVhaztjYXNlInVwZGF0ZW1ldGEiOnNlbGYubWV0YT10Lm1ldGEsZGVjb2Rlci51cGRhdGVNZXRhKHQubWV0YSk7YnJlYWs7Y2FzZSJpbml0RGVjb2RlciI6ZGVjb2Rlci5kZWNvZGUodC5kYXRhKTticmVhaztjYXNlImRlY29kZSI6ZGVjb2Rlci5kZWNvZGUodC5kYXRhLHQuaW5mbyk7YnJlYWs7Y2FzZSJmaW5pc2hfZmxhZyI6c2VsZi5wb3N0TWVzc2FnZSh7bXNnOiJCQVRDSF9GSU5JU0hfRkxBRyJ9KTticmVhaztjYXNlImRlc3RvcnkiOmRlY29kZXIuZGVzdHJveSgpfX19KSgpOwo=",S9="undefined"!=typeof window&&window.Blob&&new Blob([atob(R9)],{type:"text/javascript;charset=utf-8"});function w9(){var e=S9&&(p$||window.webkitURL).createObjectURL(S9);try{return e?new Worker(e,{}):new Worker("data:application/javascript;base64,"+R9,{type:"module"})}finally{e&&(p$||window.webkitURL).revokeObjectURL(e)}}var D9=new(function(){function e(){by(this,e),Ty(this,"_queue",[]),Ty(this,"_pendingDecoder",null),Ty(this,"TAG","DecoderCache")}return ky(e,[{key:"genDecoder",value:function(e){return this._initDecoder(e)}},{key:"_initDecoder",value:function(e){var t=this,n=JW(),r=n.preloadDecoder,i=n.maxDecodeOnceWasm;e=e||r;var o,a,s=KW(),u=s.H264_DECODER_URL,c=s.H265_SIMD_DECODER_URL,l=s.H265_DECODER_URL,h=s.H265_THREAD_DECODER_URL,A=1;if("h265"===e&&(zW()?(o=new b9,a=c,A=2):qW()&&JW().canUseThreadMode?(o=new T9,a=h,A=1):(o=new b9,a=l,A=3)),"h264"===e&&(o=new w9,a=u,A=3),!o)return Zp.resolve();var d,f,v,p=((v=new Zp((function(e,t){d=e,f=t}))).resolve=d,v.reject=f,v);o.postMessage({msg:"preload",batchDecodeCount:i,url:a}),this._pendingDecoder=o,o.id=kG()+ug(1e3*Math.random()),o.isHevc="h265"===e,o.using=!1,o.ready=!1,fW.log(this.TAG,"start init decoder worker, id=",o.id,"hevc=",o.isHevc,"mode=",A);var m=function e(n){t._pendingDecoder=null;var r=n.data.msg;switch("DECODER_READY"!==r&&"INIT_FAILED"!==r||(o.removeEventListener("message",e),o.removeEventListener("error",y)),r){case"DECODER_READY":fW.log(t.TAG,"decoder worker inited!, id=",o.id,"cost:",n.data.cost),o.ready=!0,o.using||t._queue.push(o),p.resolve();break;case"INIT_FAILED":fW.log(t.TAG,"decoder worker init failed!",n.data.log),p.reject(n.data.log)}},y=function e(t){o.removeEventListener("message",m),o.removeEventListener("error",e),p.reject(null==t?void 0:t.message)};return o.addEventListener("message",m),o.addEventListener("error",y),p}},{key:"cacheDecoder",value:function(e){var t;e.using=!1,e.ready=!0,e.id||(e.id=kG()+ug(1e3*Math.random())),this._queue.push(e),fW.log(this.TAG,"cache decoder, id=",e.id),"h265"===JW().preloadDecoder&&1===Vl(t=this._queue).call(t,(function(e){return!e.using&&e.isHevc})).length&&this.genDecoder("h265")}},{key:"getCachedDecoder",value:function(e){var t,n,r,i,o=vQ(t=this._queue).call(t,(function(t){return!t.using&&t.isHevc===e}));-1!==o&&(r=PQ(i=this._queue).call(i,o,1)[0]);if(!r&&this._pendingDecoder&&(r=this._pendingDecoder,this._pendingDecoder=null),r)return r.using=!0,fW.warn(this.TAG,dg(n="get cached decoder, id=".concat(r.id,", ready=")).call(n,r.ready)),r}}]),e}()),I9=JW().maxDecodeOnceWasm,C9=function(e){Ry(n,e);var t=Iy(n);function n(){var e,r;by(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Ty(Dy(r=t.call.apply(t,dg(e=[this]).call(e,o))),"TAG","WasmController"),Ty(Dy(r),"_avccpushed",!1),Ty(Dy(r),"_maxDecodeOnce",I9),Ty(Dy(r),"_continueDecodeThreshold",I9/2),Ty(Dy(r),"_wasmInitCost",0),Ty(Dy(r),"_threadSupported",qW()&&JW().canUseThreadMode),Ty(Dy(r),"_simdSuppported",zW()),Ty(Dy(r),"_decoderMode",window.WebAssembly?3:4),r}return ky(n,[{key:"wasmInitCost",get:function(){var e;return null===(e=this._decoderWorker)||void 0===e?void 0:e._wasmInitCost}},{key:"isHevc",get:function(){var e;return null===(e=this._parent)||void 0===e?void 0:e.isHevc}},{key:"_selectDecodeWorker",value:function(){this.analyse.addWasmInit();var e,t=KW(),n=t.H264_DECODER_URL,r=t.H265_DECODER_URL,i=t.H265_THREAD_DECODER_URL,o=t.H265_SIMD_DECODER_URL,a=t.ASM_H264_DECODER_URL,s=t.ASM_H265_DECODER_URL;return fW.log(this.TAG,"start init wasm worker:",performance.now(),"hevc:",this.isHevc,"decoderMode:",this._decoderMode),this.isHevc?(e=1===this._decoderMode?i:2===this._decoderMode?o:3===this._decoderMode?r:s)?{decoder:1===this._decoderMode?new T9:new b9,url:e}:void this._workerErrorCallback("no found decoder url, decodeMode:".concat(this._decoderMode)):(e=4===this._decoderMode?a:n)?{decoder:new w9,url:e}:void this._workerErrorCallback("no found decoder url, decodeMode:".concat(this._decoderMode))}},{key:"_initWorker",value:function(){this.isHevc&&(this._threadSupported&&(this._decoderMode=1),this._simdSuppported&&(this._decoderMode=2)),this._initDecodeWorkerInternal()}},{key:"_initDecodeWorkerInternal",value:function(){var e=D9.getCachedDecoder(this.isHevc);if(e)return fW.warn(this.TAG,"select decoder from cache"),this.analyse.addWasmInit(),this._avccpushed=!1,this._bindWorkerEvent(e),this._decoderWorker=e,void(e.ready&&(this._decoderReady=!0,this._initDecoderWithConfiguration(e,this.meta),this._workerMessageCallback({type:"DECODER_READY",data:e}),fW.log(this.TAG,"decoder ready!")));var t=this._selectDecodeWorker()||{},n=t.decoder,r=t.url;n&&(this._avccpushed=!1,this._bindWorkerEvent(n),n.isHevc=this.isHevc,n.postMessage({msg:"init",meta:this.meta,batchDecodeCount:I9,url:r}),this._decoderWorker=n)}},{key:"_bindWorkerEvent",value:function(e){var t=this,n=function(n,r){fW.log(t.TAG,"worker failed: ",n,r),t._terminateWorker(e),t._decoderWorker=null,!1===JW().wasmFallbackToAsm||4===t._decoderMode?t._workerErrorCallback(n):(t._decoderMode=1===t._decoderMode||2===t._decoderMode?3:4,t._initDecodeWorkerInternal())};e._onMessage=function(r){var i,o;switch(r.data.msg){case"DECODER_READY":if(fW.log(t.TAG,"wasm worker ready!","cost:",r.data.cost),t._decoderReady=!0,e._wasmInitCost=ug(r.data.cost),!t.meta)return;t._avccpushed||t._initDecoderWithConfiguration(e,t.meta),t.emit(WY.VIDEO_DECODER_INIT,e),t._workerMessageCallback({type:"DECODER_READY",data:e});break;case"DECODED":if(t._inDecoding=!0,(null===(i=r.data)||void 0===i||null===(o=i.info)||void 0===o?void 0:o.id)!==t._id)return;t._workerMessageCallback({type:"RECEIVE_FRAME",data:r.data});break;case"BATCH_FINISH_FLAG":if(t._inDecoding=!1,!t._workerMessageCallback)return;t._workerMessageCallback({type:"BATCH_FINISH"});break;case"INIT_FAILED":n(r.data.log,1)}},e._onError=function(e){n(e.message,2)},e.addEventListener("message",e._onMessage),e.addEventListener("error",e._onError)}},{key:"_initDecoderWithConfiguration",value:function(e,t){var n;fW.log(this.TAG,"init decoder with configuration"),this._avccpushed=!0,e.postMessage({msg:"updatemeta",meta:t});var r=t.rawVps||t.vps[0],i=t.rawSps||t.sps[0],o=t.rawPps||t.pps[0],a=Vl(n=[r,i,o]).call(n,Boolean),s=TY(a).call(a,(function(e,t){return e+(t.byteLength+4)}),0),u=new Uint8Array(s),c=0;$l(a).call(a,(function(e){u.set([0,0,0,1],c),c+=4,u.set(e,c),c+=e.byteLength})),e.postMessage({msg:"initDecoder",data:u})}},{key:"destroy",value:function(){if(this._decoderWorker)return JW().reuseWasmDecoder?(this._offWorkerBind(this._decoderWorker),void D9.cacheDecoder(this._decoderWorker)):void this._terminateWorker(this._decoderWorker)}},{key:"_offWorkerBind",value:function(e){e.removeEventListener("message",e._onMessage),e.removeEventListener("error",e._onError),e.postMessage({msg:"flush"}),e._onMessage=null,e._onError=null,fW.log(this.TAG,"flush decoder and unbind worker event")}},{key:"_terminateWorker",value:function(e){this._offWorkerBind(e),e.postMessage({msg:"destroy"}),e.terminate(),fW.log(this.TAG,"destroy decoder worker")}}]),n}(d9),L9=function(e){Ry(n,e);var t=Iy(n);function n(){var e,r;by(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Ty(Dy(r=t.call.apply(t,dg(e=[this]).call(e,o))),"TAG","VideoRenderWithDecoder"),Ty(Dy(r),"_hideRenderFlag",0),Ty(Dy(r),"_recentMeta",null),Ty(Dy(r),"_inChaseFrame",!1),Ty(Dy(r),"_decoderErrorCallback",(function(e){r._emitTimelineEvents(YY.PLAY_EVENT,NY.ERROR,r._assembleErr(e,1))})),Ty(Dy(r),"_decoderMessageCallback",(function(e){var t,n,i,o=e.type,a=e.data;switch(o){case"DECODER_READY":if(r.analyse.addWasmReady(),!r._frameRender){var s=CW(r._config,{meta:r._meta,canvas:r._canvas,type:r._decodeController.webcodec?"2d":""});try{r._canvas.glInstance?(r._frameRender=r._canvas.glInstance,r._frameRender.updateBind(Dy(r),r._meta),fW.warn(r.TAG,"reuse canvas and context")):(r._frameRender=new i9(s,Dy(r)),fW.log(r.TAG,"create frameRender with config",s))}catch(E6){r._emitTimelineEvents(YY.PLAY_EVENT,NY.ERROR,r._assembleErr(E6&&E6.message,2))}}r._startDecode();break;case"RECEIVE_FRAME":if(r._inChaseFrame&&(null===(t=r._decodeController)||void 0===t||!t.webcodec))return;r._receiveFrame(a);break;case"BATCH_FINISH":null===(n=Dy(r))||void 0===n||n._decodeEstimate.resetDecodeDot(),r._inChaseFrame&&(r._inChaseFrame=!1,r._frameQueue.empty()),r._ready||r.inSeeking||null===(i=r._decodeController)||void 0===i||!i.decoderReady||r._startDecode()}})),r}return ky(n,[{key:"wasmInitCost",get:function(){var e;return null===(e=this._decodeController)||void 0===e?void 0:e.wasmInitCost}},{key:"hevcThread",get:function(){return 1===this.decodeMode}},{key:"lowlatency",get:function(){return this._parent.lowlatency}},{key:"nextFrameTime",get:function(){var e=this._frameQueue.nextFrame();return(e&&e.info&&e.info.dts||0)/1e3}},{key:"ajustSeekTime",value:function(e,t){var n;fW.log(this.TAG,"ajust seek time: ",e),this._frameQueue.empty(),null===(n=this._decodeController)||void 0===n||n.flushDecoder(),this._switchVideoBuffer(e,t)}},{key:"canSeek",value:function(){return!0}},{key:"_appendChunk",value:function(e){var t;if(!this.noVideo&&this._timeRange){if(this._meta){if(this._recentMeta.width!==e.width||this._recentMeta.height!==e.height){var n,r,i;fW.warn(this.TAG,dg(n=dg(r=dg(i="metadata changed! width: ".concat(this._recentMeta.width," -> ")).call(i,e.width,", height: ")).call(r,this._recentMeta.height," -> ")).call(n,e.height));var o=e.samples[0];o&&(this._recentMeta=o.meta=CW({},e,{samples:null}))}}else{this._emitTimelineEvents(YY.PLAY_EVENT,NY.LOADEDMETADATA),this._recentMeta=this._meta=CW({},e,{samples:null}),fW.warn(this.TAG,"video set metadata",this._meta,"configuration:",this.configuration);var a=e.fpsNum/e.fpsDen;a?fW.log(this.TAG,"detect fps:",a):fW.warn(this.TAG,"no detect fps,start estimate"),this._selectDecoder(),this._initDecoder()}if(this._timeRange.append(e.samples,this._isLive&&this.noAudio,!this.videoDecode),e.samples=[],!this.inSeeking){var s;if(this.isLive||this._timeRange.frameLength||this._switchVideoBuffer(this._parent.currentTime),!this._ready&&null!==(t=this._decodeController)&&void 0!==t&&t.decoderReady)!this.noAudio&&null!==(s=this._decodeController)&&void 0!==s&&s.inDecoding||this._startDecode();this.noAudio&&this._emitTimelineEvents(YY.PLAY_EVENT,NY.DURATION_CHANGE)}}}},{key:"_selectDecoder",value:function(){if(!this.isHevc&&y9.isSupported())return this._decodeController=new y9(this),void(this._decodeEstimate.webcodec=!0);this._decodeController=new C9(this)}},{key:"_initDecoder",value:function(){var e;null===(e=this._decodeController)||void 0===e||e.init(this._decoderMessageCallback,this._decoderErrorCallback)}},{key:"_startDecode",value:function(){var e;null===(e=this._decodeController)||void 0===e||e.doDecode()}},{key:"_switchVideoBuffer",value:function(e,t){var n=this._timeRange.switchBuffer(e);if(n){var r;if(this.noAudio&&this._parent.emit(YY.SYNC_DTS,this.getDtsOfTime(n.start)),t)return void(null===(r=this._decodeController)||void 0===r||r.preciseSeek(e));this._startDecode(t)}}},{key:"_checkToDecode",value:function(){var e;this.inSeeking||null===(e=this._decodeController)||void 0===e||e.checkToDecode(this._frameQueue.length)}},{key:"_render",value:function(e){var t;if(!this.noVideo){var n=this._frameQueue&&this._frameQueue.nextFrame();if(n){var r=n.info;if(!r)return this._frameQueue.shift(),void console.error("not info");this._renderDts=r.dts;var i=r.dts-this.preciseVideoDts;if(!(!e&&i>0&&i<6e4)){var o,a,s,u,c,l;if(this._frameQueue.shift(this.preciseVideoDts),Math.abs(this._lastTimeupdate-r.dts)>250&&(this._emitTimelineEvents(YY.PLAY_EVENT,NY.TIMEUPDATE,{pts:r.originPts/90}),this._lastTimeupdate=r.dts),fW.long)fW.log(this.TAG,dg(o=dg(a=dg(s=dg(u=dg(c=dg(l="render delay:".concat(i," , timelinePosition:")).call(l,this.preciseVideoDts," , dts:")).call(c,r.dts," , cost:")).call(u,r.cost," , gopID:")).call(s,r.gopId," , rest:")).call(a,this._frameQueue.length,", buffer frame:")).call(o,this._timeRange.frameLength));var h=performance.now();this._hideRenderFlag++,("visible"===document.visibilityState||this._hideRenderFlag%15)&&this._frameRender.render(n.buffer,n.width,n.height,n.yLinesize,n.uvLinesize),null!==(t=this._decodeController)&&void 0!==t&&t.webcodec&&n.buffer.close(),this._renderCost=performance.now()-h,this._checkToDecode()}}else{var A;if(fW.log(this.TAG,"lack frame, ","inDecoding:",null===(A=this._decodeController)||void 0===A?void 0:A.inDecoding),this._checkToDecode(),this.noAudio){var d;if(!this.isLive&&Math.abs(this.currentTime-this.duration)<.5)return null==this||this._emitTimelineEvents(YY.PLAY_EVENT,NY.TIMEUPDATE),null==this||this._emitTimelineEvents(YY.PLAY_EVENT,NY.ENDED),void(null===(d=this._timeRange)||void 0===d||d.clean());this._timeRange.frameLength||(this._ready=!1,this.emit(WY.VIDEO_WAITING))}}}}},{key:"_updateSegmentEnd",value:function(e){var t;null===(t=this._timeRange)||void 0===t||t.updateSegmentEnd(e)}},{key:"_doChaseFrame",value:function(e){var t=e.frame;this._inChaseFrame=!0,this._timeRange.deletePassed(t.dts),this._frameQueue.empty(),this.noAudio&&this._parent.emit(YY.SYNC_DTS,t.dts)}},{key:"_destroy",value:function(e){var t;fW.log(this.TAG,"destroy video render"),Cy(Sy(n.prototype),"destroy",this).call(this,e),null===(t=this._decodeController)||void 0===t||t.destroy(),this._decodeController=null}}]),n}(u9),V9=.1,x9=function(e){Ry(n,e);var t=Iy(n);function n(e,r){var i;return by(this,n),(i=t.call(this)).TAG="TimeLine",i._parent=r,i._seeking=!1,i.audioRender=$3.isSupported()?new $3(e,Dy(i)):new aQ(e,Dy(i)),i.videoRender=new L9(e,Dy(i)),i._readyStatus={audio:!1,video:!1},i._paused=!0,i._switchToMultiWorker=!1,i._lowdecodeEmited=!1,i._startPlayed=!1,i._emitReady=!1,i._lastSeekTime=1e-4,i._singleTrack=-1,i._bindEvent(),i._decodeVideo=e.video,i}return ky(n,[{key:"analyse",get:function(){return this._parent.analyse}},{key:"ready",get:function(){return this._readyStatus.video&&this._readyStatus.audio}},{key:"played",get:function(){var e=this;return{length:this.currentTime?1:0,start:function(){return 0},end:function(){return e.currentTime}}}},{key:"noAudio",get:function(){return 1===this._singleTrack||2===this._singleTrack}},{key:"isLive",get:function(){return this._parent.live}},{key:"seeking",get:function(){return this._seeking}},{key:"decodeFps",get:function(){return this.videoRender.decodeFps}},{key:"decodeCost",get:function(){return this.videoRender.decodeCost}},{key:"renderCost",get:function(){return this.videoRender.renderCost}},{key:"wasmInitCost",get:function(){return this.videoRender.wasmInitCost}},{key:"fps",get:function(){return this.videoRender.fps}},{key:"totalSize",get:function(){return this.videoRender.totalSize}},{key:"bitrate",get:function(){return this.videoRender.bitrate}},{key:"gopLength",get:function(){return this.videoRender.gopLength}},{key:"currentTime",get:function(){return this.noAudio?this.paused?this.videoRender.nextFrameTime:this.videoRender.currentTime:this.audioRender.currentTime}},{key:"timelinePosition",get:function(){return this.noAudio?performance.now()/1e3:this.audioRender.currentTime}},{key:"canvas",get:function(){return this.videoRender.canvas}},{key:"readyState",get:function(){return this.videoRender.readyState}},{key:"buffered",get:function(){var e=this;return this.noAudio?this.videoRender.buffered:this.isLive?this.audioRender.buffered:{length:this.audioRender.buffered.length,start:function(t){return Math.max(e.audioRender.buffered.start(t),e.videoRender.buffered.start(t))},end:function(t){return Math.min(e.audioRender.buffered.end(t),e.videoRender.buffered.end(t))}}}},{key:"duration",get:function(){return this.noAudio?this.videoRender.duration:this.isLive?this.audioRender.duration:Math.min(this.audioRender.duration,this.videoRender.duration)}},{key:"paused",get:function(){return this._paused},set:function(e){this._paused=e}},{key:"lowlatency",get:function(){return this._parent.lowlatency}},{key:"decoderMode",get:function(){return this.videoRender.decoderMode}},{key:"currentAudioCanAutoplay",get:function(){return this.audioRender.audioCanAutoplay}},{key:"_getController",value:function(e,t){return e?new A9(t,this):new L9(t,this)}},{key:"_checkInBuffer",value:function(){for(var e=this.buffered,t=0,n=e.length;t<n;t++)if(e.start(t)<=this.currentTime+V9&&e.end(t)>=this.currentTime)return!0;return!1}},{key:"_resetReadyStatus",value:function(){this._readyStatus.audio=!1,this._readyStatus.video=!1}},{key:"_bindEvent",value:function(){var e=this;this.on(XY.REMUX,(function(t){e.videoRender.setRemux(t)})),this.on(XY.CHASE_VIDEO_FRAME_END,(function(t){e.emit(XY.CHASE_AUDIO_FRAME,t)})),this.audioRender.on(MY.AUDIO_READY,(function(){fW.log(e.TAG,"audio ready! seeking=",e._seeking),e._seeking&&Lg((function(){try{var t=e.videoRender.getSeekStartPosition(e.currentTime,1/0);if(e.audioRender.isMse&&t)return JW().preciseSeek>e.duration&&e.currentTime>V9?(e.audioRender.seekNoSideEffect({position:e.currentTime+V9}),void e.videoRender.ajustSeekTime(e.currentTime,!0)):(e.audioRender.seekNoSideEffect({position:t.position+V9}),void e.videoRender.ajustSeekTime(t.position));e.videoRender.ajustSeekTime(e.currentTime)}catch(E6){}}),10),e._readyStatus.video&&e._startRender(),e._readyStatus.audio=!0,e._startPlayed||e.analyse.addAudioReady()})),this.audioRender.on(MY.AUDIO_NOT_ALLOWED_AUTOPLAY,(function(){e._emitReady&&e.pause()})),this.audioRender.on(MY.AUDIO_WAITING,(function(){!e.noAudio&&e.currentTime&&(fW.warn(e.TAG,"lack data, audio waiting,currentTime:",e.currentTime),e.emit(YY.PLAY_EVENT,NY.TIMEUPDATE),e.emit(YY.PLAY_EVENT,NY.WAITING),e.emit(YY.DO_PAUSE),e._readyStatus.audio=!1)})),this.videoRender.on(WY.VIDEO_WAITING,(function(){fW.warn(e.TAG,"lack data, video waiting"),e.emit(YY.PLAY_EVENT,NY.WAITING),e.emit(YY.DO_PAUSE),e._readyStatus.video=!1})),this.videoRender.on(WY.VIDEO_READY,(function(){fW.log(e.TAG,"video ready!"),e._startPlayed||e.analyse.addVideoReady(),e._readyStatus.audio&&e._startRender("video"),e._readyStatus.video=!0})),this.videoRender.on(WY.DECODE_LOW_FPS,(function(){e.currentTime<2||(e.analyse.increaseLowDecodeCount(),e._lowdecodeEmited||(rY++,e._lowdecodeEmited=!0),e.emit(YY.PLAY_EVENT,NY.LOW_DECODE))})),this.on(YY.SINGLE_TRACK,(function(t){e._singleTrack=t,1!==t&&2!==t||(e._readyStatus.audio=!0),3===t&&(e._readyStatus.video=!0),e.emit(YY.SYNC_DTS,0)})),this.on(YY.DESTROY,(function(){e.removeAllListeners(),e.videoRender=null,e.audioRender=null})),this.on(YY.DO_PLAY,(function(){e.emit(YY.START_RENDER),e._paused=!1,e._lastSeekTime=1e-4,e.noAudio&&e.emit(YY.SYNC_DTS,0)}))}},{key:"_startRender",value:function(e){if(!this._parent.error&&this.videoRender){if(this.noAudio&&this.emit(YY.SYNC_DTS,0),this.videoRender.forceRender(),!this.isLive&&this._paused&&this.seeking&&this._checkInBuffer())return fW.log(this.TAG,"set seeking = false"),this._seeking=!1,this.emit(YY.PLAY_EVENT,NY.SEEKED),void fW.groupEnd();this._startPlayed||(this.analyse.addFirstframe(),this.emit(YY.PLAY_EVENT,NY.LOADEDDATA),this.emit(YY.PLAY_EVENT,NY.FIRST_FRAME),this._startPlayed=!0),fW.log(this.TAG,"emit canplay"),this.emit(YY.PLAY_EVENT,NY.CANPLAY),this._parent.autoplay?(fW.warn(this.TAG,"startRender: time=",this.currentTime,"paused:",this.paused,"seeking:",this.seeking),this.emit(YY.START_RENDER,e)):(this._parent.autoplay=!0,this.emit(YY.PLAY_EVENT,NY.PAUSE)),this.emit(YY.READY),this._emitReady=!0,this._seeking&&this._checkInBuffer()&&(fW.log(this.TAG,"set seeking = false"),this._seeking=!1,this.emit(YY.PLAY_EVENT,NY.SEEKED),fW.groupEnd())}}},{key:"_checkHlsTracks",value:function(e){if(!(null==e?void 0:e.samples[0])){if(!this.buffered.length){var t=new Error("lack video sample");t.code=3,this.emit(YY.PLAY_EVENT,NY.ERROR,t)}return!1}return!0}},{key:"appendBuffer",value:function(e,t){this.emit(YY.APPEND_CHUNKS,e,t),this.noAudio&&this._seeking&&this.videoRender.ajustSeekTime(this.currentTime)}},{key:"play",value:function(){var e=this;return new Zp((function(t,n){var r=e.currentAudioCanAutoplay;e.noAudio?r=!0:e.audioRender&&e.audioRender.resume().then((function(){var t;if(fW.log(e.TAG,dg(t="audio render resumed, pause status: ".concat(e._paused,", audioCanAutoplay:")).call(t,e.currentAudioCanAutoplay)),e._paused||!e.currentAudioCanAutoplay)return r=!1,void e.emit(YY.DO_PAUSE);r=!0})).catch((function(){})),Lg((function(){var i;return fW.log(e.TAG,dg(i="play() timer done, resumed=".concat(r,", paused=")).call(i,e.paused)),r?e.videoRender&&!e.videoRender.canAutoPlay?(console.warn("video render an't autoplay"),e.pause(),void t()):(e._paused=!1,void t()):e.paused?void 0:(fW.log(e.TAG,"audioCtx can't autoplay"),e.pause(),void n({name:"NotAllowedError"}))}),e.audioRender.isMse?10:60)}))}},{key:"pause",value:function(){this._paused||!this.ready&&!this._seeking||(this.emit(YY.DO_PAUSE),this._paused=!0,this.emit(YY.PLAY_EVENT,NY.PAUSE))}},{key:"seek",value:function(e){var t=this;if(this._seeking&&fW.groupEnd(),this.isLive){if(this.currentTime<V9||!this.currentAudioCanAutoplay||this.paused)return;var n=this.videoRender.getSeekStartPosition(e,this._parent.preloadTime+1);if(n){if(n.position<this.currentTime)return;var r=this.audioRender.canSeek(n.position),i=this.videoRender.canSeek(n);if(!r||!i)return void fW.log(this.TAG,"seek, !!!!!!!!!can not seek, audioCanSeek:",r,"videoCanSeek:",i);fW.warn(this.TAG,"seek, chase frame to time: ",n.position,"currentTime:",this.currentTime,"duration:",this.duration),this.videoRender.videoDecode?(this.audioRender.doPause(),n.position=n.position-1.5,this.emit(XY.CHASE_VIDEO_FRAME,n)):this.emit(YY.CHASE_FRAME,n)}}else this._lastSeekTime!==e&&(e&&Math.abs(this._lastSeekTime-e)<=.2||(this._lastSeekTime=e,e>=this.duration&&(e=this.duration-1),e<0&&(e=0),fW.group(this.TAG,"start seek to:".concat(e,", set seeking status=true")),this._seeking=!0,this.videoRender.setSeekingStatus(!0),this.noAudio?(this.emit(YY.SYNC_DTS,this.videoRender.getDtsOfTime(e)),this.videoRender.ajustSeekTime(e)):this._resetReadyStatus(),this.emit(YY.DO_SEEK,e),new Zp((function(e){t.emit(YY.PLAY_EVENT,NY.SEEKING),e()}))))}}]),n}(lY),F9=I,G9=p,O9=di,Z9=z,P9=G9(x.f),U9=G9([].push),N9=function(e){return function(t){for(var n,r=Z9(t),i=O9(r),o=i.length,a=0,s=[];o>a;)n=i[a++],F9&&!P9(r,n)||U9(s,e?[n,r[n]]:r[n]);return s}},B9={entries:N9(!0),values:N9(!1)}.entries;In({target:"Object",stat:!0},{entries:function(e){return B9(e)}});var M9=n(te.Object.entries),W9=_b,Y9=S_,X9=WS,Q9=sR,j9=Y9(tR.f),H9=Y9([].push),J9=function(e){return function(t){for(var n,r=Q9(t),i=X9(r),o=i.length,a=0,s=[];o>a;)n=i[a++],W9&&!j9(r,n)||H9(s,e?[n,r[n]]:r[n]);return s}},K9={entries:J9(!0),values:J9(!1)}.entries;cS({target:"Object",stat:!0},{entries:function(e){return K9(e)}});var z9=cS,q9=S_,$9=aT,e6=iF,t6=function(e){var t=lJ(hJ(this)),n="",r=cJ(e);if(r<0||r==1/0)throw AJ("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n},n6=__,r6=RangeError,i6=String,o6=Math.floor,a6=q9(t6),s6=q9("".slice),u6=q9(1..toFixed),c6=function(e,t,n){return 0===t?n:t%2==1?c6(e,t-1,n*e):c6(e*e,t/2,n)},l6=function(e,t,n){for(var r=-1,i=n;++r<6;)i+=t*e[r],e[r]=i%1e7,i=o6(i/1e7)},h6=function(e,t){for(var n=6,r=0;--n>=0;)r+=e[n],e[n]=o6(r/t),r=r%t*1e7},A6=function(e){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==e[t]){var r=i6(e[t]);n=""===n?r:n+a6("0",7-r.length)+r}return n};z9({target:"Number",proto:!0,forced:n6((function(){return"0.000"!==u6(8e-5,3)||"1"!==u6(.9,0)||"1.25"!==u6(1.255,2)||"1000000000000000128"!==u6(0xde0b6b3a7640080,0)}))||!n6((function(){u6({})}))},{toFixed:function(e){var t,n,r,i,o=e6(this),a=$9(e),s=[0,0,0,0,0,0],u="",c="0";if(a<0||a>20)throw r6("Incorrect fraction digits");if(o!=o)return"NaN";if(o<=-1e21||o>=1e21)return i6(o);if(o<0&&(u="-",o=-o),o>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(o*c6(2,69,1))-69)<0?o*c6(2,-t,1):o/c6(2,t,1),n*=4503599627370496,(t=52-t)>0){for(l6(s,0,n),r=a;r>=7;)l6(s,1e7,0),r-=7;for(l6(s,c6(10,r,1),0),r=t-1;r>=23;)h6(s,1<<23),r-=23;h6(s,1<<r),l6(s,1,1),h6(s,2),c=A6(s)}else l6(s,0,n),l6(s,1<<-t,0),c=A6(s)+a6("0",a);return c=a>0?u+((i=c.length)<=a?"0."+a6("0",a-i)+c:s6(c,0,i-a)+"."+s6(c,i-a)):u+c}});var d6={FIRST_DATA:1,AUDIO_MSE_OPEN_START:2,AUDIO_MSE_OPEND:3,AUDIO_FIRSTTIME_APPENDED:4,AUDIO_READY:5,WASM_WORKER_INIT:6,WASM_WORKER_READY:7,FIRST_FRAME_TODECODE:8,VIDEO_READY:9,FIRST_FRAME:10,WAITIGN:11,SEEKING:12,SEEKED:13},f6=M9(d6),v6=function(){function e(){by(this,e),Ty(this,"_dot",[]),Ty(this,"_currentLowDecodeCount",0)}return ky(e,[{key:"getBootStats",value:function(){var e,t,n=(null===(t=this._dot[0])||void 0===t?void 0:t.dot)||0;return zg(e=this._dot).call(e,(function(e){return{action:Vl(f6).call(f6,(function(t){return t[1]===e.action}))[0][1],dot:ug(e.dot-n)}}))}},{key:"getStats",value:function(e){var t,n=this.getBootStats();return{bootStats:n,bitrate:Math.abs(e.bitrate/1e3),decodeFps:e.decodeFps,fps:e.fps,playbackRate:e.playbackRate,firstframe:null===(t=Vl(n).call(n,(function(e){return 10===e.action}))[0])||void 0===t?void 0:t.dot,width:e.videoWidth,height:e.videoHeight,decoderMode:e.decoderMode,vv:nY,lowdecodeVV:rY,h265FailureRate:Number((100*iY).toFixed(2)),currentLowDecodeCount:this._currentLowDecodeCount}}},{key:"seekElapses",value:function(){for(var e=this.getBootStats(),t=[],n=0,r=0,i=e.length;r<i;r++){var o=e[r];o.action===d6.SEEKING&&(n=o.dot),o.action===d6.SEEKED&&t.push(o.dot-n)}return t}},{key:"addFirstData",value:function(){this._dot.push({action:d6.FIRST_DATA,dot:this._getTimestap()})}},{key:"addAudioBoundMedia",value:function(){this._dot.push({action:d6.AUDIO_BOUND_MEDIA,dot:this._getTimestap()})}},{key:"addAudioMseOpenStart",value:function(){this._dot.push({action:d6.AUDIO_MSE_OPEN_START,dot:this._getTimestap()})}},{key:"addAudioMseOpend",value:function(){this._dot.push({action:d6.AUDIO_MSE_OPEND,dot:this._getTimestap()})}},{key:"addAudioFirstTimeAppended",value:function(){this._dot.push({action:d6.AUDIO_FIRSTTIME_APPENDED,dot:this._getTimestap()})}},{key:"addAudioReady",value:function(){this._dot.push({action:d6.AUDIO_READY,dot:this._getTimestap()})}},{key:"addWasmInit",value:function(){this._dot.push({action:d6.WASM_WORKER_INIT,dot:this._getTimestap()})}},{key:"addWasmReady",value:function(){this._dot.push({action:d6.WASM_WORKER_READY,dot:this._getTimestap()})}},{key:"addFirstFrameToDecode",value:function(){this._dot.push({action:d6.FIRST_FRAME_TODECODE,dot:this._getTimestap()})}},{key:"addVideoReady",value:function(){this._dot.push({action:d6.VIDEO_READY,dot:this._getTimestap()})}},{key:"addFirstframe",value:function(){this._dot.push({action:d6.FIRST_FRAME,dot:this._getTimestap()})}},{key:"addWaiting",value:function(){this._dot.push({action:d6.WAITIGN,dot:this._getTimestap()})}},{key:"addSeeking",value:function(){this._dot.push({action:d6.SEEKING,dot:this._getTimestap()})}},{key:"addSeeked",value:function(){this._dot.push({action:d6.SEEKED,dot:this._getTimestap()})}},{key:"_getTimestap",value:function(){return performance.now()}},{key:"increaseLowDecodeCount",value:function(){this._currentLowDecodeCount++}},{key:"reset",value:function(){this._currentLowDecodeCount=0,this._dot=[]}}]),e}(),p6=1,m6=2,y6=3,g6=function(e){Ry(n,e);var t=Iy(n);function n(){var e,r,i,o,a,s,u,c;return by(this,n),(i=t.call(this)).TAG="XGVideo",i._proxyProps(),i._isLive=!0,i._vMeta=null,i._aMeta=null,i._resizeObserver=null,i._eventsBackup=[],i._hevc="h265"===JW().preloadDecoder,i._hevc||(i._degradeVideo=document.createElement("video")),i._debounceSeek=(o=Dm(e=i._seek).call(e,Dy(i)),a=300,s=kG(),u=null,c=!0,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=kG();c&&(s=kG(),c=!1,o.apply(void 0,t)),r-s>a?(s=r,o.apply(void 0,t)):(u&&window.clearTimeout(u),u=Lg((function(){o.apply(void 0,t)}),a))}),i._onTouchEnd=Dm(r=i._onTouchEnd).call(r,Dy(i)),i.analyse=new v6,i}return ky(n,[{key:"_proxyProps",value:function(){var e,t=this;$l(e=Uy(n.prototype)).call(e,(function(e){if(/^__/.test(e)){var n=e.replace("__","");Th(t,n,{get:function(){try{return this[e]}catch(E6){}return 0},set:function(t){try{this[e]=t}catch(E6){}}})}}))}},{key:"addEventListener",value:function(e,t,r){Cy(Sy(n.prototype),"addEventListener",this).call(this,e,t,r),this._degradeVideo&&this._eventsBackup.push([e,t,r])}},{key:"removeEventListener",value:function(e,t,r){var i;(Cy(Sy(n.prototype),"removeEventListener",this).call(this,e,t,r),this._degradeVideo)&&(this._eventsBackup=Vl(i=this._eventsBackup).call(i,(function(n){return!(n.eventName===e&&n.handler===t&&n.capture===r)})))}},{key:"setAttribute",value:function(e,t){var r;Cy(Sy(n.prototype),"setAttribute",this).call(this,e,t),"src"!==e&&(null===(r=this._degradeVideo)||void 0===r||r.setAttribute(e,t))}},{key:"_init",value:function(){this.analyse.reset(),this.timeline=new x9({volume:this.volume,canvas:this.querySelector("canvas"),videoContext:this.videoContext,videoDecode:this.videoDecode,maxVideoHeight:this.getAttribute("maxVideoHeight"),endLevel:ug(this.getAttribute("endLevel"))},this),fW.log(this.TAG,"timeline init"),this._noSleep=new fG,this._logFirstFrame=!1,this._playRequest=null,this._degradeVideoUserGestured=!1,this._bindEvents(),this._vMeta&&!this.videoDecode&&this.setVideoMeta(this._vMeta),this._glCtxOptions&&(this.glCtxOptions=this._glCtxOptions),this.timeline&&(this.innerDegrade&&this.timeline.emit(YY.INNER_DEGRADE),this.timeline.emit(YY.SET_PLAY_MODE,this._isLive?"LIVE":"VOD"),this.timeline.emit(YY.SET_PLAYBACKRATE,this.playbackRate),this.muted=this.muted)}},{key:"_bindEvents",value:function(){var e=this;this.timeline.on(YY.PLAY_EVENT,(function(t,n){var r;t===NY.LOADEDDATA&&(e.querySelector("canvas")||(fW.log(e.TAG,"_bindEvents, appendChild canvas"),e.appendChild(e.canvas)),e.canvas.style.display="block",null===(r=e.timeline)||void 0===r||r.emit(YY.SET_PLAYBACKRATE,e.playbackRate));if(t!==NY.LOADEDMETADATA&&t!==NY.RESIZE||Zp.resolve().then((function(){e.updateVideoPostion()})),t===NY.ERROR){if(fW.warn(e.TAG,"detect error:",null==n?void 0:n.message),e.pause(),e._disabled(!0),e.innerDegrade||5===e.decoderMode)return e.degradeInfo={decodeFps:e.decodeFps,bitrate:e.bitrate,wasmInitCost:e.wasmInitCost,fps:e.fps,url:e.src,msg:null==n?void 0:n.message,decoderMode:e.decoderMode},void e._innerDispatchEvent("lowdecode");e._err=n}if(t===NY.LOW_DECODE)return e._disabled(),e.degradeInfo={decodeFps:e.decodeFps,bitrate:e.bitrate,wasmInitCost:e.wasmInitCost,fps:e.fps,url:e.src,decoderMode:e.decoderMode},void e._innerDispatchEvent(BY[t],e.degradeInfo);if(t===NY.LARGE_AV_GAP&&(e.unsyncInfo=n),t===NY.ENDED){if(e.paused)return;e.pause()}t===NY.PROGRESS&&e._noSleep.toPlay(),t===NY.WAITING&&e.analyse.addWaiting(),t===NY.SEEKING&&e.analyse.addSeeking(),t===NY.SEEKED&&e.analyse.addSeeked(),e._innerDispatchEvent(BY[t],n)}))}},{key:"_disabled",value:function(e){(this.innerDegrade||e)&&(e?JW().disabledWhenErrorOccur&&aY(1):JW().evaluateVVCount||(this.decodeFps/this.fps<=.6&&this.bitrate<2e6?aY(1):aY(2)))}},{key:"degrade",value:function(e){var t,r=this;!!this.querySelector("canvas")?this.replaceChild(this._degradeVideo,this.canvas):this.appendChild(this._degradeVideo),this.destroy(),$l(t=this._eventsBackup).call(t,(function(e){var t,i=Ly(e,3),o=i[0],a=i[1],s=i[2];Cy(Sy(n.prototype),"removeEventListener",r).call(r,o,a,s),null===(t=r._degradeVideo)||void 0===t||t.addEventListener(o,a,s)})),this._eventsBackup=[],e&&(this._degradeVideo.muted=!1,this._degradeVideo.src=e,this._degradeVideo.load())}},{key:"disconnectedCallback",value:function(){fW.log(this.TAG,"video disconnected"),document.removeEventListener("touchend",this._onTouchEnd,!0),this.destroy(!0),this._resizeObserver&&this._resizeObserver.disconnect(this)}},{key:"connectedCallback",value:function(){var e=this;fW.log(this.TAG,"video connected to document",performance.now()),this.timeline||this._init(),this.style.width="100%",this.style.height="100%",this.style.position="absolute",this.style.left="0px",this.style.top="0px",document.addEventListener("touchend",this._onTouchEnd,!0),ResizeObserver&&(this._resizeObserver=new ResizeObserver((function(t){var n;null!==(n=e.timeline)&&void 0!==n&&n.ready&&e.updateVideoPostion()})),this._resizeObserver.observe(this))}},{key:"_onTouchEnd",value:function(){pG(),this._degradeVideoInteract(),this._noSleep&&this._noSleep.enable()}},{key:"_degradeVideoInteract",value:function(){var e=this;if(this._degradeVideo&&(1===this.innerDegrade||3===this.innerDegrade)){if(this._degradeVideoUserGestured)return;var t=this._degradeVideo.play();t&&t.then((function(){e._degradeVideo.pause(),e._degradeVideoUserGestured=!0})).catch((function(e){console.log("degrade video: ",e.message)}))}}},{key:"play",value:function(e){var t,n,r=this;if(this.timeline){fW.log(this.TAG,dg(t=dg(n="play() called, ready:".concat(this.timeline.ready,", paused:")).call(n,this.timeline.paused,", force:")).call(t,e)),this._degradeVideoInteract();var i=0;if(this.timeline.ready&&this.timeline.paused||e){if(e=e||this._isLive,this._playRequest=null,!e)return this.timeline.emit(YY.DO_PLAY),this._innerDispatchEvent("play"),Zp.resolve();this.destroy(),this._init(),i=Lg((function(){try{r._innerDispatchEvent("waiting")}catch(E6){}}),300)}return this._playRequest||!this.timeline.ready||this.timeline.paused?(fW.log(this.TAG,"request play!"),this._playRequest=this._playRequest||new Zp((function(e,t){r.timeline._paused=!1,r._innerDispatchEvent("play"),r._noSleep.enable(),r.timeline.once("ready",(function(){fW.log(r.TAG,"timeline emit ready"),clearTimeout(i),r.timeline.play().then(e).catch(t).finally((function(){r._playRequest=null}))}))})),this.autoplay=!0,this._playRequest):Zp.resolve()}}},{key:"pause",value:function(){this._playRequest=null,this.timeline&&this.timeline.pause();try{this._noSleep.disable(),(e=lG||(lG=document.querySelector("#hackAudioPP")))&&e.pause()}catch(E6){}var e}},{key:"load",value:function(){}},{key:"appendBuffer",value:function(e,t){if(this.timeline&&!this._err){if(!this._logFirstFrame){var n=e&&e.samples[0],r=t&&t.samples[0];if(!n&&!r)return;if(n||r){var i,o,a,s=(null==e?void 0:e.duration)/((null==e?void 0:e.formatTimescale)||1/0),u=(null==t?void 0:t.duration)/((null==t?void 0:t.formatTimescale)||1/0);fW.warn(this.TAG,dg(i=dg(o=dg(a="video firstDts:".concat(n&&n.dts," , audio firstDts:")).call(a,r&&r.dts," videoTrack.duration=")).call(o,s,", audioTrack.duration=")).call(i,u)),this._logFirstFrame=!0,(s||u)&&(this.setPlayMode("VOD"),this.timeline.emit(YY.SET_PLAY_MODE,this._isLive?"LIVE":"VOD"),this.duration=Math.min(s||u,u||s)),this.analyse.addFirstData()}this.lowlatency&&(fW.warn(this.TAG,"single track! type=",p6),this.timeline.emit(YY.SINGLE_TRACK,p6)),t.exist()||(fW.warn(this.TAG,"single track! type=",m6),this.timeline.emit(YY.SINGLE_TRACK,m6)),e.exist()||(fW.warn(this.TAG,"single track! type=",y6),this.timeline.emit(YY.SINGLE_TRACK,y6))}var c,l;if(e.formatTimescale)$l(c=e.samples).call(c,(function(t){t.dts=Math.floor(t.dts/e.formatTimescale*1e3),t.pts=Math.floor(t.pts/e.formatTimescale*1e3)}));if(t.formatTimescale)$l(l=t.samples).call(l,(function(e){e.dts=Math.floor(e.dts/t.formatTimescale*1e3),e.pts=Math.floor(e.pts/t.formatTimescale*1e3)}));this.timeline.appendBuffer(e,t)}}},{key:"setAudioMeta",value:function(e){this._aMeta=e,this.timeline.emit(YY.SET_METADATA,"audio",e)}},{key:"setVideoMeta",value:function(e){!this._isLive&&this._vMeta||(this.timeline.emit(YY.SET_METADATA,"video",e),this._vMeta=e)}},{key:"setDecodeMode",value:function(e){this.setAttribute("decodeMode",e)}},{key:"setPlayMode",value:function(e){this._isLive="LIVE"===e}},{key:"endOfStream",value:function(){var e;this.currentTime&&(null===(e=this.timeline)||void 0===e||e.emit(YY.END_OF_STREAM))}},{key:"updateVideoPostion",value:function(){var e;null===(e=this.timeline)||void 0===e||e.emit(WY.UPDATE_VIDEO_FILLTYPE,this.xgfillType,this.containerLayout)}},{key:"_innerDispatchEvent",value:function(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t}))}},{key:"destroy",value:function(e){this.timeline&&(this._noSleep.destroy(),fW.log(this.TAG,"call destroy"),this.timeline.emit(YY.DESTROY,e),this.querySelector("video")&&this.removeChild(this.querySelector("video")),this.timeline=null,this._err=null,this._noSleep=null,this._eventsBackup=null)}},{key:"updateObjectPosition",value:function(e,t){var n;(this.timeline.emit(WY.UPDATE_VIDEO_COVER_POSITION,this.containerLayout,e,t),this._degradeVideo)&&(this._degradeVideo.style.objectPosition=dg(n="".concat(100*e,"% ")).call(n,100*t,"%"))}},{key:"setVideoDecode",value:function(){fW.log(this.TAG,"set videoDecode",this.videoDecode),this.videoDecode&&this.timeline&&this.timeline.videoRender&&(this.timeline.videoRender.videoDecode=this.videoDecode)}},{key:"live",get:function(){return this._isLive}},{key:"lowlatency",get:function(){return"true"===this.getAttribute("lowlatency")},set:function(e){this.setAttribute("lowlatency",e)}},{key:"autoplay",get:function(){return"true"===this.getAttribute("autoplay")},set:function(e){this.setAttribute("autoplay",e)}},{key:"__canvas",get:function(){return this.timeline.canvas}},{key:"__ended",get:function(){return Math.abs(this.currentTime-this.duration)<.5}},{key:"__width",get:function(){return this.getAttribute("width")||this.videoWidth},set:function(e){var t="number"==typeof e?"".concat(e,"px"):e;this.setAttribute("width",t),this.canvas.width=e}},{key:"__height",get:function(){return this.getAttribute("height")},set:function(e){var t="number"==typeof e?"".concat(e,"px"):e;this.setAttribute("height",t),this.canvas.height=e}},{key:"__videoWidth",get:function(){return this.canvas.width}},{key:"__videoHeight",get:function(){return this.canvas.height}},{key:"__volume",get:function(){return Number(this.getAttribute("volume"))},set:function(e){e<=0&&(e=0),e>=1&&(e=1),this.setAttribute("volume",e),this.muted||this.timeline.emit(YY.UPDATE_VOLUME,e)}},{key:"__muted",get:function(){return"true"===this.getAttribute("muted")},set:function(e){this.setAttribute("muted",e),this._degradeVideoInteract(),this._noSleep.enable(),this.timeline.emit(YY.UPDATE_VOLUME,e?0:this.volume)}},{key:"__currentTime",get:function(){if(!this.timeline)return 0;var e=this.timeline.currentTime,t=this.timeline.duration;return Math.min(e,t)},set:function(e){this._debounceSeek(e)}},{key:"_seek",value:function(e){this.timeline&&(this.buffered.length||this.play(),this.paused&&!this._isLive&&0===e&&this.play(),this.timeline.seek(Number(e)))}},{key:"__duration",get:function(){return this._isLive?1/0:this.timeline.duration},set:function(e){this.timeline.emit(YY.SET_VIDEO_DURATION,e),this._innerDispatchEvent("durationchange")}},{key:"__seeking",get:function(){return this.timeline.seeking}},{key:"__paused",get:function(){return this.timeline.paused}},{key:"__fps",get:function(){return this.timeline.fps}},{key:"__decodeFps",get:function(){return this.timeline.decodeFps}},{key:"__decodeCost",get:function(){return ug(this.timeline.decodeCost)}},{key:"__renderCost",get:function(){return this.timeline.renderCost}},{key:"__wasmInitCost",get:function(){return this.timeline.wasmInitCost}},{key:"__totalSize",get:function(){return this.timeline.totalSize}},{key:"__bitrate",get:function(){return this.timeline.bitrate}},{key:"__gopLength",get:function(){return this.timeline.gopLength}},{key:"__readyState",get:function(){return this.timeline.readyState}},{key:"__buffered",get:function(){return this.timeline.buffered}},{key:"__decoderMode",get:function(){return this.timeline.decoderMode}},{key:"src",get:function(){return this.getAttribute("src")||""},set:function(e){fW.log(this.TAG,"set src ",e),this.setAttribute("src",e),this._vMeta=null,this.play(!0),this.timeline||this._init(),this._innerDispatchEvent("loadstart"),nY++}},{key:"currentSrc",get:function(){return this.getAttribute("src")||""}},{key:"playbackRate",get:function(){return Mg(this.getAttribute("playbackrate")||1)},set:function(e){var t;this.setAttribute("playbackrate",e),null===(t=this.timeline)||void 0===t||t.emit(YY.SET_PLAYBACKRATE,e)}},{key:"networkState",get:function(){return 1}},{key:"preloadTime",get:function(){var e=this.getAttribute("preloadtime");if(e){var t=Yg(e);if(t>0&&!Xg(t))return t}return 1/0},set:function(e){e&&Number(e)>0&&this.setAttribute("preloadtime",e)}},{key:"innerDegrade",get:function(){var e=this.getAttribute("innerdegrade");return ug(e)}},{key:"__glCtxOptions",set:function(e){this._glCtxOptions=e,this.timeline.emit(YY.UPDATE_GL_OPTIONS,e)}},{key:"__error",get:function(){return this._err},set:function(e){this.timeline.emit(YY.PLAY_EVENT,NY.ERROR,e)}},{key:"degradeVideo",get:function(){return this._degradeVideo}},{key:"degradeInfo",get:function(){return this._deradeInfo},set:function(e){this._deradeInfo=e}},{key:"unsyncInfo",get:function(){return this._unsyncInfo},set:function(e){this._unsyncInfo=e}},{key:"xgfillType",get:function(){return this.parentNode.getAttribute("data-xgfill")}},{key:"containerLayout",get:function(){var e=this.parentNode;return{width:e.clientWidth,height:e.clientHeight}}},{key:"videoDecode",get:function(){return"7"===this.getAttribute("decodeMode")}},{key:"audioMedia",get:function(){var e,t;return null===(e=this.timeline)||void 0===e||null===(t=e.audioRender)||void 0===t?void 0:t.media}},{key:"getStats",value:function(){return this.analyse.getStats(this)}},{key:"getSeekElapses",value:function(){return this.analyse.seekElapses()}},{key:"dump",value:function(){var e,t,n=this.buffered;return console.log(n),zg(e=a_(t=new Array(n.length)).call(t,0)).call(e,(function(e,t){return[n.start(t),n.end(t)]}))}}],[{key:"version",get:function(){return"0.1.16"}},{key:"init",value:function(e){var t=e.h264Url,r=e.h264AsmUrl,i=e.h265AsmUrl,o=e.h265Url,a=e.h265ThreadUrl,s=e.h265SimdUrl;n.h264Url=t,n.h265Url=o,n.h265AsmUrl=i,n.h264AsmUrl=r,n.h265ThreadUrl=a,n.h265SimdUrl=s}},{key:"getDecodeCapacity",value:function(){return JW()}},{key:"getDeviceCapacity",value:function(){return{simd:QW,thread:qW(),nbCpu:navigator.hardwareConcurrency}}},{key:"setDecodeCapacity",value:function(e){jW=CW({},jW,e),e.preloadDecoder&&D9.genDecoder().catch((function(){}))}},{key:"genDecoder",value:function(e){return D9.genDecoder(e)}},{key:"cleanDisabled",value:function(){uY()}},{key:"isSupported",value:function(){return!!function(){if("undefined"==typeof customElements)return!1;if($W)return!0;var e=!1,t=!1;try{var n=new(window.AudioContext||window.webkitAudioContext);n.close(),n=null,e=!0}catch(E6){}try{for(var r=document.createElement("canvas"),i=["webgl","experimental-webgl","moz-webgl","webkit-3d"],o=0;o<i.length;o++){var a=r.getContext(i[o]);if(a){a=null,r=null,t=!0;break}}$W=e&&t&&!!WebAssembly,localStorage.setItem("_sds",$W?1:0)}catch(E6){}return $W}()&&!1===sY()}}]),n}("undefined"!=typeof HTMLElement?HTMLElement:function(){});Ty(g6,"decoderCache",D9);g6.init({h264Url:"https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/decoder/1.1.1/h264/decoder.js",h264AsmUrl:"https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/decoder/1.1.1/h264/decoder_asm.js",h265Url:"https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/codec/base/decoder.js",h265SimdUrl:"https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/codec/high/decoder_1656041798666.js",h265ThreadUrl:"https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/codec/main/decoder.js",h265AsmUrl:"https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/codec/high/decoder_asm.js"}),g6.setEleName=function(e){!function(e){XW=e}(e);var t=function(e){Ry(n,e);var t=Iy(n);function n(){return by(this,n),t.apply(this,arguments)}return ky(n)}(g6);customElements.get(HW())||customElements.define(HW(),t)};try{customElements.get(HW())||customElements.define(HW(),g6)}catch(E6){}var _6=window.VePlayer.DynamicModule;VePlayer.registerPlugin(_6.PluginXgvideo,{XGVideoPlugin:g6}),e.XGVideoPlugin=g6}));
|