@volcengine/veplayer-plugin 2.0.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.
Files changed (54) hide show
  1. package/README.md +1 -0
  2. package/esm/flv.d.ts +3 -0
  3. package/esm/hls.d.ts +3 -0
  4. package/esm/index.d.ts +6 -0
  5. package/esm/index.development.css +63 -0
  6. package/esm/index.development.js +83150 -0
  7. package/esm/index.production.css +1 -0
  8. package/esm/index.production.js +26 -0
  9. package/esm/mp4.d.ts +3 -0
  10. package/esm/rtm.d.ts +3 -0
  11. package/esm/shaka.d.ts +3 -0
  12. package/esm/veplayer.plugin.flv.development.js +17622 -0
  13. package/esm/veplayer.plugin.flv.production.js +2 -0
  14. package/esm/veplayer.plugin.hls.development.js +21398 -0
  15. package/esm/veplayer.plugin.hls.production.js +2 -0
  16. package/esm/veplayer.plugin.mp4.development.js +33148 -0
  17. package/esm/veplayer.plugin.mp4.production.js +2 -0
  18. package/esm/veplayer.plugin.rtm.development.js +5469 -0
  19. package/esm/veplayer.plugin.rtm.production.js +2 -0
  20. package/esm/veplayer.plugin.shaka.development.js +15890 -0
  21. package/esm/veplayer.plugin.shaka.production.js +20 -0
  22. package/esm/veplayer.plugin.time.shift.development.css +63 -0
  23. package/esm/veplayer.plugin.time.shift.development.js +339 -0
  24. package/esm/veplayer.plugin.time.shift.production.css +1 -0
  25. package/esm/veplayer.plugin.time.shift.production.js +2 -0
  26. package/esm/veplayer.plugin.xgvideo.development.js +19094 -0
  27. package/esm/veplayer.plugin.xgvideo.production.js +2 -0
  28. package/esm/xgvideo.d.ts +3 -0
  29. package/package.json +155 -0
  30. package/umd/flv.d.ts +3 -0
  31. package/umd/hls.d.ts +3 -0
  32. package/umd/index.d.ts +6 -0
  33. package/umd/index.development.js +82776 -0
  34. package/umd/index.production.js +1 -0
  35. package/umd/mp4.d.ts +3 -0
  36. package/umd/rtm.d.ts +3 -0
  37. package/umd/shaka.d.ts +3 -0
  38. package/umd/veplayer.plugin.flv.development.js +17625 -0
  39. package/umd/veplayer.plugin.flv.production.js +1 -0
  40. package/umd/veplayer.plugin.hls.development.js +21402 -0
  41. package/umd/veplayer.plugin.hls.production.js +1 -0
  42. package/umd/veplayer.plugin.mp4.development.js +33152 -0
  43. package/umd/veplayer.plugin.mp4.production.js +1 -0
  44. package/umd/veplayer.plugin.rtm.development.js +5473 -0
  45. package/umd/veplayer.plugin.rtm.production.js +1 -0
  46. package/umd/veplayer.plugin.shaka.development.js +15894 -0
  47. package/umd/veplayer.plugin.shaka.production.js +1 -0
  48. package/umd/veplayer.plugin.time.shift.development.css +63 -0
  49. package/umd/veplayer.plugin.time.shift.development.js +342 -0
  50. package/umd/veplayer.plugin.time.shift.production.css +1 -0
  51. package/umd/veplayer.plugin.time.shift.production.js +1 -0
  52. package/umd/veplayer.plugin.xgvideo.development.js +19098 -0
  53. package/umd/veplayer.plugin.xgvideo.production.js +1 -0
  54. package/umd/xgvideo.d.ts +3 -0
@@ -0,0 +1 @@
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).__VEPLAYER_PLUGIN_XGVIDEO__=t()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n=function(e){return e&&e.Math==Math&&e},r=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||e||Function("return this")(),i=function(e){try{return!!e()}catch(t){return!0}},o=!i((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),a=o,s=Function.prototype,u=s.apply,c=s.call,l="object"==typeof Reflect&&Reflect.apply||(a?c.bind(u):function(){return c.apply(u,arguments)}),h=o,A=Function.prototype,d=A.call,f=h&&A.bind.bind(d,d),v=h?f:function(e){return function(){return d.apply(e,arguments)}},p=v,m=p({}.toString),y=p("".slice),g=function(e){return y(m(e),8,-1)},_=g,b=v,E=function(e){if("Function"===_(e))return b(e)},k="object"==typeof document&&document.all,T={all:k,IS_HTMLDDA:void 0===k&&void 0!==k},R=T.all,S=T.IS_HTMLDDA?function(e){return"function"==typeof e||e===R}:function(e){return"function"==typeof e},w={},D=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),I=o,C=Function.prototype.call,L=I?C.bind(C):function(){return C.apply(C,arguments)},V={},x={}.propertyIsEnumerable,F=Object.getOwnPropertyDescriptor,G=F&&!x.call({1:2},1);V.f=G?function(e){var t=F(this,e);return!!t&&t.enumerable}:x;var O,Z,P=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},U=i,N=g,B=Object,M=v("".split),W=U((function(){return!B("z").propertyIsEnumerable(0)}))?function(e){return"String"==N(e)?M(e,""):B(e)}:B,Y=function(e){return null==e},X=Y,Q=TypeError,j=function(e){if(X(e))throw Q("Can't call method on "+e);return e},H=W,J=j,K=function(e){return H(J(e))},z=S,q=T.all,$=T.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:z(e)||e===q}:function(e){return"object"==typeof e?null!==e:z(e)},ee={},te=ee,ne=r,re=S,ie=function(e){return re(e)?e:void 0},oe=function(e,t){return arguments.length<2?ie(te[e])||ie(ne[e]):te[e]&&te[e][t]||ne[e]&&ne[e][t]},ae=v({}.isPrototypeOf),se="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ue=r,ce=se,le=ue.process,he=ue.Deno,Ae=le&&le.versions||he&&he.version,de=Ae&&Ae.v8;de&&(Z=(O=de.split("."))[0]>0&&O[0]<4?1:+(O[0]+O[1])),!Z&&ce&&(!(O=ce.match(/Edge\/(\d+)/))||O[1]>=74)&&(O=ce.match(/Chrome\/(\d+)/))&&(Z=+O[1]);var fe=Z,ve=fe,pe=i,me=r.String,ye=!!Object.getOwnPropertySymbols&&!pe((function(){var e=Symbol();return!me(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ve&&ve<41})),ge=ye&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,_e=oe,be=S,Ee=ae,ke=Object,Te=ge?function(e){return"symbol"==typeof e}:function(e){var t=_e("Symbol");return be(t)&&Ee(t.prototype,ke(e))},Re=String,Se=function(e){try{return Re(e)}catch(t){return"Object"}},we=S,De=Se,Ie=TypeError,Ce=function(e){if(we(e))return e;throw Ie(De(e)+" is not a function")},Le=Ce,Ve=Y,xe=function(e,t){var n=e[t];return Ve(n)?void 0:Le(n)},Fe=L,Ge=S,Oe=$,Ze=TypeError,Pe={exports:{}},Ue=r,Ne=Object.defineProperty,Be=function(e,t){try{Ne(Ue,e,{value:t,configurable:!0,writable:!0})}catch(n){Ue[e]=t}return t},Me="__core-js_shared__",We=r[Me]||Be(Me,{}),Ye=We;(Pe.exports=function(e,t){return Ye[e]||(Ye[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 Xe=Pe.exports,Qe=j,je=Object,He=function(e){return je(Qe(e))},Je=He,Ke=v({}.hasOwnProperty),ze=Object.hasOwn||function(e,t){return Ke(Je(e),t)},qe=v,$e=0,et=Math.random(),tt=qe(1..toString),nt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+tt(++$e+et,36)},rt=Xe,it=ze,ot=nt,at=ye,st=ge,ut=r.Symbol,ct=rt("wks"),lt=st?ut.for||ut:ut&&ut.withoutSetter||ot,ht=function(e){return it(ct,e)||(ct[e]=at&&it(ut,e)?ut[e]:lt("Symbol."+e)),ct[e]},At=L,dt=$,ft=Te,vt=xe,pt=function(e,t){var n,r;if("string"===t&&Ge(n=e.toString)&&!Oe(r=Fe(n,e)))return r;if(Ge(n=e.valueOf)&&!Oe(r=Fe(n,e)))return r;if("string"!==t&&Ge(n=e.toString)&&!Oe(r=Fe(n,e)))return r;throw Ze("Can't convert object to primitive value")},mt=TypeError,yt=ht("toPrimitive"),gt=function(e,t){if(!dt(e)||ft(e))return e;var n,r=vt(e,yt);if(r){if(void 0===t&&(t="default"),n=At(r,e,t),!dt(n)||ft(n))return n;throw mt("Can't convert object to primitive value")}return void 0===t&&(t="number"),pt(e,t)},_t=Te,bt=function(e){var t=gt(e,"string");return _t(t)?t:t+""},Et=$,kt=r.document,Tt=Et(kt)&&Et(kt.createElement),Rt=function(e){return Tt?kt.createElement(e):{}},St=Rt,wt=!D&&!i((function(){return 7!=Object.defineProperty(St("div"),"a",{get:function(){return 7}}).a})),Dt=D,It=L,Ct=V,Lt=P,Vt=K,xt=bt,Ft=ze,Gt=wt,Ot=Object.getOwnPropertyDescriptor;w.f=Dt?Ot:function(e,t){if(e=Vt(e),t=xt(t),Gt)try{return Ot(e,t)}catch(n){}if(Ft(e,t))return Lt(!It(Ct.f,e,t),e[t])};var Zt=i,Pt=S,Ut=/#|\.prototype\./,Nt=function(e,t){var n=Mt[Bt(e)];return n==Yt||n!=Wt&&(Pt(t)?Zt(t):!!t)},Bt=Nt.normalize=function(e){return String(e).replace(Ut,".").toLowerCase()},Mt=Nt.data={},Wt=Nt.NATIVE="N",Yt=Nt.POLYFILL="P",Xt=Nt,Qt=Ce,jt=o,Ht=E(E.bind),Jt=function(e,t){return Qt(e),void 0===t?e:jt?Ht(e,t):function(){return e.apply(t,arguments)}},Kt={},zt=D&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),qt=$,$t=String,en=TypeError,tn=function(e){if(qt(e))return e;throw en($t(e)+" is not an object")},nn=D,rn=wt,on=zt,an=tn,sn=bt,un=TypeError,cn=Object.defineProperty,ln=Object.getOwnPropertyDescriptor,hn="enumerable",An="configurable",dn="writable";Kt.f=nn?on?function(e,t,n){if(an(e),t=sn(t),an(n),"function"==typeof e&&"prototype"===t&&"value"in n&&dn in n&&!n[dn]){var r=ln(e,t);r&&r[dn]&&(e[t]=n.value,n={configurable:An in n?n[An]:r[An],enumerable:hn in n?n[hn]:r[hn],writable:!1})}return cn(e,t,n)}:cn:function(e,t,n){if(an(e),t=sn(t),an(n),rn)try{return cn(e,t,n)}catch(r){}if("get"in n||"set"in n)throw un("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var fn=Kt,vn=P,pn=D?function(e,t,n){return fn.f(e,t,vn(1,n))}:function(e,t,n){return e[t]=n,e},mn=r,yn=l,gn=E,_n=S,bn=w.f,En=Xt,kn=ee,Tn=Jt,Rn=pn,Sn=ze,wn=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 yn(e,this,arguments)};return t.prototype=e.prototype,t},Dn=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?mn:d?mn[h]:(mn[h]||{}).prototype,p=A?kn:kn[h]||Rn(kn,h,{})[h],m=p.prototype;for(o in t)r=!(n=En(A?o:h+(d?".":"#")+o,e.forced))&&v&&Sn(v,o),s=p[o],r&&(u=e.dontCallGetSet?(l=bn(v,o))&&l.value:v[o]),a=r&&u?u:t[o],r&&typeof s==typeof a||(c=e.bind&&r?Tn(a,mn):e.wrap&&r?wn(a):f&&_n(a)?gn(a):a,(e.sham||a&&a.sham||s&&s.sham)&&Rn(c,"sham",!0),Rn(p,o,c),f&&(Sn(kn,i=h+"Prototype")||Rn(kn,i,{}),Rn(kn[i],o,a),e.real&&m&&(n||!m[o])&&Rn(m,o,a)))},In=g,Cn=Array.isArray||function(e){return"Array"==In(e)},Ln=Math.ceil,Vn=Math.floor,xn=Math.trunc||function(e){var t=+e;return(t>0?Vn:Ln)(t)},Fn=function(e){var t=+e;return t!=t||0===t?0:xn(t)},Gn=Fn,On=Math.min,Zn=function(e){return e>0?On(Gn(e),9007199254740991):0},Pn=function(e){return Zn(e.length)},Un=TypeError,Nn=function(e){if(e>9007199254740991)throw Un("Maximum allowed index exceeded");return e},Bn=bt,Mn=Kt,Wn=P,Yn=function(e,t,n){var r=Bn(t);r in e?Mn.f(e,r,Wn(0,n)):e[r]=n},Xn={};Xn[ht("toStringTag")]="z";var Qn="[object z]"===String(Xn),jn=Qn,Hn=S,Jn=g,Kn=ht("toStringTag"),zn=Object,qn="Arguments"==Jn(function(){return arguments}()),$n=jn?Jn: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=zn(e),Kn))?n:qn?Jn(t):"Object"==(r=Jn(t))&&Hn(t.callee)?"Arguments":r},er=S,tr=We,nr=v(Function.toString);er(tr.inspectSource)||(tr.inspectSource=function(e){return nr(e)});var rr=tr.inspectSource,ir=v,or=i,ar=S,sr=$n,ur=rr,cr=function(){},lr=[],hr=oe("Reflect","construct"),Ar=/^\s*(?:class|function)\b/,dr=ir(Ar.exec),fr=!Ar.exec(cr),vr=function(e){if(!ar(e))return!1;try{return hr(cr,lr,e),!0}catch(t){return!1}},pr=function(e){if(!ar(e))return!1;switch(sr(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return fr||!!dr(Ar,ur(e))}catch(t){return!0}};pr.sham=!0;var mr=!hr||or((function(){var e;return vr(vr.call)||!vr(Object)||!vr((function(){e=!0}))||e}))?pr:vr,yr=Cn,gr=mr,_r=$,br=ht("species"),Er=Array,kr=function(e){var t;return yr(e)&&(t=e.constructor,(gr(t)&&(t===Er||yr(t.prototype))||_r(t)&&null===(t=t[br]))&&(t=void 0)),void 0===t?Er:t},Tr=function(e,t){return new(kr(e))(0===t?0:t)},Rr=i,Sr=fe,wr=ht("species"),Dr=function(e){return Sr>=51||!Rr((function(){var t=[];return(t.constructor={})[wr]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Ir=Dn,Cr=i,Lr=Cn,Vr=$,xr=He,Fr=Pn,Gr=Nn,Or=Yn,Zr=Tr,Pr=Dr,Ur=fe,Nr=ht("isConcatSpreadable"),Br=Ur>=51||!Cr((function(){var e=[];return e[Nr]=!1,e.concat()[0]!==e})),Mr=function(e){if(!Vr(e))return!1;var t=e[Nr];return void 0!==t?!!t:Lr(e)};Ir({target:"Array",proto:!0,arity:1,forced:!Br||!Pr("concat")},{concat:function(e){var t,n,r,i,o,a=xr(this),s=Zr(a,0),u=0;for(t=-1,r=arguments.length;t<r;t++)if(Mr(o=-1===t?a:arguments[t]))for(i=Fr(o),Gr(u+i),n=0;n<i;n++,u++)n in o&&Or(s,u,o[n]);else Gr(u+1),Or(s,u++,o);return s.length=u,s}});var Wr=$n,Yr=String,Xr=function(e){if("Symbol"===Wr(e))throw TypeError("Cannot convert a Symbol value to a string");return Yr(e)},Qr={},jr=Fn,Hr=Math.max,Jr=Math.min,Kr=function(e,t){var n=jr(e);return n<0?Hr(n+t,0):Jr(n,t)},zr=K,qr=Kr,$r=Pn,ei=function(e){return function(t,n,r){var i,o=zr(t),a=$r(o),s=qr(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}},ti={includes:ei(!0),indexOf:ei(!1)},ni={},ri=ze,ii=K,oi=ti.indexOf,ai=ni,si=v([].push),ui=function(e,t){var n,r=ii(e),i=0,o=[];for(n in r)!ri(ai,n)&&ri(r,n)&&si(o,n);for(;t.length>i;)ri(r,n=t[i++])&&(~oi(o,n)||si(o,n));return o},ci=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],li=ui,hi=ci,Ai=Object.keys||function(e){return li(e,hi)},di=D,fi=zt,vi=Kt,pi=tn,mi=K,yi=Ai;Qr.f=di&&!fi?Object.defineProperties:function(e,t){pi(e);for(var n,r=mi(t),i=yi(t),o=i.length,a=0;o>a;)vi.f(e,n=i[a++],r[n]);return e};var gi,_i=oe("document","documentElement"),bi=nt,Ei=Xe("keys"),ki=function(e){return Ei[e]||(Ei[e]=bi(e))},Ti=tn,Ri=Qr,Si=ci,wi=ni,Di=_i,Ii=Rt,Ci="prototype",Li="script",Vi=ki("IE_PROTO"),xi=function(){},Fi=function(e){return"<"+Li+">"+e+"</"+Li+">"},Gi=function(e){e.write(Fi("")),e.close();var t=e.parentWindow.Object;return e=null,t},Oi=function(){try{gi=new ActiveXObject("htmlfile")}catch(i){}var e,t,n;Oi="undefined"!=typeof document?document.domain&&gi?Gi(gi):(t=Ii("iframe"),n="java"+Li+":",t.style.display="none",Di.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Fi("document.F=Object")),e.close(),e.F):Gi(gi);for(var r=Si.length;r--;)delete Oi[Ci][Si[r]];return Oi()};wi[Vi]=!0;var Zi=Object.create||function(e,t){var n;return null!==e?(xi[Ci]=Ti(e),n=new xi,xi[Ci]=null,n[Vi]=e):n=Oi(),void 0===t?n:Ri.f(n,t)},Pi={},Ui=ui,Ni=ci.concat("length","prototype");Pi.f=Object.getOwnPropertyNames||function(e){return Ui(e,Ni)};var Bi={},Mi=Kr,Wi=Pn,Yi=Yn,Xi=Array,Qi=Math.max,ji=function(e,t,n){for(var r=Wi(e),i=Mi(t,r),o=Mi(void 0===n?r:n,r),a=Xi(Qi(o-i,0)),s=0;i<o;i++,s++)Yi(a,s,e[i]);return a.length=s,a},Hi=g,Ji=K,Ki=Pi.f,zi=ji,qi="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Bi.f=function(e){return qi&&"Window"==Hi(e)?function(e){try{return Ki(e)}catch(t){return zi(qi)}}(e):Ki(Ji(e))};var $i={};$i.f=Object.getOwnPropertySymbols;var eo=pn,to=function(e,t,n,r){return r&&r.enumerable?e[t]=n:eo(e,t,n),e},no=Kt,ro=function(e,t,n){return no.f(e,t,n)},io={},oo=ht;io.f=oo;var ao,so,uo,co=ee,lo=ze,ho=io,Ao=Kt.f,fo=function(e){var t=co.Symbol||(co.Symbol={});lo(t,e)||Ao(t,e,{value:ho.f(e)})},vo=L,po=oe,mo=ht,yo=to,go=function(){var e=po("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=mo("toPrimitive");t&&!t[r]&&yo(t,r,(function(e){return vo(n,this)}),{arity:1})},_o=$n,bo=Qn?{}.toString:function(){return"[object "+_o(this)+"]"},Eo=Qn,ko=Kt.f,To=pn,Ro=ze,So=bo,wo=ht("toStringTag"),Do=function(e,t,n,r){if(e){var i=n?e:e.prototype;Ro(i,wo)||ko(i,wo,{configurable:!0,value:t}),r&&!Eo&&To(i,"toString",So)}},Io=S,Co=r.WeakMap,Lo=Io(Co)&&/native code/.test(String(Co)),Vo=r,xo=$,Fo=pn,Go=ze,Oo=We,Zo=ki,Po=ni,Uo="Object already initialized",No=Vo.TypeError,Bo=Vo.WeakMap;if(Lo||Oo.state){var Mo=Oo.state||(Oo.state=new Bo);Mo.get=Mo.get,Mo.has=Mo.has,Mo.set=Mo.set,ao=function(e,t){if(Mo.has(e))throw No(Uo);return t.facade=e,Mo.set(e,t),t},so=function(e){return Mo.get(e)||{}},uo=function(e){return Mo.has(e)}}else{var Wo=Zo("state");Po[Wo]=!0,ao=function(e,t){if(Go(e,Wo))throw No(Uo);return t.facade=e,Fo(e,Wo,t),t},so=function(e){return Go(e,Wo)?e[Wo]:{}},uo=function(e){return Go(e,Wo)}}var Yo={set:ao,get:so,has:uo,enforce:function(e){return uo(e)?so(e):ao(e,{})},getterFor:function(e){return function(t){var n;if(!xo(t)||(n=so(t)).type!==e)throw No("Incompatible receiver, "+e+" required");return n}}},Xo=Jt,Qo=W,jo=He,Ho=Pn,Jo=Tr,Ko=v([].push),zo=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=jo(u),v=Qo(f),p=Xo(c,l),m=Ho(v),y=0,g=h||Jo,_=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:Ko(_,A)}else switch(e){case 4:return!1;case 7:Ko(_,A)}return o?-1:r||i?i:_}},qo={forEach:zo(0),map:zo(1),filter:zo(2),some:zo(3),every:zo(4),find:zo(5),findIndex:zo(6),filterReject:zo(7)},$o=Dn,ea=r,ta=L,na=v,ra=D,ia=ye,oa=i,aa=ze,sa=ae,ua=tn,ca=K,la=bt,ha=Xr,Aa=P,da=Zi,fa=Ai,va=Pi,pa=Bi,ma=$i,ya=w,ga=Kt,_a=Qr,ba=V,Ea=to,ka=ro,Ta=Xe,Ra=ni,Sa=nt,wa=ht,Da=io,Ia=fo,Ca=go,La=Do,Va=Yo,xa=qo.forEach,Fa=ki("hidden"),Ga="Symbol",Oa="prototype",Za=Va.set,Pa=Va.getterFor(Ga),Ua=Object[Oa],Na=ea.Symbol,Ba=Na&&Na[Oa],Ma=ea.TypeError,Wa=ea.QObject,Ya=ya.f,Xa=ga.f,Qa=pa.f,ja=ba.f,Ha=na([].push),Ja=Ta("symbols"),Ka=Ta("op-symbols"),za=Ta("wks"),qa=!Wa||!Wa[Oa]||!Wa[Oa].findChild,$a=ra&&oa((function(){return 7!=da(Xa({},"a",{get:function(){return Xa(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=Ya(Ua,t);r&&delete Ua[t],Xa(e,t,n),r&&e!==Ua&&Xa(Ua,t,r)}:Xa,es=function(e,t){var n=Ja[e]=da(Ba);return Za(n,{type:Ga,tag:e,description:t}),ra||(n.description=t),n},ts=function(e,t,n){e===Ua&&ts(Ka,t,n),ua(e);var r=la(t);return ua(n),aa(Ja,r)?(n.enumerable?(aa(e,Fa)&&e[Fa][r]&&(e[Fa][r]=!1),n=da(n,{enumerable:Aa(0,!1)})):(aa(e,Fa)||Xa(e,Fa,Aa(1,{})),e[Fa][r]=!0),$a(e,r,n)):Xa(e,r,n)},ns=function(e,t){ua(e);var n=ca(t),r=fa(n).concat(as(n));return xa(r,(function(t){ra&&!ta(rs,n,t)||ts(e,t,n[t])})),e},rs=function(e){var t=la(e),n=ta(ja,this,t);return!(this===Ua&&aa(Ja,t)&&!aa(Ka,t))&&(!(n||!aa(this,t)||!aa(Ja,t)||aa(this,Fa)&&this[Fa][t])||n)},is=function(e,t){var n=ca(e),r=la(t);if(n!==Ua||!aa(Ja,r)||aa(Ka,r)){var i=Ya(n,r);return!i||!aa(Ja,r)||aa(n,Fa)&&n[Fa][r]||(i.enumerable=!0),i}},os=function(e){var t=Qa(ca(e)),n=[];return xa(t,(function(e){aa(Ja,e)||aa(Ra,e)||Ha(n,e)})),n},as=function(e){var t=e===Ua,n=Qa(t?Ka:ca(e)),r=[];return xa(n,(function(e){!aa(Ja,e)||t&&!aa(Ua,e)||Ha(r,Ja[e])})),r};ia||(Na=function(){if(sa(Ba,this))throw Ma("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?ha(arguments[0]):void 0,t=Sa(e),n=function(e){this===Ua&&ta(n,Ka,e),aa(this,Fa)&&aa(this[Fa],t)&&(this[Fa][t]=!1),$a(this,t,Aa(1,e))};return ra&&qa&&$a(Ua,t,{configurable:!0,set:n}),es(t,e)},Ea(Ba=Na[Oa],"toString",(function(){return Pa(this).tag})),Ea(Na,"withoutSetter",(function(e){return es(Sa(e),e)})),ba.f=rs,ga.f=ts,_a.f=ns,ya.f=is,va.f=pa.f=os,ma.f=as,Da.f=function(e){return es(wa(e),e)},ra&&ka(Ba,"description",{configurable:!0,get:function(){return Pa(this).description}})),$o({global:!0,constructor:!0,wrap:!0,forced:!ia,sham:!ia},{Symbol:Na}),xa(fa(za),(function(e){Ia(e)})),$o({target:Ga,stat:!0,forced:!ia},{useSetter:function(){qa=!0},useSimple:function(){qa=!1}}),$o({target:"Object",stat:!0,forced:!ia,sham:!ra},{create:function(e,t){return void 0===t?da(e):ns(da(e),t)},defineProperty:ts,defineProperties:ns,getOwnPropertyDescriptor:is}),$o({target:"Object",stat:!0,forced:!ia},{getOwnPropertyNames:os}),Ca(),La(Na,Ga),Ra[Fa]=!0;var ss=ye&&!!Symbol.for&&!!Symbol.keyFor,us=Dn,cs=oe,ls=ze,hs=Xr,As=Xe,ds=ss,fs=As("string-to-symbol-registry"),vs=As("symbol-to-string-registry");us({target:"Symbol",stat:!0,forced:!ds},{for:function(e){var t=hs(e);if(ls(fs,t))return fs[t];var n=cs("Symbol")(t);return fs[t]=n,vs[n]=t,n}});var ps=Dn,ms=ze,ys=Te,gs=Se,_s=ss,bs=Xe("symbol-to-string-registry");ps({target:"Symbol",stat:!0,forced:!_s},{keyFor:function(e){if(!ys(e))throw TypeError(gs(e)+" is not a symbol");if(ms(bs,e))return bs[e]}});var Es=v([].slice),ks=Cn,Ts=S,Rs=g,Ss=Xr,ws=v([].push),Ds=Dn,Is=oe,Cs=l,Ls=L,Vs=v,xs=i,Fs=S,Gs=Te,Os=Es,Zs=function(e){if(Ts(e))return e;if(ks(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];"string"==typeof i?ws(n,i):"number"!=typeof i&&"Number"!=Rs(i)&&"String"!=Rs(i)||ws(n,Ss(i))}var o=n.length,a=!0;return function(e,t){if(a)return a=!1,t;if(ks(this))return t;for(var r=0;r<o;r++)if(n[r]===e)return t}}},Ps=ye,Us=String,Ns=Is("JSON","stringify"),Bs=Vs(/./.exec),Ms=Vs("".charAt),Ws=Vs("".charCodeAt),Ys=Vs("".replace),Xs=Vs(1..toString),Qs=/[\uD800-\uDFFF]/g,js=/^[\uD800-\uDBFF]$/,Hs=/^[\uDC00-\uDFFF]$/,Js=!Ps||xs((function(){var e=Is("Symbol")();return"[null]"!=Ns([e])||"{}"!=Ns({a:e})||"{}"!=Ns(Object(e))})),Ks=xs((function(){return'"\\udf06\\ud834"'!==Ns("\udf06\ud834")||'"\\udead"'!==Ns("\udead")})),zs=function(e,t){var n=Os(arguments),r=Zs(t);if(Fs(r)||void 0!==e&&!Gs(e))return n[1]=function(e,t){if(Fs(r)&&(t=Ls(r,this,Us(e),t)),!Gs(t))return t},Cs(Ns,null,n)},qs=function(e,t,n){var r=Ms(n,t-1),i=Ms(n,t+1);return Bs(js,e)&&!Bs(Hs,i)||Bs(Hs,e)&&!Bs(js,r)?"\\u"+Xs(Ws(e,0),16):e};Ns&&Ds({target:"JSON",stat:!0,arity:3,forced:Js||Ks},{stringify:function(e,t,n){var r=Os(arguments),i=Cs(Js?zs:Ns,null,r);return Ks&&"string"==typeof i?Ys(i,Qs,qs):i}});var $s=$i,eu=He;Dn({target:"Object",stat:!0,forced:!ye||i((function(){$s.f(1)}))},{getOwnPropertySymbols:function(e){var t=$s.f;return t?t(eu(e)):[]}}),fo("asyncIterator"),fo("hasInstance"),fo("isConcatSpreadable"),fo("iterator"),fo("match"),fo("matchAll"),fo("replace"),fo("search"),fo("species"),fo("split");var tu=go;fo("toPrimitive"),tu();var nu=oe,ru=Do;fo("toStringTag"),ru(nu("Symbol"),"Symbol"),fo("unscopables"),Do(r.JSON,"JSON",!0);var iu,ou,au,su=ee.Symbol,uu={},cu=D,lu=ze,hu=Function.prototype,Au=cu&&Object.getOwnPropertyDescriptor,du=lu(hu,"name"),fu={EXISTS:du,PROPER:du&&"something"===function(){}.name,CONFIGURABLE:du&&(!cu||cu&&Au(hu,"name").configurable)},vu=!i((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),pu=ze,mu=S,yu=He,gu=vu,_u=ki("IE_PROTO"),bu=Object,Eu=bu.prototype,ku=gu?bu.getPrototypeOf:function(e){var t=yu(e);if(pu(t,_u))return t[_u];var n=t.constructor;return mu(n)&&t instanceof n?n.prototype:t instanceof bu?Eu:null},Tu=i,Ru=S,Su=$,wu=Zi,Du=ku,Iu=to,Cu=ht("iterator"),Lu=!1;[].keys&&("next"in(au=[].keys())?(ou=Du(Du(au)))!==Object.prototype&&(iu=ou):Lu=!0);var Vu=!Su(iu)||Tu((function(){var e={};return iu[Cu].call(e)!==e}));Ru((iu=Vu?{}:wu(iu))[Cu])||Iu(iu,Cu,(function(){return this}));var xu={IteratorPrototype:iu,BUGGY_SAFARI_ITERATORS:Lu},Fu=xu.IteratorPrototype,Gu=Zi,Ou=P,Zu=Do,Pu=uu,Uu=function(){return this},Nu=function(e,t,n,r){var i=t+" Iterator";return e.prototype=Gu(Fu,{next:Ou(+!r,n)}),Zu(e,i,!1,!0),Pu[i]=Uu,e},Bu=v,Mu=Ce,Wu=S,Yu=String,Xu=TypeError,Qu=function(e,t,n){try{return Bu(Mu(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(r){}},ju=tn,Hu=function(e){if("object"==typeof e||Wu(e))return e;throw Xu("Can't set "+Yu(e)+" as a prototype")},Ju=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Qu(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(r){}return function(n,r){return ju(n),Hu(r),t?e(n,r):n.__proto__=r,n}}():void 0),Ku=Dn,zu=L,qu=fu,$u=Nu,ec=ku,tc=Do,nc=to,rc=uu,ic=xu,oc=qu.PROPER,ac=ic.BUGGY_SAFARI_ITERATORS,sc=ht("iterator"),uc="keys",cc="values",lc="entries",hc=function(){return this},Ac=function(e,t,n,r,i,o,a){$u(n,t,r);var s,u,c,l=function(e){if(e===i&&v)return v;if(!ac&&e in d)return d[e];switch(e){case uc:case cc:case lc:return function(){return new n(this,e)}}return function(){return new n(this)}},h=t+" Iterator",A=!1,d=e.prototype,f=d[sc]||d["@@iterator"]||i&&d[i],v=!ac&&f||l(i),p="Array"==t&&d.entries||f;if(p&&(s=ec(p.call(new e)))!==Object.prototype&&s.next&&(tc(s,h,!0,!0),rc[h]=hc),oc&&i==cc&&f&&f.name!==cc&&(A=!0,v=function(){return zu(f,this)}),i)if(u={values:l(cc),keys:o?v:l(uc),entries:l(lc)},a)for(c in u)(ac||A||!(c in d))&&nc(d,c,u[c]);else Ku({target:t,proto:!0,forced:ac||A},u);return a&&d[sc]!==v&&nc(d,sc,v,{name:i}),rc[t]=v,u},dc=function(e,t){return{value:e,done:t}},fc=K,vc=uu,pc=Yo;Kt.f;var mc=Ac,yc=dc,gc="Array Iterator",_c=pc.set,bc=pc.getterFor(gc);mc(Array,"Array",(function(e,t){_c(this,{type:gc,target:fc(e),index:0,kind:t})}),(function(){var e=bc(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,yc(void 0,!0)):yc("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),vc.Arguments=vc.Array;var Ec={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},kc=r,Tc=$n,Rc=pn,Sc=uu,wc=ht("toStringTag");for(var Dc in Ec){var Ic=kc[Dc],Cc=Ic&&Ic.prototype;Cc&&Tc(Cc)!==wc&&Rc(Cc,wc,Dc),Sc[Dc]=Sc.Array}var Lc=su;fo("dispose");var Vc=Lc;fo("asyncDispose");var xc=Dn,Fc=v,Gc=oe("Symbol"),Oc=Gc.keyFor,Zc=Fc(Gc.prototype.valueOf);xc({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==Oc(Zc(e))}catch(t){return!1}}});for(var Pc=Dn,Uc=Xe,Nc=oe,Bc=v,Mc=Te,Wc=ht,Yc=Nc("Symbol"),Xc=Yc.isWellKnown,Qc=Nc("Object","getOwnPropertyNames"),jc=Bc(Yc.prototype.valueOf),Hc=Uc("wks"),Jc=0,Kc=Qc(Yc),zc=Kc.length;Jc<zc;Jc++)try{var qc=Kc[Jc];Mc(Yc[qc])&&Wc(qc)}catch(g6){}Pc({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if(Xc&&Xc(e))return!0;try{for(var t=jc(e),n=0,r=Qc(Hc),i=r.length;n<i;n++)if(Hc[r[n]]==t)return!0}catch(g6){}return!1}}),fo("matcher"),fo("metadataKey"),fo("observable"),fo("metadata"),fo("patternMatch"),fo("replaceAll");var $c=Vc,el=t($c),tl=v,nl=Fn,rl=Xr,il=j,ol=tl("".charAt),al=tl("".charCodeAt),sl=tl("".slice),ul=function(e){return function(t,n){var r,i,o=rl(il(t)),a=nl(n),s=o.length;return a<0||a>=s?e?"":void 0:(r=al(o,a))<55296||r>56319||a+1===s||(i=al(o,a+1))<56320||i>57343?e?ol(o,a):r:e?sl(o,a,a+2):i-56320+(r-55296<<10)+65536}},cl={codeAt:ul(!1),charAt:ul(!0)},ll=cl.charAt,hl=Xr,Al=Yo,dl=Ac,fl=dc,vl="String Iterator",pl=Al.set,ml=Al.getterFor(vl);dl(String,"String",(function(e){pl(this,{type:vl,string:hl(e),index:0})}),(function(){var e,t=ml(this),n=t.string,r=t.index;return r>=n.length?fl(void 0,!0):(e=ll(n,r),t.index+=e.length,fl(e,!1))}));var yl=t(io.f("iterator"));function gl(e){return(gl="function"==typeof el&&"symbol"==typeof yl?function(e){return typeof e}:function(e){return e&&"function"==typeof el&&e.constructor===el&&e!==el.prototype?"symbol":typeof e})(e)}var _l=He,bl=Ai;Dn({target:"Object",stat:!0,forced:i((function(){bl(1)}))},{keys:function(e){return bl(_l(e))}});var El=t(ee.Object.keys),kl=t(ee.Object.getOwnPropertySymbols),Tl=qo.filter;Dn({target:"Array",proto:!0,forced:!Dr("filter")},{filter:function(e){return Tl(this,e,arguments.length>1?arguments[1]:void 0)}});var Rl=ee,Sl=function(e){return Rl[e+"Prototype"]},wl=Sl("Array").filter,Dl=ae,Il=wl,Cl=Array.prototype,Ll=t((function(e){var t=e.filter;return e===Cl||Dl(Cl,e)&&t===Cl.filter?Il:t})),Vl={exports:{}},xl=Dn,Fl=i,Gl=K,Ol=w.f,Zl=D;xl({target:"Object",stat:!0,forced:!Zl||Fl((function(){Ol(1)})),sham:!Zl},{getOwnPropertyDescriptor:function(e,t){return Ol(Gl(e),t)}});var Pl=ee.Object,Ul=Vl.exports=function(e,t){return Pl.getOwnPropertyDescriptor(e,t)};Pl.getOwnPropertyDescriptor.sham&&(Ul.sham=!0);var Nl=t(Vl.exports),Bl=i,Ml=function(e,t){var n=[][e];return!!n&&Bl((function(){n.call(null,t||function(){return 1},1)}))},Wl=qo.forEach,Yl=Ml("forEach")?[].forEach:function(e){return Wl(this,e,arguments.length>1?arguments[1]:void 0)};Dn({target:"Array",proto:!0,forced:[].forEach!=Yl},{forEach:Yl});var Xl=Sl("Array").forEach,Ql=$n,jl=ze,Hl=ae,Jl=Xl,Kl=Array.prototype,zl={DOMTokenList:!0,NodeList:!0},ql=t((function(e){var t=e.forEach;return e===Kl||Hl(Kl,e)&&t===Kl.forEach||jl(zl,Ql(e))?Jl:t})),$l=oe,eh=Pi,th=$i,nh=tn,rh=v([].concat),ih=$l("Reflect","ownKeys")||function(e){var t=eh.f(nh(e)),n=th.f;return n?rh(t,n(e)):t},oh=ih,ah=K,sh=w,uh=Yn;Dn({target:"Object",stat:!0,sham:!D},{getOwnPropertyDescriptors:function(e){for(var t,n,r=ah(e),i=sh.f,o=oh(r),a={},s=0;o.length>s;)void 0!==(n=i(r,t=o[s++]))&&uh(a,t,n);return a}});var ch=t(ee.Object.getOwnPropertyDescriptors),lh={exports:{}},hh=Dn,Ah=D,dh=Qr.f;hh({target:"Object",stat:!0,forced:Object.defineProperties!==dh,sham:!Ah},{defineProperties:dh});var fh=ee.Object,vh=lh.exports=function(e,t){return fh.defineProperties(e,t)};fh.defineProperties.sham&&(vh.sham=!0);var ph=t(lh.exports),mh={exports:{}},yh=Dn,gh=D,_h=Kt.f;yh({target:"Object",stat:!0,forced:Object.defineProperty!==_h,sham:!gh},{defineProperty:_h});var bh=ee.Object,Eh=mh.exports=function(e,t,n){return bh.defineProperty(e,t,n)};bh.defineProperty.sham&&(Eh.sham=!0);var kh=t(mh.exports),Th=t($c);Dn({target:"Object",stat:!0,sham:!D},{create:Zi});var Rh=ee.Object,Sh=t((function(e,t){return Rh.create(e,t)})),wh=He,Dh=ku,Ih=vu;Dn({target:"Object",stat:!0,forced:i((function(){Dh(1)})),sham:!Ih},{getPrototypeOf:function(e){return Dh(wh(e))}});var Ch=t(ee.Object.getPrototypeOf);Dn({target:"Object",stat:!0},{setPrototypeOf:Ju});var Lh=t(ee.Object.setPrototypeOf),Vh=ze,xh=ih,Fh=w,Gh=Kt,Oh=$,Zh=pn,Ph=Error,Uh=v("".replace),Nh=String(Ph("zxcasd").stack),Bh=/\n\s*at [^:]*:[^\n]*/,Mh=Bh.test(Nh),Wh=P,Yh=!i((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Wh(1,7)),7!==e.stack)})),Xh=pn,Qh=function(e,t){if(Mh&&"string"==typeof e&&!Ph.prepareStackTrace)for(;t--;)e=Uh(e,Bh,"");return e},jh=Yh,Hh=Error.captureStackTrace,Jh=uu,Kh=ht("iterator"),zh=Array.prototype,qh=function(e){return void 0!==e&&(Jh.Array===e||zh[Kh]===e)},$h=$n,eA=xe,tA=Y,nA=uu,rA=ht("iterator"),iA=function(e){if(!tA(e))return eA(e,rA)||eA(e,"@@iterator")||nA[$h(e)]},oA=L,aA=Ce,sA=tn,uA=Se,cA=iA,lA=TypeError,hA=function(e,t){var n=arguments.length<2?cA(e):t;if(aA(n))return sA(oA(n,e));throw lA(uA(e)+" is not iterable")},AA=L,dA=tn,fA=xe,vA=function(e,t,n){var r,i;dA(e);try{if(!(r=fA(e,"return"))){if("throw"===t)throw n;return n}r=AA(r,e)}catch(g6){i=!0,r=g6}if("throw"===t)throw n;if(i)throw r;return dA(r),n},pA=Jt,mA=L,yA=tn,gA=Se,_A=qh,bA=Pn,EA=ae,kA=hA,TA=iA,RA=vA,SA=TypeError,wA=function(e,t){this.stopped=e,this.result=t},DA=wA.prototype,IA=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=pA(t,l),p=function(e){return r&&RA(r,"normal",e),new wA(!0,e)},m=function(e){return h?(yA(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=TA(e)))throw SA(gA(e)+" is not iterable");if(_A(i)){for(o=0,a=bA(e);a>o;o++)if((s=m(e[o]))&&EA(DA,s))return s;return new wA(!1)}r=kA(e,i)}for(u=A?e.next:r.next;!(c=mA(u,r)).done;){try{s=m(c.value)}catch(g6){RA(r,"throw",g6)}if("object"==typeof s&&s&&EA(DA,s))return s}return new wA(!1)},CA=Xr,LA=Dn,VA=ae,xA=ku,FA=Ju,GA=function(e,t,n){for(var r=xh(t),i=Gh.f,o=Fh.f,a=0;a<r.length;a++){var s=r[a];Vh(e,s)||n&&Vh(n,s)||i(e,s,o(t,s))}},OA=Zi,ZA=pn,PA=P,UA=function(e,t){Oh(t)&&"cause"in t&&Zh(e,"cause",t.cause)},NA=function(e,t,n,r){jh&&(Hh?Hh(e,t):Xh(e,"stack",Qh(n,r)))},BA=IA,MA=function(e,t){return void 0===e?arguments.length<2?"":t:CA(e)},WA=ht("toStringTag"),YA=Error,XA=[].push,QA=function(e,t){var n,r=VA(jA,this);FA?n=FA(YA(),r?xA(this):jA):(n=r?this:OA(jA),ZA(n,WA,"Error")),void 0!==t&&ZA(n,"message",MA(t)),NA(n,QA,n.stack,1),arguments.length>2&&UA(n,arguments[2]);var i=[];return BA(e,XA,{that:i}),ZA(n,"errors",i),n};FA?FA(QA,YA):GA(QA,YA,{name:!0});var jA=QA.prototype=OA(YA.prototype,{constructor:PA(1,QA),message:PA(1,""),name:PA(1,"AggregateError")});LA({global:!0,constructor:!0,arity:2},{AggregateError:QA});var HA,JA,KA,zA,qA="undefined"!=typeof process&&"process"==g(process),$A=oe,ed=ro,td=D,nd=ht("species"),rd=function(e){var t=$A(e);td&&t&&!t[nd]&&ed(t,nd,{configurable:!0,get:function(){return this}})},id=ae,od=TypeError,ad=function(e,t){if(id(t,e))return e;throw od("Incorrect invocation")},sd=mr,ud=Se,cd=TypeError,ld=function(e){if(sd(e))return e;throw cd(ud(e)+" is not a constructor")},hd=tn,Ad=ld,dd=Y,fd=ht("species"),vd=function(e,t){var n,r=hd(e).constructor;return void 0===r||dd(n=hd(r)[fd])?t:Ad(n)},pd=TypeError,md=function(e,t){if(e<t)throw pd("Not enough arguments");return e},yd=/(?:ipad|iphone|ipod).*applewebkit/i.test(se),gd=r,_d=l,bd=Jt,Ed=S,kd=ze,Td=i,Rd=_i,Sd=Es,wd=Rt,Dd=md,Id=yd,Cd=qA,Ld=gd.setImmediate,Vd=gd.clearImmediate,xd=gd.process,Fd=gd.Dispatch,Gd=gd.Function,Od=gd.MessageChannel,Zd=gd.String,Pd=0,Ud={},Nd="onreadystatechange";Td((function(){HA=gd.location}));var Bd=function(e){if(kd(Ud,e)){var t=Ud[e];delete Ud[e],t()}},Md=function(e){return function(){Bd(e)}},Wd=function(e){Bd(e.data)},Yd=function(e){gd.postMessage(Zd(e),HA.protocol+"//"+HA.host)};Ld&&Vd||(Ld=function(e){Dd(arguments.length,1);var t=Ed(e)?e:Gd(e),n=Sd(arguments,1);return Ud[++Pd]=function(){_d(t,void 0,n)},JA(Pd),Pd},Vd=function(e){delete Ud[e]},Cd?JA=function(e){xd.nextTick(Md(e))}:Fd&&Fd.now?JA=function(e){Fd.now(Md(e))}:Od&&!Id?(zA=(KA=new Od).port2,KA.port1.onmessage=Wd,JA=bd(zA.postMessage,zA)):gd.addEventListener&&Ed(gd.postMessage)&&!gd.importScripts&&HA&&"file:"!==HA.protocol&&!Td(Yd)?(JA=Yd,gd.addEventListener("message",Wd,!1)):JA=Nd in wd("script")?function(e){Rd.appendChild(wd("script"))[Nd]=function(){Rd.removeChild(this),Bd(e)}}:function(e){setTimeout(Md(e),0)});var Xd={set:Ld,clear:Vd},Qd=function(){this.head=null,this.tail=null};Qd.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 jd,Hd,Jd,Kd,zd,qd=Qd,$d=/ipad|iphone|ipod/i.test(se)&&"undefined"!=typeof Pebble,ef=/web0s(?!.*chrome)/i.test(se),tf=r,nf=Jt,rf=w.f,of=Xd.set,af=qd,sf=yd,uf=$d,cf=ef,lf=qA,hf=tf.MutationObserver||tf.WebKitMutationObserver,Af=tf.document,df=tf.process,ff=tf.Promise,vf=rf(tf,"queueMicrotask"),pf=vf&&vf.value;if(!pf){var mf=new af,yf=function(){var e,t;for(lf&&(e=df.domain)&&e.exit();t=mf.get();)try{t()}catch(g6){throw mf.head&&jd(),g6}e&&e.enter()};sf||lf||cf||!hf||!Af?!uf&&ff&&ff.resolve?((Kd=ff.resolve(void 0)).constructor=ff,zd=nf(Kd.then,Kd),jd=function(){zd(yf)}):lf?jd=function(){df.nextTick(yf)}:(of=nf(of,tf),jd=function(){of(yf)}):(Hd=!0,Jd=Af.createTextNode(""),new hf(yf).observe(Jd,{characterData:!0}),jd=function(){Jd.data=Hd=!Hd}),pf=function(e){mf.head||jd(),mf.add(e)}}var gf=pf,_f=function(e){try{return{error:!1,value:e()}}catch(g6){return{error:!0,value:g6}}},bf=r.Promise,Ef="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,kf=!Ef&&!qA&&"object"==typeof window&&"object"==typeof document,Tf=r,Rf=bf,Sf=S,wf=Xt,Df=rr,If=ht,Cf=kf,Lf=Ef,Vf=fe,xf=Rf&&Rf.prototype,Ff=If("species"),Gf=!1,Of=Sf(Tf.PromiseRejectionEvent),Zf={CONSTRUCTOR:wf("Promise",(function(){var e=Df(Rf),t=e!==String(Rf);if(!t&&66===Vf)return!0;if(!xf.catch||!xf.finally)return!0;if(!Vf||Vf<51||!/native code/.test(e)){var n=new Rf((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[Ff]=r,!(Gf=n.then((function(){}))instanceof r))return!0}return!t&&(Cf||Lf)&&!Of})),REJECTION_EVENT:Of,SUBCLASSING:Gf},Pf={},Uf=Ce,Nf=TypeError,Bf=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw Nf("Bad Promise constructor");t=e,n=r})),this.resolve=Uf(t),this.reject=Uf(n)};Pf.f=function(e){return new Bf(e)};var Mf,Wf,Yf=Dn,Xf=qA,Qf=r,jf=L,Hf=to,Jf=Do,Kf=rd,zf=Ce,qf=S,$f=$,ev=ad,tv=vd,nv=Xd.set,rv=gf,iv=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(g6){}},ov=_f,av=qd,sv=Yo,uv=bf,cv=Zf,lv=Pf,hv="Promise",Av=cv.CONSTRUCTOR,dv=cv.REJECTION_EVENT,fv=sv.getterFor(hv),vv=sv.set,pv=uv&&uv.prototype,mv=uv,yv=pv,gv=Qf.TypeError,_v=Qf.document,bv=Qf.process,Ev=lv.f,kv=Ev,Tv=!!(_v&&_v.createEvent&&Qf.dispatchEvent),Rv="unhandledrejection",Sv=function(e){var t;return!(!$f(e)||!qf(t=e.then))&&t},wv=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&&Vv(t),t.rejection=1),!0===s?n=o:(l&&l.enter(),n=s(o),l&&(l.exit(),i=!0)),n===e.promise?c(gv("Promise-chain cycle")):(r=Sv(n))?jf(r,n,u,c):u(n)):c(o)}catch(g6){l&&!i&&l.exit(),c(g6)}},Dv=function(e,t){e.notified||(e.notified=!0,rv((function(){for(var n,r=e.reactions;n=r.get();)wv(n,e);e.notified=!1,t&&!e.rejection&&Cv(e)})))},Iv=function(e,t,n){var r,i;Tv?((r=_v.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),Qf.dispatchEvent(r)):r={promise:t,reason:n},!dv&&(i=Qf["on"+e])?i(r):e===Rv&&iv("Unhandled promise rejection",n)},Cv=function(e){jf(nv,Qf,(function(){var t,n=e.facade,r=e.value;if(Lv(e)&&(t=ov((function(){Xf?bv.emit("unhandledRejection",r,n):Iv(Rv,n,r)})),e.rejection=Xf||Lv(e)?2:1,t.error))throw t.value}))},Lv=function(e){return 1!==e.rejection&&!e.parent},Vv=function(e){jf(nv,Qf,(function(){var t=e.facade;Xf?bv.emit("rejectionHandled",t):Iv("rejectionhandled",t,e.value)}))},xv=function(e,t,n){return function(r){e(t,r,n)}},Fv=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Dv(e,!0))},Gv=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw gv("Promise can't be resolved itself");var r=Sv(t);r?rv((function(){var n={done:!1};try{jf(r,t,xv(Gv,n,e),xv(Fv,n,e))}catch(g6){Fv(n,g6,e)}})):(e.value=t,e.state=1,Dv(e,!1))}catch(g6){Fv({done:!1},g6,e)}}};Av&&(yv=(mv=function(e){ev(this,yv),zf(e),jf(Mf,this);var t=fv(this);try{e(xv(Gv,t),xv(Fv,t))}catch(g6){Fv(t,g6)}}).prototype,(Mf=function(e){vv(this,{type:hv,done:!1,notified:!1,parent:!1,reactions:new av,rejection:!1,state:0,value:void 0})}).prototype=Hf(yv,"then",(function(e,t){var n=fv(this),r=Ev(tv(this,mv));return n.parent=!0,r.ok=!qf(e)||e,r.fail=qf(t)&&t,r.domain=Xf?bv.domain:void 0,0==n.state?n.reactions.add(r):rv((function(){wv(r,n)})),r.promise})),Wf=function(){var e=new Mf,t=fv(e);this.promise=e,this.resolve=xv(Gv,t),this.reject=xv(Fv,t)},lv.f=Ev=function(e){return e===mv||undefined===e?new Wf(e):kv(e)}),Yf({global:!0,constructor:!0,wrap:!0,forced:Av},{Promise:mv}),Jf(mv,hv,!1,!0),Kf(hv);var Ov=ht("iterator"),Zv=!1;try{var Pv=0,Uv={next:function(){return{done:!!Pv++}},return:function(){Zv=!0}};Uv[Ov]=function(){return this},Array.from(Uv,(function(){throw 2}))}catch(g6){}var Nv=function(e,t){if(!t&&!Zv)return!1;var n=!1;try{var r={};r[Ov]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(g6){}return n},Bv=bf,Mv=Zf.CONSTRUCTOR||!Nv((function(e){Bv.all(e).then(void 0,(function(){}))})),Wv=L,Yv=Ce,Xv=Pf,Qv=_f,jv=IA;Dn({target:"Promise",stat:!0,forced:Mv},{all:function(e){var t=this,n=Xv.f(t),r=n.resolve,i=n.reject,o=Qv((function(){var n=Yv(t.resolve),o=[],a=0,s=1;jv(e,(function(e){var u=a++,c=!1;s++,Wv(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 Hv=Dn,Jv=Zf.CONSTRUCTOR;bf&&bf.prototype,Hv({target:"Promise",proto:!0,forced:Jv,real:!0},{catch:function(e){return this.then(void 0,e)}});var Kv=L,zv=Ce,qv=Pf,$v=_f,ep=IA;Dn({target:"Promise",stat:!0,forced:Mv},{race:function(e){var t=this,n=qv.f(t),r=n.reject,i=$v((function(){var i=zv(t.resolve);ep(e,(function(e){Kv(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var tp=L,np=Pf;Dn({target:"Promise",stat:!0,forced:Zf.CONSTRUCTOR},{reject:function(e){var t=np.f(this);return tp(t.reject,void 0,e),t.promise}});var rp=tn,ip=$,op=Pf,ap=function(e,t){if(rp(e),ip(t)&&t.constructor===e)return t;var n=op.f(e);return(0,n.resolve)(t),n.promise},sp=Dn,up=bf,cp=Zf.CONSTRUCTOR,lp=ap,hp=oe("Promise"),Ap=!cp;sp({target:"Promise",stat:!0,forced:true},{resolve:function(e){return lp(Ap&&this===hp?up:this,e)}});var dp=L,fp=Ce,vp=Pf,pp=_f,mp=IA;Dn({target:"Promise",stat:!0,forced:Mv},{allSettled:function(e){var t=this,n=vp.f(t),r=n.resolve,i=n.reject,o=pp((function(){var n=fp(t.resolve),i=[],o=0,a=1;mp(e,(function(e){var s=o++,u=!1;a++,dp(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 yp=L,gp=Ce,_p=oe,bp=Pf,Ep=_f,kp=IA,Tp="No one promise resolved";Dn({target:"Promise",stat:!0,forced:Mv},{any:function(e){var t=this,n=_p("AggregateError"),r=bp.f(t),i=r.resolve,o=r.reject,a=Ep((function(){var r=gp(t.resolve),a=[],s=0,u=1,c=!1;kp(e,(function(e){var l=s++,h=!1;u++,yp(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,Tp)))}))})),--u||o(new n(a,Tp))}));return a.error&&o(a.value),r.promise}});var Rp=Dn,Sp=bf,wp=i,Dp=oe,Ip=S,Cp=vd,Lp=ap,Vp=Sp&&Sp.prototype;Rp({target:"Promise",proto:!0,real:!0,forced:!!Sp&&wp((function(){Vp.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Cp(this,Dp("Promise")),n=Ip(e);return this.then(n?function(n){return Lp(t,e()).then((function(){return n}))}:e,n?function(n){return Lp(t,e()).then((function(){throw n}))}:e)}});var xp=ee.Promise,Fp=Pf,Gp=_f;Dn({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=Fp.f(this),n=Gp(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}});var Op=t(xp),Zp=Dn,Pp=Cn,Up=v([].reverse),Np=[1,2];Zp({target:"Array",proto:!0,forced:String(Np)===String(Np.reverse())},{reverse:function(){return Pp(this)&&(this.length=this.length),Up(this)}});var Bp=Sl("Array").reverse,Mp=ae,Wp=Bp,Yp=Array.prototype,Xp=t((function(e){var t=e.reverse;return e===Yp||Mp(Yp,e)&&t===Yp.reverse?Wp:t})),Qp=Dn,jp=Cn,Hp=mr,Jp=$,Kp=Kr,zp=Pn,qp=K,$p=Yn,em=ht,tm=Es,nm=Dr("slice"),rm=em("species"),im=Array,om=Math.max;Qp({target:"Array",proto:!0,forced:!nm},{slice:function(e,t){var n,r,i,o=qp(this),a=zp(o),s=Kp(e,a),u=Kp(void 0===t?a:t,a);if(jp(o)&&(n=o.constructor,(Hp(n)&&(n===im||jp(n.prototype))||Jp(n)&&null===(n=n[rm]))&&(n=void 0),n===im||void 0===n))return tm(o,s,u);for(r=new(void 0===n?im:n)(om(u-s,0)),i=0;s<u;s++,i++)s in o&&$p(r,i,o[s]);return r.length=i,r}});var am=Sl("Array").slice,sm=ae,um=am,cm=Array.prototype,lm=t((function(e){var t=e.slice;return e===cm||sm(cm,e)&&t===cm.slice?um:t})),hm=v,Am=Ce,dm=$,fm=ze,vm=Es,pm=o,mm=Function,ym=hm([].concat),gm=hm([].join),_m={},bm=pm?mm.bind:function(e){var t=Am(this),n=t.prototype,r=vm(arguments,1),i=function(){var n=ym(r,vm(arguments));return this instanceof i?function(e,t,n){if(!fm(_m,t)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";_m[t]=mm("C,a","return new C("+gm(r,",")+")")}return _m[t](e,n)}(t,n.length,n):t.apply(e,n)};return dm(n)&&(i.prototype=n),i},Em=bm;Dn({target:"Function",proto:!0,forced:Function.bind!==Em},{bind:Em});var km=Sl("Function").bind,Tm=ae,Rm=km,Sm=Function.prototype,wm=t((function(e){var t=e.bind;return e===Sm||Tm(Sm,e)&&t===Sm.bind?Rm:t})),Dm=Dn,Im=l,Cm=bm,Lm=ld,Vm=tn,xm=$,Fm=Zi,Gm=i,Om=oe("Reflect","construct"),Zm=Object.prototype,Pm=[].push,Um=Gm((function(){function e(){}return!(Om((function(){}),[],e)instanceof e)})),Nm=!Gm((function(){Om((function(){}))})),Bm=Um||Nm;Dm({target:"Reflect",stat:!0,forced:Bm,sham:Bm},{construct:function(e,t){Lm(e),Vm(t);var n=arguments.length<3?e:Lm(arguments[2]);if(Nm&&!Um)return Om(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 Im(Pm,r,t),new(Im(Cm,e,r))}var i=n.prototype,o=Fm(xm(i)?i:Zm),a=Im(e,o,t);return xm(a)?a:o}});var Mm=t(ee.Reflect.construct),Wm=ze,Ym=L,Xm=$,Qm=tn,jm=function(e){return void 0!==e&&(Wm(e,"value")||Wm(e,"writable"))},Hm=w,Jm=ku;Dn({target:"Reflect",stat:!0},{get:function e(t,n){var r,i,o=arguments.length<3?t:arguments[2];return Qm(t)===o?t[n]:(r=Hm.f(t,n))?jm(r)?r.value:void 0===r.get?void 0:Ym(r.get,o):Xm(i=Jm(t))?e(i,n,o):void 0}});var Km=t(ee.Reflect.get);Dn({target:"Array",stat:!0},{isArray:Cn});var zm=t(ee.Array.isArray),qm=t(iA),$m=tn,ey=vA,ty=Jt,ny=L,ry=He,iy=function(e,t,n,r){try{return r?t($m(n)[0],n[1]):t(n)}catch(g6){ey(e,"throw",g6)}},oy=qh,ay=mr,sy=Pn,uy=Yn,cy=hA,ly=iA,hy=Array,Ay=function(e){var t=ry(e),n=ay(this),r=arguments.length,i=r>1?arguments[1]:void 0,o=void 0!==i;o&&(i=ty(i,r>2?arguments[2]:void 0));var a,s,u,c,l,h,A=ly(t),d=0;if(!A||this===hy&&oy(A))for(a=sy(t),s=n?new this(a):hy(a);a>d;d++)h=o?i(t[d],d):t[d],uy(s,d,h);else for(l=(c=cy(t,A)).next,s=n?new this:[];!(u=ny(l,c)).done;d++)h=o?iy(c,i,[u.value,d],!0):u.value,uy(s,d,h);return s.length=d,s},dy=Ay;Dn({target:"Array",stat:!0,forced:!Nv((function(e){Array.from(e)}))},{from:dy});var fy=t(ee.Array.from);function vy(e,t){var n=El(e);if(kl){var r=kl(e);t&&(r=Ll(r).call(r,(function(t){return Nl(e,t).enumerable}))),n.push.apply(n,r)}return n}function py(e){for(var t=1;t<arguments.length;t++){var n,r,i=null!=arguments[t]?arguments[t]:{};t%2?ql(n=vy(Object(i),!0)).call(n,(function(t){ky(e,t,i[t])})):ch?ph(e,ch(i)):ql(r=vy(Object(i))).call(r,(function(t){kh(e,t,Nl(i,t))}))}return e}function my(){my=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=kh||function(e,t,n){e[t]=n.value},i="function"==typeof Th?Th:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,n){return kh(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=Sh(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=Ch&&Ch(Ch(R([])));p&&p!==t&&n.call(p,o)&&(v=p);var m=f.prototype=A.prototype=Sh(v);function y(e){var t;ql(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"==gl(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"}],ql(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 Lh?Lh(e,f):(e.__proto__=f,u(e,s,"GeneratorFunction")),e.prototype=Sh(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=Op);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 Xp(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,ql(t=this.tryEntries).call(t,k),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+lm(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 yy(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(g6){return void n(g6)}s.done?t(u):Op.resolve(u).then(r,i)}function gy(e){return function(){var t=this,n=arguments;return new Op((function(r,i){var o=e.apply(t,n);function a(e){yy(o,r,i,a,s,"next",e)}function s(e){yy(o,r,i,a,s,"throw",e)}a(void 0)}))}}function _y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function by(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),kh(e,r.key,r)}}function Ey(e,t,n){return t&&by(e.prototype,t),n&&by(e,n),kh(e,"prototype",{writable:!1}),e}function ky(e,t,n){return t in e?kh(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ty(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Sh(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),kh(e,"prototype",{writable:!1}),t&&Sy(e,t)}function Ry(e){var t;return(Ry=Lh?wm(t=Ch).call(t):function(e){return e.__proto__||Ch(e)})(e)}function Sy(e,t){var n;return(Sy=Lh?wm(n=Lh).call(n):function(e,t){return e.__proto__=t,e})(e,t)}function wy(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Dy(e){var t=function(){if("undefined"==typeof Reflect||!Mm)return!1;if(Mm.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Mm(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ry(e);if(t){var i=Ry(this).constructor;n=Mm(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===gl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return wy(e)}(this,n)}}function Iy(){var e;"undefined"!=typeof Reflect&&Km?Iy=wm(e=Km).call(e):Iy=function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ry(e)););return e}(e,t);if(r){var i=Nl(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}};return Iy.apply(this,arguments)}function Cy(e,t){return function(e){if(zm(e))return e}(e)||function(e,t){var n=null==e?null:void 0!==Th&&qm(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)||Vy(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 Ly(e){return function(e){if(zm(e))return xy(e)}(e)||function(e){if(void 0!==Th&&null!=qm(e)||null!=e["@@iterator"])return fy(e)}(e)||Vy(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 Vy(e,t){var n;if(e){if("string"==typeof e)return xy(e,t);var r=lm(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?fy(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?xy(e,t):void 0}}function xy(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 Fy=Dn,Gy=i,Oy=Bi.f;Fy({target:"Object",stat:!0,forced:Gy((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:Oy});var Zy=ee.Object,Py=t((function(e){return Zy.getOwnPropertyNames(e)})),Uy="\t\n\v\f\r                 \u2028\u2029\ufeff",Ny=j,By=Xr,My=Uy,Wy=v("".replace),Yy=RegExp("^["+My+"]+"),Xy=RegExp("(^|[^"+My+"])["+My+"]+$"),Qy=function(e){return function(t){var n=By(Ny(t));return 1&e&&(n=Wy(n,Yy,"")),2&e&&(n=Wy(n,Xy,"$1")),n}},jy={start:Qy(1),end:Qy(2),trim:Qy(3)},Hy=r,Jy=i,Ky=v,zy=Xr,qy=jy.trim,$y=Uy,eg=Hy.parseInt,tg=Hy.Symbol,ng=tg&&tg.iterator,rg=/^[+-]?0x/i,ig=Ky(rg.exec),og=8!==eg($y+"08")||22!==eg($y+"0x16")||ng&&!Jy((function(){eg(Object(ng))}))?function(e,t){var n=qy(zy(e));return eg(n,t>>>0||(ig(rg,n)?16:10))}:eg;Dn({global:!0,forced:parseInt!=og},{parseInt:og});var ag,sg=t(ee.parseInt),ug=Sl("Array").concat,cg=ae,lg=ug,hg=Array.prototype,Ag=t((function(e){var t=e.concat;return e===hg||cg(hg,e)&&t===hg.concat?lg:t})),dg="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,fg=r,vg=l,pg=S,mg=dg,yg=se,gg=Es,_g=md,bg=fg.Function,Eg=/MSIE .\./.test(yg)||mg&&((ag=fg.Bun.version.split(".")).length<3||0==ag[0]&&(ag[1]<3||3==ag[1]&&0==ag[2])),kg=function(e,t){var n=t?2:1;return Eg?function(r,i){var o=_g(arguments.length,1)>n,a=pg(r)?r:bg(r),s=o?gg(arguments,n):[],u=o?function(){vg(a,this,s)}:a;return t?e(u,i):e(u)}:e},Tg=Dn,Rg=r,Sg=kg(Rg.setInterval,!0);Tg({global:!0,bind:!0,forced:Rg.setInterval!==Sg},{setInterval:Sg});var wg=Dn,Dg=r,Ig=kg(Dg.setTimeout,!0);wg({global:!0,bind:!0,forced:Dg.setTimeout!==Ig},{setTimeout:Ig});var Cg=t(ee.setTimeout),Lg=r,Vg=i,xg=Xr,Fg=jy.trim,Gg=Uy,Og=v("".charAt),Zg=Lg.parseFloat,Pg=Lg.Symbol,Ug=Pg&&Pg.iterator,Ng=1/Zg(Gg+"-0")!=-1/0||Ug&&!Vg((function(){Zg(Object(Ug))}))?function(e){var t=Fg(xg(e)),n=Zg(t);return 0===n&&"-"==Og(t,0)?-0:n}:Zg;Dn({global:!0,forced:parseFloat!=Ng},{parseFloat:Ng});var Bg=t(ee.parseFloat),Mg=Ng;Dn({target:"Number",stat:!0,forced:Number.parseFloat!=Mg},{parseFloat:Mg});var Wg=t(ee.Number.parseFloat);Dn({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var Yg=t(ee.Number.isNaN),Xg=qo.map;Dn({target:"Array",proto:!0,forced:!Dr("map")},{map:function(e){return Xg(this,e,arguments.length>1?arguments[1]:void 0)}});var Qg=Sl("Array").map,jg=ae,Hg=Qg,Jg=Array.prototype,Kg=t((function(e){var t=e.map;return e===Jg||jg(Jg,e)&&t===Jg.map?Hg:t})),zg=He,qg=Kr,$g=Pn,e_=function(e){for(var t=zg(this),n=$g(t),r=arguments.length,i=qg(r>1?arguments[1]:void 0,n),o=r>2?arguments[2]:void 0,a=void 0===o?n:qg(o,n);a>i;)t[i++]=e;return t};Dn({target:"Array",proto:!0},{fill:e_});var t_=Sl("Array").fill,n_=ae,r_=t_,i_=Array.prototype,o_=t((function(e){var t=e.fill;return e===i_||n_(i_,e)&&t===i_.fill?r_:t})),a_=function(e){return e&&e.Math==Math&&e},s_=a_("object"==typeof globalThis&&globalThis)||a_("object"==typeof window&&window)||a_("object"==typeof self&&self)||a_("object"==typeof e&&e)||function(){return this}()||Function("return this")(),u_={exports:{}},c_=s_,l_=Object.defineProperty,h_=function(e,t){try{l_(c_,e,{value:t,configurable:!0,writable:!0})}catch(g6){c_[e]=t}return t},A_=h_,d_="__core-js_shared__",f_=s_[d_]||A_(d_,{}),v_=f_;(u_.exports=function(e,t){return v_[e]||(v_[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 p_,m_,y_=u_.exports,g_=function(e){try{return!!e()}catch(g6){return!0}},__=!g_((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),b_=__,E_=Function.prototype,k_=E_.call,T_=b_&&E_.bind.bind(k_,k_),R_=b_?T_:function(e){return function(){return k_.apply(e,arguments)}},S_=function(e){return null==e},w_=S_,D_=TypeError,I_=function(e){if(w_(e))throw D_("Can't call method on "+e);return e},C_=I_,L_=Object,V_=function(e){return L_(C_(e))},x_=V_,F_=R_({}.hasOwnProperty),G_=Object.hasOwn||function(e,t){return F_(x_(e),t)},O_=R_,Z_=0,P_=Math.random(),U_=O_(1..toString),N_=function(e){return"Symbol("+(void 0===e?"":e)+")_"+U_(++Z_+P_,36)},B_="object"==typeof document&&document.all,M_={all:B_,IS_HTMLDDA:void 0===B_&&void 0!==B_},W_=M_.all,Y_=M_.IS_HTMLDDA?function(e){return"function"==typeof e||e===W_}:function(e){return"function"==typeof e},X_=s_,Q_=Y_,j_=function(e,t){return arguments.length<2?(n=X_[e],Q_(n)?n:void 0):X_[e]&&X_[e][t];var n},H_=j_("navigator","userAgent")||"",J_=s_,K_=H_,z_=J_.process,q_=J_.Deno,$_=z_&&z_.versions||q_&&q_.version,eb=$_&&$_.v8;eb&&(m_=(p_=eb.split("."))[0]>0&&p_[0]<4?1:+(p_[0]+p_[1])),!m_&&K_&&(!(p_=K_.match(/Edge\/(\d+)/))||p_[1]>=74)&&(p_=K_.match(/Chrome\/(\d+)/))&&(m_=+p_[1]);var tb=m_,nb=tb,rb=g_,ib=!!Object.getOwnPropertySymbols&&!rb((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&nb&&nb<41})),ob=ib&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ab=s_,sb=G_,ub=N_,cb=ib,lb=ob,hb=y_("wks"),Ab=ab.Symbol,db=Ab&&Ab.for,fb=lb?Ab:Ab&&Ab.withoutSetter||ub,vb=function(e){if(!sb(hb,e)||!cb&&"string"!=typeof hb[e]){var t="Symbol."+e;cb&&sb(Ab,e)?hb[e]=Ab[e]:hb[e]=lb&&db?db(t):fb(t)}return hb[e]},pb={};pb[vb("toStringTag")]="z";var mb="[object z]"===String(pb),yb={},gb=!g_((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),_b=Y_,bb=M_.all,Eb=M_.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:_b(e)||e===bb}:function(e){return"object"==typeof e?null!==e:_b(e)},kb=Eb,Tb=s_.document,Rb=kb(Tb)&&kb(Tb.createElement),Sb=function(e){return Rb?Tb.createElement(e):{}},wb=Sb,Db=!gb&&!g_((function(){return 7!=Object.defineProperty(wb("div"),"a",{get:function(){return 7}}).a})),Ib=gb&&g_((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Cb=Eb,Lb=String,Vb=TypeError,xb=function(e){if(Cb(e))return e;throw Vb(Lb(e)+" is not an object")},Fb=__,Gb=Function.prototype.call,Ob=Fb?Gb.bind(Gb):function(){return Gb.apply(Gb,arguments)},Zb=R_({}.isPrototypeOf),Pb=j_,Ub=Y_,Nb=Zb,Bb=Object,Mb=ob?function(e){return"symbol"==typeof e}:function(e){var t=Pb("Symbol");return Ub(t)&&Nb(t.prototype,Bb(e))},Wb=String,Yb=function(e){try{return Wb(e)}catch(g6){return"Object"}},Xb=Y_,Qb=Yb,jb=TypeError,Hb=function(e){if(Xb(e))return e;throw jb(Qb(e)+" is not a function")},Jb=Hb,Kb=S_,zb=function(e,t){var n=e[t];return Kb(n)?void 0:Jb(n)},qb=Ob,$b=Y_,eE=Eb,tE=TypeError,nE=Ob,rE=Eb,iE=Mb,oE=zb,aE=function(e,t){var n,r;if("string"===t&&$b(n=e.toString)&&!eE(r=qb(n,e)))return r;if($b(n=e.valueOf)&&!eE(r=qb(n,e)))return r;if("string"!==t&&$b(n=e.toString)&&!eE(r=qb(n,e)))return r;throw tE("Can't convert object to primitive value")},sE=TypeError,uE=vb("toPrimitive"),cE=function(e,t){if(!rE(e)||iE(e))return e;var n,r=oE(e,uE);if(r){if(void 0===t&&(t="default"),n=nE(r,e,t),!rE(n)||iE(n))return n;throw sE("Can't convert object to primitive value")}return void 0===t&&(t="number"),aE(e,t)},lE=cE,hE=Mb,AE=function(e){var t=lE(e,"string");return hE(t)?t:t+""},dE=gb,fE=Db,vE=Ib,pE=xb,mE=AE,yE=TypeError,gE=Object.defineProperty,_E=Object.getOwnPropertyDescriptor,bE="enumerable",EE="configurable",kE="writable";yb.f=dE?vE?function(e,t,n){if(pE(e),t=mE(t),pE(n),"function"==typeof e&&"prototype"===t&&"value"in n&&kE in n&&!n[kE]){var r=_E(e,t);r&&r[kE]&&(e[t]=n.value,n={configurable:EE in n?n[EE]:r[EE],enumerable:bE in n?n[bE]:r[bE],writable:!1})}return gE(e,t,n)}:gE:function(e,t,n){if(pE(e),t=mE(t),pE(n),fE)try{return gE(e,t,n)}catch(g6){}if("get"in n||"set"in n)throw yE("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var TE={exports:{}},RE=gb,SE=G_,wE=Function.prototype,DE=RE&&Object.getOwnPropertyDescriptor,IE=SE(wE,"name"),CE={EXISTS:IE,PROPER:IE&&"something"===function(){}.name,CONFIGURABLE:IE&&(!RE||RE&&DE(wE,"name").configurable)},LE=Y_,VE=f_,xE=R_(Function.toString);LE(VE.inspectSource)||(VE.inspectSource=function(e){return xE(e)});var FE,GE,OE,ZE=VE.inspectSource,PE=Y_,UE=s_.WeakMap,NE=PE(UE)&&/native code/.test(String(UE)),BE=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},ME=yb,WE=BE,YE=gb?function(e,t,n){return ME.f(e,t,WE(1,n))}:function(e,t,n){return e[t]=n,e},XE=N_,QE=y_("keys"),jE=function(e){return QE[e]||(QE[e]=XE(e))},HE={},JE=NE,KE=s_,zE=Eb,qE=YE,$E=G_,ek=f_,tk=jE,nk=HE,rk="Object already initialized",ik=KE.TypeError,ok=KE.WeakMap;if(JE||ek.state){var ak=ek.state||(ek.state=new ok);ak.get=ak.get,ak.has=ak.has,ak.set=ak.set,FE=function(e,t){if(ak.has(e))throw ik(rk);return t.facade=e,ak.set(e,t),t},GE=function(e){return ak.get(e)||{}},OE=function(e){return ak.has(e)}}else{var sk=tk("state");nk[sk]=!0,FE=function(e,t){if($E(e,sk))throw ik(rk);return t.facade=e,qE(e,sk,t),t},GE=function(e){return $E(e,sk)?e[sk]:{}},OE=function(e){return $E(e,sk)}}var uk={set:FE,get:GE,has:OE,enforce:function(e){return OE(e)?GE(e):FE(e,{})},getterFor:function(e){return function(t){var n;if(!zE(t)||(n=GE(t)).type!==e)throw ik("Incompatible receiver, "+e+" required");return n}}},ck=g_,lk=Y_,hk=G_,Ak=gb,dk=CE.CONFIGURABLE,fk=ZE,vk=uk.enforce,pk=uk.get,mk=Object.defineProperty,yk=Ak&&!ck((function(){return 8!==mk((function(){}),"length",{value:8}).length})),gk=String(String).split("String"),_k=TE.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),(!hk(e,"name")||dk&&e.name!==t)&&(Ak?mk(e,"name",{value:t,configurable:!0}):e.name=t),yk&&n&&hk(n,"arity")&&e.length!==n.arity&&mk(e,"length",{value:n.arity});try{n&&hk(n,"constructor")&&n.constructor?Ak&&mk(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(g6){}var r=vk(e);return hk(r,"source")||(r.source=gk.join("string"==typeof t?t:"")),e};Function.prototype.toString=_k((function(){return lk(this)&&pk(this).source||fk(this)}),"toString");var bk=TE.exports,Ek=Y_,kk=yb,Tk=bk,Rk=h_,Sk=function(e,t,n,r){r||(r={});var i=r.enumerable,o=void 0!==r.name?r.name:t;if(Ek(n)&&Tk(n,o,r),r.global)i?e[t]=n:Rk(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(g6){}i?e[t]=n:kk.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},wk=R_,Dk=wk({}.toString),Ik=wk("".slice),Ck=function(e){return Ik(Dk(e),8,-1)},Lk=mb,Vk=Y_,xk=Ck,Fk=vb("toStringTag"),Gk=Object,Ok="Arguments"==xk(function(){return arguments}()),Zk=Lk?xk: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(g6){}}(t=Gk(e),Fk))?n:Ok?xk(t):"Object"==(r=xk(t))&&Vk(t.callee)?"Arguments":r},Pk=Zk,Uk=mb?{}.toString:function(){return"[object "+Pk(this)+"]"};mb||Sk(Object.prototype,"toString",Uk,{unsafe:!0});var Nk={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},Bk=Sb("span").classList,Mk=Bk&&Bk.constructor&&Bk.constructor.prototype,Wk=Mk===Object.prototype?void 0:Mk,Yk=Ck,Xk=R_,Qk=function(e){if("Function"===Yk(e))return Xk(e)},jk=Hb,Hk=__,Jk=Qk(Qk.bind),Kk=function(e,t){return jk(e),void 0===t?e:Hk?Jk(e,t):function(){return e.apply(t,arguments)}},zk=g_,qk=Ck,$k=Object,eT=R_("".split),tT=zk((function(){return!$k("z").propertyIsEnumerable(0)}))?function(e){return"String"==qk(e)?eT(e,""):$k(e)}:$k,nT=Math.ceil,rT=Math.floor,iT=Math.trunc||function(e){var t=+e;return(t>0?rT:nT)(t)},oT=function(e){var t=+e;return t!=t||0===t?0:iT(t)},aT=oT,sT=Math.min,uT=function(e){return e>0?sT(aT(e),9007199254740991):0},cT=uT,lT=function(e){return cT(e.length)},hT=Ck,AT=Array.isArray||function(e){return"Array"==hT(e)},dT=R_,fT=g_,vT=Y_,pT=Zk,mT=ZE,yT=function(){},gT=[],_T=j_("Reflect","construct"),bT=/^\s*(?:class|function)\b/,ET=dT(bT.exec),kT=!bT.exec(yT),TT=function(e){if(!vT(e))return!1;try{return _T(yT,gT,e),!0}catch(g6){return!1}},RT=function(e){if(!vT(e))return!1;switch(pT(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return kT||!!ET(bT,mT(e))}catch(g6){return!0}};RT.sham=!0;var ST=!_T||fT((function(){var e;return TT(TT.call)||!TT(Object)||!TT((function(){e=!0}))||e}))?RT:TT,wT=AT,DT=ST,IT=Eb,CT=vb("species"),LT=Array,VT=function(e){var t;return wT(e)&&(t=e.constructor,(DT(t)&&(t===LT||wT(t.prototype))||IT(t)&&null===(t=t[CT]))&&(t=void 0)),void 0===t?LT:t},xT=function(e,t){return new(VT(e))(0===t?0:t)},FT=Kk,GT=tT,OT=V_,ZT=lT,PT=xT,UT=R_([].push),NT=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=OT(u),v=GT(f),p=FT(c,l),m=ZT(v),y=0,g=h||PT,_=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:UT(_,A)}else switch(e){case 4:return!1;case 7:UT(_,A)}return o?-1:r||i?i:_}},BT={forEach:NT(0),map:NT(1),filter:NT(2),some:NT(3),every:NT(4),find:NT(5),findIndex:NT(6),filterReject:NT(7)},MT=g_,WT=function(e,t){var n=[][e];return!!n&&MT((function(){n.call(null,t||function(){return 1},1)}))},YT=BT.forEach,XT=WT("forEach")?[].forEach:function(e){return YT(this,e,arguments.length>1?arguments[1]:void 0)},QT=s_,jT=Nk,HT=Wk,JT=XT,KT=YE,zT=function(e){if(e&&e.forEach!==JT)try{KT(e,"forEach",JT)}catch(g6){e.forEach=JT}};for(var qT in jT)jT[qT]&&zT(QT[qT]&&QT[qT].prototype);zT(HT);var $T={},eR={},tR={}.propertyIsEnumerable,nR=Object.getOwnPropertyDescriptor,rR=nR&&!tR.call({1:2},1);eR.f=rR?function(e){var t=nR(this,e);return!!t&&t.enumerable}:tR;var iR=tT,oR=I_,aR=function(e){return iR(oR(e))},sR=gb,uR=Ob,cR=eR,lR=BE,hR=aR,AR=AE,dR=G_,fR=Db,vR=Object.getOwnPropertyDescriptor;$T.f=sR?vR:function(e,t){if(e=hR(e),t=AR(t),fR)try{return vR(e,t)}catch(g6){}if(dR(e,t))return lR(!uR(cR.f,e,t),e[t])};var pR={},mR=oT,yR=Math.max,gR=Math.min,_R=function(e,t){var n=mR(e);return n<0?yR(n+t,0):gR(n,t)},bR=aR,ER=_R,kR=lT,TR=function(e){return function(t,n,r){var i,o=bR(t),a=kR(o),s=ER(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}},RR={includes:TR(!0),indexOf:TR(!1)},SR=G_,wR=aR,DR=RR.indexOf,IR=HE,CR=R_([].push),LR=function(e,t){var n,r=wR(e),i=0,o=[];for(n in r)!SR(IR,n)&&SR(r,n)&&CR(o,n);for(;t.length>i;)SR(r,n=t[i++])&&(~DR(o,n)||CR(o,n));return o},VR=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],xR=LR,FR=VR.concat("length","prototype");pR.f=Object.getOwnPropertyNames||function(e){return xR(e,FR)};var GR={};GR.f=Object.getOwnPropertySymbols;var OR=j_,ZR=pR,PR=GR,UR=xb,NR=R_([].concat),BR=OR("Reflect","ownKeys")||function(e){var t=ZR.f(UR(e)),n=PR.f;return n?NR(t,n(e)):t},MR=G_,WR=BR,YR=$T,XR=yb,QR=g_,jR=Y_,HR=/#|\.prototype\./,JR=function(e,t){var n=zR[KR(e)];return n==$R||n!=qR&&(jR(t)?QR(t):!!t)},KR=JR.normalize=function(e){return String(e).replace(HR,".").toLowerCase()},zR=JR.data={},qR=JR.NATIVE="N",$R=JR.POLYFILL="P",eS=JR,tS=s_,nS=$T.f,rS=YE,iS=Sk,oS=h_,aS=function(e,t,n){for(var r=WR(t),i=XR.f,o=YR.f,a=0;a<r.length;a++){var s=r[a];MR(e,s)||n&&MR(n,s)||i(e,s,o(t,s))}},sS=eS,uS=function(e,t){var n,r,i,o,a,s=e.target,u=e.global,c=e.stat;if(n=u?tS:c?tS[s]||oS(s,{}):(tS[s]||{}).prototype)for(r in t){if(o=t[r],i=e.dontCallGetSet?(a=nS(n,r))&&a.value:n[r],!sS(u?r:s+(c?".":"#")+r,e.forced)&&void 0!==i){if(typeof o==typeof i)continue;aS(o,i)}(e.sham||i&&i.sham)&&rS(o,"sham",!0),iS(n,r,o,e)}},cS={},lS=AE,hS=yb,AS=BE,dS=function(e,t,n){var r=lS(t);r in e?hS.f(e,r,AS(0,n)):e[r]=n},fS=_R,vS=lT,pS=dS,mS=Array,yS=Math.max,gS=function(e,t,n){for(var r=vS(e),i=fS(t,r),o=fS(void 0===n?r:n,r),a=mS(yS(o-i,0)),s=0;i<o;i++,s++)pS(a,s,e[i]);return a.length=s,a},_S=Ck,bS=aR,ES=pR.f,kS=gS,TS="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];cS.f=function(e){return TS&&"Window"==_S(e)?function(e){try{return ES(e)}catch(g6){return kS(TS)}}(e):ES(bS(e))};var RS=uS,SS=g_,wS=cS.f;RS({target:"Object",stat:!0,forced:SS((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:wS});var DS=Zk,IS=String,CS=function(e){if("Symbol"===DS(e))throw TypeError("Cannot convert a Symbol value to a string");return IS(e)},LS=xb,VS=function(){var e=LS(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},xS=g_,FS=s_.RegExp,GS=xS((function(){var e=FS("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),OS=GS||xS((function(){return!FS("a","y").sticky})),ZS=GS||xS((function(){var e=FS("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),PS={BROKEN_CARET:ZS,MISSED_STICKY:OS,UNSUPPORTED_Y:GS},US={},NS=LR,BS=VR,MS=Object.keys||function(e){return NS(e,BS)},WS=gb,YS=Ib,XS=yb,QS=xb,jS=aR,HS=MS;US.f=WS&&!YS?Object.defineProperties:function(e,t){QS(e);for(var n,r=jS(t),i=HS(t),o=i.length,a=0;o>a;)XS.f(e,n=i[a++],r[n]);return e};var JS,KS=j_("document","documentElement"),zS=xb,qS=US,$S=VR,ew=HE,tw=KS,nw=Sb,rw="prototype",iw="script",ow=jE("IE_PROTO"),aw=function(){},sw=function(e){return"<"+iw+">"+e+"</"+iw+">"},uw=function(e){e.write(sw("")),e.close();var t=e.parentWindow.Object;return e=null,t},cw=function(){try{JS=new ActiveXObject("htmlfile")}catch(g6){}var e,t,n;cw="undefined"!=typeof document?document.domain&&JS?uw(JS):(t=nw("iframe"),n="java"+iw+":",t.style.display="none",tw.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(sw("document.F=Object")),e.close(),e.F):uw(JS);for(var r=$S.length;r--;)delete cw[rw][$S[r]];return cw()};ew[ow]=!0;var lw,hw,Aw=Object.create||function(e,t){var n;return null!==e?(aw[rw]=zS(e),n=new aw,aw[rw]=null,n[ow]=e):n=cw(),void 0===t?n:qS.f(n,t)},dw=g_,fw=s_.RegExp,vw=dw((function(){var e=fw(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),pw=g_,mw=s_.RegExp,yw=pw((function(){var e=mw("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),gw=Ob,_w=R_,bw=CS,Ew=VS,kw=PS,Tw=Aw,Rw=uk.get,Sw=vw,ww=yw,Dw=y_("native-string-replace",String.prototype.replace),Iw=RegExp.prototype.exec,Cw=Iw,Lw=_w("".charAt),Vw=_w("".indexOf),xw=_w("".replace),Fw=_w("".slice),Gw=(hw=/b*/g,gw(Iw,lw=/a/,"a"),gw(Iw,hw,"a"),0!==lw.lastIndex||0!==hw.lastIndex),Ow=kw.BROKEN_CARET,Zw=void 0!==/()??/.exec("")[1];(Gw||Zw||Ow||Sw||ww)&&(Cw=function(e){var t,n,r,i,o,a,s,u=this,c=Rw(u),l=bw(e),h=c.raw;if(h)return h.lastIndex=u.lastIndex,t=gw(Cw,h,l),u.lastIndex=h.lastIndex,t;var A=c.groups,d=Ow&&u.sticky,f=gw(Ew,u),v=u.source,p=0,m=l;if(d&&(f=xw(f,"y",""),-1===Vw(f,"g")&&(f+="g"),m=Fw(l,u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==Lw(l,u.lastIndex-1))&&(v="(?: "+v+")",m=" "+m,p++),n=new RegExp("^(?:"+v+")",f)),Zw&&(n=new RegExp("^"+v+"$(?!\\s)",f)),Gw&&(r=u.lastIndex),i=gw(Iw,d?n:u,m),d?i?(i.input=Fw(i.input,p),i[0]=Fw(i[0],p),i.index=u.lastIndex,u.lastIndex+=i[0].length):u.lastIndex=0:Gw&&i&&(u.lastIndex=u.global?i.index+i[0].length:r),Zw&&i&&i.length>1&&gw(Dw,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=Tw(null),o=0;o<A.length;o++)a[(s=A[o])[0]]=i[s[1]];return i});var Pw=Cw;uS({target:"RegExp",proto:!0,forced:/./.exec!==Pw},{exec:Pw});var Uw,Nw,Bw=uS,Mw=Ob,Ww=Y_,Yw=xb,Xw=CS,Qw=(Uw=!1,(Nw=/[ac]/).exec=function(){return Uw=!0,/./.exec.apply(this,arguments)},!0===Nw.test("abc")&&Uw),jw=/./.test;Bw({target:"RegExp",proto:!0,forced:!Qw},{test:function(e){var t=Yw(this),n=Xw(e),r=t.exec;if(!Ww(r))return Mw(jw,t,n);var i=Mw(r,t,n);return null!==i&&(Yw(i),!0)}});var Hw=__,Jw=Function.prototype,Kw=Jw.apply,zw=Jw.call,qw="object"==typeof Reflect&&Reflect.apply||(Hw?zw.bind(Kw):function(){return zw.apply(Kw,arguments)}),$w=Qk,eD=Sk,tD=Pw,nD=g_,rD=vb,iD=YE,oD=rD("species"),aD=RegExp.prototype,sD=R_,uD=oT,cD=CS,lD=I_,hD=sD("".charAt),AD=sD("".charCodeAt),dD=sD("".slice),fD=function(e){return function(t,n){var r,i,o=cD(lD(t)),a=uD(n),s=o.length;return a<0||a>=s?e?"":void 0:(r=AD(o,a))<55296||r>56319||a+1===s||(i=AD(o,a+1))<56320||i>57343?e?hD(o,a):r:e?dD(o,a,a+2):i-56320+(r-55296<<10)+65536}},vD={codeAt:fD(!1),charAt:fD(!0)},pD=vD.charAt,mD=R_,yD=V_,gD=Math.floor,_D=mD("".charAt),bD=mD("".replace),ED=mD("".slice),kD=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,TD=/\$([$&'`]|\d{1,2})/g,RD=Ob,SD=xb,wD=Y_,DD=Ck,ID=Pw,CD=TypeError,LD=qw,VD=Ob,xD=R_,FD=function(e,t,n,r){var i=rD(e),o=!nD((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),a=o&&!nD((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[oD]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t}));if(!o||!a||n){var s=$w(/./[i]),u=t(i,""[e],(function(e,t,n,r,i){var a=$w(e),u=t.exec;return u===tD||u===aD.exec?o&&!i?{done:!0,value:s(t,n,r)}:{done:!0,value:a(n,t,r)}:{done:!1}}));eD(String.prototype,e,u[0]),eD(aD,i,u[1])}r&&iD(aD[i],"sham",!0)},GD=g_,OD=xb,ZD=Y_,PD=S_,UD=oT,ND=uT,BD=CS,MD=I_,WD=function(e,t,n){return t+(n?pD(e,t).length:1)},YD=zb,XD=function(e,t,n,r,i,o){var a=n+e.length,s=r.length,u=TD;return void 0!==i&&(i=yD(i),u=kD),bD(o,u,(function(o,u){var c;switch(_D(u,0)){case"$":return"$";case"&":return e;case"`":return ED(t,0,n);case"'":return ED(t,a);case"<":c=i[ED(u,1,-1)];break;default:var l=+u;if(0===l)return o;if(l>s){var h=gD(l/10);return 0===h?o:h<=s?void 0===r[h-1]?_D(u,1):r[h-1]+_D(u,1):o}c=r[l-1]}return void 0===c?"":c}))},QD=function(e,t){var n=e.exec;if(wD(n)){var r=RD(n,e,t);return null!==r&&SD(r),r}if("RegExp"===DD(e))return RD(ID,e,t);throw CD("RegExp#exec called on incompatible receiver")},jD=vb("replace"),HD=Math.max,JD=Math.min,KD=xD([].concat),zD=xD([].push),qD=xD("".indexOf),$D=xD("".slice),eI="$0"==="a".replace(/./,"$0"),tI=!!/./[jD]&&""===/./[jD]("a","$0"),nI=!GD((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}));FD("replace",(function(e,t,n){var r=tI?"$":"$0";return[function(e,n){var r=MD(this),i=PD(e)?void 0:YD(e,jD);return i?VD(i,e,r,n):VD(t,BD(r),e,n)},function(e,i){var o=OD(this),a=BD(e);if("string"==typeof i&&-1===qD(i,r)&&-1===qD(i,"$<")){var s=n(t,o,a,i);if(s.done)return s.value}var u=ZD(i);u||(i=BD(i));var c=o.global;if(c){var l=o.unicode;o.lastIndex=0}for(var h=[];;){var A=QD(o,a);if(null===A)break;if(zD(h,A),!c)break;""===BD(A[0])&&(o.lastIndex=WD(a,ND(o.lastIndex),l))}for(var d,f="",v=0,p=0;p<h.length;p++){for(var m=BD((A=h[p])[0]),y=HD(JD(UD(A.index),a.length),0),g=[],_=1;_<A.length;_++)zD(g,void 0===(d=A[_])?d:String(d));var b=A.groups;if(u){var E=KD([m],g,y,a);void 0!==b&&zD(E,b);var k=BD(LD(i,void 0,E))}else k=XD(m,a,y,g,b,i);y>=v&&(f+=$D(a,v,y)+k,v=y+m.length)}return f+$D(a,v)}]}),!nI||!eI||tI);var rI=g_,iI=tb,oI=vb("species"),aI=function(e){return iI>=51||!rI((function(){var t=[];return(t.constructor={})[oI]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},sI=BT.filter;uS({target:"Array",proto:!0,forced:!aI("filter")},{filter:function(e){return sI(this,e,arguments.length>1?arguments[1]:void 0)}});var uI,cI,lI,hI,AI="process"==Ck(s_.process),dI=Y_,fI=String,vI=TypeError,pI=R_,mI=xb,yI=function(e){if("object"==typeof e||dI(e))return e;throw vI("Can't set "+fI(e)+" as a prototype")},gI=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=pI(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(g6){}return function(n,r){return mI(n),yI(r),t?e(n,r):n.__proto__=r,n}}():void 0),_I=yb.f,bI=G_,EI=vb("toStringTag"),kI=function(e,t,n){e&&!n&&(e=e.prototype),e&&!bI(e,EI)&&_I(e,EI,{configurable:!0,value:t})},TI=j_,RI=yb,SI=gb,wI=vb("species"),DI=function(e){var t=TI(e),n=RI.f;SI&&t&&!t[wI]&&n(t,wI,{configurable:!0,get:function(){return this}})},II=Zb,CI=TypeError,LI=function(e,t){if(II(t,e))return e;throw CI("Incorrect invocation")},VI=ST,xI=Yb,FI=TypeError,GI=function(e){if(VI(e))return e;throw FI(xI(e)+" is not a constructor")},OI=xb,ZI=GI,PI=S_,UI=vb("species"),NI=function(e,t){var n,r=OI(e).constructor;return void 0===r||PI(n=OI(r)[UI])?t:ZI(n)},BI=R_([].slice),MI=TypeError,WI=function(e,t){if(e<t)throw MI("Not enough arguments");return e},YI=/(?:ipad|iphone|ipod).*applewebkit/i.test(H_),XI=s_,QI=qw,jI=Kk,HI=Y_,JI=G_,KI=g_,zI=KS,qI=BI,$I=Sb,eC=WI,tC=YI,nC=AI,rC=XI.setImmediate,iC=XI.clearImmediate,oC=XI.process,aC=XI.Dispatch,sC=XI.Function,uC=XI.MessageChannel,cC=XI.String,lC=0,hC={},AC="onreadystatechange";try{uI=XI.location}catch(g6){}var dC=function(e){if(JI(hC,e)){var t=hC[e];delete hC[e],t()}},fC=function(e){return function(){dC(e)}},vC=function(e){dC(e.data)},pC=function(e){XI.postMessage(cC(e),uI.protocol+"//"+uI.host)};rC&&iC||(rC=function(e){eC(arguments.length,1);var t=HI(e)?e:sC(e),n=qI(arguments,1);return hC[++lC]=function(){QI(t,void 0,n)},cI(lC),lC},iC=function(e){delete hC[e]},nC?cI=function(e){oC.nextTick(fC(e))}:aC&&aC.now?cI=function(e){aC.now(fC(e))}:uC&&!tC?(hI=(lI=new uC).port2,lI.port1.onmessage=vC,cI=jI(hI.postMessage,hI)):XI.addEventListener&&HI(XI.postMessage)&&!XI.importScripts&&uI&&"file:"!==uI.protocol&&!KI(pC)?(cI=pC,XI.addEventListener("message",vC,!1)):cI=AC in $I("script")?function(e){zI.appendChild($I("script"))[AC]=function(){zI.removeChild(this),dC(e)}}:function(e){setTimeout(fC(e),0)});var mC,yC,gC,_C,bC,EC,kC,TC,RC={set:rC,clear:iC},SC=s_,wC=/ipad|iphone|ipod/i.test(H_)&&void 0!==SC.Pebble,DC=/web0s(?!.*chrome)/i.test(H_),IC=s_,CC=Kk,LC=$T.f,VC=RC.set,xC=YI,FC=wC,GC=DC,OC=AI,ZC=IC.MutationObserver||IC.WebKitMutationObserver,PC=IC.document,UC=IC.process,NC=IC.Promise,BC=LC(IC,"queueMicrotask"),MC=BC&&BC.value;MC||(mC=function(){var e,t;for(OC&&(e=UC.domain)&&e.exit();yC;){t=yC.fn,yC=yC.next;try{t()}catch(g6){throw yC?_C():gC=void 0,g6}}gC=void 0,e&&e.enter()},xC||OC||GC||!ZC||!PC?!FC&&NC&&NC.resolve?((kC=NC.resolve(void 0)).constructor=NC,TC=CC(kC.then,kC),_C=function(){TC(mC)}):OC?_C=function(){UC.nextTick(mC)}:(VC=CC(VC,IC),_C=function(){VC(mC)}):(bC=!0,EC=PC.createTextNode(""),new ZC(mC).observe(EC,{characterData:!0}),_C=function(){EC.data=bC=!bC}));var WC=MC||function(e){var t={fn:e,next:void 0};gC&&(gC.next=t),yC||(yC=t,_C()),gC=t},YC=s_,XC=function(e){try{return{error:!1,value:e()}}catch(g6){return{error:!0,value:g6}}},QC=function(){this.head=null,this.tail=null};QC.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 jC=QC,HC=s_.Promise,JC="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,KC=!JC&&!AI&&"object"==typeof window&&"object"==typeof document,zC=s_,qC=HC,$C=Y_,eL=eS,tL=ZE,nL=vb,rL=KC,iL=JC,oL=tb;qC&&qC.prototype;var aL=nL("species"),sL=!1,uL=$C(zC.PromiseRejectionEvent),cL={CONSTRUCTOR:eL("Promise",(function(){var e=tL(qC),t=e!==String(qC);if(!t&&66===oL)return!0;if(!oL||oL<51||!/native code/.test(e)){var n=new qC((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[aL]=r,!(sL=n.then((function(){}))instanceof r))return!0}return!t&&(rL||iL)&&!uL})),REJECTION_EVENT:uL,SUBCLASSING:sL},lL={},hL=Hb,AL=TypeError,dL=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw AL("Bad Promise constructor");t=e,n=r})),this.resolve=hL(t),this.reject=hL(n)};lL.f=function(e){return new dL(e)};var fL,vL,pL,mL=uS,yL=AI,gL=s_,_L=Ob,bL=Sk,EL=gI,kL=kI,TL=DI,RL=Hb,SL=Y_,wL=Eb,DL=LI,IL=NI,CL=RC.set,LL=WC,VL=function(e,t){var n=YC.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))},xL=XC,FL=jC,GL=uk,OL=HC,ZL=lL,PL="Promise",UL=cL.CONSTRUCTOR,NL=cL.REJECTION_EVENT,BL=cL.SUBCLASSING,ML=GL.getterFor(PL),WL=GL.set,YL=OL&&OL.prototype,XL=OL,QL=YL,jL=gL.TypeError,HL=gL.document,JL=gL.process,KL=ZL.f,zL=KL,qL=!!(HL&&HL.createEvent&&gL.dispatchEvent),$L="unhandledrejection",eV=function(e){var t;return!(!wL(e)||!SL(t=e.then))&&t},tV=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&&aV(t),t.rejection=1),!0===s?n=o:(l&&l.enter(),n=s(o),l&&(l.exit(),i=!0)),n===e.promise?c(jL("Promise-chain cycle")):(r=eV(n))?_L(r,n,u,c):u(n)):c(o)}catch(g6){l&&!i&&l.exit(),c(g6)}},nV=function(e,t){e.notified||(e.notified=!0,LL((function(){for(var n,r=e.reactions;n=r.get();)tV(n,e);e.notified=!1,t&&!e.rejection&&iV(e)})))},rV=function(e,t,n){var r,i;qL?((r=HL.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),gL.dispatchEvent(r)):r={promise:t,reason:n},!NL&&(i=gL["on"+e])?i(r):e===$L&&VL("Unhandled promise rejection",n)},iV=function(e){_L(CL,gL,(function(){var t,n=e.facade,r=e.value;if(oV(e)&&(t=xL((function(){yL?JL.emit("unhandledRejection",r,n):rV($L,n,r)})),e.rejection=yL||oV(e)?2:1,t.error))throw t.value}))},oV=function(e){return 1!==e.rejection&&!e.parent},aV=function(e){_L(CL,gL,(function(){var t=e.facade;yL?JL.emit("rejectionHandled",t):rV("rejectionhandled",t,e.value)}))},sV=function(e,t,n){return function(r){e(t,r,n)}},uV=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,nV(e,!0))},cV=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw jL("Promise can't be resolved itself");var r=eV(t);r?LL((function(){var n={done:!1};try{_L(r,t,sV(cV,n,e),sV(uV,n,e))}catch(g6){uV(n,g6,e)}})):(e.value=t,e.state=1,nV(e,!1))}catch(g6){uV({done:!1},g6,e)}}};if(UL&&(QL=(XL=function(e){DL(this,QL),RL(e),_L(fL,this);var t=ML(this);try{e(sV(cV,t),sV(uV,t))}catch(g6){uV(t,g6)}}).prototype,(fL=function(e){WL(this,{type:PL,done:!1,notified:!1,parent:!1,reactions:new FL,rejection:!1,state:0,value:void 0})}).prototype=bL(QL,"then",(function(e,t){var n=ML(this),r=KL(IL(this,XL));return n.parent=!0,r.ok=!SL(e)||e,r.fail=SL(t)&&t,r.domain=yL?JL.domain:void 0,0==n.state?n.reactions.add(r):LL((function(){tV(r,n)})),r.promise})),vL=function(){var e=new fL,t=ML(e);this.promise=e,this.resolve=sV(cV,t),this.reject=sV(uV,t)},ZL.f=KL=function(e){return e===XL||undefined===e?new vL(e):zL(e)},SL(OL)&&YL!==Object.prototype)){pL=YL.then,BL||bL(YL,"then",(function(e,t){var n=this;return new XL((function(e,t){_L(pL,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete YL.constructor}catch(g6){}EL&&EL(YL,QL)}mL({global:!0,constructor:!0,wrap:!0,forced:UL},{Promise:XL}),kL(XL,PL,!1),TL(PL);var lV={},hV=lV,AV=vb("iterator"),dV=Array.prototype,fV=function(e){return void 0!==e&&(hV.Array===e||dV[AV]===e)},vV=Zk,pV=zb,mV=S_,yV=lV,gV=vb("iterator"),_V=function(e){if(!mV(e))return pV(e,gV)||pV(e,"@@iterator")||yV[vV(e)]},bV=Ob,EV=Hb,kV=xb,TV=Yb,RV=_V,SV=TypeError,wV=function(e,t){var n=arguments.length<2?RV(e):t;if(EV(n))return kV(bV(n,e));throw SV(TV(e)+" is not iterable")},DV=Ob,IV=xb,CV=zb,LV=function(e,t,n){var r,i;IV(e);try{if(!(r=CV(e,"return"))){if("throw"===t)throw n;return n}r=DV(r,e)}catch(g6){i=!0,r=g6}if("throw"===t)throw n;if(i)throw r;return IV(r),n},VV=Kk,xV=Ob,FV=xb,GV=Yb,OV=fV,ZV=lT,PV=Zb,UV=wV,NV=_V,BV=LV,MV=TypeError,WV=function(e,t){this.stopped=e,this.result=t},YV=WV.prototype,XV=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=VV(t,l),p=function(e){return r&&BV(r,"normal",e),new WV(!0,e)},m=function(e){return h?(FV(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=NV(e)))throw MV(GV(e)+" is not iterable");if(OV(i)){for(o=0,a=ZV(e);a>o;o++)if((s=m(e[o]))&&PV(YV,s))return s;return new WV(!1)}r=UV(e,i)}for(u=A?e.next:r.next;!(c=xV(u,r)).done;){try{s=m(c.value)}catch(g6){BV(r,"throw",g6)}if("object"==typeof s&&s&&PV(YV,s))return s}return new WV(!1)},QV=vb("iterator"),jV=!1;try{var HV=0,JV={next:function(){return{done:!!HV++}},return:function(){jV=!0}};JV[QV]=function(){return this},Array.from(JV,(function(){throw 2}))}catch(g6){}var KV=function(e,t){if(!t&&!jV)return!1;var n=!1;try{var r={};r[QV]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(g6){}return n},zV=HC,qV=cL.CONSTRUCTOR||!KV((function(e){zV.all(e).then(void 0,(function(){}))})),$V=Ob,ex=Hb,tx=lL,nx=XC,rx=XV;uS({target:"Promise",stat:!0,forced:qV},{all:function(e){var t=this,n=tx.f(t),r=n.resolve,i=n.reject,o=nx((function(){var n=ex(t.resolve),o=[],a=0,s=1;rx(e,(function(e){var u=a++,c=!1;s++,$V(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 ix=uS,ox=cL.CONSTRUCTOR,ax=HC,sx=j_,ux=Y_,cx=Sk,lx=ax&&ax.prototype;if(ix({target:"Promise",proto:!0,forced:ox,real:!0},{catch:function(e){return this.then(void 0,e)}}),ux(ax)){var hx=sx("Promise").prototype.catch;lx.catch!==hx&&cx(lx,"catch",hx,{unsafe:!0})}var Ax=Ob,dx=Hb,fx=lL,vx=XC,px=XV;uS({target:"Promise",stat:!0,forced:qV},{race:function(e){var t=this,n=fx.f(t),r=n.reject,i=vx((function(){var i=dx(t.resolve);px(e,(function(e){Ax(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var mx=Ob,yx=lL;uS({target:"Promise",stat:!0,forced:cL.CONSTRUCTOR},{reject:function(e){var t=yx.f(this);return mx(t.reject,void 0,e),t.promise}});var gx=xb,_x=Eb,bx=lL,Ex=function(e,t){if(gx(e),_x(t)&&t.constructor===e)return t;var n=bx.f(e);return(0,n.resolve)(t),n.promise},kx=uS,Tx=cL.CONSTRUCTOR,Rx=Ex;j_("Promise"),kx({target:"Promise",stat:!0,forced:Tx},{resolve:function(e){return Rx(this,e)}});var Sx=TypeError,wx=function(e){if(e>9007199254740991)throw Sx("Maximum allowed index exceeded");return e},Dx=uS,Ix=g_,Cx=AT,Lx=Eb,Vx=V_,xx=lT,Fx=wx,Gx=dS,Ox=xT,Zx=aI,Px=tb,Ux=vb("isConcatSpreadable"),Nx=Px>=51||!Ix((function(){var e=[];return e[Ux]=!1,e.concat()[0]!==e})),Bx=Zx("concat"),Mx=function(e){if(!Lx(e))return!1;var t=e[Ux];return void 0!==t?!!t:Cx(e)};Dx({target:"Array",proto:!0,arity:1,forced:!Nx||!Bx},{concat:function(e){var t,n,r,i,o,a=Vx(this),s=Ox(a,0),u=0;for(t=-1,r=arguments.length;t<r;t++)if(Mx(o=-1===t?a:arguments[t]))for(i=xx(o),Fx(u+i),n=0;n<i;n++,u++)n in o&&Gx(s,u,o[n]);else Fx(u+1),Gx(s,u++,o);return s.length=u,s}});var Wx=uS,Yx=HC,Xx=g_,Qx=j_,jx=Y_,Hx=NI,Jx=Ex,Kx=Sk,zx=Yx&&Yx.prototype;if(Wx({target:"Promise",proto:!0,real:!0,forced:!!Yx&&Xx((function(){zx.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Hx(this,Qx("Promise")),n=jx(e);return this.then(n?function(n){return Jx(t,e()).then((function(){return n}))}:e,n?function(n){return Jx(t,e()).then((function(){throw n}))}:e)}}),jx(Yx)){var qx=Qx("Promise").prototype.finally;zx.finally!==qx&&Kx(zx,"finally",qx,{unsafe:!0})}var $x=Y_,eF=Eb,tF=gI,nF=function(e,t,n){var r,i;return tF&&$x(r=t.constructor)&&r!==n&&eF(i=r.prototype)&&i!==n.prototype&&tF(e,i),e},rF=R_(1..valueOf),iF="\t\n\v\f\r                 \u2028\u2029\ufeff",oF=I_,aF=CS,sF=iF,uF=R_("".replace),cF="["+sF+"]",lF=RegExp("^"+cF+cF+"*"),hF=RegExp(cF+cF+"*$"),AF=function(e){return function(t){var n=aF(oF(t));return 1&e&&(n=uF(n,lF,"")),2&e&&(n=uF(n,hF,"")),n}},dF={start:AF(1),end:AF(2),trim:AF(3)},fF=gb,vF=s_,pF=R_,mF=eS,yF=Sk,gF=G_,_F=nF,bF=Zb,EF=Mb,kF=cE,TF=g_,RF=pR.f,SF=$T.f,wF=yb.f,DF=rF,IF=dF.trim,CF="Number",LF=vF[CF],VF=LF.prototype,xF=vF.TypeError,FF=pF("".slice),GF=pF("".charCodeAt),OF=function(e){var t,n,r,i,o,a,s,u,c=kF(e,"number");if(EF(c))throw xF("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=IF(c),43===(t=GF(c,0))||45===t){if(88===(n=GF(c,2))||120===n)return NaN}else if(48===t){switch(GF(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=FF(c,2)).length,s=0;s<a;s++)if((u=GF(o,s))<48||u>i)return NaN;return parseInt(o,r)}return+c};if(mF(CF,!LF(" 0o1")||!LF("0b1")||LF("+0x1"))){for(var ZF,PF=function(e){var t=arguments.length<1?0:LF(function(e){var t=kF(e,"number");return"bigint"==typeof t?t:OF(t)}(e)),n=this;return bF(VF,n)&&TF((function(){DF(n)}))?_F(Object(t),n,PF):t},UF=fF?RF(LF):"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(","),NF=0;UF.length>NF;NF++)gF(LF,ZF=UF[NF])&&!gF(PF,ZF)&&wF(PF,ZF,SF(LF,ZF));PF.prototype=VF,VF.constructor=PF,yF(vF,CF,PF,{constructor:!0})}var BF=s_,MF=g_,WF=CS,YF=dF.trim,XF=iF,QF=R_("".charAt),jF=BF.parseFloat,HF=BF.Symbol,JF=HF&&HF.iterator,KF=1/jF(XF+"-0")!=-1/0||JF&&!MF((function(){jF(Object(JF))}))?function(e){var t=YF(WF(e)),n=jF(t);return 0===n&&"-"==QF(t,0)?-0:n}:jF;uS({target:"Number",stat:!0,forced:Number.parseFloat!=KF},{parseFloat:KF}),uS({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var zF=BT.map;uS({target:"Array",proto:!0,forced:!aI("map")},{map:function(e){return zF(this,e,arguments.length>1?arguments[1]:void 0)}});var qF=V_,$F=_R,eG=lT,tG=function(e){for(var t=qF(this),n=eG(t),r=arguments.length,i=$F(r>1?arguments[1]:void 0,n),o=r>2?arguments[2]:void 0,a=void 0===o?n:$F(o,n);a>i;)t[i++]=e;return t},nG=vb,rG=Aw,iG=yb.f,oG=nG("unscopables"),aG=Array.prototype;null==aG[oG]&&iG(aG,oG,{configurable:!0,value:rG(null)});var sG=function(e){aG[oG][e]=!0},uG=sG;uS({target:"Array",proto:!0},{fill:tG}),uG("fill");var cG,lG=t(ee.setInterval),hG=function(){return"undefined"!=typeof navigator&&Bg((""+(/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},AG=function(){return"wakeLock"in navigator},dG=function(){function e(){var t=this;_y(this,e),this.enabled=!1,AG()?(this._wakeLock=null,this.handleVisibilityChange=function(){null!==t._wakeLock&&t.visible&&t.enable()},document.addEventListener("visibilitychange",this.handleVisibilityChange),document.addEventListener("fullscreenchange",this.handleVisibilityChange)):hG()?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 Ey(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(AG()&&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(hG())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=lG((function(){document.hidden||(window.location.href=window.location.href.split("#")[0],Cg(window.stop,0))}),15e3),this.enabled=!0,Op.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(){AG()?(this._wakeLock&&this._wakeLock.release(),this._wakeLock=null):hG()?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 fG(){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 vG(){var e=cG||(cG=document.querySelector("#hackAudioPP"));e?!1===e.paused&&!1===e.muted||(e.muted=!1,e.play().catch((function(e){console.log("bgAudio: ",e.message)}))):fG()}var pG=Dn,mG=Date,yG=v(mG.prototype.getTime);pG({target:"Date",stat:!0},{now:function(){return yG(new mG)}});var gG,_G,bG,EG=t(ee.Date.now),kG=!g_((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),TG=G_,RG=Y_,SG=V_,wG=kG,DG=jE("IE_PROTO"),IG=Object,CG=IG.prototype,LG=wG?IG.getPrototypeOf:function(e){var t=SG(e);if(TG(t,DG))return t[DG];var n=t.constructor;return RG(n)&&t instanceof n?n.prototype:t instanceof IG?CG:null},VG=g_,xG=Y_,FG=Eb,GG=LG,OG=Sk,ZG=vb("iterator"),PG=!1;[].keys&&("next"in(bG=[].keys())?(_G=GG(GG(bG)))!==Object.prototype&&(gG=_G):PG=!0),(!FG(gG)||VG((function(){var e={};return gG[ZG].call(e)!==e})))&&(gG={}),xG(gG[ZG])||OG(gG,ZG,(function(){return this}));var UG={IteratorPrototype:gG,BUGGY_SAFARI_ITERATORS:PG},NG=UG.IteratorPrototype,BG=Aw,MG=BE,WG=kI,YG=lV,XG=function(){return this},QG=function(e,t,n,r){var i=t+" Iterator";return e.prototype=BG(NG,{next:MG(+!r,n)}),WG(e,i,!1),YG[i]=XG,e},jG=uS,HG=Ob,JG=Y_,KG=QG,zG=LG,qG=gI,$G=kI,eO=YE,tO=Sk,nO=lV,rO=CE.PROPER,iO=CE.CONFIGURABLE,oO=UG.IteratorPrototype,aO=UG.BUGGY_SAFARI_ITERATORS,sO=vb("iterator"),uO="keys",cO="values",lO="entries",hO=function(){return this},AO=function(e,t,n,r,i,o,a){KG(n,t,r);var s,u,c,l=function(e){if(e===i&&v)return v;if(!aO&&e in d)return d[e];switch(e){case uO:case cO:case lO:return function(){return new n(this,e)}}return function(){return new n(this)}},h=t+" Iterator",A=!1,d=e.prototype,f=d[sO]||d["@@iterator"]||i&&d[i],v=!aO&&f||l(i),p="Array"==t&&d.entries||f;if(p&&(s=zG(p.call(new e)))!==Object.prototype&&s.next&&(zG(s)!==oO&&(qG?qG(s,oO):JG(s[sO])||tO(s,sO,hO)),$G(s,h,!0)),rO&&i==cO&&f&&f.name!==cO&&(iO?eO(d,"name",cO):(A=!0,v=function(){return HG(f,this)})),i)if(u={values:l(cO),keys:o?v:l(uO),entries:l(lO)},a)for(c in u)(aO||A||!(c in d))&&tO(d,c,u[c]);else jG({target:t,proto:!0,forced:aO||A},u);return d[sO]!==v&&tO(d,sO,v,{name:i}),nO[t]=v,u},dO=function(e,t){return{value:e,done:t}},fO=aR,vO=sG,pO=lV,mO=uk,yO=yb.f,gO=AO,_O=dO,bO=gb,EO="Array Iterator",kO=mO.set,TO=mO.getterFor(EO),RO=gO(Array,"Array",(function(e,t){kO(this,{type:EO,target:fO(e),index:0,kind:t})}),(function(){var e=TO(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,_O(void 0,!0)):_O("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),SO=pO.Arguments=pO.Array;if(vO("keys"),vO("values"),vO("entries"),bO&&"values"!==SO.name)try{yO(SO,"name",{value:"values"})}catch(g6){}var wO,DO,IO,CO={exports:{}},LO="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,VO=LO,xO=gb,FO=s_,GO=Y_,OO=Eb,ZO=G_,PO=Zk,UO=Yb,NO=YE,BO=Sk,MO=yb.f,WO=Zb,YO=LG,XO=gI,QO=vb,jO=N_,HO=uk.enforce,JO=uk.get,KO=FO.Int8Array,zO=KO&&KO.prototype,qO=FO.Uint8ClampedArray,$O=qO&&qO.prototype,eZ=KO&&YO(KO),tZ=zO&&YO(zO),nZ=Object.prototype,rZ=FO.TypeError,iZ=QO("toStringTag"),oZ=jO("TYPED_ARRAY_TAG"),aZ="TypedArrayConstructor",sZ=VO&&!!XO&&"Opera"!==PO(FO.opera),uZ=!1,cZ={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},lZ={BigInt64Array:8,BigUint64Array:8},hZ=function(e){var t=YO(e);if(OO(t)){var n=JO(t);return n&&ZO(n,aZ)?n[aZ]:hZ(t)}},AZ=function(e){if(!OO(e))return!1;var t=PO(e);return ZO(cZ,t)||ZO(lZ,t)};for(wO in cZ)(IO=(DO=FO[wO])&&DO.prototype)?HO(IO)[aZ]=DO:sZ=!1;for(wO in lZ)(IO=(DO=FO[wO])&&DO.prototype)&&(HO(IO)[aZ]=DO);if((!sZ||!GO(eZ)||eZ===Function.prototype)&&(eZ=function(){throw rZ("Incorrect invocation")},sZ))for(wO in cZ)FO[wO]&&XO(FO[wO],eZ);if((!sZ||!tZ||tZ===nZ)&&(tZ=eZ.prototype,sZ))for(wO in cZ)FO[wO]&&XO(FO[wO].prototype,tZ);if(sZ&&YO($O)!==tZ&&XO($O,tZ),xO&&!ZO(tZ,iZ))for(wO in uZ=!0,MO(tZ,iZ,{get:function(){return OO(this)?this[oZ]:void 0}}),cZ)FO[wO]&&NO(FO[wO],oZ,wO);var dZ={NATIVE_ARRAY_BUFFER_VIEWS:sZ,TYPED_ARRAY_TAG:uZ&&oZ,aTypedArray:function(e){if(AZ(e))return e;throw rZ("Target is not a typed array")},aTypedArrayConstructor:function(e){if(GO(e)&&(!XO||WO(eZ,e)))return e;throw rZ(UO(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n,r){if(xO){if(n)for(var i in cZ){var o=FO[i];if(o&&ZO(o.prototype,e))try{delete o.prototype[e]}catch(g6){try{o.prototype[e]=t}catch(a){}}}tZ[e]&&!n||BO(tZ,e,n?t:sZ&&zO[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,i;if(xO){if(XO){if(n)for(r in cZ)if((i=FO[r])&&ZO(i,e))try{delete i[e]}catch(g6){}if(eZ[e]&&!n)return;try{return BO(eZ,e,n?t:sZ&&eZ[e]||t)}catch(g6){}}for(r in cZ)!(i=FO[r])||i[e]&&!n||BO(i,e,t)}},getTypedArrayConstructor:hZ,isView:function(e){if(!OO(e))return!1;var t=PO(e);return"DataView"===t||ZO(cZ,t)||ZO(lZ,t)},isTypedArray:AZ,TypedArray:eZ,TypedArrayPrototype:tZ},fZ=s_,vZ=g_,pZ=KV,mZ=dZ.NATIVE_ARRAY_BUFFER_VIEWS,yZ=fZ.ArrayBuffer,gZ=fZ.Int8Array,_Z=!mZ||!vZ((function(){gZ(1)}))||!vZ((function(){new gZ(-1)}))||!pZ((function(e){new gZ,new gZ(null),new gZ(1.5),new gZ(e)}),!0)||vZ((function(){return 1!==new gZ(new yZ(2),1,void 0).length})),bZ=Sk,EZ=function(e,t,n){for(var r in t)bZ(e,r,t[r],n);return e},kZ=oT,TZ=uT,RZ=RangeError,SZ=function(e){if(void 0===e)return 0;var t=kZ(e),n=TZ(t);if(t!==n)throw RZ("Wrong length or index");return n},wZ=Array,DZ=Math.abs,IZ=Math.pow,CZ=Math.floor,LZ=Math.log,VZ=Math.LN2,xZ=s_,FZ=R_,GZ=gb,OZ=LO,ZZ=CE,PZ=YE,UZ=EZ,NZ=g_,BZ=LI,MZ=oT,WZ=uT,YZ=SZ,XZ={pack:function(e,t,n){var r,i,o,a=wZ(n),s=8*n-t-1,u=(1<<s)-1,c=u>>1,l=23===t?IZ(2,-24)-IZ(2,-77):0,h=e<0||0===e&&1/e<0?1:0,A=0;for((e=DZ(e))!=e||e===1/0?(i=e!=e?1:0,r=u):(r=CZ(LZ(e)/VZ),e*(o=IZ(2,-r))<1&&(r--,o*=2),(e+=r+c>=1?l/o:l*IZ(2,1-c))*o>=2&&(r++,o/=2),r+c>=u?(i=0,r=u):r+c>=1?(i=(e*o-1)*IZ(2,t),r+=c):(i=e*IZ(2,c-1)*IZ(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+=IZ(2,t),l-=a}return(c?-1:1)*n*IZ(2,l-t)}},QZ=LG,jZ=gI,HZ=pR.f,JZ=yb.f,KZ=tG,zZ=gS,qZ=kI,$Z=ZZ.PROPER,eP=ZZ.CONFIGURABLE,tP=uk.get,nP=uk.set,rP="ArrayBuffer",iP="DataView",oP="prototype",aP="Wrong index",sP=xZ[rP],uP=sP,cP=uP&&uP[oP],lP=xZ[iP],hP=lP&&lP[oP],AP=Object.prototype,dP=xZ.Array,fP=xZ.RangeError,vP=FZ(KZ),pP=FZ([].reverse),mP=XZ.pack,yP=XZ.unpack,gP=function(e){return[255&e]},_P=function(e){return[255&e,e>>8&255]},bP=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},EP=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},kP=function(e){return mP(e,23,4)},TP=function(e){return mP(e,52,8)},RP=function(e,t){JZ(e[oP],t,{get:function(){return tP(this)[t]}})},SP=function(e,t,n,r){var i=YZ(n),o=tP(e);if(i+t>o.byteLength)throw fP(aP);var a=tP(o.buffer).bytes,s=i+o.byteOffset,u=zZ(a,s,s+t);return r?u:pP(u)},wP=function(e,t,n,r,i,o){var a=YZ(n),s=tP(e);if(a+t>s.byteLength)throw fP(aP);for(var u=tP(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(OZ){var DP=$Z&&sP.name!==rP;if(NZ((function(){sP(1)}))&&NZ((function(){new sP(-1)}))&&!NZ((function(){return new sP,new sP(1.5),new sP(NaN),1!=sP.length||DP&&!eP})))DP&&eP&&PZ(sP,"name",rP);else{(uP=function(e){return BZ(this,cP),new sP(YZ(e))})[oP]=cP;for(var IP,CP=HZ(sP),LP=0;CP.length>LP;)(IP=CP[LP++])in uP||PZ(uP,IP,sP[IP]);cP.constructor=uP}jZ&&QZ(hP)!==AP&&jZ(hP,AP);var VP=new lP(new uP(2)),xP=FZ(hP.setInt8);VP.setInt8(0,2147483648),VP.setInt8(1,2147483649),!VP.getInt8(0)&&VP.getInt8(1)||UZ(hP,{setInt8:function(e,t){xP(this,e,t<<24>>24)},setUint8:function(e,t){xP(this,e,t<<24>>24)}},{unsafe:!0})}else cP=(uP=function(e){BZ(this,cP);var t=YZ(e);nP(this,{bytes:vP(dP(t),0),byteLength:t}),GZ||(this.byteLength=t)})[oP],hP=(lP=function(e,t,n){BZ(this,hP),BZ(e,cP);var r=tP(e).byteLength,i=MZ(t);if(i<0||i>r)throw fP("Wrong offset");if(i+(n=void 0===n?r-i:WZ(n))>r)throw fP("Wrong length");nP(this,{buffer:e,byteLength:n,byteOffset:i}),GZ||(this.buffer=e,this.byteLength=n,this.byteOffset=i)})[oP],GZ&&(RP(uP,"byteLength"),RP(lP,"buffer"),RP(lP,"byteLength"),RP(lP,"byteOffset")),UZ(hP,{getInt8:function(e){return SP(this,1,e)[0]<<24>>24},getUint8:function(e){return SP(this,1,e)[0]},getInt16:function(e){var t=SP(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=SP(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return EP(SP(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return EP(SP(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return yP(SP(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return yP(SP(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){wP(this,1,e,gP,t)},setUint8:function(e,t){wP(this,1,e,gP,t)},setInt16:function(e,t){wP(this,2,e,_P,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){wP(this,2,e,_P,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){wP(this,4,e,bP,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){wP(this,4,e,bP,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){wP(this,4,e,kP,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){wP(this,8,e,TP,t,arguments.length>2?arguments[2]:void 0)}});qZ(uP,rP),qZ(lP,iP);var FP={ArrayBuffer:uP,DataView:lP},GP=Eb,OP=Math.floor,ZP=Number.isInteger||function(e){return!GP(e)&&isFinite(e)&&OP(e)===e},PP=oT,UP=RangeError,NP=function(e){var t=PP(e);if(t<0)throw UP("The argument can't be less than 0");return t},BP=RangeError,MP=function(e,t){var n=NP(e);if(n%t)throw BP("Wrong offset");return n},WP=Zk,YP=R_("".slice),XP=cE,QP=TypeError,jP=function(e){var t=XP(e,"number");if("number"==typeof t)throw QP("Can't convert number to bigint");return BigInt(t)},HP=Kk,JP=Ob,KP=GI,zP=V_,qP=lT,$P=wV,eU=_V,tU=fV,nU=function(e){return"Big"===YP(WP(e),0,3)},rU=dZ.aTypedArrayConstructor,iU=jP,oU=uS,aU=s_,sU=Ob,uU=gb,cU=_Z,lU=dZ,hU=FP,AU=LI,dU=BE,fU=YE,vU=ZP,pU=uT,mU=SZ,yU=MP,gU=AE,_U=G_,bU=Zk,EU=Eb,kU=Mb,TU=Aw,RU=Zb,SU=gI,wU=pR.f,DU=function(e){var t,n,r,i,o,a,s,u,c=KP(this),l=zP(e),h=arguments.length,A=h>1?arguments[1]:void 0,d=void 0!==A,f=eU(l);if(f&&!tU(f))for(u=(s=$P(l,f)).next,l=[];!(a=JP(u,s)).done;)l.push(a.value);for(d&&h>2&&(A=HP(A,arguments[2])),n=qP(l),r=new(rU(c))(n),i=nU(r),t=0;n>t;t++)o=d?A(l[t],t):l[t],r[t]=i?iU(o):+o;return r},IU=BT.forEach,CU=DI,LU=yb,VU=$T,xU=nF,FU=uk.get,GU=uk.set,OU=uk.enforce,ZU=LU.f,PU=VU.f,UU=Math.round,NU=aU.RangeError,BU=hU.ArrayBuffer,MU=BU.prototype,WU=hU.DataView,YU=lU.NATIVE_ARRAY_BUFFER_VIEWS,XU=lU.TYPED_ARRAY_TAG,QU=lU.TypedArray,jU=lU.TypedArrayPrototype,HU=lU.aTypedArrayConstructor,JU=lU.isTypedArray,KU="BYTES_PER_ELEMENT",zU="Wrong length",qU=function(e,t){HU(e);for(var n=0,r=t.length,i=new e(r);r>n;)i[n]=t[n++];return i},$U=function(e,t){ZU(e,t,{get:function(){return FU(this)[t]}})},eN=function(e){var t;return RU(MU,e)||"ArrayBuffer"==(t=bU(e))||"SharedArrayBuffer"==t},tN=function(e,t){return JU(e)&&!kU(t)&&t in e&&vU(+t)&&t>=0},nN=function(e,t){return t=gU(t),tN(e,t)?dU(2,e[t]):PU(e,t)},rN=function(e,t,n){return t=gU(t),!(tN(e,t)&&EU(n)&&_U(n,"value"))||_U(n,"get")||_U(n,"set")||n.configurable||_U(n,"writable")&&!n.writable||_U(n,"enumerable")&&!n.enumerable?ZU(e,t,n):(e[t]=n.value,e)};uU?(YU||(VU.f=nN,LU.f=rN,$U(jU,"buffer"),$U(jU,"byteOffset"),$U(jU,"byteLength"),$U(jU,"length")),oU({target:"Object",stat:!0,forced:!YU},{getOwnPropertyDescriptor:nN,defineProperty:rN}),CO.exports=function(e,t,n){var r=e.match(/\d+$/)[0]/8,i=e+(n?"Clamped":"")+"Array",o="get"+e,a="set"+e,s=aU[i],u=s,c=u&&u.prototype,l={},h=function(e,t){ZU(e,t,{get:function(){return function(e,t){var n=FU(e);return n.view[o](t*r+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,i){var o=FU(e);n&&(i=(i=UU(i))<0?0:i>255?255:255&i),o.view[a](t*r+o.byteOffset,i,!0)}(this,t,e)},enumerable:!0})};YU?cU&&(u=t((function(e,t,n,i){return AU(e,c),xU(EU(t)?eN(t)?void 0!==i?new s(t,yU(n,r),i):void 0!==n?new s(t,yU(n,r)):new s(t):JU(t)?qU(u,t):sU(DU,u,t):new s(mU(t)),e,u)})),SU&&SU(u,QU),IU(wU(s),(function(e){e in u||fU(u,e,s[e])})),u.prototype=c):(u=t((function(e,t,n,i){AU(e,c);var o,a,s,l=0,A=0;if(EU(t)){if(!eN(t))return JU(t)?qU(u,t):sU(DU,u,t);o=t,A=yU(n,r);var d=t.byteLength;if(void 0===i){if(d%r)throw NU(zU);if((a=d-A)<0)throw NU(zU)}else if((a=pU(i)*r)+A>d)throw NU(zU);s=a/r}else s=mU(t),o=new BU(a=s*r);for(GU(e,{buffer:o,byteOffset:A,byteLength:a,length:s,view:new WU(o)});l<s;)h(e,l++)})),SU&&SU(u,QU),c=u.prototype=TU(jU)),c.constructor!==u&&fU(c,"constructor",u),OU(c).TypedArrayConstructor=u,XU&&fU(c,XU,i);var A=u!=s;l[i]=u,oU({global:!0,constructor:!0,forced:A,sham:!YU},l),KU in u||fU(u,KU,r),KU in c||fU(c,KU,r),CU(i)}):CO.exports=function(){};var iN=CO.exports;iN("Uint8",(function(e){return function(t,n,r){return e(this,t,n,r)}}));var oN=lT,aN=oT,sN=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("at",(function(e){var t=sN(this),n=oN(t),r=aN(e),i=r>=0?r:n+r;return i<0||i>=n?void 0:t[i]}));var uN=Yb,cN=TypeError,lN=function(e,t){if(!delete e[t])throw cN("Cannot delete property "+uN(t)+" of "+uN(e))},hN=V_,AN=_R,dN=lT,fN=lN,vN=Math.min,pN=[].copyWithin||function(e,t){var n=hN(this),r=dN(n),i=AN(e,r),o=AN(t,r),a=arguments.length>2?arguments[2]:void 0,s=vN((void 0===a?r:AN(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]:fN(n,i),i+=u,o+=u;return n},mN=dZ,yN=R_(pN),gN=mN.aTypedArray;(0,mN.exportTypedArrayMethod)("copyWithin",(function(e,t){return yN(gN(this),e,t,arguments.length>2?arguments[2]:void 0)}));var _N=BT.every,bN=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("every",(function(e){return _N(bN(this),e,arguments.length>1?arguments[1]:void 0)}));var EN=tG,kN=jP,TN=Zk,RN=Ob,SN=g_,wN=dZ.aTypedArray,DN=dZ.exportTypedArrayMethod,IN=R_("".slice);DN("fill",(function(e){var t=arguments.length;wN(this);var n="Big"===IN(TN(this),0,3)?kN(e):+e;return RN(EN,this,n,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),SN((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var CN=lT,LN=NI,VN=dZ.aTypedArrayConstructor,xN=dZ.getTypedArrayConstructor,FN=function(e){return VN(LN(e,xN(e)))},GN=function(e,t){for(var n=0,r=CN(t),i=new e(r);r>n;)i[n]=t[n++];return i},ON=FN,ZN=BT.filter,PN=function(e,t){return GN(ON(e),t)},UN=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("filter",(function(e){var t=ZN(UN(this),e,arguments.length>1?arguments[1]:void 0);return PN(this,t)}));var NN=BT.find,BN=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("find",(function(e){return NN(BN(this),e,arguments.length>1?arguments[1]:void 0)}));var MN=BT.findIndex,WN=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("findIndex",(function(e){return MN(WN(this),e,arguments.length>1?arguments[1]:void 0)}));var YN=Kk,XN=tT,QN=V_,jN=lT,HN=function(e){var t=1==e;return function(n,r,i){for(var o,a=QN(n),s=XN(a),u=YN(r,i),c=jN(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}},JN={findLast:HN(0),findLastIndex:HN(1)},KN=JN.findLast,zN=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("findLast",(function(e){return KN(zN(this),e,arguments.length>1?arguments[1]:void 0)}));var qN=JN.findLastIndex,$N=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("findLastIndex",(function(e){return qN($N(this),e,arguments.length>1?arguments[1]:void 0)}));var eB=BT.forEach,tB=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("forEach",(function(e){eB(tB(this),e,arguments.length>1?arguments[1]:void 0)}));var nB=RR.includes,rB=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("includes",(function(e){return nB(rB(this),e,arguments.length>1?arguments[1]:void 0)}));var iB=RR.indexOf,oB=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("indexOf",(function(e){return iB(oB(this),e,arguments.length>1?arguments[1]:void 0)}));var aB=s_,sB=g_,uB=R_,cB=dZ,lB=RO,hB=vb("iterator"),AB=aB.Uint8Array,dB=uB(lB.values),fB=uB(lB.keys),vB=uB(lB.entries),pB=cB.aTypedArray,mB=cB.exportTypedArrayMethod,yB=AB&&AB.prototype,gB=!sB((function(){yB[hB].call([1])})),_B=!!yB&&yB.values&&yB[hB]===yB.values&&"values"===yB.values.name,bB=function(){return dB(pB(this))};mB("entries",(function(){return vB(pB(this))}),gB),mB("keys",(function(){return fB(pB(this))}),gB),mB("values",bB,gB||!_B,{name:"values"}),mB(hB,bB,gB||!_B,{name:"values"});var EB=dZ.aTypedArray,kB=dZ.exportTypedArrayMethod,TB=R_([].join);kB("join",(function(e){return TB(EB(this),e)}));var RB=qw,SB=aR,wB=oT,DB=lT,IB=WT,CB=Math.min,LB=[].lastIndexOf,VB=!!LB&&1/[1].lastIndexOf(1,-0)<0,xB=IB("lastIndexOf"),FB=VB||!xB?function(e){if(VB)return RB(LB,this,arguments)||0;var t=SB(this),n=DB(t),r=n-1;for(arguments.length>1&&(r=CB(r,wB(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}:LB,GB=qw,OB=FB,ZB=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return GB(OB,ZB(this),t>1?[e,arguments[1]]:[e])}));var PB=BT.map,UB=FN,NB=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("map",(function(e){return PB(NB(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(UB(e))(t)}))}));var BB=Hb,MB=V_,WB=tT,YB=lT,XB=TypeError,QB=function(e){return function(t,n,r,i){BB(n);var o=MB(t),a=WB(o),s=YB(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 XB("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}},jB={left:QB(!1),right:QB(!0)},HB=jB.left,JB=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return HB(JB(this),e,t,t>1?arguments[1]:void 0)}));var KB=jB.right,zB=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return KB(zB(this),e,t,t>1?arguments[1]:void 0)}));var qB=dZ.aTypedArray,$B=dZ.exportTypedArrayMethod,eM=Math.floor;$B("reverse",(function(){for(var e,t=this,n=qB(t).length,r=eM(n/2),i=0;i<r;)e=t[i],t[i++]=t[--n],t[n]=e;return t}));var tM=s_,nM=Ob,rM=dZ,iM=lT,oM=MP,aM=V_,sM=g_,uM=tM.RangeError,cM=tM.Int8Array,lM=cM&&cM.prototype,hM=lM&&lM.set,AM=rM.aTypedArray,dM=rM.exportTypedArrayMethod,fM=!sM((function(){var e=new Uint8ClampedArray(2);return nM(hM,e,{length:1,0:3},1),3!==e[1]})),vM=fM&&rM.NATIVE_ARRAY_BUFFER_VIEWS&&sM((function(){var e=new cM(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));dM("set",(function(e){AM(this);var t=oM(arguments.length>1?arguments[1]:void 0,1),n=aM(e);if(fM)return nM(hM,this,n,t);var r=this.length,i=iM(n),o=0;if(i+t>r)throw uM("Wrong length");for(;o<i;)this[t+o]=n[o++]}),!fM||vM);var pM=FN,mM=BI,yM=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("slice",(function(e,t){for(var n=mM(yM(this),e,t),r=pM(this),i=0,o=n.length,a=new r(o);o>i;)a[i]=n[i++];return a}),g_((function(){new Int8Array(1).slice()})));var gM=BT.some,_M=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("some",(function(e){return gM(_M(this),e,arguments.length>1?arguments[1]:void 0)}));var bM=gS,EM=Math.floor,kM=function(e,t){var n=e.length,r=EM(n/2);return n<8?TM(e,t):RM(e,kM(bM(e,0,r),t),kM(bM(e,r),t),t)},TM=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},RM=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},SM=kM,wM=H_.match(/firefox\/(\d+)/i),DM=!!wM&&+wM[1],IM=/MSIE|Trident/.test(H_),CM=H_.match(/AppleWebKit\/(\d+)\./),LM=!!CM&&+CM[1],VM=Qk,xM=g_,FM=Hb,GM=SM,OM=DM,ZM=IM,PM=tb,UM=LM,NM=dZ.aTypedArray,BM=dZ.exportTypedArrayMethod,MM=s_.Uint16Array,WM=MM&&VM(MM.prototype.sort),YM=!(!WM||xM((function(){WM(new MM(2),null)}))&&xM((function(){WM(new MM(2),{})}))),XM=!!WM&&!xM((function(){if(PM)return PM<74;if(OM)return OM<67;if(ZM)return!0;if(UM)return UM<602;var e,t,n=new MM(516),r=Array(516);for(e=0;e<516;e++)t=e%4,n[e]=515-e,r[e]=e-2*t+3;for(WM(n,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(n[e]!==r[e])return!0}));BM("sort",(function(e){return void 0!==e&&FM(e),XM?WM(this,e):GM(NM(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))}),!XM||YM);var QM=uT,jM=_R,HM=FN,JM=dZ.aTypedArray;(0,dZ.exportTypedArrayMethod)("subarray",(function(e,t){var n=JM(this),r=n.length,i=jM(e,r);return new(HM(n))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,QM((void 0===t?r:jM(t,r))-i))}));var KM=qw,zM=dZ,qM=g_,$M=BI,eW=s_.Int8Array,tW=zM.aTypedArray,nW=zM.exportTypedArrayMethod,rW=[].toLocaleString,iW=!!eW&&qM((function(){rW.call(new eW(1))}));nW("toLocaleString",(function(){return KM(rW,iW?$M(tW(this)):tW(this),$M(arguments))}),qM((function(){return[1,2].toLocaleString()!=new eW([1,2]).toLocaleString()}))||!qM((function(){eW.prototype.toLocaleString.call([1,2])})));var oW=dZ.exportTypedArrayMethod,aW=g_,sW=R_,uW=s_.Uint8Array,cW=uW&&uW.prototype||{},lW=[].toString,hW=sW([].join);aW((function(){lW.call({})}))&&(lW=function(){return hW(this)});var AW=cW.toString!=lW;oW("toString",lW,AW);var dW=new(function(){function e(){var t,n=this;_y(this,e);try{var r=/xgd=(\d)/.exec(document.cookie);this._status=!!r,this._level=r&&r[1]}catch(i){this._status=!1}ql(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=Ll(A=[r,i,o,a,s,u,c,l,h]).call(A,(function(e){return void 0!==e}));(f=console)[e].apply(f,Ag(d=["["+v+"]:"]).call(d,Ly(p)))}}}))}return Ey(e,[{key:"enable",get:function(){return this._status}},{key:"long",get:function(){return"2"===this._level}}]),e}());function fW(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 vW=D,pW=v,mW=L,yW=i,gW=Ai,_W=$i,bW=V,EW=He,kW=W,TW=Object.assign,RW=Object.defineProperty,SW=pW([].concat),wW=!TW||yW((function(){if(vW&&1!==TW({b:1},TW(RW({},"a",{enumerable:!0,get:function(){RW(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!=TW({},e)[n]||gW(TW({},t)).join("")!=r}))?function(e,t){for(var n=EW(e),r=arguments.length,i=1,o=_W.f,a=bW.f;r>i;)for(var s,u=kW(arguments[i++]),c=o?SW(gW(u),o(u)):gW(u),l=c.length,h=0;l>h;)s=c[h++],vW&&!mW(a,u,s)||(n[s]=u[s]);return n}:TW,DW=wW;Dn({target:"Object",stat:!0,arity:2,forced:Object.assign!==DW},{assign:DW});var IW=t(ee.Object.assign),CW=gb,LW=R_,VW=Ob,xW=g_,FW=MS,GW=GR,OW=eR,ZW=V_,PW=tT,UW=Object.assign,NW=Object.defineProperty,BW=LW([].concat),MW=!UW||xW((function(){if(CW&&1!==UW({b:1},UW(NW({},"a",{enumerable:!0,get:function(){NW(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!=UW({},e)[n]||FW(UW({},t)).join("")!=r}))?function(e,t){for(var n=ZW(e),r=arguments.length,i=1,o=GW.f,a=OW.f;r>i;)for(var s,u=PW(arguments[i++]),c=o?BW(FW(u),o(u)):FW(u),l=c.length,h=0;l>h;)s=c[h++],CW&&!VW(a,u,s)||(n[s]=u[s]);return n}:UW,WW=MW;uS({target:"Object",stat:!0,arity:2,forced:Object.assign!==WW},{assign:WW});var YW="xg-video",XW=!1;try{XW=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(_6){}var QW={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:XW?6:8,maxDecodeOnceFirstTime:8,maxDecodeOnceWebcodec:20};function jW(){return YW}function HW(){return QW}function JW(){var e="undefined"!=typeof customElements&&customElements.get(YW);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 KW(){if("undefined"==typeof customElements)return!1;var e=customElements.get(YW);return XW&&!(null==e||!e.h265SimdUrl)}function zW(){if("undefined"==typeof customElements)return!1;var e=customElements.get(YW);return!!window.SharedArrayBuffer&&!(null==e||!e.h265ThreadUrl)}var qW=!1;try{var $W,eY;qW="1"===(null===($W=localStorage)||void 0===$W||null===(eY=$W.getItem)||void 0===eY?void 0:eY.call($W,"_sds"))}catch(_6){}var tY=0,nY=0,rY=0,iY=!1;function oY(e){localStorage.setItem("xgv_dis",e),2===e&&localStorage.setItem("xgv_dist",(new Date).getTime())}function aY(){if(!0===(!!iY||0!==HW().evaluateVVCount&&(tY===HW().evaluateVVCount&&(rY=nY/tY),rY>=HW().disabledByLowdecodePrecent&&(iY=!0),iY)))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<HW().disabledDuration)return!0;sY()}}function sY(){localStorage.removeItem("xgv_dist"),localStorage.removeItem("xgv_dis")}var uY={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}Sh&&(r.prototype=Sh(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?lm(r).call(r,1):r);return kl?Ag(i).call(i,kl(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}(uY);var cY=t(uY.exports),lY=r.isFinite;Dn({target:"Number",stat:!0},{isFinite:Number.isFinite||function(e){return"number"==typeof e&&lY(e)}});var hY=t(ee.Number.isFinite),AY=Ce,dY=He,fY=W,vY=Pn,pY=TypeError,mY=function(e){return function(t,n,r,i){AY(n);var o=dY(t),a=fY(o),s=vY(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 pY("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}},yY={left:mY(!1),right:mY(!0)}.left;Dn({target:"Array",proto:!0,forced:!qA&&fe>79&&fe<83||!Ml("reduce")},{reduce:function(e){var t=arguments.length;return yY(this,e,t,t>1?arguments[1]:void 0)}});var gY=Sl("Array").reduce,_Y=ae,bY=gY,EY=Array.prototype,kY=t((function(e){var t=e.reduce;return e===EY||_Y(EY,e)&&t===EY.reduce?bY:t})),TY=s_.isFinite;uS({target:"Number",stat:!0},{isFinite:Number.isFinite||function(e){return"number"==typeof e&&TY(e)}});var RY=uS,SY=AT,wY=ST,DY=Eb,IY=_R,CY=lT,LY=aR,VY=dS,xY=vb,FY=BI,GY=aI("slice"),OY=xY("species"),ZY=Array,PY=Math.max;RY({target:"Array",proto:!0,forced:!GY},{slice:function(e,t){var n,r,i,o=LY(this),a=CY(o),s=IY(e,a),u=IY(void 0===t?a:t,a);if(SY(o)&&(n=o.constructor,(wY(n)&&(n===ZY||SY(n.prototype))||DY(n)&&null===(n=n[OY]))&&(n=void 0),n===ZY||void 0===n))return FY(o,s,u);for(r=new(void 0===n?ZY:n)(PY(u-s,0)),i=0;s<u;s++,i++)s in o&&VY(r,i,o[s]);return r.length=i,r}});var UY={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},NY=["waiting","canplay","play","playing","pause","seeking","seeked","loadeddata","loadedmetadata","timeupdate","durationchange","volumechange","progress","error","ended","resize","loadstart","decodefps","lowdecode","largeavgap","firstframe"],BY={AUDIO_READY:"audio_ready",AUDIO_NOT_ALLOWED_AUTOPLAY:"audio_not_allowed_autoplay",AUDIO_WAITING:"audio_waiting",AUDIO_SYNC_DTS:"audio_sync_dts"},MY={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"},WY={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"},YY={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"},XY=function(e){Ty(n,e);var t=Dy(n);function n(e,r){var i;return _y(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 Ey(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(WY.APPEND_CHUNKS,wm(e=this._appendChunk).call(e,this)),this._parent.on(WY.RESET_BASE_DTS,wm(t=this._resetDts).call(t,this)),this._parent.on(WY.START_RENDER,wm(n=this._startRender).call(n,this)),this._parent.on(WY.DO_PLAY,wm(r=this._doPlay).call(r,this)),this._parent.on(WY.DO_PAUSE,wm(i=this._doPause).call(i,this)),this._parent.on(WY.DO_SEEK,wm(o=this._doSeek).call(o,this)),this._parent.on(WY.DESTROY,wm(a=this._destroy).call(a,this)),this._parent.on(WY.CHASE_FRAME,wm(s=this._doChaseFrame).call(s,this)),this._parent.on(WY.SINGLE_TRACK,(function(e){u._singleTrack=e})),this._parent.on(WY.SET_PLAY_MODE,(function(e){u._isLive="LIVE"===e})),this._parent.on(WY.INNER_DEGRADE,(function(){u._innerDegrade=!0})),this._parent.on(WY.SET_VIDEO_DURATION,(function(e){u.duration=e}))}}]),n}(cY),QY=Se,jY=TypeError,HY=function(e,t){if(!delete e[t])throw jY("Cannot delete property "+QY(t)+" of "+QY(e))},JY=ji,KY=Math.floor,zY=function(e,t){var n=e.length,r=KY(n/2);return n<8?qY(e,t):$Y(e,zY(JY(e,0,r),t),zY(JY(e,r),t),t)},qY=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},$Y=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},eX=zY,tX=se.match(/firefox\/(\d+)/i),nX=!!tX&&+tX[1],rX=/MSIE|Trident/.test(se),iX=se.match(/AppleWebKit\/(\d+)\./),oX=!!iX&&+iX[1],aX=Dn,sX=v,uX=Ce,cX=He,lX=Pn,hX=HY,AX=Xr,dX=i,fX=eX,vX=Ml,pX=nX,mX=rX,yX=fe,gX=oX,_X=[],bX=sX(_X.sort),EX=sX(_X.push),kX=dX((function(){_X.sort(void 0)})),TX=dX((function(){_X.sort(null)})),RX=vX("sort"),SX=!dX((function(){if(yX)return yX<70;if(!(pX&&pX>3)){if(mX)return!0;if(gX)return gX<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++)_X.push({k:t+r,v:n})}for(_X.sort((function(e,t){return t.v-e.v})),r=0;r<_X.length;r++)t=_X[r].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));aX({target:"Array",proto:!0,forced:kX||!TX||!RX||!SX},{sort:function(e){void 0!==e&&uX(e);var t=cX(this);if(SX)return void 0===e?bX(t):bX(t,e);var n,r,i=[],o=lX(t);for(r=0;r<o;r++)r in t&&EX(i,t[r]);for(fX(i,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:AX(t)>AX(n)?1:-1}}(e)),n=lX(i),r=0;r<n;)t[r]=i[r++];for(;r<o;)hX(t,r++);return t}});var wX=Sl("Array").sort,DX=ae,IX=wX,CX=Array.prototype,LX=t((function(e){var t=e.sort;return e===CX||DX(CX,e)&&t===CX.sort?IX:t})),VX=uS,xX=R_,FX=Hb,GX=V_,OX=lT,ZX=lN,PX=CS,UX=g_,NX=SM,BX=WT,MX=DM,WX=IM,YX=tb,XX=LM,QX=[],jX=xX(QX.sort),HX=xX(QX.push),JX=UX((function(){QX.sort(void 0)})),KX=UX((function(){QX.sort(null)})),zX=BX("sort"),qX=!UX((function(){if(YX)return YX<70;if(!(MX&&MX>3)){if(WX)return!0;if(XX)return XX<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++)QX.push({k:t+r,v:n})}for(QX.sort((function(e,t){return t.v-e.v})),r=0;r<QX.length;r++)t=QX[r].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));VX({target:"Array",proto:!0,forced:JX||!KX||!zX||!qX},{sort:function(e){void 0!==e&&FX(e);var t=GX(this);if(qX)return void 0===e?jX(t):jX(t,e);var n,r,i=[],o=OX(t);for(r=0;r<o;r++)r in t&&HX(i,t[r]);for(NX(i,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:PX(t)>PX(n)?1:-1}}(e)),n=OX(i),r=0;r<n;)t[r]=i[r++];for(;r<o;)ZX(t,r++);return t}});var $X=function(){function e(t){_y(this,e),this.TAG="AudioTimeRange",this._parent=t,this._buffers=[],this._duration=0,this._baseDts=0,this._lastBuffer=null}return Ey(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(dW.log(this.TAG,Ag(i=Ag(o="add new buffer range, startDts:".concat(n,", [")).call(o,c.start," , ")).call(i,c.end,"]")),!Ll(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=Ll(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=LX(e=lm(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=Ll(t=this._buffers).call(t,(function(t){return t.start<e+.5&&t.end>e+.5}))[0];return dW.log(this.TAG,Ag(n=Ag(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}(),eQ=[-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],tQ=[-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],nQ=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 rQ={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=eQ[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=tQ[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=Ll(e).call(e,(function(e){return e.dts===t})).length;if(!(n<=1))for(var r=0;r<n;r++)e[r].data=nQ}},iQ="create new AudioContext error",oQ=function(e){Ty(i,e);var t,n,r=Dy(i);function i(e,t){var n,o;return _y(this,i),ky(wy(o=r.call(this,e,t)),"doPause",o._doPause),o.TAG="AudioRender",o._timeRange=new $X(wy(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=wm(n=o._onSourceBufferEnded).call(n,wy(o)),o._initAudioCtx(e.volume||.6),o._bindEvents(),o}return Ey(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;dW.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,dW.log(this.TAG,"webAudio state:",this._audioCtx.state),fG(),this._bindAudioCtxEvent(),this._audioCtx.suspend()):(dW.warn(this.TAG,"create webaudio error!"),void Cg((function(){t._emitTimelineEvents(WY.PLAY_EVENT,UY.ERROR,t._assembleErr(iQ))})))}},{key:"_bindAudioCtxEvent",value:function(){var e=this;this._onStateChange=function(){e._audioCtx&&"running"===e._audioCtx.state&&e._ready&&e._emitTimelineEvents(WY.PLAY_EVENT,UY.PLAYING)},this._audioCtx.addEventListener("statechange",this._onStateChange)}},{key:"_bindEvents",value:function(){var e,t=this;Iy(Ry(i.prototype),"_bindEvents",this).call(this),this._parent.on(YY.CHASE_AUDIO_FRAME,wm(e=this._doChaseFrame).call(e,this)),this._parent.on(WY.UPDATE_VOLUME,(function(e){t._gainNode&&(t._gainNode.gain.value=hY(e)?e:1,t._emitTimelineEvents(WY.PLAY_EVENT,UY.VOLUME_CHANGE))})),this._parent.on(WY.END_OF_STREAM,(function(){var e;t._endOfStream=!0,t.noAudio||null!==(e=t._timeRange)&&void 0!==e&&e.hasBuffer()||null==t||t._emitTimelineEvents(WY.PLAY_EVENT,UY.ENDED)}))}},{key:"_appendChunk",value:function(e,t){if(!this.noAudio){this._meta||(this._meta=t,dW.warn(this.TAG,"audio set metadata",this._meta));var n,r=t.samples;if(r.length)if(this._sampleQueue=Ag(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 Op.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&&(dW.log(this.TAG,"_doChaseFrame","startTime:",r.start,"buffeLength:",this.buffered.end(0)-r.start),this._reInitAudioCtx(r.start).then((function(){t._startRender(),t._emitTimelineEvents(WY.PLAY_EVENT,UY.TIMEUPDATE)})).catch((function(e){})))}},{key:"_decodeAACWrapper",value:(n=gy(my().mark((function e(){var t,n,r,i,o,a,s,u,c,l;return my().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=sg(i/3-1)||1,a=sg(t/o),s=[],u=0;u<o;u++){var h,A;u<o-1?s.push(lm(h=this._sampleQueue).call(h,u*a,(u+1)*a)):s.push(lm(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(WY.UPDATE_SEGMENT_END,l.end)),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(12),this._emitTimelineEvents(WY.PLAY_EVENT,UY.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=gy(my().mark((function e(t){var n;return my().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;rQ.checkRefillFrame(e);var i=Kg(e).call(e,(function(e){return rQ.packageAACToAdts(t._meta,e)})),o=rQ.concatAdts(i,0);return new Op((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,dW.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,dW.log(t.TAG,"_decodeAAC","set ready true start=",s),t.emit(BY.AUDIO_READY,s))}t._emitTimelineEvents(WY.PLAY_EVENT,UY.PROGRESS),t._emitTimelineEvents(WY.PLAY_EVENT,UY.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=kY(e=this._sampleQueue).call(e,(function(e,t){return e+=t.data.byteLength}),0),o=new Uint8Array(i),a=0,s=0;ql(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=rQ.decodeG711(o,c),f=rQ.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,dW.log(this.TAG,"_decodeG711","set ready true"),this.emit(BY.AUDIO_READY,m)),this._emitTimelineEvents(WY.PLAY_EVENT,UY.PROGRESS),this._emitTimelineEvents(WY.PLAY_EVENT,UY.DURATION_CHANGE)}catch(_6){this._emitTimelineEvents(WY.PLAY_EVENT,UY.ERROR,this._assembleErr("ERROR_MSG.DECODE_ERR:".concat(_6&&_6.message)))}}}},{key:"_onSourceBufferEnded",value:function(){var e;(this._isSourceBufferEnd=!0,dW.long)&&dW.log(this.TAG,Ag(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&&(dW.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(BY.AUDIO_READY)):n:(this._endOfStream||!this._isLive)&&this.currentTime-this.duration>-.5?(this._emitTimelineEvents(WY.PLAY_EVENT,UY.TIMEUPDATE),void this._emitTimelineEvents(WY.PLAY_EVENT,UY.ENDED)):(this._ready=!1,this._audioCtx.suspend(),this.emit(BY.AUDIO_WAITING),void(e&&(this._onAudioReady||(this._onAudioReady=function(e){t._ajustSeekTime(e)}),this.removeListener(BY.AUDIO_READY,this._onAudioReady),this.once(BY.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){})),vG()),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(_6){}t.startDts&&this._emitTimelineEvents(WY.SYNC_DTS,t.startDts)}}}},{key:"_destroy",value:function(){dW.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}(XY),aQ=Dn,sQ=qo.findIndex,uQ="findIndex",cQ=!0;uQ in[]&&Array(1)[uQ]((function(){cQ=!1})),aQ({target:"Array",proto:!0,forced:cQ},{findIndex:function(e){return sQ(this,e,arguments.length>1?arguments[1]:void 0)}});var lQ=Sl("Array").findIndex,hQ=ae,AQ=lQ,dQ=Array.prototype,fQ=t((function(e){var t=e.findIndex;return e===dQ||hQ(dQ,e)&&t===dQ.findIndex?AQ:t})),vQ=D,pQ=Cn,mQ=TypeError,yQ=Object.getOwnPropertyDescriptor,gQ=vQ&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(g6){return g6 instanceof TypeError}}(),_Q=Dn,bQ=He,EQ=Kr,kQ=Fn,TQ=Pn,RQ=gQ?function(e,t){if(pQ(e)&&!yQ(e,"length").writable)throw mQ("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},SQ=Nn,wQ=Tr,DQ=Yn,IQ=HY,CQ=Dr("splice"),LQ=Math.max,VQ=Math.min;_Q({target:"Array",proto:!0,forced:!CQ},{splice:function(e,t){var n,r,i,o,a,s,u=bQ(this),c=TQ(u),l=EQ(e,c),h=arguments.length;for(0===h?n=r=0:1===h?(n=0,r=c-l):(n=h-2,r=VQ(LQ(kQ(t),0),c-l)),SQ(c+n-r),i=wQ(u,r),o=0;o<r;o++)(a=l+o)in u&&DQ(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]:IQ(u,s);for(o=c;o>c-r+n;o--)IQ(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]:IQ(u,s);for(o=0;o<n;o++)u[o+l]=arguments[o+2];return RQ(u,c-r+n),i}});var xQ=Sl("Array").splice,FQ=ae,GQ=xQ,OQ=Array.prototype,ZQ=t((function(e){var t=e.splice;return e===OQ||FQ(OQ,e)&&t===OQ.splice?GQ:t})),PQ=uS,UQ=BT.findIndex,NQ=sG,BQ="findIndex",MQ=!0;BQ in[]&&Array(1)[BQ]((function(){MQ=!1})),PQ({target:"Array",proto:!0,forced:MQ},{findIndex:function(e){return UQ(this,e,arguments.length>1?arguments[1]:void 0)}}),NQ(BQ);var WQ=gb,YQ=AT,XQ=TypeError,QQ=Object.getOwnPropertyDescriptor,jQ=WQ&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(g6){return g6 instanceof TypeError}}(),HQ=uS,JQ=V_,KQ=_R,zQ=oT,qQ=lT,$Q=jQ?function(e,t){if(YQ(e)&&!QQ(e,"length").writable)throw XQ("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},ej=wx,tj=xT,nj=dS,rj=lN,ij=aI("splice"),oj=Math.max,aj=Math.min;HQ({target:"Array",proto:!0,forced:!ij},{splice:function(e,t){var n,r,i,o,a,s,u=JQ(this),c=qQ(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=aj(oj(zQ(t),0),c-l)),ej(c+n-r),i=tj(u,r),o=0;o<r;o++)(a=l+o)in u&&nj(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]:rj(u,s);for(o=c;o>c-r+n;o--)rj(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]:rj(u,s);for(o=0;o<n;o++)u[o+l]=arguments[o+2];return $Q(u,c-r+n),i}});var sj=V_,uj=MS;uS({target:"Object",stat:!0,forced:g_((function(){uj(1)}))},{keys:function(e){return uj(sj(e))}});var cj=vD.charAt,lj=CS,hj=uk,Aj=AO,dj=dO,fj="String Iterator",vj=hj.set,pj=hj.getterFor(fj);Aj(String,"String",(function(e){vj(this,{type:fj,string:lj(e),index:0})}),(function(){var e,t=pj(this),n=t.string,r=t.index;return r>=n.length?dj(void 0,!0):(e=cj(n,r),t.index+=e.length,dj(e,!1))}));var mj=s_,yj=Nk,gj=Wk,_j=RO,bj=YE,Ej=vb,kj=Ej("iterator"),Tj=Ej("toStringTag"),Rj=_j.values,Sj=function(e,t){if(e){if(e[kj]!==Rj)try{bj(e,kj,Rj)}catch(g6){e[kj]=Rj}if(e[Tj]||bj(e,Tj,t),yj[t])for(var n in _j)if(e[n]!==_j[n])try{bj(e,n,_j[n])}catch(g6){e[n]=_j[n]}}};for(var wj in yj)Sj(mj[wj]&&mj[wj].prototype,wj);function Dj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ij(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),kh(e,r.key,r)}}function Cj(e,t,n){return t&&Ij(e.prototype,t),n&&Ij(e,n),kh(e,"prototype",{writable:!1}),e}function Lj(e,t,n){return t in e?kh(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vj(e,t){return function(e){if(zm(e))return e}(e)||function(e,t){var n=null==e?null:void 0!==Th&&qm(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)||Fj(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 xj(e){return function(e){if(zm(e))return Gj(e)}(e)||function(e){if(void 0!==Th&&null!=qm(e)||null!=e["@@iterator"])return fy(e)}(e)||Fj(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 Fj(e,t){var n;if(e){if("string"==typeof e)return Gj(e,t);var r=lm(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?fy(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Gj(e,t):void 0}}function Gj(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}Sj(gj,"DOMTokenList");var Oj="video",Zj="hevc",Pj=Ob,Uj=G_,Nj=Zb,Bj=VS,Mj=RegExp.prototype,Wj=CE.PROPER,Yj=Sk,Xj=xb,Qj=CS,jj=g_,Hj=function(e){var t=e.flags;return void 0!==t||"flags"in Mj||Uj(e,"flags")||!Nj(Mj,e)?t:Pj(Bj,e)},Jj="toString",Kj=RegExp.prototype[Jj],zj=jj((function(){return"/a/b"!=Kj.call({source:"a",flags:"b"})})),qj=Wj&&Kj.name!=Jj;(zj||qj)&&Yj(RegExp.prototype,Jj,(function(){var e=Xj(this);return"/"+Qj(e.source)+"/"+Qj(Hj(e))}),{unsafe:!0});var $j=gb,eH=CE.EXISTS,tH=R_,nH=yb.f,rH=Function.prototype,iH=tH(rH.toString),oH=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,aH=tH(oH.exec);$j&&!eH&&nH(rH,"name",{configurable:!0,get:function(){try{return aH(oH,iH(this))[1]}catch(g6){return""}}});var sH=uS,uH=tT,cH=aR,lH=WT,hH=R_([].join),AH=uH!=Object,dH=lH("join",",");sH({target:"Array",proto:!0,forced:AH||!dH},{join:function(e){return hH(cH(this),void 0===e?",":e)}});var fH=Dn,vH=ti.indexOf,pH=Ml,mH=E([].indexOf),yH=!!mH&&1/mH([1],1,-0)<0;fH({target:"Array",proto:!0,forced:yH||!pH("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return yH?mH(this,e,t)||0:vH(this,e,t)}});var gH=Sl("Array").indexOf,_H=ae,bH=gH,EH=Array.prototype,kH=t((function(e){var t=e.indexOf;return e===EH||_H(EH,e)&&t===EH.indexOf?bH:t}));function TH(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=Ll(t).call(t,Boolean);var r=new Uint8Array(kY(t).call(t,(function(e,t){return e+t.byteLength}),0)),i=0;return ql(t).call(t,(function(e){r.set(e,i),i+=e.byteLength})),r}function RH(e){if(!zm(e)){for(var t=[],n="",r=0;r<e.length;r++)r%2&&(n=e[r-1]+e[r],t.push(sg(n,16)),n="");return t}return Kg(e).call(e,(function(e){return sg(e,16)}))}var SH=tn,wH=L,DH=ze,IH=ae,CH=function(){var e=SH(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},LH=RegExp.prototype,VH=ae,xH=function(e){var t=e.flags;return void 0!==t||"flags"in LH||DH(e,"flags")||!IH(LH,e)?t:wH(CH,e)},FH=RegExp.prototype,GH=t((function(e){return e===FH||VH(FH,e)?xH(e):e.flags})),OH=Sl("Array").entries,ZH=$n,PH=ze,UH=ae,NH=OH,BH=Array.prototype,MH={DOMTokenList:!0,NodeList:!0},WH=t((function(e){var t=e.entries;return e===BH||UH(BH,e)&&t===BH.entries||PH(MH,ZH(e))?NH:t})),YH=Dn,XH=qo.find,QH="find",jH=!0;QH in[]&&Array(1)[QH]((function(){jH=!1})),YH({target:"Array",proto:!0,forced:jH},{find:function(e){return XH(this,e,arguments.length>1?arguments[1]:void 0)}});var HH=Sl("Array").find,JH=ae,KH=HH,zH=Array.prototype,qH=t((function(e){var t=e.find;return e===zH||JH(zH,e)&&t===zH.find?KH:t})),$H=bk,eJ=yb,tJ=function(e,t,n){return n.get&&$H(n.get,t,{getter:!0}),n.set&&$H(n.set,t,{setter:!0}),eJ.f(e,t,n)},nJ=gb,rJ=tJ,iJ=VS,oJ=g_,aJ=s_.RegExp,sJ=aJ.prototype;nJ&&oJ((function(){var e=!0;try{aJ(".","d")}catch(g6){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(sJ,"flags").get.call(t)!==r||n!==r}))&&rJ(sJ,"flags",{configurable:!0,get:iJ});var uJ=oT,cJ=CS,lJ=I_,hJ=RangeError,AJ=uS,dJ=BT.find,fJ=sG,vJ="find",pJ=!0;vJ in[]&&Array(1)[vJ]((function(){pJ=!1})),AJ({target:"Array",proto:!0,forced:pJ},{find:function(e){return dJ(this,e,arguments.length>1?arguments[1]:void 0)}}),fJ(vJ);var mJ=xb,yJ=LV,gJ=Kk,_J=Ob,bJ=V_,EJ=function(e,t,n,r){try{return r?t(mJ(n)[0],n[1]):t(n)}catch(g6){yJ(e,"throw",g6)}},kJ=fV,TJ=ST,RJ=lT,SJ=dS,wJ=wV,DJ=_V,IJ=Array,CJ=DI,LJ="ArrayBuffer",VJ=FP[LJ];uS({global:!0,constructor:!0,forced:s_[LJ]!==VJ},{ArrayBuffer:VJ}),CJ(LJ);var xJ,FJ=function(){function e(){Dj(this,e),this.buffer=new Uint8Array(0)}return Cj(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];ql(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];ql(r).call(r,(function(e){t+=e.length}));var o=new e(t),a=0;return ql(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}(),GJ=Math.pow(2,32)-1,OJ=function(){function e(){Dj(this,e)}return Cj(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=Ll(n).call(n,Boolean);var i=8+kY(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 ql(n).call(n,(function(e){o.set(e,a),a+=e.byteLength})),o}},{key:"ftyp",value:function(t){return qH(t).call(t,(function(e){return e.type===Oj&&e.codecType===Zj}))?e.FTYPHEV1:e.FTYPAVC1}},{key:"initSegment",value:function(t){return TH(e.ftyp(t),e.moov(t))}},{key:"pssh",value:function(t){var n,r=new Uint8Array(Ag(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],RH(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,Ag(n=[e.types.moov,e.mvhd(t[0].mvhdDurtion||t[0].duration,t[0].mvhdTimecale||t[0].timescale),e.mvex(t)]).call(n,xj(Kg(t).call(t,(function(t){return e.trak(t)}))),[r]))}var i;return e.box.apply(e,Ag(i=[e.types.moov,e.mvhd(t[0].mvhdDurtion||t[0].duration,t[0].mvhdTimecale||t[0].timescale)]).call(i,xj(Kg(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===Oj?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(WH(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(Ag(r=Ag(n=Ag(i=[1,o[1],o[2],o[3],255,225,o.length>>>8&255,255&o.length]).apply(i,xj(o))).call(n,[1,a.length>>>8&255,255&a.length])).apply(r,xj(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(Ag(n=[0,0,0,0,0,0,255&t.default_IsEncrypted,255&t.default_IV_size]).call(n,RH(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===Zj,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,Ag(n=[i]).call(n,a))}},{key:"avcC",value:function(t){var n,r,i,o,a,s,u=[],c=[];return ql(n=t.sps).call(n,(function(e){s=e.byteLength,u.push(s>>>8&255),u.push(255&s),u.push.apply(u,xj(e))})),ql(r=t.pps).call(r,(function(e){s=e.byteLength,c.push(s>>>8&255),c.push(255&s),c.push.apply(c,xj(e))})),e.box(e.types.avcC,new Uint8Array(Ag(o=Ag(i=Ag(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,xj(e))};i.length&&(r.push(160,0,i.length),ql(i).call(i,l)),o.length&&(r.push(161,0,o.length),ql(o).call(o,l)),a.length&&(r.push(162,0,a.length),ql(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=Vj(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(Ag(n=Ag(r=Ag(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,Ag(n=[e.types.mvex]).call(n,xj(Kg(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,Ag(n=[e.types.moof,e.mfhd(t[0].samples?t[0].samples[0].gopId:0)]).call(n,xj(Kg(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,ql(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 FJ;return ql(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 FJ,i=FJ.writeUint32(t.samples.length),o=null;if(t.isVideo){var a=t.videoSencLength;o=FJ.writeUint32(16*t.samples.length+a+149),!t.isVideoEncryption&&t.isAudioEncryption&&(o=FJ.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=FJ.writeUint32(s)}return ql(n=t.samples).call(n,(function(e){r.write(FJ.writeUint32(e.duration)),r.write(FJ.writeUint32(e.size)),r.write(FJ.writeUint32(e.keyframe?33554432:65536)),t.isVideo&&r.write(FJ.writeUint32(e.cts?e.cts:0))})),e.box(e.types.trun,this.extension(0,GH(t)),i,o,r.buffer)}},{key:"senc",value:function(t){var n=new FJ,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(FJ.writeUint32(16+s),e.types.senc,this.extension(0,o)),n.write(FJ.writeUint32(r)),ql(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(FJ.writeUint16(e.subsamples.length)),ql(r=e.subsamples).call(r,(function(e){n.write(FJ.writeUint16(e.BytesOfClearData)),n.write(FJ.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/(GJ+1)),i=Math.floor(n%(GJ+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,Ag(n=[e.types.moov,e.mvhd(t[0].duration,t[0].timescale)]).call(n,xj(Kg(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===Oj?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,Ag(n=[e.types.stbl]).call(n,i))}},{key:"stts",value:function(t){var n=t.length,r=new Uint8Array(8*n),i=0;return ql(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,TH(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 ql(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,TH(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 ql(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,TH(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 ql(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,TH(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 ql(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,TH(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 ql(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,TH(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;ql(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&&ql(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}();Lj(OJ,"types",kY(xJ=["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(xJ,(function(e,t){return e[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)],e}),Sh(null))),Lj(OJ,"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])}),Lj(OJ,"FTYPAVC1",OJ.box(OJ.types.ftyp,new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]))),Lj(OJ,"FTYPHEV1",OJ.box(OJ.types.ftyp,new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,104,101,118,49]))),Lj(OJ,"DINF",OJ.box(OJ.types.dinf,OJ.box(OJ.types.dref,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1])))),Lj(OJ,"VMHD",OJ.box(OJ.types.vmhd,new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]))),Lj(OJ,"SMHD",OJ.box(OJ.types.smhd,new Uint8Array([0,0,0,0,0,0,0,0]))),Lj(OJ,"StblTable",new Uint8Array([0,0,0,0,0,0,0,0])),Lj(OJ,"STTS",OJ.box(OJ.types.stts,OJ.StblTable)),Lj(OJ,"STSC",OJ.box(OJ.types.stsc,OJ.StblTable)),Lj(OJ,"STSZ",OJ.box(OJ.types.stsz,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]))),Lj(OJ,"STCO",OJ.box(OJ.types.stco,OJ.StblTable));var ZJ=function(){function e(t,n){Dj(this,e),this.name=t||"",this._prefix="[".concat(this.name,"]"),e.disabled=n}return Cj(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,Ag(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,Ag(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,Ag(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,Ag(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}();Lj(ZJ,"disabled",!0);var PJ=function(){function e(t,n,r){Dj(this,e),this.videoTrack=t,this.audioTrack=n;var i=/Chrome\/([^.]+)/.exec(navigator.userAgent);this.forceFirstIDR=i&&Number(i[1])<50,this.log=new ZJ("FMP4Remuxer",!r||!r.openLog||!r.openLog)}return Cj(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=OJ.initSegment(h)):(c&&(e=OJ.initSegment([this.videoTrack])),l&&(t=OJ.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;ql(t).call(t,(function(e){var t;n+=kY(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;ql(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=OJ.mdat(i);return TH(OJ.moof([e]),l)}},{key:"_remuxAudio",value:function(){var e,t,n=this.audioTrack,r=new Uint8Array(kY(e=n.samples).call(e,(function(e,t){return e+t.size}),0));kY(t=n.samples).call(t,(function(e,t){return r.set(t.data,e),e+t.size}),0);var i=OJ.mdat(r);return TH(OJ.moof([n]),i)}},{key:"reset",value:function(){this.videoTrack.reset(),this.audioTrack.reset()}}]),e}(),UJ=function(){function e(t,n){Dj(this,e),this.videoTrack=t,this.audioTrack=n}return Cj(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=OJ.ftyp([e,t]),r=this._remuxData(e,n.byteLength+8),i=r.mdatData,o=r.chunkOffset,a=this._remuxData(t,o).mdatData,s=OJ.mdat(TH(i,a)),u=OJ.moovMP4([e,t]);return e.ext=void 0,t.ext=void 0,e.samples=[],t.samples=[],TH(n,s,u)}},{key:"_remuxTrack",value:function(e){var t=OJ.ftyp([e]),n=this._remuxData(e,t.byteLength+8).mdatData,r=OJ.mdat(n),i=OJ.moovMP4([e]);return e.ext=void 0,e.samples=[],TH(t,r,i)}},{key:"_remuxData",value:function(e,t){var n=e.type===Oj,r=e.samples,i=0;n?ql(r).call(r,(function(e){var t;i+=kY(t=e.units).call(t,(function(e,t){return e+t.byteLength}),0),i+=4*e.units.length})):i=kY(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)ql(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}(),NJ=i,BJ=ht("iterator"),MJ=!NJ((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[BJ]||"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})),WJ=v,YJ=2147483647,XJ=/[^\0-\u007E]/,QJ=/[.\u3002\uFF0E\uFF61]/g,jJ="Overflow: input needs wider integers to process",HJ=RangeError,JJ=WJ(QJ.exec),KJ=Math.floor,zJ=String.fromCharCode,qJ=WJ("".charCodeAt),$J=WJ([].join),eK=WJ([].push),tK=WJ("".replace),nK=WJ("".split),rK=WJ("".toLowerCase),iK=function(e){return e+22+75*(e<26)},oK=function(e,t,n){var r=0;for(e=n?KJ(e/700):e>>1,e+=KJ(e/t);e>455;)e=KJ(e/35),r+=36;return KJ(r+36*e/(e+38))},aK=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=qJ(e,n++);if(i>=55296&&i<=56319&&n<r){var o=qJ(e,n++);56320==(64512&o)?eK(t,((1023&i)<<10)+(1023&o)+65536):(eK(t,i),n--)}else eK(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&&eK(t,zJ(r));var u=t.length,c=u;for(u&&eK(t,"-");c<i;){var l=YJ;for(n=0;n<e.length;n++)(r=e[n])>=o&&r<l&&(l=r);var h=c+1;if(l-o>KJ((YJ-a)/h))throw HJ(jJ);for(a+=(l-o)*h,o=l,n=0;n<e.length;n++){if((r=e[n])<o&&++a>YJ)throw HJ(jJ);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;eK(t,zJ(iK(f+v%p))),A=KJ(v/p),d+=36}eK(t,zJ(iK(A))),s=oK(a,h,c==u),a=0,c++}}a++,o++}return $J(t,"")},sK=to,uK=function(e,t,n){for(var r in t)n&&n.unsafe&&e[r]?e[r]=t[r]:sK(e,r,t[r],n);return e},cK=Dn,lK=r,hK=L,AK=v,dK=D,fK=MJ,vK=to,pK=ro,mK=uK,yK=Do,gK=Nu,_K=Yo,bK=ad,EK=S,kK=ze,TK=Jt,RK=$n,SK=tn,wK=$,DK=Xr,IK=Zi,CK=P,LK=hA,VK=iA,xK=md,FK=eX,GK=ht("iterator"),OK="URLSearchParams",ZK=OK+"Iterator",PK=_K.set,UK=_K.getterFor(OK),NK=_K.getterFor(ZK),BK=Object.getOwnPropertyDescriptor,MK=function(e){if(!dK)return lK[e];var t=BK(lK,e);return t&&t.value},WK=MK("fetch"),YK=MK("Request"),XK=MK("Headers"),QK=YK&&YK.prototype,jK=XK&&XK.prototype,HK=lK.RegExp,JK=lK.TypeError,KK=lK.decodeURIComponent,zK=lK.encodeURIComponent,qK=AK("".charAt),$K=AK([].join),ez=AK([].push),tz=AK("".replace),nz=AK([].shift),rz=AK([].splice),iz=AK("".split),oz=AK("".slice),az=/\+/g,sz=Array(4),uz=function(e){return sz[e-1]||(sz[e-1]=HK("((?:%[\\da-f]{2}){"+e+"})","gi"))},cz=function(e){try{return KK(e)}catch(g6){return e}},lz=function(e){var t=tz(e,az," "),n=4;try{return KK(t)}catch(g6){for(;n;)t=tz(t,uz(n--),cz);return t}},hz=/[!'()~]|%20/g,Az={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},dz=function(e){return Az[e]},fz=function(e){return tz(zK(e),hz,dz)},vz=gK((function(e,t){PK(this,{type:ZK,iterator:LK(UK(e).entries),kind:t})}),"Iterator",(function(){var e=NK(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),pz=function(e){this.entries=[],this.url=null,void 0!==e&&(wK(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===qK(e,0)?oz(e,1):e:DK(e)))};pz.prototype={type:OK,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,o,a,s,u=VK(e);if(u)for(n=(t=LK(e,u)).next;!(r=hK(n,t)).done;){if(o=(i=LK(SK(r.value))).next,(a=hK(o,i)).done||(s=hK(o,i)).done||!hK(o,i).done)throw JK("Expected sequence with length 2");ez(this.entries,{key:DK(a.value),value:DK(s.value)})}else for(var c in e)kK(e,c)&&ez(this.entries,{key:c,value:DK(e[c])})},parseQuery:function(e){if(e)for(var t,n,r=iz(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(n=iz(t,"="),ez(this.entries,{key:lz(nz(n)),value:lz($K(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],ez(n,fz(e.key)+"="+fz(e.value));return $K(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var mz=function(){bK(this,yz);var e=PK(this,new pz(arguments.length>0?arguments[0]:void 0));dK||(this.length=e.entries.length)},yz=mz.prototype;if(mK(yz,{append:function(e,t){xK(arguments.length,2);var n=UK(this);ez(n.entries,{key:DK(e),value:DK(t)}),dK||this.length++,n.updateURL()},delete:function(e){xK(arguments.length,1);for(var t=UK(this),n=t.entries,r=DK(e),i=0;i<n.length;)n[i].key===r?rz(n,i,1):i++;dK||(this.length=n.length),t.updateURL()},get:function(e){xK(arguments.length,1);for(var t=UK(this).entries,n=DK(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){xK(arguments.length,1);for(var t=UK(this).entries,n=DK(e),r=[],i=0;i<t.length;i++)t[i].key===n&&ez(r,t[i].value);return r},has:function(e){xK(arguments.length,1);for(var t=UK(this).entries,n=DK(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){xK(arguments.length,1);for(var n,r=UK(this),i=r.entries,o=!1,a=DK(e),s=DK(t),u=0;u<i.length;u++)(n=i[u]).key===a&&(o?rz(i,u--,1):(o=!0,n.value=s));o||ez(i,{key:a,value:s}),dK||(this.length=i.length),r.updateURL()},sort:function(){var e=UK(this);FK(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=UK(this).entries,r=TK(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 vz(this,"keys")},values:function(){return new vz(this,"values")},entries:function(){return new vz(this,"entries")}},{enumerable:!0}),vK(yz,GK,yz.entries,{name:"entries"}),vK(yz,"toString",(function(){return UK(this).serialize()}),{enumerable:!0}),dK&&pK(yz,"size",{get:function(){return UK(this).entries.length},configurable:!0,enumerable:!0}),yK(mz,OK),cK({global:!0,constructor:!0,forced:!fK},{URLSearchParams:mz}),!fK&&EK(XK)){var gz=AK(jK.has),_z=AK(jK.set),bz=function(e){if(wK(e)){var t,n=e.body;if(RK(n)===OK)return t=e.headers?new XK(e.headers):new XK,gz(t,"content-type")||_z(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),IK(e,{body:CK(0,DK(n)),headers:CK(0,t)})}return e};if(EK(WK)&&cK({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return WK(e,arguments.length>1?bz(arguments[1]):{})}}),EK(YK)){var Ez=function(e){return bK(this,QK),new YK(e,arguments.length>1?bz(arguments[1]):{})};QK.constructor=Ez,Ez.prototype=QK,cK({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Ez})}}var kz,Tz=Dn,Rz=D,Sz=MJ,wz=r,Dz=Jt,Iz=v,Cz=to,Lz=ro,Vz=ad,xz=ze,Fz=wW,Gz=Ay,Oz=ji,Zz=cl.codeAt,Pz=function(e){var t,n,r=[],i=nK(tK(rK(e),QJ,"."),".");for(t=0;t<i.length;t++)n=i[t],eK(r,JJ(XJ,n)?"xn--"+aK(n):n);return $J(r,".")},Uz=Xr,Nz=Do,Bz=md,Mz={URLSearchParams:mz,getState:UK},Wz=Yo,Yz=Wz.set,Xz=Wz.getterFor("URL"),Qz=Mz.URLSearchParams,jz=Mz.getState,Hz=wz.URL,Jz=wz.TypeError,Kz=wz.parseInt,zz=Math.floor,qz=Math.pow,$z=Iz("".charAt),eq=Iz(/./.exec),tq=Iz([].join),nq=Iz(1..toString),rq=Iz([].pop),iq=Iz([].push),oq=Iz("".replace),aq=Iz([].shift),sq=Iz("".split),uq=Iz("".slice),cq=Iz("".toLowerCase),lq=Iz([].unshift),hq="Invalid scheme",Aq="Invalid host",dq="Invalid port",fq=/[a-z]/i,vq=/[\d+-.a-z]/i,pq=/\d/,mq=/^0x/i,yq=/^[0-7]+$/,gq=/^\d+$/,_q=/^[\da-f]+$/i,bq=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Eq=/[\0\t\n\r #/:<>?@[\\\]^|]/,kq=/^[\u0000-\u0020]+/,Tq=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Rq=/[\t\n\r]/g,Sq=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)lq(t,e%256),e=zz(e/256);return tq(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+=nq(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},wq={},Dq=Fz({},wq,{" ":1,'"':1,"<":1,">":1,"`":1}),Iq=Fz({},Dq,{"#":1,"?":1,"{":1,"}":1}),Cq=Fz({},Iq,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Lq=function(e,t){var n=Zz(e,0);return n>32&&n<127&&!xz(t,e)?e:encodeURIComponent(e)},Vq={ftp:21,file:null,http:80,https:443,ws:80,wss:443},xq=function(e,t){var n;return 2==e.length&&eq(fq,$z(e,0))&&(":"==(n=$z(e,1))||!t&&"|"==n)},Fq=function(e){var t;return e.length>1&&xq(uq(e,0,2))&&(2==e.length||"/"===(t=$z(e,2))||"\\"===t||"?"===t||"#"===t)},Gq=function(e){return"."===e||"%2e"===cq(e)},Oq={},Zq={},Pq={},Uq={},Nq={},Bq={},Mq={},Wq={},Yq={},Xq={},Qq={},jq={},Hq={},Jq={},Kq={},zq={},qq={},$q={},e$={},t$={},n$={},r$=function(e,t,n){var r,i,o,a=Uz(e);if(t){if(i=this.parse(a))throw Jz(i);this.searchParams=null}else{if(void 0!==n&&(r=new r$(n,!0)),i=this.parse(a,null,r))throw Jz(i);(o=jz(new Qz)).bindURL(this),this.searchParams=o}};r$.prototype={type:"URL",parse:function(e,t,n){var r,i,o,a,s,u=this,c=t||Oq,l=0,h="",A=!1,d=!1,f=!1;for(e=Uz(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=oq(e,kq,""),e=oq(e,Tq,"$1")),e=oq(e,Rq,""),r=Gz(e);l<=r.length;){switch(i=r[l],c){case Oq:if(!i||!eq(fq,i)){if(t)return hq;c=Pq;continue}h+=cq(i),c=Zq;break;case Zq:if(i&&(eq(vq,i)||"+"==i||"-"==i||"."==i))h+=cq(i);else{if(":"!=i){if(t)return hq;h="",c=Pq,l=0;continue}if(t&&(u.isSpecial()!=xz(Vq,h)||"file"==h&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=h,t)return void(u.isSpecial()&&Vq[u.scheme]==u.port&&(u.port=null));h="","file"==u.scheme?c=Jq:u.isSpecial()&&n&&n.scheme==u.scheme?c=Uq:u.isSpecial()?c=Wq:"/"==r[l+1]?(c=Nq,l++):(u.cannotBeABaseURL=!0,iq(u.path,""),c=e$)}break;case Pq:if(!n||n.cannotBeABaseURL&&"#"!=i)return hq;if(n.cannotBeABaseURL&&"#"==i){u.scheme=n.scheme,u.path=Oz(n.path),u.query=n.query,u.fragment="",u.cannotBeABaseURL=!0,c=n$;break}c="file"==n.scheme?Jq:Bq;continue;case Uq:if("/"!=i||"/"!=r[l+1]){c=Bq;continue}c=Yq,l++;break;case Nq:if("/"==i){c=Xq;break}c=$q;continue;case Bq:if(u.scheme=n.scheme,i==kz)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=Oz(n.path),u.query=n.query;else if("/"==i||"\\"==i&&u.isSpecial())c=Mq;else if("?"==i)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=Oz(n.path),u.query="",c=t$;else{if("#"!=i){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=Oz(n.path),u.path.length--,c=$q;continue}u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=Oz(n.path),u.query=n.query,u.fragment="",c=n$}break;case Mq:if(!u.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,c=$q;continue}c=Xq}else c=Yq;break;case Wq:if(c=Yq,"/"!=i||"/"!=$z(h,l+1))continue;l++;break;case Yq:if("/"!=i&&"\\"!=i){c=Xq;continue}break;case Xq:if("@"==i){A&&(h="%40"+h),A=!0,o=Gz(h);for(var v=0;v<o.length;v++){var p=o[v];if(":"!=p||f){var m=Lq(p,Cq);f?u.password+=m:u.username+=m}else f=!0}h=""}else if(i==kz||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(A&&""==h)return"Invalid authority";l-=Gz(h).length+1,h="",c=Qq}else h+=i;break;case Qq:case jq:if(t&&"file"==u.scheme){c=zq;continue}if(":"!=i||d){if(i==kz||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(u.isSpecial()&&""==h)return Aq;if(t&&""==h&&(u.includesCredentials()||null!==u.port))return;if(a=u.parseHost(h))return a;if(h="",c=qq,t)return;continue}"["==i?d=!0:"]"==i&&(d=!1),h+=i}else{if(""==h)return Aq;if(a=u.parseHost(h))return a;if(h="",c=Hq,t==jq)return}break;case Hq:if(!eq(pq,i)){if(i==kz||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()||t){if(""!=h){var y=Kz(h,10);if(y>65535)return dq;u.port=u.isSpecial()&&y===Vq[u.scheme]?null:y,h=""}if(t)return;c=qq;continue}return dq}h+=i;break;case Jq:if(u.scheme="file","/"==i||"\\"==i)c=Kq;else{if(!n||"file"!=n.scheme){c=$q;continue}if(i==kz)u.host=n.host,u.path=Oz(n.path),u.query=n.query;else if("?"==i)u.host=n.host,u.path=Oz(n.path),u.query="",c=t$;else{if("#"!=i){Fq(tq(Oz(r,l),""))||(u.host=n.host,u.path=Oz(n.path),u.shortenPath()),c=$q;continue}u.host=n.host,u.path=Oz(n.path),u.query=n.query,u.fragment="",c=n$}}break;case Kq:if("/"==i||"\\"==i){c=zq;break}n&&"file"==n.scheme&&!Fq(tq(Oz(r,l),""))&&(xq(n.path[0],!0)?iq(u.path,n.path[0]):u.host=n.host),c=$q;continue;case zq:if(i==kz||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&xq(h))c=$q;else if(""==h){if(u.host="",t)return;c=qq}else{if(a=u.parseHost(h))return a;if("localhost"==u.host&&(u.host=""),t)return;h="",c=qq}continue}h+=i;break;case qq:if(u.isSpecial()){if(c=$q,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=kz&&(c=$q,"/"!=i))continue}else u.fragment="",c=n$;else u.query="",c=t$;break;case $q:if(i==kz||"/"==i||"\\"==i&&u.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=cq(s=h))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(u.shortenPath(),"/"==i||"\\"==i&&u.isSpecial()||iq(u.path,"")):Gq(h)?"/"==i||"\\"==i&&u.isSpecial()||iq(u.path,""):("file"==u.scheme&&!u.path.length&&xq(h)&&(u.host&&(u.host=""),h=$z(h,0)+":"),iq(u.path,h)),h="","file"==u.scheme&&(i==kz||"?"==i||"#"==i))for(;u.path.length>1&&""===u.path[0];)aq(u.path);"?"==i?(u.query="",c=t$):"#"==i&&(u.fragment="",c=n$)}else h+=Lq(i,Iq);break;case e$:"?"==i?(u.query="",c=t$):"#"==i?(u.fragment="",c=n$):i!=kz&&(u.path[0]+=Lq(i,wq));break;case t$:t||"#"!=i?i!=kz&&("'"==i&&u.isSpecial()?u.query+="%27":u.query+="#"==i?"%23":Lq(i,wq)):(u.fragment="",c=n$);break;case n$:i!=kz&&(u.fragment+=Lq(i,Dq))}l++}},parseHost:function(e){var t,n,r;if("["==$z(e,0)){if("]"!=$z(e,e.length-1))return Aq;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 $z(e,h)};if(":"==A()){if(":"!=$z(e,1))return;h+=2,l=++c}for(;A();){if(8==c)return;if(":"!=A()){for(t=n=0;n<4&&eq(_q,A());)t=16*t+Kz(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(!eq(pq,A()))return;for(;eq(pq,A());){if(o=Kz(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}(uq(e,1,-1)),!t)return Aq;this.host=t}else if(this.isSpecial()){if(e=Pz(e),eq(bq,e))return Aq;if(t=function(e){var t,n,r,i,o,a,s,u=sq(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"==$z(i,0)&&(o=eq(mq,i)?16:8,i=uq(i,8==o?1:2)),""===i)a=0;else{if(!eq(10==o?gq:8==o?yq:_q,i))return e;a=Kz(i,o)}iq(n,a)}for(r=0;r<t;r++)if(a=n[r],r==t-1){if(a>=qz(256,5-t))return null}else if(a>255)return null;for(s=rq(n),r=0;r<n.length;r++)s+=n[r]*qz(256,3-r);return s}(e),null===t)return Aq;this.host=t}else{if(eq(Eq,e))return Aq;for(t="",n=Gz(e),r=0;r<n.length;r++)t+=Lq(n[r],wq);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return xz(Vq,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&xq(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+=Sq(i),null!==o&&(c+=":"+o)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?a[0]:a.length?"/"+tq(a,"/"):"",null!==s&&(c+="?"+s),null!==u&&(c+="#"+u),c},setHref:function(e){var t=this.parse(e);if(t)throw Jz(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new i$(e.path[0]).origin}catch(g6){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+Sq(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Uz(e)+":",Oq)},getUsername:function(){return this.username},setUsername:function(e){var t=Gz(Uz(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=Lq(t[n],Cq)}},getPassword:function(){return this.password},setPassword:function(e){var t=Gz(Uz(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=Lq(t[n],Cq)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Sq(e):Sq(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Qq)},getHostname:function(){var e=this.host;return null===e?"":Sq(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,jq)},getPort:function(){var e=this.port;return null===e?"":Uz(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=Uz(e))?this.port=null:this.parse(e,Hq))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+tq(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,qq))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=Uz(e))?this.query=null:("?"==$z(e,0)&&(e=uq(e,1)),this.query="",this.parse(e,t$)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=Uz(e))?("#"==$z(e,0)&&(e=uq(e,1)),this.fragment="",this.parse(e,n$)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var i$=function(e){var t=Vz(this,o$),n=Bz(arguments.length,1)>1?arguments[1]:void 0,r=Yz(t,new r$(e,!1,n));Rz||(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())},o$=i$.prototype,a$=function(e,t){return{get:function(){return Xz(this)[e]()},set:t&&function(e){return Xz(this)[t](e)},configurable:!0,enumerable:!0}};if(Rz&&(Lz(o$,"href",a$("serialize","setHref")),Lz(o$,"origin",a$("getOrigin")),Lz(o$,"protocol",a$("getProtocol","setProtocol")),Lz(o$,"username",a$("getUsername","setUsername")),Lz(o$,"password",a$("getPassword","setPassword")),Lz(o$,"host",a$("getHost","setHost")),Lz(o$,"hostname",a$("getHostname","setHostname")),Lz(o$,"port",a$("getPort","setPort")),Lz(o$,"pathname",a$("getPathname","setPathname")),Lz(o$,"search",a$("getSearch","setSearch")),Lz(o$,"searchParams",a$("getSearchParams")),Lz(o$,"hash",a$("getHash","setHash"))),Cz(o$,"toJSON",(function(){return Xz(this).serialize()}),{enumerable:!0}),Cz(o$,"toString",(function(){return Xz(this).serialize()}),{enumerable:!0}),Hz){var s$=Hz.createObjectURL,u$=Hz.revokeObjectURL;s$&&Cz(i$,"createObjectURL",Dz(s$,Hz)),u$&&Cz(i$,"revokeObjectURL",Dz(u$,Hz))}Nz(i$,"URL"),Tz({global:!0,constructor:!0,forced:!Sz,sham:!Rz},{URL:i$});var c$=Dn,l$=i,h$=md,A$=Xr,d$=MJ,f$=oe("URL");c$({target:"URL",stat:!0,forced:!(d$&&l$((function(){f$.canParse()})))},{canParse:function(e){var t=h$(arguments.length,1),n=A$(e),r=t<2||void 0===arguments[1]?void 0:A$(arguments[1]);try{return!!new f$(n,r)}catch(g6){return!1}}});var v$=t(ee.URL),p$={exports:{}},m$=i((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),y$=i,g$=$,_$=g,b$=m$,E$=Object.isExtensible,k$=y$((function(){E$(1)}))||b$?function(e){return!!g$(e)&&((!b$||"ArrayBuffer"!=_$(e))&&(!E$||E$(e)))}:E$,T$=!i((function(){return Object.isExtensible(Object.preventExtensions({}))})),R$=Dn,S$=v,w$=ni,D$=$,I$=ze,C$=Kt.f,L$=Pi,V$=Bi,x$=k$,F$=T$,G$=!1,O$=nt("meta"),Z$=0,P$=function(e){C$(e,O$,{value:{objectID:"O"+Z$++,weakData:{}}})},U$=p$.exports={enable:function(){U$.enable=function(){},G$=!0;var e=L$.f,t=S$([].splice),n={};n[O$]=1,e(n).length&&(L$.f=function(n){for(var r=e(n),i=0,o=r.length;i<o;i++)if(r[i]===O$){t(r,i,1);break}return r},R$({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:V$.f}))},fastKey:function(e,t){if(!D$(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!I$(e,O$)){if(!x$(e))return"F";if(!t)return"E";P$(e)}return e[O$].objectID},getWeakData:function(e,t){if(!I$(e,O$)){if(!x$(e))return!0;if(!t)return!1;P$(e)}return e[O$].weakData},onFreeze:function(e){return F$&&G$&&x$(e)&&!I$(e,O$)&&P$(e),e}};w$[O$]=!0;var N$=p$.exports,B$=Dn,M$=r,W$=N$,Y$=i,X$=pn,Q$=IA,j$=ad,H$=S,J$=$,K$=Do,z$=Kt.f,q$=qo.forEach,$$=D,e0=Yo.set,t0=Yo.getterFor,n0=Zi,r0=ro,i0=uK,o0=Jt,a0=ad,s0=Y,u0=IA,c0=Ac,l0=dc,h0=rd,A0=D,d0=N$.fastKey,f0=Yo.set,v0=Yo.getterFor,p0={getConstructor:function(e,t,n,r){var i=e((function(e,i){a0(e,o),f0(e,{type:t,index:n0(null),first:void 0,last:void 0,size:0}),A0||(e.size=0),s0(i)||u0(i,e[r],{that:e,AS_ENTRIES:n})})),o=i.prototype,a=v0(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=d0(t,!0),key:t,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=s),r&&(r.next=s),A0?o.size++:e.size++,"F"!==i&&(o.index[i]=s)),e},u=function(e,t){var n,r=a(e),i=d0(t);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==t)return n};return i0(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,A0?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),A0?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=a(this),r=o0(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)}}),i0(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)}}),A0&&r0(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(e,t,n){var r=t+" Iterator",i=v0(t),o=v0(r);c0(e,t,(function(e,t){f0(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)?l0("keys"==t?n.key:"values"==t?n.value:[n.key,n.value],!1):(e.target=void 0,l0(void 0,!0))}),n?"entries":"values",!n,!0),h0(t)}};(function(e,t,n){var r,i=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),a=i?"set":"add",s=M$[e],u=s&&s.prototype,c={};if($$&&H$(s)&&(o||u.forEach&&!Y$((function(){(new s).entries().next()})))){var l=(r=t((function(t,n){e0(j$(t,l),{type:e,collection:new s}),null!=n&&Q$(n,t[a],{that:t,AS_ENTRIES:i})}))).prototype,h=t0(e);q$(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in u)||o&&"clear"==e||X$(l,e,(function(n,r){var i=h(this).collection;if(!t&&o&&!J$(n))return"get"==e&&void 0;var a=i[e](0===n?0:n,r);return t?this:a}))})),o||z$(l,"size",{configurable:!0,get:function(){return h(this).collection.size}})}else r=n.getConstructor(t,e,i,a),W$.enable();K$(r,e,!1,!0),c[e]=r,B$({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)}}),p0);var m0=ee.Map,y0=Jt,g0=L,_0=Ce,b0=ld,E0=Y,k0=IA,T0=[].push,R0=function(e){var t,n,r,i,o=arguments.length,a=o>1?arguments[1]:void 0;return b0(this),(t=void 0!==a)&&_0(a),E0(e)?new this:(n=[],t?(r=0,i=y0(a,o>2?arguments[2]:void 0),k0(e,(function(e){g0(T0,n,i(e,r++))}))):k0(e,T0,{that:n}),new this(n))};Dn({target:"Map",stat:!0,forced:!0},{from:R0});var S0=Es,w0=function(){return new this(S0(arguments))};Dn({target:"Map",stat:!0,forced:!0},{of:w0});var D0=Se,I0=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(D0(e)+" is not a map")},C0=function(e,t){return 1==t?function(t,n){return t[e](n)}:function(t,n,r){return t[e](n,r)}},L0=oe("Map"),V0={Map:L0,set:C0("set",2),get:C0("get",1),has:C0("has",1),remove:C0("delete",1),proto:L0.prototype},x0=I0,F0=V0.remove;Dn({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=x0(this),n=!0,r=0,i=arguments.length;r<i;r++)e=F0(t,arguments[r]),n=n&&e;return!!n}});var G0=I0,O0=V0.get,Z0=V0.has,P0=V0.set;Dn({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var n,r,i=G0(this);return Z0(i,e)?(n=O0(i,e),"update"in t&&(n=t.update(n,e,i),P0(i,e,n)),n):(r=t.insert(e,i),P0(i,e,r),r)}});var U0=L,N0=function(e,t,n){for(var r,i,o=n||e.next;!(r=U0(o,e)).done;)if(void 0!==(i=t(r.value)))return i},B0=function(e,t,n){return n?N0(e.entries(),(function(e){return t(e[1],e[0])})):e.forEach(t)},M0=Jt,W0=I0,Y0=B0;Dn({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=W0(this),n=M0(e,arguments.length>1?arguments[1]:void 0);return!1!==Y0(t,(function(e,r){if(!n(e,r,t))return!1}),!0)}});var X0=Jt,Q0=I0,j0=B0,H0=V0.Map,J0=V0.set;Dn({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=Q0(this),n=X0(e,arguments.length>1?arguments[1]:void 0),r=new H0;return j0(t,(function(e,i){n(e,i,t)&&J0(r,i,e)})),r}});var K0=Jt,z0=I0,q0=B0;Dn({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=z0(this),n=K0(e,arguments.length>1?arguments[1]:void 0),r=q0(t,(function(e,r){if(n(e,r,t))return{value:e}}),!0);return r&&r.value}});var $0=Jt,e1=I0,t1=B0;Dn({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=e1(this),n=$0(e,arguments.length>1?arguments[1]:void 0),r=t1(t,(function(e,r){if(n(e,r,t))return{key:r}}),!0);return r&&r.key}});var n1=Dn,r1=L,i1=S,o1=Ce,a1=IA,s1=V0.Map,u1=v([].push);n1({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){var n=new(i1(this)?this:s1);o1(t);var r=o1(n.has),i=o1(n.get),o=o1(n.set);return a1(e,(function(e){var a=t(e);r1(r,n,a)?u1(r1(i,n,a),e):r1(o,n,a,[e])})),n}});var c1=function(e,t){return e===t||e!=e&&t!=t},l1=I0,h1=B0;Dn({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===h1(l1(this),(function(t){if(c1(t,e))return!0}),!0)}});var A1=L,d1=IA,f1=S,v1=Ce,p1=V0.Map;Dn({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var n=new(f1(this)?this:p1);v1(t);var r=v1(n.set);return d1(e,(function(e){A1(r,n,t(e),e)})),n}});var m1=I0,y1=B0;Dn({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=y1(m1(this),(function(t,n){if(t===e)return{key:n}}),!0);return t&&t.key}});var g1=Jt,_1=I0,b1=B0,E1=V0.Map,k1=V0.set;Dn({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=_1(this),n=g1(e,arguments.length>1?arguments[1]:void 0),r=new E1;return b1(t,(function(e,i){k1(r,n(e,i,t),e)})),r}});var T1=Jt,R1=I0,S1=B0,w1=V0.Map,D1=V0.set;Dn({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=R1(this),n=T1(e,arguments.length>1?arguments[1]:void 0),r=new w1;return S1(t,(function(e,i){D1(r,i,n(e,i,t))})),r}});var I1=I0,C1=IA,L1=V0.set;Dn({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=I1(this),n=arguments.length,r=0;r<n;)C1(arguments[r++],(function(e,n){L1(t,e,n)}),{AS_ENTRIES:!0});return t}});var V1=Ce,x1=I0,F1=B0,G1=TypeError;Dn({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=x1(this),n=arguments.length<2,r=n?void 0:arguments[1];if(V1(e),F1(t,(function(i,o){n?(n=!1,r=i):r=e(r,i,o,t)})),n)throw G1("Reduce of empty map with no initial value");return r}});var O1=Jt,Z1=I0,P1=B0;Dn({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=Z1(this),n=O1(e,arguments.length>1?arguments[1]:void 0);return!0===P1(t,(function(e,r){if(n(e,r,t))return!0}),!0)}});var U1=Ce,N1=I0,B1=TypeError,M1=V0.get,W1=V0.has,Y1=V0.set;Dn({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var n=N1(this),r=arguments.length;U1(t);var i=W1(n,e);if(!i&&r<3)throw B1("Updating absent value");var o=i?M1(n,e):U1(r>2?arguments[2]:void 0)(e,n);return Y1(n,e,t(o,e,n)),n}});var X1=L,Q1=Ce,j1=S,H1=tn,J1=TypeError,K1=function(e,t){var n,r=H1(this),i=Q1(r.get),o=Q1(r.has),a=Q1(r.set),s=arguments.length>2?arguments[2]:void 0;if(!j1(t)&&!j1(s))throw J1("At least one callback required");return X1(o,r,e)?(n=X1(i,r,e),j1(t)&&(n=t(n),X1(a,r,e,n))):j1(s)&&(n=s(),X1(a,r,e,n)),n};Dn({target:"Map",proto:!0,real:!0,forced:!0},{upsert:K1}),Dn({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:K1});var z1=t(m0);function q1(){q1=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=kh||function(e,t,n){e[t]=n.value},i="function"==typeof Th?Th:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,n){return kh(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=Sh(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=Ch&&Ch(Ch(R([])));p&&p!==t&&n.call(p,o)&&(v=p);var m=f.prototype=A.prototype=Sh(v);function y(e){var t;ql(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"==gl(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"}],ql(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 Lh?Lh(e,f):(e.__proto__=f,u(e,s,"GeneratorFunction")),e.prototype=Sh(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=Op);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 Xp(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,ql(t=this.tryEntries).call(t,k),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+lm(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 $1(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(g6){return void n(g6)}s.done?t(u):Op.resolve(u).then(r,i)}function e2(e){return function(){var t=this,n=arguments;return new Op((function(r,i){var o=e.apply(t,n);function a(e){$1(o,r,i,a,s,"next",e)}function s(e){$1(o,r,i,a,s,"throw",e)}a(void 0)}))}}function t2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n2(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),kh(e,r.key,r)}}function r2(e,t,n){return t&&n2(e.prototype,t),n&&n2(e,n),kh(e,"prototype",{writable:!1}),e}function i2(e,t,n){return t in e?kh(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o2(e){var t;return(o2=Lh?wm(t=Ch).call(t):function(e){return e.__proto__||Ch(e)})(e)}function a2(e,t){var n;return(a2=Lh?wm(n=Lh).call(n):function(e,t){return e.__proto__=t,e})(e,t)}function s2(){if("undefined"==typeof Reflect||!Mm)return!1;if(Mm.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Mm(Boolean,[],(function(){}))),!0}catch(_6){return!1}}function u2(e,t,n){var r;s2()?u2=wm(r=Mm).call(r):u2=function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(wm(Function).apply(e,r));return n&&a2(i,n.prototype),i};return u2.apply(null,arguments)}function c2(e){var t="function"==typeof z1?new z1:void 0;return c2=function(e){if(null===e||(n=e,-1===kH(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 u2(e,arguments,o2(this).constructor)}return i.prototype=Sh(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),a2(i,e)},c2(e)}function l2(e,t){if(t&&("object"===gl(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 h2=g_,A2=vb("iterator"),d2=!h2((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[A2]||"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})),f2=R_,v2=2147483647,p2=/[^\0-\u007E]/,m2=/[.\u3002\uFF0E\uFF61]/g,y2="Overflow: input needs wider integers to process",g2=RangeError,_2=f2(m2.exec),b2=Math.floor,E2=String.fromCharCode,k2=f2("".charCodeAt),T2=f2([].join),R2=f2([].push),S2=f2("".replace),w2=f2("".split),D2=f2("".toLowerCase),I2=function(e){return e+22+75*(e<26)},C2=function(e,t,n){var r=0;for(e=n?b2(e/700):e>>1,e+=b2(e/t);e>455;)e=b2(e/35),r+=36;return b2(r+36*e/(e+38))},L2=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=k2(e,n++);if(i>=55296&&i<=56319&&n<r){var o=k2(e,n++);56320==(64512&o)?R2(t,((1023&i)<<10)+(1023&o)+65536):(R2(t,i),n--)}else R2(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&&R2(t,E2(r));var u=t.length,c=u;for(u&&R2(t,"-");c<i;){var l=v2;for(n=0;n<e.length;n++)(r=e[n])>=o&&r<l&&(l=r);var h=c+1;if(l-o>b2((v2-a)/h))throw g2(y2);for(a+=(l-o)*h,o=l,n=0;n<e.length;n++){if((r=e[n])<o&&++a>v2)throw g2(y2);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;R2(t,E2(I2(f+v%p))),A=b2(v/p),d+=36}R2(t,E2(I2(A))),s=C2(a,h,c==u),a=0,c++}}a++,o++}return T2(t,"")},V2=uS,x2=s_,F2=Ob,G2=R_,O2=gb,Z2=d2,P2=Sk,U2=EZ,N2=kI,B2=QG,M2=uk,W2=LI,Y2=Y_,X2=G_,Q2=Kk,j2=Zk,H2=xb,J2=Eb,K2=CS,z2=Aw,q2=BE,$2=wV,e5=_V,t5=WI,n5=SM,r5=vb("iterator"),i5="URLSearchParams",o5=i5+"Iterator",a5=M2.set,s5=M2.getterFor(i5),u5=M2.getterFor(o5),c5=Object.getOwnPropertyDescriptor,l5=function(e){if(!O2)return x2[e];var t=c5(x2,e);return t&&t.value},h5=l5("fetch"),A5=l5("Request"),d5=l5("Headers"),f5=A5&&A5.prototype,v5=d5&&d5.prototype,p5=x2.RegExp,m5=x2.TypeError,y5=x2.decodeURIComponent,g5=x2.encodeURIComponent,_5=G2("".charAt),b5=G2([].join),E5=G2([].push),k5=G2("".replace),T5=G2([].shift),R5=G2([].splice),S5=G2("".split),w5=G2("".slice),D5=/\+/g,I5=Array(4),C5=function(e){return I5[e-1]||(I5[e-1]=p5("((?:%[\\da-f]{2}){"+e+"})","gi"))},L5=function(e){try{return y5(e)}catch(g6){return e}},V5=function(e){var t=k5(e,D5," "),n=4;try{return y5(t)}catch(g6){for(;n;)t=k5(t,C5(n--),L5);return t}},x5=/[!'()~]|%20/g,F5={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},G5=function(e){return F5[e]},O5=function(e){return k5(g5(e),x5,G5)},Z5=B2((function(e,t){a5(this,{type:o5,iterator:$2(s5(e).entries),kind:t})}),"Iterator",(function(){var e=u5(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),P5=function(e){this.entries=[],this.url=null,void 0!==e&&(J2(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===_5(e,0)?w5(e,1):e:K2(e)))};P5.prototype={type:i5,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,o,a,s,u=e5(e);if(u)for(n=(t=$2(e,u)).next;!(r=F2(n,t)).done;){if(o=(i=$2(H2(r.value))).next,(a=F2(o,i)).done||(s=F2(o,i)).done||!F2(o,i).done)throw m5("Expected sequence with length 2");E5(this.entries,{key:K2(a.value),value:K2(s.value)})}else for(var c in e)X2(e,c)&&E5(this.entries,{key:c,value:K2(e[c])})},parseQuery:function(e){if(e)for(var t,n,r=S5(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(n=S5(t,"="),E5(this.entries,{key:V5(T5(n)),value:V5(b5(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],E5(n,O5(e.key)+"="+O5(e.value));return b5(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var U5=function(){W2(this,N5),a5(this,new P5(arguments.length>0?arguments[0]:void 0))},N5=U5.prototype;if(U2(N5,{append:function(e,t){t5(arguments.length,2);var n=s5(this);E5(n.entries,{key:K2(e),value:K2(t)}),n.updateURL()},delete:function(e){t5(arguments.length,1);for(var t=s5(this),n=t.entries,r=K2(e),i=0;i<n.length;)n[i].key===r?R5(n,i,1):i++;t.updateURL()},get:function(e){t5(arguments.length,1);for(var t=s5(this).entries,n=K2(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){t5(arguments.length,1);for(var t=s5(this).entries,n=K2(e),r=[],i=0;i<t.length;i++)t[i].key===n&&E5(r,t[i].value);return r},has:function(e){t5(arguments.length,1);for(var t=s5(this).entries,n=K2(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){t5(arguments.length,1);for(var n,r=s5(this),i=r.entries,o=!1,a=K2(e),s=K2(t),u=0;u<i.length;u++)(n=i[u]).key===a&&(o?R5(i,u--,1):(o=!0,n.value=s));o||E5(i,{key:a,value:s}),r.updateURL()},sort:function(){var e=s5(this);n5(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=s5(this).entries,r=Q2(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 Z5(this,"keys")},values:function(){return new Z5(this,"values")},entries:function(){return new Z5(this,"entries")}},{enumerable:!0}),P2(N5,r5,N5.entries,{name:"entries"}),P2(N5,"toString",(function(){return s5(this).serialize()}),{enumerable:!0}),N2(U5,i5),V2({global:!0,constructor:!0,forced:!Z2},{URLSearchParams:U5}),!Z2&&Y2(d5)){var B5=G2(v5.has),M5=G2(v5.set),W5=function(e){if(J2(e)){var t,n=e.body;if(j2(n)===i5)return t=e.headers?new d5(e.headers):new d5,B5(t,"content-type")||M5(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),z2(e,{body:q2(0,K2(n)),headers:q2(0,t)})}return e};if(Y2(h5)&&V2({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return h5(e,arguments.length>1?W5(arguments[1]):{})}}),Y2(A5)){var Y5=function(e){return W2(this,f5),new A5(e,arguments.length>1?W5(arguments[1]):{})};f5.constructor=Y5,Y5.prototype=f5,V2({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Y5})}}var X5,Q5=uS,j5=gb,H5=d2,J5=s_,K5=Kk,z5=R_,q5=Sk,$5=tJ,e4=LI,t4=G_,n4=MW,r4=function(e){var t=bJ(e),n=TJ(this),r=arguments.length,i=r>1?arguments[1]:void 0,o=void 0!==i;o&&(i=gJ(i,r>2?arguments[2]:void 0));var a,s,u,c,l,h,A=DJ(t),d=0;if(!A||this===IJ&&kJ(A))for(a=RJ(t),s=n?new this(a):IJ(a);a>d;d++)h=o?i(t[d],d):t[d],SJ(s,d,h);else for(l=(c=wJ(t,A)).next,s=n?new this:[];!(u=_J(l,c)).done;d++)h=o?EJ(c,i,[u.value,d],!0):u.value,SJ(s,d,h);return s.length=d,s},i4=gS,o4=vD.codeAt,a4=function(e){var t,n,r=[],i=w2(S2(D2(e),m2,"."),".");for(t=0;t<i.length;t++)n=i[t],R2(r,_2(p2,n)?"xn--"+L2(n):n);return T2(r,".")},s4=CS,u4=kI,c4=WI,l4={URLSearchParams:U5,getState:s5},h4=uk,A4=h4.set,d4=h4.getterFor("URL"),f4=l4.URLSearchParams,v4=l4.getState,p4=J5.URL,m4=J5.TypeError,y4=J5.parseInt,g4=Math.floor,_4=Math.pow,b4=z5("".charAt),E4=z5(/./.exec),k4=z5([].join),T4=z5(1..toString),R4=z5([].pop),S4=z5([].push),w4=z5("".replace),D4=z5([].shift),I4=z5("".split),C4=z5("".slice),L4=z5("".toLowerCase),V4=z5([].unshift),x4="Invalid scheme",F4="Invalid host",G4="Invalid port",O4=/[a-z]/i,Z4=/[\d+-.a-z]/i,P4=/\d/,U4=/^0x/i,N4=/^[0-7]+$/,B4=/^\d+$/,M4=/^[\da-f]+$/i,W4=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Y4=/[\0\t\n\r #/:<>?@[\\\]^|]/,X4=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,Q4=/[\t\n\r]/g,j4=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)V4(t,e%256),e=g4(e/256);return k4(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+=T4(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},H4={},J4=n4({},H4,{" ":1,'"':1,"<":1,">":1,"`":1}),K4=n4({},J4,{"#":1,"?":1,"{":1,"}":1}),z4=n4({},K4,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),q4=function(e,t){var n=o4(e,0);return n>32&&n<127&&!t4(t,e)?e:encodeURIComponent(e)},$4={ftp:21,file:null,http:80,https:443,ws:80,wss:443},e3=function(e,t){var n;return 2==e.length&&E4(O4,b4(e,0))&&(":"==(n=b4(e,1))||!t&&"|"==n)},t3=function(e){var t;return e.length>1&&e3(C4(e,0,2))&&(2==e.length||"/"===(t=b4(e,2))||"\\"===t||"?"===t||"#"===t)},n3=function(e){return"."===e||"%2e"===L4(e)},r3={},i3={},o3={},a3={},s3={},u3={},c3={},l3={},h3={},A3={},d3={},f3={},v3={},p3={},m3={},y3={},g3={},_3={},b3={},E3={},k3={},T3=function(e,t,n){var r,i,o,a=s4(e);if(t){if(i=this.parse(a))throw m4(i);this.searchParams=null}else{if(void 0!==n&&(r=new T3(n,!0)),i=this.parse(a,null,r))throw m4(i);(o=v4(new f4)).bindURL(this),this.searchParams=o}};T3.prototype={type:"URL",parse:function(e,t,n){var r,i,o,a,s,u=this,c=t||r3,l=0,h="",A=!1,d=!1,f=!1;for(e=s4(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=w4(e,X4,"")),e=w4(e,Q4,""),r=r4(e);l<=r.length;){switch(i=r[l],c){case r3:if(!i||!E4(O4,i)){if(t)return x4;c=o3;continue}h+=L4(i),c=i3;break;case i3:if(i&&(E4(Z4,i)||"+"==i||"-"==i||"."==i))h+=L4(i);else{if(":"!=i){if(t)return x4;h="",c=o3,l=0;continue}if(t&&(u.isSpecial()!=t4($4,h)||"file"==h&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=h,t)return void(u.isSpecial()&&$4[u.scheme]==u.port&&(u.port=null));h="","file"==u.scheme?c=p3:u.isSpecial()&&n&&n.scheme==u.scheme?c=a3:u.isSpecial()?c=l3:"/"==r[l+1]?(c=s3,l++):(u.cannotBeABaseURL=!0,S4(u.path,""),c=b3)}break;case o3:if(!n||n.cannotBeABaseURL&&"#"!=i)return x4;if(n.cannotBeABaseURL&&"#"==i){u.scheme=n.scheme,u.path=i4(n.path),u.query=n.query,u.fragment="",u.cannotBeABaseURL=!0,c=k3;break}c="file"==n.scheme?p3:u3;continue;case a3:if("/"!=i||"/"!=r[l+1]){c=u3;continue}c=h3,l++;break;case s3:if("/"==i){c=A3;break}c=_3;continue;case u3:if(u.scheme=n.scheme,i==X5)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=i4(n.path),u.query=n.query;else if("/"==i||"\\"==i&&u.isSpecial())c=c3;else if("?"==i)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=i4(n.path),u.query="",c=E3;else{if("#"!=i){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=i4(n.path),u.path.length--,c=_3;continue}u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=i4(n.path),u.query=n.query,u.fragment="",c=k3}break;case c3:if(!u.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,c=_3;continue}c=A3}else c=h3;break;case l3:if(c=h3,"/"!=i||"/"!=b4(h,l+1))continue;l++;break;case h3:if("/"!=i&&"\\"!=i){c=A3;continue}break;case A3:if("@"==i){A&&(h="%40"+h),A=!0,o=r4(h);for(var v=0;v<o.length;v++){var p=o[v];if(":"!=p||f){var m=q4(p,z4);f?u.password+=m:u.username+=m}else f=!0}h=""}else if(i==X5||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(A&&""==h)return"Invalid authority";l-=r4(h).length+1,h="",c=d3}else h+=i;break;case d3:case f3:if(t&&"file"==u.scheme){c=y3;continue}if(":"!=i||d){if(i==X5||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(u.isSpecial()&&""==h)return F4;if(t&&""==h&&(u.includesCredentials()||null!==u.port))return;if(a=u.parseHost(h))return a;if(h="",c=g3,t)return;continue}"["==i?d=!0:"]"==i&&(d=!1),h+=i}else{if(""==h)return F4;if(a=u.parseHost(h))return a;if(h="",c=v3,t==f3)return}break;case v3:if(!E4(P4,i)){if(i==X5||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()||t){if(""!=h){var y=y4(h,10);if(y>65535)return G4;u.port=u.isSpecial()&&y===$4[u.scheme]?null:y,h=""}if(t)return;c=g3;continue}return G4}h+=i;break;case p3:if(u.scheme="file","/"==i||"\\"==i)c=m3;else{if(!n||"file"!=n.scheme){c=_3;continue}if(i==X5)u.host=n.host,u.path=i4(n.path),u.query=n.query;else if("?"==i)u.host=n.host,u.path=i4(n.path),u.query="",c=E3;else{if("#"!=i){t3(k4(i4(r,l),""))||(u.host=n.host,u.path=i4(n.path),u.shortenPath()),c=_3;continue}u.host=n.host,u.path=i4(n.path),u.query=n.query,u.fragment="",c=k3}}break;case m3:if("/"==i||"\\"==i){c=y3;break}n&&"file"==n.scheme&&!t3(k4(i4(r,l),""))&&(e3(n.path[0],!0)?S4(u.path,n.path[0]):u.host=n.host),c=_3;continue;case y3:if(i==X5||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&e3(h))c=_3;else if(""==h){if(u.host="",t)return;c=g3}else{if(a=u.parseHost(h))return a;if("localhost"==u.host&&(u.host=""),t)return;h="",c=g3}continue}h+=i;break;case g3:if(u.isSpecial()){if(c=_3,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=X5&&(c=_3,"/"!=i))continue}else u.fragment="",c=k3;else u.query="",c=E3;break;case _3:if(i==X5||"/"==i||"\\"==i&&u.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=L4(s=h))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(u.shortenPath(),"/"==i||"\\"==i&&u.isSpecial()||S4(u.path,"")):n3(h)?"/"==i||"\\"==i&&u.isSpecial()||S4(u.path,""):("file"==u.scheme&&!u.path.length&&e3(h)&&(u.host&&(u.host=""),h=b4(h,0)+":"),S4(u.path,h)),h="","file"==u.scheme&&(i==X5||"?"==i||"#"==i))for(;u.path.length>1&&""===u.path[0];)D4(u.path);"?"==i?(u.query="",c=E3):"#"==i&&(u.fragment="",c=k3)}else h+=q4(i,K4);break;case b3:"?"==i?(u.query="",c=E3):"#"==i?(u.fragment="",c=k3):i!=X5&&(u.path[0]+=q4(i,H4));break;case E3:t||"#"!=i?i!=X5&&("'"==i&&u.isSpecial()?u.query+="%27":u.query+="#"==i?"%23":q4(i,H4)):(u.fragment="",c=k3);break;case k3:i!=X5&&(u.fragment+=q4(i,J4))}l++}},parseHost:function(e){var t,n,r;if("["==b4(e,0)){if("]"!=b4(e,e.length-1))return F4;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 b4(e,h)};if(":"==A()){if(":"!=b4(e,1))return;h+=2,l=++c}for(;A();){if(8==c)return;if(":"!=A()){for(t=n=0;n<4&&E4(M4,A());)t=16*t+y4(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(!E4(P4,A()))return;for(;E4(P4,A());){if(o=y4(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}(C4(e,1,-1)),!t)return F4;this.host=t}else if(this.isSpecial()){if(e=a4(e),E4(W4,e))return F4;if(t=function(e){var t,n,r,i,o,a,s,u=I4(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"==b4(i,0)&&(o=E4(U4,i)?16:8,i=C4(i,8==o?1:2)),""===i)a=0;else{if(!E4(10==o?B4:8==o?N4:M4,i))return e;a=y4(i,o)}S4(n,a)}for(r=0;r<t;r++)if(a=n[r],r==t-1){if(a>=_4(256,5-t))return null}else if(a>255)return null;for(s=R4(n),r=0;r<n.length;r++)s+=n[r]*_4(256,3-r);return s}(e),null===t)return F4;this.host=t}else{if(E4(Y4,e))return F4;for(t="",n=r4(e),r=0;r<n.length;r++)t+=q4(n[r],H4);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return t4($4,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&e3(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+=j4(i),null!==o&&(c+=":"+o)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?a[0]:a.length?"/"+k4(a,"/"):"",null!==s&&(c+="?"+s),null!==u&&(c+="#"+u),c},setHref:function(e){var t=this.parse(e);if(t)throw m4(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new R3(e.path[0]).origin}catch(g6){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+j4(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(s4(e)+":",r3)},getUsername:function(){return this.username},setUsername:function(e){var t=r4(s4(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=q4(t[n],z4)}},getPassword:function(){return this.password},setPassword:function(e){var t=r4(s4(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=q4(t[n],z4)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?j4(e):j4(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,d3)},getHostname:function(){var e=this.host;return null===e?"":j4(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,f3)},getPort:function(){var e=this.port;return null===e?"":s4(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=s4(e))?this.port=null:this.parse(e,v3))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+k4(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,g3))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=s4(e))?this.query=null:("?"==b4(e,0)&&(e=C4(e,1)),this.query="",this.parse(e,E3)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=s4(e))?("#"==b4(e,0)&&(e=C4(e,1)),this.fragment="",this.parse(e,k3)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var R3=function(e){var t=e4(this,S3),n=c4(arguments.length,1)>1?arguments[1]:void 0,r=A4(t,new T3(e,!1,n));j5||(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())},S3=R3.prototype,w3=function(e,t){return{get:function(){return d4(this)[e]()},set:t&&function(e){return d4(this)[t](e)},configurable:!0,enumerable:!0}};if(j5&&($5(S3,"href",w3("serialize","setHref")),$5(S3,"origin",w3("getOrigin")),$5(S3,"protocol",w3("getProtocol","setProtocol")),$5(S3,"username",w3("getUsername","setUsername")),$5(S3,"password",w3("getPassword","setPassword")),$5(S3,"host",w3("getHost","setHost")),$5(S3,"hostname",w3("getHostname","setHostname")),$5(S3,"port",w3("getPort","setPort")),$5(S3,"pathname",w3("getPathname","setPathname")),$5(S3,"search",w3("getSearch","setSearch")),$5(S3,"searchParams",w3("getSearchParams")),$5(S3,"hash",w3("getHash","setHash"))),q5(S3,"toJSON",(function(){return d4(this).serialize()}),{enumerable:!0}),q5(S3,"toString",(function(){return d4(this).serialize()}),{enumerable:!0}),p4){var D3=p4.createObjectURL,I3=p4.revokeObjectURL;D3&&q5(R3,"createObjectURL",K5(D3,p4)),I3&&q5(R3,"revokeObjectURL",K5(I3,p4))}function C3(){var e,t,n=new Op((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 L3(){try{return sg(performance.now(),10)}catch(_6){return(new Date).getTime()}}u4(R3,"URL"),Q5({global:!0,constructor:!0,forced:!H5,sham:!j5},{URL:R3});var V3,x3=function(){function e(){t2(this,e)}return r2(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(g6){}}},{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?kY(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}(),F3="network",G3="network_timeout",O3="demux",Z3="remux",P3="media",U3="other",N3={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"},B3=(i2(V3={},"manifest",{HLS:1100}),i2(V3,F3,2100),i2(V3,G3,2101),i2(V3,O3,{FLV:3100,HLS:3200,MP4:3300,FMP4:3400}),i2(V3,Z3,{FMP4:4100,MP4:4200}),i2(V3,P3,{MSE_ADD_SB:5200,MSE_APPEND_BUFFER:5201,MSE_OTHER:5202,MSE_FULL:5203}),i2(V3,U3,8e3),V3),M3=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=Sh(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),kh(e,"prototype",{writable:!1}),t&&a2(e,t)}(i,e);var t,n,r=(t=i,n=s2(),function(){var e,r=o2(t);if(n){var i=o2(this).constructor;e=Mm(r,arguments,i)}else e=r.apply(this,arguments);return l2(this,e)});function i(e,t,n,o,a){var s;return t2(this,i),(s=r.call(this,a||(null==n?void 0:n.message))).errorType=e===G3?F3:e,s.originError=n,s.ext=o,s.errorCode=B3[e][t]||B3[e],s.errorMessage=s.message,s.errorCode||(s.errorType=U3,s.errorCode=B3[s.errorType]),s}return r2(i,null,[{key:"create",value:function(e,t,n,r,o){return e instanceof i?e:(e instanceof Error&&(n=e,e=""),e||(e=U3),new i(e,t,n,r,o))}},{key:"network",value:function(e){var t;return new i(null!=e&&e.isTimeout?G3:F3,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}(c2(Error)),W3="undefined"!=typeof window,Y3=function(){function e(t){t2(this,e),this.name=t||"",this._prefix="[".concat(this.name,"]")}return r2(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,Ag(t=[this._prefix,L3()]).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,Ag(t=[this._prefix,L3()]).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,Ag(t=[this._prefix,L3()]).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,Ag(t=[this._prefix,L3()]).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}();i2(Y3,"disabled",!0);var X3=function(){try{return W3?window.MediaSource:null}catch(_6){}}(),Q3="appendBuffer",j3="removeBuffer",H3=function(){function e(t,n){var r=this;t2(this,e),i2(this,"media",null),i2(this,"mediaSource",null),i2(this,"_openPromise",C3()),i2(this,"_queue",Sh(null)),i2(this,"_sourceBuffer",Sh(null)),i2(this,"_mseFullFlag",{}),i2(this,"_st",0),i2(this,"_opst",0),i2(this,"_logger",null),i2(this,"_config",null),i2(this,"_url",null),i2(this,"_onSBUpdateEnd",(function(e){var t=r._queue[e];if(t){var n=t.shift();if(n){var i=L3()-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)}}})),i2(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 M3(P3,N3.MSE_APPEND_BUFFER,t)))}})),this._config=IW(e.getDefaultConfig(),n),t&&this.bindMedia(t),this._logger=new Y3("MSE"),this._config.openLog&&Y3.enable()}var t,n,r;return r2(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?Op.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=L3()-e._st;e._logger.debug("MSE OPEN",r),t.removeEventListener("sourceopen",n),e._openPromise.resolve({costtime:r})})),this._openPromise=C3()}return this._openPromise}},{key:"bindMedia",value:(r=e2(q1().mark((function e(t){var n,r,i=this;return q1().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&&X3){e.next=5;break}throw new Error("Param media or MediaSource does not exist");case 5:return this.media=t,n=this.mediaSource=new X3,this._st=L3(),r=function e(){var r=L3()-i._st;i._logger.debug("MSE OPEN"),n.removeEventListener("sourceopen",e),v$.revokeObjectURL(t.src),i._openPromise.resolve({costtime:r})},n.addEventListener("sourceopen",r),this._url=v$.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=e2(q1().mark((function e(){var t,n,r,i=this;return q1().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(ql(o=El(this._queue)).call(o,(function(e){var t=i._queue[e];t&&ql(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(g6){}ql(a=El(this._sourceBuffer)).call(a,(function(e){try{t.removeSourceBuffer(i._sourceBuffer[e])}catch(g6){}}))}if(this.media){this.media.removeAttribute("src");try{this.media.load()}catch(g6){}this.media=null}this.mediaSource=null,this._openPromise=C3(),this._queue=Sh(null),this._sourceBuffer=Sh(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(g6){throw new M3(P3,N3.MSE_ADD_SB,g6)}i.mimeType=t,i.addEventListener("updateend",wm(n=this._onSBUpdateEnd).call(n,this,e)),i.addEventListener("error",wm(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)})):Op.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=L3(),null===(i=r._sourceBuffer[e])||void 0===i||i.appendBuffer(t))}),Q3,n):Op.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=L3(),i._logger.debug("MSE REMOVE START",e,t,n,r),o.remove(t,n))}}),j3,r,o)}},{key:"clearBuffer",value:function(e,t){var n,r,i=this;return ql(n=El(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 ql(e=El(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,x3.end(x3.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=[];ql(n).call(n,(function(e){e.context&&e.context.isinit&&r.push(e)})),this._queue[e]=lm(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"):Op.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 x3.get(this._sourceBuffer[e])}},{key:"bufferStart",value:function(e){return x3.start(this.buffered(e))}},{key:"bufferEnd",value:function(e){return x3.end(this.buffered(e))}},{key:"_enqueueOp",value:function(e,t,n,r,i){var o=this;if(!this.mediaSource)return Op.resolve();var a=this._queue[e]=this._queue[e]||[],s={exec:t,promise:C3(),opName:n,context:r};return i?(ZQ(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=e2(q1().mark((function e(t,n){var r,i,o=this;return q1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.mediaSource){e.next=2;break}return e.abrupt("return",Op.resolve());case 2:if((r=El(this._sourceBuffer)).length){e.next=5;break}return e.abrupt("return",t());case 5:return i=[],ql(r).call(r,(function(e){var t=o._queue[e],r=C3();i.push(r),t.push({exec:function(){return r.resolve()},promise:r,opName:n}),1===t.length&&o._startQueue(e)})),e.abrupt("return",Op.all(i).then((function(){try{return t()}finally{ql(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(g6){var r;g6&&g6.message&&kH(r=g6.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 M3(P3,N3.MSE_FULL,g6))):(this._logger.error(g6),n.promise.reject(new M3(P3,N3.MSE_OTHER,g6)),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):Op.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(!X3)return!1;try{return X3.isTypeSupported(e)}catch(g6){return this._logger.error(e,g6),!1}}}]),e}();i2(H3,"VIDEO","video"),i2(H3,"AUDIO","audio");var J3={"mp4a.40.5":1,"mp4a.40.2":2},K3=.05,z3=new(function(){function e(){_y(this,e),ky(this,"_queue",[]),"undefined"!=typeof document&&(this._tempMedia=document.createElement("video"))}return Ey(e,[{key:"tempMedia",get:function(){return this._tempMedia}},{key:"hasCached",get:function(){var e,t;return-1!==fQ(e=this._queue).call(e,(function(e){return 1===e.codec}))&&-1!==fQ(t=this._queue).call(t,(function(e){return 2===e.codec}))}},{key:"getCachedMedia",value:function(e){var t,n,r=fQ(t=this._queue).call(t,(function(t){return t.codec===e}));return-1!==r?ZQ(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=J3[r];if(this._queue=Ll(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||Ll(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}()),q3=function(e){Ty(o,e);var t,n,r,i=Dy(o);function o(e,t){var n;return _y(this,o),ky(wy(n=i.call(this,e,t)),"_media",void 0),ky(wy(n),"_isTempMedia",!1),ky(wy(n),"_mse",void 0),ky(wy(n),"_remuxer",null),ky(wy(n),"_codec",""),ky(wy(n),"_sourceCreated",!1),ky(wy(n),"_needInitSegment",!0),ky(wy(n),"_seekNoSideEffect",!1),ky(wy(n),"_startRendered",!1),ky(wy(n),"_firstTimeAppendedBuffer",!1),ky(wy(n),"_sampleQueue",[]),ky(wy(n),"_inProcessing",!1),ky(wy(n),"_duration",0),ky(wy(n),"_mediaCache",z3),ky(wy(n),"_resetDts",(function(){})),ky(wy(n),"_onCanplay",(function(){n._ready||(n._ready=!0,n.emit(BY.AUDIO_READY))})),ky(wy(n),"_onPlaying",(function(){n._parent.ready&&(n._audioCanAutoplay=!0,n._emitTimelineEvents(WY.PLAY_EVENT,UY.PLAYING))})),ky(wy(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=wy(n))||void 0===e||e._emitTimelineEvents(WY.PLAY_EVENT,UY.ENDED))}catch(_6){}n._ready=!1,n.emit(BY.AUDIO_WAITING)}})),ky(wy(n),"_onSeeked",(function(){n._seekNoSideEffect||n._isLive?n._seekNoSideEffect=!1:(dW.log(n.TAG,"seeked"),n._ready||(n._media.pause(),n._ready=!0,n.emit(BY.AUDIO_READY)))})),ky(wy(n),"_onProgress",(function(){if(n._media.readyState<=1){var e=n._getBufferGap();e>0&&e<1&&(n._media.currentTime+=e+K3,dW.warn(n.TAG,"progress, gap=",e))}n._emitTimelineEvents(WY.PLAY_EVENT,UY.PROGRESS),n._emitTimelineEvents(WY.PLAY_EVENT,UY.DURATION_CHANGE)})),ky(wy(n),"_onEnded",(function(){var e;dW.log(n.TAG,"ended!"),null===(e=wy(n))||void 0===e||e._emitTimelineEvents(WY.PLAY_EVENT,UY.ENDED)})),ky(wy(n),"_onOnceProgress",(function(){if(n._media.buffered.length){var e=n._media.buffered.start(0);e&&(n._media.currentTime=e+K3,dW.log(n.TAG,"start gap:",e)),n._media.removeEventListener("progress",n._onOnceProgress)}})),ky(wy(n),"_onError",(function(){var e;n._emitTimelineEvents(WY.PLAY_EVENT,UY.ERROR,n._assembleErr("audio error: ".concat(null===(e=n._media.error)||void 0===e?void 0:e.message),3))})),ky(wy(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)),ql(r=t.samples).call(r,(function(e){e.baseMediaDecodeTime=t.baseMediaDecodeTime,n._sampleQueue.push(e)})),t.samples=[],!n._meta)return n._meta=py(py({},t),{},{exist:function(){return!0},hasSample:function(){return!0},samples:[]}),dW.warn(n.TAG,"audio set metadata",n._meta),void n._doAppendWrapper();var i,o;if(n._meta.sampleRate!==t.sampleRate)dW.warn(n.TAG,Ag(i="discontinue: ".concat(n._meta.sampleRate," -> ")).call(i,t.sampleRate)),n._needInitSegment=!0,ql(o=El(t)).call(o,(function(e){n._meta[e]=t[e]}));!n._inProcessing&&n._sampleQueue.length&&n._doAppendWrapper()}})),ky(wy(n),"_doAppend",function(){var e=gy(my().mark((function e(t){var r,i,o;return my().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n._remuxer||(n._remuxer=new PJ({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,dW.log(n.TAG,"video/mp4;codecs=".concat(n._codec)),n._mse.createSource(t.type,"video/mp4;codecs=".concat(n._codec)),n.analyse.addAudioMseOpend(),dW.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",Op.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)}}()),ky(wy(n),"_doPlay",(function(){n._media.play().catch((function(){}))})),ky(wy(n),"_doPause",(function(){n._media.pause()})),ky(wy(n),"_doSeek",(function(e){n._ready=!1,n._media.currentTime=e})),ky(wy(n),"_doChaseFrame",(function(e){var t=e.position;n._seekNoSideEffect=!0,n._media.currentTime=t})),ky(wy(n),"_startRender",(function(){dW.log(n.TAG,"start render"),n._startRendered=!0,n._media.play().catch((function(){}))})),n.TAG="AudioMseRender",n._reuseMse=HW().reuseMseForAudio,n._initMedia(),n}return Ey(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 Yg(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||!z3.hasCached)return dW.log(this.TAG,"init media and mse directly"),this._media=document.createElement("video"),this._media.autoplay=!0,this._mse=new H3,this._bindEvents(),this._bindMediaEvents(),void this._mse.bindMedia(this._media);dW.log(this.TAG,"bind media temporary"),this._media=z3.tempMedia,this._bindEvents(),this._isTempMedia=!0}},{key:"_switchMedia",value:function(e){var t=this._media,n=z3.getCachedMedia(J3[e]);n?(dW.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=K3,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;Iy(Ry(o.prototype),"_bindEvents",this).call(this),this._parent.on(YY.CHASE_AUDIO_FRAME,this._doChaseFrame),this._parent.on(WY.UPDATE_VOLUME,(function(t){e._media.volume=t,e._emitTimelineEvents(WY.PLAY_EVENT,UY.VOLUME_CHANGE)})),this._parent.on(WY.END_OF_STREAM,(function(){var t;e.reuseMseForAudio||(null===(t=e._mse)||void 0===t||t.endOfStream())})),this._parent.on(WY.SET_PLAYBACKRATE,(function(t){dW.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=gy(my().mark((function e(t){return my().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:dW.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=gy(my().mark((function e(){var t;return my().wrap((function(e){for(var n;;)switch(e.prev=e.next){case 0:return this._meta.samples=lm(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(WY.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(WY.PLAY_EVENT,UY.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:Op.reject()).then((function(){dW.log(e.TAG,"auto play by checkAutoPlay!"),e._audioCanAutoplay=!0})).catch((function(){dW.warn(e.TAG,"can’t auto play!"),e._audioCanAutoplay=!1,e.emit(BY.AUDIO_NOT_ALLOWED_AUTOPLAY)})).finally((function(){e._media.volume=n,e._startRendered||(e._media.pause(),dW.log(e.TAG,"auto paused by checkAutoPlay!")),e._media.removeEventListener("canplay",t)}))}))}},{key:"_destroy",value:(t=gy(my().mark((function e(){var t,n,r;return my().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(dW.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(),z3.cacheMedia({codec:this._codec,media:this._media,mse:this._mse}),dW.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 HW().audioWithMse&&!!window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="mp4a.40.5"')}}]),o}(XY),$3=function(){function e(t){_y(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 Ey(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=LX(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,dW.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,dW.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=Ag(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:kY(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=sg(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),ql(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(dW.enable)dW.log(this.TAG,Ag(r="add new buffer range [".concat(a," , ")).call(r,s,"]"));Ll(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:lm(e).call(e)}),LX(n=this._buffers).call(n,(function(e,t){return e.start>t.start?1:-1})),this._afterAppendVodBuffer())}}},{key:"_afterAppendVodBuffer",value:function(){var e;if(Ll(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=Ag(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;(ql(e).call(e,(function(e){if(e.keyframe){var t=(e.dts-r._baseDts)/1e3;r._keyframeQueue.push({position:t,frame:e})}})),this._keyframeQueue=LX(t=this._keyframeQueue).call(t,(function(e,t){return e.position>t.position?1:-1})),this.isLive&&this._keyframeQueue.length>40)&&ZQ(n=this._keyframeQueue).call(n,0,20)}},{key:"toAnnexBNalu",value:function(e){ql(e).call(e,(function(e){var t=e.units;if(t){var n=kY(t).call(t,(function(e,t){return e+4+t.byteLength}),0),r=new Uint8Array(n),i=0;ql(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=Ag(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,dW.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 Ll(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=Ll(t=this._buffers).call(t,(function(t){return t.start<e+.1&&t.end>=e+.1}))[0];if(!d){var f,v,p=qH(f=this._buffers).call(f,(function(t){return t.start>=e}));return p&&p.start-e<1?(this._currentFrameQueue=lm(v=p.frames).call(v,0),this._frameIndexInQueue=0,p):void 0}if(d.frames[0].dts>=e)return this._currentFrameQueue=lm(a=d.frames).call(a,0),this._frameIndexInQueue=0,dW.log(this.TAG,Ag(s=Ag(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=lm(c=d.frames).call(c,0),dW.log(this.TAG,Ag(l=Ag(h=Ag(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;dW.log(this.TAG,Ag(n=Ag(r=Ag(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(ql(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=Ll(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 e9(e){var t;(null===(t=e.buffer)||void 0===t?void 0:t.close)&&e.buffer.close()}var t9=function(){function e(t){_y(this,e),this.TAG="FrameQueue",this._parent=t,this._lastGopId=0,this._frames=[]}return Ey(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):e9(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=lm(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=Ll(t=this._frames).call(t,(function(t){return!!(t.info&&t.info.dts>e)||(e9(t),!1)}))}},{key:"empty",value:function(){var e;ql(e=this._frames).call(e,(function(e){return e9(e)})),this._frames=[]}},{key:"destroy",value:function(){this.empty(),this._lastGopId=0}}]),e}();iN("Float32",(function(e){return function(t,n,r){return e(this,t,n,r)}}));var n9=new(function(){function e(){_y(this,e),ky(this,"_queue",[]),ky(this,"TAG","FrameRenderCache")}return Ey(e,[{key:"cacheCvs",value:function(e){this._queue.push(e),dW.log(this.TAG,"cache canvas!")}},{key:"getCachedCvs",value:function(){var e=this._queue.pop();return e&&dW.log(this.TAG,"get cached canvas!"),e}}]),e}()),r9=function(){function e(t,n){_y(this,e),this.TAG="FrameRender",this.configs=IW({},t),this.parent=n,this.canvas=this.configs.canvas,this.canvas.glInstance=this,this.meta=IW({},this.configs.meta),this.frameRenderCache=n9,this._initMeta(),this._initContextGL(),this.contextGL&&(this._initProgram(),this._initBuffers(),this._initTextures())}return Ey(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),dW.log("FrameRender","use=",i,this.configs.glCtxOptions);break}catch(_6){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=sg((this.canvas.height-this.height*this.canvas.width/this.width)/2)):(R=this.width*this.canvas.height/this.height,k=sg((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(g6){console.error(this.TAG,"_drawPicture2d",e,e.dom,g6,g6.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=IW({},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),n9.cacheCvs(this.canvas))}}]),e}(),i9=function(){function e(t){_y(this,e),ky(this,"_lowDecodeThreshold",HW().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 Ey(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)),dW.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=kY(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=[],dW.log(this.TAG,"解码效率过低,应该降级"),this._parent.emit(MY.DECODE_LOW_FPS))):this._parent.emit(MY.DECODE_LOW_FPS)}}]),e}(),o9=[],a9=function(){function e(t){var n=this;_y(this,e),ky(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=o9.pop()||new Worker(v$.createObjectURL(r)),this._bindEvent()}return Ey(e,[{key:"_bindEvent",value:function(){this._worker.addEventListener("message",this._doTask)}},{key:"start",value:function(e){(e=sg(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),o9.push(this._worker),dW.log("TickTimer","unbind timer event"),this._worker=null,this._task=null)}}]),e}(),s9=function(e){Ty(n,e);var t=Dy(n);function n(e,r){var i,o;return _y(this,n),(o=t.call(this,e,r))._timeRange=new $3(wy(o)),o._decodeEstimate=new i9(wy(o)),o._frameQueue=new t9(wy(o)),o._lastTimeupdate=0,o._renderCost=0,o._canAutoPlay=!0,o._videoDecode=!1,o._inSeeking=!1,o._frameRender=null,o._configuration=null,o._render=wm(i=o._render).call(i,wy(o)),o._tickTimer=new a9(o._render),o._initCanvas(e),o._bindEvents(),o}return Ey(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||fW(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||fW(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(WY.PLAY_EVENT,UY.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=n9.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;Iy(Ry(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,dW.warn(r.TAG,Ag(t=Ag(n=Ag(i="cvsWidth=".concat(v,", cvsHeight=")).call(i,p,", scaleCvsWidth=")).call(n,m,", scaleCvsHeight=")).call(t,y)),dW.warn(r.TAG,Ag(o=Ag(a=Ag(s=Ag(u=Ag(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(MY.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(dW.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(MY.UPDATE_VIDEO_COVER_POSITION,i),this._parent.on(WY.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(WY.PLAY_EVENT,UY.LARGE_AV_GAP,{aDts:e,vDts:i,frameLength:r._frameQueue.length,currentTime:r._parent.currentTime,duration:r._parent.duration}),dW.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&&(dW.warn(r.TAG,"丢帧!"),r.ajustSeekTime(r._parent.currentTime))}}})),this._parent.on(WY.UPDATE_GL_OPTIONS,(function(e){r._config.glCtxOptions=e})),this._parent.on(WY.UPDATE_SEGMENT_END,wm(e=this._updateSegmentEnd).call(e,this)),this.on(MY.AUTO_RUN,wm(t=this._startRender).call(t,this)),this._parent.on(WY.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){dW.warn(this.TAG,"video set metadata"),this._meta=t;var n=t&&t.frameRate&&t.frameRate.fps;n?dW.log(this.TAG,"detect fps:",n):dW.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),dW.warn(this.TAG,"set seeking status=",!1)),this.inSeeking))return dW.log(this.TAG,"drop frame"),void e9(e);this._isLive?this._frameQueue.append(e):this._frameQueue.appendVodFrame(e),t&&t(),this._ready||this.readyState>=1&&this._whenReady()}}},{key:"_startRender",value:function(){dW.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(MY.VIDEO_READY),this.noAudio&&this._emitTimelineEvents(WY.PLAY_EVENT,UY.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}(XY),u9=function(e){Ty(n,e);var t=Dy(n);function n(e){var r;return _y(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 Ey(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{dW.log(this.TAG,"_initVideo, basePTS:",e.dts),this._setVideoSrc(n,t),this._video.paused&&this._videoPlay("_initVideo")}catch(_6){console.error(this.TAG,"_initVideo, load error",_6)}}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(_6){console.error(this.TAG,"_setVideoSrc",_6)}}},{key:"_videoPlay",value:function(e){var t=this,n=this._video;if(dW.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,dW.log(t.TAG,"_videoPlay success")})).catch((function(e){console.error(t.TAG,"_videoPlay failed,",e.message),t._playFailed=!0,t.emit(YY.PLAY_FAILED,t.firstEmit)}))}}},{key:"_removeEvents",value:function(){var e,t,n,r,i,o=this._video;o.removeEventListener("playing",wm(e=this._onPlaying).call(e,this)),o.removeEventListener("ended",wm(t=this._onEnded).call(t,this)),o.removeEventListener("error",wm(n=this._onError).call(n,this)),o.removeEventListener("loadeddata",wm(r=this._onLoadeddata).call(r,this)),o.removeEventListener("timeupdate",wm(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",wm(e=this._onVisibilityChange).call(e,this)),u.addEventListener("playing",wm(t=this._onPlaying).call(t,this)),u.addEventListener("ended",wm(n=this._onEnded).call(n,this)),u.addEventListener("error",wm(r=this._onError).call(r,this)),u.addEventListener("loadeddata",wm(i=this._onLoadeddata).call(i,this)),u.addEventListener("timeupdate",wm(o=this._onTimeUpdate).call(o,this)),u.addEventListener("pause",(function(){dW.log("on pause, currentTime, duration:",s._vCurrentTime,s._vDuration)})),this.on("outputresolutionchange",wm(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)),dW.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){dW.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&&(dW.log(this.TAG,"_onEnded","cancelAnimationFrame"),window.cancelAnimationFrame(this._framId),this._framId=null),this._decodeFPS=sg(this._screenShotNum/(this._vDuration/1e3)),this.emit("fps",this._screenShotNum,this._totleTime,this._vDuration,this._metaFPS,{height:this._currentCanvasHeight,relHeight:this._video.videoHeight}),dW.log("_timePerFrame",this._totleTime/this._screenShotNum),this._timePerFrame=this._totleTime/this._screenShotNum,this._screenShotNum=0,this._allPicNum=0,this._totleTime=0,this._currentBlob&&(v$.revokeObjectURL(this._currentBlob),this._currentBlob=null,this._basePTS=0),this.emit(YY.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(YY.APPEND_VIDEO,t),Cg((function(){dW.log(e.TAG,"onloadeddata, setTimeout firstEmit:",e.firstEmit),e._getFirstFrame()}),40)):(dW.log(this.TAG,"onloadeddata, firstEmit:",this.firstEmit),this._getFirstFrame()))}},{key:"_getFirstFrame",value:function(){this.firstTime=EG();var e=this._vCurrentTime,t=this._basePTS+e,n=this._getImageData(t).imageData;this.firstEmit=!0,this.emit(YY.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&&(dW.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(wm(o=this._getFrame).call(o,this)));if(this._lastPts&&u-this._lastPts<this._realFrameDuration)return void(this._framId=window.requestAnimationFrame(wm(a=this._getFrame).call(a,this)));this._screenShotNum++;var c,l=null,h=EG();try{l=(c=this._getImageData(u)).imageData}catch(_6){console.error(_6,c,this._canvasList.length)}this._lastPts=u;var A=EG()-h;return this._totleTime+=A,this.emit(YY.DECODED,l,u),void(this._framId=window.requestAnimationFrame(wm(i=this._getFrame).call(i,this)))}this._framId=window.requestAnimationFrame(wm(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=sg(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(_6){console.error(this.TAG,"_getImageData, drawImage:",_6)}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 sg(1e3*this._video.duration)}},{key:"_vCurrentTime",get:function(){return sg(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 dW.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}(cY),c9=[{base:720,level:1},{base:540,level:2},{base:360,level:3},{base:280,level:4}],l9=function(e){Ty(n,e);var t=Dy(n);function n(e,r){var i,o;return _y(this,n),(o=t.call(this)).TAG="VideoDecoderController",o._decoder=new u9(e),o._remux=new UJ,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=wm(i=o._handleKeyFrameVideo).call(i,wy(o)),o}return Ey(n,[{key:"_bindEvents",value:function(){var e,t,n,r,i,o,a,s=this;document.addEventListener("visibilitychange",wm(e=this._onVisibilityChange).call(e,this)),this._decoder.on(YY.APPEND_VIDEO,wm(t=this._onAppendVideo).call(t,this)),this._decoder.on(YY.PLAY_FAILED,wm(n=this._onPlayFailed).call(n,this)),this._decoder.on("error",wm(r=this._onError).call(r,this)),this._decoder.on(YY.DECODED,wm(i=this._onDecoded).call(i,this)),this._decoder.on(YY.FIRST_FRAME,wm(o=this._onFirstFrame).call(o,this)),this._decoder.on(YY.FRAGMENT_END,wm(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=Ag(e=[s._metaFPS]).call(e,r,[s._frameLengthPerFragment]);s.emit.apply(s,Ag(t=["fps"]).call(t,Ly(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),dW.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(YY.PLAY_FAILED,e)}},{key:"_onAppendVideo",value:function(e){this._parent.emit(YY.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(YY.DECODED,n),this._lastPts=t}},{key:"_onFirstFrame",value:function(e,t){var n=this._buildFrameInfo(e,t);this._parent.emit(YY.FIRST_FRAME,n)}},{key:"_onFragmentEnd",value:function(e,t){var n=this;dW.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=lG((function(){n._getBlobLength()&&!n._isDecodePause&&n._isVideoOnRun&&!n._isInDecoding&&(dW.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,dW.log(this.TAG,"checkReady trigger ready"),this._parent.emit(YY.READY))}},{key:"_checkDataReady",value:function(){this._isDataReady=!0,this._checkReady()}},{key:"_reduceResolution",value:function(e){if(dW.log(this.TAG,"_reduceResolution","currentLevel:",this._currentLevel,"endLevel:",this._endLevel),this._videoHeight>720&&(dW.log(this.TAG,"_reduceResolution","trigger DECODE_LOW_FPS"),this._parent.emit(MY.DECODE_LOW_FPS)),e&&e<20?(this._minFPSTime++,this._decoder.emit("fpsreduce",e)):this._minFPSTime=0,this._currentLevel>=this._endLevel)return dW.log(this.TAG,"_reduceResolution","trigger DECODE_LOW_FPS",this._currentLevel,this._endLevel),void this._parent.emit(MY.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 dW.log(this.TAG,"_reduceResolution","trigger DECODE_LOW_FPS, _currentLevel: ",this._currentLevel),void this._parent.emit(MY.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 qH(c9).call(c9,(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(_6){dW.log(this.TAG,_6)}}},{key:"_pushBlob",value:function(e){dW.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=Ll(t=this._blobURLList).call(t,(function(t){return t.dts<e&&(v$.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;dW.log(this.TAG,"_handleKeyFrameVideo","startDts:",n,"endDts:",r,"samples length:",t.length),this.endDts&&i>Math.floor(1e3/this._metaFPS)+1&&dW.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 dW.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(_6){console.error(this.TAG,"_handleKeyFrameVideo",_6)}}},{key:"_getFragmentDuration",value:function(e){var t=0,n=0;return e[0].keyframe||console.error(this.TAG,"_getFragmentDuration","gop firstFrame is not keyframe"),ql(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 v$.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})):Cg((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 dW.error(this.TAG,"_onRendend","imageObj. is error",e)}},{key:"checkValidBlob",value:function(e){this._filterBlob(e)}},{key:"chaseVideoFrame",value:function(e){dW.log(this.TAG,e,e.frame.dts,this.currentFragmentDts);var t=e.frame.dts;if(this._startDts=t,t===this.currentFragmentDts){if(dW.log(this.TAG,"_onChaseFrame","_inDecodeId:",this._inDecodeId,"currentFragmentDts:",this.currentFragmentDts),this._inDecodeId>0&&this._inDecodeId<t)return dW.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 dW.log(this.TAG,"_onChaseFrame, _inDecodeId === startDts, startDts:",t),this.stopDecode(),void this.reStrartDecode(this._currentInfo);-1===this._inDecodeId&&(dW.log(this.TAG,"_onChaseFrame","_inDecodeId==-1"),this.startDecode())}t>this.currentFragmentDts&&(dW.log(this.TAG,"_onChaseFrame, startDts > currentFragmentDts, startDts:",t,"currentFragmentDts:",this.currentFragmentDts),this.stopDecode(),this._emptyBlobList()),t<this.currentFragmentDts&&(dW.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=sg(1e3/this._metaFPS),this._isInit=!0,dW.log("".concat(this.TAG," has inited")),this._isInit=!0,this._checkReady())}},{key:"reStrartDecode",value:function(e){if(e)try{dW.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(_6){console.error("load error",_6)}}},{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)dW.log(this.TAG,"startDecode","this decoder is in decoding");else{var e=this._getBlobLength();if(this._decoder&&e){dW.log(this.TAG,"startDecode","blob url length:",e);var t=this._shiftBlob()||{};try{dW.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(_6){console.error(this.TAG,"startDecode","load error",_6)}}}}},{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(dW.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(_6){console.error(_6)}}},{key:"destroy",value:function(){this._blobURLList=[],this._decoder.destroy()}},{key:"empty",value:function(){if(dW.log("empty"),this._decoder){var e=this._decoder._canvasList;return dW.log(this.TAG,"empty >>>>>>>>>>>>>>>>>>length:",e.length),ql(e).call(e,(function(e){e.dom&&(dW.log("clear >>>>>>>>>>>>>>>>>>"),e.dom.width=0,e.dom.height=0,e.dom=null)})),e.length}}},{key:"isIDLE",get:function(){return dW.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}(cY),h9=function(e){Ty(n,e);var t=Dy(n);function n(e,r){var i;return _y(this,n),(i=t.call(this,e,r)).TAG="VideoRenderFromVideo",i._videoDecodeController=new l9(e,wy(i)),i._canAutoPlay=!0,i._videoDecode=e.videoDecode,i._chaseToFrame=null,i}return Ey(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;Iy(Ry(n.prototype),"_bindEvents",this).call(this),this.on("keyFrame",wm(e=this._onKeyFrame).call(e,this)),this.on(YY.READY,wm(t=this._onReady).call(t,this)),this.on(YY.DECODED,wm(r=this._onDecoded).call(r,this)),this.on(YY.PLAY_FAILED,wm(i=this._onPlayFailed).call(i,this)),this.on("error",wm(o=this._onError).call(o,this)),this.on(YY.APPEND_VIDEO,wm(a=this._onAppendVideo).call(a,this)),this.on(YY.FIRST_FRAME,wm(s=this._onFirstFrame).call(s,this)),this._parent.on(YY.CHASE_VIDEO_FRAME,wm(u=this._onChaseVideoFrame).call(u,this)),this._parent.on(WY.SYNC_DTS,wm(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(_6){cosole.error(this.TAG,"onAppendVideo",_6)}}},{key:"_onKeyFrame",value:function(){dW.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(WY.PLAY_EVENT,UY.ERROR,this._assembleErr(e&&e.message))}},{key:"_onReady",value:function(){if(!this._frameRender){var e=IW(this._config,{meta:this._meta,canvas:this._canvas,type:"2d"});try{this._frameRender=new r9(e,this)}catch(_6){this._emitTimelineEvents(WY.PLAY_EVENT,UY.ERROR,this._assembleErr(_6&&_6.message))}}this._startDecode()}},{key:"_onFirstFrame",value:function(e){dW.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(YY.CHASE_VIDEO_FRAME_END,this._chaseToFrame),this._frameQueue.length){var n=this._frameQueue.frames;ql(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||(dW.log(this.TAG,"_initDecoder"),this._videoDecodeController.isInit||this._videoDecodeController.init(this._meta),this._isInit=!0)}},{key:"_receiveFrame",value:function(e){Iy(Ry(n.prototype),"_receiveFrame",this).call(this,e),this._videoDecodeController.checkMaxFrames(this._frameQueue._frames.length)}},{key:"_setMetadata",value:function(e){dW.warn(this.TAG,"video set metadata",e),this._meta=e;var t=e.fpsNum/e.fpsDen;t?dW.log(this.TAG,"detect fps:",t):dW.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=lm(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(){dW.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 ZQ(a).call(a,0),ql(c).call(c,(function(e){a.push(e)})),ql(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(WY.PLAY_EVENT,UY.TIMEUPDATE),this._lastTimeupdate=i.dts),dW.long)dW.log(this.TAG,Ag(l=Ag(h=Ag(A=Ag(d=Ag(f=Ag(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(WY.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,EG(),this.lastTime),this.lastFrameinfo=i.dts,this.lastPrecise=r,this.lastTime=EG(),this.lastAudioTime=this._parent.audioRender.currentTime)}}else{if(this._videoDecodeController.checkMinFrames(this._frameQueue._frames.length),this._parent._paused)return;if(!this._firstFrame)return void dW.log(this.TAG,"_render","not first frame return");var m=this._videoDecodeController;if(dW.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(MY.VIDEO_WAITING)}this._checkToDecode()}}},{key:"_updateSegmentEnd",value:function(){}},{key:"_destroy",value:function(e){this._empty(),Iy(Ry(n.prototype),"destroy",this).call(this,e),this._videoDecodeController.destroy()}},{key:"_doPause",value:function(){dW.log(this.TAG,">>>>>>>>doPause"),this._tickTimer.stop()}},{key:"_getDeleteFrames",value:function(e,t){var n=[],r=[];return ql(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(),ql(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}(s9),A9=function(e){Ty(n,e);var t=Dy(n);function n(e){var r;return _y(this,n),ky(wy(r=t.call(this)),"_parent",null),ky(wy(r),"_decoderReady",!1),ky(wy(r),"_inDecoding",!1),ky(wy(r),"_toDecodeFirstframe",!0),ky(wy(r),"_id",(new Date).getMilliseconds()),ky(wy(r),"_workerErrorCallback",null),ky(wy(r),"_workerMessageCallback",null),ky(wy(r),"_decoderWorker",null),r._parent=e,r}return Ey(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),dW.enable&&dW.log(this.TAG,"doDecode ".concat(t.length," frames")),ql(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),dW.enable&&dW.log(this.TAG,"doDecode ".concat(s.length," frames for precise seek")),ql(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?HW().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,dW.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=lm(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}(cY),d9="IWZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO3ZhciBlPW51bGwsdD1bXSxzPTAsYT0hMTtzZWxmLmFkZEV2ZW50TGlzdGVuZXIoIm1lc3NhZ2UiLChmdW5jdGlvbihvKXtzd2l0Y2goby5kYXRhLm1zZyl7Y2FzZSJjb25maWd1cmF0aW9uIjplPW5ldyBzZWxmLlZpZGVvRGVjb2Rlcih7b3V0cHV0OmZ1bmN0aW9uKG8pe2E9ITAscyYmY2xlYXJUaW1lb3V0KHMpO3ZhciBuPXQuc2hpZnQoKTtuP3NlbGYucG9zdE1lc3NhZ2Uoe3R5cGU6IkRFQ09ERUQiLHdpZHRoOm8uZGlzcGxheVdpZHRoLGhlaWdodDpvLmRpc3BsYXlIZWlnaHQsaW5mbzpuLGJ1ZmZlcjpvfSxbb10pOm8uY2xvc2UoKSxlLmRlY29kZVF1ZXVlU2l6ZT09PXQubGVuZ3RoJiZzZWxmLnBvc3RNZXNzYWdlKHt0eXBlOiJCQVRDSF9GSU5JU0hfRkxBRyJ9KX0sZXJyb3I6ZnVuY3Rpb24oZSl7Y29uc29sZS5sb2coIltXZWJjb2RlY1dvcmtlcl06IixlKSwiQ29kZWMgcmVjbGFpbWVkIGR1ZSB0byBpbmFjdGl2aXR5LiIhPT1lLm1lc3NhZ2UmJnNlbGYucG9zdE1lc3NhZ2Uoe3R5cGU6IkZBSUxFRCIsbWVzc2FnZTplJiZlLm1lc3NhZ2V9KX19KSxzZWxmLlZpZGVvRGVjb2Rlci5pc0NvbmZpZ1N1cHBvcnRlZChvLmRhdGEuZGF0YSkudGhlbigoZnVuY3Rpb24odCl7dC5zdXBwb3J0ZWQmJihlLmNvbmZpZ3VyZShvLmRhdGEuZGF0YSksY29uc29sZS5sb2coIltXZWJjb2RlY1dvcmtlcl06IiwiaXNDb25maWdTdXBwb3J0ZWQiLHQpKX0pKS50aGVuKChmdW5jdGlvbigpe3NlbGYucG9zdE1lc3NhZ2Uoe3R5cGU6IkRFQ09ERVJfUkVBRFkifSkscz1zZXRUaW1lb3V0KChmdW5jdGlvbigpe2F8fHNlbGYucG9zdE1lc3NhZ2Uoe3R5cGU6IkZBSUxFRCIsbWVzc2FnZToibm8gZnJhbWUgb3V0cHV0In0pfSksMmUzKX0pKS5jYXRjaCgoZnVuY3Rpb24oZSl7c2VsZi5wb3N0TWVzc2FnZSh7dHlwZToiRkFJTEVEIixtZXNzYWdlOmUmJmUubWVzc2FnZX0pfSkpO2JyZWFrO2Nhc2UiZGVjb2RlIjp2YXIgbj1vLmRhdGEuZGF0YSxpPW8uZGF0YS5pbmZvO3QucHVzaChpKTt2YXIgZD1uLmJ5dGVMZW5ndGgtNCxjPW5ldyBEYXRhVmlldyhuZXcgQXJyYXlCdWZmZXIoNCkpO2Muc2V0VWludDMyKDAsZCwhMSksbi5zZXQobmV3IFVpbnQ4QXJyYXkoYy5idWZmZXIpLDApLGkua2V5ZnJhbWUmJmUuZmx1c2goKTt2YXIgcj1uZXcgc2VsZi5FbmNvZGVkVmlkZW9DaHVuayh7dHlwZTppLmtleWZyYW1lPyJrZXkiOiJkZWx0YSIsdGltZXN0YW1wOmkucHRzLGRhdGE6bn0pO2UuZGVjb2RlKHIpO2JyZWFrO2Nhc2UiZGVzdHJveSI6ZSYmKGUuZmx1c2goKSxlLmNsb3NlKCkpLGNsZWFyVGltZW91dChzKTticmVhaztjYXNlImNoZWNrRGVjb2RlIjpzZWxmLnBvc3RNZXNzYWdlKHt0eXBlOiJDSEVDS19UT19ERUNPREUiLGRhdGE6MD09PU1hdGguYWJzKGUuZGVjb2RlUXVldWVTaXplLXQubGVuZ3RoKX0pfX0pKX0oKTsK",f9="undefined"!=typeof window&&window.Blob&&new Blob([atob(d9)],{type:"text/javascript;charset=utf-8"});function v9(){var e=f9&&(v$||window.webkitURL).createObjectURL(f9);try{return e?new Worker(e,{}):new Worker("data:application/javascript;base64,"+d9,{type:"module"})}finally{e&&(v$||window.webkitURL).revokeObjectURL(e)}}var p9=HW().maxDecodeOnceWebcodec,m9=function(e){Ty(n,e);var t=Dy(n);function n(){var e,r;_y(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return ky(wy(r=t.call.apply(t,Ag(e=[this]).call(e,o))),"TAG","WebCodecController"),ky(wy(r),"_decoderMode",5),ky(wy(r),"_maxDecodeOnce",p9),ky(wy(r),"_continueDecodeThreshold",p9/2),ky(wy(r),"_avccpushed",!1),r}return Ey(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;dW.log(this.TAG,"start init webcodec worker");var t=new v9;t.onMessage=function(t){var n,r;switch(t.data.type){case"DECODER_READY":dW.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 HW().h264WithWebcodec&&!!window.VideoDecoder&&!1!==n.canUse}}]),n}(A9),y9="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Z1bmN0aW9uIHNoaW1JbXBvcnRTY3JpcHRzKHNyYyl7cmV0dXJuIGZldGNoKHNyYykudGhlbigoZnVuY3Rpb24oZSl7cmV0dXJuIGUudGV4dCgpfSkpLnRoZW4oKGZ1bmN0aW9uKHRleHQpe3NlbGYuZXhwb3J0cz17fSxldmFsKHRleHQpLHNlbGYubT1leHBvcnRzLm19KSl9dmFyIE1BWF9TVFJFQU1fQlVGRkVSX0xFTkdUSD0zMTQ1NzI4LGluaXRUcz0wLERlY29kZXI9ZnVuY3Rpb24oZSl7dGhpcy5pbml0ZWQ9ITEsdGhpcy5pbmZvSWQ9MCx0aGlzLnNlbGY9ZSx0aGlzLm1ldGE9dGhpcy5zZWxmLm1ldGEsdGhpcy50cz0wLHRoaXMuaW5mb2xpc3Q9W10sZS5wYXJfYnJvYWR3YXlPbkJyb2Fkd2F5SW5pdGVkPXRoaXMuYnJvYWR3YXlPbkJyb2Fkd2F5SW5pdGVkLmJpbmQodGhpcyksZS5wYXJfYnJvYWR3YXlPblBpY3R1cmVEZWNvZGVkPXRoaXMuYnJvYWR3YXlPblBpY3R1cmVEZWNvZGVkLmJpbmQodGhpcyl9LGRlY29kZXI7ZnVuY3Rpb24gb25Qb3N0UnVuKCl7KGRlY29kZXI9bmV3IERlY29kZXIodGhpcykpLmluaXQoKX1EZWNvZGVyLnByb3RvdHlwZS50b1U4QXJyYXk9ZnVuY3Rpb24oZSx0KXtyZXR1cm4gTW9kdWxlLkhFQVBVOC5zdWJhcnJheShlLGUrdCl9LERlY29kZXIucHJvdG90eXBlLmluaXQ9ZnVuY3Rpb24oKXtNb2R1bGUuX2Jyb2Fkd2F5SW5pdCgwLDEpLHRoaXMub2Zmc2V0PU1vZHVsZS5fYnJvYWR3YXlDcmVhdGVTdHJlYW0oTUFYX1NUUkVBTV9CVUZGRVJfTEVOR1RIKX0sRGVjb2Rlci5wcm90b3R5cGUuYnJvYWR3YXlPblBpY3R1cmVEZWNvZGVkPWZ1bmN0aW9uKGUsdCxvLG4saSl7dmFyIHM9dGhpcy5pbmZvbGlzdC5zaGlmdCgpLHI9byxhPW8vMixjPXQsZD10LzI7aWYoIXRoaXMubWV0YXx8NDQ0IT09dGhpcy5tZXRhLmNocm9tYUZvcm1hdCYmNDIyIT09dGhpcy5tZXRhLmNocm9tYUZvcm1hdHx8KGE9byksIXN8fCFzLnByZWNpc2VTZWVrfHxzLm91dHB1dCl7dmFyIGY9dGhpcy50b1U4QXJyYXkoZSxjKnIrZCphKjIpLHU9bmV3IFVpbnQ4QXJyYXkoZi5sZW5ndGgpO3Uuc2V0KGYpO3ZhciBsPXUuYnVmZmVyO3RoaXMuc2VsZi5wb3N0TWVzc2FnZSh7bXNnOiJERUNPREVEIix3aWR0aDp0LGhlaWdodDpvLHlMaW5lc2l6ZTpjLHV2TGluZXNpemU6ZCxpbmZvOnMsYnVmZmVyOmx9LFtsXSl9fSxEZWNvZGVyLnByb3RvdHlwZS5icm9hZHdheU9uQnJvYWR3YXlJbml0ZWQ9ZnVuY3Rpb24oKXtpZighdGhpcy5pbml0ZWQpe3RoaXMuaW5pdGVkPSEwO3ZhciBlPTA7aW5pdFRzJiYoZT1wZXJmb3JtYW5jZS5ub3coKS1pbml0VHMpLHRoaXMuc2VsZi5wb3N0TWVzc2FnZSh7bXNnOiJERUNPREVSX1JFQURZIixjb3N0OmV9KX19LERlY29kZXIucHJvdG90eXBlLmRlY29kZT1mdW5jdGlvbihlLHQpe3ZhciBvPXBhcnNlSW50KChuZXcgRGF0ZSkuZ2V0VGltZSgpKSxuPW8tMWU5Kk1hdGguZmxvb3Ioby8xZTkpO3RoaXMuaW5mb2xpc3QucHVzaCh0KSx0JiZ0LmtleWZyYW1lJiYodGhpcy5pbmZvbGlzdD1bdF0sTW9kdWxlLl9icm9hZHdheUZsdXNoU3RyZWFtKG4pKSxNb2R1bGUuSEVBUFU4LnNldChlLHRoaXMub2Zmc2V0KSxNb2R1bGUuX2Jyb2Fkd2F5UGxheVN0cmVhbShlLmxlbmd0aCx0aGlzLmluZm9JZCl9LERlY29kZXIucHJvdG90eXBlLmZsdXNoPWZ1bmN0aW9uKCl7TW9kdWxlLl9icm9hZHdheUZsdXNoU3RyZWFtKCl9LERlY29kZXIucHJvdG90eXBlLmRlc3Ryb3k9ZnVuY3Rpb24oKXtNb2R1bGUuX2Jyb2Fkd2F5RXhpdCgpfSxEZWNvZGVyLnByb3RvdHlwZS51cGRhdGVNZXRhPWZ1bmN0aW9uKGUpe3RoaXMubWV0YT1lfTt2YXIgV0FTTV9DRE5fUEFUSF9QUkVGSVg9IiI7ZnVuY3Rpb24gaW5pdChlKXtXQVNNX0NETl9QQVRIX1BSRUZJWD1lLnNwbGl0KCIvIikuc2xpY2UoMCwtMSkuam9pbigiLyIpLGluaXRUcz1wZXJmb3JtYW5jZS5ub3coKTt2YXIgdD0vYXNtLy50ZXN0KGUpO2RlY29kZXJ8fChzZWxmLmltcG9ydFNjcmlwdHM/bmV3IFByb21pc2UoKGZ1bmN0aW9uKHQsbyl7c2VsZi5jb25zb2xlfHwoc2VsZi5jb25zb2xlPXtsb2c6ZnVuY3Rpb24oKXt9LHdhcm46ZnVuY3Rpb24oKXt9LGluZm86ZnVuY3Rpb24oKXt9LGVycm9yOmZ1bmN0aW9uKCl7fX0pO3RyeXtzZWxmLmltcG9ydFNjcmlwdHMoZSksdCgpfWNhdGNoKG4pe2lmKG4ubWVzc2FnZS5pbmNsdWRlcygiTW9kdWxlIHNjcmlwdHMgZG9uJ3Qgc3VwcG9ydCBpbXBvcnRTY3JpcHRzIikpcmV0dXJuIHQoc2hpbUltcG9ydFNjcmlwdHMoZSkpO28obil9fSkpOnNoaW1JbXBvcnRTY3JpcHRzKGUpKS50aGVuKChmdW5jdGlvbigpe3JldHVybiB0Pyhjb25zb2xlLmxvZygiYXV0byBpbnN0YW5jZSBEZWNvZGVyISIpLG5ldyBQcm9taXNlKChmdW5jdGlvbihlLHQpe3NldFRpbWVvdXQoKGZ1bmN0aW9uKCl7dHJ5e29uUG9zdFJ1bi5jYWxsKHNlbGYpLGUoKX1jYXRjaChvKXt0KG8pfX0pKX0pKSk6c2VsZi5tP3NlbGYubSh7aW5zdGFudGlhdGVXYXNtOmZ1bmN0aW9uKGUsdCl7ZmV0Y2goIiIuY29uY2F0KFdBU01fQ0ROX1BBVEhfUFJFRklYLCIvZGVjb2Rlci53YXNtLmpzIikpLnRoZW4oKGZ1bmN0aW9uKGUpe3JldHVybiBlLmFycmF5QnVmZmVyKCl9KSkudGhlbigoZnVuY3Rpb24odCl7cmV0dXJuIFdlYkFzc2VtYmx5Lmluc3RhbnRpYXRlKHQsZSl9KSkudGhlbigoZnVuY3Rpb24oZSl7cmV0dXJuIHQoZS5pbnN0YW5jZSl9KSl9fSkudGhlbigoZnVuY3Rpb24oZSl7c2VsZi5Nb2R1bGU9ZSxvblBvc3RSdW4uY2FsbChzZWxmKX0pKTpuZXcgUHJvbWlzZSgoZnVuY3Rpb24oZSx0KXthZGRPblBvc3RSdW4ob25Qb3N0UnVuLmJpbmQoc2VsZikpLE1vZHVsZS5vblJ1bnRpbWVJbml0aWFsaXplZD1mdW5jdGlvbigpe2UoKX0sTW9kdWxlLm9uQWJvcnQ9ZnVuY3Rpb24oZSl7dChlJiZlLm1lc3NhZ2U/ZTpuZXcgRXJyb3IoIndhc20gaW5pdCBlcnJvciIpKX0sc2V0VGltZW91dCgoZnVuY3Rpb24oKXt0KG5ldyBFcnJvcigid2FzbSBsb2FkIHRpbWVvdXQiKSl9KSw2ZTMpfSkpfSkpLmNhdGNoKChmdW5jdGlvbihlKXtzZWxmLnBvc3RNZXNzYWdlKHttc2c6IklOSVRfRkFJTEVEIixsb2c6ZS5tZXNzYWdlfSl9KSl9c2VsZi5vbm1lc3NhZ2U9ZnVuY3Rpb24oZSl7dmFyIHQ9ZS5kYXRhO2lmKHQubXNnKXtpZigiaW5pdCIhPT10Lm1zZyYmInByZWxvYWQiIT09dC5tc2cmJiFkZWNvZGVyKXJldHVybjtzd2l0Y2godC5tc2cpe2Nhc2UicHJlbG9hZCI6aW5pdCh0LnVybCk7YnJlYWs7Y2FzZSJpbml0IjpzZWxmLm1ldGE9dC5tZXRhLGluaXQodC51cmwpO2JyZWFrO2Nhc2UidXBkYXRlbWV0YSI6c2VsZi5tZXRhPXQubWV0YSxkZWNvZGVyLnVwZGF0ZU1ldGEodC5tZXRhKTticmVhaztjYXNlImluaXREZWNvZGVyIjpkZWNvZGVyLmRlY29kZSh0LmRhdGEpO2JyZWFrO2Nhc2UiZGVjb2RlIjpkZWNvZGVyLmRlY29kZSh0LmRhdGEsdC5pbmZvKTticmVhaztjYXNlImZsdXNoIjpkZWNvZGVyLmZsdXNoKCk7YnJlYWs7Y2FzZSJmaW5pc2hfZmxhZyI6c2VsZi5wb3N0TWVzc2FnZSh7bXNnOiJCQVRDSF9GSU5JU0hfRkxBRyJ9KTticmVhaztjYXNlImRlc3RvcnkiOmRlY29kZXIuZGVzdHJveSgpfX1lbHNlIHNlbGYucG9zdE1lc3NhZ2Uoe21zZzoiRVJST1I6aW52YWxpZCBtZXNzYWdlIn0pfX0pKCk7Cg==",g9="undefined"!=typeof window&&window.Blob&&new Blob([atob(y9)],{type:"text/javascript;charset=utf-8"});function _9(){var e=g9&&(v$||window.webkitURL).createObjectURL(g9);try{return e?new Worker(e,{}):new Worker("data:application/javascript;base64,"+y9,{type:"module"})}finally{e&&(v$||window.webkitURL).revokeObjectURL(e)}}var b9="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Z1bmN0aW9uIHNoaW1JbXBvcnRTY3JpcHRzKHNyYyl7cmV0dXJuIGZldGNoKHNyYykudGhlbigoZnVuY3Rpb24oZSl7cmV0dXJuIGUudGV4dCgpfSkpLnRoZW4oKGZ1bmN0aW9uKHRleHQpe3NlbGYuZXhwb3J0cz17fSxldmFsKHRleHQpLHNlbGYubT1leHBvcnRzLm19KSl9dmFyIE1BWF9TVFJFQU1fQlVGRkVSX0xFTkdUSD01MjQyODgwLEJBVENIX0RFQ09ERV9TSVpFPTgsaW5pdFRzPTAsRGVjb2Rlcj1mdW5jdGlvbihlKXt0aGlzLmluaXRlZD0hMSx0aGlzLmluZm9JZD0wLHRoaXMuc2VsZj1lLHRoaXMubWV0YT1lLm1ldGEsdGhpcy50cz0wLHRoaXMuaW5mb2xpc3Q9W10sZS5wYXJfYnJvYWR3YXlPbkJyb2Fkd2F5SW5pdGVkPXRoaXMuYnJvYWR3YXlPbkJyb2Fkd2F5SW5pdGVkLmJpbmQodGhpcyksZS5wYXJfYnJvYWR3YXlPblBpY3R1cmVEZWNvZGVkPXRoaXMuYnJvYWR3YXlPblBpY3R1cmVEZWNvZGVkLmJpbmQodGhpcyl9LGRlY29kZXI7ZnVuY3Rpb24gb25Qb3N0UnVuKCl7KGRlY29kZXI9bmV3IERlY29kZXIodGhpcykpLmluaXQoKX1EZWNvZGVyLnByb3RvdHlwZS50b1U4QXJyYXk9ZnVuY3Rpb24oZSx0KXtyZXR1cm4gTW9kdWxlLkhFQVBVOC5zdWJhcnJheShlLGUrdCl9LERlY29kZXIucHJvdG90eXBlLmluaXQ9ZnVuY3Rpb24oKXtNb2R1bGUuX2Jyb2Fkd2F5SW5pdCgwLDIpLHRoaXMuc3RyZWFtQnVmZmVyUHRyPU1vZHVsZS5fYnJvYWR3YXlDcmVhdGVTdHJlYW0oTUFYX1NUUkVBTV9CVUZGRVJfTEVOR1RIKSx0aGlzLnN0cmVhbUJ1ZmZlcj10aGlzLnRvVThBcnJheSh0aGlzLnN0cmVhbUJ1ZmZlclB0cixNQVhfU1RSRUFNX0JVRkZFUl9MRU5HVEgpLHRoaXMuYnVmZmVyU2l6ZXNQdHI9TW9kdWxlLl9tYWxsb2MoNCpCQVRDSF9ERUNPREVfU0laRSksdGhpcy5idWZmZXJTaXplcz10aGlzLnRvVThBcnJheSh0aGlzLmJ1ZmZlclNpemVzUHRyLDQqQkFUQ0hfREVDT0RFX1NJWkUpLHRoaXMuc3RyZWFtQnVmZmVyT2Zmc2V0PTAsdGhpcy5mcmFtZUxlbnNPZmZzZXQ9MCx0aGlzLmZyYW1lTGVuc0J1ZmZlcj1uZXcgVWludDMyQXJyYXkoQkFUQ0hfREVDT0RFX1NJWkUpfSxEZWNvZGVyLnByb3RvdHlwZS5icm9hZHdheU9uUGljdHVyZURlY29kZWQ9ZnVuY3Rpb24oZSx0LHIpe3ZhciBzPXRoaXMuaW5mb2xpc3Quc2hpZnQoKSxvPXIsaT1yLzIsbj10LGY9dC8yOyF0aGlzLm1ldGF8fDQ0NCE9PXRoaXMubWV0YS5jaHJvbWFGb3JtYXQmJjQyMiE9PXRoaXMubWV0YS5jaHJvbWFGb3JtYXR8fChpPXIpO3ZhciBhPXRoaXMudG9VOEFycmF5KGUsbipvK2YqaSoyKSxjPW5ldyBVaW50OEFycmF5KGEubGVuZ3RoKTtjLnNldChhKTt2YXIgZD1jLmJ1ZmZlcjt0aGlzLnNlbGYucG9zdE1lc3NhZ2Uoe21zZzoiREVDT0RFRCIsd2lkdGg6dCxoZWlnaHQ6cix5TGluZXNpemU6bix1dkxpbmVzaXplOmYsaW5mbzpzLGJ1ZmZlcjpkfSxbZF0pfSxEZWNvZGVyLnByb3RvdHlwZS5icm9hZHdheU9uQnJvYWR3YXlJbml0ZWQ9ZnVuY3Rpb24oKXtpZighdGhpcy5pbml0ZWQpe3RoaXMuaW5pdGVkPSEwO3ZhciBlPTA7aW5pdFRzJiYoZT1wZXJmb3JtYW5jZS5ub3coKS1pbml0VHMpLHRoaXMuc2VsZi5wb3N0TWVzc2FnZSh7bXNnOiJERUNPREVSX1JFQURZIixjb3N0OmV9KX19LERlY29kZXIucHJvdG90eXBlLnN0b3JlQnVmZmVyPWZ1bmN0aW9uKGUsdCl7dCYmdC5rZXlmcmFtZSYmdGhpcy5mbHVzaCgpLHRoaXMuaW5mb2xpc3QucHVzaCh0KSx0aGlzLnN0cmVhbUJ1ZmZlci5zZXQoZSx0aGlzLnN0cmVhbUJ1ZmZlck9mZnNldCksdGhpcy5mcmFtZUxlbnNCdWZmZXJbdGhpcy5mcmFtZUxlbnNPZmZzZXRdPWUubGVuZ3RoLHRoaXMuc3RyZWFtQnVmZmVyT2Zmc2V0Kz1lLmxlbmd0aCx0aGlzLmZyYW1lTGVuc09mZnNldCs9MSx0aGlzLmJhdGNoRGVjb2RlKCl9LERlY29kZXIucHJvdG90eXBlLmJhdGNoRGVjb2RlPWZ1bmN0aW9uKGUpeyh0aGlzLmZyYW1lTGVuc09mZnNldD49QkFUQ0hfREVDT0RFX1NJWkV8fGUmJnRoaXMuZnJhbWVMZW5zT2Zmc2V0KSYmKHRoaXMuYnVmZmVyU2l6ZXMuc2V0KG5ldyBVaW50OEFycmF5KHRoaXMuZnJhbWVMZW5zQnVmZmVyLmJ1ZmZlciksMCksTW9kdWxlLl9icm9hZHdheVBsYXlTdHJlYW0xKHRoaXMuYnVmZmVyU2l6ZXNQdHIsdGhpcy5mcmFtZUxlbnNPZmZzZXQpLHRoaXMuZnJhbWVMZW5zT2Zmc2V0PTAsdGhpcy5zdHJlYW1CdWZmZXJPZmZzZXQ9MCl9LERlY29kZXIucHJvdG90eXBlLmRlY29kZT1mdW5jdGlvbihlKXt0aGlzLnN0cmVhbUJ1ZmZlci5zZXQoZSksTW9kdWxlLl9icm9hZHdheVBsYXlTdHJlYW0oZS5sZW5ndGgsMCl9LERlY29kZXIucHJvdG90eXBlLmZsdXNoPWZ1bmN0aW9uKCl7dGhpcy5iYXRjaERlY29kZSghMCksTW9kdWxlLl9icm9hZHdheUZsdXNoU3RyZWFtKCl9LERlY29kZXIucHJvdG90eXBlLmRlc3Ryb3k9ZnVuY3Rpb24oKXtNb2R1bGUuX2Jyb2Fkd2F5RXhpdCgpfSxEZWNvZGVyLnByb3RvdHlwZS51cGRhdGVNZXRhPWZ1bmN0aW9uKGUpe3RoaXMubWV0YT1lfTt2YXIgV0FTTV9DRE5fUEFUSF9QUkVGSVg9IiI7ZnVuY3Rpb24gaW5pdChlKXsoV0FTTV9DRE5fUEFUSF9QUkVGSVg9ZS5zcGxpdCgiLyIpLnNsaWNlKDAsLTEpLmpvaW4oIi8iKSxpbml0VHM9cGVyZm9ybWFuY2Uubm93KCksZGVjb2Rlcil8fChzZWxmLmltcG9ydFNjcmlwdHM/bmV3IFByb21pc2UoKGZ1bmN0aW9uKHQscil7c2VsZi5jb25zb2xlfHwoc2VsZi5jb25zb2xlPXtsb2c6ZnVuY3Rpb24oKXt9LHdhcm46ZnVuY3Rpb24oKXt9LGluZm86ZnVuY3Rpb24oKXt9LGVycm9yOmZ1bmN0aW9uKCl7fX0pO3RyeXtzZWxmLmltcG9ydFNjcmlwdHMoZSksdCgpfWNhdGNoKHMpe2lmKHMubWVzc2FnZS5pbmNsdWRlcygiTW9kdWxlIHNjcmlwdHMgZG9uJ3Qgc3VwcG9ydCBpbXBvcnRTY3JpcHRzIikpcmV0dXJuIHQoc2hpbUltcG9ydFNjcmlwdHMoZSkpO3Iocyl9fSkpOnNoaW1JbXBvcnRTY3JpcHRzKGUpKS50aGVuKChmdW5jdGlvbigpe3JldHVybiBmZXRjaChXQVNNX0NETl9QQVRIX1BSRUZJWCsiL2RlY29kZXIud29ya2VyLmpzIikudGhlbigoZnVuY3Rpb24oZSl7cmV0dXJuIGUuYmxvYigpfSkpLnRoZW4oKGZ1bmN0aW9uKGUpe3JldHVybiBzZWxmLm0oe2xvY2F0ZUZpbGU6ZnVuY3Rpb24odCl7cmV0dXJuL1wud29ya2VyXC5qcyQvLnRlc3QodCk/VVJMLmNyZWF0ZU9iamVjdFVSTChlKTovXC53YXNtJC8udGVzdCh0KT9XQVNNX0NETl9QQVRIX1BSRUZJWCsiL2RlY29kZXIud2FzbSI6L1wubWVtJC8udGVzdCh0KT9XQVNNX0NETl9QQVRIX1BSRUZJWCsiL2RlY29kZXIuanMubWVtIjp2b2lkIDB9LG1haW5TY3JpcHRVcmxPckJsb2I6V0FTTV9DRE5fUEFUSF9QUkVGSVgrIi9kZWNvZGVyLmpzIn0pfSkpLnRoZW4oKGZ1bmN0aW9uKGUpe3NlbGYuTW9kdWxlPWUsb25Qb3N0UnVuLmNhbGwoc2VsZil9KSl9KSkuY2F0Y2goKGZ1bmN0aW9uKGUpe3NlbGYucG9zdE1lc3NhZ2Uoe21zZzoiSU5JVF9GQUlMRUQiLGxvZzplLm1lc3NhZ2V9KX0pKX1zZWxmLm9ubWVzc2FnZT1mdW5jdGlvbihlKXt2YXIgdD1lLmRhdGE7aWYoImluaXQiPT09dC5tc2d8fCJwcmVsb2FkIj09PXQubXNnfHxkZWNvZGVyKXN3aXRjaCh0Lm1zZyl7Y2FzZSJwcmVsb2FkIjppbml0KHQudXJsKSxCQVRDSF9ERUNPREVfU0laRT10LmJhdGNoRGVjb2RlQ291bnQ7YnJlYWs7Y2FzZSJpbml0IjpzZWxmLm1ldGE9dC5tZXRhLEJBVENIX0RFQ09ERV9TSVpFPXQuYmF0Y2hEZWNvZGVDb3VudCxpbml0KHQudXJsKTticmVhaztjYXNlInVwZGF0ZW1ldGEiOnNlbGYubWV0YT10Lm1ldGEsZGVjb2Rlci51cGRhdGVNZXRhKHQubWV0YSk7YnJlYWs7Y2FzZSJpbml0RGVjb2RlciI6ZGVjb2Rlci5mcmFtZUxlbnNPZmZzZXQmJmRlY29kZXIuYmF0Y2hEZWNvZGUoITApLGRlY29kZXIuZmx1c2goKSxkZWNvZGVyLmRlY29kZSh0LmRhdGEpO2JyZWFrO2Nhc2UiZGVjb2RlIjpkZWNvZGVyLnN0b3JlQnVmZmVyKHQuZGF0YSx0LmluZm8pO2JyZWFrO2Nhc2UiZmx1c2giOmRlY29kZXIuZmx1c2goKTticmVhaztjYXNlImZpbmlzaF9mbGFnIjpzZWxmLnBvc3RNZXNzYWdlKHttc2c6IkJBVENIX0ZJTklTSF9GTEFHIn0pO2JyZWFrO2Nhc2UiZGVzdG9yeSI6ZGVjb2Rlci5kZXN0cm95KCl9fX0pKCk7Cg==",E9="undefined"!=typeof window&&window.Blob&&new Blob([atob(b9)],{type:"text/javascript;charset=utf-8"});function k9(){var e=E9&&(v$||window.webkitURL).createObjectURL(E9);try{return e?new Worker(e,{}):new Worker("data:application/javascript;base64,"+b9,{type:"module"})}finally{e&&(v$||window.webkitURL).revokeObjectURL(e)}}var T9="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Z1bmN0aW9uIHNoaW1JbXBvcnRTY3JpcHRzKHNyYyl7cmV0dXJuIGZldGNoKHNyYykudGhlbigoZnVuY3Rpb24oZSl7cmV0dXJuIGUudGV4dCgpfSkpLnRoZW4oKGZ1bmN0aW9uKHRleHQpe3NlbGYuZXhwb3J0cz17fSxldmFsKHRleHQpLHNlbGYubT1leHBvcnRzLm19KSl9dmFyIE1BWF9TVFJFQU1fQlVGRkVSX0xFTkdUSD0xMDQ4NTc2LGluaXRUcz0wLERlY29kZXI9ZnVuY3Rpb24oZSl7dGhpcy5pbml0ZWQ9ITEsdGhpcy5zZWxmPWUsdGhpcy5tZXRhPWUubWV0YSx0aGlzLmluZm9saXN0PVtdLGUucGFyX2Jyb2Fkd2F5T25Ccm9hZHdheUluaXRlZD10aGlzLmJyb2Fkd2F5T25Ccm9hZHdheUluaXRlZC5iaW5kKHRoaXMpLGUucGFyX2Jyb2Fkd2F5T25QaWN0dXJlRGVjb2RlZD10aGlzLmJyb2Fkd2F5T25QaWN0dXJlRGVjb2RlZC5iaW5kKHRoaXMpfSxkZWNvZGVyO2Z1bmN0aW9uIG9uUG9zdFJ1bigpeyhkZWNvZGVyPW5ldyBEZWNvZGVyKHRoaXMpKS5pbml0KCl9RGVjb2Rlci5wcm90b3R5cGUudG9VOEFycmF5PWZ1bmN0aW9uKGUsdCl7cmV0dXJuIE1vZHVsZS5IRUFQVTguc3ViYXJyYXkoZSxlK3QpfSxEZWNvZGVyLnByb3RvdHlwZS5pbml0PWZ1bmN0aW9uKCl7TW9kdWxlLl9icm9hZHdheUluaXQoKSx0aGlzLnN0cmVhbUJ1ZmZlcj10aGlzLnRvVThBcnJheShNb2R1bGUuX2Jyb2Fkd2F5Q3JlYXRlU3RyZWFtKE1BWF9TVFJFQU1fQlVGRkVSX0xFTkdUSCwwKSxNQVhfU1RSRUFNX0JVRkZFUl9MRU5HVEgpfSxEZWNvZGVyLnByb3RvdHlwZS5icm9hZHdheU9uUGljdHVyZURlY29kZWQ9ZnVuY3Rpb24oZSx0LG8saSxuLHMscil7dmFyIGE9dGhpcy5pbmZvbGlzdFswXTtpZighYXx8IWEua2V5ZnJhbWV8fHIpe3ZhciBjPU9iamVjdC5hc3NpZ24oe30sdGhpcy5pbmZvbGlzdC5zaGlmdCgpKSxkPW8sZj1vLzI7IXRoaXMubWV0YXx8NDQ0IT09dGhpcy5tZXRhLmNocm9tYUZvcm1hdCYmNDIyIT09dGhpcy5tZXRhLmNocm9tYUZvcm1hdHx8KGY9byk7dmFyIHU9dGhpcy50b1U4QXJyYXkoZSxpKmQrbipmKjIpLGw9bmV3IFVpbnQ4QXJyYXkodS5sZW5ndGgpO2wuc2V0KHUpO3ZhciBtPWwuYnVmZmVyO3RoaXMuc2VsZi5wb3N0TWVzc2FnZSh7bXNnOiJERUNPREVEIix3aWR0aDp0LGhlaWdodDpvLHlMaW5lc2l6ZTppLHV2TGluZXNpemU6bixpbmZvOmMsYnVmZmVyOm19LFttXSl9fSxEZWNvZGVyLnByb3RvdHlwZS5icm9hZHdheU9uQnJvYWR3YXlJbml0ZWQ9ZnVuY3Rpb24oKXt0aGlzLmluaXRlZD0hMDt2YXIgZT0wO2luaXRUcyYmKGU9cGVyZm9ybWFuY2Uubm93KCktaW5pdFRzKSx0aGlzLnNlbGYucG9zdE1lc3NhZ2Uoe21zZzoiREVDT0RFUl9SRUFEWSIsY29zdDplfSl9LERlY29kZXIucHJvdG90eXBlLmRlY29kZT1mdW5jdGlvbihlLHQpe3QmJnRoaXMuaW5mb2xpc3QucHVzaCh0KSx0JiZ0LmtleWZyYW1lJiYodGhpcy5pbmZvbGlzdD1bdF0pLHRoaXMuc3RyZWFtQnVmZmVyLnNldChlKSxNb2R1bGUuX2Jyb2Fkd2F5UGxheVN0cmVhbShlLmxlbmd0aCwwKX0sRGVjb2Rlci5wcm90b3R5cGUuZGVzdHJveT1mdW5jdGlvbigpe01vZHVsZS5fYnJvYWR3YXlFeGl0KCl9LERlY29kZXIucHJvdG90eXBlLnVwZGF0ZU1ldGE9ZnVuY3Rpb24oZSl7dGhpcy5tZXRhPWV9O3ZhciBXQVNNX0NETl9QQVRIX1BSRUZJWD0iIjtmdW5jdGlvbiBpbml0KGUpe1dBU01fQ0ROX1BBVEhfUFJFRklYPWUuc3BsaXQoIi8iKS5zbGljZSgwLC0xKS5qb2luKCIvIiksaW5pdFRzPXBlcmZvcm1hbmNlLm5vdygpO3ZhciB0PS9hc20vLnRlc3QoZSk7ZGVjb2Rlcnx8KHNlbGYuaW1wb3J0U2NyaXB0cz9uZXcgUHJvbWlzZSgoZnVuY3Rpb24odCxvKXtzZWxmLmNvbnNvbGV8fChzZWxmLmNvbnNvbGU9e2xvZzpmdW5jdGlvbigpe30sd2FybjpmdW5jdGlvbigpe30saW5mbzpmdW5jdGlvbigpe30sZXJyb3I6ZnVuY3Rpb24oKXt9fSk7dHJ5e3NlbGYuaW1wb3J0U2NyaXB0cyhlKSx0KCl9Y2F0Y2goaSl7aWYoaS5tZXNzYWdlLmluY2x1ZGVzKCJNb2R1bGUgc2NyaXB0cyBkb24ndCBzdXBwb3J0IGltcG9ydFNjcmlwdHMiKSlyZXR1cm4gdChzaGltSW1wb3J0U2NyaXB0cyhlKSk7byhpKX19KSk6c2hpbUltcG9ydFNjcmlwdHMoZSkpLnRoZW4oKGZ1bmN0aW9uKCl7cmV0dXJuIHQ/KGNvbnNvbGUubG9nKCJhdXRvIGluc3RhbmNlIERlY29kZXIhIiksbmV3IFByb21pc2UoKGZ1bmN0aW9uKGUsdCl7c2V0VGltZW91dCgoZnVuY3Rpb24oKXt0cnl7b25Qb3N0UnVuLmNhbGwoc2VsZiksZSgpfWNhdGNoKG8pe3Qobyl9fSkpfSkpKTpzZWxmLm0oe2luc3RhbnRpYXRlV2FzbTpmdW5jdGlvbihlLHQpe2ZldGNoKCIiLmNvbmNhdChXQVNNX0NETl9QQVRIX1BSRUZJWCwiL2RlY29kZXIud2FzbS5qcyIpKS50aGVuKChmdW5jdGlvbihlKXtyZXR1cm4gZS5hcnJheUJ1ZmZlcigpfSkpLnRoZW4oKGZ1bmN0aW9uKHQpe3JldHVybiBXZWJBc3NlbWJseS5pbnN0YW50aWF0ZSh0LGUpfSkpLnRoZW4oKGZ1bmN0aW9uKGUpe3JldHVybiB0KGUuaW5zdGFuY2UpfSkpfX0pLnRoZW4oKGZ1bmN0aW9uKGUpe3NlbGYuTW9kdWxlPWUsb25Qb3N0UnVuLmNhbGwoc2VsZil9KSl9KSkuY2F0Y2goKGZ1bmN0aW9uKGUpe3NlbGYucG9zdE1lc3NhZ2Uoe21zZzoiSU5JVF9GQUlMRUQiLGxvZzplLm1lc3NhZ2V9KX0pKX1zZWxmLm9ubWVzc2FnZT1mdW5jdGlvbihlKXt2YXIgdD1lLmRhdGE7aWYoImluaXQiPT09dC5tc2d8fCJwcmVsb2FkIj09PXQubXNnfHxkZWNvZGVyKXN3aXRjaCh0Lm1zZyl7Y2FzZSJwcmVsb2FkIjppbml0KHQudXJsKTticmVhaztjYXNlImluaXQiOnNlbGYubWV0YT10Lm1ldGEsc2VsZi5wb3N0TWVzc2FnZSh7bXNnOiJMT0ciLGxvZzoid29ya2VyIGluaXRlZCJ9KSxpbml0KHQudXJsKTticmVhaztjYXNlInVwZGF0ZW1ldGEiOnNlbGYubWV0YT10Lm1ldGEsZGVjb2Rlci51cGRhdGVNZXRhKHQubWV0YSk7YnJlYWs7Y2FzZSJpbml0RGVjb2RlciI6ZGVjb2Rlci5kZWNvZGUodC5kYXRhKTticmVhaztjYXNlImRlY29kZSI6ZGVjb2Rlci5kZWNvZGUodC5kYXRhLHQuaW5mbyk7YnJlYWs7Y2FzZSJmaW5pc2hfZmxhZyI6c2VsZi5wb3N0TWVzc2FnZSh7bXNnOiJCQVRDSF9GSU5JU0hfRkxBRyJ9KTticmVhaztjYXNlImRlc3RvcnkiOmRlY29kZXIuZGVzdHJveSgpfX19KSgpOwo=",R9="undefined"!=typeof window&&window.Blob&&new Blob([atob(T9)],{type:"text/javascript;charset=utf-8"});function S9(){var e=R9&&(v$||window.webkitURL).createObjectURL(R9);try{return e?new Worker(e,{}):new Worker("data:application/javascript;base64,"+T9,{type:"module"})}finally{e&&(v$||window.webkitURL).revokeObjectURL(e)}}var w9=new(function(){function e(){_y(this,e),ky(this,"_queue",[]),ky(this,"_pendingDecoder",null),ky(this,"TAG","DecoderCache")}return Ey(e,[{key:"genDecoder",value:function(e){return this._initDecoder(e)}},{key:"_initDecoder",value:function(e){var t=this,n=HW(),r=n.preloadDecoder,i=n.maxDecodeOnceWasm;e=e||r;var o,a,s=JW(),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&&(KW()?(o=new _9,a=c,A=2):zW()&&HW().canUseThreadMode?(o=new k9,a=h,A=1):(o=new _9,a=l,A=3)),"h264"===e&&(o=new S9,a=u,A=3),!o)return Op.resolve();var d,f,v,p=((v=new Op((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=EG()+sg(1e3*Math.random()),o.isHevc="h265"===e,o.using=!1,o.ready=!1,dW.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":dW.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":dW.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=EG()+sg(1e3*Math.random())),this._queue.push(e),dW.log(this.TAG,"cache decoder, id=",e.id),"h265"===HW().preloadDecoder&&1===Ll(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=fQ(t=this._queue).call(t,(function(t){return!t.using&&t.isHevc===e}));-1!==o&&(r=ZQ(i=this._queue).call(i,o,1)[0]);if(!r&&this._pendingDecoder&&(r=this._pendingDecoder,this._pendingDecoder=null),r)return r.using=!0,dW.warn(this.TAG,Ag(n="get cached decoder, id=".concat(r.id,", ready=")).call(n,r.ready)),r}}]),e}()),D9=HW().maxDecodeOnceWasm,I9=function(e){Ty(n,e);var t=Dy(n);function n(){var e,r;_y(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return ky(wy(r=t.call.apply(t,Ag(e=[this]).call(e,o))),"TAG","WasmController"),ky(wy(r),"_avccpushed",!1),ky(wy(r),"_maxDecodeOnce",D9),ky(wy(r),"_continueDecodeThreshold",D9/2),ky(wy(r),"_wasmInitCost",0),ky(wy(r),"_threadSupported",zW()&&HW().canUseThreadMode),ky(wy(r),"_simdSuppported",KW()),ky(wy(r),"_decoderMode",window.WebAssembly?3:4),r}return Ey(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=JW(),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 dW.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 k9:new _9,url:e}:void this._workerErrorCallback("no found decoder url, decodeMode:".concat(this._decoderMode)):(e=4===this._decoderMode?a:n)?{decoder:new S9,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=w9.getCachedDecoder(this.isHevc);if(e)return dW.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}),dW.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:D9,url:r}),this._decoderWorker=n)}},{key:"_bindWorkerEvent",value:function(e){var t=this,n=function(n,r){dW.log(t.TAG,"worker failed: ",n,r),t._terminateWorker(e),t._decoderWorker=null,!1===HW().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(dW.log(t.TAG,"wasm worker ready!","cost:",r.data.cost),t._decoderReady=!0,e._wasmInitCost=sg(r.data.cost),!t.meta)return;t._avccpushed||t._initDecoderWithConfiguration(e,t.meta),t.emit(MY.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;dW.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=Ll(n=[r,i,o]).call(n,Boolean),s=kY(a).call(a,(function(e,t){return e+(t.byteLength+4)}),0),u=new Uint8Array(s),c=0;ql(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 HW().reuseWasmDecoder?(this._offWorkerBind(this._decoderWorker),void w9.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,dW.log(this.TAG,"flush decoder and unbind worker event")}},{key:"_terminateWorker",value:function(e){this._offWorkerBind(e),e.postMessage({msg:"destroy"}),e.terminate(),dW.log(this.TAG,"destroy decoder worker")}}]),n}(A9),C9=function(e){Ty(n,e);var t=Dy(n);function n(){var e,r;_y(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return ky(wy(r=t.call.apply(t,Ag(e=[this]).call(e,o))),"TAG","VideoRenderWithDecoder"),ky(wy(r),"_hideRenderFlag",0),ky(wy(r),"_recentMeta",null),ky(wy(r),"_inChaseFrame",!1),ky(wy(r),"_decoderErrorCallback",(function(e){r._emitTimelineEvents(WY.PLAY_EVENT,UY.ERROR,r._assembleErr(e,1))})),ky(wy(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=IW(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(wy(r),r._meta),dW.warn(r.TAG,"reuse canvas and context")):(r._frameRender=new r9(s,wy(r)),dW.log(r.TAG,"create frameRender with config",s))}catch(_6){r._emitTimelineEvents(WY.PLAY_EVENT,UY.ERROR,r._assembleErr(_6&&_6.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=wy(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 Ey(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;dW.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;dW.warn(this.TAG,Ag(n=Ag(r=Ag(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=IW({},e,{samples:null}))}}else{this._emitTimelineEvents(WY.PLAY_EVENT,UY.LOADEDMETADATA),this._recentMeta=this._meta=IW({},e,{samples:null}),dW.warn(this.TAG,"video set metadata",this._meta,"configuration:",this.configuration);var a=e.fpsNum/e.fpsDen;a?dW.log(this.TAG,"detect fps:",a):dW.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(WY.PLAY_EVENT,UY.DURATION_CHANGE)}}}},{key:"_selectDecoder",value:function(){if(!this.isHevc&&m9.isSupported())return this._decodeController=new m9(this),void(this._decodeEstimate.webcodec=!0);this._decodeController=new I9(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(WY.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(WY.PLAY_EVENT,UY.TIMEUPDATE,{pts:r.originPts/90}),this._lastTimeupdate=r.dts),dW.long)dW.log(this.TAG,Ag(o=Ag(a=Ag(s=Ag(u=Ag(c=Ag(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(dW.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(WY.PLAY_EVENT,UY.TIMEUPDATE),null==this||this._emitTimelineEvents(WY.PLAY_EVENT,UY.ENDED),void(null===(d=this._timeRange)||void 0===d||d.clean());this._timeRange.frameLength||(this._ready=!1,this.emit(MY.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(WY.SYNC_DTS,t.dts)}},{key:"_destroy",value:function(e){var t;dW.log(this.TAG,"destroy video render"),Iy(Ry(n.prototype),"destroy",this).call(this,e),null===(t=this._decodeController)||void 0===t||t.destroy(),this._decodeController=null}}]),n}(s9),L9=.1,V9=function(e){Ty(n,e);var t=Dy(n);function n(e,r){var i;return _y(this,n),(i=t.call(this)).TAG="TimeLine",i._parent=r,i._seeking=!1,i.audioRender=q3.isSupported()?new q3(e,wy(i)):new oQ(e,wy(i)),i.videoRender=new C9(e,wy(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 Ey(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 h9(t,this):new C9(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+L9&&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(YY.REMUX,(function(t){e.videoRender.setRemux(t)})),this.on(YY.CHASE_VIDEO_FRAME_END,(function(t){e.emit(YY.CHASE_AUDIO_FRAME,t)})),this.audioRender.on(BY.AUDIO_READY,(function(){dW.log(e.TAG,"audio ready! seeking=",e._seeking),e._seeking&&Cg((function(){try{var t=e.videoRender.getSeekStartPosition(e.currentTime,1/0);if(e.audioRender.isMse&&t)return HW().preciseSeek>e.duration&&e.currentTime>L9?(e.audioRender.seekNoSideEffect({position:e.currentTime+L9}),void e.videoRender.ajustSeekTime(e.currentTime,!0)):(e.audioRender.seekNoSideEffect({position:t.position+L9}),void e.videoRender.ajustSeekTime(t.position));e.videoRender.ajustSeekTime(e.currentTime)}catch(_6){}}),10),e._readyStatus.video&&e._startRender(),e._readyStatus.audio=!0,e._startPlayed||e.analyse.addAudioReady()})),this.audioRender.on(BY.AUDIO_NOT_ALLOWED_AUTOPLAY,(function(){e._emitReady&&e.pause()})),this.audioRender.on(BY.AUDIO_WAITING,(function(){!e.noAudio&&e.currentTime&&(dW.warn(e.TAG,"lack data, audio waiting,currentTime:",e.currentTime),e.emit(WY.PLAY_EVENT,UY.TIMEUPDATE),e.emit(WY.PLAY_EVENT,UY.WAITING),e.emit(WY.DO_PAUSE),e._readyStatus.audio=!1)})),this.videoRender.on(MY.VIDEO_WAITING,(function(){dW.warn(e.TAG,"lack data, video waiting"),e.emit(WY.PLAY_EVENT,UY.WAITING),e.emit(WY.DO_PAUSE),e._readyStatus.video=!1})),this.videoRender.on(MY.VIDEO_READY,(function(){dW.log(e.TAG,"video ready!"),e._startPlayed||e.analyse.addVideoReady(),e._readyStatus.audio&&e._startRender("video"),e._readyStatus.video=!0})),this.videoRender.on(MY.DECODE_LOW_FPS,(function(){e.currentTime<2||(e.analyse.increaseLowDecodeCount(),e._lowdecodeEmited||(nY++,e._lowdecodeEmited=!0),e.emit(WY.PLAY_EVENT,UY.LOW_DECODE))})),this.on(WY.SINGLE_TRACK,(function(t){e._singleTrack=t,1!==t&&2!==t||(e._readyStatus.audio=!0),3===t&&(e._readyStatus.video=!0),e.emit(WY.SYNC_DTS,0)})),this.on(WY.DESTROY,(function(){e.removeAllListeners(),e.videoRender=null,e.audioRender=null})),this.on(WY.DO_PLAY,(function(){e.emit(WY.START_RENDER),e._paused=!1,e._lastSeekTime=1e-4,e.noAudio&&e.emit(WY.SYNC_DTS,0)}))}},{key:"_startRender",value:function(e){if(!this._parent.error&&this.videoRender){if(this.noAudio&&this.emit(WY.SYNC_DTS,0),this.videoRender.forceRender(),!this.isLive&&this._paused&&this.seeking&&this._checkInBuffer())return dW.log(this.TAG,"set seeking = false"),this._seeking=!1,this.emit(WY.PLAY_EVENT,UY.SEEKED),void dW.groupEnd();this._startPlayed||(this.analyse.addFirstframe(),this.emit(WY.PLAY_EVENT,UY.LOADEDDATA),this.emit(WY.PLAY_EVENT,UY.FIRST_FRAME),this._startPlayed=!0),dW.log(this.TAG,"emit canplay"),this.emit(WY.PLAY_EVENT,UY.CANPLAY),this._parent.autoplay?(dW.warn(this.TAG,"startRender: time=",this.currentTime,"paused:",this.paused,"seeking:",this.seeking),this.emit(WY.START_RENDER,e)):(this._parent.autoplay=!0,this.emit(WY.PLAY_EVENT,UY.PAUSE)),this.emit(WY.READY),this._emitReady=!0,this._seeking&&this._checkInBuffer()&&(dW.log(this.TAG,"set seeking = false"),this._seeking=!1,this.emit(WY.PLAY_EVENT,UY.SEEKED),dW.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(WY.PLAY_EVENT,UY.ERROR,t)}return!1}return!0}},{key:"appendBuffer",value:function(e,t){this.emit(WY.APPEND_CHUNKS,e,t),this.noAudio&&this._seeking&&this.videoRender.ajustSeekTime(this.currentTime)}},{key:"play",value:function(){var e=this;return new Op((function(t,n){var r=e.currentAudioCanAutoplay;e.noAudio?r=!0:e.audioRender&&e.audioRender.resume().then((function(){var t;if(dW.log(e.TAG,Ag(t="audio render resumed, pause status: ".concat(e._paused,", audioCanAutoplay:")).call(t,e.currentAudioCanAutoplay)),e._paused||!e.currentAudioCanAutoplay)return r=!1,void e.emit(WY.DO_PAUSE);r=!0})).catch((function(){})),Cg((function(){var i;return dW.log(e.TAG,Ag(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:(dW.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(WY.DO_PAUSE),this._paused=!0,this.emit(WY.PLAY_EVENT,UY.PAUSE))}},{key:"seek",value:function(e){var t=this;if(this._seeking&&dW.groupEnd(),this.isLive){if(this.currentTime<L9||!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 dW.log(this.TAG,"seek, !!!!!!!!!can not seek, audioCanSeek:",r,"videoCanSeek:",i);dW.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(YY.CHASE_VIDEO_FRAME,n)):this.emit(WY.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),dW.group(this.TAG,"start seek to:".concat(e,", set seeking status=true")),this._seeking=!0,this.videoRender.setSeekingStatus(!0),this.noAudio?(this.emit(WY.SYNC_DTS,this.videoRender.getDtsOfTime(e)),this.videoRender.ajustSeekTime(e)):this._resetReadyStatus(),this.emit(WY.DO_SEEK,e),new Op((function(e){t.emit(WY.PLAY_EVENT,UY.SEEKING),e()}))))}}]),n}(cY),x9=D,F9=v,G9=Ai,O9=K,Z9=F9(V.f),P9=F9([].push),U9=function(e){return function(t){for(var n,r=O9(t),i=G9(r),o=i.length,a=0,s=[];o>a;)n=i[a++],x9&&!Z9(r,n)||P9(s,e?[n,r[n]]:r[n]);return s}},N9={entries:U9(!0),values:U9(!1)}.entries;Dn({target:"Object",stat:!0},{entries:function(e){return N9(e)}});var B9=t(ee.Object.entries),M9=gb,W9=R_,Y9=MS,X9=aR,Q9=W9(eR.f),j9=W9([].push),H9=function(e){return function(t){for(var n,r=X9(t),i=Y9(r),o=i.length,a=0,s=[];o>a;)n=i[a++],M9&&!Q9(r,n)||j9(s,e?[n,r[n]]:r[n]);return s}},J9={entries:H9(!0),values:H9(!1)}.entries;uS({target:"Object",stat:!0},{entries:function(e){return J9(e)}});var K9=uS,z9=R_,q9=oT,$9=rF,e6=function(e){var t=cJ(lJ(this)),n="",r=uJ(e);if(r<0||r==1/0)throw hJ("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n},t6=g_,n6=RangeError,r6=String,i6=Math.floor,o6=z9(e6),a6=z9("".slice),s6=z9(1..toFixed),u6=function(e,t,n){return 0===t?n:t%2==1?u6(e,t-1,n*e):u6(e*e,t/2,n)},c6=function(e,t,n){for(var r=-1,i=n;++r<6;)i+=t*e[r],e[r]=i%1e7,i=i6(i/1e7)},l6=function(e,t){for(var n=6,r=0;--n>=0;)r+=e[n],e[n]=i6(r/t),r=r%t*1e7},h6=function(e){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==e[t]){var r=r6(e[t]);n=""===n?r:n+o6("0",7-r.length)+r}return n};K9({target:"Number",proto:!0,forced:t6((function(){return"0.000"!==s6(8e-5,3)||"1"!==s6(.9,0)||"1.25"!==s6(1.255,2)||"1000000000000000128"!==s6(0xde0b6b3a7640080,0)}))||!t6((function(){s6({})}))},{toFixed:function(e){var t,n,r,i,o=$9(this),a=q9(e),s=[0,0,0,0,0,0],u="",c="0";if(a<0||a>20)throw n6("Incorrect fraction digits");if(o!=o)return"NaN";if(o<=-1e21||o>=1e21)return r6(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*u6(2,69,1))-69)<0?o*u6(2,-t,1):o/u6(2,t,1),n*=4503599627370496,(t=52-t)>0){for(c6(s,0,n),r=a;r>=7;)c6(s,1e7,0),r-=7;for(c6(s,u6(10,r,1),0),r=t-1;r>=23;)l6(s,1<<23),r-=23;l6(s,1<<r),c6(s,1,1),l6(s,2),c=h6(s)}else c6(s,0,n),c6(s,1<<-t,0),c=h6(s)+o6("0",a);return c=a>0?u+((i=c.length)<=a?"0."+o6("0",a-i)+c:a6(c,0,i-a)+"."+a6(c,i-a)):u+c}});var A6={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},d6=B9(A6),f6=function(){function e(){_y(this,e),ky(this,"_dot",[]),ky(this,"_currentLowDecodeCount",0)}return Ey(e,[{key:"getBootStats",value:function(){var e,t,n=(null===(t=this._dot[0])||void 0===t?void 0:t.dot)||0;return Kg(e=this._dot).call(e,(function(e){return{action:Ll(d6).call(d6,(function(t){return t[1]===e.action}))[0][1],dot:sg(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=Ll(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:tY,lowdecodeVV:nY,h265FailureRate:Number((100*rY).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===A6.SEEKING&&(n=o.dot),o.action===A6.SEEKED&&t.push(o.dot-n)}return t}},{key:"addFirstData",value:function(){this._dot.push({action:A6.FIRST_DATA,dot:this._getTimestap()})}},{key:"addAudioBoundMedia",value:function(){this._dot.push({action:A6.AUDIO_BOUND_MEDIA,dot:this._getTimestap()})}},{key:"addAudioMseOpenStart",value:function(){this._dot.push({action:A6.AUDIO_MSE_OPEN_START,dot:this._getTimestap()})}},{key:"addAudioMseOpend",value:function(){this._dot.push({action:A6.AUDIO_MSE_OPEND,dot:this._getTimestap()})}},{key:"addAudioFirstTimeAppended",value:function(){this._dot.push({action:A6.AUDIO_FIRSTTIME_APPENDED,dot:this._getTimestap()})}},{key:"addAudioReady",value:function(){this._dot.push({action:A6.AUDIO_READY,dot:this._getTimestap()})}},{key:"addWasmInit",value:function(){this._dot.push({action:A6.WASM_WORKER_INIT,dot:this._getTimestap()})}},{key:"addWasmReady",value:function(){this._dot.push({action:A6.WASM_WORKER_READY,dot:this._getTimestap()})}},{key:"addFirstFrameToDecode",value:function(){this._dot.push({action:A6.FIRST_FRAME_TODECODE,dot:this._getTimestap()})}},{key:"addVideoReady",value:function(){this._dot.push({action:A6.VIDEO_READY,dot:this._getTimestap()})}},{key:"addFirstframe",value:function(){this._dot.push({action:A6.FIRST_FRAME,dot:this._getTimestap()})}},{key:"addWaiting",value:function(){this._dot.push({action:A6.WAITIGN,dot:this._getTimestap()})}},{key:"addSeeking",value:function(){this._dot.push({action:A6.SEEKING,dot:this._getTimestap()})}},{key:"addSeeked",value:function(){this._dot.push({action:A6.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}(),v6=1,p6=2,m6=3,y6=function(e){Ty(n,e);var t=Dy(n);function n(){var e,r,i,o,a,s,u,c;return _y(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"===HW().preloadDecoder,i._hevc||(i._degradeVideo=document.createElement("video")),i._debounceSeek=(o=wm(e=i._seek).call(e,wy(i)),a=300,s=EG(),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=EG();c&&(s=EG(),c=!1,o.apply(void 0,t)),r-s>a?(s=r,o.apply(void 0,t)):(u&&window.clearTimeout(u),u=Cg((function(){o.apply(void 0,t)}),a))}),i._onTouchEnd=wm(r=i._onTouchEnd).call(r,wy(i)),i.analyse=new f6,i}return Ey(n,[{key:"_proxyProps",value:function(){var e,t=this;ql(e=Py(n.prototype)).call(e,(function(e){if(/^__/.test(e)){var n=e.replace("__","");kh(t,n,{get:function(){try{return this[e]}catch(_6){}return 0},set:function(t){try{this[e]=t}catch(_6){}}})}}))}},{key:"addEventListener",value:function(e,t,r){Iy(Ry(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;(Iy(Ry(n.prototype),"removeEventListener",this).call(this,e,t,r),this._degradeVideo)&&(this._eventsBackup=Ll(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;Iy(Ry(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 V9({volume:this.volume,canvas:this.querySelector("canvas"),videoContext:this.videoContext,videoDecode:this.videoDecode,maxVideoHeight:this.getAttribute("maxVideoHeight"),endLevel:sg(this.getAttribute("endLevel"))},this),dW.log(this.TAG,"timeline init"),this._noSleep=new dG,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(WY.INNER_DEGRADE),this.timeline.emit(WY.SET_PLAY_MODE,this._isLive?"LIVE":"VOD"),this.timeline.emit(WY.SET_PLAYBACKRATE,this.playbackRate),this.muted=this.muted)}},{key:"_bindEvents",value:function(){var e=this;this.timeline.on(WY.PLAY_EVENT,(function(t,n){var r;t===UY.LOADEDDATA&&(e.querySelector("canvas")||(dW.log(e.TAG,"_bindEvents, appendChild canvas"),e.appendChild(e.canvas)),e.canvas.style.display="block",null===(r=e.timeline)||void 0===r||r.emit(WY.SET_PLAYBACKRATE,e.playbackRate));if(t!==UY.LOADEDMETADATA&&t!==UY.RESIZE||Op.resolve().then((function(){e.updateVideoPostion()})),t===UY.ERROR){if(dW.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===UY.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(NY[t],e.degradeInfo);if(t===UY.LARGE_AV_GAP&&(e.unsyncInfo=n),t===UY.ENDED){if(e.paused)return;e.pause()}t===UY.PROGRESS&&e._noSleep.toPlay(),t===UY.WAITING&&e.analyse.addWaiting(),t===UY.SEEKING&&e.analyse.addSeeking(),t===UY.SEEKED&&e.analyse.addSeeked(),e._innerDispatchEvent(NY[t],n)}))}},{key:"_disabled",value:function(e){(this.innerDegrade||e)&&(e?HW().disabledWhenErrorOccur&&oY(1):HW().evaluateVVCount||(this.decodeFps/this.fps<=.6&&this.bitrate<2e6?oY(1):oY(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(),ql(t=this._eventsBackup).call(t,(function(e){var t,i=Cy(e,3),o=i[0],a=i[1],s=i[2];Iy(Ry(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(){dW.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;dW.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(){vG(),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){dW.log(this.TAG,Ag(t=Ag(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(WY.DO_PLAY),this._innerDispatchEvent("play"),Op.resolve();this.destroy(),this._init(),i=Cg((function(){try{r._innerDispatchEvent("waiting")}catch(_6){}}),300)}return this._playRequest||!this.timeline.ready||this.timeline.paused?(dW.log(this.TAG,"request play!"),this._playRequest=this._playRequest||new Op((function(e,t){r.timeline._paused=!1,r._innerDispatchEvent("play"),r._noSleep.enable(),r.timeline.once("ready",(function(){dW.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):Op.resolve()}}},{key:"pause",value:function(){this._playRequest=null,this.timeline&&this.timeline.pause();try{this._noSleep.disable(),(e=cG||(cG=document.querySelector("#hackAudioPP")))&&e.pause()}catch(_6){}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);dW.warn(this.TAG,Ag(i=Ag(o=Ag(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(WY.SET_PLAY_MODE,this._isLive?"LIVE":"VOD"),this.duration=Math.min(s||u,u||s)),this.analyse.addFirstData()}this.lowlatency&&(dW.warn(this.TAG,"single track! type=",v6),this.timeline.emit(WY.SINGLE_TRACK,v6)),t.exist()||(dW.warn(this.TAG,"single track! type=",p6),this.timeline.emit(WY.SINGLE_TRACK,p6)),e.exist()||(dW.warn(this.TAG,"single track! type=",m6),this.timeline.emit(WY.SINGLE_TRACK,m6))}var c,l;if(e.formatTimescale)ql(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)ql(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(WY.SET_METADATA,"audio",e)}},{key:"setVideoMeta",value:function(e){!this._isLive&&this._vMeta||(this.timeline.emit(WY.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(WY.END_OF_STREAM))}},{key:"updateVideoPostion",value:function(){var e;null===(e=this.timeline)||void 0===e||e.emit(MY.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(),dW.log(this.TAG,"call destroy"),this.timeline.emit(WY.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(MY.UPDATE_VIDEO_COVER_POSITION,this.containerLayout,e,t),this._degradeVideo)&&(this._degradeVideo.style.objectPosition=Ag(n="".concat(100*e,"% ")).call(n,100*t,"%"))}},{key:"setVideoDecode",value:function(){dW.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(WY.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(WY.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(WY.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 sg(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){dW.log(this.TAG,"set src ",e),this.setAttribute("src",e),this._vMeta=null,this.play(!0),this.timeline||this._init(),this._innerDispatchEvent("loadstart"),tY++}},{key:"currentSrc",get:function(){return this.getAttribute("src")||""}},{key:"playbackRate",get:function(){return Bg(this.getAttribute("playbackrate")||1)},set:function(e){var t;this.setAttribute("playbackrate",e),null===(t=this.timeline)||void 0===t||t.emit(WY.SET_PLAYBACKRATE,e)}},{key:"networkState",get:function(){return 1}},{key:"preloadTime",get:function(){var e=this.getAttribute("preloadtime");if(e){var t=Wg(e);if(t>0&&!Yg(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 sg(e)}},{key:"__glCtxOptions",set:function(e){this._glCtxOptions=e,this.timeline.emit(WY.UPDATE_GL_OPTIONS,e)}},{key:"__error",get:function(){return this._err},set:function(e){this.timeline.emit(WY.PLAY_EVENT,UY.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),Kg(e=o_(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 HW()}},{key:"getDeviceCapacity",value:function(){return{simd:XW,thread:zW(),nbCpu:navigator.hardwareConcurrency}}},{key:"setDecodeCapacity",value:function(e){QW=IW({},QW,e),e.preloadDecoder&&w9.genDecoder().catch((function(){}))}},{key:"genDecoder",value:function(e){return w9.genDecoder(e)}},{key:"cleanDisabled",value:function(){sY()}},{key:"isSupported",value:function(){return!!function(){if("undefined"==typeof customElements)return!1;if(qW)return!0;var e=!1,t=!1;try{var n=new(window.AudioContext||window.webkitAudioContext);n.close(),n=null,e=!0}catch(_6){}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}}qW=e&&t&&!!WebAssembly,localStorage.setItem("_sds",qW?1:0)}catch(_6){}return qW}()&&!1===aY()}}]),n}("undefined"!=typeof HTMLElement?HTMLElement:function(){});ky(y6,"decoderCache",w9);y6.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"}),y6.setEleName=function(e){!function(e){YW=e}(e);var t=function(e){Ty(n,e);var t=Dy(n);function n(){return _y(this,n),t.apply(this,arguments)}return Ey(n)}(y6);customElements.get(jW())||customElements.define(jW(),t)};try{customElements.get(jW())||customElements.define(jW(),y6)}catch(_6){}return VePlayer.register("plugin:xgvideo",y6),y6}));