@byteplus/veplayer-plugin 2.6.0 → 2.6.1-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/index.development.js +192 -164
- package/esm/index.production.js +2 -2
- package/esm/veplayer.plugin.abr.development.js +2 -1
- package/esm/veplayer.plugin.abr.production.js +1 -1
- package/esm/veplayer.plugin.drm.development.js +2 -1
- package/esm/veplayer.plugin.drm.production.js +1 -1
- package/esm/veplayer.plugin.flv.development.js +3 -2
- package/esm/veplayer.plugin.flv.production.js +1 -1
- package/esm/veplayer.plugin.hls.development.js +53 -15
- package/esm/veplayer.plugin.hls.production.js +1 -1
- package/esm/veplayer.plugin.mp4.development.js +115 -124
- package/esm/veplayer.plugin.mp4.production.js +1 -1
- package/esm/veplayer.plugin.rtm.development.js +3 -2
- package/esm/veplayer.plugin.rtm.production.js +1 -1
- package/esm/veplayer.plugin.shaka.development.js +2 -1
- package/esm/veplayer.plugin.shaka.production.js +1 -1
- package/package.json +1 -1
- package/umd/veplayer.plugin.abr.development.js +2 -1
- package/umd/veplayer.plugin.abr.production.js +1 -1
- package/umd/veplayer.plugin.drm.development.js +2 -1
- package/umd/veplayer.plugin.drm.production.js +1 -1
- package/umd/veplayer.plugin.flv.development.js +3 -2
- package/umd/veplayer.plugin.flv.production.js +1 -1
- package/umd/veplayer.plugin.hls.development.js +53 -15
- package/umd/veplayer.plugin.hls.production.js +1 -1
- package/umd/veplayer.plugin.mp4.development.js +115 -124
- package/umd/veplayer.plugin.mp4.production.js +1 -1
- package/umd/veplayer.plugin.rtm.development.js +3 -2
- package/umd/veplayer.plugin.rtm.production.js +1 -1
- package/umd/veplayer.plugin.shaka.development.js +2 -1
- package/umd/veplayer.plugin.shaka.production.js +1 -1
|
@@ -1 +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_SHAKA__=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={exports:{}},r=function(e){return e&&e.Math==Math&&e},i=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof e&&e)||function(){return this}()||e||Function("return this")(),a=function(e){try{return!!e()}catch(t){return!0}},o=!a((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),s=o,u=Function.prototype,c=u.apply,l=u.call,f="object"==typeof Reflect&&Reflect.apply||(s?l.bind(c):function(){return l.apply(c,arguments)}),h=o,d=Function.prototype,p=d.call,g=h&&d.bind.bind(p,p),v=h?g:function(e){return function(){return p.apply(e,arguments)}},m=v,y=m({}.toString),b=m("".slice),w=function(e){return b(y(e),8,-1)},S=w,T=v,E=function(e){if("Function"===S(e))return T(e)},x="object"==typeof document&&document.all,k={all:x,IS_HTMLDDA:void 0===x&&void 0!==x},A=k.all,M=k.IS_HTMLDDA?function(e){return"function"==typeof e||e===A}:function(e){return"function"==typeof e},I={},C=!a((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),R=o,P=Function.prototype.call,N=R?P.bind(P):function(){return P.apply(P,arguments)},j={},O={}.propertyIsEnumerable,_=Object.getOwnPropertyDescriptor,L=_&&!O.call({1:2},1);j.f=L?function(e){var t=_(this,e);return!!t&&t.enumerable}:O;var D,U,F=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},K=a,B=w,H=Object,V=v("".split),z=K((function(){return!H("z").propertyIsEnumerable(0)}))?function(e){return"String"==B(e)?V(e,""):H(e)}:H,q=function(e){return null==e},G=q,W=TypeError,X=function(e){if(G(e))throw W("Can't call method on "+e);return e},Y=z,$=X,J=function(e){return Y($(e))},Q=M,Z=k.all,ee=k.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:Q(e)||e===Z}:function(e){return"object"==typeof e?null!==e:Q(e)},te={},ne=te,re=i,ie=M,ae=function(e){return ie(e)?e:void 0},oe=function(e,t){return arguments.length<2?ae(ne[e])||ae(re[e]):ne[e]&&ne[e][t]||re[e]&&re[e][t]},se=v({}.isPrototypeOf),ue="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ce=i,le=ue,fe=ce.process,he=ce.Deno,de=fe&&fe.versions||he&&he.version,pe=de&&de.v8;pe&&(U=(D=pe.split("."))[0]>0&&D[0]<4?1:+(D[0]+D[1])),!U&&le&&(!(D=le.match(/Edge\/(\d+)/))||D[1]>=74)&&(D=le.match(/Chrome\/(\d+)/))&&(U=+D[1]);var ge=U,ve=ge,me=a,ye=i.String,be=!!Object.getOwnPropertySymbols&&!me((function(){var e=Symbol();return!ye(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ve&&ve<41})),we=be&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Se=oe,Te=M,Ee=se,xe=Object,ke=we?function(e){return"symbol"==typeof e}:function(e){var t=Se("Symbol");return Te(t)&&Ee(t.prototype,xe(e))},Ae=String,Me=function(e){try{return Ae(e)}catch(t){return"Object"}},Ie=M,Ce=Me,Re=TypeError,Pe=function(e){if(Ie(e))return e;throw Re(Ce(e)+" is not a function")},Ne=Pe,je=q,Oe=function(e,t){var n=e[t];return je(n)?void 0:Ne(n)},_e=N,Le=M,De=ee,Ue=TypeError,Fe={exports:{}},Ke=i,Be=Object.defineProperty,He=function(e,t){try{Be(Ke,e,{value:t,configurable:!0,writable:!0})}catch(n){Ke[e]=t}return t},Ve="__core-js_shared__",ze=i[Ve]||He(Ve,{}),qe=ze;(Fe.exports=function(e,t){return qe[e]||(qe[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 Ge=Fe.exports,We=X,Xe=Object,Ye=function(e){return Xe(We(e))},$e=Ye,Je=v({}.hasOwnProperty),Qe=Object.hasOwn||function(e,t){return Je($e(e),t)},Ze=v,et=0,tt=Math.random(),nt=Ze(1..toString),rt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+nt(++et+tt,36)},it=Ge,at=Qe,ot=rt,st=be,ut=we,ct=i.Symbol,lt=it("wks"),ft=ut?ct.for||ct:ct&&ct.withoutSetter||ot,ht=function(e){return at(lt,e)||(lt[e]=st&&at(ct,e)?ct[e]:ft("Symbol."+e)),lt[e]},dt=N,pt=ee,gt=ke,vt=Oe,mt=function(e,t){var n,r;if("string"===t&&Le(n=e.toString)&&!De(r=_e(n,e)))return r;if(Le(n=e.valueOf)&&!De(r=_e(n,e)))return r;if("string"!==t&&Le(n=e.toString)&&!De(r=_e(n,e)))return r;throw Ue("Can't convert object to primitive value")},yt=TypeError,bt=ht("toPrimitive"),wt=function(e,t){if(!pt(e)||gt(e))return e;var n,r=vt(e,bt);if(r){if(void 0===t&&(t="default"),n=dt(r,e,t),!pt(n)||gt(n))return n;throw yt("Can't convert object to primitive value")}return void 0===t&&(t="number"),mt(e,t)},St=ke,Tt=function(e){var t=wt(e,"string");return St(t)?t:t+""},Et=ee,xt=i.document,kt=Et(xt)&&Et(xt.createElement),At=function(e){return kt?xt.createElement(e):{}},Mt=At,It=!C&&!a((function(){return 7!=Object.defineProperty(Mt("div"),"a",{get:function(){return 7}}).a})),Ct=C,Rt=N,Pt=j,Nt=F,jt=J,Ot=Tt,_t=Qe,Lt=It,Dt=Object.getOwnPropertyDescriptor;I.f=Ct?Dt:function(e,t){if(e=jt(e),t=Ot(t),Lt)try{return Dt(e,t)}catch(n){}if(_t(e,t))return Nt(!Rt(Pt.f,e,t),e[t])};var Ut=a,Ft=M,Kt=/#|\.prototype\./,Bt=function(e,t){var n=Vt[Ht(e)];return n==qt||n!=zt&&(Ft(t)?Ut(t):!!t)},Ht=Bt.normalize=function(e){return String(e).replace(Kt,".").toLowerCase()},Vt=Bt.data={},zt=Bt.NATIVE="N",qt=Bt.POLYFILL="P",Gt=Bt,Wt=Pe,Xt=o,Yt=E(E.bind),$t=function(e,t){return Wt(e),void 0===t?e:Xt?Yt(e,t):function(){return e.apply(t,arguments)}},Jt={},Qt=C&&a((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Zt=ee,en=String,tn=TypeError,nn=function(e){if(Zt(e))return e;throw tn(en(e)+" is not an object")},rn=C,an=It,on=Qt,sn=nn,un=Tt,cn=TypeError,ln=Object.defineProperty,fn=Object.getOwnPropertyDescriptor,hn="enumerable",dn="configurable",pn="writable";Jt.f=rn?on?function(e,t,n){if(sn(e),t=un(t),sn(n),"function"==typeof e&&"prototype"===t&&"value"in n&&pn in n&&!n[pn]){var r=fn(e,t);r&&r[pn]&&(e[t]=n.value,n={configurable:dn in n?n[dn]:r[dn],enumerable:hn in n?n[hn]:r[hn],writable:!1})}return ln(e,t,n)}:ln:function(e,t,n){if(sn(e),t=un(t),sn(n),an)try{return ln(e,t,n)}catch(r){}if("get"in n||"set"in n)throw cn("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var gn=Jt,vn=F,mn=C?function(e,t,n){return gn.f(e,t,vn(1,n))}:function(e,t,n){return e[t]=n,e},yn=i,bn=f,wn=E,Sn=M,Tn=I.f,En=Gt,xn=te,kn=$t,An=mn,Mn=Qe,In=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 bn(e,this,arguments)};return t.prototype=e.prototype,t},Cn=function(e,t){var n,r,i,a,o,s,u,c,l,f=e.target,h=e.global,d=e.stat,p=e.proto,g=h?yn:d?yn[f]:(yn[f]||{}).prototype,v=h?xn:xn[f]||An(xn,f,{})[f],m=v.prototype;for(a in t)r=!(n=En(h?a:f+(d?".":"#")+a,e.forced))&&g&&Mn(g,a),s=v[a],r&&(u=e.dontCallGetSet?(l=Tn(g,a))&&l.value:g[a]),o=r&&u?u:t[a],r&&typeof s==typeof o||(c=e.bind&&r?kn(o,yn):e.wrap&&r?In(o):p&&Sn(o)?wn(o):o,(e.sham||o&&o.sham||s&&s.sham)&&An(c,"sham",!0),An(v,a,c),p&&(Mn(xn,i=f+"Prototype")||An(xn,i,{}),An(xn[i],a,o),e.real&&m&&(n||!m[a])&&An(m,a,o)))},Rn=Cn,Pn=C,Nn=Jt.f;Rn({target:"Object",stat:!0,forced:Object.defineProperty!==Nn,sham:!Pn},{defineProperty:Nn});var jn=te.Object,On=n.exports=function(e,t,n){return jn.defineProperty(e,t,n)};jn.defineProperty.sham&&(On.sham=!0);var _n=n.exports,Ln=t(_n),Dn=w,Un=Array.isArray||function(e){return"Array"==Dn(e)},Fn=Math.ceil,Kn=Math.floor,Bn=Math.trunc||function(e){var t=+e;return(t>0?Kn:Fn)(t)},Hn=function(e){var t=+e;return t!=t||0===t?0:Bn(t)},Vn=Hn,zn=Math.min,qn=function(e){return e>0?zn(Vn(e),9007199254740991):0},Gn=qn,Wn=function(e){return Gn(e.length)},Xn=TypeError,Yn=function(e){if(e>9007199254740991)throw Xn("Maximum allowed index exceeded");return e},$n=Tt,Jn=Jt,Qn=F,Zn=function(e,t,n){var r=$n(t);r in e?Jn.f(e,r,Qn(0,n)):e[r]=n},er={};er[ht("toStringTag")]="z";var tr="[object z]"===String(er),nr=tr,rr=M,ir=w,ar=ht("toStringTag"),or=Object,sr="Arguments"==ir(function(){return arguments}()),ur=nr?ir: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=or(e),ar))?n:sr?ir(t):"Object"==(r=ir(t))&&rr(t.callee)?"Arguments":r},cr=M,lr=ze,fr=v(Function.toString);cr(lr.inspectSource)||(lr.inspectSource=function(e){return fr(e)});var hr=lr.inspectSource,dr=v,pr=a,gr=M,vr=ur,mr=hr,yr=function(){},br=[],wr=oe("Reflect","construct"),Sr=/^\s*(?:class|function)\b/,Tr=dr(Sr.exec),Er=!Sr.exec(yr),xr=function(e){if(!gr(e))return!1;try{return wr(yr,br,e),!0}catch(t){return!1}},kr=function(e){if(!gr(e))return!1;switch(vr(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Er||!!Tr(Sr,mr(e))}catch(t){return!0}};kr.sham=!0;var Ar=!wr||pr((function(){var e;return xr(xr.call)||!xr(Object)||!xr((function(){e=!0}))||e}))?kr:xr,Mr=Un,Ir=Ar,Cr=ee,Rr=ht("species"),Pr=Array,Nr=function(e){var t;return Mr(e)&&(t=e.constructor,(Ir(t)&&(t===Pr||Mr(t.prototype))||Cr(t)&&null===(t=t[Rr]))&&(t=void 0)),void 0===t?Pr:t},jr=function(e,t){return new(Nr(e))(0===t?0:t)},Or=a,_r=ge,Lr=ht("species"),Dr=function(e){return _r>=51||!Or((function(){var t=[];return(t.constructor={})[Lr]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Ur=Cn,Fr=a,Kr=Un,Br=ee,Hr=Ye,Vr=Wn,zr=Yn,qr=Zn,Gr=jr,Wr=Dr,Xr=ge,Yr=ht("isConcatSpreadable"),$r=Xr>=51||!Fr((function(){var e=[];return e[Yr]=!1,e.concat()[0]!==e})),Jr=function(e){if(!Br(e))return!1;var t=e[Yr];return void 0!==t?!!t:Kr(e)};Ur({target:"Array",proto:!0,arity:1,forced:!$r||!Wr("concat")},{concat:function(e){var t,n,r,i,a,o=Hr(this),s=Gr(o,0),u=0;for(t=-1,r=arguments.length;t<r;t++)if(Jr(a=-1===t?o:arguments[t]))for(i=Vr(a),zr(u+i),n=0;n<i;n++,u++)n in a&&qr(s,u,a[n]);else zr(u+1),qr(s,u++,a);return s.length=u,s}});var Qr=ur,Zr=String,ei=function(e){if("Symbol"===Qr(e))throw TypeError("Cannot convert a Symbol value to a string");return Zr(e)},ti={},ni=Hn,ri=Math.max,ii=Math.min,ai=function(e,t){var n=ni(e);return n<0?ri(n+t,0):ii(n,t)},oi=J,si=ai,ui=Wn,ci=function(e){return function(t,n,r){var i,a=oi(t),o=ui(a),s=si(r,o);if(e&&n!=n){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===n)return e||s||0;return!e&&-1}},li={includes:ci(!0),indexOf:ci(!1)},fi={},hi=Qe,di=J,pi=li.indexOf,gi=fi,vi=v([].push),mi=function(e,t){var n,r=di(e),i=0,a=[];for(n in r)!hi(gi,n)&&hi(r,n)&&vi(a,n);for(;t.length>i;)hi(r,n=t[i++])&&(~pi(a,n)||vi(a,n));return a},yi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],bi=mi,wi=yi,Si=Object.keys||function(e){return bi(e,wi)},Ti=C,Ei=Qt,xi=Jt,ki=nn,Ai=J,Mi=Si;ti.f=Ti&&!Ei?Object.defineProperties:function(e,t){ki(e);for(var n,r=Ai(t),i=Mi(t),a=i.length,o=0;a>o;)xi.f(e,n=i[o++],r[n]);return e};var Ii,Ci=oe("document","documentElement"),Ri=rt,Pi=Ge("keys"),Ni=function(e){return Pi[e]||(Pi[e]=Ri(e))},ji=nn,Oi=ti,_i=yi,Li=fi,Di=Ci,Ui=At,Fi="prototype",Ki="script",Bi=Ni("IE_PROTO"),Hi=function(){},Vi=function(e){return"<"+Ki+">"+e+"</"+Ki+">"},zi=function(e){e.write(Vi("")),e.close();var t=e.parentWindow.Object;return e=null,t},qi=function(){try{Ii=new ActiveXObject("htmlfile")}catch(i){}var e,t,n;qi="undefined"!=typeof document?document.domain&&Ii?zi(Ii):(t=Ui("iframe"),n="java"+Ki+":",t.style.display="none",Di.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Vi("document.F=Object")),e.close(),e.F):zi(Ii);for(var r=_i.length;r--;)delete qi[Fi][_i[r]];return qi()};Li[Bi]=!0;var Gi=Object.create||function(e,t){var n;return null!==e?(Hi[Fi]=ji(e),n=new Hi,Hi[Fi]=null,n[Bi]=e):n=qi(),void 0===t?n:Oi.f(n,t)},Wi={},Xi=mi,Yi=yi.concat("length","prototype");Wi.f=Object.getOwnPropertyNames||function(e){return Xi(e,Yi)};var $i={},Ji=ai,Qi=Wn,Zi=Zn,ea=Array,ta=Math.max,na=function(e,t,n){for(var r=Qi(e),i=Ji(t,r),a=Ji(void 0===n?r:n,r),o=ea(ta(a-i,0)),s=0;i<a;i++,s++)Zi(o,s,e[i]);return o.length=s,o},ra=w,ia=J,aa=Wi.f,oa=na,sa="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];$i.f=function(e){return sa&&"Window"==ra(e)?function(e){try{return aa(e)}catch(t){return oa(sa)}}(e):aa(ia(e))};var ua={};ua.f=Object.getOwnPropertySymbols;var ca=mn,la=function(e,t,n,r){return r&&r.enumerable?e[t]=n:ca(e,t,n),e},fa=Jt,ha=function(e,t,n){return fa.f(e,t,n)},da={},pa=ht;da.f=pa;var ga,va,ma,ya=te,ba=Qe,wa=da,Sa=Jt.f,Ta=function(e){var t=ya.Symbol||(ya.Symbol={});ba(t,e)||Sa(t,e,{value:wa.f(e)})},Ea=N,xa=oe,ka=ht,Aa=la,Ma=function(){var e=xa("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=ka("toPrimitive");t&&!t[r]&&Aa(t,r,(function(e){return Ea(n,this)}),{arity:1})},Ia=ur,Ca=tr?{}.toString:function(){return"[object "+Ia(this)+"]"},Ra=tr,Pa=Jt.f,Na=mn,ja=Qe,Oa=Ca,_a=ht("toStringTag"),La=function(e,t,n,r){if(e){var i=n?e:e.prototype;ja(i,_a)||Pa(i,_a,{configurable:!0,value:t}),r&&!Ra&&Na(i,"toString",Oa)}},Da=M,Ua=i.WeakMap,Fa=Da(Ua)&&/native code/.test(String(Ua)),Ka=Fa,Ba=i,Ha=ee,Va=mn,za=Qe,qa=ze,Ga=Ni,Wa=fi,Xa="Object already initialized",Ya=Ba.TypeError,$a=Ba.WeakMap;if(Ka||qa.state){var Ja=qa.state||(qa.state=new $a);Ja.get=Ja.get,Ja.has=Ja.has,Ja.set=Ja.set,ga=function(e,t){if(Ja.has(e))throw Ya(Xa);return t.facade=e,Ja.set(e,t),t},va=function(e){return Ja.get(e)||{}},ma=function(e){return Ja.has(e)}}else{var Qa=Ga("state");Wa[Qa]=!0,ga=function(e,t){if(za(e,Qa))throw Ya(Xa);return t.facade=e,Va(e,Qa,t),t},va=function(e){return za(e,Qa)?e[Qa]:{}},ma=function(e){return za(e,Qa)}}var Za={set:ga,get:va,has:ma,enforce:function(e){return ma(e)?va(e):ga(e,{})},getterFor:function(e){return function(t){var n;if(!Ha(t)||(n=va(t)).type!==e)throw Ya("Incompatible receiver, "+e+" required");return n}}},eo=$t,to=z,no=Ye,ro=Wn,io=jr,ao=v([].push),oo=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,a=6==e,o=7==e,s=5==e||a;return function(u,c,l,f){for(var h,d,p=no(u),g=to(p),v=eo(c,l),m=ro(g),y=0,b=f||io,w=t?b(u,m):n||o?b(u,0):void 0;m>y;y++)if((s||y in g)&&(d=v(h=g[y],y,p),e))if(t)w[y]=d;else if(d)switch(e){case 3:return!0;case 5:return h;case 6:return y;case 2:ao(w,h)}else switch(e){case 4:return!1;case 7:ao(w,h)}return a?-1:r||i?i:w}},so={forEach:oo(0),map:oo(1),filter:oo(2),some:oo(3),every:oo(4),find:oo(5),findIndex:oo(6),filterReject:oo(7)},uo=Cn,co=i,lo=N,fo=v,ho=C,po=be,go=a,vo=Qe,mo=se,yo=nn,bo=J,wo=Tt,So=ei,To=F,Eo=Gi,xo=Si,ko=Wi,Ao=$i,Mo=ua,Io=I,Co=Jt,Ro=ti,Po=j,No=la,jo=ha,Oo=Ge,_o=fi,Lo=rt,Do=ht,Uo=da,Fo=Ta,Ko=Ma,Bo=La,Ho=Za,Vo=so.forEach,zo=Ni("hidden"),qo="Symbol",Go="prototype",Wo=Ho.set,Xo=Ho.getterFor(qo),Yo=Object[Go],$o=co.Symbol,Jo=$o&&$o[Go],Qo=co.TypeError,Zo=co.QObject,es=Io.f,ts=Co.f,ns=Ao.f,rs=Po.f,is=fo([].push),as=Oo("symbols"),os=Oo("op-symbols"),ss=Oo("wks"),us=!Zo||!Zo[Go]||!Zo[Go].findChild,cs=ho&&go((function(){return 7!=Eo(ts({},"a",{get:function(){return ts(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=es(Yo,t);r&&delete Yo[t],ts(e,t,n),r&&e!==Yo&&ts(Yo,t,r)}:ts,ls=function(e,t){var n=as[e]=Eo(Jo);return Wo(n,{type:qo,tag:e,description:t}),ho||(n.description=t),n},fs=function(e,t,n){e===Yo&&fs(os,t,n),yo(e);var r=wo(t);return yo(n),vo(as,r)?(n.enumerable?(vo(e,zo)&&e[zo][r]&&(e[zo][r]=!1),n=Eo(n,{enumerable:To(0,!1)})):(vo(e,zo)||ts(e,zo,To(1,{})),e[zo][r]=!0),cs(e,r,n)):ts(e,r,n)},hs=function(e,t){yo(e);var n=bo(t),r=xo(n).concat(vs(n));return Vo(r,(function(t){ho&&!lo(ds,n,t)||fs(e,t,n[t])})),e},ds=function(e){var t=wo(e),n=lo(rs,this,t);return!(this===Yo&&vo(as,t)&&!vo(os,t))&&(!(n||!vo(this,t)||!vo(as,t)||vo(this,zo)&&this[zo][t])||n)},ps=function(e,t){var n=bo(e),r=wo(t);if(n!==Yo||!vo(as,r)||vo(os,r)){var i=es(n,r);return!i||!vo(as,r)||vo(n,zo)&&n[zo][r]||(i.enumerable=!0),i}},gs=function(e){var t=ns(bo(e)),n=[];return Vo(t,(function(e){vo(as,e)||vo(_o,e)||is(n,e)})),n},vs=function(e){var t=e===Yo,n=ns(t?os:bo(e)),r=[];return Vo(n,(function(e){!vo(as,e)||t&&!vo(Yo,e)||is(r,as[e])})),r};po||($o=function(){if(mo(Jo,this))throw Qo("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?So(arguments[0]):void 0,t=Lo(e),n=function(e){this===Yo&&lo(n,os,e),vo(this,zo)&&vo(this[zo],t)&&(this[zo][t]=!1),cs(this,t,To(1,e))};return ho&&us&&cs(Yo,t,{configurable:!0,set:n}),ls(t,e)},No(Jo=$o[Go],"toString",(function(){return Xo(this).tag})),No($o,"withoutSetter",(function(e){return ls(Lo(e),e)})),Po.f=ds,Co.f=fs,Ro.f=hs,Io.f=ps,ko.f=Ao.f=gs,Mo.f=vs,Uo.f=function(e){return ls(Do(e),e)},ho&&jo(Jo,"description",{configurable:!0,get:function(){return Xo(this).description}})),uo({global:!0,constructor:!0,wrap:!0,forced:!po,sham:!po},{Symbol:$o}),Vo(xo(ss),(function(e){Fo(e)})),uo({target:qo,stat:!0,forced:!po},{useSetter:function(){us=!0},useSimple:function(){us=!1}}),uo({target:"Object",stat:!0,forced:!po,sham:!ho},{create:function(e,t){return void 0===t?Eo(e):hs(Eo(e),t)},defineProperty:fs,defineProperties:hs,getOwnPropertyDescriptor:ps}),uo({target:"Object",stat:!0,forced:!po},{getOwnPropertyNames:gs}),Ko(),Bo($o,qo),_o[zo]=!0;var ms=be&&!!Symbol.for&&!!Symbol.keyFor,ys=Cn,bs=oe,ws=Qe,Ss=ei,Ts=Ge,Es=ms,xs=Ts("string-to-symbol-registry"),ks=Ts("symbol-to-string-registry");ys({target:"Symbol",stat:!0,forced:!Es},{for:function(e){var t=Ss(e);if(ws(xs,t))return xs[t];var n=bs("Symbol")(t);return xs[t]=n,ks[n]=t,n}});var As=Cn,Ms=Qe,Is=ke,Cs=Me,Rs=ms,Ps=Ge("symbol-to-string-registry");As({target:"Symbol",stat:!0,forced:!Rs},{keyFor:function(e){if(!Is(e))throw TypeError(Cs(e)+" is not a symbol");if(Ms(Ps,e))return Ps[e]}});var Ns=v([].slice),js=Un,Os=M,_s=w,Ls=ei,Ds=v([].push),Us=Cn,Fs=oe,Ks=f,Bs=N,Hs=v,Vs=a,zs=M,qs=ke,Gs=Ns,Ws=function(e){if(Os(e))return e;if(js(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];"string"==typeof i?Ds(n,i):"number"!=typeof i&&"Number"!=_s(i)&&"String"!=_s(i)||Ds(n,Ls(i))}var a=n.length,o=!0;return function(e,t){if(o)return o=!1,t;if(js(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}},Xs=be,Ys=String,$s=Fs("JSON","stringify"),Js=Hs(/./.exec),Qs=Hs("".charAt),Zs=Hs("".charCodeAt),eu=Hs("".replace),tu=Hs(1..toString),nu=/[\uD800-\uDFFF]/g,ru=/^[\uD800-\uDBFF]$/,iu=/^[\uDC00-\uDFFF]$/,au=!Xs||Vs((function(){var e=Fs("Symbol")();return"[null]"!=$s([e])||"{}"!=$s({a:e})||"{}"!=$s(Object(e))})),ou=Vs((function(){return'"\\udf06\\ud834"'!==$s("\udf06\ud834")||'"\\udead"'!==$s("\udead")})),su=function(e,t){var n=Gs(arguments),r=Ws(t);if(zs(r)||void 0!==e&&!qs(e))return n[1]=function(e,t){if(zs(r)&&(t=Bs(r,this,Ys(e),t)),!qs(t))return t},Ks($s,null,n)},uu=function(e,t,n){var r=Qs(n,t-1),i=Qs(n,t+1);return Js(ru,e)&&!Js(iu,i)||Js(iu,e)&&!Js(ru,r)?"\\u"+tu(Zs(e,0),16):e};$s&&Us({target:"JSON",stat:!0,arity:3,forced:au||ou},{stringify:function(e,t,n){var r=Gs(arguments),i=Ks(au?su:$s,null,r);return ou&&"string"==typeof i?eu(i,nu,uu):i}});var cu=ua,lu=Ye;Cn({target:"Object",stat:!0,forced:!be||a((function(){cu.f(1)}))},{getOwnPropertySymbols:function(e){var t=cu.f;return t?t(lu(e)):[]}}),Ta("asyncIterator"),Ta("hasInstance"),Ta("isConcatSpreadable"),Ta("iterator"),Ta("match"),Ta("matchAll"),Ta("replace"),Ta("search"),Ta("species"),Ta("split");var fu=Ma;Ta("toPrimitive"),fu();var hu=oe,du=La;Ta("toStringTag"),du(hu("Symbol"),"Symbol"),Ta("unscopables"),La(i.JSON,"JSON",!0);var pu,gu,vu,mu=te.Symbol,yu={},bu=C,wu=Qe,Su=Function.prototype,Tu=bu&&Object.getOwnPropertyDescriptor,Eu=wu(Su,"name"),xu={EXISTS:Eu,PROPER:Eu&&"something"===function(){}.name,CONFIGURABLE:Eu&&(!bu||bu&&Tu(Su,"name").configurable)},ku=!a((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Au=Qe,Mu=M,Iu=Ye,Cu=ku,Ru=Ni("IE_PROTO"),Pu=Object,Nu=Pu.prototype,ju=Cu?Pu.getPrototypeOf:function(e){var t=Iu(e);if(Au(t,Ru))return t[Ru];var n=t.constructor;return Mu(n)&&t instanceof n?n.prototype:t instanceof Pu?Nu:null},Ou=a,_u=M,Lu=ee,Du=Gi,Uu=ju,Fu=la,Ku=ht("iterator"),Bu=!1;[].keys&&("next"in(vu=[].keys())?(gu=Uu(Uu(vu)))!==Object.prototype&&(pu=gu):Bu=!0);var Hu=!Lu(pu)||Ou((function(){var e={};return pu[Ku].call(e)!==e}));_u((pu=Hu?{}:Du(pu))[Ku])||Fu(pu,Ku,(function(){return this}));var Vu={IteratorPrototype:pu,BUGGY_SAFARI_ITERATORS:Bu},zu=Vu.IteratorPrototype,qu=Gi,Gu=F,Wu=La,Xu=yu,Yu=function(){return this},$u=function(e,t,n,r){var i=t+" Iterator";return e.prototype=qu(zu,{next:Gu(+!r,n)}),Wu(e,i,!1,!0),Xu[i]=Yu,e},Ju=v,Qu=Pe,Zu=M,ec=String,tc=TypeError,nc=function(e,t,n){try{return Ju(Qu(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(r){}},rc=nn,ic=function(e){if("object"==typeof e||Zu(e))return e;throw tc("Can't set "+ec(e)+" as a prototype")},ac=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=nc(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(r){}return function(n,r){return rc(n),ic(r),t?e(n,r):n.__proto__=r,n}}():void 0),oc=Cn,sc=N,uc=xu,cc=$u,lc=ju,fc=La,hc=la,dc=yu,pc=Vu,gc=uc.PROPER,vc=pc.BUGGY_SAFARI_ITERATORS,mc=ht("iterator"),yc="keys",bc="values",wc="entries",Sc=function(){return this},Tc=function(e,t,n,r,i,a,o){cc(n,t,r);var s,u,c,l=function(e){if(e===i&&g)return g;if(!vc&&e in d)return d[e];switch(e){case yc:case bc:case wc:return function(){return new n(this,e)}}return function(){return new n(this)}},f=t+" Iterator",h=!1,d=e.prototype,p=d[mc]||d["@@iterator"]||i&&d[i],g=!vc&&p||l(i),v="Array"==t&&d.entries||p;if(v&&(s=lc(v.call(new e)))!==Object.prototype&&s.next&&(fc(s,f,!0,!0),dc[f]=Sc),gc&&i==bc&&p&&p.name!==bc&&(h=!0,g=function(){return sc(p,this)}),i)if(u={values:l(bc),keys:a?g:l(yc),entries:l(wc)},o)for(c in u)(vc||h||!(c in d))&&hc(d,c,u[c]);else oc({target:t,proto:!0,forced:vc||h},u);return o&&d[mc]!==g&&hc(d,mc,g,{name:i}),dc[t]=g,u},Ec=function(e,t){return{value:e,done:t}},xc=J,kc=yu,Ac=Za;Jt.f;var Mc=Tc,Ic=Ec,Cc="Array Iterator",Rc=Ac.set,Pc=Ac.getterFor(Cc);Mc(Array,"Array",(function(e,t){Rc(this,{type:Cc,target:xc(e),index:0,kind:t})}),(function(){var e=Pc(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,Ic(void 0,!0)):Ic("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),kc.Arguments=kc.Array;var Nc={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},jc=i,Oc=ur,_c=mn,Lc=yu,Dc=ht("toStringTag");for(var Uc in Nc){var Fc=jc[Uc],Kc=Fc&&Fc.prototype;Kc&&Oc(Kc)!==Dc&&_c(Kc,Dc,Uc),Lc[Uc]=Lc.Array}var Bc=mu;Ta("dispose");var Hc=Bc;Ta("asyncDispose");var Vc=Cn,zc=v,qc=oe("Symbol"),Gc=qc.keyFor,Wc=zc(qc.prototype.valueOf);Vc({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==Gc(Wc(e))}catch(t){return!1}}});for(var Xc=Cn,Yc=Ge,$c=oe,Jc=v,Qc=ke,Zc=ht,el=$c("Symbol"),tl=el.isWellKnown,nl=$c("Object","getOwnPropertyNames"),rl=Jc(el.prototype.valueOf),il=Yc("wks"),al=0,ol=nl(el),sl=ol.length;al<sl;al++)try{var ul=ol[al];Qc(el[ul])&&Zc(ul)}catch(v_){}Xc({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if(tl&&tl(e))return!0;try{for(var t=rl(e),n=0,r=nl(il),i=r.length;n<i;n++)if(il[r[n]]==t)return!0}catch(v_){}return!1}}),Ta("matcher"),Ta("metadataKey"),Ta("observable"),Ta("metadata"),Ta("patternMatch"),Ta("replaceAll");var cl=Hc,ll=t(cl),fl=v,hl=Hn,dl=ei,pl=X,gl=fl("".charAt),vl=fl("".charCodeAt),ml=fl("".slice),yl=function(e){return function(t,n){var r,i,a=dl(pl(t)),o=hl(n),s=a.length;return o<0||o>=s?e?"":void 0:(r=vl(a,o))<55296||r>56319||o+1===s||(i=vl(a,o+1))<56320||i>57343?e?gl(a,o):r:e?ml(a,o,o+2):i-56320+(r-55296<<10)+65536}},bl={codeAt:yl(!1),charAt:yl(!0)},wl=bl.charAt,Sl=ei,Tl=Za,El=Tc,xl=Ec,kl="String Iterator",Al=Tl.set,Ml=Tl.getterFor(kl);El(String,"String",(function(e){Al(this,{type:kl,string:Sl(e),index:0})}),(function(){var e,t=Ml(this),n=t.string,r=t.index;return r>=n.length?xl(void 0,!0):(e=wl(n,r),t.index+=e.length,xl(e,!1))}));var Il=da.f("iterator"),Cl=t(Il);function Rl(e){return(Rl="function"==typeof ll&&"symbol"==typeof Cl?function(e){return typeof e}:function(e){return e&&"function"==typeof ll&&e.constructor===ll&&e!==ll.prototype?"symbol":typeof e})(e)}var Pl=da.f("toPrimitive"),Nl=t(Pl);function jl(e){var t=function(e,t){if("object"!==Rl(e)||null===e)return e;var n=e[Nl];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Rl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Rl(t)?t:String(t)}function Ol(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),Ln(e,jl(r.key),r)}}function _l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}Cn({target:"Object",stat:!0,sham:!C},{create:Gi});var Ll=te.Object,Dl=function(e,t){return Ll.create(e,t)},Ul=t(Dl);Cn({target:"Object",stat:!0},{setPrototypeOf:ac});var Fl=te.Object.setPrototypeOf,Kl=t(Fl),Bl=v,Hl=Pe,Vl=ee,zl=Qe,ql=Ns,Gl=o,Wl=Function,Xl=Bl([].concat),Yl=Bl([].join),$l={},Jl=Gl?Wl.bind:function(e){var t=Hl(this),n=t.prototype,r=ql(arguments,1),i=function(){var n=Xl(r,ql(arguments));return this instanceof i?function(e,t,n){if(!zl($l,t)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";$l[t]=Wl("C,a","return new C("+Yl(r,",")+")")}return $l[t](e,n)}(t,n.length,n):t.apply(e,n)};return Vl(n)&&(i.prototype=n),i},Ql=Jl;Cn({target:"Function",proto:!0,forced:Function.bind!==Ql},{bind:Ql});var Zl=te,ef=function(e){return Zl[e+"Prototype"]},tf=ef("Function").bind,nf=se,rf=tf,af=Function.prototype,of=function(e){var t=e.bind;return e===af||nf(af,e)&&t===af.bind?rf:t},sf=t(of);function uf(e,t){var n;return(uf=Kl?sf(n=Kl).call(n):function(e,t){return e.__proto__=t,e})(e,t)}var cf=Ar,lf=Me,ff=TypeError,hf=function(e){if(cf(e))return e;throw ff(lf(e)+" is not a constructor")},df=Cn,pf=f,gf=Jl,vf=hf,mf=nn,yf=ee,bf=Gi,wf=a,Sf=oe("Reflect","construct"),Tf=Object.prototype,Ef=[].push,xf=wf((function(){function e(){}return!(Sf((function(){}),[],e)instanceof e)})),kf=!wf((function(){Sf((function(){}))})),Af=xf||kf;df({target:"Reflect",stat:!0,forced:Af,sham:Af},{construct:function(e,t){vf(e),mf(t);var n=arguments.length<3?e:vf(arguments[2]);if(kf&&!xf)return Sf(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 pf(Ef,r,t),new(pf(gf,e,r))}var i=n.prototype,a=bf(yf(i)?i:Tf),o=pf(e,a,t);return yf(o)?o:a}});var Mf=t(te.Reflect.construct),If=Ye,Cf=ju,Rf=ku;Cn({target:"Object",stat:!0,forced:a((function(){Cf(1)})),sham:!Rf},{getPrototypeOf:function(e){return Cf(If(e))}});var Pf=te.Object.getPrototypeOf,Nf=t(Pf);function jf(e){var t;return(jf=Kl?sf(t=Nf).call(t):function(e){return e.__proto__||Nf(e)})(e)}function Of(e){var t=function(){if("undefined"==typeof Reflect||!Mf)return!1;if(Mf.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Mf(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=jf(e);if(t){var i=jf(this).constructor;n=Mf(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Rl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _l(e)}(this,n)}}var _f=a,Lf=function(e,t){var n=[][e];return!!n&&_f((function(){n.call(null,t||function(){return 1},1)}))},Df=so.forEach,Uf=Lf("forEach")?[].forEach:function(e){return Df(this,e,arguments.length>1?arguments[1]:void 0)};Cn({target:"Array",proto:!0,forced:[].forEach!=Uf},{forEach:Uf});var Ff=ef("Array").forEach,Kf=ur,Bf=Qe,Hf=se,Vf=Ff,zf=Array.prototype,qf={DOMTokenList:!0,NodeList:!0},Gf=t((function(e){var t=e.forEach;return e===zf||Hf(zf,e)&&t===zf.forEach||Bf(qf,Kf(e))?Vf:t})),Wf=Me,Xf=TypeError,Yf=function(e,t){if(!delete e[t])throw Xf("Cannot delete property "+Wf(t)+" of "+Wf(e))},$f=na,Jf=Math.floor,Qf=function(e,t){var n=e.length,r=Jf(n/2);return n<8?Zf(e,t):eh(e,Qf($f(e,0,r),t),Qf($f(e,r),t),t)},Zf=function(e,t){for(var n,r,i=e.length,a=1;a<i;){for(r=a,n=e[a];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==a++&&(e[r]=n)}return e},eh=function(e,t,n,r){for(var i=t.length,a=n.length,o=0,s=0;o<i||s<a;)e[o+s]=o<i&&s<a?r(t[o],n[s])<=0?t[o++]:n[s++]:o<i?t[o++]:n[s++];return e},th=Qf,nh=ue.match(/firefox\/(\d+)/i),rh=!!nh&&+nh[1],ih=/MSIE|Trident/.test(ue),ah=ue.match(/AppleWebKit\/(\d+)\./),oh=!!ah&&+ah[1],sh=Cn,uh=v,ch=Pe,lh=Ye,fh=Wn,hh=Yf,dh=ei,ph=a,gh=th,vh=Lf,mh=rh,yh=ih,bh=ge,wh=oh,Sh=[],Th=uh(Sh.sort),Eh=uh(Sh.push),xh=ph((function(){Sh.sort(void 0)})),kh=ph((function(){Sh.sort(null)})),Ah=vh("sort"),Mh=!ph((function(){if(bh)return bh<70;if(!(mh&&mh>3)){if(yh)return!0;if(wh)return wh<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++)Sh.push({k:t+r,v:n})}for(Sh.sort((function(e,t){return t.v-e.v})),r=0;r<Sh.length;r++)t=Sh[r].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));sh({target:"Array",proto:!0,forced:xh||!kh||!Ah||!Mh},{sort:function(e){void 0!==e&&ch(e);var t=lh(this);if(Mh)return void 0===e?Th(t):Th(t,e);var n,r,i=[],a=fh(t);for(r=0;r<a;r++)r in t&&Eh(i,t[r]);for(gh(i,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:dh(t)>dh(n)?1:-1}}(e)),n=fh(i),r=0;r<n;)t[r]=i[r++];for(;r<a;)hh(t,r++);return t}});var Ih=ef("Array").sort,Ch=se,Rh=Ih,Ph=Array.prototype,Nh=t((function(e){var t=e.sort;return e===Ph||Ch(Ph,e)&&t===Ph.sort?Rh:t})),jh=Cn,Oh=li.indexOf,_h=Lf,Lh=E([].indexOf),Dh=!!Lh&&1/Lh([1],1,-0)<0;jh({target:"Array",proto:!0,forced:Dh||!_h("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return Dh?Lh(this,e,t)||0:Oh(this,e,t)}});var Uh=ef("Array").indexOf,Fh=se,Kh=Uh,Bh=Array.prototype,Hh=t((function(e){var t=e.indexOf;return e===Bh||Fh(Bh,e)&&t===Bh.indexOf?Kh:t})),Vh=Cn,zh=so.find,qh="find",Gh=!0;qh in[]&&Array(1)[qh]((function(){Gh=!1})),Vh({target:"Array",proto:!0,forced:Gh},{find:function(e){return zh(this,e,arguments.length>1?arguments[1]:void 0)}});var Wh=ef("Array").find,Xh=se,Yh=Wh,$h=Array.prototype,Jh=t((function(e){var t=e.find;return e===$h||Xh($h,e)&&t===$h.find?Yh:t})),Qh=ef("Array").concat,Zh=se,ed=Qh,td=Array.prototype,nd=t((function(e){var t=e.concat;return e===td||Zh(td,e)&&t===td.concat?ed:t})),rd=Ye,id=Si;Cn({target:"Object",stat:!0,forced:a((function(){id(1)}))},{keys:function(e){return id(rd(e))}});var ad=t(te.Object.keys),od=Cn,sd=Un,ud=Ar,cd=ee,ld=ai,fd=Wn,hd=J,dd=Zn,pd=ht,gd=Ns,vd=Dr("slice"),md=pd("species"),yd=Array,bd=Math.max;od({target:"Array",proto:!0,forced:!vd},{slice:function(e,t){var n,r,i,a=hd(this),o=fd(a),s=ld(e,o),u=ld(void 0===t?o:t,o);if(sd(a)&&(n=a.constructor,(ud(n)&&(n===yd||sd(n.prototype))||cd(n)&&null===(n=n[md]))&&(n=void 0),n===yd||void 0===n))return gd(a,s,u);for(r=new(void 0===n?yd:n)(bd(u-s,0)),i=0;s<u;s++,i++)s in a&&dd(r,i,a[s]);return r.length=i,r}});var wd=ef("Array").slice,Sd=se,Td=wd,Ed=Array.prototype,xd=t((function(e){var t=e.slice;return e===Ed||Sd(Ed,e)&&t===Ed.slice?Td:t})),kd=C,Ad=Un,Md=TypeError,Id=Object.getOwnPropertyDescriptor,Cd=kd&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(v_){return v_ instanceof TypeError}}(),Rd=Cn,Pd=Ye,Nd=ai,jd=Hn,Od=Wn,_d=Cd?function(e,t){if(Ad(e)&&!Id(e,"length").writable)throw Md("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},Ld=Yn,Dd=jr,Ud=Zn,Fd=Yf,Kd=Dr("splice"),Bd=Math.max,Hd=Math.min;Rd({target:"Array",proto:!0,forced:!Kd},{splice:function(e,t){var n,r,i,a,o,s,u=Pd(this),c=Od(u),l=Nd(e,c),f=arguments.length;for(0===f?n=r=0:1===f?(n=0,r=c-l):(n=f-2,r=Hd(Bd(jd(t),0),c-l)),Ld(c+n-r),i=Dd(u,r),a=0;a<r;a++)(o=l+a)in u&&Ud(i,a,u[o]);if(i.length=r,n<r){for(a=l;a<c-r;a++)s=a+n,(o=a+r)in u?u[s]=u[o]:Fd(u,s);for(a=c;a>c-r+n;a--)Fd(u,a-1)}else if(n>r)for(a=c-r;a>l;a--)s=a+n-1,(o=a+r-1)in u?u[s]=u[o]:Fd(u,s);for(a=0;a<n;a++)u[a+l]=arguments[a+2];return _d(u,c-r+n),i}});var Vd=ef("Array").splice,zd=se,qd=Vd,Gd=Array.prototype,Wd=t((function(e){var t=e.splice;return e===Gd||zd(Gd,e)&&t===Gd.splice?qd:t})),Xd=oe,Yd=Wi,$d=ua,Jd=nn,Qd=v([].concat),Zd=Xd("Reflect","ownKeys")||function(e){var t=Yd.f(Jd(e)),n=$d.f;return n?Qd(t,n(e)):t},ep=Qe,tp=Zd,np=I,rp=Jt,ip=ee,ap=mn,op=Error,sp=v("".replace),up=String(op("zxcasd").stack),cp=/\n\s*at [^:]*:[^\n]*/,lp=cp.test(up),fp=F,hp=!a((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",fp(1,7)),7!==e.stack)})),dp=mn,pp=function(e,t){if(lp&&"string"==typeof e&&!op.prepareStackTrace)for(;t--;)e=sp(e,cp,"");return e},gp=hp,vp=Error.captureStackTrace,mp=yu,yp=ht("iterator"),bp=Array.prototype,wp=function(e){return void 0!==e&&(mp.Array===e||bp[yp]===e)},Sp=ur,Tp=Oe,Ep=q,xp=yu,kp=ht("iterator"),Ap=function(e){if(!Ep(e))return Tp(e,kp)||Tp(e,"@@iterator")||xp[Sp(e)]},Mp=N,Ip=Pe,Cp=nn,Rp=Me,Pp=Ap,Np=TypeError,jp=function(e,t){var n=arguments.length<2?Pp(e):t;if(Ip(n))return Cp(Mp(n,e));throw Np(Rp(e)+" is not iterable")},Op=N,_p=nn,Lp=Oe,Dp=function(e,t,n){var r,i;_p(e);try{if(!(r=Lp(e,"return"))){if("throw"===t)throw n;return n}r=Op(r,e)}catch(v_){i=!0,r=v_}if("throw"===t)throw n;if(i)throw r;return _p(r),n},Up=$t,Fp=N,Kp=nn,Bp=Me,Hp=wp,Vp=Wn,zp=se,qp=jp,Gp=Ap,Wp=Dp,Xp=TypeError,Yp=function(e,t){this.stopped=e,this.result=t},$p=Yp.prototype,Jp=function(e,t,n){var r,i,a,o,s,u,c,l=n&&n.that,f=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),d=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),g=Up(t,l),v=function(e){return r&&Wp(r,"normal",e),new Yp(!0,e)},m=function(e){return f?(Kp(e),p?g(e[0],e[1],v):g(e[0],e[1])):p?g(e,v):g(e)};if(h)r=e.iterator;else if(d)r=e;else{if(!(i=Gp(e)))throw Xp(Bp(e)+" is not iterable");if(Hp(i)){for(a=0,o=Vp(e);o>a;a++)if((s=m(e[a]))&&zp($p,s))return s;return new Yp(!1)}r=qp(e,i)}for(u=h?e.next:r.next;!(c=Fp(u,r)).done;){try{s=m(c.value)}catch(v_){Wp(r,"throw",v_)}if("object"==typeof s&&s&&zp($p,s))return s}return new Yp(!1)},Qp=ei,Zp=Cn,eg=se,tg=ju,ng=ac,rg=function(e,t,n){for(var r=tp(t),i=rp.f,a=np.f,o=0;o<r.length;o++){var s=r[o];ep(e,s)||n&&ep(n,s)||i(e,s,a(t,s))}},ig=Gi,ag=mn,og=F,sg=function(e,t){ip(t)&&"cause"in t&&ap(e,"cause",t.cause)},ug=function(e,t,n,r){gp&&(vp?vp(e,t):dp(e,"stack",pp(n,r)))},cg=Jp,lg=function(e,t){return void 0===e?arguments.length<2?"":t:Qp(e)},fg=ht("toStringTag"),hg=Error,dg=[].push,pg=function(e,t){var n,r=eg(gg,this);ng?n=ng(hg(),r?tg(this):gg):(n=r?this:ig(gg),ag(n,fg,"Error")),void 0!==t&&ag(n,"message",lg(t)),ug(n,pg,n.stack,1),arguments.length>2&&sg(n,arguments[2]);var i=[];return cg(e,dg,{that:i}),ag(n,"errors",i),n};ng?ng(pg,hg):rg(pg,hg,{name:!0});var gg=pg.prototype=ig(hg.prototype,{constructor:og(1,pg),message:og(1,""),name:og(1,"AggregateError")});Zp({global:!0,constructor:!0,arity:2},{AggregateError:pg});var vg,mg,yg,bg,wg="undefined"!=typeof process&&"process"==w(process),Sg=oe,Tg=ha,Eg=C,xg=ht("species"),kg=function(e){var t=Sg(e);Eg&&t&&!t[xg]&&Tg(t,xg,{configurable:!0,get:function(){return this}})},Ag=se,Mg=TypeError,Ig=function(e,t){if(Ag(t,e))return e;throw Mg("Incorrect invocation")},Cg=nn,Rg=hf,Pg=q,Ng=ht("species"),jg=function(e,t){var n,r=Cg(e).constructor;return void 0===r||Pg(n=Cg(r)[Ng])?t:Rg(n)},Og=TypeError,_g=function(e,t){if(e<t)throw Og("Not enough arguments");return e},Lg=/(?:ipad|iphone|ipod).*applewebkit/i.test(ue),Dg=i,Ug=f,Fg=$t,Kg=M,Bg=Qe,Hg=a,Vg=Ci,zg=Ns,qg=At,Gg=_g,Wg=Lg,Xg=wg,Yg=Dg.setImmediate,$g=Dg.clearImmediate,Jg=Dg.process,Qg=Dg.Dispatch,Zg=Dg.Function,ev=Dg.MessageChannel,tv=Dg.String,nv=0,rv={},iv="onreadystatechange";Hg((function(){vg=Dg.location}));var av=function(e){if(Bg(rv,e)){var t=rv[e];delete rv[e],t()}},ov=function(e){return function(){av(e)}},sv=function(e){av(e.data)},uv=function(e){Dg.postMessage(tv(e),vg.protocol+"//"+vg.host)};Yg&&$g||(Yg=function(e){Gg(arguments.length,1);var t=Kg(e)?e:Zg(e),n=zg(arguments,1);return rv[++nv]=function(){Ug(t,void 0,n)},mg(nv),nv},$g=function(e){delete rv[e]},Xg?mg=function(e){Jg.nextTick(ov(e))}:Qg&&Qg.now?mg=function(e){Qg.now(ov(e))}:ev&&!Wg?(bg=(yg=new ev).port2,yg.port1.onmessage=sv,mg=Fg(bg.postMessage,bg)):Dg.addEventListener&&Kg(Dg.postMessage)&&!Dg.importScripts&&vg&&"file:"!==vg.protocol&&!Hg(uv)?(mg=uv,Dg.addEventListener("message",sv,!1)):mg=iv in qg("script")?function(e){Vg.appendChild(qg("script"))[iv]=function(){Vg.removeChild(this),av(e)}}:function(e){setTimeout(ov(e),0)});var cv={set:Yg,clear:$g},lv=function(){this.head=null,this.tail=null};lv.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 fv,hv,dv,pv,gv,vv=lv,mv=/ipad|iphone|ipod/i.test(ue)&&"undefined"!=typeof Pebble,yv=/web0s(?!.*chrome)/i.test(ue),bv=i,wv=$t,Sv=I.f,Tv=cv.set,Ev=vv,xv=Lg,kv=mv,Av=yv,Mv=wg,Iv=bv.MutationObserver||bv.WebKitMutationObserver,Cv=bv.document,Rv=bv.process,Pv=bv.Promise,Nv=Sv(bv,"queueMicrotask"),jv=Nv&&Nv.value;if(!jv){var Ov=new Ev,_v=function(){var e,t;for(Mv&&(e=Rv.domain)&&e.exit();t=Ov.get();)try{t()}catch(v_){throw Ov.head&&fv(),v_}e&&e.enter()};xv||Mv||Av||!Iv||!Cv?!kv&&Pv&&Pv.resolve?((pv=Pv.resolve(void 0)).constructor=Pv,gv=wv(pv.then,pv),fv=function(){gv(_v)}):Mv?fv=function(){Rv.nextTick(_v)}:(Tv=wv(Tv,bv),fv=function(){Tv(_v)}):(hv=!0,dv=Cv.createTextNode(""),new Iv(_v).observe(dv,{characterData:!0}),fv=function(){dv.data=hv=!hv}),jv=function(e){Ov.head||fv(),Ov.add(e)}}var Lv=jv,Dv=function(e){try{return{error:!1,value:e()}}catch(v_){return{error:!0,value:v_}}},Uv=i.Promise,Fv="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Kv=!Fv&&!wg&&"object"==typeof window&&"object"==typeof document,Bv=i,Hv=Uv,Vv=M,zv=Gt,qv=hr,Gv=ht,Wv=Kv,Xv=Fv,Yv=ge,$v=Hv&&Hv.prototype,Jv=Gv("species"),Qv=!1,Zv=Vv(Bv.PromiseRejectionEvent),em={CONSTRUCTOR:zv("Promise",(function(){var e=qv(Hv),t=e!==String(Hv);if(!t&&66===Yv)return!0;if(!$v.catch||!$v.finally)return!0;if(!Yv||Yv<51||!/native code/.test(e)){var n=new Hv((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[Jv]=r,!(Qv=n.then((function(){}))instanceof r))return!0}return!t&&(Wv||Xv)&&!Zv})),REJECTION_EVENT:Zv,SUBCLASSING:Qv},tm={},nm=Pe,rm=TypeError,im=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw rm("Bad Promise constructor");t=e,n=r})),this.resolve=nm(t),this.reject=nm(n)};tm.f=function(e){return new im(e)};var am,om,sm=Cn,um=wg,cm=i,lm=N,fm=la,hm=La,dm=kg,pm=Pe,gm=M,vm=ee,mm=Ig,ym=jg,bm=cv.set,wm=Lv,Sm=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(v_){}},Tm=Dv,Em=vv,xm=Za,km=Uv,Am=em,Mm=tm,Im="Promise",Cm=Am.CONSTRUCTOR,Rm=Am.REJECTION_EVENT,Pm=xm.getterFor(Im),Nm=xm.set,jm=km&&km.prototype,Om=km,_m=jm,Lm=cm.TypeError,Dm=cm.document,Um=cm.process,Fm=Mm.f,Km=Fm,Bm=!!(Dm&&Dm.createEvent&&cm.dispatchEvent),Hm="unhandledrejection",Vm=function(e){var t;return!(!vm(e)||!gm(t=e.then))&&t},zm=function(e,t){var n,r,i,a=t.value,o=1==t.state,s=o?e.ok:e.fail,u=e.resolve,c=e.reject,l=e.domain;try{s?(o||(2===t.rejection&&Ym(t),t.rejection=1),!0===s?n=a:(l&&l.enter(),n=s(a),l&&(l.exit(),i=!0)),n===e.promise?c(Lm("Promise-chain cycle")):(r=Vm(n))?lm(r,n,u,c):u(n)):c(a)}catch(v_){l&&!i&&l.exit(),c(v_)}},qm=function(e,t){e.notified||(e.notified=!0,wm((function(){for(var n,r=e.reactions;n=r.get();)zm(n,e);e.notified=!1,t&&!e.rejection&&Wm(e)})))},Gm=function(e,t,n){var r,i;Bm?((r=Dm.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),cm.dispatchEvent(r)):r={promise:t,reason:n},!Rm&&(i=cm["on"+e])?i(r):e===Hm&&Sm("Unhandled promise rejection",n)},Wm=function(e){lm(bm,cm,(function(){var t,n=e.facade,r=e.value;if(Xm(e)&&(t=Tm((function(){um?Um.emit("unhandledRejection",r,n):Gm(Hm,n,r)})),e.rejection=um||Xm(e)?2:1,t.error))throw t.value}))},Xm=function(e){return 1!==e.rejection&&!e.parent},Ym=function(e){lm(bm,cm,(function(){var t=e.facade;um?Um.emit("rejectionHandled",t):Gm("rejectionhandled",t,e.value)}))},$m=function(e,t,n){return function(r){e(t,r,n)}},Jm=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,qm(e,!0))},Qm=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw Lm("Promise can't be resolved itself");var r=Vm(t);r?wm((function(){var n={done:!1};try{lm(r,t,$m(Qm,n,e),$m(Jm,n,e))}catch(v_){Jm(n,v_,e)}})):(e.value=t,e.state=1,qm(e,!1))}catch(v_){Jm({done:!1},v_,e)}}};Cm&&(_m=(Om=function(e){mm(this,_m),pm(e),lm(am,this);var t=Pm(this);try{e($m(Qm,t),$m(Jm,t))}catch(v_){Jm(t,v_)}}).prototype,(am=function(e){Nm(this,{type:Im,done:!1,notified:!1,parent:!1,reactions:new Em,rejection:!1,state:0,value:void 0})}).prototype=fm(_m,"then",(function(e,t){var n=Pm(this),r=Fm(ym(this,Om));return n.parent=!0,r.ok=!gm(e)||e,r.fail=gm(t)&&t,r.domain=um?Um.domain:void 0,0==n.state?n.reactions.add(r):wm((function(){zm(r,n)})),r.promise})),om=function(){var e=new am,t=Pm(e);this.promise=e,this.resolve=$m(Qm,t),this.reject=$m(Jm,t)},Mm.f=Fm=function(e){return e===Om||undefined===e?new om(e):Km(e)}),sm({global:!0,constructor:!0,wrap:!0,forced:Cm},{Promise:Om}),hm(Om,Im,!1,!0),dm(Im);var Zm=ht("iterator"),ey=!1;try{var ty=0,ny={next:function(){return{done:!!ty++}},return:function(){ey=!0}};ny[Zm]=function(){return this},Array.from(ny,(function(){throw 2}))}catch(v_){}var ry=function(e,t){if(!t&&!ey)return!1;var n=!1;try{var r={};r[Zm]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(v_){}return n},iy=Uv,ay=em.CONSTRUCTOR||!ry((function(e){iy.all(e).then(void 0,(function(){}))})),oy=N,sy=Pe,uy=tm,cy=Dv,ly=Jp;Cn({target:"Promise",stat:!0,forced:ay},{all:function(e){var t=this,n=uy.f(t),r=n.resolve,i=n.reject,a=cy((function(){var n=sy(t.resolve),a=[],o=0,s=1;ly(e,(function(e){var u=o++,c=!1;s++,oy(n,t,e).then((function(e){c||(c=!0,a[u]=e,--s||r(a))}),i)})),--s||r(a)}));return a.error&&i(a.value),n.promise}});var fy=Cn,hy=em.CONSTRUCTOR;Uv&&Uv.prototype,fy({target:"Promise",proto:!0,forced:hy,real:!0},{catch:function(e){return this.then(void 0,e)}});var dy=N,py=Pe,gy=tm,vy=Dv,my=Jp;Cn({target:"Promise",stat:!0,forced:ay},{race:function(e){var t=this,n=gy.f(t),r=n.reject,i=vy((function(){var i=py(t.resolve);my(e,(function(e){dy(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var yy=N,by=tm;Cn({target:"Promise",stat:!0,forced:em.CONSTRUCTOR},{reject:function(e){var t=by.f(this);return yy(t.reject,void 0,e),t.promise}});var wy=nn,Sy=ee,Ty=tm,Ey=function(e,t){if(wy(e),Sy(t)&&t.constructor===e)return t;var n=Ty.f(e);return(0,n.resolve)(t),n.promise},xy=Cn,ky=Uv,Ay=em.CONSTRUCTOR,My=Ey,Iy=oe("Promise"),Cy=!Ay;xy({target:"Promise",stat:!0,forced:true},{resolve:function(e){return My(Cy&&this===Iy?ky:this,e)}});var Ry=N,Py=Pe,Ny=tm,jy=Dv,Oy=Jp;Cn({target:"Promise",stat:!0,forced:ay},{allSettled:function(e){var t=this,n=Ny.f(t),r=n.resolve,i=n.reject,a=jy((function(){var n=Py(t.resolve),i=[],a=0,o=1;Oy(e,(function(e){var s=a++,u=!1;o++,Ry(n,t,e).then((function(e){u||(u=!0,i[s]={status:"fulfilled",value:e},--o||r(i))}),(function(e){u||(u=!0,i[s]={status:"rejected",reason:e},--o||r(i))}))})),--o||r(i)}));return a.error&&i(a.value),n.promise}});var _y=N,Ly=Pe,Dy=oe,Uy=tm,Fy=Dv,Ky=Jp,By="No one promise resolved";Cn({target:"Promise",stat:!0,forced:ay},{any:function(e){var t=this,n=Dy("AggregateError"),r=Uy.f(t),i=r.resolve,a=r.reject,o=Fy((function(){var r=Ly(t.resolve),o=[],s=0,u=1,c=!1;Ky(e,(function(e){var l=s++,f=!1;u++,_y(r,t,e).then((function(e){f||c||(c=!0,i(e))}),(function(e){f||c||(f=!0,o[l]=e,--u||a(new n(o,By)))}))})),--u||a(new n(o,By))}));return o.error&&a(o.value),r.promise}});var Hy=Cn,Vy=Uv,zy=a,qy=oe,Gy=M,Wy=jg,Xy=Ey,Yy=Vy&&Vy.prototype;Hy({target:"Promise",proto:!0,real:!0,forced:!!Vy&&zy((function(){Yy.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Wy(this,qy("Promise")),n=Gy(e);return this.then(n?function(n){return Xy(t,e()).then((function(){return n}))}:e,n?function(n){return Xy(t,e()).then((function(){throw n}))}:e)}});var $y=te.Promise,Jy=tm,Qy=Dv;Cn({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=Jy.f(this),n=Qy(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}});var Zy=t($y),eb="\t\n\v\f\r \u2028\u2029\ufeff",tb=X,nb=ei,rb=eb,ib=v("".replace),ab=RegExp("^["+rb+"]+"),ob=RegExp("(^|[^"+rb+"])["+rb+"]+$"),sb=function(e){return function(t){var n=nb(tb(t));return 1&e&&(n=ib(n,ab,"")),2&e&&(n=ib(n,ob,"$1")),n}},ub={start:sb(1),end:sb(2),trim:sb(3)},cb=i,lb=a,fb=v,hb=ei,db=ub.trim,pb=eb,gb=cb.parseInt,vb=cb.Symbol,mb=vb&&vb.iterator,yb=/^[+-]?0x/i,bb=fb(yb.exec),wb=8!==gb(pb+"08")||22!==gb(pb+"0x16")||mb&&!lb((function(){gb(Object(mb))}))?function(e,t){var n=db(hb(e));return gb(n,t>>>0||(bb(yb,n)?16:10))}:gb;Cn({global:!0,forced:parseInt!=wb},{parseInt:wb});var Sb=t(te.parseInt),Tb=so.map;Cn({target:"Array",proto:!0,forced:!Dr("map")},{map:function(e){return Tb(this,e,arguments.length>1?arguments[1]:void 0)}});var Eb=ef("Array").map,xb=se,kb=Eb,Ab=Array.prototype,Mb=t((function(e){var t=e.map;return e===Ab||xb(Ab,e)&&t===Ab.map?kb:t}));Cn({target:"Array",stat:!0},{isArray:Un});var Ib=t(te.Array.isArray),Cb=ef("Array").keys,Rb=ur,Pb=Qe,Nb=se,jb=Cb,Ob=Array.prototype,_b={DOMTokenList:!0,NodeList:!0},Lb=t((function(e){var t=e.keys;return e===Ob||Nb(Ob,e)&&t===Ob.keys||Pb(_b,Rb(e))?jb:t})),Db=so.filter;Cn({target:"Array",proto:!0,forced:!Dr("filter")},{filter:function(e){return Db(this,e,arguments.length>1?arguments[1]:void 0)}});var Ub=ef("Array").filter,Fb=se,Kb=Ub,Bb=Array.prototype,Hb=t((function(e){var t=e.filter;return e===Bb||Fb(Bb,e)&&t===Bb.filter?Kb:t})),Vb=C,zb=v,qb=N,Gb=a,Wb=Si,Xb=ua,Yb=j,$b=Ye,Jb=z,Qb=Object.assign,Zb=Object.defineProperty,ew=zb([].concat),tw=!Qb||Gb((function(){if(Vb&&1!==Qb({b:1},Qb(Zb({},"a",{enumerable:!0,get:function(){Zb(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!=Qb({},e)[n]||Wb(Qb({},t)).join("")!=r}))?function(e,t){for(var n=$b(e),r=arguments.length,i=1,a=Xb.f,o=Yb.f;r>i;)for(var s,u=Jb(arguments[i++]),c=a?ew(Wb(u),a(u)):Wb(u),l=c.length,f=0;l>f;)s=c[f++],Vb&&!qb(o,u,s)||(n[s]=u[s]);return n}:Qb,nw=tw;Cn({target:"Object",stat:!0,arity:2,forced:Object.assign!==nw},{assign:nw});var rw=t(te.Object.assign),iw=t(te.Object.getOwnPropertySymbols),aw={exports:{}},ow=Cn,sw=a,uw=J,cw=I.f,lw=C;ow({target:"Object",stat:!0,forced:!lw||sw((function(){cw(1)})),sham:!lw},{getOwnPropertyDescriptor:function(e,t){return cw(uw(e),t)}});var fw=te.Object,hw=aw.exports=function(e,t){return fw.getOwnPropertyDescriptor(e,t)};fw.getOwnPropertyDescriptor.sham&&(hw.sham=!0);var dw=t(aw.exports),pw=Zd,gw=J,vw=I,mw=Zn;Cn({target:"Object",stat:!0,sham:!C},{getOwnPropertyDescriptors:function(e){for(var t,n,r=gw(e),i=vw.f,a=pw(r),o={},s=0;a.length>s;)void 0!==(n=i(r,t=a[s++]))&&mw(o,t,n);return o}});var yw=t(te.Object.getOwnPropertyDescriptors),bw={exports:{}},ww=Cn,Sw=C,Tw=ti.f;ww({target:"Object",stat:!0,forced:Object.defineProperties!==Tw,sham:!Sw},{defineProperties:Tw});var Ew=te.Object,xw=bw.exports=function(e,t){return Ew.defineProperties(e,t)};Ew.defineProperties.sham&&(xw.sham=!0);var kw=t(bw.exports),Aw=t(_n),Mw=t(cl),Iw=t(Il),Cw=t(Dl),Rw=t(Fl),Pw=t(of),Nw=t(Pf),jw=t(Ap),Ow=nn,_w=Dp,Lw=$t,Dw=N,Uw=Ye,Fw=function(e,t,n,r){try{return r?t(Ow(n)[0],n[1]):t(n)}catch(v_){_w(e,"throw",v_)}},Kw=wp,Bw=Ar,Hw=Wn,Vw=Zn,zw=jp,qw=Ap,Gw=Array,Ww=function(e){var t=Uw(e),n=Bw(this),r=arguments.length,i=r>1?arguments[1]:void 0,a=void 0!==i;a&&(i=Lw(i,r>2?arguments[2]:void 0));var o,s,u,c,l,f,h=qw(t),d=0;if(!h||this===Gw&&Kw(h))for(o=Hw(t),s=n?new this(o):Gw(o);o>d;d++)f=a?i(t[d],d):t[d],Vw(s,d,f);else for(l=(c=zw(t,h)).next,s=n?new this:[];!(u=Dw(l,c)).done;d++)f=a?Fw(c,i,[u.value,d],!0):u.value,Vw(s,d,f);return s.length=d,s},Xw=Ww;Cn({target:"Array",stat:!0,forced:!ry((function(e){Array.from(e)}))},{from:Xw});var Yw=t(te.Array.from),$w=t(Pl);function Jw(e,t){var n=ad(e);if(iw){var r=iw(e);t&&(r=Hb(r).call(r,(function(t){return dw(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qw(e){for(var t=1;t<arguments.length;t++){var n,r,i=null!=arguments[t]?arguments[t]:{};t%2?Gf(n=Jw(Object(i),!0)).call(n,(function(t){rS(e,t,i[t])})):yw?kw(e,yw(i)):Gf(r=Jw(Object(i))).call(r,(function(t){Aw(e,t,dw(i,t))}))}return e}function Zw(e){return(Zw="function"==typeof Mw&&"symbol"==typeof Iw?function(e){return typeof e}:function(e){return e&&"function"==typeof Mw&&e.constructor===Mw&&e!==Mw.prototype?"symbol":typeof e})(e)}function eS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tS(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),Aw(e,oS(r.key),r)}}function nS(e,t,n){return t&&tS(e.prototype,t),n&&tS(e,n),Aw(e,"prototype",{writable:!1}),e}function rS(e,t,n){return(t=oS(t))in e?Aw(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iS(e){return function(e){if(Ib(e))return aS(e)}(e)||function(e){if(void 0!==Mw&&null!=jw(e)||null!=e["@@iterator"])return Yw(e)}(e)||function(e,t){var n;if(!e)return;if("string"==typeof e)return aS(e,t);var r=xd(n=Object.prototype.toString.call(e)).call(n,8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Yw(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return aS(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function aS(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}function oS(e){var t=function(e,t){if("object"!==Rl(e)||null===e)return e;var n=e[$w];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Rl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Rl(t)?t:String(t)}var sS=so.some;Cn({target:"Array",proto:!0,forced:!Lf("some")},{some:function(e){return sS(this,e,arguments.length>1?arguments[1]:void 0)}});var uS=ef("Array").some,cS=se,lS=uS,fS=Array.prototype,hS=t((function(e){var t=e.some;return e===fS||cS(fS,e)&&t===fS.some?lS:t})),dS=Hn,pS=ei,gS=X,vS=RangeError,mS=v,yS=qn,bS=ei,wS=X,SS=mS((function(e){var t=pS(gS(this)),n="",r=dS(e);if(r<0||r==1/0)throw vS("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n})),TS=mS("".slice),ES=Math.ceil,xS=function(e){return function(t,n,r){var i,a,o=bS(wS(t)),s=yS(n),u=o.length,c=void 0===r?" ":bS(r);return s<=u||""==c?o:((a=SS(c,ES((i=s-u)/c.length))).length>i&&(a=TS(a,0,i)),e?o+a:a+o)}},kS={start:xS(!1),end:xS(!0)},AS=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(ue),MS=kS.start;Cn({target:"String",proto:!0,forced:AS},{padStart:function(e){return MS(this,e,arguments.length>1?arguments[1]:void 0)}});var IS,CS=ef("String").padStart,RS=se,PS=CS,NS=String.prototype,jS=t((function(e){var t=e.padStart;return"string"==typeof e||e===NS||RS(NS,e)&&t===NS.padStart?PS:t})),OS="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,_S=i,LS=f,DS=M,US=OS,FS=ue,KS=Ns,BS=_g,HS=_S.Function,VS=/MSIE .\./.test(FS)||US&&((IS=_S.Bun.version.split(".")).length<3||0==IS[0]&&(IS[1]<3||3==IS[1]&&0==IS[2])),zS=function(e,t){var n=t?2:1;return VS?function(r,i){var a=BS(arguments.length,1)>n,o=DS(r)?r:HS(r),s=a?KS(arguments,n):[],u=a?function(){LS(o,this,s)}:o;return t?e(u,i):e(u)}:e},qS=Cn,GS=i,WS=zS(GS.setInterval,!0);qS({global:!0,bind:!0,forced:GS.setInterval!==WS},{setInterval:WS});var XS=Cn,YS=i,$S=zS(YS.setTimeout,!0);XS({global:!0,bind:!0,forced:YS.setTimeout!==$S},{setTimeout:$S});var JS=t(te.setInterval),QS=t(te.setTimeout),ZS=so.every;Cn({target:"Array",proto:!0,forced:!Lf("every")},{every:function(e){return ZS(this,e,arguments.length>1?arguments[1]:void 0)}});var eT=ef("Array").every,tT=se,nT=eT,rT=Array.prototype,iT=t((function(e){var t=e.every;return e===rT||tT(rT,e)&&t===rT.every?nT:t})),aT=i,oT=a,sT=ei,uT=ub.trim,cT=eb,lT=v("".charAt),fT=aT.parseFloat,hT=aT.Symbol,dT=hT&&hT.iterator,pT=1/fT(cT+"-0")!=-1/0||dT&&!oT((function(){fT(Object(dT))}))?function(e){var t=uT(sT(e)),n=fT(t);return 0===n&&"-"==lT(t,0)?-0:n}:fT;Cn({global:!0,forced:parseFloat!=pT},{parseFloat:pT});var gT=t(te.parseFloat),vT=xu.PROPER,mT=a,yT=eb,bT=ub.trim;Cn({target:"String",proto:!0,forced:function(e){return mT((function(){return!!yT[e]()||"
"!=="
"[e]()||vT&&yT[e].name!==e}))}("trim")},{trim:function(){return bT(this)}});var wT=ef("String").trim,ST=se,TT=wT,ET=String.prototype,xT=t((function(e){var t=e.trim;return"string"==typeof e||e===ET||ST(ET,e)&&t===ET.trim?TT:t})),kT=Cn,AT=Date,MT=v(AT.prototype.getTime);kT({target:"Date",stat:!0},{now:function(){return MT(new AT)}});var IT,CT=t(te.Date.now),RT="undefined"!=typeof window&&window.location&&Hh(IT=window.location.href).call(IT,"xgplayerdebugger=1")>-1,PT="color: #525252; background-color: #90ee90;",NT="color: #525252; background-color: red;",jT="color: #525252; background-color: yellow; ",OT="%c[xgplayer]",_T={config:{debug:RT?3:0},logInfo:function(e){for(var t,n,r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];this.config.debug>=3&&(n=console).log.apply(n,nd(t=[OT,PT,e]).call(t,i))},logWarn:function(e){for(var t,n,r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];this.config.debug>=1&&(n=console).warn.apply(n,nd(t=[OT,jT,e]).call(t,i))},logError:function(e){var t,n;if(!(this.config.debug<1)){for(var r=this.config.debug>=2?"trace":"error",i=arguments.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];(n=console)[r].apply(n,nd(t=[OT,NT,e]).call(t,a))}}},LT=function(){function e(t){eS(this,e),this.bufferedList=t}return nS(e,[{key:"start",value:function(e){return this.bufferedList[e].start}},{key:"end",value:function(e){return this.bufferedList[e].end}},{key:"length",get:function(){return this.bufferedList.length}}]),e}(),DT={};DT.createDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",a=document.createElement(t);return a.className=i,a.innerHTML=n,Gf(e=ad(r)).call(e,(function(e){var n=e,i=r[e];"video"===t||"audio"===t||"live-video"===t?i&&a.setAttribute(n,i):a.setAttribute(n,i)})),a},DT.createDomFromHtml=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";try{var r=document.createElement("div");r.innerHTML=e;var i=r.children;if(r=null,i.length>0){var a;if(i=i[0],n&&DT.addClass(i,n),t)Gf(a=ad(t)).call(a,(function(e){i.setAttribute(e,t[e])}));return i}return null}catch(o){return _T.logError("util.createDomFromHtml",o),null}},DT.hasClass=function(e,t){if(!e||!t)return!1;try{return hS(Array.prototype).call(e.classList,(function(e){return e===t}))}catch(r){var n=e.className&&"object"===Zw(e.className)?e.getAttribute("class"):e.className;return n&&!!n.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}},DT.addClass=function(e,t){if(e&&t)try{var n;Gf(n=t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(n,(function(t){t&&e.classList.add(t)}))}catch(r){DT.hasClass(e,t)||(e.className&&"object"===Zw(e.className)?e.setAttribute("class",e.getAttribute("class")+" "+t):e.className+=" "+t)}},DT.removeClass=function(e,t){if(e&&t)try{var n;Gf(n=t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(n,(function(t){t&&e.classList.remove(t)}))}catch(i){var r;if(DT.hasClass(e,t))Gf(r=t.split(/\s+/g)).call(r,(function(t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className&&"object"===Zw(e.className)?e.setAttribute("class",e.getAttribute("class").replace(n," ")):e.className=e.className.replace(n," ")}))}},DT.toggleClass=function(e,t){var n;e&&Gf(n=t.split(/\s+/g)).call(n,(function(t){DT.hasClass(e,t)?DT.removeClass(e,t):DT.addClass(e,t)}))},DT.classNames=function(){for(var e=arguments,t=[],n=function(n){if("String"===DT.typeOf(e[n]))t.push(e[n]);else if("Object"===DT.typeOf(e[n])){var r;Mb(r=ad(e[n])).call(r,(function(r){e[n][r]&&t.push(r)}))}},r=0;r<arguments.length;r++)n(r);return t.join(" ")},DT.findDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1?arguments[1]:void 0;try{e=t.querySelector(n)}catch(r){_T.logError("util.findDom",r),0===Hh(n).call(n,"#")&&(e=t.getElementById(xd(n).call(n,1)))}return e},DT.getCss=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,!1)[t]},DT.padStart=function(e,t,n){for(var r=String(n),i=t>>0,a=Math.ceil(i/r.length),o=[],s=String(e);a--;)o.push(r);return o.join("").substring(0,i-s.length)+s},DT.format=function(e){if(window.isNaN(e))return"";e=Math.round(e);var t=jS(DT).call(DT,Math.floor(e/3600),2,0),n=jS(DT).call(DT,Math.floor((e-3600*t)/60),2,0),r=jS(DT).call(DT,Math.floor(e-3600*t-60*n),2,0);return("00"===t?[n,r]:[t,n,r]).join(":")},DT.event=function(e){if(e.touches){var t=e.touches[0]||e.changedTouches[0];e.clientX=t.clientX||0,e.clientY=t.clientY||0,e.offsetX=t.pageX-t.target.offsetLeft,e.offsetY=t.pageY-t.target.offsetTop}e._target=e.target||e.srcElement},DT.typeOf=function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},DT.deepCopy=function(e,t){var n;if("Object"===DT.typeOf(t)&&"Object"===DT.typeOf(e))return Gf(n=ad(t)).call(n,(function(n){if("Object"!==DT.typeOf(t[n])||t[n]instanceof Node)if("Array"===DT.typeOf(t[n])){var r;e[n]="Array"===DT.typeOf(e[n])?nd(r=e[n]).call(r,t[n]):t[n]}else e[n]=t[n];else void 0===e[n]||void 0===e[n]?e[n]=t[n]:DT.deepCopy(e[n],t[n])})),e},DT.deepMerge=function(e,t){var n;return Mb(n=ad(t)).call(n,(function(n){var r;"Array"===DT.typeOf(t[n])&&"Array"===DT.typeOf(e[n])?"Array"===DT.typeOf(e[n])&&(r=e[n]).push.apply(r,iS(t[n])):DT.typeOf(e[n])!==DT.typeOf(t[n])||null===e[n]||"Object"!==DT.typeOf(e[n])||t[n]instanceof window.Node?null!==t[n]&&(e[n]=t[n]):DT.deepMerge(e[n],t[n])})),e},DT.getBgImage=function(e){var t=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;if(!t||"none"===t)return"";var n=document.createElement("a");return n.href=t.replace(/url\("|"\)/g,""),n.href},DT.copyDom=function(e){if(e&&1===e.nodeType){var t=document.createElement(e.tagName);return Gf(Array.prototype).call(e.attributes,(function(e){t.setAttribute(e.name,e.value)})),e.innerHTML&&(t.innerHTML=e.innerHTML),t}return""},DT.setInterval=function(e,t,n,r){e._interval[t]||(e._interval[t]=JS(Pw(n).call(n,e),r))},DT.clearInterval=function(e,t){clearInterval(e._interval[t]),e._interval[t]=null},DT.setTimeout=function(e,t,n){e._timers||(e._timers=[]);var r=QS((function(){t(),DT.clearTimeout(e,r)}),n);return e._timers.push(r),r},DT.clearTimeout=function(e,t){var n=e._timers;if("Array"===DT.typeOf(n)){for(var r=0;r<n.length;r++)if(n[r]===t){Wd(n).call(n,r,1),clearTimeout(t);break}}else clearTimeout(t)},DT.clearAllTimers=function(e){var t=e._timers;"Array"===DT.typeOf(t)&&(Mb(t).call(t,(function(e){clearTimeout(e)})),e._timerIds=[])},DT.createImgBtn=function(e,t,n,r){var i,a,o,s,u,c,l,f,h,d,p,g,v=DT.createDom("xg-".concat(e),"",{},"xgplayer-".concat(e,"-img"));(v.style.backgroundImage='url("'.concat(t,'")'),n&&r)&&(iT(i=["px","rem","em","pt","dp","vw","vh","vm","%"]).call(i,(function(e){var t,i;return!(Hh(n).call(n,e)>-1&&Hh(r).call(r,e)>-1)||(l=gT(xT(t=xd(n).call(n,0,Hh(n).call(n,e))).call(t)),f=gT(xT(i=xd(r).call(r,0,Hh(r).call(r,e))).call(i)),h=e,!1)})),v.style.width=nd(a="".concat(l)).call(a,h),v.style.height=nd(o="".concat(f)).call(o,h),v.style.backgroundSize=nd(s=nd(u=nd(c="".concat(l)).call(c,h," ")).call(u,f)).call(s,h),v.style.margin="start"===e?nd(d=nd(p=nd(g="-".concat(f/2)).call(g,h," auto auto -")).call(p,l/2)).call(d,h):"auto 5px auto 5px");return v},DT.Hex2RGBA=function(e,t){var n,r=[];if(/^\#[0-9A-F]{3}$/i.test(e)){var i="#";e.replace(/[0-9A-F]/gi,(function(e){i+=e+e})),e=i}return/^#[0-9A-F]{6}$/i.test(e)?(e.replace(/[0-9A-F]{2}/gi,(function(e){r.push(Sb(e,16))})),nd(n="rgba(".concat(r.join(","),", ")).call(n,t,")")):"rgba(255, 255, 255, 0.1)"},DT.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},DT.checkIsFunction=function(e){return e&&"function"==typeof e},DT.checkIsObject=function(e){return null!==e&&"object"===Zw(e)},DT.hide=function(e){e.style.display="none"},DT.show=function(e,t){e.style.display=t||"block"},DT.isUndefined=function(e){if(null==e)return!0},DT.isNotNull=function(e){return!(null==e)},DT.setStyleFromCsstext=function(e,t){if(t)if("String"===DT.typeOf(t)){var n=t.replace(/\s+/g,"").split(";");Mb(n).call(n,(function(t){if(t){var n=t.split(":");n.length>1&&(e.style[n[0]]=n[1])}}))}else{var r;Mb(r=ad(t)).call(r,(function(n){e.style[n]=t[n]}))}},DT.filterStyleFromText=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["width","height","top","left","bottom","right","position","z-index","padding","margin","transform"],r=e.style.cssText;if(!r)return{};var i=r.replace(/\s+/g,"").split(";"),a={},o={};return Mb(i).call(i,(function(e){if(e){var t=e.split(":");t.length>1&&(!function(e,t){for(var n=0,r=t.length;n<r;n++)if(Hh(e).call(e,t[n])>-1)return!0;return!1}(t[0],n)?o[t[0]]=t[1]:a[t[0]]=t[1])}})),e.setAttribute("style",""),Mb(t=ad(o)).call(t,(function(t){e.style[t]=o[t]})),a},DT.getStyleFromCsstext=function(e){var t=e.style.cssText;if(!t)return{};var n=t.replace(/\s+/g,"").split(";"),r={};return Mb(n).call(n,(function(e){if(e){var t=e.split(":");t.length>1&&(r[t[0]]=t[1])}})),r},DT.preloadImg=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(e){var r=new window.Image;r.onload=function(e){r=null,t&&t(e)},r.onerror=function(e){r=null,n&&n(e)},r.src=e}},DT.stopPropagation=function(e){e&&e.stopPropagation()},DT.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},DT.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},DT.checkTouchSupport=function(){return"ontouchstart"in window},DT.getBuffered2=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,n=[],r=0;r<e.length;r++)n.push({start:e.start(r)<.5?0:e.start(r),end:e.end(r)});Nh(n).call(n,(function(e,t){var n=e.start-t.start;return n||t.end-e.end}));var i=[];if(t)for(var a=0;a<n.length;a++){var o=i.length;if(o){var s=i[o-1].end;n[a].start-s<t?n[a].end>s&&(i[o-1].end=n[a].end):i.push(n[a])}else i.push(n[a])}else i=n;return new LT(i)},DT.getEventPos=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.touches&&e.touches.length>0&&(e=e.touches[0]),{x:e.x/t,y:e.y/t,clientX:e.clientX/t,clientY:e.clientY/t,offsetX:e.offsetX/t,offsetY:e.offsetY/t,pageX:e.pageX/t,pageY:e.pageY/t}},DT.requestAnimationFrame=function(e){var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(t)return t(e)},DT.getHostFromUrl=function(e){if("String"!==DT.typeOf(e))return"";var t=e.split("/"),n="";return t.length>3&&t[2]&&(n=t[2]),n},DT.cancelAnimationFrame=function(e){var t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;t&&t(e)},DT.isMSE=function(e){return e.media&&(e=e.media),!!(e&&e instanceof HTMLMediaElement)&&(/^blob/.test(e.currentSrc)||/^blob/.test(e.src))},DT.isBlob=function(e){return"string"==typeof e&&/^blob/.test(e)},DT.generateSessionId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(new Date).getTime();try{e=Sb(e)}catch(n){e=0}return t+=e,window.performance&&"function"==typeof window.performance.now&&(t+=Sb(window.performance.now())),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?n:3&n|8).toString(16)}))},DT.createEvent=function(e){var t;return"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},DT.adjustTimeByDuration=function(e,t,n){return t&&e&&(e>t||n&&e<t)?t:e},DT.createPositionBar=function(e,t){var n=DT.createDom("xg-bar","",{"data-index":-1},e);return t.appendChild(n),n},DT.getTransformStyle=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0,scale:1,rotate:0},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r={scale:"".concat(t.scale||1),translate:nd(e="".concat(t.x||0,"%, ")).call(e,t.y||0,"%"),rotate:"".concat(t.rotate||0,"deg")},i=ad(r);return Gf(i).call(i,(function(e){var t,i=new RegExp("".concat(e,"\\([^\\(]+\\)"),"g"),a=nd(t="".concat(e,"(")).call(t,r[e],")");i.test(n)?(i.lastIndex=-1,n=n.replace(i,a)):n+="".concat(a," ")})),n},DT.convertDeg=function(e){return Math.abs(e)<=1?360*e:e%360},DT.getIndexByTime=function(e,t){var n=t.length,r=-1;if(n<1)return r;if(e<=t[0].end||n<2)r=0;else if(e>t[n-1].end)r=n-1;else for(var i=1;i<n;i++)if(e>t[i-1].end&&e<=t[i].end){r=i;break}return r},DT.getOffsetCurrentTime=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=-1;if((r=n>=0&&n<t.length?n:DT.getIndexByTime(e,t))<0)return-1;var i=t.length,a=t[r],o=a.start,s=a.end,u=a.cTime,c=a.offset;return e<o?u:e>=o&&e<=s?e-c:e>s&&r>=i-1?s:-1},DT.getCurrentTimeByOffset=function(e,t){var n=-1;if(!t||t.length<0)return e;for(var r=0;r<t.length;r++)if(e<=t[r].duration){n=r;break}if(-1!==n){var i=t[n].start;return n-1<0?i+e:i+(e-t[n-1].duration)}return e};var UT=/(Android)\s([\d.]+)/,FT=/(Version)\/([\d.]+)/,KT=["avc1.42E01E, mp4a.40.2","avc1.58A01E, mp4a.40.2","avc1.4D401E, mp4a.40.2","avc1.64001E, mp4a.40.2","avc1.42E01E","mp4v.20.8","mp4v.20.8, mp4a.40.2","mp4v.20.240, mp4a.40.2"],BT={get device(){return BT.os.isPc?"pc":"mobile"},get browser(){var e,t;if("undefined"==typeof navigator)return"";var n=navigator.userAgent.toLowerCase(),r={ie:/rv:([\d.]+)\) like gecko/,firefox:/firefox\/([\d.]+)/,chrome:/chrome\/([\d.]+)/,opera:/opera.([\d.]+)/,safari:/version\/([\d.]+).*safari/};return nd(e=[]).call(e,Hb(t=ad(r)).call(t,(function(e){return r[e].test(n)})))[0]},get os(){if("undefined"==typeof navigator)return{};var e=navigator.userAgent,t=/(?:Windows Phone)/.test(e),n=/(?:SymbianOS)/.test(e)||t,r=/(?:Android)/.test(e),i=/(?:Firefox)/.test(e),a=/(?:iPad|PlayBook)/.test(e)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,o=a||r&&!/(?:Mobile)/.test(e)||i&&/(?:Tablet)/.test(e),s=/(?:iPhone)/.test(e)&&!o;return{isTablet:o,isPhone:s,isIpad:a,isIos:s||a,isAndroid:r,isPc:!(s||r||n||o),isSymbian:n,isWindowsPhone:t,isFireFox:i}},get osVersion(){if("undefined"==typeof navigator)return 0;var e=navigator.userAgent,t="",n=(t=/(?:iPhone)|(?:iPad|PlayBook)/.test(e)?FT:UT)?t.exec(e):[];if(n&&n.length>=3){var r=n[2].split(".");return r.length>0?Sb(r[0]):0}return 0},get isWeixin(){if("undefined"==typeof navigator)return!1;return!!/(micromessenger)\/([\d.]+)/.exec(navigator.userAgent.toLocaleLowerCase())},isSupportMP4:function(){var e={isSupport:!1,mime:""};if("undefined"==typeof document)return e;if(this.supportResult)return this.supportResult;var t=document.createElement("video");return"function"==typeof t.canPlayType&&Mb(KT).call(KT,(function(n){"probably"===t.canPlayType('video/mp4; codecs="'.concat(n,'"'))&&(e.isSupport=!0,e.mime+="||".concat(n))})),this.supportResult=e,t=null,e},isMSESupport:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'video/mp4; codecs="avc1.42E01E,mp4a.40.2"';if("undefined"==typeof MediaSource||!MediaSource)return!1;try{return MediaSource.isTypeSupported(e)}catch(v_){return this._logger.error(e,v_),!1}},isHevcSupported:function(){return!("undefined"==typeof MediaSource||!MediaSource.isTypeSupported)&&(MediaSource.isTypeSupported('video/mp4;codecs="hev1.1.6.L120.90"')||MediaSource.isTypeSupported('video/mp4;codecs="hev1.2.4.L120.90"')||MediaSource.isTypeSupported('video/mp4;codecs="hev1.3.E.L120.90"')||MediaSource.isTypeSupported('video/mp4;codecs="hev1.4.10.L120.90"'))},probeConfigSupported:function(e){var t={supported:!1,smooth:!1,powerEfficient:!1};if(!e||"undefined"==typeof navigator)return Zy.resolve(t);if(navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo)return navigator.mediaCapabilities.decodingInfo(e);var n=e.video||{},r=e.audio||{};try{var i=MediaSource.isTypeSupported(n.contentType),a=MediaSource.isTypeSupported(r.contentType);return Zy.resolve({supported:i&&a,smooth:!1,powerEfficient:!1})}catch(o){return Zy.resolve(t)}}};function HT(e,t,n){for(var r,i=arguments.length,a=new Array(i>3?i-3:0),o=3;o<i;o++)a[o-3]=arguments[o];var s,u=t.call.apply(t,nd(r=[e]).call(r,a));n&&"function"==typeof n&&(u&&u.then?u.then((function(){for(var t,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];n.call.apply(n,nd(t=[e]).call(t,i))})):n.call.apply(n,nd(s=[e]).call(s,a)))}function VT(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{pre:null,next:null};return this.__hooks||(this.__hooks={}),!this.__hooks[e]&&(this.__hooks[e]=null),Pw(n=function(){var n,i=arguments,a=this;if(r.pre)try{var o,s;(s=r.pre).call.apply(s,nd(o=[this]).call(o,xd(Array.prototype).call(arguments)))}catch(g){var u,c;throw g.message=nd(u=nd(c="[pluginName: ".concat(this.pluginName,":")).call(c,e,":pre error] >> ")).call(u,g.message),g}if(this.__hooks&&this.__hooks[e])try{var l,f=function(e,t,n){for(var r=arguments.length,i=new Array(r>3?r-3:0),a=3;a<r;a++)i[a-3]=arguments[a];if(e.__hooks&&Ib(e.__hooks[t])){var o,s=e.__hooks[t],u=-1,c=function e(t,n,r){for(var i,a,o=arguments.length,c=new Array(o>3?o-3:0),l=3;l<o;l++)c[l-3]=arguments[l];if(u++,0===s.length||u===s.length)return r.call.apply(r,nd(a=[t,t]).call(a,c));var f,h=s[u],d=h.call.apply(h,nd(i=[t,t]).call(i,c));return d&&d.then?d.then((function(i){var a;return!1===i?null:e.apply(void 0,nd(a=[t,n,r]).call(a,c))})).catch((function(e){console.warn("[runHooks]".concat(n," reject"),e.message)})):!1!==d?e.apply(void 0,nd(f=[t,n,r]).call(f,c)):void 0};return c.apply(void 0,nd(o=[e,t,n]).call(o,i))}var l;return n.call.apply(n,nd(l=[e,e]).call(l,i))}(this,e,t);if(f)if(f.then)f.then((function(e){var n;!1!==e&&HT.apply(void 0,nd(n=[a,t,r.next]).call(n,iS(i)))})).catch((function(e){throw e}));else HT.apply(void 0,nd(l=[this,t,r.next]).call(l,xd(Array.prototype).call(arguments)));else if(void 0===f){var h;HT.apply(void 0,nd(h=[this,t,r.next]).call(h,xd(Array.prototype).call(arguments)))}}catch(g){var d,p;throw g.message=nd(d=nd(p="[pluginName: ".concat(this.pluginName,":")).call(p,e,"] >> ")).call(d,g.message),g}else HT.apply(void 0,nd(n=[this,t,r.next]).call(n,xd(Array.prototype).call(arguments)))}).call(n,this)}function zT(e,t){var n=this.__hooks;if(!n||!Ib(n[e]))return-1;for(var r=n[e],i=0;i<r.length;i++)if(r[i]===t)return i;return-1}function qT(e,t){var n=this.__hooks;if(n)return n.hasOwnProperty(e)?(Ib(n[e])||(n[e]=[]),-1===zT.call(this,e,t)&&n[e].push(t),!0):(console.warn("has no supported hook which name [".concat(e,"]")),!1)}function GT(e,t){var n=this.__hooks;if(n){if(Ib(n[e])){var r=n[e],i=zT.call(this,e,t);-1!==i&&Wd(r).call(r,i,1)}delete n[e]}}function WT(e,t){var n;_T.logError(nd(n="[".concat(e,"] event or callback cant be undefined or null when call ")).call(n,t))}var XT=function(){function e(t){eS(this,e),DT.checkIsFunction(this.beforeCreate)&&this.beforeCreate(t),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.__hooks={},t&&Mb(t).call(t,(function(t){e.__hooks[t]=null})),Aw(e,"hooks",{get:function(){var t;return e.__hooks&&Mb(t=ad(e.__hooks)).call(t,(function(t){if(e.__hooks[t])return t}))}})}(this),this.__args=t,this.__events={},this.__onceEvents={},this.config=t.config||{},this.player=null,this.playerConfig={},this.pluginName="",this.__init(t)}return nS(e,[{key:"beforeCreate",value:function(e){}},{key:"afterCreate",value:function(){}},{key:"beforePlayerInit",value:function(){}},{key:"onPluginsReady",value:function(){}},{key:"afterPlayerInit",value:function(){}},{key:"destroy",value:function(){}},{key:"__init",value:function(e){this.player=e.player,this.playerConfig=e.player&&e.player.config,this.pluginName=e.pluginName?e.pluginName.toLowerCase():this.constructor.pluginName.toLowerCase(),this.logger=e.player&&e.player.logger}},{key:"updateLang",value:function(e){e||(e=this.lang)}},{key:"lang",get:function(){return this.player.lang}},{key:"i18n",get:function(){return this.player.i18n}},{key:"i18nKeys",get:function(){return this.player.i18nKeys}},{key:"domEventType",get:function(){var e=DT.checkTouchSupport()?"touch":"mouse";return!this.playerConfig||"touch"!==this.playerConfig.domEventType&&"mouse"!==this.playerConfig.domEventType||(e=this.playerConfig.domEventType),e}},{key:"on",value:function(e,t){var n=this;e&&t&&this.player?"string"==typeof e?(this.__events[e]=t,this.player.on(e,t)):Ib(e)&&Gf(e).call(e,(function(e){n.__events[e]=t,n.player.on(e,t)})):WT(this.pluginName,"plugin.on(event, callback)")}},{key:"once",value:function(e,t){var n=this;e&&t&&this.player?"string"==typeof e?(this.__onceEvents[e]=t,this.player.once(e,t)):Ib(e)&&Gf(e).call(e,(function(r){n.__onceEvents[r]=t,n.player.once(e,t)})):WT(this.pluginName,"plugin.once(event, callback)")}},{key:"off",value:function(e,t){var n=this;e&&t&&this.player?"string"==typeof e?(delete this.__events[e],this.player.off(e,t)):Ib(e)&&Gf(e).call(e,(function(r){delete n.__events[e],n.player.off(r,t)})):WT(this.pluginName,"plugin.off(event, callback)")}},{key:"offAll",value:function(){var e,t=this;Gf(e=["__events","__onceEvents"]).call(e,(function(e){var n;Gf(n=ad(t[e])).call(n,(function(n){t[e][n]&&t.off(n,t[e][n]),n&&delete t[e][n]}))})),this.__events={},this.__onceEvents={}}},{key:"emit",value:function(e){var t,n;if(this.player){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];(n=this.player).emit.apply(n,nd(t=[e]).call(t,i))}}},{key:"emitUserAction",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.player){var r=Qw(Qw({},n),{},{pluginName:this.pluginName});this.player.emitUserAction(e,t,r)}}},{key:"hook",value:function(e,t){var n;return VT.call.apply(VT,nd(n=[this]).call(n,xd(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){for(var n,r=arguments.length,i=new Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a];return qT.call.apply(qT,nd(n=[this]).call(n,xd(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){for(var n,r=arguments.length,i=new Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a];return GT.call.apply(GT,nd(n=[this]).call(n,xd(Array.prototype).call(arguments)))}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(this.player)return n&&(t.pluginName=n),this.player.registerPlugin({plugin:e,options:t})}},{key:"getPlugin",value:function(e){return this.player?this.player.getPlugin(e):null}},{key:"__destroy",value:function(){var e,t=this,n=this.player,r=this.pluginName;this.offAll(),DT.clearAllTimers(this),DT.checkIsFunction(this.destroy)&&this.destroy(),Mb(e=["player","playerConfig","pluginName","logger","__args","__hooks"]).call(e,(function(e){t[e]=null})),n.unRegisterPlugin(r),this.__hooks=null}}],[{key:"defineGetterOrSetter",value:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&Aw(e,n,t[n])}},{key:"defineMethod",value:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&"function"==typeof t[n]&&Aw(e,n,{configurable:!0,value:t[n]})}},{key:"defaultConfig",get:function(){return{}}},{key:"pluginName",get:function(){return"pluginName"}}]),e}(),YT=Cn,$T=so.findIndex,JT="findIndex",QT=!0;JT in[]&&Array(1)[JT]((function(){QT=!1})),YT({target:"Array",proto:!0,forced:QT},{findIndex:function(e){return $T(this,e,arguments.length>1?arguments[1]:void 0)}});var ZT=ef("Array").findIndex,eE=se,tE=ZT,nE=Array.prototype,rE=t((function(e){var t=e.findIndex;return e===nE||eE(nE,e)&&t===nE.findIndex?tE:t})),iE=a,aE=ht("iterator"),oE=!iE((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[aE]||"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})),sE=v,uE=2147483647,cE=/[^\0-\u007E]/,lE=/[.\u3002\uFF0E\uFF61]/g,fE="Overflow: input needs wider integers to process",hE=RangeError,dE=sE(lE.exec),pE=Math.floor,gE=String.fromCharCode,vE=sE("".charCodeAt),mE=sE([].join),yE=sE([].push),bE=sE("".replace),wE=sE("".split),SE=sE("".toLowerCase),TE=function(e){return e+22+75*(e<26)},EE=function(e,t,n){var r=0;for(e=n?pE(e/700):e>>1,e+=pE(e/t);e>455;)e=pE(e/35),r+=36;return pE(r+36*e/(e+38))},xE=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=vE(e,n++);if(i>=55296&&i<=56319&&n<r){var a=vE(e,n++);56320==(64512&a)?yE(t,((1023&i)<<10)+(1023&a)+65536):(yE(t,i),n--)}else yE(t,i)}return t}(e);var n,r,i=e.length,a=128,o=0,s=72;for(n=0;n<e.length;n++)(r=e[n])<128&&yE(t,gE(r));var u=t.length,c=u;for(u&&yE(t,"-");c<i;){var l=uE;for(n=0;n<e.length;n++)(r=e[n])>=a&&r<l&&(l=r);var f=c+1;if(l-a>pE((uE-o)/f))throw hE(fE);for(o+=(l-a)*f,a=l,n=0;n<e.length;n++){if((r=e[n])<a&&++o>uE)throw hE(fE);if(r==a){for(var h=o,d=36;;){var p=d<=s?1:d>=s+26?26:d-s;if(h<p)break;var g=h-p,v=36-p;yE(t,gE(TE(p+g%v))),h=pE(g/v),d+=36}yE(t,gE(TE(h))),s=EE(o,f,c==u),o=0,c++}}o++,a++}return mE(t,"")},kE=la,AE=function(e,t,n){for(var r in t)n&&n.unsafe&&e[r]?e[r]=t[r]:kE(e,r,t[r],n);return e},ME=Cn,IE=i,CE=N,RE=v,PE=C,NE=oE,jE=la,OE=ha,_E=AE,LE=La,DE=$u,UE=Za,FE=Ig,KE=M,BE=Qe,HE=$t,VE=ur,zE=nn,qE=ee,GE=ei,WE=Gi,XE=F,YE=jp,$E=Ap,JE=_g,QE=th,ZE=ht("iterator"),ex="URLSearchParams",tx=ex+"Iterator",nx=UE.set,rx=UE.getterFor(ex),ix=UE.getterFor(tx),ax=Object.getOwnPropertyDescriptor,ox=function(e){if(!PE)return IE[e];var t=ax(IE,e);return t&&t.value},sx=ox("fetch"),ux=ox("Request"),cx=ox("Headers"),lx=ux&&ux.prototype,fx=cx&&cx.prototype,hx=IE.RegExp,dx=IE.TypeError,px=IE.decodeURIComponent,gx=IE.encodeURIComponent,vx=RE("".charAt),mx=RE([].join),yx=RE([].push),bx=RE("".replace),wx=RE([].shift),Sx=RE([].splice),Tx=RE("".split),Ex=RE("".slice),xx=/\+/g,kx=Array(4),Ax=function(e){return kx[e-1]||(kx[e-1]=hx("((?:%[\\da-f]{2}){"+e+"})","gi"))},Mx=function(e){try{return px(e)}catch(v_){return e}},Ix=function(e){var t=bx(e,xx," "),n=4;try{return px(t)}catch(v_){for(;n;)t=bx(t,Ax(n--),Mx);return t}},Cx=/[!'()~]|%20/g,Rx={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Px=function(e){return Rx[e]},Nx=function(e){return bx(gx(e),Cx,Px)},jx=DE((function(e,t){nx(this,{type:tx,iterator:YE(rx(e).entries),kind:t})}),"Iterator",(function(){var e=ix(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),Ox=function(e){this.entries=[],this.url=null,void 0!==e&&(qE(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===vx(e,0)?Ex(e,1):e:GE(e)))};Ox.prototype={type:ex,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,a,o,s,u=$E(e);if(u)for(n=(t=YE(e,u)).next;!(r=CE(n,t)).done;){if(a=(i=YE(zE(r.value))).next,(o=CE(a,i)).done||(s=CE(a,i)).done||!CE(a,i).done)throw dx("Expected sequence with length 2");yx(this.entries,{key:GE(o.value),value:GE(s.value)})}else for(var c in e)BE(e,c)&&yx(this.entries,{key:c,value:GE(e[c])})},parseQuery:function(e){if(e)for(var t,n,r=Tx(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(n=Tx(t,"="),yx(this.entries,{key:Ix(wx(n)),value:Ix(mx(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],yx(n,Nx(e.key)+"="+Nx(e.value));return mx(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var _x=function(){FE(this,Lx);var e=nx(this,new Ox(arguments.length>0?arguments[0]:void 0));PE||(this.length=e.entries.length)},Lx=_x.prototype;if(_E(Lx,{append:function(e,t){JE(arguments.length,2);var n=rx(this);yx(n.entries,{key:GE(e),value:GE(t)}),PE||this.length++,n.updateURL()},delete:function(e){JE(arguments.length,1);for(var t=rx(this),n=t.entries,r=GE(e),i=0;i<n.length;)n[i].key===r?Sx(n,i,1):i++;PE||(this.length=n.length),t.updateURL()},get:function(e){JE(arguments.length,1);for(var t=rx(this).entries,n=GE(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){JE(arguments.length,1);for(var t=rx(this).entries,n=GE(e),r=[],i=0;i<t.length;i++)t[i].key===n&&yx(r,t[i].value);return r},has:function(e){JE(arguments.length,1);for(var t=rx(this).entries,n=GE(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){JE(arguments.length,1);for(var n,r=rx(this),i=r.entries,a=!1,o=GE(e),s=GE(t),u=0;u<i.length;u++)(n=i[u]).key===o&&(a?Sx(i,u--,1):(a=!0,n.value=s));a||yx(i,{key:o,value:s}),PE||(this.length=i.length),r.updateURL()},sort:function(){var e=rx(this);QE(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=rx(this).entries,r=HE(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 jx(this,"keys")},values:function(){return new jx(this,"values")},entries:function(){return new jx(this,"entries")}},{enumerable:!0}),jE(Lx,ZE,Lx.entries,{name:"entries"}),jE(Lx,"toString",(function(){return rx(this).serialize()}),{enumerable:!0}),PE&&OE(Lx,"size",{get:function(){return rx(this).entries.length},configurable:!0,enumerable:!0}),LE(_x,ex),ME({global:!0,constructor:!0,forced:!NE},{URLSearchParams:_x}),!NE&&KE(cx)){var Dx=RE(fx.has),Ux=RE(fx.set),Fx=function(e){if(qE(e)){var t,n=e.body;if(VE(n)===ex)return t=e.headers?new cx(e.headers):new cx,Dx(t,"content-type")||Ux(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),WE(e,{body:XE(0,GE(n)),headers:XE(0,t)})}return e};if(KE(sx)&&ME({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return sx(e,arguments.length>1?Fx(arguments[1]):{})}}),KE(ux)){var Kx=function(e){return FE(this,lx),new ux(e,arguments.length>1?Fx(arguments[1]):{})};lx.constructor=Kx,Kx.prototype=lx,ME({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Kx})}}var Bx,Hx=Cn,Vx=C,zx=oE,qx=i,Gx=$t,Wx=v,Xx=la,Yx=ha,$x=Ig,Jx=Qe,Qx=tw,Zx=Ww,ek=na,tk=bl.codeAt,nk=function(e){var t,n,r=[],i=wE(bE(SE(e),lE,"."),".");for(t=0;t<i.length;t++)n=i[t],yE(r,dE(cE,n)?"xn--"+xE(n):n);return mE(r,".")},rk=ei,ik=La,ak=_g,ok={URLSearchParams:_x,getState:rx},sk=Za,uk=sk.set,ck=sk.getterFor("URL"),lk=ok.URLSearchParams,fk=ok.getState,hk=qx.URL,dk=qx.TypeError,pk=qx.parseInt,gk=Math.floor,vk=Math.pow,mk=Wx("".charAt),yk=Wx(/./.exec),bk=Wx([].join),wk=Wx(1..toString),Sk=Wx([].pop),Tk=Wx([].push),Ek=Wx("".replace),xk=Wx([].shift),kk=Wx("".split),Ak=Wx("".slice),Mk=Wx("".toLowerCase),Ik=Wx([].unshift),Ck="Invalid scheme",Rk="Invalid host",Pk="Invalid port",Nk=/[a-z]/i,jk=/[\d+-.a-z]/i,Ok=/\d/,_k=/^0x/i,Lk=/^[0-7]+$/,Dk=/^\d+$/,Uk=/^[\da-f]+$/i,Fk=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Kk=/[\0\t\n\r #/:<>?@[\\\]^|]/,Bk=/^[\u0000-\u0020]+/,Hk=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Vk=/[\t\n\r]/g,zk=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)Ik(t,e%256),e=gk(e/256);return bk(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,a=0;a<8;a++)0!==e[a]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=a),++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+=wk(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},qk={},Gk=Qx({},qk,{" ":1,'"':1,"<":1,">":1,"`":1}),Wk=Qx({},Gk,{"#":1,"?":1,"{":1,"}":1}),Xk=Qx({},Wk,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Yk=function(e,t){var n=tk(e,0);return n>32&&n<127&&!Jx(t,e)?e:encodeURIComponent(e)},$k={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Jk=function(e,t){var n;return 2==e.length&&yk(Nk,mk(e,0))&&(":"==(n=mk(e,1))||!t&&"|"==n)},Qk=function(e){var t;return e.length>1&&Jk(Ak(e,0,2))&&(2==e.length||"/"===(t=mk(e,2))||"\\"===t||"?"===t||"#"===t)},Zk=function(e){return"."===e||"%2e"===Mk(e)},eA={},tA={},nA={},rA={},iA={},aA={},oA={},sA={},uA={},cA={},lA={},fA={},hA={},dA={},pA={},gA={},vA={},mA={},yA={},bA={},wA={},SA=function(e,t,n){var r,i,a,o=rk(e);if(t){if(i=this.parse(o))throw dk(i);this.searchParams=null}else{if(void 0!==n&&(r=new SA(n,!0)),i=this.parse(o,null,r))throw dk(i);(a=fk(new lk)).bindURL(this),this.searchParams=a}};SA.prototype={type:"URL",parse:function(e,t,n){var r,i,a,o,s,u=this,c=t||eA,l=0,f="",h=!1,d=!1,p=!1;for(e=rk(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=Ek(e,Bk,""),e=Ek(e,Hk,"$1")),e=Ek(e,Vk,""),r=Zx(e);l<=r.length;){switch(i=r[l],c){case eA:if(!i||!yk(Nk,i)){if(t)return Ck;c=nA;continue}f+=Mk(i),c=tA;break;case tA:if(i&&(yk(jk,i)||"+"==i||"-"==i||"."==i))f+=Mk(i);else{if(":"!=i){if(t)return Ck;f="",c=nA,l=0;continue}if(t&&(u.isSpecial()!=Jx($k,f)||"file"==f&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=f,t)return void(u.isSpecial()&&$k[u.scheme]==u.port&&(u.port=null));f="","file"==u.scheme?c=dA:u.isSpecial()&&n&&n.scheme==u.scheme?c=rA:u.isSpecial()?c=sA:"/"==r[l+1]?(c=iA,l++):(u.cannotBeABaseURL=!0,Tk(u.path,""),c=yA)}break;case nA:if(!n||n.cannotBeABaseURL&&"#"!=i)return Ck;if(n.cannotBeABaseURL&&"#"==i){u.scheme=n.scheme,u.path=ek(n.path),u.query=n.query,u.fragment="",u.cannotBeABaseURL=!0,c=wA;break}c="file"==n.scheme?dA:aA;continue;case rA:if("/"!=i||"/"!=r[l+1]){c=aA;continue}c=uA,l++;break;case iA:if("/"==i){c=cA;break}c=mA;continue;case aA:if(u.scheme=n.scheme,i==Bx)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=ek(n.path),u.query=n.query;else if("/"==i||"\\"==i&&u.isSpecial())c=oA;else if("?"==i)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=ek(n.path),u.query="",c=bA;else{if("#"!=i){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=ek(n.path),u.path.length--,c=mA;continue}u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=ek(n.path),u.query=n.query,u.fragment="",c=wA}break;case oA:if(!u.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,c=mA;continue}c=cA}else c=uA;break;case sA:if(c=uA,"/"!=i||"/"!=mk(f,l+1))continue;l++;break;case uA:if("/"!=i&&"\\"!=i){c=cA;continue}break;case cA:if("@"==i){h&&(f="%40"+f),h=!0,a=Zx(f);for(var g=0;g<a.length;g++){var v=a[g];if(":"!=v||p){var m=Yk(v,Xk);p?u.password+=m:u.username+=m}else p=!0}f=""}else if(i==Bx||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(h&&""==f)return"Invalid authority";l-=Zx(f).length+1,f="",c=lA}else f+=i;break;case lA:case fA:if(t&&"file"==u.scheme){c=gA;continue}if(":"!=i||d){if(i==Bx||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(u.isSpecial()&&""==f)return Rk;if(t&&""==f&&(u.includesCredentials()||null!==u.port))return;if(o=u.parseHost(f))return o;if(f="",c=vA,t)return;continue}"["==i?d=!0:"]"==i&&(d=!1),f+=i}else{if(""==f)return Rk;if(o=u.parseHost(f))return o;if(f="",c=hA,t==fA)return}break;case hA:if(!yk(Ok,i)){if(i==Bx||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()||t){if(""!=f){var y=pk(f,10);if(y>65535)return Pk;u.port=u.isSpecial()&&y===$k[u.scheme]?null:y,f=""}if(t)return;c=vA;continue}return Pk}f+=i;break;case dA:if(u.scheme="file","/"==i||"\\"==i)c=pA;else{if(!n||"file"!=n.scheme){c=mA;continue}if(i==Bx)u.host=n.host,u.path=ek(n.path),u.query=n.query;else if("?"==i)u.host=n.host,u.path=ek(n.path),u.query="",c=bA;else{if("#"!=i){Qk(bk(ek(r,l),""))||(u.host=n.host,u.path=ek(n.path),u.shortenPath()),c=mA;continue}u.host=n.host,u.path=ek(n.path),u.query=n.query,u.fragment="",c=wA}}break;case pA:if("/"==i||"\\"==i){c=gA;break}n&&"file"==n.scheme&&!Qk(bk(ek(r,l),""))&&(Jk(n.path[0],!0)?Tk(u.path,n.path[0]):u.host=n.host),c=mA;continue;case gA:if(i==Bx||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&Jk(f))c=mA;else if(""==f){if(u.host="",t)return;c=vA}else{if(o=u.parseHost(f))return o;if("localhost"==u.host&&(u.host=""),t)return;f="",c=vA}continue}f+=i;break;case vA:if(u.isSpecial()){if(c=mA,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=Bx&&(c=mA,"/"!=i))continue}else u.fragment="",c=wA;else u.query="",c=bA;break;case mA:if(i==Bx||"/"==i||"\\"==i&&u.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=Mk(s=f))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(u.shortenPath(),"/"==i||"\\"==i&&u.isSpecial()||Tk(u.path,"")):Zk(f)?"/"==i||"\\"==i&&u.isSpecial()||Tk(u.path,""):("file"==u.scheme&&!u.path.length&&Jk(f)&&(u.host&&(u.host=""),f=mk(f,0)+":"),Tk(u.path,f)),f="","file"==u.scheme&&(i==Bx||"?"==i||"#"==i))for(;u.path.length>1&&""===u.path[0];)xk(u.path);"?"==i?(u.query="",c=bA):"#"==i&&(u.fragment="",c=wA)}else f+=Yk(i,Wk);break;case yA:"?"==i?(u.query="",c=bA):"#"==i?(u.fragment="",c=wA):i!=Bx&&(u.path[0]+=Yk(i,qk));break;case bA:t||"#"!=i?i!=Bx&&("'"==i&&u.isSpecial()?u.query+="%27":u.query+="#"==i?"%23":Yk(i,qk)):(u.fragment="",c=wA);break;case wA:i!=Bx&&(u.fragment+=Yk(i,Gk))}l++}},parseHost:function(e){var t,n,r;if("["==mk(e,0)){if("]"!=mk(e,e.length-1))return Rk;if(t=function(e){var t,n,r,i,a,o,s,u=[0,0,0,0,0,0,0,0],c=0,l=null,f=0,h=function(){return mk(e,f)};if(":"==h()){if(":"!=mk(e,1))return;f+=2,l=++c}for(;h();){if(8==c)return;if(":"!=h()){for(t=n=0;n<4&&yk(Uk,h());)t=16*t+pk(h(),16),f++,n++;if("."==h()){if(0==n)return;if(f-=n,c>6)return;for(r=0;h();){if(i=null,r>0){if(!("."==h()&&r<4))return;f++}if(!yk(Ok,h()))return;for(;yk(Ok,h());){if(a=pk(h(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;f++}u[c]=256*u[c]+i,2!=++r&&4!=r||c++}if(4!=r)return;break}if(":"==h()){if(f++,!h())return}else if(h())return;u[c++]=t}else{if(null!==l)return;f++,l=++c}}if(null!==l)for(o=c-l,c=7;0!=c&&o>0;)s=u[c],u[c--]=u[l+o-1],u[l+--o]=s;else if(8!=c)return;return u}(Ak(e,1,-1)),!t)return Rk;this.host=t}else if(this.isSpecial()){if(e=nk(e),yk(Fk,e))return Rk;if(t=function(e){var t,n,r,i,a,o,s,u=kk(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(a=10,i.length>1&&"0"==mk(i,0)&&(a=yk(_k,i)?16:8,i=Ak(i,8==a?1:2)),""===i)o=0;else{if(!yk(10==a?Dk:8==a?Lk:Uk,i))return e;o=pk(i,a)}Tk(n,o)}for(r=0;r<t;r++)if(o=n[r],r==t-1){if(o>=vk(256,5-t))return null}else if(o>255)return null;for(s=Sk(n),r=0;r<n.length;r++)s+=n[r]*vk(256,3-r);return s}(e),null===t)return Rk;this.host=t}else{if(yk(Kk,e))return Rk;for(t="",n=Zx(e),r=0;r<n.length;r++)t+=Yk(n[r],qk);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return Jx($k,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&Jk(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,i=e.host,a=e.port,o=e.path,s=e.query,u=e.fragment,c=t+":";return null!==i?(c+="//",e.includesCredentials()&&(c+=n+(r?":"+r:"")+"@"),c+=zk(i),null!==a&&(c+=":"+a)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?o[0]:o.length?"/"+bk(o,"/"):"",null!==s&&(c+="?"+s),null!==u&&(c+="#"+u),c},setHref:function(e){var t=this.parse(e);if(t)throw dk(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new TA(e.path[0]).origin}catch(v_){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+zk(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(rk(e)+":",eA)},getUsername:function(){return this.username},setUsername:function(e){var t=Zx(rk(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=Yk(t[n],Xk)}},getPassword:function(){return this.password},setPassword:function(e){var t=Zx(rk(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=Yk(t[n],Xk)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?zk(e):zk(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,lA)},getHostname:function(){var e=this.host;return null===e?"":zk(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,fA)},getPort:function(){var e=this.port;return null===e?"":rk(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=rk(e))?this.port=null:this.parse(e,hA))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+bk(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,vA))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=rk(e))?this.query=null:("?"==mk(e,0)&&(e=Ak(e,1)),this.query="",this.parse(e,bA)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=rk(e))?("#"==mk(e,0)&&(e=Ak(e,1)),this.fragment="",this.parse(e,wA)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var TA=function(e){var t=$x(this,EA),n=ak(arguments.length,1)>1?arguments[1]:void 0,r=uk(t,new SA(e,!1,n));Vx||(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())},EA=TA.prototype,xA=function(e,t){return{get:function(){return ck(this)[e]()},set:t&&function(e){return ck(this)[t](e)},configurable:!0,enumerable:!0}};if(Vx&&(Yx(EA,"href",xA("serialize","setHref")),Yx(EA,"origin",xA("getOrigin")),Yx(EA,"protocol",xA("getProtocol","setProtocol")),Yx(EA,"username",xA("getUsername","setUsername")),Yx(EA,"password",xA("getPassword","setPassword")),Yx(EA,"host",xA("getHost","setHost")),Yx(EA,"hostname",xA("getHostname","setHostname")),Yx(EA,"port",xA("getPort","setPort")),Yx(EA,"pathname",xA("getPathname","setPathname")),Yx(EA,"search",xA("getSearch","setSearch")),Yx(EA,"searchParams",xA("getSearchParams")),Yx(EA,"hash",xA("getHash","setHash"))),Xx(EA,"toJSON",(function(){return ck(this).serialize()}),{enumerable:!0}),Xx(EA,"toString",(function(){return ck(this).serialize()}),{enumerable:!0}),hk){var kA=hk.createObjectURL,AA=hk.revokeObjectURL;kA&&Xx(TA,"createObjectURL",Gx(kA,hk)),AA&&Xx(TA,"revokeObjectURL",Gx(AA,hk))}ik(TA,"URL"),Hx({global:!0,constructor:!0,forced:!zx,sham:!Vx},{URL:TA});var MA=Cn,IA=a,CA=_g,RA=ei,PA=oE,NA=oe("URL");MA({target:"URL",stat:!0,forced:!(PA&&IA((function(){NA.canParse()})))},{canParse:function(e){var t=CA(arguments.length,1),n=RA(e),r=t<2||void 0===arguments[1]?void 0:RA(arguments[1]);try{return!!new NA(n,r)}catch(v_){return!1}}});var jA=t(te.URL),OA=te,_A=f;OA.JSON||(OA.JSON={stringify:JSON.stringify});var LA=function(e,t,n){return _A(OA.JSON.stringify,null,arguments)},DA=t(LA),UA=ee,FA=w,KA=ht("match"),BA=function(e){var t;return UA(e)&&(void 0!==(t=e[KA])?!!t:"RegExp"==FA(e))},HA=TypeError,VA=function(e){if(BA(e))throw HA("The method doesn't accept regular expressions");return e},zA=ht("match"),qA=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[zA]=!1,"/./"[e](t)}catch(r){}}return!1},GA=Cn,WA=E,XA=qn,YA=ei,$A=VA,JA=X,QA=qA,ZA=WA("".startsWith),eM=WA("".slice),tM=Math.min;GA({target:"String",proto:!0,forced:!QA("startsWith")},{startsWith:function(e){var t=YA(JA(this));$A(e);var n=XA(tM(arguments.length>1?arguments[1]:void 0,t.length)),r=YA(e);return ZA?ZA(t,r,n):eM(t,n,n+r.length)===r}});var nM=ef("String").startsWith,rM=se,iM=nM,aM=String.prototype,oM=t((function(e){var t=e.startsWith;return"string"==typeof e||e===aM||rM(aM,e)&&t===aM.startsWith?iM:t})),sM=li.includes;Cn({target:"Array",proto:!0,forced:a((function(){return!Array(1).includes()}))},{includes:function(e){return sM(this,e,arguments.length>1?arguments[1]:void 0)}});var uM=ef("Array").includes,cM=Cn,lM=VA,fM=X,hM=ei,dM=qA,pM=v("".indexOf);cM({target:"String",proto:!0,forced:!dM("includes")},{includes:function(e){return!!~pM(hM(fM(this)),hM(lM(e)),arguments.length>1?arguments[1]:void 0)}});var gM=ef("String").includes,vM=se,mM=uM,yM=gM,bM=Array.prototype,wM=String.prototype,SM=t((function(e){var t=e.includes;return e===bM||vM(bM,e)&&t===bM.includes?mM:"string"==typeof e||e===wM||vM(wM,e)&&t===wM.includes?yM:t})),TM={exports:{}},EM=a((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),xM=a,kM=ee,AM=w,MM=EM,IM=Object.isExtensible,CM=xM((function(){IM(1)}))||MM?function(e){return!!kM(e)&&((!MM||"ArrayBuffer"!=AM(e))&&(!IM||IM(e)))}:IM,RM=!a((function(){return Object.isExtensible(Object.preventExtensions({}))})),PM=Cn,NM=v,jM=fi,OM=ee,_M=Qe,LM=Jt.f,DM=Wi,UM=$i,FM=CM,KM=RM,BM=!1,HM=rt("meta"),VM=0,zM=function(e){LM(e,HM,{value:{objectID:"O"+VM++,weakData:{}}})},qM=TM.exports={enable:function(){qM.enable=function(){},BM=!0;var e=DM.f,t=NM([].splice),n={};n[HM]=1,e(n).length&&(DM.f=function(n){for(var r=e(n),i=0,a=r.length;i<a;i++)if(r[i]===HM){t(r,i,1);break}return r},PM({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:UM.f}))},fastKey:function(e,t){if(!OM(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!_M(e,HM)){if(!FM(e))return"F";if(!t)return"E";zM(e)}return e[HM].objectID},getWeakData:function(e,t){if(!_M(e,HM)){if(!FM(e))return!0;if(!t)return!1;zM(e)}return e[HM].weakData},onFreeze:function(e){return KM&&BM&&FM(e)&&!_M(e,HM)&&zM(e),e}};jM[HM]=!0;var GM=TM.exports,WM=Cn,XM=ee,YM=GM.onFreeze,$M=RM,JM=a,QM=Object.seal;WM({target:"Object",stat:!0,forced:JM((function(){QM(1)})),sham:!$M},{seal:function(e){return QM&&XM(e)?QM(YM(e)):e}});var ZM=t(te.Object.seal),eI=ef("Array").entries,tI=ur,nI=Qe,rI=se,iI=eI,aI=Array.prototype,oI={DOMTokenList:!0,NodeList:!0},sI=t((function(e){var t=e.entries;return e===aI||rI(aI,e)&&t===aI.entries||nI(oI,tI(e))?iI:t})),uI=Cn,cI=i,lI=GM,fI=a,hI=mn,dI=Jp,pI=Ig,gI=M,vI=ee,mI=La,yI=Jt.f,bI=so.forEach,wI=C,SI=Za.set,TI=Za.getterFor,EI=function(e,t,n){var r,i=-1!==e.indexOf("Map"),a=-1!==e.indexOf("Weak"),o=i?"set":"add",s=cI[e],u=s&&s.prototype,c={};if(wI&&gI(s)&&(a||u.forEach&&!fI((function(){(new s).entries().next()})))){var l=(r=t((function(t,n){SI(pI(t,l),{type:e,collection:new s}),null!=n&&dI(n,t[o],{that:t,AS_ENTRIES:i})}))).prototype,f=TI(e);bI(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in u)||a&&"clear"==e||hI(l,e,(function(n,r){var i=f(this).collection;if(!t&&a&&!vI(n))return"get"==e&&void 0;var o=i[e](0===n?0:n,r);return t?this:o}))})),a||yI(l,"size",{configurable:!0,get:function(){return f(this).collection.size}})}else r=n.getConstructor(t,e,i,o),lI.enable();return mI(r,e,!1,!0),c[e]=r,uI({global:!0,forced:!0},c),a||n.setStrong(r,e,i),r},xI=v,kI=AE,AI=GM.getWeakData,MI=Ig,II=nn,CI=q,RI=ee,PI=Jp,NI=Qe,jI=Za.set,OI=Za.getterFor,_I=so.find,LI=so.findIndex,DI=xI([].splice),UI=0,FI=function(e){return e.frozen||(e.frozen=new KI)},KI=function(){this.entries=[]},BI=function(e,t){return _I(e.entries,(function(e){return e[0]===t}))};KI.prototype={get:function(e){var t=BI(this,e);if(t)return t[1]},has:function(e){return!!BI(this,e)},set:function(e,t){var n=BI(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=LI(this.entries,(function(t){return t[0]===e}));return~t&&DI(this.entries,t,1),!!~t}};var HI,VI=RM,zI=i,qI=v,GI=AE,WI=GM,XI=EI,YI={getConstructor:function(e,t,n,r){var i=e((function(e,i){MI(e,a),jI(e,{type:t,id:UI++,frozen:void 0}),CI(i)||PI(i,e[r],{that:e,AS_ENTRIES:n})})),a=i.prototype,o=OI(t),s=function(e,t,n){var r=o(e),i=AI(II(t),!0);return!0===i?FI(r).set(t,n):i[r.id]=n,e};return kI(a,{delete:function(e){var t=o(this);if(!RI(e))return!1;var n=AI(e);return!0===n?FI(t).delete(e):n&&NI(n,t.id)&&delete n[t.id]},has:function(e){var t=o(this);if(!RI(e))return!1;var n=AI(e);return!0===n?FI(t).has(e):n&&NI(n,t.id)}}),kI(a,n?{get:function(e){var t=o(this);if(RI(e)){var n=AI(e);return!0===n?FI(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return s(this,e,t)}}:{add:function(e){return s(this,e,!0)}}),i}},$I=ee,JI=Za.enforce,QI=a,ZI=Fa,eC=Object,tC=Array.isArray,nC=eC.isExtensible,rC=eC.isFrozen,iC=eC.isSealed,aC=eC.freeze,oC=eC.seal,sC={},uC={},cC=!zI.ActiveXObject&&"ActiveXObject"in zI,lC=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},fC=XI("WeakMap",lC,YI),hC=fC.prototype,dC=qI(hC.set);if(ZI)if(cC){HI=YI.getConstructor(lC,"WeakMap",!0),WI.enable();var pC=qI(hC.delete),gC=qI(hC.has),vC=qI(hC.get);GI(hC,{delete:function(e){if($I(e)&&!nC(e)){var t=JI(this);return t.frozen||(t.frozen=new HI),pC(this,e)||t.frozen.delete(e)}return pC(this,e)},has:function(e){if($I(e)&&!nC(e)){var t=JI(this);return t.frozen||(t.frozen=new HI),gC(this,e)||t.frozen.has(e)}return gC(this,e)},get:function(e){if($I(e)&&!nC(e)){var t=JI(this);return t.frozen||(t.frozen=new HI),gC(this,e)?vC(this,e):t.frozen.get(e)}return vC(this,e)},set:function(e,t){if($I(e)&&!nC(e)){var n=JI(this);n.frozen||(n.frozen=new HI),gC(this,e)?dC(this,e,t):n.frozen.set(e,t)}else dC(this,e,t);return this}})}else VI&&QI((function(){var e=aC([]);return dC(new fC,e,1),!rC(e)}))&&GI(hC,{set:function(e,t){var n;return tC(e)&&(rC(e)?n=sC:iC(e)&&(n=uC)),dC(this,e,t),n==sC&&aC(e),n==uC&&oC(e),this}});var mC=te.WeakMap,yC=Me,bC=function(e){if("object"==typeof e&&"has"in e&&"get"in e&&"set"in e)return e;throw TypeError(yC(e)+" is not a weakmap")},wC=function(e,t){return 1==t?function(t,n){return t[e](n)}:function(t,n,r){return t[e](n,r)}},SC=wC,TC={WeakMap:oe("WeakMap"),set:SC("set",2),get:SC("get",1),has:SC("has",1),remove:SC("delete",1)},EC=bC,xC=TC.get,kC=TC.has,AC=TC.set;Cn({target:"WeakMap",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var n,r,i=EC(this);return kC(i,e)?(n=xC(i,e),"update"in t&&(n=t.update(n,e,i),AC(i,e,n)),n):(r=t.insert(e,i),AC(i,e,r),r)}});var MC=$t,IC=N,CC=Pe,RC=hf,PC=q,NC=Jp,jC=[].push,OC=function(e){var t,n,r,i,a=arguments.length,o=a>1?arguments[1]:void 0;return RC(this),(t=void 0!==o)&&CC(o),PC(e)?new this:(n=[],t?(r=0,i=MC(o,a>2?arguments[2]:void 0),NC(e,(function(e){IC(jC,n,i(e,r++))}))):NC(e,jC,{that:n}),new this(n))};Cn({target:"WeakMap",stat:!0,forced:!0},{from:OC});var _C=Ns,LC=function(){return new this(_C(arguments))};Cn({target:"WeakMap",stat:!0,forced:!0},{of:LC});var DC=bC,UC=TC.remove;Cn({target:"WeakMap",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=DC(this),n=!0,r=0,i=arguments.length;r<i;r++)e=UC(t,arguments[r]),n=n&&e;return!!n}});var FC=N,KC=Pe,BC=M,HC=nn,VC=TypeError,zC=function(e,t){var n,r=HC(this),i=KC(r.get),a=KC(r.has),o=KC(r.set),s=arguments.length>2?arguments[2]:void 0;if(!BC(t)&&!BC(s))throw VC("At least one callback required");return FC(a,r,e)?(n=FC(i,r,e),BC(t)&&(n=t(n),FC(o,r,e,n))):BC(s)&&(n=s(),FC(o,r,e,n)),n};Cn({target:"WeakMap",proto:!0,real:!0,forced:!0},{upsert:zC});var qC=t(mC),GC=Gi,WC=ha,XC=AE,YC=$t,$C=Ig,JC=q,QC=Jp,ZC=Tc,eR=Ec,tR=kg,nR=C,rR=GM.fastKey,iR=Za.set,aR=Za.getterFor,oR={getConstructor:function(e,t,n,r){var i=e((function(e,i){$C(e,a),iR(e,{type:t,index:GC(null),first:void 0,last:void 0,size:0}),nR||(e.size=0),JC(i)||QC(i,e[r],{that:e,AS_ENTRIES:n})})),a=i.prototype,o=aR(t),s=function(e,t,n){var r,i,a=o(e),s=u(e,t);return s?s.value=n:(a.last=s={index:i=rR(t,!0),key:t,value:n,previous:r=a.last,next:void 0,removed:!1},a.first||(a.first=s),r&&(r.next=s),nR?a.size++:e.size++,"F"!==i&&(a.index[i]=s)),e},u=function(e,t){var n,r=o(e),i=rR(t);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==t)return n};return XC(a,{clear:function(){for(var e=o(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,nR?e.size=0:this.size=0},delete:function(e){var t=this,n=o(t),r=u(t,e);if(r){var i=r.next,a=r.previous;delete n.index[r.index],r.removed=!0,a&&(a.next=i),i&&(i.previous=a),n.first==r&&(n.first=i),n.last==r&&(n.last=a),nR?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=o(this),r=YC(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)}}),XC(a,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)}}),nR&&WC(a,"size",{configurable:!0,get:function(){return o(this).size}}),i},setStrong:function(e,t,n){var r=t+" Iterator",i=aR(t),a=aR(r);ZC(e,t,(function(e,t){iR(this,{type:r,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=a(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)?eR("keys"==t?n.key:"values"==t?n.value:[n.key,n.value],!1):(e.target=void 0,eR(void 0,!0))}),n?"entries":"values",!n,!0),tR(t)}};EI("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),oR);var sR=te.Map;Cn({target:"Map",stat:!0,forced:!0},{from:OC}),Cn({target:"Map",stat:!0,forced:!0},{of:LC});var uR=Me,cR=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(uR(e)+" is not a map")},lR=wC,fR=oe("Map"),hR={Map:fR,set:lR("set",2),get:lR("get",1),has:lR("has",1),remove:lR("delete",1),proto:fR.prototype},dR=cR,pR=hR.remove;Cn({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=dR(this),n=!0,r=0,i=arguments.length;r<i;r++)e=pR(t,arguments[r]),n=n&&e;return!!n}});var gR=cR,vR=hR.get,mR=hR.has,yR=hR.set;Cn({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var n,r,i=gR(this);return mR(i,e)?(n=vR(i,e),"update"in t&&(n=t.update(n,e,i),yR(i,e,n)),n):(r=t.insert(e,i),yR(i,e,r),r)}});var bR=N,wR=function(e,t,n){for(var r,i,a=n||e.next;!(r=bR(a,e)).done;)if(void 0!==(i=t(r.value)))return i},SR=wR,TR=function(e,t,n){return n?SR(e.entries(),(function(e){return t(e[1],e[0])})):e.forEach(t)},ER=$t,xR=cR,kR=TR;Cn({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=xR(this),n=ER(e,arguments.length>1?arguments[1]:void 0);return!1!==kR(t,(function(e,r){if(!n(e,r,t))return!1}),!0)}});var AR=$t,MR=cR,IR=TR,CR=hR.Map,RR=hR.set;Cn({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=MR(this),n=AR(e,arguments.length>1?arguments[1]:void 0),r=new CR;return IR(t,(function(e,i){n(e,i,t)&&RR(r,i,e)})),r}});var PR=$t,NR=cR,jR=TR;Cn({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=NR(this),n=PR(e,arguments.length>1?arguments[1]:void 0),r=jR(t,(function(e,r){if(n(e,r,t))return{value:e}}),!0);return r&&r.value}});var OR=$t,_R=cR,LR=TR;Cn({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=_R(this),n=OR(e,arguments.length>1?arguments[1]:void 0),r=LR(t,(function(e,r){if(n(e,r,t))return{key:r}}),!0);return r&&r.key}});var DR=Cn,UR=N,FR=M,KR=Pe,BR=Jp,HR=hR.Map,VR=v([].push);DR({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){var n=new(FR(this)?this:HR);KR(t);var r=KR(n.has),i=KR(n.get),a=KR(n.set);return BR(e,(function(e){var o=t(e);UR(r,n,o)?VR(UR(i,n,o),e):UR(a,n,o,[e])})),n}});var zR=function(e,t){return e===t||e!=e&&t!=t},qR=cR,GR=TR;Cn({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===GR(qR(this),(function(t){if(zR(t,e))return!0}),!0)}});var WR=N,XR=Jp,YR=M,$R=Pe,JR=hR.Map;Cn({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var n=new(YR(this)?this:JR);$R(t);var r=$R(n.set);return XR(e,(function(e){WR(r,n,t(e),e)})),n}});var QR=cR,ZR=TR;Cn({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=ZR(QR(this),(function(t,n){if(t===e)return{key:n}}),!0);return t&&t.key}});var eP=$t,tP=cR,nP=TR,rP=hR.Map,iP=hR.set;Cn({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=tP(this),n=eP(e,arguments.length>1?arguments[1]:void 0),r=new rP;return nP(t,(function(e,i){iP(r,n(e,i,t),e)})),r}});var aP=$t,oP=cR,sP=TR,uP=hR.Map,cP=hR.set;Cn({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=oP(this),n=aP(e,arguments.length>1?arguments[1]:void 0),r=new uP;return sP(t,(function(e,i){cP(r,i,n(e,i,t))})),r}});var lP=cR,fP=Jp,hP=hR.set;Cn({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=lP(this),n=arguments.length,r=0;r<n;)fP(arguments[r++],(function(e,n){hP(t,e,n)}),{AS_ENTRIES:!0});return t}});var dP=Pe,pP=cR,gP=TR,vP=TypeError;Cn({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=pP(this),n=arguments.length<2,r=n?void 0:arguments[1];if(dP(e),gP(t,(function(i,a){n?(n=!1,r=i):r=e(r,i,a,t)})),n)throw vP("Reduce of empty map with no initial value");return r}});var mP=$t,yP=cR,bP=TR;Cn({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=yP(this),n=mP(e,arguments.length>1?arguments[1]:void 0);return!0===bP(t,(function(e,r){if(n(e,r,t))return!0}),!0)}});var wP=Pe,SP=cR,TP=TypeError,EP=hR.get,xP=hR.has,kP=hR.set;Cn({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var n=SP(this),r=arguments.length;wP(t);var i=xP(n,e);if(!i&&r<3)throw TP("Updating absent value");var a=i?EP(n,e):wP(r>2?arguments[2]:void 0)(e,n);return kP(n,e,t(a,e,n)),n}}),Cn({target:"Map",proto:!0,real:!0,forced:!0},{upsert:zC}),Cn({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:zC});var AP=t(sR),MP=ef("Array").values,IP=ur,CP=Qe,RP=se,PP=MP,NP=Array.prototype,jP={DOMTokenList:!0,NodeList:!0},OP=t((function(e){var t=e.values;return e===NP||RP(NP,e)&&t===NP.values||CP(jP,IP(e))?PP:t}));Cn({target:"Object",stat:!0},{is:Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}});var _P=t(te.Object.is),LP=f,DP=J,UP=Hn,FP=Wn,KP=Lf,BP=Math.min,HP=[].lastIndexOf,VP=!!HP&&1/[1].lastIndexOf(1,-0)<0,zP=KP("lastIndexOf"),qP=VP||!zP?function(e){if(VP)return LP(HP,this,arguments)||0;var t=DP(this),n=FP(t),r=n-1;for(arguments.length>1&&(r=BP(r,UP(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}:HP;Cn({target:"Array",proto:!0,forced:qP!==[].lastIndexOf},{lastIndexOf:qP});var GP=ef("Array").lastIndexOf,WP=se,XP=GP,YP=Array.prototype,$P=t((function(e){var t=e.lastIndexOf;return e===YP||WP(YP,e)&&t===YP.lastIndexOf?XP:t})),JP=Pe,QP=Ye,ZP=z,eN=Wn,tN=TypeError,nN=function(e){return function(t,n,r,i){JP(n);var a=QP(t),o=ZP(a),s=eN(a),u=e?s-1:0,c=e?-1:1;if(r<2)for(;;){if(u in o){i=o[u],u+=c;break}if(u+=c,e?u<0:s<=u)throw tN("Reduce of empty array with no initial value")}for(;e?u>=0:s>u;u+=c)u in o&&(i=n(i,o[u],u,a));return i}},rN={left:nN(!1),right:nN(!0)}.left;Cn({target:"Array",proto:!0,forced:!wg&&ge>79&&ge<83||!Lf("reduce")},{reduce:function(e){var t=arguments.length;return rN(this,e,t,t>1?arguments[1]:void 0)}});var iN=ef("Array").reduce,aN=se,oN=iN,sN=Array.prototype,uN=t((function(e){var t=e.reduce;return e===sN||aN(sN,e)&&t===sN.reduce?oN:t}));EI("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),oR);var cN=te.Set,lN=Me,fN=function(e){if("object"==typeof e&&"size"in e&&"has"in e&&"add"in e&&"delete"in e&&"keys"in e)return e;throw TypeError(lN(e)+" is not a set")},hN=wC,dN=oe("Set"),pN=dN.prototype,gN={Set:dN,add:hN("add",1),has:hN("has",1),remove:hN("delete",1),proto:pN},vN=wR,mN=function(e,t,n){return n?vN(e.keys(),t):e.forEach(t)},yN=mN,bN=gN.Set,wN=gN.add,SN=function(e){var t=new bN;return yN(e,(function(e){wN(t,e)})),t},TN=function(e){return e.size},EN=Pe,xN=nn,kN=N,AN=Hn,MN=TypeError,IN=Math.max,CN=function(e,t,n,r){this.set=e,this.size=t,this.has=n,this.keys=r};CN.prototype={getIterator:function(){return xN(kN(this.keys,this.set))},includes:function(e){return kN(this.has,this.set,e)}};var RN=function(e){xN(e);var t=+e.size;if(t!=t)throw MN("Invalid size");return new CN(e,IN(AN(t),0),EN(e.has),EN(e.keys))},PN=fN,NN=SN,jN=TN,ON=RN,_N=mN,LN=wR,DN=gN.has,UN=gN.remove,FN=function(e){var t=PN(this),n=ON(e),r=NN(t);return jN(t)<=n.size?_N(t,(function(e){n.includes(e)&&UN(r,e)})):LN(n.getIterator(),(function(e){DN(t,e)&&UN(r,e)})),r},KN=function(){return!1},BN=FN;Cn({target:"Set",proto:!0,real:!0,forced:!KN()},{difference:BN});var HN=fN,VN=TN,zN=RN,qN=mN,GN=wR,WN=gN.Set,XN=gN.add,YN=gN.has,$N=function(e){var t=HN(this),n=zN(e),r=new WN;return VN(t)>n.size?GN(n.getIterator(),(function(e){YN(t,e)&&XN(r,e)})):qN(t,(function(e){n.includes(e)&&XN(r,e)})),r},JN=$N;Cn({target:"Set",proto:!0,real:!0,forced:!KN()},{intersection:JN});var QN=fN,ZN=gN.has,ej=TN,tj=RN,nj=mN,rj=wR,ij=Dp,aj=function(e){var t=QN(this),n=tj(e);if(ej(t)<=n.size)return!1!==nj(t,(function(e){if(n.includes(e))return!1}),!0);var r=n.getIterator();return!1!==rj(r,(function(e){if(ZN(t,e))return ij(r,"normal",!1)}))},oj=aj;Cn({target:"Set",proto:!0,real:!0,forced:!KN()},{isDisjointFrom:oj});var sj=fN,uj=TN,cj=mN,lj=RN,fj=function(e){var t=sj(this),n=lj(e);return!(uj(t)>n.size)&&!1!==cj(t,(function(e){if(!n.includes(e))return!1}),!0)},hj=fj;Cn({target:"Set",proto:!0,real:!0,forced:!KN()},{isSubsetOf:hj});var dj=fN,pj=gN.has,gj=TN,vj=RN,mj=wR,yj=Dp,bj=function(e){var t=dj(this),n=vj(e);if(gj(t)<n.size)return!1;var r=n.getIterator();return!1!==mj(r,(function(e){if(!pj(t,e))return yj(r,"normal",!1)}))},wj=bj;Cn({target:"Set",proto:!0,real:!0,forced:!KN()},{isSupersetOf:wj});var Sj=fN,Tj=SN,Ej=RN,xj=wR,kj=gN.add,Aj=gN.has,Mj=gN.remove,Ij=function(e){var t=Sj(this),n=Ej(e).getIterator(),r=Tj(t);return xj(n,(function(e){Aj(t,e)?Mj(r,e):kj(r,e)})),r},Cj=Ij;Cn({target:"Set",proto:!0,real:!0,forced:!KN()},{symmetricDifference:Cj});var Rj=fN,Pj=gN.add,Nj=SN,jj=RN,Oj=wR,_j=function(e){var t=Rj(this),n=jj(e).getIterator(),r=Nj(t);return Oj(n,(function(e){Pj(r,e)})),r},Lj=_j;Cn({target:"Set",proto:!0,real:!0,forced:!KN()},{union:Lj});var Dj=cN;Cn({target:"Set",stat:!0,forced:!0},{from:OC}),Cn({target:"Set",stat:!0,forced:!0},{of:LC});var Uj=fN,Fj=gN.add;Cn({target:"Set",proto:!0,real:!0,forced:!0},{addAll:function(){for(var e=Uj(this),t=0,n=arguments.length;t<n;t++)Fj(e,arguments[t]);return e}});var Kj=fN,Bj=gN.remove;Cn({target:"Set",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=Kj(this),n=!0,r=0,i=arguments.length;r<i;r++)e=Bj(t,arguments[r]),n=n&&e;return!!n}});var Hj=$t,Vj=fN,zj=mN;Cn({target:"Set",proto:!0,real:!0,forced:!0},{every:function(e){var t=Vj(this),n=Hj(e,arguments.length>1?arguments[1]:void 0);return!1!==zj(t,(function(e){if(!n(e,e,t))return!1}),!0)}});var qj=ur,Gj=Qe,Wj=q,Xj=yu,Yj=ht("iterator"),$j=Object,Jj=M,Qj=function(e){if(Wj(e))return!1;var t=$j(e);return void 0!==t[Yj]||"@@iterator"in t||Gj(Xj,qj(t))},Zj=ee,eO=oe("Set"),tO=function(e){return function(e){return Zj(e)&&"number"==typeof e.size&&Jj(e.has)&&Jj(e.keys)}(e)?e:Qj(e)?new eO(e):e},nO=N,rO=tO,iO=FN;Cn({target:"Set",proto:!0,real:!0,forced:!0},{difference:function(e){return nO(iO,this,rO(e))}});var aO=$t,oO=fN,sO=mN,uO=gN.Set,cO=gN.add;Cn({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(e){var t=oO(this),n=aO(e,arguments.length>1?arguments[1]:void 0),r=new uO;return sO(t,(function(e){n(e,e,t)&&cO(r,e)})),r}});var lO=$t,fO=fN,hO=mN;Cn({target:"Set",proto:!0,real:!0,forced:!0},{find:function(e){var t=fO(this),n=lO(e,arguments.length>1?arguments[1]:void 0),r=hO(t,(function(e){if(n(e,e,t))return{value:e}}),!0);return r&&r.value}});var dO=N,pO=tO,gO=$N;Cn({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(e){return dO(gO,this,pO(e))}});var vO=N,mO=tO,yO=aj;Cn({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(e){return vO(yO,this,mO(e))}});var bO=N,wO=tO,SO=fj;Cn({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(e){return bO(SO,this,wO(e))}});var TO=N,EO=tO,xO=bj;Cn({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(e){return TO(xO,this,EO(e))}});var kO=Cn,AO=v,MO=fN,IO=mN,CO=ei,RO=AO([].join),PO=AO([].push);kO({target:"Set",proto:!0,real:!0,forced:!0},{join:function(e){var t=MO(this),n=void 0===e?",":CO(e),r=[];return IO(t,(function(e){PO(r,e)})),RO(r,n)}});var NO=$t,jO=fN,OO=mN,_O=gN.Set,LO=gN.add;Cn({target:"Set",proto:!0,real:!0,forced:!0},{map:function(e){var t=jO(this),n=NO(e,arguments.length>1?arguments[1]:void 0),r=new _O;return OO(t,(function(e){LO(r,n(e,e,t))})),r}});var DO=Pe,UO=fN,FO=mN,KO=TypeError;Cn({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=UO(this),n=arguments.length<2,r=n?void 0:arguments[1];if(DO(e),FO(t,(function(i){n?(n=!1,r=i):r=e(r,i,i,t)})),n)throw KO("Reduce of empty set with no initial value");return r}});var BO=$t,HO=fN,VO=mN;Cn({target:"Set",proto:!0,real:!0,forced:!0},{some:function(e){var t=HO(this),n=BO(e,arguments.length>1?arguments[1]:void 0);return!0===VO(t,(function(e){if(n(e,e,t))return!0}),!0)}});var zO=N,qO=tO,GO=Ij;Cn({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(e){return zO(GO,this,qO(e))}});var WO=N,XO=tO,YO=_j;Cn({target:"Set",proto:!0,real:!0,forced:!0},{union:function(e){return WO(YO,this,XO(e))}});var $O=t(Dj),JO=Cn,QO=a,ZO=$i.f;JO({target:"Object",stat:!0,forced:QO((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:ZO});var e_,t_=te.Object,n_=t((function(e){return t_.getOwnPropertyNames(e)})),r_=nn,i_=N,a_=Qe,o_=se,s_=function(){var e=r_(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},u_=RegExp.prototype,c_=se,l_=function(e){var t=e.flags;return void 0!==t||"flags"in u_||a_(e,"flags")||!o_(u_,e)?t:i_(s_,e)},f_=RegExp.prototype,h_=t((function(e){return e===f_||c_(f_,e)?l_(e):e.flags})),d_={};e_=d_,function(){var t="undefined"!=typeof window?window:e,n={};for(var r in function(e,t,n){var r,i,a,o,s,u,c,l,f,h="function"==typeof kw?Aw:function(e,t,n){e!=Array.prototype&&e!=Object.prototype&&(e[t]=n.value)},d=void 0!==e&&e===this?this:void 0!==t&&null!=t?t:this;function p(){p=function(){},Mw||(d.Symbol=v)}var g,v=(g=0,function(e){return"jscomp_symbol_"+(e||"")+g++});function m(){p();var e=Mw.iterator;e||(e=Mw.iterator=Mw("iterator")),"function"!=typeof Array.prototype[e]&&h(Array.prototype,e,{configurable:!0,writable:!0,value:function(){return y(this)}}),m=function(){}}function y(e){var t=0;return b((function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}))}function b(e){return m(),(e={next:e})[Mw.iterator]=function(){return this},e}function w(e){m();var t=jw(e);return t?t.call(e):y(e)}function S(e,t){if(t){for(var n=d,r=e.split("."),i=0;i<r.length-1;i++){var a=r[i];a in n||(n[a]={}),n=n[a]}(a=t(i=n[r=r[r.length-1]]))!=i&&null!=a&&h(n,r,{configurable:!0,writable:!0,value:a})}}function T(e){return function(e){function t(t){return e.next(t)}function n(t){return e.throw(t)}return new Zy((function(r,i){!function e(a){a.done?r(a.value):Zy.resolve(a.value).then(t,n).then(e,i)}(e.next())}))}(e())}S("Promise",(function(e){function t(e){this.h=0,this.l=void 0,this.g=[];var t=this.i();try{e(t.resolve,t.reject)}catch(n){t.reject(n)}}function n(){this.g=null}function r(e){return e instanceof t?e:new t((function(t){t(e)}))}if(e)return e;n.prototype.h=function(e){null==this.g&&(this.g=[],this.j()),this.g.push(e)},n.prototype.j=function(){var e=this;this.i((function(){e.m()}))};var i=QS;n.prototype.i=function(e){i(e,0)},n.prototype.m=function(){for(;this.g&&this.g.length;){var e=this.g;this.g=[];for(var t=0;t<e.length;++t){var n=e[t];e[t]=null;try{n()}catch(r){this.l(r)}}}this.g=null},n.prototype.l=function(e){this.i((function(){throw e}))},t.prototype.i=function(){function e(e){return function(r){n||(n=!0,e.call(t,r))}}var t=this,n=!1;return{resolve:e(this.C),reject:e(this.j)}},t.prototype.C=function(e){if(e===this)this.j(new TypeError("A Promise cannot resolve to itself"));else if(e instanceof t)this.F(e);else{e:switch(Rl(e)){case"object":var n=null!=e;break e;case"function":n=!0;break e;default:n=!1}n?this.A(e):this.m(e)}},t.prototype.A=function(e){var t=void 0;try{t=e.then}catch(n){return void this.j(n)}"function"==typeof t?this.J(t,e):this.m(e)},t.prototype.j=function(e){this.o(2,e)},t.prototype.m=function(e){this.o(1,e)},t.prototype.o=function(e,t){if(0!=this.h)throw Error("Cannot settle("+e+", "+t+"): Promise already settled in state"+this.h);this.h=e,this.l=t,this.u()},t.prototype.u=function(){if(null!=this.g){for(var e=0;e<this.g.length;++e)a.h(this.g[e]);this.g=null}};var a=new n;return t.prototype.F=function(e){var t=this.i();e.nc(t.resolve,t.reject)},t.prototype.J=function(e,t){var n=this.i();try{e.call(t,n.resolve,n.reject)}catch(r){n.reject(r)}},t.prototype.then=function(e,n){function r(e,t){return"function"==typeof e?function(t){try{i(e(t))}catch(n){a(n)}}:t}var i,a,o=new t((function(e,t){i=e,a=t}));return this.nc(r(e,i),r(n,a)),o},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype.nc=function(e,t){function n(){switch(r.h){case 1:e(r.l);break;case 2:t(r.l);break;default:throw Error("Unexpected state: "+r.h)}}var r=this;null==this.g?a.h(n):this.g.push(n)},t.resolve=r,t.reject=function(e){return new t((function(t,n){n(e)}))},t.race=function(e){return new t((function(t,n){for(var i=w(e),a=i.next();!a.done;a=i.next())r(a.value).nc(t,n)}))},t.all=function(e){var n=w(e),i=n.next();return i.done?r([]):new t((function(e,t){function a(t){return function(n){o[t]=n,0==--s&&e(o)}}var o=[],s=0;do{o.push(void 0),s++,r(i.value).nc(a(o.length-1),t),i=n.next()}while(!i.done)}))},t})),S("Promise.prototype.finally",(function(e){return e||function(e){return this.then((function(t){return Zy.resolve(e()).then((function(){return t}))}),(function(t){return Zy.resolve(e()).then((function(){throw t}))}))}}));var E,x="function"==typeof Cw?Cw:function(e){function t(){}return t.prototype=e,new t};if("function"==typeof Rw)E=Rw;else{var k;e:{var A={};try{A.__proto__={a:!0},k=A.a;break e}catch(g){}k=!1}E=k?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var M=E;function I(e,t){if(e.prototype=x(t.prototype),e.prototype.constructor=e,M)M(e,t);else for(var n in t)if("prototype"!=n)if(kw){var r=dw(t,n);r&&Aw(e,n,r)}else e[n]=t[n];e.Lg=t.prototype}function C(){this.l=!1,this.i=null,this.B=void 0,this.s=1,this.h=this.j=0,this.o=this.g=null}function R(e){if(e.l)throw new TypeError("Generator is already running");e.l=!0}function P(e,t){e.g={ce:t,ne:!0},e.s=e.j||e.h}function N(e,t,n){return e.s=n,{value:t}}function j(e){e.s=0}function O(e,t,n){e.j=t,null!=n&&(e.h=n)}function _(e,t){e.j=0,e.h=t||0}function L(e,t){e.s=t,e.j=0}function D(e){e.j=0;var t=e.g.ce;return e.g=null,t}function U(e){e.o=[e.g],e.j=0,e.h=0}function F(e,t){var n,r=Wd(n=e.o).call(n,0)[0];(r=e.g=e.g||r)?r.ne?e.s=e.j||e.h:null!=r.I&&e.h<r.I?(e.s=r.I,e.g=null):e.s=e.h:e.s=t}function K(e){this.g=new C,this.h=e}function B(e,t,n,r){try{var i=t.call(e.g.i,n);if(!(i instanceof Object))throw new TypeError("Iterator result "+i+" is not an object");if(!i.done)return e.g.l=!1,i;var a=i.value}catch(o){return e.g.i=null,P(e.g,o),H(e)}return e.g.i=null,r.call(e.g,a),H(e)}function H(e){for(;e.g.s;)try{var t=e.h(e.g);if(t)return e.g.l=!1,{value:t.value,done:!1}}catch(n){e.g.B=void 0,P(e.g,n)}if(e.g.l=!1,e.g.g){if(t=e.g.g,e.g.g=null,t.ne)throw t.ce;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function V(e){this.next=function(t){return R(e.g),e.g.i?t=B(e,e.g.i.next,t,e.g.m):(e.g.m(t),t=H(e)),t},this.throw=function(t){return R(e.g),e.g.i?t=B(e,e.g.i.throw,t,e.g.m):(P(e.g,t),t=H(e)),t},this.return=function(t){return function(e,t){R(e.g);var n=e.g.i;return n?B(e,"return"in n?n.return:function(e){return{value:e,done:!0}},t,e.g.return):(e.g.return(t),H(e))}(e,t)},m(),this[Iw]=function(){return this}}function z(e,t){return V.prototype=e.prototype,new V(new K(t))}function q(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function G(e,t,n){e instanceof String&&(e=String(e));for(var r=e.length,i=0;i<r;i++){var a=e[i];if(t.call(n,a,i,e))return{le:i,Qe:a}}return{le:-1,Qe:void 0}}function W(e,t,n){if(null==e)throw new TypeError("The 'this' value for String.prototype."+n+" must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype."+n+" must not be a regular expression");return e+""}C.prototype.m=function(e){this.B=e},C.prototype.return=function(e){this.g={return:e},this.s=this.h},C.prototype.I=function(e){this.s=e},S("Array.prototype.keys",(function(e){return e||function(){return function(e,t){m(),e instanceof String&&(e+="");var n=0,r={next:function(){if(n<e.length){var i=n++;return{value:t(i,e[i]),done:!1}}return r.next=function(){return{done:!0,value:void 0}},r.next()}};return r[Iw]=function(){return r},r}(this,(function(e){return e}))}})),S("WeakMap",(function(e){function t(e){if(this.g=(a+=Math.random()+1).toString(),e){p(),m(),e=w(e);for(var t;!(t=e.next()).done;)t=t.value,this.set(t[0],t[1])}}function n(e){q(e,i)||h(e,i,{value:{}})}function r(e){var t=Object[e];t&&(Object[e]=function(e){return n(e),t(e)})}if(function(){if(!e||!ZM)return!1;try{var t=ZM({}),n=ZM({}),r=new e([[t,2],[n,3]]);return 2==r.get(t)&&3==r.get(n)&&(r.delete(t),r.set(n,4),!r.has(t)&&4==r.get(n))}catch(i){return!1}}())return e;var i="$jscomp_hidden_"+Math.random();r("freeze"),r("preventExtensions"),r("seal");var a=0;return t.prototype.set=function(e,t){if(n(e),!q(e,i))throw Error("WeakMap key fail: "+e);return e[i][this.g]=t,this},t.prototype.get=function(e){return q(e,i)?e[i][this.g]:void 0},t.prototype.has=function(e){return q(e,i)&&q(e[i],this.g)},t.prototype.delete=function(e){return!(!q(e,i)||!q(e[i],this.g))&&delete e[i][this.g]},t})),S("Map",(function(e){function t(){var e={};return e.Na=e.next=e.head=e}function n(e,t){var n=e.g;return b((function(){if(n){for(;n.head!=e.g;)n=n.Na;for(;n.next!=n.head;)return n=n.next,{done:!1,value:t(n)};n=null}return{done:!0,value:void 0}}))}function r(e,t){var n=t&&Rl(t);"object"==n||"function"==n?a.has(t)?n=a.get(t):(n=""+ ++o,a.set(t,n)):n="p_"+t;var r=e.h[n];if(r&&q(e.h,n))for(var i=0;i<r.length;i++){var s=r[i];if(t!=t&&s.key!=s.key||t===s.key)return{id:n,list:r,index:i,ga:s}}return{id:n,list:r,index:-1,ga:void 0}}function i(e){if(this.h={},this.g=t(),this.size=0,e){e=w(e);for(var n;!(n=e.next()).done;)n=n.value,this.set(n[0],n[1])}}if(function(){if(!e||"function"!=typeof e||!sI(e.prototype)||"function"!=typeof ZM)return!1;try{var t=ZM({x:4}),n=new e(w([[t,"s"]]));if("s"!=n.get(t)||1!=n.size||n.get({x:4})||n.set({x:4},"t")!=n||2!=n.size)return!1;var r=sI(n).call(n),i=r.next();return!i.done&&i.value[0]==t&&"s"==i.value[1]&&!((i=r.next()).done||4!=i.value[0].x||"t"!=i.value[1]||!r.next().done)}catch(a){return!1}}())return e;p(),m();var a=new qC;i.prototype.set=function(e,t){var n=r(this,e);return n.list||(n.list=this.h[n.id]=[]),n.ga?n.ga.value=t:(n.ga={next:this.g,Na:this.g.Na,head:this.g,key:e,value:t},n.list.push(n.ga),this.g.Na.next=n.ga,this.g.Na=n.ga,this.size++),this},i.prototype.delete=function(e){var t;return!(!(e=r(this,e)).ga||!e.list||(Wd(t=e.list).call(t,e.index,1),e.list.length||delete this.h[e.id],e.ga.Na.next=e.ga.next,e.ga.next.Na=e.ga.Na,e.ga.head=null,this.size--,0))},i.prototype.clear=function(){this.h={},this.g=this.g.Na=t(),this.size=0},i.prototype.has=function(e){return!!r(this,e).ga},i.prototype.get=function(e){return(e=r(this,e).ga)&&e.value},i.prototype.entries=function(){return n(this,(function(e){return[e.key,e.value]}))},i.prototype.keys=function(){return n(this,(function(e){return e.key}))},i.prototype.values=function(){return n(this,(function(e){return e.value}))},i.prototype.forEach=function(e,t){for(var n,r=sI(this).call(this);!(n=r.next()).done;)n=n.value,e.call(t,n[1],n[0],this)},i.prototype[Iw]=sI(i.prototype);var o=0;return i})),S("Set",(function(e){function t(e){if(this.g=new AP,e){e=w(e);for(var t;!(t=e.next()).done;)this.add(t.value)}this.size=this.g.size}return function(){if(!e||"function"!=typeof e||!sI(e.prototype)||"function"!=typeof ZM)return!1;try{var t=ZM({x:4}),n=new e(w([t]));if(!n.has(t)||1!=n.size||n.add(t)!=n||1!=n.size||n.add({x:4})!=n||2!=n.size)return!1;var r=sI(n).call(n),i=r.next();return!i.done&&i.value[0]==t&&i.value[1]==t&&!(i=r.next()).done&&i.value[0]!=t&&4==i.value[0].x&&i.value[1]==i.value[0]&&r.next().done}catch(a){return!1}}()?e:(p(),m(),t.prototype.add=function(e){return this.g.set(e,e),this.size=this.g.size,this},t.prototype.delete=function(e){return e=this.g.delete(e),this.size=this.g.size,e},t.prototype.clear=function(){this.g.clear(),this.size=0},t.prototype.has=function(e){return this.g.has(e)},t.prototype.entries=function(){var e;return sI(e=this.g).call(e)},t.prototype.values=function(){var e;return OP(e=this.g).call(e)},t.prototype.keys=OP(t.prototype),t.prototype[Iw]=OP(t.prototype),t.prototype.forEach=function(e,t){var n,r=this;Gf(n=this.g).call(n,(function(n){return e.call(t,n,n,r)}))},t)})),S("Array.prototype.findIndex",(function(e){return e||function(e,t){return G(this,e,t).le}})),S("Array.prototype.find",(function(e){return e||function(e,t){return G(this,e,t).Qe}})),S("String.prototype.startsWith",(function(e){return e||function(e,t){for(var n=W(this,e,"startsWith"),r=n.length,i=e.length,a=Math.max(0,Math.min(0|t,n.length)),o=0;o<i&&a<r;)if(n[a++]!=e[o++])return!1;return o>=i}})),S("Object.is",(function(e){return e||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}})),S("Array.prototype.includes",(function(e){return e||function(e,t){var n=this;n instanceof String&&(n=String(n));var r=n.length,i=t||0;for(0>i&&(i=Math.max(i+r,0));i<r;i++){var a=n[i];if(a===e||_P(a,e))return!0}return!1}})),S("String.prototype.includes",(function(e){return e||function(e,t){var n;return-1!==Hh(n=W(this,e,"includes")).call(n,e,t||0)}})),S("Array.from",(function(e){return e||function(e,t,n){m(),t=null!=t?t:function(e){return e};var r=[],i=jw(e);if("function"==typeof i)for(e=i.call(e);!(i=e.next()).done;)r.push(t.call(n,i.value));else{i=e.length;for(var a=0;a<i;a++)r.push(t.call(n,e[a]))}return r}}));var X="function"==typeof rw?rw:function(e,t){for(var n=1;n<arguments.length;n++){var r=arguments[n];if(r)for(var i in r)q(r,i)&&(e[i]=r[i])}return e};S("Object.assign",(function(e){return e||X}));var Y=this;function $(e,t){var n,r=e.split("."),i=Y;r[0]in i||!i.execScript||i.execScript("var "+r[0]);for(;r.length&&(n=r.shift());)r.length||void 0===t?i=i[n]?i[n]:i[n]={}:i[n]=t}function J(e,t){function n(){}n.prototype=t.prototype,e.Lg=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.Wg=function(e,n,r){return t.prototype[n].apply(e,xd(Array.prototype).call(arguments,2))}}function Q(e){this.i=Math.exp(Math.log(.5)/e),this.h=this.g=0}function Z(e,t,n){var r=Math.pow(e.i,t);n=n*(1-r)+r*e.g,isNaN(n)||(e.g=n,e.h+=t)}function ee(e){return e.g/(1-Math.pow(e.i,e.h))}function te(){this.h=new Q(2),this.i=new Q(5),this.g=0}Y.g=!0,te.prototype.getBandwidthEstimate=function(e){return 128e3>this.g?e:Math.min(ee(this.h),ee(this.i))};var ne={sb:0,kc:function(){},ba:function(){},error:function(){},v:function(){},info:function(){},debug:function(){},K:function(){},O:function(){}};function re(e,t,n,r){for(var i=[],a=3;a<arguments.length;++a)i[a-3]=arguments[a];this.severity=e,this.category=t,this.code=n,this.data=i,this.handled=!1}e.console&&Pw(e.console.log)&&(ne.ba=Pw(r=console.warn).call(r,console),ne.kc=Pw(i=console.error).call(i,console),1<=ne.sb&&(ne.error=Pw(a=console.error).call(a,console)),2<=ne.sb&&(ne.v=Pw(o=console.warn).call(o,console)),3<=ne.sb&&(ne.info=Pw(s=console.info).call(s,console)),4<=ne.sb&&(ne.debug=Pw(u=console.log).call(u,console)),5<=ne.sb&&(ne.K=Pw(c=console.debug).call(c,console)),6<=ne.sb&&(ne.O=Pw(l=console.debug).call(l,console))),$("shaka.util.Error",re),re.prototype.toString=function(){return"shaka.util.Error "+DA(this,null," ")},re.Severity={RECOVERABLE:1,CRITICAL:2},re.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9},re.Code={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,INVALID_TEXT_HEADER:2e3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,BUFFER_READ_OUT_OF_BOUNDS:3e3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,UNABLE_TO_GUESS_MANIFEST_TYPE:4e3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_MASTER_PLAYLIST_NOT_PROVIDED:4022,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,HLS_AES_128_ENCRYPTION_NOT_SUPPORTED:4034,HLS_INTERNAL_SKIP_STREAM:4035,INVALID_STREAMS_CHOSEN:5005,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,LOAD_INTERRUPTED:7e3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,STORE_ALREADY_IN_PROGRESS:9006,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013};var ie=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function ae(e){var t;e instanceof ae?(oe(this,e.Ba),this.pb=e.pb,this.Aa=e.Aa,se(this,e.Ob),this.pa=e.pa,ue(this,e.g.clone()),this.bb=e.bb):e&&(t=String(e).match(ie))?(oe(this,t[1]||"",!0),this.pb=ce(t[2]||""),this.Aa=ce(t[3]||"",!0),se(this,t[4]),this.pa=ce(t[5]||"",!0),ue(this,t[6]||"",!0),this.bb=ce(t[7]||"")):this.g=new me(null)}function oe(e,t,n){e.Ba=n?ce(t,!0):t,e.Ba&&(e.Ba=e.Ba.replace(/:$/,""))}function se(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.Ob=t}else e.Ob=null}function ue(e,t,n){t instanceof me?e.g=t:(n||(t=le(t,ge)),e.g=new me(t))}function ce(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function le(e,t,n){return"string"==typeof e?(e=encodeURI(e).replace(t,fe),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function fe(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}(f=ae.prototype).Ba="",f.pb="",f.Aa="",f.Ob=null,f.pa="",f.bb="",f.toString=function(){var e=[],t=this.Ba;if(t&&e.push(le(t,he,!0),":"),t=this.Aa){e.push("//");var n=this.pb;n&&e.push(le(n,he,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(t=this.Ob)&&e.push(":",String(t))}return(t=this.pa)&&(this.Aa&&"/"!=t.charAt(0)&&e.push("/"),e.push(le(t,"/"==t.charAt(0)?pe:de,!0))),(t=this.g.toString())&&e.push("?",t),(t=this.bb)&&e.push("#",le(t,ve)),e.join("")},f.resolve=function(e){var t=this.clone();"data"===t.Ba&&(t=new ae);var n=!!e.Ba;n?oe(t,e.Ba):n=!!e.pb,n?t.pb=e.pb:n=!!e.Aa,n?t.Aa=e.Aa:n=null!=e.Ob;var r=e.pa;if(n)se(t,e.Ob);else if(n=!!e.pa){if("/"!=r.charAt(0))if(this.Aa&&!this.pa)r="/"+r;else{var i,a=$P(i=t.pa).call(i,"/");-1!=a&&(r=t.pa.substr(0,a+1)+r)}if(".."==r||"."==r)r="";else if(-1!=Hh(r).call(r,"./")||-1!=Hh(r).call(r,"/.")){a=0==$P(r).call(r,"/",0),r=r.split("/");for(var o=[],s=0;s<r.length;){var u=r[s++];"."==u?a&&s==r.length&&o.push(""):".."==u?((1<o.length||1==o.length&&""!=o[0])&&o.pop(),a&&s==r.length&&o.push("")):(o.push(u),a=!0)}r=o.join("/")}}return n?t.pa=r:n=""!==e.g.toString(),n?ue(t,e.g.clone()):n=!!e.bb,n&&(t.bb=e.bb),t},f.clone=function(){return new ae(this)};var he=/[#\/\?@]/g,de=/[#\?:]/g,pe=/[#\?]/g,ge=/[#\?@]/g,ve=/#/g;function me(e){this.g=e||null}(f=me.prototype).na=null,f.qc=null,f.add=function(e,t){if(!this.na&&(this.na={},this.qc=0,this.g))for(var n=this.g.split("&"),r=0;r<n.length;r++){var i,a=Hh(i=n[r]).call(i,"="),o=null;if(0<=a){var s=n[r].substring(0,a);o=n[r].substring(a+1)}else s=n[r];s=decodeURIComponent(s.replace(/\+/g," ")),o=o||"",this.add(s,decodeURIComponent(o.replace(/\+/g," ")))}return this.g=null,(n=this.na.hasOwnProperty(e)&&this.na[e])||(this.na[e]=n=[]),n.push(t),this.qc++,this},f.toString=function(){if(this.g)return this.g;if(!this.na)return"";var e,t=[];for(e in this.na)for(var n=encodeURIComponent(e),r=this.na[e],i=0;i<r.length;i++){var a=n;""!==r[i]&&(a+="="+encodeURIComponent(r[i])),t.push(a)}return this.g=t.join("&")},f.clone=function(){var e=new me;if(e.g=this.g,this.na){var t,n={};for(t in this.na){var r;n[t]=nd(r=this.na[t]).call(r)}e.na=n,e.qc=this.qc}return e};var ye={df:function(e,t){var n;return uN(e).call(e,Pw(n=function(e,t,n){return t.catch(Pw(e).call(e,null,n))}).call(n,null,t),Zy.reject())},Rc:function(e,t){return nd(e).call(e,t)},Bc:function(){},Ra:function(e){return null!=e}};function be(e,t){var n,r,i;if(0==t.length)return e;var a=Mb(t).call(t,(function(e){return new ae(e)}));return Mb(n=uN(r=Mb(i=Mb(e).call(e,(function(e){return new ae(e)}))).call(i,(function(e){var t;return Mb(a).call(a,Pw(t=e.resolve).call(t,e))}))).call(r,ye.Rc,[])).call(n,(function(e){return e.toString()}))}function we(e,t){return{keySystem:e,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:t||[],keyIds:[]}}var Se={Za:"video",Sb:"audio",za:"text",Ug:"image",Sg:"application"},Te=1/15;function Ee(){var e,t,n=new Zy((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function xe(e){if(!e)return"";239==(e=new Uint8Array(e))[0]&&187==e[1]&&191==e[2]&&(e=e.subarray(3)),e=Ce(e),e=escape(e);try{return decodeURIComponent(e)}catch(t){throw new re(2,2,2004)}}function ke(e,t,n){if(!e)return"";if(!n&&0!=e.byteLength%2)throw ne.error("Data has an incorrect length, must be even."),new re(2,2,2004);if(e instanceof ArrayBuffer)var r=e;else(n=new Uint8Array(e.byteLength)).set(new Uint8Array(e)),r=n.buffer;e=Math.floor(e.byteLength/2),n=new Uint16Array(e),r=new DataView(r);for(var i=0;i<e;i++)n[i]=r.getUint16(2*i,t);return Ce(n)}function Ae(e){var t,n=new Uint8Array(e);if(239==n[0]&&187==n[1]&&191==n[2])return xe(n);if(254==n[0]&&255==n[1])return ke(n.subarray(2),!1);if(255==n[0]&&254==n[1])return ke(n.subarray(2),!0);var r=Pw(t=function(e,t){return e.byteLength<=t||32<=e[t]&&126>=e[t]}).call(t,null,n);if(ne.debug("Unable to find byte-order-mark, making an educated guess."),0==n[0]&&0==n[2])return ke(e,!1);if(0==n[1]&&0==n[3])return ke(e,!0);if(r(0)&&r(1)&&r(2)&&r(3))return xe(e);throw new re(2,2,2003)}function Me(e){e=encodeURIComponent(e),e=unescape(e);for(var t=new Uint8Array(e.length),n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t.buffer}function Ie(e,t){for(var n=new Uint8Array(2*e.length),r=new DataView(n.buffer),i=0;i<e.length;++i)r.setUint16(2*i,e.charCodeAt(i),t);return n.buffer}function Ce(e){if(!Re)for(var t=function(e){try{var t=new Uint8Array(e);return 0<String.fromCharCode.apply(null,t).length}catch(n){return!1}},n={size:65536};0<n.size;(n={size:n.size}).size/=2)if(t(n.size)){Re=function(e){return function(t){for(var n="",r=0;r<t.length;r+=e.size)n+=String.fromCharCode.apply(null,t.subarray(r,r+e.size));return n}}(n);break}return Re(e)}Ee.prototype.resolve=function(){},Ee.prototype.reject=function(){},$("shaka.util.StringUtils.fromUTF8",xe),$("shaka.util.StringUtils.fromUTF16",ke),$("shaka.util.StringUtils.fromBytesAutoDetect",Ae),$("shaka.util.StringUtils.toUTF8",Me),$("shaka.util.StringUtils.toUTF16",Ie);var Re=null;$("shaka.util.StringUtils.resetFromCharCode",(function(){Re=null}));var Pe={Mc:function(t,n){var r=Ce(t);return n=null==n||n,r=e.btoa(r).replace(/\+/g,"-").replace(/\//g,"_"),n?r:r.replace(/=*$/,"")}};function Ne(){var e,t;this.g=new muxjs.mp4.Transmuxer({keepOriginalTimestamps:!0}),this.h=null,this.l=[],this.i=[],this.j=!1,this.g.on("data",Pw(e=this.o).call(e,this)),this.g.on("done",Pw(t=this.m).call(t,this))}function je(t,n){return!(!e.muxjs||"mp2t"!=t.toLowerCase().split(";")[0].split("/")[1])&&(n?MediaSource.isTypeSupported(Oe(n,t)):MediaSource.isTypeSupported(Oe("audio",t))||MediaSource.isTypeSupported(Oe("video",t)))}function Oe(e,t){var n=t.replace(/mp2t/i,"mp4");"audio"==e&&(n=n.replace("video","audio"));var r=/avc1\.(66|77|100)\.(\d+)/.exec(n);if(r){var i="avc1.",a=r[1],o=Number(r[2]);i=("66"==a?i+"4200":"77"==a?i+"4d00":i+"6400")+(o>>4).toString(16),i+=(15&o).toString(16),n=n.replace(r[0],i)}return n}function _e(e){this.h=e,this.g=null}function Le(e){this.h=e,this.g=null}function De(e,t){var n={maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0};this.o=null==e.maxAttempts?n.maxAttempts:e.maxAttempts,this.j=null==e.baseDelay?n.baseDelay:e.baseDelay,this.m=null==e.fuzzFactor?n.fuzzFactor:e.fuzzFactor,this.l=null==e.backoffFactor?n.backoffFactor:e.backoffFactor,this.g=0,this.h=this.j,(this.i=void 0!==t&&t)&&(this.g=1)}function Ue(e){return T((function t(){var n,r;return z(t,(function(t){switch(t.s){case 1:if(e.g>=e.o){if(!e.i)return t.return(Zy.reject());e.g=1,e.h=e.j}return n=e.g,e.g++,0==n?t.return():(r=e.h*(1+(2*Math.random()-1)*e.m),N(t,new Zy((function(e){new Le(e).V(r/1e3)})),2));case 2:e.h*=e.l,j(t)}}))}))}function Fe(e,t){this.promise=e,this.se=t,this.g=!1}function Ke(e){return new Fe(Zy.reject(e),(function(){return Zy.resolve()}))}function Be(){var e=Zy.reject(new re(2,7,7001));return e.catch((function(){})),new Fe(e,(function(){return Zy.resolve()}))}function He(e){return new Fe(Zy.resolve(e),(function(){return Zy.resolve()}))}function Ve(e){return new Fe(e,(function(){return e.catch((function(){}))}))}function ze(e){return new Fe(Zy.all(Mb(e).call(e,(function(e){return e.promise}))),(function(){return Zy.all(Mb(e).call(e,(function(e){return e.abort()})))}))}function qe(t,n){for(var r in n=void 0===n?{}:n)this[r]=n[r];this.defaultPrevented=this.cancelable=this.bubbles=!1,this.timeStamp=e.performance&&e.performance.now?e.performance.now():CT(),this.type=t,this.isTrusted=!1,this.target=this.currentTarget=null,this.g=!1}function Ge(){this.g={}}function We(){this.hd=new Ge,this.jc=this}function Xe(e){var t=new $O;return function e(n){switch(Rl(n)){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return n;default:if(!n||n.buffer&&n.buffer.constructor==ArrayBuffer)return n;if(t.has(n))return null;var r=n.constructor==Array;if(n.constructor!=Object&&!r)return null;t.add(n);var i,a=r?[]:{};for(i in n)a[i]=e(n[i]);return r&&(a.length=n.length),a}}(e)}function Ye(e,t){return!("number"!=typeof e||"number"!=typeof t||!isNaN(e)||!isNaN(t))||e===t}function $e(e,t){var n=Hh(e).call(e,t);-1<n&&Wd(e).call(e,n,1)}function Je(e,t,n){if(n||(n=Ye),e.length!=t.length)return!1;t=xd(t).call(t);for(var r={},i=(e=w(e)).next();!i.done;r={item:r.item},i=e.next()){if(r.item=i.value,-1==(i=rE(t).call(t,function(e){return function(t){return n(e.item,t)}}(r))))return!1;t[i]=t[t.length-1],t.pop()}return 0==t.length}function Qe(){this.g=[]}function Ze(e,t){e.g.push(t.finally((function(){$e(e.g,t)})))}function et(e){We.call(this),this.j=!1,this.l=new Qe,this.g=new $O,this.h=new $O,this.i=e||null}$("shaka.util.Uint8ArrayUtils.toBase64",Pe.Mc),Pe.Ja=function(t){t=e.atob(t.replace(/-/g,"+").replace(/_/g,"/"));for(var n=new Uint8Array(t.length),r=0;r<t.length;++r)n[r]=t.charCodeAt(r);return n},$("shaka.util.Uint8ArrayUtils.fromBase64",Pe.Ja),Pe.$c=function(e){for(var t=new Uint8Array(e.length/2),n=0;n<e.length;n+=2)t[n/2]=Sb(e.substr(n,2),16);return t},$("shaka.util.Uint8ArrayUtils.fromHex",Pe.$c),Pe.Nc=function(e){for(var t="",n=0;n<e.length;++n){var r=e[n].toString(16);1==r.length&&(r="0"+r),t+=r}return t},$("shaka.util.Uint8ArrayUtils.toHex",Pe.Nc),Pe.Ha=function(e,t){if(!e&&!t)return!0;if(!e||!t||e.length!=t.length)return!1;for(var n=0;n<e.length;++n)if(e[n]!=t[n])return!1;return!0},$("shaka.util.Uint8ArrayUtils.equal",Pe.Ha),Pe.concat=function(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];for(var r=n=0;r<t.length;++r)n+=t[r].length;n=new Uint8Array(n);for(var i=r=0;i<t.length;++i)n.set(t[i],r),r+=t[i].length;return n},$("shaka.util.Uint8ArrayUtils.concat",nd(Pe)),Ne.prototype.destroy=function(){return this.g.dispose(),this.g=null,Zy.resolve()},Ne.prototype.o=function(e){this.i=e.captions;var t=new Uint8Array(e.data.byteLength+e.initSegment.byteLength);t.set(e.initSegment,0),t.set(e.data,e.initSegment.byteLength),this.l.push(t)},Ne.prototype.m=function(){var e={data:nd(Pe).apply(null,this.l),captions:this.i};this.h.resolve(e),this.j=!1},_e.prototype.V=function(t){var n=this;this.stop();var r=!0,i=null;return this.g=function(){e.clearTimeout(i),r=!1},i=QS((function(){r&&n.h()}),1e3*t),this},_e.prototype.stop=function(){this.g&&(this.g(),this.g=null)},$("shaka.util.Timer",Le),Le.prototype.Lc=function(){return this.stop(),this.h(),this},Le.prototype.tickNow=Le.prototype.Lc,Le.prototype.V=function(e){var t=this;return this.stop(),this.g=new _e((function(){t.h()})).V(e),this},Le.prototype.tickAfter=Le.prototype.V,Le.prototype.Oa=function(e){var t=this;return this.stop(),this.g=new _e((function(){t.g.V(e),t.h()})).V(e),this},Le.prototype.tickEvery=Le.prototype.Oa,Le.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)},Le.prototype.stop=Le.prototype.stop,$("shaka.util.AbortableOperation",Fe),Fe.failed=Ke,Fe.aborted=Be,Fe.completed=He,Fe.notAbortable=Ve,Fe.prototype.abort=function(){return this.g=!0,this.se()},Fe.prototype.abort=Fe.prototype.abort,Fe.all=ze,Fe.prototype.finally=function(e){return this.promise.then((function(){return e(!0)}),(function(){return e(!1)})),this},Fe.prototype.finally=Fe.prototype.finally,Fe.prototype.ca=function(e,t){function n(n){return function(s){if(i.g&&n)a.reject(o);else{var u=n?e:t;u?r=function(e,t,n){try{var r=e(t);return r&&r.promise&&r.abort?(n.resolve(r.promise),function(){return r.abort()}):(n.resolve(r),function(){return Zy.resolve(r).then((function(){}),(function(){}))})}catch(i){return n.reject(i),function(){return Zy.resolve()}}}(u,s,a):(n?a.resolve:a.reject)(s)}}}function r(){return a.reject(o),i.abort()}var i=this,a=new Ee,o=new re(2,7,7001);return this.promise.then(n(!0),n(!1)),new Fe(a,(function(){return r()}))},Fe.prototype.chain=Fe.prototype.ca,$("shaka.util.FakeEvent",qe),qe.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},qe.prototype.stopImmediatePropagation=function(){this.g=!0},qe.prototype.stopPropagation=function(){},(f=Ge.prototype).push=function(e,t){this.g.hasOwnProperty(e)?this.g[e].push(t):this.g[e]=[t]},f.get=function(e){return(e=this.g[e])?xd(e).call(e):null},f.getAll=function(){var e,t=[];for(e in this.g)t.push.apply(t,this.g[e]);return t},f.remove=function(e,t){var n=this.g[e];if(n)for(var r=0;r<n.length;++r)n[r]==t&&(Wd(n).call(n,r,1),--r)},f.forEach=function(e){for(var t in this.g)e(t,this.g[t])},f.size=function(){return ad(this.g).length},We.prototype.addEventListener=function(e,t){this.hd.push(e,t)},We.prototype.removeEventListener=function(e,t){this.hd.remove(e,t)},We.prototype.dispatchEvent=function(e){for(var t=this.hd.get(e.type)||[],n=0;n<t.length;++n){e.target=this.jc,e.currentTarget=this.jc;var r=t[n];try{r.handleEvent?r.handleEvent(e):r.call(this,e)}catch(i){ne.error("Uncaught exception in event handler",i,i?i.message:null,i?i.stack:null)}if(e.g)break}return e.defaultPrevented},Qe.prototype.destroy=function(){var e,t=[];return Gf(e=this.g).call(e,(function(e){e.promise.catch((function(){})),t.push(e.abort())})),this.g=[],Zy.all(t)},J(et,We),$("shaka.net.NetworkingEngine",et),et.RequestType={MANIFEST:0,SEGMENT:1,LICENSE:2,APP:3,TIMING:4},et.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:3};var tt={};function nt(e,t,n){n=n||3;var r=tt[e];(!r||n>=r.priority)&&(tt[e]={priority:n,mg:t})}function rt(e,t){return{uris:e,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:t,licenseRequestType:null,sessionId:null}}function it(e,t,n,r,i,a,o){var s=new ae(n.uris[i]),u=s.Ba,c=!1;u||(u=location.protocol,oe(s,u=xd(u).call(u,0,-1)),n.uris[i]=s.toString()),u=u.toLowerCase();var l,f=(u=tt[u])?u.mg:null;return f?Ve(Ue(r)).ca((function(){return e.j?Be():(l=CT(),f(n.uris[i],n,t,(function(n,r,i){e.i&&1==t&&(e.i(n,r),c=!0,o.g=i)})))})).ca((function(e){return null==e.timeMs&&(e.timeMs=CT()-l),{response:e,Nf:c}}),(function(s){if(s&&7001==s.code)throw s;if(e.j)return Be();if(s&&1==s.severity)return e.dispatchEvent(new qe("retry",{error:s instanceof re?s:null})),i=(i+1)%n.uris.length,it(e,t,n,r,i,s,o);throw s||a})):Ke(new re(2,1,1e3,s))}function at(){this.g=0}function ot(e,t,n){Fe.call(this,e,t),this.h=n}function st(){}function ut(){this.g=new Ge}function ct(e,t,n,r){this.target=e,this.type=t,this.listener=n,this.g=function(e,t){var n;if(null==t)return!1;if("boolean"==typeof t)return t;var r=new $O(["passive","capture"]);return Hb(n=ad(t)).call(n,(function(e){return!r.has(e)})),function(e){var t=lt;if(null==t){t=!1;try{var n={},r={get:function(){return t=!0,!1}};Aw(n,"passive",r),Aw(n,"capture",r),r=function(){},e.addEventListener("test",r,n),e.removeEventListener("test",r,n)}catch(i){t=!1}lt=t}return t||!1}(e)?t:t.capture||!1}(e,r),this.target.addEventListener(t,n,this.g)}et.registerScheme=nt,et.unregisterScheme=function(e){delete tt[e]},et.prototype.og=function(e){this.g.add(e)},et.prototype.registerRequestFilter=et.prototype.og,et.prototype.Ng=function(e){this.g.delete(e)},et.prototype.unregisterRequestFilter=et.prototype.Ng,et.prototype.bf=function(){this.g.clear()},et.prototype.clearAllRequestFilters=et.prototype.bf,et.prototype.pg=function(e){this.h.add(e)},et.prototype.registerResponseFilter=et.prototype.pg,et.prototype.Og=function(e){this.h.delete(e)},et.prototype.unregisterResponseFilter=et.prototype.Og,et.prototype.cf=function(){this.h.clear()},et.prototype.clearAllResponseFilters=et.prototype.cf,et.defaultRetryParameters=function(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0}},et.makeRequest=rt,et.prototype.destroy=function(){return this.j=!0,this.g.clear(),this.h.clear(),this.l.destroy()},et.prototype.destroy=et.prototype.destroy,et.prototype.request=function(e,t){var n=this,r=new at;if(this.j){var i=Zy.reject(new re(2,7,7001));return i.catch((function(){})),new ot(i,(function(){return Zy.resolve()}),r)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?Xe(t.retryParameters):{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},t.uris=Xe(t.uris),i=function(e,t,n){for(var r=He(void 0),i={},a=(e=w(e.g)).next();!a.done;i={Gd:i.Gd},a=e.next())i.Gd=a.value,r=r.ca(function(e){return function(){return e.Gd(t,n)}}(i));return r.ca(void 0,(function(e){if(e&&7001==e.code)throw e;throw new re(2,1,1006,e)}))}(this,e,t);var a=i.ca((function(){return it(n,e,t,new De(t.retryParameters,!1),0,null,r)})),o=a.ca((function(t){return function(e,t,n){for(var r=He(void 0),i=(e=w(e.h)).next();!i.done;i=e.next()){var a;r=r.ca(Pw(a=i.value).call(a,null,t,n.response))}return r.ca((function(){return n}),(function(e){if(e&&7001==e.code)throw e;var t=2;throw e instanceof re&&(t=e.severity),new re(t,1,1007,e)}))}(n,e,t)})),s=CT(),u=0;i.promise.then((function(){u=CT()-s}),(function(){}));var c=0;return a.promise.then((function(){c=CT()}),(function(){})),i=new ot((i=o.ca((function(t){var r=CT()-c,i=t.response;return i.timeMs+=u,i.timeMs+=r,t.Nf||!n.i||i.fromCache||1!=e||n.i(i.timeMs,i.data.byteLength),i}),(function(e){throw e&&(e.severity=2),e}))).promise,i.se,r),Ze(this.l,i),i},et.prototype.request=et.prototype.request,et.NumBytesRemainingClass=at,I(ot,Fe),et.PendingRequest=ot,ot.all=ze,ot.notAbortable=Ve,ot.completed=He,ot.aborted=Be,ot.failed=Ke,$("shaka.util.IReleasable",st),st.prototype.release=function(){},$("shaka.util.EventManager",ut),ut.prototype.release=function(){this.nb(),this.g=null},ut.prototype.release=ut.prototype.release,ut.prototype.H=function(e,t,n,r){this.g&&(e=new ct(e,t,n,r),this.g.push(t,e))},ut.prototype.listen=ut.prototype.H,ut.prototype.ya=function(e,t,n,r){var i=this;this.H(e,t,(function r(a){i.ta(e,t,r),n(a)}),r)},ut.prototype.listenOnce=ut.prototype.ya,ut.prototype.ta=function(e,t,n){if(this.g)for(var r=this.g.get(t)||[],i=(r=w(r)).next();!i.done;i=r.next())(i=i.value).target!=e||n!=i.listener&&n||(i.ta(),this.g.remove(t,i))},ut.prototype.unlisten=ut.prototype.ta,ut.prototype.nb=function(){if(this.g){for(var e=this.g.getAll(),t=(e=w(e)).next();!t.done;t=e.next())t.value.ta();this.g.g={}}},ut.prototype.removeAll=ut.prototype.nb,ct.prototype.ta=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1},ct.prototype.unlisten=ct.prototype.ta;var lt=void 0;function ft(e){return new ae(e=Ae(e)).Aa}function ht(e,t,n){function r(e){new DataView(i.buffer).setUint32(a,e.byteLength,!0),a+=4,i.set(e,a),a+=e.byteLength}if(!n||!n.byteLength)throw new re(2,6,6015);t="string"==typeof t?new Uint8Array(Ie(t,!0)):new Uint8Array(t),e=Ie(e=Ae(e),!0);var i=new Uint8Array(12+e.byteLength+t.byteLength+n.byteLength),a=0;return r(new Uint8Array(e)),r(t),r(new Uint8Array(n)),i}function dt(e,t){for(var n=[],r=w(e),i=r.next();!i.done;i=r.next())n.push(t(i.value));return n}function pt(e,t){for(var n=w(e),r=n.next();!r.done;r=n.next())if(!t(r.value))return!1;return!0}function gt(e){var t,n=new AP;return Gf(t=ad(e)).call(t,(function(t){n.set(t,e[t])})),n}function vt(e){var t={};return Gf(e).call(e,(function(e,n){t[n]=e})),t}function mt(e,t){var n=e;return t&&(n+='; codecs="'+t+'"'),n}function yt(e){return(e=e.split(/ *; */)).shift(),(e=Jh(e).call(e,(function(e){return oM(e).call(e,"codecs=")})))?e.split("=")[1].replace(/^"|"$/g,""):""}function bt(e){var t=(e=e.split("."))[0];return e.pop(),[t,e.join(".")]}$("shaka.util.FairPlayUtils.defaultGetContentId",ft),$("shaka.util.FairPlayUtils.initDataTransform",ht);var wt=(new AP).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function St(){return!(!e.MediaSource||!MediaSource.isTypeSupported)}function Tt(e){return""!=Mt().canPlayType(e)}function Et(){return At("Tizen")}function xt(){var e;return!!navigator.vendor&&SM(e=navigator.vendor).call(e,"Apple")&&!Et()}function kt(){if(!xt())return null;var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?Sb(e[1],10):null}function At(e){var t;return SM(t=navigator.userAgent||"").call(t,e)}function Mt(){return Ct||(It||(It=new Le((function(){Ct=null}))),(Ct=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Ct=document.createElement("video")),It.V(1),Ct)}var It=null,Ct=null;function Rt(e,t){var n=this;t=void 0===t?1:t,this.J=e,this.C=new $O,this.m=this.o=null,this.Z=!1,this.P=0,this.g=null,this.u=new ut,this.h=new AP,this.F=[],this.A=new Ee,this.j=null,this.l=function(t){n.A.reject(t),e.onError(t)},this.wa=new AP,this.da=new AP,this.X=new Le((function(){return function(e){var t=e.wa,n=e.da;n.clear(),Gf(t).call(t,(function(e,t){return n.set(t,e)})),(t=Yw(OP(n).call(n))).length&&iT(t).call(t,(function(e){return"expired"==e}))&&e.l(new re(2,6,6014)),e.J.Dc(vt(n))}(n)})),this.i=!1,this.ua=new Ee,this.L=!1,this.M=[],this.va=!1,this.ea=new Le((function(){!function(e){var t;Gf(t=e.h).call(t,(function(t,n){var r=t.xd,i=n.expiration;isNaN(i)&&(i=1/0),i!=r&&(e.J.onExpirationUpdated(n.sessionId,i),t.xd=i)}))}(n)})).Oa(t),this.A.catch((function(){}))}function Pt(e,t,n){return e.F=n,e.L=0<n.length,Nt(e,t)}function Nt(t,n){var r=function(t){if(0==(t=gt(t.j.clearKeys)).size)return null;var n=[],r=[];Gf(t).call(t,(function(e,t){var i=Pe.$c(t),a=Pe.$c(e);i={kty:"oct",kid:Pe.Mc(i,!1),k:Pe.Mc(a,!1)},n.push(i),r.push(i.kid)})),t=DA({keys:n});var i=DA({kids:r});return i=[{initData:new Uint8Array(Me(i)),initDataType:"keyids"}],{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+e.btoa(t),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:i,keyIds:[]}}(t);if(r)for(var i=w(n),a=i.next();!a.done;a=i.next())a.value.drmInfos=[r];for((r=hS(n).call(n,(function(e){return 0<e.drmInfos.length})))||function(e,t){var n=[];Gf(t).call(t,(function(e,t){n.push({keySystem:t,licenseServerUri:e,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]})}));for(var r=w(e),i=r.next();!i.done;i=r.next())i.value.drmInfos=n}(n,a=gt(t.j.servers)),a=(i=w(n)).next();!a.done;a=i.next())for(var o=(a=w(a.value.drmInfos)).next();!o.done;o=a.next())Yt(o.value,gt(t.j.servers),gt(t.j.advanced||{}));return a=function(e,t){for(var n=new $O,r=w(t),i=r.next();!i.done;i=r.next()){var a=w(i.value.drmInfos);for(i=a.next();!i.done;i=a.next())n.add(i.value)}for(r=w(n),i=r.next();!i.done;i=r.next())Yt(i.value,gt(e.j.servers),gt(e.j.advanced||{}));a=e.L?"required":"optional";var o=e.L?["persistent-license"]:["temporary"];for(r=new AP,n=w(n),i=n.next();!i.done;i=n.next())i=i.value,r.set(i.keySystem,{audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:"optional",persistentState:a,sessionTypes:o,label:i.keySystem,drmInfos:[]});for(n=w(t),i=n.next();!i.done;i=n.next()){a=(i=i.value).audio,o=i.video;var s=a?Ft(a):"",u=o?Ft(o):"",c=w(i.drmInfos);for(i=c.next();!i.done;i=c.next()){i=i.value;var l=r.get(i.keySystem);l.drmInfos.push(i),i.distinctiveIdentifierRequired&&(l.distinctiveIdentifier="required"),i.persistentStateRequired&&(l.persistentState="required"),a&&(l.audioCapabilities.push({robustness:i.audioRobustness||"",contentType:s}),"ac-3"==a.codecs.toLowerCase()&&Et()&&l.audioCapabilities.push({robustness:i.audioRobustness||"",contentType:mt(a.mimeType,"ec-3")})),o&&l.videoCapabilities.push({robustness:i.videoRobustness||"",contentType:u})}}return r}(t,n),a.size?(a=Kt(t,a),r?a:a.catch((function(){}))):(t.Z=!0,Zy.resolve())}function jt(e){return T((function t(){var n;return z(t,(function(t){switch(t.s){case 1:if(!(e.o&&e.g&&e.g.serverCertificate&&e.g.serverCertificate.length)){t.I(0);break}return O(t,3),N(t,e.o.setServerCertificate(e.g.serverCertificate),5);case 5:t.B||ne.v("Server certificates are not supported by the key system. The server certificate has been ignored."),L(t,0);break;case 3:return n=D(t),t.return(Zy.reject(new re(2,6,6004,n.message)))}}))}))}function Ot(e){var t,n=e.g?e.g.initData:[];return Gf(n).call(n,(function(t){return _t(e,t.initDataType,t.initData)})),Gf(t=e.F).call(t,(function(t){return Bt(e,t)})),n.length||e.F.length||e.A.resolve(),e.A}function _t(e,t,n){for(var r,i=OP(r=e.h).call(r),a=(i=w(i)).next();!a.done;a=i.next())if(Pe.Ha(n,a.value.initData)&&!At("Tizen 2"))return void ne.debug("Ignoring duplicate init data.");!function(e,t,n){var r,i;try{if(e.L){ne.K("Creating new persistent session");var o=e.o.createSession("persistent-license")}else ne.K("Creating new temporary session"),o=e.o.createSession()}catch(a){return void e.l(new re(2,6,6005,a.message))}e.u.H(o,"message",Pw(r=e.ye).call(r,e)),e.u.H(o,"keystatuseschange",Pw(i=e.we).call(i,e)),e.h.set(o,{initData:n,loaded:!1,xd:1/0,Ga:null});try{n=e.j.initDataTransform(n,e.g)}catch(a){return t=a,a instanceof re||(t=new re(2,6,6016,a)),void e.l(t)}o.generateRequest(t,n).catch((function(t){if(!e.i){if(e.h.delete(o),t.errorCode&&t.errorCode.systemCode){var n=t.errorCode.systemCode;0>n&&(n+=Math.pow(2,32)),n="0x"+n.toString(16)}e.l(new re(2,6,6006,t.message,t,n))}}))}(e,t,n)}function Lt(e){return e?e.keySystem:""}function Dt(e,t){if(navigator.userAgent.match(/Edge\//))return!0;if(t=t.toLowerCase(),Et()&&SM(t).call(t,'codecs="ac-3"')){var n=t.replace("ac-3","ec-3");return e.C.has(t)||e.C.has(n)}return e.C.has(t)}function Ut(e){var t;return e=dt(e=Lb(t=e.h).call(t),(function(e){return e.sessionId})),Yw(e)}function Ft(e){var t=mt(e.mimeType,e.codecs);return je(t)?Oe(e.type,t):t}function Kt(e,t){var n,r,i,a,o;if(1==t.size&&t.has(""))return Zy.reject(new re(2,6,6e3));for(var s=w(OP(t).call(t)),u=s.next();!u.done;u=s.next())0==(u=u.value).audioCapabilities.length&&delete u.audioCapabilities,0==u.videoCapabilities.length&&delete u.videoCapabilities;var c=s=new Ee;return Gf(n=[!0,!1]).call(n,Pw(r=function(e){var n=this;Gf(t).call(t,(function(t,r){var i,a;hS(i=t.drmInfos).call(i,(function(e){return!!e.licenseServerUri}))==e&&(c=c.catch(Pw(a=function(){if(!this.i)return navigator.requestMediaKeySystemAccess(r,[t])}).call(a,n)))}))}).call(r,e)),c=(c=c.catch((function(){return Zy.reject(new re(2,6,6001))}))).then(Pw(i=function(e){if(this.i)return Zy.reject();this.C.clear();var n=e.getConfiguration(),r=n.videoCapabilities||[],i=w(n.audioCapabilities||[]);for(n=i.next();!n.done;n=i.next())this.C.add(n.value.contentType.toLowerCase());for(n=(r=w(r)).next();!n.done;n=r.next())this.C.add(n.value.contentType.toLowerCase());r=e.keySystem,i=[];var a=[],o=[],s=[];return function(e,t,n,r,i){Gf(e).call(e,(function(e){var a;if(SM(t).call(t,e.licenseServerUri)||t.push(e.licenseServerUri),e.serverCertificate&&(hS(n).call(n,(function(t){return Pe.Ha(t,e.serverCertificate)}))||n.push(e.serverCertificate)),e.initData&&Gf(a=e.initData).call(a,(function(e){hS(r).call(r,(function(t){return!(!t.keyId||t.keyId!=e.keyId)||t.initDataType==e.initDataType&&Pe.Ha(t.initData,e.initData)}))||r.push(e)})),e.keyIds)for(var o=0;o<e.keyIds.length;++o)SM(i).call(i,e.keyIds[o])||i.push(e.keyIds[o])}))}((n=t.get(e.keySystem)).drmInfos,i,a,o,s),1<a.length&&ne.v("Multiple unique server certificates found! Only the first will be used."),1<i.length&&ne.v("Multiple unique license server URIs found! Only the first will be used."),this.g={keySystem:r,licenseServerUri:i[0],distinctiveIdentifierRequired:"required"==n.distinctiveIdentifier,persistentStateRequired:"required"==n.persistentState,audioRobustness:(n.audioCapabilities?n.audioCapabilities[0].robustness:"")||"",videoRobustness:(n.videoCapabilities?n.videoCapabilities[0].robustness:"")||"",serverCertificate:a[0],initData:o,keyIds:s},this.g.licenseServerUri?e.createMediaKeys():Zy.reject(new re(2,6,6012,this.g.keySystem))}).call(i,e)).then(Pw(a=function(e){if(this.i)return Zy.reject();ne.info("Created MediaKeys object for key system",this.g.keySystem),this.o=e,this.Z=!0}).call(a,e)).catch(Pw(o=function(e){if(!this.i)return this.g=null,this.C.clear(),e instanceof re?Zy.reject(e):Zy.reject(new re(2,6,6002,e.message))}).call(o,e)),s.reject(),c}function Bt(e,t){var n,r,i,a;try{ne.K("Attempting to load an offline session",t);var o=e.o.createSession("persistent-license")}catch(c){var s=new re(2,6,6005,c.message);return e.l(s),Zy.reject(s)}e.u.H(o,"message",Pw(n=e.ye).call(n,e)),e.u.H(o,"keystatuseschange",Pw(r=e.we).call(r,e));var u={initData:null,loaded:!1,xd:1/0,Ga:null};return e.h.set(o,u),o.load(t).then(Pw(i=function(e){return this.i?Zy.reject():(ne.O("Loaded offline session",t,e),e?(u.loaded=!0,Xt(this)&&this.A.resolve(),o):(this.h.delete(o),void this.l(new re(2,6,6013))))}).call(i,e),Pw(a=function(e){this.i||(this.h.delete(o),this.l(new re(2,6,6005,e.message)))}).call(a,e))}function Ht(e,t){var n;if(oM(n=Lt(t)).call(n,"com.apple.fps")){var r=t.serverCertificate;e=ht(e,ft(e),r)}return e}function Vt(e,t){var n,r,i,a,o=t.target;ne.K("Sending license request for session",o.sessionId,"of type",t.messageType);var s=e.h.get(o),u=e.g.licenseServerUri,c=e.j.advanced[e.g.keySystem];"individualization-request"==t.messageType&&c&&c.individualizationServer&&(u=c.individualizationServer),(u=rt([u],e.j.retryParameters)).body=t.message,u.method="POST",u.licenseRequestType=t.messageType,u.sessionId=o.sessionId,"com.microsoft.playready"!=e.g.keySystem&&"com.chromecast.playready"!=e.g.keySystem||function(e){var t=ke(e.body,!0,!0);if(SM(t).call(t,"PlayReadyKeyMessage")){ne.debug("Unwrapping PlayReady request.");for(var n=(t=(new DOMParser).parseFromString(t,"application/xml")).getElementsByTagName("HttpHeader"),r=0;r<n.length;++r)e.headers[n[r].getElementsByTagName("name")[0].textContent]=n[r].getElementsByTagName("value")[0].textContent;e.body=Pe.Ja(t.getElementsByTagName("Challenge")[0].textContent).buffer}else ne.debug("PlayReady request is already unwrapped."),e.headers["Content-Type"]="text/xml; charset=utf-8"}(u),oM(n=e.g.keySystem).call(n,"com.apple.fps")&&e.j.fairPlayTransform&&function(e){var t=new Uint8Array(e.body);t="spc="+Pe.Mc(t),e.headers["Content-Type"]="application/x-www-form-urlencoded",e.body=Me(t)}(u);var l=CT();e.J.Ib.request(2,u).promise.then(Pw(r=function(e){var t,n;return this.i?Zy.reject():(oM(t=this.g.keySystem).call(t,"com.apple.fps")&&this.j.fairPlayTransform&&function(e){try{var t=xe(e.data)}catch(o){return}"<ckc>"===(t=xT(t).call(t)).substr(0,5)&&"</ckc>"===t.substr(-6)&&(t=xd(t).call(t,5,-6));try{t=JSON.parse(t).ckc}catch(o){}e.data=Pe.Ja(t).buffer}(e),this.P+=(CT()-l)/1e3,ne.K("Updating session",o.sessionId),o.update(e.data).then(Pw(n=function(){var e=this;this.J.onEvent(new qe("drmsessionupdate")),s&&(s.Ga&&s.Ga.resolve(),new Le((function(){s.loaded=!0,Xt(e)&&e.A.resolve()})).V(Jt))}).call(n,this)))}).call(r,e),Pw(i=function(e){this.i||(e=new re(2,6,6007,e),this.l(e),s&&s.Ga&&s.Ga.reject(e))}).call(i,e)).catch(Pw(a=function(e){this.i||(e=new re(2,6,6008,e.message),this.l(e),s&&s.Ga&&s.Ga.reject(e))}).call(a,e))}function zt(){var e,t=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],n=[{videoCapabilities:t,persistentState:"required",sessionTypes:["persistent-license"]},{videoCapabilities:t}],r=new AP;return t=Mb(e="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" ")).call(e,(function(e){return t=e,T((function e(){var i,a,o;return z(e,(function(e){switch(e.s){case 1:return O(e,2),N(e,navigator.requestMediaKeySystemAccess(t,n),4);case 4:return i=e.B,o=!!(a=i.getConfiguration().sessionTypes)&&SM(a).call(a,"persistent-license"),At("Tizen 3")&&(o=!1),r.set(t,{persistentState:o}),N(e,i.createMediaKeys(),5);case 5:L(e,0);break;case 2:D(e),r.set(t,null),j(e)}}))}));var t})),Zy.all(t).then((function(){return vt(r)}))}function qt(e,t){var n,r=t.audio,i=t.video;if(r&&r.encrypted&&!Dt(e,r=Ft(r))||i&&i.encrypted&&!Dt(e,i=Ft(i)))return!1;var a=Lt(e.g);return 0==t.drmInfos.length||hS(n=t.drmInfos).call(n,(function(e){return e.keySystem==a}))}function Gt(e,t){if(!e.length)return t;if(!t.length)return e;for(var n=[],r=0;r<e.length;r++)for(var i=0;i<t.length;i++)if(e[r].keySystem==t[i].keySystem){var a=e[r];i=t[i];var o=[];o=nd(o).call(o,a.initData||[]),o=nd(o).call(o,i.initData||[]);var s=[];s=nd(s).call(s,a.keyIds),s=nd(s).call(s,i.keyIds),n.push({keySystem:a.keySystem,licenseServerUri:a.licenseServerUri||i.licenseServerUri,distinctiveIdentifierRequired:a.distinctiveIdentifierRequired||i.distinctiveIdentifierRequired,persistentStateRequired:a.persistentStateRequired||i.persistentStateRequired,videoRobustness:a.videoRobustness||i.videoRobustness,audioRobustness:a.audioRobustness||i.audioRobustness,serverCertificate:a.serverCertificate||i.serverCertificate,initData:o,keyIds:s});break}return n}function Wt(e){return T((function t(){var n;return z(t,(function(t){var r;if(1===t.s)return n=Yw(Lb(r=e.h).call(r)),e.h.clear(),N(t,Zy.all(Mb(n).call(n,(function(e){return T((function t(){return z(t,(function(t){switch(t.s){case 1:return ne.K("Closing session",e.sessionId),O(t,2),N(t,function(e){return T((function t(){var n;return z(t,(function(t){switch(t.s){case 1:return n=new Zy((function(e,t){new Le(t).V($t)})),O(t,2),N(t,Zy.race([Zy.all([e.close(),e.closed]),n]),4);case 4:L(t,0);break;case 2:D(t),ne.v("Timeout waiting for session close"),j(t)}}))}))}(e),4);case 4:L(t,0);break;case 2:D(t),j(t)}}))}))}))),0)}))}))}function Xt(e){var t;return pt(e=OP(t=e.h).call(t),(function(e){return e.loaded}))}function Yt(t,n,r){!t.keySystem||"org.w3.clearkey"==t.keySystem&&t.licenseServerUri||(n.size&&(n=n.get(t.keySystem)||"",t.licenseServerUri=n),t.keyIds||(t.keyIds=[]),(r=r.get(t.keySystem))&&(t.distinctiveIdentifierRequired||(t.distinctiveIdentifierRequired=r.distinctiveIdentifierRequired),t.persistentStateRequired||(t.persistentStateRequired=r.persistentStateRequired),t.videoRobustness||(t.videoRobustness=r.videoRobustness),t.audioRobustness||(t.audioRobustness=r.audioRobustness),t.serverCertificate||(t.serverCertificate=r.serverCertificate)),e.cast&&e.cast.__platform__&&"com.microsoft.playready"==t.keySystem&&(t.keySystem="com.chromecast.playready"))}(f=Rt.prototype).destroy=function(){var e=this;return T((function t(){return z(t,(function(t){switch(t.s){case 1:return e.i?N(t,e.ua,0):(e.i=!0,N(t,function(e){return T((function t(){return z(t,(function(t){switch(t.s){case 1:return e.u.release(),e.u=null,e.A.reject(),e.ea.stop(),e.ea=null,e.X.stop(),e.X=null,N(t,Wt(e),2);case 2:if(!e.m){t.I(3);break}return O(t,4),N(t,e.m.setMediaKeys(null),6);case 6:L(t,5);break;case 4:D(t);case 5:e.m=null;case 3:e.g=null,e.C.clear(),e.o=null,e.F=[],e.j=null,e.l=null,e.J=null,j(t)}}))}))}(e),4));case 4:e.ua.resolve(),t.I(0)}}))}))},f.configure=function(e){this.j=e},f.Ub=function(e){var t=this;if(!this.o)return this.u.ya(e,"encrypted",(function(){t.l(new re(2,6,6010))})),Zy.resolve();this.m=e,this.u.ya(this.m,"play",(function(){for(var e=0;e<t.M.length;e++)Vt(t,t.M[e]);t.va=!0,t.M=[]})),"webkitCurrentPlaybackTargetIsWireless"in this.m&&this.u.H(this.m,"webkitcurrentplaybacktargetiswirelesschanged",(function(){return Wt(t)})),e=(e=this.m.setMediaKeys(this.o)).catch((function(e){return Zy.reject(new re(2,6,6003,e.message))}));var n=jt(this);return Zy.all([e,n]).then((function(){if(t.i)return Zy.reject();Ot(t),t.g.initData.length||t.F.length||t.u.H(t.m,"encrypted",(function(e){return _t(t,e.initDataType,new Uint8Array(e.initData))}))})).catch((function(e){if(!t.i)return Zy.reject(e)}))},f.Xb=function(){for(var e,t=1/0,n=Lb(e=this.h).call(e),r=(n=w(n)).next();!r.done;r=n.next())r=r.value,isNaN(r.expiration)||(t=Math.min(t,r.expiration));return t},f.ye=function(e){this.m&&this.j.delayLicenseRequestUntilPlayed&&this.m.paused&&!this.va?this.M.push(e):Vt(this,e)},f.we=function(e){var t,n;e=e.target,ne.O("Key status changed for session",e.sessionId);var r=this.h.get(e),i=!1;Gf(t=e.keyStatuses).call(t,Pw(n=function(e,t){if("string"==typeof t){var n=t;t=e,e=n}if("com.microsoft.playready"==this.g.keySystem&&16==t.byteLength&&(At("Trident/")||navigator.userAgent.match(/Edge?\//))){var a=(n=new DataView(t)).getUint32(0,!0),o=n.getUint16(4,!0),s=n.getUint16(6,!0);n.setUint32(0,a,!1),n.setUint16(4,o,!1),n.setUint16(6,s,!1)}"com.microsoft.playready"==this.g.keySystem&&"status-pending"==e&&(e="usable"),"status-pending"!=e&&(r.loaded=!0),"expired"==e&&(i=!0),n=Pe.Nc(new Uint8Array(t)),this.wa.set(n,e)}).call(n,this));var a=e.expiration-CT();(0>a||i&&1e3>a)&&r&&!r.Ga&&(ne.debug("Session has expired",e.sessionId),this.h.delete(e),e.close().catch((function(){}))),Xt(this)&&(this.A.resolve(),this.X.V(Qt))};var $t=1,Jt=5,Qt=.5;function Zt(){this.g=new muxjs.mp4.CaptionParser,this.l=[],this.j={}}function en(){}function tn(e){return!e||1==e.length&&1e-6>e.end(0)-e.start(0)?null:e.length?e.end(e.length-1):null}function nn(e,t,n){return n=void 0===n?0:n,!(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0)||t>e.end(e.length-1))&&t+n>=e.start(0)}function rn(e,t){if(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0))return 0;for(var n=0,r=e.length-1;0<=r&&e.end(r)>t;--r)n+=e.end(r)-Math.max(e.start(r),t);return n}function an(e){if(!e)return[];for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t}function on(e,t,n){this.startTime=e,this.direction=hn,this.endTime=t,this.payload=n,this.region=new wn,this.position=null,this.positionAlign=sn,this.size=0,this.textAlign=un,this.writingMode=dn,this.lineInterpretation=pn,this.line=null,this.lineHeight="",this.lineAlign=gn,this.displayAlign=ln,this.fontSize=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=mn,this.fontStyle=yn,this.fontFamily="",this.textDecoration=[],this.wrapLine=!0,this.id="",this.nestedCues=[],this.spacer=!1}Zt.prototype.init=function(e){var t=muxjs.mp4.probe;e=new Uint8Array(e),this.l=t.videoTrackIds(e),this.j=t.timescale(e),this.g.init()},Zt.prototype.h=function(e,t){var n=new Uint8Array(e);(n=this.g.parse(n,this.l,this.j))&&n.captions&&t(n.captions),this.g.clearParsedCaptions()},Zt.prototype.i=function(){this.g.resetCaptionStream()},en.prototype.init=function(){},en.prototype.h=function(){},en.prototype.i=function(){},$("shaka.text.Cue",on),on.prototype.clone=function(){var e,t=new on(0,0,"");for(e in this){var n;t[e]=this[e],t[e]&&t[e].constructor==Array&&(t[e]=xd(n=t[e]).call(n))}return t};var sn="auto";on.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:sn};var un="center",cn={LEFT:"left",RIGHT:"right",CENTER:un,START:"start",END:"end"};on.textAlign=cn;var ln="after",fn={BEFORE:"before",CENTER:"center",AFTER:ln};on.displayAlign=fn;var hn="ltr";on.direction={HORIZONTAL_LEFT_TO_RIGHT:hn,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var dn="horizontal-tb";on.writingMode={HORIZONTAL_TOP_TO_BOTTOM:dn,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var pn=0;on.lineInterpretation={LINE_NUMBER:pn,PERCENTAGE:1};var gn="start",vn={CENTER:"center",START:gn,END:"end"};on.lineAlign=vn;var mn=400;on.fontWeight={NORMAL:mn,BOLD:700};var yn="normal",bn={NORMAL:yn,ITALIC:"italic",OBLIQUE:"oblique"};function wn(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Sn,this.scroll=Tn}on.fontStyle=bn,on.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"},$("shaka.text.CueRegion",wn);var Sn=1;wn.units={PX:0,PERCENTAGE:Sn,LINES:2};var Tn="";function En(e){this.l=null,this.i=e,this.j=this.A=0,this.m=1/0,this.h=this.g=null,this.u="",this.o=new AP}wn.scrollMode={NONE:Tn,UP:"up"};var xn={};function kn(t){return!!(xn[t]||e.muxjs&&"application/cea-608"==t)}function An(e,t){"application/cea-608"!=t&&(e.l=new xn[t])}function Mn(e,t,n,r,i){for(var a=n+" "+r,o=new AP,s=(t=w(t)).next();!s.done;s=t.next()){var u=s.value;s=u.stream,o.has(s)||o.set(s,new AP),o.get(s).has(a)||o.get(s).set(a,[]),u.startTime+=i,u.endTime+=i,u.startTime>=e.j&&u.startTime<e.m&&(u=new on(u.startTime,u.endTime,u.text),o.get(s).get(a).push(u),s==e.u&&e.i.append([u]))}for(a=(i=w(Lb(o).call(o))).next();!a.done;a=i.next())for(a=a.value,e.o.has(a)||e.o.set(a,new AP),s=(t=w(Lb(c=o.get(a)).call(c))).next();!s.done;s=t.next()){var c;s=s.value,u=o.get(a).get(s),e.o.get(a).set(s,u)}e.g=null==e.g?Math.max(n,e.j):Math.min(e.g,Math.max(n,e.j)),e.h=Math.max(e.h,Math.min(r,e.m))}function In(e,t,n){this.j=e,this.l=n,this.h={},this.g=null,this.i={},this.o=new ut,this.F=!1,this.u={},this.A=t,this.C=new Ee,this.m=function(e,t){var n=new MediaSource;return e.o.ya(n,"sourceopen",(function(){jA.revokeObjectURL(e.J),t.resolve()})),e.J=Cn(n),e.j.src=e.J,n}(this,this.C),this.J=""}$("shaka.text.TextEngine.registerParser",(function(e,t){xn[e]=t})),$("shaka.text.TextEngine.unregisterParser",(function(e){delete xn[e]})),En.prototype.destroy=function(){return this.i=this.l=null,this.o.clear(),Zy.resolve()},En.prototype.xc=function(e){try{return this.l.parseMedia(new Uint8Array(e),{periodStart:0,segmentStart:null,segmentEnd:0})[0].startTime}catch(t){throw new re(2,2,2009,t)}},En.prototype.remove=function(e,t){var n;return Zy.resolve().then(Pw(n=function(){!this.i||!this.i.remove(e,t)||null==this.g||t<=this.g||e>=this.h||(e<=this.g&&t>=this.h?this.g=this.h=null:e<=this.g&&t<this.h?this.g=t:e>this.g&&t>=this.h&&(this.h=e))}).call(n,this))};var Cn=jA.createObjectURL;function Rn(e){var t=mt(e.mimeType,e.codecs),n=function(e){var t=[e.mimeType];return Gf(wt).call(wt,(function(n,r){var i=e[r];i&&t.push(n+'="'+i+'"')})),t.join(";")}(e);return kn(t)||MediaSource.isTypeSupported(n)||je(t,e.type)}function Pn(e,t){e.g||(e.g=new En(e.l)),An(e.g,t)}function Nn(e){return!e.m||"ended"==e.m.readyState}function jn(e,t){if("text"==t)var n=e.g.g;else n=!(n=_n(e,t))||1==n.length&&1e-6>n.end(0)-n.start(0)?null:1==n.length&&0>n.start(0)?0:n.length?n.start(0):null;return n}function On(e,t){return"text"==t?e.g.h:tn(_n(e,t))}function _n(e,t){try{return e.h[t].buffered}catch(n){return t in e.h&&ne.error("failed to get buffered range for "+t,n),null}}function Ln(t,n,r,i,a,o){var s,u;return"text"==n?function(e,t,n,r){var i;return Zy.resolve().then(Pw(i=function(){if(this.l&&this.i)if(null==n||null==r)this.l.parseInit(new Uint8Array(t));else{var e,i,a={periodStart:this.A,segmentStart:n,segmentEnd:r};a=Hb(e=this.l.parseMedia(new Uint8Array(t),a)).call(e,Pw(i=function(e){return e.startTime>=this.j&&e.startTime<this.m}).call(i,this)),this.i.append(a),null==this.g&&(this.g=Math.max(n,this.j)),this.h=Math.min(r,this.m)}}).call(i,e))}(t.g,r,i,a):t.u[n]?function(e,t){e.j=!0,e.h=new Ee,e.l=[],e.i=[];var n=new Uint8Array(t);return e.g.push(n),e.g.flush(),e.j&&e.h.reject(new re(2,3,3018)),e.h}(t.u[n],r).then(Pw(s=function(e){var t;return this.g||Pn(this,"text/vtt"),e.captions&&e.captions.length&&Mn(this.g,e.captions,i,a,this.h.video.timestampOffset),Fn(this,n,Pw(t=this.Me).call(t,this,n,e.data.buffer))}).call(s,t)):(o&&e.muxjs&&(t.g||Pn(t,"text/vtt"),null==i&&null==a?t.A.init(r):t.A.h(r,(function(e){e.length&&Mn(t.g,e,i,a,t.h.video.timestampOffset)}))),Fn(t,n,Pw(u=t.Me).call(u,t,n,r)))}function Dn(e,t){var n=On(e,"video")||0;!function(e,t,n){if(e.u=t,t=e.o.get(t))for(var r=w(Lb(t).call(t)),i=r.next();!i.done;i=r.next()){var a;(i=Hb(a=t.get(i.value)).call(a,(function(e){return e.endTime<=n})))&&e.i.append(i)}}(e.g,t,n)}function Un(e,t){var n;return"text"==t?e.g?(e.A.i(),e.g.remove(0,1/0)):Zy.resolve():Fn(e,t,Pw(n=e.Ne).call(n,e,t,0,e.m.duration))}function Fn(e,t,n){if(e.F)return Zy.reject();if(n={start:n,p:new Ee},e.i[t].push(n),1==e.i[t].length)try{n.start()}catch(r){"QuotaExceededError"==r.name?n.p.reject(new re(2,3,3017,t)):n.p.reject(new re(2,3,3015,r)),Bn(e,t)}return n.p}function Kn(e,t){var n,r;if(e.F)return Zy.reject();var i,a=[];for(i in e.h){var o,s=new Ee,u={start:Pw(o=function(e){e.resolve()}).call(o,null,s),p:s};e.i[i].push(u),a.push(s),1==e.i[i].length&&u.start()}return Zy.all(a).then(Pw(n=function(){try{t()}catch(r){var e=Zy.reject(new re(2,3,3015,r))}for(var n in this.h)Bn(this,n);return e}).call(n,e),Pw(r=function(e){throw e}).call(r,e))}function Bn(e,t){e.i[t].shift();var n=e.i[t][0];if(n)try{n.start()}catch(r){n.p.reject(new re(2,3,3015,r)),Bn(e,t)}}function Hn(e,t){return e=zn(e),t=zn(t),e.split("-")[0]==t.split("-")[0]}function Vn(e,t){e=zn(e),t=zn(t);var n=e.split("-"),r=t.split("-");return n[0]==r[0]&&1==n.length&&2==r.length}function zn(e){var t=e.split("-");return e=t[0]||"",t=t[1]||"",e=e.toLowerCase(),e=Wn.get(e)||e,(t=t.toUpperCase())?e+"-"+t:e}function qn(e){return e.language?zn(e.language):e.audio&&e.audio.language?zn(e.audio.language):e.video&&e.video.language?zn(e.video.language):"und"}function Gn(e,t){for(var n=zn(e),r=new $O,i=w(t),a=i.next();!a.done;a=i.next())r.add(zn(a.value));for(a=(i=w(r)).next();!a.done;a=i.next())if((a=a.value)==n)return a;for(a=(i=w(r)).next();!a.done;a=i.next())if(Vn(a=a.value,n))return a;for(a=(i=w(r)).next();!a.done;a=i.next()){var o=a=a.value,s=n;if(o=zn(o),s=zn(s),o=o.split("-"),s=s.split("-"),2==o.length&&2==s.length&&o[0]==s[0])return a}for(a=(r=w(r)).next();!a.done;a=r.next())if(Vn(n,i=a.value))return i;return null}(f=In.prototype).destroy=function(){var e=this;this.F=!0;var t,n=[];for(t in this.i){var r=this.i[t],i=r[0];for(this.i[t]=xd(r).call(r,0,1),i&&n.push(i.p.catch(ye.Bc)),i=1;i<r.length;++i)r[i].p.reject()}for(var a in this.g&&n.push(this.g.destroy()),this.l&&n.push(this.l.destroy()),this.u)n.push(this.u[a].destroy());return Zy.all(n).then((function(){e.o&&(e.o.release(),e.o=null),e.j&&(e.j.removeAttribute("src"),e.j.load(),e.j=null),e.m=null,e.g=null,e.l=null,e.h={},e.u={},e.A=null,e.i={}}))},f.init=function(e,t){var n=this;return T((function r(){var i;return z(r,(function(r){switch(r.s){case 1:return i=Se,N(r,n.C,2);case 2:Gf(e).call(e,(function(e,r){var a,o,s=mt(e.mimeType,e.codecs);r==i.za?Pn(n,s):(!t&&MediaSource.isTypeSupported(s)||!je(s,r)||(n.u[r]=new Ne,s=Oe(r,s)),s=n.m.addSourceBuffer(s),n.o.H(s,"error",Pw(a=n.Dg).call(a,n,r)),n.o.H(s,"updateend",Pw(o=n.Lb).call(o,n,r)),n.h[r]=s,n.i[r]=[])})),j(r)}}))}))},f.bd=function(e){if(e.total=an(this.j.buffered),e.audio=an(_n(this,"audio")),e.video=an(_n(this,"video")),e.text=[],this.g){var t=this.g.g,n=this.g.h;null!=t&&null!=n&&e.text.push({start:t,end:n})}},f.remove=function(e,t,n){var r;return"text"==e?this.g.remove(t,n):Fn(this,e,Pw(r=this.Ne).call(r,this,e,t,n))},f.flush=function(e){var t;return"text"==e?Zy.resolve():Fn(this,e,Pw(t=this.lf).call(t,this,e))},f.endOfStream=function(e){var t;return Kn(this,Pw(t=function(){Nn(this)||(e?this.m.endOfStream(e):this.m.endOfStream())}).call(t,this))},f.Fa=function(e){var t;return Kn(this,Pw(t=function(){this.m.duration=e}).call(t,this))},f.ha=function(){return this.m.duration},f.Me=function(e,t){this.h[e].appendBuffer(t)},f.Ne=function(e,t,n){n<=t?this.Lb(e):this.h[e].remove(t,n)},f.Ve=function(e){var t=this.h[e].appendWindowStart,n=this.h[e].appendWindowEnd;this.h[e].abort(),this.h[e].appendWindowStart=t,this.h[e].appendWindowEnd=n,this.Lb(e)},f.lf=function(e){this.j.currentTime-=.001,this.Lb(e)},f.Cg=function(e,t){0>t&&(t+=.001),this.h[e].timestampOffset=t,this.Lb(e)},f.zg=function(e,t,n){this.h[e].appendWindowStart=0,this.h[e].appendWindowEnd=n,this.h[e].appendWindowStart=t,this.Lb(e)},f.Dg=function(e){this.i[e][0].p.reject(new re(2,3,3014,this.j.error?this.j.error.code:0))},f.Lb=function(e){var t=this.i[e][0];t&&(t.p.resolve(),Bn(this,e))};var Wn=new AP([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze","cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice","is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao","mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san","sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie","vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]),Xn={$d:function(e,t){var n,r=uN(n=e.periods).call(n,(function(e,t){return nd(e).call(e,t.variants)}),[]);r=Xn.ee(r,t),r=Xn.Lf(r),r=Xn.jf(r);for(var i=Xn.kf(r),a=(r=w(e.periods)).next();!a.done;a=r.next()){var o;(a=a.value).variants=Hb(o=a.variants).call(o,(function(e){return Xn.he(e)==i||(ne.debug("Dropping Variant (better codec available)",e),!1)}))}},Lf:function(e){for(var t=new Ge,n=(e=w(e)).next();!n.done;n=e.next()){n=n.value;var r=Xn.he(n);t.push(r,n)}return t},jf:function(e){var t=0,n=new AP,r=e.size();return Gf(e).call(e,(function(e,i){for(var a=w(i),o=a.next();!o.done;o=a.next()){var s=(o=o.value).video;if(s&&s.width&&s.height){s=s.width*s.height*(s.frameRate||1),n.has(s)||n.set(s,new Ge);var u=n.get(s);u.push(e,o),u.size()===r&&(t=Math.max(t,s))}}})),t?n.get(t):e},kf:function(e){var t="",n=1/0;return Gf(e).call(e,(function(e,r){for(var i=0,a=0,o=w(r),s=o.next();!s.done;s=o.next())i+=s.value.bandwidth||0,++a;i/=a,ne.debug("codecs",e,"avg bandwidth",i),i<n&&(t=e,n=i)})),t},he:function(e){var t="";e.video&&(t=bt(e.video.codecs)[0]);var n="";return e.audio&&(n=bt(e.audio.codecs)[0]),t+"-"+n},rd:function(e,t,n){function r(e,t,n){return e>=t&&e<=n}var i=e.video;return!(i&&i.width&&i.height&&(!r(i.width,t.minWidth,Math.min(t.maxWidth,n.width))||!r(i.height,t.minHeight,Math.min(t.maxHeight,n.height))||!r(i.width*i.height,t.minPixels,t.maxPixels))||e&&e.video&&e.video.frameRate&&!r(e.video.frameRate,t.minFrameRate,t.maxFrameRate)||!r(e.bandwidth,t.minBandwidth,t.maxBandwidth))},Xd:function(e,t,n){var r=!1;return Gf(e).call(e,(function(e){var i=e.allowedByApplication;e.allowedByApplication=Xn.rd(e,t,n),i!=e.allowedByApplication&&(r=!0)})),r},filterNewPeriod:function(e,t,n,r){var i,a;r.variants=Hb(i=r.variants).call(i,(function(r){var i;if(e&&e.Z&&!qt(e,r))return ne.debug("Dropping variant - not compatible with key system",r),!1;var a=r.audio;return r=r.video,a&&!Rn(a)?(ne.debug("Dropping variant - audio not compatible with platform",Xn.fb(a)),!1):r&&!Rn(r)||At("Xbox One")&&r&&(r.width&&1920<r.width||r.height&&1080<r.height)&&SM(i=r.codecs).call(i,"avc1.")?(ne.debug("Dropping variant - video not compatible with platform",Xn.fb(r)),!1):a&&t&&!Xn.Yd(a,t)?(ne.debug("Droping variant - not compatible with active audio","active audio",Xn.fb(t),"variant.audio",Xn.fb(a)),!1):!(r&&n&&!Xn.Yd(r,n)&&(ne.debug("Droping variant - not compatible with active video","active video",Xn.fb(n),"variant.video",Xn.fb(r)),1))})),r.textStreams=Hb(a=r.textStreams).call(a,(function(e){var t=kn(mt(e.mimeType,e.codecs));return t||ne.debug("Dropping text stream. Is not supported by the platform.",e),t}))},Yd:function(e,t){return e.mimeType==t.mimeType&&e.codecs.split(".")[0]==t.codecs.split(".")[0]},Oc:function(e){var t,n,r=e.audio,i=e.video,a=r?r.codecs:null,o=i?i.codecs:null,s=[];o&&s.push(o),a&&s.push(a);var u=[];i&&u.push(i.mimeType),r&&u.push(r.mimeType),u=u[0]||null;var c=[];r&&c.push(r.kind),i&&c.push(i.kind),c=c[0]||null;var l=new $O;return r&&Gf(t=r.roles).call(t,(function(e){return l.add(e)})),i&&Gf(n=i.roles).call(n,(function(e){return l.add(e)})),e={id:e.id,active:!1,type:"variant",bandwidth:e.bandwidth,language:e.language,label:null,kind:c,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:u,codecs:s.join(", "),audioCodec:a,videoCodec:o,primary:e.primary,roles:Yw(l),audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null},i&&(e.videoId=i.id,e.originalVideoId=i.originalId,e.width=i.width||null,e.height=i.height||null,e.frameRate=i.frameRate||null,e.pixelAspectRatio=i.pixelAspectRatio||null,e.videoBandwidth=i.bandwidth||null),r&&(e.audioId=r.id,e.originalAudioId=r.originalId,e.channelsCount=r.channelsCount,e.audioSamplingRate=r.audioSamplingRate,e.audioBandwidth=r.bandwidth||null,e.label=r.label,e.audioRoles=r.roles),e},Kc:function(e){return{id:e.id,active:!1,type:"text",bandwidth:0,language:e.language,label:e.label,kind:e.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:e.mimeType,codecs:e.codecs||null,audioCodec:null,videoCodec:null,primary:e.primary,roles:e.roles,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:e.originalId}},gd:function(e){return e.__shaka_id||(e.__shaka_id=Xn.Uf++),e.__shaka_id},Uf:0,Of:function(e){var t=Xn.ke(e);return t.active="disabled"!=e.mode,t.type="text",t.originalTextId=e.id,"captions"==e.kind&&(t.mimeType="application/cea-608"),e.kind&&(t.roles=[e.kind]),t},je:function(e){var t=Xn.ke(e);return t.active=e.enabled,t.type="variant",t.originalAudioId=e.id,"main"==e.kind&&(t.primary=!0),e.kind&&(t.roles=[e.kind],t.audioRoles=[e.kind]),t},ke:function(e){return{id:Xn.gd(e),active:!1,type:"",bandwidth:0,language:zn(e.language),label:e.label,kind:e.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null}},Gb:function(e){return e.allowedByApplication&&e.allowedByKeySystem},Bf:function(e){return Hb(e).call(e,(function(e){return Xn.Gb(e)}))},ee:function(e,t){for(var n=Hb(e).call(e,(function(e){return e.audio&&e.audio.channelsCount})),r=new AP,i=(n=w(n)).next();!i.done;i=n.next()){var a=(i=i.value).audio.channelsCount;r.has(a)||r.set(a,[]),r.get(a).push(i)}return 0==(n=Yw(Lb(r).call(r))).length?e:(i=Hb(n).call(n,(function(e){return e<=t}))).length?r.get(Math.max.apply(null,i)):r.get(Math.min.apply(null,n))},Wb:function(e,t,n){var r,i=e,a=Hb(e).call(e,(function(e){return e.primary}));a.length&&(i=a);var o=i.length?i[0].language:"";if(i=Hb(i).call(i,(function(e){return e.language==o})),t){var s=Gn(zn(t),Mb(e).call(e,(function(e){return e.language})));s&&(i=Hb(e).call(e,(function(e){return zn(e.language)==s})))}if(n){if((e=Xn.de(i,n)).length)return e;ne.v("No exact match for the text role could be found.")}else if((e=Hb(i).call(i,(function(e){return 0==e.roles.length}))).length)return e;return(e=uN(r=Mb(i).call(i,(function(e){return e.roles}))).call(r,ye.Rc,[])).length?Xn.de(i,e[0]):i},de:function(e,t){return Hb(e).call(e,(function(e){var n;return SM(n=e.roles).call(n,t)}))},ie:function(e,t,n){for(var r=0;r<n.length;r++)if(n[r].audio==e&&n[r].video==t)return n[r];return null},Pf:function(e){return"audio"==e.type},Sf:function(e){return"video"==e.type},Kf:function(e){var t=[];return e.audio&&t.push(e.audio),e.video&&t.push(e.video),t},fb:function(e){return Xn.Pf(e)?"type=audio codecs="+e.codecs+" bandwidth="+e.bandwidth+" channelsCount="+e.channelsCount+" audioSamplingRate="+e.audioSamplingRate:Xn.Sf(e)?"type=video codecs="+e.codecs+" bandwidth="+e.bandwidth+" frameRate="+e.frameRate+" width="+e.width+" height="+e.height:"unexpected stream type"}};function Yn(){this.m=null,this.i=!1,this.h=new te,this.l=[],this.o=!1,this.g=this.j=null}function $n(e,t){return e&&(t=Hb(t).call(t,(function(t){return Xn.rd(t,e,{width:1/0,height:1/0})}))),Nh(t).call(t,(function(e,t){return e.bandwidth-t.bandwidth}))}function Jn(e,t){this.g=e,this.h=t}function Qn(e,t){var n=new Jn(2,6),r=tr,i=r.g,a=n.h-i.h;(0<(n.g-i.g||a)?r.i:r.h)(r.g,n,e,t)}function Zn(e,t,n,r){ne.ba([n,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",r].join(" "))}function er(e,t,n,r){ne.kc([n,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",r].join(""))}$("shaka.abr.SimpleAbrManager",Yn),Yn.prototype.stop=function(){this.m=null,this.i=!1,this.l=[],this.j=null},Yn.prototype.stop=Yn.prototype.stop,Yn.prototype.init=function(e){this.m=e},Yn.prototype.init=Yn.prototype.init,Yn.prototype.chooseVariant=function(){var e=$n(this.g.restrictions,this.l),t=this.h.getBandwidthEstimate(this.g.defaultBandwidthEstimate);this.l.length&&!e.length&&(ne.v("No variants met the ABR restrictions. Choosing a variant by lowest bandwidth."),e=[(e=$n(null,this.l))[0]]);for(var n=e[0]||null,r=0;r<e.length;++r){var i=e[r],a=i.bandwidth/this.g.bandwidthDowngradeTarget,o=(e[r+1]||{bandwidth:1/0}).bandwidth/this.g.bandwidthUpgradeTarget;ne.O("Bandwidth ranges:",(i.bandwidth/1e6).toFixed(3),(a/1e6).toFixed(3),(o/1e6).toFixed(3)),t>=a&&t<=o&&(n=i)}return this.j=CT(),n},Yn.prototype.chooseVariant=Yn.prototype.chooseVariant,Yn.prototype.enable=function(){this.i=!0},Yn.prototype.enable=Yn.prototype.enable,Yn.prototype.disable=function(){this.i=!1},Yn.prototype.disable=Yn.prototype.disable,Yn.prototype.segmentDownloaded=function(e,t){ne.O("Segment downloaded:","deltaTimeMs="+e,"numBytes="+t,"lastTimeChosenMs="+this.j,"enabled="+this.i);var n=this.h;if(!(16e3>t)){var r=8e3*t/e,i=e/1e3;n.g+=t,Z(n.h,i,r),Z(n.i,i,r)}if(null!=this.j&&this.i)e:{if(ne.O("Suggesting Streams..."),this.o){if(CT()-this.j<1e3*this.g.switchInterval){ne.O("Still within switch interval...");break e}}else{if(!(128e3<=this.h.g)){ne.O("Still waiting for a good estimate...");break e}this.o=!0}n=this.chooseVariant(),r=this.h.getBandwidthEstimate(this.g.defaultBandwidthEstimate),ne.debug("Calling switch_(), bandwidth="+Math.round(r/1e3)+" kbps"),this.m(n)}},Yn.prototype.segmentDownloaded=Yn.prototype.segmentDownloaded,Yn.prototype.getBandwidthEstimate=function(){return this.h.getBandwidthEstimate(this.g.defaultBandwidthEstimate)},Yn.prototype.getBandwidthEstimate=Yn.prototype.getBandwidthEstimate,Yn.prototype.setVariants=function(e){this.l=e},Yn.prototype.setVariants=Yn.prototype.setVariants,Yn.prototype.configure=function(e){this.g=e},Yn.prototype.configure=Yn.prototype.configure,Jn.prototype.toString=function(){return"v"+this.g+"."+this.h};var tr=null,nr="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),rr="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),ir=["loop","playbackRate"],ar=["pause","play"],or="abrstatuschanged adaptation buffering drmsessionupdate emsg error expirationupdated largegap loading manifestparsed onstatechange onstateidle streaming textchanged texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading variantchanged".split(" "),sr={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,usingEmbeddedTextTrack:2,getLoadMode:10},ur={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},cr=[["getConfiguration","configure"]],lr=[["isTextTrackVisible","setTextTrackVisibility"]],fr="addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectEmbeddedTextTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay".split(" "),hr=["attach","detach","load","unload"];function dr(e){return DA(e,(function(e,t){if("function"!=typeof t){if(t instanceof Event||t instanceof qe){var n={};for(i in t){var r=t[i];r&&"object"==Rl(r)?"detail"==i&&(n[i]=r):i in Event||(n[i]=r)}return n}if(t instanceof Error){var i=new $O(["name","message","stack"]);for(n in t)i.add(n);for(n=(r=w(n_(t))).next();!n.done;n=r.next())i.add(n.value);for(r={},n=(i=w(i)).next();!n.done;n=i.next())r[n=n.value]=t[n];i={__type__:"Error",contents:r}}else if(t instanceof TimeRanges)for(i={__type__:"TimeRanges",length:t.length,start:[],end:[]},n=0;n<t.length;++n)i.start.push(t.start(n)),i.end.push(t.end(n));else i=t instanceof Uint8Array?{__type__:"Uint8Array",entries:Yw(t)}:"number"==typeof t?isNaN(t)?"NaN":isFinite(t)?t:0>t?"-Infinity":"Infinity":t;return i}}))}function pr(e){return JSON.parse(e,(function(e,t){if("NaN"==t)var n=NaN;else if("-Infinity"==t)n=-1/0;else if("Infinity"==t)n=1/0;else if(t&&"object"==Rl(t)&&"TimeRanges"==t.__type__)n=function(e){return{length:e.length,start:function(t){return e.start[t]},end:function(t){return e.end[t]}}}(t);else if(t&&"object"==Rl(t)&&"Uint8Array"==t.__type__)n=new Uint8Array(sI(t));else if(t&&"object"==Rl(t)&&"Error"==t.__type__){n=t.contents;var r,i=Error(n.message);for(r in n)i[r]=n[r];n=i}else n=t;return n}))}function gr(e,t,n,r,i,a){var o,s;this.X=e,this.j=new Le(t),this.Z=n,this.u=!1,this.F=r,this.P=i,this.L=a,this.h=this.m=!1,this.M="",this.o=null,this.A=Pw(o=this.yd).call(o,this),this.C=Pw(s=this.ag).call(s,this),this.g={video:{},player:{}},this.J=0,this.i={},this.l=null,xr.add(this)}var vr=!1,mr=null;function yr(e){for(var t=w(xr),n=t.next();!n.done;n=t.next())br(n.value,e)}function br(e,t){ne.debug("CastSender: onExistingSessionJoined");var n=e.L();e.l=new Ee,e.u=!0,e.Ad(n,t)}function wr(e){for(var t=w(xr),n=t.next();!n.done;n=t.next()){n=n.value;var r=e;ne.debug("CastSender: receiver status",r),vr="available"==r,n.j.Lc()}}function Sr(e){var t=mr;t.removeUpdateListener(e.A),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.C)}function Tr(e){for(var t in e.i){var n=e.i[t];delete e.i[t],n.reject(new re(1,7,7e3))}}function Er(e,t){var n=dr(t),r=mr;try{r.sendMessage("urn:x-cast:com.google.shaka.v2",n,(function(){}),ne.error)}catch(i){throw ne.error("Cast session sendMessage threw",i),n=new re(2,8,8005,i),e.F("player",new qe("error",{detail:n})),e.Bb(),n}}(f=gr.prototype).destroy=function(){return xr.delete(this),Tr(this),mr&&Sr(this),this.j&&(this.j.stop(),this.j=null),this.P=this.F=null,this.h=this.m=!1,this.C=this.A=this.l=this.i=this.g=this.o=null,Zy.resolve()},f.la=function(){return this.h},f.Dd=function(){return this.M},f.init=function(){if(this.X.length)if(e.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0,this.j.Lc();var t=new chrome.cast.SessionRequest(this.X);t=new chrome.cast.ApiConfig(t,Pw(yr).call(yr,this),Pw(wr).call(wr,this),"origin_scoped"),chrome.cast.initialize(t,(function(){ne.debug("CastSender: init")}),(function(e){ne.error("CastSender: init error",e)})),vr&&this.j.V(.02),(t=mr)&&t.status!=chrome.cast.SessionStatus.STOPPED?(ne.debug("CastSender: re-using existing connection"),br(this,t)):mr=null}else e.__onGCastApiAvailable||(e.__onGCastApiAvailable=kr),e.__onGCastApiAvailable!=kr&&ne.ba("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")},f.Md=function(e){this.o=e,this.h&&Er(this,{type:"appData",appData:this.o})},f.cast=function(e){var t,n;return this.m?vr?this.h?Zy.reject(new re(1,8,8002)):(this.l=new Ee,chrome.cast.requestSession(Pw(t=this.Ad).call(t,this,e),Pw(n=this.ve).call(n,this)),this.l):Zy.reject(new re(1,8,8001)):Zy.reject(new re(1,8,8e3))},f.Bb=function(){if(this.h){if(Tr(this),mr){Sr(this);try{mr.stop((function(){}),(function(){}))}catch(g){}mr=null}this.yd()}},f.get=function(e,t){var n;if("video"==e){if(SM(ar).call(ar,t))return Pw(n=this.Ee).call(n,this,e,t)}else if("player"==e){var r,i,a;if(ur[t]&&!this.get("player","isLive")())return function(){};if(SM(fr).call(fr,t))return Pw(r=this.Ee).call(r,this,e,t);if(SM(hr).call(hr,t))return Pw(i=this.rg).call(i,this,e,t);if(sr[t])return Pw(a=this.Be).call(a,this,e,t)}return this.Be(e,t)},f.set=function(e,t,n){this.g[e][t]=n,Er(this,{type:"set",targetName:e,property:t,value:n})},f.Ad=function(e,t){ne.debug("CastSender: onSessionInitiated"),mr=t,t.addUpdateListener(this.A),t.addMessageListener("urn:x-cast:com.google.shaka.v2",this.C),this.yd(),Er(this,{type:"init",initState:e,appData:this.o}),this.l.resolve()},f.ve=function(e){var t=8003;switch(e.code){case"cancel":t=8004;break;case"timeout":t=8005;break;case"receiver_unavailable":t=8006}this.l.reject(new re(2,8,t,e))},f.Be=function(e,t){return this.g[e][t]},f.Ee=function(e,t,n){for(var r=[],i=2;i<arguments.length;++i)r[i-2]=arguments[i];Er(this,{type:"call",targetName:e,methodName:t,args:r})},f.rg=function(e,t,n){for(var r=[],i=2;i<arguments.length;++i)r[i-2]=arguments[i];i=new Ee;var a=this.J.toString();this.J++,this.i[a]=i;try{Er(this,{type:"asyncCall",targetName:e,methodName:t,args:r,id:a})}catch(o){i.reject(o)}return i},f.yd=function(){var e=!!mr&&"connected"==mr.status;if(ne.debug("CastSender: connection status",e),this.h&&!e){for(var t in this.P(),this.g)this.g[t]={};Tr(this)}this.M=(this.h=e)?mr.receiver.friendlyName:"",this.j.Lc()},f.ag=function(e,t){var n=pr(t);switch(ne.O("CastSender: message",n),n.type){case"event":var r=n.event;this.F(n.targetName,new qe(r.type,r));break;case"update":for(var i in r=n.update)for(var a in n=this.g[i]||{},r[i])n[a]=r[i][a];this.u&&(this.Z(),this.u=!1);break;case"asyncComplete":if(i=n.id,n=n.error,a=this.i[i],delete this.i[i],a)if(n){for(r in i=new re(n.severity,n.category,n.code),n)i[r]=n[r];a.reject(i)}else a.resolve()}};var xr=new $O;function kr(e){if(e)for(var t=(e=w(xr)).next();!t.done;t=e.next())t.value.init()}function Ar(e,t,n){var r=this;We.call(this),this.i=e,this.h=t,this.o=this.l=this.j=this.u=this.m=null,this.C=n,this.A=new AP,this.g=new gr(n,(function(){return Cr(r)}),(function(){return Rr(r)}),(function(e,t){return jr(r,e,t)}),(function(){return Pr(r)}),(function(){return Ir(r)})),function(e){var t,n;for(var r in e.g.init(),e.o=new ut,Gf(nr).call(nr,Pw(t=function(e){var t;this.o.H(this.i,e,Pw(t=this.L).call(t,this))}).call(t,e)),Gf(or).call(or,Pw(n=function(e){var t;this.o.H(this.h,e,Pw(t=this.F).call(t,this))}).call(n,e)),e.m={},e.i){var i,a;Aw(e.m,r,{configurable:!1,enumerable:!0,get:Pw(i=e.J).call(i,e,r),set:Pw(a=e.M).call(a,e,r)})}e.u={},Mr(e,(function(t){Aw(e.u,t,{configurable:!1,enumerable:!0,get:function(){return Nr(e,t)}})})),function(e){var t=new AP;Mr(e,(function(n,r){if(t.has(r)){var i=t.get(r);n.length<i.length?e.A.set(n,i):e.A.set(i,n)}else t.set(r,n)}))}(e),e.j=new We,e.j.jc=e.m,e.l=new We,e.l.jc=e.u}(this)}function Mr(e,t){function n(e){return"constructor"!=e&&"function"==typeof r[e]&&!i.has(e)}var r=e.h,i=new $O;for(a in r)n(a)&&(i.add(a),t(a,r[a]));for(var a=Nw(r),o=Nw({});a&&a!=o;){for(var s=w(n_(a)),u=s.next();!u.done;u=s.next())n(u=u.value)&&(i.add(u),t(u,r[u]));a=Nw(a)}}function Ir(e){var t,n,r,i={video:{},player:{},playerAfterLoad:{},manifest:e.h.tc(),startTime:null};return e.i.pause(),Gf(ir).call(ir,Pw(t=function(e){i.video[e]=this.i[e]}).call(t,e)),e.i.ended||(i.startTime=e.i.currentTime),Gf(cr).call(cr,Pw(n=function(e){var t=e[1];e=this.h[e[0]](),i.player[t]=e}).call(n,e)),Gf(lr).call(lr,Pw(r=function(e){var t=e[1];e=this.h[e[0]](),i.playerAfterLoad[t]=e}).call(r,e)),i}function Cr(e){e.dispatchEvent(new qe("caststatuschanged"))}function Rr(e){e.j.dispatchEvent(new qe(e.m.paused?"pause":"play"))}function Pr(e){var t,n;Gf(cr).call(cr,Pw(t=function(e){var t=e[1];e=this.g.get("player",e[0])(),this.h[t](e)}).call(t,e));var r=e.g.get("player","getAssetUri")(),i=e.g.get("video","ended"),a=Zy.resolve(),o=e.i.autoplay,s=null;i||(s=e.g.get("video","currentTime")),r&&(e.i.autoplay=!1,a=e.h.load(r,s));var u={};Gf(ir).call(ir,Pw(n=function(e){u[e]=this.g.get("video",e)}).call(n,e)),a.then((function(){var t,n;e.i&&(Gf(ir).call(ir,Pw(t=function(e){this.i[e]=u[e]}).call(t,e)),Gf(lr).call(lr,Pw(n=function(e){var t=e[1];e=this.g.get("player",e[0])(),this.h[t](e)}).call(n,e)),e.i.autoplay=o,r&&e.i.play())}),(function(t){e.h.dispatchEvent(new qe("error",{detail:t}))}))}function Nr(e,t){var n,r,i,a,o;if(e.A.has(t)&&(t=e.A.get(t)),"addEventListener"==t)return Pw(n=e.l.addEventListener).call(n,e.l);if("removeEventListener"==t)return Pw(r=e.l.removeEventListener).call(r,e.l);if("getMediaElement"==t)return Pw(i=function(){return this.m}).call(i,e);if("getSharedConfiguration"==t)return ne.v("Can't share configuration across a network. Returning copy."),e.g.get("player","getConfiguration");if("getNetworkingEngine"==t)return e.g.la()&&ne.v("NOTE: getNetworkingEngine() is always local!"),Pw(a=e.h.Yb).call(a,e.h);if(e.g.la()){if("getManifest"==t||"drmInfo"==t)return function(){return ne.ba(t+"() does not work while casting!"),null};if("getManifestUri"==t)return Qn("getManifestUri",'Please use "getAssetUri" instead.'),Nr(e,"getAssetUri");if("attach"==t||"detach"==t)return function(){return ne.ba(t+"() does not work while casting!"),Zy.resolve()}}return e.g.la()&&0==ad(e.g.g.video).length&&sr[t]||!e.g.la()?Pw(o=e.h[t]).call(o,e.h):e.g.get("player",t)}function jr(e,t,n){e.g.la()&&("video"==t?e.j.dispatchEvent(n):"player"==t&&e.l.dispatchEvent(n))}function Or(e,t,n,r){var i=this;We.call(this),this.g=e,this.h=t,this.i=new ut,this.L={video:e,player:t},this.C=n||function(){},this.M=r||function(e){return e},this.F=!1,this.m=!0,this.l=0,this.A=!1,this.u=!0,this.o=this.j=null,this.J=new Le((function(){Lr(i)})),function(e){var t,n,r,i,a,o,s,u,c,l,f,h,d,p=cast.receiver.CastReceiverManager.getInstance();p.onSenderConnected=Pw(t=e.xe).call(t,e),p.onSenderDisconnected=Pw(n=e.xe).call(n,e),p.onSystemVolumeChanged=Pw(r=e.hf).call(r,e),e.o=p.getCastMessageBus("urn:x-cast:com.google.cast.media"),e.o.onMessage=Pw(i=e.Wf).call(i,e),e.j=p.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),e.j.onMessage=Pw(a=e.fg).call(a,e),p.start(),Gf(nr).call(nr,Pw(o=function(e){var t;this.i.H(this.g,e,Pw(t=this.Ce).call(t,this,"video"))}).call(o,e)),Gf(or).call(or,Pw(s=function(e){var t;this.i.H(this.h,e,Pw(t=this.Ce).call(t,this,"player"))}).call(s,e)),cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?e.h.Nd(3840,2160):e.h.Nd(1920,1080),e.i.H(e.g,"loadeddata",Pw(u=function(){this.A=!0}).call(u,e)),e.i.H(e.h,"loading",Pw(c=function(){this.m=!1,_r(this)}).call(c,e)),e.i.H(e.g,"playing",Pw(l=function(){this.m=!1,_r(this)}).call(l,e)),e.i.H(e.g,"pause",Pw(f=function(){_r(this)}).call(f,e)),e.i.H(e.h,"unloading",Pw(h=function(){this.m=!0,_r(this)}).call(h,e)),e.i.H(e.g,"ended",Pw(d=function(){var e=this;new Le((function(){e.g&&e.g.ended&&(e.m=!0,_r(e))})).V(5)}).call(d,e))}(this)}function _r(e){var t;Zy.resolve().then(Pw(t=function(){this.h&&(this.dispatchEvent(new qe("caststatuschanged")),Dr(this)||Kr(this))}).call(t,e))}function Lr(e){var t;e.J.V(.5);var n={video:{},player:{}};if(Gf(rr).call(rr,Pw(t=function(e){n.video[e]=this.g[e]}).call(t,e)),e.h.aa())for(var r in ur)0==e.l%ur[r]&&(n.player[r]=e.h[r]());for(var i in sr)0==e.l%sr[i]&&(n.player[i]=e.h[i]());(r=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(n.video.volume=r.level,n.video.muted=r.muted),e.A&&(e.l+=1),Fr(e,{type:"update",update:n},e.j),Dr(e)}function Dr(e){return!(!e.u||!e.g.duration&&!e.h.aa()||(Ur(e),e.u=!1,0))}function Ur(e,t){t=void 0===t?0:t;var n={contentId:e.h.tc(),streamType:e.h.aa()?"LIVE":"BUFFERED",contentType:""};e.h.aa()||(n.duration=e.g.duration),Kr(e,t,n)}function Fr(e,t,n,r){e.F&&(e=dr(t),r?n.getCastChannel(r).send(e):n.broadcast(e))}function Kr(e,t,n){t=void 0===t?0:t,n=void 0===n?null:n;var r=e.g.playbackRate,i=Br;r={mediaSessionId:0,playbackRate:r,playerState:i=e.m?i.IDLE:e.h.jd()?i.Re:e.g.paused?i.Te:i.Ue,currentTime:e.g.currentTime,supportedMediaCommands:63,volume:{level:e.g.volume,muted:e.g.muted}},n&&(r.media=n),Fr(e,{requestId:t,type:"MEDIA_STATUS",status:[r]},e.o)}J(Ar,We),$("shaka.cast.CastProxy",Ar),Ar.prototype.destroy=function(e){return e&&this.g.Bb(),this.o&&(this.o.release(),this.o=null),e=[],this.h&&(e.push(this.h.destroy()),this.h=null),this.g&&(e.push(this.g.destroy()),this.g=null),this.u=this.m=this.i=null,Zy.all(e)},Ar.prototype.destroy=Ar.prototype.destroy,Ar.prototype.Mf=function(){return this.m},Ar.prototype.getVideo=Ar.prototype.Mf,Ar.prototype.Df=function(){return this.u},Ar.prototype.getPlayer=Ar.prototype.Df,Ar.prototype.Ye=function(){return this.g.m&&vr},Ar.prototype.canCast=Ar.prototype.Ye,Ar.prototype.la=function(){return this.g.la()},Ar.prototype.isCasting=Ar.prototype.la,Ar.prototype.Dd=function(){return this.g.Dd()},Ar.prototype.receiverName=Ar.prototype.Dd,Ar.prototype.cast=function(){var e,t=Ir(this);return this.g.cast(t).then(Pw(e=function(){if(this.h)return this.h.Ud()}).call(e,this))},Ar.prototype.cast=Ar.prototype.cast,Ar.prototype.Md=function(e){this.g.Md(e)},Ar.prototype.setAppData=Ar.prototype.Md,Ar.prototype.Kg=function(){var e=this.g;if(e.h){var t,n,r=e.L();chrome.cast.requestSession(Pw(t=e.Ad).call(t,e,r),Pw(n=e.ve).call(n,e))}},Ar.prototype.suggestDisconnect=Ar.prototype.Kg,Ar.prototype.af=function(e){var t=this;return T((function n(){return z(n,(function(n){switch(n.s){case 1:return e==t.C?n.return():(t.C=e,t.g.Bb(),N(n,t.g.destroy(),2));case 2:t.g=null,t.g=new gr(e,(function(){return Cr(t)}),(function(){return Rr(t)}),(function(e,n){return jr(t,e,n)}),(function(){return Pr(t)}),(function(){return Ir(t)})),t.g.init(),j(n)}}))}))},Ar.prototype.changeReceiverId=Ar.prototype.af,Ar.prototype.Bb=function(){this.g.Bb()},Ar.prototype.forceDisconnect=Ar.prototype.Bb,Ar.prototype.J=function(e){var t,n;if("addEventListener"==e)return Pw(t=this.j.addEventListener).call(t,this.j);if("removeEventListener"==e)return Pw(n=this.j.removeEventListener).call(n,this.j);if(this.g.la()&&0==ad(this.g.g.video).length){var r=this.i[e];if("function"!=typeof r)return r}return this.g.la()?this.g.get("video",e):("function"==typeof(e=this.i[e])&&(e=Pw(e).call(e,this.i)),e)},Ar.prototype.M=function(e,t){this.g.la()?this.g.set("video",e,t):this.i[e]=t},Ar.prototype.L=function(e){this.g.la()||this.j.dispatchEvent(new qe(e.type,e))},Ar.prototype.F=function(e){this.g.la()||this.l.dispatchEvent(e)},J(Or,We),$("shaka.cast.CastReceiver",Or),Or.prototype.isConnected=function(){return this.F},Or.prototype.isConnected=Or.prototype.isConnected,Or.prototype.Rf=function(){return this.m},Or.prototype.isIdle=Or.prototype.Rf,Or.prototype.destroy=function(){var e=this;return T((function t(){var n;return z(t,(function(t){switch(t.s){case 1:return e.i&&(e.i.release(),e.i=null),n=[],e.h&&(n.push(e.h.destroy()),e.h=null),e.J&&(e.J.stop(),e.J=null),e.g=null,e.L=null,e.C=null,e.F=!1,e.m=!0,e.j=null,e.o=null,N(t,Zy.all(n),2);case 2:cast.receiver.CastReceiverManager.getInstance().stop(),j(t)}}))}))},Or.prototype.destroy=Or.prototype.destroy,(f=Or.prototype).xe=function(){this.l=0,this.u=!0,this.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length,_r(this)},f.Ce=function(e,t){this.h&&(Lr(this),Fr(this,{type:"event",targetName:e,event:t},this.j))},f.hf=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Fr(this,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},this.j),Fr(this,{type:"event",targetName:"video",event:{type:"volumechange"}},this.j)},f.fg=function(e){var t,n,r,i=pr(e.data);switch(ne.debug("CastReceiver: message",i),i.type){case"init":this.l=0,this.A=!1,this.u=!0,function(e,t,n){for(var r in t.player)e.h[r](t.player[r]);e.C(n),n=Zy.resolve();var i=e.g.autoplay;t.manifest&&(e.g.autoplay=!1,n=e.h.load(t.manifest,t.startTime)),n.then((function(){if(e.h){for(var n in t.video)e.g[n]=t.video[n];for(var r in t.playerAfterLoad)e.h[r](t.playerAfterLoad[r]);e.g.autoplay=i,t.manifest&&(e.g.play(),Kr(e))}}),(function(t){e.h.dispatchEvent(new qe("error",{detail:t}))}))}(this,i.initState,i.appData),Lr(this);break;case"appData":this.C(i.appData);break;case"set":var a=i.targetName,o=i.property;if(i=i.value,"video"==a){var s=cast.receiver.CastReceiverManager.getInstance();if("volume"==o){s.setSystemVolumeLevel(i);break}if("muted"==o){s.setSystemVolumeMuted(i);break}}this.L[a][o]=i;break;case"call":(a=this.L[i.targetName])[i.methodName].apply(a,i.args);break;case"asyncCall":a=i.targetName,o=i.methodName,"player"==a&&"load"==o&&(this.l=0,this.A=!1),s=i.id,e=e.senderId;var u=this.L[a];i=u[o].apply(u,i.args),"player"==a&&"load"==o&&(i=i.then(Pw(t=function(){this.u=!0}).call(t,this))),i.then(Pw(n=this.Je).call(n,this,e,s,null),Pw(r=this.Je).call(r,this,e,s))}},f.Wf=function(e){var t,n,r,i=pr(e.data);switch(ne.debug("CastReceiver: message",i),i.type){case"PLAY":this.g.play(),Kr(this);break;case"PAUSE":this.g.pause(),Kr(this);break;case"SEEK":e=i.currentTime;var a=i.resumeState;null!=e&&(this.g.currentTime=Number(e)),a&&"PLAYBACK_START"==a?(this.g.play(),Kr(this)):a&&"PLAYBACK_PAUSE"==a&&(this.g.pause(),Kr(this));break;case"STOP":this.h.Ud().then(Pw(t=function(){this.h&&Kr(this)}).call(t,this));break;case"GET_STATUS":Ur(this,Number(i.requestId));break;case"VOLUME":e=(a=i.volume).level,a=a.muted;var o=this.g.volume,s=this.g.muted;null!=e&&(this.g.volume=Number(e)),null!=a&&(this.g.muted=a),o==this.g.volume&&s==this.g.muted||Kr(this);break;case"LOAD":this.l=0,this.u=this.A=!1,e=i.media,a=i.currentTime,o=this.M(e.contentId),s=i.autoplay||!0,this.C(e.customData),s&&(this.g.autoplay=!0),this.h.load(o,a).then(Pw(n=function(){this.h&&Ur(this)}).call(n,this)).catch(Pw(r=function(e){var t="LOAD_FAILED";7==e.category&&7e3==e.code&&(t="LOAD_CANCELLED"),Fr(this,{requestId:Number(i.requestId),type:t},this.o)}).call(r,this));break;default:ne.v("Unrecognized message type from the generic Chromecast controller!",i.type),Fr(this,{requestId:Number(i.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},this.o)}},f.Je=function(e,t,n){this.h&&Fr(this,{type:"asyncComplete",id:t,error:n},this.j,e)};var Br={IDLE:"IDLE",Ue:"PLAYING",Re:"BUFFERING",Te:"PAUSED"};function Hr(e,t){this.S=e,this.h=t==Vr,this.g=0}$("shaka.util.DataViewReader",Hr);var Vr=1;function zr(){throw new re(2,3,3e3)}function qr(){this.i=[],this.h=[],this.g=!1}function Gr(e){for(var t=Jr(e);e.reader.Ca()&&!e.parser.g;)e.parser.Fc(e.start+t,e.reader,e.partialOkay)}function Wr(e){for(var t=Jr(e),n=e.reader.N();0<n&&!e.parser.g;--n)e.parser.Fc(e.start+t,e.reader,e.partialOkay)}function Xr(e){return function(t){e(t.reader.mb(t.reader.S.byteLength-t.reader.ka()))}}function Yr(e){for(var t=0,n=0;n<e.length;n++)t=t<<8|e.charCodeAt(n);return t}function $r(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function Jr(e){return 8+(e.has64BitSize?8:0)+(null!=h_(e)?4:0)}function Qr(e){var t=this;this.g=[],this.h=[],this.data=[],(new qr).box("moov",Gr).ma("pssh",(function(e){if(1<e.version)ne.v("Unrecognized PSSH version found!");else{var n=e.reader.S;if(n=new Uint8Array(n.buffer,n.byteOffset-12,e.size),t.data.push(n),t.g.push(Pe.Nc(e.reader.mb(16))),0<e.version){n=e.reader.N();for(var r=0;r<n;++r){var i=Pe.Nc(e.reader.mb(16));t.h.push(i)}}}})).parse(e),0==this.data.length&&ne.v("No pssh box found!")}Hr.Endianness={Tg:0,Vg:Vr},Hr.prototype.Ca=function(){return this.g<this.S.byteLength},Hr.prototype.hasMoreData=Hr.prototype.Ca,Hr.prototype.ka=function(){return this.g},Hr.prototype.getPosition=Hr.prototype.ka,Hr.prototype.sf=function(){return this.S.byteLength},Hr.prototype.getLength=Hr.prototype.sf,Hr.prototype.ra=function(){try{var e=this.S.getUint8(this.g);return this.g+=1,e}catch(t){zr()}},Hr.prototype.readUint8=Hr.prototype.ra,Hr.prototype.dc=function(){try{var e=this.S.getUint16(this.g,this.h);return this.g+=2,e}catch(t){zr()}},Hr.prototype.readUint16=Hr.prototype.dc,Hr.prototype.N=function(){try{var e=this.S.getUint32(this.g,this.h);return this.g+=4,e}catch(t){zr()}},Hr.prototype.readUint32=Hr.prototype.N,Hr.prototype.De=function(){try{var e=this.S.getInt32(this.g,this.h);return this.g+=4,e}catch(t){zr()}},Hr.prototype.readInt32=Hr.prototype.De,Hr.prototype.Pb=function(){try{if(this.h)var e=this.S.getUint32(this.g,!0),t=this.S.getUint32(this.g+4,!0);else t=this.S.getUint32(this.g,!1),e=this.S.getUint32(this.g+4,!1)}catch(n){zr()}if(2097151<t)throw new re(2,3,3001);return this.g+=8,t*Math.pow(2,32)+e},Hr.prototype.readUint64=Hr.prototype.Pb,Hr.prototype.mb=function(e){this.g+e>this.S.byteLength&&zr();var t=new Uint8Array(this.S.buffer,this.S.byteOffset+this.g,e);return this.g+=e,t},Hr.prototype.readBytes=Hr.prototype.mb,Hr.prototype.U=function(e){this.g+e>this.S.byteLength&&zr(),this.g+=e},Hr.prototype.skip=Hr.prototype.U,Hr.prototype.Fe=function(e){this.g<e&&zr(),this.g-=e},Hr.prototype.rewind=Hr.prototype.Fe,Hr.prototype.seek=function(e){(0>e||e>this.S.byteLength)&&zr(),this.g=e},Hr.prototype.seek=Hr.prototype.seek,Hr.prototype.Cd=function(){for(var e=this.g;this.Ca()&&0!=this.S.getUint8(this.g);)this.g+=1;return e=new Uint8Array(this.S.buffer,this.S.byteOffset+e,this.g-e),this.g+=1,xe(e)},Hr.prototype.readTerminatedString=Hr.prototype.Cd,$("shaka.util.Mp4Parser",qr),qr.prototype.box=function(e,t){var n=Yr(e);return this.i[n]=0,this.h[n]=t,this},qr.prototype.box=qr.prototype.box,qr.prototype.ma=function(e,t){var n=Yr(e);return this.i[n]=1,this.h[n]=t,this},qr.prototype.fullBox=qr.prototype.ma,qr.prototype.stop=function(){this.g=!0},qr.prototype.stop=qr.prototype.stop,qr.prototype.parse=function(e,t){var n=new Uint8Array(e);for(n=new Hr(new DataView(n.buffer,n.byteOffset,n.byteLength),0),this.g=!1;n.Ca()&&!this.g;)this.Fc(0,n,t)},qr.prototype.parse=qr.prototype.parse,qr.prototype.Fc=function(e,t,n){var r=t.ka(),i=t.N(),a=t.N(),o=!1;switch(ne.O("Parsing MP4 box",$r(a)),i){case 0:i=t.S.byteLength-r;break;case 1:i=t.Pb(),o=!0}var s=this.h[a];if(s){var u=null,c=null;1==this.i[a]&&(u=(c=t.N())>>>24,c&=16777215),a=r+i,n&&a>t.S.byteLength&&(a=t.S.byteLength),a-=t.ka(),t=0<a?t.mb(a):new Uint8Array(0),s({parser:this,partialOkay:n||!1,version:u,flags:c,reader:t=new Hr(new DataView(t.buffer,t.byteOffset,t.byteLength),0),size:i,start:r+e,has64BitSize:o})}else t.U(Math.min(r+i-t.ka(),t.S.byteLength-t.ka()))},qr.prototype.parseNext=qr.prototype.Fc,qr.children=Gr,qr.sampleDescription=Wr,qr.allData=Xr,qr.typeToString=$r,qr.headerSize=Jr;var Zr={sc:function(e,t){var n=Zr.Y(e,t);return 1!=n.length?null:n[0]},Yc:function(e,t,n){return 1!=(e=Zr.fe(e,t,n)).length?null:e[0]},Y:function(e,t){return Hb(Array.prototype).call(e.childNodes,(function(e){return e instanceof Element&&e.tagName==t}))},fe:function(e,t,n){return Hb(Array.prototype).call(e.childNodes,(function(e){return e instanceof Element&&e.localName==n&&e.namespaceURI==t}))},getAttributeNS:function(e,t,n){return e.hasAttributeNS(t,n)?e.getAttributeNS(t,n):null},uc:function(e){var t;return iT(Array.prototype).call(e.childNodes,(function(e){return e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE}))?xT(t=e.textContent).call(t):null},R:function(e,t,n,r){r=void 0===r?null:r;var i=null;return null!=(e=e.getAttribute(t))&&(i=n(e)),null==i?r:i},jg:function(e){return e?(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e)&&(e+="Z"),e=Date.parse(e),isNaN(e)?null:Math.floor(e/1e3)):null},Ma:function(e){if(!e)return null;var t=/^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$/.exec(e);return t?(e=31536e3*Number(t[1]||null)+2592e3*Number(t[2]||null)+86400*Number(t[3]||null)+3600*Number(t[4]||null)+60*Number(t[5]||null)+Number(t[6]||null),isFinite(e)?e:null):(ne.v("Invalid duration string:",e),null)},Hc:function(e){var t=/([0-9]+)-([0-9]+)/.exec(e);return t?(e=Number(t[1]),isFinite(e)?(t=Number(t[2]),isFinite(t)?{start:e,end:t}:null):null):null},parseInt:function(e){return 0==(e=Number(e))%1?e:null},Gc:function(e){return 0==(e=Number(e))%1&&0<e?e:null},Mb:function(e){return 0==(e=Number(e))%1&&0<=e?e:null},parseFloat:function(e){return e=Number(e),isNaN(e)?null:e},ff:function(e){var t;return e=(t=e.match(/^(\d+)\/(\d+)$/))?Number(t[1])/Number(t[2]):Number(e),isNaN(e)?null:e},Ae:function(e,t){var n=new DOMParser;try{var r=n.parseFromString(e,"text/xml")}catch(a){}if(r&&r.documentElement.tagName==t)var i=r.documentElement;return i&&0<i.getElementsByTagName("parsererror").length?null:i},ze:function(e,t){try{var n=xe(e);return Zr.Ae(n,t)}catch(r){}}},ei=(new AP).set("urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b","org.w3.clearkey").set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine.alpha").set("urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95","com.microsoft.playready").set("urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95","com.microsoft.playready").set("urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb","com.adobe.primetime");function ti(e,t,n){var r=function(e){for(var t=[],n=(e=w(e)).next();!n.done;n=e.next())(n=ii(n.value))&&t.push(n);return t}(e),i=null;e=[];var a=[],o=new $O(Mb(r).call(r,(function(e){return e.keyId})));if(o.delete(null),1<o.size)throw new re(2,4,4010);if(n||(a=Hb(r).call(r,(function(e){return"urn:mpeg:dash:mp4protection:2011"!=e.Ge||(i=e.init||i,!1)}))).length&&(e=function(e,t,n){for(var r=[],i=(n=w(n)).next();!i.done;i=n.next()){i=i.value;var a=ei.get(i.Ge);if(a){var o;if(o=Zr.Yc(i.node,"urn:microsoft:playready","pro")){o=Pe.Ja(o.textContent);var s=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),u=o.length,c=s.length+16+u,l=new ArrayBuffer(c),f=new Uint8Array(l),h=0;(l=new DataView(l)).setUint32(h,c),h+=4,l.setUint32(h,1886614376),h+=4,l.setUint32(h,0),h+=4,f.set(s,h),h+=s.length,l.setUint32(h,u),h+=4,f.set(o,h),o=[{initData:f,initDataType:"cenc",keyId:i.keyId}]}else o=null;o=we(a,i.init||e||o),(a=ri.get(a))&&(o.licenseServerUri=a(i)),r.push(o)}else for(a=(i=w(i=t(i.node)||[])).next();!a.done;a=i.next())r.push(a.value)}return r}(i,t,a),0==e.length&&(e=[we("",i)])),r.length&&(n||!a.length))for(e=[],n=(t=w(OP(ei).call(ei))).next();!n.done;n=t.next())"org.w3.clearkey"!=(n=n.value)&&e.push(we(n,i));if(o=Yw(o)[0]||null)for(n=(t=w(e)).next();!n.done;n=t.next())for(r=(n=w(n.value.initData)).next();!r.done;r=n.next())r.value.keyId=o;return{be:o,Xg:i,drmInfos:e,ge:!0}}var ni,ri=(new AP).set("com.widevine.alpha",(function(e){return(e=Zr.Yc(e.node,"urn:microsoft","laurl"))&&e.getAttribute("licenseUrl")||""})).set("com.microsoft.playready",(function(e){var t;return(e=Zr.Yc(e.node,"urn:microsoft:playready","pro"))?(e=Pe.Ja(e.textContent),(e=Hb(t=function(e){var t=0,n=new DataView(e).getUint32(t,!0);if(t+=4,n!==e.byteLength)return ne.v("PlayReady Object with invalid length encountered."),[];t+=2,n=[];for(var r=new DataView(e);t<e.byteLength-1;){var i=r.getUint16(t,!0);t+=2;var a=r.getUint16(t,!0);t+=2;var o=new Uint8Array(e,t,a);n.push({type:i,value:o}),t+=a}return n}(e.buffer)).call(t,(function(e){return 1===e.type}))[0])?(e=ke(e.value,!0),(e=Zr.Ae(e,"WRMHEADER"))?function(e){for(var t=(e=w(e.getElementsByTagName("DATA"))).next();!t.done;t=e.next())for(var n=(t=w(t.value.childNodes)).next();!n.done;n=t.next())if((n=n.value)instanceof Element&&"LA_URL"==n.tagName)return n.textContent;return""}(e):""):""):""}));function ii(e){var t,n=e.getAttribute("schemeIdUri"),r=Zr.getAttributeNS(e,"urn:mpeg:cenc:2013","default_KID"),i=Mb(t=Zr.fe(e,"urn:mpeg:cenc:2013","pssh")).call(t,Zr.uc);if(!n)return ne.error("Missing required schemeIdUri attribute on","ContentProtection element",e),null;if(n=n.toLowerCase(),r&&(r=r.replace(/-/g,"").toLowerCase(),SM(r).call(r," ")))throw new re(2,4,4009);var a=[];try{a=Mb(i).call(i,(function(e){return{initDataType:"cenc",initData:Pe.Ja(e),keyId:null}}))}catch(o){throw new re(2,4,4007)}return{node:e,Ge:n,keyId:r,init:0<a.length?a:null}}function ai(e,t,n,r,i){var a={RepresentationID:t,Number:n,Bandwidth:r,Time:i};return e.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,(function(t,n,r,i){if("$$"==t)return"$";var o=a[n];if(null==o)return ne.v("URL template does not have an available substitution for identifier",'"'+n+'":',e),t;switch("RepresentationID"==n&&r&&(ne.v("URL template should not contain a width specifier for identifier",'"RepresentationID":',e),r=void 0),"Time"==n&&(o=Math.round(o)),i){case void 0:case"d":case"i":case"u":t=o.toString();break;case"o":t=o.toString(8);break;case"x":t=o.toString(16);break;case"X":t=o.toString(16).toUpperCase();break;default:t=o.toString()}return r=Sb(r,10)||1,Array(Math.max(0,r-t.length)+1).join("0")+t}))}function oi(e,t){var n=si(e,t,"timescale"),r=1;n&&(r=Zr.Gc(n)||1),n=si(e,t,"duration"),(n=Zr.Gc(n||""))&&(n/=r);var i=si(e,t,"startNumber"),a=Number(si(e,t,"presentationTimeOffset"))||0,o=Zr.Mb(i||"");null!=i&&null!=o||(o=1);var s=ui(e,t,"SegmentTimeline");if(i=null,s){i=r;var u=e.$.duration||1/0;s=Zr.Y(s,"S");for(var c=[],l=-a,f=0;f<s.length;++f){var h=s[f],d=Zr.R(h,"t",Zr.Mb),p=Zr.R(h,"d",Zr.Mb),g=Zr.R(h,"r",Zr.parseInt);if(null!=d&&(d-=a),!p){ne.v('"S" element must have a duration:','ignoring the remaining "S" elements.',h);break}if(d=null!=d?d:l,0>(g=g||0))if(f+1<s.length){if(null==(g=Zr.R(s[f+1],"t",Zr.Mb))){ne.v('An "S" element cannot have a negative repeat','if the next "S" element does not have a valid start time:','ignoring the remaining "S" elements.',h);break}if(d>=g){ne.v('An "S" element cannot have a negative repeat','if its start time exceeds the next "S" element\'s start time:','ignoring the remaining "S" elements.',h);break}g=Math.ceil((g-d)/p)-1}else{if(1/0==u){ne.v('The last "S" element cannot have a negative repeat',"if the Period has an infinite duration:",'ignoring the last "S" element.',h);break}if(d/i>=u){ne.v('The last "S" element cannot have a negative repeat',"if its start time exceeds the Period's duration:",'igoring the last "S" element.',h);break}g=Math.ceil((u*i-d)/p)-1}for(0<c.length&&d!=l&&(Math.abs((d-l)/i)>=Te&&ne.v("SegmentTimeline contains a large gap/overlap:","the content may have errors in it.",h),c[c.length-1].end=d/i),h=0;h<=g;++h)l=d+p,c.push({start:d/i,end:l/i,Pg:d}),d=l}i=c}return{timescale:r,ia:n,ob:o,sa:a/r||0,Vd:a,W:i}}function si(e,t,n){var r,i,a;return uN(r=Mb(i=Hb(a=[t(e.G),t(e.fa),t(e.qa)]).call(a,ye.Ra)).call(i,(function(e){return e.getAttribute(n)}))).call(r,(function(e,t){return e||t}))}function ui(e,t,n){var r,i,a;return uN(r=Mb(i=Hb(a=[t(e.G),t(e.fa),t(e.qa)]).call(a,ye.Ra)).call(i,(function(e){return Zr.sc(e,n)}))).call(r,(function(e,t){return e||t}))}function ci(e,t,n,r,i,a){if(a=void 0===a?0:a,Zr.getAttributeNS(e,"http://www.w3.org/1999/xlink","href")){var o=function(e,t,n,r,i,a){for(var o=Zr.getAttributeNS(e,"http://www.w3.org/1999/xlink","href"),s=Zr.getAttributeNS(e,"http://www.w3.org/1999/xlink","actuate")||"onRequest",u=0;u<e.attributes.length;u++){var c=e.attributes[u];"http://www.w3.org/1999/xlink"==c.namespaceURI&&(e.removeAttributeNS(c.namespaceURI,c.localName),--u)}if(5<=a)return Ke(new re(2,4,4028));if("onLoad"!=s)return Ke(new re(2,4,4027));var l=be([r],[o]);return i.request(0,rt(l,t)).ca((function(r){if(!(r=Zr.ze(r.data,e.tagName)))return Ke(new re(2,4,4001,o));for(;e.childNodes.length;)e.removeChild(e.childNodes[0]);for(;r.childNodes.length;){var s=r.childNodes[0];r.removeChild(s),e.appendChild(s)}for(s=0;s<r.attributes.length;s++){var u=r.attributes[s].nodeName,c=r.getAttribute(u);e.setAttribute(u,c)}return ci(e,t,n,l[0],i,a+1)}))}(e,t,n,r,i,a);return n&&(o=o.ca(void 0,(function(){return ci(e,t,n,r,i,a)}))),o}o=[];for(var s=0;s<e.childNodes.length;s++){var u=e.childNodes[s];u instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==Zr.getAttributeNS(u,"http://www.w3.org/1999/xlink","href")?(e.removeChild(u),--s):"SegmentTimeline"!=u.tagName&&o.push(ci(u,t,n,r,i,a)))}return ze(o).ca((function(){return e}))}function li(e,t,n){this.i=e,this.h=t,this.g=n}function fi(e,t,n,r,i,a){this.position=e,this.startTime=t,this.endTime=n,this.i=r,this.h=i,this.g=a}function hi(e,t,n,r){var i,a=(new qr).ma("sidx",(function(e){i=function(e,t,n,r){var i=[];r.reader.U(4);var a=r.reader.N();if(0==a)throw ne.error("Invalid timescale."),new re(2,3,3005);if(0==r.version)var o=r.reader.N(),s=r.reader.N();else o=r.reader.Pb(),s=r.reader.Pb();r.reader.U(2);var u=r.reader.dc();for(e=e+r.size+s,s=0;s<u;s++){var c=r.reader.N(),l=(2147483648&c)>>>31;c&=2147483647;var f=r.reader.N();if(r.reader.U(4),1==l)throw ne.error("Heirarchical SIDXs are not supported."),new re(2,3,3006);i.push(new fi(i.length,o/a-t,(o+f)/a-t,(function(){return n}),e,e+c-1)),o+=f,e+=c}return r.parser.stop(),i}(t,r,n,e)}));if(e&&a.parse(e),i)return i;throw ne.error('Invalid box type, expected "sidx".'),new re(2,3,3004)}function di(e){this.g=e}function pi(e,t){for(;e.g.length&&e.g[e.g.length-1].startTime>=t;)e.g.pop();for(;e.g.length&&0>=e.g[0].endTime;)e.g.shift();if(0!=e.g.length){var n=e.g[e.g.length-1];e.g[e.g.length-1]=new fi(n.position,n.startTime,t,n.i,n.h,n.g)}}function gi(e){this.h=e,this.g=new Hr(e,0),ni||(ni=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])])}function vi(e){var t=mi(e);if(7<t.length)throw new re(2,3,3002);for(var n=0,r=0;r<t.length;r++)n=256*n+t[r];t=n,n=mi(e);e:{r=Pe.Ha;for(var i=0;i<ni.length;i++)if(r(n,ni[i])){r=!0;break e}r=!1}if(r)n=e.h.byteLength-e.g.ka();else{if(8==n.length&&224&n[1])throw new re(2,3,3001);for(r=n[0]&(1<<8-n.length)-1,i=1;i<n.length;i++)r=256*r+n[i];n=r}return n=e.g.ka()+n<=e.h.byteLength?n:e.h.byteLength-e.g.ka(),r=new DataView(e.h.buffer,e.h.byteOffset+e.g.ka(),n),e.g.U(n),new yi(t,r)}function mi(e){var t,n=e.g.ra();for(t=1;8>=t&&!(n&1<<8-t);t++);if(8<t)throw new re(2,3,3002);var r=new Uint8Array(t);for(r[0]=n,n=1;n<t;n++)r[n]=e.g.ra();return r}function yi(e,t){this.id=e,this.g=t}function bi(e){if(8<e.g.byteLength)throw new re(2,3,3002);if(8==e.g.byteLength&&224&e.g.getUint8(0))throw new re(2,3,3001);for(var t=0,n=0;n<e.g.byteLength;n++)t=256*t+e.g.getUint8(n);return t}function wi(){}function Si(e){var t=new gi(e.g);if(179!=(e=vi(t)).id)throw ne.v("Not a CueTime element."),new re(2,3,3013);if(e=bi(e),183!=(t=vi(t)).id)throw ne.v("Not a CueTrackPositions element."),new re(2,3,3012);t=new gi(t.g);for(var n=0;t.Ca();){var r=vi(t);if(241==r.id){n=bi(r);break}}return{Qg:e,qg:n}}function Ti(e,t){var n=ui(e,t,"Initialization");if(!n)return null;var r=e.G.xa,i=n.getAttribute("sourceURL");i&&(r=be(e.G.xa,[i])),i=0;var a=null;return(n=Zr.R(n,"range",Zr.Hc))&&(i=n.start,a=n.end),new li((function(){return r}),i,a)}function Ei(e,t,n,r,i,a,o,s){var u=e.presentationTimeline,c=!e.zb||!e.$.ld,l=e.$.start,f=e.$.duration,h=t,d=null;return{createSegmentIndex:function(){var e=[h(r,i,a),"webm"==o?h(n.i(),n.h,n.g):null];return h=null,Zy.all(e).then((function(e){var t=e[0];e=e[1]||null,t="mp4"==o?hi(t,i,r,s):(new wi).parse(t,e,r,s),u.Jb(t,l),d=new di(t),c&&pi(d,f)}))},findSegmentPosition:function(e){return Jh(d).call(d,e)},getSegmentReference:function(e){return d.get(e)}}}function xi(e){return e.ec}function ki(e,t){var n,r,i,a=Ti(e,Ai),o=function(e){var t,n,r,i;return Mb(t=uN(n=Mb(r=Hb(i=[e.G.Ua,e.fa.Ua,e.qa.Ua]).call(i,ye.Ra)).call(r,(function(e){return Zr.Y(e,"SegmentURL")}))).call(n,(function(e,t){return 0<e.length?e:t}))).call(t,(function(t){return t.getAttribute("indexRange")&&!e.me&&(e.me=!0,ne.v("We do not support the SegmentURL@indexRange attribute on SegmentList. We only use the SegmentList@duration attribute or SegmentTimeline, which must be accurate.")),{Tf:t.getAttribute("media"),start:(t=Zr.R(t,"mediaRange",Zr.Hc,{start:0,end:null})).start,end:t.end}}))}(e),s=oi(e,Ai),u=s.ob;0==u&&(ne.v("SegmentList@startNumber must be > 0"),u=1);var c=0;if(s.ia?c=s.ia*(u-1):s.W&&0<s.W.length&&(c=s.W[0].start),!(o={ia:s.ia,startTime:c,ob:u,sa:s.sa,W:s.W,jb:o}).ia&&!o.W&&1<o.jb.length)throw ne.v("SegmentList does not contain sufficient segment information:","the SegmentList specifies multiple segments,","but does not specify a segment duration or timeline.",e.G),new re(2,4,4002);if(!o.ia&&!e.$.duration&&!o.W&&1==o.jb.length)throw ne.v("SegmentList does not contain sufficient segment information:","the SegmentList specifies one segment,","but does not specify a segment duration, period duration,","or timeline.",e.G),new re(2,4,4002);if(o.W&&0==o.W.length)throw ne.v("SegmentList does not contain sufficient segment information:","the SegmentList has an empty timeline.",e.G),new re(2,4,4002);return u=s=null,e.qa.id&&e.G.id&&(s=t[u=e.qa.id+","+e.G.id]),c=function(e,t,n,r){var i=r.jb.length;r.W&&r.W.length!=r.jb.length&&(i=Math.min(r.W.length,r.jb.length),ne.v("The number of items in the segment timeline and the number of segment","URLs do not match, truncating",r.jb.length,"to",i));for(var a=[],o=r.startTime,s=0;s<i;s++){var u,c=r.jb[s],l=be(n,[c.Tf]),f=void 0;f=null!=r.ia?o+r.ia:r.W?r.W[s].end:o+e,a.push(new fi(s+t,o,f,Pw(u=function(e){return e}).call(u,null,l),c.start,c.end)),o=f}return a}(e.$.duration,o.ob,e.G.xa,o),s?(s.sd(c),u=e.presentationTimeline.$b(),s.Vc(u-e.$.start)):(e.presentationTimeline.Jb(c,e.$.start),s=new di(c),u&&e.zb&&(t[u]=s)),e.zb&&e.$.ld||pi(s,e.$.duration),{createSegmentIndex:Pw(n=Zy.resolve).call(n,Zy),findSegmentPosition:Pw(r=Jh(s)).call(r,s),getSegmentReference:Pw(i=s.get).call(i,s),initSegmentReference:a,sa:o.sa}}function Ai(e){return e.Ua}function Mi(e,t,n,r){var i,a,o,s=function(e){var t=si(e,Ii,"initialization");if(!t)return null;var n=e.G.id,r=e.bandwidth||null,i=e.G.xa;return new li((function(){var e=ai(t,n,null,r,null);return be(i,[e])}),0,null)}(e),u=oi(e,Ii),c=si(e,Ii,"media"),l=si(e,Ii,"index");if(c=(u={ia:u.ia,timescale:u.timescale,ob:u.ob,sa:u.sa,Vd:u.Vd,W:u.W,qd:c,bc:l}).bc?1:0,c+=u.W?1:0,0==(c+=u.ia?1:0))throw ne.error("SegmentTemplate does not contain any segment information:","the SegmentTemplate must contain either an index URL template","a SegmentTimeline, or a segment duration.",e.G),new re(2,4,4002);if(1!=c&&(ne.v("SegmentTemplate containes multiple segment information sources:","the SegmentTemplate should only contain an index URL template,","a SegmentTimeline or a segment duration.",e.G),u.bc?(ne.info("Using the index URL template by default."),u.W=null):ne.info("Using the SegmentTimeline by default."),u.ia=null),!u.bc&&!u.qd)throw ne.error("SegmentTemplate does not contain sufficient segment information:","the SegmentTemplate's media URL template is missing.",e.G),new re(2,4,4002);if(u.bc){if("mp4"!=(n=e.G.mimeType.split("/")[1])&&"webm"!=n)throw ne.error("SegmentTemplate specifies an unsupported container type.",e.G),new re(2,4,4006);if("webm"==n&&!s)throw ne.error("SegmentTemplate does not contain sufficient segment information:","the SegmentTemplate uses a WebM container,","but does not contain an initialization URL template.",e.G),new re(2,4,4005);r=ai(u.bc,e.G.id,null,e.bandwidth||null,null),e=Ei(e,t,s,r=be(e.G.xa,[r]),0,null,n,u.sa)}else u.ia?(r||(e.presentationTimeline.ud(u.ia),e.presentationTimeline.vd(e.$.start)),e=function(e,t){var n,r=e.$.duration,i=t.ia,a=t.ob,o=t.timescale,s=t.qd,u=e.bandwidth||null,c=e.G.id,l=e.G.xa;return{createSegmentIndex:Pw(n=Zy.resolve).call(n,Zy),findSegmentPosition:function(e){return 0>e||r&&e>=r?null:Math.floor(e/i)},getSegmentReference:function(e){var t=e*i,n=t+i;return r&&(n=Math.min(n,r)),0>n||r&&t>=r?null:new fi(e,t,n,(function(){var n=ai(s,c,e+a,u,t*o);return be(l,[n])}),0,null)}}}(e,u)):(c=t=null,e.qa.id&&e.G.id&&(t=n[c=e.qa.id+","+e.G.id]),l=function(e,t){for(var n=[],r=0;r<t.W.length;r++){var i,a=r+t.ob;n.push(new fi(a,t.W[r].start,t.W[r].end,Pw(i=function(e,t,n,r,i,a){var o;return e=ai(e,t,i,n,a),Mb(o=be(r,[e])).call(o,(function(e){return e.toString()}))}).call(i,null,t.qd,e.G.id,e.bandwidth||null,e.G.xa,a,t.W[r].Pg+t.Vd),0,null))}return n}(e,u),r=!e.zb||!e.$.ld,t?(r&&pi(new di(l),e.$.duration),t.sd(l),n=e.presentationTimeline.$b(),t.Vc(n-e.$.start)):(e.presentationTimeline.Jb(l,e.$.start),t=new di(l),c&&e.zb&&(n[c]=t)),r&&pi(t,e.$.duration),e={createSegmentIndex:Pw(i=Zy.resolve).call(i,Zy),findSegmentPosition:Pw(a=Jh(t)).call(a,t),getSegmentReference:Pw(o=t.get).call(o,t)});return{createSegmentIndex:e.createSegmentIndex,findSegmentPosition:e.findSegmentPosition,getSegmentReference:e.getSegmentReference,initSegmentReference:s,sa:u.sa}}function Ii(e){return e.gc}$("shaka.media.InitSegmentReference",li),li.prototype.Tc=function(){return this.i()},li.prototype.createUris=li.prototype.Tc,li.prototype.dd=function(){return this.h},li.prototype.getStartByte=li.prototype.dd,li.prototype.cd=function(){return this.g},li.prototype.getEndByte=li.prototype.cd,$("shaka.media.SegmentReference",fi),fi.prototype.ka=function(){return this.position},fi.prototype.getPosition=fi.prototype.ka,fi.prototype.xc=function(){return this.startTime},fi.prototype.getStartTime=fi.prototype.xc,fi.prototype.qf=function(){return this.endTime},fi.prototype.getEndTime=fi.prototype.qf,fi.prototype.Tc=function(){return this.i()},fi.prototype.createUris=fi.prototype.Tc,fi.prototype.dd=function(){return this.h},fi.prototype.getStartByte=fi.prototype.dd,fi.prototype.cd=function(){return this.g},fi.prototype.getEndByte=fi.prototype.cd,$("shaka.media.SegmentIndex",di),di.prototype.destroy=function(){return this.g=null,Zy.resolve()},di.prototype.destroy=di.prototype.destroy,di.prototype.find=function(e){for(var t=this.g.length-1,n=t;0<=n;--n){var r=this.g[n],i=n<t?this.g[n+1].startTime:r.endTime;if(e>=r.startTime&&e<i)return r.position}return this.g.length&&e<this.g[0].startTime?this.g[0].position:null},di.prototype.find=Jh(di.prototype),di.prototype.get=function(e){return 0==this.g.length||0>(e-=this.g[0].position)||e>=this.g.length?null:this.g[e]},di.prototype.get=di.prototype.get,di.prototype.offset=function(e){for(var t=0;t<this.g.length;++t)this.g[t].startTime+=e,this.g[t].endTime+=e},di.prototype.offset=di.prototype.offset,di.prototype.sd=function(e){for(var t=[],n=0,r=0;n<this.g.length&&r<e.length;){var i=this.g[n],a=e[r];i.startTime<a.startTime?(t.push(i),n++):(i.startTime>a.startTime?0==n?t.push(a):ne.v("Refusing to rewrite original references on update!"):(.1<Math.abs(i.endTime-a.endTime)?t.push(new fi(i.position,a.startTime,a.endTime,a.i,a.h,a.g)):t.push(i),n++),r++)}for(;n<this.g.length;)t.push(this.g[n++]);if(t.length)for(n=t[t.length-1].position+1;r<e.length;)i=new fi(n++,(i=e[r++]).startTime,i.endTime,i.i,i.h,i.g),t.push(i);else t=e;this.g=t},di.prototype.merge=di.prototype.sd,di.prototype.Vc=function(e){for(var t=0;t<this.g.length;++t)if(this.g[t].endTime>e){var n;return void Wd(n=this.g).call(n,0,t)}this.g=[]},di.prototype.evict=di.prototype.Vc,gi.prototype.Ca=function(){return this.g.Ca()},wi.prototype.parse=function(e,t,n,r){var i;if(440786851!=vi(t=new gi(new DataView(t))).id)throw ne.error("Not an EBML element."),new re(2,3,3008);var a=vi(t);if(408125543!=a.id)throw ne.error("Not a Segment element."),new re(2,3,3009);for(t=a.g.byteOffset,a=new gi(a.g),i=null;a.Ca();){var o=vi(a);if(357149030==o.id){i=o;break}}if(!i)throw ne.error("Not an Info element."),new re(2,3,3010);for(a=new gi(i.g),i=1e6,o=null;a.Ca();){var s=vi(a);if(2807729==s.id)i=bi(s);else if(17545==s.id)if(4==(o=s).g.byteLength)o=o.g.getFloat32(0);else{if(8!=o.g.byteLength)throw new re(2,3,3003);o=o.g.getFloat64(0)}}if(null==o)throw new re(2,3,3011);if(i=o*(a=i/1e9),475249515!=(e=vi(new gi(new DataView(e)))).id)throw ne.error("Not a Cues element."),new re(2,3,3007);return function(e,t,n,r,i,a){function o(){return i}var s=[];e=new gi(e.g);for(var u=null,c=null;e.Ca();){var l=vi(e);if(187==l.id){var f=Si(l);f&&(l=n*f.Qg,f=t+f.qg,null!=u&&s.push(new fi(s.length,u-a,l-a,o,c,f-1)),u=l,c=f)}}return null!=u&&s.push(new fi(s.length,u-a,r-a,o,c,null)),s}(e,t,a,i,n,r)};var Ci={Nb:{},cc:{},Fd:function(e,t){Ci.cc[e]=t}};function Ri(e,t,n){this.j=e,this.Ic=t,this.m=this.l=1/0,this.g=1,this.h=this.i=null,this.u=0,this.A=!0,this.o=0,this.C=void 0===n||n}function Pi(e,t,n,r){return e=rt(e,r),0==t&&null==n||(e.headers.Range=n?"bytes="+t+"-"+n:"bytes="+t+"-"),e}function Ni(){var e=this;this.h=this.g=null,this.j=[],this.i=null,this.u=[],this.m=1,this.A={},this.C=0,this.F=new Q(5),this.o=new Le((function(){!function(e){T((function t(){var n,r;return z(t,(function(t){switch(t.s){case 1:return ne.info("Updating manifest..."),n=0,O(t,2),N(t,ji(e),4);case 4:n=t.B,L(t,3);break;case 2:r=D(t),e.h&&(r.severity=1,e.h.onError(r));case 3:if(!e.h)return t.return();Di(e,n),j(t)}}))}))}(e)})),this.l=new Qe}function ji(e){var t=CT(),n=e.h.networkingEngine.request(0,rt(e.j,e.g.retryParameters));return Ze(e.l,n),n.promise.then((function(t){var n;if(e.h)return t.uri&&!SM(n=e.j).call(n,t.uri)&&e.j.unshift(t.uri),function(e,t,n){if(!(t=Zr.ze(t,"MPD")))throw new re(2,4,4001,n);return t=ci(t,e.g.retryParameters,e.g.dash.xlinkFailGracefully,n,e.h.networkingEngine),Ze(e.l,t),t.promise.then((function(t){return function(e,t,n){return T((function r(){var i,a,o,s,u,c,l,f,h,d,p,g,v,m,y,b,w,S,T,E,x,k,A,M;return z(r,(function(r){var I,C,R;switch(r.s){case 1:s=ye,c=[n],0<(l=Hb(I=Mb(C=(u=Zr).Y(t,"Location")).call(C,u.uc)).call(I,s.Ra)).length&&(f=be(c,l),c=e.j=f),h=Mb(R=u.Y(t,"BaseURL")).call(R,u.uc),d=be(c,h),p=e.g.dash.ignoreMinBufferTime,g=0,p||(g=u.R(t,"minBufferTime",u.Ma)),e.C=u.R(t,"minimumUpdatePeriod",u.Ma,-1),v=u.R(t,"availabilityStartTime",u.jg),m=u.R(t,"timeShiftBufferDepth",u.Ma),y=u.R(t,"maxSegmentDuration",u.Ma),b=t.getAttribute("type")||"static",w=e.g.dash.ignoreSuggestedPresentationDelay,S=null,w||(S=u.R(t,"suggestedPresentationDelay",u.Ma)),e.i?T=e.i.presentationTimeline:(E=Math.max(e.g.dash.defaultPresentationDelay,1.5*g),T=new Ri(v,null!=S?S:E,e.g.dash.autoCorrectDrift));for(var P={zb:"static"!=b,presentationTimeline:T,qa:null,$:null,fa:null,G:null,bandwidth:0,me:!1},O=d,_=Zr.R(t,"mediaPresentationDuration",Zr.Ma),L=[],D=0,U=Zr.Y(t,"Period"),F=0;F<U.length;F++){var K,B=U[F];D=Zr.R(B,"start",Zr.Ma,D);var H=Zr.R(B,"duration",Zr.Ma),V=null;if(F!=U.length-1){var z=Zr.R(U[F+1],"start",Zr.Ma);null!=z&&(V=z-D)}else null!=_&&(V=_-D);if(z=Te,V&&H&&Math.abs(V-H)>z&&ne.v("There is a gap/overlap between Periods",B),null==V&&(V=H),B=Oi(e,P,O,{start:D,duration:V,node:B,ld:null==V||F==U.length-1}),L.push(B),H=P.qa.id,SM(K=e.u).call(K,H)||(e.u.push(H),e.i&&(e.h.filterNewPeriod(B),e.i.periods.push(B))),null==V){F!=U.length-1&&ne.v("Skipping Period",F+1,"and any subsequent Periods:","Period",F+1,"does not have a valid start time.",L[F+1]),D=null;break}D+=V}if(null==e.i&&e.h.filterAllPeriods(L),null!=_?(D!=_&&ne.v("@mediaPresentationDuration does not match the total duration of all","Periods."),i=L,a=_,o=!1):(i=L,a=D,o=!0),x=a,k=i,T.hc("static"==b),"static"!=b&&o||T.Fa(x||1/0),T.aa()&&!isNaN(e.g.availabilityWindowOverride)&&(m=e.g.availabilityWindowOverride),null==m&&(m=1/0),T.Pd(m),T.ud(y||1),e.i){r.I(0);break}if(e.i={presentationTimeline:T,periods:k,offlineSessionIds:[],minBufferTime:g||0},!T.Pe()){r.I(0);break}return A=u.Y(t,"UTCTiming"),N(r,function(e,t,n){var r;n=Mb(n).call(n,(function(e){return{scheme:e.getAttribute("schemeIdUri"),value:e.getAttribute("value")}}));var i=e.g.dash.clockSyncUri;return!n.length&&i&&n.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:i}),ye.df(n,Pw(r=function(e){var n=e.scheme;switch(e=e.value,n){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return Fi(this,t,e,"HEAD");case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":return Fi(this,t,e,"GET");case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return n=Date.parse(e),isNaN(n)?0:n-CT();case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":return ne.ba("NTP UTCTiming scheme is not supported"),Zy.reject();default:return ne.ba("Unrecognized scheme in UTCTiming element",n),Zy.reject()}}).call(r,e)).catch((function(){return ne.ba("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),0}))}(e,d,A),4);case 4:if(M=r.B,!e.h)return r.return();T.Ke(M),j(r)}}))}))}(e,t,n)}))}(e,t.data,t.uri)})).then((function(){var n=(CT()-t)/1e3;return Z(e.F,1,n),n}))}function Oi(e,t,n,r){var i,a,o,s,u,c;if(t.qa=Ui(r.node,null,n),t.$=r,t.qa.id||(ne.info("No Period ID given for Period with start time "+r.start+", Assigning a default"),t.qa.id="__shaka_period_"+r.start),Gf(i=Zr.Y(r.node,"EventStream")).call(i,Pw(a=e.kg).call(a,e,r.start,r.duration)),n=Hb(o=Mb(s=Zr.Y(r.node,"AdaptationSet")).call(s,Pw(u=e.ig).call(u,e,t))).call(o,ye.Ra),t.zb){t=[];for(var l=w(n),f=l.next();!f.done;f=l.next())for(var h=(f=w(f.value.tg)).next();!h.done;h=f.next())t.push(h.value);if(t.length!=new $O(t).size)throw new re(2,4,4018)}var d=Hb(n).call(n,(function(e){return!e.Td}));if(Gf(c=Hb(n).call(n,(function(e){return e.Td}))).call(c,(function(e){var t=e.Td.split(" ");Gf(d).call(d,(function(n){var r;SM(t).call(t,n.id)&&Gf(r=n.streams).call(r,(function(t){var n;t.trickModeVideo=Jh(n=e.streams).call(n,(function(e){return bt(t.codecs)[0]==bt(e.codecs)[0]}))}))}))})),t=_i(d,"video"),l=_i(d,"audio"),!t.length&&!l.length)throw new re(2,4,4004);for(n=e.g.disableAudio,l.length&&!n||(l=[null]),n=e.g.disableVideo,t.length&&!n||(t=[null]),n=[],f=0;f<l.length;f++)for(h=0;h<t.length;h++)Li(e,l[f],t[h],n);if(t=[],!e.g.disableText)for(e=_i(d,"text"),l=0;l<e.length;l++)t.push.apply(t,e[l].streams);return{startTime:r.start,textStreams:t,variants:n}}function _i(e,t){return Hb(e).call(e,(function(e){return e.contentType==t}))}function Li(e,t,n,r){if(t||n)if(t&&n){var i=t.drmInfos,a=n.drmInfos;if(!i.length||!a.length||0<Gt(i,a).length){a=Gt(t.drmInfos,n.drmInfos);for(var o=0;o<t.streams.length;o++)for(var s=0;s<n.streams.length;s++)i=(n.streams[s].bandwidth||0)+(t.streams[o].bandwidth||0),i={id:e.m++,language:t.language,primary:t.pd||n.pd,audio:t.streams[o],video:n.streams[s],bandwidth:i,drmInfos:a,allowedByApplication:!0,allowedByKeySystem:!0},r.push(i)}}else for(a=t||n,o=0;o<a.streams.length;o++)i=a.streams[o].bandwidth||0,i={id:e.m++,language:a.language||"und",primary:a.pd,audio:t?a.streams[o]:null,video:n?a.streams[o]:null,bandwidth:i,drmInfos:a.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0},r.push(i)}function Di(e,t){0>e.C||e.o.V(Math.max(3,e.C-t,ee(e.F)))}function Ui(e,t,n){var r,i;t=t||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,wd:null,audioSamplingRate:null},n=n||t.xa;var a=Zr.Mb,o=Zr.ff,s=Mb(r=Zr.Y(e,"BaseURL")).call(r,Zr.uc),u=e.getAttribute("contentType")||t.contentType,c=e.getAttribute("mimeType")||t.mimeType,l=e.getAttribute("codecs")||t.codecs;o=Zr.R(e,"frameRate",o)||t.frameRate;for(var f=e.getAttribute("sar")||t.pixelAspectRatio,h=Zr.Y(e,"InbandEventStream"),d=xd(i=t.emsgSchemeIdUris).call(i),p=(h=w(h)).next();!p.done;p=h.next())p=p.value.getAttribute("schemeIdUri"),SM(d).call(d,p)||d.push(p);return h=function(e){for(var t=0;t<e.length;++t){var n=e[t],r=n.getAttribute("schemeIdUri");if(r&&(n=n.getAttribute("value")))switch(r){case"urn:mpeg:dash:outputChannelPositionList:2012":return xT(n).call(n).split(/ +/).length;case"urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case"urn:dts:dash:audio_channel_configuration:2012":var i=Sb(n,10);if(!i){ne.v("Channel parsing failure! Ignoring scheme and value",r,n);continue}return i;case"tag:dolby.com,2014:dash:audio_channel_configuration:2011":case"urn:dolby:dash:audio_channel_configuration:2011":if(!(i=Sb(n,16))){ne.v("Channel parsing failure! Ignoring scheme and value",r,n);continue}for(e=0;i;)1&i&&++e,i>>=1;return e;default:ne.v("Unrecognized audio channel scheme:",r,n)}}return null}(h=Zr.Y(e,"AudioChannelConfiguration"))||t.wd,p=Zr.R(e,"audioSamplingRate",a)||t.audioSamplingRate,u||(u=Ki(c,l)),{xa:be(n,s),ec:Zr.sc(e,"SegmentBase")||t.ec,Ua:Zr.sc(e,"SegmentList")||t.Ua,gc:Zr.sc(e,"SegmentTemplate")||t.gc,width:Zr.R(e,"width",a)||t.width,height:Zr.R(e,"height",a)||t.height,contentType:u,mimeType:c,codecs:l,frameRate:o,pixelAspectRatio:f,emsgSchemeIdUris:d,id:e.getAttribute("id"),wd:h,audioSamplingRate:p}}function Fi(e,t,n,r){return(t=rt(t=be(t,[n]),e.g.retryParameters)).method=r,t=e.h.networkingEngine.request(4,t),Ze(e.l,t),t.promise.then((function(e){if("HEAD"==r){if(!e.headers||!e.headers.date)return ne.v("UTC timing response is missing","expected date header"),0;e=e.headers.date}else e=xe(e.data);return e=Date.parse(e),isNaN(e)?(ne.v("Unable to parse date from UTC timing response"),0):e-CT()}))}function Ki(e,t){return kn(mt(e,t))?"text":e.split("/")[0]}function Bi(e,t,n,r){this.h=e,this.type=t,this.g=n,this.segments=r||null}function Hi(e,t,n,r){this.id=e,this.name=t,this.g=n,this.value=void 0===r?null:r}function Vi(e,t){this.name=e,this.value=t}function zi(e,t,n){return(e=e.getAttribute(t))?e.value:n||null}function qi(e,t){this.h=t,this.g=e}$("shaka.media.ManifestParser.registerParserByExtension",Ci.Fd),Ci.Qb=function(e,t){Ci.Nb[e]=t},$("shaka.media.ManifestParser.registerParserByMime",Ci.Qb),Ci.ng=function(){var e={};if(St()){for(var t in Ci.Nb)e[t]=!0;for(var n in Ci.cc)e[n]=!0}t={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};for(var r=(n=w(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"])).next();!r.done;r=n.next())e[r=r.value]=St()?!!Ci.Nb[r]:Tt(r);for(var i in t)e[i]=St()?!!Ci.cc[i]:Tt(t[i]);return e},Ci.create=function(e,t,n,r){return T((function i(){var a,o;return z(i,(function(i){switch(i.s){case 1:return O(i,2),N(i,Ci.rf(e,t,n,r),4);case 4:return a=i.B,i.return(new a);case 2:throw(o=D(i)).severity=2,o}}))}))},Ci.rf=function(e,t,n,r){return T((function i(){var a,o,s,u,c;return z(i,(function(i){switch(i.s){case 1:if(a=Ci,r){if(o=a.Nb[r.toLowerCase()])return i.return(o);ne.v("Could not determine manifest type using MIME type ",r)}if(s=a.getExtension(e)){if(u=a.cc[s])return i.return(u);ne.v("Could not determine manifest type for extension ",s)}else ne.v("Could not find extension for ",e);if(r){i.I(2);break}return N(i,a.zf(e,t,n),3);case 3:if(r=i.B){if(c=Ci.Nb[r])return i.return(c);ne.v("Could not determine manifest type using MIME type",r)}case 2:throw new re(2,4,4e3,e)}}))}))},Ci.zf=function(e,t,n){return T((function r(){var i,a,o;return z(r,(function(r){switch(r.s){case 1:return(i=rt([e],n)).method="HEAD",N(r,t.request(0,i).promise,2);case 2:return a=r.B,o=a.headers["content-type"],r.return(o?o.toLowerCase().split(";").shift():"")}}))}))},Ci.getExtension=function(e){return 1==(e=new ae(e).pa.split("/").pop().split(".")).length?"":e.pop().toLowerCase()},Ci.isSupported=function(e,t){return!!St()&&(t in Ci.Nb||Ci.getExtension(e)in Ci.cc)},$("shaka.media.PresentationTimeline",Ri),Ri.prototype.ha=function(){return this.l},Ri.prototype.getDuration=Ri.prototype.ha,Ri.prototype.xf=function(){return this.g},Ri.prototype.getMaxSegmentDuration=Ri.prototype.xf,Ri.prototype.Fa=function(e){this.l=e},Ri.prototype.setDuration=Ri.prototype.Fa,Ri.prototype.Ff=function(){return this.j},Ri.prototype.getPresentationStartTime=Ri.prototype.Ff,Ri.prototype.Ke=function(e){this.u=e},Ri.prototype.setClockOffset=Ri.prototype.Ke,Ri.prototype.hc=function(e){this.A=e},Ri.prototype.setStatic=Ri.prototype.hc,Ri.prototype.Pd=function(e){this.m=e},Ri.prototype.setSegmentAvailabilityDuration=Ri.prototype.Pd,Ri.prototype.Ag=function(e){this.Ic=e},Ri.prototype.setDelay=Ri.prototype.Ag,Ri.prototype.pf=function(){return this.Ic},Ri.prototype.getDelay=Ri.prototype.pf,Ri.prototype.Jb=function(e,t){if(0!=e.length){var n=e[e.length-1].endTime+t;this.vd(e[0].startTime+t),this.g=uN(e).call(e,(function(e,t){return Math.max(e,t.endTime-t.startTime)}),this.g),this.h=Math.max(this.h,n),null!=this.j&&this.C&&(this.j=(CT()+this.u)/1e3-this.h-this.g),ne.K("notifySegments:","maxSegmentDuration="+this.g)}},Ri.prototype.notifySegments=Ri.prototype.Jb,Ri.prototype.vd=function(e){this.i=null==this.i?e:Math.min(this.i,e)},Ri.prototype.notifyMinSegmentStartTime=Ri.prototype.vd,Ri.prototype.ud=function(e){this.g=Math.max(this.g,e),ne.K("notifyNewSegmentDuration:","maxSegmentDuration="+this.g)},Ri.prototype.notifyMaxSegmentDuration=Ri.prototype.ud,Ri.prototype.offset=function(e){null!=this.i&&(this.i+=e),null!=this.h&&(this.h+=e)},Ri.prototype.offset=Ri.prototype.offset,Ri.prototype.aa=function(){return 1/0==this.l&&!this.A},Ri.prototype.isLive=Ri.prototype.aa,Ri.prototype.ib=function(){return 1/0!=this.l&&!this.A},Ri.prototype.isInProgress=Ri.prototype.ib,Ri.prototype.$b=function(){if(1/0==this.m)return this.o;var e=this.Db()-this.m;return Math.max(this.o,e)},Ri.prototype.getSegmentAvailabilityStart=Ri.prototype.$b,Ri.prototype.Le=function(e){this.o=e},Ri.prototype.setUserSeekStart=Ri.prototype.Le,Ri.prototype.Db=function(){return this.aa()||this.ib()?Math.min(Math.max(0,(CT()+this.u)/1e3-this.g-this.j),this.l):this.l},Ri.prototype.getSegmentAvailabilityEnd=Ri.prototype.Db,Ri.prototype.Zb=function(e){var t=Math.max(this.i,this.o);if(1/0==this.m)return Math.ceil(1e3*t)/1e3;var n=this.Db()-this.m;return e=Math.min(n+e,this.Ka()),Math.max(t,e)},Ri.prototype.getSafeSeekRangeStart=Ri.prototype.Zb,Ri.prototype.Cb=function(){return this.Zb(0)},Ri.prototype.getSeekRangeStart=Ri.prototype.Cb,Ri.prototype.Ka=function(){var e=this.aa()||this.ib()?this.Ic:0;return Math.max(0,this.Db()-e)},Ri.prototype.getSeekRangeEnd=Ri.prototype.Ka,Ri.prototype.Pe=function(){return!(null==this.j||null!=this.h&&this.C)},Ri.prototype.usingPresentationStartTime=Ri.prototype.Pe,$("shaka.dash.DashParser",Ni),(f=Ni.prototype).configure=function(e){this.g=e},f.start=function(e,t){var n=this;return T((function r(){var i;return z(r,(function(r){switch(r.s){case 1:return n.j=[e],n.h=t,N(r,ji(n),2);case 2:if(i=r.B,n.h&&Di(n,i),!n.h)throw new re(2,7,7001);return r.return(n.i)}}))}))},f.stop=function(){return this.g=this.h=null,this.j=[],this.i=null,this.u=[],this.A={},null!=this.o&&(this.o.stop(),this.o=null),this.l.destroy()},f.update=function(){var e;ji(this).catch(Pw(e=function(e){this.h&&this.h.onError(e)}).call(e,this))},f.onExpirationUpdated=function(){},f.ig=function(e,t){var n,r,i,a,o;if(e.fa=Ui(t,e.qa,null),"image"==e.fa.contentType)return ne.v("Skipping Image AdaptationSet",e.fa),null;var s=!1,u=Zr.Y(t,"Role"),c=Hb(n=Mb(u).call(u,(function(e){return e.getAttribute("value")}))).call(n,ye.Ra),l=void 0,f="text"==e.fa.contentType;f&&(l="subtitle");for(var h=0;h<u.length;h++){var d=u[h].getAttribute("schemeIdUri");if(null==d||"urn:mpeg:dash:role:2011"==d)switch(d=u[h].getAttribute("value"),d){case"main":s=!0;break;case"caption":case"subtitle":l=d}}var p=null,g=!1;Gf(r=Zr.Y(t,"EssentialProperty")).call(r,(function(e){"http://dashif.org/guidelines/trickmode"==e.getAttribute("schemeIdUri")?p=e.getAttribute("value"):g=!0})),h=Zr.Y(t,"Accessibility");var v=new AP;for(u={},d=(h=w(h)).next();!d.done;u={Vb:u.Vb},d=h.next()){var m,y=d.value;d=y.getAttribute("schemeIdUri"),y=y.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==d||"urn:scte:dash:cc:cea-708:2015"==d?(u.Vb=1,null!=y?Gf(m=y.split(";")).call(m,function(e){return function(t){if(SM(t).call(t,"=")){var n;t=t.split("=");var r=oM(n=t[0]).call(n,"CC")?t[0]:"CC"+t[0];t=t[1].split(",")[0].split(":").pop()}else r="CC"+e.Vb,e.Vb+=2;v.set(r,zn(t))}}(u)):v.set("CC1","und")):"urn:mpeg:dash:role:2011"==d&&null!=y&&(c.push(y),"captions"==y&&(l="caption"))}if(g)return null;var b=ti(u=Zr.Y(t,"ContentProtection"),this.g.dash.customScheme,this.g.dash.ignoreDrmInfo);if(u=zn(t.getAttribute("lang")||"und"),h=t.getAttribute("label"),(d=Zr.Y(t,"Label"))&&d.length&&(d=d[0]).textContent&&(h=d.textContent),d=Zr.Y(t,"Representation"),0==(c=Hb(i=Mb(d).call(d,Pw(a=this.lg).call(a,this,e,b,l,u,h,s,c,v))).call(i,(function(e){return!!e}))).length){if(this.g.dash.ignoreEmptyAdaptationSet||f)return null;throw new re(2,4,4003)}return e.fa.contentType&&"application"!=e.fa.contentType||(e.fa.contentType=Ki(c[0].mimeType,c[0].codecs),Gf(c).call(c,(function(t){t.type=e.fa.contentType}))),Gf(c).call(c,(function(e){var t;Gf(t=b.drmInfos).call(t,(function(t){e.keyId&&t.keyIds.push(e.keyId)}))})),f=Hb(o=Mb(d).call(d,(function(e){return e.getAttribute("id")}))).call(o,ye.Ra),{id:e.fa.id||"__fake__"+this.m++,contentType:e.fa.contentType,language:u,pd:s,streams:c,drmInfos:b.drmInfos,Td:p,tg:f}},f.lg=function(e,t,n,r,i,a,o,s,u){if(e.G=Ui(u,e.fa,null),!function(e){var t=e.ec?1:0;return t+=e.Ua?1:0,0==(t+=e.gc?1:0)?"text"==e.contentType||"application"==e.contentType||(ne.v("Representation does not contain a segment information source:","the Representation must contain one of SegmentBase, SegmentList,",'SegmentTemplate, or explicitly indicate that it is "text".',e),!1):(1!=t&&(ne.v("Representation contains multiple segment information sources:","the Representation should only contain one of SegmentBase,","SegmentList, or SegmentTemplate.",e),e.ec?(ne.info("Using SegmentBase by default."),e.Ua=null):ne.info("Using SegmentList by default."),e.gc=null),!0)}(e.G))return ne.v("Skipping Representation",e.G),null;e.bandwidth=Zr.R(u,"bandwidth",Zr.Gc)||0;var c=e.G.contentType;c="text"==c||"application"==c;try{var l,f=Pw(l=this.ug).call(l,this);if(e.G.ec)var h=function(e,t){var n=Number(si(e,xi,"presentationTimeOffset"))||0,r=si(e,xi,"timescale"),i=1;r&&(i=Zr.Gc(r)||1),n=n/i||0,r=Ti(e,xi);var a=e.G.contentType;if(i=e.G.mimeType.split("/")[1],"text"!=a&&"mp4"!=i&&"webm"!=i)throw ne.error("SegmentBase specifies an unsupported container type.",e.G),new re(2,4,4006);if("webm"==i&&!r)throw ne.error("SegmentBase does not contain sufficient segment information:","the SegmentBase uses a WebM container,","but does not contain an Initialization element.",e.G),new re(2,4,4005);a=ui(e,xi,"RepresentationIndex");var o=si(e,xi,"indexRange"),s=e.G.xa;if(o=Zr.Hc(o||""),a){var u=a.getAttribute("sourceURL");u&&(s=be(e.G.xa,[u])),o=Zr.R(a,"range",Zr.Hc,o)}if(!o)throw ne.error("SegmentBase does not contain sufficient segment information:","the SegmentBase does not contain @indexRange","or a RepresentationIndex element.",e.G),new re(2,4,4002);return{createSegmentIndex:(i=Ei(e,t,r,s,o.start,o.end,i,n)).createSegmentIndex,findSegmentPosition:i.findSegmentPosition,getSegmentReference:i.getSegmentReference,initSegmentReference:r,sa:n}}(e,f);else if(e.G.Ua)h=ki(e,this.A);else if(e.G.gc)h=Mi(e,f,this.A,!!this.i);else{var d,p=e.G.xa,g=e.$.duration||0;h={createSegmentIndex:Pw(d=Zy.resolve).call(d,Zy),findSegmentPosition:function(e){return 0<=e&&e<g?1:null},getSegmentReference:function(e){return 1!=e?null:new fi(1,0,g,(function(){return p}),0,null)},initSegmentReference:null,sa:0}}}catch(v){if(c&&4002==v.code)return null;throw v}return u=function(e,t,n,r){var i,a=ti(e,t,r);if(n.ge)e=1==n.drmInfos.length&&!n.drmInfos[0].keySystem,t=0==a.drmInfos.length,(0==n.drmInfos.length||e&&!t)&&(n.drmInfos=a.drmInfos),n.ge=!1;else if(0<a.drmInfos.length&&(n.drmInfos=Hb(i=n.drmInfos).call(i,(function(e){var t;return hS(t=a.drmInfos).call(t,(function(t){return t.keySystem==e.keySystem}))})),0==n.drmInfos.length))throw new re(2,4,4008);return a.be||n.be}(u=Zr.Y(u,"ContentProtection"),this.g.dash.customScheme,t,this.g.dash.ignoreDrmInfo),{id:this.m++,originalId:e.G.id,createSegmentIndex:h.createSegmentIndex,findSegmentPosition:h.findSegmentPosition,getSegmentReference:h.getSegmentReference,initSegmentReference:h.initSegmentReference,presentationTimeOffset:h.sa,mimeType:e.G.mimeType,codecs:e.G.codecs,frameRate:e.G.frameRate,pixelAspectRatio:e.G.pixelAspectRatio,bandwidth:e.bandwidth,width:e.G.width,height:e.G.height,kind:n,encrypted:0<t.drmInfos.length,keyId:u,language:r,label:i,type:e.fa.contentType,primary:a,trickModeVideo:null,emsgSchemeIdUris:e.G.emsgSchemeIdUris,roles:o,channelsCount:e.G.wd,audioSamplingRate:e.G.audioSamplingRate,closedCaptions:s}},f.kg=function(e,t,n){var r,i,a=Zr.Mb,o=n.getAttribute("schemeIdUri")||"",s=n.getAttribute("value")||"",u=Zr.R(n,"timescale",a)||1;Gf(r=Zr.Y(n,"Event")).call(r,Pw(i=function(n){var r=Zr.R(n,"presentationTime",a)||0,i=Zr.R(n,"duration",a)||0;i=(r=r/u+e)+i/u,null!=t&&(r=Math.min(r,e+t),i=Math.min(i,e+t)),n={schemeIdUri:o,value:s,startTime:r,endTime:i,id:n.getAttribute("id")||"",eventElement:n},this.h.onTimelineRegionAdded(n)}).call(i,this))},f.ug=function(e,t,n){return e=Pi(e,t,n,this.g.retryParameters),e=this.h.networkingEngine.request(1,e),Ze(this.l,e),e.promise.then((function(e){return e.data}))},Ci.Fd("mpd",Ni),Ci.Qb("application/dash+xml",Ni),Ci.Qb("video/vnd.mpeg.dash.mpd",Ni),Hi.prototype.toString=function(){var e,t="#"+this.name,n=this.g?Mb(e=this.g).call(e,(function(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)})):[];return this.value&&n.unshift(this.value),0<n.length&&(t+=":"+n.join(",")),t},Hi.prototype.getAttribute=function(e){var t,n=Hb(t=this.g).call(t,(function(t){return t.name==e}));return n.length?n[0]:null};var Gi={Ab:function(e,t){return Hb(e).call(e,(function(e){return e.name==t}))},cb:function(e,t){var n=Gi.Ab(e,t);return n.length?n[0]:null},Zc:function(e,t,n){return Hb(e).call(e,(function(e){var r=e.getAttribute("TYPE");return e=e.getAttribute("GROUP-ID"),r.value==t&&e.value==n}))},Sc:function(e,t){return be([e],[t])[0]},kd:function(e){return/^#(?!EXT)/m.test(e)}};function Wi(e){this.h=e,this.g=0}function Xi(e){Yi(e,/[ \t]+/gm)}function Yi(e,t){t.lastIndex=e.g;var n=t.exec(e.h);return n=null==n?null:{position:n.index,length:n[0].length,wg:n},e.g==e.h.length||null==n||n.position!=e.g?null:(e.g+=n.length,n.wg)}function $i(e){return e.g==e.h.length?null:(e=Yi(e,/[^ \t\n]*/gm))?e[0]:null}function Ji(){this.g=0}function Qi(e,t,n){var r;t=xe(t);var i=(t=xT(r=t.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")).call(r)).split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(i[0]))throw new re(2,4,4015);t=0;for(var a=1;a<i.length;a++)if(!Gi.kd(i[a])){var o=ea(e,i[a]);if(--e.g,SM(ta).call(ta,o.name)){t=1;break}"EXT-X-STREAM-INF"==o.name&&(a+=1)}for(a=[],o=1;o<i.length;)if(Gi.kd(i[o]))o+=1;else{var s=ea(e,i[o]);if(SM(na).call(na,s.name)){if(1!=t)throw new re(2,4,4017);return new Bi(n,t,a,e=Zi(e,n,i=Wd(i).call(i,o,i.length-o),a))}a.push(s),o+=1,"EXT-X-STREAM-INF"==s.name&&(s.g.push(new Vi("URI",i[o])),o+=1)}return new Bi(n,t,a)}function Zi(e,t,n,r){var i=[],a=[];return Gf(n).call(n,(function(n){if(/^(#EXT)/.test(n))n=ea(e,n),SM(ta).call(ta,n.name)?r.push(n):a.push(n);else{if(Gi.kd(n))return[];n=Gi.Sc(t,xT(n).call(n)),i.push(new qi(n,a)),a=[]}})),i}function ea(e,t){var n=e.g++,r=t.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!r)throw new re(2,4,4016,t);var i,a=r[1],o=r[2];if(r=[],o){var s;(s=Yi(o=new Wi(o),/^([^,=]+)(?:,|$)/g))&&(i=s[1]);for(var u=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;s=Yi(o,u);)r.push(new Vi(s[1],s[2]||s[3]))}return new Hi(n,a,r,i)}var ta="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-MAP EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST".split(" "),na="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE".split(" ");function ra(e){try{var t=ra.parse(e);return He({uri:e,Bd:e,data:t.data,headers:{"content-type":t.contentType}})}catch(n){return Ke(n)}}function ia(){var e=this;this.g=this.j=null,this.ea=1,this.L=new AP,this.Z=new $O,this.h=new AP,this.i=null,this.F="",this.C=new Ji,this.X=0,this.m=new Le((function(){!function(e){T((function t(){var n,r;return z(t,(function(t){switch(t.s){case 1:return ne.info("Updating manifest..."),e.j?(O(t,2),N(t,e.update(),4)):t.return();case 4:n=e.X,e.m.V(n),L(t,0);break;case 2:if(r=D(t),!e.j)return t.return();r.severity=1,e.j.onError(r),e.m.V(.1),j(t)}}))}))}(e)})),this.l=xa,this.A=null,this.J=0,this.M=1/0,this.o=new Qe,this.P=[],this.u=new AP,this.da=!1}function aa(e,t){return T((function n(){var r,i,a,o,s,u,c,l,f,h;return z(n,(function(n){switch(n.s){case 1:return r=Gi,i=ka,a=t.We,N(n,Ta(e,rt([a],e.g.retryParameters),0),2);case 2:if(o=n.B,1!=(s=Qi(e.C,o.data,o.uri)).type)throw new re(2,4,4017);return c=(u=r.cb(s.g,"EXT-X-MEDIA-SEQUENCE"))?Number(u.value):0,l=t.stream,N(n,da(e,t.Pc,s,c,l.mimeType,l.codecs),3);case 3:f=n.B,t.fc.g=f,h=f[f.length-1],r.cb(s.g,"EXT-X-ENDLIST")&&(Sa(e,i.$a),e.i.Fa(h.endTime)),j(n)}}))}))}function oa(e){Gf(e).call(e,(function(e){if(e){var t=e.stream.codecs.split(",");t=Hb(t).call(t,(function(e){return"mp4a.40.34"!=e})),e.stream.codecs=t.join(",")}}))}function sa(e,t,n,r,i){return{id:e.ea++,language:t?t.language:"und",primary:!!t&&t.primary||!!n&&n.primary,audio:t,video:n,bandwidth:r,drmInfos:i,allowedByApplication:!0,allowedByKeySystem:!0}}function ua(e,t,n){return T((function r(){var i,a,o,s,u,c,l,f,h,d,p;return z(r,(function(r){switch(r.s){case 1:if(i=va(t,"URI"),e.h.has(i))return r.return(e.h.get(i));if(a=va(t,"TYPE").toLowerCase(),o=Se,"subtitles"==a&&(a=o.za),s=zn(zi(t,"LANGUAGE","und")),u=zi(t,"NAME"),c=t.getAttribute("DEFAULT"),l="YES"==c,f=zi(t,"CHANNELS"),"audio"==a)if(f){var g=f.split("/")[0];g=Sb(g,10)}else g=null;else g=null;return h=g,d=zi(t,"CHARACTERISTICS"),N(r,ca(e,i,n,a,s,l,u,h,null,d),2);case 2:return p=r.B,e.h.has(i)?r.return(e.h.get(i)):null==p?r.return(null):(e.L.set(t.id,p),e.h.set(i,p),r.return(p))}}))}))}function ca(e,t,n,r,i,a,o,s,u,c){return T((function l(){var f,h,d,p,g,v,m,y,b,S,E,x,k,A,M,I,C,R,P,j,_,U,F,K,B,H,V,q;return z(l,(function(l){var G,W,X,Y;switch(l.s){case 1:return h=(f=Gi).Sc(e.F,t),N(l,Ta(e,rt([h],e.g.retryParameters),0),2);case 2:if(d=l.B,h=d.uri,1!=(p=Qi(e.C,d.data,h)).type)throw new re(2,4,4017);g=[],Gf(G=p.segments).call(G,(function(e){e=f.Ab(e.h,"EXT-X-KEY"),g.push.apply(g,e)})),v=!1,m=[],y=null;for(var $=w(g),J=$.next();!J.done;J=$.next())if(b=J.value,"NONE"!=(S=va(b,"METHOD"))){if(v=!0,"AES-128"==S)return ne.v("Unsupported HLS Encryption",S),e.da=!0,l.return(null);E=va(b,"KEYFORMAT"),(k=(x=Ea[E])?x(b):null)?(k.keyIds.length&&(y=k.keyIds[0]),m.push(k)):ne.v("Unsupported HLS KEYFORMAT",E)}if(v&&!m.length)throw new re(2,4,4026);return function(e,t){var n=ka,r=Gi.cb(t.g,"EXT-X-PLAYLIST-TYPE"),i=Gi.cb(t.g,"EXT-X-ENDLIST");i=r&&"VOD"==r.value||i,r=r&&"EVENT"==r.value&&!i,r=!i&&!r,i?Sa(e,n.$a):(Sa(e,r?n.Wd:n.Se),n=ma(t.g,"EXT-X-TARGETDURATION"),n=Number(n.value),e.J=Math.max(n,e.J),e.M=Math.min(n,e.M))}(e,p),A=function(e,t){if(1==t.length)return t[0];var n=ga(e,t);if(null!=n)return n;throw new re(2,4,4025,t)}(r,n),N(l,function(e,t,n,r){return T((function i(){var a,o,s,u,c,l,f,h,d,p;return z(i,(function(i){switch(i.s){case 1:return a=Se,o=r.segments[0].g,s=new ae(o),u=s.pa.split(".").pop(),c=wa[t],(l=c[u])?i.return(l):t==a.za?n&&"vtt"!=n&&"wvtt"!=n?i.return("application/mp4"):i.return("text/vtt"):((f=rt([o],e.g.retryParameters)).method="HEAD",N(i,Ta(e,f,1),2));case 2:return h=i.B,(d=h.headers["content-type"])?i.return(d.split(";")[0]):(p=c.mp4,i.return(p))}}))}))}(e,r,A,p),3);case 3:return M=l.B,SM(ba).call(ba,M)&&(A=""),C=(I=f.cb(p.g,"EXT-X-MEDIA-SEQUENCE"))?Number(I.value):0,O(l,4),N(l,da(e,t,p,C,M,A),6);case 6:R=l.B,L(l,5);break;case 4:if(4035==(P=D(l)).code)return ne.ba("Skipping unsupported HLS stream",M,t),l.return(null);throw P;case 5:if(j=R[0].startTime,_=R[R.length-1].endTime,U=_-j,F=new di(R),K=la(p),B=void 0,"text"==r&&(B="subtitle"),H=[],c)for(J=($=w(c.split(","))).next();!J.done;J=$.next())V=J.value,H.push(V);return q={id:e.ea++,originalId:o,createSegmentIndex:Pw(W=Zy.resolve).call(W,Zy),findSegmentPosition:Pw(X=Jh(F)).call(X,F),getSegmentReference:Pw(Y=F.get).call(Y,F),initSegmentReference:K,presentationTimeOffset:0,mimeType:M,codecs:A,kind:B,encrypted:v,keyId:y,language:i,label:o,type:r,primary:a,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:H,channelsCount:s,audioSamplingRate:null,closedCaptions:u},l.return({stream:q,fc:F,drmInfos:m,Pc:t,We:h,td:j,Yg:_,duration:U})}}))}))}function la(e){var t=Gi.Ab(e.g,"EXT-X-MAP");if(!t.length)return null;if(1<t.length)throw new re(2,4,4020);var n=va(t=t[0],"URI"),r=Gi.Sc(e.h,n);return e=0,n=null,(t=zi(t,"BYTERANGE"))&&(e=t.split("@"),t=Number(e[0]),n=(e=Number(e[1]))+t-1),new li((function(){return[r]}),e,n)}function fa(e,t,n,r){var i=t.h,a=t.g;t=ma(i,"EXTINF").value.split(","),t=r+Number(t[0]);var o=0,s=null;return(i=Gi.cb(i,"EXT-X-BYTERANGE"))&&(o=i.value.split("@"),i=Number(o[0]),s=(o=o[1]?Number(o[1]):e.g+1)+i-1),new fi(n,r,t,(function(){return[a]}),o,s)}function ha(e){var t;e.i&&(Gf(t=e.P).call(t,(function(t){e.i.Jb(t,0)})),e.P=[])}function da(e,t,n,r,i,a){return T((function o(){var s,u,c,l,f,h,d,p,g,v;return z(o,(function(o){switch(o.s){case 1:return s=n.segments,u=[],c=s[0].g,l=fa(null,s[0],r,0),f=la(n),N(o,function(e,t,n,r,i,a){return T((function o(){var s,u,c,l,f,h,d,p,g;return z(o,(function(o){switch(o.s){case 1:if(e.A){if(s=e.h.get(t),u=s.fc,c=u.get(r.position))return ne.K("Found segment start time in previous manifest"),o.return(c.startTime);ne.debug("Unable to find segment start time in previous manifest!")}if(ne.K("Fetching segment to find start time"),i=i.toLowerCase(),SM(ba).call(ba,i))throw ne.ba("Raw formats are not yet supported. Skipping "+i),new re(1,4,4035);if("video/webm"==i)throw ne.ba("WebM in HLS is not yet supported. Skipping."),new re(1,4,4035);if("video/mp4"!=i&&"audio/mp4"!=i){o.I(2);break}return l=[pa(e,r)],n&&l.push(pa(e,n)),N(o,Zy.all(l),3);case 3:return f=o.B,h=f[0],d=f[1]||f[0],o.return(function(e,t,n,r){var i=0;if((new qr).box("moov",Gr).box("trak",Gr).box("mdia",Gr).ma("mdhd",(function(e){e.reader.U(0==e.version?8:16),i=e.reader.N(),e.parser.stop()})).parse(r,!0),!i)throw ne.error("Unable to find timescale in init segment!"),new re(2,4,4030,e,t);var a=0,o=!1;if((new qr).box("moof",Gr).box("traf",Gr).ma("tfdt",(function(e){a=(0==e.version?e.reader.N():e.reader.Pb())/i,o=!0,e.parser.stop()})).parse(n,!0),!o)throw new re(2,4,4030,e,t);return a}(t,h.uri,h.data,d.data));case 2:if("video/mp2t"!=i){o.I(4);break}return N(o,pa(e,r),5);case 5:return p=o.B,o.return(function(e,t,n){function r(){a.seek(o+188),71!=(s=a.ra())&&(a.seek(o+192),s=a.ra()),71!=s&&(a.seek(o+204),s=a.ra()),71!=s&&i(),a.Fe(1)}function i(){throw new re(2,4,4030,e,t)}for(var a=new Hr(new DataView(n),0),o=0,s=0;;)if(o=a.ka(),71!=(s=a.ra())&&i(),8191==(8191&(n=a.dc())))r();else if(16384&n){if(0!=(n=(48&a.ra())>>4)&&2!=n||i(),3==n&&(n=a.ra(),a.U(n)),1==a.N()>>8)return a.U(3),0!=(n=a.ra()>>6)&&1!=n||i(),0==a.ra()&&i(),(1073741824*((14&(n=a.ra()))>>1)+((65534&a.dc())<<14|(65534&a.dc())>>1))/9e4;r()}else r()}(t,p.uri,p.data));case 4:if("application/mp4"!=i&&!oM(i).call(i,"text/")){o.I(6);break}return N(o,pa(e,r),7);case 7:return g=o.B,o.return(function(e,t,n){return kn(e=mt(e,t))?(An(t=new En(null),e),t.xc(n)):0}(i,a,g.data));case 6:throw new re(2,4,4030,t)}}))}))}(e,t,f,l,i,a),2);case 2:h=o.B,ne.debug("First segment",c.split("/").pop(),"starts at",h);for(var m=0;m<s.length;++m)d=s[m],p=u[u.length-1],g=0==m?h:p.endTime,v=fa(p,d,r+m,g),u.push(v);return e.P.push(u),ha(e),o.return(u)}}))}))}function pa(e,t){return T((function n(){var r,i,a,o,s,u;return z(n,(function(n){switch(n.s){case 1:return r=1,i=Pi(t.i(),t.h,t.h+2048-1,e.g.retryParameters),a=Pi(t.i(),t.h,t.g,e.g.retryParameters),e.g.hls.useFullSegmentsForStartTime?n.return(Ta(e,a,r)):(O(n,2),N(n,Ta(e,i,r),4));case 4:return o=n.B,n.return(o);case 2:if(7001==(s=D(n)).code)throw s;return ne.ba("Unable to fetch a partial HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",i.uris[0]),N(n,Ta(e,a,r),5);case 5:return u=n.B,n.return(u)}}))}))}function ga(e,t){for(var n=ya[e],r=0;r<n.length;r++)for(var i=0;i<t.length;i++){var a,o;if(n[r].test(xT(a=t[i]).call(a)))return xT(o=t[i]).call(o)}return"text"==e?"":null}function va(e,t){var n=e.getAttribute(t);if(!n)throw new re(2,4,4023,t);return n.value}function ma(e,t){var n=Gi.cb(e,t);if(!n)throw new re(2,4,4024,t);return n}$("shaka.net.DataUriPlugin",ra),ra.parse=function(t){var n=t.split(":");if(2>n.length||"data"!=n[0])throw ne.error("Bad data URI, failed to parse scheme"),new re(2,1,1004,t);if(2>(n=xd(n).call(n,1).join(":").split(",")).length)throw ne.error("Bad data URI, failed to extract encoding and MIME type"),new re(2,1,1004,t);var r=n[0];t=e.decodeURIComponent(xd(n).call(n,1).join(",")),n=r.split(";"),r=n[0];var i=!1;return 1<n.length&&"base64"==n[n.length-1]&&(i=!0,n.pop()),{data:i?Pe.Ja(t).buffer:Me(t),contentType:r}},nt("data",ra),$("shaka.hls.HlsParser",ia),(f=ia.prototype).configure=function(e){this.g=e},f.start=function(e,t){var n=this;return T((function r(){var i,a;return z(r,(function(r){switch(r.s){case 1:return n.j=t,N(r,Ta(n,rt([e],n.g.retryParameters),0),2);case 2:return i=r.B,n.F=i.uri,N(r,function(e,t){return T((function n(){var r,i,a,o,s,u,c,l,f,h,d;return z(n,(function(n){switch(n.s){case 1:if(0!=(r=Qi(e.C,t,e.F)).type)throw new re(2,4,4022);return N(n,function(e,t){return T((function n(){var r,i,a,o,s,u,c,l,f,h,d,p;return z(n,(function(n){var g,v,m;switch(n.s){case 1:return r=Gi,i=ye,a=t.g,o=r.Ab(t.g,"EXT-X-MEDIA"),s=Hb(o).call(o,Pw(g=function(e){return"SUBTITLES"==va(e,"TYPE")}).call(g,e)),u=Mb(s).call(s,Pw(v=function(e){var t=this;return T((function n(){var r;return z(n,(function(n){switch(n.s){case 1:return t.g.disableText?n.return(null):(O(n,2),N(n,function(e,t){return T((function n(){var r;return z(n,(function(n){switch(n.s){case 1:return va(t,"TYPE"),N(n,ua(e,t,[]),2);case 2:return r=n.B,n.return(r.stream)}}))}))}(t,e),4));case 4:return n.return(n.B);case 2:if(r=D(n),t.g.hls.ignoreTextStreamFailures)return n.return(null);throw r}}))}))}).call(v,e)),c=Hb(o).call(o,(function(e){return"CLOSED-CAPTIONS"==va(e,"TYPE")})),function(e,t){for(var n=w(t),r=n.next();!r.done;r=n.next()){va(r=r.value,"TYPE");var i=zi(r,"LANGUAGE")||"und";i=zn(i);var a=va(r,"GROUP-ID");r=va(r,"INSTREAM-ID"),e.u.get(a)||e.u.set(a,new AP),e.u.get(a).set(r,i)}}(e,c),N(n,Zy.all(u),2);case 2:return l=n.B,f=r.Ab(a,"EXT-X-STREAM-INF"),h=Mb(f).call(f,Pw(m=function(e){return function(e,t,n){return T((function r(){var i,a,o,s,u,c,l,f,h,d,p,g,v,m,y,b,S,E,x,k,A,M,I,C,R,P,j,O,_;return z(r,(function(r){var L;switch(r.s){case 1:return i=Se,a=Gi,o=[],e.g.disableVideo||o.push("avc1.42E01E"),e.g.disableAudio||o.push("mp4a.40.2"),s=o.join(","),u=zi(t,"CODECS",s),c=function(e){for(var t=new $O,n=[],r=(e=w(e)).next();!r.done;r=e.next()){var i=bt(r=r.value)[0];t.has(i)?ne.debug("Ignoring duplicate codec"):(n.push(r),t.add(i))}return n}(u.split(/\s*,\s*/)),l=t.getAttribute("RESOLUTION"),h=f=null,d=zi(t,"FRAME-RATE"),p=Number(zi(t,"AVERAGE-BANDWIDTH"))||Number(va(t,"BANDWIDTH")),l&&(g=l.value.split("x"),f=g[0],h=g[1]),v=a.Ab(n.g,"EXT-X-MEDIA"),v=Hb(v).call(v,(function(e){return"CLOSED-CAPTIONS"!=va(e,"TYPE")})),v=Hb(v).call(v,(function(e){var t=zi(e,"URI")||"";return"SUBTITLES"==(zi(e,"TYPE")||"")||""!=t})),m=zi(t,"AUDIO"),y=zi(t,"VIDEO"),m?v=a.Zc(v,"AUDIO",m):y&&(v=a.Zc(v,"VIDEO",y)),(b=ga(i.za,c))&&((S=zi(t,"SUBTITLES"))&&(E=a.Zc(v,"SUBTITLES",S)).length&&(x=e.L.get(E[0].id))&&(x.stream.codecs=b),$e(c,b)),k=Mb(v).call(v,Pw(L=function(e){return ua(this,e,c)}).call(L,e)),A=[],M=[],N(r,Zy.all(k),2);case 2:if(C=r.B,C=Hb(C).call(C,(function(e){return null!=e})),m?A=C:y&&(M=C),ne.debug("Guessing stream type for",t.toString()),P=!1,A.length||M.length?A.length?(O=va(t,"URI"),_=A[0].Pc,O==_?(ne.debug("Guessing audio-only."),R=i.Sb,P=!0):(ne.debug("Guessing video."),R=i.Za)):(ne.debug("Guessing audio."),R=i.Sb):1==c.length?(j=ga(i.Za,c),l||d||j?(ne.debug("Guessing video-only."),R=i.Za):(ne.debug("Guessing audio-only."),R=i.Sb)):(ne.debug("Guessing multiplexed audio+video."),R=i.Za,c=[c.join(",")]),P){r.I(3);break}return N(r,function(e,t,n,r){return T((function i(){var a,o,s,u,c;return z(i,(function(i){switch(i.s){case 1:return a=Se,o=va(t,"URI"),e.h.has(o)?i.return(e.h.get(o)):(s=zi(t,"CLOSED-CAPTIONS"),u=null,r==a.Za&&s&&"NONE"!=s&&(u=e.u.get(s)),N(i,ca(e,o,n,r,"und",!1,null,null,u,null),2));case 2:return null==(c=i.B)?i.return(null):e.h.has(o)?i.return(e.h.get(o)):(e.h.set(o,c),i.return(c))}}))}))}(e,t,c,R),4);case 4:I=r.B;case 3:if(I)I.stream.type==i.Sb?A=[I]:M=[I];else if(null===I)return ne.debug("streamInfo is null"),r.return([]);return M&&oa(M),A&&oa(A),r.return(function(e,t,n,r,i,a,o){var s;Gf(n).call(n,Pw(s=function(e){(e=e.stream)&&(e.width=Number(i)||void 0,e.height=Number(a)||void 0,e.frameRate=Number(o)||void 0)}).call(s,e));var u=!!e.g&&e.g.disableAudio;t.length&&!u||(t=[null]),u=!!e.g&&e.g.disableVideo,(!n.length||u)&&(n=[null]),u=[];for(var c=(t=w(t)).next();!c.done;c=t.next()){c=c.value;for(var l=w(n),f=l.next();!f.done;f=l.next()){var h=f.value;f=c?c.stream:null;var d=h?h.stream:null,p=c?c.drmInfos:null,g=h?h.drmInfos:null;h=(h?h.Pc:"")+" - "+(c?c.Pc:"");var v=void 0;if(f&&d){if(p.length&&g.length&&!(0<Gt(p,g).length)){ne.v("Incompatible DRM info in HLS variant. Skipping.");continue}v=Gt(p,g)}else f?v=p:d&&(v=g);e.Z.has(h)?ne.debug("Skipping variant which only differs in text streams."):(f=sa(e,f,d,r,v),u.push(f),e.Z.add(h))}}return u}(e,A,M,p,f,h,d))}}))}))}(this,e,t)}).call(m,e)),N(n,Zy.all(h),3);case 3:return d=n.B,p=uN(d).call(d,i.Rc,[]),p=Hb(p).call(p,(function(e){return null!=e})),n.return({startTime:0,variants:p,textStreams:Hb(l).call(l,(function(e){return null!=e}))})}}))}))}(e,r),2);case 2:if(i=n.B,!e.j)throw new re(2,7,7001);if(e.da&&0==i.variants.length)throw ne.info("No stream is created, because we don't support AES-128","encryption yet"),new re(2,4,4034);e.j.filterAllPeriods([i]),a=1/0,o=0,s=1/0;for(var p=w(OP(v=e.h).call(v)),g=p.next();!g.done;g=p.next()){var v;u=g.value,a=Math.min(a,u.td),o=Math.max(o,u.td),"text"!=u.stream.type&&(s=Math.min(s,u.duration))}if(e.l!=ka.$a?(e.i=new Ri(0,3*e.J),e.i.hc(!1)):(e.i=new Ri(null,0),e.i.hc(!0)),ha(e),e.l!=ka.$a){for(e.X=e.M,c=ka,e.l==c.Wd&&(l=e.i.Ic,isNaN(e.g.availabilityWindowOverride)||(l=e.g.availabilityWindowOverride),e.i.Pd(l)),f=0;95443.7176888889<=o;)f+=95443.7176888889,o-=95443.7176888889;if(f)for(ne.debug("Offsetting live streams by",f,"to compensate for rollover"),g=(p=w(OP(m=e.h).call(m))).next();!g.done;g=p.next()){var m;95443.7176888889>(h=g.value).td?(ne.K("Offset applied to",h.stream.type),h.stream.presentationTimeOffset=-f,h.fc.offset(f)):ne.K("Offset NOT applied to",h.stream.type)}}else for(e.i.Fa(s),e.i.offset(-a),g=(p=w(OP(y=e.h).call(y))).next();!g.done;g=p.next()){var y;(d=g.value).stream.presentationTimeOffset=a,d.fc.offset(-a),pi(d.fc,s)}e.A={presentationTimeline:e.i,periods:[i],offlineSessionIds:[],minBufferTime:0},j(n)}}))}))}(n,i.data),3);case 3:return 0<(a=n.X)&&n.m.V(a),r.return(n.A)}}))}))},f.stop=function(){this.m&&(this.m.stop(),this.m=null);var e=[];return this.o&&(e.push(this.o.destroy()),this.o=null),this.g=this.j=null,this.L.clear(),this.Z.clear(),this.h.clear(),this.A=null,Zy.all(e)},f.update=function(){if(this.l!=ka.$a){for(var e=[],t=w(OP(r=this.h).call(r)),n=t.next();!n.done;n=t.next()){var r;e.push(aa(this,n.value))}return Zy.all(e)}},f.onExpirationUpdated=function(){};var ya={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]},ba=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],wa={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"}};function Sa(e,t){e.l=t,e.i&&e.i.hc(e.l==ka.$a),e.l!=ka.$a||e.m.stop()}function Ta(e,t,n){if(!e.o)throw new re(2,7,7001);return t=e.j.networkingEngine.request(n,t),Ze(e.o,t),t.promise}var Ea={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(e){var t=va(e,"METHOD");Qn("HLS SAMPLE-AES-CENC","SAMPLE-AES-CENC will no longer be supported, see Issue #1227");var n=["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"];return SM(n).call(n,t)?(t=va(e,"URI"),t=ra.parse(t),t=we("com.widevine.alpha",[{initDataType:"cenc",initData:t=new Uint8Array(t.data)}]),(e=zi(e,"KEYID"))&&(t.keyIds=[e.toLowerCase().substr(2)]),t):(ne.error("Widevine in HLS is only supported with [",n.join(", "),"], not",t),null)}},xa="VOD",ka={$a:xa,Se:"EVENT",Wd:"LIVE"};function Aa(){this.g=new AP}function Ma(e,t,n){Ia(e,t).text=n}function Ia(e,t){return e.g.has(t)||e.g.set(t,new Ca),e.g.get(t)}function Ca(){this.text=this.variant=null}function Ra(e,t){this.g=e,this.h=new $O([e]);for(var n=w(t=t||[]),r=n.next();!r.done;r=n.next())this.add(r.value)}function Pa(e,t){var n;if(!(n=!!e.audio!=!!t.audio||!!e.video!=!!t.video||e.language!=t.language)&&(n=e.audio&&t.audio)){n=e.audio;var r=t.audio;n=!(n.channelsCount==r.channelsCount&&Na(n,r)&&ja(n.roles,r.roles))}return!n&&(n=e.video&&t.video)&&(n=!(Na(n=e.video,r=t.video)&&ja(n.roles,r.roles))),!n}function Na(e,t){var n,r;if(e.mimeType!=t.mimeType)return!1;var i=Mb(n=e.codecs.split(",")).call(n,(function(e){return bt(e)[0]})),a=Mb(r=t.codecs.split(",")).call(r,(function(e){return bt(e)[0]}));if(i.length!=a.length)return!1;Nh(i).call(i),Nh(a).call(a);for(var o=0;o<i.length;o++)if(i[o]!=a[o])return!1;return!0}function ja(e,t){var n=new $O(e),r=new $O(t);if(n.delete("main"),r.delete("main"),n.size!=r.size)return!1;for(var i=(n=w(n)).next();!i.done;i=n.next())if(!r.has(i.value))return!1;return!0}function Oa(e){this.g=e,this.h=new _a(e.language,"",e.audio&&e.audio.channelsCount?e.audio.channelsCount:0,"")}function _a(e,t,n,r){this.i=e,this.j=t,this.g=n,this.h=void 0===r?"":r}function La(){this.g=Fa,this.h=(new AP).set(Fa,2).set(Ua,1)}function Da(e,t,n){e.h.set(Fa,n).set(Ua,t)}Ci.Fd("m3u8",ia),Ci.Qb("application/x-mpegurl",ia),Ci.Qb("application/vnd.apple.mpegurl",ia),Ra.prototype.add=function(e){return Pa(this.g,e)?(this.h.add(e),!0):(ne.v("Rejecting variant - not compatible with root."),!1)},Ra.prototype.values=function(){var e;return OP(e=this.h).call(e)},Oa.prototype.create=function(e){var t=this,n=Hb(e).call(e,(function(e){return Pa(t.g,e)}));return n.length?new Ra(n[0],n):this.h.create(e)},_a.prototype.create=function(e){var t=[];t=function(e,t){var n=zn(t),r=Gn(n,Mb(e).call(e,(function(e){return qn(e)})));return r?Hb(e).call(e,(function(e){return r==qn(e)})):[]}(e,this.i);var n=Hb(e).call(e,(function(e){return e.primary}));for((e=function(e,t){return Hb(e).call(e,(function(e){var n;return!!e.audio&&(t?SM(n=e.audio.roles).call(n,t):0==e.audio.roles.length)}))}(t=t.length?t:n.length?n:e,this.j)).length?t=e:ne.v("No exact match for variant role could be found."),this.g&&((e=Xn.ee(t,this.g)).length?t=e:ne.v("No exact match for the channel count could be found.")),this.h&&(e=function(e,t){return Hb(e).call(e,(function(e){return!!e.audio&&e.audio.label.toLowerCase()==t.toLowerCase()}))}(t,this.h),e.length?t=e:ne.v("No exact match for variant label could be found.")),e=new Ra(t[0]),n=(t=w(t)).next();!n.done;n=t.next())n=n.value,Pa(e.g,n)&&e.add(n);return e};var Ua=0,Fa=1;function Ka(e,t){this.l=e,this.m=Ha(e),this.g=e.g.currentTime,this.j=CT()/1e3,this.h=!1,this.o=t,this.i=function(){}}function Ba(e){this.g=e}function Ha(e){if(e.g.paused||0==e.g.playbackRate||0==e.g.buffered.length)var t=!1;else e:{t=e.g.buffered,e=e.g.currentTime;for(var n=0;n<t.length;n++){var r=t.start(n),i=t.end(n);if(!(e<r-.1||e>i-.5)){t=!0;break e}}t=!1}return t}function Va(e,t,n,r,i){var a=this;this.g=e,this.F=t,this.C=n,this.u=i,this.j=new ut,this.o=!1,this.A=e.readyState,this.i=!1,this.h=r,this.m=!1,this.j.H(e,"waiting",(function(){return za(a)})),this.l=new Le((function(){za(a)})).Oa(.25)}function za(e){if(0!=e.g.readyState){if(e.g.seeking){if(!e.o)return}else e.o=!1;if(!e.g.paused||0==e.g.currentTime){var t;if(e.g.readyState!=e.A&&(e.i=!1,e.A=e.g.readyState),!(t=!e.h)){var n=(t=e.h).l,r=Ha(n),i=n.g.currentTime,a=CT()/1e3;t.g==i&&t.m==r||(t.j=a,t.g=i,t.m=r,t.h=!1),(r=(i=a-t.j)>=t.o&&r&&!t.h)&&(t.i(t.g,i),t.h=!0,t.g=n.g.currentTime),t=!r}if(t){a=e.C.smallGapLimit,t=e.g.currentTime;e:{if((n=e.g.buffered)&&n.length&&!(1==n.length&&1e-6>n.end(0)-n.start(0)))for(r=navigator.userAgent.match(/Edge\//)||At("Trident/")||Et()||At("CrKey")?.5:.1,i=0;i<n.length;i++)if(n.start(i)>t&&(0==i||n.end(i-1)-t<=r)){r=i;break e}r=null}if(null!=r&&(0!=r||e.m)){i=n.start(r);var o=e.F.Ka();if(!(i>=o)){a=(o=i-t)<=a;var s=!1;if(!(.001>o)){if(!a&&!e.i){e.i=!0;var u=new qe("largegap",{currentTime:t,gapSize:o});u.cancelable=!0,e.u(u),e.C.jumpLargeGaps&&!u.defaultPrevented?s=!0:ne.info("Ignoring large gap at",t,"size",o)}(a||s)&&(0==r?ne.info("Jumping forward",o,"seconds because of gap before start time of",i):ne.info("Jumping forward",o,"seconds because of gap starting at",n.end(r-1),"and ending at",i),e.g.currentTime=i)}}}}}}}function qa(e){var t=this;this.i=e,this.g=new $O,this.h=new Le((function(){Ga(t,!1)})).Oa(.25)}function Ga(e,t){for(var n=w(e.g),r=n.next();!r.done;r=n.next())r.value.l(e.i.currentTime,t)}function Wa(e){for(var t=[],n=(e=w(e)).next();!n.done;n=e.next())for(var r=(n=w(n.value.variants)).next();!r.done;r=n.next())t.push(r.value);return t}function Xa(e,t){for(var n=null,r=w(e),i=r.next();!i.done;i=r.next())t>=(i=i.value).startTime&&(n=i);return n}function Ya(e){this.i=e,this.g=null,this.h=function(){}}function $a(e){var t=this;this.g=e,this.j=!1,this.i=this.g.wc(),this.h=new Le((function(){t.g.pe(.25*t.i)}))}function Ja(e){e.h.stop();var t=e.j?0:e.i;if(0<=t)try{return void(e.g.wc()!=t&&e.g.Od(t))}catch(n){}e.h.Oa(.25),0!=e.g.wc()&&e.g.Od(0)}function Qa(e,t,n,r){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>=t?r():(t=Za.get(t),n.ya(e,t,r))}Ka.prototype.release=function(){this.l=null,this.i=function(){}},Va.prototype.release=function(){this.j&&(this.j.release(),this.j=null),null!=this.l&&(this.l.stop(),this.l=null),this.h&&(this.h.release(),this.h=null),this.g=this.F=this.u=null},Va.prototype.zd=function(){this.m=!0,za(this)},qa.prototype.release=function(){this.h.stop();for(var e=w(this.g),t=e.next();!t.done;t=e.next())t.value.release();this.g.clear()},Ya.prototype.release=function(){this.g=this.i=null,this.h=function(){}},Ya.prototype.l=function(e){var t=this.g,n=this.i.periods;t!=(e=Xa(n,e)||n[0])&&this.h(e),this.g=e},$a.prototype.release=function(){this.h&&(this.h.stop(),this.h=null),this.g=null},$a.prototype.set=function(e){this.i=e,Ja(this)},$a.prototype.vc=function(){return this.g.vc()};var Za=new AP([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]]);function eo(e,t,n){var r=this;this.g=e,this.l=t,this.j=n,this.m=!1,this.h=new ut,this.i=new ao(e),Qa(this.g,HTMLMediaElement.HAVE_METADATA,this.h,(function(){ro(r,r.j)}))}function to(e){return e.m?e.g.currentTime:e.j}function no(e,t){0<e.g.readyState?oo(e.i,t):Qa(e.g,HTMLMediaElement.HAVE_METADATA,e.h,(function(){ro(e,e.j)}))}function ro(e,t){.001>Math.abs(e.g.currentTime-t)?io(e):(e.h.ya(e.g,"seeking",(function(){io(e)})),oo(e.i,0==e.g.currentTime?t:e.g.currentTime))}function io(e){e.m=!0,e.h.H(e.g,"seeking",(function(){return e.l()}))}function ao(e){var t=this;this.h=e,this.m=10,this.l=this.i=this.j=0,this.g=new Le((function(){0>=t.j?(ne.v(["Failed to move playhead from",t.i,"to",t.l].join(" ")),t.g.stop()):t.h.currentTime!=t.i?t.g.stop():(t.h.currentTime=t.l,t.j--)}))}function oo(e,t){e.i=e.h.currentTime,e.l=t,e.j=e.m,e.h.currentTime=t,e.g.Oa(.1)}function so(e){var t=this;this.g=e,this.j=!1,this.i=null,this.h=new ut,Qa(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.h,(function(){null==t.i?t.j=!0:(t.h.ya(t.g,"seeking",(function(){t.j=!0})),t.g.currentTime=Math.max(0,t.g.currentTime+t.i))}))}function uo(e,t,n,r,i,a){var o=this;this.i=e,this.g=t.presentationTimeline,this.J=t.minBufferTime||0,this.m=n,this.F=i,this.u=null,this.j=new Va(e,t.presentationTimeline,n,function(e,t){if(!t.stallEnabled)return null;var n=t.stallSkip,r=new Ka(new Ba(e),t.stallThreshold);return function(e,t){e.i=t}(r,(function(t,r){ne.debug("Stall detected at "+t+" for "+r+" seconds."),n?(ne.debug("Seeking forward "+n+" seconds to break stall."),e.currentTime+=n):(ne.debug("Pausing and unpausing to break stall."),e.pause(),e.play())})),r}(e,n),a),this.h=new eo(e,(function(){e:{var e=o.j;e.o=!0,e.m=!1,e.i=!1,e=to(o.h);var t=lo(o,e);if(.001<Math.abs(t-e)){var n=CT()/1e3;if(!o.u||o.u<n-1){o.u=n,no(o.h,t),e=void 0;break e}}ne.K("Seek to "+e),o.F(),e=void 0}return e}),function(e,t){return null==t?t=1/0>e.g.ha()?e.g.Cb():e.g.Ka():0>t&&(t=e.g.Ka()+t),co(e,fo(e,t))}(this,r)),this.o=new Le((function(){if(0!=o.i.readyState&&!o.i.paused){var e=to(o.h),t=o.g.Cb(),n=o.g.Ka();3>n-t&&(t=n-3),e<t&&(t=lo(o,e),ne.info("Jumping forward "+(t-e)+" seconds to catch up with the seek range."),o.i.currentTime=t)}})).Oa(.25)}function co(e,t){var n=e.g.ha();return t>=n?n-e.m.durationBackoff:t}function lo(e,t){var n=Pw(nn).call(nn,null,e.i.buffered),r=Math.max(e.J,e.m.rebufferingGoal),i=e.m.safeSeekOffset,a=e.g.Cb(),o=e.g.Ka(),s=e.g.ha();3>o-a&&(a=o-3);var u=e.g.Zb(r),c=e.g.Zb(i);return r=e.g.Zb(r+i),t>=s?(ne.K("Playhead past duration."),co(e,t)):t>o?(ne.K("Playhead past end."),o):t<a?n(c)?(ne.K("Playhead before start & start is buffered"),c):(ne.K("Playhead before start & start is unbuffered"),r):t>=u||n(t)?(ne.K("Playhead in safe region or in buffered region."),t):(ne.K("Playhead outside safe region & in unbuffered region."),r)}function fo(e,t){var n=e.g.Cb();return t<n||t>(n=e.g.Ka())?n:t}function ho(e){var t=this;this.h=function(){},this.g=new $O,this.j=e,this.i=new Le((function(){for(var e=t.j(),n=w(t.g),r=n.next();!r.done;r=n.next())(r=r.value).endTime<e.start&&t.g.delete(r)})).Oa(2)}function po(e){var t=this;this.m=e,this.j=new AP,this.g=function(){},this.h=function(){},this.i=function(){},this.o=[{rb:null,qb:vo,hb:function(e,n){return t.g(e,n)}},{rb:go,qb:vo,hb:function(e,n){return t.g(e,n)}},{rb:mo,qb:vo,hb:function(e,n){return t.g(e,n)}},{rb:vo,qb:go,hb:function(e,n){return t.h(e,n)}},{rb:vo,qb:mo,hb:function(e,n){return t.h(e,n)}},{rb:go,qb:mo,hb:function(e,n){return t.i(e,n)}},{rb:mo,qb:go,hb:function(e,n){return t.i(e,n)}}]}eo.prototype.release=function(){this.h&&(this.h.release(),this.h=null),null!=this.i&&(this.i.release(),this.i=null),this.l=function(){},this.g=null},ao.prototype.release=function(){this.g&&(this.g.stop(),this.g=null),this.h=null},so.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.g=null},so.prototype.A=function(e){this.i=this.j?this.i:e},so.prototype.l=function(){return(this.j?this.g.currentTime:this.i)||0},so.prototype.C=function(){},uo.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.j&&(this.j.release(),this.j=null),this.o&&(this.o.stop(),this.o=null),this.i=this.h=this.g=this.m=null,this.F=function(){}},uo.prototype.A=function(e){no(this.h,e)},uo.prototype.l=function(){var e=to(this.h);return 0<this.i.readyState&&!this.i.paused?fo(this,e):e},uo.prototype.C=function(){this.j.zd()},ho.prototype.release=function(){this.h=function(){},this.g.clear(),this.i.stop()},po.prototype.release=function(){this.m=null,this.j.clear(),this.g=function(){},this.h=function(){},this.i=function(){}},po.prototype.l=function(e,t){for(var n=w(this.m.g),r=n.next();!r.done;r=n.next()){r=r.value;var i=this.j.get(r),a=e<r.startTime?go:e>r.endTime?mo:vo;this.j.set(r,a);for(var o=w(this.o),s=o.next();!s.done;s=o.next())(s=s.value).rb==i&&s.qb==a&&s.hb(r,t)}};var go=1,vo=2,mo=3;function yo(e,t){this.g=t,this.i=e,this.l=null,this.u=1,this.F=Zy.resolve(),this.m=[],this.o=new AP,this.h=new AP,this.C=!1,this.M=null,this.L=this.j=this.A=!1,this.J=0}function bo(e){return So(e,"audio")}function wo(e){return So(e,"video")}function So(e,t){var n=e.h.get(t);return n?n.Ta||n.stream:null}function To(e,t){return T((function n(){var r,i,a,o,s,u,c,l,f;return z(n,(function(n){switch(n.s){case 1:return r=Se,N(n,Un(e.g.T,r.za),2);case 2:return e.J++,e.L=!1,i=e.J,a=e.g.T,o=new AP,s=new $O,o.set(r.za,t),s.add(t),N(n,a.init(o,!1),3);case 3:return e.j?n.return():N(n,Ro(e,s),4);case 4:if(e.j)return n.return();u=e.g.T.l.isTextVisible()||e.l.alwaysStreamText,e.J!=i||e.h.has(r.za)||e.L||!u||(c=e.g.eb(),l=Uo(e,c),f=Io(t,l,0),e.h.set(r.za,f),Ho(e,f,0)),j(n)}}))}))}function Eo(e,t){var n=e.h.get("video");if(n){var r=n.stream;if(r)if(ne.debug("setTrickPlay",t),t){var i=r.trickModeVideo;i&&!n.Ta&&(ne.debug("Engaging trick mode stream",i),ko(e,i,!1,0,!1),n.Ta=r)}else(r=n.Ta)&&(ne.debug("Restoring non-trick-mode stream",r),n.Ta=null,ko(e,r,!0,0,!1))}}function xo(e,t,n,r){var i=!1;if(t.video){var a=ko(e,t.video,n,r,!1);i=i||a}return t.audio&&(e=ko(e,t.audio,n,r,!1),i=i||e),i}function ko(e,t,n,r,i){var a,o,s,u=e.h.get(t.type);if(!u&&"text"==t.type&&e.l.ignoreTextStreamFailures)return To(e,t),!0;if(!u)return!1;var c=Fo(e,t),l=iT(a=Yw(OP(o=e.h).call(o))).call(a,(function(e){return e.oa==u.oa}));return n&&c!=u.oa&&l?(ne.debug("switch: switching to stream in another Period; clearing buffer and changing Periods"),Gf(s=e.h).call(s,(function(t){Ao(e,t)})),!0):(u.Ta&&(ne.debug("switch during trick play mode",t),t.trickModeVideo?(u.Ta=t,t=t.trickModeVideo,ne.debug("switch found trick play stream",t)):(u.Ta=null,ne.debug("switch found no special trick play stream"))),!(!(l=e.m[c])||!l.Rb||!(l=e.o.get(t.id))||!l.Rb||(u.stream!=t||i?("text"==t.type&&Pn(e.g.T,mt(t.mimeType,t.codecs)),u.stream=t,u.Ac=!0,ne.debug("switch: switching to Stream "+Go(u)),function(e,t,n){if(!t.lb)return!1;var r=e.g.eb(),i=On(e.g.T,t.type),a=jo(e,t,r,i,n);return n=a&&a.g?a.g-a.h:null,a&&!n&&(n=(a.endTime-a.xc())*t.stream.bandwidth/8),!isNaN(n)&&((a=t.stream.initSegmentReference)&&(n+=(a.g?a.g-a.h:null)||0),a=e.g.getBandwidthEstimate(),8*n/a<i-r-Math.max(e.i.minBufferTime||0,e.l.rebufferingGoal)||t.lb.h.g>n)}(e,u,c)&&(ne.info("Aborting current segment request to switch."),u.lb.abort()),n&&(u.ab?u.Qc=!0:u.Sa?(u.Wa=!0,u.oc=r,u.Qc=!0):(Vo(u),Bo(e,u,!0,r).catch((function(t){e.g&&e.g.onError(t)})))),0):(ne.debug("switch: Stream "+Go(u)+" already active"),1))))}function Ao(e,t){var n=Go(t);t.ab?ne.debug(n,"clear: already clearing the buffer"):t.Wa?ne.debug(n,"clear: already waiting"):t.Sa?(ne.debug(n,"clear: currently updating"),t.Wa=!0,t.oc=0):null==jn(e.g.T,t.type)?(ne.debug(n,"clear: nothing buffered"),null==t.Pa&&Ho(e,t,0)):(ne.debug(n,"clear: handling right now"),Vo(t),Bo(e,t,!1,0).catch((function(t){e.g&&e.g.onError(t)})))}function Mo(e,t,n,r,i){return T((function a(){var o,s,u,c,l,f,h;return z(a,(function(a){switch(a.s){case 1:return o=e.g.eb(),s=Uo(e,o),u=Se,c=new AP,l=new $O,t&&(c.set(u.Sb,t),l.add(t)),n&&(c.set(u.Za,n),l.add(n)),r&&(c.set(u.za,r),l.add(r)),f=e.g.T,h=e.l.forceTransmuxTS,N(a,f.init(c,h),2);case 2:return e.j?a.return():(function(e){var t=e.i.presentationTimeline.ha();1/0>t?e.g.T.Fa(t):e.g.T.Fa(Math.pow(2,32))}(e),N(a,Ro(e,l),3));case 3:if(e.j)return a.return();Gf(c).call(c,(function(t,n){if(!e.h.has(n)){var r=Io(t,s,i);e.h.set(n,r),Ho(e,r,0)}})),j(a)}}))}))}function Io(e,t,n){return{stream:e,type:e.type,Hb:null,La:null,Ta:null,Ac:!0,oa:t,endOfStream:!1,Sa:!1,Pa:null,Wa:!1,oc:0,Qc:!1,ab:!1,Ed:!1,ac:!1,Hd:n||0,lb:null}}function Co(e,t){var n,r,i,a=e.m[t];if(a)return ne.debug("(all) Period "+t+" is being or has been set up"),a.promise;ne.debug("(all) setting up Period "+t),a={promise:new Ee,Rb:!1},e.m[t]=a;for(var o=new $O,s=w(e.i.periods[t].variants),u=s.next();!u.done;u=s.next())(u=u.value).video&&o.add(u.video),u.video&&u.video.trickModeVideo&&o.add(u.video.trickModeVideo),u.audio&&o.add(u.audio);for(u=(s=w(e.i.periods[t].textStreams)).next();!u.done;u=s.next())o.add(u.value);return e.F=e.F.then(Pw(n=function(){if(!this.j)return Ro(this,o)}).call(n,e)).then(Pw(r=function(){this.j||(this.m[t].promise.resolve(),this.m[t].Rb=!0,ne.K("(all) setup Period "+t))}).call(r,e)).catch(Pw(i=function(e){this.j||(this.m[t].promise.catch((function(){})),this.m[t].promise.reject(),delete this.m[t],ne.v("(all) failed to setup Period "+t),this.g.onError(e))}).call(i,e)),a.promise}function Ro(e,t){return T((function n(){var r,i,a,o,s,u,c;return z(n,(function(n){switch(n.s){case 1:r=[];for(var l=w(t),f=l.next();!f.done;f=l.next())i=f.value,(a=e.o.get(i.id))?(ne.debug("(all) Stream "+i.id+" is being or has been set up"),r.push(a.promise)):(ne.K("(all) setting up Stream "+i.id),e.o.set(i.id,{promise:new Ee,Rb:!1}),r.push(i.createSegmentIndex()));return O(n,2),N(n,Zy.all(r),4);case 4:if(e.j)return n.return();L(n,3);break;case 2:if(o=D(n),e.j)return n.return();for(f=(n=w(t)).next();!f.done;f=n.next())s=f.value,e.o.get(s.id).promise.catch((function(){})),e.o.get(s.id).promise.reject(),e.o.delete(s.id);throw o;case 3:for(f=(l=w(t)).next();!f.done;f=l.next())u=f.value,(c=e.o.get(u.id)).Rb||(c.promise.resolve(),c.Rb=!0,ne.K("(all) setup Stream "+u.id));j(n)}}))}))}function Po(e,t){if(!e.j){var n=Go(t);if(!t.Sa&&null!=t.Pa&&!t.ab)if(t.Pa=null,t.Wa)ne.debug(n,"skipping update and clearing the buffer"),Bo(e,t,t.Qc,t.oc);else{var r,i;try{var a=function(e,t){var n,r;if(Lo(t))return Dn(e.g.T,t.stream.originalId||""),null;var i=Go(t),a=e.g.eb(),o=No(e,t,a);ne.O(i,"timeNeeded="+o);var s=Fo(e,t.stream),u=Uo(e,o),c=function(e,t,n){return"text"==t?null==(e=e.g).h||e.h<n?0:e.h-Math.max(n,e.g):rn(e=_n(e,t),n)}(e.g.T,t.type,a);ne.O(i,"update_:","presentationTime="+a,"bufferedAhead="+c);var l=Math.max(e.i.minBufferTime||0,e.l.rebufferingGoal,e.l.bufferingGoal)*e.u;if(o>=e.i.presentationTimeline.ha())return ne.debug(i,"buffered to end of presentation"),t.endOfStream=!0,"video"==t.type&&(o=e.h.get("text"))&&"application/cea-608"==o.stream.mimeType&&(o.endOfStream=!0),null;if(t.endOfStream=!1,t.oa=u,u!=s)return ne.debug(i,"need Period "+u,"presentationTime="+a,"timeNeeded="+o,"currentPeriodIndex="+s),null;if(c>=l)return ne.O(i,"buffering goal met"),.5;if(i=On(e.g.T,t.type),!(i=jo(e,t,a,i,s)))return 1;var f=1/0;return Gf(n=Yw(OP(r=e.h).call(r))).call(n,(function(t){Lo(t)||(t=No(e,t,a),f=Math.min(f,t))})),o>=f+e.i.presentationTimeline.g?1:(t.Hd=0,function(e,t,n,r,i){var a,o,s,u=Go(t),c=e.i.periods[r];ne.K(u,"fetchAndAppend_:","presentationTime="+n,"currentPeriod.startTime="+c.startTime,"reference.position="+i.position,"reference.startTime="+i.startTime,"reference.endTime="+i.endTime);var l=t.stream,f=e.i.presentationTimeline.ha(),h=e.i.periods[r+1];r=function(e,t,n,r,i){var a;if(!t.Ac)return Zy.resolve();var o=Go(t);return n=e.i.periods[n].startTime-t.stream.presentationTimeOffset,ne.K(o,"setting timestamp offset to "+n),ne.K(o,"setting append window start to "+r),ne.K(o,"setting append window end to "+i),r=function(e,t,n,r,i){var a,o,s;return"text"==t?(e.g.A=n,(e=e.g).j=r,e.m=i,Zy.resolve()):Zy.all([Fn(e,t,Pw(a=e.Ve).call(a,e,t)),Fn(e,t,Pw(o=e.Cg).call(o,e,t,n)),Fn(e,t,Pw(s=e.zg).call(s,e,t,r,i))])}(e.g.T,t.type,n,r,i),t.stream.initSegmentReference?(ne.K(o,"fetching init segment"),e=Ko(e,t,t.stream.initSegmentReference).then(Pw(a=function(e){if(!this.j)return ne.K(o,"appending init segment"),Ln(this.g.T,t.type,e,null,null,t.stream.closedCaptions&&0<t.stream.closedCaptions.size)}).call(a,e)).catch((function(e){return t.Ac=!0,Zy.reject(e)})),Zy.all([r,e])):r}(e,t,r,Math.max(0,c.startTime-.1),h?h.startTime+.01:f),t.Sa=!0,t.Ac=!1,ne.O(u,"fetching segment"),f=Ko(e,t,i),Zy.all([r,f]).then(Pw(a=function(e){if(!this.j&&!this.A)return function(e,t,n,r,i,a,o){var s,u,c,l=Go(t),f=i.closedCaptions&&0<i.closedCaptions.size;return null!=i.emsgSchemeIdUris&&0<i.emsgSchemeIdUris.length&&(new qr).ma("emsg",Pw(s=e.P).call(s,e,r,a,i.emsgSchemeIdUris)).parse(o),function(e,t,n){var r,i=Go(t);ne.O(i,"checking buffer length");var a=Math.max(e.l.bufferBehind,e.i.presentationTimeline.g),o=jn(e.g.T,t.type);if(null==o)return ne.O(i,"buffer behind okay because nothing buffered:","presentationTime="+n,"bufferBehind="+a),Zy.resolve();var s=n-o,u=s-a;return.01>=u?(ne.O(i,"buffer behind okay:","presentationTime="+n,"bufferedBehind="+s,"bufferBehind="+a,"underflow="+Math.abs(u)),Zy.resolve()):(ne.K(i,"buffer behind too large:","presentationTime="+n,"bufferedBehind="+s,"bufferBehind="+a,"overflow="+u),e.g.T.remove(t.type,o,o+u).then(Pw(r=function(){this.j||ne.K(i,"evicted "+u+" seconds")}).call(r,e)))}(e,t,n).then(Pw(u=function(){if(!this.j)return ne.K(l,"appending media segment"),Ln(this.g.T,t.type,o,a.startTime+r.startTime,a.endTime+r.startTime,f)}).call(u,e)).then(Pw(c=function(){if(!this.j)return ne.O(l,"appended media segment"),t.Hb=i,t.La=a,Zy.resolve()}).call(c,e))}(this,t,n,c,l,i,e[1])}).call(a,e)).then(Pw(o=function(){this.j||this.A||(t.Sa=!1,t.Ed=!1,t.Wa||this.g.zd(),Ho(this,t,0),function(e,t,n){if(!e.C){var r,i=Go(t);if(1==(t=Yw(OP(r=e.h).call(r))).length&&"text"==t[0].type||(e.C=iT(t).call(t,(function(e){return"text"==e.type||!e.Wa&&!e.ab&&e.La}))),e.C){var a;for(ne.debug(i,"startup complete"),n=Fo(e,n),e.m[n]||Co(e,n).then(Pw(a=function(){this.j||(ne.K(i,"calling onCanSwitch()..."),this.g.te())}).call(a,e)).catch(ye.Bc),n=0;n<e.i.periods.length;++n)Co(e,n).catch(ye.Bc);e.g.gg&&(ne.K(i,"calling onStartupComplete()..."),e.g.gg())}}}(this,t,l),ne.K(u,"finished fetch and append"))}).call(o,e)).catch(Pw(s=function(e){this.j||this.A||(t.Sa=!1,"text"==t.type&&this.l.ignoreTextStreamFailures?(1001==e.code?ne.v(u,"Text stream failed to download. Proceeding without it."):ne.v(u,"Text stream failed to parse. Proceeding without it."),this.h.delete("text")):7001==e.code?(t.Sa=!1,t.Pa=null,Ho(this,t,0)):3017==e.code?function(e,t,n){var r,i,a=Go(t);if(hS(r=Yw(OP(i=e.h).call(i))).call(r,(function(e){return e!=t&&e.Ed})))ne.debug(a,"MediaSource threw QuotaExceededError:","waiting for another stream to recover...");else{var o=Math.round(100*e.u);if(20<o)e.u-=.2;else{if(!(4<o))return ne.error(a,"MediaSource threw QuotaExceededError too many times"),t.ac=!0,e.A=!0,void e.g.onError(n);e.u-=.04}ne.v(a,"MediaSource threw QuotaExceededError:","reducing buffering goals by "+(100-Math.round(100*e.u))+"%"),t.Ed=!0}Ho(e,t,4)}(this,t,e):(ne.error(u,"failed fetch and append: code="+e.code),t.ac=!0,e.severity=2,qo(this,e)))}).call(s,e))}(e,t,a,s,i),null)}(e,t);null!=a&&(Ho(e,t,a),t.ac=!1)}catch(o){return void qo(e,o)}a=Yw(OP(r=e.h).call(r)),function(e,t){var n=Go(t),r=Fo(e,t.stream);if(t.oa!=r){var i,a,o=t.oa,s=Yw(OP(i=e.h).call(i));iT(s).call(s,(function(e){return e.oa==o||Lo(e)}))?iT(s).call(s,Do)?(ne.debug(n,"all need Period "+o),Co(e,o).then(Pw(a=function(){var e;if(!this.j)if(iT(s).call(s,Pw(e=function(e){var t=Do(e),n=Fo(this,e.stream);return!!Lo(e)||t&&e.oa==o&&n!=o}).call(e,this))){var t,r,i=this.i.periods[o];ne.K(n,"calling onChooseStreams()...");var a=this.g.ue(i),u=new AP;a.variant&&a.variant.video&&u.set("video",a.variant.video),a.variant&&a.variant.audio&&u.set("audio",a.variant.audio),a.text&&u.set("text",a.text);for(var c=(a=w(Lb(t=this.h).call(t))).next();!c.done;c=a.next())if(c=c.value,!u.has(c)&&"text"!=c)return ne.error(n,"invalid Streams chosen: missing "+c+" Stream"),void this.g.onError(new re(2,5,5005));for(c=(a=w(Yw(Lb(u).call(u)))).next();!c.done;c=a.next())if(c=c.value,!this.h.has(c)){if("text"!=c)return ne.error(n,"invalid Streams chosen: unusable "+c+" Stream"),void this.g.onError(new re(2,5,5005));Mo(this,null,null,u.get("text"),i.startTime),u.delete(c)}for(c=(a=w(Yw(Lb(r=this.h).call(r)))).next();!c.done;c=a.next()){c=c.value;var l=this.h.get(c),f=u.get(c);if(f){var h=Lo(l);h&&(l.oa=o,l.Hd=i.startTime),ko(this,f,!1,0,!1),h&&Lo(l)||Ho(this,this.h.get(c),0)}else this.h.delete(c)}ne.K(n,"calling onCanSwitch()..."),this.g.te()}else ne.debug(n,"ignoring transition to Period",o,"since another is happening")}).call(a,e)).catch(ye.Bc)):ne.debug(n,"all MediaStates need Period "+o+", but not all MediaStates are idle"):ne.debug(n,"not all MediaStates need Period "+o)}}(e,t),e.C&&iT(a).call(a,(function(e){return e.endOfStream}))&&(ne.K(n,"calling endOfStream()..."),e.g.T.endOfStream().then(Pw(i=function(){if(!this.j){var e=this.g.T.ha();0!=e&&e<this.i.presentationTimeline.ha()&&this.i.presentationTimeline.Fa(e)}}).call(i,e)))}}}function No(e,t,n){return t.Hb&&t.La?(n=Fo(e,t.Hb),e.i.periods[n].startTime+t.La.endTime):Math.max(n,t.Hd)}function jo(e,t,n,r,i){var a=Go(t);return t.La&&t.stream==t.Hb?(r=t.La.position+1,ne.O(a,"next position known:","position="+r),_o(e,t,i,r)):(t.La?(ne.K(a,"next position unknown: another Stream buffered"),a=Fo(e,t.Hb),a=Oo(e,t,e.i.periods[a].startTime+t.La.endTime,i)):(ne.K(a,"next position unknown: nothing buffered"),a=Oo(e,t,r||n,i)),null==a?null:(n=null,null==r&&(n=_o(e,t,i,Math.max(0,a-1))),n||_o(e,t,i,a)))}function Oo(e,t,n,r){var i=Go(t);return e=e.i.periods[r],ne.debug(i,"looking up segment:","presentationTime="+n,"currentPeriod.startTime="+e.startTime),n=Math.max(0,n-e.startTime),null==(t=t.stream.findSegmentPosition(n))&&ne.v(i,"cannot find segment:","currentPeriod.startTime="+e.startTime,"lookupTime="+n),t}function _o(e,t,n,r){var i=Go(t);return n=e.i.periods[n],(t=t.stream.getSegmentReference(r))?(e=(r=e.i.presentationTimeline).$b(),r=r.Db(),n.startTime+t.endTime<e||n.startTime+t.startTime>r?(ne.O(i,"segment is not available:","currentPeriod.startTime="+n.startTime,"reference.startTime="+t.startTime,"reference.endTime="+t.endTime,"availabilityStart="+e,"availabilityEnd="+r),null):t):(ne.K(i,"segment does not exist:","currentPeriod.startTime="+n.startTime,"position="+r),null)}function Lo(e){return e&&"text"==e.type&&"application/cea-608"==e.stream.mimeType}function Do(e){return!e.Sa&&null==e.Pa&&!e.Wa&&!e.ab}function Uo(e,t){var n,r=Xa(e.i.periods,t+Te);return r?Hh(n=e.i.periods).call(n,r):0}function Fo(e,t){for(var n=e.i.periods,r=0;r<n.length;r++){for(var i=n[r],a=new $O,o=w(i.variants),s=o.next();!s.done;s=o.next())(s=s.value).audio&&a.add(s.audio),s.video&&a.add(s.video),s.video&&s.video.trickModeVideo&&a.add(s.video.trickModeVideo);for(o=(i=w(i.textStreams)).next();!o.done;o=i.next())a.add(o.value);if(a.has(t))return r}return-1}function Ko(e,t,n){var r=Pi(n.i(),n.h,n.g,e.l.retryParameters);return ne.O("fetching: reference=",n),e=e.g.Ib.request(1,r),t.lb=e,e.promise.then((function(e){return t.lb=null,e.data}))}function Bo(e,t,n,r){return T((function i(){var a,o,s,u;return z(i,(function(i){var c;switch(i.s){case 1:return a=Go(t),t.Wa=!1,t.Qc=!1,t.oc=0,t.ab=!0,t.Hb=null,t.La=null,ne.debug(a,"clearing buffer"),r?(s=e.g.eb(),u=e.g.T.ha(),o=e.g.T.remove(t.type,s+r,u)):o=Un(e.g.T,t.type).then(Pw(c=function(){if(!this.j&&n)return this.g.T.flush(t.type)}).call(c,e)),N(i,o,2);case 2:if(e.j)return i.return();ne.debug(a,"cleared buffer"),t.ab=!1,t.endOfStream=!1,Ho(e,t,0),j(i)}}))}))}function Ho(e,t,n){var r=Go(t),i=t.type;"text"!=i||e.h.has(i)?(ne.O(r,"updating in "+n+" seconds"),t.Pa=new _e((function(){return T((function n(){var r;return z(n,(function(n){switch(n.s){case 1:return O(n,2),N(n,Po(e,t),4);case 4:L(n,0);break;case 2:r=D(n),e.g&&e.g.onError(r),j(n)}}))}))})).V(n)):ne.K(r,"Text stream is unloaded. No update is needed.")}function Vo(e){null!=e.Pa&&(e.Pa.stop(),e.Pa=null)}function zo(e){return T((function t(){return z(t,(function(t){if(1===t.s){if(e.lb)return N(t,e.lb.abort(),0);t.I(0)}}))}))}function qo(e,t){var n;Ue(e.M).then(Pw(n=function(){this.j||(this.g.onError(t),t.handled||this.l.failureCallback(t))}).call(n,e))}function Go(e){return"("+e.type+":"+e.stream.id+")"}function Wo(e,t,n,r,i,a){if(200<=n&&299>=n&&202!=n)return{uri:i||r,Bd:r,data:t,headers:e,fromCache:!!e["x-shaka-from-cache"]};i=null;try{i=Ae(t)}catch(o){}throw ne.debug("HTTP error text:",i),new re(401==n||403==n?2:1,1,1001,r,n,i,e,a)}function Xo(e,t,n,r){var i,a=new Xo.h;Gf(i=gt(t.headers)).call(i,(function(e,t){a.append(t,e)}));var o=new Xo.g,s={Zd:!1,Oe:!1};if(e=new Fe(e=Xo.u(e,n,{body:t.body||void 0,headers:a,method:t.method,signal:o.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},s,r),(function(){return s.Zd=!0,o.abort(),Zy.resolve()})),t=t.retryParameters.timeout){var u=new Le((function(){s.Oe=!0,o.abort()}));u.V(t/1e3),e.finally((function(){u.stop()}))}return e}function Yo(e,t,n,r){var i=new Yo.j,a=CT(),o=0;return new Fe(new Zy((function(s,u){for(var c in i.open(t.method,e,!0),i.responseType="arraybuffer",i.timeout=t.retryParameters.timeout,i.withCredentials=t.allowCrossSiteCredentials,i.onabort=function(){u(new re(1,1,7001,e,n))},i.onload=function(t){var r;t=t.target;for(var i=xT(r=t.getAllResponseHeaders()).call(r).split("\r\n"),a={},o=(i=w(i)).next();!o.done;o=i.next())a[(o=o.value.split(": "))[0].toLowerCase()]=xd(o).call(o,1).join(": ");try{var c=Wo(a,t.response,t.status,e,t.responseURL,n);s(c)}catch(l){u(l)}},i.onerror=function(t){u(new re(1,1,1002,e,t,n))},i.ontimeout=function(){u(new re(1,1,1003,e,n))},i.onprogress=function(e){var t=CT();(100<t-a||e.lengthComputable&&e.loaded==e.total)&&(r(t-a,e.loaded-o,e.total-e.loaded),o=e.loaded,a=t)},t.headers)i.setRequestHeader(c.toLowerCase(),t.headers[c]);i.send(t.body)})),(function(){return i.abort(),Zy.resolve()}))}function $o(){this.g=this.j=this.h=0,this.i=new AP,this.l=0}function Jo(e,t,n){this.m=e,this.h=new AP,this.i=!1,this.l=t,this.j=n,this.g=new $o}function Qo(e,t,n,r,i,a){var o=function(e,t){e.h+=t;var n=e.l;return e.l++,e.i.set(n,t),n}(e.g,r);r=e.h.get(t)||Zy.resolve(),e.h.set(t,r.then((function(){return T((function t(){var r,s,u,c,l,f;return z(t,(function(t){switch(t.s){case 1:return N(t,function(e,t){return T((function n(){var r;return z(n,(function(n){switch(n.s){case 1:return N(n,e.m.request(1,t).promise,2);case 2:return r=n.B,n.return(r.data)}}))}))}(e,n),2);case 2:if(r=t.B,e.i)throw new re(2,9,7001);if(i)for(var h in s=new Uint8Array(r),(u=new Qr(s)).data)c=Number(h),l=u.data[c],f=u.g[c],e.j(l,f);return e.g.close(o,r.byteLength),h=e.g,e.l(0==h.h?0:h.j/h.h,e.g.g),t.return(a(r))}}))}))})))}function Zo(e,t){var n=this;this.i=e,this.h=e.objectStore(t),this.g=new Ee,e.onabort=function(e){e.preventDefault(),n.g.reject()},e.onerror=function(e){e.preventDefault(),n.g.reject()},e.oncomplete=function(){n.g.resolve()}}function es(e,t){return new Zy((function(n,r){var i=e.h.openCursor();i.onerror=r,i.onsuccess=function(e){if(!(e=e.target.result))return n();t(e.key,e.value,e),e.continue()}}))}function ts(e){this.h=e,this.g=[]}function ns(e,t){return rs(e,t,"readwrite")}function rs(e,t,n){var r=new Zo(n=e.h.transaction([t],n),t);return e.g.push(r),r.promise().then((function(){$e(e.g,r)}),(function(){$e(e.g,r)})),r}function is(e,t,n){this.h=new ts(e),this.i=t,this.g=n}function as(e){return Zy.reject(new re(2,9,9011,"Cannot add new value to "+e))}function os(e,t,n,r){t=(e=ns(e.h,t)).store();for(var i={},a=(n=w(n)).next();!a.done;i={key:i.key},a=n.next())i.key=a.value,t.delete(i.key).onsuccess=function(e){return function(){return r(e.key)}}(i);return e.promise()}function ss(e,t,n){return T((function r(){var i,a,o,s,u,c,l;return z(r,(function(r){switch(r.s){case 1:for(i=rs(e.h,t,"readonly"),a=i.store(),o={},s=[],u={},c=w(n),l=c.next();!l.done;u={request:u.request,key:u.key},l=c.next())u.key=l.value,u.request=a.get(u.key),u.request.onsuccess=function(e){return function(){null==e.request.result&&s.push(e.key),o[e.key]=e.request.result}}(u);return N(r,i.promise(),2);case 2:if(s.length)throw new re(2,9,9012,"Could not find values for "+s);return r.return(Mb(n).call(n,(function(e){return o[e]})))}}))}))}function us(e){this.g=new ts(e)}function cs(){this.g=new AP}function ls(e,t,n){if(!(e=e.g.get(t)))throw new re(2,9,9013,"Could not find mechanism with name "+t);if(!(t=e.getCells().get(n)))throw new re(2,9,9013,"Could not find cell with name "+n);return t}function fs(e,t){hs.set(e,t)}yo.prototype.destroy=function(){var e=this;return T((function t(){var n,r;return z(t,(function(t){switch(t.s){case 1:n=[];for(var i=w(OP(o=e.h).call(o)),a=i.next();!a.done;a=i.next()){var o;Vo(r=a.value),n.push(zo(r))}return N(t,Zy.all(n),2);case 2:e.h.clear(),e.o.clear(),e.g=null,e.i=null,e.F=null,e.m=null,e.l=null,e.j=!0,j(t)}}))}))},yo.prototype.configure=function(e){this.l=e,this.M=new De({maxAttempts:Math.max(e.retryParameters.maxAttempts,2),baseDelay:e.retryParameters.baseDelay,backoffFactor:e.retryParameters.backoffFactor,fuzzFactor:e.retryParameters.fuzzFactor,timeout:0},!0)},yo.prototype.start=function(){var e=this;return T((function t(){var n,r,i;return z(t,(function(t){switch(t.s){case 1:return n=e.g.eb(),r=Uo(e,n),(i=e.g.ue(e.i.periods[r])).variant||i.text?N(t,Mo(e,i.variant?i.variant.audio:null,i.variant?i.variant.video:null,i.text,n),2):(ne.error("init: no Streams chosen"),t.return(new re(2,5,5005)));case 2:if(e.j)return t.return();ne.debug("init: completed initial Stream setup"),e.g&&e.g.Yf&&(ne.K("init: calling onInitialStreamsSetup()..."),e.g.Yf()),j(t)}}))}))},yo.prototype.P=function(e,t,n,r){var i=r.reader.Cd(),a=r.reader.Cd(),o=r.reader.N(),s=r.reader.N(),u=r.reader.N(),c=r.reader.N();r=r.reader.mb(r.reader.S.byteLength-r.reader.ka()),e=e.startTime+t.startTime+s/o,SM(n).call(n,i)&&("urn:mpeg:dash:event:2012"==i?this.g.Zf():this.g.onEvent(new qe("emsg",{detail:{startTime:e,endTime:e+u/o,schemeIdUri:i,value:a,timescale:o,presentationTimeDelta:s,eventDuration:u,id:c,messageData:r}})))},$("shaka.net.HttpFetchPlugin",Xo),Xo.u=function(e,t,n,r,i){return T((function a(){var o,s,u,c,l,f,h,d,p,g,v,m,y;return z(a,(function(a){switch(a.s){case 1:return o=Xo.l,s=Xo.i,f=l=0,h=CT(),O(a,2),N(a,o(e,n),4);case 4:return u=a.B,d=u.clone().body.getReader(),g=(p=u.headers.get("Content-Length"))?Sb(p,10):0,new s({start:function(e){!function t(){return T((function n(){var r,a,o;return z(n,(function(n){switch(n.s){case 1:return O(n,2),N(n,d.read(),4);case 4:r=n.B,L(n,3);break;case 2:return a=D(n),ne.K("error reading from stream",a.message),n.return();case 3:r.done||(l+=r.value.byteLength),(100<(o=CT())-h||r.done)&&(i(o-h,l-f,g-l),f=l,h=o),r.done?e.close():(e.enqueue(r.value),t()),j(n)}}))}))}()}}),N(a,u.arrayBuffer(),5);case 5:c=a.B,L(a,3);break;case 2:if(v=D(a),r.Zd)throw new re(1,1,7001,e,t);if(r.Oe)throw new re(1,1,1003,e,t);throw new re(1,1,1002,e,v,t);case 3:return m={},y=u.headers,Gf(y).call(y,(function(e,t){m[xT(t).call(t)]=e})),a.return(Wo(m,c,u.status,e,u.url,t))}}))}))},Xo.isSupported=function(){if(!e.ReadableStream)return!1;try{new ReadableStream({})}catch(g){return!1}return!(!e.fetch||!e.AbortController)},Xo.isSupported=Xo.isSupported,Xo.l=e.fetch,Xo.g=e.AbortController,Xo.i=e.ReadableStream,Xo.h=e.Headers,Xo.isSupported()&&(nt("http",Xo,2),nt("https",Xo,2)),$("shaka.net.HttpXHRPlugin",Yo),Yo.j=e.XMLHttpRequest,nt("http",Yo,1),nt("https",Yo,1),$o.prototype.close=function(e,t){if(this.i.has(e)){var n=this.i.get(e);this.i.delete(e),this.j+=n,this.g+=t}},Jo.prototype.destroy=function(){var e;return this.i=!0,Zy.all(OP(e=this.h).call(e)).then((function(){}),(function(){}))},Zo.prototype.abort=function(){try{this.i.abort()}catch(g){}return this.g.catch((function(){}))},Zo.prototype.store=function(){return this.h},Zo.prototype.promise=function(){return this.g},ts.prototype.destroy=function(){var e;return Zy.all(Mb(e=this.g).call(e,(function(e){return e.abort()})))},(f=is.prototype).destroy=function(){return this.h.destroy()},f.hasFixedKeySpace=function(){return!0},f.addSegments=function(){return as(this.i)},f.removeSegments=function(e,t){return os(this,this.i,e,t)},f.getSegments=function(e){var t=this;return T((function n(){var r;return z(n,(function(n){switch(n.s){case 1:return N(n,ss(t,t.i,e),2);case 2:return r=n.B,n.return(Mb(r).call(r,(function(e){return t.ae(e)})))}}))}))},f.addManifests=function(){return as(this.g)},f.updateManifestExpiration=function(e,t){var n=ns(this.h,this.g),r=n.store();return r.get(e).onsuccess=function(n){(n=n.target.result)&&(n.expiration=t,r.put(n,e))},n.promise()},f.removeManifests=function(e,t){return os(this,this.g,e,t)},f.getManifests=function(e){var t=this;return T((function n(){var r;return z(n,(function(n){switch(n.s){case 1:return N(n,ss(t,t.g,e),2);case 2:return r=n.B,n.return(Mb(r).call(r,(function(e){return t.pc(e)})))}}))}))},f.getAllManifests=function(){var e=this;return T((function t(){var n,r;return z(t,(function(t){switch(t.s){case 1:return n=rs(e.h,e.g,"readonly"),r=new AP,N(t,es(n,(function(t,n){r.set(t,e.pc(n))})),2);case 2:return N(t,n.promise(),3);case 3:return t.return(r)}}))}))},f.ae=function(e){return e},f.pc=function(e){return e},f.add=function(e,t){var n=this;return T((function r(){var i,a,o,s;return z(r,(function(r){switch(r.s){case 1:i=ns(n.h,e),a=i.store(),o=[];for(var u=w(t),c=u.next();!c.done;c=u.next())s=c.value,a.add(s).onsuccess=function(e){o.push(e.target.result)};return N(r,i.promise(),2);case 2:return r.return(o)}}))}))},us.prototype.destroy=function(){return this.g.destroy()},us.prototype.getAll=function(){var e=this;return T((function t(){var n,r;return z(t,(function(t){switch(t.s){case 1:return n=rs(e.g,"session-ids","readonly"),r=[],N(t,es(n,(function(e,t){r.push(t)})),2);case 2:return N(t,n.promise(),3);case 3:return t.return(r)}}))}))},us.prototype.add=function(e){for(var t=ns(this.g,"session-ids"),n=t.store(),r=(e=w(e)).next();!r.done;r=e.next())n.add(r.value);return t.promise()},us.prototype.remove=function(e){var t=this;return T((function n(){var r;return z(n,(function(n){switch(n.s){case 1:return N(n,es(r=ns(t.g,"session-ids"),(function(t,n,r){0<=Hh(e).call(e,n.sessionId)&&r.delete()})),2);case 2:return N(n,r.promise(),0)}}))}))},cs.prototype.destroy=function(){for(var e=[],t=w(OP(r=this.g).call(r)),n=t.next();!n.done;n=t.next()){var r;e.push(n.value.destroy())}return this.g.clear(),Zy.all(e)},cs.prototype.init=function(){var e=this;Gf(hs).call(hs,(function(t,n){var r=t();r?e.g.set(n,r):ne.info("Skipping "+n+" as it is not supported on this platform")}));for(var t=[],n=w(OP(i=this.g).call(i)),r=n.next();!r.done;r=n.next()){var i;t.push(r.value.init())}return Zy.all(t)},cs.prototype.erase=function(){var e=this;return T((function t(){var n,r,i;return z(t,(function(t){var a;switch(t.s){case 1:return n=Yw(OP(a=e.g).call(a)),(r=0<n.length)||Gf(i=hs).call(i,(function(e){(e=e())&&n.push(e)})),N(t,Zy.all(Mb(n).call(n,(function(e){return e.erase()}))),2);case 2:if(!r)return N(t,Zy.all(Mb(n).call(n,(function(e){return e.destroy()}))),0);t.I(0)}}))}))},$("shaka.offline.StorageMuxer.register",fs),$("shaka.offline.StorageMuxer.unregister",(function(e){hs.delete(e)}));var hs=new AP;function ds(e){is.apply(this,arguments)}function ps(e){var t,n;return function(e){var t,n,r=Hb(t=e.streams).call(t,(function(e){return"audio"==e.contentType})),i=Hb(n=e.streams).call(n,(function(e){return"video"==e.contentType}));if(!iT(r).call(r,(function(e){return e.variantIds}))||!iT(i).call(i,(function(e){return e.variantIds}))){Gf(r).call(r,(function(e){e.variantIds=[]})),Gf(i).call(i,(function(e){e.variantIds=[]}));var a=0;if(i.length&&!r.length){ne.debug("Found video-only content. Creating variants for video.");var o=a++;Gf(i).call(i,(function(e){e.variantIds.push(o)}))}if(!i.length&&r.length){ne.debug("Found audio-only content. Creating variants for audio.");var s=a++;Gf(r).call(r,(function(e){e.variantIds.push(s)}))}i.length&&r.length&&(ne.debug("Found audio-video content. Creating variants."),Gf(r).call(r,(function(e){Gf(i).call(i,(function(t){var n=a++;e.variantIds.push(n),t.variantIds.push(n)}))})))}}(e),Gf(t=e.streams).call(t,(function(){})),{startTime:e.startTime,streams:Mb(n=e.streams).call(n,gs)}}function gs(e){var t,n=e.initSegmentUri?ms(e.initSegmentUri):null;return{id:e.id,originalId:null,primary:e.primary,presentationTimeOffset:e.presentationTimeOffset,contentType:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:void 0,kind:e.kind,language:e.language,label:e.label,width:e.width,height:e.height,initSegmentKey:n,encrypted:e.encrypted,keyId:e.keyId,segments:Mb(t=e.segments).call(t,vs),variantIds:e.variantIds}}function vs(e){var t=ms(e.uri);return{startTime:e.startTime,endTime:e.endTime,dataKey:t}}function ms(e){var t;if((t=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(e))||(t=/^offline:segment\/([0-9]+)$/.exec(e)))return Number(t[1]);throw new re(2,9,9004,"Could not parse uri "+e)}function ys(e,t,n,r){is.call(this,e,t,n),this.j=r}function bs(){this.l=this.i=this.h=this.g=this.j=null}function ws(e,t,n,r){this.g=e,this.l=t,this.j=n,this.i=r,this.h=["offline:",e,"/",t,"/",n,"/",r].join("")}function Ss(e){if(null==(e=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(e)))return null;var t=e[1];if("manifest"!=t&&"segment"!=t)return null;var n=e[2];if(!n)return null;var r=e[3];return r&&null!=t?new ws(t,n,r,Number(e[4])):null}function Ts(e,t){this.h=e,this.g=t}function Es(e,t,n){var r,i,a,o,s,u=Hb(r=t.streams).call(r,(function(e){return"audio"==e.contentType})),c=Hb(i=t.streams).call(i,(function(e){return"video"==e.contentType}));return u=function(e,t,n){for(var r=new $O,i=w(t),a=i.next();!a.done;a=i.next()){var o=w(a.value.variantIds);for(a=o.next();!a.done;a=o.next())r.add(a.value)}for(i=w(n),a=i.next();!a.done;a=i.next())for(o=w(a.value.variantIds),a=o.next();!a.done;a=o.next())r.add(a.value);for(i=new AP,r=w(r),a=r.next();!a.done;a=r.next())a=a.value,i.set(a,{id:a,language:"",primary:!1,audio:null,video:null,bandwidth:0,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0});for(t=w(t),r=t.next();!r.done;r=t.next())for(r=r.value,a=xs(e,r),o=w(r.variantIds),r=o.next();!r.done;r=o.next())(r=i.get(r.value)).language=a.language,r.primary=r.primary||a.primary,r.audio=a;for(n=w(n),t=n.next();!t.done;t=n.next())for(r=t.value,t=xs(e,r),a=w(r.variantIds),r=a.next();!r.done;r=a.next())(r=i.get(r.value)).primary=r.primary||t.primary,r.video=t;return i}(e,u,c),c=Mb(a=Hb(o=t.streams).call(o,(function(e){return"text"==e.contentType}))).call(a,(function(t){return xs(e,t)})),Gf(s=t.streams).call(s,(function(r){var i;r=Mb(i=r.segments).call(i,(function(t,n){return ks(e,n,t)})),n.Jb(r,t.startTime)})),{startTime:t.startTime,variants:Yw(OP(u).call(u)),textStreams:c}}function xs(e,t){var n,r=Mb(n=t.segments).call(n,(function(t,n){return ks(e,n,t)})),i=new di(r);return r={id:t.id,originalId:t.originalId,createSegmentIndex:function(){return Zy.resolve()},findSegmentPosition:function(e){return Jh(i).call(i,e)},getSegmentReference:function(e){return i.get(e)},initSegmentReference:null,presentationTimeOffset:t.presentationTimeOffset,mimeType:t.mimeType,codecs:t.codecs,width:t.width||void 0,height:t.height||void 0,frameRate:t.frameRate||void 0,pixelAspectRatio:t.pixelAspectRatio||void 0,kind:t.kind,encrypted:t.encrypted,keyId:t.keyId,language:t.language,label:t.label||null,type:t.contentType,primary:t.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null},null!=t.initSegmentKey&&(r.initSegmentReference=function(e,t){var n=new ws("segment",e.h,e.g,t);return new li((function(){return[n.toString()]}),0,null)}(e,t.initSegmentKey)),r}function ks(e,t,n){var r=new ws("segment",e.h,e.g,n.dataKey);return new fi(t,n.startTime,n.endTime,(function(){return[r.toString()]}),0,null)}function As(){this.g=null}function Ms(e){var t=Ss(e);return t&&"manifest"==t.g?Ms.m(e):t&&"segment"==t.g?Ms.o(t.key(),t):Ke(new re(2,1,9004,e))}function Is(e,t,n){return T((function r(){var i,a,o,s,u,c;return z(r,(function(r){switch(r.s){case 1:i=[];for(var l=[],f=w(n),h=f.next();!h.done;h=f.next()){h=h.value;for(var d=!1,p=w(l),g=p.next();!g.done;g=p.next())if(Cs((g=g.value).info,h)){g.sessionIds.push(h.sessionId),d=!0;break}d||l.push({info:h,sessionIds:[h.sessionId]})}a=w(l),o=a.next();case 2:if(o.done){r.I(4);break}return s=o.value,u=function(e,t,n){return T((function r(){var i,a,o,s;return z(r,(function(r){var u;switch(r.s){case 1:return i=new Rt({Ib:t,onError:function(){},Dc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),O(r,2),i.configure(e),N(r,function(e,t,n,r,i,a){var o=new AP;return o.set(t,{audioCapabilities:i,videoCapabilities:a,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:t,drmInfos:[{keySystem:t,licenseServerUri:n,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:r,initData:null,keyIds:null}]}),Kt(e,o)}(i,n.info.keySystem,n.info.licenseUri,n.info.serverCertificate,n.info.audioCapabilities,n.info.videoCapabilities),4);case 4:L(r,3);break;case 2:return a=D(r),ne.v("Error initializing EME",a),N(r,i.destroy(),5);case 5:case 9:return r.return([]);case 3:return O(r,6),N(r,jt(i),8);case 8:L(r,7);break;case 6:return o=D(r),ne.v("Error setting server certificate",o),N(r,i.destroy(),9);case 7:return s=[],N(r,Zy.all(Mb(u=n.sessionIds).call(u,(function(e){return T((function t(){var n;return z(t,(function(t){switch(t.s){case 1:return O(t,2),N(t,function(e,t){return T((function n(){var r,i,a;return z(n,(function(n){switch(n.s){case 1:return N(n,Bt(e,t),2);case 2:return(r=n.B)?(i=[],(a=e.h.get(r))&&(a.Ga=new Ee,i.push(a.Ga)),ne.O("Attempting to remove session",t),i.push(r.remove()),N(n,Zy.all(i),0)):(ne.O("Ignoring attempt to remove missing session",t),n.return())}}))}))}(i,e),4);case 4:s.push(e),L(t,0);break;case 2:n=D(t),ne.v("Error deleting offline session",n),j(t)}}))}))}))),10);case 10:return N(r,i.destroy(),11);case 11:return r.return(s)}}))}))}(e,t,s),N(r,u,5);case 5:c=r.B,i=nd(i).call(i,c),o=a.next(),r.I(2);break;case 4:return r.return(i)}}))}))}function Cs(e,t){function n(e,t){return e.robustness==t.robustness&&e.contentType==t.contentType}return e.keySystem==t.keySystem&&e.licenseUri==t.licenseUri&&Je(e.audioCapabilities,t.audioCapabilities,n)&&Je(e.videoCapabilities,t.videoCapabilities,n)}function Rs(e,t){var n={Ia:null,D:null,mimeType:null,startTime:null,Rd:null,uri:null},r=this;this.m=t,this.i=e,this.j=n,this.o=null,this.l=[],this.h=this.g=null,this.u=!0,this.A=Zy.resolve().then((function(){return function(e){return T((function t(){return z(t,(function(t){if(1===t.s){if(e.u){if(0==e.l.length||e.g&&!e.g.gb)var n=!1;else{e.g&&(e.g.Da.kb(),e.g=null);var r=(n=e.l.shift()).create(e.j);r?(n.Da.Kb(),e.g={node:r.node,payload:r.payload,gb:r.gb,Da:n.Da}):n.Da.Ec(),n=!0}return n?n=Zy.resolve():e.g?n=function(e){return T((function t(){var n,r;return z(t,(function(t){switch(t.s){case 1:return e.i=e.m.Af(e.i,e.j,e.g.node,e.g.payload),O(t,2),e.h=e.m.ef(e.i,e.j,e.g.payload),N(t,e.h.promise,4);case 4:e.h=null,e.i==e.g.node&&(e.g.Da.Cc(),e.g=null),L(t,0);break;case 2:return 7001==(n=D(t)).code?e.g.Da.kb():e.g.Da.onError(n),e.g=null,e.h=null,r=e,N(t,e.m.handleError(e.j,n),5);case 5:r.i=t.B,j(t)}}))}))}(e):(e.m.Xf(e.i),e.o=new Ee,n=e.o),N(t,n,1)}t.I(0)}}))}))}(r)}))}function Ps(e,t){var n={Kb:function(){},Cc:function(){},kb:function(){},onError:function(){},Ec:function(){},$g:function(){}};return e.l.push({create:t,Da:n}),e.h&&e.h.abort(),Ns(e),n}function Ns(e){e.o&&(e.o.resolve(),e.o=null)}function js(e){this.g=null;for(var t=0;t<e.textTracks.length;++t){var n=e.textTracks[t];n.mode="disabled","Shaka Player TextTrack"==n.label&&(this.g=n)}this.g||(this.g=e.addTextTrack("subtitles","Shaka Player TextTrack")),this.g.mode="hidden"}function Os(e){if(e.startTime>=e.endTime)return ne.v("Invalid cue times: "+e.startTime+" - "+e.endTime),null;var t=new VTTCue(e.startTime,e.endTime,e.payload);t.lineAlign=e.lineAlign,t.positionAlign=e.positionAlign,e.size&&(t.size=e.size);try{t.align=e.textAlign}catch(n){}return"center"==e.textAlign&&"center"!=t.align&&(t.align="middle"),"vertical-lr"==e.writingMode?t.vertical="lr":"vertical-rl"==e.writingMode&&(t.vertical="rl"),1==e.lineInterpretation&&(t.snapToLines=!1),null!=e.line&&(t.line=e.line),null!=e.position&&(t.position=e.position),t}function _s(e,t){var n=e.mode;e.mode="showing"==n?"showing":"hidden";for(var r=e.cues,i=r.length-1;0<=i;i--){var a=r[i];a&&t(a)&&e.removeCue(a)}e.mode=n}function Ls(e,t,n,r,i){var a,o=i in r,s=!0;for(a in t){var u=i+"."+a,c=o?r[i]:n[a];o||a in n?void 0===t[a]?void 0===c||o?delete e[a]:e[a]=Xe(c):c.constructor==Object&&t[a]&&t[a].constructor==Object?(e[a]||(e[a]=Xe(c)),u=Ls(e[a],t[a],c,r,u),s=s&&u):Rl(t[a])!=Rl(c)||null==t[a]||"function"!=typeof t[a]&&t[a].constructor!=c.constructor?(ne.kc("Invalid config, wrong type for "+u),s=!1):("function"==typeof n[a]&&n[a].length!=t[a].length&&ne.ba("Unexpected number of arguments for "+u),e[a]=t[a]):(ne.kc("Invalid config, unrecognized key "+u),s=!1)}return s}function Ds(e,t){for(var n={},r=n,i=0,a=0;!(0>(i=Hh(e).call(e,".",i)));)0!=i&&"\\"==e[i-1]||(r[a=e.substring(a,i).replace(/\\\./g,".")]={},r=r[a],a=i+1),i+=1;return r[e.substring(a).replace(/\\\./g,".")]=t,n}function Us(){}function Fs(){var e=5e5,t=1/0;navigator.connection&&(navigator.connection.downlink&&(e=1e6*navigator.connection.downlink),navigator.connection.saveData&&(t=360));var n={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:Ht,fairPlayTransform:!0,updateExpirationTime:1},r={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,dash:{customScheme:function(e){if(e)return null},clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,defaultPresentationDelay:10,ignoreMinBufferTime:!1,autoCorrectDrift:!0,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1},hls:{ignoreTextStreamFailures:!1,useFullSegmentsForStartTime:!1}},i={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},failureCallback:function(e){return ne.error("Unhandled streaming error",e),[e]},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0};(At("Web0S")||Et()||At("CrKey"))&&(i.stallSkip=0);var a={trackSelectionCallback:function(e){return T((function t(){return z(t,(function(t){if(1===t.s)return t.return(e)}))}))},progressCallback:function(e,t){return[e,t]},usePersistentLicense:!0},o={drm:n,manifest:r,streaming:i,offline:a,abrFactory:Yn,abr:{enabled:!0,defaultBandwidthEstimate:e,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:t,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0},playRangeStart:0,playRangeEnd:1/0,textDisplayFactory:function(){return null}};return a.trackSelectionCallback=function(e){return T((function t(){return z(t,(function(t){if(1===t.s)return t.return(function(e,t){var n=Hb(e).call(e,(function(e){return"variant"==e.type})),r=[],i=Gn(t,Mb(n).call(n,(function(e){return e.language})));i&&(r=Hb(n).call(n,(function(e){return zn(e.language)==i}))),0==r.length&&(r=Hb(n).call(n,(function(e){return e.primary}))),0==r.length&&(1<new $O(Mb(n).call(n,(function(e){return e.language}))).size&&ne.v("Could not choose a good audio track based on language preferences or primary tracks. An arbitrary language will be stored!"),r=n);var a=Hb(r).call(r,(function(e){return e.height&&480>=e.height}));if(a.length&&(Nh(a).call(a,(function(e,t){return t.height-e.height})),r=Hb(a).call(a,(function(e){return e.height==a[0].height}))),n=[],r.length){var o=Math.floor(r.length/2);Nh(r).call(r,(function(e,t){return e.bandwidth-t.bandwidth})),n.push(r[o])}for(r=w(e),o=r.next();!o.done;o=r.next())"text"==(o=o.value).type&&n.push(o);return n}(e,o.preferredAudioLanguage))}))}))},o}function Ks(e,t,n){var r={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return Ls(e,t,n||Fs(),r,"")}function Bs(){this.g=null,this.h=[]}function Hs(e,t){if(null==e.g)e.g={timestamp:CT()/1e3,state:t,duration:0};else{var n=CT()/1e3;e.g.duration=n-e.g.timestamp,e.g.state!=t&&(e.h.push(e.g),e.g={timestamp:n,state:t,duration:0})}}function Vs(e,t){var n=0;e.g&&e.g.state==t&&(n+=e.g.duration);for(var r=w(e.h),i=r.next();!i.done;i=r.next())n+=(i=i.value).state==t?i.duration:0;return n}function zs(){this.h=this.i=null,this.g=[]}function qs(){this.j=this.C=this.m=this.h=this.o=this.u=this.A=this.l=this.F=NaN,this.g=new Bs,this.i=new zs}function Gs(t,n){var r=this;We.call(this),this.o=_u,this.g=null,this.ub=!1,this.l=new ut,this.Uc=this.u=this.Tb=this.i=this.C=this.j=this.rc=this.L=this.ic=this.J=this.wb=this.A=this.M=this.m=this.X=null,this.re=1e9,this.lc=new $O,this.yb=!0,this.wa=null,this.qe=!1,this.oe=0,this.va=null,this.Z=new Aa,this.h=iu(this),this.mc={width:1/0,height:1/0},this.F=null,this.tb=new _a(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount),this.ua=this.h.preferredTextLanguage,this.Xa=this.h.preferredTextRole,this.Wc=[],n&&n(this),this.X=function(e){return new et((function(t,n){e.u&&e.u.segmentDownloaded(t,n)}))}(this),this.l.H(e,"online",(function(){r.Id()})),this.P={name:"detach"},this.da={name:"attach"},this.Qa={name:"unload"},this.nd={name:"manifest-parser"},this.md={name:"manifest"},this.vb={name:"media-source"},this.ad={name:"drm-engine"},this.ea={name:"load"},this.od={name:"src-equals-drm-engine"},this.xb={name:"src-equals"};var i=new AP;i.set(this.da,(function(e,t){return Ve(function(e,t,n){return null==t.D&&(t.D=n.D,e.l.H(t.D,"error",(function(){var t=Su(e);t&&e.Va(t)}))),e.g=t.D,Zy.resolve()}(r,e,t))})),i.set(this.P,(function(e){return e.D&&(r.l.ta(e.D,"error"),e.D=null),r.g=null,Ve(e=Zy.resolve())})),i.set(this.Qa,(function(e){return Ve($s(r,e))})),i.set(this.vb,(function(t){return t=function(t,n){return T((function r(){var i,a,o,s;return z(r,(function(r){switch(r.s){case 1:return i=e.muxjs?new Zt:new en,a=t.h.textDisplayFactory,o=new a,t.fd=a,N(r,(s=new In(n.D,i,o)).C,2);case 2:t.M=s,j(r)}}))}))}(r,t),Ve(t)})),i.set(this.nd,(function(e,t){var n=function(e,t,n){return T((function r(){var i,a,o,s;return z(r,(function(r){switch(r.s){case 1:if(t.Ia=n.Ia,t.mimeType=n.mimeType,t.uri=n.uri,i=t.uri,a=e.X,e.Tb=i,t.Ia){e.C=t.Ia(),r.I(2);break}return o=e,N(r,Ci.create(i,a,e.h.manifest.retryParameters,t.mimeType),3);case 3:o.C=r.B;case 2:s=Xe(e.h.manifest),n.D&&"AUDIO"===n.D.nodeName&&(s.disableVideo=!0),e.C.configure(s),j(r)}}))}))}(r,e,t);return Ve(n)})),i.set(this.md,(function(e){return function(e,t){var n=t.uri,r=e.X;e.rc=new ho((function(){return e.He()})),function(e,t){e.h=t}(e.rc,(function(t){wu(e,"timelineregionadded",t)}));var i={networkingEngine:r,filterNewPeriod:function(t){return e.Xc(t)},filterAllPeriods:function(t){return au(e,t)},onTimelineRegionAdded:function(t){var n=e.rc;e:{for(var r=w(n.g),i=r.next();!i.done;i=r.next())if((i=i.value).schemeIdUri==t.schemeIdUri&&i.id==t.id&&i.startTime==t.startTime&&i.endTime==t.endTime){r=i;break e}r=null}null==r&&(n.g.add(t),n.h(t))},onEvent:function(t){return e.dispatchEvent(t)},onError:function(t){return e.Va(t)}};return new Fe(Zy.resolve().then((function(){return T((function t(){var r;return z(t,(function(t){switch(t.s){case 1:return r=e,N(t,e.C.start(n,i),2);case 2:if(r.i=t.B,e.dispatchEvent(new qe("manifestparsed")),0==e.i.periods.length)throw new re(2,4,4014);!function(e){function t(e){var t;return e.video&&e.audio||e.video&&SM(t=e.video.codecs).call(t,",")}hS(e).call(e,(function(e){var n;return hS(n=e.variants).call(n,t)}))&&(ne.debug("Found variant with audio and video content, so filtering out audio-only content in all periods."),Gf(e).call(e,(function(e){var n;e.variants=Hb(n=e.variants).call(n,t)})))}(e.i.periods),j(t)}}))}))})),(function(){return ne.info("Aborting parser step..."),e.C.stop()}))}(r,e)})),i.set(this.ad,(function(e){return e=function(e,t){return T((function n(){return z(n,(function(n){switch(n.s){case 1:return e.m=Js(e,{Ib:e.X,onError:function(t){e.Va(t)},Dc:function(t){Tu(e,t)},onExpirationUpdated:function(t,n){Eu(e,t,n)},onEvent:function(t){e.dispatchEvent(t)}}),e.m.configure(e.h.drm),N(n,Pt(e.m,Wa(e.i.periods),e.i.offlineSessionIds),2);case 2:return N(n,e.m.Ub(t.D),3);case 3:au(e,e.i.periods),j(n)}}))}))}(r,e),Ve(e)})),i.set(this.ea,(function(e,t){return Ve(function(e,t,n){return T((function r(){var i,a,o,s,u,c,l,f,h,d;return z(r,(function(r){var p,g,v;switch(r.s){case 1:return t.startTime=n.startTime,i=t.D,a=t.uri,e.Tb=a,e.J=new $a({wc:function(){return t.D.playbackRate},vc:function(){return t.D.defaultPlaybackRate},Od:function(e){t.D.playbackRate=e},pe:function(e){t.D.currentTime+=e}}),e.F=new qs,o=function(){return lu(e)},s=function(){return cu(e)},e.l.H(i,"playing",o),e.l.H(i,"pause",o),e.l.H(i,"ended",o),e.l.H(i,"ratechange",s),u=e.h.abrFactory,e.u&&e.Uc==u||(e.Uc=u,e.u=new u,e.u.configure(e.h.abr)),function(e,t){for(var n=0;n<t.length;n++){for(var r=t[n],i=new AP,a=w(r.variants),o=a.next();!o.done;o=a.next())if((o=o.value).video&&o.video.closedCaptions){o=o.video;for(var s=w(Lb(c=o.closedCaptions).call(c)),u=s.next();!u.done;u=s.next()){var c;if(u=u.value,!i.has(u)){var l,f={id:e.re++,originalId:u,createSegmentIndex:Pw(l=Zy.resolve).call(l,Zy),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,presentationTimeOffset:0,mimeType:"application/cea-608",codecs:"",kind:"caption",encrypted:!1,keyId:null,language:o.closedCaptions.get(u),label:null,type:"text",primary:!1,frameRate:void 0,pixelAspectRatio:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:o.roles,channelsCount:null,audioSamplingRate:null,closedCaptions:null};i.set(u,f)}}}for(a=(i=w(OP(i).call(i))).next();!a.done;a=i.next())r.textStreams.push(a.value)}}(e,e.i.periods),e.tb=new _a(e.h.preferredAudioLanguage,e.h.preferredVariantRole,e.h.preferredAudioChannelCount),e.ua=e.h.preferredTextLanguage,e.Xa=e.h.preferredTextRole,function(e,t,n){0<t&&(e.aa()?ne.v("|playRangeStart| has been configured for live content. Ignoring the setting."):e.Le(t)),n<e.ha()&&(e.aa()?ne.v("|playRangeEnd| has been configured for live content. Ignoring the setting."):e.Fa(n))}(e.i.presentationTimeline,e.h.playRangeStart,e.h.playRangeEnd),e.u.init((function(t,n,r){n=void 0!==n&&n,r=void 0===r?0:r,ne.debug("switch_");e:{for(var i=w(e.i.periods),a=i.next();!a.done;a=i.next()){var o;if(a=a.value,SM(o=a.variants).call(o,t)){i=a;break e}}i=null}nu(e,i,t,!0),e.j&&xo(e.j,t,n,r)&&pu(e)})),e.A=function(e,t){return new uo(e.g,e.i,e.h.streaming,t,(function(){e.wb&&Ga(e.wb,!0),e.j&&function(e){var t,n,r;function i(t){var n=e.g.T;return t="text"==t?null!=(t=n.g).g&&null!=t.h&&a>=t.g&&a<t.h:nn(t=_n(n,t),a,o)}var a=e.g.eb(),o=e.l.smallGapLimit,s=!1,u=Uo(e,a);if(pt(OP(t=e.h).call(t),(function(e){return e.oa==u})))for(var c=w(Lb(f=e.h).call(f)),l=c.next();!l.done;l=c.next()){var f;i(l=l.value)||(Ao(e,e.h.get(l)),s=!0)}else pt(Lb(n=e.h).call(n),i)||(ne.debug("(all): seeked: unbuffered seek: clearing all buffers"),Gf(r=e.h).call(r,(function(t){Ao(e,t)})),s=!0);s||ne.debug("(all): seeked: buffered seek: presentationTime="+a)}(e.j),e.L&&Zs(e)}),(function(t){return e.dispatchEvent(t)}))}(e,t.startTime),e.wb=function(e){var t=new Ya(e.i);!function(e,t){e.h=t}(t,(function(){gu(e)}));var n=new po(e.rc);!function(e,t,n,r){e.g=t,e.h=n,e.i=r}(n,(function(t){wu(e,"timelineregionenter",t)}),(function(t){wu(e,"timelineregionexit",t)}),(function(t,n){n||(wu(e,"timelineregionenter",t),wu(e,"timelineregionexit",t))}));var r=new qa(e.g);return r.g.add(t),r.g.add(n),r}(e),c=Math.max(e.i.minBufferTime,e.h.streaming.rebufferingGoal),Qs(e,c),e.j=function(e){var t,n,r,i,a;return new yo(e.i,{eb:function(){return e.A.l()},getBandwidthEstimate:function(){return e.u.getBandwidthEstimate()},T:e.M,Ib:e.X,ue:Pw(t=e.Vf).call(t,e),te:Pw(n=e.Ze).call(n,e),onError:Pw(r=e.Va).call(r,e),onEvent:function(t){return e.dispatchEvent(t)},Zf:Pw(i=e.$f).call(i,e),zd:Pw(a=e.eg).call(a,e)})}(e),e.j.configure(e.h.streaming),Xn.$d(e.i,e.h.preferredAudioChannelCount),e.o=Lu,e.dispatchEvent(new qe("streaming")),N(r,e.j.start(),2);case 2:e.h.streaming.startAtSegmentBoundary&&(l=e.A.l(),f=function(e,t){function n(e,t){if(!e)return null;var n=e.findSegmentPosition(t-a.startTime);return null==n?null:(n=e.getSegmentReference(n))?n.startTime+a.startTime:null}var r=bo(e.j),i=wo(e.j),a=Cu(e);return r=n(r,t),null!=(i=n(i,t))&&null!=r?Math.max(i,r):null!=i?i:null!=r?r:t}(e,l),e.A.A(f)),Gf(p=e.i.periods).call(p,Pw(g=e.Xc).call(g,e)),gu(e),pu(e),h=Cu(e)||e.i.periods[0],d=hS(v=h.variants).call(v,(function(e){return e.primary})),e.h.preferredAudioLanguage||d||ne.v("No preferred audio language set. We will choose an arbitrary language initially"),fu(e,h.variants),e.l.ya(i,"loadedmetadata",(function(){e.F.h=CT()/1e3-n.Rd})),j(r)}}))}))}(r,e,t))})),i.set(this.od,(function(e,t){var n=function(e,t,n){return T((function r(){var i,a;return z(r,(function(r){var o;switch(r.s){case 1:return i=Se,e.m=Js(e,{Ib:e.X,onError:function(t){e.Va(t)},Dc:function(t){Tu(e,t)},onExpirationUpdated:function(t,n){Eu(e,t,n)},onEvent:function(t){e.dispatchEvent(t)}}),e.m.configure(e.h.drm),a={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:Pw(o=Zy.resolve).call(o,Zy),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,presentationTimeOffset:0,mimeType:n.mimeType?n.mimeType.split(";")[0]:"video/mp4",codecs:n.mimeType?yt(n.mimeType):"",encrypted:!0,keyId:null,language:"und",label:null,type:i.Za,primary:!1,frameRate:void 0,pixelAspectRatio:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0},N(r,Pt(e.m,[a],[]),2);case 2:return N(r,e.m.Ub(t.D),0)}}))}))}(r,e,t);return Ve(n)})),i.set(this.xb,(function(e,t){return function(e,t,n){function r(){return lu(e)}if(t.uri=n.uri,t.startTime=n.startTime,e.Tb=t.uri,e.F=new qs,e.A=new so(t.D),null!=t.startTime&&e.A.A(t.startTime),e.J=new $a({wc:function(){return t.D.playbackRate},vc:function(){return t.D.defaultPlaybackRate},Od:function(e){t.D.playbackRate=e},pe:function(e){t.D.currentTime+=e}}),Qs(e,e.h.streaming.rebufferingGoal),e.l.H(t.D,"playing",r),e.l.H(t.D,"pause",r),e.l.H(t.D,"ended",r),e.l.H(t.D,"ratechange",(function(){return cu(e)})),"none"!=e.g.preload&&e.l.ya(t.D,"loadedmetadata",(function(){e.F.h=CT()/1e3-n.Rd})),e.g.audioTracks&&(e.l.H(e.g.audioTracks,"addtrack",(function(){return gu(e)})),e.l.H(e.g.audioTracks,"removetrack",(function(){return gu(e)})),e.l.H(e.g.audioTracks,"change",(function(){return gu(e)}))),e.g.textTracks){var i=e.g.textTracks;e.l.H(i,"addtrack",(function(){return gu(e)})),e.l.H(i,"removetrack",(function(){return gu(e)})),e.l.H(i,"change",(function(){return gu(e)}))}t.D.src=t.uri,(Et()||At("Web0S"))&&t.D.load(),e.o=Du,e.dispatchEvent(new qe("streaming"));var a=new Ee;Qa(e.g,HTMLMediaElement.HAVE_METADATA,e.l,(function(){a.resolve()}));var o=!1;return e.Wc.push((function(){o=!0})),Qa(e.g,HTMLMediaElement.HAVE_CURRENT_DATA,e.l,(function(){return T((function t(){var n;return z(t,(function(t){switch(t.s){case 1:if(o)return t.return();if(function(e){var t=e.h.preferredAudioLanguage;if(""!=t){e.Jd(t);var n=e.h.preferredVariantRole;""!=n&&e.Jd(t,n)}}(e),n=tu(e),Jh(n).call(n,(function(e){return"disabled"!=e.mode}))){t.I(2);break}return N(t,new Zy((function(t){e.l.ya(e.g.textTracks,"change",t),new Le(t).V(1)})),2);case 2:if(o)return t.return();!function(e){var t=e.h.preferredTextLanguage;if(""!=t){e.Kd(t);var n=e.h.preferredTextRole;""!=n&&e.Kd(t,n)}}(e),j(t)}}))}))})),e.g.error?a.reject(Su(e)):"none"==e.g.preload&&(ne.ba('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),a.resolve()),e.l.ya(e.g,"error",(function(){a.reject(Su(e))})),new Fe(a,(function(){return a.reject(new re(2,7,7001)),Zy.resolve()}))}(r,e,t)})),this.Ya=new Rs(this.P,{Af:function(e,t,n,i){var a=null;return e==r.P&&(a=n==r.P?r.P:r.da),e==r.da&&(a=n==r.P||t.D!=i.D?r.P:n==r.da?r.da:n==r.vb||n==r.ea?r.vb:n==r.xb?r.od:null),e==r.vb&&(a=n==r.ea&&t.D==i.D?r.nd:r.Qa),e==r.nd&&(a=Nu(r.ea,r.md,r.Qa,n,t,i)),e==r.md&&(a=Nu(r.ea,r.ad,r.Qa,n,t,i)),e==r.ad&&(a=Nu(r.ea,r.ea,r.Qa,n,t,i)),e==r.od&&(a=n==r.xb&&t.D==i.D?r.xb:r.Qa),e!=r.ea&&e!=r.xb||(a=r.Qa),e==r.Qa&&(a=i.D&&t.D==i.D?r.da:r.P),a},ef:function(e,t,n){return r.dispatchEvent(new qe("onstatechange",{state:e.name})),i.get(e)(t,n)},handleError:function(e,t){return T((function n(){return z(n,(function(n){switch(n.s){case 1:return ne.v("The walker saw an error:"),t instanceof re?ne.v("Error Code:",t.code):(ne.v("Error Message:",t.message),ne.v("Error Stack:",t.stack)),N(n,$s(r,e),2);case 2:return n.return(e.D?r.da:r.P)}}))}))},Xf:function(e){r.dispatchEvent(new qe("onstateidle",{state:e.name}))}}),t&&this.Ub(t,!0)}I(ds,is),ds.prototype.updateManifestExpiration=function(e,t){var n=ns(this.h,this.g),r=n.store(),i=new Ee;return r.get(e).onsuccess=function(n){(n=n.target.result)?(n.expiration=t,r.put(n),i.resolve()):i.reject(new re(2,9,9012,"Could not find values for "+e))},n.promise().then((function(){return i}))},ds.prototype.pc=function(e){var t;return{originalManifestUri:e.originalManifestUri,duration:e.duration,size:e.size,expiration:null==e.expiration?1/0:e.expiration,periods:Mb(t=e.periods).call(t,ps),sessionIds:e.sessionIds,drmInfo:e.drmInfo,appMetadata:e.appMetadata}},ds.prototype.ae=function(e){return{data:e.data}},I(ys,is),ys.prototype.hasFixedKeySpace=function(){return this.j},ys.prototype.addSegments=function(e){return this.j?as(this.i):this.add(this.i,e)},ys.prototype.addManifests=function(e){return this.j?as(this.g):this.add(this.g,e)},ys.prototype.pc=function(e){return null==e.expiration&&(e.expiration=1/0),e},(f=bs.prototype).init=function(){var t=this,n=new Ee,r=e.indexedDB.open("shaka_offline_db",4);return r.onsuccess=function(e){e=e.target.result,t.j=e;var r=e.objectStoreNames;r.contains("manifest")&&r.contains("segment")?(ne.debug("Mounting v1 idb storage cell"),r=new ds(e,"segment","manifest")):r=null,t.g=r,(r=e.objectStoreNames).contains("manifest-v2")&&r.contains("segment-v2")?(ne.debug("Mounting v2 idb storage cell"),r=new ys(e,"segment-v2","manifest-v2",!0)):r=null,t.h=r,(r=e.objectStoreNames).contains("manifest-v3")&&r.contains("segment-v3")?(ne.debug("Mounting v3 idb storage cell"),r=new ys(e,"segment-v3","manifest-v3",!1)):r=null,t.i=r,e.objectStoreNames.contains("session-ids")?(ne.debug("Mounting session ID idb storage cell"),e=new us(e)):e=null,t.l=e,n.resolve()},r.onupgradeneeded=function(e){e=e.target.result;for(var t=w(["segment-v3","manifest-v3","session-ids"]),n=t.next();!n.done;n=t.next())n=n.value,e.objectStoreNames.contains(n)||e.createObjectStore(n,{autoIncrement:!0})},r.onerror=function(e){n.reject(new re(2,9,9001,r.error)),e.preventDefault()},n},f.destroy=function(){var e=this;return T((function t(){return z(t,(function(t){switch(t.s){case 1:if(!e.g){t.I(2);break}return N(t,e.g.destroy(),2);case 2:if(!e.h){t.I(4);break}return N(t,e.h.destroy(),4);case 4:if(!e.i){t.I(6);break}return N(t,e.i.destroy(),6);case 6:if(!e.l){t.I(8);break}return N(t,e.l.destroy(),8);case 8:e.j&&e.j.close(),j(t)}}))}))},f.getCells=function(){var e=new AP;return this.g&&e.set("v1",this.g),this.h&&e.set("v2",this.h),this.i&&e.set("v3",this.i),e},f.getEmeSessionCell=function(){return this.l},f.erase=function(){var t=this;return T((function n(){return z(n,(function(n){switch(n.s){case 1:if(!t.g){n.I(2);break}return N(n,t.g.destroy(),2);case 2:if(!t.h){n.I(4);break}return N(n,t.h.destroy(),4);case 4:if(!t.i){n.I(6);break}return N(n,t.i.destroy(),6);case 6:return t.j&&t.j.close(),N(n,function(){var t=new Ee,n=e.indexedDB.deleteDatabase("shaka_offline_db");return n.onblocked=function(){ne.v("Deleting","shaka_offline_db","is being blocked")},n.onsuccess=function(){t.resolve()},n.onerror=function(e){t.reject(new re(2,9,9001,n.error)),e.preventDefault()},t}(),8);case 8:return t.j=null,t.g=null,t.h=null,t.i=null,N(n,t.init(),0)}}))}))},fs("idb",(function(){return At("CrKey")||!e.indexedDB?null:new bs})),ws.prototype.Ea=function(){return this.l},ws.prototype.ja=function(){return this.j},ws.prototype.key=function(){return this.i},ws.prototype.toString=function(){return this.h},(f=As.prototype).configure=function(){},f.start=function(e){var t=this;return T((function n(){var r,i,a,o,s;return z(n,(function(n){switch(n.s){case 1:return r=Ss(e),t.g=r,null==r||"manifest"!=r.g?n.return(Zy.reject(new re(2,1,9004,r))):(i=new cs,_(n,2),N(n,i.init(),4));case 4:return N(n,ls(i,r.Ea(),r.ja()),5);case 5:return N(n,n.B.getManifests([r.key()]),6);case 6:return a=n.B,o=a[0],s=new Ts(r.Ea(),r.ja()),n.return(function(e,t){var n,r=new Ri(null,0);r.Fa(t.duration);var i=Mb(n=t.periods).call(n,(function(t){return Es(e,t,r)})),a=t.drmInfo?[t.drmInfo]:[];return t.drmInfo&&Gf(i).call(i,(function(e){var t;Gf(t=e.variants).call(t,(function(e){e.drmInfos=a}))})),{presentationTimeline:r,minBufferTime:2,offlineSessionIds:t.sessionIds,periods:i}}(s,o));case 2:return U(n),N(n,i.destroy(),7);case 7:F(n,0)}}))}))},f.stop=function(){return Zy.resolve()},f.update=function(){},f.onExpirationUpdated=function(e,t){var n=this;return T((function r(){var i,a,o,s,u,c,l,f;return z(r,(function(r){var h;switch(r.s){case 1:return i=n.g,a=new cs,O(r,2,3),N(r,a.init(),5);case 5:return N(r,ls(a,i.Ea(),i.ja()),6);case 6:return N(r,(o=r.B).getManifests([i.key()]),7);case 7:if(s=r.B,u=s[0],c=SM(h=u.sessionIds).call(h,e),l=null==u.expiration||u.expiration>t,!c||!l){r.I(3);break}return ne.debug("Updating expiration for stored content"),N(r,o.updateManifestExpiration(i.key(),t),3);case 3:return U(r),N(r,a.destroy(),10);case 10:F(r,0);break;case 2:f=D(r),ne.error("There was an error updating",i,f),r.I(3)}}))}))},Ci.Qb("application/x-offline-manifest",As),$("shaka.offline.OfflineScheme",Ms),Ms.m=function(e){return He(e={uri:e,Bd:e,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}})},Ms.o=function(e,t){var n=new cs;return He(void 0).ca((function(){return n.init()})).ca((function(){return ls(n,t.Ea(),t.ja())})).ca((function(e){return e.getSegments([t.key()])})).ca((function(e){return{uri:t,Bd:t,data:e[0].data,headers:{}}})).finally((function(){return n.destroy()}))},nt("offline",Ms),Rs.prototype.destroy=function(){var e=this;return T((function t(){return z(t,(function(t){switch(t.s){case 1:return e.u=!1,e.h&&e.h.abort(),Ns(e),N(t,e.A,2);case 2:e.g&&e.g.Da.kb();for(var n=w(e.l),r=n.next();!r.done;r=n.next())r.value.Da.kb();e.g=null,e.l=[],e.m=null,j(t)}}))}))},$("shaka.text.SimpleTextDisplayer",js),js.prototype.remove=function(e,t){return!!this.g&&(_s(this.g,(function(n){return n.startTime<t&&n.endTime>e})),!0)},js.prototype.remove=js.prototype.remove,js.prototype.append=function(e){var t,n,r,i=Os,a=Mb(e).call(e,(function(e){if(e.nestedCues.length){var t,n=Mb(t=e.nestedCues).call(t,(function(e){return e.spacer?"\n":e.payload+" "})).join("").replace(/ $/m,"");(e=e.clone()).nestedCues=[],e.payload=n}return e})),o=[];e=this.g.cues?Yw(this.g.cues):[];for(var s={},u=(a=w(a)).next();!u.done;s={Fb:s.Fb},u=a.next())s.Fb=u.value,hS(e).call(e,function(e){return function(t){return t.startTime==e.Fb.startTime&&t.endTime==e.Fb.endTime&&t.text==e.Fb.payload}}(s))||(u=i(s.Fb))&&o.push(u);Gf(t=Nh(n=xd(o).call(o)).call(n,(function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime!=t.endTime?e.endTime-t.startTime:"line"in VTTCue.prototype?Hh(o).call(o,t)-Hh(o).call(o,e):Hh(o).call(o,e)-Hh(o).call(o,t)}))).call(t,Pw(r=function(e){this.g.addCue(e)}).call(r,this))},js.prototype.append=js.prototype.append,js.prototype.destroy=function(){return this.g&&_s(this.g,(function(){return!0})),this.g=null,Zy.resolve()},js.prototype.destroy=js.prototype.destroy,js.prototype.isTextVisible=function(){return"showing"==this.g.mode},js.prototype.isTextVisible=js.prototype.isTextVisible,js.prototype.setTextVisibility=function(e){this.g.mode=e?"showing":"hidden"},js.prototype.setTextVisibility=js.prototype.setTextVisibility,$("shaka.util.ConfigUtils.mergeConfigObjects",Ls),$("shaka.util.ConfigUtils.convertToConfigObject",Ds),$("shaka.util.PlayerConfiguration",Us),Us.mergeConfigObjects=Ks,J(Gs,We),$("shaka.Player",Gs),Gs.prototype.destroy=function(){var e=this;return T((function t(){var n;return z(t,(function(t){switch(t.s){case 1:return e.o==Ou?t.return():(e.o=Ou,n=Ps(e.Ya,(function(){return{node:e.P,payload:{Ia:null,D:null,mimeType:null,startTime:null,Rd:null,uri:null},gb:!1}})),N(t,new Zy((function(t){n.Kb=function(){ne.info("Preparing to destroy walker...")},n.Cc=function(){t(),e.dispatchEvent(new qe("loaded"))},n.kb=function(){t()},n.onError=function(){t()},n.Ec=function(){t()}})),2));case 2:return N(t,e.Ya.destroy(),3);case 3:if(e.l&&(e.l.release(),e.l=null),e.Uc=null,e.u=null,e.h=null,!e.X){t.I(0);break}return N(t,e.X.destroy(),5);case 5:e.X=null,j(t)}}))}))},Gs.prototype.destroy=Gs.prototype.destroy,Gs.version="v2.5.23";var Ws=["2","5"];tr=new function(e){this.g=e,this.i=Zn,this.h=er}(new Jn(Number(Ws[0]),Number(Ws[1])));var Xs=["output-restricted","internal-error"],Ys={};function $s(e,t){return T((function n(){var r;return z(n,(function(n){var i;switch(n.s){case 1:return e.o!=Ou&&(e.o=_u),r=Mb(i=e.Wc).call(i,(function(e){return e()})),e.Wc=[],N(n,Zy.all(r),2);case 2:if(e.dispatchEvent(new qe("unloading")),t.Ia=null,t.mimeType=null,t.startTime=null,t.uri=null,t.D&&(e.l.ta(t.D,"loadedmetadata"),e.l.ta(t.D,"playing"),e.l.ta(t.D,"pause"),e.l.ta(t.D,"ended"),e.l.ta(t.D,"ratechange")),e.wb&&(e.wb.release(),e.wb=null),e.ic&&(e.ic.stop(),e.ic=null),!e.C){n.I(3);break}return N(n,e.C.stop(),4);case 4:e.C=null;case 3:if(!e.u){n.I(5);break}return N(n,e.u.stop(),5);case 5:if(!e.j){n.I(7);break}return N(n,e.j.destroy(),8);case 8:e.j=null;case 7:if(e.J&&(e.J.release(),e.J=null),e.A&&(e.A.release(),e.A=null),!e.M){n.I(9);break}return N(n,e.M.destroy(),10);case 10:e.M=null;case 9:if(!t.D||!t.D.src){n.I(11);break}return N(n,new Zy((function(e){return new Le(e).V(.1)})),12);case 12:t.D.removeAttribute("src"),t.D.load();case 11:if(!e.m){n.I(13);break}return N(n,e.m.destroy(),14);case 14:e.m=null;case 13:e.Z.g.clear(),e.Tb=null,e.L=null,e.lc.clear(),e.i=null,e.F=null,e.fd=null,e.yb=!0,uu(e),j(n)}}))}))}function Js(e,t){return new Rt(t,e.h.drm.updateExpirationTime)}function Qs(e,t){e.L=new La,e.L.g=Ua,Da(e.L,t,Math.min(.5,t/2)),uu(e),e.ic=new Le((function(){Zs(e)})).Oa(.25)}function Zs(e){switch(e.o){case Du:var t=!!e.g.ended||tn(e.g.buffered)>=e.g.duration-1;break;case Lu:e:if(e.g.ended||Nn(e.M))t=!0;else{if(e.i.presentationTimeline.aa()){var n=e.i.presentationTimeline.Db();if(tn(e.g.buffered)>=n){t=!0;break e}}t=!1}break;default:t=!1}var r=rn(e.g.buffered,e.g.currentTime),i=t,a=(n=e.L).h.get(n.g);t=n.g,r=i||r>=a?Fa:Ua,n.g=r,t!=r&&uu(e)}function eu(e){if(e.C){var t=Xe(e.h.manifest);e.g&&"AUDIO"===e.g.nodeName&&(t.disableVideo=!0),e.C.configure(t)}if(e.m&&e.m.configure(e.h.drm),e.j){e.j.configure(e.h.streaming);try{var n,r;Gf(n=e.i.periods).call(n,Pw(r=e.Xc).call(r,e))}catch(s){e.Va(s)}var i=bo(e.j),a=wo(e.j);t=Cu(e),i=Xn.ie(i,a,t.variants),e.u&&i&&i.allowedByApplication&&i.allowedByKeySystem?fu(e,t.variants):(ne.debug("Choosing new streams after changing configuration"),hu(e,t))}if(e.M&&(t=e.h.textDisplayFactory,e.fd!=t)){i=new t;var o=(a=e.M).l;a.l=i,o&&(i.setTextVisibility(o.isTextVisible()),o.destroy()),a.g&&(a.g.i=i),e.fd=t,e.j&&(i=(t=e.j).h.get("text"))&&ko(t,i.stream,!0,0,!0)}e.u&&(e.u.configure(e.h.abr),e.h.abr.enabled&&!e.yb?e.u.enable():e.u.disable(),bu(e)),e.L&&(t=e.h.streaming.rebufferingGoal,e.i&&(t=Math.max(t,e.i.minBufferTime)),Da(e.L,t,Math.min(.5,t/2)))}function tu(e){var t;return Hb(t=Yw(e.g.textTracks)).call(t,(function(e){return"metadata"!=e.kind&&"chapters"!=e.kind&&"Shaka Player TextTrack"!=e.label}))}function nu(e,t,n,r){Ia(e.Z,t).variant=n,(e=e.F.i).i!=n&&(e.i=n,e.g.push({timestamp:CT()/1e3,id:n.id,type:"variant",fromAdaptation:r,bandwidth:n.bandwidth}))}function ru(e,t,n,r){Ma(e.Z,t,n),(e=e.F.i).h!=n&&(e.h=n,e.g.push({timestamp:CT()/1e3,id:n.id,type:"text",fromAdaptation:r,bandwidth:null}))}function iu(e){var t=Fs();return t.streaming.failureCallback=function(t){var n=[1001,1002,1003];e.aa()&&SM(n).call(n,t.code)&&(t.severity=1,ne.v("Live streaming error. Retrying automatically..."),e.Id())},t.textDisplayFactory=function(){return new js(e.g)},t}function au(e,t){var n,r,i=e.j?bo(e.j):null,a=e.j?wo(e.j):null;if(Gf(t).call(t,Pw(n=Xn.filterNewPeriod).call(n,null,e.m,i,a)),i=function(e,t){var n=0;return Gf(e).call(e,(function(e){n+=t(e)?1:0})),n}(t,(function(e){var t;return hS(t=e.variants).call(t,Xn.Gb)})),0==i)throw new re(2,4,4032);if(i<t.length)throw new re(2,4,4011);Gf(t).call(t,Pw(r=function(e){Xn.Xd(e.variants,this.h.restrictions,this.mc)&&this.j&&Cu(this)==e&&gu(this),xu(this,e.variants)}).call(r,e))}function ou(e,t,n,r){return n=void 0!==n&&n,r=void 0===r?0:r,e.yb?(e.wa=t,e.qe=n,e.oe=r,!0):((t=xo(e.j,t,n,r))&&vu(e),t)}function su(e,t){if(e.yb)return e.va=t,!0;var n=ko(e.j,t,!0,0,!1);return n&&mu(e),n}function uu(e){var t=e.jd();if(e.F&&e.L&&e.A){var n=e.J;n.j=t,Ja(n),lu(e)}e.dispatchEvent(new qe("buffering",{buffering:t}))}function cu(e){var t=e.g.playbackRate;0!=t&&e.J.set(t)}function lu(e){if(e.F&&e.L){var t=e.F.g;e.L.g==Ua?Hs(t,"buffering"):e.g.paused?Hs(t,"paused"):e.g.ended?Hs(t,"ended"):Hs(t,"playing")}}function fu(e,t){try{xu(e,t)}catch(r){return e.Va(r),null}var n=Hb(t).call(t,(function(e){return Xn.Gb(e)}));return n=e.tb.create(n),e.u.setVariants(Yw(OP(n).call(n))),e.u.chooseVariant()}function hu(e,t){var n=du(e,t,!1),r=Xn.Wb(t.textStreams,e.ua,e.Xa)[0]||null,i=!1;r&&(e.h.streaming.alwaysStreamText||e.zc())&&(ru(e,t,r,!0),i=su(e,r)),(n||i)&&pu(e)}function du(e,t,n){n=void 0===n||n;var r=fu(e,t.variants),i=!1;return r&&(nu(e,t,r,!0),i=ou(e,r,!0)),n&&i&&pu(e),i}function pu(e){ku(e,new qe("adaptation"))}function gu(e){ku(e,new qe("trackschanged"))}function vu(e){ku(e,new qe("variantchanged"))}function mu(e){ku(e,new qe("textchanged"))}function yu(e){ku(e,new qe("texttrackvisibility"))}function bu(e){ku(e,new qe("abrstatuschanged",{Zg:e.h.abr.enabled}))}function wu(e,t,n){e.dispatchEvent(new qe(t,{detail:{schemeIdUri:n.schemeIdUri,value:n.value,startTime:n.startTime,endTime:n.endTime,id:n.id,eventElement:n.eventElement}}))}function Su(e){if(!e.g.error)return null;var t=e.g.error.code;if(1==t)return null;var n=e.g.error.msExtendedCode;return n&&(0>n&&(n+=Math.pow(2,32)),n=n.toString(16)),new re(2,3,3016,t,n,e.g.error.message)}function Tu(e,t){if(e.j){var n,r=Cu(e),i=!1,a=ad(t);0==a.length&&ne.v("Got a key status event without any key statuses, so we don't know the real key statuses. If we don't have all the keys, you'll need to set restrictions so we don't select those tracks.");var o=1==a.length&&"00"==a[0];o&&ne.v("Got a synthetic key status event, so we don't know the real key statuses. If we don't have all the keys, you'll need to set restrictions so we don't select those tracks."),a.length&&Gf(n=e.i.periods).call(n,(function(e){var n;Gf(n=e.variants).call(n,(function(e){var n;Gf(n=Xn.Kf(e)).call(n,(function(n){var r=e.allowedByKeySystem;n.keyId&&(n=t[o?"00":n.keyId],e.allowedByKeySystem=!!n&&!SM(Xs).call(Xs,n)),r!=e.allowedByKeySystem&&(i=!0)}))}))})),a=bo(e.j);var s=wo(e.j);(a=Xn.ie(a,s,r.variants))&&!a.allowedByKeySystem&&(ne.debug("Choosing new variants after key status changed"),du(e,r)),i&&(gu(e),fu(e,r.variants))}}function Eu(e,t,n){e.C&&e.C.onExpirationUpdated&&e.C.onExpirationUpdated(t,n),e.dispatchEvent(new qe("expirationupdated"))}function xu(e,t){var n=e.m?vt(e.m.da):{},r=ad(n);r=r.length&&"00"==r[0];for(var i=!1,a=!1,o=[],s=[],u=w(t),c=u.next();!c.done;c=u.next()){var l=[];(c=c.value).audio&&l.push(c.audio),c.video&&l.push(c.video);for(var f=(l=w(l)).next();!f.done;f=l.next())if((f=f.value).keyId){var h=n[r?"00":f.keyId];h?SM(Xs).call(Xs,h)&&(SM(s).call(s,h)||s.push(h)):SM(o).call(o,f.keyId)||o.push(f.keyId)}c.allowedByApplication?c.allowedByKeySystem&&(i=!0):a=!0}if(!i)throw new re(2,4,4012,{hasAppRestrictions:a,missingKeys:o,restrictedKeyStatuses:s})}function ku(e,t){T((function n(){return z(n,(function(n){switch(n.s){case 1:return N(n,Zy.resolve(),2);case 2:e.o!=Ou&&e.dispatchEvent(t),j(n)}}))}))}function Au(e){for(var t=new $O,n=(e=w(e)).next();!n.done;n=e.next())(n=n.value).language?t.add(zn(n.language)):t.add("und");return t}function Mu(e){for(var t=new AP,n=(e=w(e)).next();!n.done;n=e.next()){var r=n.value;n="und";var i=[];for(r.language&&(n=zn(r.language)),(i="variant"==r.type?r.audioRoles:r.roles)&&i.length||(i=[""]),t.has(n)||t.set(n,new $O),i=(r=w(i)).next();!i.done;i=r.next())i=i.value,t.get(n).add(i)}var a=[];return Gf(t).call(t,(function(e,t){for(var n=w(e),r=n.next();!r.done;r=n.next())a.push({language:t,role:r.value})})),a}function Iu(e){var t;return null==(e=Cu(e))?[]:Hb(t=e.variants).call(t,(function(e){return Xn.Gb(e)}))}function Cu(e){for(var t=e.A.l(),n=null,r=(e=w(e.i.periods)).next();!r.done;r=e.next())(r=r.value).startTime<=t&&(n=r);return n}function Ru(e){var t=Cu(e);return Ia(e.Z,t).variant}function Pu(){return new re(2,7,7e3)}function Nu(e,t,n,r,i,a){return r==e&&i.D==a.D&&i.uri==a.uri&&i.mimeType==a.mimeType&&i.Ia==a.Ia?t:n}function ju(e){return new Zy((function(t,n){e.kb=function(){return n(Pu())},e.Cc=function(){return t()},e.onError=function(e){return n(e)},e.Ec=function(){return n(Pu())}}))}Gs.registerSupportPlugin=function(e,t){Ys[e]=t},Gs.isBrowserSupported=function(){if(!(Zy&&e.Uint8Array&&Gf(Array.prototype)))return!1;var t=kt();return!(t&&12>t||!(e.MediaKeys&&e.navigator&&e.navigator.requestMediaKeySystemAccess&&e.MediaKeySystemAccess&&e.MediaKeySystemAccess.prototype.getConfiguration))&&(!!St()||Tt("application/x-mpegurl"))},Gs.probeSupport=function(){return zt().then((function(e){for(var t=Ci.ng(),n={},r=w('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",")),i=r.next();!i.done;i=r.next()){n[i=i.value]=St()?!!kn(i)||MediaSource.isTypeSupported(i)||je(i):Tt(i);var a=i.split(";")[0];n[a]=n[a]||n[i]}for(var o in e={manifest:t,media:n,drm:e},Ys)e[o]=Ys[o]();return e}))},Gs.prototype.Ub=function(e,t){if(t=void 0===t||t,this.o==Ou)return Zy.reject(Pu());var n={Ia:null,D:null,mimeType:null,startTime:null,Rd:null,uri:null};n.D=e,St()||(t=!1);var r=t?this.vb:this.da,i=Ps(this.Ya,(function(){return{node:r,payload:n,gb:!1}}));return i.Kb=function(){return ne.info("Starting attach...")},ju(i)},Gs.prototype.attach=Gs.prototype.Ub,Gs.prototype.detach=function(){var e=this;if(this.o==Ou)return Zy.reject(Pu());var t=Ps(this.Ya,(function(){return{node:e.P,payload:{Ia:null,D:null,mimeType:null,startTime:null,Rd:null,uri:null},gb:!1}}));return t.Kb=function(){return ne.info("Starting detach...")},ju(t)},Gs.prototype.detach=Gs.prototype.detach,Gs.prototype.Ud=function(e){var t=this;if(e=void 0===e||e,this.o==Ou)return Zy.reject(Pu());St()||(e=!1);var n={Ia:null,D:null,mimeType:null,startTime:null,Rd:null,uri:null},r=Ps(this.Ya,(function(r){var i=r.D&&e?t.vb:r.D?t.da:t.P;return n.D=r.D,{node:i,payload:n,gb:!1}}));return r.Kb=function(){return ne.info("Starting unload...")},ju(r)},Gs.prototype.unload=Gs.prototype.Ud,Gs.prototype.load=function(e,t,n){if(this.o==Ou)return Zy.reject(Pu());this.dispatchEvent(new qe("loading"));var r={Ia:null,D:null,mimeType:null,startTime:null,Rd:null,uri:null};r.uri=e,r.Rd=CT()/1e3,n&&"string"!=typeof n&&(Qn("Loading with a manifest parser factory","Please register a manifest parser and for the mime-type."),r.Ia=function(){return new n}),n&&"string"==typeof n&&(r.mimeType=n),void 0!==t&&(r.startTime=t);var i=function(e,t){if(t.Ia)return!1;if(!St())return!0;var n=t.mimeType,r=t.uri||"";return n||(n={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"}[Ci.getExtension(r)]),!!n&&""!=(t.D||Mt()).canPlayType(n)&&(!Ci.isSupported(r,n)||xt()&&e.h.streaming.useNativeHlsOnSafari)}(this,r)?this.xb:this.ea,a=Ps(this.Ya,(function(e){return null==e.D?null:(r.D=e.D,{node:i,payload:r,gb:!0})}));return a.Kb=function(){return ne.info("Starting load of "+e+"...")},new Zy((function(e,t){a.Ec=function(){return t(new re(2,7,7002))},a.Cc=function(){return e()},a.kb=function(){return t(Pu())},a.onError=function(e){return t(e)}}))},Gs.prototype.load=Gs.prototype.load,Gs.prototype.configure=function(e,t){2==arguments.length&&"string"==typeof e&&(e=Ds(e,t));var n=Ks(this.h,e,iu(this));return eu(this),n},Gs.prototype.configure=Gs.prototype.configure,Gs.prototype.getConfiguration=function(){var e=iu(this);return Ks(e,this.h,iu(this)),e},Gs.prototype.getConfiguration=Gs.prototype.getConfiguration,Gs.prototype.vg=function(){for(var e in this.h)delete this.h[e];Ks(this.h,iu(this),iu(this)),eu(this)},Gs.prototype.resetConfiguration=Gs.prototype.vg,Gs.prototype.tf=function(){return this.o},Gs.prototype.getLoadMode=Gs.prototype.tf,Gs.prototype.yf=function(){return this.g},Gs.prototype.getMediaElement=Gs.prototype.yf,Gs.prototype.Yb=function(){return this.X},Gs.prototype.getNetworkingEngine=Gs.prototype.Yb,Gs.prototype.tc=function(){return this.Tb},Gs.prototype.getAssetUri=Gs.prototype.tc,Gs.prototype.wf=function(){return Qn("getManifestUri",'Please use "getAssetUri" instead.'),this.tc()},Gs.prototype.getManifestUri=Gs.prototype.wf,Gs.prototype.aa=function(){return this.i?this.i.presentationTimeline.aa():!(!this.g||!this.g.src)&&1/0==this.g.duration},Gs.prototype.isLive=Gs.prototype.aa,Gs.prototype.ib=function(){return!!this.i&&this.i.presentationTimeline.ib()},Gs.prototype.isInProgress=Gs.prototype.ib,Gs.prototype.Qf=function(){if(this.i){if(!this.i.periods.length)return!1;var e=this.i.periods[0].variants;return!!e.length&&!e[0].video}return!(!this.g||!this.g.src)&&(this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight)},Gs.prototype.isAudioOnly=Gs.prototype.Qf,Gs.prototype.He=function(){if(this.i){var e=this.i.presentationTimeline;return{start:e.Cb(),end:e.Ka()}}return this.g&&this.g.src&&(e=this.g.seekable).length?{start:e.start(0),end:e.end(e.length-1)}:{start:0,end:0}},Gs.prototype.seekRange=Gs.prototype.He,Gs.prototype.keySystem=function(){return Lt(this.drmInfo())},Gs.prototype.keySystem=Gs.prototype.keySystem,Gs.prototype.drmInfo=function(){return this.m?this.m.g:null},Gs.prototype.drmInfo=Gs.prototype.drmInfo,Gs.prototype.Xb=function(){return this.m?this.m.Xb():1/0},Gs.prototype.getExpiration=Gs.prototype.Xb,Gs.prototype.jd=function(){return!!this.L&&this.L.g==Ua},Gs.prototype.isBuffering=Gs.prototype.jd,Gs.prototype.Cf=function(){if(this.J){var e=this.J;e=e.j?0:e.i}else e=0;return e},Gs.prototype.getPlaybackRate=Gs.prototype.Cf,Gs.prototype.Mg=function(e){0==e?ne.ba("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.J&&this.J.set(e),this.o==Lu&&Eo(this.j,1<Math.abs(e)))},Gs.prototype.trickPlay=Gs.prototype.Mg,Gs.prototype.$e=function(){var e=this.J.vc();this.o==Du&&this.J.set(e),this.o==Lu&&(this.J.set(e),Eo(this.j,!1))},Gs.prototype.cancelTrickPlay=Gs.prototype.$e,Gs.prototype.ed=function(){var e;if(this.i&&this.A){for(var t=Ru(this),n=[],r=w(Iu(this)),i=r.next();!i.done;i=r.next()){i=i.value;var a=Xn.Oc(i);a.active=i==t,n.push(a)}return n}return this.g&&this.g.audioTracks?Mb(e=Yw(this.g.audioTracks)).call(e,(function(e){return Xn.je(e)})):[]},Gs.prototype.getVariantTracks=Gs.prototype.ed,Gs.prototype.Eb=function(){var e;if(this.i&&this.A){for(var t=function(e){var t=Cu(e);if(null==t)return null;if(!Ia(e.Z,t).text){var n=Xn.Wb(t.textStreams,e.ua,e.Xa);n.length&&Ma(e.Z,t,n[0])}return Ia(e.Z,t).text}(this),n=[],r=w(function(e){var t,n=Cu(e);return null==n?[]:Hb(t=n.textStreams).call(t,(function(t){return!e.lc.has(t)}))}(this)),i=r.next();!i.done;i=r.next()){i=i.value;var a=Xn.Kc(i);a.active=i==t,n.push(a)}return n}return this.g&&this.g.src&&this.g.textTracks?Mb(e=tu(this)).call(e,(function(e){return Xn.Of(e)})):[]},Gs.prototype.getTextTracks=Gs.prototype.Eb,Gs.prototype.Ld=function(e){if(this.i&&this.j){var t,n=Cu(this),r=Jh(t=n.textStreams).call(t,(function(t){return t.id==e.id}));r?(ru(this,n,r,!1),su(this,r),this.ua=r.language):ne.error("No stream with id",e.id)}else if(this.g&&this.g.src&&this.g.textTracks){for(r=(n=w(n=tu(this))).next();!r.done;r=n.next())r=r.value,Xn.gd(r)==e.id?r.mode=this.ub?"showing":"hidden":r.mode="disabled";mu(this)}},Gs.prototype.selectTextTrack=Gs.prototype.Ld,Gs.prototype.xg=function(){var e;Qn("selectEmbeddedTextTrack","If closed captions are signaled in the manifest, a text stream will be created to represent them. Please use SelectTextTrack.");var t=Hb(e=this.Eb()).call(e,(function(e){return"application/cea-608"==e.mimeType}));0<t.length?this.Ld(t[0]):ne.v("Unable to find the text track embedded in the video.")},Gs.prototype.selectEmbeddedTextTrack=Gs.prototype.xg,Gs.prototype.Rg=function(){var e;Qn("usingEmbeddedTextTrack","If closed captions are signaled in the manifest, a text stream will be created to represent them. There should be no reason to know if the player is playing embedded text.");var t=Hb(e=this.Eb()).call(e,(function(e){return e.active}))[0];return!!t&&"application/cea-608"==t.mimeType},Gs.prototype.usingEmbeddedTextTrack=Gs.prototype.Rg,Gs.prototype.Ie=function(e,t,n){if(n=void 0===n?0:n,this.i&&this.j){var r,i=Cu(this);this.h.abr.enabled&&ne.ba("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var a=Jh(r=i.variants).call(r,(function(t){return t.id==e.id}));a?Xn.Gb(a)?(nu(this,i,a,!1),ou(this,a,t,n),this.tb=new Oa(a),fu(this,i.variants)):ne.error("Unable to switch to restricted track",e.id):ne.error("No variant with id",e.id)}else if(this.g&&this.g.audioTracks){for(n=(t=w(t=Yw(this.g.audioTracks))).next();!n.done;n=t.next())n=n.value,Xn.gd(n)==e.id&&(n.enabled=!0);vu(this)}},Gs.prototype.selectVariantTrack=Gs.prototype.Ie,Gs.prototype.nf=function(){return Mu(this.ed())},Gs.prototype.getAudioLanguagesAndRoles=Gs.prototype.nf,Gs.prototype.Jf=function(){return Mu(this.Eb())},Gs.prototype.getTextLanguagesAndRoles=Gs.prototype.Jf,Gs.prototype.mf=function(){return Yw(Au(this.ed()))},Gs.prototype.getAudioLanguages=Gs.prototype.mf,Gs.prototype.If=function(){return Yw(Au(this.Eb()))},Gs.prototype.getTextLanguages=Gs.prototype.If,Gs.prototype.Jd=function(e,t){if(this.i&&this.A){var n=Cu(this);if(this.tb=new _a(e,t||"",0,""),!this.h.abr.enabled){var r=function(e,t){return e.video||t.video?e.video&&t.video?Math.abs((e.video.height||0)-(t.video.height||0))+Math.abs((e.video.width||0)-(t.video.width||0)):1/0:0},i=Cu(this)||this.i.periods[0],a=Ia(this.Z,i).variant,o=this.tb.create(i.variants);i=null;for(var s=(o=w(OP(o).call(o))).next();!s.done;s=o.next())s=s.value,(!i||r(i,a)>r(s,a))&&(i=s);if(i)return n=Xn.Oc(i),void this.Ie(n,!0)}du(this,n)}else if(this.g&&this.g.audioTracks){for(i=Yw(this.g.audioTracks),n=zn(e),a=r=null,o=(i=w(i)).next();!o.done;o=i.next()){var u;o=o.value,zn((s=Xn.je(o)).language)==n&&(r=o,t?SM(u=s.roles).call(u,t)&&(a=o):0==s.roles.length&&(a=o))}a?(a.enabled=!0,vu(this)):r&&(r.enabled=!0,vu(this))}},Gs.prototype.selectAudioLanguage=Gs.prototype.Jd,Gs.prototype.Kd=function(e,t){if(this.i&&this.A){var n=Cu(this);this.ua=e,this.Xa=t||"";var r=Xn.Wb(n.textStreams,this.ua,this.Xa)[0]||null;r&&(ru(this,n,r,!1),(this.h.streaming.alwaysStreamText||this.zc())&&su(this,r))}else{var i,a=zn(e);(n=Hb(i=this.Eb()).call(i,(function(e){var n;return zn(e.language)==a&&(!t||SM(n=e.roles).call(n,t))}))[0])&&this.Ld(n)}},Gs.prototype.selectTextLanguage=Gs.prototype.Kd,Gs.prototype.yg=function(e){if(this.i&&this.A){for(var t=Cu(this),n=null,r=w(Iu(this)),i=r.next();!i.done;i=r.next())if((i=i.value).audio.label==e){n=i;break}null==n?ne.v("No variants were found with label: "+e+". Ignoring the request to switch."):(this.tb=new _a(n.language,"",0,e),du(this,t))}},Gs.prototype.selectVariantsByLabel=Gs.prototype.yg,Gs.prototype.zc=function(){var e,t=this.ub;return this.M?this.M.l.isTextVisible():this.g&&this.g.src&&this.g.textTracks?hS(e=tu(this)).call(e,(function(e){return"showing"==e.mode})):t},Gs.prototype.isTextTrackVisible=Gs.prototype.zc,Gs.prototype.Bg=function(e){var t=this;return T((function n(){var r,i,a,o;return z(n,(function(n){switch(n.s){case 1:if(t.ub==(r=!!e))return n.return();if(t.ub=r,t.o!=Lu){if(t.g&&t.g.src&&t.g.textTracks)for(var s=w(tu(t)),u=s.next();!u.done;u=s.next())"disabled"!=(i=u.value).mode&&(i.mode=r?"showing":"hidden");n.I(2);break}if(t.M.l.setTextVisibility(r),t.h.streaming.alwaysStreamText){n.I(2);break}if(!r){!function(e){e.L=!0;var t=e.h.get("text");t&&(Vo(t),zo(t).catch((function(){})),e.h.delete("text"))}(t.j),n.I(2);break}if(So(t.j,"text")){n.I(2);break}if(a=Cu(t),!(0<(o=Xn.Wb(a.textStreams,t.ua,t.Xa)).length)){n.I(2);break}return N(n,To(t.j,o[0]),2);case 2:yu(t),j(n)}}))}))},Gs.prototype.setTextTrackVisibility=Gs.prototype.Bg,Gs.prototype.Ef=function(){if(!this.aa())return ne.v("getPlayheadTimeAsDate is for live streams!"),null;var e=this.Ya.j,t=0;if(this.A)t=this.A.l();else if(e){if(null==e.startTime)return new Date;t=e.startTime}return this.i?new Date(1e3*(this.i.presentationTimeline.j+this.g.currentTime)):this.g&&this.g.getStartDate?(e=this.g.getStartDate(),isNaN(e.getTime())?(ne.v("EXT-X-PROGRAM-DATETIME required to get playhead time as Date!"),null):new Date(e.getTime()+1e3*t)):(ne.v("No way to get playhead time as Date!"),null)},Gs.prototype.getPlayheadTimeAsDate=Gs.prototype.Ef,Gs.prototype.Gf=function(){if(!this.aa())return ne.v("getPresentationStartTimeAsDate is for live streams!"),null;if(this.i)return new Date(1e3*this.i.presentationTimeline.j);if(this.g&&this.g.getStartDate){var e=this.g.getStartDate();return isNaN(e.getTime())?(ne.v("EXT-X-PROGRAM-DATETIME required to get presentation start time as Date!"),null):e}return ne.v("No way to get presentation start time as Date!"),null},Gs.prototype.getPresentationStartTimeAsDate=Gs.prototype.Gf,Gs.prototype.bd=function(){var e={total:[],audio:[],video:[],text:[]};return this.o==Du&&(e.total=an(this.g.buffered)),this.o==Lu&&this.M.bd(e),e},Gs.prototype.getBufferedInfo=Gs.prototype.bd,Gs.prototype.getStats=function(){if(this.o!=Lu&&this.o!=Du)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,switchHistory:[],stateHistory:[]};lu(this);var e=this.g;if(e.getVideoPlaybackQuality){e=e.getVideoPlaybackQuality();var t=this.F,n=Number(e.totalVideoFrames);t.A=Number(e.droppedVideoFrames),t.u=n,this.F.o=Number(e.corruptedVideoFrames)}e=this.m&&(e=this.m).P?e.P:NaN,this.F.m=e,this.o==Lu&&((e=Ru(this))&&(this.F.C=e.bandwidth),e&&e.video&&(t=this.F,n=e.video.height||NaN,t.F=e.video.width||NaN,t.l=n),e=this.u.getBandwidthEstimate(),this.F.j=e);var r=this.F;e=r.F,t=r.l,n=r.C;for(var i=r.u,a=r.A,o=r.o,s=r.j,u=r.h,c=Vs(r.g,"playing"),l=Vs(r.g,"paused"),f=Vs(r.g,"buffering"),h=r.m,d=function(e){function t(e){return{timestamp:e.timestamp,state:e.state,duration:e.duration}}for(var n=[],r=w(e.h),i=r.next();!i.done;i=r.next())n.push(t(i.value));return e.g&&n.push(t(e.g)),n}(r.g),p=[],g=(r=w(r.i.g)).next();!g.done;g=r.next())g=g.value,p.push({timestamp:g.timestamp,id:g.id,type:g.type,fromAdaptation:g.fromAdaptation,bandwidth:g.bandwidth});return{width:e,height:t,streamBandwidth:n,decodedFrames:i,droppedFrames:a,corruptedFrames:o,estimatedBandwidth:s,loadLatency:u,playTime:c,pauseTime:l,bufferingTime:f,licenseTime:h,stateHistory:d,switchHistory:p}},Gs.prototype.getStats=Gs.prototype.getStats,Gs.prototype.addTextTrack=function(e,t,n,r,i,a){var o=this;return T((function s(){var u,c,l,f,h,d,p,g,v;return z(s,(function(s){var m,y;switch(s.s){case 1:if(o.o==Du)throw ne.error("Cannot add text when loaded with src="),Error("State error!");if(o.o!=Lu)throw ne.error("Must call load() and wait for it to resolve before adding text tracks."),Error("State error!");if(u=Cu(o),c=Se,l=Hh(m=o.i.periods).call(m,u),h=(f=l+1)>=o.i.periods.length?o.i.presentationTimeline.ha():o.i.periods[f].startTime,1/0==(d=h-u.startTime))throw new re(1,4,4033);return p=new fi(1,0,d,(function(){return[e]}),0,null),g={id:o.re++,originalId:null,createSegmentIndex:Pw(y=Zy.resolve).call(y,Zy),findSegmentPosition:function(){return 1},getSegmentReference:function(e){return 1==e?p:null},initSegmentReference:null,presentationTimeOffset:0,mimeType:r,codecs:i||"",kind:n,encrypted:!1,keyId:null,language:t,label:a||null,type:c.za,primary:!1,frameRate:void 0,pixelAspectRatio:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null},o.lc.add(g),u.textStreams.push(g),N(s,To(o.j,g),2);case 2:return(v=So(o.j,"text"))&&Ma(o.Z,u,v),o.lc.delete(g),ne.debug("Choosing new streams after adding a text stream"),hu(o,u),gu(o),s.return(Xn.Kc(g))}}))}))},Gs.prototype.addTextTrack=Gs.prototype.addTextTrack,Gs.prototype.Nd=function(e,t){this.mc.width=e,this.mc.height=t},Gs.prototype.setMaxHardwareResolution=Gs.prototype.Nd,Gs.prototype.Id=function(){if(this.o==Lu){var e=this.j;if(e.j)ne.error("Unable to retry after StreamingEngine is destroyed!"),e=!1;else if(e.A)ne.error("Unable to retry after StreamingEngine encountered a fatal error!"),e=!1;else{for(var t=w(OP(r=e.h).call(r)),n=t.next();!n.done;n=t.next()){var r,i=Go(n=n.value);n.ac&&(ne.info(i,"Retrying after failure..."),n.ac=!1,Ho(e,n,.1))}e=!0}}else e=!1;return e},Gs.prototype.retryStreaming=Gs.prototype.Id,Gs.prototype.uf=function(){return this.i},Gs.prototype.getManifest=Gs.prototype.uf,Gs.prototype.vf=function(){return this.C?this.C.constructor:null},Gs.prototype.getManifestParserFactory=Gs.prototype.vf,(f=Gs.prototype).Xc=function(e){var t=this.j?bo(this.j):null,n=this.j?wo(this.j):null;if(Xn.filterNewPeriod(this.m,t,n,e),t=e.variants,!hS(t).call(t,Xn.Gb))throw new re(2,4,4011);if(xu(this,e.variants),Xn.Xd(t,this.h.restrictions,this.mc)&&this.j&&Cu(this)==e&&gu(this),(e=this.m?this.m.g:null)&&this.m.o)for(n=(t=w(t)).next();!n.done;n=t.next())for(var r=(n=w(n.value.drmInfos)).next();!r.done;r=n.next())if((r=r.value).keySystem==e.keySystem)for(var i=(r=w(r.initData||[])).next();!i.done;i=r.next())i=i.value,_t(this.m,i.initDataType,i.initData)},f.Vf=function(e){ne.debug("onChooseStreams_",e);try{var t,n;ne.O("onChooseStreams_, choosing variant from ",e.variants),ne.O("onChooseStreams_, choosing text from ",e.textStreams),this.yb=!0,this.u.disable(),bu(this),ne.debug("Choosing new streams after period changed");var r=fu(this,e.variants),i=Xn.Wb(e.textStreams,this.ua,this.Xa)[0]||null;this.wa&&(SM(t=e.variants).call(t,this.wa)&&(r=this.wa),this.wa=null),this.va&&(SM(n=e.textStreams).call(n,this.va)&&(i=this.va),this.va=null),r&&nu(this,e,r,!0),i&&ru(this,e,i,!0);var a=this.j,o=a.h.get("video");if(o)var s=a.i.periods[o.oa];else{var u=a.h.get("audio");s=u?a.i.periods[u.oa]:null}var c=r?r.audio:null;if(!s&&i){var l;if(l=c){e=i;var f=zn(this.h.preferredTextLanguage),h=zn(c.language),d=zn(e.language);l=Hn(d,f)&&!Hn(h,d)}l&&(this.ub=!0),this.ub&&this.M.l.setTextVisibility(!0),yu(this)}var p=this.h.streaming.alwaysStreamText||this.zc()?{variant:r,text:i}:{variant:r,text:null};return ne.O("onChooseStreams_, chose variant ",p.variant),ne.O("onChooseStreams_, chose text ",p.text),p}catch(g){return this.Va(g),{variant:null,text:null}}},f.Ze=function(){ne.debug("canSwitch_"),this.yb=!1,this.h.abr.enabled&&(this.u.enable(),bu(this)),this.wa&&(xo(this.j,this.wa,this.qe,this.oe),vu(this),this.wa=null),this.va&&(ko(this.j,this.va,!0,0,!1),mu(this),this.va=null)},f.$f=function(){this.C&&this.C.update&&this.C.update()},f.eg=function(){this.A&&this.A.C()},f.Va=function(e){if(this.o!=Ou){var t=new qe("error",{detail:e});this.dispatchEvent(t),t.defaultPrevented&&(e.handled=!0)}};var Ou=0,_u=1,Lu=2,Du=3;function Uu(e,t){var n=Es(new Ts(e.Ea(),e.ja()),t.periods[0],new Ri(null,0)),r=t.appMetadata||{};return n=Fu(n),{offlineUri:e.toString(),originalManifestUri:t.originalManifestUri,duration:t.duration,size:t.size,expiration:t.expiration,tracks:n,appMetadata:r}}function Fu(e){for(var t=[],n=Xn.Bf(e.variants),r=(n=w(n)).next();!r.done;r=n.next())t.push(Xn.Oc(r.value));for(n=(e=w(e.textStreams)).next();!n.done;n=e.next())t.push(Xn.Kc(n.value));return t}function Ku(){this.g={}}function Bu(e,t){var n=t.audio,r=t.video;if(n&&!r&&(e.g[n.id]=n.bandwidth||t.bandwidth),!n&&r&&(e.g[r.id]=r.bandwidth||t.bandwidth),n&&r){var i=n.bandwidth||393216,a=r.bandwidth||t.bandwidth-i;0>=a&&(ne.v("Audio bit rate consumes variants bandwidth. Setting video bandwidth to match variant's bandwidth."),a=t.bandwidth),e.g[n.id]=i,e.g[r.id]=a}}function Hu(e,t){var n=e.g[t];return null==n&&(n=0,ne.error("Asking for bitrate of stream not given to the estimator")),0==n&&ne.v("Using bitrate of 0, this stream won't affect progress"),n}function Vu(e){this.g=!1,this.h=new Ee,this.i=e}function zu(e){var t,n=new Gu;Gf(t=e.periods).call(t,(function(e,t){var r=Xu(e.variants);if(0==t)for(var i=(r=w(r.g)).next();!i.done;i=r.next())n.add(i.value);else!function(e,t){var n;e.g=Hb(n=e.g).call(n,(function(e){return Wu(t,e)}))}(n,r)}));for(var r=(e=w(e.periods)).next();!r.done;r=e.next()){var i;(r=r.value).variants=Hb(i=r.variants).call(i,(function(e){return Wu(n,new qu(e))}))}}function qu(e){var t=e.audio;e=e.video,this.h=t?t.mimeType:null,this.g=t?t.codecs.split(".")[0]:null,this.j=e?e.mimeType:null,this.i=e?e.codecs.split(".")[0]:null}function Gu(){this.g=[]}function Wu(e,t){var n;return hS(n=e.g).call(n,(function(e){return t.h==e.h&&t.g==e.g&&t.j==e.j&&t.i==e.i}))}function Xu(e){for(var t=new Gu,n=(e=w(e)).next();!n.done;n=e.next())t.add(new qu(n.value));return t}function Yu(e){var t=this;if(e&&e.constructor!=Gs)throw new re(2,9,9008);this.h=this.g=null,e?(this.g=e.h,this.h=e.Yb()):(this.g=Fs(),this.h=new et),this.j=!1,this.i=[],this.l=[];var n=!e;this.m=new Vu((function(){return T((function e(){var r;return z(e,(function(e){var i;switch(e.s){case 1:return r=function(){},N(e,Zy.all(Mb(i=t.l).call(i,(function(e){return e.then(r,r)}))),2);case 2:if(!n){e.I(3);break}return N(e,t.h.destroy(),3);case 3:t.g=null,t.h=null,j(e)}}))}))}))}function $u(){if(St())e:{for(var e=w(OP(hs).call(hs)),t=e.next();!t.done;t=e.next())if(t=(t=t.value)()){t.destroy(),e=!0;break e}e=!1}else e=!1;return e}function Ju(e,t){for(var n=[],r=w(e.periods),i=r.next();!i.done;i=r.next())for(var a=(i=w(i.value.streams)).next();!a.done;a=i.next())a=a.value,t&&"video"==a.contentType?n.push({contentType:mt(a.mimeType,a.codecs),robustness:e.drmInfo.videoRobustness}):t||"audio"!=a.contentType||n.push({contentType:mt(a.mimeType,a.codecs),robustness:e.drmInfo.audioRobustness});return n}function Qu(e,t,n){return T((function r(){return z(r,(function(r){if(1===r.s)return N(r,function(e,t,n,r){return T((function i(){var a,o,s;return z(i,(function(i){var u;switch(i.s){case 1:return r.drmInfo?(a=function(e){var t,n=Yw(Lb(t=e.g).call(t));if(!n.length)throw new re(2,9,9e3,"No supported storage mechanisms found");return e.g.get(n[0]).getEmeSessionCell()}(n),o=Mb(u=r.sessionIds).call(u,(function(e){return{sessionId:e,keySystem:r.drmInfo.keySystem,licenseUri:r.drmInfo.licenseServerUri,serverCertificate:r.drmInfo.serverCertificate,audioCapabilities:Ju(r,!1),videoCapabilities:Ju(r,!0)}})),N(i,Is(t,e,o),2)):i.return();case 2:return s=i.B,N(i,a.remove(s),3);case 3:return N(i,a.add(Hb(o).call(o,(function(e){return-1==Hh(s).call(s,e.sessionId)}))),0)}}))}))}(e.h,e.g.drm,n,t),0)}))}))}function Zu(e,t,n,r){function i(){s+=1,e.g.offline.progressCallback(u,s/o)}var a=function(e){var t,n=[];return Gf(t=e.periods).call(t,(function(e){var t;Gf(t=e.streams).call(t,(function(e){var t;null!=e.initSegmentKey&&n.push(e.initSegmentKey),Gf(t=e.segments).call(t,(function(e){n.push(e.dataKey)}))}))})),n}(r),o=a.length+1,s=0,u=Uu(n,r);return Zy.all([t.removeSegments(a,i),t.removeManifests([n.key()],i)])}function ec(e,t,n,r,i,a){var o={id:a.id,originalId:a.originalId,primary:a.primary,presentationTimeOffset:a.presentationTimeOffset||0,contentType:a.type,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,kind:a.kind,language:a.language,label:a.label,width:a.width||null,height:a.height||null,initSegmentKey:null,encrypted:a.encrypted,keyId:a.keyId,segments:[],variantIds:[]};i=i.presentationTimeline.$b();var s=a.id,u=a.initSegmentReference;return u&&(u=Pi(u.i(),u.h,u.g,e.g.streaming.retryParameters),Qo(t,s,u,.5*Hu(r,a.id),!0,(function(t){return T((function r(){var i;return z(r,(function(r){switch(r.s){case 1:return N(r,n.addSegments([{data:t}]),2);case 2:i=r.B,e.i.push(i[0]),o.initSegmentKey=i[0],j(r)}}))}))}))),function(e,t,n){for(var r=null==(t=e.findSegmentPosition(t))?null:e.getSegmentReference(t);r;)n(r),r=e.getSegmentReference(++t)}(a,i,(function(i){var u=Pi(i.i(),i.h,i.g,e.g.streaming.retryParameters);Qo(t,s,u,function(e,t,n){return n=n.endTime-n.startTime,Hu(e,t)*n}(r,a.id,i),!1,(function(t){return T((function r(){var a;return z(r,(function(r){switch(r.s){case 1:return N(r,n.addSegments([{data:t}]),2);case 2:a=r.B,e.i.push(a[0]),o.segments.push({startTime:i.startTime,endTime:i.endTime,dataKey:a[0]}),j(r)}}))}))}))})),o}function tc(e){if(e.m.g)throw new re(2,9,7001)}function nc(){if(!$u())throw new re(2,9,9e3)}function rc(e,t){return T((function n(){return z(n,(function(n){switch(n.s){case 1:return e.l.push(t),_(n,2),N(n,t,4);case 4:return n.return(n.B);case 2:U(n),$e(e.l,t),F(n,0)}}))}))}function ic(e){var t,n,r=new $O(Mb(t=e.variants).call(t,(function(e){return e.video}))),i=new $O(Mb(n=e.variants).call(n,(function(e){return e.audio})));e=e.textStreams,1<r.size&&ne.v("Multiple video tracks selected to be stored");for(var a=(r=w(i)).next();!a.done;a=r.next()){a=a.value;for(var o=w(i),s=o.next();!s.done;s=o.next())a!=(s=s.value)&&a.language==s.language&&ne.v("Similar audio tracks were selected to be stored",a.id,s.id)}for(r=(i=w(e)).next();!r.done;r=i.next())for(r=r.value,o=(a=w(e)).next();!o.done;o=a.next())r!=(o=o.value)&&r.language==o.language&&ne.v("Similar text tracks were selected to be stored",r.id,o.id)}Gs.LoadMode={DESTROYED:Ou,NOT_LOADED:_u,MEDIA_SOURCE:Lu,SRC_EQUALS:Du},Vu.prototype.destroy=function(){var e=this;return this.g?this.h:(this.g=!0,this.i().then((function(){e.h.resolve()}),(function(){e.h.resolve()})))},Gu.prototype.add=function(e){Wu(this,e)||this.g.push(e)},$("shaka.offline.Storage",Yu),Yu.support=$u,Yu.prototype.destroy=function(){return this.m.destroy()},Yu.prototype.destroy=Yu.prototype.destroy,Yu.prototype.configure=function(e,t){2==arguments.length&&"string"==typeof e&&(e=Ds(e,t));var n=e,r=!1;return null!=n.trackSelectionCallback&&(r=!0,n.offline=n.offline||{},n.offline.trackSelectionCallback=n.trackSelectionCallback,delete n.trackSelectionCallback),null!=n.progressCallback&&(r=!0,n.offline=n.offline||{},n.offline.progressCallback=n.progressCallback,delete n.progressCallback),null!=n.usePersistentLicense&&(r=!0,n.offline=n.offline||{},n.offline.usePersistentLicense=n.usePersistentLicense,delete n.usePersistentLicense),r&&Qn("Storage.configure with OfflineConfig","Please configure storage with a player configuration."),Ks(this.g,e)},Yu.prototype.configure=Yu.prototype.configure,Yu.prototype.getConfiguration=function(){var e=Fs();return Ks(e,this.g,Fs()),e},Yu.prototype.getConfiguration=Yu.prototype.getConfiguration,Yu.prototype.Yb=function(){return this.h},Yu.prototype.getNetworkingEngine=Yu.prototype.Yb,Yu.prototype.store=function(e,t,n){var r=this;return rc(this,function(e,t,n,r){return T((function i(){var a,o,s,u,c,l,f,h,d;return z(i,(function(i){switch(i.s){case 1:return nc(),e.j?i.return(Zy.reject(new re(2,9,9006))):(e.j=!0,N(i,function(e,t,n){return T((function r(){var i,a,o,s,u,c;return z(r,(function(r){switch(r.s){case 1:return i=null,a=e.h,o={networkingEngine:a,filterAllPeriods:function(){},filterNewPeriod:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(e){i=e}},N(r,n(),2);case 2:return(s=r.B).configure(e.g.manifest),tc(e),_(r,3),N(r,s.start(t,o),5);case 5:return u=r.B,tc(e),c=function(e){for(var t=new $O,n=(e=w(e.periods)).next();!n.done;n=e.next()){for(var r=w((n=n.value).textStreams),i=r.next();!i.done;i=r.next())t.add(i.value);for(r=(n=w(n.variants)).next();!r.done;r=n.next())(r=r.value).audio&&t.add(r.audio),r.video&&t.add(r.video)}return t}(u),N(r,Zy.all(dt(c,(function(e){return e.createSegmentIndex()}))),6);case 6:if(tc(e),i)throw i;return r.return(u);case 3:return U(r),N(r,s.stop(),7);case 7:F(r,0)}}))}))}(e,t,r),2));case 2:if(a=i.B,tc(e),a.presentationTimeline.aa()||a.presentationTimeline.ib())throw new re(2,9,9005,t);return o=null,s=new cs,c=u=null,O(i,3,4),N(i,function(e,t,n){return T((function r(){var i,a,o;return z(r,(function(r){switch(r.s){case 1:return i=new Rt({Ib:e.h,onError:n,Dc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),a=Wa(t.periods),o=e.g,i.configure(o.drm),N(r,function(e,t,n){return e.F=[],e.L=n,Nt(e,t)}(i,a,o.offline.usePersistentLicense),2);case 2:return N(r,jt(i),3);case 3:return N(r,Ot(i),4);case 4:return r.return(i)}}))}))}(e,a,(function(e){c=c||e})),6);case 6:if(o=i.B,tc(e),c)throw c;return N(i,function(e,t,n){return T((function r(){var i,a;return z(r,(function(r){switch(r.s){case 1:return i={width:1/0,height:1/0},function(e,t,n){for(var r=(e=w(e.periods)).next();!r.done;r=e.next()){var i;(r=r.value).variants=Hb(i=r.variants).call(i,(function(e){return Xn.rd(e,t,n)}))}}(t,e.g.restrictions,i),function(e){for(var t=(e=w(e.periods)).next();!t.done;t=e.next()){var n;(t=t.value).variants=Hb(n=t.variants).call(n,(function(e){var t=!0;return e.audio&&(t=t&&Rn(e.audio)),e.video&&(t=t&&Rn(e.video)),t}))}}(t),function(e,t){for(var n=w(e.periods),r=n.next();!r.done;r=n.next()){var i;(r=r.value).variants=Hb(i=r.variants).call(i,(function(e){return qt(t,e)}))}}(t,n),zu(t),a=e.g.preferredAudioChannelCount,Xn.$d(t,a),N(r,function(e,t){return T((function n(){var r,i,a,o;return z(n,(function(n){var s;switch(n.s){case 1:r=null,i=w(e.periods),a=i.next();case 2:if(a.done){n.I(0);break}return o=a.value,r&&(o.variants=Hb(s=o.variants).call(s,(function(e){return Wu(r,new qu(e))}))),N(n,t(o),5);case 5:r=Xu(o.variants),a=i.next(),n.I(2)}}))}))}(t,(function(t){return T((function n(){var r,i,a,o,s,u,c,l;return z(n,(function(n){var f,h;switch(n.s){case 1:r=Xn,i=[];for(var d=w(t.variants),p=d.next();!p.done;p=d.next())a=p.value,i.push(r.Oc(a));for(p=(d=w(t.textStreams)).next();!p.done;p=d.next())o=p.value,i.push(r.Kc(o));return N(n,e.g.offline.trackSelectionCallback(i),2);case 2:for(s=n.B,u=new $O,c=new $O,p=(d=w(s)).next();!p.done;p=d.next())"variant"==(l=p.value).type&&u.add(l.id),"text"==l.type&&c.add(l.id);t.variants=Hb(f=t.variants).call(f,(function(e){return u.has(e.id)})),t.textStreams=Hb(h=t.textStreams).call(h,(function(e){return c.has(e.id)})),j(n)}}))}))})),2);case 2:(function(e){if(0==e.periods.length)throw new re(2,4,4014);for(var t=(e=w(e.periods)).next();!t.done;t=e.next())ic(t.value)})(t),j(r)}}))}))}(e,a,o),7);case 7:return N(i,s.init(),8);case 8:return tc(e),N(i,function(e){var t,n=null;if(Gf(t=e.g).call(t,(function(e,t){var r;Gf(r=e.getCells()).call(r,(function(e,r){e.hasFixedKeySpace()||n||(n={path:{Ea:t,ja:r},ja:e})}))})),n)return n;throw new re(2,9,9013,"Could not find a cell that supports add-operations")}(s),9);case 9:return u=i.B,tc(e),N(i,function(e,t,n,r,i,a){return T((function o(){var s,u,c,l,f,h,d,p,g,v;return z(o,(function(o){var m,y;switch(o.s){case 1:return s=function(e,t,n){var r=null==t.expiration?1/0:t.expiration;return{offlineUri:null,originalManifestUri:e,duration:t.presentationTimeline.ha(),size:0,expiration:r,tracks:t=Fu(t.periods[0]),appMetadata:n}}(i,r,a),u=hS(m=r.periods).call(m,(function(e){var t;return hS(t=e.variants).call(t,(function(e){return e.drmInfos&&e.drmInfos.length}))})),c=hS(y=r.periods).call(y,(function(e){var t;return hS(t=e.variants).call(t,(function(e){var t;return hS(t=e.drmInfos).call(t,(function(e){return e.initData&&e.initData.length}))}))})),f=null,(l=u&&!c)&&(h=n.g,f=ac.get(h.keySystem)),d=new Jo(e.h,(function(t,n){s.size=n,e.g.offline.progressCallback(s,t)}),(function(t,r){l&&e.g.offline.usePersistentLicense&&f==r&&_t(n,"cenc",t)})),_(o,2),g=p=function(e,t,n,r,i,a,o){var s,u=new Ku,c=Mb(s=i.periods).call(s,(function(r){return function(e,t,n,r,i,a){for(var o,s=w(a.variants),u=s.next();!u.done;u=s.next())Bu(r,u.value);for(s=w(a.textStreams),u=s.next();!u.done;u=s.next())r.g[u.value.id]=52;s=function(e){for(var t=new $O,n=w(e.textStreams),r=n.next();!r.done;r=n.next())t.add(r.value);for(e=w(e.variants),n=e.next();!n.done;n=e.next())(n=n.value).audio&&t.add(n.audio),n.video&&t.add(n.video);return t}(a);var c=new AP;for(s=w(s),u=s.next();!u.done;u=s.next()){var l=ec(e,t,n,r,i,u=u.value);c.set(u.id,l)}return Gf(o=a.variants).call(o,(function(e){e.audio&&c.get(e.audio.id).variantIds.push(e.id),e.video&&c.get(e.video.id).variantIds.push(e.id)})),{startTime:a.startTime,streams:Yw(OP(c).call(c))}}(e,t,n,u,i,r)})),l=r.g,f=e.g.offline.usePersistentLicense;return l&&f&&(l.initData=[]),{originalManifestUri:a,duration:i.presentationTimeline.ha(),size:0,expiration:r.Xb(),periods:c,sessionIds:f?Ut(r):[],drmInfo:l,appMetadata:o}}(e,d,t,n,r,i,a),N(o,function(e){return T((function t(){return z(t,(function(t){var n;switch(t.s){case 1:return N(t,Zy.all(OP(n=e.h).call(n)),2);case 2:return t.return(e.g.g)}}))}))}(d),4);case 4:if(g.size=o.B,p.expiration=n.Xb(),v=Ut(n),p.sessionIds=e.g.offline.usePersistentLicense?v:[],u&&e.g.offline.usePersistentLicense&&!v.length)throw new re(2,9,9007);return o.return(p);case 2:return U(o),N(o,d.destroy(),5);case 5:F(o,0)}}))}))}(e,u.ja,o,a,t,n),10);case 10:if(l=i.B,tc(e),c)throw c;return N(i,u.ja.addManifests([l]),11);case 11:return f=i.B,tc(e),h=new ws("manifest",u.path.Ea,u.path.ja,f[0]),i.return(Uu(h,l));case 4:return U(i),e.j=!1,e.i=[],N(i,s.destroy(),12);case 12:if(!o){i.I(13);break}return N(i,o.destroy(),13);case 13:F(i,0);break;case 3:if(d=D(i),!u){i.I(15);break}return N(i,u.ja.removeSegments(e.i,(function(){})),15);case 15:throw c||d}}))}))}(this,e,t||{},(function(){return T((function t(){var i,a;return z(t,(function(t){switch(t.s){case 1:return n&&"string"!=typeof n?(Qn("Storing with a manifest parser factory","Please register a manifest parser and for the mime-type."),i=n,t.return(new i)):N(t,Ci.create(e,r.h,r.g.manifest.retryParameters,n),2);case 2:return a=t.B,t.return(a)}}))}))})))},Yu.prototype.store=Yu.prototype.store,Yu.prototype.Hf=function(){return this.j},Yu.prototype.getStoreInProgress=Yu.prototype.Hf,Yu.prototype.remove=function(e){return rc(this,function(e,t){return T((function n(){var r,i,a,o,s,u;return z(n,(function(n){switch(n.s){case 1:return nc(),null==(r=Ss(t))||"manifest"!=r.g?n.return(Zy.reject(new re(2,9,9004,t))):(i=r,a=new cs,_(n,2),N(n,a.init(),4));case 4:return N(n,ls(a,i.Ea(),i.ja()),5);case 5:return N(n,(o=n.B).getManifests([i.key()]),6);case 6:return s=n.B,u=s[0],N(n,Zy.all([Qu(e,u,a),Zu(e,o,i,u)]),2);case 2:return U(n),N(n,a.destroy(),8);case 8:F(n,0)}}))}))}(this,e))},Yu.prototype.remove=Yu.prototype.remove,Yu.prototype.sg=function(){return rc(this,function(e){return T((function t(){var n,r,i,a,o,s,u,c,l;return z(t,(function(t){switch(t.s){case 1:return nc(),n=e.h,r=e.g.drm,i=new cs,a=!1,_(t,2),N(t,i.init(),4);case 4:for(o=[],function(e,t){var n;Gf(n=e.g).call(n,(function(e){t(e.getEmeSessionCell())}))}(i,(function(e){return o.push(e)})),s=Zy.resolve(),u={},c=w(o),l=c.next();!l.done;u={Jc:u.Jc},l=c.next())u.Jc=l.value,s=s.then(function(e){return function(){return T((function t(){var i,o;return z(t,(function(t){switch(t.s){case 1:return N(t,e.Jc.getAll(),2);case 2:return i=t.B,N(t,Is(r,n,i),3);case 3:return o=t.B,N(t,e.Jc.remove(o),4);case 4:o.length!=i.length&&(a=!0),j(t)}}))}))}}(u));return N(t,s,2);case 2:return U(t),N(t,i.destroy(),6);case 6:F(t,3);break;case 3:return t.return(!a)}}))}))}(this))},Yu.prototype.removeEmeSessions=Yu.prototype.sg,Yu.prototype.list=function(){return rc(this,T((function e(){var t,n,r;return z(e,(function(e){switch(e.s){case 1:return nc(),t=[],n=new cs,_(e,2),N(e,n.init(),4);case 4:return r=Zy.resolve(),function(e,t){var n;Gf(n=e.g).call(n,(function(e,n){var r;Gf(r=e.getCells()).call(r,(function(e,r){t({Ea:n,ja:r},e)}))}))}(n,(function(e,n){r=r.then((function(){return T((function r(){var i;return z(r,(function(r){switch(r.s){case 1:return N(r,n.getAllManifests(),2);case 2:i=r.B,Gf(i).call(i,(function(n,r){var i=Uu(new ws("manifest",e.Ea,e.ja,r),n);t.push(i)})),j(r)}}))}))}))})),N(e,r,2);case 2:return U(e),N(e,n.destroy(),6);case 6:F(e,3);break;case 3:return e.return(t)}}))})))},Yu.prototype.list=Yu.prototype.list,Yu.deleteAll=function(){return T((function e(){var t;return z(e,(function(e){switch(e.s){case 1:return t=new cs,_(e,2),N(e,t.erase(),2);case 2:return U(e),N(e,t.destroy(),5);case 5:F(e,0)}}))}))};var ac=(new AP).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");Ys.offline=$u,$("shaka.polyfill.installAll",(function(){for(var e=0;e<uc.length;++e)try{uc[e].Xe()}catch(t){ne.ba("Error installing polyfill!",t)}}));var oc,sc,uc=[];function cc(e,t){for(var n={priority:t=t||0,Xe:e},r=0;r<uc.length;r++)if(uc[r].priority<t)return void Wd(uc).call(uc,r,0,n);uc.push(n)}function lc(e){var t=e.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();if("function"==typeof Event)var n=new Event(t,e);else(n=document.createEvent("Event")).initEvent(t,e.bubbles,e.cancelable);e.target.dispatchEvent(n)}function fc(e,t,n){"input"==e&&"range"===this.type&&(e="change"),HTMLInputElement.prototype.originalAddEventListener.call(this,e,t,n)}function hc(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(t){for(var n=[],r=0;r<arguments.length;++r)n[r]=arguments[r];return(n=e.apply(this,n)).abort=function(){},n}}function dc(e,t){ne.debug("PatchedMediaKeysApple.requestMediaKeySystemAccess");try{var n=new pc(e,t);return Zy.resolve(n)}catch(r){return Zy.reject(r)}}function pc(e,t){if(ne.debug("PatchedMediaKeysApple.MediaKeySystemAccess"),this.keySystem=e,oM(e).call(e,"com.apple.fps"))for(var n=w(t),r=n.next();!r.done;r=n.next()){var i=r.value;if("required"==i.persistentState)r=null;else{r={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:i.initDataTypes,sessionTypes:["temporary"],label:i.label};var a=!1,o=!1;if(i.audioCapabilities)for(var s=w(i.audioCapabilities),u=s.next();!u.done;u=s.next())if((u=u.value).contentType){a=!0;var c=u.contentType.split(";")[0];WebKitMediaKeys.isTypeSupported(this.keySystem,c)&&(r.audioCapabilities.push(u),o=!0)}if(i.videoCapabilities)for(u=(i=w(i.videoCapabilities)).next();!u.done;u=i.next())(s=u.value).contentType&&(a=!0,u=s.contentType.split(";")[0],WebKitMediaKeys.isTypeSupported(this.keySystem,u)&&(r.videoCapabilities.push(s),o=!0));a||(o=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),r=o?r:null}if(r)return void(this.g=r)}throw(n=Error("Unsupported keySystem")).name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n}function gc(e){ne.debug("PatchedMediaKeysApple.setMediaKeys");var t=this.mediaKeys;return t&&t!=e&&mc(t,null),delete this.mediaKeys,(this.mediaKeys=e)?mc(e,this):Zy.resolve()}function vc(e){ne.debug("PatchedMediaKeysApple.MediaKeys"),this.h=new WebKitMediaKeys(e),this.g=new ut}function mc(e,t){if(e.g.nb(),!t)return Zy.resolve();e.g.H(t,"webkitneedkey",bc);try{return Qa(t,HTMLMediaElement.HAVE_METADATA,e.g,(function(){t.webkitSetMediaKeys(e.h)})),Zy.resolve()}catch(n){return Zy.reject(n)}}function yc(e){ne.debug("PatchedMediaKeysApple.MediaKeySession"),We.call(this),this.h=null,this.l=e,this.i=this.g=null,this.j=new ut,this.sessionId="",this.expiration=NaN,this.closed=new Ee,this.keyStatuses=new Sc}function bc(e){if(ne.debug("PatchedMediaKeysApple.onWebkitNeedKey_",e),e=new Uint8Array(e.initData),new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(0,!0)+4!=e.byteLength)throw new RangeError("Malformed FairPlay init data");e=Me(e=ke(e.subarray(4),!0));var t=new Event("encrypted");t.initDataType="skd",t.initData=e,this.dispatchEvent(t)}function wc(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,e.dispatchEvent(new qe("keystatuseschange"))}function Sc(){this.size=0,this.g=void 0}function Tc(e,t){ne.debug("PatchedMediaKeysMs.requestMediaKeySystemAccess");try{var n=new Ec(e,t);return Zy.resolve(n)}catch(r){return Zy.reject(r)}}function Ec(e,t){ne.debug("PatchedMediaKeysMs.MediaKeySystemAccess"),this.keySystem=e;for(var n=!1,r=0;r<t.length;++r){var i=t[r],a={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:i.initDataTypes,sessionTypes:["temporary"],label:i.label},o=!1;if(i.audioCapabilities)for(var s=0;s<i.audioCapabilities.length;++s){var u=i.audioCapabilities[s];if(u.contentType){o=!0;var c=u.contentType.split(";")[0];MSMediaKeys.isTypeSupported(this.keySystem,c)&&(a.audioCapabilities.push(u),n=!0)}}if(i.videoCapabilities)for(s=0;s<i.videoCapabilities.length;++s)(u=i.videoCapabilities[s]).contentType&&(o=!0,c=u.contentType.split(";")[0],MSMediaKeys.isTypeSupported(this.keySystem,c)&&(a.videoCapabilities.push(u),n=!0));if(o||(n=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),"required"==i.persistentState&&(n=!1),n)return void(this.g=a)}throw(n=Error("Unsupported keySystem")).name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n}function xc(e){ne.debug("PatchedMediaKeysMs.setMediaKeys");var t=this.mediaKeys;return t&&t!=e&&Ac(t,null),delete this.mediaKeys,(this.mediaKeys=e)?Ac(e,this):Zy.resolve()}function kc(e){ne.debug("PatchedMediaKeysMs.MediaKeys"),this.h=new MSMediaKeys(e),this.g=new ut}function Ac(e,t){if(e.g.nb(),!t)return Zy.resolve();e.g.H(t,"msneedkey",Ic);try{return Qa(t,HTMLMediaElement.HAVE_METADATA,e.g,(function(){t.msSetMediaKeys(e.h)})),Zy.resolve()}catch(n){return Zy.reject(n)}}function Mc(e){ne.debug("PatchedMediaKeysMs.MediaKeySession"),We.call(this),this.i=null,this.l=e,this.h=this.g=null,this.j=new ut,this.sessionId="",this.expiration=NaN,this.closed=new Ee,this.keyStatuses=new Rc}function Ic(e){if(ne.debug("PatchedMediaKeysMs.onMsNeedKey_",e),e.initData){var t=document.createEvent("CustomEvent");t.initCustomEvent("encrypted",!1,!1,null),t.initDataType="cenc",t.initData=function(e){if(!e)return e;var t=new Qr(e);if(1>=t.data.length)return e;e=[];for(var n={},r=(t=w(t.data)).next();!r.done;n={yc:n.yc},r=t.next())n.yc=r.value,hS(e).call(e,function(e){return function(t){return Pe.Ha(t,e.yc)}}(n))||e.push(n.yc);return nd(Pe).apply(Pe,e instanceof Array?e:function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(w(e)))}(e.initData).buffer,this.dispatchEvent(t)}}function Cc(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,e.dispatchEvent(new qe("keystatuseschange"))}function Rc(){this.size=0,this.g=void 0}function Pc(){return ne.debug("PatchedMediaKeysNop.requestMediaKeySystemAccess"),Zy.reject(Error("The key system specified is not supported."))}function Nc(e){return ne.debug("PatchedMediaKeysNop.setMediaKeys"),null==e?Zy.resolve():Zy.reject(Error("MediaKeys not supported."))}function jc(){throw new TypeError("Illegal constructor.")}function Oc(){throw new TypeError("Illegal constructor.")}$("shaka.polyfill.register",cc),cc((function(){Yl()}),-1),cc((function(){if(e.Document){var t=Element.prototype;t.requestFullscreen=t.requestFullscreen||t.mozRequestFullScreen||t.msRequestFullscreen||t.webkitRequestFullscreen,(t=Document.prototype).exitFullscreen=t.exitFullscreen||t.mozCancelFullScreen||t.msExitFullscreen||t.webkitCancelFullScreen,"fullscreenElement"in document||(Aw(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),Aw(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}})),document.addEventListener("webkitfullscreenchange",lc),document.addEventListener("webkitfullscreenerror",lc),document.addEventListener("mozfullscreenchange",lc),document.addEventListener("mozfullscreenerror",lc),document.addEventListener("MSFullscreenChange",lc),document.addEventListener("MSFullscreenError",lc)}})),cc((function(){ne.debug("InputEvent.install"),At("Trident/")&&!HTMLInputElement.prototype.originalAddEventListener&&(ne.info("Patching input event support on IE."),HTMLInputElement.prototype.originalAddEventListener=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=fc)})),cc((function(){navigator.languages||Aw(navigator,"languages",{get:function(){return navigator.language?[navigator.language]:["en"]}})})),cc((function(){ne.debug("mathRound.install")})),cc((function(){ne.debug("MediaSource.install");var t=kt();e.MediaSource?e.cast&&cast.__platform__&&cast.__platform__.canDisplayType?(ne.info("Patching Chromecast MSE bugs."),function(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){var n=t.split(/ *; */);return n.shift(),hS(n).call(n,(function(e){return oM(e).call(e,"codecs=")}))?cast.__platform__.canDisplayType(t):e(t)}}()):t?(function(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){return"mp2t"!=t.split(/ *; */)[0].split("/")[1].toLowerCase()&&e(t)}}(),12>=t?(ne.info("Patching Safari 11 & 12 MSE bugs."),hc(),function(){var e=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(t,n){return e.call(this,t,n-.001)}}()):(ne.info("Patching Safari 13 MSE bugs."),hc())):At("Tizen 2")||At("Tizen 3")||At("Tizen 4")?function(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){return"opus"!=bt(t)[0]&&e(t)}}():ne.info("Using native MSE as-is."):ne.info("No MSE implementation available.")})),pc.prototype.createMediaKeys=function(){ne.debug("PatchedMediaKeysApple.MediaKeySystemAccess.createMediaKeys");var e=new vc(this.keySystem);return Zy.resolve(e)},pc.prototype.getConfiguration=function(){return ne.debug("PatchedMediaKeysApple.MediaKeySystemAccess.getConfiguration"),this.g},vc.prototype.createSession=function(e){if(ne.debug("PatchedMediaKeysApple.MediaKeys.createSession"),"temporary"!=(e=e||"temporary"))throw new TypeError("Session type "+e+" is unsupported on this platform.");return new yc(this.h)},vc.prototype.setServerCertificate=function(e){return ne.debug("PatchedMediaKeysApple.MediaKeys.setServerCertificate"),Zy.resolve(!0)},J(yc,We),(f=yc.prototype).generateRequest=function(e,t){ne.debug("PatchedMediaKeysApple.MediaKeySession.generateRequest"),this.g=new Ee;try{var n,r,i;this.h=this.l.createSession("video/mp4",new Uint8Array(t)),this.sessionId=this.h.sessionId||"",this.j.H(this.h,"webkitkeymessage",Pw(n=this.Gg).call(n,this)),this.j.H(this.h,"webkitkeyadded",Pw(r=this.Eg).call(r,this)),this.j.H(this.h,"webkitkeyerror",Pw(i=this.Fg).call(i,this)),wc(this,"status-pending")}catch(a){this.g.reject(a)}return this.g},f.load=function(){return ne.debug("PatchedMediaKeysApple.MediaKeySession.load"),Zy.reject(Error("MediaKeySession.load not yet supported"))},f.update=function(e){ne.debug("PatchedMediaKeysApple.MediaKeySession.update"),this.i=new Ee;try{this.h.update(new Uint8Array(e))}catch(t){this.i.reject(t)}return this.i},f.close=function(){ne.debug("PatchedMediaKeysApple.MediaKeySession.close");try{this.h.close(),this.closed.resolve(),this.j.nb()}catch(g){this.closed.reject(g)}return this.closed},f.remove=function(){return ne.debug("PatchedMediaKeysApple.MediaKeySession.remove"),Zy.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},f.Gg=function(e){ne.debug("PatchedMediaKeysApple.onWebkitKeyMessage_",e),this.g&&(this.g.resolve(),this.g=null),this.dispatchEvent(new qe("message",{messageType:null==this.keyStatuses.g?"license-request":"license-renewal",message:e.message.buffer}))},f.Eg=function(e){ne.debug("PatchedMediaKeysApple.onWebkitKeyAdded_",e),this.i&&(wc(this,"usable"),this.i.resolve(),this.i=null)},f.Fg=function(e){if(ne.debug("PatchedMediaKeysApple.onWebkitKeyError_",e),(e=Error("EME PatchedMediaKeysApple key error")).errorCode=this.h.error,null!=this.g)this.g.reject(e),this.g=null;else if(null!=this.i)this.i.reject(e),this.i=null;else switch(this.h.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:wc(this,"output-not-allowed");break;default:wc(this,"internal-error")}},(f=Sc.prototype).forEach=function(e){this.g&&e(this.g,oc)},f.get=function(e){if(this.has(e))return this.g},f.has=function(e){var t=oc;return!(!this.g||!Pe.Ha(new Uint8Array(e),new Uint8Array(t)))},f.entries=function(){},f.keys=function(){},f.values=function(){},cc((function(){e.HTMLVideoElement&&e.WebKitMediaKeys&&(ne.info("Using Apple-prefixed EME"),oc=new Uint8Array([0]).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=gc,e.MediaKeys=vc,e.MediaKeySystemAccess=pc,navigator.requestMediaKeySystemAccess=dc)})),Ec.prototype.createMediaKeys=function(){ne.debug("PatchedMediaKeysMs.MediaKeySystemAccess.createMediaKeys");var e=new kc(this.keySystem);return Zy.resolve(e)},Ec.prototype.getConfiguration=function(){return ne.debug("PatchedMediaKeysMs.MediaKeySystemAccess.getConfiguration"),this.g},kc.prototype.createSession=function(e){if(ne.debug("PatchedMediaKeysMs.MediaKeys.createSession"),"temporary"!=(e=e||"temporary"))throw new TypeError("Session type "+e+" is unsupported on this platform.");return new Mc(this.h)},kc.prototype.setServerCertificate=function(){return ne.debug("PatchedMediaKeysMs.MediaKeys.setServerCertificate"),Zy.resolve(!1)},J(Mc,We),(f=Mc.prototype).generateRequest=function(e,t){ne.debug("PatchedMediaKeysMs.MediaKeySession.generateRequest"),this.g=new Ee;try{var n,r,i;this.i=this.l.createSession("video/mp4",new Uint8Array(t),null),this.j.H(this.i,"mskeymessage",Pw(n=this.dg).call(n,this)),this.j.H(this.i,"mskeyadded",Pw(r=this.bg).call(r,this)),this.j.H(this.i,"mskeyerror",Pw(i=this.cg).call(i,this)),Cc(this,"status-pending")}catch(a){this.g.reject(a)}return this.g},f.load=function(){return ne.debug("PatchedMediaKeysMs.MediaKeySession.load"),Zy.reject(Error("MediaKeySession.load not yet supported"))},f.update=function(e){ne.debug("PatchedMediaKeysMs.MediaKeySession.update"),this.h=new Ee;try{this.i.update(new Uint8Array(e))}catch(t){this.h.reject(t)}return this.h},f.close=function(){ne.debug("PatchedMediaKeysMs.MediaKeySession.close");try{this.i.close(),this.closed.resolve(),this.j.nb()}catch(g){this.closed.reject(g)}return this.closed},f.remove=function(){return ne.debug("PatchedMediaKeysMs.MediaKeySession.remove"),Zy.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},f.dg=function(e){ne.debug("PatchedMediaKeysMs.onMsKeyMessage_",e),this.g&&(this.g.resolve(),this.g=null),this.dispatchEvent(new qe("message",{messageType:null==this.keyStatuses.g?"license-request":"license-renewal",message:e.message.buffer}))},f.bg=function(e){ne.debug("PatchedMediaKeysMs.onMsKeyAdded_",e),this.g?(ne.debug("Simulating completion for a PR persistent license."),Cc(this,"usable"),this.g.resolve(),this.g=null):this.h&&(Cc(this,"usable"),this.h.resolve(),this.h=null)},f.cg=function(e){if(ne.debug("PatchedMediaKeysMs.onMsKeyError_",e),(e=Error("EME PatchedMediaKeysMs key error")).errorCode=this.i.error,null!=this.g)this.g.reject(e),this.g=null;else if(null!=this.h)this.h.reject(e),this.h=null;else switch(this.i.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Cc(this,"output-not-allowed");break;default:Cc(this,"internal-error")}},(f=Rc.prototype).forEach=function(e){this.g&&e(this.g,sc)},f.get=function(e){if(this.has(e))return this.g},f.has=function(e){var t=sc;return!(!this.g||!Pe.Ha(new Uint8Array(e),new Uint8Array(t)))},f.entries=function(){},f.keys=function(){},f.values=function(){},cc((function(){!e.HTMLVideoElement||!e.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(ne.info("Using ms-prefixed EME v20140218"),sc=new Uint8Array([0]).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=xc,e.MediaKeys=kc,e.MediaKeySystemAccess=Ec,navigator.requestMediaKeySystemAccess=Tc)})),jc.prototype.createSession=function(){},jc.prototype.setServerCertificate=function(){},Oc.prototype.getConfiguration=function(){},Oc.prototype.createMediaKeys=function(){},cc((function(){!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(ne.info("EME not available."),navigator.requestMediaKeySystemAccess=Pc,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Nc,e.MediaKeys=jc,e.MediaKeySystemAccess=Oc)}),-10);var _c,Lc="";function Dc(e){return Lc?Lc+e.charAt(0).toUpperCase()+xd(e).call(e,1):e}function Uc(e,t){ne.debug("PatchedMediaKeysWebkit.requestMediaKeySystemAccess");try{var n=new Kc(e,t);return Zy.resolve(n)}catch(r){return Zy.reject(r)}}function Fc(e){ne.debug("PatchedMediaKeysWebkit.setMediaKeys");var t=this.mediaKeys;return t&&t!=e&&Hc(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&Hc(e,this),Zy.resolve()}function Kc(e,t){ne.debug("PatchedMediaKeysWebkit.MediaKeySystemAccess"),this.g=this.keySystem=e;var n=!1;"org.w3.clearkey"==e&&(this.g="webkit-org.w3.clearkey",n=!1);var r=!1,i=document.getElementsByTagName("video");i=i.length?i[0]:document.createElement("video");for(var a=0;a<t.length;++a){var o=t[a],s={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:o.initDataTypes,sessionTypes:["temporary"],label:o.label},u=!1;if(o.audioCapabilities)for(var c=0;c<o.audioCapabilities.length;++c){var l=o.audioCapabilities[c];if(l.contentType){u=!0;var f=l.contentType.split(";")[0];i.canPlayType(f,this.g)&&(s.audioCapabilities.push(l),r=!0)}}if(o.videoCapabilities)for(c=0;c<o.videoCapabilities.length;++c)(l=o.videoCapabilities[c]).contentType&&(u=!0,i.canPlayType(l.contentType,this.g)&&(s.videoCapabilities.push(l),r=!0));if(u||(r=i.canPlayType("video/mp4",this.g)||i.canPlayType("video/webm",this.g)),"required"==o.persistentState&&(n?(s.persistentState="required",s.sessionTypes=["persistent-license"]):r=!1),r)return void(this.h=s)}throw n="Unsupported keySystem","org.w3.clearkey"!=e&&"com.widevine.alpha"!=e||(n="None of the requested configurations were supported."),(n=Error(n)).name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n}function Bc(e){ne.debug("PatchedMediaKeysWebkit.MediaKeys"),this.l=e,this.h=null,this.g=new ut,this.i=[],this.j={}}function Hc(e,t){var n,r,i,a;e.h=t,e.g.nb();var o=Lc;t&&(e.g.H(t,o+"needkey",Pw(n=e.hg).call(n,e)),e.g.H(t,o+"keymessage",Pw(r=e.Jg).call(r,e)),e.g.H(t,o+"keyadded",Pw(i=e.Hg).call(i,e)),e.g.H(t,o+"keyerror",Pw(a=e.Ig).call(a,e)))}function Vc(e,t){var n=e.j[t];return n?(ne.debug("PatchedMediaKeysWebkit.MediaKeys.findSession_",n),n):(n=e.i.shift())?(n.sessionId=t,e.j[t]=n,ne.debug("PatchedMediaKeysWebkit.MediaKeys.findSession_",n),n):null}function zc(e,t,n){ne.debug("PatchedMediaKeysWebkit.MediaKeySession"),We.call(this),this.j=e,this.m=!1,this.g=this.h=null,this.i=t,this.l=n,this.sessionId="",this.expiration=NaN,this.closed=new Ee,this.keyStatuses=new Wc}function qc(e,t,n){if(e.m)return Zy.reject(Error("The session is already initialized."));e.m=!0;try{if("persistent-license"==e.l)if(n)var r=new Uint8Array(Me("LOAD_SESSION|"+n));else{var i=Me("PERSISTENT|"),a=new Uint8Array(i.byteLength+t.byteLength);a.set(new Uint8Array(i),0),a.set(new Uint8Array(t),i.byteLength),r=a}else r=new Uint8Array(t)}catch(s){return Zy.reject(s)}e.h=new Ee;var o=Dc("generateKeyRequest");try{e.j[o](e.i,r)}catch(s){if("InvalidStateError"!=s.name)return e.h=null,Zy.reject(s);new Le((function(){try{e.j[o](e.i,r)}catch(t){e.h.reject(t),e.h=null}})).V(.01)}return e.h}function Gc(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,e.dispatchEvent(new qe("keystatuseschange"))}function Wc(){this.size=0,this.g=void 0}function Xc(e){if("picture-in-picture"==(e=e.target).webkitPresentationMode){document.pictureInPictureElement=e;var t=new Event("enterpictureinpicture");e.dispatchEvent(t)}else document.pictureInPictureElement==e&&(document.pictureInPictureElement=null),t=new Event("leavepictureinpicture"),e.dispatchEvent(t)}function Yc(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Zy.resolve()):Zy.reject(Error("PiP not allowed by video element"))}function $c(){var e=document.pictureInPictureElement;return e?(e.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Zy.resolve()):Zy.reject(Error("No picture in picture element found"))}function Jc(){return!!this.hasAttribute("disablePictureInPicture")||!this.webkitSupportsPresentationMode("picture-in-picture")}function Qc(e){e?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}function Zc(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}function el(t,n,r){return new e.TextTrackCue(t,n,r)}function tl(t,n,r){return new e.TextTrackCue(t+"-"+n+"-"+r,t,n,r)}function nl(){}Kc.prototype.createMediaKeys=function(){ne.debug("PatchedMediaKeysWebkit.MediaKeySystemAccess.createMediaKeys");var e=new Bc(this.g);return Zy.resolve(e)},Kc.prototype.getConfiguration=function(){return ne.debug("PatchedMediaKeysWebkit.MediaKeySystemAccess.getConfiguration"),this.h},(f=Bc.prototype).createSession=function(e){if(ne.debug("PatchedMediaKeysWebkit.MediaKeys.createSession"),"temporary"!=(e=e||"temporary")&&"persistent-license"!=e)throw new TypeError("Session type "+e+" is unsupported on this platform.");var t=this.h||document.createElement("video");return t.src||(t.src="about:blank"),e=new zc(t,this.l,e),this.i.push(e),e},f.setServerCertificate=function(){return ne.debug("PatchedMediaKeysWebkit.MediaKeys.setServerCertificate"),Zy.resolve(!1)},f.hg=function(e){ne.debug("PatchedMediaKeysWebkit.onWebkitNeedKey_",e);var t=document.createEvent("CustomEvent");t.initCustomEvent("encrypted",!1,!1,null),t.initDataType="cenc",e.initData instanceof ArrayBuffer?t.initData=e.initData:t.initData=e.initData.buffer,this.h.dispatchEvent(t)},f.Jg=function(e){ne.debug("PatchedMediaKeysWebkit.onWebkitKeyMessage_",e);var t=Vc(this,e.sessionId);t?(e=new qe("message",{messageType:null==t.keyStatuses.g?"licenserequest":"licenserenewal",message:e.message}),ne.debug("PatchedMediaKeysWebkit.MediaKeySession.generated"),t.h&&(t.h.resolve(),t.h=null),t.dispatchEvent(e)):ne.error("Session not found",e.sessionId)},f.Hg=function(e){ne.debug("PatchedMediaKeysWebkit.onWebkitKeyAdded_",e),(e=Vc(this,e.sessionId))&&(ne.debug("PatchedMediaKeysWebkit.MediaKeySession.ready"),Gc(e,"usable"),e.g&&e.g.resolve(),e.g=null)},f.Ig=function(e){ne.debug("PatchedMediaKeysWebkit.onWebkitKeyError_",e);var t=Vc(this,e.sessionId);t&&t.handleError(e)},J(zc,We),(f=zc.prototype).handleError=function(e){ne.debug("PatchedMediaKeysWebkit.MediaKeySession.handleError",e);var t=Error("EME v0.1b key error"),n=e.errorCode;n.systemCode=e.systemCode,t.errorCode=n,!e.sessionId&&this.h?(45==e.systemCode&&(t.message="Unsupported session type."),this.h.reject(t),this.h=null):e.sessionId&&this.g?(this.g.reject(t),this.g=null):(t=e.systemCode,e.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Gc(this,"output-restricted"):Gc(this,1==t?"expired":"internal-error"))},f.Qd=function(e,t){var n,r;if(this.g)this.g.then(Pw(n=this.Qd).call(n,this,e,t)).catch(Pw(r=this.Qd).call(r,this,e,t));else{if(this.g=e,"webkit-org.w3.clearkey"==this.i){var i=xe(t),a=JSON.parse(i);"oct"!=Lb(a)[0].kty&&(this.g.reject(Error("Response is not a valid JSON Web Key Set.")),this.g=null),i=Pe.Ja(Lb(a)[0].k),a=Pe.Ja(Lb(a)[0].kid)}else i=new Uint8Array(t),a=null;var o=Dc("addKey");try{this.j[o](this.i,i,a,this.sessionId)}catch(s){this.g.reject(s),this.g=null}}},f.generateRequest=function(e,t){return ne.debug("PatchedMediaKeysWebkit.MediaKeySession.generateRequest"),qc(this,t,null)},f.load=function(e){return ne.debug("PatchedMediaKeysWebkit.MediaKeySession.load"),"persistent-license"==this.l?qc(this,null,e):Zy.reject(Error("Not a persistent session."))},f.update=function(e){ne.debug("PatchedMediaKeysWebkit.MediaKeySession.update",e);var t=new Ee;return this.Qd(t,e),t},f.close=function(){if(ne.debug("PatchedMediaKeysWebkit.MediaKeySession.close"),"persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var e=Dc("cancelKeyRequest");try{this.j[e](this.i,this.sessionId)}catch(t){}}return this.closed.resolve(),this.closed},f.remove=function(){return ne.debug("PatchedMediaKeysWebkit.MediaKeySession.remove"),"persistent-license"!=this.l?Zy.reject(Error("Not a persistent session.")):this.close()},(f=Wc.prototype).forEach=function(e){this.g&&e(this.g,_c)},f.get=function(e){if(this.has(e))return this.g},f.has=function(e){var t=_c;return!(!this.g||!Pe.Ha(new Uint8Array(e),new Uint8Array(t)))},f.entries=function(){},f.keys=function(){},f.values=function(){},cc((function(){if(!(!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)ne.info("Using webkit-prefixed EME v0.1b"),Lc="webkit";else{if(!HTMLMediaElement.prototype.generateKeyRequest)return;ne.info("Using nonprefixed EME v0.1b")}_c=new Uint8Array([0]).buffer,navigator.requestMediaKeySystemAccess=Uc,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Fc,e.MediaKeys=Bc,e.MediaKeySystemAccess=Kc}})),cc((function(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;t.requestPictureInPicture&&document.exitPictureInPicture||!t.webkitSupportsPresentationMode||(ne.debug("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,t.requestPictureInPicture=Yc,Aw(t,"disablePictureInPicture",{get:Jc,set:Qc,enumerable:!0,configurable:!0}),document.exitPictureInPicture=$c,document.addEventListener("webkitpresentationmodechanged",Xc,!0))}})),cc((function(){if(ne.debug("VideoPlayPromise.install"),e.HTMLMediaElement){var t=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var e=t.apply(this);return e&&e.catch((function(){})),e}}})),cc((function(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;!t.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in t&&(t.getVideoPlaybackQuality=Zc)}})),cc((function(){if(e.VTTCue)ne.info("Using native VTTCue.");else if(e.TextTrackCue){var t=TextTrackCue.length;if(3==t)ne.info("Using VTTCue polyfill from 3 argument TextTrackCue."),e.VTTCue=el;else if(6==t)ne.info("Using VTTCue polyfill from 6 argument TextTrackCue."),e.VTTCue=tl;else{try{var n=!!el(1,2,"")}catch(r){n=!1}n&&(ne.info("Using VTTCue polyfill from 3 argument TextTrackCue."),e.VTTCue=el)}}else ne.error("VTTCue not available.")})),$("shaka.text.TtmlTextParser",nl),nl.prototype.parseInit=function(){},nl.prototype.parseInit=nl.prototype.parseInit,nl.prototype.parseMedia=function(e,t){var n=xe(e),r=[],i=new DOMParser,a=null;if(""==n)return r;try{a=i.parseFromString(n,"text/xml")}catch(b){throw new re(2,2,2005,"Failed to parse TTML.")}if(a){if(n=a.getElementsByTagName("parsererror")[0])throw new re(2,2,2005,n.textContent);if(!(i=a.getElementsByTagName("tt")[0]))throw new re(2,2,2005,"TTML does not contain <tt> tag.");var o=Zr.getAttributeNS(i,"http://www.w3.org/ns/ttml#parameter","frameRate"),s=Zr.getAttributeNS(i,"http://www.w3.org/ns/ttml#parameter","subFrameRate"),u=Zr.getAttributeNS(i,"http://www.w3.org/ns/ttml#parameter","frameRateMultiplier"),c=Zr.getAttributeNS(i,"http://www.w3.org/ns/ttml#parameter","tickRate");if(a=i.getAttribute("xml:space")||"default",n=Zr.getAttributeNS(i,"http://www.w3.org/ns/ttml#styling","extent"),"default"!=a&&"preserve"!=a)throw new re(2,2,2005,"Invalid xml:space value: "+a);a="default"==a,o=new Il(o,s,u,c),s=vl(i.getElementsByTagName("metadata")[0]),u=vl(i.getElementsByTagName("styling")[0]),c=vl(i.getElementsByTagName("layout")[0]);for(var l=[],f=0;f<c.length;f++){var h,d,p=c[f],g=u,v=n,m=new wn,y=p.getAttribute("xml:id");y?(m.id=y,y=null,v&&(y=al.exec(v)||sl.exec(v)),v=y?Number(y[1]):null,y=y?Number(y[2]):null,(h=Tl(p,g,"extent"))&&null!=(h=(d=al.exec(h))||sl.exec(h))&&(m.width=null!=v?100*Number(h[1])/v:Number(h[1]),m.height=null!=y?100*Number(h[2])/y:Number(h[2]),m.widthUnits=d||null!=v?Sn:0,m.heightUnits=d||null!=y?Sn:0),(p=Tl(p,g,"origin"))&&null!=(h=(d=al.exec(p))||sl.exec(p))&&(m.viewportAnchorX=null!=v?100*Number(h[1])/v:Number(h[1]),m.viewportAnchorY=null!=y?100*Number(h[2])/y:Number(h[2]),m.viewportAnchorUnits=d||null!=v?Sn:0)):(ne.v("TtmlTextParser parser encountered a region with no id. Region will be ignored."),m=null),m&&l.push(m)}for(n=ml(i.getElementsByTagName("body")[0]),i=(n=w(n)).next();!i.done;i=n.next())(i=bl(i.value,t.periodStart,o,s,u,c,l,a,!1))&&r.push(i)}return r},nl.prototype.parseMedia=nl.prototype.parseMedia;var rl,il,al=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,ol=/^(\d+px|\d+em)$/,sl=/^(\d+)px (\d+)px$/,ul=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,cl=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,ll=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,fl=/^(\d*(?:\.\d*)?)f$/,hl=/^(\d*(?:\.\d*)?)t$/,dl=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,pl={left:gn,center:"center",right:"end",start:gn,end:"end"},gl={left:"line-left",center:"center",right:"line-right"};function vl(e){var t=[];if(!e)return t;for(var n=w(e.childNodes),r=n.next();!r.done;r=n.next())(r=r.value).nodeType==Node.ELEMENT_NODE&&"br"!==r.nodeName&&(r=vl(r),t=nd(t).call(t,r));return t.length||t.push(e),t}function ml(e){if(!e)return[];for(var t=[],n=(e=w(e.childNodes)).next();!n.done;n=e.next())(n=n.value)instanceof Element&&(n.hasAttribute("begin")?t.push(n):t=nd(t).call(t,ml(n)));return t}function yl(e,t){for(var n="",r=w(e.childNodes),i=r.next();!i.done;i=r.next()){var a;"br"==(i=i.value).nodeName&&e.childNodes[0]!==i?n+="\n":i.childNodes&&0<i.childNodes.length?n+=yl(i,t):n+=t?i=(i=xT(a=i.textContent).call(a)).replace(/\s+/g," "):i.textContent}return n}function bl(e,t,n,r,i,a,o,s,u){var c;if(u&&"br"==e.nodeName)return(e=new on(0,0,"")).spacer=!0,e;var l=/^[\s\n]*$/.test(e.textContent),f=e.nodeType==Node.ELEMENT_NODE&&!e.hasAttribute("begin")&&!e.hasAttribute("end");if(e.nodeType!=Node.ELEMENT_NODE||f&&l||f&&!u)return null;s="default"==(e.getAttribute("xml:space")||(s?"default":"preserve")),l=Al(e.getAttribute("begin"),n),f=Al(e.getAttribute("end"),n);var h=Al(e.getAttribute("dur"),n);if(null==f&&null!=h&&(f=l+h),!u&&(null==l||null==f))throw new re(2,2,2001);if(l=u&&null==l?0:l+t,f=u&&null==f?0:f+t,h="",u=[],Jh(c=Yw(e.childNodes)).call(c,(function(e){return e.nodeType===Node.TEXT_NODE&&/\S+/.test(e.textContent)})))h=yl(e,s);else for(var d=w(e.childNodes),p=d.next();!p.done;p=d.next())(p=bl(p.value,t,n,r,i,a,o,s,!0))&&(p.startTime=p.startTime||l,p.endTime=p.endTime||f,u.push(p));if((t=new on(l,f,h)).nestedCues=u,(a=kl(e,"region",a,"")[0])&&a.getAttribute("xml:id")){var g=a.getAttribute("xml:id");t.region=Hb(o).call(o,(function(e){return e.id==g}))[0]}return function(e,t,n,r,i){"rtl"==Sl(t,n,i,"direction")&&(e.direction="rtl");var a=Sl(t,n,i,"writingMode");if("tb"==a||"tblr"==a?e.writingMode="vertical-lr":"tbrl"==a?e.writingMode="vertical-rl":"rltb"==a||"rl"==a?e.direction="rtl":a&&(e.direction=hn),(a=Sl(t,n,i,"textAlign"))?(e.positionAlign=gl[a],e.lineAlign=pl[a],e.textAlign=cn[a.toUpperCase()]):e.textAlign="start",(a=Sl(t,n,i,"displayAlign"))&&(e.displayAlign=fn[a.toUpperCase()]),(a=Sl(t,n,i,"color"))&&(e.color=a),(a=Sl(t,n,i,"backgroundColor"))&&(e.backgroundColor=a),(a=Sl(t,n,i,"fontFamily"))&&(e.fontFamily=a),(a=Sl(t,n,i,"fontWeight"))&&"bold"==a&&(e.fontWeight=700),(a=Sl(t,n,i,"wrapOption"))&&"noWrap"==a&&(e.wrapLine=!1),(a=Sl(t,n,i,"lineHeight"))&&a.match(ol)&&(e.lineHeight=a),(a=Sl(t,n,i,"fontSize"))&&a.match(ol)&&(e.fontSize=a),(a=Sl(t,n,i,"fontStyle"))&&(e.fontStyle=bn[a.toUpperCase()]),r){var o;a=r.getAttribute("imageType")||r.getAttribute("imagetype");var s=r.getAttribute("encoding");r=xT(o=r.textContent).call(o),"PNG"==a&&"Base64"==s&&r&&(e.backgroundImage="data:image/png;base64,"+r)}(n=Tl(n,i,"textDecoration"))&&wl(e,n),(t=El(t,i,"textDecoration"))&&wl(e,t)}(t,e,a,r=kl(e,"backgroundImage",r,"#","http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt")[0],i),t}function wl(e,t){for(var n,r,i,a,o,s,u=t.split(" "),c=0;c<u.length;c++)switch(u[c]){case"underline":SM(n=e.textDecoration).call(n,"underline")||e.textDecoration.push("underline");break;case"noUnderline":SM(r=e.textDecoration).call(r,"underline")&&$e(e.textDecoration,"underline");break;case"lineThrough":SM(i=e.textDecoration).call(i,"lineThrough")||e.textDecoration.push("lineThrough");break;case"noLineThrough":SM(a=e.textDecoration).call(a,"lineThrough")&&$e(e.textDecoration,"lineThrough");break;case"overline":SM(o=e.textDecoration).call(o,"overline")||e.textDecoration.push("overline");break;case"noOverline":SM(s=e.textDecoration).call(s,"overline")&&$e(e.textDecoration,"overline")}}function Sl(e,t,n,r){return(e=El(e,n,r))?e:Tl(t,n,r)}function Tl(e,t,n){if(!e)return null;for(var r=vl(e),i=0;i<r.length;i++){var a=Zr.getAttributeNS(r[i],"http://www.w3.org/ns/ttml#styling",n);if(a)return a}return xl(e,t,n)}function El(e,t,n){var r=Zr.getAttributeNS(e,"http://www.w3.org/ns/ttml#styling",n);return r||xl(e,t,n)}function xl(e,t,n){e=kl(e,"style",t,"");for(var r=null,i=0;i<e.length;i++){var a=Zr.getAttributeNS(e[i],"http://www.w3.org/ns/ttml#styling",n);a||(a=El(e[i],t,n)),a&&(r=a)}return r}function kl(e,t,n,r,i){var a=[];if(!e||1>n.length)return a;var o=e;for(e=null;o&&!(e=i?Zr.getAttributeNS(o,i,t):o.getAttribute(t))&&(o=o.parentNode)instanceof Element;);if(t=e)for(i=(t=w(t=t.split(" "))).next();!i.done;i=t.next())for(i=i.value,o=(e=w(n)).next();!o.done;o=e.next())if(r+(o=o.value).getAttribute("xml:id")==i){a.push(o);break}return a}function Al(e,t){var n=null;if(ul.test(e)){n=ul.exec(e);var r=Number(n[1]),i=Number(n[2]),a=Number(n[3]),o=Number(n[4]);n=(a+=(o+=(Number(n[5])||0)/t.h)/t.frameRate)+60*i+3600*r}else cl.test(e)?n=Ml(cl,e):ll.test(e)?n=Ml(ll,e):fl.test(e)?(n=fl.exec(e),n=Number(n[1])/t.frameRate):hl.test(e)?(n=hl.exec(e),n=Number(n[1])/t.g):dl.test(e)&&(n=Ml(dl,e));return n}function Ml(e,t){var n=e.exec(t);return null==n||""==n[0]?null:(Number(n[4])||0)/1e3+(Number(n[3])||0)+60*(Number(n[2])||0)+3600*(Number(n[1])||0)}function Il(e,t,n,r){this.frameRate=Number(e)||30,this.h=Number(t)||1,this.g=Number(r),0==this.g&&(this.g=e?this.frameRate*this.h:1),n&&(e=/^(\d+) (\d+)$/g.exec(n))&&(this.frameRate*=Number(e[1])/Number(e[2]))}function Cl(){this.g=new nl}function Pl(){}function Nl(e,t,n){var r;if(r=/^align:(start|middle|center|end|left|right)$/.exec(t))t=r[1],e.textAlign="middle"==t?un:cn[t.toUpperCase()];else if(r=/^vertical:(lr|rl)$/.exec(t))e.writingMode="lr"==r[1]?"vertical-lr":"vertical-rl";else if(r=/^size:([\d.]+)%$/.exec(t))e.size=Number(r[1]);else if(r=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(t))e.position=Number(r[1]),r[2]&&(t=r[2],e.positionAlign="line-left"==t||"start"==t?"line-left":"line-right"==t||"end"==t?"line-right":"center");else{if(!(r=/^region:(.*)$/.exec(t))){e:{if(n=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(t))e.lineInterpretation=1,e.line=Number(n[1]),n[2]&&(e.lineAlign=vn[n[2].toUpperCase()]);else{if(!(n=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(t))){e=!1;break e}e.lineInterpretation=pn,e.line=Number(n[1]),n[2]&&(e.lineAlign=vn[n[2].toUpperCase()])}e=!0}return e}(t=function(e,t){var n=Hb(e).call(e,(function(e){return e.id==t}));return n.length?n[0]:(ne.v("VTT parser could not find a region with id: ",t," The region will be ignored."),null)}(n,r[1]))&&(e.region=t)}return!0}function jl(e){if(null==(e=Yi(e,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3})/g)))return null;var t=Number(e[2]),n=Number(e[3]);return 59<t||59<n?null:Number(e[4])/1e3+n+60*t+3600*(Number(e[1])||0)}function Ol(){this.g=null}function _l(e,t,n){var r,i,a;return(new qr).box("payl",Xr((function(e){r=xe(e)}))).box("iden",Xr((function(e){i=xe(e)}))).box("sttg",Xr((function(e){a=xe(e)}))).parse(e),r?function(e,t,n,r,i){if(e=new on(r,i,e),t&&(e.id=t),n)for(t=new Wi(n),n=$i(t);n;)Nl(e,n,[])||ne.v("VTT parser encountered an invalid VTT setting: ",n," The setting will be ignored."),Xi(t),n=$i(t);return e}(r,i,a,t,n):null}function Ll(){}function Dl(){rl?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(rl=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Ul):console.debug("EmeEncryptionSchemePolyfill: EME not found")}function Ul(e,t){var n=this;return T((function r(){var i;return z(r,(function(r){switch(r.s){case 1:return console.assert(n==navigator,'bad "this" for requestMediaKeySystemAccess'),N(r,rl.call(n,e,t),2);case 2:return Wl(i=r.B)?(console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=rl,r.return(i)):(console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.requestMediaKeySystemAccess=Fl,r.return(Fl.call(n,e,t)))}}))}))}function Fl(e,t){var n=this;return T((function r(){var i,a,o,s,u,c,l,f;return z(r,(function(r){switch(r.s){case 1:console.assert(n==navigator,'bad "this" for requestMediaKeySystemAccess'),i=Gl(e),a=[];for(var h=w(t),d=h.next();!d.done;d=h.next())o=d.value,s=Kl(o.videoCapabilities,i),u=Kl(o.audioCapabilities,i),o.videoCapabilities&&o.videoCapabilities.length&&!s.length||o.audioCapabilities&&o.audioCapabilities.length&&!u.length||((c=rw({},o)).videoCapabilities=s,c.audioCapabilities=u,a.push(c));if(!a.length)throw(l=Error("Unsupported keySystem or supportedConfigurations.")).name="NotSupportedError",l.code=DOMException.NOT_SUPPORTED_ERR,l;return N(r,rl.call(n,e,a),2);case 2:return f=r.B,r.return(new ql(f,i))}}))}))}function Kl(e,t){return e?Hb(e).call(e,(function(e){return!e.encryptionScheme||e.encryptionScheme==t})):e}function Bl(){}function Hl(){il?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(il=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Vl):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}function Vl(e){var t=this;return T((function n(){var r,i;return z(n,(function(n){switch(n.s){case 1:return console.assert(t==navigator.mediaCapabilities,'bad "this" for decodingInfo'),N(n,il.call(t,e),2);case 2:return r=n.B,e.keySystemConfiguration?(i=r.keySystemAccess)&&Wl(i)?(console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=il,n.return(r)):(console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=zl,n.return(zl.call(t,e))):n.return(r)}}))}))}function zl(e){var t=this;return T((function n(){var r,i,a,o,s,u,c,l,f;return z(n,(function(n){switch(n.s){case 1:return console.assert(t==navigator.mediaCapabilities,'bad "this" for decodingInfo'),r=null,e.keySystemConfiguration&&(i=e.keySystemConfiguration,a=i.keySystem,o=i.audio&&i.audio.encryptionScheme,s=i.video&&i.video.encryptionScheme,r=Gl(a),u={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},o&&o!=r||s&&s!=r)?n.return(u):N(n,il.call(t,e),2);case 2:if((c=n.B).keySystemAccess){c.keySystemAccess=new ql(c.keySystemAccess,r),n.I(3);break}if(!e.keySystemConfiguration){n.I(3);break}var h=e.keySystemConfiguration,d=[],p=[];return h.audio&&d.push({robustness:h.audio.robustness||"",contentType:e.audio.contentType}),h.video&&p.push({robustness:h.video.robustness||"",contentType:e.video.contentType}),h={initDataTypes:h.initDataType?[h.initDataType]:[],distinctiveIdentifier:h.distinctiveIdentifier,persistentState:h.persistentState,sessionTypes:h.sessionTypes},d.length&&(h.audioCapabilities=d),p.length&&(h.videoCapabilities=p),l=h,f=c,N(n,navigator.requestMediaKeySystemAccess(e.keySystemConfiguration.keySystem,[l]),5);case 5:f.keySystemAccess=n.B;case 3:return n.return(c)}}))}))}function ql(e,t){this.h=e,this.g=t,this.keySystem=e.keySystem}function Gl(e){return oM(e).call(e,"com.widevine")||oM(e).call(e,"com.microsoft")||oM(e).call(e,"com.adobe")||oM(e).call(e,"org.w3")?"cenc":oM(e).call(e,"com.apple")?"cbcs-1-9":(console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",e,"Please contribute!"),null)}function Wl(e){var t=(e=e.getConfiguration()).audioCapabilities&&e.audioCapabilities[0];return!(!(e=e.videoCapabilities&&e.videoCapabilities[0]||t)||void 0===e.encryptionScheme)}function Xl(){}function Yl(){Dl(),Hl()}xn["application/ttml+xml"]=nl,$("shaka.text.Mp4TtmlParser",Cl),Cl.prototype.parseInit=function(e){var t=!1;if((new qr).box("moov",Gr).box("trak",Gr).box("mdia",Gr).box("minf",Gr).box("stbl",Gr).ma("stsd",Wr).box("stpp",(function(e){t=!0,e.parser.stop()})).parse(e),!t)throw new re(2,2,2007)},Cl.prototype.parseInit=Cl.prototype.parseInit,Cl.prototype.parseMedia=function(e,t){var n,r=!1,i=[];if((new qr).box("mdat",Xr(Pw(n=function(e){r=!0,i=nd(i).call(i,this.g.parseMedia(e,t))}).call(n,this))).parse(e),!r)throw new re(2,2,2007);return i},Cl.prototype.parseMedia=Cl.prototype.parseMedia,xn['application/mp4; codecs="stpp"']=Cl,xn['application/mp4; codecs="stpp.ttml.im1t"']=Cl,xn['application/mp4; codecs="stpp.TTML.im1t"']=Cl,$("shaka.text.VttTextParser",Pl),Pl.prototype.parseInit=function(){},Pl.prototype.parseInit=Pl.prototype.parseInit,Pl.prototype.parseMedia=function(e,t){var n,r=xe(e);if(r=(r=r.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")).split(/\n{2,}/m),!/^WEBVTT($|[ \t\n])/m.test(r[0]))throw new re(2,2,2e3);var i=t.segmentStart;if(null==i&&(i=0,SM(n=r[0]).call(n,"X-TIMESTAMP-MAP"))){var a=r[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),o=r[0].match(/MPEGTS:(\d+)/m);if(a&&o){if(null==(i=jl(new Wi(a[1]))))throw new re(2,2,2e3);i=t.periodStart+(Number(o[1])/9e4-i)}}o=[];var s=r[0].split("\n");for(a=1;a<s.length;a++)if(/^Region:/.test(s[a])){var u=new Wi(s[a]),c=new wn;$i(u),Xi(u);for(var l=$i(u);l;){var f;e:{var h=c,d=l;if(f=/^id=(.*)$/.exec(d))h.id=f[1];else if(f=/^width=(\d{1,2}|100)%$/.exec(d))h.width=Number(f[1]);else if(f=/^lines=(\d+)$/.exec(d))h.height=Number(f[1]),h.heightUnits=2;else if(f=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(d))h.regionAnchorX=Number(f[1]),h.regionAnchorY=Number(f[2]);else if(f=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(d))h.viewportAnchorX=Number(f[1]),h.viewportAnchorY=Number(f[2]);else{if(!/^scroll=up$/.exec(d)){f=!1;break e}h.scroll="up"}f=!0}f||ne.v("VTT parser encountered an invalid VTTRegion setting: ",l," The setting will be ignored."),Xi(u),l=$i(u)}o.push(c)}for(a=[],u=1;u<r.length;u++){if(f=s=r[u].split("\n"),h=i,s=o,1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0])s=null;else{var p,g;c=null,SM(p=f[0]).call(p,"--\x3e")||(c=f[0],Wd(f).call(f,0,1)),d=jl(l=new Wi(f[0]));var v=Yi(l,/[ \t]+--\x3e[ \t]+/g),m=jl(l);if(null==d||null==v||null==m)throw new re(2,2,2001);for(f=new on(d+h,m+h,xT(g=xd(f).call(f,1).join("\n")).call(g)),Xi(l),h=$i(l);h;)Nl(f,h,s)||ne.v("VTT parser encountered an invalid VTT setting: ",h," The setting will be ignored."),Xi(l),h=$i(l);null!=c&&(f.id=c),s=f}s&&a.push(s)}return a},Pl.prototype.parseMedia=Pl.prototype.parseMedia,xn["text/vtt"]=Pl,xn['text/vtt; codecs="vtt"']=Pl,xn['text/vtt; codecs="wvtt"']=Pl,$("shaka.text.Mp4VttParser",Ol),Ol.prototype.parseInit=function(e){var t,n=!1;if((new qr).box("moov",Gr).box("trak",Gr).box("mdia",Gr).ma("mdhd",Pw(t=function(e){0==e.version?(e.reader.U(4),e.reader.U(4),this.g=e.reader.N(),e.reader.U(4)):(e.reader.U(8),e.reader.U(8),this.g=e.reader.N(),e.reader.U(8)),e.reader.U(4)}).call(t,this)).box("minf",Gr).box("stbl",Gr).ma("stsd",Wr).box("wvtt",(function(){n=!0})).parse(e),!this.g)throw new re(2,2,2008);if(!n)throw new re(2,2,2008)},Ol.prototype.parseInit=Ol.prototype.parseInit,Ol.prototype.parseMedia=function(e,t){var n=this;if(!this.g)throw ne.error("No init segment for MP4+VTT!"),new re(2,2,2008);var r,i=0,a=[],o=[],s=!1,u=!1,c=!1,l=null;if((new qr).box("moof",Gr).box("traf",Gr).ma("tfdt",(function(e){s=!0,i=0==e.version?e.reader.N():e.reader.Pb()})).ma("tfhd",(function(e){var t=h_(e);(e=e.reader).U(4),1&t&&e.U(8),2&t&&e.U(4),l=8&t?e.N():null})).ma("trun",(function(e){u=!0;var t=e.version,n=h_(e),r=(e=e.reader).N();1&n&&e.U(4),4&n&&e.U(4);for(var i=[],o=0;o<r;o++){var s={duration:null,sampleSize:null,Sd:null};256&n&&(s.duration=e.N()),512&n&&(s.sampleSize=e.N()),1024&n&&e.U(4),2048&n&&(s.Sd=0==t?e.N():e.De()),i.push(s)}a=i})).box("mdat",Xr((function(e){c=!0,r=e}))).parse(e),!c&&!s&&!u)throw new re(2,2,2008);var f=i,h=new Hr(new DataView(r.buffer,r.byteOffset,r.byteLength),0);return Gf(a).call(a,(function(e){var r=e.duration||l,a=e.Sd?i+e.Sd:f;f=a+(r||0);var s=0;do{var u=h.N();s+=u;var c=h.N(),d=null;"vttc"==(c=$r(c))?8<u&&(d=h.mb(u-8)):("vtte"!=c&&ne.error("Unknown box "+c+"! Skipping!"),h.U(u-8)),r?d&&o.push(_l(d,t.periodStart+a/n.g,t.periodStart+f/n.g)):ne.error("WVTT sample duration unknown, and no default found!")}while(e.sampleSize&&s<e.sampleSize)})),Hb(o).call(o,ye.Ra)},Ol.prototype.parseMedia=Ol.prototype.parseMedia,xn['application/mp4; codecs="wvtt"']=Ol,$("shaka.util.Dom.createHTMLElement",(function(e){return document.createElement(e)})),$("shaka.util.Dom.createVideoElement",(function(){var e=document.createElement("video");return e.muted=!0,e.width=600,e.height=400,e})),$("shaka.util.Dom.asHTMLElement",(function(e){return e})),$("shaka.util.Dom.asHTMLMediaElement",(function(e){return e})),$("shaka.util.Dom.removeAllChildren",(function(e){for(;e.firstChild;)e.removeChild(e.firstChild)})),$("EmeEncryptionSchemePolyfill",Ll),Ll.install=Dl,$("McEncryptionSchemePolyfill",Bl),Bl.install=Hl,ql.prototype.getConfiguration=function(){var e=this.h.getConfiguration();if(e.videoCapabilities)for(var t=w(e.videoCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.g;if(e.audioCapabilities)for(n=(t=w(e.audioCapabilities)).next();!n.done;n=t.next())n.value.encryptionScheme=this.g;return e},ql.prototype.createMediaKeys=function(){return this.h.createMediaKeys()},$("EncryptionSchemePolyfills",Xl),Xl.install=Yl,void 0!==n&&n.gf&&(n.gf=Xl)}.call(n,t,t,void 0),n.shaka)e_[r]=n.shaka[r]}();var p_=t(d_),g_=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=Ul(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Ln(e,"prototype",{writable:!1}),t&&uf(e,t)}(a,e);var t,n,r,i=Of(a);function a(e){var t,n,r,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),t=i.call(this,e),n=_l(t),o=function(){var e=t.shakaplayer.getVariantTracks();Gf(e).call(e,(function(e){if(e.active)for(var t=0;t<this.content.length;++t){var n=this.content[t];n.value===e.id?n.selected=!0:n.selected=!1}}))},(r=jl(r="onAdaptation_"))in n?Ln(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,p_.polyfill.installAll(),t}return t=a,r=[{key:"pluginName",get:function(){return"ShakaPlugin"}},{key:"defaultConfig",get:function(){return{shakaOpts:{}}}},{key:"isSupported",value:function(){return p_.Player.isBrowserSupported()}}],(n=[{key:"afterCreate",value:function(){var e=this;this.content=[],this.url=this.player.config.url,p_.Player.isBrowserSupported()&&this.on("urlchange",(function(t){/^blob/.test(t)||(e.url=t,e.loadUrl(t))}))}},{key:"beforePlayerInit",value:function(){if(!p_.Player.isBrowserSupported())throw new Error("Browser not supported!");this._initShaka()}},{key:"destroy",value:function(){this.shakaplayer&&(this.shakaplayer.destroy(),this.shakaplayer=null)}},{key:"_initShaka",value:function(){var e=this.player;this.shakaplayer=new p_.Player(e.video),this.shakaplayer.addEventListener("error",(function(e){console.error("Error code",e.detail.code,"object",e.detail)})),this.config.shakaOpts&&this.shakaplayer.configure(this.config.shakaOpts),this.shakaplayer.getNetworkingEngine().registerRequestFilter((function(e,t){e===p_.net.NetworkingEngine.RequestType.LICENSE&&(t.headers["CWIP-Auth-Header"]="VGhpc0lzQVRlc3QK")})),this.shakaplayer.addEventListener("adaptation",this.onAdaptation_),this.shakaplayer.configure({abr:{enabled:!1}}),this.loadUrl(this.url)}},{key:"loadUrl",value:function(e){var t=this;this.shakaplayer.load(e).then((function(){console.log(" this.onTracksChanged_"),t.onTracksChanged_()})).catch((function(e){console.trace("event",e),console.error("Error code",e.detail.code,"object",e.detail)}))}},{key:"onTracksChanged_",value:function(){this.updateVariantTracks_()}},{key:"updateVariantTracks_",value:function(){var e=this.shakaplayer.getVariantTracks();Nh(e).call(e,(function(e,t){return e.bandwidth-t.bandwidth})),this.updateTrackOptions_(e)}},{key:"updateTrackOptions_",value:function(e){var t=this,n={variant:function(e){var t="";return e.width&&e.height&&(t+=e.height+"P"),t}};this.content=[],Gf(e).call(e,(function(e){var r={};r.textContent=n[e.type](e),r.track=e,r.value=e.id,r.selected=e.active,t.content.push(r)})),this.updateDefinition()}},{key:"updateDefinition",value:function(){"mobile"!==BT.device&&console.log("updateDefinition",this.content)}}])&&Ol(t.prototype,n),r&&Ol(t,r),Ln(t,"prototype",{writable:!1}),a}(XT);return VePlayer.register("plugin:shaka",g_),g_}));
|
|
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_SHAKA__=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={exports:{}},r=function(e){return e&&e.Math==Math&&e},i=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof e&&e)||function(){return this}()||e||Function("return this")(),a=function(e){try{return!!e()}catch(t){return!0}},o=!a((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),s=o,u=Function.prototype,c=u.apply,l=u.call,f="object"==typeof Reflect&&Reflect.apply||(s?l.bind(c):function(){return l.apply(c,arguments)}),h=o,d=Function.prototype,p=d.call,g=h&&d.bind.bind(p,p),v=h?g:function(e){return function(){return p.apply(e,arguments)}},m=v,y=m({}.toString),b=m("".slice),w=function(e){return b(y(e),8,-1)},S=w,T=v,E=function(e){if("Function"===S(e))return T(e)},x="object"==typeof document&&document.all,k={all:x,IS_HTMLDDA:void 0===x&&void 0!==x},A=k.all,M=k.IS_HTMLDDA?function(e){return"function"==typeof e||e===A}:function(e){return"function"==typeof e},I={},C=!a((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),R=o,P=Function.prototype.call,N=R?P.bind(P):function(){return P.apply(P,arguments)},j={},O={}.propertyIsEnumerable,_=Object.getOwnPropertyDescriptor,L=_&&!O.call({1:2},1);j.f=L?function(e){var t=_(this,e);return!!t&&t.enumerable}:O;var D,U,F=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},K=a,B=w,H=Object,V=v("".split),z=K((function(){return!H("z").propertyIsEnumerable(0)}))?function(e){return"String"==B(e)?V(e,""):H(e)}:H,q=function(e){return null==e},G=q,W=TypeError,X=function(e){if(G(e))throw W("Can't call method on "+e);return e},Y=z,$=X,J=function(e){return Y($(e))},Q=M,Z=k.all,ee=k.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:Q(e)||e===Z}:function(e){return"object"==typeof e?null!==e:Q(e)},te={},ne=te,re=i,ie=M,ae=function(e){return ie(e)?e:void 0},oe=function(e,t){return arguments.length<2?ae(ne[e])||ae(re[e]):ne[e]&&ne[e][t]||re[e]&&re[e][t]},se=v({}.isPrototypeOf),ue="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ce=i,le=ue,fe=ce.process,he=ce.Deno,de=fe&&fe.versions||he&&he.version,pe=de&&de.v8;pe&&(U=(D=pe.split("."))[0]>0&&D[0]<4?1:+(D[0]+D[1])),!U&&le&&(!(D=le.match(/Edge\/(\d+)/))||D[1]>=74)&&(D=le.match(/Chrome\/(\d+)/))&&(U=+D[1]);var ge=U,ve=ge,me=a,ye=i.String,be=!!Object.getOwnPropertySymbols&&!me((function(){var e=Symbol();return!ye(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ve&&ve<41})),we=be&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Se=oe,Te=M,Ee=se,xe=Object,ke=we?function(e){return"symbol"==typeof e}:function(e){var t=Se("Symbol");return Te(t)&&Ee(t.prototype,xe(e))},Ae=String,Me=function(e){try{return Ae(e)}catch(t){return"Object"}},Ie=M,Ce=Me,Re=TypeError,Pe=function(e){if(Ie(e))return e;throw Re(Ce(e)+" is not a function")},Ne=Pe,je=q,Oe=function(e,t){var n=e[t];return je(n)?void 0:Ne(n)},_e=N,Le=M,De=ee,Ue=TypeError,Fe={exports:{}},Ke=i,Be=Object.defineProperty,He=function(e,t){try{Be(Ke,e,{value:t,configurable:!0,writable:!0})}catch(n){Ke[e]=t}return t},Ve="__core-js_shared__",ze=i[Ve]||He(Ve,{}),qe=ze;(Fe.exports=function(e,t){return qe[e]||(qe[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 Ge=Fe.exports,We=X,Xe=Object,Ye=function(e){return Xe(We(e))},$e=Ye,Je=v({}.hasOwnProperty),Qe=Object.hasOwn||function(e,t){return Je($e(e),t)},Ze=v,et=0,tt=Math.random(),nt=Ze(1..toString),rt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+nt(++et+tt,36)},it=Ge,at=Qe,ot=rt,st=be,ut=we,ct=i.Symbol,lt=it("wks"),ft=ut?ct.for||ct:ct&&ct.withoutSetter||ot,ht=function(e){return at(lt,e)||(lt[e]=st&&at(ct,e)?ct[e]:ft("Symbol."+e)),lt[e]},dt=N,pt=ee,gt=ke,vt=Oe,mt=function(e,t){var n,r;if("string"===t&&Le(n=e.toString)&&!De(r=_e(n,e)))return r;if(Le(n=e.valueOf)&&!De(r=_e(n,e)))return r;if("string"!==t&&Le(n=e.toString)&&!De(r=_e(n,e)))return r;throw Ue("Can't convert object to primitive value")},yt=TypeError,bt=ht("toPrimitive"),wt=function(e,t){if(!pt(e)||gt(e))return e;var n,r=vt(e,bt);if(r){if(void 0===t&&(t="default"),n=dt(r,e,t),!pt(n)||gt(n))return n;throw yt("Can't convert object to primitive value")}return void 0===t&&(t="number"),mt(e,t)},St=ke,Tt=function(e){var t=wt(e,"string");return St(t)?t:t+""},Et=ee,xt=i.document,kt=Et(xt)&&Et(xt.createElement),At=function(e){return kt?xt.createElement(e):{}},Mt=At,It=!C&&!a((function(){return 7!=Object.defineProperty(Mt("div"),"a",{get:function(){return 7}}).a})),Ct=C,Rt=N,Pt=j,Nt=F,jt=J,Ot=Tt,_t=Qe,Lt=It,Dt=Object.getOwnPropertyDescriptor;I.f=Ct?Dt:function(e,t){if(e=jt(e),t=Ot(t),Lt)try{return Dt(e,t)}catch(n){}if(_t(e,t))return Nt(!Rt(Pt.f,e,t),e[t])};var Ut=a,Ft=M,Kt=/#|\.prototype\./,Bt=function(e,t){var n=Vt[Ht(e)];return n==qt||n!=zt&&(Ft(t)?Ut(t):!!t)},Ht=Bt.normalize=function(e){return String(e).replace(Kt,".").toLowerCase()},Vt=Bt.data={},zt=Bt.NATIVE="N",qt=Bt.POLYFILL="P",Gt=Bt,Wt=Pe,Xt=o,Yt=E(E.bind),$t=function(e,t){return Wt(e),void 0===t?e:Xt?Yt(e,t):function(){return e.apply(t,arguments)}},Jt={},Qt=C&&a((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Zt=ee,en=String,tn=TypeError,nn=function(e){if(Zt(e))return e;throw tn(en(e)+" is not an object")},rn=C,an=It,on=Qt,sn=nn,un=Tt,cn=TypeError,ln=Object.defineProperty,fn=Object.getOwnPropertyDescriptor,hn="enumerable",dn="configurable",pn="writable";Jt.f=rn?on?function(e,t,n){if(sn(e),t=un(t),sn(n),"function"==typeof e&&"prototype"===t&&"value"in n&&pn in n&&!n[pn]){var r=fn(e,t);r&&r[pn]&&(e[t]=n.value,n={configurable:dn in n?n[dn]:r[dn],enumerable:hn in n?n[hn]:r[hn],writable:!1})}return ln(e,t,n)}:ln:function(e,t,n){if(sn(e),t=un(t),sn(n),an)try{return ln(e,t,n)}catch(r){}if("get"in n||"set"in n)throw cn("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var gn=Jt,vn=F,mn=C?function(e,t,n){return gn.f(e,t,vn(1,n))}:function(e,t,n){return e[t]=n,e},yn=i,bn=f,wn=E,Sn=M,Tn=I.f,En=Gt,xn=te,kn=$t,An=mn,Mn=Qe,In=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 bn(e,this,arguments)};return t.prototype=e.prototype,t},Cn=function(e,t){var n,r,i,a,o,s,u,c,l,f=e.target,h=e.global,d=e.stat,p=e.proto,g=h?yn:d?yn[f]:(yn[f]||{}).prototype,v=h?xn:xn[f]||An(xn,f,{})[f],m=v.prototype;for(a in t)r=!(n=En(h?a:f+(d?".":"#")+a,e.forced))&&g&&Mn(g,a),s=v[a],r&&(u=e.dontCallGetSet?(l=Tn(g,a))&&l.value:g[a]),o=r&&u?u:t[a],r&&typeof s==typeof o||(c=e.bind&&r?kn(o,yn):e.wrap&&r?In(o):p&&Sn(o)?wn(o):o,(e.sham||o&&o.sham||s&&s.sham)&&An(c,"sham",!0),An(v,a,c),p&&(Mn(xn,i=f+"Prototype")||An(xn,i,{}),An(xn[i],a,o),e.real&&m&&(n||!m[a])&&An(m,a,o)))},Rn=Cn,Pn=C,Nn=Jt.f;Rn({target:"Object",stat:!0,forced:Object.defineProperty!==Nn,sham:!Pn},{defineProperty:Nn});var jn=te.Object,On=n.exports=function(e,t,n){return jn.defineProperty(e,t,n)};jn.defineProperty.sham&&(On.sham=!0);var _n=n.exports,Ln=t(_n),Dn=w,Un=Array.isArray||function(e){return"Array"==Dn(e)},Fn=Math.ceil,Kn=Math.floor,Bn=Math.trunc||function(e){var t=+e;return(t>0?Kn:Fn)(t)},Hn=function(e){var t=+e;return t!=t||0===t?0:Bn(t)},Vn=Hn,zn=Math.min,qn=function(e){return e>0?zn(Vn(e),9007199254740991):0},Gn=qn,Wn=function(e){return Gn(e.length)},Xn=TypeError,Yn=function(e){if(e>9007199254740991)throw Xn("Maximum allowed index exceeded");return e},$n=Tt,Jn=Jt,Qn=F,Zn=function(e,t,n){var r=$n(t);r in e?Jn.f(e,r,Qn(0,n)):e[r]=n},er={};er[ht("toStringTag")]="z";var tr="[object z]"===String(er),nr=tr,rr=M,ir=w,ar=ht("toStringTag"),or=Object,sr="Arguments"==ir(function(){return arguments}()),ur=nr?ir: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=or(e),ar))?n:sr?ir(t):"Object"==(r=ir(t))&&rr(t.callee)?"Arguments":r},cr=M,lr=ze,fr=v(Function.toString);cr(lr.inspectSource)||(lr.inspectSource=function(e){return fr(e)});var hr=lr.inspectSource,dr=v,pr=a,gr=M,vr=ur,mr=hr,yr=function(){},br=[],wr=oe("Reflect","construct"),Sr=/^\s*(?:class|function)\b/,Tr=dr(Sr.exec),Er=!Sr.exec(yr),xr=function(e){if(!gr(e))return!1;try{return wr(yr,br,e),!0}catch(t){return!1}},kr=function(e){if(!gr(e))return!1;switch(vr(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Er||!!Tr(Sr,mr(e))}catch(t){return!0}};kr.sham=!0;var Ar=!wr||pr((function(){var e;return xr(xr.call)||!xr(Object)||!xr((function(){e=!0}))||e}))?kr:xr,Mr=Un,Ir=Ar,Cr=ee,Rr=ht("species"),Pr=Array,Nr=function(e){var t;return Mr(e)&&(t=e.constructor,(Ir(t)&&(t===Pr||Mr(t.prototype))||Cr(t)&&null===(t=t[Rr]))&&(t=void 0)),void 0===t?Pr:t},jr=function(e,t){return new(Nr(e))(0===t?0:t)},Or=a,_r=ge,Lr=ht("species"),Dr=function(e){return _r>=51||!Or((function(){var t=[];return(t.constructor={})[Lr]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Ur=Cn,Fr=a,Kr=Un,Br=ee,Hr=Ye,Vr=Wn,zr=Yn,qr=Zn,Gr=jr,Wr=Dr,Xr=ge,Yr=ht("isConcatSpreadable"),$r=Xr>=51||!Fr((function(){var e=[];return e[Yr]=!1,e.concat()[0]!==e})),Jr=function(e){if(!Br(e))return!1;var t=e[Yr];return void 0!==t?!!t:Kr(e)};Ur({target:"Array",proto:!0,arity:1,forced:!$r||!Wr("concat")},{concat:function(e){var t,n,r,i,a,o=Hr(this),s=Gr(o,0),u=0;for(t=-1,r=arguments.length;t<r;t++)if(Jr(a=-1===t?o:arguments[t]))for(i=Vr(a),zr(u+i),n=0;n<i;n++,u++)n in a&&qr(s,u,a[n]);else zr(u+1),qr(s,u++,a);return s.length=u,s}});var Qr=ur,Zr=String,ei=function(e){if("Symbol"===Qr(e))throw TypeError("Cannot convert a Symbol value to a string");return Zr(e)},ti={},ni=Hn,ri=Math.max,ii=Math.min,ai=function(e,t){var n=ni(e);return n<0?ri(n+t,0):ii(n,t)},oi=J,si=ai,ui=Wn,ci=function(e){return function(t,n,r){var i,a=oi(t),o=ui(a),s=si(r,o);if(e&&n!=n){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===n)return e||s||0;return!e&&-1}},li={includes:ci(!0),indexOf:ci(!1)},fi={},hi=Qe,di=J,pi=li.indexOf,gi=fi,vi=v([].push),mi=function(e,t){var n,r=di(e),i=0,a=[];for(n in r)!hi(gi,n)&&hi(r,n)&&vi(a,n);for(;t.length>i;)hi(r,n=t[i++])&&(~pi(a,n)||vi(a,n));return a},yi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],bi=mi,wi=yi,Si=Object.keys||function(e){return bi(e,wi)},Ti=C,Ei=Qt,xi=Jt,ki=nn,Ai=J,Mi=Si;ti.f=Ti&&!Ei?Object.defineProperties:function(e,t){ki(e);for(var n,r=Ai(t),i=Mi(t),a=i.length,o=0;a>o;)xi.f(e,n=i[o++],r[n]);return e};var Ii,Ci=oe("document","documentElement"),Ri=rt,Pi=Ge("keys"),Ni=function(e){return Pi[e]||(Pi[e]=Ri(e))},ji=nn,Oi=ti,_i=yi,Li=fi,Di=Ci,Ui=At,Fi="prototype",Ki="script",Bi=Ni("IE_PROTO"),Hi=function(){},Vi=function(e){return"<"+Ki+">"+e+"</"+Ki+">"},zi=function(e){e.write(Vi("")),e.close();var t=e.parentWindow.Object;return e=null,t},qi=function(){try{Ii=new ActiveXObject("htmlfile")}catch(i){}var e,t,n;qi="undefined"!=typeof document?document.domain&&Ii?zi(Ii):(t=Ui("iframe"),n="java"+Ki+":",t.style.display="none",Di.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Vi("document.F=Object")),e.close(),e.F):zi(Ii);for(var r=_i.length;r--;)delete qi[Fi][_i[r]];return qi()};Li[Bi]=!0;var Gi=Object.create||function(e,t){var n;return null!==e?(Hi[Fi]=ji(e),n=new Hi,Hi[Fi]=null,n[Bi]=e):n=qi(),void 0===t?n:Oi.f(n,t)},Wi={},Xi=mi,Yi=yi.concat("length","prototype");Wi.f=Object.getOwnPropertyNames||function(e){return Xi(e,Yi)};var $i={},Ji=ai,Qi=Wn,Zi=Zn,ea=Array,ta=Math.max,na=function(e,t,n){for(var r=Qi(e),i=Ji(t,r),a=Ji(void 0===n?r:n,r),o=ea(ta(a-i,0)),s=0;i<a;i++,s++)Zi(o,s,e[i]);return o.length=s,o},ra=w,ia=J,aa=Wi.f,oa=na,sa="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];$i.f=function(e){return sa&&"Window"==ra(e)?function(e){try{return aa(e)}catch(t){return oa(sa)}}(e):aa(ia(e))};var ua={};ua.f=Object.getOwnPropertySymbols;var ca=mn,la=function(e,t,n,r){return r&&r.enumerable?e[t]=n:ca(e,t,n),e},fa=Jt,ha=function(e,t,n){return fa.f(e,t,n)},da={},pa=ht;da.f=pa;var ga,va,ma,ya=te,ba=Qe,wa=da,Sa=Jt.f,Ta=function(e){var t=ya.Symbol||(ya.Symbol={});ba(t,e)||Sa(t,e,{value:wa.f(e)})},Ea=N,xa=oe,ka=ht,Aa=la,Ma=function(){var e=xa("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=ka("toPrimitive");t&&!t[r]&&Aa(t,r,(function(e){return Ea(n,this)}),{arity:1})},Ia=ur,Ca=tr?{}.toString:function(){return"[object "+Ia(this)+"]"},Ra=tr,Pa=Jt.f,Na=mn,ja=Qe,Oa=Ca,_a=ht("toStringTag"),La=function(e,t,n,r){if(e){var i=n?e:e.prototype;ja(i,_a)||Pa(i,_a,{configurable:!0,value:t}),r&&!Ra&&Na(i,"toString",Oa)}},Da=M,Ua=i.WeakMap,Fa=Da(Ua)&&/native code/.test(String(Ua)),Ka=Fa,Ba=i,Ha=ee,Va=mn,za=Qe,qa=ze,Ga=Ni,Wa=fi,Xa="Object already initialized",Ya=Ba.TypeError,$a=Ba.WeakMap;if(Ka||qa.state){var Ja=qa.state||(qa.state=new $a);Ja.get=Ja.get,Ja.has=Ja.has,Ja.set=Ja.set,ga=function(e,t){if(Ja.has(e))throw Ya(Xa);return t.facade=e,Ja.set(e,t),t},va=function(e){return Ja.get(e)||{}},ma=function(e){return Ja.has(e)}}else{var Qa=Ga("state");Wa[Qa]=!0,ga=function(e,t){if(za(e,Qa))throw Ya(Xa);return t.facade=e,Va(e,Qa,t),t},va=function(e){return za(e,Qa)?e[Qa]:{}},ma=function(e){return za(e,Qa)}}var Za={set:ga,get:va,has:ma,enforce:function(e){return ma(e)?va(e):ga(e,{})},getterFor:function(e){return function(t){var n;if(!Ha(t)||(n=va(t)).type!==e)throw Ya("Incompatible receiver, "+e+" required");return n}}},eo=$t,to=z,no=Ye,ro=Wn,io=jr,ao=v([].push),oo=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,a=6==e,o=7==e,s=5==e||a;return function(u,c,l,f){for(var h,d,p=no(u),g=to(p),v=eo(c,l),m=ro(g),y=0,b=f||io,w=t?b(u,m):n||o?b(u,0):void 0;m>y;y++)if((s||y in g)&&(d=v(h=g[y],y,p),e))if(t)w[y]=d;else if(d)switch(e){case 3:return!0;case 5:return h;case 6:return y;case 2:ao(w,h)}else switch(e){case 4:return!1;case 7:ao(w,h)}return a?-1:r||i?i:w}},so={forEach:oo(0),map:oo(1),filter:oo(2),some:oo(3),every:oo(4),find:oo(5),findIndex:oo(6),filterReject:oo(7)},uo=Cn,co=i,lo=N,fo=v,ho=C,po=be,go=a,vo=Qe,mo=se,yo=nn,bo=J,wo=Tt,So=ei,To=F,Eo=Gi,xo=Si,ko=Wi,Ao=$i,Mo=ua,Io=I,Co=Jt,Ro=ti,Po=j,No=la,jo=ha,Oo=Ge,_o=fi,Lo=rt,Do=ht,Uo=da,Fo=Ta,Ko=Ma,Bo=La,Ho=Za,Vo=so.forEach,zo=Ni("hidden"),qo="Symbol",Go="prototype",Wo=Ho.set,Xo=Ho.getterFor(qo),Yo=Object[Go],$o=co.Symbol,Jo=$o&&$o[Go],Qo=co.TypeError,Zo=co.QObject,es=Io.f,ts=Co.f,ns=Ao.f,rs=Po.f,is=fo([].push),as=Oo("symbols"),os=Oo("op-symbols"),ss=Oo("wks"),us=!Zo||!Zo[Go]||!Zo[Go].findChild,cs=ho&&go((function(){return 7!=Eo(ts({},"a",{get:function(){return ts(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=es(Yo,t);r&&delete Yo[t],ts(e,t,n),r&&e!==Yo&&ts(Yo,t,r)}:ts,ls=function(e,t){var n=as[e]=Eo(Jo);return Wo(n,{type:qo,tag:e,description:t}),ho||(n.description=t),n},fs=function(e,t,n){e===Yo&&fs(os,t,n),yo(e);var r=wo(t);return yo(n),vo(as,r)?(n.enumerable?(vo(e,zo)&&e[zo][r]&&(e[zo][r]=!1),n=Eo(n,{enumerable:To(0,!1)})):(vo(e,zo)||ts(e,zo,To(1,{})),e[zo][r]=!0),cs(e,r,n)):ts(e,r,n)},hs=function(e,t){yo(e);var n=bo(t),r=xo(n).concat(vs(n));return Vo(r,(function(t){ho&&!lo(ds,n,t)||fs(e,t,n[t])})),e},ds=function(e){var t=wo(e),n=lo(rs,this,t);return!(this===Yo&&vo(as,t)&&!vo(os,t))&&(!(n||!vo(this,t)||!vo(as,t)||vo(this,zo)&&this[zo][t])||n)},ps=function(e,t){var n=bo(e),r=wo(t);if(n!==Yo||!vo(as,r)||vo(os,r)){var i=es(n,r);return!i||!vo(as,r)||vo(n,zo)&&n[zo][r]||(i.enumerable=!0),i}},gs=function(e){var t=ns(bo(e)),n=[];return Vo(t,(function(e){vo(as,e)||vo(_o,e)||is(n,e)})),n},vs=function(e){var t=e===Yo,n=ns(t?os:bo(e)),r=[];return Vo(n,(function(e){!vo(as,e)||t&&!vo(Yo,e)||is(r,as[e])})),r};po||($o=function(){if(mo(Jo,this))throw Qo("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?So(arguments[0]):void 0,t=Lo(e),n=function(e){this===Yo&&lo(n,os,e),vo(this,zo)&&vo(this[zo],t)&&(this[zo][t]=!1),cs(this,t,To(1,e))};return ho&&us&&cs(Yo,t,{configurable:!0,set:n}),ls(t,e)},No(Jo=$o[Go],"toString",(function(){return Xo(this).tag})),No($o,"withoutSetter",(function(e){return ls(Lo(e),e)})),Po.f=ds,Co.f=fs,Ro.f=hs,Io.f=ps,ko.f=Ao.f=gs,Mo.f=vs,Uo.f=function(e){return ls(Do(e),e)},ho&&jo(Jo,"description",{configurable:!0,get:function(){return Xo(this).description}})),uo({global:!0,constructor:!0,wrap:!0,forced:!po,sham:!po},{Symbol:$o}),Vo(xo(ss),(function(e){Fo(e)})),uo({target:qo,stat:!0,forced:!po},{useSetter:function(){us=!0},useSimple:function(){us=!1}}),uo({target:"Object",stat:!0,forced:!po,sham:!ho},{create:function(e,t){return void 0===t?Eo(e):hs(Eo(e),t)},defineProperty:fs,defineProperties:hs,getOwnPropertyDescriptor:ps}),uo({target:"Object",stat:!0,forced:!po},{getOwnPropertyNames:gs}),Ko(),Bo($o,qo),_o[zo]=!0;var ms=be&&!!Symbol.for&&!!Symbol.keyFor,ys=Cn,bs=oe,ws=Qe,Ss=ei,Ts=Ge,Es=ms,xs=Ts("string-to-symbol-registry"),ks=Ts("symbol-to-string-registry");ys({target:"Symbol",stat:!0,forced:!Es},{for:function(e){var t=Ss(e);if(ws(xs,t))return xs[t];var n=bs("Symbol")(t);return xs[t]=n,ks[n]=t,n}});var As=Cn,Ms=Qe,Is=ke,Cs=Me,Rs=ms,Ps=Ge("symbol-to-string-registry");As({target:"Symbol",stat:!0,forced:!Rs},{keyFor:function(e){if(!Is(e))throw TypeError(Cs(e)+" is not a symbol");if(Ms(Ps,e))return Ps[e]}});var Ns=v([].slice),js=Un,Os=M,_s=w,Ls=ei,Ds=v([].push),Us=Cn,Fs=oe,Ks=f,Bs=N,Hs=v,Vs=a,zs=M,qs=ke,Gs=Ns,Ws=function(e){if(Os(e))return e;if(js(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];"string"==typeof i?Ds(n,i):"number"!=typeof i&&"Number"!=_s(i)&&"String"!=_s(i)||Ds(n,Ls(i))}var a=n.length,o=!0;return function(e,t){if(o)return o=!1,t;if(js(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}},Xs=be,Ys=String,$s=Fs("JSON","stringify"),Js=Hs(/./.exec),Qs=Hs("".charAt),Zs=Hs("".charCodeAt),eu=Hs("".replace),tu=Hs(1..toString),nu=/[\uD800-\uDFFF]/g,ru=/^[\uD800-\uDBFF]$/,iu=/^[\uDC00-\uDFFF]$/,au=!Xs||Vs((function(){var e=Fs("Symbol")();return"[null]"!=$s([e])||"{}"!=$s({a:e})||"{}"!=$s(Object(e))})),ou=Vs((function(){return'"\\udf06\\ud834"'!==$s("\udf06\ud834")||'"\\udead"'!==$s("\udead")})),su=function(e,t){var n=Gs(arguments),r=Ws(t);if(zs(r)||void 0!==e&&!qs(e))return n[1]=function(e,t){if(zs(r)&&(t=Bs(r,this,Ys(e),t)),!qs(t))return t},Ks($s,null,n)},uu=function(e,t,n){var r=Qs(n,t-1),i=Qs(n,t+1);return Js(ru,e)&&!Js(iu,i)||Js(iu,e)&&!Js(ru,r)?"\\u"+tu(Zs(e,0),16):e};$s&&Us({target:"JSON",stat:!0,arity:3,forced:au||ou},{stringify:function(e,t,n){var r=Gs(arguments),i=Ks(au?su:$s,null,r);return ou&&"string"==typeof i?eu(i,nu,uu):i}});var cu=ua,lu=Ye;Cn({target:"Object",stat:!0,forced:!be||a((function(){cu.f(1)}))},{getOwnPropertySymbols:function(e){var t=cu.f;return t?t(lu(e)):[]}}),Ta("asyncIterator"),Ta("hasInstance"),Ta("isConcatSpreadable"),Ta("iterator"),Ta("match"),Ta("matchAll"),Ta("replace"),Ta("search"),Ta("species"),Ta("split");var fu=Ma;Ta("toPrimitive"),fu();var hu=oe,du=La;Ta("toStringTag"),du(hu("Symbol"),"Symbol"),Ta("unscopables"),La(i.JSON,"JSON",!0);var pu,gu,vu,mu=te.Symbol,yu={},bu=C,wu=Qe,Su=Function.prototype,Tu=bu&&Object.getOwnPropertyDescriptor,Eu=wu(Su,"name"),xu={EXISTS:Eu,PROPER:Eu&&"something"===function(){}.name,CONFIGURABLE:Eu&&(!bu||bu&&Tu(Su,"name").configurable)},ku=!a((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Au=Qe,Mu=M,Iu=Ye,Cu=ku,Ru=Ni("IE_PROTO"),Pu=Object,Nu=Pu.prototype,ju=Cu?Pu.getPrototypeOf:function(e){var t=Iu(e);if(Au(t,Ru))return t[Ru];var n=t.constructor;return Mu(n)&&t instanceof n?n.prototype:t instanceof Pu?Nu:null},Ou=a,_u=M,Lu=ee,Du=Gi,Uu=ju,Fu=la,Ku=ht("iterator"),Bu=!1;[].keys&&("next"in(vu=[].keys())?(gu=Uu(Uu(vu)))!==Object.prototype&&(pu=gu):Bu=!0);var Hu=!Lu(pu)||Ou((function(){var e={};return pu[Ku].call(e)!==e}));_u((pu=Hu?{}:Du(pu))[Ku])||Fu(pu,Ku,(function(){return this}));var Vu={IteratorPrototype:pu,BUGGY_SAFARI_ITERATORS:Bu},zu=Vu.IteratorPrototype,qu=Gi,Gu=F,Wu=La,Xu=yu,Yu=function(){return this},$u=function(e,t,n,r){var i=t+" Iterator";return e.prototype=qu(zu,{next:Gu(+!r,n)}),Wu(e,i,!1,!0),Xu[i]=Yu,e},Ju=v,Qu=Pe,Zu=M,ec=String,tc=TypeError,nc=function(e,t,n){try{return Ju(Qu(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(r){}},rc=nn,ic=function(e){if("object"==typeof e||Zu(e))return e;throw tc("Can't set "+ec(e)+" as a prototype")},ac=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=nc(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(r){}return function(n,r){return rc(n),ic(r),t?e(n,r):n.__proto__=r,n}}():void 0),oc=Cn,sc=N,uc=xu,cc=$u,lc=ju,fc=La,hc=la,dc=yu,pc=Vu,gc=uc.PROPER,vc=pc.BUGGY_SAFARI_ITERATORS,mc=ht("iterator"),yc="keys",bc="values",wc="entries",Sc=function(){return this},Tc=function(e,t,n,r,i,a,o){cc(n,t,r);var s,u,c,l=function(e){if(e===i&&g)return g;if(!vc&&e in d)return d[e];switch(e){case yc:case bc:case wc:return function(){return new n(this,e)}}return function(){return new n(this)}},f=t+" Iterator",h=!1,d=e.prototype,p=d[mc]||d["@@iterator"]||i&&d[i],g=!vc&&p||l(i),v="Array"==t&&d.entries||p;if(v&&(s=lc(v.call(new e)))!==Object.prototype&&s.next&&(fc(s,f,!0,!0),dc[f]=Sc),gc&&i==bc&&p&&p.name!==bc&&(h=!0,g=function(){return sc(p,this)}),i)if(u={values:l(bc),keys:a?g:l(yc),entries:l(wc)},o)for(c in u)(vc||h||!(c in d))&&hc(d,c,u[c]);else oc({target:t,proto:!0,forced:vc||h},u);return o&&d[mc]!==g&&hc(d,mc,g,{name:i}),dc[t]=g,u},Ec=function(e,t){return{value:e,done:t}},xc=J,kc=yu,Ac=Za;Jt.f;var Mc=Tc,Ic=Ec,Cc="Array Iterator",Rc=Ac.set,Pc=Ac.getterFor(Cc);Mc(Array,"Array",(function(e,t){Rc(this,{type:Cc,target:xc(e),index:0,kind:t})}),(function(){var e=Pc(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,Ic(void 0,!0)):Ic("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),kc.Arguments=kc.Array;var Nc={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},jc=i,Oc=ur,_c=mn,Lc=yu,Dc=ht("toStringTag");for(var Uc in Nc){var Fc=jc[Uc],Kc=Fc&&Fc.prototype;Kc&&Oc(Kc)!==Dc&&_c(Kc,Dc,Uc),Lc[Uc]=Lc.Array}var Bc=mu;Ta("dispose");var Hc=Bc;Ta("asyncDispose");var Vc=Cn,zc=v,qc=oe("Symbol"),Gc=qc.keyFor,Wc=zc(qc.prototype.valueOf);Vc({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==Gc(Wc(e))}catch(t){return!1}}});for(var Xc=Cn,Yc=Ge,$c=oe,Jc=v,Qc=ke,Zc=ht,el=$c("Symbol"),tl=el.isWellKnown,nl=$c("Object","getOwnPropertyNames"),rl=Jc(el.prototype.valueOf),il=Yc("wks"),al=0,ol=nl(el),sl=ol.length;al<sl;al++)try{var ul=ol[al];Qc(el[ul])&&Zc(ul)}catch(v_){}Xc({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if(tl&&tl(e))return!0;try{for(var t=rl(e),n=0,r=nl(il),i=r.length;n<i;n++)if(il[r[n]]==t)return!0}catch(v_){}return!1}}),Ta("matcher"),Ta("metadataKey"),Ta("observable"),Ta("metadata"),Ta("patternMatch"),Ta("replaceAll");var cl=Hc,ll=t(cl),fl=v,hl=Hn,dl=ei,pl=X,gl=fl("".charAt),vl=fl("".charCodeAt),ml=fl("".slice),yl=function(e){return function(t,n){var r,i,a=dl(pl(t)),o=hl(n),s=a.length;return o<0||o>=s?e?"":void 0:(r=vl(a,o))<55296||r>56319||o+1===s||(i=vl(a,o+1))<56320||i>57343?e?gl(a,o):r:e?ml(a,o,o+2):i-56320+(r-55296<<10)+65536}},bl={codeAt:yl(!1),charAt:yl(!0)},wl=bl.charAt,Sl=ei,Tl=Za,El=Tc,xl=Ec,kl="String Iterator",Al=Tl.set,Ml=Tl.getterFor(kl);El(String,"String",(function(e){Al(this,{type:kl,string:Sl(e),index:0})}),(function(){var e,t=Ml(this),n=t.string,r=t.index;return r>=n.length?xl(void 0,!0):(e=wl(n,r),t.index+=e.length,xl(e,!1))}));var Il=da.f("iterator"),Cl=t(Il);function Rl(e){return(Rl="function"==typeof ll&&"symbol"==typeof Cl?function(e){return typeof e}:function(e){return e&&"function"==typeof ll&&e.constructor===ll&&e!==ll.prototype?"symbol":typeof e})(e)}var Pl=da.f("toPrimitive"),Nl=t(Pl);function jl(e){var t=function(e,t){if("object"!==Rl(e)||null===e)return e;var n=e[Nl];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Rl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Rl(t)?t:String(t)}function Ol(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),Ln(e,jl(r.key),r)}}function _l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}Cn({target:"Object",stat:!0,sham:!C},{create:Gi});var Ll=te.Object,Dl=function(e,t){return Ll.create(e,t)},Ul=t(Dl);Cn({target:"Object",stat:!0},{setPrototypeOf:ac});var Fl=te.Object.setPrototypeOf,Kl=t(Fl),Bl=v,Hl=Pe,Vl=ee,zl=Qe,ql=Ns,Gl=o,Wl=Function,Xl=Bl([].concat),Yl=Bl([].join),$l={},Jl=Gl?Wl.bind:function(e){var t=Hl(this),n=t.prototype,r=ql(arguments,1),i=function(){var n=Xl(r,ql(arguments));return this instanceof i?function(e,t,n){if(!zl($l,t)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";$l[t]=Wl("C,a","return new C("+Yl(r,",")+")")}return $l[t](e,n)}(t,n.length,n):t.apply(e,n)};return Vl(n)&&(i.prototype=n),i},Ql=Jl;Cn({target:"Function",proto:!0,forced:Function.bind!==Ql},{bind:Ql});var Zl=te,ef=function(e){return Zl[e+"Prototype"]},tf=ef("Function").bind,nf=se,rf=tf,af=Function.prototype,of=function(e){var t=e.bind;return e===af||nf(af,e)&&t===af.bind?rf:t},sf=t(of);function uf(e,t){var n;return(uf=Kl?sf(n=Kl).call(n):function(e,t){return e.__proto__=t,e})(e,t)}var cf=Ar,lf=Me,ff=TypeError,hf=function(e){if(cf(e))return e;throw ff(lf(e)+" is not a constructor")},df=Cn,pf=f,gf=Jl,vf=hf,mf=nn,yf=ee,bf=Gi,wf=a,Sf=oe("Reflect","construct"),Tf=Object.prototype,Ef=[].push,xf=wf((function(){function e(){}return!(Sf((function(){}),[],e)instanceof e)})),kf=!wf((function(){Sf((function(){}))})),Af=xf||kf;df({target:"Reflect",stat:!0,forced:Af,sham:Af},{construct:function(e,t){vf(e),mf(t);var n=arguments.length<3?e:vf(arguments[2]);if(kf&&!xf)return Sf(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 pf(Ef,r,t),new(pf(gf,e,r))}var i=n.prototype,a=bf(yf(i)?i:Tf),o=pf(e,a,t);return yf(o)?o:a}});var Mf=t(te.Reflect.construct),If=Ye,Cf=ju,Rf=ku;Cn({target:"Object",stat:!0,forced:a((function(){Cf(1)})),sham:!Rf},{getPrototypeOf:function(e){return Cf(If(e))}});var Pf=te.Object.getPrototypeOf,Nf=t(Pf);function jf(e){var t;return(jf=Kl?sf(t=Nf).call(t):function(e){return e.__proto__||Nf(e)})(e)}function Of(e){var t=function(){if("undefined"==typeof Reflect||!Mf)return!1;if(Mf.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Mf(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=jf(e);if(t){var i=jf(this).constructor;n=Mf(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Rl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _l(e)}(this,n)}}var _f=a,Lf=function(e,t){var n=[][e];return!!n&&_f((function(){n.call(null,t||function(){return 1},1)}))},Df=so.forEach,Uf=Lf("forEach")?[].forEach:function(e){return Df(this,e,arguments.length>1?arguments[1]:void 0)};Cn({target:"Array",proto:!0,forced:[].forEach!=Uf},{forEach:Uf});var Ff=ef("Array").forEach,Kf=ur,Bf=Qe,Hf=se,Vf=Ff,zf=Array.prototype,qf={DOMTokenList:!0,NodeList:!0},Gf=t((function(e){var t=e.forEach;return e===zf||Hf(zf,e)&&t===zf.forEach||Bf(qf,Kf(e))?Vf:t})),Wf=Me,Xf=TypeError,Yf=function(e,t){if(!delete e[t])throw Xf("Cannot delete property "+Wf(t)+" of "+Wf(e))},$f=na,Jf=Math.floor,Qf=function(e,t){var n=e.length,r=Jf(n/2);return n<8?Zf(e,t):eh(e,Qf($f(e,0,r),t),Qf($f(e,r),t),t)},Zf=function(e,t){for(var n,r,i=e.length,a=1;a<i;){for(r=a,n=e[a];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==a++&&(e[r]=n)}return e},eh=function(e,t,n,r){for(var i=t.length,a=n.length,o=0,s=0;o<i||s<a;)e[o+s]=o<i&&s<a?r(t[o],n[s])<=0?t[o++]:n[s++]:o<i?t[o++]:n[s++];return e},th=Qf,nh=ue.match(/firefox\/(\d+)/i),rh=!!nh&&+nh[1],ih=/MSIE|Trident/.test(ue),ah=ue.match(/AppleWebKit\/(\d+)\./),oh=!!ah&&+ah[1],sh=Cn,uh=v,ch=Pe,lh=Ye,fh=Wn,hh=Yf,dh=ei,ph=a,gh=th,vh=Lf,mh=rh,yh=ih,bh=ge,wh=oh,Sh=[],Th=uh(Sh.sort),Eh=uh(Sh.push),xh=ph((function(){Sh.sort(void 0)})),kh=ph((function(){Sh.sort(null)})),Ah=vh("sort"),Mh=!ph((function(){if(bh)return bh<70;if(!(mh&&mh>3)){if(yh)return!0;if(wh)return wh<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++)Sh.push({k:t+r,v:n})}for(Sh.sort((function(e,t){return t.v-e.v})),r=0;r<Sh.length;r++)t=Sh[r].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));sh({target:"Array",proto:!0,forced:xh||!kh||!Ah||!Mh},{sort:function(e){void 0!==e&&ch(e);var t=lh(this);if(Mh)return void 0===e?Th(t):Th(t,e);var n,r,i=[],a=fh(t);for(r=0;r<a;r++)r in t&&Eh(i,t[r]);for(gh(i,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:dh(t)>dh(n)?1:-1}}(e)),n=fh(i),r=0;r<n;)t[r]=i[r++];for(;r<a;)hh(t,r++);return t}});var Ih=ef("Array").sort,Ch=se,Rh=Ih,Ph=Array.prototype,Nh=t((function(e){var t=e.sort;return e===Ph||Ch(Ph,e)&&t===Ph.sort?Rh:t})),jh=Cn,Oh=li.indexOf,_h=Lf,Lh=E([].indexOf),Dh=!!Lh&&1/Lh([1],1,-0)<0;jh({target:"Array",proto:!0,forced:Dh||!_h("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return Dh?Lh(this,e,t)||0:Oh(this,e,t)}});var Uh=ef("Array").indexOf,Fh=se,Kh=Uh,Bh=Array.prototype,Hh=t((function(e){var t=e.indexOf;return e===Bh||Fh(Bh,e)&&t===Bh.indexOf?Kh:t})),Vh=Cn,zh=so.find,qh="find",Gh=!0;qh in[]&&Array(1)[qh]((function(){Gh=!1})),Vh({target:"Array",proto:!0,forced:Gh},{find:function(e){return zh(this,e,arguments.length>1?arguments[1]:void 0)}});var Wh=ef("Array").find,Xh=se,Yh=Wh,$h=Array.prototype,Jh=t((function(e){var t=e.find;return e===$h||Xh($h,e)&&t===$h.find?Yh:t})),Qh=ef("Array").concat,Zh=se,ed=Qh,td=Array.prototype,nd=t((function(e){var t=e.concat;return e===td||Zh(td,e)&&t===td.concat?ed:t})),rd=Ye,id=Si;Cn({target:"Object",stat:!0,forced:a((function(){id(1)}))},{keys:function(e){return id(rd(e))}});var ad=t(te.Object.keys),od=Cn,sd=Un,ud=Ar,cd=ee,ld=ai,fd=Wn,hd=J,dd=Zn,pd=ht,gd=Ns,vd=Dr("slice"),md=pd("species"),yd=Array,bd=Math.max;od({target:"Array",proto:!0,forced:!vd},{slice:function(e,t){var n,r,i,a=hd(this),o=fd(a),s=ld(e,o),u=ld(void 0===t?o:t,o);if(sd(a)&&(n=a.constructor,(ud(n)&&(n===yd||sd(n.prototype))||cd(n)&&null===(n=n[md]))&&(n=void 0),n===yd||void 0===n))return gd(a,s,u);for(r=new(void 0===n?yd:n)(bd(u-s,0)),i=0;s<u;s++,i++)s in a&&dd(r,i,a[s]);return r.length=i,r}});var wd=ef("Array").slice,Sd=se,Td=wd,Ed=Array.prototype,xd=t((function(e){var t=e.slice;return e===Ed||Sd(Ed,e)&&t===Ed.slice?Td:t})),kd=C,Ad=Un,Md=TypeError,Id=Object.getOwnPropertyDescriptor,Cd=kd&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(v_){return v_ instanceof TypeError}}(),Rd=Cn,Pd=Ye,Nd=ai,jd=Hn,Od=Wn,_d=Cd?function(e,t){if(Ad(e)&&!Id(e,"length").writable)throw Md("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},Ld=Yn,Dd=jr,Ud=Zn,Fd=Yf,Kd=Dr("splice"),Bd=Math.max,Hd=Math.min;Rd({target:"Array",proto:!0,forced:!Kd},{splice:function(e,t){var n,r,i,a,o,s,u=Pd(this),c=Od(u),l=Nd(e,c),f=arguments.length;for(0===f?n=r=0:1===f?(n=0,r=c-l):(n=f-2,r=Hd(Bd(jd(t),0),c-l)),Ld(c+n-r),i=Dd(u,r),a=0;a<r;a++)(o=l+a)in u&&Ud(i,a,u[o]);if(i.length=r,n<r){for(a=l;a<c-r;a++)s=a+n,(o=a+r)in u?u[s]=u[o]:Fd(u,s);for(a=c;a>c-r+n;a--)Fd(u,a-1)}else if(n>r)for(a=c-r;a>l;a--)s=a+n-1,(o=a+r-1)in u?u[s]=u[o]:Fd(u,s);for(a=0;a<n;a++)u[a+l]=arguments[a+2];return _d(u,c-r+n),i}});var Vd=ef("Array").splice,zd=se,qd=Vd,Gd=Array.prototype,Wd=t((function(e){var t=e.splice;return e===Gd||zd(Gd,e)&&t===Gd.splice?qd:t})),Xd=oe,Yd=Wi,$d=ua,Jd=nn,Qd=v([].concat),Zd=Xd("Reflect","ownKeys")||function(e){var t=Yd.f(Jd(e)),n=$d.f;return n?Qd(t,n(e)):t},ep=Qe,tp=Zd,np=I,rp=Jt,ip=ee,ap=mn,op=Error,sp=v("".replace),up=String(op("zxcasd").stack),cp=/\n\s*at [^:]*:[^\n]*/,lp=cp.test(up),fp=F,hp=!a((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",fp(1,7)),7!==e.stack)})),dp=mn,pp=function(e,t){if(lp&&"string"==typeof e&&!op.prepareStackTrace)for(;t--;)e=sp(e,cp,"");return e},gp=hp,vp=Error.captureStackTrace,mp=yu,yp=ht("iterator"),bp=Array.prototype,wp=function(e){return void 0!==e&&(mp.Array===e||bp[yp]===e)},Sp=ur,Tp=Oe,Ep=q,xp=yu,kp=ht("iterator"),Ap=function(e){if(!Ep(e))return Tp(e,kp)||Tp(e,"@@iterator")||xp[Sp(e)]},Mp=N,Ip=Pe,Cp=nn,Rp=Me,Pp=Ap,Np=TypeError,jp=function(e,t){var n=arguments.length<2?Pp(e):t;if(Ip(n))return Cp(Mp(n,e));throw Np(Rp(e)+" is not iterable")},Op=N,_p=nn,Lp=Oe,Dp=function(e,t,n){var r,i;_p(e);try{if(!(r=Lp(e,"return"))){if("throw"===t)throw n;return n}r=Op(r,e)}catch(v_){i=!0,r=v_}if("throw"===t)throw n;if(i)throw r;return _p(r),n},Up=$t,Fp=N,Kp=nn,Bp=Me,Hp=wp,Vp=Wn,zp=se,qp=jp,Gp=Ap,Wp=Dp,Xp=TypeError,Yp=function(e,t){this.stopped=e,this.result=t},$p=Yp.prototype,Jp=function(e,t,n){var r,i,a,o,s,u,c,l=n&&n.that,f=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),d=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),g=Up(t,l),v=function(e){return r&&Wp(r,"normal",e),new Yp(!0,e)},m=function(e){return f?(Kp(e),p?g(e[0],e[1],v):g(e[0],e[1])):p?g(e,v):g(e)};if(h)r=e.iterator;else if(d)r=e;else{if(!(i=Gp(e)))throw Xp(Bp(e)+" is not iterable");if(Hp(i)){for(a=0,o=Vp(e);o>a;a++)if((s=m(e[a]))&&zp($p,s))return s;return new Yp(!1)}r=qp(e,i)}for(u=h?e.next:r.next;!(c=Fp(u,r)).done;){try{s=m(c.value)}catch(v_){Wp(r,"throw",v_)}if("object"==typeof s&&s&&zp($p,s))return s}return new Yp(!1)},Qp=ei,Zp=Cn,eg=se,tg=ju,ng=ac,rg=function(e,t,n){for(var r=tp(t),i=rp.f,a=np.f,o=0;o<r.length;o++){var s=r[o];ep(e,s)||n&&ep(n,s)||i(e,s,a(t,s))}},ig=Gi,ag=mn,og=F,sg=function(e,t){ip(t)&&"cause"in t&&ap(e,"cause",t.cause)},ug=function(e,t,n,r){gp&&(vp?vp(e,t):dp(e,"stack",pp(n,r)))},cg=Jp,lg=function(e,t){return void 0===e?arguments.length<2?"":t:Qp(e)},fg=ht("toStringTag"),hg=Error,dg=[].push,pg=function(e,t){var n,r=eg(gg,this);ng?n=ng(hg(),r?tg(this):gg):(n=r?this:ig(gg),ag(n,fg,"Error")),void 0!==t&&ag(n,"message",lg(t)),ug(n,pg,n.stack,1),arguments.length>2&&sg(n,arguments[2]);var i=[];return cg(e,dg,{that:i}),ag(n,"errors",i),n};ng?ng(pg,hg):rg(pg,hg,{name:!0});var gg=pg.prototype=ig(hg.prototype,{constructor:og(1,pg),message:og(1,""),name:og(1,"AggregateError")});Zp({global:!0,constructor:!0,arity:2},{AggregateError:pg});var vg,mg,yg,bg,wg="undefined"!=typeof process&&"process"==w(process),Sg=oe,Tg=ha,Eg=C,xg=ht("species"),kg=function(e){var t=Sg(e);Eg&&t&&!t[xg]&&Tg(t,xg,{configurable:!0,get:function(){return this}})},Ag=se,Mg=TypeError,Ig=function(e,t){if(Ag(t,e))return e;throw Mg("Incorrect invocation")},Cg=nn,Rg=hf,Pg=q,Ng=ht("species"),jg=function(e,t){var n,r=Cg(e).constructor;return void 0===r||Pg(n=Cg(r)[Ng])?t:Rg(n)},Og=TypeError,_g=function(e,t){if(e<t)throw Og("Not enough arguments");return e},Lg=/(?:ipad|iphone|ipod).*applewebkit/i.test(ue),Dg=i,Ug=f,Fg=$t,Kg=M,Bg=Qe,Hg=a,Vg=Ci,zg=Ns,qg=At,Gg=_g,Wg=Lg,Xg=wg,Yg=Dg.setImmediate,$g=Dg.clearImmediate,Jg=Dg.process,Qg=Dg.Dispatch,Zg=Dg.Function,ev=Dg.MessageChannel,tv=Dg.String,nv=0,rv={},iv="onreadystatechange";Hg((function(){vg=Dg.location}));var av=function(e){if(Bg(rv,e)){var t=rv[e];delete rv[e],t()}},ov=function(e){return function(){av(e)}},sv=function(e){av(e.data)},uv=function(e){Dg.postMessage(tv(e),vg.protocol+"//"+vg.host)};Yg&&$g||(Yg=function(e){Gg(arguments.length,1);var t=Kg(e)?e:Zg(e),n=zg(arguments,1);return rv[++nv]=function(){Ug(t,void 0,n)},mg(nv),nv},$g=function(e){delete rv[e]},Xg?mg=function(e){Jg.nextTick(ov(e))}:Qg&&Qg.now?mg=function(e){Qg.now(ov(e))}:ev&&!Wg?(bg=(yg=new ev).port2,yg.port1.onmessage=sv,mg=Fg(bg.postMessage,bg)):Dg.addEventListener&&Kg(Dg.postMessage)&&!Dg.importScripts&&vg&&"file:"!==vg.protocol&&!Hg(uv)?(mg=uv,Dg.addEventListener("message",sv,!1)):mg=iv in qg("script")?function(e){Vg.appendChild(qg("script"))[iv]=function(){Vg.removeChild(this),av(e)}}:function(e){setTimeout(ov(e),0)});var cv={set:Yg,clear:$g},lv=function(){this.head=null,this.tail=null};lv.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 fv,hv,dv,pv,gv,vv=lv,mv=/ipad|iphone|ipod/i.test(ue)&&"undefined"!=typeof Pebble,yv=/web0s(?!.*chrome)/i.test(ue),bv=i,wv=$t,Sv=I.f,Tv=cv.set,Ev=vv,xv=Lg,kv=mv,Av=yv,Mv=wg,Iv=bv.MutationObserver||bv.WebKitMutationObserver,Cv=bv.document,Rv=bv.process,Pv=bv.Promise,Nv=Sv(bv,"queueMicrotask"),jv=Nv&&Nv.value;if(!jv){var Ov=new Ev,_v=function(){var e,t;for(Mv&&(e=Rv.domain)&&e.exit();t=Ov.get();)try{t()}catch(v_){throw Ov.head&&fv(),v_}e&&e.enter()};xv||Mv||Av||!Iv||!Cv?!kv&&Pv&&Pv.resolve?((pv=Pv.resolve(void 0)).constructor=Pv,gv=wv(pv.then,pv),fv=function(){gv(_v)}):Mv?fv=function(){Rv.nextTick(_v)}:(Tv=wv(Tv,bv),fv=function(){Tv(_v)}):(hv=!0,dv=Cv.createTextNode(""),new Iv(_v).observe(dv,{characterData:!0}),fv=function(){dv.data=hv=!hv}),jv=function(e){Ov.head||fv(),Ov.add(e)}}var Lv=jv,Dv=function(e){try{return{error:!1,value:e()}}catch(v_){return{error:!0,value:v_}}},Uv=i.Promise,Fv="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Kv=!Fv&&!wg&&"object"==typeof window&&"object"==typeof document,Bv=i,Hv=Uv,Vv=M,zv=Gt,qv=hr,Gv=ht,Wv=Kv,Xv=Fv,Yv=ge,$v=Hv&&Hv.prototype,Jv=Gv("species"),Qv=!1,Zv=Vv(Bv.PromiseRejectionEvent),em={CONSTRUCTOR:zv("Promise",(function(){var e=qv(Hv),t=e!==String(Hv);if(!t&&66===Yv)return!0;if(!$v.catch||!$v.finally)return!0;if(!Yv||Yv<51||!/native code/.test(e)){var n=new Hv((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[Jv]=r,!(Qv=n.then((function(){}))instanceof r))return!0}return!t&&(Wv||Xv)&&!Zv})),REJECTION_EVENT:Zv,SUBCLASSING:Qv},tm={},nm=Pe,rm=TypeError,im=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw rm("Bad Promise constructor");t=e,n=r})),this.resolve=nm(t),this.reject=nm(n)};tm.f=function(e){return new im(e)};var am,om,sm=Cn,um=wg,cm=i,lm=N,fm=la,hm=La,dm=kg,pm=Pe,gm=M,vm=ee,mm=Ig,ym=jg,bm=cv.set,wm=Lv,Sm=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(v_){}},Tm=Dv,Em=vv,xm=Za,km=Uv,Am=em,Mm=tm,Im="Promise",Cm=Am.CONSTRUCTOR,Rm=Am.REJECTION_EVENT,Pm=xm.getterFor(Im),Nm=xm.set,jm=km&&km.prototype,Om=km,_m=jm,Lm=cm.TypeError,Dm=cm.document,Um=cm.process,Fm=Mm.f,Km=Fm,Bm=!!(Dm&&Dm.createEvent&&cm.dispatchEvent),Hm="unhandledrejection",Vm=function(e){var t;return!(!vm(e)||!gm(t=e.then))&&t},zm=function(e,t){var n,r,i,a=t.value,o=1==t.state,s=o?e.ok:e.fail,u=e.resolve,c=e.reject,l=e.domain;try{s?(o||(2===t.rejection&&Ym(t),t.rejection=1),!0===s?n=a:(l&&l.enter(),n=s(a),l&&(l.exit(),i=!0)),n===e.promise?c(Lm("Promise-chain cycle")):(r=Vm(n))?lm(r,n,u,c):u(n)):c(a)}catch(v_){l&&!i&&l.exit(),c(v_)}},qm=function(e,t){e.notified||(e.notified=!0,wm((function(){for(var n,r=e.reactions;n=r.get();)zm(n,e);e.notified=!1,t&&!e.rejection&&Wm(e)})))},Gm=function(e,t,n){var r,i;Bm?((r=Dm.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),cm.dispatchEvent(r)):r={promise:t,reason:n},!Rm&&(i=cm["on"+e])?i(r):e===Hm&&Sm("Unhandled promise rejection",n)},Wm=function(e){lm(bm,cm,(function(){var t,n=e.facade,r=e.value;if(Xm(e)&&(t=Tm((function(){um?Um.emit("unhandledRejection",r,n):Gm(Hm,n,r)})),e.rejection=um||Xm(e)?2:1,t.error))throw t.value}))},Xm=function(e){return 1!==e.rejection&&!e.parent},Ym=function(e){lm(bm,cm,(function(){var t=e.facade;um?Um.emit("rejectionHandled",t):Gm("rejectionhandled",t,e.value)}))},$m=function(e,t,n){return function(r){e(t,r,n)}},Jm=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,qm(e,!0))},Qm=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw Lm("Promise can't be resolved itself");var r=Vm(t);r?wm((function(){var n={done:!1};try{lm(r,t,$m(Qm,n,e),$m(Jm,n,e))}catch(v_){Jm(n,v_,e)}})):(e.value=t,e.state=1,qm(e,!1))}catch(v_){Jm({done:!1},v_,e)}}};Cm&&(_m=(Om=function(e){mm(this,_m),pm(e),lm(am,this);var t=Pm(this);try{e($m(Qm,t),$m(Jm,t))}catch(v_){Jm(t,v_)}}).prototype,(am=function(e){Nm(this,{type:Im,done:!1,notified:!1,parent:!1,reactions:new Em,rejection:!1,state:0,value:void 0})}).prototype=fm(_m,"then",(function(e,t){var n=Pm(this),r=Fm(ym(this,Om));return n.parent=!0,r.ok=!gm(e)||e,r.fail=gm(t)&&t,r.domain=um?Um.domain:void 0,0==n.state?n.reactions.add(r):wm((function(){zm(r,n)})),r.promise})),om=function(){var e=new am,t=Pm(e);this.promise=e,this.resolve=$m(Qm,t),this.reject=$m(Jm,t)},Mm.f=Fm=function(e){return e===Om||undefined===e?new om(e):Km(e)}),sm({global:!0,constructor:!0,wrap:!0,forced:Cm},{Promise:Om}),hm(Om,Im,!1,!0),dm(Im);var Zm=ht("iterator"),ey=!1;try{var ty=0,ny={next:function(){return{done:!!ty++}},return:function(){ey=!0}};ny[Zm]=function(){return this},Array.from(ny,(function(){throw 2}))}catch(v_){}var ry=function(e,t){if(!t&&!ey)return!1;var n=!1;try{var r={};r[Zm]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(v_){}return n},iy=Uv,ay=em.CONSTRUCTOR||!ry((function(e){iy.all(e).then(void 0,(function(){}))})),oy=N,sy=Pe,uy=tm,cy=Dv,ly=Jp;Cn({target:"Promise",stat:!0,forced:ay},{all:function(e){var t=this,n=uy.f(t),r=n.resolve,i=n.reject,a=cy((function(){var n=sy(t.resolve),a=[],o=0,s=1;ly(e,(function(e){var u=o++,c=!1;s++,oy(n,t,e).then((function(e){c||(c=!0,a[u]=e,--s||r(a))}),i)})),--s||r(a)}));return a.error&&i(a.value),n.promise}});var fy=Cn,hy=em.CONSTRUCTOR;Uv&&Uv.prototype,fy({target:"Promise",proto:!0,forced:hy,real:!0},{catch:function(e){return this.then(void 0,e)}});var dy=N,py=Pe,gy=tm,vy=Dv,my=Jp;Cn({target:"Promise",stat:!0,forced:ay},{race:function(e){var t=this,n=gy.f(t),r=n.reject,i=vy((function(){var i=py(t.resolve);my(e,(function(e){dy(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var yy=N,by=tm;Cn({target:"Promise",stat:!0,forced:em.CONSTRUCTOR},{reject:function(e){var t=by.f(this);return yy(t.reject,void 0,e),t.promise}});var wy=nn,Sy=ee,Ty=tm,Ey=function(e,t){if(wy(e),Sy(t)&&t.constructor===e)return t;var n=Ty.f(e);return(0,n.resolve)(t),n.promise},xy=Cn,ky=Uv,Ay=em.CONSTRUCTOR,My=Ey,Iy=oe("Promise"),Cy=!Ay;xy({target:"Promise",stat:!0,forced:true},{resolve:function(e){return My(Cy&&this===Iy?ky:this,e)}});var Ry=N,Py=Pe,Ny=tm,jy=Dv,Oy=Jp;Cn({target:"Promise",stat:!0,forced:ay},{allSettled:function(e){var t=this,n=Ny.f(t),r=n.resolve,i=n.reject,a=jy((function(){var n=Py(t.resolve),i=[],a=0,o=1;Oy(e,(function(e){var s=a++,u=!1;o++,Ry(n,t,e).then((function(e){u||(u=!0,i[s]={status:"fulfilled",value:e},--o||r(i))}),(function(e){u||(u=!0,i[s]={status:"rejected",reason:e},--o||r(i))}))})),--o||r(i)}));return a.error&&i(a.value),n.promise}});var _y=N,Ly=Pe,Dy=oe,Uy=tm,Fy=Dv,Ky=Jp,By="No one promise resolved";Cn({target:"Promise",stat:!0,forced:ay},{any:function(e){var t=this,n=Dy("AggregateError"),r=Uy.f(t),i=r.resolve,a=r.reject,o=Fy((function(){var r=Ly(t.resolve),o=[],s=0,u=1,c=!1;Ky(e,(function(e){var l=s++,f=!1;u++,_y(r,t,e).then((function(e){f||c||(c=!0,i(e))}),(function(e){f||c||(f=!0,o[l]=e,--u||a(new n(o,By)))}))})),--u||a(new n(o,By))}));return o.error&&a(o.value),r.promise}});var Hy=Cn,Vy=Uv,zy=a,qy=oe,Gy=M,Wy=jg,Xy=Ey,Yy=Vy&&Vy.prototype;Hy({target:"Promise",proto:!0,real:!0,forced:!!Vy&&zy((function(){Yy.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Wy(this,qy("Promise")),n=Gy(e);return this.then(n?function(n){return Xy(t,e()).then((function(){return n}))}:e,n?function(n){return Xy(t,e()).then((function(){throw n}))}:e)}});var $y=te.Promise,Jy=tm,Qy=Dv;Cn({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=Jy.f(this),n=Qy(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}});var Zy=t($y),eb="\t\n\v\f\r \u2028\u2029\ufeff",tb=X,nb=ei,rb=eb,ib=v("".replace),ab=RegExp("^["+rb+"]+"),ob=RegExp("(^|[^"+rb+"])["+rb+"]+$"),sb=function(e){return function(t){var n=nb(tb(t));return 1&e&&(n=ib(n,ab,"")),2&e&&(n=ib(n,ob,"$1")),n}},ub={start:sb(1),end:sb(2),trim:sb(3)},cb=i,lb=a,fb=v,hb=ei,db=ub.trim,pb=eb,gb=cb.parseInt,vb=cb.Symbol,mb=vb&&vb.iterator,yb=/^[+-]?0x/i,bb=fb(yb.exec),wb=8!==gb(pb+"08")||22!==gb(pb+"0x16")||mb&&!lb((function(){gb(Object(mb))}))?function(e,t){var n=db(hb(e));return gb(n,t>>>0||(bb(yb,n)?16:10))}:gb;Cn({global:!0,forced:parseInt!=wb},{parseInt:wb});var Sb=t(te.parseInt),Tb=so.map;Cn({target:"Array",proto:!0,forced:!Dr("map")},{map:function(e){return Tb(this,e,arguments.length>1?arguments[1]:void 0)}});var Eb=ef("Array").map,xb=se,kb=Eb,Ab=Array.prototype,Mb=t((function(e){var t=e.map;return e===Ab||xb(Ab,e)&&t===Ab.map?kb:t}));Cn({target:"Array",stat:!0},{isArray:Un});var Ib=t(te.Array.isArray),Cb=ef("Array").keys,Rb=ur,Pb=Qe,Nb=se,jb=Cb,Ob=Array.prototype,_b={DOMTokenList:!0,NodeList:!0},Lb=t((function(e){var t=e.keys;return e===Ob||Nb(Ob,e)&&t===Ob.keys||Pb(_b,Rb(e))?jb:t})),Db=so.filter;Cn({target:"Array",proto:!0,forced:!Dr("filter")},{filter:function(e){return Db(this,e,arguments.length>1?arguments[1]:void 0)}});var Ub=ef("Array").filter,Fb=se,Kb=Ub,Bb=Array.prototype,Hb=t((function(e){var t=e.filter;return e===Bb||Fb(Bb,e)&&t===Bb.filter?Kb:t})),Vb=C,zb=v,qb=N,Gb=a,Wb=Si,Xb=ua,Yb=j,$b=Ye,Jb=z,Qb=Object.assign,Zb=Object.defineProperty,ew=zb([].concat),tw=!Qb||Gb((function(){if(Vb&&1!==Qb({b:1},Qb(Zb({},"a",{enumerable:!0,get:function(){Zb(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!=Qb({},e)[n]||Wb(Qb({},t)).join("")!=r}))?function(e,t){for(var n=$b(e),r=arguments.length,i=1,a=Xb.f,o=Yb.f;r>i;)for(var s,u=Jb(arguments[i++]),c=a?ew(Wb(u),a(u)):Wb(u),l=c.length,f=0;l>f;)s=c[f++],Vb&&!qb(o,u,s)||(n[s]=u[s]);return n}:Qb,nw=tw;Cn({target:"Object",stat:!0,arity:2,forced:Object.assign!==nw},{assign:nw});var rw=t(te.Object.assign),iw=t(te.Object.getOwnPropertySymbols),aw={exports:{}},ow=Cn,sw=a,uw=J,cw=I.f,lw=C;ow({target:"Object",stat:!0,forced:!lw||sw((function(){cw(1)})),sham:!lw},{getOwnPropertyDescriptor:function(e,t){return cw(uw(e),t)}});var fw=te.Object,hw=aw.exports=function(e,t){return fw.getOwnPropertyDescriptor(e,t)};fw.getOwnPropertyDescriptor.sham&&(hw.sham=!0);var dw=t(aw.exports),pw=Zd,gw=J,vw=I,mw=Zn;Cn({target:"Object",stat:!0,sham:!C},{getOwnPropertyDescriptors:function(e){for(var t,n,r=gw(e),i=vw.f,a=pw(r),o={},s=0;a.length>s;)void 0!==(n=i(r,t=a[s++]))&&mw(o,t,n);return o}});var yw=t(te.Object.getOwnPropertyDescriptors),bw={exports:{}},ww=Cn,Sw=C,Tw=ti.f;ww({target:"Object",stat:!0,forced:Object.defineProperties!==Tw,sham:!Sw},{defineProperties:Tw});var Ew=te.Object,xw=bw.exports=function(e,t){return Ew.defineProperties(e,t)};Ew.defineProperties.sham&&(xw.sham=!0);var kw=t(bw.exports),Aw=t(_n),Mw=t(cl),Iw=t(Il),Cw=t(Dl),Rw=t(Fl),Pw=t(of),Nw=t(Pf),jw=t(Ap),Ow=nn,_w=Dp,Lw=$t,Dw=N,Uw=Ye,Fw=function(e,t,n,r){try{return r?t(Ow(n)[0],n[1]):t(n)}catch(v_){_w(e,"throw",v_)}},Kw=wp,Bw=Ar,Hw=Wn,Vw=Zn,zw=jp,qw=Ap,Gw=Array,Ww=function(e){var t=Uw(e),n=Bw(this),r=arguments.length,i=r>1?arguments[1]:void 0,a=void 0!==i;a&&(i=Lw(i,r>2?arguments[2]:void 0));var o,s,u,c,l,f,h=qw(t),d=0;if(!h||this===Gw&&Kw(h))for(o=Hw(t),s=n?new this(o):Gw(o);o>d;d++)f=a?i(t[d],d):t[d],Vw(s,d,f);else for(l=(c=zw(t,h)).next,s=n?new this:[];!(u=Dw(l,c)).done;d++)f=a?Fw(c,i,[u.value,d],!0):u.value,Vw(s,d,f);return s.length=d,s},Xw=Ww;Cn({target:"Array",stat:!0,forced:!ry((function(e){Array.from(e)}))},{from:Xw});var Yw=t(te.Array.from),$w=t(Pl);function Jw(e,t){var n=ad(e);if(iw){var r=iw(e);t&&(r=Hb(r).call(r,(function(t){return dw(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qw(e){for(var t=1;t<arguments.length;t++){var n,r,i=null!=arguments[t]?arguments[t]:{};t%2?Gf(n=Jw(Object(i),!0)).call(n,(function(t){rS(e,t,i[t])})):yw?kw(e,yw(i)):Gf(r=Jw(Object(i))).call(r,(function(t){Aw(e,t,dw(i,t))}))}return e}function Zw(e){return(Zw="function"==typeof Mw&&"symbol"==typeof Iw?function(e){return typeof e}:function(e){return e&&"function"==typeof Mw&&e.constructor===Mw&&e!==Mw.prototype?"symbol":typeof e})(e)}function eS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tS(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),Aw(e,oS(r.key),r)}}function nS(e,t,n){return t&&tS(e.prototype,t),n&&tS(e,n),Aw(e,"prototype",{writable:!1}),e}function rS(e,t,n){return(t=oS(t))in e?Aw(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iS(e){return function(e){if(Ib(e))return aS(e)}(e)||function(e){if(void 0!==Mw&&null!=jw(e)||null!=e["@@iterator"])return Yw(e)}(e)||function(e,t){var n;if(!e)return;if("string"==typeof e)return aS(e,t);var r=xd(n=Object.prototype.toString.call(e)).call(n,8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Yw(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return aS(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function aS(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}function oS(e){var t=function(e,t){if("object"!==Rl(e)||null===e)return e;var n=e[$w];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Rl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Rl(t)?t:String(t)}var sS=so.some;Cn({target:"Array",proto:!0,forced:!Lf("some")},{some:function(e){return sS(this,e,arguments.length>1?arguments[1]:void 0)}});var uS=ef("Array").some,cS=se,lS=uS,fS=Array.prototype,hS=t((function(e){var t=e.some;return e===fS||cS(fS,e)&&t===fS.some?lS:t})),dS=Hn,pS=ei,gS=X,vS=RangeError,mS=v,yS=qn,bS=ei,wS=X,SS=mS((function(e){var t=pS(gS(this)),n="",r=dS(e);if(r<0||r==1/0)throw vS("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n})),TS=mS("".slice),ES=Math.ceil,xS=function(e){return function(t,n,r){var i,a,o=bS(wS(t)),s=yS(n),u=o.length,c=void 0===r?" ":bS(r);return s<=u||""==c?o:((a=SS(c,ES((i=s-u)/c.length))).length>i&&(a=TS(a,0,i)),e?o+a:a+o)}},kS={start:xS(!1),end:xS(!0)},AS=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(ue),MS=kS.start;Cn({target:"String",proto:!0,forced:AS},{padStart:function(e){return MS(this,e,arguments.length>1?arguments[1]:void 0)}});var IS,CS=ef("String").padStart,RS=se,PS=CS,NS=String.prototype,jS=t((function(e){var t=e.padStart;return"string"==typeof e||e===NS||RS(NS,e)&&t===NS.padStart?PS:t})),OS="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,_S=i,LS=f,DS=M,US=OS,FS=ue,KS=Ns,BS=_g,HS=_S.Function,VS=/MSIE .\./.test(FS)||US&&((IS=_S.Bun.version.split(".")).length<3||0==IS[0]&&(IS[1]<3||3==IS[1]&&0==IS[2])),zS=function(e,t){var n=t?2:1;return VS?function(r,i){var a=BS(arguments.length,1)>n,o=DS(r)?r:HS(r),s=a?KS(arguments,n):[],u=a?function(){LS(o,this,s)}:o;return t?e(u,i):e(u)}:e},qS=Cn,GS=i,WS=zS(GS.setInterval,!0);qS({global:!0,bind:!0,forced:GS.setInterval!==WS},{setInterval:WS});var XS=Cn,YS=i,$S=zS(YS.setTimeout,!0);XS({global:!0,bind:!0,forced:YS.setTimeout!==$S},{setTimeout:$S});var JS=t(te.setInterval),QS=t(te.setTimeout),ZS=so.every;Cn({target:"Array",proto:!0,forced:!Lf("every")},{every:function(e){return ZS(this,e,arguments.length>1?arguments[1]:void 0)}});var eT=ef("Array").every,tT=se,nT=eT,rT=Array.prototype,iT=t((function(e){var t=e.every;return e===rT||tT(rT,e)&&t===rT.every?nT:t})),aT=i,oT=a,sT=ei,uT=ub.trim,cT=eb,lT=v("".charAt),fT=aT.parseFloat,hT=aT.Symbol,dT=hT&&hT.iterator,pT=1/fT(cT+"-0")!=-1/0||dT&&!oT((function(){fT(Object(dT))}))?function(e){var t=uT(sT(e)),n=fT(t);return 0===n&&"-"==lT(t,0)?-0:n}:fT;Cn({global:!0,forced:parseFloat!=pT},{parseFloat:pT});var gT=t(te.parseFloat),vT=xu.PROPER,mT=a,yT=eb,bT=ub.trim;Cn({target:"String",proto:!0,forced:function(e){return mT((function(){return!!yT[e]()||"
"!=="
"[e]()||vT&&yT[e].name!==e}))}("trim")},{trim:function(){return bT(this)}});var wT=ef("String").trim,ST=se,TT=wT,ET=String.prototype,xT=t((function(e){var t=e.trim;return"string"==typeof e||e===ET||ST(ET,e)&&t===ET.trim?TT:t})),kT=Cn,AT=Date,MT=v(AT.prototype.getTime);kT({target:"Date",stat:!0},{now:function(){return MT(new AT)}});var IT,CT=t(te.Date.now),RT="undefined"!=typeof window&&window.location&&Hh(IT=window.location.href).call(IT,"xgplayerdebugger=1")>-1,PT="color: #525252; background-color: #90ee90;",NT="color: #525252; background-color: red;",jT="color: #525252; background-color: yellow; ",OT="%c[xgplayer]",_T={config:{debug:RT?3:0},logInfo:function(e){for(var t,n,r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];this.config.debug>=3&&(n=console).log.apply(n,nd(t=[OT,PT,e]).call(t,i))},logWarn:function(e){for(var t,n,r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];this.config.debug>=1&&(n=console).warn.apply(n,nd(t=[OT,jT,e]).call(t,i))},logError:function(e){var t,n;if(!(this.config.debug<1)){for(var r=this.config.debug>=2?"trace":"error",i=arguments.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];(n=console)[r].apply(n,nd(t=[OT,NT,e]).call(t,a))}}},LT=function(){function e(t){eS(this,e),this.bufferedList=t}return nS(e,[{key:"start",value:function(e){return this.bufferedList[e].start}},{key:"end",value:function(e){return this.bufferedList[e].end}},{key:"length",get:function(){return this.bufferedList.length}}]),e}(),DT={};DT.createDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",a=document.createElement(t);return a.className=i,a.innerHTML=n,Gf(e=ad(r)).call(e,(function(e){var n=e,i=r[e];"video"===t||"audio"===t||"live-video"===t?i&&a.setAttribute(n,i):a.setAttribute(n,i)})),a},DT.createDomFromHtml=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";try{var r=document.createElement("div");r.innerHTML=e;var i=r.children;if(r=null,i.length>0){var a;if(i=i[0],n&&DT.addClass(i,n),t)Gf(a=ad(t)).call(a,(function(e){i.setAttribute(e,t[e])}));return i}return null}catch(o){return _T.logError("util.createDomFromHtml",o),null}},DT.hasClass=function(e,t){if(!e||!t)return!1;try{return hS(Array.prototype).call(e.classList,(function(e){return e===t}))}catch(r){var n=e.className&&"object"===Zw(e.className)?e.getAttribute("class"):e.className;return n&&!!n.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}},DT.addClass=function(e,t){if(e&&t)try{var n;Gf(n=t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(n,(function(t){t&&e.classList.add(t)}))}catch(r){DT.hasClass(e,t)||(e.className&&"object"===Zw(e.className)?e.setAttribute("class",e.getAttribute("class")+" "+t):e.className+=" "+t)}},DT.removeClass=function(e,t){if(e&&t)try{var n;Gf(n=t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(n,(function(t){t&&e.classList.remove(t)}))}catch(i){var r;if(DT.hasClass(e,t))Gf(r=t.split(/\s+/g)).call(r,(function(t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className&&"object"===Zw(e.className)?e.setAttribute("class",e.getAttribute("class").replace(n," ")):e.className=e.className.replace(n," ")}))}},DT.toggleClass=function(e,t){var n;e&&Gf(n=t.split(/\s+/g)).call(n,(function(t){DT.hasClass(e,t)?DT.removeClass(e,t):DT.addClass(e,t)}))},DT.classNames=function(){for(var e=arguments,t=[],n=function(n){if("String"===DT.typeOf(e[n]))t.push(e[n]);else if("Object"===DT.typeOf(e[n])){var r;Mb(r=ad(e[n])).call(r,(function(r){e[n][r]&&t.push(r)}))}},r=0;r<arguments.length;r++)n(r);return t.join(" ")},DT.findDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1?arguments[1]:void 0;try{e=t.querySelector(n)}catch(r){_T.logError("util.findDom",r),0===Hh(n).call(n,"#")&&(e=t.getElementById(xd(n).call(n,1)))}return e},DT.getCss=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,!1)[t]},DT.padStart=function(e,t,n){for(var r=String(n),i=t>>0,a=Math.ceil(i/r.length),o=[],s=String(e);a--;)o.push(r);return o.join("").substring(0,i-s.length)+s},DT.format=function(e){if(window.isNaN(e))return"";e=Math.round(e);var t=jS(DT).call(DT,Math.floor(e/3600),2,0),n=jS(DT).call(DT,Math.floor((e-3600*t)/60),2,0),r=jS(DT).call(DT,Math.floor(e-3600*t-60*n),2,0);return("00"===t?[n,r]:[t,n,r]).join(":")},DT.event=function(e){if(e.touches){var t=e.touches[0]||e.changedTouches[0];e.clientX=t.clientX||0,e.clientY=t.clientY||0,e.offsetX=t.pageX-t.target.offsetLeft,e.offsetY=t.pageY-t.target.offsetTop}e._target=e.target||e.srcElement},DT.typeOf=function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},DT.deepCopy=function(e,t){var n;if("Object"===DT.typeOf(t)&&"Object"===DT.typeOf(e))return Gf(n=ad(t)).call(n,(function(n){if("Object"!==DT.typeOf(t[n])||t[n]instanceof Node)if("Array"===DT.typeOf(t[n])){var r;e[n]="Array"===DT.typeOf(e[n])?nd(r=e[n]).call(r,t[n]):t[n]}else e[n]=t[n];else void 0===e[n]||void 0===e[n]?e[n]=t[n]:DT.deepCopy(e[n],t[n])})),e},DT.deepMerge=function(e,t){var n;return Mb(n=ad(t)).call(n,(function(n){var r;"Array"===DT.typeOf(t[n])&&"Array"===DT.typeOf(e[n])?"Array"===DT.typeOf(e[n])&&(r=e[n]).push.apply(r,iS(t[n])):DT.typeOf(e[n])!==DT.typeOf(t[n])||null===e[n]||"Object"!==DT.typeOf(e[n])||t[n]instanceof window.Node?null!==t[n]&&(e[n]=t[n]):DT.deepMerge(e[n],t[n])})),e},DT.getBgImage=function(e){var t=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;if(!t||"none"===t)return"";var n=document.createElement("a");return n.href=t.replace(/url\("|"\)/g,""),n.href},DT.copyDom=function(e){if(e&&1===e.nodeType){var t=document.createElement(e.tagName);return Gf(Array.prototype).call(e.attributes,(function(e){t.setAttribute(e.name,e.value)})),e.innerHTML&&(t.innerHTML=e.innerHTML),t}return""},DT.setInterval=function(e,t,n,r){e._interval[t]||(e._interval[t]=JS(Pw(n).call(n,e),r))},DT.clearInterval=function(e,t){clearInterval(e._interval[t]),e._interval[t]=null},DT.setTimeout=function(e,t,n){e._timers||(e._timers=[]);var r=QS((function(){t(),DT.clearTimeout(e,r)}),n);return e._timers.push(r),r},DT.clearTimeout=function(e,t){var n=e._timers;if("Array"===DT.typeOf(n)){for(var r=0;r<n.length;r++)if(n[r]===t){Wd(n).call(n,r,1),clearTimeout(t);break}}else clearTimeout(t)},DT.clearAllTimers=function(e){var t=e._timers;"Array"===DT.typeOf(t)&&(Mb(t).call(t,(function(e){clearTimeout(e)})),e._timerIds=[])},DT.createImgBtn=function(e,t,n,r){var i,a,o,s,u,c,l,f,h,d,p,g,v=DT.createDom("xg-".concat(e),"",{},"xgplayer-".concat(e,"-img"));(v.style.backgroundImage='url("'.concat(t,'")'),n&&r)&&(iT(i=["px","rem","em","pt","dp","vw","vh","vm","%"]).call(i,(function(e){var t,i;return!(Hh(n).call(n,e)>-1&&Hh(r).call(r,e)>-1)||(l=gT(xT(t=xd(n).call(n,0,Hh(n).call(n,e))).call(t)),f=gT(xT(i=xd(r).call(r,0,Hh(r).call(r,e))).call(i)),h=e,!1)})),v.style.width=nd(a="".concat(l)).call(a,h),v.style.height=nd(o="".concat(f)).call(o,h),v.style.backgroundSize=nd(s=nd(u=nd(c="".concat(l)).call(c,h," ")).call(u,f)).call(s,h),v.style.margin="start"===e?nd(d=nd(p=nd(g="-".concat(f/2)).call(g,h," auto auto -")).call(p,l/2)).call(d,h):"auto 5px auto 5px");return v},DT.Hex2RGBA=function(e,t){var n,r=[];if(/^\#[0-9A-F]{3}$/i.test(e)){var i="#";e.replace(/[0-9A-F]/gi,(function(e){i+=e+e})),e=i}return/^#[0-9A-F]{6}$/i.test(e)?(e.replace(/[0-9A-F]{2}/gi,(function(e){r.push(Sb(e,16))})),nd(n="rgba(".concat(r.join(","),", ")).call(n,t,")")):"rgba(255, 255, 255, 0.1)"},DT.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},DT.checkIsFunction=function(e){return e&&"function"==typeof e},DT.checkIsObject=function(e){return null!==e&&"object"===Zw(e)},DT.hide=function(e){e.style.display="none"},DT.show=function(e,t){e.style.display=t||"block"},DT.isUndefined=function(e){if(null==e)return!0},DT.isNotNull=function(e){return!(null==e)},DT.setStyleFromCsstext=function(e,t){if(t)if("String"===DT.typeOf(t)){var n=t.replace(/\s+/g,"").split(";");Mb(n).call(n,(function(t){if(t){var n=t.split(":");n.length>1&&(e.style[n[0]]=n[1])}}))}else{var r;Mb(r=ad(t)).call(r,(function(n){e.style[n]=t[n]}))}},DT.filterStyleFromText=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["width","height","top","left","bottom","right","position","z-index","padding","margin","transform"],r=e.style.cssText;if(!r)return{};var i=r.replace(/\s+/g,"").split(";"),a={},o={};return Mb(i).call(i,(function(e){if(e){var t=e.split(":");t.length>1&&(!function(e,t){for(var n=0,r=t.length;n<r;n++)if(Hh(e).call(e,t[n])>-1)return!0;return!1}(t[0],n)?o[t[0]]=t[1]:a[t[0]]=t[1])}})),e.setAttribute("style",""),Mb(t=ad(o)).call(t,(function(t){e.style[t]=o[t]})),a},DT.getStyleFromCsstext=function(e){var t=e.style.cssText;if(!t)return{};var n=t.replace(/\s+/g,"").split(";"),r={};return Mb(n).call(n,(function(e){if(e){var t=e.split(":");t.length>1&&(r[t[0]]=t[1])}})),r},DT.preloadImg=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(e){var r=new window.Image;r.onload=function(e){r=null,t&&t(e)},r.onerror=function(e){r=null,n&&n(e)},r.src=e}},DT.stopPropagation=function(e){e&&e.stopPropagation()},DT.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},DT.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},DT.checkTouchSupport=function(){return"ontouchstart"in window},DT.getBuffered2=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,n=[],r=0;r<e.length;r++)n.push({start:e.start(r)<.5?0:e.start(r),end:e.end(r)});Nh(n).call(n,(function(e,t){var n=e.start-t.start;return n||t.end-e.end}));var i=[];if(t)for(var a=0;a<n.length;a++){var o=i.length;if(o){var s=i[o-1].end;n[a].start-s<t?n[a].end>s&&(i[o-1].end=n[a].end):i.push(n[a])}else i.push(n[a])}else i=n;return new LT(i)},DT.getEventPos=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.touches&&e.touches.length>0&&(e=e.touches[0]),{x:e.x/t,y:e.y/t,clientX:e.clientX/t,clientY:e.clientY/t,offsetX:e.offsetX/t,offsetY:e.offsetY/t,pageX:e.pageX/t,pageY:e.pageY/t}},DT.requestAnimationFrame=function(e){var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(t)return t(e)},DT.getHostFromUrl=function(e){if("String"!==DT.typeOf(e))return"";var t=e.split("/"),n="";return t.length>3&&t[2]&&(n=t[2]),n},DT.cancelAnimationFrame=function(e){var t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;t&&t(e)},DT.isMSE=function(e){return e.media&&(e=e.media),!!(e&&e instanceof HTMLMediaElement)&&(/^blob/.test(e.currentSrc)||/^blob/.test(e.src))},DT.isBlob=function(e){return"string"==typeof e&&/^blob/.test(e)},DT.generateSessionId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(new Date).getTime();try{e=Sb(e)}catch(n){e=0}return t+=e,window.performance&&"function"==typeof window.performance.now&&(t+=Sb(window.performance.now())),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?n:3&n|8).toString(16)}))},DT.createEvent=function(e){var t;return"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},DT.adjustTimeByDuration=function(e,t,n){return t&&e&&(e>t||n&&e<t)?t:e},DT.createPositionBar=function(e,t){var n=DT.createDom("xg-bar","",{"data-index":-1},e);return t.appendChild(n),n},DT.getTransformStyle=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0,scale:1,rotate:0},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r={scale:"".concat(t.scale||1),translate:nd(e="".concat(t.x||0,"%, ")).call(e,t.y||0,"%"),rotate:"".concat(t.rotate||0,"deg")},i=ad(r);return Gf(i).call(i,(function(e){var t,i=new RegExp("".concat(e,"\\([^\\(]+\\)"),"g"),a=nd(t="".concat(e,"(")).call(t,r[e],")");i.test(n)?(i.lastIndex=-1,n=n.replace(i,a)):n+="".concat(a," ")})),n},DT.convertDeg=function(e){return Math.abs(e)<=1?360*e:e%360},DT.getIndexByTime=function(e,t){var n=t.length,r=-1;if(n<1)return r;if(e<=t[0].end||n<2)r=0;else if(e>t[n-1].end)r=n-1;else for(var i=1;i<n;i++)if(e>t[i-1].end&&e<=t[i].end){r=i;break}return r},DT.getOffsetCurrentTime=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=-1;if((r=n>=0&&n<t.length?n:DT.getIndexByTime(e,t))<0)return-1;var i=t.length,a=t[r],o=a.start,s=a.end,u=a.cTime,c=a.offset;return e<o?u:e>=o&&e<=s?e-c:e>s&&r>=i-1?s:-1},DT.getCurrentTimeByOffset=function(e,t){var n=-1;if(!t||t.length<0)return e;for(var r=0;r<t.length;r++)if(e<=t[r].duration){n=r;break}if(-1!==n){var i=t[n].start;return n-1<0?i+e:i+(e-t[n-1].duration)}return e};var UT=/(Android)\s([\d.]+)/,FT=/(Version)\/([\d.]+)/,KT=["avc1.42E01E, mp4a.40.2","avc1.58A01E, mp4a.40.2","avc1.4D401E, mp4a.40.2","avc1.64001E, mp4a.40.2","avc1.42E01E","mp4v.20.8","mp4v.20.8, mp4a.40.2","mp4v.20.240, mp4a.40.2"],BT={get device(){return BT.os.isPc?"pc":"mobile"},get browser(){var e,t;if("undefined"==typeof navigator)return"";var n=navigator.userAgent.toLowerCase(),r={ie:/rv:([\d.]+)\) like gecko/,firefox:/firefox\/([\d.]+)/,chrome:/chrome\/([\d.]+)/,opera:/opera.([\d.]+)/,safari:/version\/([\d.]+).*safari/};return nd(e=[]).call(e,Hb(t=ad(r)).call(t,(function(e){return r[e].test(n)})))[0]},get os(){if("undefined"==typeof navigator)return{};var e=navigator.userAgent,t=/(?:Windows Phone)/.test(e),n=/(?:SymbianOS)/.test(e)||t,r=/(?:Android)/.test(e),i=/(?:Firefox)/.test(e),a=/(?:iPad|PlayBook)/.test(e)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,o=a||r&&!/(?:Mobile)/.test(e)||i&&/(?:Tablet)/.test(e),s=/(?:iPhone)/.test(e)&&!o;return{isTablet:o,isPhone:s,isIpad:a,isIos:s||a,isAndroid:r,isPc:!(s||r||n||o),isSymbian:n,isWindowsPhone:t,isFireFox:i}},get osVersion(){if("undefined"==typeof navigator)return 0;var e=navigator.userAgent,t="",n=(t=/(?:iPhone)|(?:iPad|PlayBook)/.test(e)?FT:UT)?t.exec(e):[];if(n&&n.length>=3){var r=n[2].split(".");return r.length>0?Sb(r[0]):0}return 0},get isWeixin(){if("undefined"==typeof navigator)return!1;return!!/(micromessenger)\/([\d.]+)/.exec(navigator.userAgent.toLocaleLowerCase())},isSupportMP4:function(){var e={isSupport:!1,mime:""};if("undefined"==typeof document)return e;if(this.supportResult)return this.supportResult;var t=document.createElement("video");return"function"==typeof t.canPlayType&&Mb(KT).call(KT,(function(n){"probably"===t.canPlayType('video/mp4; codecs="'.concat(n,'"'))&&(e.isSupport=!0,e.mime+="||".concat(n))})),this.supportResult=e,t=null,e},isMSESupport:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'video/mp4; codecs="avc1.42E01E,mp4a.40.2"';if("undefined"==typeof MediaSource||!MediaSource)return!1;try{return MediaSource.isTypeSupported(e)}catch(v_){return this._logger.error(e,v_),!1}},isHevcSupported:function(){return!("undefined"==typeof MediaSource||!MediaSource.isTypeSupported)&&(MediaSource.isTypeSupported('video/mp4;codecs="hev1.1.6.L120.90"')||MediaSource.isTypeSupported('video/mp4;codecs="hev1.2.4.L120.90"')||MediaSource.isTypeSupported('video/mp4;codecs="hev1.3.E.L120.90"')||MediaSource.isTypeSupported('video/mp4;codecs="hev1.4.10.L120.90"'))},probeConfigSupported:function(e){var t={supported:!1,smooth:!1,powerEfficient:!1};if(!e||"undefined"==typeof navigator)return Zy.resolve(t);if(navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo)return navigator.mediaCapabilities.decodingInfo(e);var n=e.video||{},r=e.audio||{};try{var i=MediaSource.isTypeSupported(n.contentType),a=MediaSource.isTypeSupported(r.contentType);return Zy.resolve({supported:i&&a,smooth:!1,powerEfficient:!1})}catch(o){return Zy.resolve(t)}}};function HT(e,t,n){for(var r,i=arguments.length,a=new Array(i>3?i-3:0),o=3;o<i;o++)a[o-3]=arguments[o];var s,u=t.call.apply(t,nd(r=[e]).call(r,a));n&&"function"==typeof n&&(u&&u.then?u.then((function(){for(var t,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];n.call.apply(n,nd(t=[e]).call(t,i))})):n.call.apply(n,nd(s=[e]).call(s,a)))}function VT(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{pre:null,next:null};return this.__hooks||(this.__hooks={}),!this.__hooks[e]&&(this.__hooks[e]=null),Pw(n=function(){var n,i=arguments,a=this;if(r.pre)try{var o,s;(s=r.pre).call.apply(s,nd(o=[this]).call(o,xd(Array.prototype).call(arguments)))}catch(g){var u,c;throw g.message=nd(u=nd(c="[pluginName: ".concat(this.pluginName,":")).call(c,e,":pre error] >> ")).call(u,g.message),g}if(this.__hooks&&this.__hooks[e])try{var l,f=function(e,t,n){for(var r=arguments.length,i=new Array(r>3?r-3:0),a=3;a<r;a++)i[a-3]=arguments[a];if(e.__hooks&&Ib(e.__hooks[t])){var o,s=e.__hooks[t],u=-1,c=function e(t,n,r){for(var i,a,o=arguments.length,c=new Array(o>3?o-3:0),l=3;l<o;l++)c[l-3]=arguments[l];if(u++,0===s.length||u===s.length)return r.call.apply(r,nd(a=[t,t]).call(a,c));var f,h=s[u],d=h.call.apply(h,nd(i=[t,t]).call(i,c));return d&&d.then?d.then((function(i){var a;return!1===i?null:e.apply(void 0,nd(a=[t,n,r]).call(a,c))})).catch((function(e){console.warn("[runHooks]".concat(n," reject"),e.message)})):!1!==d?e.apply(void 0,nd(f=[t,n,r]).call(f,c)):void 0};return c.apply(void 0,nd(o=[e,t,n]).call(o,i))}var l;return n.call.apply(n,nd(l=[e,e]).call(l,i))}(this,e,t);if(f)if(f.then)f.then((function(e){var n;!1!==e&&HT.apply(void 0,nd(n=[a,t,r.next]).call(n,iS(i)))})).catch((function(e){throw e}));else HT.apply(void 0,nd(l=[this,t,r.next]).call(l,xd(Array.prototype).call(arguments)));else if(void 0===f){var h;HT.apply(void 0,nd(h=[this,t,r.next]).call(h,xd(Array.prototype).call(arguments)))}}catch(g){var d,p;throw g.message=nd(d=nd(p="[pluginName: ".concat(this.pluginName,":")).call(p,e,"] >> ")).call(d,g.message),g}else HT.apply(void 0,nd(n=[this,t,r.next]).call(n,xd(Array.prototype).call(arguments)))}).call(n,this)}function zT(e,t){var n=this.__hooks;if(!n||!Ib(n[e]))return-1;for(var r=n[e],i=0;i<r.length;i++)if(r[i]===t)return i;return-1}function qT(e,t){var n=this.__hooks;if(n)return n.hasOwnProperty(e)?(Ib(n[e])||(n[e]=[]),-1===zT.call(this,e,t)&&n[e].push(t),!0):(console.warn("has no supported hook which name [".concat(e,"]")),!1)}function GT(e,t){var n=this.__hooks;if(n)if(Ib(n[e])){var r=n[e],i=zT.call(this,e,t);-1!==i&&Wd(r).call(r,i,1)}else n[e]&&(n[e]=null)}function WT(e,t){var n;_T.logError(nd(n="[".concat(e,"] event or callback cant be undefined or null when call ")).call(n,t))}var XT=function(){function e(t){eS(this,e),DT.checkIsFunction(this.beforeCreate)&&this.beforeCreate(t),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.__hooks={},t&&Mb(t).call(t,(function(t){e.__hooks[t]=null})),Aw(e,"hooks",{get:function(){var t;return e.__hooks&&Mb(t=ad(e.__hooks)).call(t,(function(t){if(e.__hooks[t])return t}))}})}(this),this.__args=t,this.__events={},this.__onceEvents={},this.config=t.config||{},this.player=null,this.playerConfig={},this.pluginName="",this.__init(t)}return nS(e,[{key:"beforeCreate",value:function(e){}},{key:"afterCreate",value:function(){}},{key:"beforePlayerInit",value:function(){}},{key:"onPluginsReady",value:function(){}},{key:"afterPlayerInit",value:function(){}},{key:"destroy",value:function(){}},{key:"__init",value:function(e){this.player=e.player,this.playerConfig=e.player&&e.player.config,this.pluginName=e.pluginName?e.pluginName.toLowerCase():this.constructor.pluginName.toLowerCase(),this.logger=e.player&&e.player.logger}},{key:"updateLang",value:function(e){e||(e=this.lang)}},{key:"lang",get:function(){return this.player.lang}},{key:"i18n",get:function(){return this.player.i18n}},{key:"i18nKeys",get:function(){return this.player.i18nKeys}},{key:"domEventType",get:function(){var e=DT.checkTouchSupport()?"touch":"mouse";return!this.playerConfig||"touch"!==this.playerConfig.domEventType&&"mouse"!==this.playerConfig.domEventType||(e=this.playerConfig.domEventType),e}},{key:"on",value:function(e,t){var n=this;e&&t&&this.player?"string"==typeof e?(this.__events[e]=t,this.player.on(e,t)):Ib(e)&&Gf(e).call(e,(function(e){n.__events[e]=t,n.player.on(e,t)})):WT(this.pluginName,"plugin.on(event, callback)")}},{key:"once",value:function(e,t){var n=this;e&&t&&this.player?"string"==typeof e?(this.__onceEvents[e]=t,this.player.once(e,t)):Ib(e)&&Gf(e).call(e,(function(r){n.__onceEvents[r]=t,n.player.once(e,t)})):WT(this.pluginName,"plugin.once(event, callback)")}},{key:"off",value:function(e,t){var n=this;e&&t&&this.player?"string"==typeof e?(delete this.__events[e],this.player.off(e,t)):Ib(e)&&Gf(e).call(e,(function(r){delete n.__events[e],n.player.off(r,t)})):WT(this.pluginName,"plugin.off(event, callback)")}},{key:"offAll",value:function(){var e,t=this;Gf(e=["__events","__onceEvents"]).call(e,(function(e){var n;Gf(n=ad(t[e])).call(n,(function(n){t[e][n]&&t.off(n,t[e][n]),n&&delete t[e][n]}))})),this.__events={},this.__onceEvents={}}},{key:"emit",value:function(e){var t,n;if(this.player){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];(n=this.player).emit.apply(n,nd(t=[e]).call(t,i))}}},{key:"emitUserAction",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.player){var r=Qw(Qw({},n),{},{pluginName:this.pluginName});this.player.emitUserAction(e,t,r)}}},{key:"hook",value:function(e,t){var n;return VT.call.apply(VT,nd(n=[this]).call(n,xd(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){for(var n,r=arguments.length,i=new Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a];return qT.call.apply(qT,nd(n=[this]).call(n,xd(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){for(var n,r=arguments.length,i=new Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a];return GT.call.apply(GT,nd(n=[this]).call(n,xd(Array.prototype).call(arguments)))}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(this.player)return n&&(t.pluginName=n),this.player.registerPlugin({plugin:e,options:t})}},{key:"getPlugin",value:function(e){return this.player?this.player.getPlugin(e):null}},{key:"__destroy",value:function(){var e,t=this,n=this.player,r=this.pluginName;this.offAll(),DT.clearAllTimers(this),DT.checkIsFunction(this.destroy)&&this.destroy(),Mb(e=["player","playerConfig","pluginName","logger","__args","__hooks"]).call(e,(function(e){t[e]=null})),n.unRegisterPlugin(r),this.__hooks=null}}],[{key:"defineGetterOrSetter",value:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&Aw(e,n,t[n])}},{key:"defineMethod",value:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&"function"==typeof t[n]&&Aw(e,n,{configurable:!0,value:t[n]})}},{key:"defaultConfig",get:function(){return{}}},{key:"pluginName",get:function(){return"pluginName"}}]),e}(),YT=Cn,$T=so.findIndex,JT="findIndex",QT=!0;JT in[]&&Array(1)[JT]((function(){QT=!1})),YT({target:"Array",proto:!0,forced:QT},{findIndex:function(e){return $T(this,e,arguments.length>1?arguments[1]:void 0)}});var ZT=ef("Array").findIndex,eE=se,tE=ZT,nE=Array.prototype,rE=t((function(e){var t=e.findIndex;return e===nE||eE(nE,e)&&t===nE.findIndex?tE:t})),iE=a,aE=ht("iterator"),oE=!iE((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[aE]||"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})),sE=v,uE=2147483647,cE=/[^\0-\u007E]/,lE=/[.\u3002\uFF0E\uFF61]/g,fE="Overflow: input needs wider integers to process",hE=RangeError,dE=sE(lE.exec),pE=Math.floor,gE=String.fromCharCode,vE=sE("".charCodeAt),mE=sE([].join),yE=sE([].push),bE=sE("".replace),wE=sE("".split),SE=sE("".toLowerCase),TE=function(e){return e+22+75*(e<26)},EE=function(e,t,n){var r=0;for(e=n?pE(e/700):e>>1,e+=pE(e/t);e>455;)e=pE(e/35),r+=36;return pE(r+36*e/(e+38))},xE=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=vE(e,n++);if(i>=55296&&i<=56319&&n<r){var a=vE(e,n++);56320==(64512&a)?yE(t,((1023&i)<<10)+(1023&a)+65536):(yE(t,i),n--)}else yE(t,i)}return t}(e);var n,r,i=e.length,a=128,o=0,s=72;for(n=0;n<e.length;n++)(r=e[n])<128&&yE(t,gE(r));var u=t.length,c=u;for(u&&yE(t,"-");c<i;){var l=uE;for(n=0;n<e.length;n++)(r=e[n])>=a&&r<l&&(l=r);var f=c+1;if(l-a>pE((uE-o)/f))throw hE(fE);for(o+=(l-a)*f,a=l,n=0;n<e.length;n++){if((r=e[n])<a&&++o>uE)throw hE(fE);if(r==a){for(var h=o,d=36;;){var p=d<=s?1:d>=s+26?26:d-s;if(h<p)break;var g=h-p,v=36-p;yE(t,gE(TE(p+g%v))),h=pE(g/v),d+=36}yE(t,gE(TE(h))),s=EE(o,f,c==u),o=0,c++}}o++,a++}return mE(t,"")},kE=la,AE=function(e,t,n){for(var r in t)n&&n.unsafe&&e[r]?e[r]=t[r]:kE(e,r,t[r],n);return e},ME=Cn,IE=i,CE=N,RE=v,PE=C,NE=oE,jE=la,OE=ha,_E=AE,LE=La,DE=$u,UE=Za,FE=Ig,KE=M,BE=Qe,HE=$t,VE=ur,zE=nn,qE=ee,GE=ei,WE=Gi,XE=F,YE=jp,$E=Ap,JE=_g,QE=th,ZE=ht("iterator"),ex="URLSearchParams",tx=ex+"Iterator",nx=UE.set,rx=UE.getterFor(ex),ix=UE.getterFor(tx),ax=Object.getOwnPropertyDescriptor,ox=function(e){if(!PE)return IE[e];var t=ax(IE,e);return t&&t.value},sx=ox("fetch"),ux=ox("Request"),cx=ox("Headers"),lx=ux&&ux.prototype,fx=cx&&cx.prototype,hx=IE.RegExp,dx=IE.TypeError,px=IE.decodeURIComponent,gx=IE.encodeURIComponent,vx=RE("".charAt),mx=RE([].join),yx=RE([].push),bx=RE("".replace),wx=RE([].shift),Sx=RE([].splice),Tx=RE("".split),Ex=RE("".slice),xx=/\+/g,kx=Array(4),Ax=function(e){return kx[e-1]||(kx[e-1]=hx("((?:%[\\da-f]{2}){"+e+"})","gi"))},Mx=function(e){try{return px(e)}catch(v_){return e}},Ix=function(e){var t=bx(e,xx," "),n=4;try{return px(t)}catch(v_){for(;n;)t=bx(t,Ax(n--),Mx);return t}},Cx=/[!'()~]|%20/g,Rx={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Px=function(e){return Rx[e]},Nx=function(e){return bx(gx(e),Cx,Px)},jx=DE((function(e,t){nx(this,{type:tx,iterator:YE(rx(e).entries),kind:t})}),"Iterator",(function(){var e=ix(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),Ox=function(e){this.entries=[],this.url=null,void 0!==e&&(qE(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===vx(e,0)?Ex(e,1):e:GE(e)))};Ox.prototype={type:ex,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,a,o,s,u=$E(e);if(u)for(n=(t=YE(e,u)).next;!(r=CE(n,t)).done;){if(a=(i=YE(zE(r.value))).next,(o=CE(a,i)).done||(s=CE(a,i)).done||!CE(a,i).done)throw dx("Expected sequence with length 2");yx(this.entries,{key:GE(o.value),value:GE(s.value)})}else for(var c in e)BE(e,c)&&yx(this.entries,{key:c,value:GE(e[c])})},parseQuery:function(e){if(e)for(var t,n,r=Tx(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(n=Tx(t,"="),yx(this.entries,{key:Ix(wx(n)),value:Ix(mx(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],yx(n,Nx(e.key)+"="+Nx(e.value));return mx(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var _x=function(){FE(this,Lx);var e=nx(this,new Ox(arguments.length>0?arguments[0]:void 0));PE||(this.length=e.entries.length)},Lx=_x.prototype;if(_E(Lx,{append:function(e,t){JE(arguments.length,2);var n=rx(this);yx(n.entries,{key:GE(e),value:GE(t)}),PE||this.length++,n.updateURL()},delete:function(e){JE(arguments.length,1);for(var t=rx(this),n=t.entries,r=GE(e),i=0;i<n.length;)n[i].key===r?Sx(n,i,1):i++;PE||(this.length=n.length),t.updateURL()},get:function(e){JE(arguments.length,1);for(var t=rx(this).entries,n=GE(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){JE(arguments.length,1);for(var t=rx(this).entries,n=GE(e),r=[],i=0;i<t.length;i++)t[i].key===n&&yx(r,t[i].value);return r},has:function(e){JE(arguments.length,1);for(var t=rx(this).entries,n=GE(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){JE(arguments.length,1);for(var n,r=rx(this),i=r.entries,a=!1,o=GE(e),s=GE(t),u=0;u<i.length;u++)(n=i[u]).key===o&&(a?Sx(i,u--,1):(a=!0,n.value=s));a||yx(i,{key:o,value:s}),PE||(this.length=i.length),r.updateURL()},sort:function(){var e=rx(this);QE(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=rx(this).entries,r=HE(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 jx(this,"keys")},values:function(){return new jx(this,"values")},entries:function(){return new jx(this,"entries")}},{enumerable:!0}),jE(Lx,ZE,Lx.entries,{name:"entries"}),jE(Lx,"toString",(function(){return rx(this).serialize()}),{enumerable:!0}),PE&&OE(Lx,"size",{get:function(){return rx(this).entries.length},configurable:!0,enumerable:!0}),LE(_x,ex),ME({global:!0,constructor:!0,forced:!NE},{URLSearchParams:_x}),!NE&&KE(cx)){var Dx=RE(fx.has),Ux=RE(fx.set),Fx=function(e){if(qE(e)){var t,n=e.body;if(VE(n)===ex)return t=e.headers?new cx(e.headers):new cx,Dx(t,"content-type")||Ux(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),WE(e,{body:XE(0,GE(n)),headers:XE(0,t)})}return e};if(KE(sx)&&ME({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return sx(e,arguments.length>1?Fx(arguments[1]):{})}}),KE(ux)){var Kx=function(e){return FE(this,lx),new ux(e,arguments.length>1?Fx(arguments[1]):{})};lx.constructor=Kx,Kx.prototype=lx,ME({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Kx})}}var Bx,Hx=Cn,Vx=C,zx=oE,qx=i,Gx=$t,Wx=v,Xx=la,Yx=ha,$x=Ig,Jx=Qe,Qx=tw,Zx=Ww,ek=na,tk=bl.codeAt,nk=function(e){var t,n,r=[],i=wE(bE(SE(e),lE,"."),".");for(t=0;t<i.length;t++)n=i[t],yE(r,dE(cE,n)?"xn--"+xE(n):n);return mE(r,".")},rk=ei,ik=La,ak=_g,ok={URLSearchParams:_x,getState:rx},sk=Za,uk=sk.set,ck=sk.getterFor("URL"),lk=ok.URLSearchParams,fk=ok.getState,hk=qx.URL,dk=qx.TypeError,pk=qx.parseInt,gk=Math.floor,vk=Math.pow,mk=Wx("".charAt),yk=Wx(/./.exec),bk=Wx([].join),wk=Wx(1..toString),Sk=Wx([].pop),Tk=Wx([].push),Ek=Wx("".replace),xk=Wx([].shift),kk=Wx("".split),Ak=Wx("".slice),Mk=Wx("".toLowerCase),Ik=Wx([].unshift),Ck="Invalid scheme",Rk="Invalid host",Pk="Invalid port",Nk=/[a-z]/i,jk=/[\d+-.a-z]/i,Ok=/\d/,_k=/^0x/i,Lk=/^[0-7]+$/,Dk=/^\d+$/,Uk=/^[\da-f]+$/i,Fk=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Kk=/[\0\t\n\r #/:<>?@[\\\]^|]/,Bk=/^[\u0000-\u0020]+/,Hk=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Vk=/[\t\n\r]/g,zk=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)Ik(t,e%256),e=gk(e/256);return bk(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,a=0;a<8;a++)0!==e[a]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=a),++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+=wk(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},qk={},Gk=Qx({},qk,{" ":1,'"':1,"<":1,">":1,"`":1}),Wk=Qx({},Gk,{"#":1,"?":1,"{":1,"}":1}),Xk=Qx({},Wk,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Yk=function(e,t){var n=tk(e,0);return n>32&&n<127&&!Jx(t,e)?e:encodeURIComponent(e)},$k={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Jk=function(e,t){var n;return 2==e.length&&yk(Nk,mk(e,0))&&(":"==(n=mk(e,1))||!t&&"|"==n)},Qk=function(e){var t;return e.length>1&&Jk(Ak(e,0,2))&&(2==e.length||"/"===(t=mk(e,2))||"\\"===t||"?"===t||"#"===t)},Zk=function(e){return"."===e||"%2e"===Mk(e)},eA={},tA={},nA={},rA={},iA={},aA={},oA={},sA={},uA={},cA={},lA={},fA={},hA={},dA={},pA={},gA={},vA={},mA={},yA={},bA={},wA={},SA=function(e,t,n){var r,i,a,o=rk(e);if(t){if(i=this.parse(o))throw dk(i);this.searchParams=null}else{if(void 0!==n&&(r=new SA(n,!0)),i=this.parse(o,null,r))throw dk(i);(a=fk(new lk)).bindURL(this),this.searchParams=a}};SA.prototype={type:"URL",parse:function(e,t,n){var r,i,a,o,s,u=this,c=t||eA,l=0,f="",h=!1,d=!1,p=!1;for(e=rk(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=Ek(e,Bk,""),e=Ek(e,Hk,"$1")),e=Ek(e,Vk,""),r=Zx(e);l<=r.length;){switch(i=r[l],c){case eA:if(!i||!yk(Nk,i)){if(t)return Ck;c=nA;continue}f+=Mk(i),c=tA;break;case tA:if(i&&(yk(jk,i)||"+"==i||"-"==i||"."==i))f+=Mk(i);else{if(":"!=i){if(t)return Ck;f="",c=nA,l=0;continue}if(t&&(u.isSpecial()!=Jx($k,f)||"file"==f&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=f,t)return void(u.isSpecial()&&$k[u.scheme]==u.port&&(u.port=null));f="","file"==u.scheme?c=dA:u.isSpecial()&&n&&n.scheme==u.scheme?c=rA:u.isSpecial()?c=sA:"/"==r[l+1]?(c=iA,l++):(u.cannotBeABaseURL=!0,Tk(u.path,""),c=yA)}break;case nA:if(!n||n.cannotBeABaseURL&&"#"!=i)return Ck;if(n.cannotBeABaseURL&&"#"==i){u.scheme=n.scheme,u.path=ek(n.path),u.query=n.query,u.fragment="",u.cannotBeABaseURL=!0,c=wA;break}c="file"==n.scheme?dA:aA;continue;case rA:if("/"!=i||"/"!=r[l+1]){c=aA;continue}c=uA,l++;break;case iA:if("/"==i){c=cA;break}c=mA;continue;case aA:if(u.scheme=n.scheme,i==Bx)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=ek(n.path),u.query=n.query;else if("/"==i||"\\"==i&&u.isSpecial())c=oA;else if("?"==i)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=ek(n.path),u.query="",c=bA;else{if("#"!=i){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=ek(n.path),u.path.length--,c=mA;continue}u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=ek(n.path),u.query=n.query,u.fragment="",c=wA}break;case oA:if(!u.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,c=mA;continue}c=cA}else c=uA;break;case sA:if(c=uA,"/"!=i||"/"!=mk(f,l+1))continue;l++;break;case uA:if("/"!=i&&"\\"!=i){c=cA;continue}break;case cA:if("@"==i){h&&(f="%40"+f),h=!0,a=Zx(f);for(var g=0;g<a.length;g++){var v=a[g];if(":"!=v||p){var m=Yk(v,Xk);p?u.password+=m:u.username+=m}else p=!0}f=""}else if(i==Bx||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(h&&""==f)return"Invalid authority";l-=Zx(f).length+1,f="",c=lA}else f+=i;break;case lA:case fA:if(t&&"file"==u.scheme){c=gA;continue}if(":"!=i||d){if(i==Bx||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(u.isSpecial()&&""==f)return Rk;if(t&&""==f&&(u.includesCredentials()||null!==u.port))return;if(o=u.parseHost(f))return o;if(f="",c=vA,t)return;continue}"["==i?d=!0:"]"==i&&(d=!1),f+=i}else{if(""==f)return Rk;if(o=u.parseHost(f))return o;if(f="",c=hA,t==fA)return}break;case hA:if(!yk(Ok,i)){if(i==Bx||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()||t){if(""!=f){var y=pk(f,10);if(y>65535)return Pk;u.port=u.isSpecial()&&y===$k[u.scheme]?null:y,f=""}if(t)return;c=vA;continue}return Pk}f+=i;break;case dA:if(u.scheme="file","/"==i||"\\"==i)c=pA;else{if(!n||"file"!=n.scheme){c=mA;continue}if(i==Bx)u.host=n.host,u.path=ek(n.path),u.query=n.query;else if("?"==i)u.host=n.host,u.path=ek(n.path),u.query="",c=bA;else{if("#"!=i){Qk(bk(ek(r,l),""))||(u.host=n.host,u.path=ek(n.path),u.shortenPath()),c=mA;continue}u.host=n.host,u.path=ek(n.path),u.query=n.query,u.fragment="",c=wA}}break;case pA:if("/"==i||"\\"==i){c=gA;break}n&&"file"==n.scheme&&!Qk(bk(ek(r,l),""))&&(Jk(n.path[0],!0)?Tk(u.path,n.path[0]):u.host=n.host),c=mA;continue;case gA:if(i==Bx||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&Jk(f))c=mA;else if(""==f){if(u.host="",t)return;c=vA}else{if(o=u.parseHost(f))return o;if("localhost"==u.host&&(u.host=""),t)return;f="",c=vA}continue}f+=i;break;case vA:if(u.isSpecial()){if(c=mA,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=Bx&&(c=mA,"/"!=i))continue}else u.fragment="",c=wA;else u.query="",c=bA;break;case mA:if(i==Bx||"/"==i||"\\"==i&&u.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=Mk(s=f))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(u.shortenPath(),"/"==i||"\\"==i&&u.isSpecial()||Tk(u.path,"")):Zk(f)?"/"==i||"\\"==i&&u.isSpecial()||Tk(u.path,""):("file"==u.scheme&&!u.path.length&&Jk(f)&&(u.host&&(u.host=""),f=mk(f,0)+":"),Tk(u.path,f)),f="","file"==u.scheme&&(i==Bx||"?"==i||"#"==i))for(;u.path.length>1&&""===u.path[0];)xk(u.path);"?"==i?(u.query="",c=bA):"#"==i&&(u.fragment="",c=wA)}else f+=Yk(i,Wk);break;case yA:"?"==i?(u.query="",c=bA):"#"==i?(u.fragment="",c=wA):i!=Bx&&(u.path[0]+=Yk(i,qk));break;case bA:t||"#"!=i?i!=Bx&&("'"==i&&u.isSpecial()?u.query+="%27":u.query+="#"==i?"%23":Yk(i,qk)):(u.fragment="",c=wA);break;case wA:i!=Bx&&(u.fragment+=Yk(i,Gk))}l++}},parseHost:function(e){var t,n,r;if("["==mk(e,0)){if("]"!=mk(e,e.length-1))return Rk;if(t=function(e){var t,n,r,i,a,o,s,u=[0,0,0,0,0,0,0,0],c=0,l=null,f=0,h=function(){return mk(e,f)};if(":"==h()){if(":"!=mk(e,1))return;f+=2,l=++c}for(;h();){if(8==c)return;if(":"!=h()){for(t=n=0;n<4&&yk(Uk,h());)t=16*t+pk(h(),16),f++,n++;if("."==h()){if(0==n)return;if(f-=n,c>6)return;for(r=0;h();){if(i=null,r>0){if(!("."==h()&&r<4))return;f++}if(!yk(Ok,h()))return;for(;yk(Ok,h());){if(a=pk(h(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;f++}u[c]=256*u[c]+i,2!=++r&&4!=r||c++}if(4!=r)return;break}if(":"==h()){if(f++,!h())return}else if(h())return;u[c++]=t}else{if(null!==l)return;f++,l=++c}}if(null!==l)for(o=c-l,c=7;0!=c&&o>0;)s=u[c],u[c--]=u[l+o-1],u[l+--o]=s;else if(8!=c)return;return u}(Ak(e,1,-1)),!t)return Rk;this.host=t}else if(this.isSpecial()){if(e=nk(e),yk(Fk,e))return Rk;if(t=function(e){var t,n,r,i,a,o,s,u=kk(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(a=10,i.length>1&&"0"==mk(i,0)&&(a=yk(_k,i)?16:8,i=Ak(i,8==a?1:2)),""===i)o=0;else{if(!yk(10==a?Dk:8==a?Lk:Uk,i))return e;o=pk(i,a)}Tk(n,o)}for(r=0;r<t;r++)if(o=n[r],r==t-1){if(o>=vk(256,5-t))return null}else if(o>255)return null;for(s=Sk(n),r=0;r<n.length;r++)s+=n[r]*vk(256,3-r);return s}(e),null===t)return Rk;this.host=t}else{if(yk(Kk,e))return Rk;for(t="",n=Zx(e),r=0;r<n.length;r++)t+=Yk(n[r],qk);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return Jx($k,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&Jk(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,i=e.host,a=e.port,o=e.path,s=e.query,u=e.fragment,c=t+":";return null!==i?(c+="//",e.includesCredentials()&&(c+=n+(r?":"+r:"")+"@"),c+=zk(i),null!==a&&(c+=":"+a)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?o[0]:o.length?"/"+bk(o,"/"):"",null!==s&&(c+="?"+s),null!==u&&(c+="#"+u),c},setHref:function(e){var t=this.parse(e);if(t)throw dk(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new TA(e.path[0]).origin}catch(v_){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+zk(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(rk(e)+":",eA)},getUsername:function(){return this.username},setUsername:function(e){var t=Zx(rk(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=Yk(t[n],Xk)}},getPassword:function(){return this.password},setPassword:function(e){var t=Zx(rk(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=Yk(t[n],Xk)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?zk(e):zk(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,lA)},getHostname:function(){var e=this.host;return null===e?"":zk(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,fA)},getPort:function(){var e=this.port;return null===e?"":rk(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=rk(e))?this.port=null:this.parse(e,hA))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+bk(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,vA))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=rk(e))?this.query=null:("?"==mk(e,0)&&(e=Ak(e,1)),this.query="",this.parse(e,bA)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=rk(e))?("#"==mk(e,0)&&(e=Ak(e,1)),this.fragment="",this.parse(e,wA)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var TA=function(e){var t=$x(this,EA),n=ak(arguments.length,1)>1?arguments[1]:void 0,r=uk(t,new SA(e,!1,n));Vx||(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())},EA=TA.prototype,xA=function(e,t){return{get:function(){return ck(this)[e]()},set:t&&function(e){return ck(this)[t](e)},configurable:!0,enumerable:!0}};if(Vx&&(Yx(EA,"href",xA("serialize","setHref")),Yx(EA,"origin",xA("getOrigin")),Yx(EA,"protocol",xA("getProtocol","setProtocol")),Yx(EA,"username",xA("getUsername","setUsername")),Yx(EA,"password",xA("getPassword","setPassword")),Yx(EA,"host",xA("getHost","setHost")),Yx(EA,"hostname",xA("getHostname","setHostname")),Yx(EA,"port",xA("getPort","setPort")),Yx(EA,"pathname",xA("getPathname","setPathname")),Yx(EA,"search",xA("getSearch","setSearch")),Yx(EA,"searchParams",xA("getSearchParams")),Yx(EA,"hash",xA("getHash","setHash"))),Xx(EA,"toJSON",(function(){return ck(this).serialize()}),{enumerable:!0}),Xx(EA,"toString",(function(){return ck(this).serialize()}),{enumerable:!0}),hk){var kA=hk.createObjectURL,AA=hk.revokeObjectURL;kA&&Xx(TA,"createObjectURL",Gx(kA,hk)),AA&&Xx(TA,"revokeObjectURL",Gx(AA,hk))}ik(TA,"URL"),Hx({global:!0,constructor:!0,forced:!zx,sham:!Vx},{URL:TA});var MA=Cn,IA=a,CA=_g,RA=ei,PA=oE,NA=oe("URL");MA({target:"URL",stat:!0,forced:!(PA&&IA((function(){NA.canParse()})))},{canParse:function(e){var t=CA(arguments.length,1),n=RA(e),r=t<2||void 0===arguments[1]?void 0:RA(arguments[1]);try{return!!new NA(n,r)}catch(v_){return!1}}});var jA=t(te.URL),OA=te,_A=f;OA.JSON||(OA.JSON={stringify:JSON.stringify});var LA=function(e,t,n){return _A(OA.JSON.stringify,null,arguments)},DA=t(LA),UA=ee,FA=w,KA=ht("match"),BA=function(e){var t;return UA(e)&&(void 0!==(t=e[KA])?!!t:"RegExp"==FA(e))},HA=TypeError,VA=function(e){if(BA(e))throw HA("The method doesn't accept regular expressions");return e},zA=ht("match"),qA=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[zA]=!1,"/./"[e](t)}catch(r){}}return!1},GA=Cn,WA=E,XA=qn,YA=ei,$A=VA,JA=X,QA=qA,ZA=WA("".startsWith),eM=WA("".slice),tM=Math.min;GA({target:"String",proto:!0,forced:!QA("startsWith")},{startsWith:function(e){var t=YA(JA(this));$A(e);var n=XA(tM(arguments.length>1?arguments[1]:void 0,t.length)),r=YA(e);return ZA?ZA(t,r,n):eM(t,n,n+r.length)===r}});var nM=ef("String").startsWith,rM=se,iM=nM,aM=String.prototype,oM=t((function(e){var t=e.startsWith;return"string"==typeof e||e===aM||rM(aM,e)&&t===aM.startsWith?iM:t})),sM=li.includes;Cn({target:"Array",proto:!0,forced:a((function(){return!Array(1).includes()}))},{includes:function(e){return sM(this,e,arguments.length>1?arguments[1]:void 0)}});var uM=ef("Array").includes,cM=Cn,lM=VA,fM=X,hM=ei,dM=qA,pM=v("".indexOf);cM({target:"String",proto:!0,forced:!dM("includes")},{includes:function(e){return!!~pM(hM(fM(this)),hM(lM(e)),arguments.length>1?arguments[1]:void 0)}});var gM=ef("String").includes,vM=se,mM=uM,yM=gM,bM=Array.prototype,wM=String.prototype,SM=t((function(e){var t=e.includes;return e===bM||vM(bM,e)&&t===bM.includes?mM:"string"==typeof e||e===wM||vM(wM,e)&&t===wM.includes?yM:t})),TM={exports:{}},EM=a((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),xM=a,kM=ee,AM=w,MM=EM,IM=Object.isExtensible,CM=xM((function(){IM(1)}))||MM?function(e){return!!kM(e)&&((!MM||"ArrayBuffer"!=AM(e))&&(!IM||IM(e)))}:IM,RM=!a((function(){return Object.isExtensible(Object.preventExtensions({}))})),PM=Cn,NM=v,jM=fi,OM=ee,_M=Qe,LM=Jt.f,DM=Wi,UM=$i,FM=CM,KM=RM,BM=!1,HM=rt("meta"),VM=0,zM=function(e){LM(e,HM,{value:{objectID:"O"+VM++,weakData:{}}})},qM=TM.exports={enable:function(){qM.enable=function(){},BM=!0;var e=DM.f,t=NM([].splice),n={};n[HM]=1,e(n).length&&(DM.f=function(n){for(var r=e(n),i=0,a=r.length;i<a;i++)if(r[i]===HM){t(r,i,1);break}return r},PM({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:UM.f}))},fastKey:function(e,t){if(!OM(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!_M(e,HM)){if(!FM(e))return"F";if(!t)return"E";zM(e)}return e[HM].objectID},getWeakData:function(e,t){if(!_M(e,HM)){if(!FM(e))return!0;if(!t)return!1;zM(e)}return e[HM].weakData},onFreeze:function(e){return KM&&BM&&FM(e)&&!_M(e,HM)&&zM(e),e}};jM[HM]=!0;var GM=TM.exports,WM=Cn,XM=ee,YM=GM.onFreeze,$M=RM,JM=a,QM=Object.seal;WM({target:"Object",stat:!0,forced:JM((function(){QM(1)})),sham:!$M},{seal:function(e){return QM&&XM(e)?QM(YM(e)):e}});var ZM=t(te.Object.seal),eI=ef("Array").entries,tI=ur,nI=Qe,rI=se,iI=eI,aI=Array.prototype,oI={DOMTokenList:!0,NodeList:!0},sI=t((function(e){var t=e.entries;return e===aI||rI(aI,e)&&t===aI.entries||nI(oI,tI(e))?iI:t})),uI=Cn,cI=i,lI=GM,fI=a,hI=mn,dI=Jp,pI=Ig,gI=M,vI=ee,mI=La,yI=Jt.f,bI=so.forEach,wI=C,SI=Za.set,TI=Za.getterFor,EI=function(e,t,n){var r,i=-1!==e.indexOf("Map"),a=-1!==e.indexOf("Weak"),o=i?"set":"add",s=cI[e],u=s&&s.prototype,c={};if(wI&&gI(s)&&(a||u.forEach&&!fI((function(){(new s).entries().next()})))){var l=(r=t((function(t,n){SI(pI(t,l),{type:e,collection:new s}),null!=n&&dI(n,t[o],{that:t,AS_ENTRIES:i})}))).prototype,f=TI(e);bI(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in u)||a&&"clear"==e||hI(l,e,(function(n,r){var i=f(this).collection;if(!t&&a&&!vI(n))return"get"==e&&void 0;var o=i[e](0===n?0:n,r);return t?this:o}))})),a||yI(l,"size",{configurable:!0,get:function(){return f(this).collection.size}})}else r=n.getConstructor(t,e,i,o),lI.enable();return mI(r,e,!1,!0),c[e]=r,uI({global:!0,forced:!0},c),a||n.setStrong(r,e,i),r},xI=v,kI=AE,AI=GM.getWeakData,MI=Ig,II=nn,CI=q,RI=ee,PI=Jp,NI=Qe,jI=Za.set,OI=Za.getterFor,_I=so.find,LI=so.findIndex,DI=xI([].splice),UI=0,FI=function(e){return e.frozen||(e.frozen=new KI)},KI=function(){this.entries=[]},BI=function(e,t){return _I(e.entries,(function(e){return e[0]===t}))};KI.prototype={get:function(e){var t=BI(this,e);if(t)return t[1]},has:function(e){return!!BI(this,e)},set:function(e,t){var n=BI(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=LI(this.entries,(function(t){return t[0]===e}));return~t&&DI(this.entries,t,1),!!~t}};var HI,VI=RM,zI=i,qI=v,GI=AE,WI=GM,XI=EI,YI={getConstructor:function(e,t,n,r){var i=e((function(e,i){MI(e,a),jI(e,{type:t,id:UI++,frozen:void 0}),CI(i)||PI(i,e[r],{that:e,AS_ENTRIES:n})})),a=i.prototype,o=OI(t),s=function(e,t,n){var r=o(e),i=AI(II(t),!0);return!0===i?FI(r).set(t,n):i[r.id]=n,e};return kI(a,{delete:function(e){var t=o(this);if(!RI(e))return!1;var n=AI(e);return!0===n?FI(t).delete(e):n&&NI(n,t.id)&&delete n[t.id]},has:function(e){var t=o(this);if(!RI(e))return!1;var n=AI(e);return!0===n?FI(t).has(e):n&&NI(n,t.id)}}),kI(a,n?{get:function(e){var t=o(this);if(RI(e)){var n=AI(e);return!0===n?FI(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return s(this,e,t)}}:{add:function(e){return s(this,e,!0)}}),i}},$I=ee,JI=Za.enforce,QI=a,ZI=Fa,eC=Object,tC=Array.isArray,nC=eC.isExtensible,rC=eC.isFrozen,iC=eC.isSealed,aC=eC.freeze,oC=eC.seal,sC={},uC={},cC=!zI.ActiveXObject&&"ActiveXObject"in zI,lC=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},fC=XI("WeakMap",lC,YI),hC=fC.prototype,dC=qI(hC.set);if(ZI)if(cC){HI=YI.getConstructor(lC,"WeakMap",!0),WI.enable();var pC=qI(hC.delete),gC=qI(hC.has),vC=qI(hC.get);GI(hC,{delete:function(e){if($I(e)&&!nC(e)){var t=JI(this);return t.frozen||(t.frozen=new HI),pC(this,e)||t.frozen.delete(e)}return pC(this,e)},has:function(e){if($I(e)&&!nC(e)){var t=JI(this);return t.frozen||(t.frozen=new HI),gC(this,e)||t.frozen.has(e)}return gC(this,e)},get:function(e){if($I(e)&&!nC(e)){var t=JI(this);return t.frozen||(t.frozen=new HI),gC(this,e)?vC(this,e):t.frozen.get(e)}return vC(this,e)},set:function(e,t){if($I(e)&&!nC(e)){var n=JI(this);n.frozen||(n.frozen=new HI),gC(this,e)?dC(this,e,t):n.frozen.set(e,t)}else dC(this,e,t);return this}})}else VI&&QI((function(){var e=aC([]);return dC(new fC,e,1),!rC(e)}))&&GI(hC,{set:function(e,t){var n;return tC(e)&&(rC(e)?n=sC:iC(e)&&(n=uC)),dC(this,e,t),n==sC&&aC(e),n==uC&&oC(e),this}});var mC=te.WeakMap,yC=Me,bC=function(e){if("object"==typeof e&&"has"in e&&"get"in e&&"set"in e)return e;throw TypeError(yC(e)+" is not a weakmap")},wC=function(e,t){return 1==t?function(t,n){return t[e](n)}:function(t,n,r){return t[e](n,r)}},SC=wC,TC={WeakMap:oe("WeakMap"),set:SC("set",2),get:SC("get",1),has:SC("has",1),remove:SC("delete",1)},EC=bC,xC=TC.get,kC=TC.has,AC=TC.set;Cn({target:"WeakMap",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var n,r,i=EC(this);return kC(i,e)?(n=xC(i,e),"update"in t&&(n=t.update(n,e,i),AC(i,e,n)),n):(r=t.insert(e,i),AC(i,e,r),r)}});var MC=$t,IC=N,CC=Pe,RC=hf,PC=q,NC=Jp,jC=[].push,OC=function(e){var t,n,r,i,a=arguments.length,o=a>1?arguments[1]:void 0;return RC(this),(t=void 0!==o)&&CC(o),PC(e)?new this:(n=[],t?(r=0,i=MC(o,a>2?arguments[2]:void 0),NC(e,(function(e){IC(jC,n,i(e,r++))}))):NC(e,jC,{that:n}),new this(n))};Cn({target:"WeakMap",stat:!0,forced:!0},{from:OC});var _C=Ns,LC=function(){return new this(_C(arguments))};Cn({target:"WeakMap",stat:!0,forced:!0},{of:LC});var DC=bC,UC=TC.remove;Cn({target:"WeakMap",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=DC(this),n=!0,r=0,i=arguments.length;r<i;r++)e=UC(t,arguments[r]),n=n&&e;return!!n}});var FC=N,KC=Pe,BC=M,HC=nn,VC=TypeError,zC=function(e,t){var n,r=HC(this),i=KC(r.get),a=KC(r.has),o=KC(r.set),s=arguments.length>2?arguments[2]:void 0;if(!BC(t)&&!BC(s))throw VC("At least one callback required");return FC(a,r,e)?(n=FC(i,r,e),BC(t)&&(n=t(n),FC(o,r,e,n))):BC(s)&&(n=s(),FC(o,r,e,n)),n};Cn({target:"WeakMap",proto:!0,real:!0,forced:!0},{upsert:zC});var qC=t(mC),GC=Gi,WC=ha,XC=AE,YC=$t,$C=Ig,JC=q,QC=Jp,ZC=Tc,eR=Ec,tR=kg,nR=C,rR=GM.fastKey,iR=Za.set,aR=Za.getterFor,oR={getConstructor:function(e,t,n,r){var i=e((function(e,i){$C(e,a),iR(e,{type:t,index:GC(null),first:void 0,last:void 0,size:0}),nR||(e.size=0),JC(i)||QC(i,e[r],{that:e,AS_ENTRIES:n})})),a=i.prototype,o=aR(t),s=function(e,t,n){var r,i,a=o(e),s=u(e,t);return s?s.value=n:(a.last=s={index:i=rR(t,!0),key:t,value:n,previous:r=a.last,next:void 0,removed:!1},a.first||(a.first=s),r&&(r.next=s),nR?a.size++:e.size++,"F"!==i&&(a.index[i]=s)),e},u=function(e,t){var n,r=o(e),i=rR(t);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==t)return n};return XC(a,{clear:function(){for(var e=o(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,nR?e.size=0:this.size=0},delete:function(e){var t=this,n=o(t),r=u(t,e);if(r){var i=r.next,a=r.previous;delete n.index[r.index],r.removed=!0,a&&(a.next=i),i&&(i.previous=a),n.first==r&&(n.first=i),n.last==r&&(n.last=a),nR?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=o(this),r=YC(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)}}),XC(a,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)}}),nR&&WC(a,"size",{configurable:!0,get:function(){return o(this).size}}),i},setStrong:function(e,t,n){var r=t+" Iterator",i=aR(t),a=aR(r);ZC(e,t,(function(e,t){iR(this,{type:r,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=a(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)?eR("keys"==t?n.key:"values"==t?n.value:[n.key,n.value],!1):(e.target=void 0,eR(void 0,!0))}),n?"entries":"values",!n,!0),tR(t)}};EI("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),oR);var sR=te.Map;Cn({target:"Map",stat:!0,forced:!0},{from:OC}),Cn({target:"Map",stat:!0,forced:!0},{of:LC});var uR=Me,cR=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(uR(e)+" is not a map")},lR=wC,fR=oe("Map"),hR={Map:fR,set:lR("set",2),get:lR("get",1),has:lR("has",1),remove:lR("delete",1),proto:fR.prototype},dR=cR,pR=hR.remove;Cn({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=dR(this),n=!0,r=0,i=arguments.length;r<i;r++)e=pR(t,arguments[r]),n=n&&e;return!!n}});var gR=cR,vR=hR.get,mR=hR.has,yR=hR.set;Cn({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var n,r,i=gR(this);return mR(i,e)?(n=vR(i,e),"update"in t&&(n=t.update(n,e,i),yR(i,e,n)),n):(r=t.insert(e,i),yR(i,e,r),r)}});var bR=N,wR=function(e,t,n){for(var r,i,a=n||e.next;!(r=bR(a,e)).done;)if(void 0!==(i=t(r.value)))return i},SR=wR,TR=function(e,t,n){return n?SR(e.entries(),(function(e){return t(e[1],e[0])})):e.forEach(t)},ER=$t,xR=cR,kR=TR;Cn({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=xR(this),n=ER(e,arguments.length>1?arguments[1]:void 0);return!1!==kR(t,(function(e,r){if(!n(e,r,t))return!1}),!0)}});var AR=$t,MR=cR,IR=TR,CR=hR.Map,RR=hR.set;Cn({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=MR(this),n=AR(e,arguments.length>1?arguments[1]:void 0),r=new CR;return IR(t,(function(e,i){n(e,i,t)&&RR(r,i,e)})),r}});var PR=$t,NR=cR,jR=TR;Cn({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=NR(this),n=PR(e,arguments.length>1?arguments[1]:void 0),r=jR(t,(function(e,r){if(n(e,r,t))return{value:e}}),!0);return r&&r.value}});var OR=$t,_R=cR,LR=TR;Cn({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=_R(this),n=OR(e,arguments.length>1?arguments[1]:void 0),r=LR(t,(function(e,r){if(n(e,r,t))return{key:r}}),!0);return r&&r.key}});var DR=Cn,UR=N,FR=M,KR=Pe,BR=Jp,HR=hR.Map,VR=v([].push);DR({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){var n=new(FR(this)?this:HR);KR(t);var r=KR(n.has),i=KR(n.get),a=KR(n.set);return BR(e,(function(e){var o=t(e);UR(r,n,o)?VR(UR(i,n,o),e):UR(a,n,o,[e])})),n}});var zR=function(e,t){return e===t||e!=e&&t!=t},qR=cR,GR=TR;Cn({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===GR(qR(this),(function(t){if(zR(t,e))return!0}),!0)}});var WR=N,XR=Jp,YR=M,$R=Pe,JR=hR.Map;Cn({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var n=new(YR(this)?this:JR);$R(t);var r=$R(n.set);return XR(e,(function(e){WR(r,n,t(e),e)})),n}});var QR=cR,ZR=TR;Cn({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=ZR(QR(this),(function(t,n){if(t===e)return{key:n}}),!0);return t&&t.key}});var eP=$t,tP=cR,nP=TR,rP=hR.Map,iP=hR.set;Cn({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=tP(this),n=eP(e,arguments.length>1?arguments[1]:void 0),r=new rP;return nP(t,(function(e,i){iP(r,n(e,i,t),e)})),r}});var aP=$t,oP=cR,sP=TR,uP=hR.Map,cP=hR.set;Cn({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=oP(this),n=aP(e,arguments.length>1?arguments[1]:void 0),r=new uP;return sP(t,(function(e,i){cP(r,i,n(e,i,t))})),r}});var lP=cR,fP=Jp,hP=hR.set;Cn({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=lP(this),n=arguments.length,r=0;r<n;)fP(arguments[r++],(function(e,n){hP(t,e,n)}),{AS_ENTRIES:!0});return t}});var dP=Pe,pP=cR,gP=TR,vP=TypeError;Cn({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=pP(this),n=arguments.length<2,r=n?void 0:arguments[1];if(dP(e),gP(t,(function(i,a){n?(n=!1,r=i):r=e(r,i,a,t)})),n)throw vP("Reduce of empty map with no initial value");return r}});var mP=$t,yP=cR,bP=TR;Cn({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=yP(this),n=mP(e,arguments.length>1?arguments[1]:void 0);return!0===bP(t,(function(e,r){if(n(e,r,t))return!0}),!0)}});var wP=Pe,SP=cR,TP=TypeError,EP=hR.get,xP=hR.has,kP=hR.set;Cn({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var n=SP(this),r=arguments.length;wP(t);var i=xP(n,e);if(!i&&r<3)throw TP("Updating absent value");var a=i?EP(n,e):wP(r>2?arguments[2]:void 0)(e,n);return kP(n,e,t(a,e,n)),n}}),Cn({target:"Map",proto:!0,real:!0,forced:!0},{upsert:zC}),Cn({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:zC});var AP=t(sR),MP=ef("Array").values,IP=ur,CP=Qe,RP=se,PP=MP,NP=Array.prototype,jP={DOMTokenList:!0,NodeList:!0},OP=t((function(e){var t=e.values;return e===NP||RP(NP,e)&&t===NP.values||CP(jP,IP(e))?PP:t}));Cn({target:"Object",stat:!0},{is:Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}});var _P=t(te.Object.is),LP=f,DP=J,UP=Hn,FP=Wn,KP=Lf,BP=Math.min,HP=[].lastIndexOf,VP=!!HP&&1/[1].lastIndexOf(1,-0)<0,zP=KP("lastIndexOf"),qP=VP||!zP?function(e){if(VP)return LP(HP,this,arguments)||0;var t=DP(this),n=FP(t),r=n-1;for(arguments.length>1&&(r=BP(r,UP(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}:HP;Cn({target:"Array",proto:!0,forced:qP!==[].lastIndexOf},{lastIndexOf:qP});var GP=ef("Array").lastIndexOf,WP=se,XP=GP,YP=Array.prototype,$P=t((function(e){var t=e.lastIndexOf;return e===YP||WP(YP,e)&&t===YP.lastIndexOf?XP:t})),JP=Pe,QP=Ye,ZP=z,eN=Wn,tN=TypeError,nN=function(e){return function(t,n,r,i){JP(n);var a=QP(t),o=ZP(a),s=eN(a),u=e?s-1:0,c=e?-1:1;if(r<2)for(;;){if(u in o){i=o[u],u+=c;break}if(u+=c,e?u<0:s<=u)throw tN("Reduce of empty array with no initial value")}for(;e?u>=0:s>u;u+=c)u in o&&(i=n(i,o[u],u,a));return i}},rN={left:nN(!1),right:nN(!0)}.left;Cn({target:"Array",proto:!0,forced:!wg&&ge>79&&ge<83||!Lf("reduce")},{reduce:function(e){var t=arguments.length;return rN(this,e,t,t>1?arguments[1]:void 0)}});var iN=ef("Array").reduce,aN=se,oN=iN,sN=Array.prototype,uN=t((function(e){var t=e.reduce;return e===sN||aN(sN,e)&&t===sN.reduce?oN:t}));EI("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),oR);var cN=te.Set,lN=Me,fN=function(e){if("object"==typeof e&&"size"in e&&"has"in e&&"add"in e&&"delete"in e&&"keys"in e)return e;throw TypeError(lN(e)+" is not a set")},hN=wC,dN=oe("Set"),pN=dN.prototype,gN={Set:dN,add:hN("add",1),has:hN("has",1),remove:hN("delete",1),proto:pN},vN=wR,mN=function(e,t,n){return n?vN(e.keys(),t):e.forEach(t)},yN=mN,bN=gN.Set,wN=gN.add,SN=function(e){var t=new bN;return yN(e,(function(e){wN(t,e)})),t},TN=function(e){return e.size},EN=Pe,xN=nn,kN=N,AN=Hn,MN=TypeError,IN=Math.max,CN=function(e,t,n,r){this.set=e,this.size=t,this.has=n,this.keys=r};CN.prototype={getIterator:function(){return xN(kN(this.keys,this.set))},includes:function(e){return kN(this.has,this.set,e)}};var RN=function(e){xN(e);var t=+e.size;if(t!=t)throw MN("Invalid size");return new CN(e,IN(AN(t),0),EN(e.has),EN(e.keys))},PN=fN,NN=SN,jN=TN,ON=RN,_N=mN,LN=wR,DN=gN.has,UN=gN.remove,FN=function(e){var t=PN(this),n=ON(e),r=NN(t);return jN(t)<=n.size?_N(t,(function(e){n.includes(e)&&UN(r,e)})):LN(n.getIterator(),(function(e){DN(t,e)&&UN(r,e)})),r},KN=function(){return!1},BN=FN;Cn({target:"Set",proto:!0,real:!0,forced:!KN()},{difference:BN});var HN=fN,VN=TN,zN=RN,qN=mN,GN=wR,WN=gN.Set,XN=gN.add,YN=gN.has,$N=function(e){var t=HN(this),n=zN(e),r=new WN;return VN(t)>n.size?GN(n.getIterator(),(function(e){YN(t,e)&&XN(r,e)})):qN(t,(function(e){n.includes(e)&&XN(r,e)})),r},JN=$N;Cn({target:"Set",proto:!0,real:!0,forced:!KN()},{intersection:JN});var QN=fN,ZN=gN.has,ej=TN,tj=RN,nj=mN,rj=wR,ij=Dp,aj=function(e){var t=QN(this),n=tj(e);if(ej(t)<=n.size)return!1!==nj(t,(function(e){if(n.includes(e))return!1}),!0);var r=n.getIterator();return!1!==rj(r,(function(e){if(ZN(t,e))return ij(r,"normal",!1)}))},oj=aj;Cn({target:"Set",proto:!0,real:!0,forced:!KN()},{isDisjointFrom:oj});var sj=fN,uj=TN,cj=mN,lj=RN,fj=function(e){var t=sj(this),n=lj(e);return!(uj(t)>n.size)&&!1!==cj(t,(function(e){if(!n.includes(e))return!1}),!0)},hj=fj;Cn({target:"Set",proto:!0,real:!0,forced:!KN()},{isSubsetOf:hj});var dj=fN,pj=gN.has,gj=TN,vj=RN,mj=wR,yj=Dp,bj=function(e){var t=dj(this),n=vj(e);if(gj(t)<n.size)return!1;var r=n.getIterator();return!1!==mj(r,(function(e){if(!pj(t,e))return yj(r,"normal",!1)}))},wj=bj;Cn({target:"Set",proto:!0,real:!0,forced:!KN()},{isSupersetOf:wj});var Sj=fN,Tj=SN,Ej=RN,xj=wR,kj=gN.add,Aj=gN.has,Mj=gN.remove,Ij=function(e){var t=Sj(this),n=Ej(e).getIterator(),r=Tj(t);return xj(n,(function(e){Aj(t,e)?Mj(r,e):kj(r,e)})),r},Cj=Ij;Cn({target:"Set",proto:!0,real:!0,forced:!KN()},{symmetricDifference:Cj});var Rj=fN,Pj=gN.add,Nj=SN,jj=RN,Oj=wR,_j=function(e){var t=Rj(this),n=jj(e).getIterator(),r=Nj(t);return Oj(n,(function(e){Pj(r,e)})),r},Lj=_j;Cn({target:"Set",proto:!0,real:!0,forced:!KN()},{union:Lj});var Dj=cN;Cn({target:"Set",stat:!0,forced:!0},{from:OC}),Cn({target:"Set",stat:!0,forced:!0},{of:LC});var Uj=fN,Fj=gN.add;Cn({target:"Set",proto:!0,real:!0,forced:!0},{addAll:function(){for(var e=Uj(this),t=0,n=arguments.length;t<n;t++)Fj(e,arguments[t]);return e}});var Kj=fN,Bj=gN.remove;Cn({target:"Set",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=Kj(this),n=!0,r=0,i=arguments.length;r<i;r++)e=Bj(t,arguments[r]),n=n&&e;return!!n}});var Hj=$t,Vj=fN,zj=mN;Cn({target:"Set",proto:!0,real:!0,forced:!0},{every:function(e){var t=Vj(this),n=Hj(e,arguments.length>1?arguments[1]:void 0);return!1!==zj(t,(function(e){if(!n(e,e,t))return!1}),!0)}});var qj=ur,Gj=Qe,Wj=q,Xj=yu,Yj=ht("iterator"),$j=Object,Jj=M,Qj=function(e){if(Wj(e))return!1;var t=$j(e);return void 0!==t[Yj]||"@@iterator"in t||Gj(Xj,qj(t))},Zj=ee,eO=oe("Set"),tO=function(e){return function(e){return Zj(e)&&"number"==typeof e.size&&Jj(e.has)&&Jj(e.keys)}(e)?e:Qj(e)?new eO(e):e},nO=N,rO=tO,iO=FN;Cn({target:"Set",proto:!0,real:!0,forced:!0},{difference:function(e){return nO(iO,this,rO(e))}});var aO=$t,oO=fN,sO=mN,uO=gN.Set,cO=gN.add;Cn({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(e){var t=oO(this),n=aO(e,arguments.length>1?arguments[1]:void 0),r=new uO;return sO(t,(function(e){n(e,e,t)&&cO(r,e)})),r}});var lO=$t,fO=fN,hO=mN;Cn({target:"Set",proto:!0,real:!0,forced:!0},{find:function(e){var t=fO(this),n=lO(e,arguments.length>1?arguments[1]:void 0),r=hO(t,(function(e){if(n(e,e,t))return{value:e}}),!0);return r&&r.value}});var dO=N,pO=tO,gO=$N;Cn({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(e){return dO(gO,this,pO(e))}});var vO=N,mO=tO,yO=aj;Cn({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(e){return vO(yO,this,mO(e))}});var bO=N,wO=tO,SO=fj;Cn({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(e){return bO(SO,this,wO(e))}});var TO=N,EO=tO,xO=bj;Cn({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(e){return TO(xO,this,EO(e))}});var kO=Cn,AO=v,MO=fN,IO=mN,CO=ei,RO=AO([].join),PO=AO([].push);kO({target:"Set",proto:!0,real:!0,forced:!0},{join:function(e){var t=MO(this),n=void 0===e?",":CO(e),r=[];return IO(t,(function(e){PO(r,e)})),RO(r,n)}});var NO=$t,jO=fN,OO=mN,_O=gN.Set,LO=gN.add;Cn({target:"Set",proto:!0,real:!0,forced:!0},{map:function(e){var t=jO(this),n=NO(e,arguments.length>1?arguments[1]:void 0),r=new _O;return OO(t,(function(e){LO(r,n(e,e,t))})),r}});var DO=Pe,UO=fN,FO=mN,KO=TypeError;Cn({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=UO(this),n=arguments.length<2,r=n?void 0:arguments[1];if(DO(e),FO(t,(function(i){n?(n=!1,r=i):r=e(r,i,i,t)})),n)throw KO("Reduce of empty set with no initial value");return r}});var BO=$t,HO=fN,VO=mN;Cn({target:"Set",proto:!0,real:!0,forced:!0},{some:function(e){var t=HO(this),n=BO(e,arguments.length>1?arguments[1]:void 0);return!0===VO(t,(function(e){if(n(e,e,t))return!0}),!0)}});var zO=N,qO=tO,GO=Ij;Cn({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(e){return zO(GO,this,qO(e))}});var WO=N,XO=tO,YO=_j;Cn({target:"Set",proto:!0,real:!0,forced:!0},{union:function(e){return WO(YO,this,XO(e))}});var $O=t(Dj),JO=Cn,QO=a,ZO=$i.f;JO({target:"Object",stat:!0,forced:QO((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:ZO});var e_,t_=te.Object,n_=t((function(e){return t_.getOwnPropertyNames(e)})),r_=nn,i_=N,a_=Qe,o_=se,s_=function(){var e=r_(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},u_=RegExp.prototype,c_=se,l_=function(e){var t=e.flags;return void 0!==t||"flags"in u_||a_(e,"flags")||!o_(u_,e)?t:i_(s_,e)},f_=RegExp.prototype,h_=t((function(e){return e===f_||c_(f_,e)?l_(e):e.flags})),d_={};e_=d_,function(){var t="undefined"!=typeof window?window:e,n={};for(var r in function(e,t,n){var r,i,a,o,s,u,c,l,f,h="function"==typeof kw?Aw:function(e,t,n){e!=Array.prototype&&e!=Object.prototype&&(e[t]=n.value)},d=void 0!==e&&e===this?this:void 0!==t&&null!=t?t:this;function p(){p=function(){},Mw||(d.Symbol=v)}var g,v=(g=0,function(e){return"jscomp_symbol_"+(e||"")+g++});function m(){p();var e=Mw.iterator;e||(e=Mw.iterator=Mw("iterator")),"function"!=typeof Array.prototype[e]&&h(Array.prototype,e,{configurable:!0,writable:!0,value:function(){return y(this)}}),m=function(){}}function y(e){var t=0;return b((function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}))}function b(e){return m(),(e={next:e})[Mw.iterator]=function(){return this},e}function w(e){m();var t=jw(e);return t?t.call(e):y(e)}function S(e,t){if(t){for(var n=d,r=e.split("."),i=0;i<r.length-1;i++){var a=r[i];a in n||(n[a]={}),n=n[a]}(a=t(i=n[r=r[r.length-1]]))!=i&&null!=a&&h(n,r,{configurable:!0,writable:!0,value:a})}}function T(e){return function(e){function t(t){return e.next(t)}function n(t){return e.throw(t)}return new Zy((function(r,i){!function e(a){a.done?r(a.value):Zy.resolve(a.value).then(t,n).then(e,i)}(e.next())}))}(e())}S("Promise",(function(e){function t(e){this.h=0,this.l=void 0,this.g=[];var t=this.i();try{e(t.resolve,t.reject)}catch(n){t.reject(n)}}function n(){this.g=null}function r(e){return e instanceof t?e:new t((function(t){t(e)}))}if(e)return e;n.prototype.h=function(e){null==this.g&&(this.g=[],this.j()),this.g.push(e)},n.prototype.j=function(){var e=this;this.i((function(){e.m()}))};var i=QS;n.prototype.i=function(e){i(e,0)},n.prototype.m=function(){for(;this.g&&this.g.length;){var e=this.g;this.g=[];for(var t=0;t<e.length;++t){var n=e[t];e[t]=null;try{n()}catch(r){this.l(r)}}}this.g=null},n.prototype.l=function(e){this.i((function(){throw e}))},t.prototype.i=function(){function e(e){return function(r){n||(n=!0,e.call(t,r))}}var t=this,n=!1;return{resolve:e(this.C),reject:e(this.j)}},t.prototype.C=function(e){if(e===this)this.j(new TypeError("A Promise cannot resolve to itself"));else if(e instanceof t)this.F(e);else{e:switch(Rl(e)){case"object":var n=null!=e;break e;case"function":n=!0;break e;default:n=!1}n?this.A(e):this.m(e)}},t.prototype.A=function(e){var t=void 0;try{t=e.then}catch(n){return void this.j(n)}"function"==typeof t?this.J(t,e):this.m(e)},t.prototype.j=function(e){this.o(2,e)},t.prototype.m=function(e){this.o(1,e)},t.prototype.o=function(e,t){if(0!=this.h)throw Error("Cannot settle("+e+", "+t+"): Promise already settled in state"+this.h);this.h=e,this.l=t,this.u()},t.prototype.u=function(){if(null!=this.g){for(var e=0;e<this.g.length;++e)a.h(this.g[e]);this.g=null}};var a=new n;return t.prototype.F=function(e){var t=this.i();e.nc(t.resolve,t.reject)},t.prototype.J=function(e,t){var n=this.i();try{e.call(t,n.resolve,n.reject)}catch(r){n.reject(r)}},t.prototype.then=function(e,n){function r(e,t){return"function"==typeof e?function(t){try{i(e(t))}catch(n){a(n)}}:t}var i,a,o=new t((function(e,t){i=e,a=t}));return this.nc(r(e,i),r(n,a)),o},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype.nc=function(e,t){function n(){switch(r.h){case 1:e(r.l);break;case 2:t(r.l);break;default:throw Error("Unexpected state: "+r.h)}}var r=this;null==this.g?a.h(n):this.g.push(n)},t.resolve=r,t.reject=function(e){return new t((function(t,n){n(e)}))},t.race=function(e){return new t((function(t,n){for(var i=w(e),a=i.next();!a.done;a=i.next())r(a.value).nc(t,n)}))},t.all=function(e){var n=w(e),i=n.next();return i.done?r([]):new t((function(e,t){function a(t){return function(n){o[t]=n,0==--s&&e(o)}}var o=[],s=0;do{o.push(void 0),s++,r(i.value).nc(a(o.length-1),t),i=n.next()}while(!i.done)}))},t})),S("Promise.prototype.finally",(function(e){return e||function(e){return this.then((function(t){return Zy.resolve(e()).then((function(){return t}))}),(function(t){return Zy.resolve(e()).then((function(){throw t}))}))}}));var E,x="function"==typeof Cw?Cw:function(e){function t(){}return t.prototype=e,new t};if("function"==typeof Rw)E=Rw;else{var k;e:{var A={};try{A.__proto__={a:!0},k=A.a;break e}catch(g){}k=!1}E=k?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var M=E;function I(e,t){if(e.prototype=x(t.prototype),e.prototype.constructor=e,M)M(e,t);else for(var n in t)if("prototype"!=n)if(kw){var r=dw(t,n);r&&Aw(e,n,r)}else e[n]=t[n];e.Lg=t.prototype}function C(){this.l=!1,this.i=null,this.B=void 0,this.s=1,this.h=this.j=0,this.o=this.g=null}function R(e){if(e.l)throw new TypeError("Generator is already running");e.l=!0}function P(e,t){e.g={ce:t,ne:!0},e.s=e.j||e.h}function N(e,t,n){return e.s=n,{value:t}}function j(e){e.s=0}function O(e,t,n){e.j=t,null!=n&&(e.h=n)}function _(e,t){e.j=0,e.h=t||0}function L(e,t){e.s=t,e.j=0}function D(e){e.j=0;var t=e.g.ce;return e.g=null,t}function U(e){e.o=[e.g],e.j=0,e.h=0}function F(e,t){var n,r=Wd(n=e.o).call(n,0)[0];(r=e.g=e.g||r)?r.ne?e.s=e.j||e.h:null!=r.I&&e.h<r.I?(e.s=r.I,e.g=null):e.s=e.h:e.s=t}function K(e){this.g=new C,this.h=e}function B(e,t,n,r){try{var i=t.call(e.g.i,n);if(!(i instanceof Object))throw new TypeError("Iterator result "+i+" is not an object");if(!i.done)return e.g.l=!1,i;var a=i.value}catch(o){return e.g.i=null,P(e.g,o),H(e)}return e.g.i=null,r.call(e.g,a),H(e)}function H(e){for(;e.g.s;)try{var t=e.h(e.g);if(t)return e.g.l=!1,{value:t.value,done:!1}}catch(n){e.g.B=void 0,P(e.g,n)}if(e.g.l=!1,e.g.g){if(t=e.g.g,e.g.g=null,t.ne)throw t.ce;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function V(e){this.next=function(t){return R(e.g),e.g.i?t=B(e,e.g.i.next,t,e.g.m):(e.g.m(t),t=H(e)),t},this.throw=function(t){return R(e.g),e.g.i?t=B(e,e.g.i.throw,t,e.g.m):(P(e.g,t),t=H(e)),t},this.return=function(t){return function(e,t){R(e.g);var n=e.g.i;return n?B(e,"return"in n?n.return:function(e){return{value:e,done:!0}},t,e.g.return):(e.g.return(t),H(e))}(e,t)},m(),this[Iw]=function(){return this}}function z(e,t){return V.prototype=e.prototype,new V(new K(t))}function q(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function G(e,t,n){e instanceof String&&(e=String(e));for(var r=e.length,i=0;i<r;i++){var a=e[i];if(t.call(n,a,i,e))return{le:i,Qe:a}}return{le:-1,Qe:void 0}}function W(e,t,n){if(null==e)throw new TypeError("The 'this' value for String.prototype."+n+" must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype."+n+" must not be a regular expression");return e+""}C.prototype.m=function(e){this.B=e},C.prototype.return=function(e){this.g={return:e},this.s=this.h},C.prototype.I=function(e){this.s=e},S("Array.prototype.keys",(function(e){return e||function(){return function(e,t){m(),e instanceof String&&(e+="");var n=0,r={next:function(){if(n<e.length){var i=n++;return{value:t(i,e[i]),done:!1}}return r.next=function(){return{done:!0,value:void 0}},r.next()}};return r[Iw]=function(){return r},r}(this,(function(e){return e}))}})),S("WeakMap",(function(e){function t(e){if(this.g=(a+=Math.random()+1).toString(),e){p(),m(),e=w(e);for(var t;!(t=e.next()).done;)t=t.value,this.set(t[0],t[1])}}function n(e){q(e,i)||h(e,i,{value:{}})}function r(e){var t=Object[e];t&&(Object[e]=function(e){return n(e),t(e)})}if(function(){if(!e||!ZM)return!1;try{var t=ZM({}),n=ZM({}),r=new e([[t,2],[n,3]]);return 2==r.get(t)&&3==r.get(n)&&(r.delete(t),r.set(n,4),!r.has(t)&&4==r.get(n))}catch(i){return!1}}())return e;var i="$jscomp_hidden_"+Math.random();r("freeze"),r("preventExtensions"),r("seal");var a=0;return t.prototype.set=function(e,t){if(n(e),!q(e,i))throw Error("WeakMap key fail: "+e);return e[i][this.g]=t,this},t.prototype.get=function(e){return q(e,i)?e[i][this.g]:void 0},t.prototype.has=function(e){return q(e,i)&&q(e[i],this.g)},t.prototype.delete=function(e){return!(!q(e,i)||!q(e[i],this.g))&&delete e[i][this.g]},t})),S("Map",(function(e){function t(){var e={};return e.Na=e.next=e.head=e}function n(e,t){var n=e.g;return b((function(){if(n){for(;n.head!=e.g;)n=n.Na;for(;n.next!=n.head;)return n=n.next,{done:!1,value:t(n)};n=null}return{done:!0,value:void 0}}))}function r(e,t){var n=t&&Rl(t);"object"==n||"function"==n?a.has(t)?n=a.get(t):(n=""+ ++o,a.set(t,n)):n="p_"+t;var r=e.h[n];if(r&&q(e.h,n))for(var i=0;i<r.length;i++){var s=r[i];if(t!=t&&s.key!=s.key||t===s.key)return{id:n,list:r,index:i,ga:s}}return{id:n,list:r,index:-1,ga:void 0}}function i(e){if(this.h={},this.g=t(),this.size=0,e){e=w(e);for(var n;!(n=e.next()).done;)n=n.value,this.set(n[0],n[1])}}if(function(){if(!e||"function"!=typeof e||!sI(e.prototype)||"function"!=typeof ZM)return!1;try{var t=ZM({x:4}),n=new e(w([[t,"s"]]));if("s"!=n.get(t)||1!=n.size||n.get({x:4})||n.set({x:4},"t")!=n||2!=n.size)return!1;var r=sI(n).call(n),i=r.next();return!i.done&&i.value[0]==t&&"s"==i.value[1]&&!((i=r.next()).done||4!=i.value[0].x||"t"!=i.value[1]||!r.next().done)}catch(a){return!1}}())return e;p(),m();var a=new qC;i.prototype.set=function(e,t){var n=r(this,e);return n.list||(n.list=this.h[n.id]=[]),n.ga?n.ga.value=t:(n.ga={next:this.g,Na:this.g.Na,head:this.g,key:e,value:t},n.list.push(n.ga),this.g.Na.next=n.ga,this.g.Na=n.ga,this.size++),this},i.prototype.delete=function(e){var t;return!(!(e=r(this,e)).ga||!e.list||(Wd(t=e.list).call(t,e.index,1),e.list.length||delete this.h[e.id],e.ga.Na.next=e.ga.next,e.ga.next.Na=e.ga.Na,e.ga.head=null,this.size--,0))},i.prototype.clear=function(){this.h={},this.g=this.g.Na=t(),this.size=0},i.prototype.has=function(e){return!!r(this,e).ga},i.prototype.get=function(e){return(e=r(this,e).ga)&&e.value},i.prototype.entries=function(){return n(this,(function(e){return[e.key,e.value]}))},i.prototype.keys=function(){return n(this,(function(e){return e.key}))},i.prototype.values=function(){return n(this,(function(e){return e.value}))},i.prototype.forEach=function(e,t){for(var n,r=sI(this).call(this);!(n=r.next()).done;)n=n.value,e.call(t,n[1],n[0],this)},i.prototype[Iw]=sI(i.prototype);var o=0;return i})),S("Set",(function(e){function t(e){if(this.g=new AP,e){e=w(e);for(var t;!(t=e.next()).done;)this.add(t.value)}this.size=this.g.size}return function(){if(!e||"function"!=typeof e||!sI(e.prototype)||"function"!=typeof ZM)return!1;try{var t=ZM({x:4}),n=new e(w([t]));if(!n.has(t)||1!=n.size||n.add(t)!=n||1!=n.size||n.add({x:4})!=n||2!=n.size)return!1;var r=sI(n).call(n),i=r.next();return!i.done&&i.value[0]==t&&i.value[1]==t&&!(i=r.next()).done&&i.value[0]!=t&&4==i.value[0].x&&i.value[1]==i.value[0]&&r.next().done}catch(a){return!1}}()?e:(p(),m(),t.prototype.add=function(e){return this.g.set(e,e),this.size=this.g.size,this},t.prototype.delete=function(e){return e=this.g.delete(e),this.size=this.g.size,e},t.prototype.clear=function(){this.g.clear(),this.size=0},t.prototype.has=function(e){return this.g.has(e)},t.prototype.entries=function(){var e;return sI(e=this.g).call(e)},t.prototype.values=function(){var e;return OP(e=this.g).call(e)},t.prototype.keys=OP(t.prototype),t.prototype[Iw]=OP(t.prototype),t.prototype.forEach=function(e,t){var n,r=this;Gf(n=this.g).call(n,(function(n){return e.call(t,n,n,r)}))},t)})),S("Array.prototype.findIndex",(function(e){return e||function(e,t){return G(this,e,t).le}})),S("Array.prototype.find",(function(e){return e||function(e,t){return G(this,e,t).Qe}})),S("String.prototype.startsWith",(function(e){return e||function(e,t){for(var n=W(this,e,"startsWith"),r=n.length,i=e.length,a=Math.max(0,Math.min(0|t,n.length)),o=0;o<i&&a<r;)if(n[a++]!=e[o++])return!1;return o>=i}})),S("Object.is",(function(e){return e||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}})),S("Array.prototype.includes",(function(e){return e||function(e,t){var n=this;n instanceof String&&(n=String(n));var r=n.length,i=t||0;for(0>i&&(i=Math.max(i+r,0));i<r;i++){var a=n[i];if(a===e||_P(a,e))return!0}return!1}})),S("String.prototype.includes",(function(e){return e||function(e,t){var n;return-1!==Hh(n=W(this,e,"includes")).call(n,e,t||0)}})),S("Array.from",(function(e){return e||function(e,t,n){m(),t=null!=t?t:function(e){return e};var r=[],i=jw(e);if("function"==typeof i)for(e=i.call(e);!(i=e.next()).done;)r.push(t.call(n,i.value));else{i=e.length;for(var a=0;a<i;a++)r.push(t.call(n,e[a]))}return r}}));var X="function"==typeof rw?rw:function(e,t){for(var n=1;n<arguments.length;n++){var r=arguments[n];if(r)for(var i in r)q(r,i)&&(e[i]=r[i])}return e};S("Object.assign",(function(e){return e||X}));var Y=this;function $(e,t){var n,r=e.split("."),i=Y;r[0]in i||!i.execScript||i.execScript("var "+r[0]);for(;r.length&&(n=r.shift());)r.length||void 0===t?i=i[n]?i[n]:i[n]={}:i[n]=t}function J(e,t){function n(){}n.prototype=t.prototype,e.Lg=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.Wg=function(e,n,r){return t.prototype[n].apply(e,xd(Array.prototype).call(arguments,2))}}function Q(e){this.i=Math.exp(Math.log(.5)/e),this.h=this.g=0}function Z(e,t,n){var r=Math.pow(e.i,t);n=n*(1-r)+r*e.g,isNaN(n)||(e.g=n,e.h+=t)}function ee(e){return e.g/(1-Math.pow(e.i,e.h))}function te(){this.h=new Q(2),this.i=new Q(5),this.g=0}Y.g=!0,te.prototype.getBandwidthEstimate=function(e){return 128e3>this.g?e:Math.min(ee(this.h),ee(this.i))};var ne={sb:0,kc:function(){},ba:function(){},error:function(){},v:function(){},info:function(){},debug:function(){},K:function(){},O:function(){}};function re(e,t,n,r){for(var i=[],a=3;a<arguments.length;++a)i[a-3]=arguments[a];this.severity=e,this.category=t,this.code=n,this.data=i,this.handled=!1}e.console&&Pw(e.console.log)&&(ne.ba=Pw(r=console.warn).call(r,console),ne.kc=Pw(i=console.error).call(i,console),1<=ne.sb&&(ne.error=Pw(a=console.error).call(a,console)),2<=ne.sb&&(ne.v=Pw(o=console.warn).call(o,console)),3<=ne.sb&&(ne.info=Pw(s=console.info).call(s,console)),4<=ne.sb&&(ne.debug=Pw(u=console.log).call(u,console)),5<=ne.sb&&(ne.K=Pw(c=console.debug).call(c,console)),6<=ne.sb&&(ne.O=Pw(l=console.debug).call(l,console))),$("shaka.util.Error",re),re.prototype.toString=function(){return"shaka.util.Error "+DA(this,null," ")},re.Severity={RECOVERABLE:1,CRITICAL:2},re.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9},re.Code={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,INVALID_TEXT_HEADER:2e3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,BUFFER_READ_OUT_OF_BOUNDS:3e3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,UNABLE_TO_GUESS_MANIFEST_TYPE:4e3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_MASTER_PLAYLIST_NOT_PROVIDED:4022,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,HLS_AES_128_ENCRYPTION_NOT_SUPPORTED:4034,HLS_INTERNAL_SKIP_STREAM:4035,INVALID_STREAMS_CHOSEN:5005,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,LOAD_INTERRUPTED:7e3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,STORE_ALREADY_IN_PROGRESS:9006,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013};var ie=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function ae(e){var t;e instanceof ae?(oe(this,e.Ba),this.pb=e.pb,this.Aa=e.Aa,se(this,e.Ob),this.pa=e.pa,ue(this,e.g.clone()),this.bb=e.bb):e&&(t=String(e).match(ie))?(oe(this,t[1]||"",!0),this.pb=ce(t[2]||""),this.Aa=ce(t[3]||"",!0),se(this,t[4]),this.pa=ce(t[5]||"",!0),ue(this,t[6]||"",!0),this.bb=ce(t[7]||"")):this.g=new me(null)}function oe(e,t,n){e.Ba=n?ce(t,!0):t,e.Ba&&(e.Ba=e.Ba.replace(/:$/,""))}function se(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.Ob=t}else e.Ob=null}function ue(e,t,n){t instanceof me?e.g=t:(n||(t=le(t,ge)),e.g=new me(t))}function ce(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function le(e,t,n){return"string"==typeof e?(e=encodeURI(e).replace(t,fe),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function fe(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}(f=ae.prototype).Ba="",f.pb="",f.Aa="",f.Ob=null,f.pa="",f.bb="",f.toString=function(){var e=[],t=this.Ba;if(t&&e.push(le(t,he,!0),":"),t=this.Aa){e.push("//");var n=this.pb;n&&e.push(le(n,he,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(t=this.Ob)&&e.push(":",String(t))}return(t=this.pa)&&(this.Aa&&"/"!=t.charAt(0)&&e.push("/"),e.push(le(t,"/"==t.charAt(0)?pe:de,!0))),(t=this.g.toString())&&e.push("?",t),(t=this.bb)&&e.push("#",le(t,ve)),e.join("")},f.resolve=function(e){var t=this.clone();"data"===t.Ba&&(t=new ae);var n=!!e.Ba;n?oe(t,e.Ba):n=!!e.pb,n?t.pb=e.pb:n=!!e.Aa,n?t.Aa=e.Aa:n=null!=e.Ob;var r=e.pa;if(n)se(t,e.Ob);else if(n=!!e.pa){if("/"!=r.charAt(0))if(this.Aa&&!this.pa)r="/"+r;else{var i,a=$P(i=t.pa).call(i,"/");-1!=a&&(r=t.pa.substr(0,a+1)+r)}if(".."==r||"."==r)r="";else if(-1!=Hh(r).call(r,"./")||-1!=Hh(r).call(r,"/.")){a=0==$P(r).call(r,"/",0),r=r.split("/");for(var o=[],s=0;s<r.length;){var u=r[s++];"."==u?a&&s==r.length&&o.push(""):".."==u?((1<o.length||1==o.length&&""!=o[0])&&o.pop(),a&&s==r.length&&o.push("")):(o.push(u),a=!0)}r=o.join("/")}}return n?t.pa=r:n=""!==e.g.toString(),n?ue(t,e.g.clone()):n=!!e.bb,n&&(t.bb=e.bb),t},f.clone=function(){return new ae(this)};var he=/[#\/\?@]/g,de=/[#\?:]/g,pe=/[#\?]/g,ge=/[#\?@]/g,ve=/#/g;function me(e){this.g=e||null}(f=me.prototype).na=null,f.qc=null,f.add=function(e,t){if(!this.na&&(this.na={},this.qc=0,this.g))for(var n=this.g.split("&"),r=0;r<n.length;r++){var i,a=Hh(i=n[r]).call(i,"="),o=null;if(0<=a){var s=n[r].substring(0,a);o=n[r].substring(a+1)}else s=n[r];s=decodeURIComponent(s.replace(/\+/g," ")),o=o||"",this.add(s,decodeURIComponent(o.replace(/\+/g," ")))}return this.g=null,(n=this.na.hasOwnProperty(e)&&this.na[e])||(this.na[e]=n=[]),n.push(t),this.qc++,this},f.toString=function(){if(this.g)return this.g;if(!this.na)return"";var e,t=[];for(e in this.na)for(var n=encodeURIComponent(e),r=this.na[e],i=0;i<r.length;i++){var a=n;""!==r[i]&&(a+="="+encodeURIComponent(r[i])),t.push(a)}return this.g=t.join("&")},f.clone=function(){var e=new me;if(e.g=this.g,this.na){var t,n={};for(t in this.na){var r;n[t]=nd(r=this.na[t]).call(r)}e.na=n,e.qc=this.qc}return e};var ye={df:function(e,t){var n;return uN(e).call(e,Pw(n=function(e,t,n){return t.catch(Pw(e).call(e,null,n))}).call(n,null,t),Zy.reject())},Rc:function(e,t){return nd(e).call(e,t)},Bc:function(){},Ra:function(e){return null!=e}};function be(e,t){var n,r,i;if(0==t.length)return e;var a=Mb(t).call(t,(function(e){return new ae(e)}));return Mb(n=uN(r=Mb(i=Mb(e).call(e,(function(e){return new ae(e)}))).call(i,(function(e){var t;return Mb(a).call(a,Pw(t=e.resolve).call(t,e))}))).call(r,ye.Rc,[])).call(n,(function(e){return e.toString()}))}function we(e,t){return{keySystem:e,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:t||[],keyIds:[]}}var Se={Za:"video",Sb:"audio",za:"text",Ug:"image",Sg:"application"},Te=1/15;function Ee(){var e,t,n=new Zy((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function xe(e){if(!e)return"";239==(e=new Uint8Array(e))[0]&&187==e[1]&&191==e[2]&&(e=e.subarray(3)),e=Ce(e),e=escape(e);try{return decodeURIComponent(e)}catch(t){throw new re(2,2,2004)}}function ke(e,t,n){if(!e)return"";if(!n&&0!=e.byteLength%2)throw ne.error("Data has an incorrect length, must be even."),new re(2,2,2004);if(e instanceof ArrayBuffer)var r=e;else(n=new Uint8Array(e.byteLength)).set(new Uint8Array(e)),r=n.buffer;e=Math.floor(e.byteLength/2),n=new Uint16Array(e),r=new DataView(r);for(var i=0;i<e;i++)n[i]=r.getUint16(2*i,t);return Ce(n)}function Ae(e){var t,n=new Uint8Array(e);if(239==n[0]&&187==n[1]&&191==n[2])return xe(n);if(254==n[0]&&255==n[1])return ke(n.subarray(2),!1);if(255==n[0]&&254==n[1])return ke(n.subarray(2),!0);var r=Pw(t=function(e,t){return e.byteLength<=t||32<=e[t]&&126>=e[t]}).call(t,null,n);if(ne.debug("Unable to find byte-order-mark, making an educated guess."),0==n[0]&&0==n[2])return ke(e,!1);if(0==n[1]&&0==n[3])return ke(e,!0);if(r(0)&&r(1)&&r(2)&&r(3))return xe(e);throw new re(2,2,2003)}function Me(e){e=encodeURIComponent(e),e=unescape(e);for(var t=new Uint8Array(e.length),n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t.buffer}function Ie(e,t){for(var n=new Uint8Array(2*e.length),r=new DataView(n.buffer),i=0;i<e.length;++i)r.setUint16(2*i,e.charCodeAt(i),t);return n.buffer}function Ce(e){if(!Re)for(var t=function(e){try{var t=new Uint8Array(e);return 0<String.fromCharCode.apply(null,t).length}catch(n){return!1}},n={size:65536};0<n.size;(n={size:n.size}).size/=2)if(t(n.size)){Re=function(e){return function(t){for(var n="",r=0;r<t.length;r+=e.size)n+=String.fromCharCode.apply(null,t.subarray(r,r+e.size));return n}}(n);break}return Re(e)}Ee.prototype.resolve=function(){},Ee.prototype.reject=function(){},$("shaka.util.StringUtils.fromUTF8",xe),$("shaka.util.StringUtils.fromUTF16",ke),$("shaka.util.StringUtils.fromBytesAutoDetect",Ae),$("shaka.util.StringUtils.toUTF8",Me),$("shaka.util.StringUtils.toUTF16",Ie);var Re=null;$("shaka.util.StringUtils.resetFromCharCode",(function(){Re=null}));var Pe={Mc:function(t,n){var r=Ce(t);return n=null==n||n,r=e.btoa(r).replace(/\+/g,"-").replace(/\//g,"_"),n?r:r.replace(/=*$/,"")}};function Ne(){var e,t;this.g=new muxjs.mp4.Transmuxer({keepOriginalTimestamps:!0}),this.h=null,this.l=[],this.i=[],this.j=!1,this.g.on("data",Pw(e=this.o).call(e,this)),this.g.on("done",Pw(t=this.m).call(t,this))}function je(t,n){return!(!e.muxjs||"mp2t"!=t.toLowerCase().split(";")[0].split("/")[1])&&(n?MediaSource.isTypeSupported(Oe(n,t)):MediaSource.isTypeSupported(Oe("audio",t))||MediaSource.isTypeSupported(Oe("video",t)))}function Oe(e,t){var n=t.replace(/mp2t/i,"mp4");"audio"==e&&(n=n.replace("video","audio"));var r=/avc1\.(66|77|100)\.(\d+)/.exec(n);if(r){var i="avc1.",a=r[1],o=Number(r[2]);i=("66"==a?i+"4200":"77"==a?i+"4d00":i+"6400")+(o>>4).toString(16),i+=(15&o).toString(16),n=n.replace(r[0],i)}return n}function _e(e){this.h=e,this.g=null}function Le(e){this.h=e,this.g=null}function De(e,t){var n={maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0};this.o=null==e.maxAttempts?n.maxAttempts:e.maxAttempts,this.j=null==e.baseDelay?n.baseDelay:e.baseDelay,this.m=null==e.fuzzFactor?n.fuzzFactor:e.fuzzFactor,this.l=null==e.backoffFactor?n.backoffFactor:e.backoffFactor,this.g=0,this.h=this.j,(this.i=void 0!==t&&t)&&(this.g=1)}function Ue(e){return T((function t(){var n,r;return z(t,(function(t){switch(t.s){case 1:if(e.g>=e.o){if(!e.i)return t.return(Zy.reject());e.g=1,e.h=e.j}return n=e.g,e.g++,0==n?t.return():(r=e.h*(1+(2*Math.random()-1)*e.m),N(t,new Zy((function(e){new Le(e).V(r/1e3)})),2));case 2:e.h*=e.l,j(t)}}))}))}function Fe(e,t){this.promise=e,this.se=t,this.g=!1}function Ke(e){return new Fe(Zy.reject(e),(function(){return Zy.resolve()}))}function Be(){var e=Zy.reject(new re(2,7,7001));return e.catch((function(){})),new Fe(e,(function(){return Zy.resolve()}))}function He(e){return new Fe(Zy.resolve(e),(function(){return Zy.resolve()}))}function Ve(e){return new Fe(e,(function(){return e.catch((function(){}))}))}function ze(e){return new Fe(Zy.all(Mb(e).call(e,(function(e){return e.promise}))),(function(){return Zy.all(Mb(e).call(e,(function(e){return e.abort()})))}))}function qe(t,n){for(var r in n=void 0===n?{}:n)this[r]=n[r];this.defaultPrevented=this.cancelable=this.bubbles=!1,this.timeStamp=e.performance&&e.performance.now?e.performance.now():CT(),this.type=t,this.isTrusted=!1,this.target=this.currentTarget=null,this.g=!1}function Ge(){this.g={}}function We(){this.hd=new Ge,this.jc=this}function Xe(e){var t=new $O;return function e(n){switch(Rl(n)){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return n;default:if(!n||n.buffer&&n.buffer.constructor==ArrayBuffer)return n;if(t.has(n))return null;var r=n.constructor==Array;if(n.constructor!=Object&&!r)return null;t.add(n);var i,a=r?[]:{};for(i in n)a[i]=e(n[i]);return r&&(a.length=n.length),a}}(e)}function Ye(e,t){return!("number"!=typeof e||"number"!=typeof t||!isNaN(e)||!isNaN(t))||e===t}function $e(e,t){var n=Hh(e).call(e,t);-1<n&&Wd(e).call(e,n,1)}function Je(e,t,n){if(n||(n=Ye),e.length!=t.length)return!1;t=xd(t).call(t);for(var r={},i=(e=w(e)).next();!i.done;r={item:r.item},i=e.next()){if(r.item=i.value,-1==(i=rE(t).call(t,function(e){return function(t){return n(e.item,t)}}(r))))return!1;t[i]=t[t.length-1],t.pop()}return 0==t.length}function Qe(){this.g=[]}function Ze(e,t){e.g.push(t.finally((function(){$e(e.g,t)})))}function et(e){We.call(this),this.j=!1,this.l=new Qe,this.g=new $O,this.h=new $O,this.i=e||null}$("shaka.util.Uint8ArrayUtils.toBase64",Pe.Mc),Pe.Ja=function(t){t=e.atob(t.replace(/-/g,"+").replace(/_/g,"/"));for(var n=new Uint8Array(t.length),r=0;r<t.length;++r)n[r]=t.charCodeAt(r);return n},$("shaka.util.Uint8ArrayUtils.fromBase64",Pe.Ja),Pe.$c=function(e){for(var t=new Uint8Array(e.length/2),n=0;n<e.length;n+=2)t[n/2]=Sb(e.substr(n,2),16);return t},$("shaka.util.Uint8ArrayUtils.fromHex",Pe.$c),Pe.Nc=function(e){for(var t="",n=0;n<e.length;++n){var r=e[n].toString(16);1==r.length&&(r="0"+r),t+=r}return t},$("shaka.util.Uint8ArrayUtils.toHex",Pe.Nc),Pe.Ha=function(e,t){if(!e&&!t)return!0;if(!e||!t||e.length!=t.length)return!1;for(var n=0;n<e.length;++n)if(e[n]!=t[n])return!1;return!0},$("shaka.util.Uint8ArrayUtils.equal",Pe.Ha),Pe.concat=function(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];for(var r=n=0;r<t.length;++r)n+=t[r].length;n=new Uint8Array(n);for(var i=r=0;i<t.length;++i)n.set(t[i],r),r+=t[i].length;return n},$("shaka.util.Uint8ArrayUtils.concat",nd(Pe)),Ne.prototype.destroy=function(){return this.g.dispose(),this.g=null,Zy.resolve()},Ne.prototype.o=function(e){this.i=e.captions;var t=new Uint8Array(e.data.byteLength+e.initSegment.byteLength);t.set(e.initSegment,0),t.set(e.data,e.initSegment.byteLength),this.l.push(t)},Ne.prototype.m=function(){var e={data:nd(Pe).apply(null,this.l),captions:this.i};this.h.resolve(e),this.j=!1},_e.prototype.V=function(t){var n=this;this.stop();var r=!0,i=null;return this.g=function(){e.clearTimeout(i),r=!1},i=QS((function(){r&&n.h()}),1e3*t),this},_e.prototype.stop=function(){this.g&&(this.g(),this.g=null)},$("shaka.util.Timer",Le),Le.prototype.Lc=function(){return this.stop(),this.h(),this},Le.prototype.tickNow=Le.prototype.Lc,Le.prototype.V=function(e){var t=this;return this.stop(),this.g=new _e((function(){t.h()})).V(e),this},Le.prototype.tickAfter=Le.prototype.V,Le.prototype.Oa=function(e){var t=this;return this.stop(),this.g=new _e((function(){t.g.V(e),t.h()})).V(e),this},Le.prototype.tickEvery=Le.prototype.Oa,Le.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)},Le.prototype.stop=Le.prototype.stop,$("shaka.util.AbortableOperation",Fe),Fe.failed=Ke,Fe.aborted=Be,Fe.completed=He,Fe.notAbortable=Ve,Fe.prototype.abort=function(){return this.g=!0,this.se()},Fe.prototype.abort=Fe.prototype.abort,Fe.all=ze,Fe.prototype.finally=function(e){return this.promise.then((function(){return e(!0)}),(function(){return e(!1)})),this},Fe.prototype.finally=Fe.prototype.finally,Fe.prototype.ca=function(e,t){function n(n){return function(s){if(i.g&&n)a.reject(o);else{var u=n?e:t;u?r=function(e,t,n){try{var r=e(t);return r&&r.promise&&r.abort?(n.resolve(r.promise),function(){return r.abort()}):(n.resolve(r),function(){return Zy.resolve(r).then((function(){}),(function(){}))})}catch(i){return n.reject(i),function(){return Zy.resolve()}}}(u,s,a):(n?a.resolve:a.reject)(s)}}}function r(){return a.reject(o),i.abort()}var i=this,a=new Ee,o=new re(2,7,7001);return this.promise.then(n(!0),n(!1)),new Fe(a,(function(){return r()}))},Fe.prototype.chain=Fe.prototype.ca,$("shaka.util.FakeEvent",qe),qe.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},qe.prototype.stopImmediatePropagation=function(){this.g=!0},qe.prototype.stopPropagation=function(){},(f=Ge.prototype).push=function(e,t){this.g.hasOwnProperty(e)?this.g[e].push(t):this.g[e]=[t]},f.get=function(e){return(e=this.g[e])?xd(e).call(e):null},f.getAll=function(){var e,t=[];for(e in this.g)t.push.apply(t,this.g[e]);return t},f.remove=function(e,t){var n=this.g[e];if(n)for(var r=0;r<n.length;++r)n[r]==t&&(Wd(n).call(n,r,1),--r)},f.forEach=function(e){for(var t in this.g)e(t,this.g[t])},f.size=function(){return ad(this.g).length},We.prototype.addEventListener=function(e,t){this.hd.push(e,t)},We.prototype.removeEventListener=function(e,t){this.hd.remove(e,t)},We.prototype.dispatchEvent=function(e){for(var t=this.hd.get(e.type)||[],n=0;n<t.length;++n){e.target=this.jc,e.currentTarget=this.jc;var r=t[n];try{r.handleEvent?r.handleEvent(e):r.call(this,e)}catch(i){ne.error("Uncaught exception in event handler",i,i?i.message:null,i?i.stack:null)}if(e.g)break}return e.defaultPrevented},Qe.prototype.destroy=function(){var e,t=[];return Gf(e=this.g).call(e,(function(e){e.promise.catch((function(){})),t.push(e.abort())})),this.g=[],Zy.all(t)},J(et,We),$("shaka.net.NetworkingEngine",et),et.RequestType={MANIFEST:0,SEGMENT:1,LICENSE:2,APP:3,TIMING:4},et.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:3};var tt={};function nt(e,t,n){n=n||3;var r=tt[e];(!r||n>=r.priority)&&(tt[e]={priority:n,mg:t})}function rt(e,t){return{uris:e,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:t,licenseRequestType:null,sessionId:null}}function it(e,t,n,r,i,a,o){var s=new ae(n.uris[i]),u=s.Ba,c=!1;u||(u=location.protocol,oe(s,u=xd(u).call(u,0,-1)),n.uris[i]=s.toString()),u=u.toLowerCase();var l,f=(u=tt[u])?u.mg:null;return f?Ve(Ue(r)).ca((function(){return e.j?Be():(l=CT(),f(n.uris[i],n,t,(function(n,r,i){e.i&&1==t&&(e.i(n,r),c=!0,o.g=i)})))})).ca((function(e){return null==e.timeMs&&(e.timeMs=CT()-l),{response:e,Nf:c}}),(function(s){if(s&&7001==s.code)throw s;if(e.j)return Be();if(s&&1==s.severity)return e.dispatchEvent(new qe("retry",{error:s instanceof re?s:null})),i=(i+1)%n.uris.length,it(e,t,n,r,i,s,o);throw s||a})):Ke(new re(2,1,1e3,s))}function at(){this.g=0}function ot(e,t,n){Fe.call(this,e,t),this.h=n}function st(){}function ut(){this.g=new Ge}function ct(e,t,n,r){this.target=e,this.type=t,this.listener=n,this.g=function(e,t){var n;if(null==t)return!1;if("boolean"==typeof t)return t;var r=new $O(["passive","capture"]);return Hb(n=ad(t)).call(n,(function(e){return!r.has(e)})),function(e){var t=lt;if(null==t){t=!1;try{var n={},r={get:function(){return t=!0,!1}};Aw(n,"passive",r),Aw(n,"capture",r),r=function(){},e.addEventListener("test",r,n),e.removeEventListener("test",r,n)}catch(i){t=!1}lt=t}return t||!1}(e)?t:t.capture||!1}(e,r),this.target.addEventListener(t,n,this.g)}et.registerScheme=nt,et.unregisterScheme=function(e){delete tt[e]},et.prototype.og=function(e){this.g.add(e)},et.prototype.registerRequestFilter=et.prototype.og,et.prototype.Ng=function(e){this.g.delete(e)},et.prototype.unregisterRequestFilter=et.prototype.Ng,et.prototype.bf=function(){this.g.clear()},et.prototype.clearAllRequestFilters=et.prototype.bf,et.prototype.pg=function(e){this.h.add(e)},et.prototype.registerResponseFilter=et.prototype.pg,et.prototype.Og=function(e){this.h.delete(e)},et.prototype.unregisterResponseFilter=et.prototype.Og,et.prototype.cf=function(){this.h.clear()},et.prototype.clearAllResponseFilters=et.prototype.cf,et.defaultRetryParameters=function(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0}},et.makeRequest=rt,et.prototype.destroy=function(){return this.j=!0,this.g.clear(),this.h.clear(),this.l.destroy()},et.prototype.destroy=et.prototype.destroy,et.prototype.request=function(e,t){var n=this,r=new at;if(this.j){var i=Zy.reject(new re(2,7,7001));return i.catch((function(){})),new ot(i,(function(){return Zy.resolve()}),r)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?Xe(t.retryParameters):{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},t.uris=Xe(t.uris),i=function(e,t,n){for(var r=He(void 0),i={},a=(e=w(e.g)).next();!a.done;i={Gd:i.Gd},a=e.next())i.Gd=a.value,r=r.ca(function(e){return function(){return e.Gd(t,n)}}(i));return r.ca(void 0,(function(e){if(e&&7001==e.code)throw e;throw new re(2,1,1006,e)}))}(this,e,t);var a=i.ca((function(){return it(n,e,t,new De(t.retryParameters,!1),0,null,r)})),o=a.ca((function(t){return function(e,t,n){for(var r=He(void 0),i=(e=w(e.h)).next();!i.done;i=e.next()){var a;r=r.ca(Pw(a=i.value).call(a,null,t,n.response))}return r.ca((function(){return n}),(function(e){if(e&&7001==e.code)throw e;var t=2;throw e instanceof re&&(t=e.severity),new re(t,1,1007,e)}))}(n,e,t)})),s=CT(),u=0;i.promise.then((function(){u=CT()-s}),(function(){}));var c=0;return a.promise.then((function(){c=CT()}),(function(){})),i=new ot((i=o.ca((function(t){var r=CT()-c,i=t.response;return i.timeMs+=u,i.timeMs+=r,t.Nf||!n.i||i.fromCache||1!=e||n.i(i.timeMs,i.data.byteLength),i}),(function(e){throw e&&(e.severity=2),e}))).promise,i.se,r),Ze(this.l,i),i},et.prototype.request=et.prototype.request,et.NumBytesRemainingClass=at,I(ot,Fe),et.PendingRequest=ot,ot.all=ze,ot.notAbortable=Ve,ot.completed=He,ot.aborted=Be,ot.failed=Ke,$("shaka.util.IReleasable",st),st.prototype.release=function(){},$("shaka.util.EventManager",ut),ut.prototype.release=function(){this.nb(),this.g=null},ut.prototype.release=ut.prototype.release,ut.prototype.H=function(e,t,n,r){this.g&&(e=new ct(e,t,n,r),this.g.push(t,e))},ut.prototype.listen=ut.prototype.H,ut.prototype.ya=function(e,t,n,r){var i=this;this.H(e,t,(function r(a){i.ta(e,t,r),n(a)}),r)},ut.prototype.listenOnce=ut.prototype.ya,ut.prototype.ta=function(e,t,n){if(this.g)for(var r=this.g.get(t)||[],i=(r=w(r)).next();!i.done;i=r.next())(i=i.value).target!=e||n!=i.listener&&n||(i.ta(),this.g.remove(t,i))},ut.prototype.unlisten=ut.prototype.ta,ut.prototype.nb=function(){if(this.g){for(var e=this.g.getAll(),t=(e=w(e)).next();!t.done;t=e.next())t.value.ta();this.g.g={}}},ut.prototype.removeAll=ut.prototype.nb,ct.prototype.ta=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1},ct.prototype.unlisten=ct.prototype.ta;var lt=void 0;function ft(e){return new ae(e=Ae(e)).Aa}function ht(e,t,n){function r(e){new DataView(i.buffer).setUint32(a,e.byteLength,!0),a+=4,i.set(e,a),a+=e.byteLength}if(!n||!n.byteLength)throw new re(2,6,6015);t="string"==typeof t?new Uint8Array(Ie(t,!0)):new Uint8Array(t),e=Ie(e=Ae(e),!0);var i=new Uint8Array(12+e.byteLength+t.byteLength+n.byteLength),a=0;return r(new Uint8Array(e)),r(t),r(new Uint8Array(n)),i}function dt(e,t){for(var n=[],r=w(e),i=r.next();!i.done;i=r.next())n.push(t(i.value));return n}function pt(e,t){for(var n=w(e),r=n.next();!r.done;r=n.next())if(!t(r.value))return!1;return!0}function gt(e){var t,n=new AP;return Gf(t=ad(e)).call(t,(function(t){n.set(t,e[t])})),n}function vt(e){var t={};return Gf(e).call(e,(function(e,n){t[n]=e})),t}function mt(e,t){var n=e;return t&&(n+='; codecs="'+t+'"'),n}function yt(e){return(e=e.split(/ *; */)).shift(),(e=Jh(e).call(e,(function(e){return oM(e).call(e,"codecs=")})))?e.split("=")[1].replace(/^"|"$/g,""):""}function bt(e){var t=(e=e.split("."))[0];return e.pop(),[t,e.join(".")]}$("shaka.util.FairPlayUtils.defaultGetContentId",ft),$("shaka.util.FairPlayUtils.initDataTransform",ht);var wt=(new AP).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function St(){return!(!e.MediaSource||!MediaSource.isTypeSupported)}function Tt(e){return""!=Mt().canPlayType(e)}function Et(){return At("Tizen")}function xt(){var e;return!!navigator.vendor&&SM(e=navigator.vendor).call(e,"Apple")&&!Et()}function kt(){if(!xt())return null;var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?Sb(e[1],10):null}function At(e){var t;return SM(t=navigator.userAgent||"").call(t,e)}function Mt(){return Ct||(It||(It=new Le((function(){Ct=null}))),(Ct=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Ct=document.createElement("video")),It.V(1),Ct)}var It=null,Ct=null;function Rt(e,t){var n=this;t=void 0===t?1:t,this.J=e,this.C=new $O,this.m=this.o=null,this.Z=!1,this.P=0,this.g=null,this.u=new ut,this.h=new AP,this.F=[],this.A=new Ee,this.j=null,this.l=function(t){n.A.reject(t),e.onError(t)},this.wa=new AP,this.da=new AP,this.X=new Le((function(){return function(e){var t=e.wa,n=e.da;n.clear(),Gf(t).call(t,(function(e,t){return n.set(t,e)})),(t=Yw(OP(n).call(n))).length&&iT(t).call(t,(function(e){return"expired"==e}))&&e.l(new re(2,6,6014)),e.J.Dc(vt(n))}(n)})),this.i=!1,this.ua=new Ee,this.L=!1,this.M=[],this.va=!1,this.ea=new Le((function(){!function(e){var t;Gf(t=e.h).call(t,(function(t,n){var r=t.xd,i=n.expiration;isNaN(i)&&(i=1/0),i!=r&&(e.J.onExpirationUpdated(n.sessionId,i),t.xd=i)}))}(n)})).Oa(t),this.A.catch((function(){}))}function Pt(e,t,n){return e.F=n,e.L=0<n.length,Nt(e,t)}function Nt(t,n){var r=function(t){if(0==(t=gt(t.j.clearKeys)).size)return null;var n=[],r=[];Gf(t).call(t,(function(e,t){var i=Pe.$c(t),a=Pe.$c(e);i={kty:"oct",kid:Pe.Mc(i,!1),k:Pe.Mc(a,!1)},n.push(i),r.push(i.kid)})),t=DA({keys:n});var i=DA({kids:r});return i=[{initData:new Uint8Array(Me(i)),initDataType:"keyids"}],{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+e.btoa(t),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:i,keyIds:[]}}(t);if(r)for(var i=w(n),a=i.next();!a.done;a=i.next())a.value.drmInfos=[r];for((r=hS(n).call(n,(function(e){return 0<e.drmInfos.length})))||function(e,t){var n=[];Gf(t).call(t,(function(e,t){n.push({keySystem:t,licenseServerUri:e,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]})}));for(var r=w(e),i=r.next();!i.done;i=r.next())i.value.drmInfos=n}(n,a=gt(t.j.servers)),a=(i=w(n)).next();!a.done;a=i.next())for(var o=(a=w(a.value.drmInfos)).next();!o.done;o=a.next())Yt(o.value,gt(t.j.servers),gt(t.j.advanced||{}));return a=function(e,t){for(var n=new $O,r=w(t),i=r.next();!i.done;i=r.next()){var a=w(i.value.drmInfos);for(i=a.next();!i.done;i=a.next())n.add(i.value)}for(r=w(n),i=r.next();!i.done;i=r.next())Yt(i.value,gt(e.j.servers),gt(e.j.advanced||{}));a=e.L?"required":"optional";var o=e.L?["persistent-license"]:["temporary"];for(r=new AP,n=w(n),i=n.next();!i.done;i=n.next())i=i.value,r.set(i.keySystem,{audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:"optional",persistentState:a,sessionTypes:o,label:i.keySystem,drmInfos:[]});for(n=w(t),i=n.next();!i.done;i=n.next()){a=(i=i.value).audio,o=i.video;var s=a?Ft(a):"",u=o?Ft(o):"",c=w(i.drmInfos);for(i=c.next();!i.done;i=c.next()){i=i.value;var l=r.get(i.keySystem);l.drmInfos.push(i),i.distinctiveIdentifierRequired&&(l.distinctiveIdentifier="required"),i.persistentStateRequired&&(l.persistentState="required"),a&&(l.audioCapabilities.push({robustness:i.audioRobustness||"",contentType:s}),"ac-3"==a.codecs.toLowerCase()&&Et()&&l.audioCapabilities.push({robustness:i.audioRobustness||"",contentType:mt(a.mimeType,"ec-3")})),o&&l.videoCapabilities.push({robustness:i.videoRobustness||"",contentType:u})}}return r}(t,n),a.size?(a=Kt(t,a),r?a:a.catch((function(){}))):(t.Z=!0,Zy.resolve())}function jt(e){return T((function t(){var n;return z(t,(function(t){switch(t.s){case 1:if(!(e.o&&e.g&&e.g.serverCertificate&&e.g.serverCertificate.length)){t.I(0);break}return O(t,3),N(t,e.o.setServerCertificate(e.g.serverCertificate),5);case 5:t.B||ne.v("Server certificates are not supported by the key system. The server certificate has been ignored."),L(t,0);break;case 3:return n=D(t),t.return(Zy.reject(new re(2,6,6004,n.message)))}}))}))}function Ot(e){var t,n=e.g?e.g.initData:[];return Gf(n).call(n,(function(t){return _t(e,t.initDataType,t.initData)})),Gf(t=e.F).call(t,(function(t){return Bt(e,t)})),n.length||e.F.length||e.A.resolve(),e.A}function _t(e,t,n){for(var r,i=OP(r=e.h).call(r),a=(i=w(i)).next();!a.done;a=i.next())if(Pe.Ha(n,a.value.initData)&&!At("Tizen 2"))return void ne.debug("Ignoring duplicate init data.");!function(e,t,n){var r,i;try{if(e.L){ne.K("Creating new persistent session");var o=e.o.createSession("persistent-license")}else ne.K("Creating new temporary session"),o=e.o.createSession()}catch(a){return void e.l(new re(2,6,6005,a.message))}e.u.H(o,"message",Pw(r=e.ye).call(r,e)),e.u.H(o,"keystatuseschange",Pw(i=e.we).call(i,e)),e.h.set(o,{initData:n,loaded:!1,xd:1/0,Ga:null});try{n=e.j.initDataTransform(n,e.g)}catch(a){return t=a,a instanceof re||(t=new re(2,6,6016,a)),void e.l(t)}o.generateRequest(t,n).catch((function(t){if(!e.i){if(e.h.delete(o),t.errorCode&&t.errorCode.systemCode){var n=t.errorCode.systemCode;0>n&&(n+=Math.pow(2,32)),n="0x"+n.toString(16)}e.l(new re(2,6,6006,t.message,t,n))}}))}(e,t,n)}function Lt(e){return e?e.keySystem:""}function Dt(e,t){if(navigator.userAgent.match(/Edge\//))return!0;if(t=t.toLowerCase(),Et()&&SM(t).call(t,'codecs="ac-3"')){var n=t.replace("ac-3","ec-3");return e.C.has(t)||e.C.has(n)}return e.C.has(t)}function Ut(e){var t;return e=dt(e=Lb(t=e.h).call(t),(function(e){return e.sessionId})),Yw(e)}function Ft(e){var t=mt(e.mimeType,e.codecs);return je(t)?Oe(e.type,t):t}function Kt(e,t){var n,r,i,a,o;if(1==t.size&&t.has(""))return Zy.reject(new re(2,6,6e3));for(var s=w(OP(t).call(t)),u=s.next();!u.done;u=s.next())0==(u=u.value).audioCapabilities.length&&delete u.audioCapabilities,0==u.videoCapabilities.length&&delete u.videoCapabilities;var c=s=new Ee;return Gf(n=[!0,!1]).call(n,Pw(r=function(e){var n=this;Gf(t).call(t,(function(t,r){var i,a;hS(i=t.drmInfos).call(i,(function(e){return!!e.licenseServerUri}))==e&&(c=c.catch(Pw(a=function(){if(!this.i)return navigator.requestMediaKeySystemAccess(r,[t])}).call(a,n)))}))}).call(r,e)),c=(c=c.catch((function(){return Zy.reject(new re(2,6,6001))}))).then(Pw(i=function(e){if(this.i)return Zy.reject();this.C.clear();var n=e.getConfiguration(),r=n.videoCapabilities||[],i=w(n.audioCapabilities||[]);for(n=i.next();!n.done;n=i.next())this.C.add(n.value.contentType.toLowerCase());for(n=(r=w(r)).next();!n.done;n=r.next())this.C.add(n.value.contentType.toLowerCase());r=e.keySystem,i=[];var a=[],o=[],s=[];return function(e,t,n,r,i){Gf(e).call(e,(function(e){var a;if(SM(t).call(t,e.licenseServerUri)||t.push(e.licenseServerUri),e.serverCertificate&&(hS(n).call(n,(function(t){return Pe.Ha(t,e.serverCertificate)}))||n.push(e.serverCertificate)),e.initData&&Gf(a=e.initData).call(a,(function(e){hS(r).call(r,(function(t){return!(!t.keyId||t.keyId!=e.keyId)||t.initDataType==e.initDataType&&Pe.Ha(t.initData,e.initData)}))||r.push(e)})),e.keyIds)for(var o=0;o<e.keyIds.length;++o)SM(i).call(i,e.keyIds[o])||i.push(e.keyIds[o])}))}((n=t.get(e.keySystem)).drmInfos,i,a,o,s),1<a.length&&ne.v("Multiple unique server certificates found! Only the first will be used."),1<i.length&&ne.v("Multiple unique license server URIs found! Only the first will be used."),this.g={keySystem:r,licenseServerUri:i[0],distinctiveIdentifierRequired:"required"==n.distinctiveIdentifier,persistentStateRequired:"required"==n.persistentState,audioRobustness:(n.audioCapabilities?n.audioCapabilities[0].robustness:"")||"",videoRobustness:(n.videoCapabilities?n.videoCapabilities[0].robustness:"")||"",serverCertificate:a[0],initData:o,keyIds:s},this.g.licenseServerUri?e.createMediaKeys():Zy.reject(new re(2,6,6012,this.g.keySystem))}).call(i,e)).then(Pw(a=function(e){if(this.i)return Zy.reject();ne.info("Created MediaKeys object for key system",this.g.keySystem),this.o=e,this.Z=!0}).call(a,e)).catch(Pw(o=function(e){if(!this.i)return this.g=null,this.C.clear(),e instanceof re?Zy.reject(e):Zy.reject(new re(2,6,6002,e.message))}).call(o,e)),s.reject(),c}function Bt(e,t){var n,r,i,a;try{ne.K("Attempting to load an offline session",t);var o=e.o.createSession("persistent-license")}catch(c){var s=new re(2,6,6005,c.message);return e.l(s),Zy.reject(s)}e.u.H(o,"message",Pw(n=e.ye).call(n,e)),e.u.H(o,"keystatuseschange",Pw(r=e.we).call(r,e));var u={initData:null,loaded:!1,xd:1/0,Ga:null};return e.h.set(o,u),o.load(t).then(Pw(i=function(e){return this.i?Zy.reject():(ne.O("Loaded offline session",t,e),e?(u.loaded=!0,Xt(this)&&this.A.resolve(),o):(this.h.delete(o),void this.l(new re(2,6,6013))))}).call(i,e),Pw(a=function(e){this.i||(this.h.delete(o),this.l(new re(2,6,6005,e.message)))}).call(a,e))}function Ht(e,t){var n;if(oM(n=Lt(t)).call(n,"com.apple.fps")){var r=t.serverCertificate;e=ht(e,ft(e),r)}return e}function Vt(e,t){var n,r,i,a,o=t.target;ne.K("Sending license request for session",o.sessionId,"of type",t.messageType);var s=e.h.get(o),u=e.g.licenseServerUri,c=e.j.advanced[e.g.keySystem];"individualization-request"==t.messageType&&c&&c.individualizationServer&&(u=c.individualizationServer),(u=rt([u],e.j.retryParameters)).body=t.message,u.method="POST",u.licenseRequestType=t.messageType,u.sessionId=o.sessionId,"com.microsoft.playready"!=e.g.keySystem&&"com.chromecast.playready"!=e.g.keySystem||function(e){var t=ke(e.body,!0,!0);if(SM(t).call(t,"PlayReadyKeyMessage")){ne.debug("Unwrapping PlayReady request.");for(var n=(t=(new DOMParser).parseFromString(t,"application/xml")).getElementsByTagName("HttpHeader"),r=0;r<n.length;++r)e.headers[n[r].getElementsByTagName("name")[0].textContent]=n[r].getElementsByTagName("value")[0].textContent;e.body=Pe.Ja(t.getElementsByTagName("Challenge")[0].textContent).buffer}else ne.debug("PlayReady request is already unwrapped."),e.headers["Content-Type"]="text/xml; charset=utf-8"}(u),oM(n=e.g.keySystem).call(n,"com.apple.fps")&&e.j.fairPlayTransform&&function(e){var t=new Uint8Array(e.body);t="spc="+Pe.Mc(t),e.headers["Content-Type"]="application/x-www-form-urlencoded",e.body=Me(t)}(u);var l=CT();e.J.Ib.request(2,u).promise.then(Pw(r=function(e){var t,n;return this.i?Zy.reject():(oM(t=this.g.keySystem).call(t,"com.apple.fps")&&this.j.fairPlayTransform&&function(e){try{var t=xe(e.data)}catch(o){return}"<ckc>"===(t=xT(t).call(t)).substr(0,5)&&"</ckc>"===t.substr(-6)&&(t=xd(t).call(t,5,-6));try{t=JSON.parse(t).ckc}catch(o){}e.data=Pe.Ja(t).buffer}(e),this.P+=(CT()-l)/1e3,ne.K("Updating session",o.sessionId),o.update(e.data).then(Pw(n=function(){var e=this;this.J.onEvent(new qe("drmsessionupdate")),s&&(s.Ga&&s.Ga.resolve(),new Le((function(){s.loaded=!0,Xt(e)&&e.A.resolve()})).V(Jt))}).call(n,this)))}).call(r,e),Pw(i=function(e){this.i||(e=new re(2,6,6007,e),this.l(e),s&&s.Ga&&s.Ga.reject(e))}).call(i,e)).catch(Pw(a=function(e){this.i||(e=new re(2,6,6008,e.message),this.l(e),s&&s.Ga&&s.Ga.reject(e))}).call(a,e))}function zt(){var e,t=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],n=[{videoCapabilities:t,persistentState:"required",sessionTypes:["persistent-license"]},{videoCapabilities:t}],r=new AP;return t=Mb(e="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" ")).call(e,(function(e){return t=e,T((function e(){var i,a,o;return z(e,(function(e){switch(e.s){case 1:return O(e,2),N(e,navigator.requestMediaKeySystemAccess(t,n),4);case 4:return i=e.B,o=!!(a=i.getConfiguration().sessionTypes)&&SM(a).call(a,"persistent-license"),At("Tizen 3")&&(o=!1),r.set(t,{persistentState:o}),N(e,i.createMediaKeys(),5);case 5:L(e,0);break;case 2:D(e),r.set(t,null),j(e)}}))}));var t})),Zy.all(t).then((function(){return vt(r)}))}function qt(e,t){var n,r=t.audio,i=t.video;if(r&&r.encrypted&&!Dt(e,r=Ft(r))||i&&i.encrypted&&!Dt(e,i=Ft(i)))return!1;var a=Lt(e.g);return 0==t.drmInfos.length||hS(n=t.drmInfos).call(n,(function(e){return e.keySystem==a}))}function Gt(e,t){if(!e.length)return t;if(!t.length)return e;for(var n=[],r=0;r<e.length;r++)for(var i=0;i<t.length;i++)if(e[r].keySystem==t[i].keySystem){var a=e[r];i=t[i];var o=[];o=nd(o).call(o,a.initData||[]),o=nd(o).call(o,i.initData||[]);var s=[];s=nd(s).call(s,a.keyIds),s=nd(s).call(s,i.keyIds),n.push({keySystem:a.keySystem,licenseServerUri:a.licenseServerUri||i.licenseServerUri,distinctiveIdentifierRequired:a.distinctiveIdentifierRequired||i.distinctiveIdentifierRequired,persistentStateRequired:a.persistentStateRequired||i.persistentStateRequired,videoRobustness:a.videoRobustness||i.videoRobustness,audioRobustness:a.audioRobustness||i.audioRobustness,serverCertificate:a.serverCertificate||i.serverCertificate,initData:o,keyIds:s});break}return n}function Wt(e){return T((function t(){var n;return z(t,(function(t){var r;if(1===t.s)return n=Yw(Lb(r=e.h).call(r)),e.h.clear(),N(t,Zy.all(Mb(n).call(n,(function(e){return T((function t(){return z(t,(function(t){switch(t.s){case 1:return ne.K("Closing session",e.sessionId),O(t,2),N(t,function(e){return T((function t(){var n;return z(t,(function(t){switch(t.s){case 1:return n=new Zy((function(e,t){new Le(t).V($t)})),O(t,2),N(t,Zy.race([Zy.all([e.close(),e.closed]),n]),4);case 4:L(t,0);break;case 2:D(t),ne.v("Timeout waiting for session close"),j(t)}}))}))}(e),4);case 4:L(t,0);break;case 2:D(t),j(t)}}))}))}))),0)}))}))}function Xt(e){var t;return pt(e=OP(t=e.h).call(t),(function(e){return e.loaded}))}function Yt(t,n,r){!t.keySystem||"org.w3.clearkey"==t.keySystem&&t.licenseServerUri||(n.size&&(n=n.get(t.keySystem)||"",t.licenseServerUri=n),t.keyIds||(t.keyIds=[]),(r=r.get(t.keySystem))&&(t.distinctiveIdentifierRequired||(t.distinctiveIdentifierRequired=r.distinctiveIdentifierRequired),t.persistentStateRequired||(t.persistentStateRequired=r.persistentStateRequired),t.videoRobustness||(t.videoRobustness=r.videoRobustness),t.audioRobustness||(t.audioRobustness=r.audioRobustness),t.serverCertificate||(t.serverCertificate=r.serverCertificate)),e.cast&&e.cast.__platform__&&"com.microsoft.playready"==t.keySystem&&(t.keySystem="com.chromecast.playready"))}(f=Rt.prototype).destroy=function(){var e=this;return T((function t(){return z(t,(function(t){switch(t.s){case 1:return e.i?N(t,e.ua,0):(e.i=!0,N(t,function(e){return T((function t(){return z(t,(function(t){switch(t.s){case 1:return e.u.release(),e.u=null,e.A.reject(),e.ea.stop(),e.ea=null,e.X.stop(),e.X=null,N(t,Wt(e),2);case 2:if(!e.m){t.I(3);break}return O(t,4),N(t,e.m.setMediaKeys(null),6);case 6:L(t,5);break;case 4:D(t);case 5:e.m=null;case 3:e.g=null,e.C.clear(),e.o=null,e.F=[],e.j=null,e.l=null,e.J=null,j(t)}}))}))}(e),4));case 4:e.ua.resolve(),t.I(0)}}))}))},f.configure=function(e){this.j=e},f.Ub=function(e){var t=this;if(!this.o)return this.u.ya(e,"encrypted",(function(){t.l(new re(2,6,6010))})),Zy.resolve();this.m=e,this.u.ya(this.m,"play",(function(){for(var e=0;e<t.M.length;e++)Vt(t,t.M[e]);t.va=!0,t.M=[]})),"webkitCurrentPlaybackTargetIsWireless"in this.m&&this.u.H(this.m,"webkitcurrentplaybacktargetiswirelesschanged",(function(){return Wt(t)})),e=(e=this.m.setMediaKeys(this.o)).catch((function(e){return Zy.reject(new re(2,6,6003,e.message))}));var n=jt(this);return Zy.all([e,n]).then((function(){if(t.i)return Zy.reject();Ot(t),t.g.initData.length||t.F.length||t.u.H(t.m,"encrypted",(function(e){return _t(t,e.initDataType,new Uint8Array(e.initData))}))})).catch((function(e){if(!t.i)return Zy.reject(e)}))},f.Xb=function(){for(var e,t=1/0,n=Lb(e=this.h).call(e),r=(n=w(n)).next();!r.done;r=n.next())r=r.value,isNaN(r.expiration)||(t=Math.min(t,r.expiration));return t},f.ye=function(e){this.m&&this.j.delayLicenseRequestUntilPlayed&&this.m.paused&&!this.va?this.M.push(e):Vt(this,e)},f.we=function(e){var t,n;e=e.target,ne.O("Key status changed for session",e.sessionId);var r=this.h.get(e),i=!1;Gf(t=e.keyStatuses).call(t,Pw(n=function(e,t){if("string"==typeof t){var n=t;t=e,e=n}if("com.microsoft.playready"==this.g.keySystem&&16==t.byteLength&&(At("Trident/")||navigator.userAgent.match(/Edge?\//))){var a=(n=new DataView(t)).getUint32(0,!0),o=n.getUint16(4,!0),s=n.getUint16(6,!0);n.setUint32(0,a,!1),n.setUint16(4,o,!1),n.setUint16(6,s,!1)}"com.microsoft.playready"==this.g.keySystem&&"status-pending"==e&&(e="usable"),"status-pending"!=e&&(r.loaded=!0),"expired"==e&&(i=!0),n=Pe.Nc(new Uint8Array(t)),this.wa.set(n,e)}).call(n,this));var a=e.expiration-CT();(0>a||i&&1e3>a)&&r&&!r.Ga&&(ne.debug("Session has expired",e.sessionId),this.h.delete(e),e.close().catch((function(){}))),Xt(this)&&(this.A.resolve(),this.X.V(Qt))};var $t=1,Jt=5,Qt=.5;function Zt(){this.g=new muxjs.mp4.CaptionParser,this.l=[],this.j={}}function en(){}function tn(e){return!e||1==e.length&&1e-6>e.end(0)-e.start(0)?null:e.length?e.end(e.length-1):null}function nn(e,t,n){return n=void 0===n?0:n,!(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0)||t>e.end(e.length-1))&&t+n>=e.start(0)}function rn(e,t){if(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0))return 0;for(var n=0,r=e.length-1;0<=r&&e.end(r)>t;--r)n+=e.end(r)-Math.max(e.start(r),t);return n}function an(e){if(!e)return[];for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t}function on(e,t,n){this.startTime=e,this.direction=hn,this.endTime=t,this.payload=n,this.region=new wn,this.position=null,this.positionAlign=sn,this.size=0,this.textAlign=un,this.writingMode=dn,this.lineInterpretation=pn,this.line=null,this.lineHeight="",this.lineAlign=gn,this.displayAlign=ln,this.fontSize=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=mn,this.fontStyle=yn,this.fontFamily="",this.textDecoration=[],this.wrapLine=!0,this.id="",this.nestedCues=[],this.spacer=!1}Zt.prototype.init=function(e){var t=muxjs.mp4.probe;e=new Uint8Array(e),this.l=t.videoTrackIds(e),this.j=t.timescale(e),this.g.init()},Zt.prototype.h=function(e,t){var n=new Uint8Array(e);(n=this.g.parse(n,this.l,this.j))&&n.captions&&t(n.captions),this.g.clearParsedCaptions()},Zt.prototype.i=function(){this.g.resetCaptionStream()},en.prototype.init=function(){},en.prototype.h=function(){},en.prototype.i=function(){},$("shaka.text.Cue",on),on.prototype.clone=function(){var e,t=new on(0,0,"");for(e in this){var n;t[e]=this[e],t[e]&&t[e].constructor==Array&&(t[e]=xd(n=t[e]).call(n))}return t};var sn="auto";on.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:sn};var un="center",cn={LEFT:"left",RIGHT:"right",CENTER:un,START:"start",END:"end"};on.textAlign=cn;var ln="after",fn={BEFORE:"before",CENTER:"center",AFTER:ln};on.displayAlign=fn;var hn="ltr";on.direction={HORIZONTAL_LEFT_TO_RIGHT:hn,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var dn="horizontal-tb";on.writingMode={HORIZONTAL_TOP_TO_BOTTOM:dn,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var pn=0;on.lineInterpretation={LINE_NUMBER:pn,PERCENTAGE:1};var gn="start",vn={CENTER:"center",START:gn,END:"end"};on.lineAlign=vn;var mn=400;on.fontWeight={NORMAL:mn,BOLD:700};var yn="normal",bn={NORMAL:yn,ITALIC:"italic",OBLIQUE:"oblique"};function wn(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Sn,this.scroll=Tn}on.fontStyle=bn,on.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"},$("shaka.text.CueRegion",wn);var Sn=1;wn.units={PX:0,PERCENTAGE:Sn,LINES:2};var Tn="";function En(e){this.l=null,this.i=e,this.j=this.A=0,this.m=1/0,this.h=this.g=null,this.u="",this.o=new AP}wn.scrollMode={NONE:Tn,UP:"up"};var xn={};function kn(t){return!!(xn[t]||e.muxjs&&"application/cea-608"==t)}function An(e,t){"application/cea-608"!=t&&(e.l=new xn[t])}function Mn(e,t,n,r,i){for(var a=n+" "+r,o=new AP,s=(t=w(t)).next();!s.done;s=t.next()){var u=s.value;s=u.stream,o.has(s)||o.set(s,new AP),o.get(s).has(a)||o.get(s).set(a,[]),u.startTime+=i,u.endTime+=i,u.startTime>=e.j&&u.startTime<e.m&&(u=new on(u.startTime,u.endTime,u.text),o.get(s).get(a).push(u),s==e.u&&e.i.append([u]))}for(a=(i=w(Lb(o).call(o))).next();!a.done;a=i.next())for(a=a.value,e.o.has(a)||e.o.set(a,new AP),s=(t=w(Lb(c=o.get(a)).call(c))).next();!s.done;s=t.next()){var c;s=s.value,u=o.get(a).get(s),e.o.get(a).set(s,u)}e.g=null==e.g?Math.max(n,e.j):Math.min(e.g,Math.max(n,e.j)),e.h=Math.max(e.h,Math.min(r,e.m))}function In(e,t,n){this.j=e,this.l=n,this.h={},this.g=null,this.i={},this.o=new ut,this.F=!1,this.u={},this.A=t,this.C=new Ee,this.m=function(e,t){var n=new MediaSource;return e.o.ya(n,"sourceopen",(function(){jA.revokeObjectURL(e.J),t.resolve()})),e.J=Cn(n),e.j.src=e.J,n}(this,this.C),this.J=""}$("shaka.text.TextEngine.registerParser",(function(e,t){xn[e]=t})),$("shaka.text.TextEngine.unregisterParser",(function(e){delete xn[e]})),En.prototype.destroy=function(){return this.i=this.l=null,this.o.clear(),Zy.resolve()},En.prototype.xc=function(e){try{return this.l.parseMedia(new Uint8Array(e),{periodStart:0,segmentStart:null,segmentEnd:0})[0].startTime}catch(t){throw new re(2,2,2009,t)}},En.prototype.remove=function(e,t){var n;return Zy.resolve().then(Pw(n=function(){!this.i||!this.i.remove(e,t)||null==this.g||t<=this.g||e>=this.h||(e<=this.g&&t>=this.h?this.g=this.h=null:e<=this.g&&t<this.h?this.g=t:e>this.g&&t>=this.h&&(this.h=e))}).call(n,this))};var Cn=jA.createObjectURL;function Rn(e){var t=mt(e.mimeType,e.codecs),n=function(e){var t=[e.mimeType];return Gf(wt).call(wt,(function(n,r){var i=e[r];i&&t.push(n+'="'+i+'"')})),t.join(";")}(e);return kn(t)||MediaSource.isTypeSupported(n)||je(t,e.type)}function Pn(e,t){e.g||(e.g=new En(e.l)),An(e.g,t)}function Nn(e){return!e.m||"ended"==e.m.readyState}function jn(e,t){if("text"==t)var n=e.g.g;else n=!(n=_n(e,t))||1==n.length&&1e-6>n.end(0)-n.start(0)?null:1==n.length&&0>n.start(0)?0:n.length?n.start(0):null;return n}function On(e,t){return"text"==t?e.g.h:tn(_n(e,t))}function _n(e,t){try{return e.h[t].buffered}catch(n){return t in e.h&&ne.error("failed to get buffered range for "+t,n),null}}function Ln(t,n,r,i,a,o){var s,u;return"text"==n?function(e,t,n,r){var i;return Zy.resolve().then(Pw(i=function(){if(this.l&&this.i)if(null==n||null==r)this.l.parseInit(new Uint8Array(t));else{var e,i,a={periodStart:this.A,segmentStart:n,segmentEnd:r};a=Hb(e=this.l.parseMedia(new Uint8Array(t),a)).call(e,Pw(i=function(e){return e.startTime>=this.j&&e.startTime<this.m}).call(i,this)),this.i.append(a),null==this.g&&(this.g=Math.max(n,this.j)),this.h=Math.min(r,this.m)}}).call(i,e))}(t.g,r,i,a):t.u[n]?function(e,t){e.j=!0,e.h=new Ee,e.l=[],e.i=[];var n=new Uint8Array(t);return e.g.push(n),e.g.flush(),e.j&&e.h.reject(new re(2,3,3018)),e.h}(t.u[n],r).then(Pw(s=function(e){var t;return this.g||Pn(this,"text/vtt"),e.captions&&e.captions.length&&Mn(this.g,e.captions,i,a,this.h.video.timestampOffset),Fn(this,n,Pw(t=this.Me).call(t,this,n,e.data.buffer))}).call(s,t)):(o&&e.muxjs&&(t.g||Pn(t,"text/vtt"),null==i&&null==a?t.A.init(r):t.A.h(r,(function(e){e.length&&Mn(t.g,e,i,a,t.h.video.timestampOffset)}))),Fn(t,n,Pw(u=t.Me).call(u,t,n,r)))}function Dn(e,t){var n=On(e,"video")||0;!function(e,t,n){if(e.u=t,t=e.o.get(t))for(var r=w(Lb(t).call(t)),i=r.next();!i.done;i=r.next()){var a;(i=Hb(a=t.get(i.value)).call(a,(function(e){return e.endTime<=n})))&&e.i.append(i)}}(e.g,t,n)}function Un(e,t){var n;return"text"==t?e.g?(e.A.i(),e.g.remove(0,1/0)):Zy.resolve():Fn(e,t,Pw(n=e.Ne).call(n,e,t,0,e.m.duration))}function Fn(e,t,n){if(e.F)return Zy.reject();if(n={start:n,p:new Ee},e.i[t].push(n),1==e.i[t].length)try{n.start()}catch(r){"QuotaExceededError"==r.name?n.p.reject(new re(2,3,3017,t)):n.p.reject(new re(2,3,3015,r)),Bn(e,t)}return n.p}function Kn(e,t){var n,r;if(e.F)return Zy.reject();var i,a=[];for(i in e.h){var o,s=new Ee,u={start:Pw(o=function(e){e.resolve()}).call(o,null,s),p:s};e.i[i].push(u),a.push(s),1==e.i[i].length&&u.start()}return Zy.all(a).then(Pw(n=function(){try{t()}catch(r){var e=Zy.reject(new re(2,3,3015,r))}for(var n in this.h)Bn(this,n);return e}).call(n,e),Pw(r=function(e){throw e}).call(r,e))}function Bn(e,t){e.i[t].shift();var n=e.i[t][0];if(n)try{n.start()}catch(r){n.p.reject(new re(2,3,3015,r)),Bn(e,t)}}function Hn(e,t){return e=zn(e),t=zn(t),e.split("-")[0]==t.split("-")[0]}function Vn(e,t){e=zn(e),t=zn(t);var n=e.split("-"),r=t.split("-");return n[0]==r[0]&&1==n.length&&2==r.length}function zn(e){var t=e.split("-");return e=t[0]||"",t=t[1]||"",e=e.toLowerCase(),e=Wn.get(e)||e,(t=t.toUpperCase())?e+"-"+t:e}function qn(e){return e.language?zn(e.language):e.audio&&e.audio.language?zn(e.audio.language):e.video&&e.video.language?zn(e.video.language):"und"}function Gn(e,t){for(var n=zn(e),r=new $O,i=w(t),a=i.next();!a.done;a=i.next())r.add(zn(a.value));for(a=(i=w(r)).next();!a.done;a=i.next())if((a=a.value)==n)return a;for(a=(i=w(r)).next();!a.done;a=i.next())if(Vn(a=a.value,n))return a;for(a=(i=w(r)).next();!a.done;a=i.next()){var o=a=a.value,s=n;if(o=zn(o),s=zn(s),o=o.split("-"),s=s.split("-"),2==o.length&&2==s.length&&o[0]==s[0])return a}for(a=(r=w(r)).next();!a.done;a=r.next())if(Vn(n,i=a.value))return i;return null}(f=In.prototype).destroy=function(){var e=this;this.F=!0;var t,n=[];for(t in this.i){var r=this.i[t],i=r[0];for(this.i[t]=xd(r).call(r,0,1),i&&n.push(i.p.catch(ye.Bc)),i=1;i<r.length;++i)r[i].p.reject()}for(var a in this.g&&n.push(this.g.destroy()),this.l&&n.push(this.l.destroy()),this.u)n.push(this.u[a].destroy());return Zy.all(n).then((function(){e.o&&(e.o.release(),e.o=null),e.j&&(e.j.removeAttribute("src"),e.j.load(),e.j=null),e.m=null,e.g=null,e.l=null,e.h={},e.u={},e.A=null,e.i={}}))},f.init=function(e,t){var n=this;return T((function r(){var i;return z(r,(function(r){switch(r.s){case 1:return i=Se,N(r,n.C,2);case 2:Gf(e).call(e,(function(e,r){var a,o,s=mt(e.mimeType,e.codecs);r==i.za?Pn(n,s):(!t&&MediaSource.isTypeSupported(s)||!je(s,r)||(n.u[r]=new Ne,s=Oe(r,s)),s=n.m.addSourceBuffer(s),n.o.H(s,"error",Pw(a=n.Dg).call(a,n,r)),n.o.H(s,"updateend",Pw(o=n.Lb).call(o,n,r)),n.h[r]=s,n.i[r]=[])})),j(r)}}))}))},f.bd=function(e){if(e.total=an(this.j.buffered),e.audio=an(_n(this,"audio")),e.video=an(_n(this,"video")),e.text=[],this.g){var t=this.g.g,n=this.g.h;null!=t&&null!=n&&e.text.push({start:t,end:n})}},f.remove=function(e,t,n){var r;return"text"==e?this.g.remove(t,n):Fn(this,e,Pw(r=this.Ne).call(r,this,e,t,n))},f.flush=function(e){var t;return"text"==e?Zy.resolve():Fn(this,e,Pw(t=this.lf).call(t,this,e))},f.endOfStream=function(e){var t;return Kn(this,Pw(t=function(){Nn(this)||(e?this.m.endOfStream(e):this.m.endOfStream())}).call(t,this))},f.Fa=function(e){var t;return Kn(this,Pw(t=function(){this.m.duration=e}).call(t,this))},f.ha=function(){return this.m.duration},f.Me=function(e,t){this.h[e].appendBuffer(t)},f.Ne=function(e,t,n){n<=t?this.Lb(e):this.h[e].remove(t,n)},f.Ve=function(e){var t=this.h[e].appendWindowStart,n=this.h[e].appendWindowEnd;this.h[e].abort(),this.h[e].appendWindowStart=t,this.h[e].appendWindowEnd=n,this.Lb(e)},f.lf=function(e){this.j.currentTime-=.001,this.Lb(e)},f.Cg=function(e,t){0>t&&(t+=.001),this.h[e].timestampOffset=t,this.Lb(e)},f.zg=function(e,t,n){this.h[e].appendWindowStart=0,this.h[e].appendWindowEnd=n,this.h[e].appendWindowStart=t,this.Lb(e)},f.Dg=function(e){this.i[e][0].p.reject(new re(2,3,3014,this.j.error?this.j.error.code:0))},f.Lb=function(e){var t=this.i[e][0];t&&(t.p.resolve(),Bn(this,e))};var Wn=new AP([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze","cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice","is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao","mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san","sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie","vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]),Xn={$d:function(e,t){var n,r=uN(n=e.periods).call(n,(function(e,t){return nd(e).call(e,t.variants)}),[]);r=Xn.ee(r,t),r=Xn.Lf(r),r=Xn.jf(r);for(var i=Xn.kf(r),a=(r=w(e.periods)).next();!a.done;a=r.next()){var o;(a=a.value).variants=Hb(o=a.variants).call(o,(function(e){return Xn.he(e)==i||(ne.debug("Dropping Variant (better codec available)",e),!1)}))}},Lf:function(e){for(var t=new Ge,n=(e=w(e)).next();!n.done;n=e.next()){n=n.value;var r=Xn.he(n);t.push(r,n)}return t},jf:function(e){var t=0,n=new AP,r=e.size();return Gf(e).call(e,(function(e,i){for(var a=w(i),o=a.next();!o.done;o=a.next()){var s=(o=o.value).video;if(s&&s.width&&s.height){s=s.width*s.height*(s.frameRate||1),n.has(s)||n.set(s,new Ge);var u=n.get(s);u.push(e,o),u.size()===r&&(t=Math.max(t,s))}}})),t?n.get(t):e},kf:function(e){var t="",n=1/0;return Gf(e).call(e,(function(e,r){for(var i=0,a=0,o=w(r),s=o.next();!s.done;s=o.next())i+=s.value.bandwidth||0,++a;i/=a,ne.debug("codecs",e,"avg bandwidth",i),i<n&&(t=e,n=i)})),t},he:function(e){var t="";e.video&&(t=bt(e.video.codecs)[0]);var n="";return e.audio&&(n=bt(e.audio.codecs)[0]),t+"-"+n},rd:function(e,t,n){function r(e,t,n){return e>=t&&e<=n}var i=e.video;return!(i&&i.width&&i.height&&(!r(i.width,t.minWidth,Math.min(t.maxWidth,n.width))||!r(i.height,t.minHeight,Math.min(t.maxHeight,n.height))||!r(i.width*i.height,t.minPixels,t.maxPixels))||e&&e.video&&e.video.frameRate&&!r(e.video.frameRate,t.minFrameRate,t.maxFrameRate)||!r(e.bandwidth,t.minBandwidth,t.maxBandwidth))},Xd:function(e,t,n){var r=!1;return Gf(e).call(e,(function(e){var i=e.allowedByApplication;e.allowedByApplication=Xn.rd(e,t,n),i!=e.allowedByApplication&&(r=!0)})),r},filterNewPeriod:function(e,t,n,r){var i,a;r.variants=Hb(i=r.variants).call(i,(function(r){var i;if(e&&e.Z&&!qt(e,r))return ne.debug("Dropping variant - not compatible with key system",r),!1;var a=r.audio;return r=r.video,a&&!Rn(a)?(ne.debug("Dropping variant - audio not compatible with platform",Xn.fb(a)),!1):r&&!Rn(r)||At("Xbox One")&&r&&(r.width&&1920<r.width||r.height&&1080<r.height)&&SM(i=r.codecs).call(i,"avc1.")?(ne.debug("Dropping variant - video not compatible with platform",Xn.fb(r)),!1):a&&t&&!Xn.Yd(a,t)?(ne.debug("Droping variant - not compatible with active audio","active audio",Xn.fb(t),"variant.audio",Xn.fb(a)),!1):!(r&&n&&!Xn.Yd(r,n)&&(ne.debug("Droping variant - not compatible with active video","active video",Xn.fb(n),"variant.video",Xn.fb(r)),1))})),r.textStreams=Hb(a=r.textStreams).call(a,(function(e){var t=kn(mt(e.mimeType,e.codecs));return t||ne.debug("Dropping text stream. Is not supported by the platform.",e),t}))},Yd:function(e,t){return e.mimeType==t.mimeType&&e.codecs.split(".")[0]==t.codecs.split(".")[0]},Oc:function(e){var t,n,r=e.audio,i=e.video,a=r?r.codecs:null,o=i?i.codecs:null,s=[];o&&s.push(o),a&&s.push(a);var u=[];i&&u.push(i.mimeType),r&&u.push(r.mimeType),u=u[0]||null;var c=[];r&&c.push(r.kind),i&&c.push(i.kind),c=c[0]||null;var l=new $O;return r&&Gf(t=r.roles).call(t,(function(e){return l.add(e)})),i&&Gf(n=i.roles).call(n,(function(e){return l.add(e)})),e={id:e.id,active:!1,type:"variant",bandwidth:e.bandwidth,language:e.language,label:null,kind:c,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:u,codecs:s.join(", "),audioCodec:a,videoCodec:o,primary:e.primary,roles:Yw(l),audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null},i&&(e.videoId=i.id,e.originalVideoId=i.originalId,e.width=i.width||null,e.height=i.height||null,e.frameRate=i.frameRate||null,e.pixelAspectRatio=i.pixelAspectRatio||null,e.videoBandwidth=i.bandwidth||null),r&&(e.audioId=r.id,e.originalAudioId=r.originalId,e.channelsCount=r.channelsCount,e.audioSamplingRate=r.audioSamplingRate,e.audioBandwidth=r.bandwidth||null,e.label=r.label,e.audioRoles=r.roles),e},Kc:function(e){return{id:e.id,active:!1,type:"text",bandwidth:0,language:e.language,label:e.label,kind:e.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:e.mimeType,codecs:e.codecs||null,audioCodec:null,videoCodec:null,primary:e.primary,roles:e.roles,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:e.originalId}},gd:function(e){return e.__shaka_id||(e.__shaka_id=Xn.Uf++),e.__shaka_id},Uf:0,Of:function(e){var t=Xn.ke(e);return t.active="disabled"!=e.mode,t.type="text",t.originalTextId=e.id,"captions"==e.kind&&(t.mimeType="application/cea-608"),e.kind&&(t.roles=[e.kind]),t},je:function(e){var t=Xn.ke(e);return t.active=e.enabled,t.type="variant",t.originalAudioId=e.id,"main"==e.kind&&(t.primary=!0),e.kind&&(t.roles=[e.kind],t.audioRoles=[e.kind]),t},ke:function(e){return{id:Xn.gd(e),active:!1,type:"",bandwidth:0,language:zn(e.language),label:e.label,kind:e.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null}},Gb:function(e){return e.allowedByApplication&&e.allowedByKeySystem},Bf:function(e){return Hb(e).call(e,(function(e){return Xn.Gb(e)}))},ee:function(e,t){for(var n=Hb(e).call(e,(function(e){return e.audio&&e.audio.channelsCount})),r=new AP,i=(n=w(n)).next();!i.done;i=n.next()){var a=(i=i.value).audio.channelsCount;r.has(a)||r.set(a,[]),r.get(a).push(i)}return 0==(n=Yw(Lb(r).call(r))).length?e:(i=Hb(n).call(n,(function(e){return e<=t}))).length?r.get(Math.max.apply(null,i)):r.get(Math.min.apply(null,n))},Wb:function(e,t,n){var r,i=e,a=Hb(e).call(e,(function(e){return e.primary}));a.length&&(i=a);var o=i.length?i[0].language:"";if(i=Hb(i).call(i,(function(e){return e.language==o})),t){var s=Gn(zn(t),Mb(e).call(e,(function(e){return e.language})));s&&(i=Hb(e).call(e,(function(e){return zn(e.language)==s})))}if(n){if((e=Xn.de(i,n)).length)return e;ne.v("No exact match for the text role could be found.")}else if((e=Hb(i).call(i,(function(e){return 0==e.roles.length}))).length)return e;return(e=uN(r=Mb(i).call(i,(function(e){return e.roles}))).call(r,ye.Rc,[])).length?Xn.de(i,e[0]):i},de:function(e,t){return Hb(e).call(e,(function(e){var n;return SM(n=e.roles).call(n,t)}))},ie:function(e,t,n){for(var r=0;r<n.length;r++)if(n[r].audio==e&&n[r].video==t)return n[r];return null},Pf:function(e){return"audio"==e.type},Sf:function(e){return"video"==e.type},Kf:function(e){var t=[];return e.audio&&t.push(e.audio),e.video&&t.push(e.video),t},fb:function(e){return Xn.Pf(e)?"type=audio codecs="+e.codecs+" bandwidth="+e.bandwidth+" channelsCount="+e.channelsCount+" audioSamplingRate="+e.audioSamplingRate:Xn.Sf(e)?"type=video codecs="+e.codecs+" bandwidth="+e.bandwidth+" frameRate="+e.frameRate+" width="+e.width+" height="+e.height:"unexpected stream type"}};function Yn(){this.m=null,this.i=!1,this.h=new te,this.l=[],this.o=!1,this.g=this.j=null}function $n(e,t){return e&&(t=Hb(t).call(t,(function(t){return Xn.rd(t,e,{width:1/0,height:1/0})}))),Nh(t).call(t,(function(e,t){return e.bandwidth-t.bandwidth}))}function Jn(e,t){this.g=e,this.h=t}function Qn(e,t){var n=new Jn(2,6),r=tr,i=r.g,a=n.h-i.h;(0<(n.g-i.g||a)?r.i:r.h)(r.g,n,e,t)}function Zn(e,t,n,r){ne.ba([n,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",r].join(" "))}function er(e,t,n,r){ne.kc([n,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",r].join(""))}$("shaka.abr.SimpleAbrManager",Yn),Yn.prototype.stop=function(){this.m=null,this.i=!1,this.l=[],this.j=null},Yn.prototype.stop=Yn.prototype.stop,Yn.prototype.init=function(e){this.m=e},Yn.prototype.init=Yn.prototype.init,Yn.prototype.chooseVariant=function(){var e=$n(this.g.restrictions,this.l),t=this.h.getBandwidthEstimate(this.g.defaultBandwidthEstimate);this.l.length&&!e.length&&(ne.v("No variants met the ABR restrictions. Choosing a variant by lowest bandwidth."),e=[(e=$n(null,this.l))[0]]);for(var n=e[0]||null,r=0;r<e.length;++r){var i=e[r],a=i.bandwidth/this.g.bandwidthDowngradeTarget,o=(e[r+1]||{bandwidth:1/0}).bandwidth/this.g.bandwidthUpgradeTarget;ne.O("Bandwidth ranges:",(i.bandwidth/1e6).toFixed(3),(a/1e6).toFixed(3),(o/1e6).toFixed(3)),t>=a&&t<=o&&(n=i)}return this.j=CT(),n},Yn.prototype.chooseVariant=Yn.prototype.chooseVariant,Yn.prototype.enable=function(){this.i=!0},Yn.prototype.enable=Yn.prototype.enable,Yn.prototype.disable=function(){this.i=!1},Yn.prototype.disable=Yn.prototype.disable,Yn.prototype.segmentDownloaded=function(e,t){ne.O("Segment downloaded:","deltaTimeMs="+e,"numBytes="+t,"lastTimeChosenMs="+this.j,"enabled="+this.i);var n=this.h;if(!(16e3>t)){var r=8e3*t/e,i=e/1e3;n.g+=t,Z(n.h,i,r),Z(n.i,i,r)}if(null!=this.j&&this.i)e:{if(ne.O("Suggesting Streams..."),this.o){if(CT()-this.j<1e3*this.g.switchInterval){ne.O("Still within switch interval...");break e}}else{if(!(128e3<=this.h.g)){ne.O("Still waiting for a good estimate...");break e}this.o=!0}n=this.chooseVariant(),r=this.h.getBandwidthEstimate(this.g.defaultBandwidthEstimate),ne.debug("Calling switch_(), bandwidth="+Math.round(r/1e3)+" kbps"),this.m(n)}},Yn.prototype.segmentDownloaded=Yn.prototype.segmentDownloaded,Yn.prototype.getBandwidthEstimate=function(){return this.h.getBandwidthEstimate(this.g.defaultBandwidthEstimate)},Yn.prototype.getBandwidthEstimate=Yn.prototype.getBandwidthEstimate,Yn.prototype.setVariants=function(e){this.l=e},Yn.prototype.setVariants=Yn.prototype.setVariants,Yn.prototype.configure=function(e){this.g=e},Yn.prototype.configure=Yn.prototype.configure,Jn.prototype.toString=function(){return"v"+this.g+"."+this.h};var tr=null,nr="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),rr="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),ir=["loop","playbackRate"],ar=["pause","play"],or="abrstatuschanged adaptation buffering drmsessionupdate emsg error expirationupdated largegap loading manifestparsed onstatechange onstateidle streaming textchanged texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading variantchanged".split(" "),sr={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,usingEmbeddedTextTrack:2,getLoadMode:10},ur={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},cr=[["getConfiguration","configure"]],lr=[["isTextTrackVisible","setTextTrackVisibility"]],fr="addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectEmbeddedTextTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay".split(" "),hr=["attach","detach","load","unload"];function dr(e){return DA(e,(function(e,t){if("function"!=typeof t){if(t instanceof Event||t instanceof qe){var n={};for(i in t){var r=t[i];r&&"object"==Rl(r)?"detail"==i&&(n[i]=r):i in Event||(n[i]=r)}return n}if(t instanceof Error){var i=new $O(["name","message","stack"]);for(n in t)i.add(n);for(n=(r=w(n_(t))).next();!n.done;n=r.next())i.add(n.value);for(r={},n=(i=w(i)).next();!n.done;n=i.next())r[n=n.value]=t[n];i={__type__:"Error",contents:r}}else if(t instanceof TimeRanges)for(i={__type__:"TimeRanges",length:t.length,start:[],end:[]},n=0;n<t.length;++n)i.start.push(t.start(n)),i.end.push(t.end(n));else i=t instanceof Uint8Array?{__type__:"Uint8Array",entries:Yw(t)}:"number"==typeof t?isNaN(t)?"NaN":isFinite(t)?t:0>t?"-Infinity":"Infinity":t;return i}}))}function pr(e){return JSON.parse(e,(function(e,t){if("NaN"==t)var n=NaN;else if("-Infinity"==t)n=-1/0;else if("Infinity"==t)n=1/0;else if(t&&"object"==Rl(t)&&"TimeRanges"==t.__type__)n=function(e){return{length:e.length,start:function(t){return e.start[t]},end:function(t){return e.end[t]}}}(t);else if(t&&"object"==Rl(t)&&"Uint8Array"==t.__type__)n=new Uint8Array(sI(t));else if(t&&"object"==Rl(t)&&"Error"==t.__type__){n=t.contents;var r,i=Error(n.message);for(r in n)i[r]=n[r];n=i}else n=t;return n}))}function gr(e,t,n,r,i,a){var o,s;this.X=e,this.j=new Le(t),this.Z=n,this.u=!1,this.F=r,this.P=i,this.L=a,this.h=this.m=!1,this.M="",this.o=null,this.A=Pw(o=this.yd).call(o,this),this.C=Pw(s=this.ag).call(s,this),this.g={video:{},player:{}},this.J=0,this.i={},this.l=null,xr.add(this)}var vr=!1,mr=null;function yr(e){for(var t=w(xr),n=t.next();!n.done;n=t.next())br(n.value,e)}function br(e,t){ne.debug("CastSender: onExistingSessionJoined");var n=e.L();e.l=new Ee,e.u=!0,e.Ad(n,t)}function wr(e){for(var t=w(xr),n=t.next();!n.done;n=t.next()){n=n.value;var r=e;ne.debug("CastSender: receiver status",r),vr="available"==r,n.j.Lc()}}function Sr(e){var t=mr;t.removeUpdateListener(e.A),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.C)}function Tr(e){for(var t in e.i){var n=e.i[t];delete e.i[t],n.reject(new re(1,7,7e3))}}function Er(e,t){var n=dr(t),r=mr;try{r.sendMessage("urn:x-cast:com.google.shaka.v2",n,(function(){}),ne.error)}catch(i){throw ne.error("Cast session sendMessage threw",i),n=new re(2,8,8005,i),e.F("player",new qe("error",{detail:n})),e.Bb(),n}}(f=gr.prototype).destroy=function(){return xr.delete(this),Tr(this),mr&&Sr(this),this.j&&(this.j.stop(),this.j=null),this.P=this.F=null,this.h=this.m=!1,this.C=this.A=this.l=this.i=this.g=this.o=null,Zy.resolve()},f.la=function(){return this.h},f.Dd=function(){return this.M},f.init=function(){if(this.X.length)if(e.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0,this.j.Lc();var t=new chrome.cast.SessionRequest(this.X);t=new chrome.cast.ApiConfig(t,Pw(yr).call(yr,this),Pw(wr).call(wr,this),"origin_scoped"),chrome.cast.initialize(t,(function(){ne.debug("CastSender: init")}),(function(e){ne.error("CastSender: init error",e)})),vr&&this.j.V(.02),(t=mr)&&t.status!=chrome.cast.SessionStatus.STOPPED?(ne.debug("CastSender: re-using existing connection"),br(this,t)):mr=null}else e.__onGCastApiAvailable||(e.__onGCastApiAvailable=kr),e.__onGCastApiAvailable!=kr&&ne.ba("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")},f.Md=function(e){this.o=e,this.h&&Er(this,{type:"appData",appData:this.o})},f.cast=function(e){var t,n;return this.m?vr?this.h?Zy.reject(new re(1,8,8002)):(this.l=new Ee,chrome.cast.requestSession(Pw(t=this.Ad).call(t,this,e),Pw(n=this.ve).call(n,this)),this.l):Zy.reject(new re(1,8,8001)):Zy.reject(new re(1,8,8e3))},f.Bb=function(){if(this.h){if(Tr(this),mr){Sr(this);try{mr.stop((function(){}),(function(){}))}catch(g){}mr=null}this.yd()}},f.get=function(e,t){var n;if("video"==e){if(SM(ar).call(ar,t))return Pw(n=this.Ee).call(n,this,e,t)}else if("player"==e){var r,i,a;if(ur[t]&&!this.get("player","isLive")())return function(){};if(SM(fr).call(fr,t))return Pw(r=this.Ee).call(r,this,e,t);if(SM(hr).call(hr,t))return Pw(i=this.rg).call(i,this,e,t);if(sr[t])return Pw(a=this.Be).call(a,this,e,t)}return this.Be(e,t)},f.set=function(e,t,n){this.g[e][t]=n,Er(this,{type:"set",targetName:e,property:t,value:n})},f.Ad=function(e,t){ne.debug("CastSender: onSessionInitiated"),mr=t,t.addUpdateListener(this.A),t.addMessageListener("urn:x-cast:com.google.shaka.v2",this.C),this.yd(),Er(this,{type:"init",initState:e,appData:this.o}),this.l.resolve()},f.ve=function(e){var t=8003;switch(e.code){case"cancel":t=8004;break;case"timeout":t=8005;break;case"receiver_unavailable":t=8006}this.l.reject(new re(2,8,t,e))},f.Be=function(e,t){return this.g[e][t]},f.Ee=function(e,t,n){for(var r=[],i=2;i<arguments.length;++i)r[i-2]=arguments[i];Er(this,{type:"call",targetName:e,methodName:t,args:r})},f.rg=function(e,t,n){for(var r=[],i=2;i<arguments.length;++i)r[i-2]=arguments[i];i=new Ee;var a=this.J.toString();this.J++,this.i[a]=i;try{Er(this,{type:"asyncCall",targetName:e,methodName:t,args:r,id:a})}catch(o){i.reject(o)}return i},f.yd=function(){var e=!!mr&&"connected"==mr.status;if(ne.debug("CastSender: connection status",e),this.h&&!e){for(var t in this.P(),this.g)this.g[t]={};Tr(this)}this.M=(this.h=e)?mr.receiver.friendlyName:"",this.j.Lc()},f.ag=function(e,t){var n=pr(t);switch(ne.O("CastSender: message",n),n.type){case"event":var r=n.event;this.F(n.targetName,new qe(r.type,r));break;case"update":for(var i in r=n.update)for(var a in n=this.g[i]||{},r[i])n[a]=r[i][a];this.u&&(this.Z(),this.u=!1);break;case"asyncComplete":if(i=n.id,n=n.error,a=this.i[i],delete this.i[i],a)if(n){for(r in i=new re(n.severity,n.category,n.code),n)i[r]=n[r];a.reject(i)}else a.resolve()}};var xr=new $O;function kr(e){if(e)for(var t=(e=w(xr)).next();!t.done;t=e.next())t.value.init()}function Ar(e,t,n){var r=this;We.call(this),this.i=e,this.h=t,this.o=this.l=this.j=this.u=this.m=null,this.C=n,this.A=new AP,this.g=new gr(n,(function(){return Cr(r)}),(function(){return Rr(r)}),(function(e,t){return jr(r,e,t)}),(function(){return Pr(r)}),(function(){return Ir(r)})),function(e){var t,n;for(var r in e.g.init(),e.o=new ut,Gf(nr).call(nr,Pw(t=function(e){var t;this.o.H(this.i,e,Pw(t=this.L).call(t,this))}).call(t,e)),Gf(or).call(or,Pw(n=function(e){var t;this.o.H(this.h,e,Pw(t=this.F).call(t,this))}).call(n,e)),e.m={},e.i){var i,a;Aw(e.m,r,{configurable:!1,enumerable:!0,get:Pw(i=e.J).call(i,e,r),set:Pw(a=e.M).call(a,e,r)})}e.u={},Mr(e,(function(t){Aw(e.u,t,{configurable:!1,enumerable:!0,get:function(){return Nr(e,t)}})})),function(e){var t=new AP;Mr(e,(function(n,r){if(t.has(r)){var i=t.get(r);n.length<i.length?e.A.set(n,i):e.A.set(i,n)}else t.set(r,n)}))}(e),e.j=new We,e.j.jc=e.m,e.l=new We,e.l.jc=e.u}(this)}function Mr(e,t){function n(e){return"constructor"!=e&&"function"==typeof r[e]&&!i.has(e)}var r=e.h,i=new $O;for(a in r)n(a)&&(i.add(a),t(a,r[a]));for(var a=Nw(r),o=Nw({});a&&a!=o;){for(var s=w(n_(a)),u=s.next();!u.done;u=s.next())n(u=u.value)&&(i.add(u),t(u,r[u]));a=Nw(a)}}function Ir(e){var t,n,r,i={video:{},player:{},playerAfterLoad:{},manifest:e.h.tc(),startTime:null};return e.i.pause(),Gf(ir).call(ir,Pw(t=function(e){i.video[e]=this.i[e]}).call(t,e)),e.i.ended||(i.startTime=e.i.currentTime),Gf(cr).call(cr,Pw(n=function(e){var t=e[1];e=this.h[e[0]](),i.player[t]=e}).call(n,e)),Gf(lr).call(lr,Pw(r=function(e){var t=e[1];e=this.h[e[0]](),i.playerAfterLoad[t]=e}).call(r,e)),i}function Cr(e){e.dispatchEvent(new qe("caststatuschanged"))}function Rr(e){e.j.dispatchEvent(new qe(e.m.paused?"pause":"play"))}function Pr(e){var t,n;Gf(cr).call(cr,Pw(t=function(e){var t=e[1];e=this.g.get("player",e[0])(),this.h[t](e)}).call(t,e));var r=e.g.get("player","getAssetUri")(),i=e.g.get("video","ended"),a=Zy.resolve(),o=e.i.autoplay,s=null;i||(s=e.g.get("video","currentTime")),r&&(e.i.autoplay=!1,a=e.h.load(r,s));var u={};Gf(ir).call(ir,Pw(n=function(e){u[e]=this.g.get("video",e)}).call(n,e)),a.then((function(){var t,n;e.i&&(Gf(ir).call(ir,Pw(t=function(e){this.i[e]=u[e]}).call(t,e)),Gf(lr).call(lr,Pw(n=function(e){var t=e[1];e=this.g.get("player",e[0])(),this.h[t](e)}).call(n,e)),e.i.autoplay=o,r&&e.i.play())}),(function(t){e.h.dispatchEvent(new qe("error",{detail:t}))}))}function Nr(e,t){var n,r,i,a,o;if(e.A.has(t)&&(t=e.A.get(t)),"addEventListener"==t)return Pw(n=e.l.addEventListener).call(n,e.l);if("removeEventListener"==t)return Pw(r=e.l.removeEventListener).call(r,e.l);if("getMediaElement"==t)return Pw(i=function(){return this.m}).call(i,e);if("getSharedConfiguration"==t)return ne.v("Can't share configuration across a network. Returning copy."),e.g.get("player","getConfiguration");if("getNetworkingEngine"==t)return e.g.la()&&ne.v("NOTE: getNetworkingEngine() is always local!"),Pw(a=e.h.Yb).call(a,e.h);if(e.g.la()){if("getManifest"==t||"drmInfo"==t)return function(){return ne.ba(t+"() does not work while casting!"),null};if("getManifestUri"==t)return Qn("getManifestUri",'Please use "getAssetUri" instead.'),Nr(e,"getAssetUri");if("attach"==t||"detach"==t)return function(){return ne.ba(t+"() does not work while casting!"),Zy.resolve()}}return e.g.la()&&0==ad(e.g.g.video).length&&sr[t]||!e.g.la()?Pw(o=e.h[t]).call(o,e.h):e.g.get("player",t)}function jr(e,t,n){e.g.la()&&("video"==t?e.j.dispatchEvent(n):"player"==t&&e.l.dispatchEvent(n))}function Or(e,t,n,r){var i=this;We.call(this),this.g=e,this.h=t,this.i=new ut,this.L={video:e,player:t},this.C=n||function(){},this.M=r||function(e){return e},this.F=!1,this.m=!0,this.l=0,this.A=!1,this.u=!0,this.o=this.j=null,this.J=new Le((function(){Lr(i)})),function(e){var t,n,r,i,a,o,s,u,c,l,f,h,d,p=cast.receiver.CastReceiverManager.getInstance();p.onSenderConnected=Pw(t=e.xe).call(t,e),p.onSenderDisconnected=Pw(n=e.xe).call(n,e),p.onSystemVolumeChanged=Pw(r=e.hf).call(r,e),e.o=p.getCastMessageBus("urn:x-cast:com.google.cast.media"),e.o.onMessage=Pw(i=e.Wf).call(i,e),e.j=p.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),e.j.onMessage=Pw(a=e.fg).call(a,e),p.start(),Gf(nr).call(nr,Pw(o=function(e){var t;this.i.H(this.g,e,Pw(t=this.Ce).call(t,this,"video"))}).call(o,e)),Gf(or).call(or,Pw(s=function(e){var t;this.i.H(this.h,e,Pw(t=this.Ce).call(t,this,"player"))}).call(s,e)),cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?e.h.Nd(3840,2160):e.h.Nd(1920,1080),e.i.H(e.g,"loadeddata",Pw(u=function(){this.A=!0}).call(u,e)),e.i.H(e.h,"loading",Pw(c=function(){this.m=!1,_r(this)}).call(c,e)),e.i.H(e.g,"playing",Pw(l=function(){this.m=!1,_r(this)}).call(l,e)),e.i.H(e.g,"pause",Pw(f=function(){_r(this)}).call(f,e)),e.i.H(e.h,"unloading",Pw(h=function(){this.m=!0,_r(this)}).call(h,e)),e.i.H(e.g,"ended",Pw(d=function(){var e=this;new Le((function(){e.g&&e.g.ended&&(e.m=!0,_r(e))})).V(5)}).call(d,e))}(this)}function _r(e){var t;Zy.resolve().then(Pw(t=function(){this.h&&(this.dispatchEvent(new qe("caststatuschanged")),Dr(this)||Kr(this))}).call(t,e))}function Lr(e){var t;e.J.V(.5);var n={video:{},player:{}};if(Gf(rr).call(rr,Pw(t=function(e){n.video[e]=this.g[e]}).call(t,e)),e.h.aa())for(var r in ur)0==e.l%ur[r]&&(n.player[r]=e.h[r]());for(var i in sr)0==e.l%sr[i]&&(n.player[i]=e.h[i]());(r=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(n.video.volume=r.level,n.video.muted=r.muted),e.A&&(e.l+=1),Fr(e,{type:"update",update:n},e.j),Dr(e)}function Dr(e){return!(!e.u||!e.g.duration&&!e.h.aa()||(Ur(e),e.u=!1,0))}function Ur(e,t){t=void 0===t?0:t;var n={contentId:e.h.tc(),streamType:e.h.aa()?"LIVE":"BUFFERED",contentType:""};e.h.aa()||(n.duration=e.g.duration),Kr(e,t,n)}function Fr(e,t,n,r){e.F&&(e=dr(t),r?n.getCastChannel(r).send(e):n.broadcast(e))}function Kr(e,t,n){t=void 0===t?0:t,n=void 0===n?null:n;var r=e.g.playbackRate,i=Br;r={mediaSessionId:0,playbackRate:r,playerState:i=e.m?i.IDLE:e.h.jd()?i.Re:e.g.paused?i.Te:i.Ue,currentTime:e.g.currentTime,supportedMediaCommands:63,volume:{level:e.g.volume,muted:e.g.muted}},n&&(r.media=n),Fr(e,{requestId:t,type:"MEDIA_STATUS",status:[r]},e.o)}J(Ar,We),$("shaka.cast.CastProxy",Ar),Ar.prototype.destroy=function(e){return e&&this.g.Bb(),this.o&&(this.o.release(),this.o=null),e=[],this.h&&(e.push(this.h.destroy()),this.h=null),this.g&&(e.push(this.g.destroy()),this.g=null),this.u=this.m=this.i=null,Zy.all(e)},Ar.prototype.destroy=Ar.prototype.destroy,Ar.prototype.Mf=function(){return this.m},Ar.prototype.getVideo=Ar.prototype.Mf,Ar.prototype.Df=function(){return this.u},Ar.prototype.getPlayer=Ar.prototype.Df,Ar.prototype.Ye=function(){return this.g.m&&vr},Ar.prototype.canCast=Ar.prototype.Ye,Ar.prototype.la=function(){return this.g.la()},Ar.prototype.isCasting=Ar.prototype.la,Ar.prototype.Dd=function(){return this.g.Dd()},Ar.prototype.receiverName=Ar.prototype.Dd,Ar.prototype.cast=function(){var e,t=Ir(this);return this.g.cast(t).then(Pw(e=function(){if(this.h)return this.h.Ud()}).call(e,this))},Ar.prototype.cast=Ar.prototype.cast,Ar.prototype.Md=function(e){this.g.Md(e)},Ar.prototype.setAppData=Ar.prototype.Md,Ar.prototype.Kg=function(){var e=this.g;if(e.h){var t,n,r=e.L();chrome.cast.requestSession(Pw(t=e.Ad).call(t,e,r),Pw(n=e.ve).call(n,e))}},Ar.prototype.suggestDisconnect=Ar.prototype.Kg,Ar.prototype.af=function(e){var t=this;return T((function n(){return z(n,(function(n){switch(n.s){case 1:return e==t.C?n.return():(t.C=e,t.g.Bb(),N(n,t.g.destroy(),2));case 2:t.g=null,t.g=new gr(e,(function(){return Cr(t)}),(function(){return Rr(t)}),(function(e,n){return jr(t,e,n)}),(function(){return Pr(t)}),(function(){return Ir(t)})),t.g.init(),j(n)}}))}))},Ar.prototype.changeReceiverId=Ar.prototype.af,Ar.prototype.Bb=function(){this.g.Bb()},Ar.prototype.forceDisconnect=Ar.prototype.Bb,Ar.prototype.J=function(e){var t,n;if("addEventListener"==e)return Pw(t=this.j.addEventListener).call(t,this.j);if("removeEventListener"==e)return Pw(n=this.j.removeEventListener).call(n,this.j);if(this.g.la()&&0==ad(this.g.g.video).length){var r=this.i[e];if("function"!=typeof r)return r}return this.g.la()?this.g.get("video",e):("function"==typeof(e=this.i[e])&&(e=Pw(e).call(e,this.i)),e)},Ar.prototype.M=function(e,t){this.g.la()?this.g.set("video",e,t):this.i[e]=t},Ar.prototype.L=function(e){this.g.la()||this.j.dispatchEvent(new qe(e.type,e))},Ar.prototype.F=function(e){this.g.la()||this.l.dispatchEvent(e)},J(Or,We),$("shaka.cast.CastReceiver",Or),Or.prototype.isConnected=function(){return this.F},Or.prototype.isConnected=Or.prototype.isConnected,Or.prototype.Rf=function(){return this.m},Or.prototype.isIdle=Or.prototype.Rf,Or.prototype.destroy=function(){var e=this;return T((function t(){var n;return z(t,(function(t){switch(t.s){case 1:return e.i&&(e.i.release(),e.i=null),n=[],e.h&&(n.push(e.h.destroy()),e.h=null),e.J&&(e.J.stop(),e.J=null),e.g=null,e.L=null,e.C=null,e.F=!1,e.m=!0,e.j=null,e.o=null,N(t,Zy.all(n),2);case 2:cast.receiver.CastReceiverManager.getInstance().stop(),j(t)}}))}))},Or.prototype.destroy=Or.prototype.destroy,(f=Or.prototype).xe=function(){this.l=0,this.u=!0,this.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length,_r(this)},f.Ce=function(e,t){this.h&&(Lr(this),Fr(this,{type:"event",targetName:e,event:t},this.j))},f.hf=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Fr(this,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},this.j),Fr(this,{type:"event",targetName:"video",event:{type:"volumechange"}},this.j)},f.fg=function(e){var t,n,r,i=pr(e.data);switch(ne.debug("CastReceiver: message",i),i.type){case"init":this.l=0,this.A=!1,this.u=!0,function(e,t,n){for(var r in t.player)e.h[r](t.player[r]);e.C(n),n=Zy.resolve();var i=e.g.autoplay;t.manifest&&(e.g.autoplay=!1,n=e.h.load(t.manifest,t.startTime)),n.then((function(){if(e.h){for(var n in t.video)e.g[n]=t.video[n];for(var r in t.playerAfterLoad)e.h[r](t.playerAfterLoad[r]);e.g.autoplay=i,t.manifest&&(e.g.play(),Kr(e))}}),(function(t){e.h.dispatchEvent(new qe("error",{detail:t}))}))}(this,i.initState,i.appData),Lr(this);break;case"appData":this.C(i.appData);break;case"set":var a=i.targetName,o=i.property;if(i=i.value,"video"==a){var s=cast.receiver.CastReceiverManager.getInstance();if("volume"==o){s.setSystemVolumeLevel(i);break}if("muted"==o){s.setSystemVolumeMuted(i);break}}this.L[a][o]=i;break;case"call":(a=this.L[i.targetName])[i.methodName].apply(a,i.args);break;case"asyncCall":a=i.targetName,o=i.methodName,"player"==a&&"load"==o&&(this.l=0,this.A=!1),s=i.id,e=e.senderId;var u=this.L[a];i=u[o].apply(u,i.args),"player"==a&&"load"==o&&(i=i.then(Pw(t=function(){this.u=!0}).call(t,this))),i.then(Pw(n=this.Je).call(n,this,e,s,null),Pw(r=this.Je).call(r,this,e,s))}},f.Wf=function(e){var t,n,r,i=pr(e.data);switch(ne.debug("CastReceiver: message",i),i.type){case"PLAY":this.g.play(),Kr(this);break;case"PAUSE":this.g.pause(),Kr(this);break;case"SEEK":e=i.currentTime;var a=i.resumeState;null!=e&&(this.g.currentTime=Number(e)),a&&"PLAYBACK_START"==a?(this.g.play(),Kr(this)):a&&"PLAYBACK_PAUSE"==a&&(this.g.pause(),Kr(this));break;case"STOP":this.h.Ud().then(Pw(t=function(){this.h&&Kr(this)}).call(t,this));break;case"GET_STATUS":Ur(this,Number(i.requestId));break;case"VOLUME":e=(a=i.volume).level,a=a.muted;var o=this.g.volume,s=this.g.muted;null!=e&&(this.g.volume=Number(e)),null!=a&&(this.g.muted=a),o==this.g.volume&&s==this.g.muted||Kr(this);break;case"LOAD":this.l=0,this.u=this.A=!1,e=i.media,a=i.currentTime,o=this.M(e.contentId),s=i.autoplay||!0,this.C(e.customData),s&&(this.g.autoplay=!0),this.h.load(o,a).then(Pw(n=function(){this.h&&Ur(this)}).call(n,this)).catch(Pw(r=function(e){var t="LOAD_FAILED";7==e.category&&7e3==e.code&&(t="LOAD_CANCELLED"),Fr(this,{requestId:Number(i.requestId),type:t},this.o)}).call(r,this));break;default:ne.v("Unrecognized message type from the generic Chromecast controller!",i.type),Fr(this,{requestId:Number(i.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},this.o)}},f.Je=function(e,t,n){this.h&&Fr(this,{type:"asyncComplete",id:t,error:n},this.j,e)};var Br={IDLE:"IDLE",Ue:"PLAYING",Re:"BUFFERING",Te:"PAUSED"};function Hr(e,t){this.S=e,this.h=t==Vr,this.g=0}$("shaka.util.DataViewReader",Hr);var Vr=1;function zr(){throw new re(2,3,3e3)}function qr(){this.i=[],this.h=[],this.g=!1}function Gr(e){for(var t=Jr(e);e.reader.Ca()&&!e.parser.g;)e.parser.Fc(e.start+t,e.reader,e.partialOkay)}function Wr(e){for(var t=Jr(e),n=e.reader.N();0<n&&!e.parser.g;--n)e.parser.Fc(e.start+t,e.reader,e.partialOkay)}function Xr(e){return function(t){e(t.reader.mb(t.reader.S.byteLength-t.reader.ka()))}}function Yr(e){for(var t=0,n=0;n<e.length;n++)t=t<<8|e.charCodeAt(n);return t}function $r(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function Jr(e){return 8+(e.has64BitSize?8:0)+(null!=h_(e)?4:0)}function Qr(e){var t=this;this.g=[],this.h=[],this.data=[],(new qr).box("moov",Gr).ma("pssh",(function(e){if(1<e.version)ne.v("Unrecognized PSSH version found!");else{var n=e.reader.S;if(n=new Uint8Array(n.buffer,n.byteOffset-12,e.size),t.data.push(n),t.g.push(Pe.Nc(e.reader.mb(16))),0<e.version){n=e.reader.N();for(var r=0;r<n;++r){var i=Pe.Nc(e.reader.mb(16));t.h.push(i)}}}})).parse(e),0==this.data.length&&ne.v("No pssh box found!")}Hr.Endianness={Tg:0,Vg:Vr},Hr.prototype.Ca=function(){return this.g<this.S.byteLength},Hr.prototype.hasMoreData=Hr.prototype.Ca,Hr.prototype.ka=function(){return this.g},Hr.prototype.getPosition=Hr.prototype.ka,Hr.prototype.sf=function(){return this.S.byteLength},Hr.prototype.getLength=Hr.prototype.sf,Hr.prototype.ra=function(){try{var e=this.S.getUint8(this.g);return this.g+=1,e}catch(t){zr()}},Hr.prototype.readUint8=Hr.prototype.ra,Hr.prototype.dc=function(){try{var e=this.S.getUint16(this.g,this.h);return this.g+=2,e}catch(t){zr()}},Hr.prototype.readUint16=Hr.prototype.dc,Hr.prototype.N=function(){try{var e=this.S.getUint32(this.g,this.h);return this.g+=4,e}catch(t){zr()}},Hr.prototype.readUint32=Hr.prototype.N,Hr.prototype.De=function(){try{var e=this.S.getInt32(this.g,this.h);return this.g+=4,e}catch(t){zr()}},Hr.prototype.readInt32=Hr.prototype.De,Hr.prototype.Pb=function(){try{if(this.h)var e=this.S.getUint32(this.g,!0),t=this.S.getUint32(this.g+4,!0);else t=this.S.getUint32(this.g,!1),e=this.S.getUint32(this.g+4,!1)}catch(n){zr()}if(2097151<t)throw new re(2,3,3001);return this.g+=8,t*Math.pow(2,32)+e},Hr.prototype.readUint64=Hr.prototype.Pb,Hr.prototype.mb=function(e){this.g+e>this.S.byteLength&&zr();var t=new Uint8Array(this.S.buffer,this.S.byteOffset+this.g,e);return this.g+=e,t},Hr.prototype.readBytes=Hr.prototype.mb,Hr.prototype.U=function(e){this.g+e>this.S.byteLength&&zr(),this.g+=e},Hr.prototype.skip=Hr.prototype.U,Hr.prototype.Fe=function(e){this.g<e&&zr(),this.g-=e},Hr.prototype.rewind=Hr.prototype.Fe,Hr.prototype.seek=function(e){(0>e||e>this.S.byteLength)&&zr(),this.g=e},Hr.prototype.seek=Hr.prototype.seek,Hr.prototype.Cd=function(){for(var e=this.g;this.Ca()&&0!=this.S.getUint8(this.g);)this.g+=1;return e=new Uint8Array(this.S.buffer,this.S.byteOffset+e,this.g-e),this.g+=1,xe(e)},Hr.prototype.readTerminatedString=Hr.prototype.Cd,$("shaka.util.Mp4Parser",qr),qr.prototype.box=function(e,t){var n=Yr(e);return this.i[n]=0,this.h[n]=t,this},qr.prototype.box=qr.prototype.box,qr.prototype.ma=function(e,t){var n=Yr(e);return this.i[n]=1,this.h[n]=t,this},qr.prototype.fullBox=qr.prototype.ma,qr.prototype.stop=function(){this.g=!0},qr.prototype.stop=qr.prototype.stop,qr.prototype.parse=function(e,t){var n=new Uint8Array(e);for(n=new Hr(new DataView(n.buffer,n.byteOffset,n.byteLength),0),this.g=!1;n.Ca()&&!this.g;)this.Fc(0,n,t)},qr.prototype.parse=qr.prototype.parse,qr.prototype.Fc=function(e,t,n){var r=t.ka(),i=t.N(),a=t.N(),o=!1;switch(ne.O("Parsing MP4 box",$r(a)),i){case 0:i=t.S.byteLength-r;break;case 1:i=t.Pb(),o=!0}var s=this.h[a];if(s){var u=null,c=null;1==this.i[a]&&(u=(c=t.N())>>>24,c&=16777215),a=r+i,n&&a>t.S.byteLength&&(a=t.S.byteLength),a-=t.ka(),t=0<a?t.mb(a):new Uint8Array(0),s({parser:this,partialOkay:n||!1,version:u,flags:c,reader:t=new Hr(new DataView(t.buffer,t.byteOffset,t.byteLength),0),size:i,start:r+e,has64BitSize:o})}else t.U(Math.min(r+i-t.ka(),t.S.byteLength-t.ka()))},qr.prototype.parseNext=qr.prototype.Fc,qr.children=Gr,qr.sampleDescription=Wr,qr.allData=Xr,qr.typeToString=$r,qr.headerSize=Jr;var Zr={sc:function(e,t){var n=Zr.Y(e,t);return 1!=n.length?null:n[0]},Yc:function(e,t,n){return 1!=(e=Zr.fe(e,t,n)).length?null:e[0]},Y:function(e,t){return Hb(Array.prototype).call(e.childNodes,(function(e){return e instanceof Element&&e.tagName==t}))},fe:function(e,t,n){return Hb(Array.prototype).call(e.childNodes,(function(e){return e instanceof Element&&e.localName==n&&e.namespaceURI==t}))},getAttributeNS:function(e,t,n){return e.hasAttributeNS(t,n)?e.getAttributeNS(t,n):null},uc:function(e){var t;return iT(Array.prototype).call(e.childNodes,(function(e){return e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE}))?xT(t=e.textContent).call(t):null},R:function(e,t,n,r){r=void 0===r?null:r;var i=null;return null!=(e=e.getAttribute(t))&&(i=n(e)),null==i?r:i},jg:function(e){return e?(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e)&&(e+="Z"),e=Date.parse(e),isNaN(e)?null:Math.floor(e/1e3)):null},Ma:function(e){if(!e)return null;var t=/^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$/.exec(e);return t?(e=31536e3*Number(t[1]||null)+2592e3*Number(t[2]||null)+86400*Number(t[3]||null)+3600*Number(t[4]||null)+60*Number(t[5]||null)+Number(t[6]||null),isFinite(e)?e:null):(ne.v("Invalid duration string:",e),null)},Hc:function(e){var t=/([0-9]+)-([0-9]+)/.exec(e);return t?(e=Number(t[1]),isFinite(e)?(t=Number(t[2]),isFinite(t)?{start:e,end:t}:null):null):null},parseInt:function(e){return 0==(e=Number(e))%1?e:null},Gc:function(e){return 0==(e=Number(e))%1&&0<e?e:null},Mb:function(e){return 0==(e=Number(e))%1&&0<=e?e:null},parseFloat:function(e){return e=Number(e),isNaN(e)?null:e},ff:function(e){var t;return e=(t=e.match(/^(\d+)\/(\d+)$/))?Number(t[1])/Number(t[2]):Number(e),isNaN(e)?null:e},Ae:function(e,t){var n=new DOMParser;try{var r=n.parseFromString(e,"text/xml")}catch(a){}if(r&&r.documentElement.tagName==t)var i=r.documentElement;return i&&0<i.getElementsByTagName("parsererror").length?null:i},ze:function(e,t){try{var n=xe(e);return Zr.Ae(n,t)}catch(r){}}},ei=(new AP).set("urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b","org.w3.clearkey").set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine.alpha").set("urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95","com.microsoft.playready").set("urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95","com.microsoft.playready").set("urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb","com.adobe.primetime");function ti(e,t,n){var r=function(e){for(var t=[],n=(e=w(e)).next();!n.done;n=e.next())(n=ii(n.value))&&t.push(n);return t}(e),i=null;e=[];var a=[],o=new $O(Mb(r).call(r,(function(e){return e.keyId})));if(o.delete(null),1<o.size)throw new re(2,4,4010);if(n||(a=Hb(r).call(r,(function(e){return"urn:mpeg:dash:mp4protection:2011"!=e.Ge||(i=e.init||i,!1)}))).length&&(e=function(e,t,n){for(var r=[],i=(n=w(n)).next();!i.done;i=n.next()){i=i.value;var a=ei.get(i.Ge);if(a){var o;if(o=Zr.Yc(i.node,"urn:microsoft:playready","pro")){o=Pe.Ja(o.textContent);var s=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),u=o.length,c=s.length+16+u,l=new ArrayBuffer(c),f=new Uint8Array(l),h=0;(l=new DataView(l)).setUint32(h,c),h+=4,l.setUint32(h,1886614376),h+=4,l.setUint32(h,0),h+=4,f.set(s,h),h+=s.length,l.setUint32(h,u),h+=4,f.set(o,h),o=[{initData:f,initDataType:"cenc",keyId:i.keyId}]}else o=null;o=we(a,i.init||e||o),(a=ri.get(a))&&(o.licenseServerUri=a(i)),r.push(o)}else for(a=(i=w(i=t(i.node)||[])).next();!a.done;a=i.next())r.push(a.value)}return r}(i,t,a),0==e.length&&(e=[we("",i)])),r.length&&(n||!a.length))for(e=[],n=(t=w(OP(ei).call(ei))).next();!n.done;n=t.next())"org.w3.clearkey"!=(n=n.value)&&e.push(we(n,i));if(o=Yw(o)[0]||null)for(n=(t=w(e)).next();!n.done;n=t.next())for(r=(n=w(n.value.initData)).next();!r.done;r=n.next())r.value.keyId=o;return{be:o,Xg:i,drmInfos:e,ge:!0}}var ni,ri=(new AP).set("com.widevine.alpha",(function(e){return(e=Zr.Yc(e.node,"urn:microsoft","laurl"))&&e.getAttribute("licenseUrl")||""})).set("com.microsoft.playready",(function(e){var t;return(e=Zr.Yc(e.node,"urn:microsoft:playready","pro"))?(e=Pe.Ja(e.textContent),(e=Hb(t=function(e){var t=0,n=new DataView(e).getUint32(t,!0);if(t+=4,n!==e.byteLength)return ne.v("PlayReady Object with invalid length encountered."),[];t+=2,n=[];for(var r=new DataView(e);t<e.byteLength-1;){var i=r.getUint16(t,!0);t+=2;var a=r.getUint16(t,!0);t+=2;var o=new Uint8Array(e,t,a);n.push({type:i,value:o}),t+=a}return n}(e.buffer)).call(t,(function(e){return 1===e.type}))[0])?(e=ke(e.value,!0),(e=Zr.Ae(e,"WRMHEADER"))?function(e){for(var t=(e=w(e.getElementsByTagName("DATA"))).next();!t.done;t=e.next())for(var n=(t=w(t.value.childNodes)).next();!n.done;n=t.next())if((n=n.value)instanceof Element&&"LA_URL"==n.tagName)return n.textContent;return""}(e):""):""):""}));function ii(e){var t,n=e.getAttribute("schemeIdUri"),r=Zr.getAttributeNS(e,"urn:mpeg:cenc:2013","default_KID"),i=Mb(t=Zr.fe(e,"urn:mpeg:cenc:2013","pssh")).call(t,Zr.uc);if(!n)return ne.error("Missing required schemeIdUri attribute on","ContentProtection element",e),null;if(n=n.toLowerCase(),r&&(r=r.replace(/-/g,"").toLowerCase(),SM(r).call(r," ")))throw new re(2,4,4009);var a=[];try{a=Mb(i).call(i,(function(e){return{initDataType:"cenc",initData:Pe.Ja(e),keyId:null}}))}catch(o){throw new re(2,4,4007)}return{node:e,Ge:n,keyId:r,init:0<a.length?a:null}}function ai(e,t,n,r,i){var a={RepresentationID:t,Number:n,Bandwidth:r,Time:i};return e.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,(function(t,n,r,i){if("$$"==t)return"$";var o=a[n];if(null==o)return ne.v("URL template does not have an available substitution for identifier",'"'+n+'":',e),t;switch("RepresentationID"==n&&r&&(ne.v("URL template should not contain a width specifier for identifier",'"RepresentationID":',e),r=void 0),"Time"==n&&(o=Math.round(o)),i){case void 0:case"d":case"i":case"u":t=o.toString();break;case"o":t=o.toString(8);break;case"x":t=o.toString(16);break;case"X":t=o.toString(16).toUpperCase();break;default:t=o.toString()}return r=Sb(r,10)||1,Array(Math.max(0,r-t.length)+1).join("0")+t}))}function oi(e,t){var n=si(e,t,"timescale"),r=1;n&&(r=Zr.Gc(n)||1),n=si(e,t,"duration"),(n=Zr.Gc(n||""))&&(n/=r);var i=si(e,t,"startNumber"),a=Number(si(e,t,"presentationTimeOffset"))||0,o=Zr.Mb(i||"");null!=i&&null!=o||(o=1);var s=ui(e,t,"SegmentTimeline");if(i=null,s){i=r;var u=e.$.duration||1/0;s=Zr.Y(s,"S");for(var c=[],l=-a,f=0;f<s.length;++f){var h=s[f],d=Zr.R(h,"t",Zr.Mb),p=Zr.R(h,"d",Zr.Mb),g=Zr.R(h,"r",Zr.parseInt);if(null!=d&&(d-=a),!p){ne.v('"S" element must have a duration:','ignoring the remaining "S" elements.',h);break}if(d=null!=d?d:l,0>(g=g||0))if(f+1<s.length){if(null==(g=Zr.R(s[f+1],"t",Zr.Mb))){ne.v('An "S" element cannot have a negative repeat','if the next "S" element does not have a valid start time:','ignoring the remaining "S" elements.',h);break}if(d>=g){ne.v('An "S" element cannot have a negative repeat','if its start time exceeds the next "S" element\'s start time:','ignoring the remaining "S" elements.',h);break}g=Math.ceil((g-d)/p)-1}else{if(1/0==u){ne.v('The last "S" element cannot have a negative repeat',"if the Period has an infinite duration:",'ignoring the last "S" element.',h);break}if(d/i>=u){ne.v('The last "S" element cannot have a negative repeat',"if its start time exceeds the Period's duration:",'igoring the last "S" element.',h);break}g=Math.ceil((u*i-d)/p)-1}for(0<c.length&&d!=l&&(Math.abs((d-l)/i)>=Te&&ne.v("SegmentTimeline contains a large gap/overlap:","the content may have errors in it.",h),c[c.length-1].end=d/i),h=0;h<=g;++h)l=d+p,c.push({start:d/i,end:l/i,Pg:d}),d=l}i=c}return{timescale:r,ia:n,ob:o,sa:a/r||0,Vd:a,W:i}}function si(e,t,n){var r,i,a;return uN(r=Mb(i=Hb(a=[t(e.G),t(e.fa),t(e.qa)]).call(a,ye.Ra)).call(i,(function(e){return e.getAttribute(n)}))).call(r,(function(e,t){return e||t}))}function ui(e,t,n){var r,i,a;return uN(r=Mb(i=Hb(a=[t(e.G),t(e.fa),t(e.qa)]).call(a,ye.Ra)).call(i,(function(e){return Zr.sc(e,n)}))).call(r,(function(e,t){return e||t}))}function ci(e,t,n,r,i,a){if(a=void 0===a?0:a,Zr.getAttributeNS(e,"http://www.w3.org/1999/xlink","href")){var o=function(e,t,n,r,i,a){for(var o=Zr.getAttributeNS(e,"http://www.w3.org/1999/xlink","href"),s=Zr.getAttributeNS(e,"http://www.w3.org/1999/xlink","actuate")||"onRequest",u=0;u<e.attributes.length;u++){var c=e.attributes[u];"http://www.w3.org/1999/xlink"==c.namespaceURI&&(e.removeAttributeNS(c.namespaceURI,c.localName),--u)}if(5<=a)return Ke(new re(2,4,4028));if("onLoad"!=s)return Ke(new re(2,4,4027));var l=be([r],[o]);return i.request(0,rt(l,t)).ca((function(r){if(!(r=Zr.ze(r.data,e.tagName)))return Ke(new re(2,4,4001,o));for(;e.childNodes.length;)e.removeChild(e.childNodes[0]);for(;r.childNodes.length;){var s=r.childNodes[0];r.removeChild(s),e.appendChild(s)}for(s=0;s<r.attributes.length;s++){var u=r.attributes[s].nodeName,c=r.getAttribute(u);e.setAttribute(u,c)}return ci(e,t,n,l[0],i,a+1)}))}(e,t,n,r,i,a);return n&&(o=o.ca(void 0,(function(){return ci(e,t,n,r,i,a)}))),o}o=[];for(var s=0;s<e.childNodes.length;s++){var u=e.childNodes[s];u instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==Zr.getAttributeNS(u,"http://www.w3.org/1999/xlink","href")?(e.removeChild(u),--s):"SegmentTimeline"!=u.tagName&&o.push(ci(u,t,n,r,i,a)))}return ze(o).ca((function(){return e}))}function li(e,t,n){this.i=e,this.h=t,this.g=n}function fi(e,t,n,r,i,a){this.position=e,this.startTime=t,this.endTime=n,this.i=r,this.h=i,this.g=a}function hi(e,t,n,r){var i,a=(new qr).ma("sidx",(function(e){i=function(e,t,n,r){var i=[];r.reader.U(4);var a=r.reader.N();if(0==a)throw ne.error("Invalid timescale."),new re(2,3,3005);if(0==r.version)var o=r.reader.N(),s=r.reader.N();else o=r.reader.Pb(),s=r.reader.Pb();r.reader.U(2);var u=r.reader.dc();for(e=e+r.size+s,s=0;s<u;s++){var c=r.reader.N(),l=(2147483648&c)>>>31;c&=2147483647;var f=r.reader.N();if(r.reader.U(4),1==l)throw ne.error("Heirarchical SIDXs are not supported."),new re(2,3,3006);i.push(new fi(i.length,o/a-t,(o+f)/a-t,(function(){return n}),e,e+c-1)),o+=f,e+=c}return r.parser.stop(),i}(t,r,n,e)}));if(e&&a.parse(e),i)return i;throw ne.error('Invalid box type, expected "sidx".'),new re(2,3,3004)}function di(e){this.g=e}function pi(e,t){for(;e.g.length&&e.g[e.g.length-1].startTime>=t;)e.g.pop();for(;e.g.length&&0>=e.g[0].endTime;)e.g.shift();if(0!=e.g.length){var n=e.g[e.g.length-1];e.g[e.g.length-1]=new fi(n.position,n.startTime,t,n.i,n.h,n.g)}}function gi(e){this.h=e,this.g=new Hr(e,0),ni||(ni=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])])}function vi(e){var t=mi(e);if(7<t.length)throw new re(2,3,3002);for(var n=0,r=0;r<t.length;r++)n=256*n+t[r];t=n,n=mi(e);e:{r=Pe.Ha;for(var i=0;i<ni.length;i++)if(r(n,ni[i])){r=!0;break e}r=!1}if(r)n=e.h.byteLength-e.g.ka();else{if(8==n.length&&224&n[1])throw new re(2,3,3001);for(r=n[0]&(1<<8-n.length)-1,i=1;i<n.length;i++)r=256*r+n[i];n=r}return n=e.g.ka()+n<=e.h.byteLength?n:e.h.byteLength-e.g.ka(),r=new DataView(e.h.buffer,e.h.byteOffset+e.g.ka(),n),e.g.U(n),new yi(t,r)}function mi(e){var t,n=e.g.ra();for(t=1;8>=t&&!(n&1<<8-t);t++);if(8<t)throw new re(2,3,3002);var r=new Uint8Array(t);for(r[0]=n,n=1;n<t;n++)r[n]=e.g.ra();return r}function yi(e,t){this.id=e,this.g=t}function bi(e){if(8<e.g.byteLength)throw new re(2,3,3002);if(8==e.g.byteLength&&224&e.g.getUint8(0))throw new re(2,3,3001);for(var t=0,n=0;n<e.g.byteLength;n++)t=256*t+e.g.getUint8(n);return t}function wi(){}function Si(e){var t=new gi(e.g);if(179!=(e=vi(t)).id)throw ne.v("Not a CueTime element."),new re(2,3,3013);if(e=bi(e),183!=(t=vi(t)).id)throw ne.v("Not a CueTrackPositions element."),new re(2,3,3012);t=new gi(t.g);for(var n=0;t.Ca();){var r=vi(t);if(241==r.id){n=bi(r);break}}return{Qg:e,qg:n}}function Ti(e,t){var n=ui(e,t,"Initialization");if(!n)return null;var r=e.G.xa,i=n.getAttribute("sourceURL");i&&(r=be(e.G.xa,[i])),i=0;var a=null;return(n=Zr.R(n,"range",Zr.Hc))&&(i=n.start,a=n.end),new li((function(){return r}),i,a)}function Ei(e,t,n,r,i,a,o,s){var u=e.presentationTimeline,c=!e.zb||!e.$.ld,l=e.$.start,f=e.$.duration,h=t,d=null;return{createSegmentIndex:function(){var e=[h(r,i,a),"webm"==o?h(n.i(),n.h,n.g):null];return h=null,Zy.all(e).then((function(e){var t=e[0];e=e[1]||null,t="mp4"==o?hi(t,i,r,s):(new wi).parse(t,e,r,s),u.Jb(t,l),d=new di(t),c&&pi(d,f)}))},findSegmentPosition:function(e){return Jh(d).call(d,e)},getSegmentReference:function(e){return d.get(e)}}}function xi(e){return e.ec}function ki(e,t){var n,r,i,a=Ti(e,Ai),o=function(e){var t,n,r,i;return Mb(t=uN(n=Mb(r=Hb(i=[e.G.Ua,e.fa.Ua,e.qa.Ua]).call(i,ye.Ra)).call(r,(function(e){return Zr.Y(e,"SegmentURL")}))).call(n,(function(e,t){return 0<e.length?e:t}))).call(t,(function(t){return t.getAttribute("indexRange")&&!e.me&&(e.me=!0,ne.v("We do not support the SegmentURL@indexRange attribute on SegmentList. We only use the SegmentList@duration attribute or SegmentTimeline, which must be accurate.")),{Tf:t.getAttribute("media"),start:(t=Zr.R(t,"mediaRange",Zr.Hc,{start:0,end:null})).start,end:t.end}}))}(e),s=oi(e,Ai),u=s.ob;0==u&&(ne.v("SegmentList@startNumber must be > 0"),u=1);var c=0;if(s.ia?c=s.ia*(u-1):s.W&&0<s.W.length&&(c=s.W[0].start),!(o={ia:s.ia,startTime:c,ob:u,sa:s.sa,W:s.W,jb:o}).ia&&!o.W&&1<o.jb.length)throw ne.v("SegmentList does not contain sufficient segment information:","the SegmentList specifies multiple segments,","but does not specify a segment duration or timeline.",e.G),new re(2,4,4002);if(!o.ia&&!e.$.duration&&!o.W&&1==o.jb.length)throw ne.v("SegmentList does not contain sufficient segment information:","the SegmentList specifies one segment,","but does not specify a segment duration, period duration,","or timeline.",e.G),new re(2,4,4002);if(o.W&&0==o.W.length)throw ne.v("SegmentList does not contain sufficient segment information:","the SegmentList has an empty timeline.",e.G),new re(2,4,4002);return u=s=null,e.qa.id&&e.G.id&&(s=t[u=e.qa.id+","+e.G.id]),c=function(e,t,n,r){var i=r.jb.length;r.W&&r.W.length!=r.jb.length&&(i=Math.min(r.W.length,r.jb.length),ne.v("The number of items in the segment timeline and the number of segment","URLs do not match, truncating",r.jb.length,"to",i));for(var a=[],o=r.startTime,s=0;s<i;s++){var u,c=r.jb[s],l=be(n,[c.Tf]),f=void 0;f=null!=r.ia?o+r.ia:r.W?r.W[s].end:o+e,a.push(new fi(s+t,o,f,Pw(u=function(e){return e}).call(u,null,l),c.start,c.end)),o=f}return a}(e.$.duration,o.ob,e.G.xa,o),s?(s.sd(c),u=e.presentationTimeline.$b(),s.Vc(u-e.$.start)):(e.presentationTimeline.Jb(c,e.$.start),s=new di(c),u&&e.zb&&(t[u]=s)),e.zb&&e.$.ld||pi(s,e.$.duration),{createSegmentIndex:Pw(n=Zy.resolve).call(n,Zy),findSegmentPosition:Pw(r=Jh(s)).call(r,s),getSegmentReference:Pw(i=s.get).call(i,s),initSegmentReference:a,sa:o.sa}}function Ai(e){return e.Ua}function Mi(e,t,n,r){var i,a,o,s=function(e){var t=si(e,Ii,"initialization");if(!t)return null;var n=e.G.id,r=e.bandwidth||null,i=e.G.xa;return new li((function(){var e=ai(t,n,null,r,null);return be(i,[e])}),0,null)}(e),u=oi(e,Ii),c=si(e,Ii,"media"),l=si(e,Ii,"index");if(c=(u={ia:u.ia,timescale:u.timescale,ob:u.ob,sa:u.sa,Vd:u.Vd,W:u.W,qd:c,bc:l}).bc?1:0,c+=u.W?1:0,0==(c+=u.ia?1:0))throw ne.error("SegmentTemplate does not contain any segment information:","the SegmentTemplate must contain either an index URL template","a SegmentTimeline, or a segment duration.",e.G),new re(2,4,4002);if(1!=c&&(ne.v("SegmentTemplate containes multiple segment information sources:","the SegmentTemplate should only contain an index URL template,","a SegmentTimeline or a segment duration.",e.G),u.bc?(ne.info("Using the index URL template by default."),u.W=null):ne.info("Using the SegmentTimeline by default."),u.ia=null),!u.bc&&!u.qd)throw ne.error("SegmentTemplate does not contain sufficient segment information:","the SegmentTemplate's media URL template is missing.",e.G),new re(2,4,4002);if(u.bc){if("mp4"!=(n=e.G.mimeType.split("/")[1])&&"webm"!=n)throw ne.error("SegmentTemplate specifies an unsupported container type.",e.G),new re(2,4,4006);if("webm"==n&&!s)throw ne.error("SegmentTemplate does not contain sufficient segment information:","the SegmentTemplate uses a WebM container,","but does not contain an initialization URL template.",e.G),new re(2,4,4005);r=ai(u.bc,e.G.id,null,e.bandwidth||null,null),e=Ei(e,t,s,r=be(e.G.xa,[r]),0,null,n,u.sa)}else u.ia?(r||(e.presentationTimeline.ud(u.ia),e.presentationTimeline.vd(e.$.start)),e=function(e,t){var n,r=e.$.duration,i=t.ia,a=t.ob,o=t.timescale,s=t.qd,u=e.bandwidth||null,c=e.G.id,l=e.G.xa;return{createSegmentIndex:Pw(n=Zy.resolve).call(n,Zy),findSegmentPosition:function(e){return 0>e||r&&e>=r?null:Math.floor(e/i)},getSegmentReference:function(e){var t=e*i,n=t+i;return r&&(n=Math.min(n,r)),0>n||r&&t>=r?null:new fi(e,t,n,(function(){var n=ai(s,c,e+a,u,t*o);return be(l,[n])}),0,null)}}}(e,u)):(c=t=null,e.qa.id&&e.G.id&&(t=n[c=e.qa.id+","+e.G.id]),l=function(e,t){for(var n=[],r=0;r<t.W.length;r++){var i,a=r+t.ob;n.push(new fi(a,t.W[r].start,t.W[r].end,Pw(i=function(e,t,n,r,i,a){var o;return e=ai(e,t,i,n,a),Mb(o=be(r,[e])).call(o,(function(e){return e.toString()}))}).call(i,null,t.qd,e.G.id,e.bandwidth||null,e.G.xa,a,t.W[r].Pg+t.Vd),0,null))}return n}(e,u),r=!e.zb||!e.$.ld,t?(r&&pi(new di(l),e.$.duration),t.sd(l),n=e.presentationTimeline.$b(),t.Vc(n-e.$.start)):(e.presentationTimeline.Jb(l,e.$.start),t=new di(l),c&&e.zb&&(n[c]=t)),r&&pi(t,e.$.duration),e={createSegmentIndex:Pw(i=Zy.resolve).call(i,Zy),findSegmentPosition:Pw(a=Jh(t)).call(a,t),getSegmentReference:Pw(o=t.get).call(o,t)});return{createSegmentIndex:e.createSegmentIndex,findSegmentPosition:e.findSegmentPosition,getSegmentReference:e.getSegmentReference,initSegmentReference:s,sa:u.sa}}function Ii(e){return e.gc}$("shaka.media.InitSegmentReference",li),li.prototype.Tc=function(){return this.i()},li.prototype.createUris=li.prototype.Tc,li.prototype.dd=function(){return this.h},li.prototype.getStartByte=li.prototype.dd,li.prototype.cd=function(){return this.g},li.prototype.getEndByte=li.prototype.cd,$("shaka.media.SegmentReference",fi),fi.prototype.ka=function(){return this.position},fi.prototype.getPosition=fi.prototype.ka,fi.prototype.xc=function(){return this.startTime},fi.prototype.getStartTime=fi.prototype.xc,fi.prototype.qf=function(){return this.endTime},fi.prototype.getEndTime=fi.prototype.qf,fi.prototype.Tc=function(){return this.i()},fi.prototype.createUris=fi.prototype.Tc,fi.prototype.dd=function(){return this.h},fi.prototype.getStartByte=fi.prototype.dd,fi.prototype.cd=function(){return this.g},fi.prototype.getEndByte=fi.prototype.cd,$("shaka.media.SegmentIndex",di),di.prototype.destroy=function(){return this.g=null,Zy.resolve()},di.prototype.destroy=di.prototype.destroy,di.prototype.find=function(e){for(var t=this.g.length-1,n=t;0<=n;--n){var r=this.g[n],i=n<t?this.g[n+1].startTime:r.endTime;if(e>=r.startTime&&e<i)return r.position}return this.g.length&&e<this.g[0].startTime?this.g[0].position:null},di.prototype.find=Jh(di.prototype),di.prototype.get=function(e){return 0==this.g.length||0>(e-=this.g[0].position)||e>=this.g.length?null:this.g[e]},di.prototype.get=di.prototype.get,di.prototype.offset=function(e){for(var t=0;t<this.g.length;++t)this.g[t].startTime+=e,this.g[t].endTime+=e},di.prototype.offset=di.prototype.offset,di.prototype.sd=function(e){for(var t=[],n=0,r=0;n<this.g.length&&r<e.length;){var i=this.g[n],a=e[r];i.startTime<a.startTime?(t.push(i),n++):(i.startTime>a.startTime?0==n?t.push(a):ne.v("Refusing to rewrite original references on update!"):(.1<Math.abs(i.endTime-a.endTime)?t.push(new fi(i.position,a.startTime,a.endTime,a.i,a.h,a.g)):t.push(i),n++),r++)}for(;n<this.g.length;)t.push(this.g[n++]);if(t.length)for(n=t[t.length-1].position+1;r<e.length;)i=new fi(n++,(i=e[r++]).startTime,i.endTime,i.i,i.h,i.g),t.push(i);else t=e;this.g=t},di.prototype.merge=di.prototype.sd,di.prototype.Vc=function(e){for(var t=0;t<this.g.length;++t)if(this.g[t].endTime>e){var n;return void Wd(n=this.g).call(n,0,t)}this.g=[]},di.prototype.evict=di.prototype.Vc,gi.prototype.Ca=function(){return this.g.Ca()},wi.prototype.parse=function(e,t,n,r){var i;if(440786851!=vi(t=new gi(new DataView(t))).id)throw ne.error("Not an EBML element."),new re(2,3,3008);var a=vi(t);if(408125543!=a.id)throw ne.error("Not a Segment element."),new re(2,3,3009);for(t=a.g.byteOffset,a=new gi(a.g),i=null;a.Ca();){var o=vi(a);if(357149030==o.id){i=o;break}}if(!i)throw ne.error("Not an Info element."),new re(2,3,3010);for(a=new gi(i.g),i=1e6,o=null;a.Ca();){var s=vi(a);if(2807729==s.id)i=bi(s);else if(17545==s.id)if(4==(o=s).g.byteLength)o=o.g.getFloat32(0);else{if(8!=o.g.byteLength)throw new re(2,3,3003);o=o.g.getFloat64(0)}}if(null==o)throw new re(2,3,3011);if(i=o*(a=i/1e9),475249515!=(e=vi(new gi(new DataView(e)))).id)throw ne.error("Not a Cues element."),new re(2,3,3007);return function(e,t,n,r,i,a){function o(){return i}var s=[];e=new gi(e.g);for(var u=null,c=null;e.Ca();){var l=vi(e);if(187==l.id){var f=Si(l);f&&(l=n*f.Qg,f=t+f.qg,null!=u&&s.push(new fi(s.length,u-a,l-a,o,c,f-1)),u=l,c=f)}}return null!=u&&s.push(new fi(s.length,u-a,r-a,o,c,null)),s}(e,t,a,i,n,r)};var Ci={Nb:{},cc:{},Fd:function(e,t){Ci.cc[e]=t}};function Ri(e,t,n){this.j=e,this.Ic=t,this.m=this.l=1/0,this.g=1,this.h=this.i=null,this.u=0,this.A=!0,this.o=0,this.C=void 0===n||n}function Pi(e,t,n,r){return e=rt(e,r),0==t&&null==n||(e.headers.Range=n?"bytes="+t+"-"+n:"bytes="+t+"-"),e}function Ni(){var e=this;this.h=this.g=null,this.j=[],this.i=null,this.u=[],this.m=1,this.A={},this.C=0,this.F=new Q(5),this.o=new Le((function(){!function(e){T((function t(){var n,r;return z(t,(function(t){switch(t.s){case 1:return ne.info("Updating manifest..."),n=0,O(t,2),N(t,ji(e),4);case 4:n=t.B,L(t,3);break;case 2:r=D(t),e.h&&(r.severity=1,e.h.onError(r));case 3:if(!e.h)return t.return();Di(e,n),j(t)}}))}))}(e)})),this.l=new Qe}function ji(e){var t=CT(),n=e.h.networkingEngine.request(0,rt(e.j,e.g.retryParameters));return Ze(e.l,n),n.promise.then((function(t){var n;if(e.h)return t.uri&&!SM(n=e.j).call(n,t.uri)&&e.j.unshift(t.uri),function(e,t,n){if(!(t=Zr.ze(t,"MPD")))throw new re(2,4,4001,n);return t=ci(t,e.g.retryParameters,e.g.dash.xlinkFailGracefully,n,e.h.networkingEngine),Ze(e.l,t),t.promise.then((function(t){return function(e,t,n){return T((function r(){var i,a,o,s,u,c,l,f,h,d,p,g,v,m,y,b,w,S,T,E,x,k,A,M;return z(r,(function(r){var I,C,R;switch(r.s){case 1:s=ye,c=[n],0<(l=Hb(I=Mb(C=(u=Zr).Y(t,"Location")).call(C,u.uc)).call(I,s.Ra)).length&&(f=be(c,l),c=e.j=f),h=Mb(R=u.Y(t,"BaseURL")).call(R,u.uc),d=be(c,h),p=e.g.dash.ignoreMinBufferTime,g=0,p||(g=u.R(t,"minBufferTime",u.Ma)),e.C=u.R(t,"minimumUpdatePeriod",u.Ma,-1),v=u.R(t,"availabilityStartTime",u.jg),m=u.R(t,"timeShiftBufferDepth",u.Ma),y=u.R(t,"maxSegmentDuration",u.Ma),b=t.getAttribute("type")||"static",w=e.g.dash.ignoreSuggestedPresentationDelay,S=null,w||(S=u.R(t,"suggestedPresentationDelay",u.Ma)),e.i?T=e.i.presentationTimeline:(E=Math.max(e.g.dash.defaultPresentationDelay,1.5*g),T=new Ri(v,null!=S?S:E,e.g.dash.autoCorrectDrift));for(var P={zb:"static"!=b,presentationTimeline:T,qa:null,$:null,fa:null,G:null,bandwidth:0,me:!1},O=d,_=Zr.R(t,"mediaPresentationDuration",Zr.Ma),L=[],D=0,U=Zr.Y(t,"Period"),F=0;F<U.length;F++){var K,B=U[F];D=Zr.R(B,"start",Zr.Ma,D);var H=Zr.R(B,"duration",Zr.Ma),V=null;if(F!=U.length-1){var z=Zr.R(U[F+1],"start",Zr.Ma);null!=z&&(V=z-D)}else null!=_&&(V=_-D);if(z=Te,V&&H&&Math.abs(V-H)>z&&ne.v("There is a gap/overlap between Periods",B),null==V&&(V=H),B=Oi(e,P,O,{start:D,duration:V,node:B,ld:null==V||F==U.length-1}),L.push(B),H=P.qa.id,SM(K=e.u).call(K,H)||(e.u.push(H),e.i&&(e.h.filterNewPeriod(B),e.i.periods.push(B))),null==V){F!=U.length-1&&ne.v("Skipping Period",F+1,"and any subsequent Periods:","Period",F+1,"does not have a valid start time.",L[F+1]),D=null;break}D+=V}if(null==e.i&&e.h.filterAllPeriods(L),null!=_?(D!=_&&ne.v("@mediaPresentationDuration does not match the total duration of all","Periods."),i=L,a=_,o=!1):(i=L,a=D,o=!0),x=a,k=i,T.hc("static"==b),"static"!=b&&o||T.Fa(x||1/0),T.aa()&&!isNaN(e.g.availabilityWindowOverride)&&(m=e.g.availabilityWindowOverride),null==m&&(m=1/0),T.Pd(m),T.ud(y||1),e.i){r.I(0);break}if(e.i={presentationTimeline:T,periods:k,offlineSessionIds:[],minBufferTime:g||0},!T.Pe()){r.I(0);break}return A=u.Y(t,"UTCTiming"),N(r,function(e,t,n){var r;n=Mb(n).call(n,(function(e){return{scheme:e.getAttribute("schemeIdUri"),value:e.getAttribute("value")}}));var i=e.g.dash.clockSyncUri;return!n.length&&i&&n.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:i}),ye.df(n,Pw(r=function(e){var n=e.scheme;switch(e=e.value,n){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return Fi(this,t,e,"HEAD");case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":return Fi(this,t,e,"GET");case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return n=Date.parse(e),isNaN(n)?0:n-CT();case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":return ne.ba("NTP UTCTiming scheme is not supported"),Zy.reject();default:return ne.ba("Unrecognized scheme in UTCTiming element",n),Zy.reject()}}).call(r,e)).catch((function(){return ne.ba("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),0}))}(e,d,A),4);case 4:if(M=r.B,!e.h)return r.return();T.Ke(M),j(r)}}))}))}(e,t,n)}))}(e,t.data,t.uri)})).then((function(){var n=(CT()-t)/1e3;return Z(e.F,1,n),n}))}function Oi(e,t,n,r){var i,a,o,s,u,c;if(t.qa=Ui(r.node,null,n),t.$=r,t.qa.id||(ne.info("No Period ID given for Period with start time "+r.start+", Assigning a default"),t.qa.id="__shaka_period_"+r.start),Gf(i=Zr.Y(r.node,"EventStream")).call(i,Pw(a=e.kg).call(a,e,r.start,r.duration)),n=Hb(o=Mb(s=Zr.Y(r.node,"AdaptationSet")).call(s,Pw(u=e.ig).call(u,e,t))).call(o,ye.Ra),t.zb){t=[];for(var l=w(n),f=l.next();!f.done;f=l.next())for(var h=(f=w(f.value.tg)).next();!h.done;h=f.next())t.push(h.value);if(t.length!=new $O(t).size)throw new re(2,4,4018)}var d=Hb(n).call(n,(function(e){return!e.Td}));if(Gf(c=Hb(n).call(n,(function(e){return e.Td}))).call(c,(function(e){var t=e.Td.split(" ");Gf(d).call(d,(function(n){var r;SM(t).call(t,n.id)&&Gf(r=n.streams).call(r,(function(t){var n;t.trickModeVideo=Jh(n=e.streams).call(n,(function(e){return bt(t.codecs)[0]==bt(e.codecs)[0]}))}))}))})),t=_i(d,"video"),l=_i(d,"audio"),!t.length&&!l.length)throw new re(2,4,4004);for(n=e.g.disableAudio,l.length&&!n||(l=[null]),n=e.g.disableVideo,t.length&&!n||(t=[null]),n=[],f=0;f<l.length;f++)for(h=0;h<t.length;h++)Li(e,l[f],t[h],n);if(t=[],!e.g.disableText)for(e=_i(d,"text"),l=0;l<e.length;l++)t.push.apply(t,e[l].streams);return{startTime:r.start,textStreams:t,variants:n}}function _i(e,t){return Hb(e).call(e,(function(e){return e.contentType==t}))}function Li(e,t,n,r){if(t||n)if(t&&n){var i=t.drmInfos,a=n.drmInfos;if(!i.length||!a.length||0<Gt(i,a).length){a=Gt(t.drmInfos,n.drmInfos);for(var o=0;o<t.streams.length;o++)for(var s=0;s<n.streams.length;s++)i=(n.streams[s].bandwidth||0)+(t.streams[o].bandwidth||0),i={id:e.m++,language:t.language,primary:t.pd||n.pd,audio:t.streams[o],video:n.streams[s],bandwidth:i,drmInfos:a,allowedByApplication:!0,allowedByKeySystem:!0},r.push(i)}}else for(a=t||n,o=0;o<a.streams.length;o++)i=a.streams[o].bandwidth||0,i={id:e.m++,language:a.language||"und",primary:a.pd,audio:t?a.streams[o]:null,video:n?a.streams[o]:null,bandwidth:i,drmInfos:a.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0},r.push(i)}function Di(e,t){0>e.C||e.o.V(Math.max(3,e.C-t,ee(e.F)))}function Ui(e,t,n){var r,i;t=t||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,wd:null,audioSamplingRate:null},n=n||t.xa;var a=Zr.Mb,o=Zr.ff,s=Mb(r=Zr.Y(e,"BaseURL")).call(r,Zr.uc),u=e.getAttribute("contentType")||t.contentType,c=e.getAttribute("mimeType")||t.mimeType,l=e.getAttribute("codecs")||t.codecs;o=Zr.R(e,"frameRate",o)||t.frameRate;for(var f=e.getAttribute("sar")||t.pixelAspectRatio,h=Zr.Y(e,"InbandEventStream"),d=xd(i=t.emsgSchemeIdUris).call(i),p=(h=w(h)).next();!p.done;p=h.next())p=p.value.getAttribute("schemeIdUri"),SM(d).call(d,p)||d.push(p);return h=function(e){for(var t=0;t<e.length;++t){var n=e[t],r=n.getAttribute("schemeIdUri");if(r&&(n=n.getAttribute("value")))switch(r){case"urn:mpeg:dash:outputChannelPositionList:2012":return xT(n).call(n).split(/ +/).length;case"urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case"urn:dts:dash:audio_channel_configuration:2012":var i=Sb(n,10);if(!i){ne.v("Channel parsing failure! Ignoring scheme and value",r,n);continue}return i;case"tag:dolby.com,2014:dash:audio_channel_configuration:2011":case"urn:dolby:dash:audio_channel_configuration:2011":if(!(i=Sb(n,16))){ne.v("Channel parsing failure! Ignoring scheme and value",r,n);continue}for(e=0;i;)1&i&&++e,i>>=1;return e;default:ne.v("Unrecognized audio channel scheme:",r,n)}}return null}(h=Zr.Y(e,"AudioChannelConfiguration"))||t.wd,p=Zr.R(e,"audioSamplingRate",a)||t.audioSamplingRate,u||(u=Ki(c,l)),{xa:be(n,s),ec:Zr.sc(e,"SegmentBase")||t.ec,Ua:Zr.sc(e,"SegmentList")||t.Ua,gc:Zr.sc(e,"SegmentTemplate")||t.gc,width:Zr.R(e,"width",a)||t.width,height:Zr.R(e,"height",a)||t.height,contentType:u,mimeType:c,codecs:l,frameRate:o,pixelAspectRatio:f,emsgSchemeIdUris:d,id:e.getAttribute("id"),wd:h,audioSamplingRate:p}}function Fi(e,t,n,r){return(t=rt(t=be(t,[n]),e.g.retryParameters)).method=r,t=e.h.networkingEngine.request(4,t),Ze(e.l,t),t.promise.then((function(e){if("HEAD"==r){if(!e.headers||!e.headers.date)return ne.v("UTC timing response is missing","expected date header"),0;e=e.headers.date}else e=xe(e.data);return e=Date.parse(e),isNaN(e)?(ne.v("Unable to parse date from UTC timing response"),0):e-CT()}))}function Ki(e,t){return kn(mt(e,t))?"text":e.split("/")[0]}function Bi(e,t,n,r){this.h=e,this.type=t,this.g=n,this.segments=r||null}function Hi(e,t,n,r){this.id=e,this.name=t,this.g=n,this.value=void 0===r?null:r}function Vi(e,t){this.name=e,this.value=t}function zi(e,t,n){return(e=e.getAttribute(t))?e.value:n||null}function qi(e,t){this.h=t,this.g=e}$("shaka.media.ManifestParser.registerParserByExtension",Ci.Fd),Ci.Qb=function(e,t){Ci.Nb[e]=t},$("shaka.media.ManifestParser.registerParserByMime",Ci.Qb),Ci.ng=function(){var e={};if(St()){for(var t in Ci.Nb)e[t]=!0;for(var n in Ci.cc)e[n]=!0}t={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};for(var r=(n=w(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"])).next();!r.done;r=n.next())e[r=r.value]=St()?!!Ci.Nb[r]:Tt(r);for(var i in t)e[i]=St()?!!Ci.cc[i]:Tt(t[i]);return e},Ci.create=function(e,t,n,r){return T((function i(){var a,o;return z(i,(function(i){switch(i.s){case 1:return O(i,2),N(i,Ci.rf(e,t,n,r),4);case 4:return a=i.B,i.return(new a);case 2:throw(o=D(i)).severity=2,o}}))}))},Ci.rf=function(e,t,n,r){return T((function i(){var a,o,s,u,c;return z(i,(function(i){switch(i.s){case 1:if(a=Ci,r){if(o=a.Nb[r.toLowerCase()])return i.return(o);ne.v("Could not determine manifest type using MIME type ",r)}if(s=a.getExtension(e)){if(u=a.cc[s])return i.return(u);ne.v("Could not determine manifest type for extension ",s)}else ne.v("Could not find extension for ",e);if(r){i.I(2);break}return N(i,a.zf(e,t,n),3);case 3:if(r=i.B){if(c=Ci.Nb[r])return i.return(c);ne.v("Could not determine manifest type using MIME type",r)}case 2:throw new re(2,4,4e3,e)}}))}))},Ci.zf=function(e,t,n){return T((function r(){var i,a,o;return z(r,(function(r){switch(r.s){case 1:return(i=rt([e],n)).method="HEAD",N(r,t.request(0,i).promise,2);case 2:return a=r.B,o=a.headers["content-type"],r.return(o?o.toLowerCase().split(";").shift():"")}}))}))},Ci.getExtension=function(e){return 1==(e=new ae(e).pa.split("/").pop().split(".")).length?"":e.pop().toLowerCase()},Ci.isSupported=function(e,t){return!!St()&&(t in Ci.Nb||Ci.getExtension(e)in Ci.cc)},$("shaka.media.PresentationTimeline",Ri),Ri.prototype.ha=function(){return this.l},Ri.prototype.getDuration=Ri.prototype.ha,Ri.prototype.xf=function(){return this.g},Ri.prototype.getMaxSegmentDuration=Ri.prototype.xf,Ri.prototype.Fa=function(e){this.l=e},Ri.prototype.setDuration=Ri.prototype.Fa,Ri.prototype.Ff=function(){return this.j},Ri.prototype.getPresentationStartTime=Ri.prototype.Ff,Ri.prototype.Ke=function(e){this.u=e},Ri.prototype.setClockOffset=Ri.prototype.Ke,Ri.prototype.hc=function(e){this.A=e},Ri.prototype.setStatic=Ri.prototype.hc,Ri.prototype.Pd=function(e){this.m=e},Ri.prototype.setSegmentAvailabilityDuration=Ri.prototype.Pd,Ri.prototype.Ag=function(e){this.Ic=e},Ri.prototype.setDelay=Ri.prototype.Ag,Ri.prototype.pf=function(){return this.Ic},Ri.prototype.getDelay=Ri.prototype.pf,Ri.prototype.Jb=function(e,t){if(0!=e.length){var n=e[e.length-1].endTime+t;this.vd(e[0].startTime+t),this.g=uN(e).call(e,(function(e,t){return Math.max(e,t.endTime-t.startTime)}),this.g),this.h=Math.max(this.h,n),null!=this.j&&this.C&&(this.j=(CT()+this.u)/1e3-this.h-this.g),ne.K("notifySegments:","maxSegmentDuration="+this.g)}},Ri.prototype.notifySegments=Ri.prototype.Jb,Ri.prototype.vd=function(e){this.i=null==this.i?e:Math.min(this.i,e)},Ri.prototype.notifyMinSegmentStartTime=Ri.prototype.vd,Ri.prototype.ud=function(e){this.g=Math.max(this.g,e),ne.K("notifyNewSegmentDuration:","maxSegmentDuration="+this.g)},Ri.prototype.notifyMaxSegmentDuration=Ri.prototype.ud,Ri.prototype.offset=function(e){null!=this.i&&(this.i+=e),null!=this.h&&(this.h+=e)},Ri.prototype.offset=Ri.prototype.offset,Ri.prototype.aa=function(){return 1/0==this.l&&!this.A},Ri.prototype.isLive=Ri.prototype.aa,Ri.prototype.ib=function(){return 1/0!=this.l&&!this.A},Ri.prototype.isInProgress=Ri.prototype.ib,Ri.prototype.$b=function(){if(1/0==this.m)return this.o;var e=this.Db()-this.m;return Math.max(this.o,e)},Ri.prototype.getSegmentAvailabilityStart=Ri.prototype.$b,Ri.prototype.Le=function(e){this.o=e},Ri.prototype.setUserSeekStart=Ri.prototype.Le,Ri.prototype.Db=function(){return this.aa()||this.ib()?Math.min(Math.max(0,(CT()+this.u)/1e3-this.g-this.j),this.l):this.l},Ri.prototype.getSegmentAvailabilityEnd=Ri.prototype.Db,Ri.prototype.Zb=function(e){var t=Math.max(this.i,this.o);if(1/0==this.m)return Math.ceil(1e3*t)/1e3;var n=this.Db()-this.m;return e=Math.min(n+e,this.Ka()),Math.max(t,e)},Ri.prototype.getSafeSeekRangeStart=Ri.prototype.Zb,Ri.prototype.Cb=function(){return this.Zb(0)},Ri.prototype.getSeekRangeStart=Ri.prototype.Cb,Ri.prototype.Ka=function(){var e=this.aa()||this.ib()?this.Ic:0;return Math.max(0,this.Db()-e)},Ri.prototype.getSeekRangeEnd=Ri.prototype.Ka,Ri.prototype.Pe=function(){return!(null==this.j||null!=this.h&&this.C)},Ri.prototype.usingPresentationStartTime=Ri.prototype.Pe,$("shaka.dash.DashParser",Ni),(f=Ni.prototype).configure=function(e){this.g=e},f.start=function(e,t){var n=this;return T((function r(){var i;return z(r,(function(r){switch(r.s){case 1:return n.j=[e],n.h=t,N(r,ji(n),2);case 2:if(i=r.B,n.h&&Di(n,i),!n.h)throw new re(2,7,7001);return r.return(n.i)}}))}))},f.stop=function(){return this.g=this.h=null,this.j=[],this.i=null,this.u=[],this.A={},null!=this.o&&(this.o.stop(),this.o=null),this.l.destroy()},f.update=function(){var e;ji(this).catch(Pw(e=function(e){this.h&&this.h.onError(e)}).call(e,this))},f.onExpirationUpdated=function(){},f.ig=function(e,t){var n,r,i,a,o;if(e.fa=Ui(t,e.qa,null),"image"==e.fa.contentType)return ne.v("Skipping Image AdaptationSet",e.fa),null;var s=!1,u=Zr.Y(t,"Role"),c=Hb(n=Mb(u).call(u,(function(e){return e.getAttribute("value")}))).call(n,ye.Ra),l=void 0,f="text"==e.fa.contentType;f&&(l="subtitle");for(var h=0;h<u.length;h++){var d=u[h].getAttribute("schemeIdUri");if(null==d||"urn:mpeg:dash:role:2011"==d)switch(d=u[h].getAttribute("value"),d){case"main":s=!0;break;case"caption":case"subtitle":l=d}}var p=null,g=!1;Gf(r=Zr.Y(t,"EssentialProperty")).call(r,(function(e){"http://dashif.org/guidelines/trickmode"==e.getAttribute("schemeIdUri")?p=e.getAttribute("value"):g=!0})),h=Zr.Y(t,"Accessibility");var v=new AP;for(u={},d=(h=w(h)).next();!d.done;u={Vb:u.Vb},d=h.next()){var m,y=d.value;d=y.getAttribute("schemeIdUri"),y=y.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==d||"urn:scte:dash:cc:cea-708:2015"==d?(u.Vb=1,null!=y?Gf(m=y.split(";")).call(m,function(e){return function(t){if(SM(t).call(t,"=")){var n;t=t.split("=");var r=oM(n=t[0]).call(n,"CC")?t[0]:"CC"+t[0];t=t[1].split(",")[0].split(":").pop()}else r="CC"+e.Vb,e.Vb+=2;v.set(r,zn(t))}}(u)):v.set("CC1","und")):"urn:mpeg:dash:role:2011"==d&&null!=y&&(c.push(y),"captions"==y&&(l="caption"))}if(g)return null;var b=ti(u=Zr.Y(t,"ContentProtection"),this.g.dash.customScheme,this.g.dash.ignoreDrmInfo);if(u=zn(t.getAttribute("lang")||"und"),h=t.getAttribute("label"),(d=Zr.Y(t,"Label"))&&d.length&&(d=d[0]).textContent&&(h=d.textContent),d=Zr.Y(t,"Representation"),0==(c=Hb(i=Mb(d).call(d,Pw(a=this.lg).call(a,this,e,b,l,u,h,s,c,v))).call(i,(function(e){return!!e}))).length){if(this.g.dash.ignoreEmptyAdaptationSet||f)return null;throw new re(2,4,4003)}return e.fa.contentType&&"application"!=e.fa.contentType||(e.fa.contentType=Ki(c[0].mimeType,c[0].codecs),Gf(c).call(c,(function(t){t.type=e.fa.contentType}))),Gf(c).call(c,(function(e){var t;Gf(t=b.drmInfos).call(t,(function(t){e.keyId&&t.keyIds.push(e.keyId)}))})),f=Hb(o=Mb(d).call(d,(function(e){return e.getAttribute("id")}))).call(o,ye.Ra),{id:e.fa.id||"__fake__"+this.m++,contentType:e.fa.contentType,language:u,pd:s,streams:c,drmInfos:b.drmInfos,Td:p,tg:f}},f.lg=function(e,t,n,r,i,a,o,s,u){if(e.G=Ui(u,e.fa,null),!function(e){var t=e.ec?1:0;return t+=e.Ua?1:0,0==(t+=e.gc?1:0)?"text"==e.contentType||"application"==e.contentType||(ne.v("Representation does not contain a segment information source:","the Representation must contain one of SegmentBase, SegmentList,",'SegmentTemplate, or explicitly indicate that it is "text".',e),!1):(1!=t&&(ne.v("Representation contains multiple segment information sources:","the Representation should only contain one of SegmentBase,","SegmentList, or SegmentTemplate.",e),e.ec?(ne.info("Using SegmentBase by default."),e.Ua=null):ne.info("Using SegmentList by default."),e.gc=null),!0)}(e.G))return ne.v("Skipping Representation",e.G),null;e.bandwidth=Zr.R(u,"bandwidth",Zr.Gc)||0;var c=e.G.contentType;c="text"==c||"application"==c;try{var l,f=Pw(l=this.ug).call(l,this);if(e.G.ec)var h=function(e,t){var n=Number(si(e,xi,"presentationTimeOffset"))||0,r=si(e,xi,"timescale"),i=1;r&&(i=Zr.Gc(r)||1),n=n/i||0,r=Ti(e,xi);var a=e.G.contentType;if(i=e.G.mimeType.split("/")[1],"text"!=a&&"mp4"!=i&&"webm"!=i)throw ne.error("SegmentBase specifies an unsupported container type.",e.G),new re(2,4,4006);if("webm"==i&&!r)throw ne.error("SegmentBase does not contain sufficient segment information:","the SegmentBase uses a WebM container,","but does not contain an Initialization element.",e.G),new re(2,4,4005);a=ui(e,xi,"RepresentationIndex");var o=si(e,xi,"indexRange"),s=e.G.xa;if(o=Zr.Hc(o||""),a){var u=a.getAttribute("sourceURL");u&&(s=be(e.G.xa,[u])),o=Zr.R(a,"range",Zr.Hc,o)}if(!o)throw ne.error("SegmentBase does not contain sufficient segment information:","the SegmentBase does not contain @indexRange","or a RepresentationIndex element.",e.G),new re(2,4,4002);return{createSegmentIndex:(i=Ei(e,t,r,s,o.start,o.end,i,n)).createSegmentIndex,findSegmentPosition:i.findSegmentPosition,getSegmentReference:i.getSegmentReference,initSegmentReference:r,sa:n}}(e,f);else if(e.G.Ua)h=ki(e,this.A);else if(e.G.gc)h=Mi(e,f,this.A,!!this.i);else{var d,p=e.G.xa,g=e.$.duration||0;h={createSegmentIndex:Pw(d=Zy.resolve).call(d,Zy),findSegmentPosition:function(e){return 0<=e&&e<g?1:null},getSegmentReference:function(e){return 1!=e?null:new fi(1,0,g,(function(){return p}),0,null)},initSegmentReference:null,sa:0}}}catch(v){if(c&&4002==v.code)return null;throw v}return u=function(e,t,n,r){var i,a=ti(e,t,r);if(n.ge)e=1==n.drmInfos.length&&!n.drmInfos[0].keySystem,t=0==a.drmInfos.length,(0==n.drmInfos.length||e&&!t)&&(n.drmInfos=a.drmInfos),n.ge=!1;else if(0<a.drmInfos.length&&(n.drmInfos=Hb(i=n.drmInfos).call(i,(function(e){var t;return hS(t=a.drmInfos).call(t,(function(t){return t.keySystem==e.keySystem}))})),0==n.drmInfos.length))throw new re(2,4,4008);return a.be||n.be}(u=Zr.Y(u,"ContentProtection"),this.g.dash.customScheme,t,this.g.dash.ignoreDrmInfo),{id:this.m++,originalId:e.G.id,createSegmentIndex:h.createSegmentIndex,findSegmentPosition:h.findSegmentPosition,getSegmentReference:h.getSegmentReference,initSegmentReference:h.initSegmentReference,presentationTimeOffset:h.sa,mimeType:e.G.mimeType,codecs:e.G.codecs,frameRate:e.G.frameRate,pixelAspectRatio:e.G.pixelAspectRatio,bandwidth:e.bandwidth,width:e.G.width,height:e.G.height,kind:n,encrypted:0<t.drmInfos.length,keyId:u,language:r,label:i,type:e.fa.contentType,primary:a,trickModeVideo:null,emsgSchemeIdUris:e.G.emsgSchemeIdUris,roles:o,channelsCount:e.G.wd,audioSamplingRate:e.G.audioSamplingRate,closedCaptions:s}},f.kg=function(e,t,n){var r,i,a=Zr.Mb,o=n.getAttribute("schemeIdUri")||"",s=n.getAttribute("value")||"",u=Zr.R(n,"timescale",a)||1;Gf(r=Zr.Y(n,"Event")).call(r,Pw(i=function(n){var r=Zr.R(n,"presentationTime",a)||0,i=Zr.R(n,"duration",a)||0;i=(r=r/u+e)+i/u,null!=t&&(r=Math.min(r,e+t),i=Math.min(i,e+t)),n={schemeIdUri:o,value:s,startTime:r,endTime:i,id:n.getAttribute("id")||"",eventElement:n},this.h.onTimelineRegionAdded(n)}).call(i,this))},f.ug=function(e,t,n){return e=Pi(e,t,n,this.g.retryParameters),e=this.h.networkingEngine.request(1,e),Ze(this.l,e),e.promise.then((function(e){return e.data}))},Ci.Fd("mpd",Ni),Ci.Qb("application/dash+xml",Ni),Ci.Qb("video/vnd.mpeg.dash.mpd",Ni),Hi.prototype.toString=function(){var e,t="#"+this.name,n=this.g?Mb(e=this.g).call(e,(function(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)})):[];return this.value&&n.unshift(this.value),0<n.length&&(t+=":"+n.join(",")),t},Hi.prototype.getAttribute=function(e){var t,n=Hb(t=this.g).call(t,(function(t){return t.name==e}));return n.length?n[0]:null};var Gi={Ab:function(e,t){return Hb(e).call(e,(function(e){return e.name==t}))},cb:function(e,t){var n=Gi.Ab(e,t);return n.length?n[0]:null},Zc:function(e,t,n){return Hb(e).call(e,(function(e){var r=e.getAttribute("TYPE");return e=e.getAttribute("GROUP-ID"),r.value==t&&e.value==n}))},Sc:function(e,t){return be([e],[t])[0]},kd:function(e){return/^#(?!EXT)/m.test(e)}};function Wi(e){this.h=e,this.g=0}function Xi(e){Yi(e,/[ \t]+/gm)}function Yi(e,t){t.lastIndex=e.g;var n=t.exec(e.h);return n=null==n?null:{position:n.index,length:n[0].length,wg:n},e.g==e.h.length||null==n||n.position!=e.g?null:(e.g+=n.length,n.wg)}function $i(e){return e.g==e.h.length?null:(e=Yi(e,/[^ \t\n]*/gm))?e[0]:null}function Ji(){this.g=0}function Qi(e,t,n){var r;t=xe(t);var i=(t=xT(r=t.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")).call(r)).split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(i[0]))throw new re(2,4,4015);t=0;for(var a=1;a<i.length;a++)if(!Gi.kd(i[a])){var o=ea(e,i[a]);if(--e.g,SM(ta).call(ta,o.name)){t=1;break}"EXT-X-STREAM-INF"==o.name&&(a+=1)}for(a=[],o=1;o<i.length;)if(Gi.kd(i[o]))o+=1;else{var s=ea(e,i[o]);if(SM(na).call(na,s.name)){if(1!=t)throw new re(2,4,4017);return new Bi(n,t,a,e=Zi(e,n,i=Wd(i).call(i,o,i.length-o),a))}a.push(s),o+=1,"EXT-X-STREAM-INF"==s.name&&(s.g.push(new Vi("URI",i[o])),o+=1)}return new Bi(n,t,a)}function Zi(e,t,n,r){var i=[],a=[];return Gf(n).call(n,(function(n){if(/^(#EXT)/.test(n))n=ea(e,n),SM(ta).call(ta,n.name)?r.push(n):a.push(n);else{if(Gi.kd(n))return[];n=Gi.Sc(t,xT(n).call(n)),i.push(new qi(n,a)),a=[]}})),i}function ea(e,t){var n=e.g++,r=t.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!r)throw new re(2,4,4016,t);var i,a=r[1],o=r[2];if(r=[],o){var s;(s=Yi(o=new Wi(o),/^([^,=]+)(?:,|$)/g))&&(i=s[1]);for(var u=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;s=Yi(o,u);)r.push(new Vi(s[1],s[2]||s[3]))}return new Hi(n,a,r,i)}var ta="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-MAP EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST".split(" "),na="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE".split(" ");function ra(e){try{var t=ra.parse(e);return He({uri:e,Bd:e,data:t.data,headers:{"content-type":t.contentType}})}catch(n){return Ke(n)}}function ia(){var e=this;this.g=this.j=null,this.ea=1,this.L=new AP,this.Z=new $O,this.h=new AP,this.i=null,this.F="",this.C=new Ji,this.X=0,this.m=new Le((function(){!function(e){T((function t(){var n,r;return z(t,(function(t){switch(t.s){case 1:return ne.info("Updating manifest..."),e.j?(O(t,2),N(t,e.update(),4)):t.return();case 4:n=e.X,e.m.V(n),L(t,0);break;case 2:if(r=D(t),!e.j)return t.return();r.severity=1,e.j.onError(r),e.m.V(.1),j(t)}}))}))}(e)})),this.l=xa,this.A=null,this.J=0,this.M=1/0,this.o=new Qe,this.P=[],this.u=new AP,this.da=!1}function aa(e,t){return T((function n(){var r,i,a,o,s,u,c,l,f,h;return z(n,(function(n){switch(n.s){case 1:return r=Gi,i=ka,a=t.We,N(n,Ta(e,rt([a],e.g.retryParameters),0),2);case 2:if(o=n.B,1!=(s=Qi(e.C,o.data,o.uri)).type)throw new re(2,4,4017);return c=(u=r.cb(s.g,"EXT-X-MEDIA-SEQUENCE"))?Number(u.value):0,l=t.stream,N(n,da(e,t.Pc,s,c,l.mimeType,l.codecs),3);case 3:f=n.B,t.fc.g=f,h=f[f.length-1],r.cb(s.g,"EXT-X-ENDLIST")&&(Sa(e,i.$a),e.i.Fa(h.endTime)),j(n)}}))}))}function oa(e){Gf(e).call(e,(function(e){if(e){var t=e.stream.codecs.split(",");t=Hb(t).call(t,(function(e){return"mp4a.40.34"!=e})),e.stream.codecs=t.join(",")}}))}function sa(e,t,n,r,i){return{id:e.ea++,language:t?t.language:"und",primary:!!t&&t.primary||!!n&&n.primary,audio:t,video:n,bandwidth:r,drmInfos:i,allowedByApplication:!0,allowedByKeySystem:!0}}function ua(e,t,n){return T((function r(){var i,a,o,s,u,c,l,f,h,d,p;return z(r,(function(r){switch(r.s){case 1:if(i=va(t,"URI"),e.h.has(i))return r.return(e.h.get(i));if(a=va(t,"TYPE").toLowerCase(),o=Se,"subtitles"==a&&(a=o.za),s=zn(zi(t,"LANGUAGE","und")),u=zi(t,"NAME"),c=t.getAttribute("DEFAULT"),l="YES"==c,f=zi(t,"CHANNELS"),"audio"==a)if(f){var g=f.split("/")[0];g=Sb(g,10)}else g=null;else g=null;return h=g,d=zi(t,"CHARACTERISTICS"),N(r,ca(e,i,n,a,s,l,u,h,null,d),2);case 2:return p=r.B,e.h.has(i)?r.return(e.h.get(i)):null==p?r.return(null):(e.L.set(t.id,p),e.h.set(i,p),r.return(p))}}))}))}function ca(e,t,n,r,i,a,o,s,u,c){return T((function l(){var f,h,d,p,g,v,m,y,b,S,E,x,k,A,M,I,C,R,P,j,_,U,F,K,B,H,V,q;return z(l,(function(l){var G,W,X,Y;switch(l.s){case 1:return h=(f=Gi).Sc(e.F,t),N(l,Ta(e,rt([h],e.g.retryParameters),0),2);case 2:if(d=l.B,h=d.uri,1!=(p=Qi(e.C,d.data,h)).type)throw new re(2,4,4017);g=[],Gf(G=p.segments).call(G,(function(e){e=f.Ab(e.h,"EXT-X-KEY"),g.push.apply(g,e)})),v=!1,m=[],y=null;for(var $=w(g),J=$.next();!J.done;J=$.next())if(b=J.value,"NONE"!=(S=va(b,"METHOD"))){if(v=!0,"AES-128"==S)return ne.v("Unsupported HLS Encryption",S),e.da=!0,l.return(null);E=va(b,"KEYFORMAT"),(k=(x=Ea[E])?x(b):null)?(k.keyIds.length&&(y=k.keyIds[0]),m.push(k)):ne.v("Unsupported HLS KEYFORMAT",E)}if(v&&!m.length)throw new re(2,4,4026);return function(e,t){var n=ka,r=Gi.cb(t.g,"EXT-X-PLAYLIST-TYPE"),i=Gi.cb(t.g,"EXT-X-ENDLIST");i=r&&"VOD"==r.value||i,r=r&&"EVENT"==r.value&&!i,r=!i&&!r,i?Sa(e,n.$a):(Sa(e,r?n.Wd:n.Se),n=ma(t.g,"EXT-X-TARGETDURATION"),n=Number(n.value),e.J=Math.max(n,e.J),e.M=Math.min(n,e.M))}(e,p),A=function(e,t){if(1==t.length)return t[0];var n=ga(e,t);if(null!=n)return n;throw new re(2,4,4025,t)}(r,n),N(l,function(e,t,n,r){return T((function i(){var a,o,s,u,c,l,f,h,d,p;return z(i,(function(i){switch(i.s){case 1:return a=Se,o=r.segments[0].g,s=new ae(o),u=s.pa.split(".").pop(),c=wa[t],(l=c[u])?i.return(l):t==a.za?n&&"vtt"!=n&&"wvtt"!=n?i.return("application/mp4"):i.return("text/vtt"):((f=rt([o],e.g.retryParameters)).method="HEAD",N(i,Ta(e,f,1),2));case 2:return h=i.B,(d=h.headers["content-type"])?i.return(d.split(";")[0]):(p=c.mp4,i.return(p))}}))}))}(e,r,A,p),3);case 3:return M=l.B,SM(ba).call(ba,M)&&(A=""),C=(I=f.cb(p.g,"EXT-X-MEDIA-SEQUENCE"))?Number(I.value):0,O(l,4),N(l,da(e,t,p,C,M,A),6);case 6:R=l.B,L(l,5);break;case 4:if(4035==(P=D(l)).code)return ne.ba("Skipping unsupported HLS stream",M,t),l.return(null);throw P;case 5:if(j=R[0].startTime,_=R[R.length-1].endTime,U=_-j,F=new di(R),K=la(p),B=void 0,"text"==r&&(B="subtitle"),H=[],c)for(J=($=w(c.split(","))).next();!J.done;J=$.next())V=J.value,H.push(V);return q={id:e.ea++,originalId:o,createSegmentIndex:Pw(W=Zy.resolve).call(W,Zy),findSegmentPosition:Pw(X=Jh(F)).call(X,F),getSegmentReference:Pw(Y=F.get).call(Y,F),initSegmentReference:K,presentationTimeOffset:0,mimeType:M,codecs:A,kind:B,encrypted:v,keyId:y,language:i,label:o,type:r,primary:a,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:H,channelsCount:s,audioSamplingRate:null,closedCaptions:u},l.return({stream:q,fc:F,drmInfos:m,Pc:t,We:h,td:j,Yg:_,duration:U})}}))}))}function la(e){var t=Gi.Ab(e.g,"EXT-X-MAP");if(!t.length)return null;if(1<t.length)throw new re(2,4,4020);var n=va(t=t[0],"URI"),r=Gi.Sc(e.h,n);return e=0,n=null,(t=zi(t,"BYTERANGE"))&&(e=t.split("@"),t=Number(e[0]),n=(e=Number(e[1]))+t-1),new li((function(){return[r]}),e,n)}function fa(e,t,n,r){var i=t.h,a=t.g;t=ma(i,"EXTINF").value.split(","),t=r+Number(t[0]);var o=0,s=null;return(i=Gi.cb(i,"EXT-X-BYTERANGE"))&&(o=i.value.split("@"),i=Number(o[0]),s=(o=o[1]?Number(o[1]):e.g+1)+i-1),new fi(n,r,t,(function(){return[a]}),o,s)}function ha(e){var t;e.i&&(Gf(t=e.P).call(t,(function(t){e.i.Jb(t,0)})),e.P=[])}function da(e,t,n,r,i,a){return T((function o(){var s,u,c,l,f,h,d,p,g,v;return z(o,(function(o){switch(o.s){case 1:return s=n.segments,u=[],c=s[0].g,l=fa(null,s[0],r,0),f=la(n),N(o,function(e,t,n,r,i,a){return T((function o(){var s,u,c,l,f,h,d,p,g;return z(o,(function(o){switch(o.s){case 1:if(e.A){if(s=e.h.get(t),u=s.fc,c=u.get(r.position))return ne.K("Found segment start time in previous manifest"),o.return(c.startTime);ne.debug("Unable to find segment start time in previous manifest!")}if(ne.K("Fetching segment to find start time"),i=i.toLowerCase(),SM(ba).call(ba,i))throw ne.ba("Raw formats are not yet supported. Skipping "+i),new re(1,4,4035);if("video/webm"==i)throw ne.ba("WebM in HLS is not yet supported. Skipping."),new re(1,4,4035);if("video/mp4"!=i&&"audio/mp4"!=i){o.I(2);break}return l=[pa(e,r)],n&&l.push(pa(e,n)),N(o,Zy.all(l),3);case 3:return f=o.B,h=f[0],d=f[1]||f[0],o.return(function(e,t,n,r){var i=0;if((new qr).box("moov",Gr).box("trak",Gr).box("mdia",Gr).ma("mdhd",(function(e){e.reader.U(0==e.version?8:16),i=e.reader.N(),e.parser.stop()})).parse(r,!0),!i)throw ne.error("Unable to find timescale in init segment!"),new re(2,4,4030,e,t);var a=0,o=!1;if((new qr).box("moof",Gr).box("traf",Gr).ma("tfdt",(function(e){a=(0==e.version?e.reader.N():e.reader.Pb())/i,o=!0,e.parser.stop()})).parse(n,!0),!o)throw new re(2,4,4030,e,t);return a}(t,h.uri,h.data,d.data));case 2:if("video/mp2t"!=i){o.I(4);break}return N(o,pa(e,r),5);case 5:return p=o.B,o.return(function(e,t,n){function r(){a.seek(o+188),71!=(s=a.ra())&&(a.seek(o+192),s=a.ra()),71!=s&&(a.seek(o+204),s=a.ra()),71!=s&&i(),a.Fe(1)}function i(){throw new re(2,4,4030,e,t)}for(var a=new Hr(new DataView(n),0),o=0,s=0;;)if(o=a.ka(),71!=(s=a.ra())&&i(),8191==(8191&(n=a.dc())))r();else if(16384&n){if(0!=(n=(48&a.ra())>>4)&&2!=n||i(),3==n&&(n=a.ra(),a.U(n)),1==a.N()>>8)return a.U(3),0!=(n=a.ra()>>6)&&1!=n||i(),0==a.ra()&&i(),(1073741824*((14&(n=a.ra()))>>1)+((65534&a.dc())<<14|(65534&a.dc())>>1))/9e4;r()}else r()}(t,p.uri,p.data));case 4:if("application/mp4"!=i&&!oM(i).call(i,"text/")){o.I(6);break}return N(o,pa(e,r),7);case 7:return g=o.B,o.return(function(e,t,n){return kn(e=mt(e,t))?(An(t=new En(null),e),t.xc(n)):0}(i,a,g.data));case 6:throw new re(2,4,4030,t)}}))}))}(e,t,f,l,i,a),2);case 2:h=o.B,ne.debug("First segment",c.split("/").pop(),"starts at",h);for(var m=0;m<s.length;++m)d=s[m],p=u[u.length-1],g=0==m?h:p.endTime,v=fa(p,d,r+m,g),u.push(v);return e.P.push(u),ha(e),o.return(u)}}))}))}function pa(e,t){return T((function n(){var r,i,a,o,s,u;return z(n,(function(n){switch(n.s){case 1:return r=1,i=Pi(t.i(),t.h,t.h+2048-1,e.g.retryParameters),a=Pi(t.i(),t.h,t.g,e.g.retryParameters),e.g.hls.useFullSegmentsForStartTime?n.return(Ta(e,a,r)):(O(n,2),N(n,Ta(e,i,r),4));case 4:return o=n.B,n.return(o);case 2:if(7001==(s=D(n)).code)throw s;return ne.ba("Unable to fetch a partial HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",i.uris[0]),N(n,Ta(e,a,r),5);case 5:return u=n.B,n.return(u)}}))}))}function ga(e,t){for(var n=ya[e],r=0;r<n.length;r++)for(var i=0;i<t.length;i++){var a,o;if(n[r].test(xT(a=t[i]).call(a)))return xT(o=t[i]).call(o)}return"text"==e?"":null}function va(e,t){var n=e.getAttribute(t);if(!n)throw new re(2,4,4023,t);return n.value}function ma(e,t){var n=Gi.cb(e,t);if(!n)throw new re(2,4,4024,t);return n}$("shaka.net.DataUriPlugin",ra),ra.parse=function(t){var n=t.split(":");if(2>n.length||"data"!=n[0])throw ne.error("Bad data URI, failed to parse scheme"),new re(2,1,1004,t);if(2>(n=xd(n).call(n,1).join(":").split(",")).length)throw ne.error("Bad data URI, failed to extract encoding and MIME type"),new re(2,1,1004,t);var r=n[0];t=e.decodeURIComponent(xd(n).call(n,1).join(",")),n=r.split(";"),r=n[0];var i=!1;return 1<n.length&&"base64"==n[n.length-1]&&(i=!0,n.pop()),{data:i?Pe.Ja(t).buffer:Me(t),contentType:r}},nt("data",ra),$("shaka.hls.HlsParser",ia),(f=ia.prototype).configure=function(e){this.g=e},f.start=function(e,t){var n=this;return T((function r(){var i,a;return z(r,(function(r){switch(r.s){case 1:return n.j=t,N(r,Ta(n,rt([e],n.g.retryParameters),0),2);case 2:return i=r.B,n.F=i.uri,N(r,function(e,t){return T((function n(){var r,i,a,o,s,u,c,l,f,h,d;return z(n,(function(n){switch(n.s){case 1:if(0!=(r=Qi(e.C,t,e.F)).type)throw new re(2,4,4022);return N(n,function(e,t){return T((function n(){var r,i,a,o,s,u,c,l,f,h,d,p;return z(n,(function(n){var g,v,m;switch(n.s){case 1:return r=Gi,i=ye,a=t.g,o=r.Ab(t.g,"EXT-X-MEDIA"),s=Hb(o).call(o,Pw(g=function(e){return"SUBTITLES"==va(e,"TYPE")}).call(g,e)),u=Mb(s).call(s,Pw(v=function(e){var t=this;return T((function n(){var r;return z(n,(function(n){switch(n.s){case 1:return t.g.disableText?n.return(null):(O(n,2),N(n,function(e,t){return T((function n(){var r;return z(n,(function(n){switch(n.s){case 1:return va(t,"TYPE"),N(n,ua(e,t,[]),2);case 2:return r=n.B,n.return(r.stream)}}))}))}(t,e),4));case 4:return n.return(n.B);case 2:if(r=D(n),t.g.hls.ignoreTextStreamFailures)return n.return(null);throw r}}))}))}).call(v,e)),c=Hb(o).call(o,(function(e){return"CLOSED-CAPTIONS"==va(e,"TYPE")})),function(e,t){for(var n=w(t),r=n.next();!r.done;r=n.next()){va(r=r.value,"TYPE");var i=zi(r,"LANGUAGE")||"und";i=zn(i);var a=va(r,"GROUP-ID");r=va(r,"INSTREAM-ID"),e.u.get(a)||e.u.set(a,new AP),e.u.get(a).set(r,i)}}(e,c),N(n,Zy.all(u),2);case 2:return l=n.B,f=r.Ab(a,"EXT-X-STREAM-INF"),h=Mb(f).call(f,Pw(m=function(e){return function(e,t,n){return T((function r(){var i,a,o,s,u,c,l,f,h,d,p,g,v,m,y,b,S,E,x,k,A,M,I,C,R,P,j,O,_;return z(r,(function(r){var L;switch(r.s){case 1:return i=Se,a=Gi,o=[],e.g.disableVideo||o.push("avc1.42E01E"),e.g.disableAudio||o.push("mp4a.40.2"),s=o.join(","),u=zi(t,"CODECS",s),c=function(e){for(var t=new $O,n=[],r=(e=w(e)).next();!r.done;r=e.next()){var i=bt(r=r.value)[0];t.has(i)?ne.debug("Ignoring duplicate codec"):(n.push(r),t.add(i))}return n}(u.split(/\s*,\s*/)),l=t.getAttribute("RESOLUTION"),h=f=null,d=zi(t,"FRAME-RATE"),p=Number(zi(t,"AVERAGE-BANDWIDTH"))||Number(va(t,"BANDWIDTH")),l&&(g=l.value.split("x"),f=g[0],h=g[1]),v=a.Ab(n.g,"EXT-X-MEDIA"),v=Hb(v).call(v,(function(e){return"CLOSED-CAPTIONS"!=va(e,"TYPE")})),v=Hb(v).call(v,(function(e){var t=zi(e,"URI")||"";return"SUBTITLES"==(zi(e,"TYPE")||"")||""!=t})),m=zi(t,"AUDIO"),y=zi(t,"VIDEO"),m?v=a.Zc(v,"AUDIO",m):y&&(v=a.Zc(v,"VIDEO",y)),(b=ga(i.za,c))&&((S=zi(t,"SUBTITLES"))&&(E=a.Zc(v,"SUBTITLES",S)).length&&(x=e.L.get(E[0].id))&&(x.stream.codecs=b),$e(c,b)),k=Mb(v).call(v,Pw(L=function(e){return ua(this,e,c)}).call(L,e)),A=[],M=[],N(r,Zy.all(k),2);case 2:if(C=r.B,C=Hb(C).call(C,(function(e){return null!=e})),m?A=C:y&&(M=C),ne.debug("Guessing stream type for",t.toString()),P=!1,A.length||M.length?A.length?(O=va(t,"URI"),_=A[0].Pc,O==_?(ne.debug("Guessing audio-only."),R=i.Sb,P=!0):(ne.debug("Guessing video."),R=i.Za)):(ne.debug("Guessing audio."),R=i.Sb):1==c.length?(j=ga(i.Za,c),l||d||j?(ne.debug("Guessing video-only."),R=i.Za):(ne.debug("Guessing audio-only."),R=i.Sb)):(ne.debug("Guessing multiplexed audio+video."),R=i.Za,c=[c.join(",")]),P){r.I(3);break}return N(r,function(e,t,n,r){return T((function i(){var a,o,s,u,c;return z(i,(function(i){switch(i.s){case 1:return a=Se,o=va(t,"URI"),e.h.has(o)?i.return(e.h.get(o)):(s=zi(t,"CLOSED-CAPTIONS"),u=null,r==a.Za&&s&&"NONE"!=s&&(u=e.u.get(s)),N(i,ca(e,o,n,r,"und",!1,null,null,u,null),2));case 2:return null==(c=i.B)?i.return(null):e.h.has(o)?i.return(e.h.get(o)):(e.h.set(o,c),i.return(c))}}))}))}(e,t,c,R),4);case 4:I=r.B;case 3:if(I)I.stream.type==i.Sb?A=[I]:M=[I];else if(null===I)return ne.debug("streamInfo is null"),r.return([]);return M&&oa(M),A&&oa(A),r.return(function(e,t,n,r,i,a,o){var s;Gf(n).call(n,Pw(s=function(e){(e=e.stream)&&(e.width=Number(i)||void 0,e.height=Number(a)||void 0,e.frameRate=Number(o)||void 0)}).call(s,e));var u=!!e.g&&e.g.disableAudio;t.length&&!u||(t=[null]),u=!!e.g&&e.g.disableVideo,(!n.length||u)&&(n=[null]),u=[];for(var c=(t=w(t)).next();!c.done;c=t.next()){c=c.value;for(var l=w(n),f=l.next();!f.done;f=l.next()){var h=f.value;f=c?c.stream:null;var d=h?h.stream:null,p=c?c.drmInfos:null,g=h?h.drmInfos:null;h=(h?h.Pc:"")+" - "+(c?c.Pc:"");var v=void 0;if(f&&d){if(p.length&&g.length&&!(0<Gt(p,g).length)){ne.v("Incompatible DRM info in HLS variant. Skipping.");continue}v=Gt(p,g)}else f?v=p:d&&(v=g);e.Z.has(h)?ne.debug("Skipping variant which only differs in text streams."):(f=sa(e,f,d,r,v),u.push(f),e.Z.add(h))}}return u}(e,A,M,p,f,h,d))}}))}))}(this,e,t)}).call(m,e)),N(n,Zy.all(h),3);case 3:return d=n.B,p=uN(d).call(d,i.Rc,[]),p=Hb(p).call(p,(function(e){return null!=e})),n.return({startTime:0,variants:p,textStreams:Hb(l).call(l,(function(e){return null!=e}))})}}))}))}(e,r),2);case 2:if(i=n.B,!e.j)throw new re(2,7,7001);if(e.da&&0==i.variants.length)throw ne.info("No stream is created, because we don't support AES-128","encryption yet"),new re(2,4,4034);e.j.filterAllPeriods([i]),a=1/0,o=0,s=1/0;for(var p=w(OP(v=e.h).call(v)),g=p.next();!g.done;g=p.next()){var v;u=g.value,a=Math.min(a,u.td),o=Math.max(o,u.td),"text"!=u.stream.type&&(s=Math.min(s,u.duration))}if(e.l!=ka.$a?(e.i=new Ri(0,3*e.J),e.i.hc(!1)):(e.i=new Ri(null,0),e.i.hc(!0)),ha(e),e.l!=ka.$a){for(e.X=e.M,c=ka,e.l==c.Wd&&(l=e.i.Ic,isNaN(e.g.availabilityWindowOverride)||(l=e.g.availabilityWindowOverride),e.i.Pd(l)),f=0;95443.7176888889<=o;)f+=95443.7176888889,o-=95443.7176888889;if(f)for(ne.debug("Offsetting live streams by",f,"to compensate for rollover"),g=(p=w(OP(m=e.h).call(m))).next();!g.done;g=p.next()){var m;95443.7176888889>(h=g.value).td?(ne.K("Offset applied to",h.stream.type),h.stream.presentationTimeOffset=-f,h.fc.offset(f)):ne.K("Offset NOT applied to",h.stream.type)}}else for(e.i.Fa(s),e.i.offset(-a),g=(p=w(OP(y=e.h).call(y))).next();!g.done;g=p.next()){var y;(d=g.value).stream.presentationTimeOffset=a,d.fc.offset(-a),pi(d.fc,s)}e.A={presentationTimeline:e.i,periods:[i],offlineSessionIds:[],minBufferTime:0},j(n)}}))}))}(n,i.data),3);case 3:return 0<(a=n.X)&&n.m.V(a),r.return(n.A)}}))}))},f.stop=function(){this.m&&(this.m.stop(),this.m=null);var e=[];return this.o&&(e.push(this.o.destroy()),this.o=null),this.g=this.j=null,this.L.clear(),this.Z.clear(),this.h.clear(),this.A=null,Zy.all(e)},f.update=function(){if(this.l!=ka.$a){for(var e=[],t=w(OP(r=this.h).call(r)),n=t.next();!n.done;n=t.next()){var r;e.push(aa(this,n.value))}return Zy.all(e)}},f.onExpirationUpdated=function(){};var ya={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]},ba=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],wa={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"}};function Sa(e,t){e.l=t,e.i&&e.i.hc(e.l==ka.$a),e.l!=ka.$a||e.m.stop()}function Ta(e,t,n){if(!e.o)throw new re(2,7,7001);return t=e.j.networkingEngine.request(n,t),Ze(e.o,t),t.promise}var Ea={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(e){var t=va(e,"METHOD");Qn("HLS SAMPLE-AES-CENC","SAMPLE-AES-CENC will no longer be supported, see Issue #1227");var n=["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"];return SM(n).call(n,t)?(t=va(e,"URI"),t=ra.parse(t),t=we("com.widevine.alpha",[{initDataType:"cenc",initData:t=new Uint8Array(t.data)}]),(e=zi(e,"KEYID"))&&(t.keyIds=[e.toLowerCase().substr(2)]),t):(ne.error("Widevine in HLS is only supported with [",n.join(", "),"], not",t),null)}},xa="VOD",ka={$a:xa,Se:"EVENT",Wd:"LIVE"};function Aa(){this.g=new AP}function Ma(e,t,n){Ia(e,t).text=n}function Ia(e,t){return e.g.has(t)||e.g.set(t,new Ca),e.g.get(t)}function Ca(){this.text=this.variant=null}function Ra(e,t){this.g=e,this.h=new $O([e]);for(var n=w(t=t||[]),r=n.next();!r.done;r=n.next())this.add(r.value)}function Pa(e,t){var n;if(!(n=!!e.audio!=!!t.audio||!!e.video!=!!t.video||e.language!=t.language)&&(n=e.audio&&t.audio)){n=e.audio;var r=t.audio;n=!(n.channelsCount==r.channelsCount&&Na(n,r)&&ja(n.roles,r.roles))}return!n&&(n=e.video&&t.video)&&(n=!(Na(n=e.video,r=t.video)&&ja(n.roles,r.roles))),!n}function Na(e,t){var n,r;if(e.mimeType!=t.mimeType)return!1;var i=Mb(n=e.codecs.split(",")).call(n,(function(e){return bt(e)[0]})),a=Mb(r=t.codecs.split(",")).call(r,(function(e){return bt(e)[0]}));if(i.length!=a.length)return!1;Nh(i).call(i),Nh(a).call(a);for(var o=0;o<i.length;o++)if(i[o]!=a[o])return!1;return!0}function ja(e,t){var n=new $O(e),r=new $O(t);if(n.delete("main"),r.delete("main"),n.size!=r.size)return!1;for(var i=(n=w(n)).next();!i.done;i=n.next())if(!r.has(i.value))return!1;return!0}function Oa(e){this.g=e,this.h=new _a(e.language,"",e.audio&&e.audio.channelsCount?e.audio.channelsCount:0,"")}function _a(e,t,n,r){this.i=e,this.j=t,this.g=n,this.h=void 0===r?"":r}function La(){this.g=Fa,this.h=(new AP).set(Fa,2).set(Ua,1)}function Da(e,t,n){e.h.set(Fa,n).set(Ua,t)}Ci.Fd("m3u8",ia),Ci.Qb("application/x-mpegurl",ia),Ci.Qb("application/vnd.apple.mpegurl",ia),Ra.prototype.add=function(e){return Pa(this.g,e)?(this.h.add(e),!0):(ne.v("Rejecting variant - not compatible with root."),!1)},Ra.prototype.values=function(){var e;return OP(e=this.h).call(e)},Oa.prototype.create=function(e){var t=this,n=Hb(e).call(e,(function(e){return Pa(t.g,e)}));return n.length?new Ra(n[0],n):this.h.create(e)},_a.prototype.create=function(e){var t=[];t=function(e,t){var n=zn(t),r=Gn(n,Mb(e).call(e,(function(e){return qn(e)})));return r?Hb(e).call(e,(function(e){return r==qn(e)})):[]}(e,this.i);var n=Hb(e).call(e,(function(e){return e.primary}));for((e=function(e,t){return Hb(e).call(e,(function(e){var n;return!!e.audio&&(t?SM(n=e.audio.roles).call(n,t):0==e.audio.roles.length)}))}(t=t.length?t:n.length?n:e,this.j)).length?t=e:ne.v("No exact match for variant role could be found."),this.g&&((e=Xn.ee(t,this.g)).length?t=e:ne.v("No exact match for the channel count could be found.")),this.h&&(e=function(e,t){return Hb(e).call(e,(function(e){return!!e.audio&&e.audio.label.toLowerCase()==t.toLowerCase()}))}(t,this.h),e.length?t=e:ne.v("No exact match for variant label could be found.")),e=new Ra(t[0]),n=(t=w(t)).next();!n.done;n=t.next())n=n.value,Pa(e.g,n)&&e.add(n);return e};var Ua=0,Fa=1;function Ka(e,t){this.l=e,this.m=Ha(e),this.g=e.g.currentTime,this.j=CT()/1e3,this.h=!1,this.o=t,this.i=function(){}}function Ba(e){this.g=e}function Ha(e){if(e.g.paused||0==e.g.playbackRate||0==e.g.buffered.length)var t=!1;else e:{t=e.g.buffered,e=e.g.currentTime;for(var n=0;n<t.length;n++){var r=t.start(n),i=t.end(n);if(!(e<r-.1||e>i-.5)){t=!0;break e}}t=!1}return t}function Va(e,t,n,r,i){var a=this;this.g=e,this.F=t,this.C=n,this.u=i,this.j=new ut,this.o=!1,this.A=e.readyState,this.i=!1,this.h=r,this.m=!1,this.j.H(e,"waiting",(function(){return za(a)})),this.l=new Le((function(){za(a)})).Oa(.25)}function za(e){if(0!=e.g.readyState){if(e.g.seeking){if(!e.o)return}else e.o=!1;if(!e.g.paused||0==e.g.currentTime){var t;if(e.g.readyState!=e.A&&(e.i=!1,e.A=e.g.readyState),!(t=!e.h)){var n=(t=e.h).l,r=Ha(n),i=n.g.currentTime,a=CT()/1e3;t.g==i&&t.m==r||(t.j=a,t.g=i,t.m=r,t.h=!1),(r=(i=a-t.j)>=t.o&&r&&!t.h)&&(t.i(t.g,i),t.h=!0,t.g=n.g.currentTime),t=!r}if(t){a=e.C.smallGapLimit,t=e.g.currentTime;e:{if((n=e.g.buffered)&&n.length&&!(1==n.length&&1e-6>n.end(0)-n.start(0)))for(r=navigator.userAgent.match(/Edge\//)||At("Trident/")||Et()||At("CrKey")?.5:.1,i=0;i<n.length;i++)if(n.start(i)>t&&(0==i||n.end(i-1)-t<=r)){r=i;break e}r=null}if(null!=r&&(0!=r||e.m)){i=n.start(r);var o=e.F.Ka();if(!(i>=o)){a=(o=i-t)<=a;var s=!1;if(!(.001>o)){if(!a&&!e.i){e.i=!0;var u=new qe("largegap",{currentTime:t,gapSize:o});u.cancelable=!0,e.u(u),e.C.jumpLargeGaps&&!u.defaultPrevented?s=!0:ne.info("Ignoring large gap at",t,"size",o)}(a||s)&&(0==r?ne.info("Jumping forward",o,"seconds because of gap before start time of",i):ne.info("Jumping forward",o,"seconds because of gap starting at",n.end(r-1),"and ending at",i),e.g.currentTime=i)}}}}}}}function qa(e){var t=this;this.i=e,this.g=new $O,this.h=new Le((function(){Ga(t,!1)})).Oa(.25)}function Ga(e,t){for(var n=w(e.g),r=n.next();!r.done;r=n.next())r.value.l(e.i.currentTime,t)}function Wa(e){for(var t=[],n=(e=w(e)).next();!n.done;n=e.next())for(var r=(n=w(n.value.variants)).next();!r.done;r=n.next())t.push(r.value);return t}function Xa(e,t){for(var n=null,r=w(e),i=r.next();!i.done;i=r.next())t>=(i=i.value).startTime&&(n=i);return n}function Ya(e){this.i=e,this.g=null,this.h=function(){}}function $a(e){var t=this;this.g=e,this.j=!1,this.i=this.g.wc(),this.h=new Le((function(){t.g.pe(.25*t.i)}))}function Ja(e){e.h.stop();var t=e.j?0:e.i;if(0<=t)try{return void(e.g.wc()!=t&&e.g.Od(t))}catch(n){}e.h.Oa(.25),0!=e.g.wc()&&e.g.Od(0)}function Qa(e,t,n,r){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>=t?r():(t=Za.get(t),n.ya(e,t,r))}Ka.prototype.release=function(){this.l=null,this.i=function(){}},Va.prototype.release=function(){this.j&&(this.j.release(),this.j=null),null!=this.l&&(this.l.stop(),this.l=null),this.h&&(this.h.release(),this.h=null),this.g=this.F=this.u=null},Va.prototype.zd=function(){this.m=!0,za(this)},qa.prototype.release=function(){this.h.stop();for(var e=w(this.g),t=e.next();!t.done;t=e.next())t.value.release();this.g.clear()},Ya.prototype.release=function(){this.g=this.i=null,this.h=function(){}},Ya.prototype.l=function(e){var t=this.g,n=this.i.periods;t!=(e=Xa(n,e)||n[0])&&this.h(e),this.g=e},$a.prototype.release=function(){this.h&&(this.h.stop(),this.h=null),this.g=null},$a.prototype.set=function(e){this.i=e,Ja(this)},$a.prototype.vc=function(){return this.g.vc()};var Za=new AP([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]]);function eo(e,t,n){var r=this;this.g=e,this.l=t,this.j=n,this.m=!1,this.h=new ut,this.i=new ao(e),Qa(this.g,HTMLMediaElement.HAVE_METADATA,this.h,(function(){ro(r,r.j)}))}function to(e){return e.m?e.g.currentTime:e.j}function no(e,t){0<e.g.readyState?oo(e.i,t):Qa(e.g,HTMLMediaElement.HAVE_METADATA,e.h,(function(){ro(e,e.j)}))}function ro(e,t){.001>Math.abs(e.g.currentTime-t)?io(e):(e.h.ya(e.g,"seeking",(function(){io(e)})),oo(e.i,0==e.g.currentTime?t:e.g.currentTime))}function io(e){e.m=!0,e.h.H(e.g,"seeking",(function(){return e.l()}))}function ao(e){var t=this;this.h=e,this.m=10,this.l=this.i=this.j=0,this.g=new Le((function(){0>=t.j?(ne.v(["Failed to move playhead from",t.i,"to",t.l].join(" ")),t.g.stop()):t.h.currentTime!=t.i?t.g.stop():(t.h.currentTime=t.l,t.j--)}))}function oo(e,t){e.i=e.h.currentTime,e.l=t,e.j=e.m,e.h.currentTime=t,e.g.Oa(.1)}function so(e){var t=this;this.g=e,this.j=!1,this.i=null,this.h=new ut,Qa(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.h,(function(){null==t.i?t.j=!0:(t.h.ya(t.g,"seeking",(function(){t.j=!0})),t.g.currentTime=Math.max(0,t.g.currentTime+t.i))}))}function uo(e,t,n,r,i,a){var o=this;this.i=e,this.g=t.presentationTimeline,this.J=t.minBufferTime||0,this.m=n,this.F=i,this.u=null,this.j=new Va(e,t.presentationTimeline,n,function(e,t){if(!t.stallEnabled)return null;var n=t.stallSkip,r=new Ka(new Ba(e),t.stallThreshold);return function(e,t){e.i=t}(r,(function(t,r){ne.debug("Stall detected at "+t+" for "+r+" seconds."),n?(ne.debug("Seeking forward "+n+" seconds to break stall."),e.currentTime+=n):(ne.debug("Pausing and unpausing to break stall."),e.pause(),e.play())})),r}(e,n),a),this.h=new eo(e,(function(){e:{var e=o.j;e.o=!0,e.m=!1,e.i=!1,e=to(o.h);var t=lo(o,e);if(.001<Math.abs(t-e)){var n=CT()/1e3;if(!o.u||o.u<n-1){o.u=n,no(o.h,t),e=void 0;break e}}ne.K("Seek to "+e),o.F(),e=void 0}return e}),function(e,t){return null==t?t=1/0>e.g.ha()?e.g.Cb():e.g.Ka():0>t&&(t=e.g.Ka()+t),co(e,fo(e,t))}(this,r)),this.o=new Le((function(){if(0!=o.i.readyState&&!o.i.paused){var e=to(o.h),t=o.g.Cb(),n=o.g.Ka();3>n-t&&(t=n-3),e<t&&(t=lo(o,e),ne.info("Jumping forward "+(t-e)+" seconds to catch up with the seek range."),o.i.currentTime=t)}})).Oa(.25)}function co(e,t){var n=e.g.ha();return t>=n?n-e.m.durationBackoff:t}function lo(e,t){var n=Pw(nn).call(nn,null,e.i.buffered),r=Math.max(e.J,e.m.rebufferingGoal),i=e.m.safeSeekOffset,a=e.g.Cb(),o=e.g.Ka(),s=e.g.ha();3>o-a&&(a=o-3);var u=e.g.Zb(r),c=e.g.Zb(i);return r=e.g.Zb(r+i),t>=s?(ne.K("Playhead past duration."),co(e,t)):t>o?(ne.K("Playhead past end."),o):t<a?n(c)?(ne.K("Playhead before start & start is buffered"),c):(ne.K("Playhead before start & start is unbuffered"),r):t>=u||n(t)?(ne.K("Playhead in safe region or in buffered region."),t):(ne.K("Playhead outside safe region & in unbuffered region."),r)}function fo(e,t){var n=e.g.Cb();return t<n||t>(n=e.g.Ka())?n:t}function ho(e){var t=this;this.h=function(){},this.g=new $O,this.j=e,this.i=new Le((function(){for(var e=t.j(),n=w(t.g),r=n.next();!r.done;r=n.next())(r=r.value).endTime<e.start&&t.g.delete(r)})).Oa(2)}function po(e){var t=this;this.m=e,this.j=new AP,this.g=function(){},this.h=function(){},this.i=function(){},this.o=[{rb:null,qb:vo,hb:function(e,n){return t.g(e,n)}},{rb:go,qb:vo,hb:function(e,n){return t.g(e,n)}},{rb:mo,qb:vo,hb:function(e,n){return t.g(e,n)}},{rb:vo,qb:go,hb:function(e,n){return t.h(e,n)}},{rb:vo,qb:mo,hb:function(e,n){return t.h(e,n)}},{rb:go,qb:mo,hb:function(e,n){return t.i(e,n)}},{rb:mo,qb:go,hb:function(e,n){return t.i(e,n)}}]}eo.prototype.release=function(){this.h&&(this.h.release(),this.h=null),null!=this.i&&(this.i.release(),this.i=null),this.l=function(){},this.g=null},ao.prototype.release=function(){this.g&&(this.g.stop(),this.g=null),this.h=null},so.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.g=null},so.prototype.A=function(e){this.i=this.j?this.i:e},so.prototype.l=function(){return(this.j?this.g.currentTime:this.i)||0},so.prototype.C=function(){},uo.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.j&&(this.j.release(),this.j=null),this.o&&(this.o.stop(),this.o=null),this.i=this.h=this.g=this.m=null,this.F=function(){}},uo.prototype.A=function(e){no(this.h,e)},uo.prototype.l=function(){var e=to(this.h);return 0<this.i.readyState&&!this.i.paused?fo(this,e):e},uo.prototype.C=function(){this.j.zd()},ho.prototype.release=function(){this.h=function(){},this.g.clear(),this.i.stop()},po.prototype.release=function(){this.m=null,this.j.clear(),this.g=function(){},this.h=function(){},this.i=function(){}},po.prototype.l=function(e,t){for(var n=w(this.m.g),r=n.next();!r.done;r=n.next()){r=r.value;var i=this.j.get(r),a=e<r.startTime?go:e>r.endTime?mo:vo;this.j.set(r,a);for(var o=w(this.o),s=o.next();!s.done;s=o.next())(s=s.value).rb==i&&s.qb==a&&s.hb(r,t)}};var go=1,vo=2,mo=3;function yo(e,t){this.g=t,this.i=e,this.l=null,this.u=1,this.F=Zy.resolve(),this.m=[],this.o=new AP,this.h=new AP,this.C=!1,this.M=null,this.L=this.j=this.A=!1,this.J=0}function bo(e){return So(e,"audio")}function wo(e){return So(e,"video")}function So(e,t){var n=e.h.get(t);return n?n.Ta||n.stream:null}function To(e,t){return T((function n(){var r,i,a,o,s,u,c,l,f;return z(n,(function(n){switch(n.s){case 1:return r=Se,N(n,Un(e.g.T,r.za),2);case 2:return e.J++,e.L=!1,i=e.J,a=e.g.T,o=new AP,s=new $O,o.set(r.za,t),s.add(t),N(n,a.init(o,!1),3);case 3:return e.j?n.return():N(n,Ro(e,s),4);case 4:if(e.j)return n.return();u=e.g.T.l.isTextVisible()||e.l.alwaysStreamText,e.J!=i||e.h.has(r.za)||e.L||!u||(c=e.g.eb(),l=Uo(e,c),f=Io(t,l,0),e.h.set(r.za,f),Ho(e,f,0)),j(n)}}))}))}function Eo(e,t){var n=e.h.get("video");if(n){var r=n.stream;if(r)if(ne.debug("setTrickPlay",t),t){var i=r.trickModeVideo;i&&!n.Ta&&(ne.debug("Engaging trick mode stream",i),ko(e,i,!1,0,!1),n.Ta=r)}else(r=n.Ta)&&(ne.debug("Restoring non-trick-mode stream",r),n.Ta=null,ko(e,r,!0,0,!1))}}function xo(e,t,n,r){var i=!1;if(t.video){var a=ko(e,t.video,n,r,!1);i=i||a}return t.audio&&(e=ko(e,t.audio,n,r,!1),i=i||e),i}function ko(e,t,n,r,i){var a,o,s,u=e.h.get(t.type);if(!u&&"text"==t.type&&e.l.ignoreTextStreamFailures)return To(e,t),!0;if(!u)return!1;var c=Fo(e,t),l=iT(a=Yw(OP(o=e.h).call(o))).call(a,(function(e){return e.oa==u.oa}));return n&&c!=u.oa&&l?(ne.debug("switch: switching to stream in another Period; clearing buffer and changing Periods"),Gf(s=e.h).call(s,(function(t){Ao(e,t)})),!0):(u.Ta&&(ne.debug("switch during trick play mode",t),t.trickModeVideo?(u.Ta=t,t=t.trickModeVideo,ne.debug("switch found trick play stream",t)):(u.Ta=null,ne.debug("switch found no special trick play stream"))),!(!(l=e.m[c])||!l.Rb||!(l=e.o.get(t.id))||!l.Rb||(u.stream!=t||i?("text"==t.type&&Pn(e.g.T,mt(t.mimeType,t.codecs)),u.stream=t,u.Ac=!0,ne.debug("switch: switching to Stream "+Go(u)),function(e,t,n){if(!t.lb)return!1;var r=e.g.eb(),i=On(e.g.T,t.type),a=jo(e,t,r,i,n);return n=a&&a.g?a.g-a.h:null,a&&!n&&(n=(a.endTime-a.xc())*t.stream.bandwidth/8),!isNaN(n)&&((a=t.stream.initSegmentReference)&&(n+=(a.g?a.g-a.h:null)||0),a=e.g.getBandwidthEstimate(),8*n/a<i-r-Math.max(e.i.minBufferTime||0,e.l.rebufferingGoal)||t.lb.h.g>n)}(e,u,c)&&(ne.info("Aborting current segment request to switch."),u.lb.abort()),n&&(u.ab?u.Qc=!0:u.Sa?(u.Wa=!0,u.oc=r,u.Qc=!0):(Vo(u),Bo(e,u,!0,r).catch((function(t){e.g&&e.g.onError(t)})))),0):(ne.debug("switch: Stream "+Go(u)+" already active"),1))))}function Ao(e,t){var n=Go(t);t.ab?ne.debug(n,"clear: already clearing the buffer"):t.Wa?ne.debug(n,"clear: already waiting"):t.Sa?(ne.debug(n,"clear: currently updating"),t.Wa=!0,t.oc=0):null==jn(e.g.T,t.type)?(ne.debug(n,"clear: nothing buffered"),null==t.Pa&&Ho(e,t,0)):(ne.debug(n,"clear: handling right now"),Vo(t),Bo(e,t,!1,0).catch((function(t){e.g&&e.g.onError(t)})))}function Mo(e,t,n,r,i){return T((function a(){var o,s,u,c,l,f,h;return z(a,(function(a){switch(a.s){case 1:return o=e.g.eb(),s=Uo(e,o),u=Se,c=new AP,l=new $O,t&&(c.set(u.Sb,t),l.add(t)),n&&(c.set(u.Za,n),l.add(n)),r&&(c.set(u.za,r),l.add(r)),f=e.g.T,h=e.l.forceTransmuxTS,N(a,f.init(c,h),2);case 2:return e.j?a.return():(function(e){var t=e.i.presentationTimeline.ha();1/0>t?e.g.T.Fa(t):e.g.T.Fa(Math.pow(2,32))}(e),N(a,Ro(e,l),3));case 3:if(e.j)return a.return();Gf(c).call(c,(function(t,n){if(!e.h.has(n)){var r=Io(t,s,i);e.h.set(n,r),Ho(e,r,0)}})),j(a)}}))}))}function Io(e,t,n){return{stream:e,type:e.type,Hb:null,La:null,Ta:null,Ac:!0,oa:t,endOfStream:!1,Sa:!1,Pa:null,Wa:!1,oc:0,Qc:!1,ab:!1,Ed:!1,ac:!1,Hd:n||0,lb:null}}function Co(e,t){var n,r,i,a=e.m[t];if(a)return ne.debug("(all) Period "+t+" is being or has been set up"),a.promise;ne.debug("(all) setting up Period "+t),a={promise:new Ee,Rb:!1},e.m[t]=a;for(var o=new $O,s=w(e.i.periods[t].variants),u=s.next();!u.done;u=s.next())(u=u.value).video&&o.add(u.video),u.video&&u.video.trickModeVideo&&o.add(u.video.trickModeVideo),u.audio&&o.add(u.audio);for(u=(s=w(e.i.periods[t].textStreams)).next();!u.done;u=s.next())o.add(u.value);return e.F=e.F.then(Pw(n=function(){if(!this.j)return Ro(this,o)}).call(n,e)).then(Pw(r=function(){this.j||(this.m[t].promise.resolve(),this.m[t].Rb=!0,ne.K("(all) setup Period "+t))}).call(r,e)).catch(Pw(i=function(e){this.j||(this.m[t].promise.catch((function(){})),this.m[t].promise.reject(),delete this.m[t],ne.v("(all) failed to setup Period "+t),this.g.onError(e))}).call(i,e)),a.promise}function Ro(e,t){return T((function n(){var r,i,a,o,s,u,c;return z(n,(function(n){switch(n.s){case 1:r=[];for(var l=w(t),f=l.next();!f.done;f=l.next())i=f.value,(a=e.o.get(i.id))?(ne.debug("(all) Stream "+i.id+" is being or has been set up"),r.push(a.promise)):(ne.K("(all) setting up Stream "+i.id),e.o.set(i.id,{promise:new Ee,Rb:!1}),r.push(i.createSegmentIndex()));return O(n,2),N(n,Zy.all(r),4);case 4:if(e.j)return n.return();L(n,3);break;case 2:if(o=D(n),e.j)return n.return();for(f=(n=w(t)).next();!f.done;f=n.next())s=f.value,e.o.get(s.id).promise.catch((function(){})),e.o.get(s.id).promise.reject(),e.o.delete(s.id);throw o;case 3:for(f=(l=w(t)).next();!f.done;f=l.next())u=f.value,(c=e.o.get(u.id)).Rb||(c.promise.resolve(),c.Rb=!0,ne.K("(all) setup Stream "+u.id));j(n)}}))}))}function Po(e,t){if(!e.j){var n=Go(t);if(!t.Sa&&null!=t.Pa&&!t.ab)if(t.Pa=null,t.Wa)ne.debug(n,"skipping update and clearing the buffer"),Bo(e,t,t.Qc,t.oc);else{var r,i;try{var a=function(e,t){var n,r;if(Lo(t))return Dn(e.g.T,t.stream.originalId||""),null;var i=Go(t),a=e.g.eb(),o=No(e,t,a);ne.O(i,"timeNeeded="+o);var s=Fo(e,t.stream),u=Uo(e,o),c=function(e,t,n){return"text"==t?null==(e=e.g).h||e.h<n?0:e.h-Math.max(n,e.g):rn(e=_n(e,t),n)}(e.g.T,t.type,a);ne.O(i,"update_:","presentationTime="+a,"bufferedAhead="+c);var l=Math.max(e.i.minBufferTime||0,e.l.rebufferingGoal,e.l.bufferingGoal)*e.u;if(o>=e.i.presentationTimeline.ha())return ne.debug(i,"buffered to end of presentation"),t.endOfStream=!0,"video"==t.type&&(o=e.h.get("text"))&&"application/cea-608"==o.stream.mimeType&&(o.endOfStream=!0),null;if(t.endOfStream=!1,t.oa=u,u!=s)return ne.debug(i,"need Period "+u,"presentationTime="+a,"timeNeeded="+o,"currentPeriodIndex="+s),null;if(c>=l)return ne.O(i,"buffering goal met"),.5;if(i=On(e.g.T,t.type),!(i=jo(e,t,a,i,s)))return 1;var f=1/0;return Gf(n=Yw(OP(r=e.h).call(r))).call(n,(function(t){Lo(t)||(t=No(e,t,a),f=Math.min(f,t))})),o>=f+e.i.presentationTimeline.g?1:(t.Hd=0,function(e,t,n,r,i){var a,o,s,u=Go(t),c=e.i.periods[r];ne.K(u,"fetchAndAppend_:","presentationTime="+n,"currentPeriod.startTime="+c.startTime,"reference.position="+i.position,"reference.startTime="+i.startTime,"reference.endTime="+i.endTime);var l=t.stream,f=e.i.presentationTimeline.ha(),h=e.i.periods[r+1];r=function(e,t,n,r,i){var a;if(!t.Ac)return Zy.resolve();var o=Go(t);return n=e.i.periods[n].startTime-t.stream.presentationTimeOffset,ne.K(o,"setting timestamp offset to "+n),ne.K(o,"setting append window start to "+r),ne.K(o,"setting append window end to "+i),r=function(e,t,n,r,i){var a,o,s;return"text"==t?(e.g.A=n,(e=e.g).j=r,e.m=i,Zy.resolve()):Zy.all([Fn(e,t,Pw(a=e.Ve).call(a,e,t)),Fn(e,t,Pw(o=e.Cg).call(o,e,t,n)),Fn(e,t,Pw(s=e.zg).call(s,e,t,r,i))])}(e.g.T,t.type,n,r,i),t.stream.initSegmentReference?(ne.K(o,"fetching init segment"),e=Ko(e,t,t.stream.initSegmentReference).then(Pw(a=function(e){if(!this.j)return ne.K(o,"appending init segment"),Ln(this.g.T,t.type,e,null,null,t.stream.closedCaptions&&0<t.stream.closedCaptions.size)}).call(a,e)).catch((function(e){return t.Ac=!0,Zy.reject(e)})),Zy.all([r,e])):r}(e,t,r,Math.max(0,c.startTime-.1),h?h.startTime+.01:f),t.Sa=!0,t.Ac=!1,ne.O(u,"fetching segment"),f=Ko(e,t,i),Zy.all([r,f]).then(Pw(a=function(e){if(!this.j&&!this.A)return function(e,t,n,r,i,a,o){var s,u,c,l=Go(t),f=i.closedCaptions&&0<i.closedCaptions.size;return null!=i.emsgSchemeIdUris&&0<i.emsgSchemeIdUris.length&&(new qr).ma("emsg",Pw(s=e.P).call(s,e,r,a,i.emsgSchemeIdUris)).parse(o),function(e,t,n){var r,i=Go(t);ne.O(i,"checking buffer length");var a=Math.max(e.l.bufferBehind,e.i.presentationTimeline.g),o=jn(e.g.T,t.type);if(null==o)return ne.O(i,"buffer behind okay because nothing buffered:","presentationTime="+n,"bufferBehind="+a),Zy.resolve();var s=n-o,u=s-a;return.01>=u?(ne.O(i,"buffer behind okay:","presentationTime="+n,"bufferedBehind="+s,"bufferBehind="+a,"underflow="+Math.abs(u)),Zy.resolve()):(ne.K(i,"buffer behind too large:","presentationTime="+n,"bufferedBehind="+s,"bufferBehind="+a,"overflow="+u),e.g.T.remove(t.type,o,o+u).then(Pw(r=function(){this.j||ne.K(i,"evicted "+u+" seconds")}).call(r,e)))}(e,t,n).then(Pw(u=function(){if(!this.j)return ne.K(l,"appending media segment"),Ln(this.g.T,t.type,o,a.startTime+r.startTime,a.endTime+r.startTime,f)}).call(u,e)).then(Pw(c=function(){if(!this.j)return ne.O(l,"appended media segment"),t.Hb=i,t.La=a,Zy.resolve()}).call(c,e))}(this,t,n,c,l,i,e[1])}).call(a,e)).then(Pw(o=function(){this.j||this.A||(t.Sa=!1,t.Ed=!1,t.Wa||this.g.zd(),Ho(this,t,0),function(e,t,n){if(!e.C){var r,i=Go(t);if(1==(t=Yw(OP(r=e.h).call(r))).length&&"text"==t[0].type||(e.C=iT(t).call(t,(function(e){return"text"==e.type||!e.Wa&&!e.ab&&e.La}))),e.C){var a;for(ne.debug(i,"startup complete"),n=Fo(e,n),e.m[n]||Co(e,n).then(Pw(a=function(){this.j||(ne.K(i,"calling onCanSwitch()..."),this.g.te())}).call(a,e)).catch(ye.Bc),n=0;n<e.i.periods.length;++n)Co(e,n).catch(ye.Bc);e.g.gg&&(ne.K(i,"calling onStartupComplete()..."),e.g.gg())}}}(this,t,l),ne.K(u,"finished fetch and append"))}).call(o,e)).catch(Pw(s=function(e){this.j||this.A||(t.Sa=!1,"text"==t.type&&this.l.ignoreTextStreamFailures?(1001==e.code?ne.v(u,"Text stream failed to download. Proceeding without it."):ne.v(u,"Text stream failed to parse. Proceeding without it."),this.h.delete("text")):7001==e.code?(t.Sa=!1,t.Pa=null,Ho(this,t,0)):3017==e.code?function(e,t,n){var r,i,a=Go(t);if(hS(r=Yw(OP(i=e.h).call(i))).call(r,(function(e){return e!=t&&e.Ed})))ne.debug(a,"MediaSource threw QuotaExceededError:","waiting for another stream to recover...");else{var o=Math.round(100*e.u);if(20<o)e.u-=.2;else{if(!(4<o))return ne.error(a,"MediaSource threw QuotaExceededError too many times"),t.ac=!0,e.A=!0,void e.g.onError(n);e.u-=.04}ne.v(a,"MediaSource threw QuotaExceededError:","reducing buffering goals by "+(100-Math.round(100*e.u))+"%"),t.Ed=!0}Ho(e,t,4)}(this,t,e):(ne.error(u,"failed fetch and append: code="+e.code),t.ac=!0,e.severity=2,qo(this,e)))}).call(s,e))}(e,t,a,s,i),null)}(e,t);null!=a&&(Ho(e,t,a),t.ac=!1)}catch(o){return void qo(e,o)}a=Yw(OP(r=e.h).call(r)),function(e,t){var n=Go(t),r=Fo(e,t.stream);if(t.oa!=r){var i,a,o=t.oa,s=Yw(OP(i=e.h).call(i));iT(s).call(s,(function(e){return e.oa==o||Lo(e)}))?iT(s).call(s,Do)?(ne.debug(n,"all need Period "+o),Co(e,o).then(Pw(a=function(){var e;if(!this.j)if(iT(s).call(s,Pw(e=function(e){var t=Do(e),n=Fo(this,e.stream);return!!Lo(e)||t&&e.oa==o&&n!=o}).call(e,this))){var t,r,i=this.i.periods[o];ne.K(n,"calling onChooseStreams()...");var a=this.g.ue(i),u=new AP;a.variant&&a.variant.video&&u.set("video",a.variant.video),a.variant&&a.variant.audio&&u.set("audio",a.variant.audio),a.text&&u.set("text",a.text);for(var c=(a=w(Lb(t=this.h).call(t))).next();!c.done;c=a.next())if(c=c.value,!u.has(c)&&"text"!=c)return ne.error(n,"invalid Streams chosen: missing "+c+" Stream"),void this.g.onError(new re(2,5,5005));for(c=(a=w(Yw(Lb(u).call(u)))).next();!c.done;c=a.next())if(c=c.value,!this.h.has(c)){if("text"!=c)return ne.error(n,"invalid Streams chosen: unusable "+c+" Stream"),void this.g.onError(new re(2,5,5005));Mo(this,null,null,u.get("text"),i.startTime),u.delete(c)}for(c=(a=w(Yw(Lb(r=this.h).call(r)))).next();!c.done;c=a.next()){c=c.value;var l=this.h.get(c),f=u.get(c);if(f){var h=Lo(l);h&&(l.oa=o,l.Hd=i.startTime),ko(this,f,!1,0,!1),h&&Lo(l)||Ho(this,this.h.get(c),0)}else this.h.delete(c)}ne.K(n,"calling onCanSwitch()..."),this.g.te()}else ne.debug(n,"ignoring transition to Period",o,"since another is happening")}).call(a,e)).catch(ye.Bc)):ne.debug(n,"all MediaStates need Period "+o+", but not all MediaStates are idle"):ne.debug(n,"not all MediaStates need Period "+o)}}(e,t),e.C&&iT(a).call(a,(function(e){return e.endOfStream}))&&(ne.K(n,"calling endOfStream()..."),e.g.T.endOfStream().then(Pw(i=function(){if(!this.j){var e=this.g.T.ha();0!=e&&e<this.i.presentationTimeline.ha()&&this.i.presentationTimeline.Fa(e)}}).call(i,e)))}}}function No(e,t,n){return t.Hb&&t.La?(n=Fo(e,t.Hb),e.i.periods[n].startTime+t.La.endTime):Math.max(n,t.Hd)}function jo(e,t,n,r,i){var a=Go(t);return t.La&&t.stream==t.Hb?(r=t.La.position+1,ne.O(a,"next position known:","position="+r),_o(e,t,i,r)):(t.La?(ne.K(a,"next position unknown: another Stream buffered"),a=Fo(e,t.Hb),a=Oo(e,t,e.i.periods[a].startTime+t.La.endTime,i)):(ne.K(a,"next position unknown: nothing buffered"),a=Oo(e,t,r||n,i)),null==a?null:(n=null,null==r&&(n=_o(e,t,i,Math.max(0,a-1))),n||_o(e,t,i,a)))}function Oo(e,t,n,r){var i=Go(t);return e=e.i.periods[r],ne.debug(i,"looking up segment:","presentationTime="+n,"currentPeriod.startTime="+e.startTime),n=Math.max(0,n-e.startTime),null==(t=t.stream.findSegmentPosition(n))&&ne.v(i,"cannot find segment:","currentPeriod.startTime="+e.startTime,"lookupTime="+n),t}function _o(e,t,n,r){var i=Go(t);return n=e.i.periods[n],(t=t.stream.getSegmentReference(r))?(e=(r=e.i.presentationTimeline).$b(),r=r.Db(),n.startTime+t.endTime<e||n.startTime+t.startTime>r?(ne.O(i,"segment is not available:","currentPeriod.startTime="+n.startTime,"reference.startTime="+t.startTime,"reference.endTime="+t.endTime,"availabilityStart="+e,"availabilityEnd="+r),null):t):(ne.K(i,"segment does not exist:","currentPeriod.startTime="+n.startTime,"position="+r),null)}function Lo(e){return e&&"text"==e.type&&"application/cea-608"==e.stream.mimeType}function Do(e){return!e.Sa&&null==e.Pa&&!e.Wa&&!e.ab}function Uo(e,t){var n,r=Xa(e.i.periods,t+Te);return r?Hh(n=e.i.periods).call(n,r):0}function Fo(e,t){for(var n=e.i.periods,r=0;r<n.length;r++){for(var i=n[r],a=new $O,o=w(i.variants),s=o.next();!s.done;s=o.next())(s=s.value).audio&&a.add(s.audio),s.video&&a.add(s.video),s.video&&s.video.trickModeVideo&&a.add(s.video.trickModeVideo);for(o=(i=w(i.textStreams)).next();!o.done;o=i.next())a.add(o.value);if(a.has(t))return r}return-1}function Ko(e,t,n){var r=Pi(n.i(),n.h,n.g,e.l.retryParameters);return ne.O("fetching: reference=",n),e=e.g.Ib.request(1,r),t.lb=e,e.promise.then((function(e){return t.lb=null,e.data}))}function Bo(e,t,n,r){return T((function i(){var a,o,s,u;return z(i,(function(i){var c;switch(i.s){case 1:return a=Go(t),t.Wa=!1,t.Qc=!1,t.oc=0,t.ab=!0,t.Hb=null,t.La=null,ne.debug(a,"clearing buffer"),r?(s=e.g.eb(),u=e.g.T.ha(),o=e.g.T.remove(t.type,s+r,u)):o=Un(e.g.T,t.type).then(Pw(c=function(){if(!this.j&&n)return this.g.T.flush(t.type)}).call(c,e)),N(i,o,2);case 2:if(e.j)return i.return();ne.debug(a,"cleared buffer"),t.ab=!1,t.endOfStream=!1,Ho(e,t,0),j(i)}}))}))}function Ho(e,t,n){var r=Go(t),i=t.type;"text"!=i||e.h.has(i)?(ne.O(r,"updating in "+n+" seconds"),t.Pa=new _e((function(){return T((function n(){var r;return z(n,(function(n){switch(n.s){case 1:return O(n,2),N(n,Po(e,t),4);case 4:L(n,0);break;case 2:r=D(n),e.g&&e.g.onError(r),j(n)}}))}))})).V(n)):ne.K(r,"Text stream is unloaded. No update is needed.")}function Vo(e){null!=e.Pa&&(e.Pa.stop(),e.Pa=null)}function zo(e){return T((function t(){return z(t,(function(t){if(1===t.s){if(e.lb)return N(t,e.lb.abort(),0);t.I(0)}}))}))}function qo(e,t){var n;Ue(e.M).then(Pw(n=function(){this.j||(this.g.onError(t),t.handled||this.l.failureCallback(t))}).call(n,e))}function Go(e){return"("+e.type+":"+e.stream.id+")"}function Wo(e,t,n,r,i,a){if(200<=n&&299>=n&&202!=n)return{uri:i||r,Bd:r,data:t,headers:e,fromCache:!!e["x-shaka-from-cache"]};i=null;try{i=Ae(t)}catch(o){}throw ne.debug("HTTP error text:",i),new re(401==n||403==n?2:1,1,1001,r,n,i,e,a)}function Xo(e,t,n,r){var i,a=new Xo.h;Gf(i=gt(t.headers)).call(i,(function(e,t){a.append(t,e)}));var o=new Xo.g,s={Zd:!1,Oe:!1};if(e=new Fe(e=Xo.u(e,n,{body:t.body||void 0,headers:a,method:t.method,signal:o.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},s,r),(function(){return s.Zd=!0,o.abort(),Zy.resolve()})),t=t.retryParameters.timeout){var u=new Le((function(){s.Oe=!0,o.abort()}));u.V(t/1e3),e.finally((function(){u.stop()}))}return e}function Yo(e,t,n,r){var i=new Yo.j,a=CT(),o=0;return new Fe(new Zy((function(s,u){for(var c in i.open(t.method,e,!0),i.responseType="arraybuffer",i.timeout=t.retryParameters.timeout,i.withCredentials=t.allowCrossSiteCredentials,i.onabort=function(){u(new re(1,1,7001,e,n))},i.onload=function(t){var r;t=t.target;for(var i=xT(r=t.getAllResponseHeaders()).call(r).split("\r\n"),a={},o=(i=w(i)).next();!o.done;o=i.next())a[(o=o.value.split(": "))[0].toLowerCase()]=xd(o).call(o,1).join(": ");try{var c=Wo(a,t.response,t.status,e,t.responseURL,n);s(c)}catch(l){u(l)}},i.onerror=function(t){u(new re(1,1,1002,e,t,n))},i.ontimeout=function(){u(new re(1,1,1003,e,n))},i.onprogress=function(e){var t=CT();(100<t-a||e.lengthComputable&&e.loaded==e.total)&&(r(t-a,e.loaded-o,e.total-e.loaded),o=e.loaded,a=t)},t.headers)i.setRequestHeader(c.toLowerCase(),t.headers[c]);i.send(t.body)})),(function(){return i.abort(),Zy.resolve()}))}function $o(){this.g=this.j=this.h=0,this.i=new AP,this.l=0}function Jo(e,t,n){this.m=e,this.h=new AP,this.i=!1,this.l=t,this.j=n,this.g=new $o}function Qo(e,t,n,r,i,a){var o=function(e,t){e.h+=t;var n=e.l;return e.l++,e.i.set(n,t),n}(e.g,r);r=e.h.get(t)||Zy.resolve(),e.h.set(t,r.then((function(){return T((function t(){var r,s,u,c,l,f;return z(t,(function(t){switch(t.s){case 1:return N(t,function(e,t){return T((function n(){var r;return z(n,(function(n){switch(n.s){case 1:return N(n,e.m.request(1,t).promise,2);case 2:return r=n.B,n.return(r.data)}}))}))}(e,n),2);case 2:if(r=t.B,e.i)throw new re(2,9,7001);if(i)for(var h in s=new Uint8Array(r),(u=new Qr(s)).data)c=Number(h),l=u.data[c],f=u.g[c],e.j(l,f);return e.g.close(o,r.byteLength),h=e.g,e.l(0==h.h?0:h.j/h.h,e.g.g),t.return(a(r))}}))}))})))}function Zo(e,t){var n=this;this.i=e,this.h=e.objectStore(t),this.g=new Ee,e.onabort=function(e){e.preventDefault(),n.g.reject()},e.onerror=function(e){e.preventDefault(),n.g.reject()},e.oncomplete=function(){n.g.resolve()}}function es(e,t){return new Zy((function(n,r){var i=e.h.openCursor();i.onerror=r,i.onsuccess=function(e){if(!(e=e.target.result))return n();t(e.key,e.value,e),e.continue()}}))}function ts(e){this.h=e,this.g=[]}function ns(e,t){return rs(e,t,"readwrite")}function rs(e,t,n){var r=new Zo(n=e.h.transaction([t],n),t);return e.g.push(r),r.promise().then((function(){$e(e.g,r)}),(function(){$e(e.g,r)})),r}function is(e,t,n){this.h=new ts(e),this.i=t,this.g=n}function as(e){return Zy.reject(new re(2,9,9011,"Cannot add new value to "+e))}function os(e,t,n,r){t=(e=ns(e.h,t)).store();for(var i={},a=(n=w(n)).next();!a.done;i={key:i.key},a=n.next())i.key=a.value,t.delete(i.key).onsuccess=function(e){return function(){return r(e.key)}}(i);return e.promise()}function ss(e,t,n){return T((function r(){var i,a,o,s,u,c,l;return z(r,(function(r){switch(r.s){case 1:for(i=rs(e.h,t,"readonly"),a=i.store(),o={},s=[],u={},c=w(n),l=c.next();!l.done;u={request:u.request,key:u.key},l=c.next())u.key=l.value,u.request=a.get(u.key),u.request.onsuccess=function(e){return function(){null==e.request.result&&s.push(e.key),o[e.key]=e.request.result}}(u);return N(r,i.promise(),2);case 2:if(s.length)throw new re(2,9,9012,"Could not find values for "+s);return r.return(Mb(n).call(n,(function(e){return o[e]})))}}))}))}function us(e){this.g=new ts(e)}function cs(){this.g=new AP}function ls(e,t,n){if(!(e=e.g.get(t)))throw new re(2,9,9013,"Could not find mechanism with name "+t);if(!(t=e.getCells().get(n)))throw new re(2,9,9013,"Could not find cell with name "+n);return t}function fs(e,t){hs.set(e,t)}yo.prototype.destroy=function(){var e=this;return T((function t(){var n,r;return z(t,(function(t){switch(t.s){case 1:n=[];for(var i=w(OP(o=e.h).call(o)),a=i.next();!a.done;a=i.next()){var o;Vo(r=a.value),n.push(zo(r))}return N(t,Zy.all(n),2);case 2:e.h.clear(),e.o.clear(),e.g=null,e.i=null,e.F=null,e.m=null,e.l=null,e.j=!0,j(t)}}))}))},yo.prototype.configure=function(e){this.l=e,this.M=new De({maxAttempts:Math.max(e.retryParameters.maxAttempts,2),baseDelay:e.retryParameters.baseDelay,backoffFactor:e.retryParameters.backoffFactor,fuzzFactor:e.retryParameters.fuzzFactor,timeout:0},!0)},yo.prototype.start=function(){var e=this;return T((function t(){var n,r,i;return z(t,(function(t){switch(t.s){case 1:return n=e.g.eb(),r=Uo(e,n),(i=e.g.ue(e.i.periods[r])).variant||i.text?N(t,Mo(e,i.variant?i.variant.audio:null,i.variant?i.variant.video:null,i.text,n),2):(ne.error("init: no Streams chosen"),t.return(new re(2,5,5005)));case 2:if(e.j)return t.return();ne.debug("init: completed initial Stream setup"),e.g&&e.g.Yf&&(ne.K("init: calling onInitialStreamsSetup()..."),e.g.Yf()),j(t)}}))}))},yo.prototype.P=function(e,t,n,r){var i=r.reader.Cd(),a=r.reader.Cd(),o=r.reader.N(),s=r.reader.N(),u=r.reader.N(),c=r.reader.N();r=r.reader.mb(r.reader.S.byteLength-r.reader.ka()),e=e.startTime+t.startTime+s/o,SM(n).call(n,i)&&("urn:mpeg:dash:event:2012"==i?this.g.Zf():this.g.onEvent(new qe("emsg",{detail:{startTime:e,endTime:e+u/o,schemeIdUri:i,value:a,timescale:o,presentationTimeDelta:s,eventDuration:u,id:c,messageData:r}})))},$("shaka.net.HttpFetchPlugin",Xo),Xo.u=function(e,t,n,r,i){return T((function a(){var o,s,u,c,l,f,h,d,p,g,v,m,y;return z(a,(function(a){switch(a.s){case 1:return o=Xo.l,s=Xo.i,f=l=0,h=CT(),O(a,2),N(a,o(e,n),4);case 4:return u=a.B,d=u.clone().body.getReader(),g=(p=u.headers.get("Content-Length"))?Sb(p,10):0,new s({start:function(e){!function t(){return T((function n(){var r,a,o;return z(n,(function(n){switch(n.s){case 1:return O(n,2),N(n,d.read(),4);case 4:r=n.B,L(n,3);break;case 2:return a=D(n),ne.K("error reading from stream",a.message),n.return();case 3:r.done||(l+=r.value.byteLength),(100<(o=CT())-h||r.done)&&(i(o-h,l-f,g-l),f=l,h=o),r.done?e.close():(e.enqueue(r.value),t()),j(n)}}))}))}()}}),N(a,u.arrayBuffer(),5);case 5:c=a.B,L(a,3);break;case 2:if(v=D(a),r.Zd)throw new re(1,1,7001,e,t);if(r.Oe)throw new re(1,1,1003,e,t);throw new re(1,1,1002,e,v,t);case 3:return m={},y=u.headers,Gf(y).call(y,(function(e,t){m[xT(t).call(t)]=e})),a.return(Wo(m,c,u.status,e,u.url,t))}}))}))},Xo.isSupported=function(){if(!e.ReadableStream)return!1;try{new ReadableStream({})}catch(g){return!1}return!(!e.fetch||!e.AbortController)},Xo.isSupported=Xo.isSupported,Xo.l=e.fetch,Xo.g=e.AbortController,Xo.i=e.ReadableStream,Xo.h=e.Headers,Xo.isSupported()&&(nt("http",Xo,2),nt("https",Xo,2)),$("shaka.net.HttpXHRPlugin",Yo),Yo.j=e.XMLHttpRequest,nt("http",Yo,1),nt("https",Yo,1),$o.prototype.close=function(e,t){if(this.i.has(e)){var n=this.i.get(e);this.i.delete(e),this.j+=n,this.g+=t}},Jo.prototype.destroy=function(){var e;return this.i=!0,Zy.all(OP(e=this.h).call(e)).then((function(){}),(function(){}))},Zo.prototype.abort=function(){try{this.i.abort()}catch(g){}return this.g.catch((function(){}))},Zo.prototype.store=function(){return this.h},Zo.prototype.promise=function(){return this.g},ts.prototype.destroy=function(){var e;return Zy.all(Mb(e=this.g).call(e,(function(e){return e.abort()})))},(f=is.prototype).destroy=function(){return this.h.destroy()},f.hasFixedKeySpace=function(){return!0},f.addSegments=function(){return as(this.i)},f.removeSegments=function(e,t){return os(this,this.i,e,t)},f.getSegments=function(e){var t=this;return T((function n(){var r;return z(n,(function(n){switch(n.s){case 1:return N(n,ss(t,t.i,e),2);case 2:return r=n.B,n.return(Mb(r).call(r,(function(e){return t.ae(e)})))}}))}))},f.addManifests=function(){return as(this.g)},f.updateManifestExpiration=function(e,t){var n=ns(this.h,this.g),r=n.store();return r.get(e).onsuccess=function(n){(n=n.target.result)&&(n.expiration=t,r.put(n,e))},n.promise()},f.removeManifests=function(e,t){return os(this,this.g,e,t)},f.getManifests=function(e){var t=this;return T((function n(){var r;return z(n,(function(n){switch(n.s){case 1:return N(n,ss(t,t.g,e),2);case 2:return r=n.B,n.return(Mb(r).call(r,(function(e){return t.pc(e)})))}}))}))},f.getAllManifests=function(){var e=this;return T((function t(){var n,r;return z(t,(function(t){switch(t.s){case 1:return n=rs(e.h,e.g,"readonly"),r=new AP,N(t,es(n,(function(t,n){r.set(t,e.pc(n))})),2);case 2:return N(t,n.promise(),3);case 3:return t.return(r)}}))}))},f.ae=function(e){return e},f.pc=function(e){return e},f.add=function(e,t){var n=this;return T((function r(){var i,a,o,s;return z(r,(function(r){switch(r.s){case 1:i=ns(n.h,e),a=i.store(),o=[];for(var u=w(t),c=u.next();!c.done;c=u.next())s=c.value,a.add(s).onsuccess=function(e){o.push(e.target.result)};return N(r,i.promise(),2);case 2:return r.return(o)}}))}))},us.prototype.destroy=function(){return this.g.destroy()},us.prototype.getAll=function(){var e=this;return T((function t(){var n,r;return z(t,(function(t){switch(t.s){case 1:return n=rs(e.g,"session-ids","readonly"),r=[],N(t,es(n,(function(e,t){r.push(t)})),2);case 2:return N(t,n.promise(),3);case 3:return t.return(r)}}))}))},us.prototype.add=function(e){for(var t=ns(this.g,"session-ids"),n=t.store(),r=(e=w(e)).next();!r.done;r=e.next())n.add(r.value);return t.promise()},us.prototype.remove=function(e){var t=this;return T((function n(){var r;return z(n,(function(n){switch(n.s){case 1:return N(n,es(r=ns(t.g,"session-ids"),(function(t,n,r){0<=Hh(e).call(e,n.sessionId)&&r.delete()})),2);case 2:return N(n,r.promise(),0)}}))}))},cs.prototype.destroy=function(){for(var e=[],t=w(OP(r=this.g).call(r)),n=t.next();!n.done;n=t.next()){var r;e.push(n.value.destroy())}return this.g.clear(),Zy.all(e)},cs.prototype.init=function(){var e=this;Gf(hs).call(hs,(function(t,n){var r=t();r?e.g.set(n,r):ne.info("Skipping "+n+" as it is not supported on this platform")}));for(var t=[],n=w(OP(i=this.g).call(i)),r=n.next();!r.done;r=n.next()){var i;t.push(r.value.init())}return Zy.all(t)},cs.prototype.erase=function(){var e=this;return T((function t(){var n,r,i;return z(t,(function(t){var a;switch(t.s){case 1:return n=Yw(OP(a=e.g).call(a)),(r=0<n.length)||Gf(i=hs).call(i,(function(e){(e=e())&&n.push(e)})),N(t,Zy.all(Mb(n).call(n,(function(e){return e.erase()}))),2);case 2:if(!r)return N(t,Zy.all(Mb(n).call(n,(function(e){return e.destroy()}))),0);t.I(0)}}))}))},$("shaka.offline.StorageMuxer.register",fs),$("shaka.offline.StorageMuxer.unregister",(function(e){hs.delete(e)}));var hs=new AP;function ds(e){is.apply(this,arguments)}function ps(e){var t,n;return function(e){var t,n,r=Hb(t=e.streams).call(t,(function(e){return"audio"==e.contentType})),i=Hb(n=e.streams).call(n,(function(e){return"video"==e.contentType}));if(!iT(r).call(r,(function(e){return e.variantIds}))||!iT(i).call(i,(function(e){return e.variantIds}))){Gf(r).call(r,(function(e){e.variantIds=[]})),Gf(i).call(i,(function(e){e.variantIds=[]}));var a=0;if(i.length&&!r.length){ne.debug("Found video-only content. Creating variants for video.");var o=a++;Gf(i).call(i,(function(e){e.variantIds.push(o)}))}if(!i.length&&r.length){ne.debug("Found audio-only content. Creating variants for audio.");var s=a++;Gf(r).call(r,(function(e){e.variantIds.push(s)}))}i.length&&r.length&&(ne.debug("Found audio-video content. Creating variants."),Gf(r).call(r,(function(e){Gf(i).call(i,(function(t){var n=a++;e.variantIds.push(n),t.variantIds.push(n)}))})))}}(e),Gf(t=e.streams).call(t,(function(){})),{startTime:e.startTime,streams:Mb(n=e.streams).call(n,gs)}}function gs(e){var t,n=e.initSegmentUri?ms(e.initSegmentUri):null;return{id:e.id,originalId:null,primary:e.primary,presentationTimeOffset:e.presentationTimeOffset,contentType:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:void 0,kind:e.kind,language:e.language,label:e.label,width:e.width,height:e.height,initSegmentKey:n,encrypted:e.encrypted,keyId:e.keyId,segments:Mb(t=e.segments).call(t,vs),variantIds:e.variantIds}}function vs(e){var t=ms(e.uri);return{startTime:e.startTime,endTime:e.endTime,dataKey:t}}function ms(e){var t;if((t=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(e))||(t=/^offline:segment\/([0-9]+)$/.exec(e)))return Number(t[1]);throw new re(2,9,9004,"Could not parse uri "+e)}function ys(e,t,n,r){is.call(this,e,t,n),this.j=r}function bs(){this.l=this.i=this.h=this.g=this.j=null}function ws(e,t,n,r){this.g=e,this.l=t,this.j=n,this.i=r,this.h=["offline:",e,"/",t,"/",n,"/",r].join("")}function Ss(e){if(null==(e=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(e)))return null;var t=e[1];if("manifest"!=t&&"segment"!=t)return null;var n=e[2];if(!n)return null;var r=e[3];return r&&null!=t?new ws(t,n,r,Number(e[4])):null}function Ts(e,t){this.h=e,this.g=t}function Es(e,t,n){var r,i,a,o,s,u=Hb(r=t.streams).call(r,(function(e){return"audio"==e.contentType})),c=Hb(i=t.streams).call(i,(function(e){return"video"==e.contentType}));return u=function(e,t,n){for(var r=new $O,i=w(t),a=i.next();!a.done;a=i.next()){var o=w(a.value.variantIds);for(a=o.next();!a.done;a=o.next())r.add(a.value)}for(i=w(n),a=i.next();!a.done;a=i.next())for(o=w(a.value.variantIds),a=o.next();!a.done;a=o.next())r.add(a.value);for(i=new AP,r=w(r),a=r.next();!a.done;a=r.next())a=a.value,i.set(a,{id:a,language:"",primary:!1,audio:null,video:null,bandwidth:0,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0});for(t=w(t),r=t.next();!r.done;r=t.next())for(r=r.value,a=xs(e,r),o=w(r.variantIds),r=o.next();!r.done;r=o.next())(r=i.get(r.value)).language=a.language,r.primary=r.primary||a.primary,r.audio=a;for(n=w(n),t=n.next();!t.done;t=n.next())for(r=t.value,t=xs(e,r),a=w(r.variantIds),r=a.next();!r.done;r=a.next())(r=i.get(r.value)).primary=r.primary||t.primary,r.video=t;return i}(e,u,c),c=Mb(a=Hb(o=t.streams).call(o,(function(e){return"text"==e.contentType}))).call(a,(function(t){return xs(e,t)})),Gf(s=t.streams).call(s,(function(r){var i;r=Mb(i=r.segments).call(i,(function(t,n){return ks(e,n,t)})),n.Jb(r,t.startTime)})),{startTime:t.startTime,variants:Yw(OP(u).call(u)),textStreams:c}}function xs(e,t){var n,r=Mb(n=t.segments).call(n,(function(t,n){return ks(e,n,t)})),i=new di(r);return r={id:t.id,originalId:t.originalId,createSegmentIndex:function(){return Zy.resolve()},findSegmentPosition:function(e){return Jh(i).call(i,e)},getSegmentReference:function(e){return i.get(e)},initSegmentReference:null,presentationTimeOffset:t.presentationTimeOffset,mimeType:t.mimeType,codecs:t.codecs,width:t.width||void 0,height:t.height||void 0,frameRate:t.frameRate||void 0,pixelAspectRatio:t.pixelAspectRatio||void 0,kind:t.kind,encrypted:t.encrypted,keyId:t.keyId,language:t.language,label:t.label||null,type:t.contentType,primary:t.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null},null!=t.initSegmentKey&&(r.initSegmentReference=function(e,t){var n=new ws("segment",e.h,e.g,t);return new li((function(){return[n.toString()]}),0,null)}(e,t.initSegmentKey)),r}function ks(e,t,n){var r=new ws("segment",e.h,e.g,n.dataKey);return new fi(t,n.startTime,n.endTime,(function(){return[r.toString()]}),0,null)}function As(){this.g=null}function Ms(e){var t=Ss(e);return t&&"manifest"==t.g?Ms.m(e):t&&"segment"==t.g?Ms.o(t.key(),t):Ke(new re(2,1,9004,e))}function Is(e,t,n){return T((function r(){var i,a,o,s,u,c;return z(r,(function(r){switch(r.s){case 1:i=[];for(var l=[],f=w(n),h=f.next();!h.done;h=f.next()){h=h.value;for(var d=!1,p=w(l),g=p.next();!g.done;g=p.next())if(Cs((g=g.value).info,h)){g.sessionIds.push(h.sessionId),d=!0;break}d||l.push({info:h,sessionIds:[h.sessionId]})}a=w(l),o=a.next();case 2:if(o.done){r.I(4);break}return s=o.value,u=function(e,t,n){return T((function r(){var i,a,o,s;return z(r,(function(r){var u;switch(r.s){case 1:return i=new Rt({Ib:t,onError:function(){},Dc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),O(r,2),i.configure(e),N(r,function(e,t,n,r,i,a){var o=new AP;return o.set(t,{audioCapabilities:i,videoCapabilities:a,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:t,drmInfos:[{keySystem:t,licenseServerUri:n,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:r,initData:null,keyIds:null}]}),Kt(e,o)}(i,n.info.keySystem,n.info.licenseUri,n.info.serverCertificate,n.info.audioCapabilities,n.info.videoCapabilities),4);case 4:L(r,3);break;case 2:return a=D(r),ne.v("Error initializing EME",a),N(r,i.destroy(),5);case 5:case 9:return r.return([]);case 3:return O(r,6),N(r,jt(i),8);case 8:L(r,7);break;case 6:return o=D(r),ne.v("Error setting server certificate",o),N(r,i.destroy(),9);case 7:return s=[],N(r,Zy.all(Mb(u=n.sessionIds).call(u,(function(e){return T((function t(){var n;return z(t,(function(t){switch(t.s){case 1:return O(t,2),N(t,function(e,t){return T((function n(){var r,i,a;return z(n,(function(n){switch(n.s){case 1:return N(n,Bt(e,t),2);case 2:return(r=n.B)?(i=[],(a=e.h.get(r))&&(a.Ga=new Ee,i.push(a.Ga)),ne.O("Attempting to remove session",t),i.push(r.remove()),N(n,Zy.all(i),0)):(ne.O("Ignoring attempt to remove missing session",t),n.return())}}))}))}(i,e),4);case 4:s.push(e),L(t,0);break;case 2:n=D(t),ne.v("Error deleting offline session",n),j(t)}}))}))}))),10);case 10:return N(r,i.destroy(),11);case 11:return r.return(s)}}))}))}(e,t,s),N(r,u,5);case 5:c=r.B,i=nd(i).call(i,c),o=a.next(),r.I(2);break;case 4:return r.return(i)}}))}))}function Cs(e,t){function n(e,t){return e.robustness==t.robustness&&e.contentType==t.contentType}return e.keySystem==t.keySystem&&e.licenseUri==t.licenseUri&&Je(e.audioCapabilities,t.audioCapabilities,n)&&Je(e.videoCapabilities,t.videoCapabilities,n)}function Rs(e,t){var n={Ia:null,D:null,mimeType:null,startTime:null,Rd:null,uri:null},r=this;this.m=t,this.i=e,this.j=n,this.o=null,this.l=[],this.h=this.g=null,this.u=!0,this.A=Zy.resolve().then((function(){return function(e){return T((function t(){return z(t,(function(t){if(1===t.s){if(e.u){if(0==e.l.length||e.g&&!e.g.gb)var n=!1;else{e.g&&(e.g.Da.kb(),e.g=null);var r=(n=e.l.shift()).create(e.j);r?(n.Da.Kb(),e.g={node:r.node,payload:r.payload,gb:r.gb,Da:n.Da}):n.Da.Ec(),n=!0}return n?n=Zy.resolve():e.g?n=function(e){return T((function t(){var n,r;return z(t,(function(t){switch(t.s){case 1:return e.i=e.m.Af(e.i,e.j,e.g.node,e.g.payload),O(t,2),e.h=e.m.ef(e.i,e.j,e.g.payload),N(t,e.h.promise,4);case 4:e.h=null,e.i==e.g.node&&(e.g.Da.Cc(),e.g=null),L(t,0);break;case 2:return 7001==(n=D(t)).code?e.g.Da.kb():e.g.Da.onError(n),e.g=null,e.h=null,r=e,N(t,e.m.handleError(e.j,n),5);case 5:r.i=t.B,j(t)}}))}))}(e):(e.m.Xf(e.i),e.o=new Ee,n=e.o),N(t,n,1)}t.I(0)}}))}))}(r)}))}function Ps(e,t){var n={Kb:function(){},Cc:function(){},kb:function(){},onError:function(){},Ec:function(){},$g:function(){}};return e.l.push({create:t,Da:n}),e.h&&e.h.abort(),Ns(e),n}function Ns(e){e.o&&(e.o.resolve(),e.o=null)}function js(e){this.g=null;for(var t=0;t<e.textTracks.length;++t){var n=e.textTracks[t];n.mode="disabled","Shaka Player TextTrack"==n.label&&(this.g=n)}this.g||(this.g=e.addTextTrack("subtitles","Shaka Player TextTrack")),this.g.mode="hidden"}function Os(e){if(e.startTime>=e.endTime)return ne.v("Invalid cue times: "+e.startTime+" - "+e.endTime),null;var t=new VTTCue(e.startTime,e.endTime,e.payload);t.lineAlign=e.lineAlign,t.positionAlign=e.positionAlign,e.size&&(t.size=e.size);try{t.align=e.textAlign}catch(n){}return"center"==e.textAlign&&"center"!=t.align&&(t.align="middle"),"vertical-lr"==e.writingMode?t.vertical="lr":"vertical-rl"==e.writingMode&&(t.vertical="rl"),1==e.lineInterpretation&&(t.snapToLines=!1),null!=e.line&&(t.line=e.line),null!=e.position&&(t.position=e.position),t}function _s(e,t){var n=e.mode;e.mode="showing"==n?"showing":"hidden";for(var r=e.cues,i=r.length-1;0<=i;i--){var a=r[i];a&&t(a)&&e.removeCue(a)}e.mode=n}function Ls(e,t,n,r,i){var a,o=i in r,s=!0;for(a in t){var u=i+"."+a,c=o?r[i]:n[a];o||a in n?void 0===t[a]?void 0===c||o?delete e[a]:e[a]=Xe(c):c.constructor==Object&&t[a]&&t[a].constructor==Object?(e[a]||(e[a]=Xe(c)),u=Ls(e[a],t[a],c,r,u),s=s&&u):Rl(t[a])!=Rl(c)||null==t[a]||"function"!=typeof t[a]&&t[a].constructor!=c.constructor?(ne.kc("Invalid config, wrong type for "+u),s=!1):("function"==typeof n[a]&&n[a].length!=t[a].length&&ne.ba("Unexpected number of arguments for "+u),e[a]=t[a]):(ne.kc("Invalid config, unrecognized key "+u),s=!1)}return s}function Ds(e,t){for(var n={},r=n,i=0,a=0;!(0>(i=Hh(e).call(e,".",i)));)0!=i&&"\\"==e[i-1]||(r[a=e.substring(a,i).replace(/\\\./g,".")]={},r=r[a],a=i+1),i+=1;return r[e.substring(a).replace(/\\\./g,".")]=t,n}function Us(){}function Fs(){var e=5e5,t=1/0;navigator.connection&&(navigator.connection.downlink&&(e=1e6*navigator.connection.downlink),navigator.connection.saveData&&(t=360));var n={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:Ht,fairPlayTransform:!0,updateExpirationTime:1},r={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,dash:{customScheme:function(e){if(e)return null},clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,defaultPresentationDelay:10,ignoreMinBufferTime:!1,autoCorrectDrift:!0,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1},hls:{ignoreTextStreamFailures:!1,useFullSegmentsForStartTime:!1}},i={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},failureCallback:function(e){return ne.error("Unhandled streaming error",e),[e]},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0};(At("Web0S")||Et()||At("CrKey"))&&(i.stallSkip=0);var a={trackSelectionCallback:function(e){return T((function t(){return z(t,(function(t){if(1===t.s)return t.return(e)}))}))},progressCallback:function(e,t){return[e,t]},usePersistentLicense:!0},o={drm:n,manifest:r,streaming:i,offline:a,abrFactory:Yn,abr:{enabled:!0,defaultBandwidthEstimate:e,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:t,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0},playRangeStart:0,playRangeEnd:1/0,textDisplayFactory:function(){return null}};return a.trackSelectionCallback=function(e){return T((function t(){return z(t,(function(t){if(1===t.s)return t.return(function(e,t){var n=Hb(e).call(e,(function(e){return"variant"==e.type})),r=[],i=Gn(t,Mb(n).call(n,(function(e){return e.language})));i&&(r=Hb(n).call(n,(function(e){return zn(e.language)==i}))),0==r.length&&(r=Hb(n).call(n,(function(e){return e.primary}))),0==r.length&&(1<new $O(Mb(n).call(n,(function(e){return e.language}))).size&&ne.v("Could not choose a good audio track based on language preferences or primary tracks. An arbitrary language will be stored!"),r=n);var a=Hb(r).call(r,(function(e){return e.height&&480>=e.height}));if(a.length&&(Nh(a).call(a,(function(e,t){return t.height-e.height})),r=Hb(a).call(a,(function(e){return e.height==a[0].height}))),n=[],r.length){var o=Math.floor(r.length/2);Nh(r).call(r,(function(e,t){return e.bandwidth-t.bandwidth})),n.push(r[o])}for(r=w(e),o=r.next();!o.done;o=r.next())"text"==(o=o.value).type&&n.push(o);return n}(e,o.preferredAudioLanguage))}))}))},o}function Ks(e,t,n){var r={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return Ls(e,t,n||Fs(),r,"")}function Bs(){this.g=null,this.h=[]}function Hs(e,t){if(null==e.g)e.g={timestamp:CT()/1e3,state:t,duration:0};else{var n=CT()/1e3;e.g.duration=n-e.g.timestamp,e.g.state!=t&&(e.h.push(e.g),e.g={timestamp:n,state:t,duration:0})}}function Vs(e,t){var n=0;e.g&&e.g.state==t&&(n+=e.g.duration);for(var r=w(e.h),i=r.next();!i.done;i=r.next())n+=(i=i.value).state==t?i.duration:0;return n}function zs(){this.h=this.i=null,this.g=[]}function qs(){this.j=this.C=this.m=this.h=this.o=this.u=this.A=this.l=this.F=NaN,this.g=new Bs,this.i=new zs}function Gs(t,n){var r=this;We.call(this),this.o=_u,this.g=null,this.ub=!1,this.l=new ut,this.Uc=this.u=this.Tb=this.i=this.C=this.j=this.rc=this.L=this.ic=this.J=this.wb=this.A=this.M=this.m=this.X=null,this.re=1e9,this.lc=new $O,this.yb=!0,this.wa=null,this.qe=!1,this.oe=0,this.va=null,this.Z=new Aa,this.h=iu(this),this.mc={width:1/0,height:1/0},this.F=null,this.tb=new _a(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount),this.ua=this.h.preferredTextLanguage,this.Xa=this.h.preferredTextRole,this.Wc=[],n&&n(this),this.X=function(e){return new et((function(t,n){e.u&&e.u.segmentDownloaded(t,n)}))}(this),this.l.H(e,"online",(function(){r.Id()})),this.P={name:"detach"},this.da={name:"attach"},this.Qa={name:"unload"},this.nd={name:"manifest-parser"},this.md={name:"manifest"},this.vb={name:"media-source"},this.ad={name:"drm-engine"},this.ea={name:"load"},this.od={name:"src-equals-drm-engine"},this.xb={name:"src-equals"};var i=new AP;i.set(this.da,(function(e,t){return Ve(function(e,t,n){return null==t.D&&(t.D=n.D,e.l.H(t.D,"error",(function(){var t=Su(e);t&&e.Va(t)}))),e.g=t.D,Zy.resolve()}(r,e,t))})),i.set(this.P,(function(e){return e.D&&(r.l.ta(e.D,"error"),e.D=null),r.g=null,Ve(e=Zy.resolve())})),i.set(this.Qa,(function(e){return Ve($s(r,e))})),i.set(this.vb,(function(t){return t=function(t,n){return T((function r(){var i,a,o,s;return z(r,(function(r){switch(r.s){case 1:return i=e.muxjs?new Zt:new en,a=t.h.textDisplayFactory,o=new a,t.fd=a,N(r,(s=new In(n.D,i,o)).C,2);case 2:t.M=s,j(r)}}))}))}(r,t),Ve(t)})),i.set(this.nd,(function(e,t){var n=function(e,t,n){return T((function r(){var i,a,o,s;return z(r,(function(r){switch(r.s){case 1:if(t.Ia=n.Ia,t.mimeType=n.mimeType,t.uri=n.uri,i=t.uri,a=e.X,e.Tb=i,t.Ia){e.C=t.Ia(),r.I(2);break}return o=e,N(r,Ci.create(i,a,e.h.manifest.retryParameters,t.mimeType),3);case 3:o.C=r.B;case 2:s=Xe(e.h.manifest),n.D&&"AUDIO"===n.D.nodeName&&(s.disableVideo=!0),e.C.configure(s),j(r)}}))}))}(r,e,t);return Ve(n)})),i.set(this.md,(function(e){return function(e,t){var n=t.uri,r=e.X;e.rc=new ho((function(){return e.He()})),function(e,t){e.h=t}(e.rc,(function(t){wu(e,"timelineregionadded",t)}));var i={networkingEngine:r,filterNewPeriod:function(t){return e.Xc(t)},filterAllPeriods:function(t){return au(e,t)},onTimelineRegionAdded:function(t){var n=e.rc;e:{for(var r=w(n.g),i=r.next();!i.done;i=r.next())if((i=i.value).schemeIdUri==t.schemeIdUri&&i.id==t.id&&i.startTime==t.startTime&&i.endTime==t.endTime){r=i;break e}r=null}null==r&&(n.g.add(t),n.h(t))},onEvent:function(t){return e.dispatchEvent(t)},onError:function(t){return e.Va(t)}};return new Fe(Zy.resolve().then((function(){return T((function t(){var r;return z(t,(function(t){switch(t.s){case 1:return r=e,N(t,e.C.start(n,i),2);case 2:if(r.i=t.B,e.dispatchEvent(new qe("manifestparsed")),0==e.i.periods.length)throw new re(2,4,4014);!function(e){function t(e){var t;return e.video&&e.audio||e.video&&SM(t=e.video.codecs).call(t,",")}hS(e).call(e,(function(e){var n;return hS(n=e.variants).call(n,t)}))&&(ne.debug("Found variant with audio and video content, so filtering out audio-only content in all periods."),Gf(e).call(e,(function(e){var n;e.variants=Hb(n=e.variants).call(n,t)})))}(e.i.periods),j(t)}}))}))})),(function(){return ne.info("Aborting parser step..."),e.C.stop()}))}(r,e)})),i.set(this.ad,(function(e){return e=function(e,t){return T((function n(){return z(n,(function(n){switch(n.s){case 1:return e.m=Js(e,{Ib:e.X,onError:function(t){e.Va(t)},Dc:function(t){Tu(e,t)},onExpirationUpdated:function(t,n){Eu(e,t,n)},onEvent:function(t){e.dispatchEvent(t)}}),e.m.configure(e.h.drm),N(n,Pt(e.m,Wa(e.i.periods),e.i.offlineSessionIds),2);case 2:return N(n,e.m.Ub(t.D),3);case 3:au(e,e.i.periods),j(n)}}))}))}(r,e),Ve(e)})),i.set(this.ea,(function(e,t){return Ve(function(e,t,n){return T((function r(){var i,a,o,s,u,c,l,f,h,d;return z(r,(function(r){var p,g,v;switch(r.s){case 1:return t.startTime=n.startTime,i=t.D,a=t.uri,e.Tb=a,e.J=new $a({wc:function(){return t.D.playbackRate},vc:function(){return t.D.defaultPlaybackRate},Od:function(e){t.D.playbackRate=e},pe:function(e){t.D.currentTime+=e}}),e.F=new qs,o=function(){return lu(e)},s=function(){return cu(e)},e.l.H(i,"playing",o),e.l.H(i,"pause",o),e.l.H(i,"ended",o),e.l.H(i,"ratechange",s),u=e.h.abrFactory,e.u&&e.Uc==u||(e.Uc=u,e.u=new u,e.u.configure(e.h.abr)),function(e,t){for(var n=0;n<t.length;n++){for(var r=t[n],i=new AP,a=w(r.variants),o=a.next();!o.done;o=a.next())if((o=o.value).video&&o.video.closedCaptions){o=o.video;for(var s=w(Lb(c=o.closedCaptions).call(c)),u=s.next();!u.done;u=s.next()){var c;if(u=u.value,!i.has(u)){var l,f={id:e.re++,originalId:u,createSegmentIndex:Pw(l=Zy.resolve).call(l,Zy),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,presentationTimeOffset:0,mimeType:"application/cea-608",codecs:"",kind:"caption",encrypted:!1,keyId:null,language:o.closedCaptions.get(u),label:null,type:"text",primary:!1,frameRate:void 0,pixelAspectRatio:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:o.roles,channelsCount:null,audioSamplingRate:null,closedCaptions:null};i.set(u,f)}}}for(a=(i=w(OP(i).call(i))).next();!a.done;a=i.next())r.textStreams.push(a.value)}}(e,e.i.periods),e.tb=new _a(e.h.preferredAudioLanguage,e.h.preferredVariantRole,e.h.preferredAudioChannelCount),e.ua=e.h.preferredTextLanguage,e.Xa=e.h.preferredTextRole,function(e,t,n){0<t&&(e.aa()?ne.v("|playRangeStart| has been configured for live content. Ignoring the setting."):e.Le(t)),n<e.ha()&&(e.aa()?ne.v("|playRangeEnd| has been configured for live content. Ignoring the setting."):e.Fa(n))}(e.i.presentationTimeline,e.h.playRangeStart,e.h.playRangeEnd),e.u.init((function(t,n,r){n=void 0!==n&&n,r=void 0===r?0:r,ne.debug("switch_");e:{for(var i=w(e.i.periods),a=i.next();!a.done;a=i.next()){var o;if(a=a.value,SM(o=a.variants).call(o,t)){i=a;break e}}i=null}nu(e,i,t,!0),e.j&&xo(e.j,t,n,r)&&pu(e)})),e.A=function(e,t){return new uo(e.g,e.i,e.h.streaming,t,(function(){e.wb&&Ga(e.wb,!0),e.j&&function(e){var t,n,r;function i(t){var n=e.g.T;return t="text"==t?null!=(t=n.g).g&&null!=t.h&&a>=t.g&&a<t.h:nn(t=_n(n,t),a,o)}var a=e.g.eb(),o=e.l.smallGapLimit,s=!1,u=Uo(e,a);if(pt(OP(t=e.h).call(t),(function(e){return e.oa==u})))for(var c=w(Lb(f=e.h).call(f)),l=c.next();!l.done;l=c.next()){var f;i(l=l.value)||(Ao(e,e.h.get(l)),s=!0)}else pt(Lb(n=e.h).call(n),i)||(ne.debug("(all): seeked: unbuffered seek: clearing all buffers"),Gf(r=e.h).call(r,(function(t){Ao(e,t)})),s=!0);s||ne.debug("(all): seeked: buffered seek: presentationTime="+a)}(e.j),e.L&&Zs(e)}),(function(t){return e.dispatchEvent(t)}))}(e,t.startTime),e.wb=function(e){var t=new Ya(e.i);!function(e,t){e.h=t}(t,(function(){gu(e)}));var n=new po(e.rc);!function(e,t,n,r){e.g=t,e.h=n,e.i=r}(n,(function(t){wu(e,"timelineregionenter",t)}),(function(t){wu(e,"timelineregionexit",t)}),(function(t,n){n||(wu(e,"timelineregionenter",t),wu(e,"timelineregionexit",t))}));var r=new qa(e.g);return r.g.add(t),r.g.add(n),r}(e),c=Math.max(e.i.minBufferTime,e.h.streaming.rebufferingGoal),Qs(e,c),e.j=function(e){var t,n,r,i,a;return new yo(e.i,{eb:function(){return e.A.l()},getBandwidthEstimate:function(){return e.u.getBandwidthEstimate()},T:e.M,Ib:e.X,ue:Pw(t=e.Vf).call(t,e),te:Pw(n=e.Ze).call(n,e),onError:Pw(r=e.Va).call(r,e),onEvent:function(t){return e.dispatchEvent(t)},Zf:Pw(i=e.$f).call(i,e),zd:Pw(a=e.eg).call(a,e)})}(e),e.j.configure(e.h.streaming),Xn.$d(e.i,e.h.preferredAudioChannelCount),e.o=Lu,e.dispatchEvent(new qe("streaming")),N(r,e.j.start(),2);case 2:e.h.streaming.startAtSegmentBoundary&&(l=e.A.l(),f=function(e,t){function n(e,t){if(!e)return null;var n=e.findSegmentPosition(t-a.startTime);return null==n?null:(n=e.getSegmentReference(n))?n.startTime+a.startTime:null}var r=bo(e.j),i=wo(e.j),a=Cu(e);return r=n(r,t),null!=(i=n(i,t))&&null!=r?Math.max(i,r):null!=i?i:null!=r?r:t}(e,l),e.A.A(f)),Gf(p=e.i.periods).call(p,Pw(g=e.Xc).call(g,e)),gu(e),pu(e),h=Cu(e)||e.i.periods[0],d=hS(v=h.variants).call(v,(function(e){return e.primary})),e.h.preferredAudioLanguage||d||ne.v("No preferred audio language set. We will choose an arbitrary language initially"),fu(e,h.variants),e.l.ya(i,"loadedmetadata",(function(){e.F.h=CT()/1e3-n.Rd})),j(r)}}))}))}(r,e,t))})),i.set(this.od,(function(e,t){var n=function(e,t,n){return T((function r(){var i,a;return z(r,(function(r){var o;switch(r.s){case 1:return i=Se,e.m=Js(e,{Ib:e.X,onError:function(t){e.Va(t)},Dc:function(t){Tu(e,t)},onExpirationUpdated:function(t,n){Eu(e,t,n)},onEvent:function(t){e.dispatchEvent(t)}}),e.m.configure(e.h.drm),a={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:Pw(o=Zy.resolve).call(o,Zy),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,presentationTimeOffset:0,mimeType:n.mimeType?n.mimeType.split(";")[0]:"video/mp4",codecs:n.mimeType?yt(n.mimeType):"",encrypted:!0,keyId:null,language:"und",label:null,type:i.Za,primary:!1,frameRate:void 0,pixelAspectRatio:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0},N(r,Pt(e.m,[a],[]),2);case 2:return N(r,e.m.Ub(t.D),0)}}))}))}(r,e,t);return Ve(n)})),i.set(this.xb,(function(e,t){return function(e,t,n){function r(){return lu(e)}if(t.uri=n.uri,t.startTime=n.startTime,e.Tb=t.uri,e.F=new qs,e.A=new so(t.D),null!=t.startTime&&e.A.A(t.startTime),e.J=new $a({wc:function(){return t.D.playbackRate},vc:function(){return t.D.defaultPlaybackRate},Od:function(e){t.D.playbackRate=e},pe:function(e){t.D.currentTime+=e}}),Qs(e,e.h.streaming.rebufferingGoal),e.l.H(t.D,"playing",r),e.l.H(t.D,"pause",r),e.l.H(t.D,"ended",r),e.l.H(t.D,"ratechange",(function(){return cu(e)})),"none"!=e.g.preload&&e.l.ya(t.D,"loadedmetadata",(function(){e.F.h=CT()/1e3-n.Rd})),e.g.audioTracks&&(e.l.H(e.g.audioTracks,"addtrack",(function(){return gu(e)})),e.l.H(e.g.audioTracks,"removetrack",(function(){return gu(e)})),e.l.H(e.g.audioTracks,"change",(function(){return gu(e)}))),e.g.textTracks){var i=e.g.textTracks;e.l.H(i,"addtrack",(function(){return gu(e)})),e.l.H(i,"removetrack",(function(){return gu(e)})),e.l.H(i,"change",(function(){return gu(e)}))}t.D.src=t.uri,(Et()||At("Web0S"))&&t.D.load(),e.o=Du,e.dispatchEvent(new qe("streaming"));var a=new Ee;Qa(e.g,HTMLMediaElement.HAVE_METADATA,e.l,(function(){a.resolve()}));var o=!1;return e.Wc.push((function(){o=!0})),Qa(e.g,HTMLMediaElement.HAVE_CURRENT_DATA,e.l,(function(){return T((function t(){var n;return z(t,(function(t){switch(t.s){case 1:if(o)return t.return();if(function(e){var t=e.h.preferredAudioLanguage;if(""!=t){e.Jd(t);var n=e.h.preferredVariantRole;""!=n&&e.Jd(t,n)}}(e),n=tu(e),Jh(n).call(n,(function(e){return"disabled"!=e.mode}))){t.I(2);break}return N(t,new Zy((function(t){e.l.ya(e.g.textTracks,"change",t),new Le(t).V(1)})),2);case 2:if(o)return t.return();!function(e){var t=e.h.preferredTextLanguage;if(""!=t){e.Kd(t);var n=e.h.preferredTextRole;""!=n&&e.Kd(t,n)}}(e),j(t)}}))}))})),e.g.error?a.reject(Su(e)):"none"==e.g.preload&&(ne.ba('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),a.resolve()),e.l.ya(e.g,"error",(function(){a.reject(Su(e))})),new Fe(a,(function(){return a.reject(new re(2,7,7001)),Zy.resolve()}))}(r,e,t)})),this.Ya=new Rs(this.P,{Af:function(e,t,n,i){var a=null;return e==r.P&&(a=n==r.P?r.P:r.da),e==r.da&&(a=n==r.P||t.D!=i.D?r.P:n==r.da?r.da:n==r.vb||n==r.ea?r.vb:n==r.xb?r.od:null),e==r.vb&&(a=n==r.ea&&t.D==i.D?r.nd:r.Qa),e==r.nd&&(a=Nu(r.ea,r.md,r.Qa,n,t,i)),e==r.md&&(a=Nu(r.ea,r.ad,r.Qa,n,t,i)),e==r.ad&&(a=Nu(r.ea,r.ea,r.Qa,n,t,i)),e==r.od&&(a=n==r.xb&&t.D==i.D?r.xb:r.Qa),e!=r.ea&&e!=r.xb||(a=r.Qa),e==r.Qa&&(a=i.D&&t.D==i.D?r.da:r.P),a},ef:function(e,t,n){return r.dispatchEvent(new qe("onstatechange",{state:e.name})),i.get(e)(t,n)},handleError:function(e,t){return T((function n(){return z(n,(function(n){switch(n.s){case 1:return ne.v("The walker saw an error:"),t instanceof re?ne.v("Error Code:",t.code):(ne.v("Error Message:",t.message),ne.v("Error Stack:",t.stack)),N(n,$s(r,e),2);case 2:return n.return(e.D?r.da:r.P)}}))}))},Xf:function(e){r.dispatchEvent(new qe("onstateidle",{state:e.name}))}}),t&&this.Ub(t,!0)}I(ds,is),ds.prototype.updateManifestExpiration=function(e,t){var n=ns(this.h,this.g),r=n.store(),i=new Ee;return r.get(e).onsuccess=function(n){(n=n.target.result)?(n.expiration=t,r.put(n),i.resolve()):i.reject(new re(2,9,9012,"Could not find values for "+e))},n.promise().then((function(){return i}))},ds.prototype.pc=function(e){var t;return{originalManifestUri:e.originalManifestUri,duration:e.duration,size:e.size,expiration:null==e.expiration?1/0:e.expiration,periods:Mb(t=e.periods).call(t,ps),sessionIds:e.sessionIds,drmInfo:e.drmInfo,appMetadata:e.appMetadata}},ds.prototype.ae=function(e){return{data:e.data}},I(ys,is),ys.prototype.hasFixedKeySpace=function(){return this.j},ys.prototype.addSegments=function(e){return this.j?as(this.i):this.add(this.i,e)},ys.prototype.addManifests=function(e){return this.j?as(this.g):this.add(this.g,e)},ys.prototype.pc=function(e){return null==e.expiration&&(e.expiration=1/0),e},(f=bs.prototype).init=function(){var t=this,n=new Ee,r=e.indexedDB.open("shaka_offline_db",4);return r.onsuccess=function(e){e=e.target.result,t.j=e;var r=e.objectStoreNames;r.contains("manifest")&&r.contains("segment")?(ne.debug("Mounting v1 idb storage cell"),r=new ds(e,"segment","manifest")):r=null,t.g=r,(r=e.objectStoreNames).contains("manifest-v2")&&r.contains("segment-v2")?(ne.debug("Mounting v2 idb storage cell"),r=new ys(e,"segment-v2","manifest-v2",!0)):r=null,t.h=r,(r=e.objectStoreNames).contains("manifest-v3")&&r.contains("segment-v3")?(ne.debug("Mounting v3 idb storage cell"),r=new ys(e,"segment-v3","manifest-v3",!1)):r=null,t.i=r,e.objectStoreNames.contains("session-ids")?(ne.debug("Mounting session ID idb storage cell"),e=new us(e)):e=null,t.l=e,n.resolve()},r.onupgradeneeded=function(e){e=e.target.result;for(var t=w(["segment-v3","manifest-v3","session-ids"]),n=t.next();!n.done;n=t.next())n=n.value,e.objectStoreNames.contains(n)||e.createObjectStore(n,{autoIncrement:!0})},r.onerror=function(e){n.reject(new re(2,9,9001,r.error)),e.preventDefault()},n},f.destroy=function(){var e=this;return T((function t(){return z(t,(function(t){switch(t.s){case 1:if(!e.g){t.I(2);break}return N(t,e.g.destroy(),2);case 2:if(!e.h){t.I(4);break}return N(t,e.h.destroy(),4);case 4:if(!e.i){t.I(6);break}return N(t,e.i.destroy(),6);case 6:if(!e.l){t.I(8);break}return N(t,e.l.destroy(),8);case 8:e.j&&e.j.close(),j(t)}}))}))},f.getCells=function(){var e=new AP;return this.g&&e.set("v1",this.g),this.h&&e.set("v2",this.h),this.i&&e.set("v3",this.i),e},f.getEmeSessionCell=function(){return this.l},f.erase=function(){var t=this;return T((function n(){return z(n,(function(n){switch(n.s){case 1:if(!t.g){n.I(2);break}return N(n,t.g.destroy(),2);case 2:if(!t.h){n.I(4);break}return N(n,t.h.destroy(),4);case 4:if(!t.i){n.I(6);break}return N(n,t.i.destroy(),6);case 6:return t.j&&t.j.close(),N(n,function(){var t=new Ee,n=e.indexedDB.deleteDatabase("shaka_offline_db");return n.onblocked=function(){ne.v("Deleting","shaka_offline_db","is being blocked")},n.onsuccess=function(){t.resolve()},n.onerror=function(e){t.reject(new re(2,9,9001,n.error)),e.preventDefault()},t}(),8);case 8:return t.j=null,t.g=null,t.h=null,t.i=null,N(n,t.init(),0)}}))}))},fs("idb",(function(){return At("CrKey")||!e.indexedDB?null:new bs})),ws.prototype.Ea=function(){return this.l},ws.prototype.ja=function(){return this.j},ws.prototype.key=function(){return this.i},ws.prototype.toString=function(){return this.h},(f=As.prototype).configure=function(){},f.start=function(e){var t=this;return T((function n(){var r,i,a,o,s;return z(n,(function(n){switch(n.s){case 1:return r=Ss(e),t.g=r,null==r||"manifest"!=r.g?n.return(Zy.reject(new re(2,1,9004,r))):(i=new cs,_(n,2),N(n,i.init(),4));case 4:return N(n,ls(i,r.Ea(),r.ja()),5);case 5:return N(n,n.B.getManifests([r.key()]),6);case 6:return a=n.B,o=a[0],s=new Ts(r.Ea(),r.ja()),n.return(function(e,t){var n,r=new Ri(null,0);r.Fa(t.duration);var i=Mb(n=t.periods).call(n,(function(t){return Es(e,t,r)})),a=t.drmInfo?[t.drmInfo]:[];return t.drmInfo&&Gf(i).call(i,(function(e){var t;Gf(t=e.variants).call(t,(function(e){e.drmInfos=a}))})),{presentationTimeline:r,minBufferTime:2,offlineSessionIds:t.sessionIds,periods:i}}(s,o));case 2:return U(n),N(n,i.destroy(),7);case 7:F(n,0)}}))}))},f.stop=function(){return Zy.resolve()},f.update=function(){},f.onExpirationUpdated=function(e,t){var n=this;return T((function r(){var i,a,o,s,u,c,l,f;return z(r,(function(r){var h;switch(r.s){case 1:return i=n.g,a=new cs,O(r,2,3),N(r,a.init(),5);case 5:return N(r,ls(a,i.Ea(),i.ja()),6);case 6:return N(r,(o=r.B).getManifests([i.key()]),7);case 7:if(s=r.B,u=s[0],c=SM(h=u.sessionIds).call(h,e),l=null==u.expiration||u.expiration>t,!c||!l){r.I(3);break}return ne.debug("Updating expiration for stored content"),N(r,o.updateManifestExpiration(i.key(),t),3);case 3:return U(r),N(r,a.destroy(),10);case 10:F(r,0);break;case 2:f=D(r),ne.error("There was an error updating",i,f),r.I(3)}}))}))},Ci.Qb("application/x-offline-manifest",As),$("shaka.offline.OfflineScheme",Ms),Ms.m=function(e){return He(e={uri:e,Bd:e,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}})},Ms.o=function(e,t){var n=new cs;return He(void 0).ca((function(){return n.init()})).ca((function(){return ls(n,t.Ea(),t.ja())})).ca((function(e){return e.getSegments([t.key()])})).ca((function(e){return{uri:t,Bd:t,data:e[0].data,headers:{}}})).finally((function(){return n.destroy()}))},nt("offline",Ms),Rs.prototype.destroy=function(){var e=this;return T((function t(){return z(t,(function(t){switch(t.s){case 1:return e.u=!1,e.h&&e.h.abort(),Ns(e),N(t,e.A,2);case 2:e.g&&e.g.Da.kb();for(var n=w(e.l),r=n.next();!r.done;r=n.next())r.value.Da.kb();e.g=null,e.l=[],e.m=null,j(t)}}))}))},$("shaka.text.SimpleTextDisplayer",js),js.prototype.remove=function(e,t){return!!this.g&&(_s(this.g,(function(n){return n.startTime<t&&n.endTime>e})),!0)},js.prototype.remove=js.prototype.remove,js.prototype.append=function(e){var t,n,r,i=Os,a=Mb(e).call(e,(function(e){if(e.nestedCues.length){var t,n=Mb(t=e.nestedCues).call(t,(function(e){return e.spacer?"\n":e.payload+" "})).join("").replace(/ $/m,"");(e=e.clone()).nestedCues=[],e.payload=n}return e})),o=[];e=this.g.cues?Yw(this.g.cues):[];for(var s={},u=(a=w(a)).next();!u.done;s={Fb:s.Fb},u=a.next())s.Fb=u.value,hS(e).call(e,function(e){return function(t){return t.startTime==e.Fb.startTime&&t.endTime==e.Fb.endTime&&t.text==e.Fb.payload}}(s))||(u=i(s.Fb))&&o.push(u);Gf(t=Nh(n=xd(o).call(o)).call(n,(function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime!=t.endTime?e.endTime-t.startTime:"line"in VTTCue.prototype?Hh(o).call(o,t)-Hh(o).call(o,e):Hh(o).call(o,e)-Hh(o).call(o,t)}))).call(t,Pw(r=function(e){this.g.addCue(e)}).call(r,this))},js.prototype.append=js.prototype.append,js.prototype.destroy=function(){return this.g&&_s(this.g,(function(){return!0})),this.g=null,Zy.resolve()},js.prototype.destroy=js.prototype.destroy,js.prototype.isTextVisible=function(){return"showing"==this.g.mode},js.prototype.isTextVisible=js.prototype.isTextVisible,js.prototype.setTextVisibility=function(e){this.g.mode=e?"showing":"hidden"},js.prototype.setTextVisibility=js.prototype.setTextVisibility,$("shaka.util.ConfigUtils.mergeConfigObjects",Ls),$("shaka.util.ConfigUtils.convertToConfigObject",Ds),$("shaka.util.PlayerConfiguration",Us),Us.mergeConfigObjects=Ks,J(Gs,We),$("shaka.Player",Gs),Gs.prototype.destroy=function(){var e=this;return T((function t(){var n;return z(t,(function(t){switch(t.s){case 1:return e.o==Ou?t.return():(e.o=Ou,n=Ps(e.Ya,(function(){return{node:e.P,payload:{Ia:null,D:null,mimeType:null,startTime:null,Rd:null,uri:null},gb:!1}})),N(t,new Zy((function(t){n.Kb=function(){ne.info("Preparing to destroy walker...")},n.Cc=function(){t(),e.dispatchEvent(new qe("loaded"))},n.kb=function(){t()},n.onError=function(){t()},n.Ec=function(){t()}})),2));case 2:return N(t,e.Ya.destroy(),3);case 3:if(e.l&&(e.l.release(),e.l=null),e.Uc=null,e.u=null,e.h=null,!e.X){t.I(0);break}return N(t,e.X.destroy(),5);case 5:e.X=null,j(t)}}))}))},Gs.prototype.destroy=Gs.prototype.destroy,Gs.version="v2.5.23";var Ws=["2","5"];tr=new function(e){this.g=e,this.i=Zn,this.h=er}(new Jn(Number(Ws[0]),Number(Ws[1])));var Xs=["output-restricted","internal-error"],Ys={};function $s(e,t){return T((function n(){var r;return z(n,(function(n){var i;switch(n.s){case 1:return e.o!=Ou&&(e.o=_u),r=Mb(i=e.Wc).call(i,(function(e){return e()})),e.Wc=[],N(n,Zy.all(r),2);case 2:if(e.dispatchEvent(new qe("unloading")),t.Ia=null,t.mimeType=null,t.startTime=null,t.uri=null,t.D&&(e.l.ta(t.D,"loadedmetadata"),e.l.ta(t.D,"playing"),e.l.ta(t.D,"pause"),e.l.ta(t.D,"ended"),e.l.ta(t.D,"ratechange")),e.wb&&(e.wb.release(),e.wb=null),e.ic&&(e.ic.stop(),e.ic=null),!e.C){n.I(3);break}return N(n,e.C.stop(),4);case 4:e.C=null;case 3:if(!e.u){n.I(5);break}return N(n,e.u.stop(),5);case 5:if(!e.j){n.I(7);break}return N(n,e.j.destroy(),8);case 8:e.j=null;case 7:if(e.J&&(e.J.release(),e.J=null),e.A&&(e.A.release(),e.A=null),!e.M){n.I(9);break}return N(n,e.M.destroy(),10);case 10:e.M=null;case 9:if(!t.D||!t.D.src){n.I(11);break}return N(n,new Zy((function(e){return new Le(e).V(.1)})),12);case 12:t.D.removeAttribute("src"),t.D.load();case 11:if(!e.m){n.I(13);break}return N(n,e.m.destroy(),14);case 14:e.m=null;case 13:e.Z.g.clear(),e.Tb=null,e.L=null,e.lc.clear(),e.i=null,e.F=null,e.fd=null,e.yb=!0,uu(e),j(n)}}))}))}function Js(e,t){return new Rt(t,e.h.drm.updateExpirationTime)}function Qs(e,t){e.L=new La,e.L.g=Ua,Da(e.L,t,Math.min(.5,t/2)),uu(e),e.ic=new Le((function(){Zs(e)})).Oa(.25)}function Zs(e){switch(e.o){case Du:var t=!!e.g.ended||tn(e.g.buffered)>=e.g.duration-1;break;case Lu:e:if(e.g.ended||Nn(e.M))t=!0;else{if(e.i.presentationTimeline.aa()){var n=e.i.presentationTimeline.Db();if(tn(e.g.buffered)>=n){t=!0;break e}}t=!1}break;default:t=!1}var r=rn(e.g.buffered,e.g.currentTime),i=t,a=(n=e.L).h.get(n.g);t=n.g,r=i||r>=a?Fa:Ua,n.g=r,t!=r&&uu(e)}function eu(e){if(e.C){var t=Xe(e.h.manifest);e.g&&"AUDIO"===e.g.nodeName&&(t.disableVideo=!0),e.C.configure(t)}if(e.m&&e.m.configure(e.h.drm),e.j){e.j.configure(e.h.streaming);try{var n,r;Gf(n=e.i.periods).call(n,Pw(r=e.Xc).call(r,e))}catch(s){e.Va(s)}var i=bo(e.j),a=wo(e.j);t=Cu(e),i=Xn.ie(i,a,t.variants),e.u&&i&&i.allowedByApplication&&i.allowedByKeySystem?fu(e,t.variants):(ne.debug("Choosing new streams after changing configuration"),hu(e,t))}if(e.M&&(t=e.h.textDisplayFactory,e.fd!=t)){i=new t;var o=(a=e.M).l;a.l=i,o&&(i.setTextVisibility(o.isTextVisible()),o.destroy()),a.g&&(a.g.i=i),e.fd=t,e.j&&(i=(t=e.j).h.get("text"))&&ko(t,i.stream,!0,0,!0)}e.u&&(e.u.configure(e.h.abr),e.h.abr.enabled&&!e.yb?e.u.enable():e.u.disable(),bu(e)),e.L&&(t=e.h.streaming.rebufferingGoal,e.i&&(t=Math.max(t,e.i.minBufferTime)),Da(e.L,t,Math.min(.5,t/2)))}function tu(e){var t;return Hb(t=Yw(e.g.textTracks)).call(t,(function(e){return"metadata"!=e.kind&&"chapters"!=e.kind&&"Shaka Player TextTrack"!=e.label}))}function nu(e,t,n,r){Ia(e.Z,t).variant=n,(e=e.F.i).i!=n&&(e.i=n,e.g.push({timestamp:CT()/1e3,id:n.id,type:"variant",fromAdaptation:r,bandwidth:n.bandwidth}))}function ru(e,t,n,r){Ma(e.Z,t,n),(e=e.F.i).h!=n&&(e.h=n,e.g.push({timestamp:CT()/1e3,id:n.id,type:"text",fromAdaptation:r,bandwidth:null}))}function iu(e){var t=Fs();return t.streaming.failureCallback=function(t){var n=[1001,1002,1003];e.aa()&&SM(n).call(n,t.code)&&(t.severity=1,ne.v("Live streaming error. Retrying automatically..."),e.Id())},t.textDisplayFactory=function(){return new js(e.g)},t}function au(e,t){var n,r,i=e.j?bo(e.j):null,a=e.j?wo(e.j):null;if(Gf(t).call(t,Pw(n=Xn.filterNewPeriod).call(n,null,e.m,i,a)),i=function(e,t){var n=0;return Gf(e).call(e,(function(e){n+=t(e)?1:0})),n}(t,(function(e){var t;return hS(t=e.variants).call(t,Xn.Gb)})),0==i)throw new re(2,4,4032);if(i<t.length)throw new re(2,4,4011);Gf(t).call(t,Pw(r=function(e){Xn.Xd(e.variants,this.h.restrictions,this.mc)&&this.j&&Cu(this)==e&&gu(this),xu(this,e.variants)}).call(r,e))}function ou(e,t,n,r){return n=void 0!==n&&n,r=void 0===r?0:r,e.yb?(e.wa=t,e.qe=n,e.oe=r,!0):((t=xo(e.j,t,n,r))&&vu(e),t)}function su(e,t){if(e.yb)return e.va=t,!0;var n=ko(e.j,t,!0,0,!1);return n&&mu(e),n}function uu(e){var t=e.jd();if(e.F&&e.L&&e.A){var n=e.J;n.j=t,Ja(n),lu(e)}e.dispatchEvent(new qe("buffering",{buffering:t}))}function cu(e){var t=e.g.playbackRate;0!=t&&e.J.set(t)}function lu(e){if(e.F&&e.L){var t=e.F.g;e.L.g==Ua?Hs(t,"buffering"):e.g.paused?Hs(t,"paused"):e.g.ended?Hs(t,"ended"):Hs(t,"playing")}}function fu(e,t){try{xu(e,t)}catch(r){return e.Va(r),null}var n=Hb(t).call(t,(function(e){return Xn.Gb(e)}));return n=e.tb.create(n),e.u.setVariants(Yw(OP(n).call(n))),e.u.chooseVariant()}function hu(e,t){var n=du(e,t,!1),r=Xn.Wb(t.textStreams,e.ua,e.Xa)[0]||null,i=!1;r&&(e.h.streaming.alwaysStreamText||e.zc())&&(ru(e,t,r,!0),i=su(e,r)),(n||i)&&pu(e)}function du(e,t,n){n=void 0===n||n;var r=fu(e,t.variants),i=!1;return r&&(nu(e,t,r,!0),i=ou(e,r,!0)),n&&i&&pu(e),i}function pu(e){ku(e,new qe("adaptation"))}function gu(e){ku(e,new qe("trackschanged"))}function vu(e){ku(e,new qe("variantchanged"))}function mu(e){ku(e,new qe("textchanged"))}function yu(e){ku(e,new qe("texttrackvisibility"))}function bu(e){ku(e,new qe("abrstatuschanged",{Zg:e.h.abr.enabled}))}function wu(e,t,n){e.dispatchEvent(new qe(t,{detail:{schemeIdUri:n.schemeIdUri,value:n.value,startTime:n.startTime,endTime:n.endTime,id:n.id,eventElement:n.eventElement}}))}function Su(e){if(!e.g.error)return null;var t=e.g.error.code;if(1==t)return null;var n=e.g.error.msExtendedCode;return n&&(0>n&&(n+=Math.pow(2,32)),n=n.toString(16)),new re(2,3,3016,t,n,e.g.error.message)}function Tu(e,t){if(e.j){var n,r=Cu(e),i=!1,a=ad(t);0==a.length&&ne.v("Got a key status event without any key statuses, so we don't know the real key statuses. If we don't have all the keys, you'll need to set restrictions so we don't select those tracks.");var o=1==a.length&&"00"==a[0];o&&ne.v("Got a synthetic key status event, so we don't know the real key statuses. If we don't have all the keys, you'll need to set restrictions so we don't select those tracks."),a.length&&Gf(n=e.i.periods).call(n,(function(e){var n;Gf(n=e.variants).call(n,(function(e){var n;Gf(n=Xn.Kf(e)).call(n,(function(n){var r=e.allowedByKeySystem;n.keyId&&(n=t[o?"00":n.keyId],e.allowedByKeySystem=!!n&&!SM(Xs).call(Xs,n)),r!=e.allowedByKeySystem&&(i=!0)}))}))})),a=bo(e.j);var s=wo(e.j);(a=Xn.ie(a,s,r.variants))&&!a.allowedByKeySystem&&(ne.debug("Choosing new variants after key status changed"),du(e,r)),i&&(gu(e),fu(e,r.variants))}}function Eu(e,t,n){e.C&&e.C.onExpirationUpdated&&e.C.onExpirationUpdated(t,n),e.dispatchEvent(new qe("expirationupdated"))}function xu(e,t){var n=e.m?vt(e.m.da):{},r=ad(n);r=r.length&&"00"==r[0];for(var i=!1,a=!1,o=[],s=[],u=w(t),c=u.next();!c.done;c=u.next()){var l=[];(c=c.value).audio&&l.push(c.audio),c.video&&l.push(c.video);for(var f=(l=w(l)).next();!f.done;f=l.next())if((f=f.value).keyId){var h=n[r?"00":f.keyId];h?SM(Xs).call(Xs,h)&&(SM(s).call(s,h)||s.push(h)):SM(o).call(o,f.keyId)||o.push(f.keyId)}c.allowedByApplication?c.allowedByKeySystem&&(i=!0):a=!0}if(!i)throw new re(2,4,4012,{hasAppRestrictions:a,missingKeys:o,restrictedKeyStatuses:s})}function ku(e,t){T((function n(){return z(n,(function(n){switch(n.s){case 1:return N(n,Zy.resolve(),2);case 2:e.o!=Ou&&e.dispatchEvent(t),j(n)}}))}))}function Au(e){for(var t=new $O,n=(e=w(e)).next();!n.done;n=e.next())(n=n.value).language?t.add(zn(n.language)):t.add("und");return t}function Mu(e){for(var t=new AP,n=(e=w(e)).next();!n.done;n=e.next()){var r=n.value;n="und";var i=[];for(r.language&&(n=zn(r.language)),(i="variant"==r.type?r.audioRoles:r.roles)&&i.length||(i=[""]),t.has(n)||t.set(n,new $O),i=(r=w(i)).next();!i.done;i=r.next())i=i.value,t.get(n).add(i)}var a=[];return Gf(t).call(t,(function(e,t){for(var n=w(e),r=n.next();!r.done;r=n.next())a.push({language:t,role:r.value})})),a}function Iu(e){var t;return null==(e=Cu(e))?[]:Hb(t=e.variants).call(t,(function(e){return Xn.Gb(e)}))}function Cu(e){for(var t=e.A.l(),n=null,r=(e=w(e.i.periods)).next();!r.done;r=e.next())(r=r.value).startTime<=t&&(n=r);return n}function Ru(e){var t=Cu(e);return Ia(e.Z,t).variant}function Pu(){return new re(2,7,7e3)}function Nu(e,t,n,r,i,a){return r==e&&i.D==a.D&&i.uri==a.uri&&i.mimeType==a.mimeType&&i.Ia==a.Ia?t:n}function ju(e){return new Zy((function(t,n){e.kb=function(){return n(Pu())},e.Cc=function(){return t()},e.onError=function(e){return n(e)},e.Ec=function(){return n(Pu())}}))}Gs.registerSupportPlugin=function(e,t){Ys[e]=t},Gs.isBrowserSupported=function(){if(!(Zy&&e.Uint8Array&&Gf(Array.prototype)))return!1;var t=kt();return!(t&&12>t||!(e.MediaKeys&&e.navigator&&e.navigator.requestMediaKeySystemAccess&&e.MediaKeySystemAccess&&e.MediaKeySystemAccess.prototype.getConfiguration))&&(!!St()||Tt("application/x-mpegurl"))},Gs.probeSupport=function(){return zt().then((function(e){for(var t=Ci.ng(),n={},r=w('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",")),i=r.next();!i.done;i=r.next()){n[i=i.value]=St()?!!kn(i)||MediaSource.isTypeSupported(i)||je(i):Tt(i);var a=i.split(";")[0];n[a]=n[a]||n[i]}for(var o in e={manifest:t,media:n,drm:e},Ys)e[o]=Ys[o]();return e}))},Gs.prototype.Ub=function(e,t){if(t=void 0===t||t,this.o==Ou)return Zy.reject(Pu());var n={Ia:null,D:null,mimeType:null,startTime:null,Rd:null,uri:null};n.D=e,St()||(t=!1);var r=t?this.vb:this.da,i=Ps(this.Ya,(function(){return{node:r,payload:n,gb:!1}}));return i.Kb=function(){return ne.info("Starting attach...")},ju(i)},Gs.prototype.attach=Gs.prototype.Ub,Gs.prototype.detach=function(){var e=this;if(this.o==Ou)return Zy.reject(Pu());var t=Ps(this.Ya,(function(){return{node:e.P,payload:{Ia:null,D:null,mimeType:null,startTime:null,Rd:null,uri:null},gb:!1}}));return t.Kb=function(){return ne.info("Starting detach...")},ju(t)},Gs.prototype.detach=Gs.prototype.detach,Gs.prototype.Ud=function(e){var t=this;if(e=void 0===e||e,this.o==Ou)return Zy.reject(Pu());St()||(e=!1);var n={Ia:null,D:null,mimeType:null,startTime:null,Rd:null,uri:null},r=Ps(this.Ya,(function(r){var i=r.D&&e?t.vb:r.D?t.da:t.P;return n.D=r.D,{node:i,payload:n,gb:!1}}));return r.Kb=function(){return ne.info("Starting unload...")},ju(r)},Gs.prototype.unload=Gs.prototype.Ud,Gs.prototype.load=function(e,t,n){if(this.o==Ou)return Zy.reject(Pu());this.dispatchEvent(new qe("loading"));var r={Ia:null,D:null,mimeType:null,startTime:null,Rd:null,uri:null};r.uri=e,r.Rd=CT()/1e3,n&&"string"!=typeof n&&(Qn("Loading with a manifest parser factory","Please register a manifest parser and for the mime-type."),r.Ia=function(){return new n}),n&&"string"==typeof n&&(r.mimeType=n),void 0!==t&&(r.startTime=t);var i=function(e,t){if(t.Ia)return!1;if(!St())return!0;var n=t.mimeType,r=t.uri||"";return n||(n={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"}[Ci.getExtension(r)]),!!n&&""!=(t.D||Mt()).canPlayType(n)&&(!Ci.isSupported(r,n)||xt()&&e.h.streaming.useNativeHlsOnSafari)}(this,r)?this.xb:this.ea,a=Ps(this.Ya,(function(e){return null==e.D?null:(r.D=e.D,{node:i,payload:r,gb:!0})}));return a.Kb=function(){return ne.info("Starting load of "+e+"...")},new Zy((function(e,t){a.Ec=function(){return t(new re(2,7,7002))},a.Cc=function(){return e()},a.kb=function(){return t(Pu())},a.onError=function(e){return t(e)}}))},Gs.prototype.load=Gs.prototype.load,Gs.prototype.configure=function(e,t){2==arguments.length&&"string"==typeof e&&(e=Ds(e,t));var n=Ks(this.h,e,iu(this));return eu(this),n},Gs.prototype.configure=Gs.prototype.configure,Gs.prototype.getConfiguration=function(){var e=iu(this);return Ks(e,this.h,iu(this)),e},Gs.prototype.getConfiguration=Gs.prototype.getConfiguration,Gs.prototype.vg=function(){for(var e in this.h)delete this.h[e];Ks(this.h,iu(this),iu(this)),eu(this)},Gs.prototype.resetConfiguration=Gs.prototype.vg,Gs.prototype.tf=function(){return this.o},Gs.prototype.getLoadMode=Gs.prototype.tf,Gs.prototype.yf=function(){return this.g},Gs.prototype.getMediaElement=Gs.prototype.yf,Gs.prototype.Yb=function(){return this.X},Gs.prototype.getNetworkingEngine=Gs.prototype.Yb,Gs.prototype.tc=function(){return this.Tb},Gs.prototype.getAssetUri=Gs.prototype.tc,Gs.prototype.wf=function(){return Qn("getManifestUri",'Please use "getAssetUri" instead.'),this.tc()},Gs.prototype.getManifestUri=Gs.prototype.wf,Gs.prototype.aa=function(){return this.i?this.i.presentationTimeline.aa():!(!this.g||!this.g.src)&&1/0==this.g.duration},Gs.prototype.isLive=Gs.prototype.aa,Gs.prototype.ib=function(){return!!this.i&&this.i.presentationTimeline.ib()},Gs.prototype.isInProgress=Gs.prototype.ib,Gs.prototype.Qf=function(){if(this.i){if(!this.i.periods.length)return!1;var e=this.i.periods[0].variants;return!!e.length&&!e[0].video}return!(!this.g||!this.g.src)&&(this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight)},Gs.prototype.isAudioOnly=Gs.prototype.Qf,Gs.prototype.He=function(){if(this.i){var e=this.i.presentationTimeline;return{start:e.Cb(),end:e.Ka()}}return this.g&&this.g.src&&(e=this.g.seekable).length?{start:e.start(0),end:e.end(e.length-1)}:{start:0,end:0}},Gs.prototype.seekRange=Gs.prototype.He,Gs.prototype.keySystem=function(){return Lt(this.drmInfo())},Gs.prototype.keySystem=Gs.prototype.keySystem,Gs.prototype.drmInfo=function(){return this.m?this.m.g:null},Gs.prototype.drmInfo=Gs.prototype.drmInfo,Gs.prototype.Xb=function(){return this.m?this.m.Xb():1/0},Gs.prototype.getExpiration=Gs.prototype.Xb,Gs.prototype.jd=function(){return!!this.L&&this.L.g==Ua},Gs.prototype.isBuffering=Gs.prototype.jd,Gs.prototype.Cf=function(){if(this.J){var e=this.J;e=e.j?0:e.i}else e=0;return e},Gs.prototype.getPlaybackRate=Gs.prototype.Cf,Gs.prototype.Mg=function(e){0==e?ne.ba("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.J&&this.J.set(e),this.o==Lu&&Eo(this.j,1<Math.abs(e)))},Gs.prototype.trickPlay=Gs.prototype.Mg,Gs.prototype.$e=function(){var e=this.J.vc();this.o==Du&&this.J.set(e),this.o==Lu&&(this.J.set(e),Eo(this.j,!1))},Gs.prototype.cancelTrickPlay=Gs.prototype.$e,Gs.prototype.ed=function(){var e;if(this.i&&this.A){for(var t=Ru(this),n=[],r=w(Iu(this)),i=r.next();!i.done;i=r.next()){i=i.value;var a=Xn.Oc(i);a.active=i==t,n.push(a)}return n}return this.g&&this.g.audioTracks?Mb(e=Yw(this.g.audioTracks)).call(e,(function(e){return Xn.je(e)})):[]},Gs.prototype.getVariantTracks=Gs.prototype.ed,Gs.prototype.Eb=function(){var e;if(this.i&&this.A){for(var t=function(e){var t=Cu(e);if(null==t)return null;if(!Ia(e.Z,t).text){var n=Xn.Wb(t.textStreams,e.ua,e.Xa);n.length&&Ma(e.Z,t,n[0])}return Ia(e.Z,t).text}(this),n=[],r=w(function(e){var t,n=Cu(e);return null==n?[]:Hb(t=n.textStreams).call(t,(function(t){return!e.lc.has(t)}))}(this)),i=r.next();!i.done;i=r.next()){i=i.value;var a=Xn.Kc(i);a.active=i==t,n.push(a)}return n}return this.g&&this.g.src&&this.g.textTracks?Mb(e=tu(this)).call(e,(function(e){return Xn.Of(e)})):[]},Gs.prototype.getTextTracks=Gs.prototype.Eb,Gs.prototype.Ld=function(e){if(this.i&&this.j){var t,n=Cu(this),r=Jh(t=n.textStreams).call(t,(function(t){return t.id==e.id}));r?(ru(this,n,r,!1),su(this,r),this.ua=r.language):ne.error("No stream with id",e.id)}else if(this.g&&this.g.src&&this.g.textTracks){for(r=(n=w(n=tu(this))).next();!r.done;r=n.next())r=r.value,Xn.gd(r)==e.id?r.mode=this.ub?"showing":"hidden":r.mode="disabled";mu(this)}},Gs.prototype.selectTextTrack=Gs.prototype.Ld,Gs.prototype.xg=function(){var e;Qn("selectEmbeddedTextTrack","If closed captions are signaled in the manifest, a text stream will be created to represent them. Please use SelectTextTrack.");var t=Hb(e=this.Eb()).call(e,(function(e){return"application/cea-608"==e.mimeType}));0<t.length?this.Ld(t[0]):ne.v("Unable to find the text track embedded in the video.")},Gs.prototype.selectEmbeddedTextTrack=Gs.prototype.xg,Gs.prototype.Rg=function(){var e;Qn("usingEmbeddedTextTrack","If closed captions are signaled in the manifest, a text stream will be created to represent them. There should be no reason to know if the player is playing embedded text.");var t=Hb(e=this.Eb()).call(e,(function(e){return e.active}))[0];return!!t&&"application/cea-608"==t.mimeType},Gs.prototype.usingEmbeddedTextTrack=Gs.prototype.Rg,Gs.prototype.Ie=function(e,t,n){if(n=void 0===n?0:n,this.i&&this.j){var r,i=Cu(this);this.h.abr.enabled&&ne.ba("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var a=Jh(r=i.variants).call(r,(function(t){return t.id==e.id}));a?Xn.Gb(a)?(nu(this,i,a,!1),ou(this,a,t,n),this.tb=new Oa(a),fu(this,i.variants)):ne.error("Unable to switch to restricted track",e.id):ne.error("No variant with id",e.id)}else if(this.g&&this.g.audioTracks){for(n=(t=w(t=Yw(this.g.audioTracks))).next();!n.done;n=t.next())n=n.value,Xn.gd(n)==e.id&&(n.enabled=!0);vu(this)}},Gs.prototype.selectVariantTrack=Gs.prototype.Ie,Gs.prototype.nf=function(){return Mu(this.ed())},Gs.prototype.getAudioLanguagesAndRoles=Gs.prototype.nf,Gs.prototype.Jf=function(){return Mu(this.Eb())},Gs.prototype.getTextLanguagesAndRoles=Gs.prototype.Jf,Gs.prototype.mf=function(){return Yw(Au(this.ed()))},Gs.prototype.getAudioLanguages=Gs.prototype.mf,Gs.prototype.If=function(){return Yw(Au(this.Eb()))},Gs.prototype.getTextLanguages=Gs.prototype.If,Gs.prototype.Jd=function(e,t){if(this.i&&this.A){var n=Cu(this);if(this.tb=new _a(e,t||"",0,""),!this.h.abr.enabled){var r=function(e,t){return e.video||t.video?e.video&&t.video?Math.abs((e.video.height||0)-(t.video.height||0))+Math.abs((e.video.width||0)-(t.video.width||0)):1/0:0},i=Cu(this)||this.i.periods[0],a=Ia(this.Z,i).variant,o=this.tb.create(i.variants);i=null;for(var s=(o=w(OP(o).call(o))).next();!s.done;s=o.next())s=s.value,(!i||r(i,a)>r(s,a))&&(i=s);if(i)return n=Xn.Oc(i),void this.Ie(n,!0)}du(this,n)}else if(this.g&&this.g.audioTracks){for(i=Yw(this.g.audioTracks),n=zn(e),a=r=null,o=(i=w(i)).next();!o.done;o=i.next()){var u;o=o.value,zn((s=Xn.je(o)).language)==n&&(r=o,t?SM(u=s.roles).call(u,t)&&(a=o):0==s.roles.length&&(a=o))}a?(a.enabled=!0,vu(this)):r&&(r.enabled=!0,vu(this))}},Gs.prototype.selectAudioLanguage=Gs.prototype.Jd,Gs.prototype.Kd=function(e,t){if(this.i&&this.A){var n=Cu(this);this.ua=e,this.Xa=t||"";var r=Xn.Wb(n.textStreams,this.ua,this.Xa)[0]||null;r&&(ru(this,n,r,!1),(this.h.streaming.alwaysStreamText||this.zc())&&su(this,r))}else{var i,a=zn(e);(n=Hb(i=this.Eb()).call(i,(function(e){var n;return zn(e.language)==a&&(!t||SM(n=e.roles).call(n,t))}))[0])&&this.Ld(n)}},Gs.prototype.selectTextLanguage=Gs.prototype.Kd,Gs.prototype.yg=function(e){if(this.i&&this.A){for(var t=Cu(this),n=null,r=w(Iu(this)),i=r.next();!i.done;i=r.next())if((i=i.value).audio.label==e){n=i;break}null==n?ne.v("No variants were found with label: "+e+". Ignoring the request to switch."):(this.tb=new _a(n.language,"",0,e),du(this,t))}},Gs.prototype.selectVariantsByLabel=Gs.prototype.yg,Gs.prototype.zc=function(){var e,t=this.ub;return this.M?this.M.l.isTextVisible():this.g&&this.g.src&&this.g.textTracks?hS(e=tu(this)).call(e,(function(e){return"showing"==e.mode})):t},Gs.prototype.isTextTrackVisible=Gs.prototype.zc,Gs.prototype.Bg=function(e){var t=this;return T((function n(){var r,i,a,o;return z(n,(function(n){switch(n.s){case 1:if(t.ub==(r=!!e))return n.return();if(t.ub=r,t.o!=Lu){if(t.g&&t.g.src&&t.g.textTracks)for(var s=w(tu(t)),u=s.next();!u.done;u=s.next())"disabled"!=(i=u.value).mode&&(i.mode=r?"showing":"hidden");n.I(2);break}if(t.M.l.setTextVisibility(r),t.h.streaming.alwaysStreamText){n.I(2);break}if(!r){!function(e){e.L=!0;var t=e.h.get("text");t&&(Vo(t),zo(t).catch((function(){})),e.h.delete("text"))}(t.j),n.I(2);break}if(So(t.j,"text")){n.I(2);break}if(a=Cu(t),!(0<(o=Xn.Wb(a.textStreams,t.ua,t.Xa)).length)){n.I(2);break}return N(n,To(t.j,o[0]),2);case 2:yu(t),j(n)}}))}))},Gs.prototype.setTextTrackVisibility=Gs.prototype.Bg,Gs.prototype.Ef=function(){if(!this.aa())return ne.v("getPlayheadTimeAsDate is for live streams!"),null;var e=this.Ya.j,t=0;if(this.A)t=this.A.l();else if(e){if(null==e.startTime)return new Date;t=e.startTime}return this.i?new Date(1e3*(this.i.presentationTimeline.j+this.g.currentTime)):this.g&&this.g.getStartDate?(e=this.g.getStartDate(),isNaN(e.getTime())?(ne.v("EXT-X-PROGRAM-DATETIME required to get playhead time as Date!"),null):new Date(e.getTime()+1e3*t)):(ne.v("No way to get playhead time as Date!"),null)},Gs.prototype.getPlayheadTimeAsDate=Gs.prototype.Ef,Gs.prototype.Gf=function(){if(!this.aa())return ne.v("getPresentationStartTimeAsDate is for live streams!"),null;if(this.i)return new Date(1e3*this.i.presentationTimeline.j);if(this.g&&this.g.getStartDate){var e=this.g.getStartDate();return isNaN(e.getTime())?(ne.v("EXT-X-PROGRAM-DATETIME required to get presentation start time as Date!"),null):e}return ne.v("No way to get presentation start time as Date!"),null},Gs.prototype.getPresentationStartTimeAsDate=Gs.prototype.Gf,Gs.prototype.bd=function(){var e={total:[],audio:[],video:[],text:[]};return this.o==Du&&(e.total=an(this.g.buffered)),this.o==Lu&&this.M.bd(e),e},Gs.prototype.getBufferedInfo=Gs.prototype.bd,Gs.prototype.getStats=function(){if(this.o!=Lu&&this.o!=Du)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,switchHistory:[],stateHistory:[]};lu(this);var e=this.g;if(e.getVideoPlaybackQuality){e=e.getVideoPlaybackQuality();var t=this.F,n=Number(e.totalVideoFrames);t.A=Number(e.droppedVideoFrames),t.u=n,this.F.o=Number(e.corruptedVideoFrames)}e=this.m&&(e=this.m).P?e.P:NaN,this.F.m=e,this.o==Lu&&((e=Ru(this))&&(this.F.C=e.bandwidth),e&&e.video&&(t=this.F,n=e.video.height||NaN,t.F=e.video.width||NaN,t.l=n),e=this.u.getBandwidthEstimate(),this.F.j=e);var r=this.F;e=r.F,t=r.l,n=r.C;for(var i=r.u,a=r.A,o=r.o,s=r.j,u=r.h,c=Vs(r.g,"playing"),l=Vs(r.g,"paused"),f=Vs(r.g,"buffering"),h=r.m,d=function(e){function t(e){return{timestamp:e.timestamp,state:e.state,duration:e.duration}}for(var n=[],r=w(e.h),i=r.next();!i.done;i=r.next())n.push(t(i.value));return e.g&&n.push(t(e.g)),n}(r.g),p=[],g=(r=w(r.i.g)).next();!g.done;g=r.next())g=g.value,p.push({timestamp:g.timestamp,id:g.id,type:g.type,fromAdaptation:g.fromAdaptation,bandwidth:g.bandwidth});return{width:e,height:t,streamBandwidth:n,decodedFrames:i,droppedFrames:a,corruptedFrames:o,estimatedBandwidth:s,loadLatency:u,playTime:c,pauseTime:l,bufferingTime:f,licenseTime:h,stateHistory:d,switchHistory:p}},Gs.prototype.getStats=Gs.prototype.getStats,Gs.prototype.addTextTrack=function(e,t,n,r,i,a){var o=this;return T((function s(){var u,c,l,f,h,d,p,g,v;return z(s,(function(s){var m,y;switch(s.s){case 1:if(o.o==Du)throw ne.error("Cannot add text when loaded with src="),Error("State error!");if(o.o!=Lu)throw ne.error("Must call load() and wait for it to resolve before adding text tracks."),Error("State error!");if(u=Cu(o),c=Se,l=Hh(m=o.i.periods).call(m,u),h=(f=l+1)>=o.i.periods.length?o.i.presentationTimeline.ha():o.i.periods[f].startTime,1/0==(d=h-u.startTime))throw new re(1,4,4033);return p=new fi(1,0,d,(function(){return[e]}),0,null),g={id:o.re++,originalId:null,createSegmentIndex:Pw(y=Zy.resolve).call(y,Zy),findSegmentPosition:function(){return 1},getSegmentReference:function(e){return 1==e?p:null},initSegmentReference:null,presentationTimeOffset:0,mimeType:r,codecs:i||"",kind:n,encrypted:!1,keyId:null,language:t,label:a||null,type:c.za,primary:!1,frameRate:void 0,pixelAspectRatio:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null},o.lc.add(g),u.textStreams.push(g),N(s,To(o.j,g),2);case 2:return(v=So(o.j,"text"))&&Ma(o.Z,u,v),o.lc.delete(g),ne.debug("Choosing new streams after adding a text stream"),hu(o,u),gu(o),s.return(Xn.Kc(g))}}))}))},Gs.prototype.addTextTrack=Gs.prototype.addTextTrack,Gs.prototype.Nd=function(e,t){this.mc.width=e,this.mc.height=t},Gs.prototype.setMaxHardwareResolution=Gs.prototype.Nd,Gs.prototype.Id=function(){if(this.o==Lu){var e=this.j;if(e.j)ne.error("Unable to retry after StreamingEngine is destroyed!"),e=!1;else if(e.A)ne.error("Unable to retry after StreamingEngine encountered a fatal error!"),e=!1;else{for(var t=w(OP(r=e.h).call(r)),n=t.next();!n.done;n=t.next()){var r,i=Go(n=n.value);n.ac&&(ne.info(i,"Retrying after failure..."),n.ac=!1,Ho(e,n,.1))}e=!0}}else e=!1;return e},Gs.prototype.retryStreaming=Gs.prototype.Id,Gs.prototype.uf=function(){return this.i},Gs.prototype.getManifest=Gs.prototype.uf,Gs.prototype.vf=function(){return this.C?this.C.constructor:null},Gs.prototype.getManifestParserFactory=Gs.prototype.vf,(f=Gs.prototype).Xc=function(e){var t=this.j?bo(this.j):null,n=this.j?wo(this.j):null;if(Xn.filterNewPeriod(this.m,t,n,e),t=e.variants,!hS(t).call(t,Xn.Gb))throw new re(2,4,4011);if(xu(this,e.variants),Xn.Xd(t,this.h.restrictions,this.mc)&&this.j&&Cu(this)==e&&gu(this),(e=this.m?this.m.g:null)&&this.m.o)for(n=(t=w(t)).next();!n.done;n=t.next())for(var r=(n=w(n.value.drmInfos)).next();!r.done;r=n.next())if((r=r.value).keySystem==e.keySystem)for(var i=(r=w(r.initData||[])).next();!i.done;i=r.next())i=i.value,_t(this.m,i.initDataType,i.initData)},f.Vf=function(e){ne.debug("onChooseStreams_",e);try{var t,n;ne.O("onChooseStreams_, choosing variant from ",e.variants),ne.O("onChooseStreams_, choosing text from ",e.textStreams),this.yb=!0,this.u.disable(),bu(this),ne.debug("Choosing new streams after period changed");var r=fu(this,e.variants),i=Xn.Wb(e.textStreams,this.ua,this.Xa)[0]||null;this.wa&&(SM(t=e.variants).call(t,this.wa)&&(r=this.wa),this.wa=null),this.va&&(SM(n=e.textStreams).call(n,this.va)&&(i=this.va),this.va=null),r&&nu(this,e,r,!0),i&&ru(this,e,i,!0);var a=this.j,o=a.h.get("video");if(o)var s=a.i.periods[o.oa];else{var u=a.h.get("audio");s=u?a.i.periods[u.oa]:null}var c=r?r.audio:null;if(!s&&i){var l;if(l=c){e=i;var f=zn(this.h.preferredTextLanguage),h=zn(c.language),d=zn(e.language);l=Hn(d,f)&&!Hn(h,d)}l&&(this.ub=!0),this.ub&&this.M.l.setTextVisibility(!0),yu(this)}var p=this.h.streaming.alwaysStreamText||this.zc()?{variant:r,text:i}:{variant:r,text:null};return ne.O("onChooseStreams_, chose variant ",p.variant),ne.O("onChooseStreams_, chose text ",p.text),p}catch(g){return this.Va(g),{variant:null,text:null}}},f.Ze=function(){ne.debug("canSwitch_"),this.yb=!1,this.h.abr.enabled&&(this.u.enable(),bu(this)),this.wa&&(xo(this.j,this.wa,this.qe,this.oe),vu(this),this.wa=null),this.va&&(ko(this.j,this.va,!0,0,!1),mu(this),this.va=null)},f.$f=function(){this.C&&this.C.update&&this.C.update()},f.eg=function(){this.A&&this.A.C()},f.Va=function(e){if(this.o!=Ou){var t=new qe("error",{detail:e});this.dispatchEvent(t),t.defaultPrevented&&(e.handled=!0)}};var Ou=0,_u=1,Lu=2,Du=3;function Uu(e,t){var n=Es(new Ts(e.Ea(),e.ja()),t.periods[0],new Ri(null,0)),r=t.appMetadata||{};return n=Fu(n),{offlineUri:e.toString(),originalManifestUri:t.originalManifestUri,duration:t.duration,size:t.size,expiration:t.expiration,tracks:n,appMetadata:r}}function Fu(e){for(var t=[],n=Xn.Bf(e.variants),r=(n=w(n)).next();!r.done;r=n.next())t.push(Xn.Oc(r.value));for(n=(e=w(e.textStreams)).next();!n.done;n=e.next())t.push(Xn.Kc(n.value));return t}function Ku(){this.g={}}function Bu(e,t){var n=t.audio,r=t.video;if(n&&!r&&(e.g[n.id]=n.bandwidth||t.bandwidth),!n&&r&&(e.g[r.id]=r.bandwidth||t.bandwidth),n&&r){var i=n.bandwidth||393216,a=r.bandwidth||t.bandwidth-i;0>=a&&(ne.v("Audio bit rate consumes variants bandwidth. Setting video bandwidth to match variant's bandwidth."),a=t.bandwidth),e.g[n.id]=i,e.g[r.id]=a}}function Hu(e,t){var n=e.g[t];return null==n&&(n=0,ne.error("Asking for bitrate of stream not given to the estimator")),0==n&&ne.v("Using bitrate of 0, this stream won't affect progress"),n}function Vu(e){this.g=!1,this.h=new Ee,this.i=e}function zu(e){var t,n=new Gu;Gf(t=e.periods).call(t,(function(e,t){var r=Xu(e.variants);if(0==t)for(var i=(r=w(r.g)).next();!i.done;i=r.next())n.add(i.value);else!function(e,t){var n;e.g=Hb(n=e.g).call(n,(function(e){return Wu(t,e)}))}(n,r)}));for(var r=(e=w(e.periods)).next();!r.done;r=e.next()){var i;(r=r.value).variants=Hb(i=r.variants).call(i,(function(e){return Wu(n,new qu(e))}))}}function qu(e){var t=e.audio;e=e.video,this.h=t?t.mimeType:null,this.g=t?t.codecs.split(".")[0]:null,this.j=e?e.mimeType:null,this.i=e?e.codecs.split(".")[0]:null}function Gu(){this.g=[]}function Wu(e,t){var n;return hS(n=e.g).call(n,(function(e){return t.h==e.h&&t.g==e.g&&t.j==e.j&&t.i==e.i}))}function Xu(e){for(var t=new Gu,n=(e=w(e)).next();!n.done;n=e.next())t.add(new qu(n.value));return t}function Yu(e){var t=this;if(e&&e.constructor!=Gs)throw new re(2,9,9008);this.h=this.g=null,e?(this.g=e.h,this.h=e.Yb()):(this.g=Fs(),this.h=new et),this.j=!1,this.i=[],this.l=[];var n=!e;this.m=new Vu((function(){return T((function e(){var r;return z(e,(function(e){var i;switch(e.s){case 1:return r=function(){},N(e,Zy.all(Mb(i=t.l).call(i,(function(e){return e.then(r,r)}))),2);case 2:if(!n){e.I(3);break}return N(e,t.h.destroy(),3);case 3:t.g=null,t.h=null,j(e)}}))}))}))}function $u(){if(St())e:{for(var e=w(OP(hs).call(hs)),t=e.next();!t.done;t=e.next())if(t=(t=t.value)()){t.destroy(),e=!0;break e}e=!1}else e=!1;return e}function Ju(e,t){for(var n=[],r=w(e.periods),i=r.next();!i.done;i=r.next())for(var a=(i=w(i.value.streams)).next();!a.done;a=i.next())a=a.value,t&&"video"==a.contentType?n.push({contentType:mt(a.mimeType,a.codecs),robustness:e.drmInfo.videoRobustness}):t||"audio"!=a.contentType||n.push({contentType:mt(a.mimeType,a.codecs),robustness:e.drmInfo.audioRobustness});return n}function Qu(e,t,n){return T((function r(){return z(r,(function(r){if(1===r.s)return N(r,function(e,t,n,r){return T((function i(){var a,o,s;return z(i,(function(i){var u;switch(i.s){case 1:return r.drmInfo?(a=function(e){var t,n=Yw(Lb(t=e.g).call(t));if(!n.length)throw new re(2,9,9e3,"No supported storage mechanisms found");return e.g.get(n[0]).getEmeSessionCell()}(n),o=Mb(u=r.sessionIds).call(u,(function(e){return{sessionId:e,keySystem:r.drmInfo.keySystem,licenseUri:r.drmInfo.licenseServerUri,serverCertificate:r.drmInfo.serverCertificate,audioCapabilities:Ju(r,!1),videoCapabilities:Ju(r,!0)}})),N(i,Is(t,e,o),2)):i.return();case 2:return s=i.B,N(i,a.remove(s),3);case 3:return N(i,a.add(Hb(o).call(o,(function(e){return-1==Hh(s).call(s,e.sessionId)}))),0)}}))}))}(e.h,e.g.drm,n,t),0)}))}))}function Zu(e,t,n,r){function i(){s+=1,e.g.offline.progressCallback(u,s/o)}var a=function(e){var t,n=[];return Gf(t=e.periods).call(t,(function(e){var t;Gf(t=e.streams).call(t,(function(e){var t;null!=e.initSegmentKey&&n.push(e.initSegmentKey),Gf(t=e.segments).call(t,(function(e){n.push(e.dataKey)}))}))})),n}(r),o=a.length+1,s=0,u=Uu(n,r);return Zy.all([t.removeSegments(a,i),t.removeManifests([n.key()],i)])}function ec(e,t,n,r,i,a){var o={id:a.id,originalId:a.originalId,primary:a.primary,presentationTimeOffset:a.presentationTimeOffset||0,contentType:a.type,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,kind:a.kind,language:a.language,label:a.label,width:a.width||null,height:a.height||null,initSegmentKey:null,encrypted:a.encrypted,keyId:a.keyId,segments:[],variantIds:[]};i=i.presentationTimeline.$b();var s=a.id,u=a.initSegmentReference;return u&&(u=Pi(u.i(),u.h,u.g,e.g.streaming.retryParameters),Qo(t,s,u,.5*Hu(r,a.id),!0,(function(t){return T((function r(){var i;return z(r,(function(r){switch(r.s){case 1:return N(r,n.addSegments([{data:t}]),2);case 2:i=r.B,e.i.push(i[0]),o.initSegmentKey=i[0],j(r)}}))}))}))),function(e,t,n){for(var r=null==(t=e.findSegmentPosition(t))?null:e.getSegmentReference(t);r;)n(r),r=e.getSegmentReference(++t)}(a,i,(function(i){var u=Pi(i.i(),i.h,i.g,e.g.streaming.retryParameters);Qo(t,s,u,function(e,t,n){return n=n.endTime-n.startTime,Hu(e,t)*n}(r,a.id,i),!1,(function(t){return T((function r(){var a;return z(r,(function(r){switch(r.s){case 1:return N(r,n.addSegments([{data:t}]),2);case 2:a=r.B,e.i.push(a[0]),o.segments.push({startTime:i.startTime,endTime:i.endTime,dataKey:a[0]}),j(r)}}))}))}))})),o}function tc(e){if(e.m.g)throw new re(2,9,7001)}function nc(){if(!$u())throw new re(2,9,9e3)}function rc(e,t){return T((function n(){return z(n,(function(n){switch(n.s){case 1:return e.l.push(t),_(n,2),N(n,t,4);case 4:return n.return(n.B);case 2:U(n),$e(e.l,t),F(n,0)}}))}))}function ic(e){var t,n,r=new $O(Mb(t=e.variants).call(t,(function(e){return e.video}))),i=new $O(Mb(n=e.variants).call(n,(function(e){return e.audio})));e=e.textStreams,1<r.size&&ne.v("Multiple video tracks selected to be stored");for(var a=(r=w(i)).next();!a.done;a=r.next()){a=a.value;for(var o=w(i),s=o.next();!s.done;s=o.next())a!=(s=s.value)&&a.language==s.language&&ne.v("Similar audio tracks were selected to be stored",a.id,s.id)}for(r=(i=w(e)).next();!r.done;r=i.next())for(r=r.value,o=(a=w(e)).next();!o.done;o=a.next())r!=(o=o.value)&&r.language==o.language&&ne.v("Similar text tracks were selected to be stored",r.id,o.id)}Gs.LoadMode={DESTROYED:Ou,NOT_LOADED:_u,MEDIA_SOURCE:Lu,SRC_EQUALS:Du},Vu.prototype.destroy=function(){var e=this;return this.g?this.h:(this.g=!0,this.i().then((function(){e.h.resolve()}),(function(){e.h.resolve()})))},Gu.prototype.add=function(e){Wu(this,e)||this.g.push(e)},$("shaka.offline.Storage",Yu),Yu.support=$u,Yu.prototype.destroy=function(){return this.m.destroy()},Yu.prototype.destroy=Yu.prototype.destroy,Yu.prototype.configure=function(e,t){2==arguments.length&&"string"==typeof e&&(e=Ds(e,t));var n=e,r=!1;return null!=n.trackSelectionCallback&&(r=!0,n.offline=n.offline||{},n.offline.trackSelectionCallback=n.trackSelectionCallback,delete n.trackSelectionCallback),null!=n.progressCallback&&(r=!0,n.offline=n.offline||{},n.offline.progressCallback=n.progressCallback,delete n.progressCallback),null!=n.usePersistentLicense&&(r=!0,n.offline=n.offline||{},n.offline.usePersistentLicense=n.usePersistentLicense,delete n.usePersistentLicense),r&&Qn("Storage.configure with OfflineConfig","Please configure storage with a player configuration."),Ks(this.g,e)},Yu.prototype.configure=Yu.prototype.configure,Yu.prototype.getConfiguration=function(){var e=Fs();return Ks(e,this.g,Fs()),e},Yu.prototype.getConfiguration=Yu.prototype.getConfiguration,Yu.prototype.Yb=function(){return this.h},Yu.prototype.getNetworkingEngine=Yu.prototype.Yb,Yu.prototype.store=function(e,t,n){var r=this;return rc(this,function(e,t,n,r){return T((function i(){var a,o,s,u,c,l,f,h,d;return z(i,(function(i){switch(i.s){case 1:return nc(),e.j?i.return(Zy.reject(new re(2,9,9006))):(e.j=!0,N(i,function(e,t,n){return T((function r(){var i,a,o,s,u,c;return z(r,(function(r){switch(r.s){case 1:return i=null,a=e.h,o={networkingEngine:a,filterAllPeriods:function(){},filterNewPeriod:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(e){i=e}},N(r,n(),2);case 2:return(s=r.B).configure(e.g.manifest),tc(e),_(r,3),N(r,s.start(t,o),5);case 5:return u=r.B,tc(e),c=function(e){for(var t=new $O,n=(e=w(e.periods)).next();!n.done;n=e.next()){for(var r=w((n=n.value).textStreams),i=r.next();!i.done;i=r.next())t.add(i.value);for(r=(n=w(n.variants)).next();!r.done;r=n.next())(r=r.value).audio&&t.add(r.audio),r.video&&t.add(r.video)}return t}(u),N(r,Zy.all(dt(c,(function(e){return e.createSegmentIndex()}))),6);case 6:if(tc(e),i)throw i;return r.return(u);case 3:return U(r),N(r,s.stop(),7);case 7:F(r,0)}}))}))}(e,t,r),2));case 2:if(a=i.B,tc(e),a.presentationTimeline.aa()||a.presentationTimeline.ib())throw new re(2,9,9005,t);return o=null,s=new cs,c=u=null,O(i,3,4),N(i,function(e,t,n){return T((function r(){var i,a,o;return z(r,(function(r){switch(r.s){case 1:return i=new Rt({Ib:e.h,onError:n,Dc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),a=Wa(t.periods),o=e.g,i.configure(o.drm),N(r,function(e,t,n){return e.F=[],e.L=n,Nt(e,t)}(i,a,o.offline.usePersistentLicense),2);case 2:return N(r,jt(i),3);case 3:return N(r,Ot(i),4);case 4:return r.return(i)}}))}))}(e,a,(function(e){c=c||e})),6);case 6:if(o=i.B,tc(e),c)throw c;return N(i,function(e,t,n){return T((function r(){var i,a;return z(r,(function(r){switch(r.s){case 1:return i={width:1/0,height:1/0},function(e,t,n){for(var r=(e=w(e.periods)).next();!r.done;r=e.next()){var i;(r=r.value).variants=Hb(i=r.variants).call(i,(function(e){return Xn.rd(e,t,n)}))}}(t,e.g.restrictions,i),function(e){for(var t=(e=w(e.periods)).next();!t.done;t=e.next()){var n;(t=t.value).variants=Hb(n=t.variants).call(n,(function(e){var t=!0;return e.audio&&(t=t&&Rn(e.audio)),e.video&&(t=t&&Rn(e.video)),t}))}}(t),function(e,t){for(var n=w(e.periods),r=n.next();!r.done;r=n.next()){var i;(r=r.value).variants=Hb(i=r.variants).call(i,(function(e){return qt(t,e)}))}}(t,n),zu(t),a=e.g.preferredAudioChannelCount,Xn.$d(t,a),N(r,function(e,t){return T((function n(){var r,i,a,o;return z(n,(function(n){var s;switch(n.s){case 1:r=null,i=w(e.periods),a=i.next();case 2:if(a.done){n.I(0);break}return o=a.value,r&&(o.variants=Hb(s=o.variants).call(s,(function(e){return Wu(r,new qu(e))}))),N(n,t(o),5);case 5:r=Xu(o.variants),a=i.next(),n.I(2)}}))}))}(t,(function(t){return T((function n(){var r,i,a,o,s,u,c,l;return z(n,(function(n){var f,h;switch(n.s){case 1:r=Xn,i=[];for(var d=w(t.variants),p=d.next();!p.done;p=d.next())a=p.value,i.push(r.Oc(a));for(p=(d=w(t.textStreams)).next();!p.done;p=d.next())o=p.value,i.push(r.Kc(o));return N(n,e.g.offline.trackSelectionCallback(i),2);case 2:for(s=n.B,u=new $O,c=new $O,p=(d=w(s)).next();!p.done;p=d.next())"variant"==(l=p.value).type&&u.add(l.id),"text"==l.type&&c.add(l.id);t.variants=Hb(f=t.variants).call(f,(function(e){return u.has(e.id)})),t.textStreams=Hb(h=t.textStreams).call(h,(function(e){return c.has(e.id)})),j(n)}}))}))})),2);case 2:(function(e){if(0==e.periods.length)throw new re(2,4,4014);for(var t=(e=w(e.periods)).next();!t.done;t=e.next())ic(t.value)})(t),j(r)}}))}))}(e,a,o),7);case 7:return N(i,s.init(),8);case 8:return tc(e),N(i,function(e){var t,n=null;if(Gf(t=e.g).call(t,(function(e,t){var r;Gf(r=e.getCells()).call(r,(function(e,r){e.hasFixedKeySpace()||n||(n={path:{Ea:t,ja:r},ja:e})}))})),n)return n;throw new re(2,9,9013,"Could not find a cell that supports add-operations")}(s),9);case 9:return u=i.B,tc(e),N(i,function(e,t,n,r,i,a){return T((function o(){var s,u,c,l,f,h,d,p,g,v;return z(o,(function(o){var m,y;switch(o.s){case 1:return s=function(e,t,n){var r=null==t.expiration?1/0:t.expiration;return{offlineUri:null,originalManifestUri:e,duration:t.presentationTimeline.ha(),size:0,expiration:r,tracks:t=Fu(t.periods[0]),appMetadata:n}}(i,r,a),u=hS(m=r.periods).call(m,(function(e){var t;return hS(t=e.variants).call(t,(function(e){return e.drmInfos&&e.drmInfos.length}))})),c=hS(y=r.periods).call(y,(function(e){var t;return hS(t=e.variants).call(t,(function(e){var t;return hS(t=e.drmInfos).call(t,(function(e){return e.initData&&e.initData.length}))}))})),f=null,(l=u&&!c)&&(h=n.g,f=ac.get(h.keySystem)),d=new Jo(e.h,(function(t,n){s.size=n,e.g.offline.progressCallback(s,t)}),(function(t,r){l&&e.g.offline.usePersistentLicense&&f==r&&_t(n,"cenc",t)})),_(o,2),g=p=function(e,t,n,r,i,a,o){var s,u=new Ku,c=Mb(s=i.periods).call(s,(function(r){return function(e,t,n,r,i,a){for(var o,s=w(a.variants),u=s.next();!u.done;u=s.next())Bu(r,u.value);for(s=w(a.textStreams),u=s.next();!u.done;u=s.next())r.g[u.value.id]=52;s=function(e){for(var t=new $O,n=w(e.textStreams),r=n.next();!r.done;r=n.next())t.add(r.value);for(e=w(e.variants),n=e.next();!n.done;n=e.next())(n=n.value).audio&&t.add(n.audio),n.video&&t.add(n.video);return t}(a);var c=new AP;for(s=w(s),u=s.next();!u.done;u=s.next()){var l=ec(e,t,n,r,i,u=u.value);c.set(u.id,l)}return Gf(o=a.variants).call(o,(function(e){e.audio&&c.get(e.audio.id).variantIds.push(e.id),e.video&&c.get(e.video.id).variantIds.push(e.id)})),{startTime:a.startTime,streams:Yw(OP(c).call(c))}}(e,t,n,u,i,r)})),l=r.g,f=e.g.offline.usePersistentLicense;return l&&f&&(l.initData=[]),{originalManifestUri:a,duration:i.presentationTimeline.ha(),size:0,expiration:r.Xb(),periods:c,sessionIds:f?Ut(r):[],drmInfo:l,appMetadata:o}}(e,d,t,n,r,i,a),N(o,function(e){return T((function t(){return z(t,(function(t){var n;switch(t.s){case 1:return N(t,Zy.all(OP(n=e.h).call(n)),2);case 2:return t.return(e.g.g)}}))}))}(d),4);case 4:if(g.size=o.B,p.expiration=n.Xb(),v=Ut(n),p.sessionIds=e.g.offline.usePersistentLicense?v:[],u&&e.g.offline.usePersistentLicense&&!v.length)throw new re(2,9,9007);return o.return(p);case 2:return U(o),N(o,d.destroy(),5);case 5:F(o,0)}}))}))}(e,u.ja,o,a,t,n),10);case 10:if(l=i.B,tc(e),c)throw c;return N(i,u.ja.addManifests([l]),11);case 11:return f=i.B,tc(e),h=new ws("manifest",u.path.Ea,u.path.ja,f[0]),i.return(Uu(h,l));case 4:return U(i),e.j=!1,e.i=[],N(i,s.destroy(),12);case 12:if(!o){i.I(13);break}return N(i,o.destroy(),13);case 13:F(i,0);break;case 3:if(d=D(i),!u){i.I(15);break}return N(i,u.ja.removeSegments(e.i,(function(){})),15);case 15:throw c||d}}))}))}(this,e,t||{},(function(){return T((function t(){var i,a;return z(t,(function(t){switch(t.s){case 1:return n&&"string"!=typeof n?(Qn("Storing with a manifest parser factory","Please register a manifest parser and for the mime-type."),i=n,t.return(new i)):N(t,Ci.create(e,r.h,r.g.manifest.retryParameters,n),2);case 2:return a=t.B,t.return(a)}}))}))})))},Yu.prototype.store=Yu.prototype.store,Yu.prototype.Hf=function(){return this.j},Yu.prototype.getStoreInProgress=Yu.prototype.Hf,Yu.prototype.remove=function(e){return rc(this,function(e,t){return T((function n(){var r,i,a,o,s,u;return z(n,(function(n){switch(n.s){case 1:return nc(),null==(r=Ss(t))||"manifest"!=r.g?n.return(Zy.reject(new re(2,9,9004,t))):(i=r,a=new cs,_(n,2),N(n,a.init(),4));case 4:return N(n,ls(a,i.Ea(),i.ja()),5);case 5:return N(n,(o=n.B).getManifests([i.key()]),6);case 6:return s=n.B,u=s[0],N(n,Zy.all([Qu(e,u,a),Zu(e,o,i,u)]),2);case 2:return U(n),N(n,a.destroy(),8);case 8:F(n,0)}}))}))}(this,e))},Yu.prototype.remove=Yu.prototype.remove,Yu.prototype.sg=function(){return rc(this,function(e){return T((function t(){var n,r,i,a,o,s,u,c,l;return z(t,(function(t){switch(t.s){case 1:return nc(),n=e.h,r=e.g.drm,i=new cs,a=!1,_(t,2),N(t,i.init(),4);case 4:for(o=[],function(e,t){var n;Gf(n=e.g).call(n,(function(e){t(e.getEmeSessionCell())}))}(i,(function(e){return o.push(e)})),s=Zy.resolve(),u={},c=w(o),l=c.next();!l.done;u={Jc:u.Jc},l=c.next())u.Jc=l.value,s=s.then(function(e){return function(){return T((function t(){var i,o;return z(t,(function(t){switch(t.s){case 1:return N(t,e.Jc.getAll(),2);case 2:return i=t.B,N(t,Is(r,n,i),3);case 3:return o=t.B,N(t,e.Jc.remove(o),4);case 4:o.length!=i.length&&(a=!0),j(t)}}))}))}}(u));return N(t,s,2);case 2:return U(t),N(t,i.destroy(),6);case 6:F(t,3);break;case 3:return t.return(!a)}}))}))}(this))},Yu.prototype.removeEmeSessions=Yu.prototype.sg,Yu.prototype.list=function(){return rc(this,T((function e(){var t,n,r;return z(e,(function(e){switch(e.s){case 1:return nc(),t=[],n=new cs,_(e,2),N(e,n.init(),4);case 4:return r=Zy.resolve(),function(e,t){var n;Gf(n=e.g).call(n,(function(e,n){var r;Gf(r=e.getCells()).call(r,(function(e,r){t({Ea:n,ja:r},e)}))}))}(n,(function(e,n){r=r.then((function(){return T((function r(){var i;return z(r,(function(r){switch(r.s){case 1:return N(r,n.getAllManifests(),2);case 2:i=r.B,Gf(i).call(i,(function(n,r){var i=Uu(new ws("manifest",e.Ea,e.ja,r),n);t.push(i)})),j(r)}}))}))}))})),N(e,r,2);case 2:return U(e),N(e,n.destroy(),6);case 6:F(e,3);break;case 3:return e.return(t)}}))})))},Yu.prototype.list=Yu.prototype.list,Yu.deleteAll=function(){return T((function e(){var t;return z(e,(function(e){switch(e.s){case 1:return t=new cs,_(e,2),N(e,t.erase(),2);case 2:return U(e),N(e,t.destroy(),5);case 5:F(e,0)}}))}))};var ac=(new AP).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");Ys.offline=$u,$("shaka.polyfill.installAll",(function(){for(var e=0;e<uc.length;++e)try{uc[e].Xe()}catch(t){ne.ba("Error installing polyfill!",t)}}));var oc,sc,uc=[];function cc(e,t){for(var n={priority:t=t||0,Xe:e},r=0;r<uc.length;r++)if(uc[r].priority<t)return void Wd(uc).call(uc,r,0,n);uc.push(n)}function lc(e){var t=e.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();if("function"==typeof Event)var n=new Event(t,e);else(n=document.createEvent("Event")).initEvent(t,e.bubbles,e.cancelable);e.target.dispatchEvent(n)}function fc(e,t,n){"input"==e&&"range"===this.type&&(e="change"),HTMLInputElement.prototype.originalAddEventListener.call(this,e,t,n)}function hc(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(t){for(var n=[],r=0;r<arguments.length;++r)n[r]=arguments[r];return(n=e.apply(this,n)).abort=function(){},n}}function dc(e,t){ne.debug("PatchedMediaKeysApple.requestMediaKeySystemAccess");try{var n=new pc(e,t);return Zy.resolve(n)}catch(r){return Zy.reject(r)}}function pc(e,t){if(ne.debug("PatchedMediaKeysApple.MediaKeySystemAccess"),this.keySystem=e,oM(e).call(e,"com.apple.fps"))for(var n=w(t),r=n.next();!r.done;r=n.next()){var i=r.value;if("required"==i.persistentState)r=null;else{r={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:i.initDataTypes,sessionTypes:["temporary"],label:i.label};var a=!1,o=!1;if(i.audioCapabilities)for(var s=w(i.audioCapabilities),u=s.next();!u.done;u=s.next())if((u=u.value).contentType){a=!0;var c=u.contentType.split(";")[0];WebKitMediaKeys.isTypeSupported(this.keySystem,c)&&(r.audioCapabilities.push(u),o=!0)}if(i.videoCapabilities)for(u=(i=w(i.videoCapabilities)).next();!u.done;u=i.next())(s=u.value).contentType&&(a=!0,u=s.contentType.split(";")[0],WebKitMediaKeys.isTypeSupported(this.keySystem,u)&&(r.videoCapabilities.push(s),o=!0));a||(o=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),r=o?r:null}if(r)return void(this.g=r)}throw(n=Error("Unsupported keySystem")).name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n}function gc(e){ne.debug("PatchedMediaKeysApple.setMediaKeys");var t=this.mediaKeys;return t&&t!=e&&mc(t,null),delete this.mediaKeys,(this.mediaKeys=e)?mc(e,this):Zy.resolve()}function vc(e){ne.debug("PatchedMediaKeysApple.MediaKeys"),this.h=new WebKitMediaKeys(e),this.g=new ut}function mc(e,t){if(e.g.nb(),!t)return Zy.resolve();e.g.H(t,"webkitneedkey",bc);try{return Qa(t,HTMLMediaElement.HAVE_METADATA,e.g,(function(){t.webkitSetMediaKeys(e.h)})),Zy.resolve()}catch(n){return Zy.reject(n)}}function yc(e){ne.debug("PatchedMediaKeysApple.MediaKeySession"),We.call(this),this.h=null,this.l=e,this.i=this.g=null,this.j=new ut,this.sessionId="",this.expiration=NaN,this.closed=new Ee,this.keyStatuses=new Sc}function bc(e){if(ne.debug("PatchedMediaKeysApple.onWebkitNeedKey_",e),e=new Uint8Array(e.initData),new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(0,!0)+4!=e.byteLength)throw new RangeError("Malformed FairPlay init data");e=Me(e=ke(e.subarray(4),!0));var t=new Event("encrypted");t.initDataType="skd",t.initData=e,this.dispatchEvent(t)}function wc(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,e.dispatchEvent(new qe("keystatuseschange"))}function Sc(){this.size=0,this.g=void 0}function Tc(e,t){ne.debug("PatchedMediaKeysMs.requestMediaKeySystemAccess");try{var n=new Ec(e,t);return Zy.resolve(n)}catch(r){return Zy.reject(r)}}function Ec(e,t){ne.debug("PatchedMediaKeysMs.MediaKeySystemAccess"),this.keySystem=e;for(var n=!1,r=0;r<t.length;++r){var i=t[r],a={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:i.initDataTypes,sessionTypes:["temporary"],label:i.label},o=!1;if(i.audioCapabilities)for(var s=0;s<i.audioCapabilities.length;++s){var u=i.audioCapabilities[s];if(u.contentType){o=!0;var c=u.contentType.split(";")[0];MSMediaKeys.isTypeSupported(this.keySystem,c)&&(a.audioCapabilities.push(u),n=!0)}}if(i.videoCapabilities)for(s=0;s<i.videoCapabilities.length;++s)(u=i.videoCapabilities[s]).contentType&&(o=!0,c=u.contentType.split(";")[0],MSMediaKeys.isTypeSupported(this.keySystem,c)&&(a.videoCapabilities.push(u),n=!0));if(o||(n=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),"required"==i.persistentState&&(n=!1),n)return void(this.g=a)}throw(n=Error("Unsupported keySystem")).name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n}function xc(e){ne.debug("PatchedMediaKeysMs.setMediaKeys");var t=this.mediaKeys;return t&&t!=e&&Ac(t,null),delete this.mediaKeys,(this.mediaKeys=e)?Ac(e,this):Zy.resolve()}function kc(e){ne.debug("PatchedMediaKeysMs.MediaKeys"),this.h=new MSMediaKeys(e),this.g=new ut}function Ac(e,t){if(e.g.nb(),!t)return Zy.resolve();e.g.H(t,"msneedkey",Ic);try{return Qa(t,HTMLMediaElement.HAVE_METADATA,e.g,(function(){t.msSetMediaKeys(e.h)})),Zy.resolve()}catch(n){return Zy.reject(n)}}function Mc(e){ne.debug("PatchedMediaKeysMs.MediaKeySession"),We.call(this),this.i=null,this.l=e,this.h=this.g=null,this.j=new ut,this.sessionId="",this.expiration=NaN,this.closed=new Ee,this.keyStatuses=new Rc}function Ic(e){if(ne.debug("PatchedMediaKeysMs.onMsNeedKey_",e),e.initData){var t=document.createEvent("CustomEvent");t.initCustomEvent("encrypted",!1,!1,null),t.initDataType="cenc",t.initData=function(e){if(!e)return e;var t=new Qr(e);if(1>=t.data.length)return e;e=[];for(var n={},r=(t=w(t.data)).next();!r.done;n={yc:n.yc},r=t.next())n.yc=r.value,hS(e).call(e,function(e){return function(t){return Pe.Ha(t,e.yc)}}(n))||e.push(n.yc);return nd(Pe).apply(Pe,e instanceof Array?e:function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(w(e)))}(e.initData).buffer,this.dispatchEvent(t)}}function Cc(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,e.dispatchEvent(new qe("keystatuseschange"))}function Rc(){this.size=0,this.g=void 0}function Pc(){return ne.debug("PatchedMediaKeysNop.requestMediaKeySystemAccess"),Zy.reject(Error("The key system specified is not supported."))}function Nc(e){return ne.debug("PatchedMediaKeysNop.setMediaKeys"),null==e?Zy.resolve():Zy.reject(Error("MediaKeys not supported."))}function jc(){throw new TypeError("Illegal constructor.")}function Oc(){throw new TypeError("Illegal constructor.")}$("shaka.polyfill.register",cc),cc((function(){Yl()}),-1),cc((function(){if(e.Document){var t=Element.prototype;t.requestFullscreen=t.requestFullscreen||t.mozRequestFullScreen||t.msRequestFullscreen||t.webkitRequestFullscreen,(t=Document.prototype).exitFullscreen=t.exitFullscreen||t.mozCancelFullScreen||t.msExitFullscreen||t.webkitCancelFullScreen,"fullscreenElement"in document||(Aw(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),Aw(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}})),document.addEventListener("webkitfullscreenchange",lc),document.addEventListener("webkitfullscreenerror",lc),document.addEventListener("mozfullscreenchange",lc),document.addEventListener("mozfullscreenerror",lc),document.addEventListener("MSFullscreenChange",lc),document.addEventListener("MSFullscreenError",lc)}})),cc((function(){ne.debug("InputEvent.install"),At("Trident/")&&!HTMLInputElement.prototype.originalAddEventListener&&(ne.info("Patching input event support on IE."),HTMLInputElement.prototype.originalAddEventListener=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=fc)})),cc((function(){navigator.languages||Aw(navigator,"languages",{get:function(){return navigator.language?[navigator.language]:["en"]}})})),cc((function(){ne.debug("mathRound.install")})),cc((function(){ne.debug("MediaSource.install");var t=kt();e.MediaSource?e.cast&&cast.__platform__&&cast.__platform__.canDisplayType?(ne.info("Patching Chromecast MSE bugs."),function(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){var n=t.split(/ *; */);return n.shift(),hS(n).call(n,(function(e){return oM(e).call(e,"codecs=")}))?cast.__platform__.canDisplayType(t):e(t)}}()):t?(function(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){return"mp2t"!=t.split(/ *; */)[0].split("/")[1].toLowerCase()&&e(t)}}(),12>=t?(ne.info("Patching Safari 11 & 12 MSE bugs."),hc(),function(){var e=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(t,n){return e.call(this,t,n-.001)}}()):(ne.info("Patching Safari 13 MSE bugs."),hc())):At("Tizen 2")||At("Tizen 3")||At("Tizen 4")?function(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){return"opus"!=bt(t)[0]&&e(t)}}():ne.info("Using native MSE as-is."):ne.info("No MSE implementation available.")})),pc.prototype.createMediaKeys=function(){ne.debug("PatchedMediaKeysApple.MediaKeySystemAccess.createMediaKeys");var e=new vc(this.keySystem);return Zy.resolve(e)},pc.prototype.getConfiguration=function(){return ne.debug("PatchedMediaKeysApple.MediaKeySystemAccess.getConfiguration"),this.g},vc.prototype.createSession=function(e){if(ne.debug("PatchedMediaKeysApple.MediaKeys.createSession"),"temporary"!=(e=e||"temporary"))throw new TypeError("Session type "+e+" is unsupported on this platform.");return new yc(this.h)},vc.prototype.setServerCertificate=function(e){return ne.debug("PatchedMediaKeysApple.MediaKeys.setServerCertificate"),Zy.resolve(!0)},J(yc,We),(f=yc.prototype).generateRequest=function(e,t){ne.debug("PatchedMediaKeysApple.MediaKeySession.generateRequest"),this.g=new Ee;try{var n,r,i;this.h=this.l.createSession("video/mp4",new Uint8Array(t)),this.sessionId=this.h.sessionId||"",this.j.H(this.h,"webkitkeymessage",Pw(n=this.Gg).call(n,this)),this.j.H(this.h,"webkitkeyadded",Pw(r=this.Eg).call(r,this)),this.j.H(this.h,"webkitkeyerror",Pw(i=this.Fg).call(i,this)),wc(this,"status-pending")}catch(a){this.g.reject(a)}return this.g},f.load=function(){return ne.debug("PatchedMediaKeysApple.MediaKeySession.load"),Zy.reject(Error("MediaKeySession.load not yet supported"))},f.update=function(e){ne.debug("PatchedMediaKeysApple.MediaKeySession.update"),this.i=new Ee;try{this.h.update(new Uint8Array(e))}catch(t){this.i.reject(t)}return this.i},f.close=function(){ne.debug("PatchedMediaKeysApple.MediaKeySession.close");try{this.h.close(),this.closed.resolve(),this.j.nb()}catch(g){this.closed.reject(g)}return this.closed},f.remove=function(){return ne.debug("PatchedMediaKeysApple.MediaKeySession.remove"),Zy.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},f.Gg=function(e){ne.debug("PatchedMediaKeysApple.onWebkitKeyMessage_",e),this.g&&(this.g.resolve(),this.g=null),this.dispatchEvent(new qe("message",{messageType:null==this.keyStatuses.g?"license-request":"license-renewal",message:e.message.buffer}))},f.Eg=function(e){ne.debug("PatchedMediaKeysApple.onWebkitKeyAdded_",e),this.i&&(wc(this,"usable"),this.i.resolve(),this.i=null)},f.Fg=function(e){if(ne.debug("PatchedMediaKeysApple.onWebkitKeyError_",e),(e=Error("EME PatchedMediaKeysApple key error")).errorCode=this.h.error,null!=this.g)this.g.reject(e),this.g=null;else if(null!=this.i)this.i.reject(e),this.i=null;else switch(this.h.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:wc(this,"output-not-allowed");break;default:wc(this,"internal-error")}},(f=Sc.prototype).forEach=function(e){this.g&&e(this.g,oc)},f.get=function(e){if(this.has(e))return this.g},f.has=function(e){var t=oc;return!(!this.g||!Pe.Ha(new Uint8Array(e),new Uint8Array(t)))},f.entries=function(){},f.keys=function(){},f.values=function(){},cc((function(){e.HTMLVideoElement&&e.WebKitMediaKeys&&(ne.info("Using Apple-prefixed EME"),oc=new Uint8Array([0]).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=gc,e.MediaKeys=vc,e.MediaKeySystemAccess=pc,navigator.requestMediaKeySystemAccess=dc)})),Ec.prototype.createMediaKeys=function(){ne.debug("PatchedMediaKeysMs.MediaKeySystemAccess.createMediaKeys");var e=new kc(this.keySystem);return Zy.resolve(e)},Ec.prototype.getConfiguration=function(){return ne.debug("PatchedMediaKeysMs.MediaKeySystemAccess.getConfiguration"),this.g},kc.prototype.createSession=function(e){if(ne.debug("PatchedMediaKeysMs.MediaKeys.createSession"),"temporary"!=(e=e||"temporary"))throw new TypeError("Session type "+e+" is unsupported on this platform.");return new Mc(this.h)},kc.prototype.setServerCertificate=function(){return ne.debug("PatchedMediaKeysMs.MediaKeys.setServerCertificate"),Zy.resolve(!1)},J(Mc,We),(f=Mc.prototype).generateRequest=function(e,t){ne.debug("PatchedMediaKeysMs.MediaKeySession.generateRequest"),this.g=new Ee;try{var n,r,i;this.i=this.l.createSession("video/mp4",new Uint8Array(t),null),this.j.H(this.i,"mskeymessage",Pw(n=this.dg).call(n,this)),this.j.H(this.i,"mskeyadded",Pw(r=this.bg).call(r,this)),this.j.H(this.i,"mskeyerror",Pw(i=this.cg).call(i,this)),Cc(this,"status-pending")}catch(a){this.g.reject(a)}return this.g},f.load=function(){return ne.debug("PatchedMediaKeysMs.MediaKeySession.load"),Zy.reject(Error("MediaKeySession.load not yet supported"))},f.update=function(e){ne.debug("PatchedMediaKeysMs.MediaKeySession.update"),this.h=new Ee;try{this.i.update(new Uint8Array(e))}catch(t){this.h.reject(t)}return this.h},f.close=function(){ne.debug("PatchedMediaKeysMs.MediaKeySession.close");try{this.i.close(),this.closed.resolve(),this.j.nb()}catch(g){this.closed.reject(g)}return this.closed},f.remove=function(){return ne.debug("PatchedMediaKeysMs.MediaKeySession.remove"),Zy.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},f.dg=function(e){ne.debug("PatchedMediaKeysMs.onMsKeyMessage_",e),this.g&&(this.g.resolve(),this.g=null),this.dispatchEvent(new qe("message",{messageType:null==this.keyStatuses.g?"license-request":"license-renewal",message:e.message.buffer}))},f.bg=function(e){ne.debug("PatchedMediaKeysMs.onMsKeyAdded_",e),this.g?(ne.debug("Simulating completion for a PR persistent license."),Cc(this,"usable"),this.g.resolve(),this.g=null):this.h&&(Cc(this,"usable"),this.h.resolve(),this.h=null)},f.cg=function(e){if(ne.debug("PatchedMediaKeysMs.onMsKeyError_",e),(e=Error("EME PatchedMediaKeysMs key error")).errorCode=this.i.error,null!=this.g)this.g.reject(e),this.g=null;else if(null!=this.h)this.h.reject(e),this.h=null;else switch(this.i.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Cc(this,"output-not-allowed");break;default:Cc(this,"internal-error")}},(f=Rc.prototype).forEach=function(e){this.g&&e(this.g,sc)},f.get=function(e){if(this.has(e))return this.g},f.has=function(e){var t=sc;return!(!this.g||!Pe.Ha(new Uint8Array(e),new Uint8Array(t)))},f.entries=function(){},f.keys=function(){},f.values=function(){},cc((function(){!e.HTMLVideoElement||!e.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(ne.info("Using ms-prefixed EME v20140218"),sc=new Uint8Array([0]).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=xc,e.MediaKeys=kc,e.MediaKeySystemAccess=Ec,navigator.requestMediaKeySystemAccess=Tc)})),jc.prototype.createSession=function(){},jc.prototype.setServerCertificate=function(){},Oc.prototype.getConfiguration=function(){},Oc.prototype.createMediaKeys=function(){},cc((function(){!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(ne.info("EME not available."),navigator.requestMediaKeySystemAccess=Pc,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Nc,e.MediaKeys=jc,e.MediaKeySystemAccess=Oc)}),-10);var _c,Lc="";function Dc(e){return Lc?Lc+e.charAt(0).toUpperCase()+xd(e).call(e,1):e}function Uc(e,t){ne.debug("PatchedMediaKeysWebkit.requestMediaKeySystemAccess");try{var n=new Kc(e,t);return Zy.resolve(n)}catch(r){return Zy.reject(r)}}function Fc(e){ne.debug("PatchedMediaKeysWebkit.setMediaKeys");var t=this.mediaKeys;return t&&t!=e&&Hc(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&Hc(e,this),Zy.resolve()}function Kc(e,t){ne.debug("PatchedMediaKeysWebkit.MediaKeySystemAccess"),this.g=this.keySystem=e;var n=!1;"org.w3.clearkey"==e&&(this.g="webkit-org.w3.clearkey",n=!1);var r=!1,i=document.getElementsByTagName("video");i=i.length?i[0]:document.createElement("video");for(var a=0;a<t.length;++a){var o=t[a],s={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:o.initDataTypes,sessionTypes:["temporary"],label:o.label},u=!1;if(o.audioCapabilities)for(var c=0;c<o.audioCapabilities.length;++c){var l=o.audioCapabilities[c];if(l.contentType){u=!0;var f=l.contentType.split(";")[0];i.canPlayType(f,this.g)&&(s.audioCapabilities.push(l),r=!0)}}if(o.videoCapabilities)for(c=0;c<o.videoCapabilities.length;++c)(l=o.videoCapabilities[c]).contentType&&(u=!0,i.canPlayType(l.contentType,this.g)&&(s.videoCapabilities.push(l),r=!0));if(u||(r=i.canPlayType("video/mp4",this.g)||i.canPlayType("video/webm",this.g)),"required"==o.persistentState&&(n?(s.persistentState="required",s.sessionTypes=["persistent-license"]):r=!1),r)return void(this.h=s)}throw n="Unsupported keySystem","org.w3.clearkey"!=e&&"com.widevine.alpha"!=e||(n="None of the requested configurations were supported."),(n=Error(n)).name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n}function Bc(e){ne.debug("PatchedMediaKeysWebkit.MediaKeys"),this.l=e,this.h=null,this.g=new ut,this.i=[],this.j={}}function Hc(e,t){var n,r,i,a;e.h=t,e.g.nb();var o=Lc;t&&(e.g.H(t,o+"needkey",Pw(n=e.hg).call(n,e)),e.g.H(t,o+"keymessage",Pw(r=e.Jg).call(r,e)),e.g.H(t,o+"keyadded",Pw(i=e.Hg).call(i,e)),e.g.H(t,o+"keyerror",Pw(a=e.Ig).call(a,e)))}function Vc(e,t){var n=e.j[t];return n?(ne.debug("PatchedMediaKeysWebkit.MediaKeys.findSession_",n),n):(n=e.i.shift())?(n.sessionId=t,e.j[t]=n,ne.debug("PatchedMediaKeysWebkit.MediaKeys.findSession_",n),n):null}function zc(e,t,n){ne.debug("PatchedMediaKeysWebkit.MediaKeySession"),We.call(this),this.j=e,this.m=!1,this.g=this.h=null,this.i=t,this.l=n,this.sessionId="",this.expiration=NaN,this.closed=new Ee,this.keyStatuses=new Wc}function qc(e,t,n){if(e.m)return Zy.reject(Error("The session is already initialized."));e.m=!0;try{if("persistent-license"==e.l)if(n)var r=new Uint8Array(Me("LOAD_SESSION|"+n));else{var i=Me("PERSISTENT|"),a=new Uint8Array(i.byteLength+t.byteLength);a.set(new Uint8Array(i),0),a.set(new Uint8Array(t),i.byteLength),r=a}else r=new Uint8Array(t)}catch(s){return Zy.reject(s)}e.h=new Ee;var o=Dc("generateKeyRequest");try{e.j[o](e.i,r)}catch(s){if("InvalidStateError"!=s.name)return e.h=null,Zy.reject(s);new Le((function(){try{e.j[o](e.i,r)}catch(t){e.h.reject(t),e.h=null}})).V(.01)}return e.h}function Gc(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,e.dispatchEvent(new qe("keystatuseschange"))}function Wc(){this.size=0,this.g=void 0}function Xc(e){if("picture-in-picture"==(e=e.target).webkitPresentationMode){document.pictureInPictureElement=e;var t=new Event("enterpictureinpicture");e.dispatchEvent(t)}else document.pictureInPictureElement==e&&(document.pictureInPictureElement=null),t=new Event("leavepictureinpicture"),e.dispatchEvent(t)}function Yc(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Zy.resolve()):Zy.reject(Error("PiP not allowed by video element"))}function $c(){var e=document.pictureInPictureElement;return e?(e.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Zy.resolve()):Zy.reject(Error("No picture in picture element found"))}function Jc(){return!!this.hasAttribute("disablePictureInPicture")||!this.webkitSupportsPresentationMode("picture-in-picture")}function Qc(e){e?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}function Zc(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}function el(t,n,r){return new e.TextTrackCue(t,n,r)}function tl(t,n,r){return new e.TextTrackCue(t+"-"+n+"-"+r,t,n,r)}function nl(){}Kc.prototype.createMediaKeys=function(){ne.debug("PatchedMediaKeysWebkit.MediaKeySystemAccess.createMediaKeys");var e=new Bc(this.g);return Zy.resolve(e)},Kc.prototype.getConfiguration=function(){return ne.debug("PatchedMediaKeysWebkit.MediaKeySystemAccess.getConfiguration"),this.h},(f=Bc.prototype).createSession=function(e){if(ne.debug("PatchedMediaKeysWebkit.MediaKeys.createSession"),"temporary"!=(e=e||"temporary")&&"persistent-license"!=e)throw new TypeError("Session type "+e+" is unsupported on this platform.");var t=this.h||document.createElement("video");return t.src||(t.src="about:blank"),e=new zc(t,this.l,e),this.i.push(e),e},f.setServerCertificate=function(){return ne.debug("PatchedMediaKeysWebkit.MediaKeys.setServerCertificate"),Zy.resolve(!1)},f.hg=function(e){ne.debug("PatchedMediaKeysWebkit.onWebkitNeedKey_",e);var t=document.createEvent("CustomEvent");t.initCustomEvent("encrypted",!1,!1,null),t.initDataType="cenc",e.initData instanceof ArrayBuffer?t.initData=e.initData:t.initData=e.initData.buffer,this.h.dispatchEvent(t)},f.Jg=function(e){ne.debug("PatchedMediaKeysWebkit.onWebkitKeyMessage_",e);var t=Vc(this,e.sessionId);t?(e=new qe("message",{messageType:null==t.keyStatuses.g?"licenserequest":"licenserenewal",message:e.message}),ne.debug("PatchedMediaKeysWebkit.MediaKeySession.generated"),t.h&&(t.h.resolve(),t.h=null),t.dispatchEvent(e)):ne.error("Session not found",e.sessionId)},f.Hg=function(e){ne.debug("PatchedMediaKeysWebkit.onWebkitKeyAdded_",e),(e=Vc(this,e.sessionId))&&(ne.debug("PatchedMediaKeysWebkit.MediaKeySession.ready"),Gc(e,"usable"),e.g&&e.g.resolve(),e.g=null)},f.Ig=function(e){ne.debug("PatchedMediaKeysWebkit.onWebkitKeyError_",e);var t=Vc(this,e.sessionId);t&&t.handleError(e)},J(zc,We),(f=zc.prototype).handleError=function(e){ne.debug("PatchedMediaKeysWebkit.MediaKeySession.handleError",e);var t=Error("EME v0.1b key error"),n=e.errorCode;n.systemCode=e.systemCode,t.errorCode=n,!e.sessionId&&this.h?(45==e.systemCode&&(t.message="Unsupported session type."),this.h.reject(t),this.h=null):e.sessionId&&this.g?(this.g.reject(t),this.g=null):(t=e.systemCode,e.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Gc(this,"output-restricted"):Gc(this,1==t?"expired":"internal-error"))},f.Qd=function(e,t){var n,r;if(this.g)this.g.then(Pw(n=this.Qd).call(n,this,e,t)).catch(Pw(r=this.Qd).call(r,this,e,t));else{if(this.g=e,"webkit-org.w3.clearkey"==this.i){var i=xe(t),a=JSON.parse(i);"oct"!=Lb(a)[0].kty&&(this.g.reject(Error("Response is not a valid JSON Web Key Set.")),this.g=null),i=Pe.Ja(Lb(a)[0].k),a=Pe.Ja(Lb(a)[0].kid)}else i=new Uint8Array(t),a=null;var o=Dc("addKey");try{this.j[o](this.i,i,a,this.sessionId)}catch(s){this.g.reject(s),this.g=null}}},f.generateRequest=function(e,t){return ne.debug("PatchedMediaKeysWebkit.MediaKeySession.generateRequest"),qc(this,t,null)},f.load=function(e){return ne.debug("PatchedMediaKeysWebkit.MediaKeySession.load"),"persistent-license"==this.l?qc(this,null,e):Zy.reject(Error("Not a persistent session."))},f.update=function(e){ne.debug("PatchedMediaKeysWebkit.MediaKeySession.update",e);var t=new Ee;return this.Qd(t,e),t},f.close=function(){if(ne.debug("PatchedMediaKeysWebkit.MediaKeySession.close"),"persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var e=Dc("cancelKeyRequest");try{this.j[e](this.i,this.sessionId)}catch(t){}}return this.closed.resolve(),this.closed},f.remove=function(){return ne.debug("PatchedMediaKeysWebkit.MediaKeySession.remove"),"persistent-license"!=this.l?Zy.reject(Error("Not a persistent session.")):this.close()},(f=Wc.prototype).forEach=function(e){this.g&&e(this.g,_c)},f.get=function(e){if(this.has(e))return this.g},f.has=function(e){var t=_c;return!(!this.g||!Pe.Ha(new Uint8Array(e),new Uint8Array(t)))},f.entries=function(){},f.keys=function(){},f.values=function(){},cc((function(){if(!(!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)ne.info("Using webkit-prefixed EME v0.1b"),Lc="webkit";else{if(!HTMLMediaElement.prototype.generateKeyRequest)return;ne.info("Using nonprefixed EME v0.1b")}_c=new Uint8Array([0]).buffer,navigator.requestMediaKeySystemAccess=Uc,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Fc,e.MediaKeys=Bc,e.MediaKeySystemAccess=Kc}})),cc((function(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;t.requestPictureInPicture&&document.exitPictureInPicture||!t.webkitSupportsPresentationMode||(ne.debug("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,t.requestPictureInPicture=Yc,Aw(t,"disablePictureInPicture",{get:Jc,set:Qc,enumerable:!0,configurable:!0}),document.exitPictureInPicture=$c,document.addEventListener("webkitpresentationmodechanged",Xc,!0))}})),cc((function(){if(ne.debug("VideoPlayPromise.install"),e.HTMLMediaElement){var t=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var e=t.apply(this);return e&&e.catch((function(){})),e}}})),cc((function(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;!t.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in t&&(t.getVideoPlaybackQuality=Zc)}})),cc((function(){if(e.VTTCue)ne.info("Using native VTTCue.");else if(e.TextTrackCue){var t=TextTrackCue.length;if(3==t)ne.info("Using VTTCue polyfill from 3 argument TextTrackCue."),e.VTTCue=el;else if(6==t)ne.info("Using VTTCue polyfill from 6 argument TextTrackCue."),e.VTTCue=tl;else{try{var n=!!el(1,2,"")}catch(r){n=!1}n&&(ne.info("Using VTTCue polyfill from 3 argument TextTrackCue."),e.VTTCue=el)}}else ne.error("VTTCue not available.")})),$("shaka.text.TtmlTextParser",nl),nl.prototype.parseInit=function(){},nl.prototype.parseInit=nl.prototype.parseInit,nl.prototype.parseMedia=function(e,t){var n=xe(e),r=[],i=new DOMParser,a=null;if(""==n)return r;try{a=i.parseFromString(n,"text/xml")}catch(b){throw new re(2,2,2005,"Failed to parse TTML.")}if(a){if(n=a.getElementsByTagName("parsererror")[0])throw new re(2,2,2005,n.textContent);if(!(i=a.getElementsByTagName("tt")[0]))throw new re(2,2,2005,"TTML does not contain <tt> tag.");var o=Zr.getAttributeNS(i,"http://www.w3.org/ns/ttml#parameter","frameRate"),s=Zr.getAttributeNS(i,"http://www.w3.org/ns/ttml#parameter","subFrameRate"),u=Zr.getAttributeNS(i,"http://www.w3.org/ns/ttml#parameter","frameRateMultiplier"),c=Zr.getAttributeNS(i,"http://www.w3.org/ns/ttml#parameter","tickRate");if(a=i.getAttribute("xml:space")||"default",n=Zr.getAttributeNS(i,"http://www.w3.org/ns/ttml#styling","extent"),"default"!=a&&"preserve"!=a)throw new re(2,2,2005,"Invalid xml:space value: "+a);a="default"==a,o=new Il(o,s,u,c),s=vl(i.getElementsByTagName("metadata")[0]),u=vl(i.getElementsByTagName("styling")[0]),c=vl(i.getElementsByTagName("layout")[0]);for(var l=[],f=0;f<c.length;f++){var h,d,p=c[f],g=u,v=n,m=new wn,y=p.getAttribute("xml:id");y?(m.id=y,y=null,v&&(y=al.exec(v)||sl.exec(v)),v=y?Number(y[1]):null,y=y?Number(y[2]):null,(h=Tl(p,g,"extent"))&&null!=(h=(d=al.exec(h))||sl.exec(h))&&(m.width=null!=v?100*Number(h[1])/v:Number(h[1]),m.height=null!=y?100*Number(h[2])/y:Number(h[2]),m.widthUnits=d||null!=v?Sn:0,m.heightUnits=d||null!=y?Sn:0),(p=Tl(p,g,"origin"))&&null!=(h=(d=al.exec(p))||sl.exec(p))&&(m.viewportAnchorX=null!=v?100*Number(h[1])/v:Number(h[1]),m.viewportAnchorY=null!=y?100*Number(h[2])/y:Number(h[2]),m.viewportAnchorUnits=d||null!=v?Sn:0)):(ne.v("TtmlTextParser parser encountered a region with no id. Region will be ignored."),m=null),m&&l.push(m)}for(n=ml(i.getElementsByTagName("body")[0]),i=(n=w(n)).next();!i.done;i=n.next())(i=bl(i.value,t.periodStart,o,s,u,c,l,a,!1))&&r.push(i)}return r},nl.prototype.parseMedia=nl.prototype.parseMedia;var rl,il,al=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,ol=/^(\d+px|\d+em)$/,sl=/^(\d+)px (\d+)px$/,ul=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,cl=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,ll=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,fl=/^(\d*(?:\.\d*)?)f$/,hl=/^(\d*(?:\.\d*)?)t$/,dl=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,pl={left:gn,center:"center",right:"end",start:gn,end:"end"},gl={left:"line-left",center:"center",right:"line-right"};function vl(e){var t=[];if(!e)return t;for(var n=w(e.childNodes),r=n.next();!r.done;r=n.next())(r=r.value).nodeType==Node.ELEMENT_NODE&&"br"!==r.nodeName&&(r=vl(r),t=nd(t).call(t,r));return t.length||t.push(e),t}function ml(e){if(!e)return[];for(var t=[],n=(e=w(e.childNodes)).next();!n.done;n=e.next())(n=n.value)instanceof Element&&(n.hasAttribute("begin")?t.push(n):t=nd(t).call(t,ml(n)));return t}function yl(e,t){for(var n="",r=w(e.childNodes),i=r.next();!i.done;i=r.next()){var a;"br"==(i=i.value).nodeName&&e.childNodes[0]!==i?n+="\n":i.childNodes&&0<i.childNodes.length?n+=yl(i,t):n+=t?i=(i=xT(a=i.textContent).call(a)).replace(/\s+/g," "):i.textContent}return n}function bl(e,t,n,r,i,a,o,s,u){var c;if(u&&"br"==e.nodeName)return(e=new on(0,0,"")).spacer=!0,e;var l=/^[\s\n]*$/.test(e.textContent),f=e.nodeType==Node.ELEMENT_NODE&&!e.hasAttribute("begin")&&!e.hasAttribute("end");if(e.nodeType!=Node.ELEMENT_NODE||f&&l||f&&!u)return null;s="default"==(e.getAttribute("xml:space")||(s?"default":"preserve")),l=Al(e.getAttribute("begin"),n),f=Al(e.getAttribute("end"),n);var h=Al(e.getAttribute("dur"),n);if(null==f&&null!=h&&(f=l+h),!u&&(null==l||null==f))throw new re(2,2,2001);if(l=u&&null==l?0:l+t,f=u&&null==f?0:f+t,h="",u=[],Jh(c=Yw(e.childNodes)).call(c,(function(e){return e.nodeType===Node.TEXT_NODE&&/\S+/.test(e.textContent)})))h=yl(e,s);else for(var d=w(e.childNodes),p=d.next();!p.done;p=d.next())(p=bl(p.value,t,n,r,i,a,o,s,!0))&&(p.startTime=p.startTime||l,p.endTime=p.endTime||f,u.push(p));if((t=new on(l,f,h)).nestedCues=u,(a=kl(e,"region",a,"")[0])&&a.getAttribute("xml:id")){var g=a.getAttribute("xml:id");t.region=Hb(o).call(o,(function(e){return e.id==g}))[0]}return function(e,t,n,r,i){"rtl"==Sl(t,n,i,"direction")&&(e.direction="rtl");var a=Sl(t,n,i,"writingMode");if("tb"==a||"tblr"==a?e.writingMode="vertical-lr":"tbrl"==a?e.writingMode="vertical-rl":"rltb"==a||"rl"==a?e.direction="rtl":a&&(e.direction=hn),(a=Sl(t,n,i,"textAlign"))?(e.positionAlign=gl[a],e.lineAlign=pl[a],e.textAlign=cn[a.toUpperCase()]):e.textAlign="start",(a=Sl(t,n,i,"displayAlign"))&&(e.displayAlign=fn[a.toUpperCase()]),(a=Sl(t,n,i,"color"))&&(e.color=a),(a=Sl(t,n,i,"backgroundColor"))&&(e.backgroundColor=a),(a=Sl(t,n,i,"fontFamily"))&&(e.fontFamily=a),(a=Sl(t,n,i,"fontWeight"))&&"bold"==a&&(e.fontWeight=700),(a=Sl(t,n,i,"wrapOption"))&&"noWrap"==a&&(e.wrapLine=!1),(a=Sl(t,n,i,"lineHeight"))&&a.match(ol)&&(e.lineHeight=a),(a=Sl(t,n,i,"fontSize"))&&a.match(ol)&&(e.fontSize=a),(a=Sl(t,n,i,"fontStyle"))&&(e.fontStyle=bn[a.toUpperCase()]),r){var o;a=r.getAttribute("imageType")||r.getAttribute("imagetype");var s=r.getAttribute("encoding");r=xT(o=r.textContent).call(o),"PNG"==a&&"Base64"==s&&r&&(e.backgroundImage="data:image/png;base64,"+r)}(n=Tl(n,i,"textDecoration"))&&wl(e,n),(t=El(t,i,"textDecoration"))&&wl(e,t)}(t,e,a,r=kl(e,"backgroundImage",r,"#","http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt")[0],i),t}function wl(e,t){for(var n,r,i,a,o,s,u=t.split(" "),c=0;c<u.length;c++)switch(u[c]){case"underline":SM(n=e.textDecoration).call(n,"underline")||e.textDecoration.push("underline");break;case"noUnderline":SM(r=e.textDecoration).call(r,"underline")&&$e(e.textDecoration,"underline");break;case"lineThrough":SM(i=e.textDecoration).call(i,"lineThrough")||e.textDecoration.push("lineThrough");break;case"noLineThrough":SM(a=e.textDecoration).call(a,"lineThrough")&&$e(e.textDecoration,"lineThrough");break;case"overline":SM(o=e.textDecoration).call(o,"overline")||e.textDecoration.push("overline");break;case"noOverline":SM(s=e.textDecoration).call(s,"overline")&&$e(e.textDecoration,"overline")}}function Sl(e,t,n,r){return(e=El(e,n,r))?e:Tl(t,n,r)}function Tl(e,t,n){if(!e)return null;for(var r=vl(e),i=0;i<r.length;i++){var a=Zr.getAttributeNS(r[i],"http://www.w3.org/ns/ttml#styling",n);if(a)return a}return xl(e,t,n)}function El(e,t,n){var r=Zr.getAttributeNS(e,"http://www.w3.org/ns/ttml#styling",n);return r||xl(e,t,n)}function xl(e,t,n){e=kl(e,"style",t,"");for(var r=null,i=0;i<e.length;i++){var a=Zr.getAttributeNS(e[i],"http://www.w3.org/ns/ttml#styling",n);a||(a=El(e[i],t,n)),a&&(r=a)}return r}function kl(e,t,n,r,i){var a=[];if(!e||1>n.length)return a;var o=e;for(e=null;o&&!(e=i?Zr.getAttributeNS(o,i,t):o.getAttribute(t))&&(o=o.parentNode)instanceof Element;);if(t=e)for(i=(t=w(t=t.split(" "))).next();!i.done;i=t.next())for(i=i.value,o=(e=w(n)).next();!o.done;o=e.next())if(r+(o=o.value).getAttribute("xml:id")==i){a.push(o);break}return a}function Al(e,t){var n=null;if(ul.test(e)){n=ul.exec(e);var r=Number(n[1]),i=Number(n[2]),a=Number(n[3]),o=Number(n[4]);n=(a+=(o+=(Number(n[5])||0)/t.h)/t.frameRate)+60*i+3600*r}else cl.test(e)?n=Ml(cl,e):ll.test(e)?n=Ml(ll,e):fl.test(e)?(n=fl.exec(e),n=Number(n[1])/t.frameRate):hl.test(e)?(n=hl.exec(e),n=Number(n[1])/t.g):dl.test(e)&&(n=Ml(dl,e));return n}function Ml(e,t){var n=e.exec(t);return null==n||""==n[0]?null:(Number(n[4])||0)/1e3+(Number(n[3])||0)+60*(Number(n[2])||0)+3600*(Number(n[1])||0)}function Il(e,t,n,r){this.frameRate=Number(e)||30,this.h=Number(t)||1,this.g=Number(r),0==this.g&&(this.g=e?this.frameRate*this.h:1),n&&(e=/^(\d+) (\d+)$/g.exec(n))&&(this.frameRate*=Number(e[1])/Number(e[2]))}function Cl(){this.g=new nl}function Pl(){}function Nl(e,t,n){var r;if(r=/^align:(start|middle|center|end|left|right)$/.exec(t))t=r[1],e.textAlign="middle"==t?un:cn[t.toUpperCase()];else if(r=/^vertical:(lr|rl)$/.exec(t))e.writingMode="lr"==r[1]?"vertical-lr":"vertical-rl";else if(r=/^size:([\d.]+)%$/.exec(t))e.size=Number(r[1]);else if(r=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(t))e.position=Number(r[1]),r[2]&&(t=r[2],e.positionAlign="line-left"==t||"start"==t?"line-left":"line-right"==t||"end"==t?"line-right":"center");else{if(!(r=/^region:(.*)$/.exec(t))){e:{if(n=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(t))e.lineInterpretation=1,e.line=Number(n[1]),n[2]&&(e.lineAlign=vn[n[2].toUpperCase()]);else{if(!(n=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(t))){e=!1;break e}e.lineInterpretation=pn,e.line=Number(n[1]),n[2]&&(e.lineAlign=vn[n[2].toUpperCase()])}e=!0}return e}(t=function(e,t){var n=Hb(e).call(e,(function(e){return e.id==t}));return n.length?n[0]:(ne.v("VTT parser could not find a region with id: ",t," The region will be ignored."),null)}(n,r[1]))&&(e.region=t)}return!0}function jl(e){if(null==(e=Yi(e,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3})/g)))return null;var t=Number(e[2]),n=Number(e[3]);return 59<t||59<n?null:Number(e[4])/1e3+n+60*t+3600*(Number(e[1])||0)}function Ol(){this.g=null}function _l(e,t,n){var r,i,a;return(new qr).box("payl",Xr((function(e){r=xe(e)}))).box("iden",Xr((function(e){i=xe(e)}))).box("sttg",Xr((function(e){a=xe(e)}))).parse(e),r?function(e,t,n,r,i){if(e=new on(r,i,e),t&&(e.id=t),n)for(t=new Wi(n),n=$i(t);n;)Nl(e,n,[])||ne.v("VTT parser encountered an invalid VTT setting: ",n," The setting will be ignored."),Xi(t),n=$i(t);return e}(r,i,a,t,n):null}function Ll(){}function Dl(){rl?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(rl=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Ul):console.debug("EmeEncryptionSchemePolyfill: EME not found")}function Ul(e,t){var n=this;return T((function r(){var i;return z(r,(function(r){switch(r.s){case 1:return console.assert(n==navigator,'bad "this" for requestMediaKeySystemAccess'),N(r,rl.call(n,e,t),2);case 2:return Wl(i=r.B)?(console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=rl,r.return(i)):(console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.requestMediaKeySystemAccess=Fl,r.return(Fl.call(n,e,t)))}}))}))}function Fl(e,t){var n=this;return T((function r(){var i,a,o,s,u,c,l,f;return z(r,(function(r){switch(r.s){case 1:console.assert(n==navigator,'bad "this" for requestMediaKeySystemAccess'),i=Gl(e),a=[];for(var h=w(t),d=h.next();!d.done;d=h.next())o=d.value,s=Kl(o.videoCapabilities,i),u=Kl(o.audioCapabilities,i),o.videoCapabilities&&o.videoCapabilities.length&&!s.length||o.audioCapabilities&&o.audioCapabilities.length&&!u.length||((c=rw({},o)).videoCapabilities=s,c.audioCapabilities=u,a.push(c));if(!a.length)throw(l=Error("Unsupported keySystem or supportedConfigurations.")).name="NotSupportedError",l.code=DOMException.NOT_SUPPORTED_ERR,l;return N(r,rl.call(n,e,a),2);case 2:return f=r.B,r.return(new ql(f,i))}}))}))}function Kl(e,t){return e?Hb(e).call(e,(function(e){return!e.encryptionScheme||e.encryptionScheme==t})):e}function Bl(){}function Hl(){il?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(il=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Vl):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}function Vl(e){var t=this;return T((function n(){var r,i;return z(n,(function(n){switch(n.s){case 1:return console.assert(t==navigator.mediaCapabilities,'bad "this" for decodingInfo'),N(n,il.call(t,e),2);case 2:return r=n.B,e.keySystemConfiguration?(i=r.keySystemAccess)&&Wl(i)?(console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=il,n.return(r)):(console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=zl,n.return(zl.call(t,e))):n.return(r)}}))}))}function zl(e){var t=this;return T((function n(){var r,i,a,o,s,u,c,l,f;return z(n,(function(n){switch(n.s){case 1:return console.assert(t==navigator.mediaCapabilities,'bad "this" for decodingInfo'),r=null,e.keySystemConfiguration&&(i=e.keySystemConfiguration,a=i.keySystem,o=i.audio&&i.audio.encryptionScheme,s=i.video&&i.video.encryptionScheme,r=Gl(a),u={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},o&&o!=r||s&&s!=r)?n.return(u):N(n,il.call(t,e),2);case 2:if((c=n.B).keySystemAccess){c.keySystemAccess=new ql(c.keySystemAccess,r),n.I(3);break}if(!e.keySystemConfiguration){n.I(3);break}var h=e.keySystemConfiguration,d=[],p=[];return h.audio&&d.push({robustness:h.audio.robustness||"",contentType:e.audio.contentType}),h.video&&p.push({robustness:h.video.robustness||"",contentType:e.video.contentType}),h={initDataTypes:h.initDataType?[h.initDataType]:[],distinctiveIdentifier:h.distinctiveIdentifier,persistentState:h.persistentState,sessionTypes:h.sessionTypes},d.length&&(h.audioCapabilities=d),p.length&&(h.videoCapabilities=p),l=h,f=c,N(n,navigator.requestMediaKeySystemAccess(e.keySystemConfiguration.keySystem,[l]),5);case 5:f.keySystemAccess=n.B;case 3:return n.return(c)}}))}))}function ql(e,t){this.h=e,this.g=t,this.keySystem=e.keySystem}function Gl(e){return oM(e).call(e,"com.widevine")||oM(e).call(e,"com.microsoft")||oM(e).call(e,"com.adobe")||oM(e).call(e,"org.w3")?"cenc":oM(e).call(e,"com.apple")?"cbcs-1-9":(console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",e,"Please contribute!"),null)}function Wl(e){var t=(e=e.getConfiguration()).audioCapabilities&&e.audioCapabilities[0];return!(!(e=e.videoCapabilities&&e.videoCapabilities[0]||t)||void 0===e.encryptionScheme)}function Xl(){}function Yl(){Dl(),Hl()}xn["application/ttml+xml"]=nl,$("shaka.text.Mp4TtmlParser",Cl),Cl.prototype.parseInit=function(e){var t=!1;if((new qr).box("moov",Gr).box("trak",Gr).box("mdia",Gr).box("minf",Gr).box("stbl",Gr).ma("stsd",Wr).box("stpp",(function(e){t=!0,e.parser.stop()})).parse(e),!t)throw new re(2,2,2007)},Cl.prototype.parseInit=Cl.prototype.parseInit,Cl.prototype.parseMedia=function(e,t){var n,r=!1,i=[];if((new qr).box("mdat",Xr(Pw(n=function(e){r=!0,i=nd(i).call(i,this.g.parseMedia(e,t))}).call(n,this))).parse(e),!r)throw new re(2,2,2007);return i},Cl.prototype.parseMedia=Cl.prototype.parseMedia,xn['application/mp4; codecs="stpp"']=Cl,xn['application/mp4; codecs="stpp.ttml.im1t"']=Cl,xn['application/mp4; codecs="stpp.TTML.im1t"']=Cl,$("shaka.text.VttTextParser",Pl),Pl.prototype.parseInit=function(){},Pl.prototype.parseInit=Pl.prototype.parseInit,Pl.prototype.parseMedia=function(e,t){var n,r=xe(e);if(r=(r=r.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")).split(/\n{2,}/m),!/^WEBVTT($|[ \t\n])/m.test(r[0]))throw new re(2,2,2e3);var i=t.segmentStart;if(null==i&&(i=0,SM(n=r[0]).call(n,"X-TIMESTAMP-MAP"))){var a=r[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),o=r[0].match(/MPEGTS:(\d+)/m);if(a&&o){if(null==(i=jl(new Wi(a[1]))))throw new re(2,2,2e3);i=t.periodStart+(Number(o[1])/9e4-i)}}o=[];var s=r[0].split("\n");for(a=1;a<s.length;a++)if(/^Region:/.test(s[a])){var u=new Wi(s[a]),c=new wn;$i(u),Xi(u);for(var l=$i(u);l;){var f;e:{var h=c,d=l;if(f=/^id=(.*)$/.exec(d))h.id=f[1];else if(f=/^width=(\d{1,2}|100)%$/.exec(d))h.width=Number(f[1]);else if(f=/^lines=(\d+)$/.exec(d))h.height=Number(f[1]),h.heightUnits=2;else if(f=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(d))h.regionAnchorX=Number(f[1]),h.regionAnchorY=Number(f[2]);else if(f=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(d))h.viewportAnchorX=Number(f[1]),h.viewportAnchorY=Number(f[2]);else{if(!/^scroll=up$/.exec(d)){f=!1;break e}h.scroll="up"}f=!0}f||ne.v("VTT parser encountered an invalid VTTRegion setting: ",l," The setting will be ignored."),Xi(u),l=$i(u)}o.push(c)}for(a=[],u=1;u<r.length;u++){if(f=s=r[u].split("\n"),h=i,s=o,1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0])s=null;else{var p,g;c=null,SM(p=f[0]).call(p,"--\x3e")||(c=f[0],Wd(f).call(f,0,1)),d=jl(l=new Wi(f[0]));var v=Yi(l,/[ \t]+--\x3e[ \t]+/g),m=jl(l);if(null==d||null==v||null==m)throw new re(2,2,2001);for(f=new on(d+h,m+h,xT(g=xd(f).call(f,1).join("\n")).call(g)),Xi(l),h=$i(l);h;)Nl(f,h,s)||ne.v("VTT parser encountered an invalid VTT setting: ",h," The setting will be ignored."),Xi(l),h=$i(l);null!=c&&(f.id=c),s=f}s&&a.push(s)}return a},Pl.prototype.parseMedia=Pl.prototype.parseMedia,xn["text/vtt"]=Pl,xn['text/vtt; codecs="vtt"']=Pl,xn['text/vtt; codecs="wvtt"']=Pl,$("shaka.text.Mp4VttParser",Ol),Ol.prototype.parseInit=function(e){var t,n=!1;if((new qr).box("moov",Gr).box("trak",Gr).box("mdia",Gr).ma("mdhd",Pw(t=function(e){0==e.version?(e.reader.U(4),e.reader.U(4),this.g=e.reader.N(),e.reader.U(4)):(e.reader.U(8),e.reader.U(8),this.g=e.reader.N(),e.reader.U(8)),e.reader.U(4)}).call(t,this)).box("minf",Gr).box("stbl",Gr).ma("stsd",Wr).box("wvtt",(function(){n=!0})).parse(e),!this.g)throw new re(2,2,2008);if(!n)throw new re(2,2,2008)},Ol.prototype.parseInit=Ol.prototype.parseInit,Ol.prototype.parseMedia=function(e,t){var n=this;if(!this.g)throw ne.error("No init segment for MP4+VTT!"),new re(2,2,2008);var r,i=0,a=[],o=[],s=!1,u=!1,c=!1,l=null;if((new qr).box("moof",Gr).box("traf",Gr).ma("tfdt",(function(e){s=!0,i=0==e.version?e.reader.N():e.reader.Pb()})).ma("tfhd",(function(e){var t=h_(e);(e=e.reader).U(4),1&t&&e.U(8),2&t&&e.U(4),l=8&t?e.N():null})).ma("trun",(function(e){u=!0;var t=e.version,n=h_(e),r=(e=e.reader).N();1&n&&e.U(4),4&n&&e.U(4);for(var i=[],o=0;o<r;o++){var s={duration:null,sampleSize:null,Sd:null};256&n&&(s.duration=e.N()),512&n&&(s.sampleSize=e.N()),1024&n&&e.U(4),2048&n&&(s.Sd=0==t?e.N():e.De()),i.push(s)}a=i})).box("mdat",Xr((function(e){c=!0,r=e}))).parse(e),!c&&!s&&!u)throw new re(2,2,2008);var f=i,h=new Hr(new DataView(r.buffer,r.byteOffset,r.byteLength),0);return Gf(a).call(a,(function(e){var r=e.duration||l,a=e.Sd?i+e.Sd:f;f=a+(r||0);var s=0;do{var u=h.N();s+=u;var c=h.N(),d=null;"vttc"==(c=$r(c))?8<u&&(d=h.mb(u-8)):("vtte"!=c&&ne.error("Unknown box "+c+"! Skipping!"),h.U(u-8)),r?d&&o.push(_l(d,t.periodStart+a/n.g,t.periodStart+f/n.g)):ne.error("WVTT sample duration unknown, and no default found!")}while(e.sampleSize&&s<e.sampleSize)})),Hb(o).call(o,ye.Ra)},Ol.prototype.parseMedia=Ol.prototype.parseMedia,xn['application/mp4; codecs="wvtt"']=Ol,$("shaka.util.Dom.createHTMLElement",(function(e){return document.createElement(e)})),$("shaka.util.Dom.createVideoElement",(function(){var e=document.createElement("video");return e.muted=!0,e.width=600,e.height=400,e})),$("shaka.util.Dom.asHTMLElement",(function(e){return e})),$("shaka.util.Dom.asHTMLMediaElement",(function(e){return e})),$("shaka.util.Dom.removeAllChildren",(function(e){for(;e.firstChild;)e.removeChild(e.firstChild)})),$("EmeEncryptionSchemePolyfill",Ll),Ll.install=Dl,$("McEncryptionSchemePolyfill",Bl),Bl.install=Hl,ql.prototype.getConfiguration=function(){var e=this.h.getConfiguration();if(e.videoCapabilities)for(var t=w(e.videoCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.g;if(e.audioCapabilities)for(n=(t=w(e.audioCapabilities)).next();!n.done;n=t.next())n.value.encryptionScheme=this.g;return e},ql.prototype.createMediaKeys=function(){return this.h.createMediaKeys()},$("EncryptionSchemePolyfills",Xl),Xl.install=Yl,void 0!==n&&n.gf&&(n.gf=Xl)}.call(n,t,t,void 0),n.shaka)e_[r]=n.shaka[r]}();var p_=t(d_),g_=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=Ul(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Ln(e,"prototype",{writable:!1}),t&&uf(e,t)}(a,e);var t,n,r,i=Of(a);function a(e){var t,n,r,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),t=i.call(this,e),n=_l(t),o=function(){var e=t.shakaplayer.getVariantTracks();Gf(e).call(e,(function(e){if(e.active)for(var t=0;t<this.content.length;++t){var n=this.content[t];n.value===e.id?n.selected=!0:n.selected=!1}}))},(r=jl(r="onAdaptation_"))in n?Ln(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,p_.polyfill.installAll(),t}return t=a,r=[{key:"pluginName",get:function(){return"ShakaPlugin"}},{key:"defaultConfig",get:function(){return{shakaOpts:{}}}},{key:"isSupported",value:function(){return p_.Player.isBrowserSupported()}}],(n=[{key:"afterCreate",value:function(){var e=this;this.content=[],this.url=this.player.config.url,p_.Player.isBrowserSupported()&&this.on("urlchange",(function(t){/^blob/.test(t)||(e.url=t,e.loadUrl(t))}))}},{key:"beforePlayerInit",value:function(){if(!p_.Player.isBrowserSupported())throw new Error("Browser not supported!");this._initShaka()}},{key:"destroy",value:function(){this.shakaplayer&&(this.shakaplayer.destroy(),this.shakaplayer=null)}},{key:"_initShaka",value:function(){var e=this.player;this.shakaplayer=new p_.Player(e.video),this.shakaplayer.addEventListener("error",(function(e){console.error("Error code",e.detail.code,"object",e.detail)})),this.config.shakaOpts&&this.shakaplayer.configure(this.config.shakaOpts),this.shakaplayer.getNetworkingEngine().registerRequestFilter((function(e,t){e===p_.net.NetworkingEngine.RequestType.LICENSE&&(t.headers["CWIP-Auth-Header"]="VGhpc0lzQVRlc3QK")})),this.shakaplayer.addEventListener("adaptation",this.onAdaptation_),this.shakaplayer.configure({abr:{enabled:!1}}),this.loadUrl(this.url)}},{key:"loadUrl",value:function(e){var t=this;this.shakaplayer.load(e).then((function(){console.log(" this.onTracksChanged_"),t.onTracksChanged_()})).catch((function(e){console.trace("event",e),console.error("Error code",e.detail.code,"object",e.detail)}))}},{key:"onTracksChanged_",value:function(){this.updateVariantTracks_()}},{key:"updateVariantTracks_",value:function(){var e=this.shakaplayer.getVariantTracks();Nh(e).call(e,(function(e,t){return e.bandwidth-t.bandwidth})),this.updateTrackOptions_(e)}},{key:"updateTrackOptions_",value:function(e){var t=this,n={variant:function(e){var t="";return e.width&&e.height&&(t+=e.height+"P"),t}};this.content=[],Gf(e).call(e,(function(e){var r={};r.textContent=n[e.type](e),r.track=e,r.value=e.id,r.selected=e.active,t.content.push(r)})),this.updateDefinition()}},{key:"updateDefinition",value:function(){"mobile"!==BT.device&&console.log("updateDefinition",this.content)}}])&&Ol(t.prototype,n),r&&Ol(t,r),Ln(t,"prototype",{writable:!1}),a}(XT);return VePlayer.register("plugin:shaka",g_),g_}));
|